@lovrabet/rabetbase-cli 2.4.7 → 2.5.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +13 -3
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +7 -0
- package/lib/api/generate-sdk-config-file.js +1 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.d.ts +2 -5
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.d.ts +5 -0
- package/lib/commands/config/delete.js +1 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.d.ts +12 -0
- package/lib/commands/config/init.js +1 -0
- 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/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.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/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +1 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.d.ts +6 -2
- 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.d.ts +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/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.d.ts +2 -2
- 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.d.ts +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.d.ts +10 -0
- package/lib/config/domain-config.js +1 -0
- package/lib/config/schema.d.ts +3 -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.d.ts +23 -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.d.ts +9 -0
- package/lib/constant/region.js +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.d.ts +4 -6
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +2 -2
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.d.ts +11 -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.d.ts +2 -2
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +28 -0
- package/lib/utils/ai_config.d.ts +1 -2
- 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 +1 -3
- package/skills/rabetbase/SKILL.md +33 -28
- package/skills/rabetbase/guides/backend-function.md +41 -12
- package/skills/rabetbase/guides/bff-creation-workflow.md +6 -4
- package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
- package/skills/rabetbase/guides/data-api-guidelines.md +8 -8
- package/skills/rabetbase/guides/database-connection-workflow.md +8 -16
- package/skills/rabetbase/guides/menu-anomaly-manual-cleanup.md +1 -6
- package/skills/rabetbase/guides/sdk-client-generation.md +146 -0
- package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
- package/skills/rabetbase/guides/troubleshooting.md +1 -1
- package/skills/rabetbase/guides/typescript-sdk.md +46 -10
- package/skills/rabetbase/references/rabetbase-api-list.md +4 -4
- package/skills/rabetbase/references/rabetbase-api-pull.md +44 -29
- package/skills/rabetbase/references/rabetbase-app-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-auth-login.md +4 -2
- package/skills/rabetbase/references/rabetbase-bff-push.md +3 -1
- package/skills/rabetbase/references/rabetbase-codegen-sql.md +3 -1
- package/skills/rabetbase/references/rabetbase-config.md +75 -30
- package/skills/rabetbase/references/rabetbase-dataset-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-db-analyze.md +3 -3
- package/skills/rabetbase/references/rabetbase-db-detail.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -4
- package/skills/rabetbase/references/rabetbase-db-diff.md +6 -9
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
- package/skills/rabetbase/references/rabetbase-init.md +57 -51
- package/skills/rabetbase/references/rabetbase-kb.md +2 -0
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-custom-detail.md +3 -3
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-project-create.md +12 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +2 -2
- package/skills/rabetbase/references/rabetbase-role-user-resolve.md +2 -2
- package/skills/rabetbase/references/rabetbase-user-account.md +1 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +6 -6
- package/skills/rabetbase.manifest.json +4 -3
- package/templates/README.md +17 -28
- package/templates/generate-api/api.ts.tpl +3 -3
- package/templates/generate-api/client.ts.tpl +10 -37
- package/lib/commands/data/filter.d.ts +0 -7
- package/lib/commands/data/filter.js +0 -1
- package/lib/commands/data/getOne.d.ts +0 -7
- package/lib/commands/data/getOne.js +0 -1
- package/lib/commands/data/index.d.ts +0 -8
- package/lib/commands/data/index.js +0 -1
- package/lib/commands/data/shared.d.ts +0 -33
- package/lib/commands/data/shared.js +0 -1
- package/lib/commands/init/index.d.ts +0 -11
- package/lib/commands/init/index.js +0 -1
- package/lib/utils/rules-cdn.d.ts +0 -38
- package/lib/utils/rules-cdn.js +0 -1
- package/templates/rules/lovrabet_rules.mdc.tpl +0 -893
- package/templates/skill/SKILL.md.tpl +0 -120
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x333c61,_0xb82074){const _0x1ded39=a160_0x5a50,_0x2dbf18=_0x333c61();while(!![]){try{const _0x5af8ff=parseInt(_0x1ded39(0x148))/0x1*(parseInt(_0x1ded39(0x146))/0x2)+parseInt(_0x1ded39(0x143))/0x3*(-parseInt(_0x1ded39(0x151))/0x4)+-parseInt(_0x1ded39(0x150))/0x5*(parseInt(_0x1ded39(0x14b))/0x6)+parseInt(_0x1ded39(0x145))/0x7+-parseInt(_0x1ded39(0x15b))/0x8+parseInt(_0x1ded39(0x15c))/0x9*(-parseInt(_0x1ded39(0x159))/0xa)+parseInt(_0x1ded39(0x158))/0xb;if(_0x5af8ff===_0xb82074)break;else _0x2dbf18['push'](_0x2dbf18['shift']());}catch(_0x1fefd5){_0x2dbf18['push'](_0x2dbf18['shift']());}}}(a160_0x5f37,0xb8eef));import{existsSync}from'node:fs';function a160_0x5a50(_0x3f490f,_0x51c213){_0x3f490f=_0x3f490f-0x143;const _0x5f3744=a160_0x5f37();let _0x5a50ba=_0x5f3744[_0x3f490f];return _0x5a50ba;}import a160_0x37a143 from'node:path';import a160_0x132232 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getProjectNameValidationError}from'../../../commands/project/create/project-name.js';export async function guidedCreateProject(_0x478341,_0x36db9b,_0x3c8034){const _0x4b3efb=a160_0x5a50,_0x2a6cb3=_0x4b3efb(0x149),_0x512f4f=readConfig(),_0x42d8a4=typeof _0x512f4f[_0x4b3efb(0x14a)]==='string'?_0x512f4f['env']:undefined,_0x56d2bf=await input({'message':_0x4b3efb(0x157),'default':_0x2a6cb3,'validate':_0x374ee1=>{const _0x2bdb8c=_0x4b3efb,_0x55ee37=_0x374ee1[_0x2bdb8c(0x156)]()||_0x2a6cb3,_0x3c8214=getProjectNameValidationError(_0x55ee37);if(_0x3c8214)return _0x3c8214;const _0x1059bc=a160_0x37a143['resolve'](process['cwd'](),_0x55ee37);if(existsSync(_0x1059bc))return _0x2bdb8c(0x14c)+_0x55ee37+_0x2bdb8c(0x15a);return!![];}});console[_0x4b3efb(0x144)](a160_0x132232[_0x4b3efb(0x154)](_0x4b3efb(0x14e)+a160_0x132232['cyan'](_0x56d2bf)));const _0x188045=await selectSingleAppcode(_0x3c8034);console[_0x4b3efb(0x144)](a160_0x132232[_0x4b3efb(0x154)](_0x4b3efb(0x14d)+a160_0x132232[_0x4b3efb(0x14f)](_0x188045||'Not\x20set')));if(_0x188045){const _0x8c6c05=await getIsSessionValid();if(!_0x8c6c05){const _0x1a5d67=await confirm({'message':_0x4b3efb(0x147),'default':!![]});if(_0x1a5d67){const _0x58eef9=await authServer({'silent':!![]});console[_0x4b3efb(0x144)](a160_0x132232[_0x4b3efb(0x154)](_0x4b3efb(0x15d)+a160_0x132232[_0x4b3efb(0x14f)](_0x58eef9?_0x4b3efb(0x153):'Login\x20failed')));}else console[_0x4b3efb(0x144)](a160_0x132232['green'](_0x4b3efb(0x15d)+a160_0x132232['cyan'](_0x4b3efb(0x152))));}await _0x478341({'projectName':_0x56d2bf,'appCode':_0x188045,'env':_0x36db9b||_0x42d8a4||_0x4b3efb(0x155)});}else await _0x478341({'projectName':_0x56d2bf,'env':_0x36db9b||_0x42d8a4||_0x4b3efb(0x155)});}function a160_0x5f37(){const _0x541201=['my-app','env','6zLGBGs','Directory\x20\x22','√\x20App\x20Code:\x20','√\x20Project\x20Name:\x20','cyan','2492885LdLIqi','52glCSGA','Skipped','Logged\x20in','green','production','trim','Project\x20name:','23739936TfBlvo','547670HaupLr','\x22\x20already\x20exists','7860328GgSIGZ','144OqXtVz','√\x20Login\x20status:\x20','155913cvYlFu','log','3817870XAjxIy','57206qJusvj','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','38HopSxU'];a160_0x5f37=function(){return _0x541201;};return a160_0x5f37();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a161_0x572d(_0x43b381,_0x365388){_0x43b381=_0x43b381-0x14e;const _0x4ef269=a161_0x4ef2();let _0x572d63=_0x4ef269[_0x43b381];return _0x572d63;}(function(_0x3c94ea,_0x3066ef){const _0x319190=a161_0x572d,_0x5a7f9e=_0x3c94ea();while(!![]){try{const _0x38a750=-parseInt(_0x319190(0x156))/0x1*(parseInt(_0x319190(0x150))/0x2)+parseInt(_0x319190(0x152))/0x3*(-parseInt(_0x319190(0x14e))/0x4)+parseInt(_0x319190(0x155))/0x5*(parseInt(_0x319190(0x159))/0x6)+parseInt(_0x319190(0x14f))/0x7+parseInt(_0x319190(0x154))/0x8*(-parseInt(_0x319190(0x15c))/0x9)+-parseInt(_0x319190(0x157))/0xa*(-parseInt(_0x319190(0x15a))/0xb)+parseInt(_0x319190(0x151))/0xc;if(_0x38a750===_0x3066ef)break;else _0x5a7f9e['push'](_0x5a7f9e['shift']());}catch(_0x410132){_0x5a7f9e['push'](_0x5a7f9e['shift']());}}}(a161_0x4ef2,0x7129c));export function formatElapsed(_0x548256){const _0x29c0bb=a161_0x572d,_0x452307=Date[_0x29c0bb(0x153)]()-_0x548256;if(_0x452307<0x3e8)return _0x452307+'ms';const _0x4c1315=(_0x452307/0x3e8)[_0x29c0bb(0x15b)](0x2),_0x2110c9=_0x4c1315[_0x29c0bb(0x158)](/\.?0+$/u,'');return _0x2110c9+'s';}function a161_0x4ef2(){const _0x3ab329=['15319872OHKNUV','360543JHYcur','now','6607896ocYyJX','21220QVaquG','282959rueyUL','10AEhwMs','replace','852LTstzq','809369tUpJFN','toFixed','9Hatlkt','8THeuuF','2981013mvzfTf','6eQjFCG'];a161_0x4ef2=function(){return _0x3ab329;};return a161_0x4ef2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x10b4d8,_0x8dfdec){const _0x4255e7=a164_0x330b,_0xb98ebd=_0x10b4d8();while(!![]){try{const _0x30a52c=-parseInt(_0x4255e7(0x1f0))/0x1+parseInt(_0x4255e7(0x1f3))/0x2*(parseInt(_0x4255e7(0x1ce))/0x3)+-parseInt(_0x4255e7(0x1ee))/0x4+parseInt(_0x4255e7(0x21b))/0x5+parseInt(_0x4255e7(0x1d6))/0x6*(parseInt(_0x4255e7(0x1de))/0x7)+parseInt(_0x4255e7(0x213))/0x8*(-parseInt(_0x4255e7(0x1e6))/0x9)+-parseInt(_0x4255e7(0x206))/0xa*(parseInt(_0x4255e7(0x20c))/0xb);if(_0x30a52c===_0x8dfdec)break;else _0xb98ebd['push'](_0xb98ebd['shift']());}catch(_0x454c4c){_0xb98ebd['push'](_0xb98ebd['shift']());}}}(a164_0x53a6,0xddb39));import a164_0x3febed from'path';import a164_0x51b214 from'fs';import a164_0x4c5fec from'chalk';import a164_0x314462 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{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';function a164_0x53a6(){const _0x3d7b5f=['minimumVersion','join','info','writeFileSync','rmSync','dirname','1.0.0','defaultApp','message','\x20dataset(s),\x20generated\x20','cwd','gray','\x20model(s)','create','\x20\x202.\x20Pull\x20API\x20configuration:\x20','API\x20configuration\x20pulled:\x20','配置应用AppCode失败','error','120327HOKjOM','Project\x20directory\x20','text','\x20config\x20set\x20appcode\x20<app-code>\x27','parse','W_OK','CLI\x20版本检查','log','26874FyvJQd','projectName','Extracting\x20project\x20template','currentVersion','readFileSync','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','清理项目目录失败:\x20','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','1029fqWCwt','\x20Generated\x20by\x20rabetbase\x20cli\x20','Project\x20template\x20ready','resolve','dev','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','package.json','11552148nLoqIB','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','green','cookie','projectCode','existsSync','appCode','Install\x20dependencies','1053528SZaFKb','√\x20package.json\x20updated:\x20name=','375484UxEnar','utf8','更新\x20package.json\x20失败','74YqCdcz','name','apps','\x20|\x20AppCode:\x20','项目创建失败:\x20','bold','lstatSync','Verifying\x20project\x20template','\x20√\x20','isDirectory','length','Project\x20name:\x20','*\x20Pulling\x20API\x20configuration...','production','fail','API\x20配置拉取异常','...','warn','stableVersion','10bFOwlc','Downloading\x20project\x20template','resolving','repeat','\x20|\x20Default:\x20','constants','850399oLhvZw','√\x20Pulled\x20','nonInteractive','env','verifying','modelCount','项目创建完成:\x20','8TvqZRG','description','version','🚀\x20Next\x20Steps:','Resolving\x20project\x20template','√\x20Configuration\x20file\x20created,\x20Apps:\x20','配置应用AppCode:\x20','chdir','3826950qtSxIO','*\x20Configuring\x20AppCode\x20for\x20project\x20','\x20api\x20pull','cyan','\x20&&\x20'];a164_0x53a6=function(){return _0x3d7b5f;};return a164_0x53a6();}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';function readDirectoryIdentity(_0x525b37){const _0x20671e=a164_0x330b;try{const _0x5a0f5d=a164_0x51b214[_0x20671e(0x1f9)](_0x525b37);if(!_0x5a0f5d[_0x20671e(0x1fc)]())return null;return{'dev':_0x5a0f5d[_0x20671e(0x1e2)],'ino':_0x5a0f5d['ino']};}catch{return null;}}export async function createApp(_0x47d2a0){const _0x1f634f=a164_0x330b,_0x1611b2=await checkCliVersion();(_0x1611b2['needsUpgrade']||_0x1611b2['belowMinimum'])&&(printCliUpgradeWarning(_0x1611b2),assertCliVersionSupported(_0x1611b2),logger[_0x1f634f(0x1be)](_0x1f634f(0x1c9),_0x1f634f(0x1d4),{'currentVersion':_0x1611b2[_0x1f634f(0x1d9)],'stableVersion':_0x1611b2[_0x1f634f(0x205)],'minimumVersion':_0x1611b2[_0x1f634f(0x220)],'needsUpgrade':_0x1611b2['needsUpgrade'],'belowMinimum':_0x1611b2['belowMinimum']}));if(_0x47d2a0[_0x1f634f(0x1ea)]&&(_0x47d2a0['appCode']||_0x47d2a0[_0x1f634f(0x20e)]))await runCreate({'projectName':_0x47d2a0['projectCode'],'appCode':_0x47d2a0[_0x1f634f(0x1ec)],'env':_0x47d2a0['env']},_0x47d2a0);else{if(_0x47d2a0[_0x1f634f(0x1ea)]){const _0x312e8e=await selectSingleAppcode(_0x47d2a0[_0x1f634f(0x1e9)]);await runCreate({'projectName':_0x47d2a0['projectCode'],'appCode':_0x312e8e||undefined,'env':_0x47d2a0[_0x1f634f(0x20f)]},_0x47d2a0);}else await guidedCreateProject(_0x5605cd=>runCreate(_0x5605cd,_0x47d2a0),_0x47d2a0['env'],_0x47d2a0['cookie']);}}async function runCreate(_0x4a989f,_0x5454c7){const _0x162b80=a164_0x330b;_0x4a989f[_0x162b80(0x1d7)]=validateProjectName(_0x4a989f[_0x162b80(0x1d7)]);const _0xf5b018=a164_0x3febed[_0x162b80(0x1e1)](process['cwd'](),_0x4a989f[_0x162b80(0x1d7)]);if(a164_0x51b214[_0x162b80(0x1eb)](_0xf5b018))throw new Error(_0x162b80(0x1cf)+_0x4a989f[_0x162b80(0x1d7)]+'\x20already\x20exists');let _0x270adf=null;try{a164_0x51b214['accessSync'](a164_0x3febed[_0x162b80(0x1c1)](_0xf5b018),a164_0x51b214[_0x162b80(0x20b)][_0x162b80(0x1d3)]);}catch{throw new Error(_0x162b80(0x1dd));}logger[_0x162b80(0x1be)](_0x162b80(0x1c9),'开始创建项目:\x20'+_0x4a989f[_0x162b80(0x1d7)],{'projectDir':_0xf5b018,'appCode':_0x4a989f[_0x162b80(0x1ec)]}),console[_0x162b80(0x1d5)](),console['log'](a164_0x4c5fec[_0x162b80(0x1e8)]('\x20√\x20')+_0x162b80(0x1fe)+a164_0x4c5fec[_0x162b80(0x1e8)](_0x4a989f[_0x162b80(0x1d7)])+(_0x4a989f[_0x162b80(0x1ec)]?_0x162b80(0x1f6)+a164_0x4c5fec[_0x162b80(0x21e)](_0x4a989f[_0x162b80(0x1ec)]):''));try{await runTask(_0x162b80(0x217),_0x444593=>copyProjectTemplate(_0x4a989f[_0x162b80(0x1d7)],_0x1f53e5=>_0x444593(projectTemplateStageLabel(_0x1f53e5))),_0x162b80(0x1e0)),_0x270adf=readDirectoryIdentity(_0xf5b018);if(!_0x270adf)throw new Error('Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory');await updatePackageJsonName(_0x4a989f['projectName']),await runTask(_0x162b80(0x1ed),()=>installDependencies(_0x4a989f[_0x162b80(0x1d7)])),await runTask('Format\x20code',()=>formatProjectCode(_0x4a989f[_0x162b80(0x1d7)])),await configureAppCode(_0x4a989f[_0x162b80(0x1d7)],_0x4a989f[_0x162b80(0x1ec)]||'',_0x4a989f[_0x162b80(0x20f)]);let _0xfe0c1b=![];if(_0x4a989f[_0x162b80(0x1ec)]){console[_0x162b80(0x1d5)](_0x162b80(0x1ff));const _0xe9b492=process[_0x162b80(0x1c6)]();try{process['chdir'](_0xf5b018);const _0x4be582=_0x4a989f[_0x162b80(0x20f)]||_0x162b80(0x200);initEnv(_0x4be582);const {configArray:_0x5bd700}=await fetchModelList(_0x4a989f['appCode'],_0x5454c7[_0x162b80(0x1e9)]||''),_0x463d6d=DEFAULT_API_DIR,_0x4af27c=await generateApiFile(_0x5bd700,'',_0x4a989f[_0x162b80(0x1ec)],!![],_0x4be582,_0x463d6d);console[_0x162b80(0x1d5)](_0x162b80(0x20d)+_0x5bd700[_0x162b80(0x1fd)]+_0x162b80(0x1c5)+_0x4af27c[_0x162b80(0x211)]+_0x162b80(0x1c8)),logger[_0x162b80(0x1be)]('create',_0x162b80(0x1cb)+_0x4a989f[_0x162b80(0x1ec)]);}catch(_0x223475){_0xfe0c1b=!![],console[_0x162b80(0x1d5)](_0x162b80(0x1e7)),logger[_0x162b80(0x204)](_0x162b80(0x1c9),_0x162b80(0x202),{'error':_0x223475 instanceof Error?_0x223475[_0x162b80(0x1c4)]:String(_0x223475)});}finally{process[_0x162b80(0x21a)](_0xe9b492);}}logger['setLogPath'](_0xf5b018),logger['success'](_0x162b80(0x1c9),_0x162b80(0x212)+_0x4a989f['projectName']),console[_0x162b80(0x1d5)](),console['log'](a164_0x4c5fec['green']('─'[_0x162b80(0x209)](0x3c))),console[_0x162b80(0x1d5)](a164_0x4c5fec[_0x162b80(0x21e)][_0x162b80(0x1f8)](_0x162b80(0x216))),console['log'](),console['log']('\x20\x201.\x20Start\x20project:\x20'+a164_0x4c5fec[_0x162b80(0x21e)][_0x162b80(0x1f8)]('cd\x20'+_0x4a989f['projectName']+_0x162b80(0x21f)+CLI_BIN_NAME+'\x20run\x20start')),_0xfe0c1b&&console[_0x162b80(0x1d5)](_0x162b80(0x1ca)+a164_0x4c5fec[_0x162b80(0x21e)][_0x162b80(0x1f8)](CLI_BIN_NAME+_0x162b80(0x21d))),console['log'](a164_0x4c5fec[_0x162b80(0x1e8)]('─'[_0x162b80(0x209)](0x3c)));}catch(_0x28545d){logger['error'](_0x162b80(0x1c9),_0x162b80(0x1f7)+_0x4a989f['projectName'],{'error':_0x28545d instanceof Error?_0x28545d[_0x162b80(0x1c4)]:String(_0x28545d)});try{const _0x2f95e5=readDirectoryIdentity(_0xf5b018);if(_0x270adf&&_0x2f95e5?.[_0x162b80(0x1e2)]===_0x270adf['dev']&&_0x2f95e5['ino']===_0x270adf['ino'])console[_0x162b80(0x1d5)](_0x162b80(0x1e3)+_0xf5b018),a164_0x51b214[_0x162b80(0x1c0)](_0xf5b018,{'recursive':!![],'force':!![]});else _0x2f95e5&&logger[_0x162b80(0x204)](_0x162b80(0x1c9),'跳过清理:项目目录所有权已变化:\x20'+_0xf5b018);}catch{logger['warn'](_0x162b80(0x1c9),_0x162b80(0x1dc)+_0xf5b018);}throw _0x28545d;}}function a164_0x330b(_0x5edbf8,_0x575872){_0x5edbf8=_0x5edbf8-0x1bd;const _0x53a64f=a164_0x53a6();let _0x330b22=_0x53a64f[_0x5edbf8];return _0x330b22;}async function runTask(_0x2fd337,_0x277cbd,_0x4be592=_0x2fd337){const _0x32ccfa=a164_0x330b,_0x377556=a164_0x314462(_0x2fd337+_0x32ccfa(0x203))['start']();try{const _0x421627=await _0x277cbd(_0x3f833a=>{const _0x2a4fd2=_0x32ccfa;_0x377556[_0x2a4fd2(0x1d0)]=_0x3f833a+_0x2a4fd2(0x203);});_0x377556['stop'](),console[_0x32ccfa(0x1d5)](''+a164_0x4c5fec[_0x32ccfa(0x1e8)](_0x32ccfa(0x1fb))+_0x4be592+'\x20'+a164_0x4c5fec[_0x32ccfa(0x1c7)]('['+_0x421627+']'));}catch(_0x502d9b){_0x377556[_0x32ccfa(0x201)](_0x2fd337);throw _0x502d9b;}}function projectTemplateStageLabel(_0x396dfa){const _0x1d3bda=a164_0x330b;switch(_0x396dfa){case _0x1d3bda(0x208):return _0x1d3bda(0x217);case'downloading':return _0x1d3bda(0x207);case _0x1d3bda(0x210):return _0x1d3bda(0x1fa);case'extracting':return _0x1d3bda(0x1d8);}}async function updatePackageJsonName(_0x5b8bc0){const _0x1e13c2=a164_0x330b,_0x1260c4=a164_0x3febed[_0x1e13c2(0x1e1)](process['cwd'](),_0x5b8bc0),_0x7fa350=a164_0x3febed[_0x1e13c2(0x1bd)](_0x1260c4,_0x1e13c2(0x1e5));try{console[_0x1e13c2(0x1d5)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x53b658=getRabetbaseCliPackageRoot(),_0x553287=a164_0x3febed[_0x1e13c2(0x1bd)](_0x53b658,_0x1e13c2(0x1e5));let _0x2df779=_0x1e13c2(0x1c2);try{const _0x43242f=JSON[_0x1e13c2(0x1d2)](a164_0x51b214['readFileSync'](_0x553287,'utf8'));_0x2df779=_0x43242f[_0x1e13c2(0x215)]||_0x1e13c2(0x1c2);}catch{}const _0x3de1d4=a164_0x51b214[_0x1e13c2(0x1da)](_0x7fa350,_0x1e13c2(0x1f1)),_0xf5a68b=JSON[_0x1e13c2(0x1d2)](_0x3de1d4);_0xf5a68b[_0x1e13c2(0x1f4)]=_0x5b8bc0,_0xf5a68b[_0x1e13c2(0x214)]=_0x5b8bc0+_0x1e13c2(0x1df)+_0x2df779,a164_0x51b214[_0x1e13c2(0x1bf)](_0x7fa350,JSON['stringify'](_0xf5a68b,null,0x2)+'\x0a','utf8'),console[_0x1e13c2(0x1d5)](_0x1e13c2(0x1ef)+_0x5b8bc0),logger['info'](_0x1e13c2(0x1c9),'更新\x20package.json\x20name');}catch(_0x2388b7){logger['error'](_0x1e13c2(0x1c9),_0x1e13c2(0x1f2));throw _0x2388b7;}}async function configureAppCode(_0x308a89,_0x1c8ce0,_0x4d840){const _0x22286c=a164_0x330b,_0x11c4d9=a164_0x3febed[_0x22286c(0x1e1)](process[_0x22286c(0x1c6)](),_0x308a89),_0x5a8ab1=a164_0x3febed[_0x22286c(0x1bd)](_0x11c4d9,NEW_CONFIG_NAME);try{_0x1c8ce0?console[_0x22286c(0x1d5)](_0x22286c(0x21c)+_0x308a89+':\x20'+_0x1c8ce0):console[_0x22286c(0x1d5)](_0x22286c(0x1e4)+_0x308a89);const _0x12584d=getRabetbaseCliPackageRoot(),_0x62323c=a164_0x3febed[_0x22286c(0x1bd)](_0x12584d,_0x22286c(0x1e5));let _0x1d4a0c=_0x22286c(0x1c2);try{const _0x25e17e=JSON[_0x22286c(0x1d2)](a164_0x51b214[_0x22286c(0x1da)](_0x62323c,'utf8'));_0x1d4a0c=_0x25e17e['version']||'1.0.0';}catch{}const _0x44e557=readConfig(),_0x197cc9=typeof _0x44e557[_0x22286c(0x20f)]==='string'?_0x44e557[_0x22286c(0x20f)]:undefined,_0x1571c3={};for(const _0x2fe975 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x44e557[_0x2fe975]!=null)_0x1571c3[_0x2fe975]=_0x44e557[_0x2fe975];}const _0x584f2e=buildCanonicalProjectConfig(_0x1571c3,{'appCodes':_0x1c8ce0?[_0x1c8ce0]:[],'env':_0x4d840||_0x197cc9||'production','metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x1d4a0c}});writeConfigFile(_0x5a8ab1,_0x584f2e),_0x1c8ce0?console['log'](_0x22286c(0x218)+Object['keys'](_0x584f2e[_0x22286c(0x1f5)]||{})[_0x22286c(0x1bd)](',\x20')+_0x22286c(0x20a)+_0x584f2e[_0x22286c(0x1c3)]):console['log'](_0x22286c(0x1db)+CLI_BIN_NAME+_0x22286c(0x1d1)),logger['info']('create',_0x22286c(0x219)+_0x1c8ce0);}catch(_0x5abf54){logger[_0x22286c(0x1cd)](_0x22286c(0x1c9),_0x22286c(0x1cc));throw _0x5abf54;}}
|
|
1
|
+
(function(_0x5ef9ab,_0x44db43){const _0x3e6539=a162_0x2742,_0x599c88=_0x5ef9ab();while(!![]){try{const _0x5dbbc8=-parseInt(_0x3e6539(0x10a))/0x1*(parseInt(_0x3e6539(0x11d))/0x2)+-parseInt(_0x3e6539(0x11c))/0x3*(-parseInt(_0x3e6539(0x104))/0x4)+parseInt(_0x3e6539(0xe3))/0x5+parseInt(_0x3e6539(0x110))/0x6+-parseInt(_0x3e6539(0x128))/0x7*(-parseInt(_0x3e6539(0x10d))/0x8)+parseInt(_0x3e6539(0xeb))/0x9*(-parseInt(_0x3e6539(0x113))/0xa)+-parseInt(_0x3e6539(0x115))/0xb*(parseInt(_0x3e6539(0xcb))/0xc);if(_0x5dbbc8===_0x44db43)break;else _0x599c88['push'](_0x599c88['shift']());}catch(_0x5a27e3){_0x599c88['push'](_0x599c88['shift']());}}}(a162_0x17a4,0x46a3c));import a162_0x200110 from'path';import a162_0x3ddce3 from'fs';function a162_0x2742(_0x5798ee,_0x56c930){_0x5798ee=_0x5798ee-0xca;const _0x17a47b=a162_0x17a4();let _0x2742b2=_0x17a47b[_0x5798ee];return _0x2742b2;}import a162_0x1ed93b from'chalk';import a162_0x3859e1 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{loadRawConfigLayers,writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';import{validateProjectName}from'../../../commands/project/create/project-name.js';import{getSdkClientRoutingConfig}from'../../../constant/domain.js';import{generateSdkConfigFile}from'../../../api/generate-sdk-config-file.js';function readDirectoryIdentity(_0x13ad95){const _0x4f5dcb=a162_0x2742;try{const _0x47e1f8=a162_0x3ddce3['lstatSync'](_0x13ad95);if(!_0x47e1f8[_0x4f5dcb(0x114)]())return null;return{'dev':_0x47e1f8[_0x4f5dcb(0xec)],'ino':_0x47e1f8[_0x4f5dcb(0x112)]};}catch{return null;}}function a162_0x17a4(){const _0xc9b388=['chdir','🚀\x20Next\x20Steps:','repeat','cd\x20','Downloading\x20project\x20template','7CIAIpX','warn','cookie','2840ONIQcI','create','Updating\x20package.json\x20name','2783946fQVeDC','*\x20Configuring\x20AppCode\x20for\x20project\x20','ino','10RScjjX','isDirectory','22TkAfjQ','downloading','Resolving\x20project\x20template','parse','start','projectName','API\x20configuration\x20pull\x20failed','21KJgDWo','15710FMFBXd','toLocaleString','string','production','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','error','modelCount','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','needsUpgrade','resolving','utf8','8764uHjkqm','stringify','env','setLogPath','Starting\x20project\x20creation:\x20','keys','accessSync','extracting','appCode','success','Project\x20creation\x20failed:\x20','verifying','minimumVersion','\x20\x202.\x20Pull\x20API\x20configuration:\x20','bold','5821728xmadIw','version','apps','templateSource','constants','\x20|\x20AppCode:\x20','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','log','W_OK','cyan','join','green','existsSync','\x20dataset(s),\x20generated\x20','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','currentVersion','Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory','readFileSync','message','cwd','fail','name','\x20model(s)','Project\x20name:\x20','908090iQQPuY','stop','API\x20configuration\x20pulled:\x20','1.0.0','rmSync','Install\x20dependencies','writeFileSync','\x20run\x20start','497655kKSROD','dev','\x20config\x20set\x20appcode\x20<app-code>\x27','\x20&&\x20','Failed\x20to\x20configure\x20app\x20AppCode','dirname','info','\x20Generated\x20by\x20rabetbase\x20cli\x20','Copying\x20local\x20template\x20source','resolve','projectCode','package.json','belowMinimum','√\x20Pulled\x20','\x20api\x20pull','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','\x20\x201.\x20Start\x20project:\x20','Project\x20created:\x20','nonInteractive','*\x20Pulling\x20API\x20configuration...','CLI\x20version\x20check','...','\x20already\x20exists','Extracting\x20project\x20template','159908EZDjfs'];a162_0x17a4=function(){return _0xc9b388;};return a162_0x17a4();}export async function createApp(_0x214a38){const _0x5ea5e6=a162_0x2742,_0x323b2f=await checkCliVersion();(_0x323b2f[_0x5ea5e6(0x125)]||_0x323b2f[_0x5ea5e6(0xf7)])&&(printCliUpgradeWarning(_0x323b2f),assertCliVersionSupported(_0x323b2f),logger[_0x5ea5e6(0xf1)]('create',_0x5ea5e6(0x100),{'currentVersion':_0x323b2f[_0x5ea5e6(0xda)],'stableVersion':_0x323b2f['stableVersion'],'minimumVersion':_0x323b2f[_0x5ea5e6(0x134)],'needsUpgrade':_0x323b2f[_0x5ea5e6(0x125)],'belowMinimum':_0x323b2f[_0x5ea5e6(0xf7)]}));if(_0x214a38[_0x5ea5e6(0xf5)]&&(_0x214a38[_0x5ea5e6(0x130)]||_0x214a38[_0x5ea5e6(0xfe)]))await runCreate({'projectName':_0x214a38[_0x5ea5e6(0xf5)],'appCode':_0x214a38[_0x5ea5e6(0x130)],'env':_0x214a38[_0x5ea5e6(0x12a)]},_0x214a38);else{if(_0x214a38['projectCode']){const _0x114792=await selectSingleAppcode(_0x214a38[_0x5ea5e6(0x10c)]);await runCreate({'projectName':_0x214a38[_0x5ea5e6(0xf5)],'appCode':_0x114792||undefined,'env':_0x214a38[_0x5ea5e6(0x12a)]},_0x214a38);}else await guidedCreateProject(_0x2397e5=>runCreate(_0x2397e5,_0x214a38),_0x214a38[_0x5ea5e6(0x12a)],_0x214a38[_0x5ea5e6(0x10c)]);}}async function runCreate(_0x350441,_0x4f7e65){const _0x4d2aab=a162_0x2742;_0x350441[_0x4d2aab(0x11a)]=validateProjectName(_0x350441['projectName']);const _0x23713c=a162_0x200110[_0x4d2aab(0xf4)](process['cwd'](),_0x350441[_0x4d2aab(0x11a)]);if(a162_0x3ddce3[_0x4d2aab(0xd7)](_0x23713c))throw new Error('Project\x20directory\x20'+_0x350441[_0x4d2aab(0x11a)]+_0x4d2aab(0x102));let _0x5c69ab=null;try{a162_0x3ddce3[_0x4d2aab(0x12e)](a162_0x200110[_0x4d2aab(0xf0)](_0x23713c),a162_0x3ddce3[_0x4d2aab(0xcf)][_0x4d2aab(0xd3)]);}catch{throw new Error(_0x4d2aab(0x121));}logger[_0x4d2aab(0xf1)]('create',_0x4d2aab(0x12c)+_0x350441[_0x4d2aab(0x11a)],{'projectDir':_0x23713c,'appCode':_0x350441[_0x4d2aab(0x130)]}),console['log'](),console[_0x4d2aab(0xd2)](a162_0x1ed93b[_0x4d2aab(0xd6)]('\x20√\x20')+_0x4d2aab(0xe2)+a162_0x1ed93b[_0x4d2aab(0xd6)](_0x350441[_0x4d2aab(0x11a)])+(_0x350441[_0x4d2aab(0x130)]?_0x4d2aab(0xd0)+a162_0x1ed93b[_0x4d2aab(0xd4)](_0x350441[_0x4d2aab(0x130)]):''));try{await runTask('Resolving\x20project\x20template',_0x1c2159=>copyProjectTemplate(_0x350441[_0x4d2aab(0x11a)],_0x9c000a=>_0x1c2159(projectTemplateStageLabel(_0x9c000a)),_0x4f7e65[_0x4d2aab(0xce)]),'Project\x20template\x20ready'),_0x5c69ab=readDirectoryIdentity(_0x23713c);if(!_0x5c69ab)throw new Error(_0x4d2aab(0xdb));await updatePackageJsonName(_0x350441['projectName']),await runTask(_0x4d2aab(0xe8),()=>installDependencies(_0x350441['projectName'])),await runTask('Format\x20code',()=>formatProjectCode(_0x350441[_0x4d2aab(0x11a)])),await configureAppCode(_0x350441[_0x4d2aab(0x11a)],_0x350441[_0x4d2aab(0x130)]||'',_0x350441[_0x4d2aab(0x12a)]);let _0x934f8e=![];if(_0x350441['appCode']){console[_0x4d2aab(0xd2)](_0x4d2aab(0xff));const _0x561b00=process[_0x4d2aab(0xde)]();try{process[_0x4d2aab(0x105)](_0x23713c);const _0x151838=_0x350441[_0x4d2aab(0x12a)]||_0x4d2aab(0x120);initEnv(_0x151838);const {configArray:_0x114e8f}=await fetchModelList(_0x350441[_0x4d2aab(0x130)],_0x4f7e65[_0x4d2aab(0x10c)]||''),_0x33baee=DEFAULT_API_DIR,_0x2766f5=await generateApiFile(_0x114e8f,'',_0x350441[_0x4d2aab(0x130)],!![],_0x151838,_0x33baee,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![]});console['log'](_0x4d2aab(0xf8)+_0x114e8f['length']+_0x4d2aab(0xd8)+_0x2766f5[_0x4d2aab(0x123)]+_0x4d2aab(0xe1)),logger[_0x4d2aab(0xf1)](_0x4d2aab(0x10e),_0x4d2aab(0xe5)+_0x350441[_0x4d2aab(0x130)]);}catch(_0x28957a){_0x934f8e=!![],console['log'](_0x4d2aab(0xfa)),logger[_0x4d2aab(0x10b)](_0x4d2aab(0x10e),_0x4d2aab(0x11b),{'error':_0x28957a instanceof Error?_0x28957a[_0x4d2aab(0xdd)]:String(_0x28957a)});}finally{process['chdir'](_0x561b00);}}logger[_0x4d2aab(0x12b)](_0x23713c),logger[_0x4d2aab(0x131)](_0x4d2aab(0x10e),_0x4d2aab(0xfd)+_0x350441['projectName']),console[_0x4d2aab(0xd2)](),console['log'](a162_0x1ed93b[_0x4d2aab(0xd6)]('─'[_0x4d2aab(0x107)](0x3c))),console[_0x4d2aab(0xd2)](a162_0x1ed93b[_0x4d2aab(0xd4)]['bold'](_0x4d2aab(0x106))),console[_0x4d2aab(0xd2)](),console[_0x4d2aab(0xd2)](_0x4d2aab(0xfc)+a162_0x1ed93b[_0x4d2aab(0xd4)]['bold'](_0x4d2aab(0x108)+_0x350441['projectName']+_0x4d2aab(0xee)+CLI_BIN_NAME+_0x4d2aab(0xea))),_0x934f8e&&console[_0x4d2aab(0xd2)](_0x4d2aab(0x135)+a162_0x1ed93b[_0x4d2aab(0xd4)][_0x4d2aab(0xca)](CLI_BIN_NAME+_0x4d2aab(0xf9))),console[_0x4d2aab(0xd2)](a162_0x1ed93b[_0x4d2aab(0xd6)]('─'[_0x4d2aab(0x107)](0x3c)));}catch(_0x567bd0){logger[_0x4d2aab(0x122)](_0x4d2aab(0x10e),_0x4d2aab(0x132)+_0x350441[_0x4d2aab(0x11a)],{'error':_0x567bd0 instanceof Error?_0x567bd0[_0x4d2aab(0xdd)]:String(_0x567bd0)});try{const _0x229e93=readDirectoryIdentity(_0x23713c);if(_0x5c69ab&&_0x229e93?.[_0x4d2aab(0xec)]===_0x5c69ab[_0x4d2aab(0xec)]&&_0x229e93[_0x4d2aab(0x112)]===_0x5c69ab[_0x4d2aab(0x112)])console[_0x4d2aab(0xd2)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x23713c),a162_0x3ddce3[_0x4d2aab(0xe7)](_0x23713c,{'recursive':!![],'force':!![]});else _0x229e93&&logger[_0x4d2aab(0x10b)](_0x4d2aab(0x10e),_0x4d2aab(0x124)+_0x23713c);}catch{logger['warn'](_0x4d2aab(0x10e),'Failed\x20to\x20clean\x20up\x20project\x20directory:\x20'+_0x23713c);}throw _0x567bd0;}}async function runTask(_0x2e080c,_0xbb845,_0x459fe7=_0x2e080c){const _0x20a82e=a162_0x2742,_0x308b5d=a162_0x3859e1(_0x2e080c+_0x20a82e(0x101))[_0x20a82e(0x119)]();try{const _0x282593=await _0xbb845(_0x22a011=>{_0x308b5d['text']=_0x22a011+'...';});_0x308b5d[_0x20a82e(0xe4)](),console[_0x20a82e(0xd2)](''+a162_0x1ed93b['green']('\x20√\x20')+_0x459fe7+'\x20'+a162_0x1ed93b['gray']('['+_0x282593+']'));}catch(_0x2ca37b){_0x308b5d[_0x20a82e(0xdf)](_0x2e080c);throw _0x2ca37b;}}function projectTemplateStageLabel(_0x41c9a5){const _0x126039=a162_0x2742;switch(_0x41c9a5){case _0x126039(0x126):return _0x126039(0x117);case _0x126039(0x116):return _0x126039(0x109);case _0x126039(0x133):return'Verifying\x20project\x20template';case _0x126039(0x12f):return _0x126039(0x103);case'copying':return _0x126039(0xf3);}}async function updatePackageJsonName(_0x5d4fc7){const _0x4aa77e=a162_0x2742,_0x6d486b=a162_0x200110[_0x4aa77e(0xf4)](process[_0x4aa77e(0xde)](),_0x5d4fc7),_0x49884d=a162_0x200110[_0x4aa77e(0xd5)](_0x6d486b,_0x4aa77e(0xf6));try{console[_0x4aa77e(0xd2)](_0x4aa77e(0xd9));const _0x23a232=getRabetbaseCliPackageRoot(),_0x3105c4=a162_0x200110[_0x4aa77e(0xd5)](_0x23a232,_0x4aa77e(0xf6));let _0x419060=_0x4aa77e(0xe6);try{const _0x2deb00=JSON[_0x4aa77e(0x118)](a162_0x3ddce3[_0x4aa77e(0xdc)](_0x3105c4,_0x4aa77e(0x127)));_0x419060=_0x2deb00[_0x4aa77e(0xcc)]||_0x4aa77e(0xe6);}catch{}const _0x1a838f=a162_0x3ddce3[_0x4aa77e(0xdc)](_0x49884d,_0x4aa77e(0x127)),_0x379251=JSON['parse'](_0x1a838f);_0x379251[_0x4aa77e(0xe0)]=_0x5d4fc7,_0x379251['description']=_0x5d4fc7+_0x4aa77e(0xf2)+_0x419060,a162_0x3ddce3[_0x4aa77e(0xe9)](_0x49884d,JSON[_0x4aa77e(0x129)](_0x379251,null,0x2)+'\x0a','utf8'),console['log']('√\x20package.json\x20updated:\x20name='+_0x5d4fc7),logger[_0x4aa77e(0xf1)](_0x4aa77e(0x10e),_0x4aa77e(0x10f));}catch(_0x2b0cac){logger[_0x4aa77e(0x122)]('create','Failed\x20to\x20update\x20package.json');throw _0x2b0cac;}}async function configureAppCode(_0x14796c,_0x37ba5f,_0x4bb4ff){const _0x5b2183=a162_0x2742,_0x16b3e9=a162_0x200110[_0x5b2183(0xf4)](process[_0x5b2183(0xde)](),_0x14796c),_0x4e8877=a162_0x200110[_0x5b2183(0xd5)](_0x16b3e9,NEW_CONFIG_NAME);try{_0x37ba5f?console[_0x5b2183(0xd2)](_0x5b2183(0x111)+_0x14796c+':\x20'+_0x37ba5f):console[_0x5b2183(0xd2)](_0x5b2183(0xfb)+_0x14796c);const _0x56e098=getRabetbaseCliPackageRoot(),_0x21fd66=a162_0x200110['join'](_0x56e098,_0x5b2183(0xf6));let _0x1518e5=_0x5b2183(0xe6);try{const _0x1fef93=JSON[_0x5b2183(0x118)](a162_0x3ddce3[_0x5b2183(0xdc)](_0x21fd66,'utf8'));_0x1518e5=_0x1fef93[_0x5b2183(0xcc)]||_0x5b2183(0xe6);}catch{}const {globalConfig:_0x5d5ddd}=loadRawConfigLayers(),_0x39a7d0=typeof _0x5d5ddd['env']===_0x5b2183(0x11f)?_0x5d5ddd[_0x5b2183(0x12a)]:undefined,_0x3c2296={};for(const _0x52c66b of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x5d5ddd[_0x52c66b]!=null)_0x3c2296[_0x52c66b]=_0x5d5ddd[_0x52c66b];}const _0x570260=buildCanonicalProjectConfig(_0x3c2296,{'appCodes':_0x37ba5f?[_0x37ba5f]:[],'env':_0x4bb4ff||_0x39a7d0||'production','metadata':{'createdAt':new Date()[_0x5b2183(0x11e)](),'version':_0x1518e5}});writeConfigFile(_0x4e8877,_0x570260),await generateSdkConfigFile(a162_0x200110['join'](_0x16b3e9,DEFAULT_API_DIR),getSdkClientRoutingConfig()),_0x37ba5f?console[_0x5b2183(0xd2)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x5b2183(0x12d)](_0x570260[_0x5b2183(0xcd)]||{})['join'](',\x20')+'\x20|\x20Default:\x20implicit\x20(single\x20app)'):console[_0x5b2183(0xd2)](_0x5b2183(0xd1)+CLI_BIN_NAME+_0x5b2183(0xed)),logger[_0x5b2183(0xf1)]('create','Configured\x20app\x20AppCode:\x20'+_0x37ba5f);}catch(_0xeb2aa5){logger[_0x5b2183(0x122)]('create',_0x5b2183(0xef));throw _0xeb2aa5;}}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export interface ProjectTemplateMaterialization {
|
|
2
|
-
source: "cdn";
|
|
2
|
+
source: "cdn" | "local";
|
|
3
3
|
version: string;
|
|
4
4
|
}
|
|
5
|
-
export type ProjectTemplateStage = "resolving" | "downloading" | "verifying" | "extracting";
|
|
5
|
+
export type ProjectTemplateStage = "resolving" | "downloading" | "verifying" | "extracting" | "copying";
|
|
6
6
|
export type ProjectTemplateProgress = (stage: ProjectTemplateStage) => void;
|
|
7
7
|
/**
|
|
8
8
|
* Materialize the project template into a new target directory.
|
|
9
9
|
* CDN is the single source for project templates.
|
|
10
10
|
*/
|
|
11
11
|
export declare function materializeProjectTemplate(projectDir: string, onProgress?: ProjectTemplateProgress): Promise<ProjectTemplateMaterialization>;
|
|
12
|
+
/**
|
|
13
|
+
* Materialize an already-normalized local project template directory.
|
|
14
|
+
*/
|
|
15
|
+
export declare function materializeLocalProjectTemplate(sourceDir: string, projectDir: string, onProgress?: ProjectTemplateProgress): Promise<ProjectTemplateMaterialization>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a165_0x5779b1=a165_0x4d0c;(function(_0x5c93ad,_0x52bc3a){const _0x20fda3=a165_0x4d0c,_0x4f92f3=_0x5c93ad();while(!![]){try{const _0x17c33a=parseInt(_0x20fda3(0xee))/0x1+-parseInt(_0x20fda3(0x10e))/0x2*(parseInt(_0x20fda3(0xd1))/0x3)+-parseInt(_0x20fda3(0xd3))/0x4*(-parseInt(_0x20fda3(0x109))/0x5)+parseInt(_0x20fda3(0x111))/0x6+-parseInt(_0x20fda3(0x103))/0x7+-parseInt(_0x20fda3(0xd2))/0x8*(-parseInt(_0x20fda3(0x121))/0x9)+-parseInt(_0x20fda3(0xec))/0xa*(parseInt(_0x20fda3(0xe4))/0xb);if(_0x17c33a===_0x52bc3a)break;else _0x4f92f3['push'](_0x4f92f3['shift']());}catch(_0x2c72f8){_0x4f92f3['push'](_0x4f92f3['shift']());}}}(a165_0x29b4,0x501d1));import{createHash}from'node:crypto';import a165_0x235bfa from'node:fs/promises';import a165_0x88be16 from'node:path';import{PROJECT_TEMPLATE_ASSET_BASE_URL}from'../../../constant/cdn.js';import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';import{getRabetbaseCdnConfig}from'../../../utils/cli-version-policy.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID=a165_0x5779b1(0xea),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x295cf7){const _0x240e1c=a165_0x5779b1;return typeof _0x295cf7==='string'&&_0x295cf7[_0x240e1c(0xd9)]()?_0x295cf7['trim']():null;}function parseDescriptor(_0x3d3966){const _0x58ca4b=a165_0x5779b1;if(!_0x3d3966||typeof _0x3d3966!==_0x58ca4b(0xe3))throw new Error(_0x58ca4b(0x102)+TEMPLATE_ID+'\x22.');const _0x5c1fea=_0x3d3966,_0x26f8d5=nonEmptyString(_0x5c1fea[_0x58ca4b(0xe6)]),_0xce85e9=nonEmptyString(_0x5c1fea[_0x58ca4b(0xdf)]),_0x556bdf=nonEmptyString(_0x5c1fea['sha256'])?.[_0x58ca4b(0xd7)](),_0x5cdc78=_0x5c1fea[_0x58ca4b(0x107)];if(!_0x26f8d5||!_0xce85e9||_0xce85e9!==a165_0x88be16[_0x58ca4b(0xfc)][_0x58ca4b(0x10a)](_0xce85e9)||_0xce85e9['includes']('\x5c')||!_0x556bdf||!/^sha256:[a-f0-9]{64}$/[_0x58ca4b(0xe8)](_0x556bdf)||typeof _0x5cdc78!==_0x58ca4b(0xe2)||!Number[_0x58ca4b(0x123)](_0x5cdc78)||_0x5cdc78<=0x0||_0x5cdc78>MAX_ARCHIVE_SIZE)throw new Error(_0x58ca4b(0x117)+TEMPLATE_ID+'\x22.');return{'version':_0x26f8d5,'name':_0xce85e9,'sha256':_0x556bdf,'size':_0x5cdc78};}async function fetchWithTimeout(_0x2f9eb0,_0x288c47,_0x4bc6ff,_0x176d2c){const _0x1dce2f=a165_0x5779b1,_0x5029e8=new AbortController(),_0x4fd0ce=setTimeout(()=>_0x5029e8[_0x1dce2f(0xe0)](),_0x288c47);try{const _0x4fffc0=await fetch(_0x2f9eb0,{'headers':{'Accept':_0x4bc6ff},'signal':_0x5029e8[_0x1dce2f(0xe9)]});return await _0x176d2c(_0x4fffc0);}finally{clearTimeout(_0x4fd0ce);}}async function fetchTemplateDescriptor(){const _0x47a797=a165_0x5779b1,_0x1d5243=await getRabetbaseCdnConfig();if(!_0x1d5243)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');return parseDescriptor(_0x1d5243[_0x47a797(0xe1)]);}function resolveArchiveUrl(_0x4be618){const _0x14c2e3=a165_0x5779b1,_0x127075=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x1957cf=new URL(_0x4be618,_0x127075);if(_0x1957cf[_0x14c2e3(0x10f)]!==_0x14c2e3(0xd6)||_0x1957cf[_0x14c2e3(0xd4)]!==_0x127075['origin']||!_0x1957cf[_0x14c2e3(0xd8)][_0x14c2e3(0xfe)](_0x127075[_0x14c2e3(0xd8)]))throw new Error(_0x14c2e3(0x106));return _0x1957cf[_0x14c2e3(0xff)];}async function readResponseBytes(_0x8227ef,_0x108782){const _0x44f47e=a165_0x5779b1;if(!_0x8227ef['body']){const _0x406407=Buffer[_0x44f47e(0xfb)](await _0x8227ef[_0x44f47e(0xf0)]());if(_0x406407[_0x44f47e(0xf8)]>_0x108782)throw new Error(_0x44f47e(0xf1));return _0x406407;}const _0x31e396=_0x8227ef[_0x44f47e(0xf6)]['getReader'](),_0x32f6ea=[];let _0x21c417=0x0;try{while(!![]){const {done:_0x4ca8fa,value:_0x3788be}=await _0x31e396[_0x44f47e(0x113)]();if(_0x4ca8fa)break;_0x21c417+=_0x3788be[_0x44f47e(0xf5)];if(_0x21c417>_0x108782){await _0x31e396[_0x44f47e(0xdc)]();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0x32f6ea['push'](Buffer[_0x44f47e(0xfb)](_0x3788be));}}finally{_0x31e396[_0x44f47e(0x101)]();}return Buffer[_0x44f47e(0x108)](_0x32f6ea,_0x21c417);}async function downloadArchive(_0x421a17,_0x14ad21,_0x435195){const _0xb1013b=a165_0x5779b1,_0x229d4f=await fetchWithTimeout(resolveArchiveUrl(_0x421a17[_0xb1013b(0xdf)]),ARCHIVE_TIMEOUT_MS,_0xb1013b(0x122),async _0x128967=>{const _0x5b8e8c=_0xb1013b;if(!_0x128967['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x128967[_0x5b8e8c(0xe5)]+'.');const _0x5286f5=Number(_0x128967['headers'][_0x5b8e8c(0x10b)](_0x5b8e8c(0x110)));if(Number[_0x5b8e8c(0xf2)](_0x5286f5)&&_0x5286f5>MAX_ARCHIVE_SIZE)throw new Error(_0x5b8e8c(0xeb));return readResponseBytes(_0x128967,_0x421a17[_0x5b8e8c(0x107)]);});if(_0x229d4f['length']!==_0x421a17[_0xb1013b(0x107)])throw new Error(_0xb1013b(0x11e)+_0x421a17[_0xb1013b(0x107)]+_0xb1013b(0x11b)+_0x229d4f['length']+'.');_0x435195?.('verifying');const _0x2ae4f3=_0xb1013b(0xfd)+createHash(_0xb1013b(0x114))['update'](_0x229d4f)[_0xb1013b(0x112)](_0xb1013b(0x11f));if(_0x2ae4f3!==_0x421a17[_0xb1013b(0x114)])throw new Error(_0xb1013b(0xda));await a165_0x235bfa['writeFile'](_0x14ad21,_0x229d4f,{'flag':'wx'});}async function assertTemplateRoot(_0x48e8a2){const _0xbbab96=a165_0x5779b1,_0x760441=a165_0x88be16[_0xbbab96(0xf7)](_0x48e8a2,_0xbbab96(0x119)),_0x5e444d=JSON[_0xbbab96(0xed)](await a165_0x235bfa[_0xbbab96(0x10c)](_0x760441,_0xbbab96(0x118)));if(!_0x5e444d||typeof _0x5e444d!==_0xbbab96(0xe3))throw new Error('Project\x20template\x20package.json\x20is\x20invalid.');}async function readDirectoryIdentity(_0x290551){const _0x4c96f9=a165_0x5779b1;try{const _0x5eddc9=await a165_0x235bfa[_0x4c96f9(0x116)](_0x290551);if(!_0x5eddc9[_0x4c96f9(0x105)]())return null;return{'dev':_0x5eddc9[_0x4c96f9(0xf3)],'ino':_0x5eddc9['ino']};}catch{return null;}}async function commitStagedProject(_0x5e5960,_0x19ebb0){const _0x5a067e=a165_0x5779b1;await a165_0x235bfa[_0x5a067e(0x11c)](_0x19ebb0);const _0x5557ac=await readDirectoryIdentity(_0x19ebb0);if(!_0x5557ac)throw new Error('Unable\x20to\x20claim\x20the\x20project\x20directory.');try{for(const _0x24a73b of await a165_0x235bfa[_0x5a067e(0x10d)](_0x5e5960)){await a165_0x235bfa['rename'](a165_0x88be16[_0x5a067e(0xf7)](_0x5e5960,_0x24a73b),a165_0x88be16[_0x5a067e(0xf7)](_0x19ebb0,_0x24a73b));}}catch(_0x429713){const _0x375594=await readDirectoryIdentity(_0x19ebb0);_0x375594?.[_0x5a067e(0xf3)]===_0x5557ac[_0x5a067e(0xf3)]&&_0x375594[_0x5a067e(0xef)]===_0x5557ac[_0x5a067e(0xef)]&&await a165_0x235bfa['rm'](_0x19ebb0,{'recursive':!![],'force':!![]});throw _0x429713;}}export async function materializeProjectTemplate(_0x27bfab,_0x563ae9){const _0x220eac=a165_0x5779b1,_0x4d040b=a165_0x88be16['resolve'](_0x27bfab),_0x1dbf5a=a165_0x88be16[_0x220eac(0x104)](_0x4d040b);try{await a165_0x235bfa[_0x220eac(0x116)](_0x4d040b);throw new Error(_0x220eac(0xf9)+_0x4d040b);}catch(_0xba2801){if(_0xba2801[_0x220eac(0x100)]!==_0x220eac(0xdb))throw _0xba2801;}const _0x3fac60=await a165_0x235bfa[_0x220eac(0x120)](a165_0x88be16[_0x220eac(0xf7)](_0x1dbf5a,'.rabetbase-create-')),_0x36037e=a165_0x88be16[_0x220eac(0xf7)](_0x3fac60,_0x220eac(0x11d)),_0x4f4ba0=a165_0x88be16[_0x220eac(0xf7)](_0x3fac60,_0x220eac(0xfa));try{try{_0x563ae9?.(_0x220eac(0xf4));const _0x39f398=await fetchTemplateDescriptor();return _0x563ae9?.(_0x220eac(0xdd)),await downloadArchive(_0x39f398,_0x4f4ba0,_0x563ae9),_0x563ae9?.(_0x220eac(0xd5)),await extractProjectTemplateArchive(_0x4f4ba0,_0x36037e),await assertTemplateRoot(_0x36037e),await commitStagedProject(_0x36037e,_0x4d040b),{'source':'cdn','version':_0x39f398[_0x220eac(0xe6)]};}catch(_0x1c2776){if(_0x1c2776['code']===_0x220eac(0xde))throw CliErrors[_0x220eac(0x115)](_0x220eac(0xf9)+_0x4d040b,_0x220eac(0x11a));const _0x2cb767=_0x1c2776 instanceof Error?_0x1c2776[_0x220eac(0xe7)]:String(_0x1c2776);throw CliErrors['validation']('Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20'+_0x2cb767);}}finally{await a165_0x235bfa['rm'](_0x3fac60,{'recursive':!![],'force':!![]});}}function a165_0x4d0c(_0x4e29f4,_0x5c078e){_0x4e29f4=_0x4e29f4-0xd1;const _0x29b4b3=a165_0x29b4();let _0x4d0c24=_0x29b4b3[_0x4e29f4];return _0x4d0c24;}function a165_0x29b4(){const _0x2ca91e=['from','posix','sha256:','startsWith','href','code','releaseLock','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','4450824BqlufZ','dirname','isDirectory','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','size','concat','165ubjljG','basename','get','readFile','readdir','2OINkXF','protocol','content-length','3073074KRlQSH','digest','read','sha256','validation','lstat','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','utf8','package.json','Use\x20a\x20different\x20project\x20name.',',\x20received\x20','mkdir','project','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','hex','mkdtemp','2736HtZZpw','application/zip','isSafeInteger','605427jfRzfr','12832BhLijU','21052JGeshu','origin','extracting','https:','toLowerCase','pathname','trim','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','ENOENT','cancel','downloading','EEXIST','name','abort','projectTemplate','number','object','11sTLstM','status','version','message','test','signal','sub-app-react-demo','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','2465590bUcUXm','parse','238871XNaalM','ino','arrayBuffer','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','isFinite','dev','resolving','byteLength','body','join','length','Project\x20directory\x20already\x20exists:\x20','template.zip'];a165_0x29b4=function(){return _0x2ca91e;};return a165_0x29b4();}
|
|
1
|
+
const a163_0x3744fc=a163_0x1691;(function(_0x227fc8,_0x25c9d1){const _0xd5c7a2=a163_0x1691,_0x3a15dc=_0x227fc8();while(!![]){try{const _0x16256b=parseInt(_0xd5c7a2(0x1d9))/0x1*(parseInt(_0xd5c7a2(0x1f2))/0x2)+-parseInt(_0xd5c7a2(0x1b0))/0x3*(parseInt(_0xd5c7a2(0x1f7))/0x4)+-parseInt(_0xd5c7a2(0x20f))/0x5*(parseInt(_0xd5c7a2(0x20e))/0x6)+parseInt(_0xd5c7a2(0x1f5))/0x7+parseInt(_0xd5c7a2(0x1c0))/0x8+-parseInt(_0xd5c7a2(0x1d2))/0x9*(-parseInt(_0xd5c7a2(0x1e9))/0xa)+parseInt(_0xd5c7a2(0x207))/0xb*(-parseInt(_0xd5c7a2(0x1da))/0xc);if(_0x16256b===_0x25c9d1)break;else _0x3a15dc['push'](_0x3a15dc['shift']());}catch(_0x3a3567){_0x3a15dc['push'](_0x3a15dc['shift']());}}}(a163_0xd02c,0x48755));function a163_0x1691(_0x2069c1,_0x17013){_0x2069c1=_0x2069c1-0x1a2;const _0xd02c91=a163_0xd02c();let _0x1691dd=_0xd02c91[_0x2069c1];return _0x1691dd;}import{createHash}from'node:crypto';import a163_0x313a73 from'node:fs/promises';import a163_0x531feb from'node:path';import{PROJECT_TEMPLATE_ASSET_BASE_URL}from'../../../constant/cdn.js';import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';import{getRabetbaseCdnConfig}from'../../../utils/cli-version-policy.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID=a163_0x3744fc(0x1f1),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x58495d){const _0x845349=a163_0x3744fc;return typeof _0x58495d===_0x845349(0x1a8)&&_0x58495d[_0x845349(0x1fb)]()?_0x58495d[_0x845349(0x1fb)]():null;}function parseDescriptor(_0x347818){const _0x293947=a163_0x3744fc;if(!_0x347818||typeof _0x347818!==_0x293947(0x1b5))throw new Error('CDN\x20config\x20does\x20not\x20define\x20template\x20\x22'+TEMPLATE_ID+'\x22.');const _0x11b91a=_0x347818,_0x515475=nonEmptyString(_0x11b91a[_0x293947(0x1d1)]),_0x2995e2=nonEmptyString(_0x11b91a[_0x293947(0x1d3)]),_0x453dda=nonEmptyString(_0x11b91a[_0x293947(0x20d)])?.['toLowerCase'](),_0x5f35b4=_0x11b91a[_0x293947(0x1b4)];if(!_0x515475||!_0x2995e2||_0x2995e2!==a163_0x531feb[_0x293947(0x1ae)][_0x293947(0x1ff)](_0x2995e2)||_0x2995e2[_0x293947(0x1f4)]('\x5c')||!_0x453dda||!/^sha256:[a-f0-9]{64}$/[_0x293947(0x1eb)](_0x453dda)||typeof _0x5f35b4!=='number'||!Number[_0x293947(0x1a2)](_0x5f35b4)||_0x5f35b4<=0x0||_0x5f35b4>MAX_ARCHIVE_SIZE)throw new Error(_0x293947(0x1cf)+TEMPLATE_ID+'\x22.');return{'version':_0x515475,'name':_0x2995e2,'sha256':_0x453dda,'size':_0x5f35b4};}async function fetchWithTimeout(_0x2c6acc,_0x4ce4b8,_0x2a57da,_0x3a575e){const _0x388382=a163_0x3744fc,_0x11b9e3=new AbortController(),_0x50f79e=setTimeout(()=>_0x11b9e3[_0x388382(0x1fc)](),_0x4ce4b8);try{const _0x228cf1=await fetch(_0x2c6acc,{'headers':{'Accept':_0x2a57da},'signal':_0x11b9e3[_0x388382(0x1a3)]});return await _0x3a575e(_0x228cf1);}finally{clearTimeout(_0x50f79e);}}async function fetchTemplateDescriptor(){const _0x41c06b=a163_0x3744fc,_0x18ebc8=await getRabetbaseCdnConfig();if(!_0x18ebc8)throw new Error(_0x41c06b(0x1fd));return parseDescriptor(_0x18ebc8[_0x41c06b(0x201)]);}function resolveArchiveUrl(_0x4d4409){const _0x5f4ae3=a163_0x3744fc,_0x3746e5=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x34c461=new URL(_0x4d4409,_0x3746e5);if(_0x34c461[_0x5f4ae3(0x1e6)]!==_0x5f4ae3(0x1cc)||_0x34c461[_0x5f4ae3(0x1fa)]!==_0x3746e5[_0x5f4ae3(0x1fa)]||!_0x34c461['pathname'][_0x5f4ae3(0x20a)](_0x3746e5[_0x5f4ae3(0x1c5)]))throw new Error('CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.');return _0x34c461['href'];}async function readResponseBytes(_0x30fc1d,_0x4faa9c){const _0x44965b=a163_0x3744fc;if(!_0x30fc1d[_0x44965b(0x1dc)]){const _0xc09893=Buffer[_0x44965b(0x1a5)](await _0x30fc1d['arrayBuffer']());if(_0xc09893[_0x44965b(0x1f0)]>_0x4faa9c)throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');return _0xc09893;}const _0x2870eb=_0x30fc1d['body'][_0x44965b(0x1c7)](),_0x7c5e6c=[];let _0xf76863=0x0;try{while(!![]){const {done:_0x44ff1f,value:_0x343b45}=await _0x2870eb['read']();if(_0x44ff1f)break;_0xf76863+=_0x343b45['byteLength'];if(_0xf76863>_0x4faa9c){await _0x2870eb[_0x44965b(0x1f6)]();throw new Error(_0x44965b(0x1de));}_0x7c5e6c[_0x44965b(0x208)](Buffer['from'](_0x343b45));}}finally{_0x2870eb[_0x44965b(0x1cd)]();}return Buffer[_0x44965b(0x1c3)](_0x7c5e6c,_0xf76863);}async function downloadArchive(_0x46808d,_0x124dfd,_0x376a81){const _0x1de763=a163_0x3744fc,_0x120509=await fetchWithTimeout(resolveArchiveUrl(_0x46808d[_0x1de763(0x1d3)]),ARCHIVE_TIMEOUT_MS,'application/zip',async _0x4f2a25=>{const _0x313163=_0x1de763;if(!_0x4f2a25['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x4f2a25[_0x313163(0x1ba)]+'.');const _0x2a54ed=Number(_0x4f2a25['headers'][_0x313163(0x1e8)](_0x313163(0x1f8)));if(Number['isFinite'](_0x2a54ed)&&_0x2a54ed>MAX_ARCHIVE_SIZE)throw new Error(_0x313163(0x1ef));return readResponseBytes(_0x4f2a25,_0x46808d['size']);});if(_0x120509[_0x1de763(0x1f0)]!==_0x46808d[_0x1de763(0x1b4)])throw new Error('CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20'+_0x46808d['size']+_0x1de763(0x1ed)+_0x120509[_0x1de763(0x1f0)]+'.');_0x376a81?.('verifying');const _0x1dc8b4=_0x1de763(0x1d4)+createHash('sha256')[_0x1de763(0x1ab)](_0x120509)[_0x1de763(0x1a4)](_0x1de763(0x1ee));if(_0x1dc8b4!==_0x46808d['sha256'])throw new Error('CDN\x20project\x20template\x20checksum\x20verification\x20failed.');await a163_0x313a73[_0x1de763(0x1ec)](_0x124dfd,_0x120509,{'flag':'wx'});}async function assertTemplateRoot(_0x2908a7){const _0x270d9c=a163_0x3744fc,_0x52d754=a163_0x531feb[_0x270d9c(0x1c1)](_0x2908a7,'package.json'),_0x25fb18=JSON['parse'](await a163_0x313a73['readFile'](_0x52d754,_0x270d9c(0x1aa)));if(!_0x25fb18||typeof _0x25fb18!==_0x270d9c(0x1b5))throw new Error(_0x270d9c(0x1ca));}const LOCAL_FORBIDDEN_NAMES=new Set([a163_0x3744fc(0x202),a163_0x3744fc(0x203),a163_0x3744fc(0x1b9),a163_0x3744fc(0x1b2),'.lovrabet.json','.lovrabet.log',a163_0x3744fc(0x1f3),a163_0x3744fc(0x1f9),a163_0x3744fc(0x1ac),a163_0x3744fc(0x205)]);function isForbiddenTemplateEntry(_0x57ca51){const _0x160ac9=a163_0x3744fc;if(LOCAL_FORBIDDEN_NAMES['has'](_0x57ca51))return!![];return _0x57ca51===_0x160ac9(0x1c4)||_0x57ca51['startsWith'](_0x160ac9(0x1b8))&&_0x57ca51!==_0x160ac9(0x1fe);}function containsPath(_0x2a3c1a,_0x1ddb38){const _0x5c7ca5=a163_0x3744fc,_0x545539=a163_0x531feb[_0x5c7ca5(0x1d8)](_0x2a3c1a,_0x1ddb38);return _0x545539===''||!_0x545539['startsWith']('..'+a163_0x531feb[_0x5c7ca5(0x1d7)])&&_0x545539!=='..'&&!a163_0x531feb[_0x5c7ca5(0x1b3)](_0x545539);}async function copyLocalTemplateDirectory(_0x15e9b1,_0x3318f0){const _0x54ac9a=a163_0x3744fc;await a163_0x313a73[_0x54ac9a(0x209)](_0x3318f0,{'recursive':!![]});for(const _0x5c6d30 of await a163_0x313a73['readdir'](_0x15e9b1,{'withFileTypes':!![]})){const _0x2dc708=a163_0x531feb[_0x54ac9a(0x1c1)](_0x15e9b1,_0x5c6d30[_0x54ac9a(0x1d3)]),_0x59c3fc=a163_0x531feb[_0x54ac9a(0x1c1)](_0x3318f0,_0x5c6d30[_0x54ac9a(0x1d3)]);if(isForbiddenTemplateEntry(_0x5c6d30[_0x54ac9a(0x1d3)]))throw new Error('Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20'+_0x2dc708);const _0x363124=await a163_0x313a73['lstat'](_0x2dc708);if(_0x363124['isSymbolicLink']())throw new Error(_0x54ac9a(0x1ce)+_0x2dc708);if(_0x363124[_0x54ac9a(0x1db)]()){await copyLocalTemplateDirectory(_0x2dc708,_0x59c3fc);continue;}if(!_0x363124[_0x54ac9a(0x210)]())continue;await a163_0x313a73[_0x54ac9a(0x1c8)](_0x2dc708,_0x59c3fc),await a163_0x313a73[_0x54ac9a(0x1c6)](_0x59c3fc,_0x363124['mode']&0x1ff);}}function a163_0xd02c(){const _0x220431=['content-length','.rabetbase.json','origin','trim','abort','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','.env.example','basename','dirname','projectTemplate','.DS_Store','.codegraph','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','node_modules','access','11KCDuDQ','push','mkdir','startsWith','code','readdir','sha256','398472CAmAkW','5SMTFzc','isFile','isSafeInteger','signal','digest','from','extracting','lstat','string','template.zip','utf8','update','dist','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','posix','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','1149909ZjNjKD','package.json','.idea','isAbsolute','size','object','rename','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','.env.','.git','status','EEXIST','dev','project','resolve','copying','2600064nUBqgE','join','downloading','concat','.env','pathname','chmod','getReader','copyFile','Project\x20directory\x20already\x20exists:\x20','Project\x20template\x20package.json\x20is\x20invalid.','mkdtemp','https:','releaseLock','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','version','9vNeBjL','name','sha256:','message','realpath','sep','relative','1783YgIDwk','4499556ZiSTsB','isDirectory','body','Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','validation','ino','resolving','parse','ENOENT','cdn','.rabetbase-create-','protocol','Local\x20template\x20source\x20does\x20not\x20exist:\x20','get','2147690PieeFL','Use\x20a\x20different\x20project\x20name.','test','writeFile',',\x20received\x20','hex','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','length','sub-app-react-demo','394EwDhCc','.rabetbase','includes','1613073itzPon','cancel','4oyIMKm'];a163_0xd02c=function(){return _0x220431;};return a163_0xd02c();}async function readTemplateVersion(_0x2bf27d){const _0x41389f=a163_0x3744fc,_0x38d9b7=JSON[_0x41389f(0x1e2)](await a163_0x313a73['readFile'](a163_0x531feb[_0x41389f(0x1c1)](_0x2bf27d,_0x41389f(0x1b1)),_0x41389f(0x1aa)));return nonEmptyString(_0x38d9b7['version'])||'local';}async function readDirectoryIdentity(_0x80928d){const _0x32a349=a163_0x3744fc;try{const _0x20802f=await a163_0x313a73['lstat'](_0x80928d);if(!_0x20802f[_0x32a349(0x1db)]())return null;return{'dev':_0x20802f[_0x32a349(0x1bc)],'ino':_0x20802f[_0x32a349(0x1e0)]};}catch{return null;}}async function commitStagedProject(_0x2e7c1c,_0x29095e){const _0x3dbca7=a163_0x3744fc;await a163_0x313a73[_0x3dbca7(0x209)](_0x29095e);const _0x2296c3=await readDirectoryIdentity(_0x29095e);if(!_0x2296c3)throw new Error('Unable\x20to\x20claim\x20the\x20project\x20directory.');try{for(const _0x5cfda4 of await a163_0x313a73[_0x3dbca7(0x20c)](_0x2e7c1c)){await a163_0x313a73[_0x3dbca7(0x1b6)](a163_0x531feb[_0x3dbca7(0x1c1)](_0x2e7c1c,_0x5cfda4),a163_0x531feb[_0x3dbca7(0x1c1)](_0x29095e,_0x5cfda4));}}catch(_0xb63c26){const _0x2dd4c8=await readDirectoryIdentity(_0x29095e);_0x2dd4c8?.[_0x3dbca7(0x1bc)]===_0x2296c3[_0x3dbca7(0x1bc)]&&_0x2dd4c8['ino']===_0x2296c3[_0x3dbca7(0x1e0)]&&await a163_0x313a73['rm'](_0x29095e,{'recursive':!![],'force':!![]});throw _0xb63c26;}}export async function materializeProjectTemplate(_0x1cae1a,_0x7d22e2){const _0x116003=a163_0x3744fc,_0x1e3da7=a163_0x531feb['resolve'](_0x1cae1a),_0x4efe24=a163_0x531feb[_0x116003(0x200)](_0x1e3da7);try{await a163_0x313a73['lstat'](_0x1e3da7);throw new Error(_0x116003(0x1c9)+_0x1e3da7);}catch(_0x30cc44){if(_0x30cc44[_0x116003(0x20b)]!==_0x116003(0x1e3))throw _0x30cc44;}const _0x231ea2=await a163_0x313a73[_0x116003(0x1cb)](a163_0x531feb['join'](_0x4efe24,_0x116003(0x1e5))),_0x9cb45c=a163_0x531feb[_0x116003(0x1c1)](_0x231ea2,_0x116003(0x1bd)),_0x1df4d9=a163_0x531feb['join'](_0x231ea2,_0x116003(0x1a9));try{try{_0x7d22e2?.(_0x116003(0x1e1));const _0x3680fb=await fetchTemplateDescriptor();return _0x7d22e2?.(_0x116003(0x1c2)),await downloadArchive(_0x3680fb,_0x1df4d9,_0x7d22e2),_0x7d22e2?.(_0x116003(0x1a6)),await extractProjectTemplateArchive(_0x1df4d9,_0x9cb45c),await assertTemplateRoot(_0x9cb45c),await commitStagedProject(_0x9cb45c,_0x1e3da7),{'source':_0x116003(0x1e4),'version':_0x3680fb[_0x116003(0x1d1)]};}catch(_0x58bec4){if(_0x58bec4[_0x116003(0x20b)]===_0x116003(0x1bb))throw CliErrors[_0x116003(0x1df)]('Project\x20directory\x20already\x20exists:\x20'+_0x1e3da7,_0x116003(0x1ea));const _0x3feb68=_0x58bec4 instanceof Error?_0x58bec4[_0x116003(0x1d5)]:String(_0x58bec4);throw CliErrors[_0x116003(0x1df)](_0x116003(0x1b7),_0x116003(0x1d0)+_0x3feb68);}}finally{await a163_0x313a73['rm'](_0x231ea2,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x282b65,_0x4d65e9,_0x1fce61){const _0x33a7be=a163_0x3744fc;let _0x28e113;try{_0x28e113=await a163_0x313a73[_0x33a7be(0x1d6)](a163_0x531feb[_0x33a7be(0x1be)](_0x282b65));}catch{throw CliErrors[_0x33a7be(0x1df)](_0x33a7be(0x1e7)+a163_0x531feb['resolve'](_0x282b65),_0x33a7be(0x1ad));}const _0x482517=await a163_0x313a73[_0x33a7be(0x1a7)](_0x28e113);if(!_0x482517[_0x33a7be(0x1db)]())throw CliErrors['validation'](_0x33a7be(0x1dd)+_0x28e113);const _0x1cfa9b=a163_0x531feb['resolve'](_0x4d65e9),_0x68d36b=await a163_0x313a73[_0x33a7be(0x1d6)](a163_0x531feb[_0x33a7be(0x200)](_0x1cfa9b)),_0x385121=a163_0x531feb[_0x33a7be(0x1c1)](_0x68d36b,a163_0x531feb[_0x33a7be(0x1ff)](_0x1cfa9b));if(containsPath(_0x28e113,_0x385121)||containsPath(_0x385121,_0x28e113))throw CliErrors[_0x33a7be(0x1df)](_0x33a7be(0x1af),'Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.');try{await a163_0x313a73['lstat'](_0x385121);throw CliErrors[_0x33a7be(0x1df)](_0x33a7be(0x1c9)+_0x385121,_0x33a7be(0x204));}catch(_0x3319c9){if(_0x3319c9[_0x33a7be(0x20b)]!=='ENOENT')throw _0x3319c9;}const _0x1fab82=a163_0x531feb[_0x33a7be(0x200)](_0x385121);await a163_0x313a73[_0x33a7be(0x206)](_0x1fab82);const _0x3ce090=await a163_0x313a73['mkdtemp'](a163_0x531feb[_0x33a7be(0x1c1)](_0x1fab82,_0x33a7be(0x1e5))),_0x1a7b56=a163_0x531feb['join'](_0x3ce090,_0x33a7be(0x1bd));try{_0x1fce61?.(_0x33a7be(0x1bf)),await copyLocalTemplateDirectory(_0x28e113,_0x1a7b56),await assertTemplateRoot(_0x1a7b56);const _0x60bb25=await readTemplateVersion(_0x1a7b56);return await commitStagedProject(_0x1a7b56,_0x385121),{'source':'local','version':_0x60bb25};}catch(_0x52e749){const _0x5d8578=_0x52e749 instanceof Error?_0x52e749[_0x33a7be(0x1d5)]:String(_0x52e749);throw CliErrors[_0x33a7be(0x1df)]('Invalid\x20local\x20template\x20source:\x20'+_0x5d8578,'Check\x20the\x20source\x20directory\x20and\x20retry.');}finally{await a163_0x313a73['rm'](_0x3ce090,{'recursive':!![],'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10db0e,_0x293a5c){const _0x519e47=a164_0x4b36,_0x4a59c8=_0x10db0e();while(!![]){try{const _0x47d7cd=-parseInt(_0x519e47(0xa2))/0x1*(parseInt(_0x519e47(0xac))/0x2)+-parseInt(_0x519e47(0xa3))/0x3*(parseInt(_0x519e47(0xb2))/0x4)+parseInt(_0x519e47(0xab))/0x5*(parseInt(_0x519e47(0xa4))/0x6)+parseInt(_0x519e47(0xb3))/0x7*(parseInt(_0x519e47(0xa1))/0x8)+-parseInt(_0x519e47(0xa0))/0x9*(-parseInt(_0x519e47(0xad))/0xa)+parseInt(_0x519e47(0xae))/0xb*(parseInt(_0x519e47(0xb4))/0xc)+parseInt(_0x519e47(0xa9))/0xd;if(_0x47d7cd===_0x293a5c)break;else _0x4a59c8['push'](_0x4a59c8['shift']());}catch(_0xcd8e8a){_0x4a59c8['push'](_0x4a59c8['shift']());}}}(a164_0x16fd,0xd8b78));import{CliErrors}from'../../../errors.js';const PROJECT_NAME_PATTERN=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i,MAX_PROJECT_NAME_LENGTH=0x64;function a164_0x4b36(_0x58e06a,_0x499365){_0x58e06a=_0x58e06a-0xa0;const _0x16fde3=a164_0x16fd();let _0x4b368d=_0x16fde3[_0x58e06a];return _0x4b368d;}export function getProjectNameValidationError(_0x3950bc){const _0x28ba84=a164_0x4b36,_0x4c2f56=_0x3950bc[_0x28ba84(0xa6)]();if(!_0x4c2f56)return _0x28ba84(0xa8);if(_0x4c2f56[_0x28ba84(0xa5)]>MAX_PROJECT_NAME_LENGTH)return'Project\x20name\x20cannot\x20exceed\x20'+MAX_PROJECT_NAME_LENGTH+'\x20characters';if(!PROJECT_NAME_PATTERN[_0x28ba84(0xb1)](_0x4c2f56))return _0x28ba84(0xaa);if(WINDOWS_RESERVED_NAME[_0x28ba84(0xb1)](_0x4c2f56))return'Project\x20name\x20\x22'+_0x4c2f56+_0x28ba84(0xb0);return null;}function a164_0x16fd(){const _0x1997ed=['456ioKtZc','252WnigSY','2368hHfZkU','23cWMQIL','681ONWhHW','2123658IgEiKw','length','trim','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','Project\x20name\x20cannot\x20be\x20empty','142441AYnwoq','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','15EXsPns','96302zthzdX','199780WBiUmI','276122uDlWIq','validation','\x22\x20is\x20reserved\x20on\x20Windows','test','22268PUBMZj','15911jAwLaQ'];a164_0x16fd=function(){return _0x1997ed;};return a164_0x16fd();}export function validateProjectName(_0x29777b){const _0x5cdfda=a164_0x4b36,_0x41df5f=_0x29777b[_0x5cdfda(0xa6)](),_0x287a16=getProjectNameValidationError(_0x41df5f);if(_0x287a16)throw CliErrors[_0x5cdfda(0xaf)](_0x287a16,_0x5cdfda(0xa7));return _0x41df5f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21761b,_0x1f2059){const _0x1be17f=a165_0x348e,_0x2c094a=_0x21761b();while(!![]){try{const _0x48795c=-parseInt(_0x1be17f(0x11a))/0x1*(-parseInt(_0x1be17f(0x11c))/0x2)+-parseInt(_0x1be17f(0x12a))/0x3*(parseInt(_0x1be17f(0x12e))/0x4)+-parseInt(_0x1be17f(0x12f))/0x5*(-parseInt(_0x1be17f(0x133))/0x6)+parseInt(_0x1be17f(0x11b))/0x7*(-parseInt(_0x1be17f(0x122))/0x8)+parseInt(_0x1be17f(0x117))/0x9*(parseInt(_0x1be17f(0x138))/0xa)+parseInt(_0x1be17f(0x110))/0xb*(parseInt(_0x1be17f(0x130))/0xc)+parseInt(_0x1be17f(0x127))/0xd*(-parseInt(_0x1be17f(0x112))/0xe);if(_0x48795c===_0x1f2059)break;else _0x2c094a['push'](_0x2c094a['shift']());}catch(_0x3afed4){_0x2c094a['push'](_0x2c094a['shift']());}}}(a165_0x2249,0x773c0));import{createWriteStream}from'node:fs';import a165_0x293ce0 from'node:fs/promises';function a165_0x348e(_0x2fbf5e,_0x5906f5){_0x2fbf5e=_0x2fbf5e-0x106;const _0x2249b4=a165_0x2249();let _0x348eb2=_0x2249b4[_0x2fbf5e];return _0x348eb2;}import a165_0x1cf46b from'node:path';import{pipeline}from'node:stream/promises';import a165_0x19b09d from'yauzl';const MAX_ENTRY_COUNT=0x7d0,MAX_UNCOMPRESSED_SIZE=0x32*0x400*0x400,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i,WINDOWS_INVALID_CHAR=/[<>:"|?*\x00-\x1f]/;function openZip(_0x2891a0){return new Promise((_0x1c7a45,_0x173843)=>{const _0x164f0d=a165_0x348e;a165_0x19b09d[_0x164f0d(0x12c)](_0x2891a0,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x485f60,_0x10dbd2)=>{const _0x17c51a=_0x164f0d;if(_0x485f60||!_0x10dbd2){_0x173843(_0x485f60||new Error(_0x17c51a(0x12b)));return;}_0x1c7a45(_0x10dbd2);});});}function openEntryStream(_0x3d5f21,_0x54644d){return new Promise((_0x376abb,_0x23cb74)=>{const _0x12e1d9=a165_0x348e;_0x3d5f21[_0x12e1d9(0x10a)](_0x54644d,(_0x4e3b7b,_0x1c7e8a)=>{const _0x551e81=_0x12e1d9;if(_0x4e3b7b||!_0x1c7e8a){_0x23cb74(_0x4e3b7b||new Error(_0x551e81(0x10e)+_0x54644d[_0x551e81(0x123)]));return;}_0x376abb(_0x1c7e8a);});});}function a165_0x2249(){const _0x3cc2cd=['endsWith','4866678cOPWJx','entry','mkdir','33TKKIGp','203CXIFJR','798yzVkfF','error','once','end','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','toLocaleLowerCase','139976ysTVFF','fileName','sep','dirname','set','117RaQzfW','\x20entries.','get','582PFsHhX','Unable\x20to\x20open\x20project\x20template\x20archive.','open','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','952PItUBn','9395wUIrWM','84JZiRaH','length','replace','1626zRFFNd','externalFileAttributes','Case-conflicting\x20ZIP\x20entry\x20path:\x20','Project\x20template\x20ZIP\x20exceeds\x20','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','10KEjUTa','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','resolve','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','split','openReadStream','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','uncompressedSize','test','Unable\x20to\x20read\x20ZIP\x20entry:\x20','readEntry','779174XRcXTb','startsWith','804202LNTmwE','en-US','isEncrypted','join'];a165_0x2249=function(){return _0x3cc2cd;};return a165_0x2249();}function validateEntryPath(_0x4ab17e){const _0x5667b1=a165_0x348e,_0x32b59e=_0x4ab17e[_0x5667b1(0x132)](/\\/g,'/'),_0x596755=_0x32b59e['endsWith']('/'),_0x1b8071=_0x596755?_0x32b59e['slice'](0x0,-0x1):_0x32b59e;if(!_0x1b8071||_0x32b59e['startsWith']('/')||/^[A-Za-z]:\//['test'](_0x32b59e))throw new Error(_0x5667b1(0x12d)+_0x4ab17e);const _0x2a2a43=_0x1b8071[_0x5667b1(0x109)]('/');for(const _0x45d1ae of _0x2a2a43){if(!_0x45d1ae||_0x45d1ae==='.'||_0x45d1ae==='..'||_0x45d1ae[_0x5667b1(0x116)]('.')||_0x45d1ae['endsWith']('\x20')||WINDOWS_INVALID_CHAR[_0x5667b1(0x10d)](_0x45d1ae)||WINDOWS_RESERVED_NAME[_0x5667b1(0x10d)](_0x45d1ae))throw new Error(_0x5667b1(0x10b)+_0x4ab17e);}return{'relativePath':_0x2a2a43[_0x5667b1(0x115)](a165_0x1cf46b['sep']),'directory':_0x596755};}function isSymbolicLink(_0x45ebb3){const _0x3a7f12=a165_0x348e,_0x4689be=_0x45ebb3[_0x3a7f12(0x134)]>>>0x10&0xffff;return(_0x4689be&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x5a47de,_0x2359ca){const _0x2ef0af=a165_0x348e,_0x1df645=await openZip(_0x5a47de),_0x599023=a165_0x1cf46b['resolve'](_0x2359ca),_0x34b1be=new Set(),_0x2be435=new Map();let _0x4aa763=0x0,_0x20db36=0x0;await a165_0x293ce0[_0x2ef0af(0x119)](_0x599023,{'recursive':!![]}),await new Promise((_0xa643de,_0x58fadb)=>{const _0x502ef7=_0x2ef0af;let _0x4aaf7c=![];const _0x4349ad=_0x46212b=>{if(_0x4aaf7c)return;_0x4aaf7c=!![],_0x1df645['close'](),_0x58fadb(_0x46212b instanceof Error?_0x46212b:new Error(String(_0x46212b)));};_0x1df645[_0x502ef7(0x11e)](_0x502ef7(0x11d),_0x4349ad),_0x1df645['once'](_0x502ef7(0x11f),()=>{if(_0x4aaf7c)return;_0x4aaf7c=!![],_0xa643de();}),_0x1df645['on'](_0x502ef7(0x118),_0x28493e=>{void(async()=>{const _0x4894f0=a165_0x348e;_0x4aa763+=0x1,_0x20db36+=_0x28493e[_0x4894f0(0x10c)];if(_0x4aa763>MAX_ENTRY_COUNT)throw new Error(_0x4894f0(0x136)+MAX_ENTRY_COUNT+_0x4894f0(0x128));if(_0x20db36>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x4894f0(0x120));if(_0x28493e[_0x4894f0(0x114)]())throw new Error('Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20'+_0x28493e[_0x4894f0(0x123)]);if(isSymbolicLink(_0x28493e))throw new Error(_0x4894f0(0x106)+_0x28493e[_0x4894f0(0x123)]);const {relativePath:_0x4e25d9,directory:_0x1b263b}=validateEntryPath(_0x28493e[_0x4894f0(0x123)]),_0x3ca935=_0x4e25d9[_0x4894f0(0x109)](a165_0x1cf46b[_0x4894f0(0x124)]);for(let _0xde6846=0x1;_0xde6846<=_0x3ca935[_0x4894f0(0x131)];_0xde6846+=0x1){const _0x12cb00=_0x3ca935['slice'](0x0,_0xde6846)[_0x4894f0(0x115)](a165_0x1cf46b[_0x4894f0(0x124)]),_0x37c833=_0x12cb00[_0x4894f0(0x121)]('en-US'),_0xfc293f=_0x2be435[_0x4894f0(0x129)](_0x37c833);if(_0xfc293f&&_0xfc293f!==_0x12cb00)throw new Error(_0x4894f0(0x135)+_0x28493e[_0x4894f0(0x123)]);_0x2be435[_0x4894f0(0x126)](_0x37c833,_0x12cb00);}const _0x160c98=_0x4e25d9[_0x4894f0(0x121)](_0x4894f0(0x113));if(_0x34b1be['has'](_0x160c98))throw new Error(_0x4894f0(0x137)+_0x28493e[_0x4894f0(0x123)]);_0x34b1be['add'](_0x160c98);const _0x25514f=a165_0x1cf46b[_0x4894f0(0x107)](_0x599023,_0x4e25d9);if(_0x25514f!==_0x599023&&!_0x25514f[_0x4894f0(0x111)](''+_0x599023+a165_0x1cf46b[_0x4894f0(0x124)]))throw new Error(_0x4894f0(0x108)+_0x28493e['fileName']);if(_0x1b263b)await a165_0x293ce0[_0x4894f0(0x119)](_0x25514f,{'recursive':!![]});else{await a165_0x293ce0[_0x4894f0(0x119)](a165_0x1cf46b[_0x4894f0(0x125)](_0x25514f),{'recursive':!![]});const _0x668fe5=await openEntryStream(_0x1df645,_0x28493e);await pipeline(_0x668fe5,createWriteStream(_0x25514f,{'flags':'wx','mode':0x1a4}));}_0x1df645[_0x4894f0(0x10f)]();})()['catch'](_0x4349ad);}),_0x1df645[_0x502ef7(0x10f)]();});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a166_0x548f(_0x53c41d,_0x27bebc){_0x53c41d=_0x53c41d-0x8a;const _0x2aa267=a166_0x2aa2();let _0x548fd0=_0x2aa267[_0x53c41d];return _0x548fd0;}const a166_0x5bdef3=a166_0x548f;function a166_0x2aa2(){const _0x4d7288=['3453820klPUDE','1813656weGkHO','2229591YpnNeB','2914092ZVCPxx','21958mdwAjS','../../../../','resolve','1043994bvFMFT','6617616DAvwGH','66PwvMVD','dirname'];a166_0x2aa2=function(){return _0x4d7288;};return a166_0x2aa2();}(function(_0x481123,_0x4db7ea){const _0x43318d=a166_0x548f,_0x2c2937=_0x481123();while(!![]){try{const _0x19aae4=-parseInt(_0x43318d(0x91))/0x1*(-parseInt(_0x43318d(0x8b))/0x2)+-parseInt(_0x43318d(0x94))/0x3+parseInt(_0x43318d(0x8e))/0x4+parseInt(_0x43318d(0x8d))/0x5+-parseInt(_0x43318d(0x90))/0x6+parseInt(_0x43318d(0x8f))/0x7+-parseInt(_0x43318d(0x8a))/0x8;if(_0x19aae4===_0x4db7ea)break;else _0x2c2937['push'](_0x2c2937['shift']());}catch(_0x4839fd){_0x2c2937['push'](_0x2c2937['shift']());}}}(a166_0x2aa2,0x80857));import a166_0x668b0b from'node:path';import{fileURLToPath}from'node:url';const __dirname=a166_0x668b0b[a166_0x5bdef3(0x8c)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x1afbf3=a166_0x5bdef3;return a166_0x668b0b[_0x1afbf3(0x93)](__dirname,_0x1afbf3(0x92));}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type ProjectTemplateProgress } from "../../../commands/project/create/materialize-project-template.js";
|
|
2
|
-
export declare function copyProjectTemplate(projectCode: string, onProgress?: ProjectTemplateProgress): Promise<string>;
|
|
2
|
+
export declare function copyProjectTemplate(projectCode: string, onProgress?: ProjectTemplateProgress, templateSource?: string): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40ac85,_0x6b87ab){const _0x35714c=a167_0x8352,_0x38bb14=_0x40ac85();while(!![]){try{const _0x5c28a1=parseInt(_0x35714c(0x151))/0x1*(parseInt(_0x35714c(0x158))/0x2)+-parseInt(_0x35714c(0x15f))/0x3*(parseInt(_0x35714c(0x153))/0x4)+parseInt(_0x35714c(0x15e))/0x5+-parseInt(_0x35714c(0x152))/0x6+-parseInt(_0x35714c(0x154))/0x7*(-parseInt(_0x35714c(0x157))/0x8)+-parseInt(_0x35714c(0x159))/0x9+parseInt(_0x35714c(0x15c))/0xa*(parseInt(_0x35714c(0x163))/0xb);if(_0x5c28a1===_0x6b87ab)break;else _0x38bb14['push'](_0x38bb14['shift']());}catch(_0x9e40d4){_0x38bb14['push'](_0x38bb14['shift']());}}}(a167_0x27c2,0x428bc));function a167_0x8352(_0x488630,_0x5138e2){_0x488630=_0x488630-0x151;const _0x27c2da=a167_0x27c2();let _0x83521b=_0x27c2da[_0x488630];return _0x83521b;}import a167_0x58bb80 from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a167_0x27c2(){const _0x3a15ce=['Starting\x20project\x20template\x20creation','Failed\x20to\x20copy\x20project\x20template','436766qJEvHf','now','resolve','7EjfrWV','1134474sVtaaV','151964oXBnSV','152460NQEuVr','copy','Project\x20template\x20created','40CVgTWq','139630qAiMGm','1978650obOieO','version','success','10fyUqJS','message','2690365yIjXIx','39LvyPUP','error'];a167_0x27c2=function(){return _0x3a15ce;};return a167_0x27c2();}import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x5e4c4f,_0x4b53d2,_0x15f3c2){const _0x5553b3=a167_0x8352,_0x4392b7=Date[_0x5553b3(0x164)](),_0x176c47=a167_0x58bb80[_0x5553b3(0x165)](process['cwd'](),_0x5e4c4f);try{logger['info']('copy',_0x5553b3(0x161),{'projectCode':_0x5e4c4f});const _0x3c6951=_0x15f3c2?await materializeLocalProjectTemplate(_0x15f3c2,_0x176c47,_0x4b53d2):await materializeProjectTemplate(_0x176c47,_0x4b53d2),_0x24d0b4=Date[_0x5553b3(0x164)]()-_0x4392b7;logger[_0x5553b3(0x15b)]('copy',_0x5553b3(0x156),_0x24d0b4,{'projectCode':_0x5e4c4f,'templateSource':_0x3c6951['source'],'templateVersion':_0x3c6951[_0x5553b3(0x15a)]});}catch(_0x41ca03){const _0x29c9c7=Date[_0x5553b3(0x164)]()-_0x4392b7;logger[_0x5553b3(0x160)](_0x5553b3(0x155),_0x5553b3(0x162),{'projectCode':_0x5e4c4f,'error':_0x41ca03 instanceof Error?_0x41ca03[_0x5553b3(0x15d)]:String(_0x41ca03),'duration':_0x29c9c7});throw _0x41ca03;}return formatElapsed(_0x4392b7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x143d93,_0x147a11){const _0x523d0a=a168_0x3af8,_0x4ffa92=_0x143d93();while(!![]){try{const _0x156c6a=-parseInt(_0x523d0a(0x1a0))/0x1*(-parseInt(_0x523d0a(0x1a3))/0x2)+-parseInt(_0x523d0a(0x1ac))/0x3+-parseInt(_0x523d0a(0x1a5))/0x4*(-parseInt(_0x523d0a(0x1a9))/0x5)+parseInt(_0x523d0a(0x1ae))/0x6+parseInt(_0x523d0a(0x1aa))/0x7*(-parseInt(_0x523d0a(0x1ab))/0x8)+-parseInt(_0x523d0a(0x19b))/0x9+parseInt(_0x523d0a(0x19e))/0xa;if(_0x156c6a===_0x147a11)break;else _0x4ffa92['push'](_0x4ffa92['shift']());}catch(_0x17efce){_0x4ffa92['push'](_0x4ffa92['shift']());}}}(a168_0x16ea,0xbcee5));import a168_0x1291f4 from'node:path';import{execa}from'execa';function a168_0x3af8(_0x500a46,_0x1d291e){_0x500a46=_0x500a46-0x19b;const _0x16ea7b=a168_0x16ea();let _0x3af89d=_0x16ea7b[_0x500a46];return _0x3af89d;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a168_0x16ea(){const _0xc29bff=['error','cwd','5666500KfyoYt','Code\x20format\x20failed','1519515rXqXte','resolve','Starting\x20code\x20format','2uHXNdY','now','1508396jMekgG','Code\x20format\x20completed','info','prettier','10TyXnfu','9303agvGcL','6968UHQkrU','4192215JWxMGa','npx','3167214gJFwBT','format','message','354663EFLzjR'];a168_0x16ea=function(){return _0xc29bff;};return a168_0x16ea();}export async function formatProjectCode(_0x92575b){const _0x54df3e=a168_0x3af8,_0x1956a4=Date[_0x54df3e(0x1a4)](),_0x1d9457=a168_0x1291f4[_0x54df3e(0x1a1)](process[_0x54df3e(0x19d)](),_0x92575b);try{logger[_0x54df3e(0x1a7)](_0x54df3e(0x1af),_0x54df3e(0x1a2),{'projectCode':_0x92575b}),await execa(resolveNpmBin(_0x54df3e(0x1ad)),[_0x54df3e(0x1a8),'--write','.'],{'cwd':_0x1d9457});const _0x289c5e=Date['now']()-_0x1956a4;logger['success']('format',_0x54df3e(0x1a6),_0x289c5e,{'projectCode':_0x92575b});}catch(_0x28e71d){const _0x9411d4=Date[_0x54df3e(0x1a4)]()-_0x1956a4;logger[_0x54df3e(0x19c)](_0x54df3e(0x1af),_0x54df3e(0x19f),{'projectCode':_0x92575b,'error':_0x28e71d instanceof Error?_0x28e71d[_0x54df3e(0x1b0)]:String(_0x28e71d),'duration':_0x9411d4});throw _0x28e71d;}return formatElapsed(_0x1956a4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12ffb6,_0xdc0c5){const _0x4e5b9a=a169_0x3a2d,_0x145563=_0x12ffb6();while(!![]){try{const _0x9e1684=parseInt(_0x4e5b9a(0x78))/0x1+parseInt(_0x4e5b9a(0x71))/0x2+parseInt(_0x4e5b9a(0x6f))/0x3+-parseInt(_0x4e5b9a(0x75))/0x4*(parseInt(_0x4e5b9a(0x7b))/0x5)+parseInt(_0x4e5b9a(0x73))/0x6+parseInt(_0x4e5b9a(0x76))/0x7+-parseInt(_0x4e5b9a(0x70))/0x8;if(_0x9e1684===_0xdc0c5)break;else _0x145563['push'](_0x145563['shift']());}catch(_0x2625d6){_0x145563['push'](_0x145563['shift']());}}}(a169_0x1e6f,0x63398));import a169_0x11f99d from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a169_0x1e6f(){const _0x142fcf=['259242InVaGJ','Dependency\x20install\x20completed','resolve','15HPWpEh','install','success','--registry','message','https://registry.npmmirror.com','Starting\x20dependency\x20install','849177CXusDn','12943232JGDdCf','1567858DWQrFH','now','2971254tLJZtx','error','197308ZJsCWT','2456090eIeBaX','npm'];a169_0x1e6f=function(){return _0x142fcf;};return a169_0x1e6f();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a169_0x3a2d(_0x1588f2,_0x55dafb){_0x1588f2=_0x1588f2-0x6c;const _0x1e6f28=a169_0x1e6f();let _0x3a2de2=_0x1e6f28[_0x1588f2];return _0x3a2de2;}export async function installDependencies(_0x14bc36){const _0x120aa1=a169_0x3a2d,_0x1b5c28=Date[_0x120aa1(0x72)](),_0x47a161=a169_0x11f99d[_0x120aa1(0x7a)](process['cwd'](),_0x14bc36);try{logger['info'](_0x120aa1(0x7c),_0x120aa1(0x6e),{'projectCode':_0x14bc36,'registry':_0x120aa1(0x6d)}),await execa(resolveNpmBin(_0x120aa1(0x77)),[_0x120aa1(0x7c),_0x120aa1(0x7e),_0x120aa1(0x6d)],{'cwd':_0x47a161});const _0x3e839d=Date[_0x120aa1(0x72)]()-_0x1b5c28;logger[_0x120aa1(0x7d)](_0x120aa1(0x7c),_0x120aa1(0x79),_0x3e839d,{'projectCode':_0x14bc36});}catch(_0x277f57){const _0x319e4d=Date[_0x120aa1(0x72)]()-_0x1b5c28;logger[_0x120aa1(0x74)](_0x120aa1(0x7c),'Dependency\x20install\x20failed',{'projectCode':_0x14bc36,'error':_0x277f57 instanceof Error?_0x277f57[_0x120aa1(0x6c)]:String(_0x277f57),'duration':_0x319e4d});throw _0x277f57;}return formatElapsed(_0x1b5c28);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a170_0x5b2430=a170_0xe9f7;(function(_0x7b98d5,_0x526672){const _0x3ea695=a170_0xe9f7,_0x1eb998=_0x7b98d5();while(!![]){try{const _0x2bb44e=parseInt(_0x3ea695(0x181))/0x1+parseInt(_0x3ea695(0x18c))/0x2+-parseInt(_0x3ea695(0x183))/0x3+parseInt(_0x3ea695(0x192))/0x4*(parseInt(_0x3ea695(0x19f))/0x5)+parseInt(_0x3ea695(0x196))/0x6*(-parseInt(_0x3ea695(0x197))/0x7)+-parseInt(_0x3ea695(0x17e))/0x8+-parseInt(_0x3ea695(0x184))/0x9*(-parseInt(_0x3ea695(0x19a))/0xa);if(_0x2bb44e===_0x526672)break;else _0x1eb998['push'](_0x1eb998['shift']());}catch(_0x5969a6){_0x1eb998['push'](_0x1eb998['shift']());}}}(a170_0x4374,0xd4414));import{CliErrors}from'../../errors.js';function a170_0x4374(){const _0x2a30c9=['write','project','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','306olkoBQ','128989mWmHGe','boolean','string','10Bbkmlq','../../commands/project/create/main.js','upgrade','template-source','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','23830OwjYha','validation','cookie','create','10442864LNfINN','bool','yes','1722675KAIRqc','args','4149414Zrlhsw','6041547Mjptdr','nonInteractive','Project\x20name','project-name','Target\x20environment','Usage:\x20','str','name','2806218ZQWTOj','env','appcode','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','trim','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','588kNjEZG'];a170_0x4374=function(){return _0x2a30c9;};return a170_0x4374();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':a170_0x5b2430(0x18b),'type':a170_0x5b2430(0x199),'description':a170_0x5b2430(0x186)},{'name':a170_0x5b2430(0x18d),'type':a170_0x5b2430(0x199),'description':a170_0x5b2430(0x188)},{'name':a170_0x5b2430(0x18e),'type':'string','description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'},{'name':a170_0x5b2430(0x19d),'type':a170_0x5b2430(0x199),'description':'Prepared\x20local\x20project\x20template\x20directory'}],upgradeFlags=[{'name':a170_0x5b2430(0x180),'type':a170_0x5b2430(0x198),'description':'Skip\x20confirmation\x20prompt','default':![]}];function a170_0xe9f7(_0x10ece1,_0x2c7390){_0x10ece1=_0x10ece1-0x17e;const _0x437424=a170_0x4374();let _0xe9f7d6=_0x437424[_0x10ece1];return _0xe9f7d6;}export const projectDefinitions=[{'service':a170_0x5b2430(0x194),'command':a170_0x5b2430(0x1a2),'description':'Create\x20a\x20new\x20project','risk':a170_0x5b2430(0x193),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a170_0x5b2430(0x187),'description':a170_0x5b2430(0x195),'required':![]}],'flags':createFlags,async 'execute'(_0x5cfe58){const _0x49d17b=a170_0x5b2430,{createApp:_0x5b026a}=await import(_0x49d17b(0x19b)),_0x4cf071=_0x5cfe58[_0x49d17b(0x18a)](_0x49d17b(0x18b))[_0x49d17b(0x190)]()||_0x5cfe58[_0x49d17b(0x182)][0x0]?.['trim'](),_0x3114a9=_0x5cfe58[_0x49d17b(0x18a)]('env')||undefined,_0x12977a=_0x5cfe58[_0x49d17b(0x18a)]('appcode')||undefined,_0x52d84b=_0x5cfe58[_0x49d17b(0x18a)](_0x49d17b(0x19d))['trim']()||undefined;if(_0x5cfe58[_0x49d17b(0x185)]){if(!_0x4cf071)throw CliErrors[_0x49d17b(0x1a0)](_0x49d17b(0x191),_0x49d17b(0x189)+CLI_BIN_NAME+_0x49d17b(0x19e));await _0x5b026a({'projectCode':_0x4cf071,'appCode':_0x12977a,'env':_0x3114a9,'cookie':_0x5cfe58['cookie'],'nonInteractive':!![],'templateSource':_0x52d84b});}else await _0x5b026a({'projectCode':_0x4cf071,'appCode':_0x12977a,'env':_0x3114a9,'cookie':_0x5cfe58[_0x49d17b(0x1a1)],'templateSource':_0x52d84b});return{'ok':!![]};}},{'service':a170_0x5b2430(0x194),'command':a170_0x5b2430(0x19c),'description':a170_0x5b2430(0x18f),'risk':a170_0x5b2430(0x193),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5f15ad){const _0x1d5211=a170_0x5b2430;return await upgradeApp(_0x5f15ad[_0x1d5211(0x185)],{'yes':_0x5f15ad[_0x1d5211(0x17f)](_0x1d5211(0x180))}),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a173_0x1421ab=a173_0x3fb9;(function(_0x50f051,_0x103818){const _0x3a1deb=a173_0x3fb9,_0x1a7273=_0x50f051();while(!![]){try{const _0x4f030e=-parseInt(_0x3a1deb(0x134))/0x1+-parseInt(_0x3a1deb(0x1a0))/0x2+parseInt(_0x3a1deb(0x198))/0x3*(-parseInt(_0x3a1deb(0x19a))/0x4)+-parseInt(_0x3a1deb(0x130))/0x5+parseInt(_0x3a1deb(0x197))/0x6+parseInt(_0x3a1deb(0x143))/0x7*(-parseInt(_0x3a1deb(0x13c))/0x8)+parseInt(_0x3a1deb(0x13f))/0x9;if(_0x4f030e===_0x103818)break;else _0x1a7273['push'](_0x1a7273['shift']());}catch(_0x5c4dab){_0x1a7273['push'](_0x1a7273['shift']());}}}(a173_0x5241,0xddb1f));import a173_0x465c40 from'chalk';import a173_0x9eba5e from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';function a173_0x3fb9(_0x1dfac0,_0x4948da){_0x1dfac0=_0x1dfac0-0x12e;const _0x524113=a173_0x5241();let _0x3fb965=_0x524113[_0x1dfac0];return _0x3fb965;}import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a173_0x1421ab(0x19c)](_0x222cb5=>_0x222cb5!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x58af59){const _0x3031c9=a173_0x1421ab,_0x8137b6=[];for(const _0x4f4a35 of Object[_0x3031c9(0x151)](CORE_IDE_CONFIGS)){if(_0x4f4a35[_0x3031c9(0x18c)])for(const _0x21e48d of _0x4f4a35[_0x3031c9(0x18c)]){_0x8137b6[_0x3031c9(0x1a3)](resolve(_0x58af59,_0x21e48d[_0x3031c9(0x14c)]));}}return _0x8137b6;}function analyse(_0x3a4972){const _0x1e3fc0=a173_0x1421ab;let _0x54b199=null;const _0x3e3495=resolve(_0x3a4972,NEW_CONFIG_NAME),_0x160f76=existsSync(_0x3e3495);for(const _0x22ea0c of LEGACY_CONFIG_NAMES){const _0x41f059=resolve(_0x3a4972,_0x22ea0c);if(existsSync(_0x41f059)){const _0x1b8ae8=readConfigFile(_0x41f059),_0x79c357=Object[_0x1e3fc0(0x176)](_0x1b8ae8)[_0x1e3fc0(0x19c)](_0xcbd54b=>typeof _0x1b8ae8[_0xcbd54b]!==_0x1e3fc0(0x13a));_0x54b199={'oldPath':_0x41f059,'hasNewConfig':_0x160f76,'fields':_0x79c357};break;}}const _0x23e6e0=[],_0x5ab160=resolve(_0x3a4972,'.lovrabet');if(existsSync(_0x5ab160))_0x23e6e0[_0x1e3fc0(0x1a3)](_0x5ab160);const _0x9f164e=resolve(_0x3a4972,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x9f164e))_0x23e6e0[_0x1e3fc0(0x1a3)](_0x9f164e);const _0x300dda=resolve(_0x3a4972,_0x1e3fc0(0x19f));if(existsSync(_0x300dda))_0x23e6e0['push'](_0x300dda);for(const _0xee2d03 of collectIdeSkillFiles(_0x3a4972)){if(existsSync(_0xee2d03))_0x23e6e0[_0x1e3fc0(0x1a3)](_0xee2d03);}let _0x2606a0=null;const _0xad3ad0=resolve(_0x3a4972,_0x1e3fc0(0x18d));if(existsSync(_0xad3ad0))try{const _0x418604=JSON[_0x1e3fc0(0x190)](readFileSync(_0xad3ad0,_0x1e3fc0(0x16a)));if(_0x418604?.[_0x1e3fc0(0x18b)]&&typeof _0x418604[_0x1e3fc0(0x18b)]===_0x1e3fc0(0x179)){const _0x25cf47=[];for(const [_0x43fcae,_0xcd50ec]of Object[_0x1e3fc0(0x163)](_0x418604['mcpServers'])){const _0x2ac23b=_0xcd50ec;_0x2ac23b?.['args']&&Array[_0x1e3fc0(0x13b)](_0x2ac23b[_0x1e3fc0(0x158)])&&_0x2ac23b[_0x1e3fc0(0x158)][_0x1e3fc0(0x141)](_0x4c392c=>typeof _0x4c392c===_0x1e3fc0(0x194)&&_0x4c392c[_0x1e3fc0(0x14e)](_0x1e3fc0(0x192)))&&_0x25cf47[_0x1e3fc0(0x1a3)](_0x43fcae);}_0x25cf47[_0x1e3fc0(0x184)]>0x0&&(_0x2606a0={'path':_0xad3ad0,'keys':_0x25cf47});}}catch{}const _0x19ec3a=_0x23e6e0['length']>0x0||_0x54b199!==null;let _0x366d5e=null;const _0x5bb1e8=resolve(_0x3a4972,_0x1e3fc0(0x12f));if(existsSync(_0x5bb1e8))try{const _0x49cd31=JSON[_0x1e3fc0(0x190)](readFileSync(_0x5bb1e8,_0x1e3fc0(0x16a)));for(const _0x5e5bc8 of['dependencies','devDependencies']){const _0x1b6e13=_0x49cd31?.[_0x5e5bc8]?.[_0x1e3fc0(0x152)];if(typeof _0x1b6e13===_0x1e3fc0(0x194)){_0x1b6e13!==_0x1e3fc0(0x14b)&&(_0x366d5e={'pkgPath':_0x5bb1e8,'currentVersion':_0x1b6e13,'field':_0x5e5bc8});break;}}}catch{}return{'configMigration':_0x54b199,'oldArtifacts':_0x23e6e0,'oldMcpConfig':_0x2606a0,'needsSkillSwap':_0x19ec3a,'sdkUpgrade':_0x366d5e};}function printReport(_0x117ac9){const _0x675459=a173_0x1421ab,{configMigration:_0x4923cd,oldArtifacts:_0x2e362e,oldMcpConfig:_0x298730,needsSkillSwap:_0x4540b4}=_0x117ac9;console[_0x675459(0x17e)](''),console[_0x675459(0x17e)](a173_0x465c40[_0x675459(0x146)](_0x675459(0x131))),console[_0x675459(0x17e)]('');_0x4923cd?(console[_0x675459(0x17e)](a173_0x465c40[_0x675459(0x17d)](_0x675459(0x138))+('\x20\x20'+a173_0x465c40[_0x675459(0x16e)](_0x4923cd[_0x675459(0x13e)]))),console[_0x675459(0x17e)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x4923cd['hasNewConfig']?a173_0x465c40[_0x675459(0x182)](_0x675459(0x150)):a173_0x465c40['gray']('not\x20found\x20(will\x20create)'))),console[_0x675459(0x17e)](_0x675459(0x174)+_0x4923cd[_0x675459(0x157)]['join'](',\x20')),console['log']('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console['log'](a173_0x465c40[_0x675459(0x17d)](_0x675459(0x138))+'\x20\x20'+a173_0x465c40['gray'](_0x675459(0x17f)));console['log']('');if(_0x2e362e['length']>0x0){console[_0x675459(0x17e)](a173_0x465c40['cyan'](_0x675459(0x18a)));for(const _0x3676e6 of _0x2e362e){console['log']('\x20\x20'+a173_0x465c40[_0x675459(0x1b0)](_0x675459(0x191))+'\x20\x20'+_0x3676e6);}console[_0x675459(0x17e)](_0x675459(0x15d));}else console[_0x675459(0x17e)](a173_0x465c40[_0x675459(0x17d)]('Legacy\x20artifacts:')+'\x20\x20'+a173_0x465c40[_0x675459(0x135)](_0x675459(0x149)));console[_0x675459(0x17e)]('');_0x298730?(console[_0x675459(0x17e)](a173_0x465c40['cyan'](_0x675459(0x1a7))+('\x20\x20'+a173_0x465c40['yellow'](_0x298730[_0x675459(0x14c)])+_0x675459(0x1a9)+_0x298730[_0x675459(0x176)][_0x675459(0x16c)](',\x20'))),console[_0x675459(0x17e)](_0x675459(0x137))):console[_0x675459(0x17e)](a173_0x465c40['cyan'](_0x675459(0x1a7))+'\x20\x20'+a173_0x465c40[_0x675459(0x135)](_0x675459(0x1a8)));console[_0x675459(0x17e)](''),console[_0x675459(0x17e)](a173_0x465c40[_0x675459(0x17d)](_0x675459(0x177))+('\x20\x20'+(_0x4540b4?a173_0x465c40[_0x675459(0x16e)](_0x675459(0x164)):a173_0x465c40['green'](_0x675459(0x173)))));_0x4540b4&&console[_0x675459(0x17e)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x117ac9[_0x675459(0x168)]){const {currentVersion:_0x55b4b6,field:_0x4adc71,pkgPath:_0x247c64}=_0x117ac9[_0x675459(0x168)];console[_0x675459(0x17e)](a173_0x465c40[_0x675459(0x17d)](_0x675459(0x1a6))+('\x20\x20'+a173_0x465c40[_0x675459(0x16e)](_0x247c64))),console[_0x675459(0x17e)](_0x675459(0x161)+_0x4adc71+':\x20'+a173_0x465c40[_0x675459(0x16e)](_0x55b4b6)+_0x675459(0x145)+a173_0x465c40[_0x675459(0x182)](_0x675459(0x14b))),console[_0x675459(0x17e)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console['log'](a173_0x465c40[_0x675459(0x17d)](_0x675459(0x1a6))+'\x20\x20'+a173_0x465c40['gray'](_0x675459(0x160)));console[_0x675459(0x17e)]('');}function a173_0x5241(){const _0x3a92e3=['@lovrabet/sdk:','MCP\x20config:','no\x20legacy\x20entry','\x20→\x20keys:\x20','white','Upgrade\x20completed\x20successfully!','\x20\x20bun\x20install','skipped\x20(no\x20legacy\x20config)','\x20\x20npm\x20install','lovrabet/lovrabet-skill\x20removed','red','stringify','package.json','7698320FEQmPo','===\x20Upgrade\x20Analysis\x20===','fail','CANCEL','1710940gvVWFf','gray','\x20→\x20latest','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Config\x20file:','[\x22@lovrabet/sdk\x22]:\x20','undefined','isArray','4215064JlvDwE','label','oldPath','57249738BaKNDk','error','some','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','7zegMAC','lovrabet/rabetbase\x20installed\x20globally','\x20→\x20','bold','Remove\x20old\x20skill','cwd','none\x20found','failed','latest','path','start','includes','Step\x201/7:\x20Config\x20migration\x20—\x20','already\x20exists\x20(will\x20merge)','values','@lovrabet/sdk','lovrabet/rabetbase','Clean\x20MCP\x20config','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','no\x20matching\x20entry\x20found','fields','args','===\x20Upgrade\x20Summary\x20===','message','info','oldArtifacts','\x20\x20Action:\x20delete','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','not\x20found\x20or\x20already\x20at\x20latest','\x20\x20Current\x20version\x20in\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','entries','needed','\x20removed','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','succeed','sdkUpgrade','Upgrade\x20@lovrabet/sdk','utf8','FAIL','join','detail','yellow','Remove\x20.lovrabet/','removed\x20','Remove\x20legacy\x20artifacts','\x20\x20\x20\x20\x20\x20\x20','not\x20needed','\x20\x20Fields\x20to\x20migrate:\x20','done','keys','Skill\x20swap:','step','object','.bak','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','cyan','log','no\x20legacy\x20config\x20found','inherit','exit\x20','green','Config\x20migration','length','\x20\x20#\x20or','Step\x206/7:\x20Installing\x20new\x20skill...','\x20from\x20','status','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','Legacy\x20artifacts:','mcpServers','files','.cursor/mcp.json','configMigration','Step\x205/7:\x20Removing\x20old\x20skill...','parse','FOUND','@lovrabet/dataset-mcp-server','isDirectory','string','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Upgrade\x20cancelled.','6884172OiTqyt','5104749OfmeUw','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','4NEFHuf','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','filter','\x20\x20Step\x20','\x20(backup:\x20','.claude/skills/lovrabet','2242622jPFeJM','yes','oldMcpConfig','push','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','skipped'];a173_0x5241=function(){return _0x3a92e3;};return a173_0x5241();}function execConfigMigration(_0x4a3f5e,_0x3dc256){const _0x184516=a173_0x1421ab,{configMigration:_0x101c5f}=_0x4a3f5e;if(!_0x101c5f?.[_0x184516(0x13e)])return{'step':0x1,'label':_0x184516(0x183),'ok':!![],'detail':_0x184516(0x1ad)};const _0x58a8bd=readConfigFile(_0x101c5f[_0x184516(0x13e)]),_0x250e1b=resolve(_0x3dc256,NEW_CONFIG_NAME),_0x5ce726=_0x101c5f['hasNewConfig']?readConfigFile(_0x250e1b):{};for(const [_0x5dac93,_0x44444e]of Object[_0x184516(0x163)](_0x58a8bd)){!(_0x5dac93 in _0x5ce726)&&(_0x5ce726[_0x5dac93]=_0x44444e);}writeConfigFile(_0x250e1b,_0x5ce726);const _0x2dc055=_0x101c5f['oldPath']+_0x184516(0x17a);return renameSync(_0x101c5f[_0x184516(0x13e)],_0x2dc055),{'step':0x1,'label':_0x184516(0x183),'ok':!![],'detail':_0x101c5f['oldPath']+_0x184516(0x145)+_0x250e1b+_0x184516(0x19e)+_0x2dc055+')'};}function execRemoveOldArtifacts(_0x35d54c){const _0x3af44f=a173_0x1421ab,_0x53a2e9=[];for(const _0x1bfbc1 of _0x35d54c){try{if(!existsSync(_0x1bfbc1))continue;const _0x29499b=tryStat(_0x1bfbc1);_0x29499b?.[_0x3af44f(0x193)]()?rmSync(_0x1bfbc1,{'recursive':!![],'force':!![]}):unlinkSync(_0x1bfbc1);}catch(_0xcd93f5){_0x53a2e9[_0x3af44f(0x1a3)](_0x1bfbc1+':\x20'+_0xcd93f5[_0x3af44f(0x15a)]);}}return{'step':0x3,'label':_0x3af44f(0x171),'ok':_0x53a2e9[_0x3af44f(0x184)]===0x0,'detail':_0x53a2e9['length']>0x0?_0x35d54c[_0x3af44f(0x184)]-_0x53a2e9['length']+'/'+_0x35d54c[_0x3af44f(0x184)]+'\x20removed\x20('+_0x53a2e9[_0x3af44f(0x16c)](';\x20')+')':_0x35d54c[_0x3af44f(0x184)]+_0x3af44f(0x165)};}function execCleanMcp(_0x2d6361){const _0x456319=a173_0x1421ab;if(!_0x2d6361[_0x456319(0x1a2)])return{'step':0x4,'label':_0x456319(0x154),'ok':!![],'detail':_0x456319(0x1a5)};try{const _0x5613e3=readFileSync(_0x2d6361[_0x456319(0x1a2)][_0x456319(0x14c)],_0x456319(0x16a)),_0x13c8a3=JSON['parse'](_0x5613e3);if(_0x13c8a3?.[_0x456319(0x18b)]&&typeof _0x13c8a3[_0x456319(0x18b)]===_0x456319(0x179)){const _0x462ab0=[];for(const [_0x4ba75e,_0x204745]of Object[_0x456319(0x163)](_0x13c8a3[_0x456319(0x18b)])){_0x204745?.['args']&&Array['isArray'](_0x204745[_0x456319(0x158)])&&_0x204745[_0x456319(0x158)]['some'](_0x90914f=>typeof _0x90914f===_0x456319(0x194)&&_0x90914f[_0x456319(0x14e)]('@lovrabet/dataset-mcp-server'))&&_0x462ab0[_0x456319(0x1a3)](_0x4ba75e);}for(const _0x4f386f of _0x462ab0){delete _0x13c8a3[_0x456319(0x18b)][_0x4f386f];}return _0x462ab0[_0x456319(0x184)]>0x0&&writeFileSync(_0x2d6361['oldMcpConfig'][_0x456319(0x14c)],JSON[_0x456319(0x12e)](_0x13c8a3,null,0x2)+'\x0a',_0x456319(0x16a)),{'step':0x4,'label':_0x456319(0x154),'ok':!![],'detail':_0x456319(0x170)+_0x462ab0[_0x456319(0x16c)](',\x20')+_0x456319(0x187)+_0x2d6361['oldMcpConfig']['path']};}return{'step':0x4,'label':_0x456319(0x154),'ok':!![],'detail':_0x456319(0x156)};}catch(_0x4ff471){return{'step':0x4,'label':_0x456319(0x154),'ok':![],'detail':_0x4ff471[_0x456319(0x15a)]};}}function execSkillsRemove(_0x58afc1,_0x56c7ab){const _0x11fac1=a173_0x1421ab,_0x466470=runNpxSkillsRemove(_0x58afc1,{'stdio':_0x11fac1(0x180),'yes':_0x56c7ab});return{'step':0x5,'label':_0x11fac1(0x147),'ok':_0x466470['ok'],'detail':_0x466470['ok']?_0x11fac1(0x1af):_0x466470[_0x11fac1(0x140)]??'exit\x20'+_0x466470[_0x11fac1(0x188)]};}function execSkillsAdd(_0x3b6a49,_0x2e8996){const _0x10a9ca=a173_0x1421ab,_0x5ecec8=runNpxSkillsAddGlobal(_0x3b6a49,_0x10a9ca(0x153),{'stdio':'inherit','yes':_0x2e8996});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x5ecec8['ok'],'detail':_0x5ecec8['ok']?_0x10a9ca(0x144):_0x5ecec8[_0x10a9ca(0x140)]??_0x10a9ca(0x181)+_0x5ecec8[_0x10a9ca(0x188)]};}function execUpgradeSdk(_0xad293f){const _0x358f14=a173_0x1421ab;if(!_0xad293f[_0x358f14(0x168)])return{'step':0x7,'label':_0x358f14(0x169),'ok':!![],'detail':_0x358f14(0x166)};const {pkgPath:_0x50e1e7,currentVersion:_0x307675,field:_0x476824}=_0xad293f['sdkUpgrade'];try{const _0x37c152=readFileSync(_0x50e1e7,_0x358f14(0x16a)),_0x355eaf=JSON[_0x358f14(0x190)](_0x37c152);return _0x355eaf[_0x476824][_0x358f14(0x152)]=_0x358f14(0x14b),writeFileSync(_0x50e1e7,JSON[_0x358f14(0x12e)](_0x355eaf,null,0x2)+'\x0a',_0x358f14(0x16a)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x476824+_0x358f14(0x139)+_0x307675+_0x358f14(0x136)};}catch(_0x4b79e5){return{'step':0x7,'label':_0x358f14(0x169),'ok':![],'detail':_0x4b79e5['message']};}}function tryStat(_0x3a34c9){try{return statSync(_0x3a34c9);}catch{return undefined;}}function printSummary(_0xdb28f4){const _0x2f7386=a173_0x1421ab;console[_0x2f7386(0x17e)](''),console['log'](a173_0x465c40['bold'](_0x2f7386(0x159))),console[_0x2f7386(0x17e)]('');for(const _0xe26325 of _0xdb28f4){const _0x1634df=_0xe26325['ok']?a173_0x465c40['green']('OK'):a173_0x465c40[_0x2f7386(0x1b0)](_0x2f7386(0x16b));console[_0x2f7386(0x17e)]('\x20\x20'+_0x1634df+_0x2f7386(0x19d)+_0xe26325[_0x2f7386(0x178)]+':\x20'+_0xe26325[_0x2f7386(0x13d)]);if(_0xe26325[_0x2f7386(0x16d)])console['log'](_0x2f7386(0x172)+a173_0x465c40[_0x2f7386(0x135)](_0xe26325[_0x2f7386(0x16d)]));}console['log']('');}export async function upgradeApp(_0x3ad49c,_0x17cbe6){const _0x2e5cc4=a173_0x1421ab,_0x521342=process[_0x2e5cc4(0x148)](),_0xe0d880=analyse(_0x521342),_0x20eb7f=!_0xe0d880[_0x2e5cc4(0x18e)]&&_0xe0d880[_0x2e5cc4(0x15c)]['length']===0x0&&!_0xe0d880[_0x2e5cc4(0x1a2)]&&!_0xe0d880['needsSkillSwap']&&!_0xe0d880[_0x2e5cc4(0x168)];if(_0x20eb7f){console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x182)](_0x2e5cc4(0x19b)));return;}printReport(_0xe0d880);const _0x1be0c1=!!(_0x17cbe6[_0x2e5cc4(0x1a1)]||_0x17cbe6['Y']||_0x3ad49c);if(!_0x1be0c1)try{const _0x504561=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x504561){console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x135)](_0x2e5cc4(0x196)));return;}}catch(_0x2c27f5){if(_0x2c27f5?.[_0x2e5cc4(0x15a)]===_0x2e5cc4(0x133)){console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x135)]('Upgrade\x20cancelled.'));return;}throw _0x2c27f5;}const _0x368903=[],_0x4cfc32=a173_0x9eba5e({'text':'Step\x201/7:\x20Migrating\x20config...','color':'cyan'})[_0x2e5cc4(0x14d)](),_0x1dd371=execConfigMigration(_0xe0d880,_0x521342);_0x368903[_0x2e5cc4(0x1a3)](_0x1dd371),_0x4cfc32[_0x1dd371['ok']?'succeed':_0x2e5cc4(0x132)](_0x2e5cc4(0x14f)+(_0x1dd371['detail']??(_0x1dd371['ok']?_0x2e5cc4(0x175):_0x2e5cc4(0x14a))));const _0xae779d=resolve(_0x521342,'.lovrabet'),_0x820f54=a173_0x9eba5e({'text':_0x2e5cc4(0x189),'color':'cyan'})[_0x2e5cc4(0x14d)]();if(existsSync(_0xae779d))try{rmSync(_0xae779d,{'recursive':!![],'force':!![]}),_0x820f54[_0x2e5cc4(0x167)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x368903[_0x2e5cc4(0x1a3)]({'step':0x2,'label':_0x2e5cc4(0x16f),'ok':!![]});}catch(_0x29062d){_0x820f54[_0x2e5cc4(0x132)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x29062d[_0x2e5cc4(0x15a)]),_0x368903[_0x2e5cc4(0x1a3)]({'step':0x2,'label':_0x2e5cc4(0x16f),'ok':![],'detail':_0x29062d[_0x2e5cc4(0x15a)]});}else _0x820f54[_0x2e5cc4(0x15b)](_0x2e5cc4(0x15f)),_0x368903[_0x2e5cc4(0x1a3)]({'step':0x2,'label':_0x2e5cc4(0x16f),'ok':!![],'detail':_0x2e5cc4(0x1a5)});const _0x2b7e01=a173_0x9eba5e({'text':_0x2e5cc4(0x17b),'color':_0x2e5cc4(0x17d)})[_0x2e5cc4(0x14d)](),_0x3314b7=execRemoveOldArtifacts(_0xe0d880[_0x2e5cc4(0x15c)]);_0x368903[_0x2e5cc4(0x1a3)](_0x3314b7),_0x2b7e01[_0x3314b7['ok']?_0x2e5cc4(0x167):_0x2e5cc4(0x132)](_0x2e5cc4(0x17c)+(_0x3314b7['detail']??(_0x3314b7['ok']?_0x2e5cc4(0x175):'failed')));const _0x18501d=a173_0x9eba5e({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':_0x2e5cc4(0x17d)})['start'](),_0x1ef283=execCleanMcp(_0xe0d880);_0x368903['push'](_0x1ef283),_0x18501d[_0x1ef283['ok']?'succeed':_0x2e5cc4(0x132)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x1ef283[_0x2e5cc4(0x16d)]??(_0x1ef283['ok']?'done':_0x2e5cc4(0x14a))));const _0x3284a4=a173_0x9eba5e({'text':_0x2e5cc4(0x18f),'color':'cyan'})[_0x2e5cc4(0x14d)](),_0x207ca5=execSkillsRemove(_0x521342,_0x1be0c1);_0x368903[_0x2e5cc4(0x1a3)](_0x207ca5),_0x3284a4[_0x207ca5['ok']?_0x2e5cc4(0x167):'fail'](_0x2e5cc4(0x15e)+(_0x207ca5[_0x2e5cc4(0x16d)]??(_0x207ca5['ok']?'done':_0x2e5cc4(0x14a))));const _0x5e9662=a173_0x9eba5e({'text':_0x2e5cc4(0x186),'color':_0x2e5cc4(0x17d)})[_0x2e5cc4(0x14d)](),_0x2bcd34=execSkillsAdd(_0x521342,_0x1be0c1);_0x368903[_0x2e5cc4(0x1a3)](_0x2bcd34),_0x5e9662[_0x2bcd34['ok']?_0x2e5cc4(0x167):_0x2e5cc4(0x132)](_0x2e5cc4(0x162)+(_0x2bcd34['detail']??(_0x2bcd34['ok']?_0x2e5cc4(0x175):_0x2e5cc4(0x14a))));const _0x30b3fc=a173_0x9eba5e({'text':_0x2e5cc4(0x142),'color':_0x2e5cc4(0x17d)})[_0x2e5cc4(0x14d)](),_0x316cd6=execUpgradeSdk(_0xe0d880);_0x368903[_0x2e5cc4(0x1a3)](_0x316cd6),_0x30b3fc[_0x316cd6['ok']?_0x2e5cc4(0x167):_0x2e5cc4(0x132)](_0x2e5cc4(0x155)+(_0x316cd6[_0x2e5cc4(0x16d)]??(_0x316cd6['ok']?_0x2e5cc4(0x175):_0x2e5cc4(0x14a)))),printSummary(_0x368903);const _0x205d2e=_0x368903['some'](_0x151b0e=>!_0x151b0e['ok']);_0x205d2e?console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x16e)](_0x2e5cc4(0x199))):console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x182)](_0x2e5cc4(0x1ab))),_0x316cd6['ok']&&_0xe0d880[_0x2e5cc4(0x168)]&&(console[_0x2e5cc4(0x17e)](''),console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x146)][_0x2e5cc4(0x17d)](_0x2e5cc4(0x1a4))),console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x17d)](_0x2e5cc4(0x195))),console[_0x2e5cc4(0x17e)](''),console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x1aa)](_0x2e5cc4(0x1ae))),console['log'](a173_0x465c40[_0x2e5cc4(0x1aa)](_0x2e5cc4(0x185))),console[_0x2e5cc4(0x17e)](a173_0x465c40['white'](_0x2e5cc4(0x1ac))),console[_0x2e5cc4(0x17e)](''));}
|
|
1
|
+
const a171_0x1c3eef=a171_0xfc62;(function(_0x34d017,_0x41bcb4){const _0x23dc99=a171_0xfc62,_0x22ad99=_0x34d017();while(!![]){try{const _0x561f17=-parseInt(_0x23dc99(0x18d))/0x1+-parseInt(_0x23dc99(0x1ba))/0x2*(parseInt(_0x23dc99(0x1b0))/0x3)+-parseInt(_0x23dc99(0x1cd))/0x4+-parseInt(_0x23dc99(0x18b))/0x5+-parseInt(_0x23dc99(0x18f))/0x6+parseInt(_0x23dc99(0x1bb))/0x7+parseInt(_0x23dc99(0x172))/0x8;if(_0x561f17===_0x41bcb4)break;else _0x22ad99['push'](_0x22ad99['shift']());}catch(_0x1335f7){_0x22ad99['push'](_0x22ad99['shift']());}}}(a171_0x1bed,0x4ab87));import a171_0x344141 from'chalk';import a171_0x486e3f from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';function a171_0x1bed(){const _0x34f9f2=['@lovrabet/dataset-mcp-server','Install\x20new\x20skill','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','log','Config\x20migration','\x20\x20Fields\x20to\x20migrate:\x20','step','\x20→\x20keys:\x20','oldMcpConfig','keys','oldArtifacts','entries','needsSkillSwap','\x20(backup:\x20','Clean\x20MCP\x20config','none\x20found','gray','message','12639792fUzeBM','parse','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','Legacy\x20artifacts:','bold','green','@lovrabet/sdk:','Step\x201/7:\x20Config\x20migration\x20—\x20','skipped\x20(no\x20legacy\x20config)','skipped','files','\x20\x20Step\x20','Remove\x20legacy\x20artifacts','.cursor/rules/lovrabet_rules.mdc','fail','\x20removed\x20(','Config\x20file:','succeed','removed\x20','some','not\x20found\x20or\x20already\x20at\x20latest','includes','\x20\x20#\x20or','no\x20matching\x20entry\x20found','white','2728940nTFiQv','\x20→\x20','486551xSDrdV','.lovrabet','762228NkosSD','needed','red','MCP\x20config:','cyan','hasNewConfig','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','\x20→\x20latest','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','yellow','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Step\x206/7:\x20Installing\x20new\x20skill...','\x20removed','status','\x20\x20New\x20config\x20(.rabetbase.json):\x20','join','configMigration','detail','isArray','@lovrabet/sdk','latest','.lovrabetrc','done','cwd','object','exit\x20','Remove\x20old\x20skill','\x20from\x20','start','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','===\x20Upgrade\x20Analysis\x20===','.lovrabet.json','69483kYisnX','sdkUpgrade','push','error','Upgrade\x20@lovrabet/sdk','oldPath','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','FAIL','lovrabet/rabetbase\x20installed\x20globally','length','50iEDMNc','3732757uJDPzT','lovrabet/lovrabet-skill\x20removed','Step\x204/7:\x20Cleaning\x20MCP\x20config...','Step\x204/7:\x20MCP\x20config\x20—\x20','path','undefined','failed','utf8','string','stringify','fields','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','inherit','[\x22@lovrabet/sdk\x22]:\x20','\x20\x20npm\x20install','label','Step\x201/7:\x20Migrating\x20config...','mcpServers','275072soZjhb','Upgrade\x20cancelled.','\x20\x20Current\x20version\x20in\x20','not\x20needed','args','\x20\x20bun\x20install','not\x20found\x20(will\x20create)','Remove\x20.lovrabet/','package.json','no\x20legacy\x20entry','FOUND','\x20\x20\x20\x20\x20\x20\x20'];a171_0x1bed=function(){return _0x34f9f2;};return a171_0x1bed();}import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=[a171_0x1c3eef(0x1af),a171_0x1c3eef(0x1a5)];function collectIdeSkillFiles(_0x2330c5){const _0x13dd10=a171_0x1c3eef,_0x5e0312=[];for(const _0x12fbeb of Object['values'](CORE_IDE_CONFIGS)){if(_0x12fbeb[_0x13dd10(0x17c)])for(const _0x728938 of _0x12fbeb['files']){_0x5e0312[_0x13dd10(0x1b2)](resolve(_0x2330c5,_0x728938[_0x13dd10(0x1bf)]));}}return _0x5e0312;}function analyse(_0x595eba){const _0x2aaf04=a171_0x1c3eef;let _0x4bc67a=null;const _0x3205b3=resolve(_0x595eba,NEW_CONFIG_NAME),_0x17dab0=existsSync(_0x3205b3);for(const _0x3f7e66 of LEGACY_CONFIG_NAMES){const _0x368bd9=resolve(_0x595eba,_0x3f7e66);if(existsSync(_0x368bd9)){const _0x555c3a=readConfigFile(_0x368bd9),_0x4101ac=Object[_0x2aaf04(0x169)](_0x555c3a)['filter'](_0x4daf7e=>typeof _0x555c3a[_0x4daf7e]!==_0x2aaf04(0x1c0));_0x4bc67a={'oldPath':_0x368bd9,'hasNewConfig':_0x17dab0,'fields':_0x4101ac};break;}}const _0x4e9486=[],_0x48a69d=resolve(_0x595eba,_0x2aaf04(0x18e));if(existsSync(_0x48a69d))_0x4e9486[_0x2aaf04(0x1b2)](_0x48a69d);const _0x4d1427=resolve(_0x595eba,_0x2aaf04(0x17f));if(existsSync(_0x4d1427))_0x4e9486['push'](_0x4d1427);const _0x14b8dd=resolve(_0x595eba,'.claude/skills/lovrabet');if(existsSync(_0x14b8dd))_0x4e9486[_0x2aaf04(0x1b2)](_0x14b8dd);for(const _0x5d041d of collectIdeSkillFiles(_0x595eba)){if(existsSync(_0x5d041d))_0x4e9486[_0x2aaf04(0x1b2)](_0x5d041d);}let _0xdd3edd=null;const _0x1c9862=resolve(_0x595eba,'.cursor/mcp.json');if(existsSync(_0x1c9862))try{const _0x395c38=JSON[_0x2aaf04(0x173)](readFileSync(_0x1c9862,_0x2aaf04(0x1c2)));if(_0x395c38?.[_0x2aaf04(0x1cc)]&&typeof _0x395c38['mcpServers']===_0x2aaf04(0x1a8)){const _0xf0edb9=[];for(const [_0x471537,_0x5afc60]of Object[_0x2aaf04(0x16b)](_0x395c38['mcpServers'])){const _0x2e6c1d=_0x5afc60;_0x2e6c1d?.[_0x2aaf04(0x1d1)]&&Array[_0x2aaf04(0x1a2)](_0x2e6c1d[_0x2aaf04(0x1d1)])&&_0x2e6c1d['args']['some'](_0x3c8373=>typeof _0x3c8373===_0x2aaf04(0x1c3)&&_0x3c8373['includes'](_0x2aaf04(0x1d9)))&&_0xf0edb9[_0x2aaf04(0x1b2)](_0x471537);}_0xf0edb9[_0x2aaf04(0x1b9)]>0x0&&(_0xdd3edd={'path':_0x1c9862,'keys':_0xf0edb9});}}catch{}const _0x3ae33f=_0x4e9486[_0x2aaf04(0x1b9)]>0x0||_0x4bc67a!==null;let _0x2393a8=null;const _0x496260=resolve(_0x595eba,_0x2aaf04(0x1d5));if(existsSync(_0x496260))try{const _0x4e5aea=JSON[_0x2aaf04(0x173)](readFileSync(_0x496260,_0x2aaf04(0x1c2)));for(const _0xcdb6e3 of['dependencies','devDependencies']){const _0x51eebc=_0x4e5aea?.[_0xcdb6e3]?.[_0x2aaf04(0x1a3)];if(typeof _0x51eebc===_0x2aaf04(0x1c3)){_0x51eebc!=='latest'&&(_0x2393a8={'pkgPath':_0x496260,'currentVersion':_0x51eebc,'field':_0xcdb6e3});break;}}}catch{}return{'configMigration':_0x4bc67a,'oldArtifacts':_0x4e9486,'oldMcpConfig':_0xdd3edd,'needsSkillSwap':_0x3ae33f,'sdkUpgrade':_0x2393a8};}function printReport(_0x19faf6){const _0x32263d=a171_0x1c3eef,{configMigration:_0x14f044,oldArtifacts:_0x451853,oldMcpConfig:_0x58d49b,needsSkillSwap:_0x3c5372}=_0x19faf6;console[_0x32263d(0x1dd)](''),console[_0x32263d(0x1dd)](a171_0x344141[_0x32263d(0x176)](_0x32263d(0x1ae))),console['log']('');_0x14f044?(console[_0x32263d(0x1dd)](a171_0x344141[_0x32263d(0x193)](_0x32263d(0x182))+('\x20\x20'+a171_0x344141[_0x32263d(0x199)](_0x14f044[_0x32263d(0x1b5)]))),console['log'](_0x32263d(0x19e)+(_0x14f044[_0x32263d(0x194)]?a171_0x344141[_0x32263d(0x177)]('already\x20exists\x20(will\x20merge)'):a171_0x344141[_0x32263d(0x170)](_0x32263d(0x1d3)))),console[_0x32263d(0x1dd)](_0x32263d(0x165)+_0x14f044[_0x32263d(0x1c5)][_0x32263d(0x19f)](',\x20')),console['log']('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x32263d(0x1dd)](a171_0x344141[_0x32263d(0x193)](_0x32263d(0x182))+'\x20\x20'+a171_0x344141[_0x32263d(0x170)]('no\x20legacy\x20config\x20found'));console[_0x32263d(0x1dd)]('');if(_0x451853[_0x32263d(0x1b9)]>0x0){console[_0x32263d(0x1dd)](a171_0x344141['cyan'](_0x32263d(0x175)));for(const _0x57b2cd of _0x451853){console[_0x32263d(0x1dd)]('\x20\x20'+a171_0x344141[_0x32263d(0x191)](_0x32263d(0x1d7))+'\x20\x20'+_0x57b2cd);}console[_0x32263d(0x1dd)]('\x20\x20Action:\x20delete');}else console['log'](a171_0x344141[_0x32263d(0x193)]('Legacy\x20artifacts:')+'\x20\x20'+a171_0x344141['gray'](_0x32263d(0x16f)));console[_0x32263d(0x1dd)]('');_0x58d49b?(console[_0x32263d(0x1dd)](a171_0x344141[_0x32263d(0x193)]('MCP\x20config:')+('\x20\x20'+a171_0x344141[_0x32263d(0x199)](_0x58d49b[_0x32263d(0x1bf)])+_0x32263d(0x167)+_0x58d49b[_0x32263d(0x169)]['join'](',\x20'))),console[_0x32263d(0x1dd)](_0x32263d(0x1dc))):console[_0x32263d(0x1dd)](a171_0x344141[_0x32263d(0x193)](_0x32263d(0x192))+'\x20\x20'+a171_0x344141[_0x32263d(0x170)](_0x32263d(0x1d6)));console[_0x32263d(0x1dd)](''),console[_0x32263d(0x1dd)](a171_0x344141[_0x32263d(0x193)]('Skill\x20swap:')+('\x20\x20'+(_0x3c5372?a171_0x344141[_0x32263d(0x199)](_0x32263d(0x190)):a171_0x344141[_0x32263d(0x177)](_0x32263d(0x1d0)))));_0x3c5372&&console['log'](_0x32263d(0x198)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x32263d(0x1dd)]('');if(_0x19faf6[_0x32263d(0x1b1)]){const {currentVersion:_0x1c9af7,field:_0x3462a4,pkgPath:_0x8a074c}=_0x19faf6[_0x32263d(0x1b1)];console[_0x32263d(0x1dd)](a171_0x344141[_0x32263d(0x193)]('@lovrabet/sdk:')+('\x20\x20'+a171_0x344141[_0x32263d(0x199)](_0x8a074c))),console[_0x32263d(0x1dd)](_0x32263d(0x1cf)+_0x3462a4+':\x20'+a171_0x344141[_0x32263d(0x199)](_0x1c9af7)+_0x32263d(0x18c)+a171_0x344141[_0x32263d(0x177)]('latest')),console[_0x32263d(0x1dd)](_0x32263d(0x197));}else console[_0x32263d(0x1dd)](a171_0x344141[_0x32263d(0x193)](_0x32263d(0x178))+'\x20\x20'+a171_0x344141[_0x32263d(0x170)](_0x32263d(0x186)));console[_0x32263d(0x1dd)]('');}function execConfigMigration(_0x1cdf46,_0x3d679b){const _0x2c4eb2=a171_0x1c3eef,{configMigration:_0x581bed}=_0x1cdf46;if(!_0x581bed?.[_0x2c4eb2(0x1b5)])return{'step':0x1,'label':_0x2c4eb2(0x1de),'ok':!![],'detail':_0x2c4eb2(0x17a)};const _0x48e391=readConfigFile(_0x581bed[_0x2c4eb2(0x1b5)]),_0x4d37a7=resolve(_0x3d679b,NEW_CONFIG_NAME),_0x50b669=_0x581bed[_0x2c4eb2(0x194)]?readConfigFile(_0x4d37a7):{};for(const [_0x50a3ed,_0x44eb4c]of Object['entries'](_0x48e391)){!(_0x50a3ed in _0x50b669)&&(_0x50b669[_0x50a3ed]=_0x44eb4c);}writeConfigFile(_0x4d37a7,_0x50b669);const _0x3098fc=_0x581bed[_0x2c4eb2(0x1b5)]+'.bak';return renameSync(_0x581bed[_0x2c4eb2(0x1b5)],_0x3098fc),{'step':0x1,'label':_0x2c4eb2(0x1de),'ok':!![],'detail':_0x581bed[_0x2c4eb2(0x1b5)]+_0x2c4eb2(0x18c)+_0x4d37a7+_0x2c4eb2(0x16d)+_0x3098fc+')'};}function execRemoveOldArtifacts(_0x29dfec){const _0x49a4d4=a171_0x1c3eef,_0xc86445=[];for(const _0x1a099e of _0x29dfec){try{if(!existsSync(_0x1a099e))continue;const _0x3a6c93=tryStat(_0x1a099e);_0x3a6c93?.['isDirectory']()?rmSync(_0x1a099e,{'recursive':!![],'force':!![]}):unlinkSync(_0x1a099e);}catch(_0x41c33a){_0xc86445[_0x49a4d4(0x1b2)](_0x1a099e+':\x20'+_0x41c33a['message']);}}return{'step':0x3,'label':_0x49a4d4(0x17e),'ok':_0xc86445[_0x49a4d4(0x1b9)]===0x0,'detail':_0xc86445[_0x49a4d4(0x1b9)]>0x0?_0x29dfec[_0x49a4d4(0x1b9)]-_0xc86445[_0x49a4d4(0x1b9)]+'/'+_0x29dfec['length']+_0x49a4d4(0x181)+_0xc86445['join'](';\x20')+')':_0x29dfec[_0x49a4d4(0x1b9)]+_0x49a4d4(0x19c)};}function execCleanMcp(_0x44ddeb){const _0xf4c0ae=a171_0x1c3eef;if(!_0x44ddeb[_0xf4c0ae(0x168)])return{'step':0x4,'label':_0xf4c0ae(0x16e),'ok':!![],'detail':_0xf4c0ae(0x17b)};try{const _0x3b1f85=readFileSync(_0x44ddeb[_0xf4c0ae(0x168)]['path'],_0xf4c0ae(0x1c2)),_0x59dbe6=JSON[_0xf4c0ae(0x173)](_0x3b1f85);if(_0x59dbe6?.[_0xf4c0ae(0x1cc)]&&typeof _0x59dbe6[_0xf4c0ae(0x1cc)]===_0xf4c0ae(0x1a8)){const _0x317c53=[];for(const [_0x367125,_0x2dedff]of Object[_0xf4c0ae(0x16b)](_0x59dbe6[_0xf4c0ae(0x1cc)])){_0x2dedff?.['args']&&Array[_0xf4c0ae(0x1a2)](_0x2dedff[_0xf4c0ae(0x1d1)])&&_0x2dedff[_0xf4c0ae(0x1d1)][_0xf4c0ae(0x185)](_0x399e32=>typeof _0x399e32===_0xf4c0ae(0x1c3)&&_0x399e32[_0xf4c0ae(0x187)](_0xf4c0ae(0x1d9)))&&_0x317c53[_0xf4c0ae(0x1b2)](_0x367125);}for(const _0x5b8f98 of _0x317c53){delete _0x59dbe6[_0xf4c0ae(0x1cc)][_0x5b8f98];}return _0x317c53[_0xf4c0ae(0x1b9)]>0x0&&writeFileSync(_0x44ddeb['oldMcpConfig']['path'],JSON[_0xf4c0ae(0x1c4)](_0x59dbe6,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0xf4c0ae(0x16e),'ok':!![],'detail':_0xf4c0ae(0x184)+_0x317c53['join'](',\x20')+_0xf4c0ae(0x1ab)+_0x44ddeb[_0xf4c0ae(0x168)][_0xf4c0ae(0x1bf)]};}return{'step':0x4,'label':_0xf4c0ae(0x16e),'ok':!![],'detail':_0xf4c0ae(0x189)};}catch(_0x55f515){return{'step':0x4,'label':_0xf4c0ae(0x16e),'ok':![],'detail':_0x55f515[_0xf4c0ae(0x171)]};}}function execSkillsRemove(_0x56df0d,_0x24a0c0){const _0x3c2e7b=a171_0x1c3eef,_0x108e94=runNpxSkillsRemove(_0x56df0d,{'stdio':_0x3c2e7b(0x1c7),'yes':_0x24a0c0});return{'step':0x5,'label':_0x3c2e7b(0x1aa),'ok':_0x108e94['ok'],'detail':_0x108e94['ok']?_0x3c2e7b(0x1bc):_0x108e94[_0x3c2e7b(0x1b3)]??'exit\x20'+_0x108e94[_0x3c2e7b(0x19d)]};}function execSkillsAdd(_0x165c75,_0x34185f){const _0x1b9d6a=a171_0x1c3eef,_0x29d406=runNpxSkillsAddGlobal(_0x165c75,'lovrabet/rabetbase',{'stdio':'inherit','yes':_0x34185f});return{'step':0x6,'label':_0x1b9d6a(0x1da),'ok':_0x29d406['ok'],'detail':_0x29d406['ok']?_0x1b9d6a(0x1b8):_0x29d406[_0x1b9d6a(0x1b3)]??_0x1b9d6a(0x1a9)+_0x29d406[_0x1b9d6a(0x19d)]};}function execUpgradeSdk(_0x373710){const _0x227704=a171_0x1c3eef;if(!_0x373710['sdkUpgrade'])return{'step':0x7,'label':_0x227704(0x1b4),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x3141c7,currentVersion:_0x6a33a,field:_0x3b83e1}=_0x373710[_0x227704(0x1b1)];try{const _0x1e8ec2=readFileSync(_0x3141c7,_0x227704(0x1c2)),_0x395b84=JSON[_0x227704(0x173)](_0x1e8ec2);return _0x395b84[_0x3b83e1][_0x227704(0x1a3)]=_0x227704(0x1a4),writeFileSync(_0x3141c7,JSON['stringify'](_0x395b84,null,0x2)+'\x0a',_0x227704(0x1c2)),{'step':0x7,'label':_0x227704(0x1b4),'ok':!![],'detail':_0x3b83e1+_0x227704(0x1c8)+_0x6a33a+_0x227704(0x196)};}catch(_0x2fdbf0){return{'step':0x7,'label':_0x227704(0x1b4),'ok':![],'detail':_0x2fdbf0['message']};}}function tryStat(_0x16d875){try{return statSync(_0x16d875);}catch{return undefined;}}function a171_0xfc62(_0x105f7c,_0x4b54ba){_0x105f7c=_0x105f7c-0x165;const _0x1bed93=a171_0x1bed();let _0xfc62ee=_0x1bed93[_0x105f7c];return _0xfc62ee;}function printSummary(_0x3cfd51){const _0x115442=a171_0x1c3eef;console['log'](''),console[_0x115442(0x1dd)](a171_0x344141[_0x115442(0x176)]('===\x20Upgrade\x20Summary\x20===')),console['log']('');for(const _0x21e564 of _0x3cfd51){const _0x4631e8=_0x21e564['ok']?a171_0x344141[_0x115442(0x177)]('OK'):a171_0x344141[_0x115442(0x191)](_0x115442(0x1b7));console[_0x115442(0x1dd)]('\x20\x20'+_0x4631e8+_0x115442(0x17d)+_0x21e564[_0x115442(0x166)]+':\x20'+_0x21e564[_0x115442(0x1ca)]);if(_0x21e564[_0x115442(0x1a1)])console[_0x115442(0x1dd)](_0x115442(0x1d8)+a171_0x344141[_0x115442(0x170)](_0x21e564[_0x115442(0x1a1)]));}console[_0x115442(0x1dd)]('');}export async function upgradeApp(_0x391121,_0x304081){const _0x498188=a171_0x1c3eef,_0x38318b=process[_0x498188(0x1a7)](),_0x1ccf97=analyse(_0x38318b),_0x1fb7f7=!_0x1ccf97[_0x498188(0x1a0)]&&_0x1ccf97[_0x498188(0x16a)][_0x498188(0x1b9)]===0x0&&!_0x1ccf97[_0x498188(0x168)]&&!_0x1ccf97[_0x498188(0x16c)]&&!_0x1ccf97['sdkUpgrade'];if(_0x1fb7f7){console['log'](a171_0x344141['green']('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x1ccf97);const _0x118ccf=!!(_0x304081['yes']||_0x304081['Y']||_0x391121);if(!_0x118ccf)try{const _0x52a78a=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x52a78a){console[_0x498188(0x1dd)](a171_0x344141[_0x498188(0x170)]('Upgrade\x20cancelled.'));return;}}catch(_0x5ba0bc){if(_0x5ba0bc?.[_0x498188(0x171)]==='CANCEL'){console['log'](a171_0x344141[_0x498188(0x170)](_0x498188(0x1ce)));return;}throw _0x5ba0bc;}const _0x3d1d27=[],_0x1fd965=a171_0x486e3f({'text':_0x498188(0x1cb),'color':_0x498188(0x193)})[_0x498188(0x1ac)](),_0x35de33=execConfigMigration(_0x1ccf97,_0x38318b);_0x3d1d27[_0x498188(0x1b2)](_0x35de33),_0x1fd965[_0x35de33['ok']?_0x498188(0x183):_0x498188(0x180)](_0x498188(0x179)+(_0x35de33[_0x498188(0x1a1)]??(_0x35de33['ok']?_0x498188(0x1a6):_0x498188(0x1c1))));const _0x13949a=resolve(_0x38318b,_0x498188(0x18e)),_0x27cf6b=a171_0x486e3f({'text':_0x498188(0x174),'color':_0x498188(0x193)})[_0x498188(0x1ac)]();if(existsSync(_0x13949a))try{rmSync(_0x13949a,{'recursive':!![],'force':!![]}),_0x27cf6b[_0x498188(0x183)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x3d1d27['push']({'step':0x2,'label':_0x498188(0x1d4),'ok':!![]});}catch(_0x85e952){_0x27cf6b['fail']('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x85e952[_0x498188(0x171)]),_0x3d1d27[_0x498188(0x1b2)]({'step':0x2,'label':_0x498188(0x1d4),'ok':![],'detail':_0x85e952[_0x498188(0x171)]});}else _0x27cf6b['info'](_0x498188(0x1db)),_0x3d1d27['push']({'step':0x2,'label':_0x498188(0x1d4),'ok':!![],'detail':_0x498188(0x17b)});const _0x408020=a171_0x486e3f({'text':_0x498188(0x1ad),'color':_0x498188(0x193)})[_0x498188(0x1ac)](),_0x2b7678=execRemoveOldArtifacts(_0x1ccf97[_0x498188(0x16a)]);_0x3d1d27[_0x498188(0x1b2)](_0x2b7678),_0x408020[_0x2b7678['ok']?_0x498188(0x183):_0x498188(0x180)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x2b7678[_0x498188(0x1a1)]??(_0x2b7678['ok']?'done':'failed')));const _0x139ed6=a171_0x486e3f({'text':_0x498188(0x1bd),'color':_0x498188(0x193)})[_0x498188(0x1ac)](),_0xc225d=execCleanMcp(_0x1ccf97);_0x3d1d27['push'](_0xc225d),_0x139ed6[_0xc225d['ok']?'succeed':'fail'](_0x498188(0x1be)+(_0xc225d[_0x498188(0x1a1)]??(_0xc225d['ok']?'done':_0x498188(0x1c1))));const _0x4e2be9=a171_0x486e3f({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x498188(0x193)})[_0x498188(0x1ac)](),_0x39c588=execSkillsRemove(_0x38318b,_0x118ccf);_0x3d1d27[_0x498188(0x1b2)](_0x39c588),_0x4e2be9[_0x39c588['ok']?'succeed':_0x498188(0x180)](_0x498188(0x1c6)+(_0x39c588[_0x498188(0x1a1)]??(_0x39c588['ok']?'done':_0x498188(0x1c1))));const _0x2372c8=a171_0x486e3f({'text':_0x498188(0x19b),'color':_0x498188(0x193)})[_0x498188(0x1ac)](),_0x5f4794=execSkillsAdd(_0x38318b,_0x118ccf);_0x3d1d27['push'](_0x5f4794),_0x2372c8[_0x5f4794['ok']?_0x498188(0x183):_0x498188(0x180)](_0x498188(0x1b6)+(_0x5f4794[_0x498188(0x1a1)]??(_0x5f4794['ok']?'done':_0x498188(0x1c1))));const _0x31dd12=a171_0x486e3f({'text':_0x498188(0x195),'color':_0x498188(0x193)})[_0x498188(0x1ac)](),_0x5f4efe=execUpgradeSdk(_0x1ccf97);_0x3d1d27[_0x498188(0x1b2)](_0x5f4efe),_0x31dd12[_0x5f4efe['ok']?_0x498188(0x183):'fail']('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x5f4efe[_0x498188(0x1a1)]??(_0x5f4efe['ok']?'done':_0x498188(0x1c1)))),printSummary(_0x3d1d27);const _0x159f1e=_0x3d1d27['some'](_0xdd560c=>!_0xdd560c['ok']);_0x159f1e?console[_0x498188(0x1dd)](a171_0x344141[_0x498188(0x199)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x498188(0x1dd)](a171_0x344141[_0x498188(0x177)]('Upgrade\x20completed\x20successfully!')),_0x5f4efe['ok']&&_0x1ccf97['sdkUpgrade']&&(console[_0x498188(0x1dd)](''),console[_0x498188(0x1dd)](a171_0x344141[_0x498188(0x176)][_0x498188(0x193)](_0x498188(0x19a))),console[_0x498188(0x1dd)](a171_0x344141[_0x498188(0x193)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x498188(0x1dd)](''),console[_0x498188(0x1dd)](a171_0x344141['white'](_0x498188(0x1c9))),console[_0x498188(0x1dd)](a171_0x344141[_0x498188(0x18a)](_0x498188(0x188))),console[_0x498188(0x1dd)](a171_0x344141['white'](_0x498188(0x1d2))),console[_0x498188(0x1dd)](''));}
|
|
@@ -42,8 +42,8 @@ export interface ServiceEntry {
|
|
|
42
42
|
wildcardDef?: CommandDefinition;
|
|
43
43
|
/**
|
|
44
44
|
* 单命令 service 标记。
|
|
45
|
-
* true 时 help
|
|
46
|
-
*
|
|
45
|
+
* true 时 help 将服务显示为直接命令(如 rabetbase doctor),
|
|
46
|
+
* 而非子命令形式(如 rabetbase doctor run)。
|
|
47
47
|
*/
|
|
48
48
|
isSingleCommand?: boolean;
|
|
49
49
|
}
|