@lovrabet/rabetbase-cli 2.1.14-beta.2 → 2.2.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.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.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-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-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.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/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-create.js +1 -0
- package/lib/commands/dataset/relation-delete.js +1 -0
- package/lib/commands/dataset/relation-shared.js +1 -0
- package/lib/commands/dataset/relation-update.js +1 -0
- package/lib/commands/dataset/relations.js +1 -0
- package/lib/commands/dataset/rename.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.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/init/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/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.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/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/update.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 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.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/save.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/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/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-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.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/rules-cdn.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 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/lib/commands/dataset/link-create.js +0 -1
- package/lib/commands/dataset/link-delete.js +0 -1
- package/lib/commands/dataset/link-shared.js +0 -1
- package/lib/commands/dataset/link-update.js +0 -1
- package/lib/commands/dataset/links.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x52cee4,_0x221341){const _0xc4c8bc=a107_0x1fe3,_0x58f6e2=_0x52cee4();while(!![]){try{const _0x2bffea=-parseInt(_0xc4c8bc(0x18b))/0x1*(parseInt(_0xc4c8bc(0x16b))/0x2)+-parseInt(_0xc4c8bc(0x16c))/0x3*(parseInt(_0xc4c8bc(0x161))/0x4)+parseInt(_0xc4c8bc(0x18d))/0x5+-parseInt(_0xc4c8bc(0x162))/0x6*(-parseInt(_0xc4c8bc(0x190))/0x7)+-parseInt(_0xc4c8bc(0x17a))/0x8*(-parseInt(_0xc4c8bc(0x15e))/0x9)+parseInt(_0xc4c8bc(0x14b))/0xa+-parseInt(_0xc4c8bc(0x16a))/0xb;if(_0x2bffea===_0x221341)break;else _0x58f6e2['push'](_0x58f6e2['shift']());}catch(_0x5818f7){_0x58f6e2['push'](_0x58f6e2['shift']());}}}(a107_0xfb96,0x2f436));import a107_0x1dbfc7 from'path';import a107_0x4094a0 from'fs';import a107_0x5bc8bf from'chalk';import a107_0x3d88b6 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';function a107_0x1fe3(_0xae8397,_0x4fe2ae){_0xae8397=_0xae8397-0x140;const _0xfb9611=a107_0xfb96();let _0x1fe350=_0xfb9611[_0xae8397];return _0x1fe350;}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';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';function a107_0xfb96(){const _0x35a07f=['bold','package.json','minimumVersion','Project\x20name:\x20','accessSync','Project\x20directory\x20','开始创建项目:\x20','apps','parse','error','test','stableVersion','\x20model(s)','Project\x20name\x20cannot\x20be\x20empty','cyan','start','log','utf8','length','message','清理项目目录失败:\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','string','appCode','1785840ZHqEkE','stringify','Copy\x20project\x20files','info','...','setLogPath','\x20|\x20Default:\x20','\x20√\x20','配置应用AppCode失败','name','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','green','1.0.0','项目创建失败:\x20','projectCode','projectName','keys','belowMinimum','API\x20配置拉取异常','168471qKMDXX','√\x20package.json\x20updated:\x20name=','API\x20configuration\x20pulled:\x20','4iSEIzg','6dIaTFk','项目创建完成:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','constants','Install\x20dependencies','description','\x20|\x20AppCode:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','3719650RRyOMv','4314nnXKRx','228828GMdvlN','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','🚀\x20Next\x20Steps:','resolve','production','*\x20Configuring\x20AppCode\x20for\x20project\x20','needsUpgrade','stop','*\x20Pulling\x20API\x20configuration...','\x20dataset(s),\x20generated\x20','Format\x20code','readFileSync','repeat','modelCount','32xdmbnI','cookie','rmSync','\x20\x201.\x20Start\x20project:\x20','join','warn','\x20config\x20set\x20appcode\x20<app-code>\x27','√\x20Pulled\x20','create','trim','W_OK','\x20api\x20pull','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','cwd','\x20\x202.\x20Pull\x20API\x20configuration:\x20','writeFileSync','defaultApp','167GyRhIz','env','1772985OVZMFX','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','dirname','2521246AWvEYn'];a107_0xfb96=function(){return _0x35a07f;};return a107_0xfb96();}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';export async function createApp(_0x13cc34){const _0x62e3d=a107_0x1fe3,_0x4b46fe=await checkCliVersion();(_0x4b46fe[_0x62e3d(0x172)]||_0x4b46fe[_0x62e3d(0x15c)])&&(printCliUpgradeWarning(_0x4b46fe),assertCliVersionSupported(_0x4b46fe),logger[_0x62e3d(0x14e)](_0x62e3d(0x182),'CLI\x20版本检查',{'currentVersion':_0x4b46fe['currentVersion'],'stableVersion':_0x4b46fe[_0x62e3d(0x19c)],'minimumVersion':_0x4b46fe[_0x62e3d(0x193)],'needsUpgrade':_0x4b46fe[_0x62e3d(0x172)],'belowMinimum':_0x4b46fe[_0x62e3d(0x15c)]}));if(_0x13cc34[_0x62e3d(0x159)]&&_0x13cc34['appCode'])await runCreate({'projectName':_0x13cc34[_0x62e3d(0x159)],'appCode':_0x13cc34['appCode'],'env':_0x13cc34[_0x62e3d(0x18c)]},_0x13cc34);else{if(_0x13cc34[_0x62e3d(0x159)]){const _0x83466f=await selectSingleAppcode(_0x13cc34['cookie']);await runCreate({'projectName':_0x13cc34['projectCode'],'appCode':_0x83466f||undefined,'env':_0x13cc34['env']},_0x13cc34);}else await guidedCreateProject(_0x5278d=>runCreate(_0x5278d,_0x13cc34),_0x13cc34[_0x62e3d(0x18c)],_0x13cc34[_0x62e3d(0x17b)]);}}async function runCreate(_0x5b07bb,_0x43e4db){const _0x36e04c=a107_0x1fe3;if(!_0x5b07bb[_0x36e04c(0x15a)]||_0x5b07bb[_0x36e04c(0x15a)][_0x36e04c(0x183)]()==='')throw new Error(_0x36e04c(0x140));const _0x2842eb=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2842eb[_0x36e04c(0x19b)](_0x5b07bb[_0x36e04c(0x15a)]))throw new Error(_0x36e04c(0x148));if(_0x5b07bb[_0x36e04c(0x15a)][_0x36e04c(0x145)]>0x64)throw new Error(_0x36e04c(0x164));const _0xfec7d=a107_0x1dbfc7[_0x36e04c(0x16f)](process[_0x36e04c(0x187)](),_0x5b07bb[_0x36e04c(0x15a)]);if(a107_0x4094a0['existsSync'](_0xfec7d))throw new Error(_0x36e04c(0x196)+_0x5b07bb[_0x36e04c(0x15a)]+'\x20already\x20exists');try{a107_0x4094a0[_0x36e04c(0x195)](a107_0x1dbfc7[_0x36e04c(0x18f)](_0xfec7d),a107_0x4094a0[_0x36e04c(0x165)][_0x36e04c(0x184)]);}catch{throw new Error(_0x36e04c(0x18e));}logger[_0x36e04c(0x150)](_0xfec7d),logger['info'](_0x36e04c(0x182),_0x36e04c(0x197)+_0x5b07bb[_0x36e04c(0x15a)],{'projectDir':_0xfec7d,'appCode':_0x5b07bb[_0x36e04c(0x14a)]}),console['log'](),console[_0x36e04c(0x143)](a107_0x5bc8bf['green'](_0x36e04c(0x152))+_0x36e04c(0x194)+a107_0x5bc8bf[_0x36e04c(0x156)](_0x5b07bb[_0x36e04c(0x15a)])+(_0x5b07bb[_0x36e04c(0x14a)]?_0x36e04c(0x168)+a107_0x5bc8bf[_0x36e04c(0x141)](_0x5b07bb[_0x36e04c(0x14a)]):''));try{await runTask(_0x36e04c(0x14d),()=>copyProjectTemplate(_0x5b07bb[_0x36e04c(0x15a)])),await updatePackageJsonName(_0x5b07bb[_0x36e04c(0x15a)]),await runTask(_0x36e04c(0x166),()=>installDependencies(_0x5b07bb[_0x36e04c(0x15a)])),await runTask(_0x36e04c(0x176),()=>formatProjectCode(_0x5b07bb[_0x36e04c(0x15a)])),await configureAppCode(_0x5b07bb['projectName'],_0x5b07bb[_0x36e04c(0x14a)]||'',_0x5b07bb[_0x36e04c(0x18c)]);let _0x2c7162=![];if(_0x5b07bb['appCode']){console[_0x36e04c(0x143)](_0x36e04c(0x174));const _0x199e84=process['cwd']();try{process['chdir'](_0xfec7d);const _0x4eaae6=_0x5b07bb[_0x36e04c(0x18c)]||'production';initEnv(_0x4eaae6);const {configArray:_0x1cc850}=await fetchModelList(_0x5b07bb[_0x36e04c(0x14a)],_0x43e4db['cookie']||''),_0x28788f=DEFAULT_API_DIR,_0x330d42=await generateApiFile(_0x1cc850,'',_0x5b07bb[_0x36e04c(0x14a)],!![],_0x4eaae6,_0x28788f);console[_0x36e04c(0x143)](_0x36e04c(0x181)+_0x1cc850['length']+_0x36e04c(0x175)+_0x330d42[_0x36e04c(0x179)]+_0x36e04c(0x19d)),logger[_0x36e04c(0x14e)](_0x36e04c(0x182),_0x36e04c(0x160)+_0x5b07bb[_0x36e04c(0x14a)]);}catch(_0x3701e8){_0x2c7162=!![],console[_0x36e04c(0x143)](_0x36e04c(0x169)),logger[_0x36e04c(0x17f)](_0x36e04c(0x182),_0x36e04c(0x15d),{'error':_0x3701e8 instanceof Error?_0x3701e8[_0x36e04c(0x146)]:String(_0x3701e8)});}finally{process['chdir'](_0x199e84);}}logger['success']('create',_0x36e04c(0x163)+_0x5b07bb[_0x36e04c(0x15a)]),console[_0x36e04c(0x143)](),console[_0x36e04c(0x143)](a107_0x5bc8bf[_0x36e04c(0x156)]('─'[_0x36e04c(0x178)](0x3c))),console[_0x36e04c(0x143)](a107_0x5bc8bf[_0x36e04c(0x141)][_0x36e04c(0x191)](_0x36e04c(0x16e))),console[_0x36e04c(0x143)](),console[_0x36e04c(0x143)](_0x36e04c(0x17d)+a107_0x5bc8bf[_0x36e04c(0x141)][_0x36e04c(0x191)]('cd\x20'+_0x5b07bb[_0x36e04c(0x15a)]+'\x20&&\x20'+CLI_BIN_NAME+'\x20run\x20start')),_0x2c7162&&console[_0x36e04c(0x143)](_0x36e04c(0x188)+a107_0x5bc8bf[_0x36e04c(0x141)]['bold'](CLI_BIN_NAME+_0x36e04c(0x185))),console[_0x36e04c(0x143)](a107_0x5bc8bf[_0x36e04c(0x156)]('─'[_0x36e04c(0x178)](0x3c)));}catch(_0x410a5c){logger['error'](_0x36e04c(0x182),_0x36e04c(0x158)+_0x5b07bb[_0x36e04c(0x15a)],{'error':_0x410a5c instanceof Error?_0x410a5c[_0x36e04c(0x146)]:String(_0x410a5c)});try{a107_0x4094a0['existsSync'](_0xfec7d)&&(console[_0x36e04c(0x143)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0xfec7d),a107_0x4094a0[_0x36e04c(0x17c)](_0xfec7d,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x36e04c(0x182),_0x36e04c(0x147)+_0xfec7d);}throw _0x410a5c;}}async function runTask(_0x51a2f1,_0xdfdd2a){const _0x2f56fd=a107_0x1fe3,_0x5c67cd=a107_0x3d88b6(_0x51a2f1+_0x2f56fd(0x14f))[_0x2f56fd(0x142)]();try{const _0x1b1253=await _0xdfdd2a();_0x5c67cd[_0x2f56fd(0x173)](),console[_0x2f56fd(0x143)](''+a107_0x5bc8bf[_0x2f56fd(0x156)](_0x2f56fd(0x152))+_0x51a2f1+'\x20'+a107_0x5bc8bf['gray']('['+_0x1b1253+']'));}catch(_0x3ad54a){_0x5c67cd['fail'](_0x51a2f1);throw _0x3ad54a;}}async function updatePackageJsonName(_0x2e3e6d){const _0x2d3660=a107_0x1fe3,_0x3959cc=a107_0x1dbfc7[_0x2d3660(0x16f)](process[_0x2d3660(0x187)](),_0x2e3e6d),_0x44d3d6=a107_0x1dbfc7['join'](_0x3959cc,_0x2d3660(0x192));try{console[_0x2d3660(0x143)](_0x2d3660(0x186));const _0x3062ae=getRabetbaseCliPackageRoot(),_0x23b952=a107_0x1dbfc7[_0x2d3660(0x17e)](_0x3062ae,_0x2d3660(0x192));let _0x154345=_0x2d3660(0x157);try{const _0x3bacea=JSON[_0x2d3660(0x199)](a107_0x4094a0['readFileSync'](_0x23b952,_0x2d3660(0x144)));_0x154345=_0x3bacea['version']||'1.0.0';}catch{}const _0x1a3fae=a107_0x4094a0[_0x2d3660(0x177)](_0x44d3d6,_0x2d3660(0x144)),_0x35da67=JSON[_0x2d3660(0x199)](_0x1a3fae);_0x35da67[_0x2d3660(0x154)]=_0x2e3e6d,_0x35da67[_0x2d3660(0x167)]=_0x2e3e6d+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x154345,a107_0x4094a0[_0x2d3660(0x189)](_0x44d3d6,JSON[_0x2d3660(0x14c)](_0x35da67,null,0x2)+'\x0a','utf8'),console[_0x2d3660(0x143)](_0x2d3660(0x15f)+_0x2e3e6d),logger[_0x2d3660(0x14e)](_0x2d3660(0x182),'更新\x20package.json\x20name');}catch(_0x23aaa9){logger['error']('create','更新\x20package.json\x20失败');throw _0x23aaa9;}}async function configureAppCode(_0x128077,_0x14a211,_0x6ce0a2){const _0x4bc1a9=a107_0x1fe3,_0x486633=a107_0x1dbfc7[_0x4bc1a9(0x16f)](process[_0x4bc1a9(0x187)](),_0x128077),_0x11d436=a107_0x1dbfc7[_0x4bc1a9(0x17e)](_0x486633,NEW_CONFIG_NAME);try{_0x14a211?console[_0x4bc1a9(0x143)](_0x4bc1a9(0x171)+_0x128077+':\x20'+_0x14a211):console[_0x4bc1a9(0x143)](_0x4bc1a9(0x16d)+_0x128077);const _0x47bc2b=getRabetbaseCliPackageRoot(),_0x32b431=a107_0x1dbfc7[_0x4bc1a9(0x17e)](_0x47bc2b,_0x4bc1a9(0x192));let _0x2445d8=_0x4bc1a9(0x157);try{const _0x4c9c4d=JSON['parse'](a107_0x4094a0[_0x4bc1a9(0x177)](_0x32b431,_0x4bc1a9(0x144)));_0x2445d8=_0x4c9c4d['version']||_0x4bc1a9(0x157);}catch{}const _0x37e8e3=readConfig(),_0x3dc79e=typeof _0x37e8e3[_0x4bc1a9(0x18c)]===_0x4bc1a9(0x149)?_0x37e8e3['env']:undefined,_0x5f1a39={};for(const _0x109fe4 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x37e8e3[_0x109fe4]!=null)_0x5f1a39[_0x109fe4]=_0x37e8e3[_0x109fe4];}const _0x494fa7=buildCanonicalProjectConfig(_0x5f1a39,{'appCodes':_0x14a211?[_0x14a211]:[],'env':_0x6ce0a2||_0x3dc79e||_0x4bc1a9(0x170),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x2445d8}});writeConfigFile(_0x11d436,_0x494fa7),_0x14a211?console[_0x4bc1a9(0x143)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x4bc1a9(0x15b)](_0x494fa7[_0x4bc1a9(0x198)]||{})[_0x4bc1a9(0x17e)](',\x20')+_0x4bc1a9(0x151)+_0x494fa7[_0x4bc1a9(0x18a)]):console['log'](_0x4bc1a9(0x155)+CLI_BIN_NAME+_0x4bc1a9(0x180)),logger[_0x4bc1a9(0x14e)](_0x4bc1a9(0x182),'配置应用AppCode:\x20'+_0x14a211);}catch(_0x909439){logger[_0x4bc1a9(0x19a)](_0x4bc1a9(0x182),_0x4bc1a9(0x153));}}
|
|
1
|
+
(function(_0x480471,_0x289eb2){const _0x2d8859=a108_0x356e,_0x523d08=_0x480471();while(!![]){try{const _0x328dbf=parseInt(_0x2d8859(0x104))/0x1*(-parseInt(_0x2d8859(0xe1))/0x2)+parseInt(_0x2d8859(0x126))/0x3+-parseInt(_0x2d8859(0x10d))/0x4*(-parseInt(_0x2d8859(0x11e))/0x5)+parseInt(_0x2d8859(0xfd))/0x6+-parseInt(_0x2d8859(0x115))/0x7*(parseInt(_0x2d8859(0x11c))/0x8)+-parseInt(_0x2d8859(0x127))/0x9+parseInt(_0x2d8859(0xe0))/0xa*(parseInt(_0x2d8859(0x12e))/0xb);if(_0x328dbf===_0x289eb2)break;else _0x523d08['push'](_0x523d08['shift']());}catch(_0x1fafa8){_0x523d08['push'](_0x523d08['shift']());}}}(a108_0x3eb6,0x81f45));import a108_0x272ae5 from'path';import a108_0x22946c from'fs';import a108_0x18fda0 from'chalk';import a108_0x51477c from'ora';function a108_0x3eb6(){const _0x41870c=['836375rzgmQz','setLogPath','appCode','create','utf8','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','accessSync','chdir','2579772CKsrQK','419112nqykPD','repeat','Install\x20dependencies','\x20run\x20start','配置应用AppCode失败','apps','\x20\x202.\x20Pull\x20API\x20configuration:\x20','705254OdqlGG','log','version','\x20dataset(s),\x20generated\x20','info','modelCount','√\x20Configuration\x20file\x20created,\x20Apps:\x20','warn','\x20&&\x20','Project\x20name\x20cannot\x20be\x20empty','\x20api\x20pull','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20√\x20','1.0.0','stableVersion','\x20config\x20set\x20appcode\x20<app-code>\x27','160zldbkz','6EhihJZ','package.json','defaultApp','API\x20configuration\x20pulled:\x20','cd\x20','name','cyan','fail','W_OK','start','needsUpgrade','*\x20Pulling\x20API\x20configuration...','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','belowMinimum','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','gray','cwd','\x20already\x20exists','配置应用AppCode:\x20','env','green','cookie','√\x20package.json\x20updated:\x20name=','rmSync','production','keys','项目创建完成:\x20','项目创建失败:\x20','225906cvbiYP','开始创建项目:\x20','writeFileSync','string','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','toLocaleString','259410HmTraI','test','projectCode','更新\x20package.json\x20失败','bold','error','\x20\x201.\x20Start\x20project:\x20','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','resolve','4HfKoZE','CLI\x20版本检查','projectName','constants','readFileSync','stop','🚀\x20Next\x20Steps:','...','76643lJCXyZ','parse','message','清理项目目录失败:\x20','success','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','\x20|\x20Default:\x20','536QrgBtu','join'];a108_0x3eb6=function(){return _0x41870c;};return a108_0x3eb6();}import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.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 a108_0x356e(_0x4d7b8e,_0x842761){_0x4d7b8e=_0x4d7b8e-0xde;const _0x3eb61b=a108_0x3eb6();let _0x356e9f=_0x3eb61b[_0x4d7b8e];return _0x356e9f;}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';export async function createApp(_0x1d07b9){const _0x52818d=a108_0x356e,_0x368d8a=await checkCliVersion();(_0x368d8a[_0x52818d(0xeb)]||_0x368d8a[_0x52818d(0xee)])&&(printCliUpgradeWarning(_0x368d8a),assertCliVersionSupported(_0x368d8a),logger['info'](_0x52818d(0x121),_0x52818d(0x10e),{'currentVersion':_0x368d8a['currentVersion'],'stableVersion':_0x368d8a[_0x52818d(0xde)],'minimumVersion':_0x368d8a['minimumVersion'],'needsUpgrade':_0x368d8a[_0x52818d(0xeb)],'belowMinimum':_0x368d8a[_0x52818d(0xee)]}));if(_0x1d07b9[_0x52818d(0x106)]&&_0x1d07b9[_0x52818d(0x120)])await runCreate({'projectName':_0x1d07b9['projectCode'],'appCode':_0x1d07b9[_0x52818d(0x120)],'env':_0x1d07b9[_0x52818d(0xf4)]},_0x1d07b9);else{if(_0x1d07b9['projectCode']){const _0x29da69=await selectSingleAppcode(_0x1d07b9[_0x52818d(0xf6)]);await runCreate({'projectName':_0x1d07b9[_0x52818d(0x106)],'appCode':_0x29da69||undefined,'env':_0x1d07b9['env']},_0x1d07b9);}else await guidedCreateProject(_0x3bbd5c=>runCreate(_0x3bbd5c,_0x1d07b9),_0x1d07b9[_0x52818d(0xf4)],_0x1d07b9['cookie']);}}async function runCreate(_0x1bcba2,_0x5c4363){const _0x21f210=a108_0x356e;if(!_0x1bcba2['projectName']||_0x1bcba2[_0x21f210(0x10f)]['trim']()==='')throw new Error(_0x21f210(0x137));const _0x30f124=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x30f124[_0x21f210(0x105)](_0x1bcba2[_0x21f210(0x10f)]))throw new Error(_0x21f210(0x123));if(_0x1bcba2[_0x21f210(0x10f)]['length']>0x64)throw new Error(_0x21f210(0x102));const _0x1828a8=a108_0x272ae5[_0x21f210(0x10c)](process['cwd'](),_0x1bcba2[_0x21f210(0x10f)]);if(a108_0x22946c['existsSync'](_0x1828a8))throw new Error('Project\x20directory\x20'+_0x1bcba2[_0x21f210(0x10f)]+_0x21f210(0xf2));try{a108_0x22946c[_0x21f210(0x124)](a108_0x272ae5['dirname'](_0x1828a8),a108_0x22946c[_0x21f210(0x110)][_0x21f210(0xe9)]);}catch{throw new Error(_0x21f210(0xed));}logger[_0x21f210(0x11f)](_0x1828a8),logger[_0x21f210(0x132)](_0x21f210(0x121),_0x21f210(0xfe)+_0x1bcba2[_0x21f210(0x10f)],{'projectDir':_0x1828a8,'appCode':_0x1bcba2[_0x21f210(0x120)]}),console[_0x21f210(0x12f)](),console['log'](a108_0x18fda0['green']('\x20√\x20')+'Project\x20name:\x20'+a108_0x18fda0[_0x21f210(0xf5)](_0x1bcba2['projectName'])+(_0x1bcba2['appCode']?'\x20|\x20AppCode:\x20'+a108_0x18fda0[_0x21f210(0xe7)](_0x1bcba2[_0x21f210(0x120)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x1bcba2['projectName'])),await updatePackageJsonName(_0x1bcba2['projectName']),await runTask(_0x21f210(0x129),()=>installDependencies(_0x1bcba2[_0x21f210(0x10f)])),await runTask('Format\x20code',()=>formatProjectCode(_0x1bcba2[_0x21f210(0x10f)])),await configureAppCode(_0x1bcba2[_0x21f210(0x10f)],_0x1bcba2[_0x21f210(0x120)]||'',_0x1bcba2[_0x21f210(0xf4)]);let _0x24d66e=![];if(_0x1bcba2[_0x21f210(0x120)]){console[_0x21f210(0x12f)](_0x21f210(0xec));const _0x184b6f=process['cwd']();try{process[_0x21f210(0x125)](_0x1828a8);const _0xdb3743=_0x1bcba2['env']||_0x21f210(0xf9);initEnv(_0xdb3743);const {configArray:_0x11163f}=await fetchModelList(_0x1bcba2['appCode'],_0x5c4363[_0x21f210(0xf6)]||''),_0x446f98=DEFAULT_API_DIR,_0x2f75e5=await generateApiFile(_0x11163f,'',_0x1bcba2['appCode'],!![],_0xdb3743,_0x446f98);console[_0x21f210(0x12f)]('√\x20Pulled\x20'+_0x11163f['length']+_0x21f210(0x131)+_0x2f75e5[_0x21f210(0x133)]+'\x20model(s)'),logger['info']('create',_0x21f210(0xe4)+_0x1bcba2[_0x21f210(0x120)]);}catch(_0x99f9f8){_0x24d66e=!![],console[_0x21f210(0x12f)](_0x21f210(0x139)),logger[_0x21f210(0x135)](_0x21f210(0x121),'API\x20配置拉取异常',{'error':_0x99f9f8 instanceof Error?_0x99f9f8['message']:String(_0x99f9f8)});}finally{process[_0x21f210(0x125)](_0x184b6f);}}logger[_0x21f210(0x119)](_0x21f210(0x121),_0x21f210(0xfb)+_0x1bcba2[_0x21f210(0x10f)]),console['log'](),console[_0x21f210(0x12f)](a108_0x18fda0['green']('─'[_0x21f210(0x128)](0x3c))),console[_0x21f210(0x12f)](a108_0x18fda0[_0x21f210(0xe7)][_0x21f210(0x108)](_0x21f210(0x113))),console[_0x21f210(0x12f)](),console['log'](_0x21f210(0x10a)+a108_0x18fda0[_0x21f210(0xe7)]['bold'](_0x21f210(0xe5)+_0x1bcba2[_0x21f210(0x10f)]+_0x21f210(0x136)+CLI_BIN_NAME+_0x21f210(0x12a))),_0x24d66e&&console[_0x21f210(0x12f)](_0x21f210(0x12d)+a108_0x18fda0[_0x21f210(0xe7)][_0x21f210(0x108)](CLI_BIN_NAME+_0x21f210(0x138))),console[_0x21f210(0x12f)](a108_0x18fda0[_0x21f210(0xf5)]('─'[_0x21f210(0x128)](0x3c)));}catch(_0x2fba51){logger[_0x21f210(0x109)](_0x21f210(0x121),_0x21f210(0xfc)+_0x1bcba2[_0x21f210(0x10f)],{'error':_0x2fba51 instanceof Error?_0x2fba51[_0x21f210(0x117)]:String(_0x2fba51)});try{a108_0x22946c['existsSync'](_0x1828a8)&&(console['log'](_0x21f210(0x11a)+_0x1828a8),a108_0x22946c[_0x21f210(0xf8)](_0x1828a8,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x21f210(0x121),_0x21f210(0x118)+_0x1828a8);}throw _0x2fba51;}}async function runTask(_0x1280f5,_0x591775){const _0x2c16be=a108_0x356e,_0x47f869=a108_0x51477c(_0x1280f5+_0x2c16be(0x114))[_0x2c16be(0xea)]();try{const _0x1a82a6=await _0x591775();_0x47f869[_0x2c16be(0x112)](),console[_0x2c16be(0x12f)](''+a108_0x18fda0[_0x2c16be(0xf5)](_0x2c16be(0x13a))+_0x1280f5+'\x20'+a108_0x18fda0[_0x2c16be(0xf0)]('['+_0x1a82a6+']'));}catch(_0x37963b){_0x47f869[_0x2c16be(0xe8)](_0x1280f5);throw _0x37963b;}}async function updatePackageJsonName(_0x5be070){const _0x34d752=a108_0x356e,_0x1b31a7=a108_0x272ae5[_0x34d752(0x10c)](process[_0x34d752(0xf1)](),_0x5be070),_0x216047=a108_0x272ae5[_0x34d752(0x11d)](_0x1b31a7,_0x34d752(0xe2));try{console['log'](_0x34d752(0x101));const _0x66b707=getRabetbaseCliPackageRoot(),_0x56367b=a108_0x272ae5[_0x34d752(0x11d)](_0x66b707,_0x34d752(0xe2));let _0x2443b6='1.0.0';try{const _0x4417d7=JSON[_0x34d752(0x116)](a108_0x22946c[_0x34d752(0x111)](_0x56367b,_0x34d752(0x122)));_0x2443b6=_0x4417d7[_0x34d752(0x130)]||_0x34d752(0x13b);}catch{}const _0x4199aa=a108_0x22946c['readFileSync'](_0x216047,_0x34d752(0x122)),_0x4461fa=JSON[_0x34d752(0x116)](_0x4199aa);_0x4461fa[_0x34d752(0xe6)]=_0x5be070,_0x4461fa['description']=_0x5be070+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x2443b6,a108_0x22946c[_0x34d752(0xff)](_0x216047,JSON['stringify'](_0x4461fa,null,0x2)+'\x0a',_0x34d752(0x122)),console[_0x34d752(0x12f)](_0x34d752(0xf7)+_0x5be070),logger['info'](_0x34d752(0x121),'更新\x20package.json\x20name');}catch(_0x14c9c3){logger['error']('create',_0x34d752(0x107));throw _0x14c9c3;}}async function configureAppCode(_0x4ae752,_0x26baf3,_0x34c66d){const _0x4c3ef2=a108_0x356e,_0x149fb5=a108_0x272ae5[_0x4c3ef2(0x10c)](process[_0x4c3ef2(0xf1)](),_0x4ae752),_0x404ff6=a108_0x272ae5[_0x4c3ef2(0x11d)](_0x149fb5,NEW_CONFIG_NAME);try{_0x26baf3?console['log']('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x4ae752+':\x20'+_0x26baf3):console[_0x4c3ef2(0x12f)](_0x4c3ef2(0xef)+_0x4ae752);const _0x555f66=getRabetbaseCliPackageRoot(),_0x13ffe7=a108_0x272ae5[_0x4c3ef2(0x11d)](_0x555f66,'package.json');let _0x3b0eb0=_0x4c3ef2(0x13b);try{const _0x3c7a0a=JSON[_0x4c3ef2(0x116)](a108_0x22946c['readFileSync'](_0x13ffe7,_0x4c3ef2(0x122)));_0x3b0eb0=_0x3c7a0a[_0x4c3ef2(0x130)]||_0x4c3ef2(0x13b);}catch{}const _0x115d86=readConfig(),_0x27d828=typeof _0x115d86[_0x4c3ef2(0xf4)]===_0x4c3ef2(0x100)?_0x115d86['env']:undefined,_0x5adef6={};for(const _0x361978 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x115d86[_0x361978]!=null)_0x5adef6[_0x361978]=_0x115d86[_0x361978];}const _0x32c1fe=buildCanonicalProjectConfig(_0x5adef6,{'appCodes':_0x26baf3?[_0x26baf3]:[],'env':_0x34c66d||_0x27d828||'production','metadata':{'createdAt':new Date()[_0x4c3ef2(0x103)](),'version':_0x3b0eb0}});writeConfigFile(_0x404ff6,_0x32c1fe),_0x26baf3?console['log'](_0x4c3ef2(0x134)+Object[_0x4c3ef2(0xfa)](_0x32c1fe[_0x4c3ef2(0x12c)]||{})[_0x4c3ef2(0x11d)](',\x20')+_0x4c3ef2(0x11b)+_0x32c1fe[_0x4c3ef2(0xe3)]):console[_0x4c3ef2(0x12f)](_0x4c3ef2(0x10b)+CLI_BIN_NAME+_0x4c3ef2(0xdf)),logger[_0x4c3ef2(0x132)](_0x4c3ef2(0x121),_0x4c3ef2(0xf3)+_0x26baf3);}catch(_0x3a8f1e){logger[_0x4c3ef2(0x109)](_0x4c3ef2(0x121),_0x4c3ef2(0x12b));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32f37b,_0x168b7f){const _0x54ea1d=a109_0x57df,_0x5dec2d=_0x32f37b();while(!![]){try{const _0xf43aa=-parseInt(_0x54ea1d(0x161))/0x1*(parseInt(_0x54ea1d(0x14f))/0x2)+parseInt(_0x54ea1d(0x13e))/0x3*(parseInt(_0x54ea1d(0x131))/0x4)+parseInt(_0x54ea1d(0x150))/0x5*(parseInt(_0x54ea1d(0x132))/0x6)+-parseInt(_0x54ea1d(0x126))/0x7*(parseInt(_0x54ea1d(0x153))/0x8)+parseInt(_0x54ea1d(0x12b))/0x9*(parseInt(_0x54ea1d(0x140))/0xa)+-parseInt(_0x54ea1d(0x143))/0xb*(-parseInt(_0x54ea1d(0x135))/0xc)+parseInt(_0x54ea1d(0x151))/0xd*(-parseInt(_0x54ea1d(0x129))/0xe);if(_0xf43aa===_0x168b7f)break;else _0x5dec2d['push'](_0x5dec2d['shift']());}catch(_0x539dc8){_0x5dec2d['push'](_0x5dec2d['shift']());}}}(a109_0x320f,0xd2028));import a109_0x4de4f4 from'path';import a109_0x3fabd4 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';function a109_0x320f(){const _0x23874f=['\x20created\x20successfully!','bun\x20--version','...','1961UbWkMo','resolve','log','\x0a√\x20Project\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','\x20\x20√\x20package.json\x20updated','35861AfKrFC','*\x20Creating\x20project\x20','Project\x20name\x20cannot\x20be\x20empty.','1574972xFUBqZ','\x20api\x20pull`\x20manually\x20later.','2889IsPwuR','npm','\x20\x20Pulling\x20API\x20configuration...','constants','access','modelCount','63652QjeTTK','6842076wzdRte','chdir','Project\x20directory\x20\x22','2569416PxLvTV','bun\x20run\x20format','utf-8','dirname','package.json','writeFile','bun','test','\x22\x20already\x20exists.','42zkWbiH','description','27190mNWUCF','cwd','\x20\x20√\x20Pulled\x20','88wvmgaJ','name','\x20\x20rabetbase\x20run\x20start\x0a','needsUpgrade','toLocaleString','parse','stringify','Use\x20a\x20different\x20project\x20name.','validation','Project\x20name\x20contains\x20invalid\x20characters.','production','env','386dWAJLD','5FUfoWa','312ujlWPH','length','16aKLJgl','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','W_OK','\x20dataset(s),\x20generated\x20','\x20\x20√\x20Project\x20template\x20created','trim','Check\x20directory\x20permissions.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20Code\x20formatted'];a109_0x320f=function(){return _0x23874f;};return a109_0x320f();}import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';function a109_0x57df(_0x1984a3,_0x2b7364){_0x1984a3=_0x1984a3-0x126;const _0x320f5a=a109_0x320f();let _0x57df8d=_0x320f5a[_0x1984a3];return _0x57df8d;}import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x1b5194,_0x1937cb,_0x3c0c0e,_0x3b1661){const _0x4fee2a=a109_0x57df,_0x2a168b=await checkCliVersion();(_0x2a168b[_0x4fee2a(0x146)]||_0x2a168b['belowMinimum'])&&(printCliUpgradeWarning(_0x2a168b),assertCliVersionSupported(_0x2a168b));if(!_0x1b5194||_0x1b5194[_0x4fee2a(0x159)]()==='')throw CliErrors[_0x4fee2a(0x14b)](_0x4fee2a(0x128));const _0x5e5d2c=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5e5d2c[_0x4fee2a(0x13c)](_0x1b5194))throw CliErrors[_0x4fee2a(0x14b)](_0x4fee2a(0x14c),_0x4fee2a(0x15b));if(_0x1b5194['length']>0x64)throw CliErrors[_0x4fee2a(0x14b)](_0x4fee2a(0x165));const _0x2731b7=a109_0x4de4f4[_0x4fee2a(0x162)](process['cwd'](),_0x1b5194);if(existsSync(_0x2731b7))throw CliErrors[_0x4fee2a(0x14b)](_0x4fee2a(0x134)+_0x1b5194+_0x4fee2a(0x13d),_0x4fee2a(0x14a));try{const _0x1a5f3b=a109_0x4de4f4[_0x4fee2a(0x138)](_0x2731b7);await a109_0x3fabd4[_0x4fee2a(0x12f)](_0x1a5f3b,a109_0x3fabd4[_0x4fee2a(0x12e)][_0x4fee2a(0x156)]);}catch{throw CliErrors[_0x4fee2a(0x14b)](_0x4fee2a(0x15c),_0x4fee2a(0x15a));}try{console[_0x4fee2a(0x163)](_0x4fee2a(0x127)+_0x1b5194+_0x4fee2a(0x160));const _0x366d1a=getSubAppReactDemoTemplateDir();await copyDirectory(_0x366d1a,_0x2731b7),console[_0x4fee2a(0x163)](_0x4fee2a(0x158)),await updatePackageJsonName(_0x1b5194),console['log'](_0x4fee2a(0x166)),console[_0x4fee2a(0x163)]('\x20\x20Installing\x20dependencies...'),console[_0x4fee2a(0x163)](_0x4fee2a(0x154)),await formatCode(_0x2731b7),console[_0x4fee2a(0x163)](_0x4fee2a(0x15d)),await configureProject(_0x1b5194,_0x3c0c0e,_0x1937cb),console[_0x4fee2a(0x163)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x3c0c0e&&await pullApiConfig(_0x2731b7,_0x3c0c0e,_0x1937cb,_0x3b1661),console[_0x4fee2a(0x163)](_0x4fee2a(0x164)+_0x1b5194+_0x4fee2a(0x15e)),console[_0x4fee2a(0x163)]('\x0a\x20\x20cd\x20'+_0x1b5194),console[_0x4fee2a(0x163)](_0x4fee2a(0x145));}catch(_0x19d637){try{existsSync(_0x2731b7)&&await a109_0x3fabd4['rm'](_0x2731b7,{'recursive':!![],'force':!![]});}catch{}throw _0x19d637;}}async function updatePackageJsonName(_0x2aad21){const _0x503ae7=a109_0x57df,_0x45a6da=a109_0x4de4f4[_0x503ae7(0x162)](process[_0x503ae7(0x141)](),_0x2aad21),_0x7117f6=a109_0x4de4f4['join'](_0x45a6da,_0x503ae7(0x139)),_0x76320d=await a109_0x3fabd4['readFile'](_0x7117f6,_0x503ae7(0x137)),_0x567864=JSON[_0x503ae7(0x148)](_0x76320d);_0x567864[_0x503ae7(0x144)]=_0x2aad21,_0x567864[_0x503ae7(0x13f)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a109_0x3fabd4[_0x503ae7(0x13a)](_0x7117f6,JSON[_0x503ae7(0x149)](_0x567864,null,0x2)+'\x0a');}function detectPackageManager(){const _0x334b3a=a109_0x57df;try{return execSync(_0x334b3a(0x15f),{'stdio':'ignore'}),_0x334b3a(0x13b);}catch{return _0x334b3a(0x12c);}}async function formatCode(_0x4be765){const _0xb55a3c=a109_0x57df;try{await execAsync(_0xb55a3c(0x136),{'cwd':_0x4be765});}catch{}}async function configureProject(_0x4bd56d,_0x4179b3,_0x1c1a09){const _0x23fb71=a109_0x57df,_0x31e0da=a109_0x4de4f4['resolve'](process[_0x23fb71(0x141)](),_0x4bd56d),_0x9dd33=a109_0x4de4f4['join'](_0x31e0da,NEW_CONFIG_NAME),_0x487250=readConfig(),_0x31815c=typeof _0x487250[_0x23fb71(0x14e)]==='string'?_0x487250['env']:undefined,_0xa7cc23={};for(const _0x236b3b of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x487250[_0x236b3b]!=null)_0xa7cc23[_0x236b3b]=_0x487250[_0x236b3b];}const _0x38f9ec=buildCanonicalProjectConfig(_0xa7cc23,{'appCodes':_0x4179b3?[_0x4179b3]:[],'env':_0x1c1a09||_0x31815c||_0x23fb71(0x14d),'metadata':{'createdAt':new Date()[_0x23fb71(0x147)](),'version':getCliVersion()}});writeConfigFile(_0x9dd33,_0x38f9ec);}async function pullApiConfig(_0x2089f4,_0x4e6bcc,_0x2e5d84,_0x10e18b){const _0x4587ba=a109_0x57df,_0x49d160=process[_0x4587ba(0x141)]();try{process[_0x4587ba(0x133)](_0x2089f4);const _0x1016ac=_0x2e5d84||_0x4587ba(0x14d);initEnv(_0x1016ac),console[_0x4587ba(0x163)](_0x4587ba(0x12d));const {configArray:_0x3b9948}=await fetchModelList(_0x4e6bcc,_0x10e18b||''),_0x18791e=await generateApiFile(_0x3b9948,'',_0x4e6bcc,!![],_0x1016ac,DEFAULT_API_DIR);console[_0x4587ba(0x163)](_0x4587ba(0x142)+_0x3b9948[_0x4587ba(0x152)]+_0x4587ba(0x157)+_0x18791e[_0x4587ba(0x130)]+'\x20model(s)');}catch(_0x5724e4){console[_0x4587ba(0x163)](_0x4587ba(0x155)+CLI_BIN_NAME+_0x4587ba(0x12a));}finally{process[_0x4587ba(0x133)](_0x49d160);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f0827,_0x5a0a05){const _0x14e925=a110_0x1596,_0xe51871=_0x4f0827();while(!![]){try{const _0x1d2fca=parseInt(_0x14e925(0xbe))/0x1+-parseInt(_0x14e925(0xbc))/0x2+parseInt(_0x14e925(0xc0))/0x3*(parseInt(_0x14e925(0xc4))/0x4)+-parseInt(_0x14e925(0xc6))/0x5+-parseInt(_0x14e925(0xc2))/0x6+-parseInt(_0x14e925(0xc1))/0x7*(-parseInt(_0x14e925(0xc7))/0x8)+parseInt(_0x14e925(0xc5))/0x9;if(_0x1d2fca===_0x5a0a05)break;else _0xe51871['push'](_0xe51871['shift']());}catch(_0x317b5b){_0xe51871['push'](_0xe51871['shift']());}}}(a110_0x4c48,0x5b943));function a110_0x1596(_0x486cd0,_0x5978d0){_0x486cd0=_0x486cd0-0xbc;const _0x4c48ca=a110_0x4c48();let _0x159692=_0x4c48ca[_0x486cd0];return _0x159692;}function a110_0x4c48(){const _0x2bc911=['237408CDsdJf','resolve','405858YnNycL','sub-app-react-demo','428133aqLZBF','7ZTYziA','3675300KLZdqP','join','4yYdSZW','7769655mLxjVm','2954945TmmRsv','2283888wNLanK'];a110_0x4c48=function(){return _0x2bc911;};return a110_0x4c48();}import a110_0x5078b1 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a110_0x5078b1['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x11e1ba=a110_0x1596;return a110_0x5078b1[_0x11e1ba(0xbd)](__dirname,'../../../../');}export function getSubAppReactDemoTemplateDir(){const _0x4d8ebd=a110_0x1596;return a110_0x5078b1[_0x4d8ebd(0xc3)](getRabetbaseCliPackageRoot(),'templates','projects',_0x4d8ebd(0xbf));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d25d4,_0x4f518f){const _0x29526b=a111_0x1fa0,_0x5a4c1d=_0x4d25d4();while(!![]){try{const _0x4212df=parseInt(_0x29526b(0xd5))/0x1+parseInt(_0x29526b(0xd4))/0x2+-parseInt(_0x29526b(0xd2))/0x3+-parseInt(_0x29526b(0xcd))/0x4*(parseInt(_0x29526b(0xdc))/0x5)+-parseInt(_0x29526b(0xd8))/0x6*(-parseInt(_0x29526b(0xd3))/0x7)+parseInt(_0x29526b(0xd6))/0x8*(parseInt(_0x29526b(0xd0))/0x9)+-parseInt(_0x29526b(0xd9))/0xa*(parseInt(_0x29526b(0xda))/0xb);if(_0x4212df===_0x4f518f)break;else _0x5a4c1d['push'](_0x5a4c1d['shift']());}catch(_0x2ecc20){_0x5a4c1d['push'](_0x5a4c1d['shift']());}}}(a111_0x3405,0x1bfb7));import a111_0x2c06f4 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();function a111_0x1fa0(_0x2df055,_0x581d03){_0x2df055=_0x2df055-0xcd;const _0x3405b5=a111_0x3405();let _0x1fa094=_0x3405b5[_0x2df055];return _0x1fa094;}export async function copyProjectTemplate(_0x523213){const _0x460d0b=a111_0x1fa0,_0x566205=Date[_0x460d0b(0xe0)](),_0x53a513=a111_0x2c06f4[_0x460d0b(0xd1)](process[_0x460d0b(0xde)](),_0x523213);try{logger[_0x460d0b(0xce)](_0x460d0b(0xd7),_0x460d0b(0xcf),{'projectCode':_0x523213,'templateDir':templateDir}),await copyDirectory(templateDir,_0x53a513);const _0x589ec4=Date[_0x460d0b(0xe0)]()-_0x566205;logger['success']('copy','项目模板复制完成',_0x589ec4,{'projectCode':_0x523213});}catch(_0x479dd8){const _0x3d9efe=Date[_0x460d0b(0xe0)]()-_0x566205;logger[_0x460d0b(0xdb)](_0x460d0b(0xd7),_0x460d0b(0xdf),{'projectCode':_0x523213,'error':_0x479dd8 instanceof Error?_0x479dd8[_0x460d0b(0xdd)]:String(_0x479dd8),'duration':_0x3d9efe});throw _0x479dd8;}return formatElapsed(_0x566205);}function a111_0x3405(){const _0x3b91cc=['copy','12iMCUZP','40HbjQlt','119383nFZVeW','error','420860Epbwqv','message','cwd','项目模板复制失败','now','8TybwCT','info','开始复制项目模板','180yLfWea','resolve','79209syDlxF','67424wWxmjB','199760avvhGk','84450YbeaBK','59672kEFjBR'];a111_0x3405=function(){return _0x3b91cc;};return a111_0x3405();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x284568,_0x2eb5f9){const _0x469cea=a112_0x4f59,_0x128930=_0x284568();while(!![]){try{const _0x1973a2=-parseInt(_0x469cea(0x132))/0x1*(parseInt(_0x469cea(0x137))/0x2)+parseInt(_0x469cea(0x138))/0x3*(-parseInt(_0x469cea(0x123))/0x4)+-parseInt(_0x469cea(0x125))/0x5+-parseInt(_0x469cea(0x139))/0x6*(-parseInt(_0x469cea(0x135))/0x7)+parseInt(_0x469cea(0x12f))/0x8+-parseInt(_0x469cea(0x12b))/0x9*(-parseInt(_0x469cea(0x128))/0xa)+parseInt(_0x469cea(0x12e))/0xb*(parseInt(_0x469cea(0x130))/0xc);if(_0x1973a2===_0x2eb5f9)break;else _0x128930['push'](_0x128930['shift']());}catch(_0x4978a8){_0x128930['push'](_0x128930['shift']());}}}(a112_0x3433,0x91092));function a112_0x4f59(_0x28f40c,_0x1e7912){_0x28f40c=_0x28f40c-0x123;const _0x3433a7=a112_0x3433();let _0x4f59a0=_0x3433a7[_0x28f40c];return _0x4f59a0;}import a112_0x5e3ad6 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a112_0x3433(){const _0x569145=['7173UpbZIQ','info','resolve','2272523GeVIPB','7188448RSeNAt','120Avkrqp','format','43KoJPok','npx','代码格式化失败','74011GOOQHm','cwd','35908SqLXLC','201702gKgkpD','66GNALDo','prettier','代码格式化完成','64lDSwNz','now','5414430BdBSvF','开始格式化代码','--write','5570YHewli','message','error'];a112_0x3433=function(){return _0x569145;};return a112_0x3433();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x2d82c5){const _0xdf66e0=a112_0x4f59,_0x26e783=Date[_0xdf66e0(0x124)](),_0x4d9103=a112_0x5e3ad6[_0xdf66e0(0x12d)](process[_0xdf66e0(0x136)](),_0x2d82c5);try{logger[_0xdf66e0(0x12c)]('format',_0xdf66e0(0x126),{'projectCode':_0x2d82c5}),await execa(resolveNpmBin(_0xdf66e0(0x133)),[_0xdf66e0(0x13a),_0xdf66e0(0x127),'.'],{'cwd':_0x4d9103});const _0x50417d=Date[_0xdf66e0(0x124)]()-_0x26e783;logger['success'](_0xdf66e0(0x131),_0xdf66e0(0x13b),_0x50417d,{'projectCode':_0x2d82c5});}catch(_0x2d281b){const _0x2a0e84=Date['now']()-_0x26e783;logger[_0xdf66e0(0x12a)](_0xdf66e0(0x131),_0xdf66e0(0x134),{'projectCode':_0x2d82c5,'error':_0x2d281b instanceof Error?_0x2d281b[_0xdf66e0(0x129)]:String(_0x2d281b),'duration':_0x2a0e84});throw _0x2d281b;}return formatElapsed(_0x26e783);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x439ef5,_0x164e53){const _0xbc7b14=a113_0x37c7,_0x2b1e9f=_0x439ef5();while(!![]){try{const _0x34595e=-parseInt(_0xbc7b14(0x173))/0x1*(parseInt(_0xbc7b14(0x170))/0x2)+parseInt(_0xbc7b14(0x16f))/0x3+parseInt(_0xbc7b14(0x162))/0x4+parseInt(_0xbc7b14(0x16d))/0x5*(parseInt(_0xbc7b14(0x171))/0x6)+-parseInt(_0xbc7b14(0x167))/0x7*(parseInt(_0xbc7b14(0x163))/0x8)+parseInt(_0xbc7b14(0x175))/0x9*(-parseInt(_0xbc7b14(0x172))/0xa)+parseInt(_0xbc7b14(0x160))/0xb*(parseInt(_0xbc7b14(0x169))/0xc);if(_0x34595e===_0x164e53)break;else _0x2b1e9f['push'](_0x2b1e9f['shift']());}catch(_0x14a36d){_0x2b1e9f['push'](_0x2b1e9f['shift']());}}}(a113_0x190c,0xeb8a4));import a113_0x473f50 from'node:path';import{execa}from'execa';function a113_0x190c(){const _0x21ad7f=['开始安装依赖','success','1215255HgEsbN','依赖安装完成','325032UFVNnf','627810TgXFij','36vIbhmh','30GQDvkI','1IZfYqu','error','5137533ciLKeN','3640153HKXgFi','resolve','4812460pAoUKU','58400rFtjBq','now','https://registry.npmmirror.com','install','105saeRBI','依赖安装失败','12CmNvUm','message'];a113_0x190c=function(){return _0x21ad7f;};return a113_0x190c();}function a113_0x37c7(_0x1cdb1a,_0x4fd7c4){_0x1cdb1a=_0x1cdb1a-0x160;const _0x190cdd=a113_0x190c();let _0x37c75d=_0x190cdd[_0x1cdb1a];return _0x37c75d;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x4dbd73){const _0x3c9258=a113_0x37c7,_0xc7b645=Date[_0x3c9258(0x164)](),_0xed73ee=a113_0x473f50[_0x3c9258(0x161)](process['cwd'](),_0x4dbd73);try{logger['info'](_0x3c9258(0x166),_0x3c9258(0x16b),{'projectCode':_0x4dbd73,'registry':_0x3c9258(0x165)}),await execa(resolveNpmBin('npm'),['install','--registry',_0x3c9258(0x165)],{'cwd':_0xed73ee});const _0x17303f=Date[_0x3c9258(0x164)]()-_0xc7b645;logger[_0x3c9258(0x16c)]('install',_0x3c9258(0x16e),_0x17303f,{'projectCode':_0x4dbd73});}catch(_0x29f6cd){const _0x4263a7=Date[_0x3c9258(0x164)]()-_0xc7b645;logger[_0x3c9258(0x174)](_0x3c9258(0x166),_0x3c9258(0x168),{'projectCode':_0x4dbd73,'error':_0x29f6cd instanceof Error?_0x29f6cd[_0x3c9258(0x16a)]:String(_0x29f6cd),'duration':_0x4263a7});throw _0x29f6cd;}return formatElapsed(_0xc7b645);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a114_0x44dcea=a114_0x3fb9;(function(_0x44fd47,_0x592b74){const _0x352c2d=a114_0x3fb9,_0x51746d=_0x44fd47();while(!![]){try{const _0xd494a6=-parseInt(_0x352c2d(0xfc))/0x1*(-parseInt(_0x352c2d(0xf7))/0x2)+-parseInt(_0x352c2d(0x105))/0x3+-parseInt(_0x352c2d(0xf6))/0x4+parseInt(_0x352c2d(0x113))/0x5+-parseInt(_0x352c2d(0xfb))/0x6*(parseInt(_0x352c2d(0x102))/0x7)+-parseInt(_0x352c2d(0x104))/0x8+parseInt(_0x352c2d(0x107))/0x9;if(_0xd494a6===_0x592b74)break;else _0x51746d['push'](_0x51746d['shift']());}catch(_0x16ab00){_0x51746d['push'](_0x51746d['shift']());}}}(a114_0x6ab2,0xb633b));import{CliErrors}from'../../errors.js';function a114_0x6ab2(){const _0x2ed349=['Project\x20name','Usage:\x20','1020720hizQXp','14404FJSZHh','nonInteractive','name','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','6767574ydGkrN','109mJAQQP','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','str','string','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','7jZofsQ','../../commands/project/create/main.js','11490296RdYSSp','3807378etapNs','cookie','27810513rzqJgC','appcode','boolean','args','bool','project','trim','env','Skip\x20confirmation\x20prompt','init','yes','write','4798730geWNTw','create','validation','Target\x20environment'];a114_0x6ab2=function(){return _0x2ed349;};return a114_0x6ab2();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a114_0x44dcea(0x108),'type':a114_0x44dcea(0x100),'description':'App\x20code\x20to\x20initialize'},{'name':a114_0x44dcea(0x10e),'type':a114_0x44dcea(0x100),'description':a114_0x44dcea(0xf3)},{'name':a114_0x44dcea(0x111),'type':a114_0x44dcea(0x109),'description':'Auto-confirm\x20prompts','default':![]}],createFlags=[{'name':'name','type':a114_0x44dcea(0x100),'description':a114_0x44dcea(0xf4)},{'name':'env','type':a114_0x44dcea(0x100),'description':a114_0x44dcea(0xf3)},{'name':a114_0x44dcea(0x108),'type':'string','description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a114_0x44dcea(0x111),'type':a114_0x44dcea(0x109),'description':a114_0x44dcea(0x10f),'default':![]}];function a114_0x3fb9(_0x7f84b4,_0xf2ce65){_0x7f84b4=_0x7f84b4-0xf3;const _0x6ab23d=a114_0x6ab2();let _0x3fb991=_0x6ab23d[_0x7f84b4];return _0x3fb991;}export const projectDefinitions=[{'service':a114_0x44dcea(0x10c),'command':a114_0x44dcea(0x110),'description':a114_0x44dcea(0xfe),'risk':a114_0x44dcea(0x112),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0xbb263){const _0x47dfad=a114_0x44dcea;return await initConfig({'appcode':_0xbb263[_0x47dfad(0xff)](_0x47dfad(0x108))||undefined,'env':_0xbb263['str']('env')||undefined,'autoYes':_0xbb263[_0x47dfad(0x10b)](_0x47dfad(0x111))}),{'ok':!![]};}},{'service':a114_0x44dcea(0x10c),'command':a114_0x44dcea(0x114),'description':'Create\x20a\x20new\x20project','risk':a114_0x44dcea(0x112),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a114_0x44dcea(0x101),'required':![]}],'flags':createFlags,async 'execute'(_0x57db4f){const _0x46f9c8=a114_0x44dcea,{createApp:_0x2fa932}=await import(_0x46f9c8(0x103)),{createProjectNonInteractive:_0x28306f}=await import('../../commands/project/create/non-interactive.js'),_0x4fcfba=_0x57db4f[_0x46f9c8(0xff)](_0x46f9c8(0xf9))[_0x46f9c8(0x10d)]()||_0x57db4f[_0x46f9c8(0x10a)][0x0]?.['trim'](),_0x3690e5=_0x57db4f['str'](_0x46f9c8(0x10e))||undefined,_0x2b2835=_0x57db4f[_0x46f9c8(0xff)]('appcode')||undefined;if(_0x57db4f[_0x46f9c8(0xf8)]){if(!_0x4fcfba)throw CliErrors[_0x46f9c8(0x115)](_0x46f9c8(0xfa),_0x46f9c8(0xf5)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x28306f(_0x4fcfba,_0x3690e5,_0x2b2835,_0x57db4f[_0x46f9c8(0x106)]);}else await _0x2fa932({'projectCode':_0x4fcfba,'appCode':_0x2b2835,'env':_0x3690e5,'cookie':_0x57db4f[_0x46f9c8(0x106)]});return{'ok':!![]};}},{'service':a114_0x44dcea(0x10c),'command':'upgrade','description':a114_0x44dcea(0xfd),'risk':a114_0x44dcea(0x112),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x3bda2e){const _0x465f44=a114_0x44dcea;return await upgradeApp(_0x3bda2e[_0x465f44(0xf8)],{'yes':_0x3bda2e[_0x465f44(0x10b)](_0x465f44(0x111))}),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a115_0x56b3(){const _0x131350=['\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','167153beJNOU','63591MKaeGv','env','string','\x20\x20Default:\x20','utf8','初始化项目配置文件成功','9294240uArdBi','3490rRzfiW','bold','8143938cvRxTo','appcode','2QBCjAo','join','Upgrade\x20it\x20to\x20','?\x20(Old\x20file\x20→\x20*.bak)','1535403yEPyTe','log','setLogPath','toLocaleString','Please\x20enter\x20App\x20Code:','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','init','从旧配置文件升级成功','keys','.bak','production','\x20project\x20init`\x20to\x20start\x20fresh.','\x20\x20appcode:\x20','package.json','\x20\x20Apps:\x20','cwd','\x20api\x20pull\x27','apps','cyan','428007oZAvXF','294zBYXUy','55VZtPPQ','version','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','app','info','✓\x20Upgraded\x20','gray','trim','green','1.0.0','defaultApp','Migration\x20cancelled.\x20Run\x20`','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','\x20→\x20.rabetbase.json','62344TwvgxR'];a115_0x56b3=function(){return _0x131350;};return a115_0x56b3();}(function(_0x3029be,_0x3169c9){const _0x5bab85=a115_0x1fce,_0x152d80=_0x3029be();while(!![]){try{const _0x5789d0=-parseInt(_0x5bab85(0xc0))/0x1+-parseInt(_0x5bab85(0xa9))/0x2*(-parseInt(_0x5bab85(0xad))/0x3)+-parseInt(_0x5bab85(0x9b))/0x4*(-parseInt(_0x5bab85(0x8d))/0x5)+-parseInt(_0x5bab85(0xc1))/0x6*(parseInt(_0x5bab85(0x9d))/0x7)+-parseInt(_0x5bab85(0xa4))/0x8+parseInt(_0x5bab85(0xa7))/0x9+parseInt(_0x5bab85(0xa5))/0xa*(parseInt(_0x5bab85(0x9e))/0xb);if(_0x5789d0===_0x3169c9)break;else _0x152d80['push'](_0x152d80['shift']());}catch(_0x523a45){_0x152d80['push'](_0x152d80['shift']());}}}(a115_0x56b3,0xce810));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a115_0x404802 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x136ece){const _0xe2f8be=a115_0x1fce,{appcode:_0xe6385,env:_0x5bf403,autoYes:_0x40fdf7}=_0x136ece,_0x4269a4=process[_0xe2f8be(0xbc)]();if(getProjectConfigPath())throw new Error(_0xe2f8be(0xb2));let _0x342a23;for(const _0xe7dda0 of LEGACY_CONFIG_NAMES){const _0x371d96=resolve(_0x4269a4,_0xe7dda0);if(existsSync(_0x371d96)){_0x342a23=_0x371d96;break;}}if(_0x342a23){let _0x54a119={};try{_0x54a119=JSON['parse'](readFileSync(_0x342a23,_0xe2f8be(0xa2)));}catch{}const _0x7991d1=basename(_0x342a23),_0xa226d9=_0x54a119?.[_0xe2f8be(0xa8)]||_0x54a119?.['app'];let _0x1d01df=_0x40fdf7;!_0x40fdf7&&(console[_0xe2f8be(0xae)](a115_0x404802['yellow']('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a115_0x404802['bold'](_0x7991d1))),_0xa226d9&&console[_0xe2f8be(0xae)](a115_0x404802[_0xe2f8be(0xbf)](_0xe2f8be(0xb9)+_0xa226d9)),_0x1d01df=await confirm({'message':_0xe2f8be(0xab)+a115_0x404802[_0xe2f8be(0xa6)]('.rabetbase.json')+_0xe2f8be(0xac),'default':!![]}));if(!_0x1d01df){console[_0xe2f8be(0xae)](_0xe2f8be(0x98)+CLI_BIN_NAME+_0xe2f8be(0xb8));return;}const _0x6dff79=resolve(_0x4269a4,NEW_CONFIG_NAME),_0x16fec7=getCliVersionFromPkg(),_0x8be981=readRawConfig(),_0x5af1d4=_0xe6385||(typeof _0x54a119?.[_0xe2f8be(0xa8)]==='string'?_0x54a119[_0xe2f8be(0xa8)]:undefined)||(typeof _0x54a119?.[_0xe2f8be(0x90)]===_0xe2f8be(0xa0)?_0x54a119[_0xe2f8be(0x90)]:undefined)||await askAppcode(),_0xc441f8=typeof _0x54a119?.[_0xe2f8be(0x9f)]===_0xe2f8be(0xa0)?_0x54a119[_0xe2f8be(0x9f)]:typeof _0x8be981[_0xe2f8be(0x9f)]===_0xe2f8be(0xa0)?_0x8be981[_0xe2f8be(0x9f)]:_0xe2f8be(0xb7),_0x34fa22=buildCanonicalProjectConfig({..._0x8be981,..._0x54a119},{'appCodes':[_0x5af1d4],'env':_0xc441f8,'metadata':{'version':_0x16fec7,'migratedAt':new Date()[_0xe2f8be(0xb0)](),'migratedFrom':_0x342a23}});writeConfigFile(_0x6dff79,_0x34fa22);const _0x479e48=_0x342a23+_0xe2f8be(0xb6);renameSync(_0x342a23,_0x479e48),logger[_0xe2f8be(0xaf)](_0x4269a4),logger[_0xe2f8be(0x91)](_0xe2f8be(0xb3),_0xe2f8be(0xb4),{'from':_0x342a23,'to':_0x6dff79,'appcode':_0x5af1d4,'env':_0x34fa22[_0xe2f8be(0x9f)]}),console[_0xe2f8be(0xae)](a115_0x404802[_0xe2f8be(0x95)](_0xe2f8be(0x92)+_0x7991d1+_0xe2f8be(0x9a))),console[_0xe2f8be(0xae)](a115_0x404802['cyan'](_0xe2f8be(0xbb)+Object[_0xe2f8be(0xb5)](_0x34fa22[_0xe2f8be(0xbe)]||{})['join'](',\x20'))),console[_0xe2f8be(0xae)](a115_0x404802[_0xe2f8be(0xbf)]('\x20\x20Default:\x20'+_0x34fa22[_0xe2f8be(0x97)])),console['log'](a115_0x404802[_0xe2f8be(0x93)](_0xe2f8be(0x8f)+_0x7991d1+'.bak'));return;}const _0x5de6cc=_0xe6385||await askAppcode(),_0x137cf6=resolve(_0x4269a4,NEW_CONFIG_NAME),_0x2b9523=getCliVersionFromPkg(),_0x5330be=readRawConfig(),_0x940d2b=typeof _0x5330be[_0xe2f8be(0x9f)]===_0xe2f8be(0xa0)?_0x5330be[_0xe2f8be(0x9f)]:undefined,_0xd87426=buildCanonicalProjectConfig({},{'appCodes':[_0x5de6cc],'env':_0x5bf403||_0x940d2b||_0xe2f8be(0xb7),'metadata':{'version':_0x2b9523,'createdAt':new Date()[_0xe2f8be(0xb0)]()}});writeConfigFile(_0x137cf6,_0xd87426),logger[_0xe2f8be(0xaf)](_0x4269a4),logger[_0xe2f8be(0x91)]('init',_0xe2f8be(0xa3),{'appcode':_0x5de6cc,'env':_0xd87426[_0xe2f8be(0x9f)],'version':_0xd87426[_0xe2f8be(0x8e)],'configPath':_0x137cf6}),console[_0xe2f8be(0xae)](a115_0x404802[_0xe2f8be(0x95)](_0xe2f8be(0x99))),console['log'](a115_0x404802[_0xe2f8be(0xbf)](_0xe2f8be(0xbb)+Object['keys'](_0xd87426[_0xe2f8be(0xbe)]||{})[_0xe2f8be(0xaa)](',\x20'))),console['log'](a115_0x404802[_0xe2f8be(0xbf)](_0xe2f8be(0xa1)+_0xd87426[_0xe2f8be(0x97)])),console[_0xe2f8be(0xae)](_0xe2f8be(0x9c)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+_0xe2f8be(0xbd));}function a115_0x1fce(_0x207678,_0x190c37){_0x207678=_0x207678-0x8d;const _0x56b317=a115_0x56b3();let _0x1fce65=_0x56b317[_0x207678];return _0x1fce65;}function askAppcode(){const _0x279df5=a115_0x1fce;return input({'message':_0x279df5(0xb1),'validate':_0x54f8e7=>{const _0xb4d91b=_0x279df5;if(!_0x54f8e7[_0xb4d91b(0x94)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x5e1abb,message:_0x58b99c}=validateAppcode(_0x54f8e7['trim']());return _0x5e1abb||_0x58b99c||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x4eb4f6=a115_0x1fce;try{const _0x2fb013=fileURLToPath(import.meta.url),_0x4d606a=resolve(dirname(_0x2fb013),'../..'),_0x3d24fb=JSON['parse'](readFileSync(resolve(_0x4d606a,_0x4eb4f6(0xba)),_0x4eb4f6(0xa2)));return _0x3d24fb[_0x4eb4f6(0x8e)]||_0x4eb4f6(0x96);}catch{return _0x4eb4f6(0x96);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a115_0x3352(){const _0x3d9968=['inherit','64696oiaUGl','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Step\x204/7:\x20Cleaning\x20MCP\x20config...','needsSkillSwap','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','\x20\x20Step\x20','parse','\x20\x20New\x20config\x20(.rabetbase.json):\x20','lovrabet/rabetbase\x20installed\x20globally','CANCEL','\x20→\x20','gray','.cursor/mcp.json','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','filter','keys','skipped\x20(no\x20legacy\x20config)','utf8','hasNewConfig','isDirectory','skipped','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','succeed','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','fail','\x20\x20npm\x20install','push','label','lovrabet/rabetbase','green','yes','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','\x20\x20\x20\x20\x20\x20\x20','cyan','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','502962kyhPAH','package.json','args','includes','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','oldPath','start','needed','Clean\x20MCP\x20config','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','Legacy\x20artifacts:','===\x20Upgrade\x20Summary\x20===','105ToCFNE','object','.lovrabet','failed','error','\x20from\x20','not\x20found\x20or\x20already\x20at\x20latest','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','\x20→\x20keys:\x20','detail','87459eJLbdw','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','done','length','no\x20matching\x20entry\x20found','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','34656vyFZTD','sdkUpgrade','Remove\x20.lovrabet/','undefined','already\x20exists\x20(will\x20merge)','3257170mCvrdV','not\x20needed','mcpServers','.bak','Remove\x20old\x20skill','12410892idyuhn','@lovrabet/sdk','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','MCP\x20config:','@lovrabet/sdk:','46IQbcdg','@lovrabet/dataset-mcp-server','Step\x205/7:\x20Removing\x20old\x20skill...','status','\x20\x20#\x20or','Proceed\x20with\x20upgrade?','oldMcpConfig','10dlAAZe','path','\x20\x20Current\x20version\x20in\x20','files','log','message','not\x20found\x20(will\x20create)','red','stringify','FAIL','string','white','Upgrade\x20cancelled.','isArray','some','bold','exit\x20','6052528NyCWjZ','yellow','\x20→\x20latest','.claude/skills/lovrabet','join','\x20removed','devDependencies','configMigration','fields','step','removed\x20','cwd','Upgrade\x20completed\x20successfully!','latest','FOUND','Config\x20migration','oldArtifacts','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','Step\x201/7:\x20Config\x20migration\x20—\x20','entries','Upgrade\x20@lovrabet/sdk'];a115_0x3352=function(){return _0x3d9968;};return a115_0x3352();}const a115_0x411376=a115_0x150d;(function(_0x5b2038,_0x20bd6b){const _0x1c116b=a115_0x150d,_0x22b904=_0x5b2038();while(!![]){try{const _0x6679e1=parseInt(_0x1c116b(0x21f))/0x1+-parseInt(_0x1c116b(0x22e))/0x2*(-parseInt(_0x1c116b(0x219))/0x3)+parseInt(_0x1c116b(0x1df))/0x4*(-parseInt(_0x1c116b(0x20f))/0x5)+-parseInt(_0x1c116b(0x203))/0x6+-parseInt(_0x1c116b(0x224))/0x7+-parseInt(_0x1c116b(0x246))/0x8+parseInt(_0x1c116b(0x229))/0x9*(parseInt(_0x1c116b(0x235))/0xa);if(_0x6679e1===_0x20bd6b)break;else _0x22b904['push'](_0x22b904['shift']());}catch(_0x104d57){_0x22b904['push'](_0x22b904['shift']());}}}(a115_0x3352,0x6b216));import a115_0x586797 from'chalk';import a115_0x4e291e from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';function a115_0x150d(_0x4a4ef3,_0x4cd806){_0x4a4ef3=_0x4a4ef3-0x1d8;const _0x33528b=a115_0x3352();let _0x150dbd=_0x33528b[_0x4a4ef3];return _0x150dbd;}import{resolve}from'node:path';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[a115_0x411376(0x1ed)](_0x424c89=>_0x424c89!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x28b9cf){const _0x5676e8=a115_0x411376,_0x12796b=[];for(const _0x54a222 of Object['values'](CORE_IDE_CONFIGS)){if(_0x54a222[_0x5676e8(0x238)])for(const _0x3e1804 of _0x54a222[_0x5676e8(0x238)]){_0x12796b[_0x5676e8(0x1f9)](resolve(_0x28b9cf,_0x3e1804['path']));}}return _0x12796b;}function analyse(_0x373087){const _0x3f520f=a115_0x411376;let _0x2beb7f=null;const _0x17ff81=resolve(_0x373087,NEW_CONFIG_NAME),_0x24e46e=existsSync(_0x17ff81);for(const _0x405019 of LEGACY_CONFIG_NAMES){const _0x18d32c=resolve(_0x373087,_0x405019);if(existsSync(_0x18d32c)){const _0x49fc26=readConfigFile(_0x18d32c),_0x157371=Object[_0x3f520f(0x1ee)](_0x49fc26)[_0x3f520f(0x1ed)](_0x1deae1=>typeof _0x49fc26[_0x1deae1]!==_0x3f520f(0x222));_0x2beb7f={'oldPath':_0x18d32c,'hasNewConfig':_0x24e46e,'fields':_0x157371};break;}}const _0x30df35=[],_0x42e442=resolve(_0x373087,_0x3f520f(0x211));if(existsSync(_0x42e442))_0x30df35[_0x3f520f(0x1f9)](_0x42e442);const _0x478a97=resolve(_0x373087,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x478a97))_0x30df35[_0x3f520f(0x1f9)](_0x478a97);const _0x1eca90=resolve(_0x373087,_0x3f520f(0x249));if(existsSync(_0x1eca90))_0x30df35[_0x3f520f(0x1f9)](_0x1eca90);for(const _0x19f5e3 of collectIdeSkillFiles(_0x373087)){if(existsSync(_0x19f5e3))_0x30df35[_0x3f520f(0x1f9)](_0x19f5e3);}let _0x4400f2=null;const _0x547980=resolve(_0x373087,_0x3f520f(0x1eb));if(existsSync(_0x547980))try{const _0x12e49c=JSON['parse'](readFileSync(_0x547980,_0x3f520f(0x1f0)));if(_0x12e49c?.[_0x3f520f(0x226)]&&typeof _0x12e49c[_0x3f520f(0x226)]==='object'){const _0x5d7505=[];for(const [_0x5144f4,_0xd49b81]of Object[_0x3f520f(0x1dc)](_0x12e49c[_0x3f520f(0x226)])){const _0x4cdce2=_0xd49b81;_0x4cdce2?.[_0x3f520f(0x205)]&&Array[_0x3f520f(0x242)](_0x4cdce2['args'])&&_0x4cdce2[_0x3f520f(0x205)][_0x3f520f(0x243)](_0x2dde92=>typeof _0x2dde92===_0x3f520f(0x23f)&&_0x2dde92[_0x3f520f(0x206)](_0x3f520f(0x22f)))&&_0x5d7505[_0x3f520f(0x1f9)](_0x5144f4);}_0x5d7505[_0x3f520f(0x21c)]>0x0&&(_0x4400f2={'path':_0x547980,'keys':_0x5d7505});}}catch{}const _0x271da6=_0x30df35['length']>0x0||_0x2beb7f!==null;let _0x47dcda=null;const _0x327121=resolve(_0x373087,_0x3f520f(0x204));if(existsSync(_0x327121))try{const _0x4a2663=JSON['parse'](readFileSync(_0x327121,_0x3f520f(0x1f0)));for(const _0x294700 of['dependencies',_0x3f520f(0x24c)]){const _0x515780=_0x4a2663?.[_0x294700]?.[_0x3f520f(0x22a)];if(typeof _0x515780===_0x3f520f(0x23f)){_0x515780!==_0x3f520f(0x253)&&(_0x47dcda={'pkgPath':_0x327121,'currentVersion':_0x515780,'field':_0x294700});break;}}}catch{}return{'configMigration':_0x2beb7f,'oldArtifacts':_0x30df35,'oldMcpConfig':_0x4400f2,'needsSkillSwap':_0x271da6,'sdkUpgrade':_0x47dcda};}function printReport(_0x241c11){const _0x33eeef=a115_0x411376,{configMigration:_0x1f74c2,oldArtifacts:_0x331581,oldMcpConfig:_0x1fb2f1,needsSkillSwap:_0x2a880d}=_0x241c11;console[_0x33eeef(0x239)](''),console['log'](a115_0x586797[_0x33eeef(0x244)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x33eeef(0x239)]('');_0x1f74c2?(console[_0x33eeef(0x239)](a115_0x586797[_0x33eeef(0x200)]('Config\x20file:')+('\x20\x20'+a115_0x586797[_0x33eeef(0x247)](_0x1f74c2[_0x33eeef(0x208)]))),console[_0x33eeef(0x239)](_0x33eeef(0x1e6)+(_0x1f74c2[_0x33eeef(0x1f1)]?a115_0x586797[_0x33eeef(0x1fc)](_0x33eeef(0x223)):a115_0x586797[_0x33eeef(0x1ea)](_0x33eeef(0x23b)))),console[_0x33eeef(0x239)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x1f74c2[_0x33eeef(0x24e)][_0x33eeef(0x24a)](',\x20')),console[_0x33eeef(0x239)]('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console['log'](a115_0x586797[_0x33eeef(0x200)]('Config\x20file:')+'\x20\x20'+a115_0x586797['gray']('no\x20legacy\x20config\x20found'));console[_0x33eeef(0x239)]('');if(_0x331581[_0x33eeef(0x21c)]>0x0){console['log'](a115_0x586797[_0x33eeef(0x200)](_0x33eeef(0x20d)));for(const _0x2d7971 of _0x331581){console['log']('\x20\x20'+a115_0x586797[_0x33eeef(0x23c)](_0x33eeef(0x254))+'\x20\x20'+_0x2d7971);}console[_0x33eeef(0x239)]('\x20\x20Action:\x20delete');}else console[_0x33eeef(0x239)](a115_0x586797[_0x33eeef(0x200)](_0x33eeef(0x20d))+'\x20\x20'+a115_0x586797['gray']('none\x20found'));console[_0x33eeef(0x239)]('');_0x1fb2f1?(console['log'](a115_0x586797[_0x33eeef(0x200)](_0x33eeef(0x22c))+('\x20\x20'+a115_0x586797[_0x33eeef(0x247)](_0x1fb2f1[_0x33eeef(0x236)])+_0x33eeef(0x217)+_0x1fb2f1[_0x33eeef(0x1ee)][_0x33eeef(0x24a)](',\x20'))),console[_0x33eeef(0x239)](_0x33eeef(0x216))):console['log'](a115_0x586797['cyan']('MCP\x20config:')+'\x20\x20'+a115_0x586797['gray']('no\x20legacy\x20entry'));console[_0x33eeef(0x239)](''),console[_0x33eeef(0x239)](a115_0x586797[_0x33eeef(0x200)]('Skill\x20swap:')+('\x20\x20'+(_0x2a880d?a115_0x586797[_0x33eeef(0x247)](_0x33eeef(0x20a)):a115_0x586797[_0x33eeef(0x1fc)](_0x33eeef(0x225)))));_0x2a880d&&console[_0x33eeef(0x239)](_0x33eeef(0x1f4)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x241c11[_0x33eeef(0x220)]){const {currentVersion:_0x3991e7,field:_0x5bea99,pkgPath:_0x593a60}=_0x241c11['sdkUpgrade'];console['log'](a115_0x586797['cyan']('@lovrabet/sdk:')+('\x20\x20'+a115_0x586797[_0x33eeef(0x247)](_0x593a60))),console[_0x33eeef(0x239)](_0x33eeef(0x237)+_0x5bea99+':\x20'+a115_0x586797[_0x33eeef(0x247)](_0x3991e7)+_0x33eeef(0x1e9)+a115_0x586797['green'](_0x33eeef(0x253))),console[_0x33eeef(0x239)](_0x33eeef(0x201));}else console[_0x33eeef(0x239)](a115_0x586797[_0x33eeef(0x200)](_0x33eeef(0x22d))+'\x20\x20'+a115_0x586797[_0x33eeef(0x1ea)](_0x33eeef(0x215)));console[_0x33eeef(0x239)]('');}function execConfigMigration(_0x465f2d,_0x4f1618){const _0x4e7818=a115_0x411376,{configMigration:_0x284ee3}=_0x465f2d;if(!_0x284ee3?.[_0x4e7818(0x208)])return{'step':0x1,'label':_0x4e7818(0x1d8),'ok':!![],'detail':_0x4e7818(0x1ef)};const _0x5ce7cc=readConfigFile(_0x284ee3[_0x4e7818(0x208)]),_0x4101fd=resolve(_0x4f1618,NEW_CONFIG_NAME),_0xf3032=_0x284ee3[_0x4e7818(0x1f1)]?readConfigFile(_0x4101fd):{};for(const [_0x303f85,_0x413662]of Object[_0x4e7818(0x1dc)](_0x5ce7cc)){!(_0x303f85 in _0xf3032)&&(_0xf3032[_0x303f85]=_0x413662);}writeConfigFile(_0x4101fd,_0xf3032);const _0x4bc694=_0x284ee3[_0x4e7818(0x208)]+_0x4e7818(0x227);return renameSync(_0x284ee3[_0x4e7818(0x208)],_0x4bc694),{'step':0x1,'label':_0x4e7818(0x1d8),'ok':!![],'detail':_0x284ee3[_0x4e7818(0x208)]+_0x4e7818(0x1e9)+_0x4101fd+'\x20(backup:\x20'+_0x4bc694+')'};}function execRemoveOldArtifacts(_0x1f790d){const _0x24289d=a115_0x411376,_0x5cb606=[];for(const _0x266a03 of _0x1f790d){try{if(!existsSync(_0x266a03))continue;const _0x399a9e=tryStat(_0x266a03);_0x399a9e?.[_0x24289d(0x1f2)]()?rmSync(_0x266a03,{'recursive':!![],'force':!![]}):unlinkSync(_0x266a03);}catch(_0x481984){_0x5cb606[_0x24289d(0x1f9)](_0x266a03+':\x20'+_0x481984[_0x24289d(0x23a)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x5cb606['length']===0x0,'detail':_0x5cb606[_0x24289d(0x21c)]>0x0?_0x1f790d[_0x24289d(0x21c)]-_0x5cb606[_0x24289d(0x21c)]+'/'+_0x1f790d[_0x24289d(0x21c)]+'\x20removed\x20('+_0x5cb606['join'](';\x20')+')':_0x1f790d[_0x24289d(0x21c)]+_0x24289d(0x24b)};}function execCleanMcp(_0x45c9da){const _0x983941=a115_0x411376;if(!_0x45c9da[_0x983941(0x234)])return{'step':0x4,'label':_0x983941(0x20b),'ok':!![],'detail':_0x983941(0x1f3)};try{const _0x1687dd=readFileSync(_0x45c9da[_0x983941(0x234)][_0x983941(0x236)],_0x983941(0x1f0)),_0x4e4a6f=JSON['parse'](_0x1687dd);if(_0x4e4a6f?.[_0x983941(0x226)]&&typeof _0x4e4a6f['mcpServers']===_0x983941(0x210)){const _0x8d01ed=[];for(const [_0x9a6b7b,_0x24f8e1]of Object[_0x983941(0x1dc)](_0x4e4a6f[_0x983941(0x226)])){_0x24f8e1?.['args']&&Array[_0x983941(0x242)](_0x24f8e1['args'])&&_0x24f8e1[_0x983941(0x205)]['some'](_0x21a3c1=>typeof _0x21a3c1===_0x983941(0x23f)&&_0x21a3c1[_0x983941(0x206)](_0x983941(0x22f)))&&_0x8d01ed[_0x983941(0x1f9)](_0x9a6b7b);}for(const _0x4e1678 of _0x8d01ed){delete _0x4e4a6f[_0x983941(0x226)][_0x4e1678];}return _0x8d01ed[_0x983941(0x21c)]>0x0&&writeFileSync(_0x45c9da[_0x983941(0x234)][_0x983941(0x236)],JSON[_0x983941(0x23d)](_0x4e4a6f,null,0x2)+'\x0a',_0x983941(0x1f0)),{'step':0x4,'label':_0x983941(0x20b),'ok':!![],'detail':_0x983941(0x250)+_0x8d01ed[_0x983941(0x24a)](',\x20')+_0x983941(0x214)+_0x45c9da[_0x983941(0x234)][_0x983941(0x236)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x983941(0x21d)};}catch(_0x422789){return{'step':0x4,'label':_0x983941(0x20b),'ok':![],'detail':_0x422789[_0x983941(0x23a)]};}}function execSkillsRemove(_0x14cf2b,_0x11a47f){const _0x41b624=a115_0x411376,_0x483730=runNpxSkillsRemove(_0x14cf2b,{'stdio':_0x41b624(0x1de),'yes':_0x11a47f});return{'step':0x5,'label':_0x41b624(0x228),'ok':_0x483730['ok'],'detail':_0x483730['ok']?'lovrabet/lovrabet-skill\x20removed':_0x483730[_0x41b624(0x213)]??_0x41b624(0x245)+_0x483730[_0x41b624(0x231)]};}function execSkillsAdd(_0x1a015a,_0x300b90){const _0xf01e61=a115_0x411376,_0x127085=runNpxSkillsAddGlobal(_0x1a015a,_0xf01e61(0x1fb),{'stdio':_0xf01e61(0x1de),'yes':_0x300b90});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x127085['ok'],'detail':_0x127085['ok']?_0xf01e61(0x1e7):_0x127085[_0xf01e61(0x213)]??_0xf01e61(0x245)+_0x127085['status']};}function execUpgradeSdk(_0x406198){const _0x16fd9d=a115_0x411376;if(!_0x406198[_0x16fd9d(0x220)])return{'step':0x7,'label':_0x16fd9d(0x1dd),'ok':!![],'detail':_0x16fd9d(0x202)};const {pkgPath:_0x4d84b2,currentVersion:_0x5c4c6f,field:_0x1b7e88}=_0x406198[_0x16fd9d(0x220)];try{const _0x1a97cb=readFileSync(_0x4d84b2,_0x16fd9d(0x1f0)),_0x117c7f=JSON[_0x16fd9d(0x1e5)](_0x1a97cb);return _0x117c7f[_0x1b7e88]['@lovrabet/sdk']=_0x16fd9d(0x253),writeFileSync(_0x4d84b2,JSON['stringify'](_0x117c7f,null,0x2)+'\x0a',_0x16fd9d(0x1f0)),{'step':0x7,'label':_0x16fd9d(0x1dd),'ok':!![],'detail':_0x1b7e88+'[\x22@lovrabet/sdk\x22]:\x20'+_0x5c4c6f+_0x16fd9d(0x248)};}catch(_0x2fc151){return{'step':0x7,'label':_0x16fd9d(0x1dd),'ok':![],'detail':_0x2fc151[_0x16fd9d(0x23a)]};}}function tryStat(_0x1d8be7){try{return statSync(_0x1d8be7);}catch{return undefined;}}function printSummary(_0x6d36c1){const _0x3e8621=a115_0x411376;console['log'](''),console[_0x3e8621(0x239)](a115_0x586797[_0x3e8621(0x244)](_0x3e8621(0x20e))),console[_0x3e8621(0x239)]('');for(const _0x200b5b of _0x6d36c1){const _0x37597a=_0x200b5b['ok']?a115_0x586797['green']('OK'):a115_0x586797[_0x3e8621(0x23c)](_0x3e8621(0x23e));console[_0x3e8621(0x239)]('\x20\x20'+_0x37597a+_0x3e8621(0x1e4)+_0x200b5b[_0x3e8621(0x24f)]+':\x20'+_0x200b5b[_0x3e8621(0x1fa)]);if(_0x200b5b[_0x3e8621(0x218)])console[_0x3e8621(0x239)](_0x3e8621(0x1ff)+a115_0x586797['gray'](_0x200b5b[_0x3e8621(0x218)]));}console[_0x3e8621(0x239)]('');}export async function upgradeApp(_0x5a46a4,_0x50108b){const _0x58af5c=a115_0x411376,_0x35a9ab=process[_0x58af5c(0x251)](),_0x5e8f22=analyse(_0x35a9ab),_0x13be67=!_0x5e8f22[_0x58af5c(0x24d)]&&_0x5e8f22[_0x58af5c(0x1d9)][_0x58af5c(0x21c)]===0x0&&!_0x5e8f22['oldMcpConfig']&&!_0x5e8f22[_0x58af5c(0x1e2)]&&!_0x5e8f22['sdkUpgrade'];if(_0x13be67){console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x1fc)](_0x58af5c(0x1fe)));return;}printReport(_0x5e8f22);const _0x475af0=!!(_0x50108b[_0x58af5c(0x1fd)]||_0x50108b['Y']||_0x5a46a4);if(!_0x475af0)try{const _0x292cfc=await askConfirm(_0x58af5c(0x233));if(!_0x292cfc){console[_0x58af5c(0x239)](a115_0x586797['gray'](_0x58af5c(0x241)));return;}}catch(_0x4c9657){if(_0x4c9657?.[_0x58af5c(0x23a)]===_0x58af5c(0x1e8)){console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x1ea)](_0x58af5c(0x241)));return;}throw _0x4c9657;}const _0x3dd3c4=[],_0x29f9c5=a115_0x4e291e({'text':'Step\x201/7:\x20Migrating\x20config...','color':'cyan'})[_0x58af5c(0x209)](),_0x1084ad=execConfigMigration(_0x5e8f22,_0x35a9ab);_0x3dd3c4[_0x58af5c(0x1f9)](_0x1084ad),_0x29f9c5[_0x1084ad['ok']?'succeed':_0x58af5c(0x1f7)](_0x58af5c(0x1db)+(_0x1084ad[_0x58af5c(0x218)]??(_0x1084ad['ok']?_0x58af5c(0x21b):_0x58af5c(0x212))));const _0x21869=resolve(_0x35a9ab,'.lovrabet'),_0x3ee119=a115_0x4e291e({'text':_0x58af5c(0x1da),'color':'cyan'})[_0x58af5c(0x209)]();if(existsSync(_0x21869))try{rmSync(_0x21869,{'recursive':!![],'force':!![]}),_0x3ee119['succeed'](_0x58af5c(0x21e)),_0x3dd3c4[_0x58af5c(0x1f9)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x53b47a){_0x3ee119[_0x58af5c(0x1f7)](_0x58af5c(0x22b)+_0x53b47a['message']),_0x3dd3c4[_0x58af5c(0x1f9)]({'step':0x2,'label':_0x58af5c(0x221),'ok':![],'detail':_0x53b47a[_0x58af5c(0x23a)]});}else _0x3ee119['info'](_0x58af5c(0x1f6)),_0x3dd3c4[_0x58af5c(0x1f9)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x58af5c(0x1f3)});const _0x28df1a=a115_0x4e291e({'text':_0x58af5c(0x1ec),'color':'cyan'})[_0x58af5c(0x209)](),_0x5b2e0f=execRemoveOldArtifacts(_0x5e8f22[_0x58af5c(0x1d9)]);_0x3dd3c4['push'](_0x5b2e0f),_0x28df1a[_0x5b2e0f['ok']?_0x58af5c(0x1f5):_0x58af5c(0x1f7)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x5b2e0f['detail']??(_0x5b2e0f['ok']?'done':_0x58af5c(0x212))));const _0x1161d6=a115_0x4e291e({'text':_0x58af5c(0x1e1),'color':_0x58af5c(0x200)})[_0x58af5c(0x209)](),_0x2a827b=execCleanMcp(_0x5e8f22);_0x3dd3c4[_0x58af5c(0x1f9)](_0x2a827b),_0x1161d6[_0x2a827b['ok']?_0x58af5c(0x1f5):_0x58af5c(0x1f7)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x2a827b[_0x58af5c(0x218)]??(_0x2a827b['ok']?'done':_0x58af5c(0x212))));const _0x1f7a13=a115_0x4e291e({'text':_0x58af5c(0x230),'color':_0x58af5c(0x200)})[_0x58af5c(0x209)](),_0x53d97b=execSkillsRemove(_0x35a9ab,_0x475af0);_0x3dd3c4['push'](_0x53d97b),_0x1f7a13[_0x53d97b['ok']?'succeed':_0x58af5c(0x1f7)]('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x53d97b[_0x58af5c(0x218)]??(_0x53d97b['ok']?_0x58af5c(0x21b):_0x58af5c(0x212))));const _0x3b1ab0=a115_0x4e291e({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':_0x58af5c(0x200)})[_0x58af5c(0x209)](),_0x5f1796=execSkillsAdd(_0x35a9ab,_0x475af0);_0x3dd3c4[_0x58af5c(0x1f9)](_0x5f1796),_0x3b1ab0[_0x5f1796['ok']?_0x58af5c(0x1f5):'fail'](_0x58af5c(0x1e0)+(_0x5f1796[_0x58af5c(0x218)]??(_0x5f1796['ok']?_0x58af5c(0x21b):_0x58af5c(0x212))));const _0x315784=a115_0x4e291e({'text':_0x58af5c(0x20c),'color':'cyan'})['start'](),_0x2d0734=execUpgradeSdk(_0x5e8f22);_0x3dd3c4[_0x58af5c(0x1f9)](_0x2d0734),_0x315784[_0x2d0734['ok']?_0x58af5c(0x1f5):_0x58af5c(0x1f7)](_0x58af5c(0x207)+(_0x2d0734['detail']??(_0x2d0734['ok']?_0x58af5c(0x21b):_0x58af5c(0x212)))),printSummary(_0x3dd3c4);const _0x4fe1c8=_0x3dd3c4[_0x58af5c(0x243)](_0xfa9df6=>!_0xfa9df6['ok']);_0x4fe1c8?console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x247)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console['log'](a115_0x586797[_0x58af5c(0x1fc)](_0x58af5c(0x252))),_0x2d0734['ok']&&_0x5e8f22[_0x58af5c(0x220)]&&(console[_0x58af5c(0x239)](''),console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x244)][_0x58af5c(0x200)](_0x58af5c(0x1e3))),console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x200)](_0x58af5c(0x21a))),console['log'](''),console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x240)](_0x58af5c(0x1f8))),console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x240)](_0x58af5c(0x232))),console['log'](a115_0x586797['white']('\x20\x20bun\x20install')),console[_0x58af5c(0x239)](''));}
|
|
1
|
+
const a116_0x4b40f6=a116_0x4799;(function(_0x4197e8,_0x552440){const _0x4769b3=a116_0x4799,_0x4a43f0=_0x4197e8();while(!![]){try{const _0x11b658=parseInt(_0x4769b3(0x1c4))/0x1+parseInt(_0x4769b3(0x1b1))/0x2+-parseInt(_0x4769b3(0x1c8))/0x3+parseInt(_0x4769b3(0x209))/0x4+parseInt(_0x4769b3(0x1af))/0x5+parseInt(_0x4769b3(0x21e))/0x6*(-parseInt(_0x4769b3(0x224))/0x7)+-parseInt(_0x4769b3(0x22a))/0x8*(-parseInt(_0x4769b3(0x1bb))/0x9);if(_0x11b658===_0x552440)break;else _0x4a43f0['push'](_0x4a43f0['shift']());}catch(_0x336541){_0x4a43f0['push'](_0x4a43f0['shift']());}}}(a116_0x244d,0x536e3));import a116_0x49b081 from'chalk';import a116_0x529828 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';function a116_0x244d(){const _0xdb8fb5=['undefined','Step\x201/7:\x20Migrating\x20config...','white','yes','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','\x20removed','.bak','string','@lovrabet/sdk','gray','skipped','CANCEL','no\x20legacy\x20entry','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','files','Upgrade\x20completed\x20successfully!','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','utf8','Step\x206/7:\x20Installing\x20new\x20skill...','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Remove\x20old\x20skill','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','\x20\x20#\x20or','\x20\x20Step\x20','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','error','includes','cyan','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','label','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','fail','Step\x204/7:\x20Cleaning\x20MCP\x20config...','@lovrabet/sdk:','\x20→\x20latest','push','Clean\x20MCP\x20config','join','none\x20found','FAIL','sdkUpgrade','path','.cursor/mcp.json','\x20from\x20','Remove\x20.lovrabet/','detail','parse','exit\x20','step','.lovrabet','Upgrade\x20@lovrabet/sdk','some','mcpServers','failed','start','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','no\x20matching\x20entry\x20found','inherit','535584sSjpPg','Step\x204/7:\x20MCP\x20config\x20—\x20','Config\x20migration','\x20\x20Action:\x20delete','keys','lovrabet/rabetbase\x20installed\x20globally','\x20\x20npm\x20install','already\x20exists\x20(will\x20merge)','FOUND','succeed','values','lovrabet/rabetbase','.claude/skills/lovrabet','Config\x20file:','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','lovrabet/lovrabet-skill\x20removed','dependencies','args','status','devDependencies','info','24GbPvBq','\x20(backup:\x20','Upgrade\x20cancelled.','@lovrabet/dataset-mcp-server','skipped\x20(no\x20legacy\x20config)','not\x20found\x20or\x20already\x20at\x20latest','1148609MdXBJr','MCP\x20config:','green','red','object','oldMcpConfig','40tGMXqY','package.json','\x20→\x20','needed','143150jSRtYm','entries','562598UjKlzO','no\x20legacy\x20config\x20found','bold','oldPath','filter','stringify','message','[\x22@lovrabet/sdk\x22]:\x20','latest','oldArtifacts','510795xDvQpr','.cursor/rules/lovrabet_rules.mdc','Install\x20new\x20skill','done','length','\x20\x20\x20\x20\x20\x20\x20','hasNewConfig','Skill\x20swap:','yellow','462971JFmyeZ','configMigration','fields','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','577476sbJMRP','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','log'];a116_0x244d=function(){return _0xdb8fb5;};return a116_0x244d();}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[a116_0x4b40f6(0x1b5)](_0x1bc44f=>_0x1bc44f!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x1c0c76){const _0x3f0abd=a116_0x4b40f6,_0x3cbed8=[];for(const _0xd71aa1 of Object[_0x3f0abd(0x213)](CORE_IDE_CONFIGS)){if(_0xd71aa1['files'])for(const _0xa07b12 of _0xd71aa1[_0x3f0abd(0x1db)]){_0x3cbed8[_0x3f0abd(0x1f2)](resolve(_0x1c0c76,_0xa07b12[_0x3f0abd(0x1f8)]));}}return _0x3cbed8;}function analyse(_0x3ab195){const _0x26f449=a116_0x4b40f6;let _0x274fa1=null;const _0x91bdd1=resolve(_0x3ab195,NEW_CONFIG_NAME),_0x2bcc63=existsSync(_0x91bdd1);for(const _0x22189d of LEGACY_CONFIG_NAMES){const _0x4476e9=resolve(_0x3ab195,_0x22189d);if(existsSync(_0x4476e9)){const _0x3c696c=readConfigFile(_0x4476e9),_0x31cf04=Object[_0x26f449(0x20d)](_0x3c696c)['filter'](_0x2d7c90=>typeof _0x3c696c[_0x2d7c90]!==_0x26f449(0x1cb));_0x274fa1={'oldPath':_0x4476e9,'hasNewConfig':_0x2bcc63,'fields':_0x31cf04};break;}}const _0x48c173=[],_0x32d023=resolve(_0x3ab195,_0x26f449(0x200));if(existsSync(_0x32d023))_0x48c173[_0x26f449(0x1f2)](_0x32d023);const _0x2714fe=resolve(_0x3ab195,_0x26f449(0x1bc));if(existsSync(_0x2714fe))_0x48c173['push'](_0x2714fe);const _0x415487=resolve(_0x3ab195,_0x26f449(0x215));if(existsSync(_0x415487))_0x48c173[_0x26f449(0x1f2)](_0x415487);for(const _0x46ffad of collectIdeSkillFiles(_0x3ab195)){if(existsSync(_0x46ffad))_0x48c173['push'](_0x46ffad);}let _0x584780=null;const _0x325316=resolve(_0x3ab195,_0x26f449(0x1f9));if(existsSync(_0x325316))try{const _0xdaeb76=JSON[_0x26f449(0x1fd)](readFileSync(_0x325316,'utf8'));if(_0xdaeb76?.[_0x26f449(0x203)]&&typeof _0xdaeb76[_0x26f449(0x203)]===_0x26f449(0x228)){const _0x780cda=[];for(const [_0x1d5989,_0x21884c]of Object[_0x26f449(0x1b0)](_0xdaeb76[_0x26f449(0x203)])){const _0x4b19b1=_0x21884c;_0x4b19b1?.['args']&&Array['isArray'](_0x4b19b1[_0x26f449(0x21a)])&&_0x4b19b1[_0x26f449(0x21a)]['some'](_0x5a817a=>typeof _0x5a817a===_0x26f449(0x1d3)&&_0x5a817a[_0x26f449(0x1e8)](_0x26f449(0x221)))&&_0x780cda[_0x26f449(0x1f2)](_0x1d5989);}_0x780cda[_0x26f449(0x1bf)]>0x0&&(_0x584780={'path':_0x325316,'keys':_0x780cda});}}catch{}const _0x4f53bc=_0x48c173[_0x26f449(0x1bf)]>0x0||_0x274fa1!==null;let _0x3ef77e=null;const _0x2e2712=resolve(_0x3ab195,_0x26f449(0x22b));if(existsSync(_0x2e2712))try{const _0x8e5865=JSON[_0x26f449(0x1fd)](readFileSync(_0x2e2712,_0x26f449(0x1de)));for(const _0x2c3bfb of[_0x26f449(0x219),_0x26f449(0x21c)]){const _0x3b1d26=_0x8e5865?.[_0x2c3bfb]?.[_0x26f449(0x1d4)];if(typeof _0x3b1d26===_0x26f449(0x1d3)){_0x3b1d26!==_0x26f449(0x1b9)&&(_0x3ef77e={'pkgPath':_0x2e2712,'currentVersion':_0x3b1d26,'field':_0x2c3bfb});break;}}}catch{}return{'configMigration':_0x274fa1,'oldArtifacts':_0x48c173,'oldMcpConfig':_0x584780,'needsSkillSwap':_0x4f53bc,'sdkUpgrade':_0x3ef77e};}function printReport(_0x3bbca8){const _0xf01661=a116_0x4b40f6,{configMigration:_0x5bb3c6,oldArtifacts:_0x546514,oldMcpConfig:_0x4f964c,needsSkillSwap:_0x38dc97}=_0x3bbca8;console[_0xf01661(0x1ca)](''),console['log'](a116_0x49b081[_0xf01661(0x1b3)]('===\x20Upgrade\x20Analysis\x20===')),console[_0xf01661(0x1ca)]('');_0x5bb3c6?(console[_0xf01661(0x1ca)](a116_0x49b081[_0xf01661(0x1e9)](_0xf01661(0x216))+('\x20\x20'+a116_0x49b081[_0xf01661(0x1c3)](_0x5bb3c6[_0xf01661(0x1b4)]))),console['log']('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x5bb3c6[_0xf01661(0x1c1)]?a116_0x49b081['green'](_0xf01661(0x210)):a116_0x49b081[_0xf01661(0x1d5)]('not\x20found\x20(will\x20create)'))),console[_0xf01661(0x1ca)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x5bb3c6[_0xf01661(0x1c6)][_0xf01661(0x1f4)](',\x20')),console['log'](_0xf01661(0x1e0))):console[_0xf01661(0x1ca)](a116_0x49b081['cyan'](_0xf01661(0x216))+'\x20\x20'+a116_0x49b081[_0xf01661(0x1d5)](_0xf01661(0x1b2)));console['log']('');if(_0x546514[_0xf01661(0x1bf)]>0x0){console['log'](a116_0x49b081['cyan']('Legacy\x20artifacts:'));for(const _0x12ba2e of _0x546514){console[_0xf01661(0x1ca)]('\x20\x20'+a116_0x49b081[_0xf01661(0x227)](_0xf01661(0x211))+'\x20\x20'+_0x12ba2e);}console['log'](_0xf01661(0x20c));}else console[_0xf01661(0x1ca)](a116_0x49b081[_0xf01661(0x1e9)]('Legacy\x20artifacts:')+'\x20\x20'+a116_0x49b081['gray'](_0xf01661(0x1f5)));console[_0xf01661(0x1ca)]('');_0x4f964c?(console[_0xf01661(0x1ca)](a116_0x49b081[_0xf01661(0x1e9)](_0xf01661(0x225))+('\x20\x20'+a116_0x49b081[_0xf01661(0x1c3)](_0x4f964c['path'])+'\x20→\x20keys:\x20'+_0x4f964c[_0xf01661(0x20d)][_0xf01661(0x1f4)](',\x20'))),console[_0xf01661(0x1ca)](_0xf01661(0x1d9))):console[_0xf01661(0x1ca)](a116_0x49b081[_0xf01661(0x1e9)](_0xf01661(0x225))+'\x20\x20'+a116_0x49b081[_0xf01661(0x1d5)](_0xf01661(0x1d8)));console[_0xf01661(0x1ca)](''),console[_0xf01661(0x1ca)](a116_0x49b081['cyan'](_0xf01661(0x1c2))+('\x20\x20'+(_0x38dc97?a116_0x49b081[_0xf01661(0x1c3)](_0xf01661(0x1ae)):a116_0x49b081[_0xf01661(0x226)]('not\x20needed'))));_0x38dc97&&console[_0xf01661(0x1ca)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x3bbca8[_0xf01661(0x1f7)]){const {currentVersion:_0x5c81e2,field:_0x3bc700,pkgPath:_0x362042}=_0x3bbca8[_0xf01661(0x1f7)];console[_0xf01661(0x1ca)](a116_0x49b081['cyan']('@lovrabet/sdk:')+('\x20\x20'+a116_0x49b081[_0xf01661(0x1c3)](_0x362042))),console[_0xf01661(0x1ca)]('\x20\x20Current\x20version\x20in\x20'+_0x3bc700+':\x20'+a116_0x49b081[_0xf01661(0x1c3)](_0x5c81e2)+_0xf01661(0x1ad)+a116_0x49b081[_0xf01661(0x226)](_0xf01661(0x1b9))),console['log'](_0xf01661(0x1cf));}else console[_0xf01661(0x1ca)](a116_0x49b081[_0xf01661(0x1e9)](_0xf01661(0x1f0))+'\x20\x20'+a116_0x49b081[_0xf01661(0x1d5)](_0xf01661(0x223)));console[_0xf01661(0x1ca)]('');}function execConfigMigration(_0x1a1e97,_0x553dbf){const _0x30a7d8=a116_0x4b40f6,{configMigration:_0x507dbc}=_0x1a1e97;if(!_0x507dbc?.['oldPath'])return{'step':0x1,'label':_0x30a7d8(0x20b),'ok':!![],'detail':_0x30a7d8(0x222)};const _0x475ae1=readConfigFile(_0x507dbc[_0x30a7d8(0x1b4)]),_0x44a3d2=resolve(_0x553dbf,NEW_CONFIG_NAME),_0x3cd07b=_0x507dbc[_0x30a7d8(0x1c1)]?readConfigFile(_0x44a3d2):{};for(const [_0x5a924b,_0x2c90c2]of Object['entries'](_0x475ae1)){!(_0x5a924b in _0x3cd07b)&&(_0x3cd07b[_0x5a924b]=_0x2c90c2);}writeConfigFile(_0x44a3d2,_0x3cd07b);const _0x15f805=_0x507dbc[_0x30a7d8(0x1b4)]+_0x30a7d8(0x1d2);return renameSync(_0x507dbc[_0x30a7d8(0x1b4)],_0x15f805),{'step':0x1,'label':_0x30a7d8(0x20b),'ok':!![],'detail':_0x507dbc[_0x30a7d8(0x1b4)]+_0x30a7d8(0x1ad)+_0x44a3d2+_0x30a7d8(0x21f)+_0x15f805+')'};}function a116_0x4799(_0x2e05f9,_0x5241d7){_0x2e05f9=_0x2e05f9-0x1ad;const _0x244d13=a116_0x244d();let _0x4799fb=_0x244d13[_0x2e05f9];return _0x4799fb;}function execRemoveOldArtifacts(_0x211db6){const _0x53fc8c=a116_0x4b40f6,_0x2de9b8=[];for(const _0x46400d of _0x211db6){try{if(!existsSync(_0x46400d))continue;const _0x591362=tryStat(_0x46400d);_0x591362?.['isDirectory']()?rmSync(_0x46400d,{'recursive':!![],'force':!![]}):unlinkSync(_0x46400d);}catch(_0x2df995){_0x2de9b8[_0x53fc8c(0x1f2)](_0x46400d+':\x20'+_0x2df995['message']);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x2de9b8[_0x53fc8c(0x1bf)]===0x0,'detail':_0x2de9b8['length']>0x0?_0x211db6[_0x53fc8c(0x1bf)]-_0x2de9b8['length']+'/'+_0x211db6['length']+'\x20removed\x20('+_0x2de9b8[_0x53fc8c(0x1f4)](';\x20')+')':_0x211db6[_0x53fc8c(0x1bf)]+_0x53fc8c(0x1d1)};}function execCleanMcp(_0x5fbf51){const _0xc99bc5=a116_0x4b40f6;if(!_0x5fbf51[_0xc99bc5(0x229)])return{'step':0x4,'label':_0xc99bc5(0x1f3),'ok':!![],'detail':_0xc99bc5(0x1d6)};try{const _0x102933=readFileSync(_0x5fbf51[_0xc99bc5(0x229)][_0xc99bc5(0x1f8)],_0xc99bc5(0x1de)),_0x522f6b=JSON[_0xc99bc5(0x1fd)](_0x102933);if(_0x522f6b?.['mcpServers']&&typeof _0x522f6b[_0xc99bc5(0x203)]===_0xc99bc5(0x228)){const _0x3676de=[];for(const [_0x392487,_0x8839c7]of Object[_0xc99bc5(0x1b0)](_0x522f6b[_0xc99bc5(0x203)])){_0x8839c7?.[_0xc99bc5(0x21a)]&&Array['isArray'](_0x8839c7['args'])&&_0x8839c7[_0xc99bc5(0x21a)][_0xc99bc5(0x202)](_0xb6d8c0=>typeof _0xb6d8c0==='string'&&_0xb6d8c0['includes']('@lovrabet/dataset-mcp-server'))&&_0x3676de[_0xc99bc5(0x1f2)](_0x392487);}for(const _0x612dc7 of _0x3676de){delete _0x522f6b[_0xc99bc5(0x203)][_0x612dc7];}return _0x3676de['length']>0x0&&writeFileSync(_0x5fbf51[_0xc99bc5(0x229)][_0xc99bc5(0x1f8)],JSON[_0xc99bc5(0x1b6)](_0x522f6b,null,0x2)+'\x0a',_0xc99bc5(0x1de)),{'step':0x4,'label':_0xc99bc5(0x1f3),'ok':!![],'detail':'removed\x20'+_0x3676de[_0xc99bc5(0x1f4)](',\x20')+_0xc99bc5(0x1fa)+_0x5fbf51[_0xc99bc5(0x229)]['path']};}return{'step':0x4,'label':_0xc99bc5(0x1f3),'ok':!![],'detail':_0xc99bc5(0x207)};}catch(_0x3fd399){return{'step':0x4,'label':_0xc99bc5(0x1f3),'ok':![],'detail':_0x3fd399[_0xc99bc5(0x1b7)]};}}function execSkillsRemove(_0x4a99cd,_0x5f0cc8){const _0x4d3221=a116_0x4b40f6,_0x4c7d79=runNpxSkillsRemove(_0x4a99cd,{'stdio':'inherit','yes':_0x5f0cc8});return{'step':0x5,'label':_0x4d3221(0x1e1),'ok':_0x4c7d79['ok'],'detail':_0x4c7d79['ok']?_0x4d3221(0x218):_0x4c7d79[_0x4d3221(0x1e7)]??'exit\x20'+_0x4c7d79[_0x4d3221(0x21b)]};}function execSkillsAdd(_0x2e64ff,_0x5144b1){const _0xd1b6b4=a116_0x4b40f6,_0x59c0de=runNpxSkillsAddGlobal(_0x2e64ff,_0xd1b6b4(0x214),{'stdio':_0xd1b6b4(0x208),'yes':_0x5144b1});return{'step':0x6,'label':_0xd1b6b4(0x1bd),'ok':_0x59c0de['ok'],'detail':_0x59c0de['ok']?_0xd1b6b4(0x20e):_0x59c0de[_0xd1b6b4(0x1e7)]??_0xd1b6b4(0x1fe)+_0x59c0de[_0xd1b6b4(0x21b)]};}function execUpgradeSdk(_0x7730c4){const _0xbce458=a116_0x4b40f6;if(!_0x7730c4[_0xbce458(0x1f7)])return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0xd08cc8,currentVersion:_0x5070c8,field:_0x4775d6}=_0x7730c4['sdkUpgrade'];try{const _0x2c1066=readFileSync(_0xd08cc8,_0xbce458(0x1de)),_0x191595=JSON[_0xbce458(0x1fd)](_0x2c1066);return _0x191595[_0x4775d6][_0xbce458(0x1d4)]=_0xbce458(0x1b9),writeFileSync(_0xd08cc8,JSON['stringify'](_0x191595,null,0x2)+'\x0a',_0xbce458(0x1de)),{'step':0x7,'label':_0xbce458(0x201),'ok':!![],'detail':_0x4775d6+_0xbce458(0x1b8)+_0x5070c8+_0xbce458(0x1f1)};}catch(_0xb6a239){return{'step':0x7,'label':_0xbce458(0x201),'ok':![],'detail':_0xb6a239['message']};}}function tryStat(_0x532ed0){try{return statSync(_0x532ed0);}catch{return undefined;}}function printSummary(_0x3d6bb3){const _0x8eb76c=a116_0x4b40f6;console['log'](''),console['log'](a116_0x49b081[_0x8eb76c(0x1b3)]('===\x20Upgrade\x20Summary\x20===')),console[_0x8eb76c(0x1ca)]('');for(const _0x3c1b25 of _0x3d6bb3){const _0x5214cb=_0x3c1b25['ok']?a116_0x49b081[_0x8eb76c(0x226)]('OK'):a116_0x49b081[_0x8eb76c(0x227)](_0x8eb76c(0x1f6));console['log']('\x20\x20'+_0x5214cb+_0x8eb76c(0x1e4)+_0x3c1b25[_0x8eb76c(0x1ff)]+':\x20'+_0x3c1b25[_0x8eb76c(0x1eb)]);if(_0x3c1b25[_0x8eb76c(0x1fc)])console[_0x8eb76c(0x1ca)](_0x8eb76c(0x1c0)+a116_0x49b081['gray'](_0x3c1b25[_0x8eb76c(0x1fc)]));}console[_0x8eb76c(0x1ca)]('');}export async function upgradeApp(_0x1a388d,_0x3e3412){const _0x26ab7e=a116_0x4b40f6,_0x15d2b2=process['cwd'](),_0x2bf743=analyse(_0x15d2b2),_0x4a7d3f=!_0x2bf743[_0x26ab7e(0x1c5)]&&_0x2bf743[_0x26ab7e(0x1ba)]['length']===0x0&&!_0x2bf743['oldMcpConfig']&&!_0x2bf743['needsSkillSwap']&&!_0x2bf743[_0x26ab7e(0x1f7)];if(_0x4a7d3f){console[_0x26ab7e(0x1ca)](a116_0x49b081[_0x26ab7e(0x226)](_0x26ab7e(0x206)));return;}printReport(_0x2bf743);const _0x2aeae8=!!(_0x3e3412[_0x26ab7e(0x1ce)]||_0x3e3412['Y']||_0x1a388d);if(!_0x2aeae8)try{const _0x351c01=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x351c01){console['log'](a116_0x49b081[_0x26ab7e(0x1d5)](_0x26ab7e(0x220)));return;}}catch(_0x4e17e2){if(_0x4e17e2?.[_0x26ab7e(0x1b7)]===_0x26ab7e(0x1d7)){console['log'](a116_0x49b081[_0x26ab7e(0x1d5)](_0x26ab7e(0x220)));return;}throw _0x4e17e2;}const _0x3a61e1=[],_0x422c7c=a116_0x529828({'text':_0x26ab7e(0x1cc),'color':_0x26ab7e(0x1e9)})['start'](),_0x3b1be9=execConfigMigration(_0x2bf743,_0x15d2b2);_0x3a61e1[_0x26ab7e(0x1f2)](_0x3b1be9),_0x422c7c[_0x3b1be9['ok']?_0x26ab7e(0x212):_0x26ab7e(0x1ee)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x3b1be9[_0x26ab7e(0x1fc)]??(_0x3b1be9['ok']?'done':_0x26ab7e(0x204))));const _0x5abf78=resolve(_0x15d2b2,_0x26ab7e(0x200)),_0x3598ef=a116_0x529828({'text':_0x26ab7e(0x1ea),'color':_0x26ab7e(0x1e9)})[_0x26ab7e(0x205)]();if(existsSync(_0x5abf78))try{rmSync(_0x5abf78,{'recursive':!![],'force':!![]}),_0x3598ef[_0x26ab7e(0x212)](_0x26ab7e(0x1e6)),_0x3a61e1[_0x26ab7e(0x1f2)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0xcb455c){_0x3598ef[_0x26ab7e(0x1ee)](_0x26ab7e(0x1c7)+_0xcb455c['message']),_0x3a61e1[_0x26ab7e(0x1f2)]({'step':0x2,'label':_0x26ab7e(0x1fb),'ok':![],'detail':_0xcb455c[_0x26ab7e(0x1b7)]});}else _0x3598ef[_0x26ab7e(0x21d)](_0x26ab7e(0x1c9)),_0x3a61e1['push']({'step':0x2,'label':_0x26ab7e(0x1fb),'ok':!![],'detail':'skipped'});const _0x5d4dfe=a116_0x529828({'text':_0x26ab7e(0x1e2),'color':_0x26ab7e(0x1e9)})[_0x26ab7e(0x205)](),_0x2659d9=execRemoveOldArtifacts(_0x2bf743[_0x26ab7e(0x1ba)]);_0x3a61e1[_0x26ab7e(0x1f2)](_0x2659d9),_0x5d4dfe[_0x2659d9['ok']?_0x26ab7e(0x212):_0x26ab7e(0x1ee)](_0x26ab7e(0x1dd)+(_0x2659d9[_0x26ab7e(0x1fc)]??(_0x2659d9['ok']?_0x26ab7e(0x1be):_0x26ab7e(0x204))));const _0x16c3f6=a116_0x529828({'text':_0x26ab7e(0x1ef),'color':_0x26ab7e(0x1e9)})[_0x26ab7e(0x205)](),_0x15ed1e=execCleanMcp(_0x2bf743);_0x3a61e1[_0x26ab7e(0x1f2)](_0x15ed1e),_0x16c3f6[_0x15ed1e['ok']?_0x26ab7e(0x212):_0x26ab7e(0x1ee)](_0x26ab7e(0x20a)+(_0x15ed1e[_0x26ab7e(0x1fc)]??(_0x15ed1e['ok']?_0x26ab7e(0x1be):_0x26ab7e(0x204))));const _0xcfb1c=a116_0x529828({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x26ab7e(0x1e9)})[_0x26ab7e(0x205)](),_0x4c72b5=execSkillsRemove(_0x15d2b2,_0x2aeae8);_0x3a61e1[_0x26ab7e(0x1f2)](_0x4c72b5),_0xcfb1c[_0x4c72b5['ok']?'succeed':_0x26ab7e(0x1ee)](_0x26ab7e(0x1d0)+(_0x4c72b5[_0x26ab7e(0x1fc)]??(_0x4c72b5['ok']?_0x26ab7e(0x1be):_0x26ab7e(0x204))));const _0x374d9b=a116_0x529828({'text':_0x26ab7e(0x1df),'color':_0x26ab7e(0x1e9)})[_0x26ab7e(0x205)](),_0x52f02d=execSkillsAdd(_0x15d2b2,_0x2aeae8);_0x3a61e1['push'](_0x52f02d),_0x374d9b[_0x52f02d['ok']?_0x26ab7e(0x212):_0x26ab7e(0x1ee)](_0x26ab7e(0x1ed)+(_0x52f02d[_0x26ab7e(0x1fc)]??(_0x52f02d['ok']?_0x26ab7e(0x1be):_0x26ab7e(0x204))));const _0x549061=a116_0x529828({'text':_0x26ab7e(0x217),'color':'cyan'})[_0x26ab7e(0x205)](),_0x2a5dbf=execUpgradeSdk(_0x2bf743);_0x3a61e1[_0x26ab7e(0x1f2)](_0x2a5dbf),_0x549061[_0x2a5dbf['ok']?_0x26ab7e(0x212):_0x26ab7e(0x1ee)](_0x26ab7e(0x1da)+(_0x2a5dbf[_0x26ab7e(0x1fc)]??(_0x2a5dbf['ok']?_0x26ab7e(0x1be):_0x26ab7e(0x204)))),printSummary(_0x3a61e1);const _0x17cb5c=_0x3a61e1[_0x26ab7e(0x202)](_0x1a45a7=>!_0x1a45a7['ok']);_0x17cb5c?console['log'](a116_0x49b081['yellow'](_0x26ab7e(0x1ec))):console[_0x26ab7e(0x1ca)](a116_0x49b081[_0x26ab7e(0x226)](_0x26ab7e(0x1dc))),_0x2a5dbf['ok']&&_0x2bf743['sdkUpgrade']&&(console[_0x26ab7e(0x1ca)](''),console[_0x26ab7e(0x1ca)](a116_0x49b081[_0x26ab7e(0x1b3)]['cyan']('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x26ab7e(0x1ca)](a116_0x49b081[_0x26ab7e(0x1e9)](_0x26ab7e(0x1e5))),console[_0x26ab7e(0x1ca)](''),console[_0x26ab7e(0x1ca)](a116_0x49b081[_0x26ab7e(0x1cd)](_0x26ab7e(0x20f))),console[_0x26ab7e(0x1ca)](a116_0x49b081[_0x26ab7e(0x1cd)](_0x26ab7e(0x1e3))),console['log'](a116_0x49b081[_0x26ab7e(0x1cd)]('\x20\x20bun\x20install')),console['log'](''));}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a117_0x303d17=a117_0x21c0;(function(_0x2d3fb4,_0x15510c){const _0x406d1f=a117_0x21c0,_0x194865=_0x2d3fb4();while(!![]){try{const _0x1994d6=parseInt(_0x406d1f(0xc7))/0x1*(-parseInt(_0x406d1f(0xd6))/0x2)+-parseInt(_0x406d1f(0xd2))/0x3*(parseInt(_0x406d1f(0xbd))/0x4)+parseInt(_0x406d1f(0xbf))/0x5+parseInt(_0x406d1f(0xb0))/0x6*(-parseInt(_0x406d1f(0xcc))/0x7)+-parseInt(_0x406d1f(0xa8))/0x8+parseInt(_0x406d1f(0xba))/0x9+-parseInt(_0x406d1f(0xaf))/0xa*(parseInt(_0x406d1f(0xb6))/0xb);if(_0x1994d6===_0x15510c)break;else _0x194865['push'](_0x194865['shift']());}catch(_0x42ba74){_0x194865['push'](_0x194865['shift']());}}}(a117_0x5699,0x73471));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x12ffab){const _0x23eb28=a117_0x21c0;for(const _0x4b1669 of _0x12ffab){definitions[_0x23eb28(0xc1)](_0x4b1669[_0x23eb28(0xd7)]+':'+_0x4b1669[_0x23eb28(0xab)],_0x4b1669);let _0x1f2201=serviceGroups[_0x23eb28(0xd1)](_0x4b1669[_0x23eb28(0xd7)]);!_0x1f2201&&(_0x1f2201=[],serviceGroups[_0x23eb28(0xc1)](_0x4b1669[_0x23eb28(0xd7)],_0x1f2201)),_0x1f2201[_0x23eb28(0xbc)](_0x4b1669);}}function registerDeclarativeService(_0x2f9f74,_0x578bcf,_0x1800ca){const _0x5c2020=a117_0x21c0;registerDefinitions(_0x578bcf);_0x1800ca?.[_0x5c2020(0xcd)]&®isterDefinitions([_0x1800ca[_0x5c2020(0xcd)]]);const _0x5eff22=_0x4eb366=>_0x4eb366===_0x5c2020(0xaa)?'':_0x4eb366===_0x5c2020(0xc9)?_0x5c2020(0xb2):_0x5c2020(0xd0),_0x59ac3a={'service':_0x578bcf[0x0][_0x5c2020(0xd7)],'label':_0x2f9f74,'commands':_0x578bcf[_0x5c2020(0xb4)](_0x522bfd=>({'command':_0x522bfd[_0x5c2020(0xab)],'description':_0x522bfd[_0x5c2020(0xda)],'tag':_0x5eff22(_0x522bfd[_0x5c2020(0xd4)])})),'declarative':!![],'defaultCommand':_0x1800ca?.[_0x5c2020(0xb9)]??(_0x1800ca?.[_0x5c2020(0xd5)]?_0x578bcf[0x0][_0x5c2020(0xab)]:undefined),'wildcardDef':_0x1800ca?.['wildcardDef'],'isSingleCommand':_0x1800ca?.['isSingleCommand']};serviceRegistry[_0x5c2020(0xbc)](_0x59ac3a),serviceByName[_0x5c2020(0xc1)](_0x59ac3a[_0x5c2020(0xd7)],_0x59ac3a);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a117_0x303d17(0xd3),'isSingleCommand':!![]}),registerDeclarativeService(a117_0x303d17(0xbe),projectDefinitions),registerDeclarativeService(a117_0x303d17(0xad),appDefinitions),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});function a117_0x5699(){const _0x9cf5e0=['255GjolqX','run','risk','isSingleCommand','2Kvtwkm','service','Authentication','<script>','description','2020368EeZePv','skill','read','command','Instant\x20API','App\x20Management','API','10YMdhOb','42VvzefG','login','\x20\x20[write]','Dataset\x20&\x20Operations','map','preview','2723732QtIXxF','length','Database\x20Connections','defaultCommand','7755120FoDnxY','Run\x20any\x20package.json\x20script','push','6788EvYltA','Project','4222040uUAQyl','has','set','commands','Logs','from','Schema','auth','8137aZsDgd','build','write','Diagnostics','Configuration','581371jJlmih','wildcardDef','Smart\x20List\x20Pages','Skills','\x20\x20[high-risk-write]','get'];a117_0x5699=function(){return _0x9cf5e0;};return a117_0x5699();}{const last=serviceRegistry[serviceRegistry[a117_0x303d17(0xb7)]-0x1];last[a117_0x303d17(0xc2)]=[{'command':a117_0x303d17(0xd9),'description':a117_0x303d17(0xbb),'tag':''}];}registerDeclarativeService(a117_0x303d17(0xd8),authDefinitions,{'defaultCommand':a117_0x303d17(0xb1)}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a117_0x303d17(0xca),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a117_0x303d17(0xc5),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a117_0x303d17(0xcb),configDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a117_0x303d17(0xae),apiDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a117_0x303d17(0xb8),dbDefinitions),registerDeclarativeService(a117_0x303d17(0xb3),datasetDefinitions),registerDeclarativeService(a117_0x303d17(0xce),pageDefinitions),registerDeclarativeService(a117_0x303d17(0xac),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a117_0x303d17(0xcf),skillDefinitions),registerDeclarativeService(a117_0x303d17(0xc3),logsDefinitions,{'defaultCommand':'show'});export const deprecatedAliases={'create':{'service':'project','command':'create'},'start':{'service':a117_0x303d17(0xd3),'command':'start'},'build':{'service':a117_0x303d17(0xd3),'command':a117_0x303d17(0xc8)},'preview':{'service':'run','command':a117_0x303d17(0xb5)},'logout':{'service':a117_0x303d17(0xc6),'command':'logout'},'skills':{'service':a117_0x303d17(0xa9),'command':'install'}};export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':'create'}};export function resolveDeprecatedSubcommand(_0x5323b1,_0x3585f0){return deprecatedSubcommands[_0x5323b1]?.[_0x3585f0];}export function findDefinition(_0x9df39b,_0x2c2878){const _0x5ebcf1=a117_0x303d17;return definitions[_0x5ebcf1(0xd1)](_0x9df39b+':'+_0x2c2878);}export function isKnownService(_0x597562){const _0x1b1000=a117_0x303d17;return serviceByName[_0x1b1000(0xc0)](_0x597562);}export function isDeclarativeService(_0x3a6dee){const _0x4350ba=a117_0x303d17;return serviceGroups[_0x4350ba(0xc0)](_0x3a6dee)||serviceByName['get'](_0x3a6dee)?.[_0x4350ba(0xcd)]!==undefined;}function a117_0x21c0(_0xb4101f,_0x54b61a){_0xb4101f=_0xb4101f-0xa8;const _0x56997c=a117_0x5699();let _0x21c0b4=_0x56997c[_0xb4101f];return _0x21c0b4;}export function getServiceEntry(_0x37fd0f){const _0x2a0138=a117_0x303d17;return serviceByName[_0x2a0138(0xd1)](_0x37fd0f);}export function getLegacyHandler(_0x80a53,_0x393114){return undefined;}export function getAllDefinitions(){const _0x400d9d=a117_0x303d17;return Array[_0x400d9d(0xc4)](definitions['values']());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a118_0x528673=a118_0x5e84;function a118_0x9c44(){const _0x3b69ad=['watch','bun','push','npm','Run\x20a\x20package.json\x20script','inherit','16OfIAly','entries','log','script','\x20run\x20start','bun.lock','\x22\x20not\x20found\x20in\x20package.json.','2662450XRXSrt','\x20run\x20preview','utf-8','boolean','\x20\x20EXAMPLES','Script\x20name\x20defined\x20in\x20package.json','validation','\x0a\x20\x20Available\x20scripts:\x0a','padEnd','node_modules','close','length','all','2PujoaS','slice','--watch','\x20\x20\x20\x20','5tGSbZw','659502uMQuIA','join','map','No\x20package.json\x20found\x20in\x20current\x20directory.','1054287DaPTXQ','start','\x20run\x20','(none)','vite\x20preview\x20exited\x20with\x20code\x20','\x20exited\x20with\x20code\x20','error','\x0a\x20\x20Usage:\x20','preview','.bin','872272lCwqMJ','Enable\x20watch\x20mode\x20for\x20preview','2996166napUTP','295074ynpXSg','read','build','needsUpgrade','yarn.lock','cwd','args','run','keys','has','Script\x20\x22','scripts','1800869Nsrjki','vite'];a118_0x9c44=function(){return _0x3b69ad;};return a118_0x9c44();}(function(_0x396f70,_0x5a3fb5){const _0x1fa9df=a118_0x5e84,_0x202812=_0x396f70();while(!![]){try{const _0x3c9779=-parseInt(_0x1fa9df(0xd4))/0x1+-parseInt(_0x1fa9df(0xbe))/0x2*(-parseInt(_0x1fa9df(0xc3))/0x3)+parseInt(_0x1fa9df(0xd1))/0x4+parseInt(_0x1fa9df(0xc2))/0x5*(parseInt(_0x1fa9df(0xd3))/0x6)+parseInt(_0x1fa9df(0xe0))/0x7*(-parseInt(_0x1fa9df(0xe8))/0x8)+parseInt(_0x1fa9df(0xc7))/0x9+parseInt(_0x1fa9df(0xef))/0xa;if(_0x3c9779===_0x5a3fb5)break;else _0x202812['push'](_0x202812['shift']());}catch(_0x37e65f){_0x202812['push'](_0x202812['shift']());}}}(a118_0x9c44,0x7cc43));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a118_0x528673(0xc8),'dev']);function a118_0x5e84(_0x447850,_0x5495c9){_0x447850=_0x447850-0xbd;const _0x9c44c5=a118_0x9c44();let _0x5e849d=_0x9c44c5[_0x447850];return _0x5e849d;}function readPackageScripts(_0x47213b){const _0x4eb7e1=a118_0x528673,_0x345817=resolve(_0x47213b,'package.json');if(!existsSync(_0x345817))return null;try{const _0x28dc4c=JSON['parse'](readFileSync(_0x345817,_0x4eb7e1(0xf1)));return _0x28dc4c[_0x4eb7e1(0xdf)]??{};}catch{return null;}}function detectPackageManager(_0x45ac58){const _0x2b3e44=a118_0x528673;if(existsSync(resolve(_0x45ac58,'bun.lockb'))||existsSync(resolve(_0x45ac58,_0x2b3e44(0xed))))return _0x2b3e44(0xe3);if(existsSync(resolve(_0x45ac58,'pnpm-lock.yaml')))return'pnpm';if(existsSync(resolve(_0x45ac58,_0x2b3e44(0xd8))))return'yarn';return _0x2b3e44(0xe5);}async function versionCheck(_0x265d0c){const _0x3728b1=a118_0x528673,_0x55aac5=await checkCliVersion();(_0x55aac5['needsUpgrade']||_0x55aac5['belowMinimum'])&&(printCliUpgradeWarning(_0x55aac5),assertCliVersionSupported(_0x55aac5));const _0x5cb601=await checkSdkVersion(_0x265d0c);if(_0x5cb601[_0x3728b1(0xd7)])printSdkUpgradeWarning(_0x5cb601);}function spawnScript(_0x1452da,_0x4afe32,_0x10e258,_0x1ff835){return new Promise((_0xc084fa,_0xe2028a)=>{const _0x457ada=a118_0x5e84,_0x5d06e0=[_0x457ada(0xdb),_0x4afe32,..._0x10e258],_0x1ba82b=spawn(_0x1452da,_0x5d06e0,{'cwd':_0x1ff835,'stdio':_0x457ada(0xe7),'shell':!![],'env':{...process.env,'PATH':''+join(_0x1ff835,_0x457ada(0xf8),'.bin')+delimiter+process.env.PATH}});_0x1ba82b['on'](_0x457ada(0xf9),_0x56695a=>{const _0x4b7765=_0x457ada;if(_0x56695a===0x0||_0x56695a===null)_0xc084fa();else _0xe2028a(new Error(_0x1452da+_0x4b7765(0xc9)+_0x4afe32+_0x4b7765(0xcc)+_0x56695a));}),_0x1ba82b['on'](_0x457ada(0xcd),_0xe2028a);});}function spawnViteBuildWatch(_0x5544ee){return new Promise((_0x588e14,_0x4bdc38)=>{const _0x33c63f=a118_0x5e84,_0x259af2=spawn(_0x33c63f(0xe1),[_0x33c63f(0xd6),_0x33c63f(0xc0)],{'cwd':_0x5544ee,'stdio':_0x33c63f(0xe7),'shell':!![],'env':{...process.env,'PATH':''+join(_0x5544ee,_0x33c63f(0xf8),_0x33c63f(0xd0))+delimiter+process.env.PATH}});_0x259af2['on'](_0x33c63f(0xf9),_0x97654e=>{if(_0x97654e===0x0||_0x97654e===null)_0x588e14();else _0x4bdc38(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x97654e));}),_0x259af2['on'](_0x33c63f(0xcd),_0x4bdc38);});}function spawnVitePreview(_0x31eb77){return new Promise((_0x26d1fe,_0x5b13ea)=>{const _0xc49e72=a118_0x5e84,_0x588e1d=spawn('vite',[_0xc49e72(0xcf)],{'cwd':_0x31eb77,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x31eb77,_0xc49e72(0xf8),_0xc49e72(0xd0))+delimiter+process.env.PATH}});_0x588e1d['on'](_0xc49e72(0xf9),_0x79043b=>{const _0x507f0d=_0xc49e72;if(_0x79043b===0x0||_0x79043b===null)_0x26d1fe();else _0x5b13ea(new Error(_0x507f0d(0xcb)+_0x79043b));}),_0x588e1d['on'](_0xc49e72(0xcd),_0x5b13ea);});}const runFlags=[{'name':a118_0x528673(0xe2),'type':a118_0x528673(0xf2),'description':a118_0x528673(0xd2),'default':![]}];export const runDefinition={'service':a118_0x528673(0xdb),'command':a118_0x528673(0xdb),'description':a118_0x528673(0xe6),'risk':a118_0x528673(0xd5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a118_0x528673(0xeb),'description':a118_0x528673(0xf4),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x4a7a83=a118_0x528673,_0x132aa2=readPackageScripts(process[_0x4a7a83(0xd9)]()),_0x2d8cca=[];if(_0x132aa2&&Object['keys'](_0x132aa2)[_0x4a7a83(0xfa)]>0x0){const _0x36d34a=Object[_0x4a7a83(0xdc)](_0x132aa2),_0x1d8a63=Math['max'](..._0x36d34a[_0x4a7a83(0xc5)](_0x4b70d1=>_0x4b70d1[_0x4a7a83(0xfa)]));_0x2d8cca['push']('\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)');for(const [_0x5b2981,_0xa05ec7]of Object[_0x4a7a83(0xe9)](_0x132aa2)){_0x2d8cca[_0x4a7a83(0xe4)](_0x4a7a83(0xc1)+CLI_BIN_NAME+'\x20run\x20'+_0x5b2981[_0x4a7a83(0xf7)](_0x1d8a63+0x2)+'#\x20'+_0xa05ec7);}}else _0x2d8cca['push'](_0x4a7a83(0xf3)),_0x2d8cca['push'](_0x4a7a83(0xc1)+CLI_BIN_NAME+_0x4a7a83(0xec)),_0x2d8cca[_0x4a7a83(0xe4)](_0x4a7a83(0xc1)+CLI_BIN_NAME+'\x20run\x20build'),_0x2d8cca[_0x4a7a83(0xe4)](_0x4a7a83(0xc1)+CLI_BIN_NAME+_0x4a7a83(0xf0)),_0x2d8cca[_0x4a7a83(0xe4)](_0x4a7a83(0xc1)+CLI_BIN_NAME+'\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview');return _0x2d8cca[_0x4a7a83(0xc4)]('\x0a');},async 'execute'(_0x2ee2cf){const _0x51a13b=a118_0x528673,_0x29e8cc=process[_0x51a13b(0xd9)](),_0x4a6f6d=_0x2ee2cf[_0x51a13b(0xda)][0x0],_0x7c5f1e=_0x2ee2cf[_0x51a13b(0xda)][_0x51a13b(0xbf)](0x1),_0x520985=readPackageScripts(_0x29e8cc);if(!_0x520985)throw CliErrors['validation'](_0x51a13b(0xc6));if(!_0x4a6f6d){const _0x3652ec=Object[_0x51a13b(0xdc)](_0x520985);if(_0x3652ec[_0x51a13b(0xfa)]===0x0)console['log']('No\x20scripts\x20defined\x20in\x20package.json.');else{console[_0x51a13b(0xea)](_0x51a13b(0xf6));const _0x274eda=Math['max'](..._0x3652ec['map'](_0x2aa6d6=>_0x2aa6d6[_0x51a13b(0xfa)]));for(const [_0x4a7d7b,_0x1b948a]of Object[_0x51a13b(0xe9)](_0x520985)){console[_0x51a13b(0xea)](_0x51a13b(0xc1)+_0x4a7d7b[_0x51a13b(0xf7)](_0x274eda+0x2)+_0x1b948a);}console['log'](_0x51a13b(0xce)+CLI_BIN_NAME+'\x20run\x20<script>\x0a');}return{'ok':!![]};}if(!_0x520985[_0x4a6f6d])throw CliErrors[_0x51a13b(0xf5)](_0x51a13b(0xde)+_0x4a6f6d+_0x51a13b(0xee),'Available:\x20'+(Object['keys'](_0x520985)[_0x51a13b(0xc4)](',\x20')||_0x51a13b(0xca)));const _0x156664=detectPackageManager(_0x29e8cc);VERSION_CHECK_SCRIPTS[_0x51a13b(0xdd)](_0x4a6f6d)&&await versionCheck(_0x29e8cc);if(_0x4a6f6d===_0x51a13b(0xcf)&&_0x2ee2cf['bool'](_0x51a13b(0xe2)))return await Promise[_0x51a13b(0xbd)]([spawnViteBuildWatch(_0x29e8cc),spawnVitePreview(_0x29e8cc)]),{'ok':!![]};return await spawnScript(_0x156664,_0x4a6f6d,_0x7c5f1e,_0x29e8cc),{'ok':!![]};}};
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a119_0x5875(_0x109b75,_0x28b673){_0x109b75=_0x109b75-0x67;const _0x2069ae=a119_0x2069();let _0x5875ea=_0x2069ae[_0x109b75];return _0x5875ea;}const a119_0x38e417=a119_0x5875;(function(_0x3383ac,_0x4e562a){const _0x5f572d=a119_0x5875,_0x128922=_0x3383ac();while(!![]){try{const _0x3c8de5=parseInt(_0x5f572d(0x72))/0x1*(-parseInt(_0x5f572d(0x6d))/0x2)+parseInt(_0x5f572d(0x70))/0x3*(-parseInt(_0x5f572d(0x6f))/0x4)+-parseInt(_0x5f572d(0x6b))/0x5*(parseInt(_0x5f572d(0x69))/0x6)+parseInt(_0x5f572d(0x6c))/0x7+-parseInt(_0x5f572d(0x6a))/0x8+parseInt(_0x5f572d(0x75))/0x9*(parseInt(_0x5f572d(0x67))/0xa)+-parseInt(_0x5f572d(0x6e))/0xb*(-parseInt(_0x5f572d(0x76))/0xc);if(_0x3c8de5===_0x4e562a)break;else _0x128922['push'](_0x128922['shift']());}catch(_0x953ca1){_0x128922['push'](_0x128922['shift']());}}}(a119_0x2069,0xe29fb));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x13f3d9){const _0x1cfdfa=await buildSchemaPayload();return{'ok':!![],'data':_0x1cfdfa};}export const schemaDefinition={'service':a119_0x38e417(0x68),'command':a119_0x38e417(0x73),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a119_0x38e417(0x71),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a119_0x38e417(0x74),'flags':[],'execute':execute};function a119_0x2069(){const _0x2f6a6c=['56661SEHNct','read','2956ROYHJv','export','json','27PRcmYc','178524cFUofU','794430TmGdrG','schema','246nCLFTe','9493016eMKOZt','3470JhowNt','8878394TgLcnT','296ICzPqx','2079ojJOPL','368zxpBHN'];a119_0x2069=function(){return _0x2f6a6c;};return a119_0x2069();}
|