@lovrabet/rabetbase-cli 2.3.4 → 2.3.5-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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.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/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/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/list.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 -1
- 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/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/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/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/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/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/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 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function a128_0x3441(_0x16bb6a,_0x3f3cdb){_0x16bb6a=_0x16bb6a-0xe0;const _0x4d85ac=a128_0x4d85();let _0x3441ae=_0x4d85ac[_0x16bb6a];return _0x3441ae;}(function(_0x1d2159,_0x3f6a05){const _0x121acf=a128_0x3441,_0x2243a9=_0x1d2159();while(!![]){try{const _0x1aff60=parseInt(_0x121acf(0x113))/0x1*(-parseInt(_0x121acf(0xfc))/0x2)+-parseInt(_0x121acf(0x127))/0x3+parseInt(_0x121acf(0x103))/0x4*(parseInt(_0x121acf(0xfe))/0x5)+parseInt(_0x121acf(0x12f))/0x6*(parseInt(_0x121acf(0x10d))/0x7)+parseInt(_0x121acf(0x12a))/0x8*(parseInt(_0x121acf(0x12b))/0x9)+-parseInt(_0x121acf(0x11a))/0xa*(parseInt(_0x121acf(0xed))/0xb)+parseInt(_0x121acf(0x12e))/0xc*(parseInt(_0x121acf(0x133))/0xd);if(_0x1aff60===_0x3f6a05)break;else _0x2243a9['push'](_0x2243a9['shift']());}catch(_0x9afb6b){_0x2243a9['push'](_0x2243a9['shift']());}}}(a128_0x4d85,0x8d2df));import a128_0x1b62da from'path';import a128_0x29fbe4 from'fs';function a128_0x4d85(){const _0x13fd61=['setLogPath','Project\x20name:\x20','rmSync','needsUpgrade','\x20|\x20Default:\x20','项目创建失败:\x20','writeFileSync','green','apps','projectName','cyan','cd\x20','11OedSrI','trim','Copy\x20project\x20files','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','package.json','readFileSync','API\x20配置拉取异常','repeat','existsSync','cookie','belowMinimum','resolve','warn','bold','gray','908MHepRJ','join','10965WDExzO','...','配置应用AppCode失败','projectCode','\x20\x201.\x20Start\x20project:\x20','1132gQpOdI','keys','\x20\x202.\x20Pull\x20API\x20configuration:\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','fail','*\x20Pulling\x20API\x20configuration...','string','API\x20configuration\x20pulled:\x20','\x20Generated\x20by\x20rabetbase\x20cli\x20','W_OK','1583512opeobN','utf8','log','\x20|\x20AppCode:\x20','stringify','accessSync','2137BejWHI','√\x20Pulled\x20','appCode','toLocaleString','message','更新\x20package.json\x20name','modelCount','10659830EhiNKi','\x20config\x20set\x20appcode\x20<app-code>\x27','info','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20model(s)','parse','\x20api\x20pull','\x20run\x20start','√\x20Configuration\x20file\x20created,\x20Apps:\x20','\x20&&\x20','name','√\x20package.json\x20updated:\x20name=','Install\x20dependencies','270948PXyWmr','create','更新\x20package.json\x20失败','1744NupLDk','44406ZNeVPE','配置应用AppCode:\x20','version','132MYIcOQ','12pHiqfW','\x20dataset(s),\x20generated\x20','1.0.0','chdir','657215Sqkpsw','dirname','stop','Project\x20directory\x20','\x20already\x20exists','start','🚀\x20Next\x20Steps:','cwd','error','length','minimumVersion','env','stableVersion','constants','项目创建完成:\x20','test','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','production'];a128_0x4d85=function(){return _0x13fd61;};return a128_0x4d85();}import a128_0x500199 from'chalk';import a128_0x382e95 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';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(_0x2dd12e){const _0x37d875=a128_0x3441,_0x23ded1=await checkCliVersion();(_0x23ded1['needsUpgrade']||_0x23ded1['belowMinimum'])&&(printCliUpgradeWarning(_0x23ded1),assertCliVersionSupported(_0x23ded1),logger[_0x37d875(0x11c)](_0x37d875(0x128),'CLI\x20版本检查',{'currentVersion':_0x23ded1['currentVersion'],'stableVersion':_0x23ded1[_0x37d875(0x13f)],'minimumVersion':_0x23ded1[_0x37d875(0x13d)],'needsUpgrade':_0x23ded1[_0x37d875(0xe4)],'belowMinimum':_0x23ded1[_0x37d875(0xf7)]}));if(_0x2dd12e[_0x37d875(0x101)]&&_0x2dd12e['appCode'])await runCreate({'projectName':_0x2dd12e['projectCode'],'appCode':_0x2dd12e[_0x37d875(0x115)],'env':_0x2dd12e['env']},_0x2dd12e);else{if(_0x2dd12e['projectCode']){const _0x5cf141=await selectSingleAppcode(_0x2dd12e[_0x37d875(0xf6)]);await runCreate({'projectName':_0x2dd12e[_0x37d875(0x101)],'appCode':_0x5cf141||undefined,'env':_0x2dd12e[_0x37d875(0x13e)]},_0x2dd12e);}else await guidedCreateProject(_0x2e9f7d=>runCreate(_0x2e9f7d,_0x2dd12e),_0x2dd12e[_0x37d875(0x13e)],_0x2dd12e[_0x37d875(0xf6)]);}}async function runCreate(_0x3c8809,_0x1003c0){const _0x84e48=a128_0x3441;if(!_0x3c8809[_0x84e48(0xea)]||_0x3c8809[_0x84e48(0xea)][_0x84e48(0xee)]()==='')throw new Error('Project\x20name\x20cannot\x20be\x20empty');const _0x523cc0=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x523cc0[_0x84e48(0x142)](_0x3c8809[_0x84e48(0xea)]))throw new Error(_0x84e48(0xf0));if(_0x3c8809[_0x84e48(0xea)]['length']>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x3c8f59=a128_0x1b62da[_0x84e48(0xf8)](process[_0x84e48(0x13a)](),_0x3c8809[_0x84e48(0xea)]);if(a128_0x29fbe4[_0x84e48(0xf5)](_0x3c8f59))throw new Error(_0x84e48(0x136)+_0x3c8809[_0x84e48(0xea)]+_0x84e48(0x137));try{a128_0x29fbe4[_0x84e48(0x112)](a128_0x1b62da[_0x84e48(0x134)](_0x3c8f59),a128_0x29fbe4[_0x84e48(0x140)][_0x84e48(0x10c)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x84e48(0xe1)](_0x3c8f59),logger[_0x84e48(0x11c)](_0x84e48(0x128),'开始创建项目:\x20'+_0x3c8809[_0x84e48(0xea)],{'projectDir':_0x3c8f59,'appCode':_0x3c8809[_0x84e48(0x115)]}),console[_0x84e48(0x10f)](),console[_0x84e48(0x10f)](a128_0x500199[_0x84e48(0xe8)]('\x20√\x20')+_0x84e48(0xe2)+a128_0x500199[_0x84e48(0xe8)](_0x3c8809['projectName'])+(_0x3c8809[_0x84e48(0x115)]?_0x84e48(0x110)+a128_0x500199['cyan'](_0x3c8809[_0x84e48(0x115)]):''));try{await runTask(_0x84e48(0xef),()=>copyProjectTemplate(_0x3c8809[_0x84e48(0xea)])),await updatePackageJsonName(_0x3c8809['projectName']),await runTask(_0x84e48(0x126),()=>installDependencies(_0x3c8809['projectName'])),await runTask('Format\x20code',()=>formatProjectCode(_0x3c8809[_0x84e48(0xea)])),await configureAppCode(_0x3c8809[_0x84e48(0xea)],_0x3c8809['appCode']||'',_0x3c8809[_0x84e48(0x13e)]);let _0x2287c8=![];if(_0x3c8809[_0x84e48(0x115)]){console[_0x84e48(0x10f)](_0x84e48(0x108));const _0x3a097f=process['cwd']();try{process[_0x84e48(0x132)](_0x3c8f59);const _0x46cfb3=_0x3c8809[_0x84e48(0x13e)]||'production';initEnv(_0x46cfb3);const {configArray:_0x409b14}=await fetchModelList(_0x3c8809['appCode'],_0x1003c0['cookie']||''),_0x3b2767=DEFAULT_API_DIR,_0x2def6a=await generateApiFile(_0x409b14,'',_0x3c8809[_0x84e48(0x115)],!![],_0x46cfb3,_0x3b2767);console['log'](_0x84e48(0x114)+_0x409b14[_0x84e48(0x13c)]+_0x84e48(0x130)+_0x2def6a[_0x84e48(0x119)]+_0x84e48(0x11e)),logger[_0x84e48(0x11c)]('create',_0x84e48(0x10a)+_0x3c8809[_0x84e48(0x115)]);}catch(_0xcd66){_0x2287c8=!![],console[_0x84e48(0x10f)](_0x84e48(0x11d)),logger[_0x84e48(0xf9)](_0x84e48(0x128),_0x84e48(0xf3),{'error':_0xcd66 instanceof Error?_0xcd66[_0x84e48(0x117)]:String(_0xcd66)});}finally{process['chdir'](_0x3a097f);}}logger['success'](_0x84e48(0x128),_0x84e48(0x141)+_0x3c8809[_0x84e48(0xea)]),console[_0x84e48(0x10f)](),console[_0x84e48(0x10f)](a128_0x500199['green']('─'[_0x84e48(0xf4)](0x3c))),console[_0x84e48(0x10f)](a128_0x500199[_0x84e48(0xeb)][_0x84e48(0xfa)](_0x84e48(0x139))),console[_0x84e48(0x10f)](),console[_0x84e48(0x10f)](_0x84e48(0x102)+a128_0x500199[_0x84e48(0xeb)]['bold'](_0x84e48(0xec)+_0x3c8809[_0x84e48(0xea)]+_0x84e48(0x123)+CLI_BIN_NAME+_0x84e48(0x121))),_0x2287c8&&console[_0x84e48(0x10f)](_0x84e48(0x105)+a128_0x500199['cyan']['bold'](CLI_BIN_NAME+_0x84e48(0x120))),console[_0x84e48(0x10f)](a128_0x500199[_0x84e48(0xe8)]('─'[_0x84e48(0xf4)](0x3c)));}catch(_0x3b50ad){logger['error'](_0x84e48(0x128),_0x84e48(0xe6)+_0x3c8809[_0x84e48(0xea)],{'error':_0x3b50ad instanceof Error?_0x3b50ad[_0x84e48(0x117)]:String(_0x3b50ad)});try{a128_0x29fbe4[_0x84e48(0xf5)](_0x3c8f59)&&(console['log'](_0x84e48(0x106)+_0x3c8f59),a128_0x29fbe4[_0x84e48(0xe3)](_0x3c8f59,{'recursive':!![],'force':!![]}));}catch{logger[_0x84e48(0xf9)]('create','清理项目目录失败:\x20'+_0x3c8f59);}throw _0x3b50ad;}}async function runTask(_0x53c722,_0x52ac82){const _0x3d05b9=a128_0x3441,_0x5bd5b8=a128_0x382e95(_0x53c722+_0x3d05b9(0xff))[_0x3d05b9(0x138)]();try{const _0x476a91=await _0x52ac82();_0x5bd5b8[_0x3d05b9(0x135)](),console[_0x3d05b9(0x10f)](''+a128_0x500199[_0x3d05b9(0xe8)]('\x20√\x20')+_0x53c722+'\x20'+a128_0x500199[_0x3d05b9(0xfb)]('['+_0x476a91+']'));}catch(_0x1dfe79){_0x5bd5b8[_0x3d05b9(0x107)](_0x53c722);throw _0x1dfe79;}}async function updatePackageJsonName(_0x2ab632){const _0x20c5af=a128_0x3441,_0x5bf910=a128_0x1b62da[_0x20c5af(0xf8)](process[_0x20c5af(0x13a)](),_0x2ab632),_0x438ac2=a128_0x1b62da[_0x20c5af(0xfd)](_0x5bf910,_0x20c5af(0xf1));try{console[_0x20c5af(0x10f)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x5804f7=getRabetbaseCliPackageRoot(),_0x9652da=a128_0x1b62da[_0x20c5af(0xfd)](_0x5804f7,_0x20c5af(0xf1));let _0x16468f=_0x20c5af(0x131);try{const _0x29ba21=JSON[_0x20c5af(0x11f)](a128_0x29fbe4[_0x20c5af(0xf2)](_0x9652da,_0x20c5af(0x10e)));_0x16468f=_0x29ba21[_0x20c5af(0x12d)]||_0x20c5af(0x131);}catch{}const _0x372440=a128_0x29fbe4[_0x20c5af(0xf2)](_0x438ac2,_0x20c5af(0x10e)),_0x345b55=JSON[_0x20c5af(0x11f)](_0x372440);_0x345b55[_0x20c5af(0x124)]=_0x2ab632,_0x345b55['description']=_0x2ab632+_0x20c5af(0x10b)+_0x16468f,a128_0x29fbe4[_0x20c5af(0xe7)](_0x438ac2,JSON[_0x20c5af(0x111)](_0x345b55,null,0x2)+'\x0a','utf8'),console[_0x20c5af(0x10f)](_0x20c5af(0x125)+_0x2ab632),logger['info'](_0x20c5af(0x128),_0x20c5af(0x118));}catch(_0xc81750){logger[_0x20c5af(0x13b)](_0x20c5af(0x128),_0x20c5af(0x129));throw _0xc81750;}}async function configureAppCode(_0x5319ef,_0x41656c,_0x3d5a4a){const _0x4a8d8e=a128_0x3441,_0x1bbe9d=a128_0x1b62da[_0x4a8d8e(0xf8)](process[_0x4a8d8e(0x13a)](),_0x5319ef),_0x563772=a128_0x1b62da['join'](_0x1bbe9d,NEW_CONFIG_NAME);try{_0x41656c?console[_0x4a8d8e(0x10f)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x5319ef+':\x20'+_0x41656c):console[_0x4a8d8e(0x10f)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x5319ef);const _0x45e823=getRabetbaseCliPackageRoot(),_0x280b6a=a128_0x1b62da[_0x4a8d8e(0xfd)](_0x45e823,_0x4a8d8e(0xf1));let _0x1b73c1=_0x4a8d8e(0x131);try{const _0x1d7696=JSON[_0x4a8d8e(0x11f)](a128_0x29fbe4['readFileSync'](_0x280b6a,_0x4a8d8e(0x10e)));_0x1b73c1=_0x1d7696[_0x4a8d8e(0x12d)]||'1.0.0';}catch{}const _0x11ba12=readConfig(),_0x5a31cc=typeof _0x11ba12['env']===_0x4a8d8e(0x109)?_0x11ba12[_0x4a8d8e(0x13e)]:undefined,_0x2d7d70={};for(const _0x7bc748 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x11ba12[_0x7bc748]!=null)_0x2d7d70[_0x7bc748]=_0x11ba12[_0x7bc748];}const _0x58fc1f=buildCanonicalProjectConfig(_0x2d7d70,{'appCodes':_0x41656c?[_0x41656c]:[],'env':_0x3d5a4a||_0x5a31cc||_0x4a8d8e(0xe0),'metadata':{'createdAt':new Date()[_0x4a8d8e(0x116)](),'version':_0x1b73c1}});writeConfigFile(_0x563772,_0x58fc1f),_0x41656c?console[_0x4a8d8e(0x10f)](_0x4a8d8e(0x122)+Object[_0x4a8d8e(0x104)](_0x58fc1f[_0x4a8d8e(0xe9)]||{})[_0x4a8d8e(0xfd)](',\x20')+_0x4a8d8e(0xe5)+_0x58fc1f['defaultApp']):console[_0x4a8d8e(0x10f)](_0x4a8d8e(0x143)+CLI_BIN_NAME+_0x4a8d8e(0x11b)),logger[_0x4a8d8e(0x11c)](_0x4a8d8e(0x128),_0x4a8d8e(0x12c)+_0x41656c);}catch(_0x303c54){logger[_0x4a8d8e(0x13b)](_0x4a8d8e(0x128),_0x4a8d8e(0x100));}}
|
|
1
|
+
(function(_0x340425,_0x4ed52b){const _0xf993fa=a128_0x4764,_0x2f4c0a=_0x340425();while(!![]){try{const _0x2c8617=parseInt(_0xf993fa(0x1af))/0x1+-parseInt(_0xf993fa(0x1aa))/0x2*(-parseInt(_0xf993fa(0x1d0))/0x3)+-parseInt(_0xf993fa(0x1b5))/0x4+-parseInt(_0xf993fa(0x1a6))/0x5+-parseInt(_0xf993fa(0x1c4))/0x6+-parseInt(_0xf993fa(0x195))/0x7*(parseInt(_0xf993fa(0x17d))/0x8)+-parseInt(_0xf993fa(0x1d2))/0x9*(-parseInt(_0xf993fa(0x18e))/0xa);if(_0x2c8617===_0x4ed52b)break;else _0x2f4c0a['push'](_0x2f4c0a['shift']());}catch(_0x14c96b){_0x2f4c0a['push'](_0x2f4c0a['shift']());}}}(a128_0x5113,0xe4772));import a128_0x597977 from'path';import a128_0x135fec from'fs';import a128_0x23d2ea from'chalk';import a128_0x15cd26 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';function a128_0x5113(){const _0x411490=['success','green','CLI\x20版本检查','配置应用AppCode:\x20','message','appCode','create','projectCode','start','4796322pVMMiF','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','2799LgOswY','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','version','existsSync','🚀\x20Next\x20Steps:','needsUpgrade','40TCpKTf','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','更新\x20package.json\x20失败','chdir','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','setLogPath','cookie','minimumVersion','API\x20配置拉取异常','\x20\x202.\x20Pull\x20API\x20configuration:\x20','\x20√\x20','parse','*\x20Pulling\x20API\x20configuration...','warn','\x20run\x20start','cyan','writeFileSync','71290yWTrvB','\x20already\x20exists','cwd','bold','defaultApp','join','resolve','636181wcVHEA','repeat','length','string','log','更新\x20package.json\x20name','accessSync','env','\x20&&\x20','toLocaleString','description','cd\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','√\x20Configuration\x20file\x20created,\x20Apps:\x20','Project\x20directory\x20','package.json','\x20dataset(s),\x20generated\x20','3230495hStzGO','\x20Generated\x20by\x20rabetbase\x20cli\x20','info','apps','2qvbYSJ','stableVersion','trim','gray','\x20|\x20AppCode:\x20','503912zRjKLC','fail','1.0.0','stop','\x20config\x20set\x20appcode\x20<app-code>\x27','projectName','5550068HQxcsA','\x20api\x20pull','keys','stringify','production','Project\x20name\x20cannot\x20be\x20empty','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','Install\x20dependencies','utf8','error','readFileSync','API\x20configuration\x20pulled:\x20','项目创建完成:\x20','项目创建失败:\x20','清理项目目录失败:\x20','5375880ySlwVG','constants','belowMinimum'];a128_0x5113=function(){return _0x411490;};return a128_0x5113();}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(_0x461719){const _0x1969d1=a128_0x4764,_0x3a532e=await checkCliVersion();(_0x3a532e[_0x1969d1(0x17c)]||_0x3a532e[_0x1969d1(0x1c6)])&&(printCliUpgradeWarning(_0x3a532e),assertCliVersionSupported(_0x3a532e),logger[_0x1969d1(0x1a8)](_0x1969d1(0x1cd),_0x1969d1(0x1c9),{'currentVersion':_0x3a532e['currentVersion'],'stableVersion':_0x3a532e[_0x1969d1(0x1ab)],'minimumVersion':_0x3a532e[_0x1969d1(0x184)],'needsUpgrade':_0x3a532e[_0x1969d1(0x17c)],'belowMinimum':_0x3a532e[_0x1969d1(0x1c6)]}));if(_0x461719['projectCode']&&_0x461719[_0x1969d1(0x1cc)])await runCreate({'projectName':_0x461719['projectCode'],'appCode':_0x461719['appCode'],'env':_0x461719['env']},_0x461719);else{if(_0x461719[_0x1969d1(0x1ce)]){const _0xbc8b8e=await selectSingleAppcode(_0x461719['cookie']);await runCreate({'projectName':_0x461719[_0x1969d1(0x1ce)],'appCode':_0xbc8b8e||undefined,'env':_0x461719['env']},_0x461719);}else await guidedCreateProject(_0x2e200f=>runCreate(_0x2e200f,_0x461719),_0x461719[_0x1969d1(0x19c)],_0x461719['cookie']);}}function a128_0x4764(_0x3376ca,_0x1c6170){_0x3376ca=_0x3376ca-0x179;const _0x51134c=a128_0x5113();let _0x4764ac=_0x51134c[_0x3376ca];return _0x4764ac;}async function runCreate(_0x2e880c,_0x2bf5a9){const _0x457adc=a128_0x4764;if(!_0x2e880c[_0x457adc(0x1b4)]||_0x2e880c[_0x457adc(0x1b4)][_0x457adc(0x1ac)]()==='')throw new Error(_0x457adc(0x1ba));const _0x1c4a48=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1c4a48['test'](_0x2e880c[_0x457adc(0x1b4)]))throw new Error(_0x457adc(0x17e));if(_0x2e880c[_0x457adc(0x1b4)][_0x457adc(0x197)]>0x64)throw new Error(_0x457adc(0x1d1));const _0x3a5b1a=a128_0x597977[_0x457adc(0x194)](process[_0x457adc(0x190)](),_0x2e880c[_0x457adc(0x1b4)]);if(a128_0x135fec[_0x457adc(0x17a)](_0x3a5b1a))throw new Error(_0x457adc(0x1a3)+_0x2e880c['projectName']+_0x457adc(0x18f));try{a128_0x135fec[_0x457adc(0x19b)](a128_0x597977['dirname'](_0x3a5b1a),a128_0x135fec[_0x457adc(0x1c5)]['W_OK']);}catch{throw new Error(_0x457adc(0x1d3));}logger[_0x457adc(0x182)](_0x3a5b1a),logger[_0x457adc(0x1a8)](_0x457adc(0x1cd),'开始创建项目:\x20'+_0x2e880c['projectName'],{'projectDir':_0x3a5b1a,'appCode':_0x2e880c[_0x457adc(0x1cc)]}),console[_0x457adc(0x199)](),console['log'](a128_0x23d2ea[_0x457adc(0x1c8)](_0x457adc(0x187))+'Project\x20name:\x20'+a128_0x23d2ea[_0x457adc(0x1c8)](_0x2e880c[_0x457adc(0x1b4)])+(_0x2e880c['appCode']?_0x457adc(0x1ae)+a128_0x23d2ea[_0x457adc(0x18c)](_0x2e880c[_0x457adc(0x1cc)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x2e880c[_0x457adc(0x1b4)])),await updatePackageJsonName(_0x2e880c[_0x457adc(0x1b4)]),await runTask(_0x457adc(0x1bc),()=>installDependencies(_0x2e880c[_0x457adc(0x1b4)])),await runTask('Format\x20code',()=>formatProjectCode(_0x2e880c[_0x457adc(0x1b4)])),await configureAppCode(_0x2e880c['projectName'],_0x2e880c[_0x457adc(0x1cc)]||'',_0x2e880c['env']);let _0x4c5cf4=![];if(_0x2e880c[_0x457adc(0x1cc)]){console[_0x457adc(0x199)](_0x457adc(0x189));const _0x2852f7=process[_0x457adc(0x190)]();try{process[_0x457adc(0x180)](_0x3a5b1a);const _0x4459cc=_0x2e880c[_0x457adc(0x19c)]||'production';initEnv(_0x4459cc);const {configArray:_0x40b53c}=await fetchModelList(_0x2e880c[_0x457adc(0x1cc)],_0x2bf5a9[_0x457adc(0x183)]||''),_0x2e9edd=DEFAULT_API_DIR,_0x1e5866=await generateApiFile(_0x40b53c,'',_0x2e880c[_0x457adc(0x1cc)],!![],_0x4459cc,_0x2e9edd);console[_0x457adc(0x199)]('√\x20Pulled\x20'+_0x40b53c[_0x457adc(0x197)]+_0x457adc(0x1a5)+_0x1e5866['modelCount']+'\x20model(s)'),logger[_0x457adc(0x1a8)](_0x457adc(0x1cd),_0x457adc(0x1c0)+_0x2e880c[_0x457adc(0x1cc)]);}catch(_0xe4c07a){_0x4c5cf4=!![],console[_0x457adc(0x199)](_0x457adc(0x181)),logger[_0x457adc(0x18a)](_0x457adc(0x1cd),_0x457adc(0x185),{'error':_0xe4c07a instanceof Error?_0xe4c07a[_0x457adc(0x1cb)]:String(_0xe4c07a)});}finally{process['chdir'](_0x2852f7);}}logger[_0x457adc(0x1c7)](_0x457adc(0x1cd),_0x457adc(0x1c1)+_0x2e880c[_0x457adc(0x1b4)]),console['log'](),console[_0x457adc(0x199)](a128_0x23d2ea[_0x457adc(0x1c8)]('─'[_0x457adc(0x196)](0x3c))),console[_0x457adc(0x199)](a128_0x23d2ea['cyan'][_0x457adc(0x191)](_0x457adc(0x17b))),console[_0x457adc(0x199)](),console[_0x457adc(0x199)]('\x20\x201.\x20Start\x20project:\x20'+a128_0x23d2ea['cyan'][_0x457adc(0x191)](_0x457adc(0x1a0)+_0x2e880c[_0x457adc(0x1b4)]+_0x457adc(0x19d)+CLI_BIN_NAME+_0x457adc(0x18b))),_0x4c5cf4&&console[_0x457adc(0x199)](_0x457adc(0x186)+a128_0x23d2ea[_0x457adc(0x18c)][_0x457adc(0x191)](CLI_BIN_NAME+_0x457adc(0x1b6))),console[_0x457adc(0x199)](a128_0x23d2ea[_0x457adc(0x1c8)]('─'['repeat'](0x3c)));}catch(_0x392a7d){logger[_0x457adc(0x1be)](_0x457adc(0x1cd),_0x457adc(0x1c2)+_0x2e880c[_0x457adc(0x1b4)],{'error':_0x392a7d instanceof Error?_0x392a7d[_0x457adc(0x1cb)]:String(_0x392a7d)});try{a128_0x135fec[_0x457adc(0x17a)](_0x3a5b1a)&&(console[_0x457adc(0x199)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x3a5b1a),a128_0x135fec['rmSync'](_0x3a5b1a,{'recursive':!![],'force':!![]}));}catch{logger[_0x457adc(0x18a)]('create',_0x457adc(0x1c3)+_0x3a5b1a);}throw _0x392a7d;}}async function runTask(_0x352519,_0x3c1d06){const _0xcaf7fe=a128_0x4764,_0x10598d=a128_0x15cd26(_0x352519+'...')[_0xcaf7fe(0x1cf)]();try{const _0x41cb69=await _0x3c1d06();_0x10598d[_0xcaf7fe(0x1b2)](),console[_0xcaf7fe(0x199)](''+a128_0x23d2ea[_0xcaf7fe(0x1c8)](_0xcaf7fe(0x187))+_0x352519+'\x20'+a128_0x23d2ea[_0xcaf7fe(0x1ad)]('['+_0x41cb69+']'));}catch(_0x2ab0b2){_0x10598d[_0xcaf7fe(0x1b0)](_0x352519);throw _0x2ab0b2;}}async function updatePackageJsonName(_0x2a2a1c){const _0x18f25b=a128_0x4764,_0x32f24e=a128_0x597977[_0x18f25b(0x194)](process['cwd'](),_0x2a2a1c),_0x5daf13=a128_0x597977['join'](_0x32f24e,_0x18f25b(0x1a4));try{console['log']('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x170a3d=getRabetbaseCliPackageRoot(),_0x4398e9=a128_0x597977[_0x18f25b(0x193)](_0x170a3d,_0x18f25b(0x1a4));let _0x37d336=_0x18f25b(0x1b1);try{const _0x51e91f=JSON['parse'](a128_0x135fec[_0x18f25b(0x1bf)](_0x4398e9,'utf8'));_0x37d336=_0x51e91f[_0x18f25b(0x179)]||_0x18f25b(0x1b1);}catch{}const _0x1800e9=a128_0x135fec[_0x18f25b(0x1bf)](_0x5daf13,_0x18f25b(0x1bd)),_0x2e62c7=JSON[_0x18f25b(0x188)](_0x1800e9);_0x2e62c7['name']=_0x2a2a1c,_0x2e62c7[_0x18f25b(0x19f)]=_0x2a2a1c+_0x18f25b(0x1a7)+_0x37d336,a128_0x135fec[_0x18f25b(0x18d)](_0x5daf13,JSON[_0x18f25b(0x1b8)](_0x2e62c7,null,0x2)+'\x0a',_0x18f25b(0x1bd)),console[_0x18f25b(0x199)]('√\x20package.json\x20updated:\x20name='+_0x2a2a1c),logger[_0x18f25b(0x1a8)]('create',_0x18f25b(0x19a));}catch(_0x75cfcc){logger['error'](_0x18f25b(0x1cd),_0x18f25b(0x17f));throw _0x75cfcc;}}async function configureAppCode(_0x1f5fee,_0x346d45,_0x2faf17){const _0x37b9ef=a128_0x4764,_0x57b828=a128_0x597977['resolve'](process[_0x37b9ef(0x190)](),_0x1f5fee),_0xe76e35=a128_0x597977['join'](_0x57b828,NEW_CONFIG_NAME);try{_0x346d45?console[_0x37b9ef(0x199)](_0x37b9ef(0x1a1)+_0x1f5fee+':\x20'+_0x346d45):console['log'](_0x37b9ef(0x1bb)+_0x1f5fee);const _0x17b4ed=getRabetbaseCliPackageRoot(),_0x6c78b4=a128_0x597977[_0x37b9ef(0x193)](_0x17b4ed,'package.json');let _0x5ad2e3=_0x37b9ef(0x1b1);try{const _0x411c09=JSON[_0x37b9ef(0x188)](a128_0x135fec[_0x37b9ef(0x1bf)](_0x6c78b4,_0x37b9ef(0x1bd)));_0x5ad2e3=_0x411c09[_0x37b9ef(0x179)]||_0x37b9ef(0x1b1);}catch{}const _0x838589=readConfig(),_0x27a97f=typeof _0x838589[_0x37b9ef(0x19c)]===_0x37b9ef(0x198)?_0x838589['env']:undefined,_0x5095b8={};for(const _0x9acec2 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x838589[_0x9acec2]!=null)_0x5095b8[_0x9acec2]=_0x838589[_0x9acec2];}const _0x2079c6=buildCanonicalProjectConfig(_0x5095b8,{'appCodes':_0x346d45?[_0x346d45]:[],'env':_0x2faf17||_0x27a97f||_0x37b9ef(0x1b9),'metadata':{'createdAt':new Date()[_0x37b9ef(0x19e)](),'version':_0x5ad2e3}});writeConfigFile(_0xe76e35,_0x2079c6),_0x346d45?console[_0x37b9ef(0x199)](_0x37b9ef(0x1a2)+Object[_0x37b9ef(0x1b7)](_0x2079c6[_0x37b9ef(0x1a9)]||{})['join'](',\x20')+'\x20|\x20Default:\x20'+_0x2079c6[_0x37b9ef(0x192)]):console[_0x37b9ef(0x199)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x37b9ef(0x1b3)),logger['info'](_0x37b9ef(0x1cd),_0x37b9ef(0x1ca)+_0x346d45);}catch(_0x388afa){logger[_0x37b9ef(0x1be)](_0x37b9ef(0x1cd),'配置应用AppCode失败');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2fc9e4,_0x1310e5){const _0x5cd67d=a129_0x5477,_0x43acab=_0x2fc9e4();while(!![]){try{const _0x147cef=-parseInt(_0x5cd67d(0x1e6))/0x1*(-parseInt(_0x5cd67d(0x1eb))/0x2)+parseInt(_0x5cd67d(0x1ea))/0x3+parseInt(_0x5cd67d(0x1d6))/0x4*(-parseInt(_0x5cd67d(0x1d9))/0x5)+-parseInt(_0x5cd67d(0x1de))/0x6*(-parseInt(_0x5cd67d(0x1d3))/0x7)+parseInt(_0x5cd67d(0x1f3))/0x8+parseInt(_0x5cd67d(0x1d8))/0x9+-parseInt(_0x5cd67d(0x1cf))/0xa*(parseInt(_0x5cd67d(0x1c9))/0xb);if(_0x147cef===_0x1310e5)break;else _0x43acab['push'](_0x43acab['shift']());}catch(_0x3355e8){_0x43acab['push'](_0x43acab['shift']());}}}(a129_0x1e6f,0x6cfac));import a129_0x5737ff from'path';import a129_0x1b385b from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';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';function a129_0x5477(_0x1c7eaf,_0x4070cb){_0x1c7eaf=_0x1c7eaf-0x1c2;const _0x1e6fbe=a129_0x1e6f();let _0x5477d0=_0x1e6fbe[_0x1c7eaf];return _0x5477d0;}import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.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(_0x233bb3,_0x26365d,_0x30b97e,_0x109b51){const _0x433f36=a129_0x5477,_0x581012=await checkCliVersion();(_0x581012[_0x433f36(0x1f1)]||_0x581012[_0x433f36(0x1cb)])&&(printCliUpgradeWarning(_0x581012),assertCliVersionSupported(_0x581012));if(!_0x233bb3||_0x233bb3[_0x433f36(0x1c5)]()==='')throw CliErrors[_0x433f36(0x1e4)](_0x433f36(0x1ee));const _0x22e9ae=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x22e9ae[_0x433f36(0x1cc)](_0x233bb3))throw CliErrors[_0x433f36(0x1e4)](_0x433f36(0x1e9),_0x433f36(0x1ce));if(_0x233bb3[_0x433f36(0x1d0)]>0x64)throw CliErrors[_0x433f36(0x1e4)](_0x433f36(0x1d2));const _0x27d1e8=a129_0x5737ff[_0x433f36(0x1f2)](process['cwd'](),_0x233bb3);if(existsSync(_0x27d1e8))throw CliErrors[_0x433f36(0x1e4)]('Project\x20directory\x20\x22'+_0x233bb3+_0x433f36(0x1ed),_0x433f36(0x1fb));try{const _0x1a988a=a129_0x5737ff[_0x433f36(0x1ef)](_0x27d1e8);await a129_0x1b385b['access'](_0x1a988a,a129_0x1b385b['constants'][_0x433f36(0x1f6)]);}catch{throw CliErrors['validation'](_0x433f36(0x1c4),_0x433f36(0x1fa));}try{console[_0x433f36(0x1fc)](_0x433f36(0x1d7)+_0x233bb3+'...');const _0x2f5b1f=getSubAppReactDemoTemplateDir();await copyDirectory(_0x2f5b1f,_0x27d1e8),console[_0x433f36(0x1fc)](_0x433f36(0x1dd)),await updatePackageJsonName(_0x233bb3),console['log'](_0x433f36(0x1d4)),console[_0x433f36(0x1fc)]('\x20\x20Installing\x20dependencies...'),console[_0x433f36(0x1fc)](_0x433f36(0x1f7)),await formatCode(_0x27d1e8),console[_0x433f36(0x1fc)](_0x433f36(0x1f9)),await configureProject(_0x233bb3,_0x30b97e,_0x26365d),console[_0x433f36(0x1fc)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x30b97e&&await pullApiConfig(_0x27d1e8,_0x30b97e,_0x26365d,_0x109b51),console['log'](_0x433f36(0x1db)+_0x233bb3+_0x433f36(0x1c3)),console[_0x433f36(0x1fc)](_0x433f36(0x1d5)+_0x233bb3),console[_0x433f36(0x1fc)](_0x433f36(0x1cd));}catch(_0x70883f){try{existsSync(_0x27d1e8)&&await a129_0x1b385b['rm'](_0x27d1e8,{'recursive':!![],'force':!![]});}catch{}throw _0x70883f;}}async function updatePackageJsonName(_0x12e12d){const _0x196278=a129_0x5477,_0x170143=a129_0x5737ff[_0x196278(0x1f2)](process[_0x196278(0x1c6)](),_0x12e12d),_0x4b44e5=a129_0x5737ff[_0x196278(0x1f8)](_0x170143,_0x196278(0x1c8)),_0x1b6682=await a129_0x1b385b['readFile'](_0x4b44e5,_0x196278(0x1d1)),_0x36a069=JSON[_0x196278(0x1ca)](_0x1b6682);_0x36a069[_0x196278(0x1e7)]=_0x12e12d,_0x36a069[_0x196278(0x1e8)]=_0x196278(0x1e1),await a129_0x1b385b['writeFile'](_0x4b44e5,JSON[_0x196278(0x1ec)](_0x36a069,null,0x2)+'\x0a');}function detectPackageManager(){const _0x346b7f=a129_0x5477;try{return execSync('bun\x20--version',{'stdio':'ignore'}),'bun';}catch{return _0x346b7f(0x1f5);}}async function formatCode(_0x11067d){const _0x460d3d=a129_0x5477;try{await execAsync(_0x460d3d(0x1dc),{'cwd':_0x11067d});}catch{}}async function configureProject(_0x5599ab,_0xe69b9c,_0x10cd30){const _0x1a1982=a129_0x5477,_0x340099=a129_0x5737ff['resolve'](process[_0x1a1982(0x1c6)](),_0x5599ab),_0xd5a7db=a129_0x5737ff[_0x1a1982(0x1f8)](_0x340099,NEW_CONFIG_NAME),_0x51dc2a=readConfig(),_0x504033=typeof _0x51dc2a[_0x1a1982(0x1da)]==='string'?_0x51dc2a[_0x1a1982(0x1da)]:undefined,_0x4b71c3={};for(const _0x2e5a7e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x51dc2a[_0x2e5a7e]!=null)_0x4b71c3[_0x2e5a7e]=_0x51dc2a[_0x2e5a7e];}const _0x29a43e=buildCanonicalProjectConfig(_0x4b71c3,{'appCodes':_0xe69b9c?[_0xe69b9c]:[],'env':_0x10cd30||_0x504033||'production','metadata':{'createdAt':new Date()[_0x1a1982(0x1e3)](),'version':getCliVersion()}});writeConfigFile(_0xd5a7db,_0x29a43e);}function a129_0x1e6f(){const _0xf5b9e7=['name','description','Project\x20name\x20contains\x20invalid\x20characters.','2423109HBqbCO','2JrYUQM','stringify','\x22\x20already\x20exists.','Project\x20name\x20cannot\x20be\x20empty.','dirname','\x20\x20√\x20Pulled\x20','needsUpgrade','resolve','6490272fJySZY','modelCount','npm','W_OK','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','join','\x20\x20√\x20Code\x20formatted','Check\x20directory\x20permissions.','Use\x20a\x20different\x20project\x20name.','log','\x20api\x20pull`\x20manually\x20later.','\x20created\x20successfully!','Cannot\x20create\x20project\x20in\x20current\x20directory.','trim','cwd','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','package.json','2552ObeESc','parse','belowMinimum','test','\x20\x20rabetbase\x20run\x20start\x0a','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','120740WlJNIy','length','utf-8','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','3031BMQdqu','\x20\x20√\x20package.json\x20updated','\x0a\x20\x20cd\x20','164368ESDPkR','*\x20Creating\x20project\x20','5068296sqaitC','10wnqNzd','env','\x0a√\x20Project\x20','bun\x20run\x20format','\x20\x20√\x20Project\x20template\x20created','6852uarSZq','chdir','\x20model(s)','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x20dataset(s),\x20generated\x20','toLocaleString','validation','\x20\x20Pulling\x20API\x20configuration...','653115wpewEH'];a129_0x1e6f=function(){return _0xf5b9e7;};return a129_0x1e6f();}async function pullApiConfig(_0x14cef4,_0x3be2ff,_0x367815,_0x48e492){const _0x258088=a129_0x5477,_0x3a2b9d=process[_0x258088(0x1c6)]();try{process[_0x258088(0x1df)](_0x14cef4);const _0xc1b63f=_0x367815||'production';initEnv(_0xc1b63f),console['log'](_0x258088(0x1e5));const {configArray:_0x1583c0}=await fetchModelList(_0x3be2ff,_0x48e492||''),_0x344222=await generateApiFile(_0x1583c0,'',_0x3be2ff,!![],_0xc1b63f,DEFAULT_API_DIR);console['log'](_0x258088(0x1f0)+_0x1583c0[_0x258088(0x1d0)]+_0x258088(0x1e2)+_0x344222[_0x258088(0x1f4)]+_0x258088(0x1e0));}catch(_0xd98127){console['log'](_0x258088(0x1c7)+CLI_BIN_NAME+_0x258088(0x1c2));}finally{process[_0x258088(0x1df)](_0x3a2b9d);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a130_0x1d8f(){const _0x3d7b1c=['10731wRxdWI','projects','389770EwfyFQ','22AnOxHs','join','resolve','245QBRwxE','49264REFzyQ','3737019OOuBAs','19308rirjKV','696408vFKYCG','sub-app-react-demo','21dcFbJv','dirname','21lNIvYT','7115136zjoqQV','templates','54OxEwkD'];a130_0x1d8f=function(){return _0x3d7b1c;};return a130_0x1d8f();}const a130_0x4c8fa7=a130_0xf719;(function(_0xe8bf94,_0x466131){const _0x53f9b3=a130_0xf719,_0x451b3e=_0xe8bf94();while(!![]){try{const _0x2fa29d=parseInt(_0x53f9b3(0x1e9))/0x1*(parseInt(_0x53f9b3(0x1ec))/0x2)+-parseInt(_0x53f9b3(0x1e5))/0x3*(-parseInt(_0x53f9b3(0x1f0))/0x4)+-parseInt(_0x53f9b3(0x1ef))/0x5*(parseInt(_0x53f9b3(0x1f2))/0x6)+-parseInt(_0x53f9b3(0x1f5))/0x7*(-parseInt(_0x53f9b3(0x1f3))/0x8)+parseInt(_0x53f9b3(0x1e8))/0x9*(parseInt(_0x53f9b3(0x1eb))/0xa)+parseInt(_0x53f9b3(0x1f1))/0xb+-parseInt(_0x53f9b3(0x1e6))/0xc;if(_0x2fa29d===_0x466131)break;else _0x451b3e['push'](_0x451b3e['shift']());}catch(_0x31ba36){_0x451b3e['push'](_0x451b3e['shift']());}}}(a130_0x1d8f,0x46683));import a130_0x37ec26 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a130_0x37ec26[a130_0x4c8fa7(0x1e4)](fileURLToPath(import.meta.url));function a130_0xf719(_0x524d12,_0x15a392){_0x524d12=_0x524d12-0x1e4;const _0x1d8f01=a130_0x1d8f();let _0xf7198e=_0x1d8f01[_0x524d12];return _0xf7198e;}export function getRabetbaseCliPackageRoot(){const _0x4d4f5c=a130_0x4c8fa7;return a130_0x37ec26[_0x4d4f5c(0x1ee)](__dirname,'../../../../');}export function getSubAppReactDemoTemplateDir(){const _0x5449dd=a130_0x4c8fa7;return a130_0x37ec26[_0x5449dd(0x1ed)](getRabetbaseCliPackageRoot(),_0x5449dd(0x1e7),_0x5449dd(0x1ea),_0x5449dd(0x1f4));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a131_0x20b4(_0x579f7c,_0x2aa0c7){_0x579f7c=_0x579f7c-0x123;const _0x2c96de=a131_0x2c96();let _0x20b4d4=_0x2c96de[_0x579f7c];return _0x20b4d4;}(function(_0x121626,_0x42e3a9){const _0x11fdd3=a131_0x20b4,_0x460f6a=_0x121626();while(!![]){try{const _0x5ece85=parseInt(_0x11fdd3(0x12f))/0x1*(parseInt(_0x11fdd3(0x12d))/0x2)+parseInt(_0x11fdd3(0x131))/0x3+parseInt(_0x11fdd3(0x124))/0x4+-parseInt(_0x11fdd3(0x134))/0x5*(parseInt(_0x11fdd3(0x12b))/0x6)+parseInt(_0x11fdd3(0x126))/0x7*(parseInt(_0x11fdd3(0x130))/0x8)+parseInt(_0x11fdd3(0x12a))/0x9+-parseInt(_0x11fdd3(0x12e))/0xa;if(_0x5ece85===_0x42e3a9)break;else _0x460f6a['push'](_0x460f6a['shift']());}catch(_0xeb2ce){_0x460f6a['push'](_0x460f6a['shift']());}}}(a131_0x2c96,0x996a1));import a131_0x59dd9c 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';function a131_0x2c96(){const _0x130b2e=['message','7dJVtjk','success','开始复制项目模板','项目模板复制完成','979362fKbGXQ','13908vJgXVa','now','42WNBHUL','22631140dkIHTM','53401XtxePE','2381032kcfkpE','785814WTPdMD','error','info','305YozKNV','copy','项目模板复制失败','resolve','4972364OJPBGC'];a131_0x2c96=function(){return _0x130b2e;};return a131_0x2c96();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x18d47f){const _0x2d76a1=a131_0x20b4,_0xa16cc=Date['now'](),_0x419f5e=a131_0x59dd9c[_0x2d76a1(0x123)](process['cwd'](),_0x18d47f);try{logger[_0x2d76a1(0x133)]('copy',_0x2d76a1(0x128),{'projectCode':_0x18d47f,'templateDir':templateDir}),await copyDirectory(templateDir,_0x419f5e);const _0x3e4d84=Date[_0x2d76a1(0x12c)]()-_0xa16cc;logger[_0x2d76a1(0x127)](_0x2d76a1(0x135),_0x2d76a1(0x129),_0x3e4d84,{'projectCode':_0x18d47f});}catch(_0x5ddbca){const _0x30759a=Date[_0x2d76a1(0x12c)]()-_0xa16cc;logger[_0x2d76a1(0x132)]('copy',_0x2d76a1(0x136),{'projectCode':_0x18d47f,'error':_0x5ddbca instanceof Error?_0x5ddbca[_0x2d76a1(0x125)]:String(_0x5ddbca),'duration':_0x30759a});throw _0x5ddbca;}return formatElapsed(_0xa16cc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x7526d3,_0x24165a){const _0x1c21cc=a132_0x25b6,_0x40f884=_0x7526d3();while(!![]){try{const _0x290ee0=-parseInt(_0x1c21cc(0x181))/0x1+-parseInt(_0x1c21cc(0x17a))/0x2+-parseInt(_0x1c21cc(0x182))/0x3+-parseInt(_0x1c21cc(0x175))/0x4*(-parseInt(_0x1c21cc(0x172))/0x5)+parseInt(_0x1c21cc(0x176))/0x6+-parseInt(_0x1c21cc(0x174))/0x7*(-parseInt(_0x1c21cc(0x179))/0x8)+parseInt(_0x1c21cc(0x178))/0x9;if(_0x290ee0===_0x24165a)break;else _0x40f884['push'](_0x40f884['shift']());}catch(_0x3d5ac0){_0x40f884['push'](_0x40f884['shift']());}}}(a132_0x5b3b,0x2e56d));import a132_0x5aeb0e from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a132_0x5b3b(){const _0x45a9cb=['16620VtIcLJ','message','994aJGmuB','228uRynpF','2168550NFGHDy','开始格式化代码','972126NJWznO','48cUZbie','141296pFdASd','info','代码格式化失败','format','npx','cwd','代码格式化完成','109323VIsiIa','869949aEIWmY','now','success','resolve'];a132_0x5b3b=function(){return _0x45a9cb;};return a132_0x5b3b();}function a132_0x25b6(_0x444c56,_0x15be87){_0x444c56=_0x444c56-0x172;const _0x5b3bc6=a132_0x5b3b();let _0x25b6cd=_0x5b3bc6[_0x444c56];return _0x25b6cd;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x4bb040){const _0x25079d=a132_0x25b6,_0x403250=Date[_0x25079d(0x183)](),_0x2280b2=a132_0x5aeb0e[_0x25079d(0x185)](process[_0x25079d(0x17f)](),_0x4bb040);try{logger[_0x25079d(0x17b)](_0x25079d(0x17d),_0x25079d(0x177),{'projectCode':_0x4bb040}),await execa(resolveNpmBin(_0x25079d(0x17e)),['prettier','--write','.'],{'cwd':_0x2280b2});const _0xf4011c=Date[_0x25079d(0x183)]()-_0x403250;logger[_0x25079d(0x184)](_0x25079d(0x17d),_0x25079d(0x180),_0xf4011c,{'projectCode':_0x4bb040});}catch(_0x5dd23d){const _0x2fa355=Date[_0x25079d(0x183)]()-_0x403250;logger['error'](_0x25079d(0x17d),_0x25079d(0x17c),{'projectCode':_0x4bb040,'error':_0x5dd23d instanceof Error?_0x5dd23d[_0x25079d(0x173)]:String(_0x5dd23d),'duration':_0x2fa355});throw _0x5dd23d;}return formatElapsed(_0x403250);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x120cb9,_0x5b6894){const _0x2551a0=a133_0x4067,_0x101891=_0x120cb9();while(!![]){try{const _0x3ea5cb=parseInt(_0x2551a0(0xc8))/0x1+-parseInt(_0x2551a0(0xcf))/0x2*(parseInt(_0x2551a0(0xcd))/0x3)+parseInt(_0x2551a0(0xd6))/0x4*(parseInt(_0x2551a0(0xc7))/0x5)+-parseInt(_0x2551a0(0xc9))/0x6+-parseInt(_0x2551a0(0xd8))/0x7+-parseInt(_0x2551a0(0xcc))/0x8*(-parseInt(_0x2551a0(0xca))/0x9)+parseInt(_0x2551a0(0xcb))/0xa;if(_0x3ea5cb===_0x5b6894)break;else _0x101891['push'](_0x101891['shift']());}catch(_0x536083){_0x101891['push'](_0x101891['shift']());}}}(a133_0x4287,0x56df6));import a133_0x2832a5 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a133_0x4067(_0x3ed9a8,_0x56d411){_0x3ed9a8=_0x3ed9a8-0xc5;const _0x4287b7=a133_0x4287();let _0x4067f8=_0x4287b7[_0x3ed9a8];return _0x4067f8;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x183394){const _0xe0c1b2=a133_0x4067,_0x395e7b=Date[_0xe0c1b2(0xc5)](),_0x5c1ad6=a133_0x2832a5['resolve'](process[_0xe0c1b2(0xd4)](),_0x183394);try{logger[_0xe0c1b2(0xd1)]('install',_0xe0c1b2(0xc6),{'projectCode':_0x183394,'registry':_0xe0c1b2(0xd7)}),await execa(resolveNpmBin('npm'),[_0xe0c1b2(0xd5),_0xe0c1b2(0xd9),_0xe0c1b2(0xd7)],{'cwd':_0x5c1ad6});const _0x1416fe=Date[_0xe0c1b2(0xc5)]()-_0x395e7b;logger[_0xe0c1b2(0xd2)](_0xe0c1b2(0xd5),_0xe0c1b2(0xce),_0x1416fe,{'projectCode':_0x183394});}catch(_0x4fad5f){const _0x596f22=Date['now']()-_0x395e7b;logger[_0xe0c1b2(0xd3)](_0xe0c1b2(0xd5),_0xe0c1b2(0xd0),{'projectCode':_0x183394,'error':_0x4fad5f instanceof Error?_0x4fad5f[_0xe0c1b2(0xda)]:String(_0x4fad5f),'duration':_0x596f22});throw _0x4fad5f;}return formatElapsed(_0x395e7b);}function a133_0x4287(){const _0x3c5dbc=['开始安装依赖','3091575dsmqIt','524586EBQoqi','3786984XNYJrx','1003383kOitkn','1246770owNgnA','32jgRJHE','1454706kYqtyQ','依赖安装完成','2RUiZYR','依赖安装失败','info','success','error','cwd','install','4IlPyZO','https://registry.npmmirror.com','1691410lbmEoX','--registry','message','now'];a133_0x4287=function(){return _0x3c5dbc;};return a133_0x4287();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a134_0x58a378=a134_0x1073;(function(_0x42aebf,_0x4793d3){const _0xf9497=a134_0x1073,_0x3b4f06=_0x42aebf();while(!![]){try{const _0x1b2d98=-parseInt(_0xf9497(0xfa))/0x1+parseInt(_0xf9497(0x114))/0x2+parseInt(_0xf9497(0xf6))/0x3+-parseInt(_0xf9497(0x116))/0x4+parseInt(_0xf9497(0x104))/0x5*(-parseInt(_0xf9497(0x10c))/0x6)+parseInt(_0xf9497(0x103))/0x7*(parseInt(_0xf9497(0x111))/0x8)+parseInt(_0xf9497(0xf9))/0x9*(parseInt(_0xf9497(0x10f))/0xa);if(_0x1b2d98===_0x4793d3)break;else _0x3b4f06['push'](_0x3b4f06['shift']());}catch(_0x4751f8){_0x3b4f06['push'](_0x3b4f06['shift']());}}}(a134_0x3895,0xbbeb2));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a134_0x1073(_0x175562,_0x4fbd6d){_0x175562=_0x175562-0xf3;const _0x389590=a134_0x3895();let _0x107318=_0x389590[_0x175562];return _0x107318;}function a134_0x3895(){const _0xd771dc=['2026-07','Usage:\x20','11678841oBsUcx','321174xevhbO','project-name','Skip\x20confirmation\x20prompt','Project\x20name','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','write','Auto-confirm\x20prompts','../../commands/project/create/main.js','217707dzbfoG','615HMhMgs','init','project','../../commands/project/create/non-interactive.js','upgrade','boolean','nonInteractive','validation','28818wnjTsu','cookie','string','10xvVjiG','args','384KuBxka','\x20workspace\x20init','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','59328cYTXTt','bool','6153604FNRyMa','name','yes','env','str','App\x20code\x20to\x20initialize','Target\x20environment','appcode','1199691LCoyVG'];a134_0x3895=function(){return _0xd771dc;};return a134_0x3895();}const initFlags=[{'name':a134_0x58a378(0xf5),'type':a134_0x58a378(0x10e),'description':a134_0x58a378(0xf3)},{'name':a134_0x58a378(0x119),'type':'string','description':a134_0x58a378(0xf4)},{'name':a134_0x58a378(0x118),'type':a134_0x58a378(0x109),'description':a134_0x58a378(0x101),'default':![]}],createFlags=[{'name':a134_0x58a378(0x117),'type':'string','description':a134_0x58a378(0xfd)},{'name':a134_0x58a378(0x119),'type':a134_0x58a378(0x10e),'description':'Target\x20environment'},{'name':a134_0x58a378(0xf5),'type':a134_0x58a378(0x10e),'description':a134_0x58a378(0xff)}],upgradeFlags=[{'name':'yes','type':a134_0x58a378(0x109),'description':a134_0x58a378(0xfc),'default':![]}];export const projectDefinitions=[{'service':a134_0x58a378(0x106),'command':a134_0x58a378(0x105),'description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a134_0x58a378(0x100),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a134_0x58a378(0x112),'since':a134_0x58a378(0xf7)},'flags':initFlags,async 'execute'(_0x3e5137){const _0xd5d37f=a134_0x58a378;return await initConfig({'appcode':_0x3e5137[_0xd5d37f(0x11a)](_0xd5d37f(0xf5))||undefined,'env':_0x3e5137[_0xd5d37f(0x11a)](_0xd5d37f(0x119))||undefined,'autoYes':_0x3e5137['bool'](_0xd5d37f(0x118))}),{'ok':!![]};}},{'service':a134_0x58a378(0x106),'command':'create','description':'Create\x20a\x20new\x20project','risk':a134_0x58a378(0x100),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a134_0x58a378(0xfb),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x4c82b7){const _0xc0ee21=a134_0x58a378,{createApp:_0x140a12}=await import(_0xc0ee21(0x102)),{createProjectNonInteractive:_0x1b282b}=await import(_0xc0ee21(0x107)),_0x51d12c=_0x4c82b7['str'](_0xc0ee21(0x117))['trim']()||_0x4c82b7[_0xc0ee21(0x110)][0x0]?.['trim'](),_0x26b9a8=_0x4c82b7[_0xc0ee21(0x11a)](_0xc0ee21(0x119))||undefined,_0x4d7f50=_0x4c82b7['str'](_0xc0ee21(0xf5))||undefined;if(_0x4c82b7[_0xc0ee21(0x10a)]){if(!_0x51d12c)throw CliErrors[_0xc0ee21(0x10b)](_0xc0ee21(0x113),_0xc0ee21(0xf8)+CLI_BIN_NAME+_0xc0ee21(0xfe));await _0x1b282b(_0x51d12c,_0x26b9a8,_0x4d7f50,_0x4c82b7[_0xc0ee21(0x10d)]);}else await _0x140a12({'projectCode':_0x51d12c,'appCode':_0x4d7f50,'env':_0x26b9a8,'cookie':_0x4c82b7[_0xc0ee21(0x10d)]});return{'ok':!![]};}},{'service':a134_0x58a378(0x106),'command':a134_0x58a378(0x108),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5cb2e7){const _0xe8cba3=a134_0x58a378;return await upgradeApp(_0x5cb2e7[_0xe8cba3(0x10a)],{'yes':_0x5cb2e7[_0xe8cba3(0x115)](_0xe8cba3(0x118))}),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa2750c,_0x6959ba){const _0x24f1f7=a135_0x1453,_0x1c1281=_0xa2750c();while(!![]){try{const _0x33f12c=parseInt(_0x24f1f7(0x198))/0x1*(-parseInt(_0x24f1f7(0x197))/0x2)+parseInt(_0x24f1f7(0x1aa))/0x3*(-parseInt(_0x24f1f7(0x1ac))/0x4)+-parseInt(_0x24f1f7(0x1a8))/0x5*(parseInt(_0x24f1f7(0x1af))/0x6)+parseInt(_0x24f1f7(0x190))/0x7*(parseInt(_0x24f1f7(0x1a2))/0x8)+parseInt(_0x24f1f7(0x19e))/0x9*(parseInt(_0x24f1f7(0x1b1))/0xa)+parseInt(_0x24f1f7(0x1a5))/0xb+parseInt(_0x24f1f7(0x1a0))/0xc*(parseInt(_0x24f1f7(0x192))/0xd);if(_0x33f12c===_0x6959ba)break;else _0x1c1281['push'](_0x1c1281['shift']());}catch(_0xb04563){_0x1c1281['push'](_0x1c1281['shift']());}}}(a135_0x3dc3,0x77e5b));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a135_0x7e0752 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';function a135_0x1453(_0x53793a,_0x997b79){_0x53793a=_0x53793a-0x17d;const _0x3dc397=a135_0x3dc3();let _0x1453fe=_0x3dc397[_0x53793a];return _0x1453fe;}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';function a135_0x3dc3(){const _0x4de769=['.bak','13304hlGlQl','defaultApp','string','3887235Nxqdrj','info','keys','19495DXVlMm','1.0.0','363SbEyrp','\x20workspace\x20init`\x20to\x20start\x20fresh.','4696XQhxtw','cwd','app','1146EGGbHm','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','2566020tFFAoY','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','\x20\x20Apps:\x20','从旧配置文件升级成功','Migration\x20cancelled.\x20Run\x20`','\x20→\x20.rabetbase.json','cyan','join','init','env','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','初始化项目配置文件成功','setLogPath','\x20\x20Default:\x20','green','bold','Invalid\x20App\x20Code','log','yellow','appcode','apps','parse','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','Please\x20enter\x20App\x20Code:','2779dkPKTq','trim','45058jnJEPG','../..','App\x20Code\x20cannot\x20be\x20empty','toLocaleString','gray','82966ORlKBM','2DETbZb','utf8','\x20api\x20pull\x27','.rabetbase.json','\x20\x20appcode:\x20','production','9onZhyp','version','660pkTQFf'];a135_0x3dc3=function(){return _0x4de769;};return a135_0x3dc3();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x401f3e){const _0x1e10f7=a135_0x1453,{appcode:_0x5b9fe3,env:_0x1d287d,autoYes:_0x168ca0}=_0x401f3e,_0x2abfc3=process[_0x1e10f7(0x1ad)]();if(getProjectConfigPath())throw new Error(_0x1e10f7(0x1b0));let _0x47da9f;for(const _0x451014 of LEGACY_CONFIG_NAMES){const _0x2d443c=resolve(_0x2abfc3,_0x451014);if(existsSync(_0x2d443c)){_0x47da9f=_0x2d443c;break;}}if(_0x47da9f){let _0x863c41={};try{_0x863c41=JSON[_0x1e10f7(0x18d)](readFileSync(_0x47da9f,_0x1e10f7(0x199)));}catch{}const _0x271bd4=basename(_0x47da9f),_0x3708ee=_0x863c41?.['appcode']||_0x863c41?.[_0x1e10f7(0x1ae)];let _0x42bdc1=_0x168ca0;!_0x168ca0&&(console[_0x1e10f7(0x189)](a135_0x7e0752[_0x1e10f7(0x18a)](_0x1e10f7(0x182)+a135_0x7e0752[_0x1e10f7(0x187)](_0x271bd4))),_0x3708ee&&console[_0x1e10f7(0x189)](a135_0x7e0752[_0x1e10f7(0x17e)](_0x1e10f7(0x19c)+_0x3708ee)),_0x42bdc1=await confirm({'message':'Upgrade\x20it\x20to\x20'+a135_0x7e0752[_0x1e10f7(0x187)](_0x1e10f7(0x19b))+'?\x20(Old\x20file\x20→\x20*.bak)','default':!![]}));if(!_0x42bdc1){console[_0x1e10f7(0x189)](_0x1e10f7(0x1b5)+CLI_BIN_NAME+_0x1e10f7(0x1ab));return;}const _0x55b12e=resolve(_0x2abfc3,NEW_CONFIG_NAME),_0x2ad1fd=getCliVersionFromPkg(),_0x49dd8d=readRawConfig(),_0x5678f6=_0x5b9fe3||(typeof _0x863c41?.[_0x1e10f7(0x18b)]===_0x1e10f7(0x1a4)?_0x863c41[_0x1e10f7(0x18b)]:undefined)||(typeof _0x863c41?.[_0x1e10f7(0x1ae)]===_0x1e10f7(0x1a4)?_0x863c41[_0x1e10f7(0x1ae)]:undefined)||await askAppcode(),_0x1781b0=typeof _0x863c41?.[_0x1e10f7(0x181)]===_0x1e10f7(0x1a4)?_0x863c41['env']:typeof _0x49dd8d['env']===_0x1e10f7(0x1a4)?_0x49dd8d[_0x1e10f7(0x181)]:_0x1e10f7(0x19d),_0x195531=buildCanonicalProjectConfig({..._0x49dd8d,..._0x863c41},{'appCodes':[_0x5678f6],'env':_0x1781b0,'metadata':{'version':_0x2ad1fd,'migratedAt':new Date()[_0x1e10f7(0x195)](),'migratedFrom':_0x47da9f}});writeConfigFile(_0x55b12e,_0x195531);const _0xc1da64=_0x47da9f+'.bak';renameSync(_0x47da9f,_0xc1da64),logger[_0x1e10f7(0x184)](_0x2abfc3),logger[_0x1e10f7(0x1a6)](_0x1e10f7(0x180),_0x1e10f7(0x1b4),{'from':_0x47da9f,'to':_0x55b12e,'appcode':_0x5678f6,'env':_0x195531['env']}),console['log'](a135_0x7e0752[_0x1e10f7(0x186)]('✓\x20Upgraded\x20'+_0x271bd4+_0x1e10f7(0x17d))),console[_0x1e10f7(0x189)](a135_0x7e0752['cyan']('\x20\x20Apps:\x20'+Object['keys'](_0x195531[_0x1e10f7(0x18c)]||{})['join'](',\x20'))),console[_0x1e10f7(0x189)](a135_0x7e0752[_0x1e10f7(0x17e)](_0x1e10f7(0x185)+_0x195531[_0x1e10f7(0x1a3)])),console[_0x1e10f7(0x189)](a135_0x7e0752[_0x1e10f7(0x196)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x271bd4+_0x1e10f7(0x1a1)));return;}const _0x4a6018=_0x5b9fe3||await askAppcode(),_0x394030=resolve(_0x2abfc3,NEW_CONFIG_NAME),_0x583e3e=getCliVersionFromPkg(),_0x561540=readRawConfig(),_0x4d4bfe=typeof _0x561540['env']===_0x1e10f7(0x1a4)?_0x561540['env']:undefined,_0x49f2fd=buildCanonicalProjectConfig({},{'appCodes':[_0x4a6018],'env':_0x1d287d||_0x4d4bfe||'production','metadata':{'version':_0x583e3e,'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x394030,_0x49f2fd),logger[_0x1e10f7(0x184)](_0x2abfc3),logger['info'](_0x1e10f7(0x180),_0x1e10f7(0x183),{'appcode':_0x4a6018,'env':_0x49f2fd[_0x1e10f7(0x181)],'version':_0x49f2fd[_0x1e10f7(0x19f)],'configPath':_0x394030}),console[_0x1e10f7(0x189)](a135_0x7e0752[_0x1e10f7(0x186)](_0x1e10f7(0x1b2))),console[_0x1e10f7(0x189)](a135_0x7e0752[_0x1e10f7(0x17e)](_0x1e10f7(0x1b3)+Object[_0x1e10f7(0x1a7)](_0x49f2fd[_0x1e10f7(0x18c)]||{})[_0x1e10f7(0x17f)](',\x20'))),console[_0x1e10f7(0x189)](a135_0x7e0752['cyan'](_0x1e10f7(0x185)+_0x49f2fd[_0x1e10f7(0x1a3)])),console[_0x1e10f7(0x189)](_0x1e10f7(0x18e)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+_0x1e10f7(0x19a));}function askAppcode(){const _0xd6bcb5=a135_0x1453;return input({'message':_0xd6bcb5(0x18f),'validate':_0x45a86e=>{const _0x229397=_0xd6bcb5;if(!_0x45a86e[_0x229397(0x191)]())return _0x229397(0x194);const {valid:_0xec3550,message:_0x36b642}=validateAppcode(_0x45a86e['trim']());return _0xec3550||_0x36b642||_0x229397(0x188);}});}function getCliVersionFromPkg(){const _0x54b243=a135_0x1453;try{const _0x25ebc9=fileURLToPath(import.meta.url),_0x445f69=resolve(dirname(_0x25ebc9),_0x54b243(0x193)),_0x3b5eaa=JSON['parse'](readFileSync(resolve(_0x445f69,'package.json'),_0x54b243(0x199)));return _0x3b5eaa[_0x54b243(0x19f)]||_0x54b243(0x1a9);}catch{return'1.0.0';}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a136_0x36a9b3=a136_0x313b;(function(_0x59ed69,_0x154ff7){const _0x1c9fad=a136_0x313b,_0x24834b=_0x59ed69();while(!![]){try{const _0x9559fa=parseInt(_0x1c9fad(0x139))/0x1+-parseInt(_0x1c9fad(0x196))/0x2*(parseInt(_0x1c9fad(0x177))/0x3)+parseInt(_0x1c9fad(0x129))/0x4*(parseInt(_0x1c9fad(0x153))/0x5)+parseInt(_0x1c9fad(0x18c))/0x6*(parseInt(_0x1c9fad(0x163))/0x7)+parseInt(_0x1c9fad(0x185))/0x8+-parseInt(_0x1c9fad(0x13e))/0x9*(-parseInt(_0x1c9fad(0x160))/0xa)+-parseInt(_0x1c9fad(0x17c))/0xb;if(_0x9559fa===_0x154ff7)break;else _0x24834b['push'](_0x24834b['shift']());}catch(_0x275c6e){_0x24834b['push'](_0x24834b['shift']());}}}(a136_0xbde8,0xe2068));import a136_0x38dbad from'chalk';import a136_0x3ca242 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';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[a136_0x36a9b3(0x191)](_0x25d122=>_0x25d122!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x47b102){const _0x6b39b9=a136_0x36a9b3,_0x39d48d=[];for(const _0x56af17 of Object['values'](CORE_IDE_CONFIGS)){if(_0x56af17[_0x6b39b9(0x167)])for(const _0x3cc53d of _0x56af17[_0x6b39b9(0x167)]){_0x39d48d['push'](resolve(_0x47b102,_0x3cc53d['path']));}}return _0x39d48d;}function analyse(_0x2829d9){const _0x4d4fbd=a136_0x36a9b3;let _0x4dec5f=null;const _0xac11f5=resolve(_0x2829d9,NEW_CONFIG_NAME),_0x5a2ea0=existsSync(_0xac11f5);for(const _0x5e06ca of LEGACY_CONFIG_NAMES){const _0x2b9e69=resolve(_0x2829d9,_0x5e06ca);if(existsSync(_0x2b9e69)){const _0x3880e6=readConfigFile(_0x2b9e69),_0x11721d=Object[_0x4d4fbd(0x144)](_0x3880e6)['filter'](_0x570975=>typeof _0x3880e6[_0x570975]!==_0x4d4fbd(0x14a));_0x4dec5f={'oldPath':_0x2b9e69,'hasNewConfig':_0x5a2ea0,'fields':_0x11721d};break;}}const _0x35fb1e=[],_0x24fad1=resolve(_0x2829d9,_0x4d4fbd(0x169));if(existsSync(_0x24fad1))_0x35fb1e[_0x4d4fbd(0x14d)](_0x24fad1);const _0x1c2a39=resolve(_0x2829d9,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x1c2a39))_0x35fb1e[_0x4d4fbd(0x14d)](_0x1c2a39);const _0x120759=resolve(_0x2829d9,_0x4d4fbd(0x175));if(existsSync(_0x120759))_0x35fb1e[_0x4d4fbd(0x14d)](_0x120759);for(const _0x186bae of collectIdeSkillFiles(_0x2829d9)){if(existsSync(_0x186bae))_0x35fb1e['push'](_0x186bae);}let _0x483777=null;const _0x176731=resolve(_0x2829d9,'.cursor/mcp.json');if(existsSync(_0x176731))try{const _0x4eb5fb=JSON[_0x4d4fbd(0x181)](readFileSync(_0x176731,_0x4d4fbd(0x150)));if(_0x4eb5fb?.['mcpServers']&&typeof _0x4eb5fb['mcpServers']===_0x4d4fbd(0x166)){const _0xc172ac=[];for(const [_0x23d20a,_0x487c71]of Object[_0x4d4fbd(0x197)](_0x4eb5fb[_0x4d4fbd(0x18d)])){const _0x35b092=_0x487c71;_0x35b092?.[_0x4d4fbd(0x17b)]&&Array[_0x4d4fbd(0x146)](_0x35b092['args'])&&_0x35b092[_0x4d4fbd(0x17b)][_0x4d4fbd(0x17f)](_0x35c3bf=>typeof _0x35c3bf===_0x4d4fbd(0x17a)&&_0x35c3bf[_0x4d4fbd(0x15b)](_0x4d4fbd(0x148)))&&_0xc172ac['push'](_0x23d20a);}_0xc172ac[_0x4d4fbd(0x162)]>0x0&&(_0x483777={'path':_0x176731,'keys':_0xc172ac});}}catch{}const _0x34d903=_0x35fb1e[_0x4d4fbd(0x162)]>0x0||_0x4dec5f!==null;let _0x4817fd=null;const _0x39d8bd=resolve(_0x2829d9,_0x4d4fbd(0x12d));if(existsSync(_0x39d8bd))try{const _0x1f0659=JSON[_0x4d4fbd(0x181)](readFileSync(_0x39d8bd,_0x4d4fbd(0x150)));for(const _0x5488 of[_0x4d4fbd(0x132),'devDependencies']){const _0x1e4668=_0x1f0659?.[_0x5488]?.['@lovrabet/sdk'];if(typeof _0x1e4668==='string'){_0x1e4668!==_0x4d4fbd(0x159)&&(_0x4817fd={'pkgPath':_0x39d8bd,'currentVersion':_0x1e4668,'field':_0x5488});break;}}}catch{}return{'configMigration':_0x4dec5f,'oldArtifacts':_0x35fb1e,'oldMcpConfig':_0x483777,'needsSkillSwap':_0x34d903,'sdkUpgrade':_0x4817fd};}function a136_0xbde8(){const _0x2d9842=['none\x20found','latest','status','includes','\x20removed','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','[\x22@lovrabet/sdk\x22]:\x20','not\x20found\x20or\x20already\x20at\x20latest','827880sMHqKu','failed','length','1099TxxGRH','\x20→\x20','hasNewConfig','object','files','MCP\x20config:','.lovrabet','\x20\x20bun\x20install','\x20\x20Current\x20version\x20in\x20','needed','bold','Step\x204/7:\x20MCP\x20config\x20—\x20','no\x20matching\x20entry\x20found','Remove\x20.lovrabet/','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','===\x20Upgrade\x20Summary\x20===','Install\x20new\x20skill','@lovrabet/sdk:','.claude/skills/lovrabet','green','3TeLOCm','detail','Step\x206/7:\x20Installing\x20new\x20skill...','string','args','51127197APMqXu','oldPath','path','some','oldArtifacts','parse','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','join','sdkUpgrade','12848344pBgGhe','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Skill\x20swap:','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Step\x201/7:\x20Migrating\x20config...','\x20→\x20keys:\x20','configMigration','17814NbNgfm','mcpServers','\x20→\x20latest','Legacy\x20artifacts:','oldMcpConfig','filter','Clean\x20MCP\x20config','Step\x201/7:\x20Config\x20migration\x20—\x20','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','not\x20found\x20(will\x20create)','766046MKbUbb','entries','Step\x205/7:\x20Removing\x20old\x20skill...','CANCEL','message','cyan','no\x20legacy\x20entry','FOUND','===\x20Upgrade\x20Analysis\x20===','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Config\x20file:','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','\x20removed\x20(','Upgrade\x20@lovrabet/sdk','fields','skipped\x20(no\x20legacy\x20config)','done','Remove\x20legacy\x20artifacts','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','358612LXvYEH','inherit','Proceed\x20with\x20upgrade?','step','package.json','.bak','Upgrade\x20completed\x20successfully!','fail','log','dependencies','start','not\x20needed','succeed','label','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','\x20\x20\x20\x20\x20\x20\x20','780636mGoaAT','yellow','red','exit\x20','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','162rEenGd','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Config\x20migration','stringify','white','Upgrade\x20cancelled.','keys','needsSkillSwap','isArray','cwd','@lovrabet/dataset-mcp-server','\x20from\x20','undefined','lovrabet/rabetbase\x20installed\x20globally','\x20\x20npm\x20install','push','gray','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','utf8','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','\x20\x20Step\x20','90IOrBTj','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','\x20(backup:\x20','error','already\x20exists\x20(will\x20merge)'];a136_0xbde8=function(){return _0x2d9842;};return a136_0xbde8();}function printReport(_0x52cbb7){const _0x2f3e27=a136_0x36a9b3,{configMigration:_0x39b025,oldArtifacts:_0xea8618,oldMcpConfig:_0x42fb12,needsSkillSwap:_0x30ad69}=_0x52cbb7;console[_0x2f3e27(0x131)](''),console['log'](a136_0x38dbad['bold'](_0x2f3e27(0x11e))),console[_0x2f3e27(0x131)]('');_0x39b025?(console[_0x2f3e27(0x131)](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x120))+('\x20\x20'+a136_0x38dbad[_0x2f3e27(0x13a)](_0x39b025['oldPath']))),console['log'](_0x2f3e27(0x11f)+(_0x39b025[_0x2f3e27(0x165)]?a136_0x38dbad['green'](_0x2f3e27(0x157)):a136_0x38dbad['gray'](_0x2f3e27(0x195)))),console[_0x2f3e27(0x131)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x39b025[_0x2f3e27(0x124)][_0x2f3e27(0x183)](',\x20')),console[_0x2f3e27(0x131)]('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x2f3e27(0x131)](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x120))+'\x20\x20'+a136_0x38dbad['gray']('no\x20legacy\x20config\x20found'));console[_0x2f3e27(0x131)]('');if(_0xea8618[_0x2f3e27(0x162)]>0x0){console['log'](a136_0x38dbad[_0x2f3e27(0x19b)]('Legacy\x20artifacts:'));for(const _0x1043a2 of _0xea8618){console['log']('\x20\x20'+a136_0x38dbad['red'](_0x2f3e27(0x11d))+'\x20\x20'+_0x1043a2);}console[_0x2f3e27(0x131)]('\x20\x20Action:\x20delete');}else console['log'](a136_0x38dbad['cyan'](_0x2f3e27(0x18f))+'\x20\x20'+a136_0x38dbad['gray'](_0x2f3e27(0x158)));console[_0x2f3e27(0x131)]('');_0x42fb12?(console[_0x2f3e27(0x131)](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x168))+('\x20\x20'+a136_0x38dbad[_0x2f3e27(0x13a)](_0x42fb12['path'])+_0x2f3e27(0x18a)+_0x42fb12[_0x2f3e27(0x144)][_0x2f3e27(0x183)](',\x20'))),console[_0x2f3e27(0x131)]('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console[_0x2f3e27(0x131)](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x168))+'\x20\x20'+a136_0x38dbad[_0x2f3e27(0x14e)](_0x2f3e27(0x11c)));console[_0x2f3e27(0x131)](''),console['log'](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x187))+('\x20\x20'+(_0x30ad69?a136_0x38dbad['yellow'](_0x2f3e27(0x16c)):a136_0x38dbad[_0x2f3e27(0x176)](_0x2f3e27(0x134)))));_0x30ad69&&console[_0x2f3e27(0x131)](_0x2f3e27(0x186)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x2f3e27(0x131)]('');if(_0x52cbb7[_0x2f3e27(0x184)]){const {currentVersion:_0xec3454,field:_0x138d48,pkgPath:_0x48a91e}=_0x52cbb7[_0x2f3e27(0x184)];console['log'](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x174))+('\x20\x20'+a136_0x38dbad['yellow'](_0x48a91e))),console['log'](_0x2f3e27(0x16b)+_0x138d48+':\x20'+a136_0x38dbad[_0x2f3e27(0x13a)](_0xec3454)+_0x2f3e27(0x164)+a136_0x38dbad[_0x2f3e27(0x176)](_0x2f3e27(0x159))),console[_0x2f3e27(0x131)](_0x2f3e27(0x14f));}else console[_0x2f3e27(0x131)](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x174))+'\x20\x20'+a136_0x38dbad[_0x2f3e27(0x14e)](_0x2f3e27(0x15f)));console[_0x2f3e27(0x131)]('');}function execConfigMigration(_0x231f5b,_0x45bef8){const _0x164376=a136_0x36a9b3,{configMigration:_0x2a2574}=_0x231f5b;if(!_0x2a2574?.['oldPath'])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x164376(0x125)};const _0x113287=readConfigFile(_0x2a2574[_0x164376(0x17d)]),_0x18c799=resolve(_0x45bef8,NEW_CONFIG_NAME),_0x3b9d5a=_0x2a2574['hasNewConfig']?readConfigFile(_0x18c799):{};for(const [_0x13a5a1,_0x394174]of Object[_0x164376(0x197)](_0x113287)){!(_0x13a5a1 in _0x3b9d5a)&&(_0x3b9d5a[_0x13a5a1]=_0x394174);}writeConfigFile(_0x18c799,_0x3b9d5a);const _0x234cdb=_0x2a2574[_0x164376(0x17d)]+_0x164376(0x12e);return renameSync(_0x2a2574[_0x164376(0x17d)],_0x234cdb),{'step':0x1,'label':_0x164376(0x140),'ok':!![],'detail':_0x2a2574[_0x164376(0x17d)]+'\x20→\x20'+_0x18c799+_0x164376(0x155)+_0x234cdb+')'};}function execRemoveOldArtifacts(_0x22590a){const _0x30f6c9=a136_0x36a9b3,_0x4ad911=[];for(const _0x3fe5f8 of _0x22590a){try{if(!existsSync(_0x3fe5f8))continue;const _0x34d2dd=tryStat(_0x3fe5f8);_0x34d2dd?.['isDirectory']()?rmSync(_0x3fe5f8,{'recursive':!![],'force':!![]}):unlinkSync(_0x3fe5f8);}catch(_0x32ef54){_0x4ad911[_0x30f6c9(0x14d)](_0x3fe5f8+':\x20'+_0x32ef54[_0x30f6c9(0x19a)]);}}return{'step':0x3,'label':_0x30f6c9(0x127),'ok':_0x4ad911[_0x30f6c9(0x162)]===0x0,'detail':_0x4ad911[_0x30f6c9(0x162)]>0x0?_0x22590a[_0x30f6c9(0x162)]-_0x4ad911[_0x30f6c9(0x162)]+'/'+_0x22590a[_0x30f6c9(0x162)]+_0x30f6c9(0x122)+_0x4ad911[_0x30f6c9(0x183)](';\x20')+')':_0x22590a[_0x30f6c9(0x162)]+_0x30f6c9(0x15c)};}function execCleanMcp(_0x29b95e){const _0x54268c=a136_0x36a9b3;if(!_0x29b95e[_0x54268c(0x190)])return{'step':0x4,'label':_0x54268c(0x192),'ok':!![],'detail':'skipped'};try{const _0x2d12e6=readFileSync(_0x29b95e[_0x54268c(0x190)]['path'],_0x54268c(0x150)),_0x267f43=JSON[_0x54268c(0x181)](_0x2d12e6);if(_0x267f43?.[_0x54268c(0x18d)]&&typeof _0x267f43['mcpServers']===_0x54268c(0x166)){const _0x548b49=[];for(const [_0x2f4f7c,_0x1653ff]of Object[_0x54268c(0x197)](_0x267f43['mcpServers'])){_0x1653ff?.[_0x54268c(0x17b)]&&Array[_0x54268c(0x146)](_0x1653ff['args'])&&_0x1653ff[_0x54268c(0x17b)][_0x54268c(0x17f)](_0x906b72=>typeof _0x906b72===_0x54268c(0x17a)&&_0x906b72[_0x54268c(0x15b)](_0x54268c(0x148)))&&_0x548b49[_0x54268c(0x14d)](_0x2f4f7c);}for(const _0x138501 of _0x548b49){delete _0x267f43[_0x54268c(0x18d)][_0x138501];}return _0x548b49[_0x54268c(0x162)]>0x0&&writeFileSync(_0x29b95e[_0x54268c(0x190)]['path'],JSON[_0x54268c(0x141)](_0x267f43,null,0x2)+'\x0a',_0x54268c(0x150)),{'step':0x4,'label':_0x54268c(0x192),'ok':!![],'detail':'removed\x20'+_0x548b49[_0x54268c(0x183)](',\x20')+_0x54268c(0x149)+_0x29b95e[_0x54268c(0x190)][_0x54268c(0x17e)]};}return{'step':0x4,'label':_0x54268c(0x192),'ok':!![],'detail':_0x54268c(0x16f)};}catch(_0x5b80d9){return{'step':0x4,'label':_0x54268c(0x192),'ok':![],'detail':_0x5b80d9[_0x54268c(0x19a)]};}}function execSkillsRemove(_0x1d81ce,_0x248e3c){const _0x1ae33c=a136_0x36a9b3,_0x4d71e4=runNpxSkillsRemove(_0x1d81ce,{'stdio':_0x1ae33c(0x12a),'yes':_0x248e3c});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x4d71e4['ok'],'detail':_0x4d71e4['ok']?'lovrabet/lovrabet-skill\x20removed':_0x4d71e4['error']??_0x1ae33c(0x13c)+_0x4d71e4[_0x1ae33c(0x15a)]};}function execSkillsAdd(_0x27988e,_0x362eae){const _0x1472c6=a136_0x36a9b3,_0x1c0f02=runNpxSkillsAddGlobal(_0x27988e,'lovrabet/rabetbase',{'stdio':'inherit','yes':_0x362eae});return{'step':0x6,'label':_0x1472c6(0x173),'ok':_0x1c0f02['ok'],'detail':_0x1c0f02['ok']?_0x1472c6(0x14b):_0x1c0f02[_0x1472c6(0x156)]??'exit\x20'+_0x1c0f02['status']};}function execUpgradeSdk(_0x1318e2){const _0x4f1d31=a136_0x36a9b3;if(!_0x1318e2[_0x4f1d31(0x184)])return{'step':0x7,'label':_0x4f1d31(0x123),'ok':!![],'detail':_0x4f1d31(0x194)};const {pkgPath:_0x5db9c3,currentVersion:_0x58ce74,field:_0x545b5a}=_0x1318e2[_0x4f1d31(0x184)];try{const _0x1280f=readFileSync(_0x5db9c3,_0x4f1d31(0x150)),_0x2dc18b=JSON[_0x4f1d31(0x181)](_0x1280f);return _0x2dc18b[_0x545b5a]['@lovrabet/sdk']='latest',writeFileSync(_0x5db9c3,JSON[_0x4f1d31(0x141)](_0x2dc18b,null,0x2)+'\x0a',_0x4f1d31(0x150)),{'step':0x7,'label':_0x4f1d31(0x123),'ok':!![],'detail':_0x545b5a+_0x4f1d31(0x15e)+_0x58ce74+_0x4f1d31(0x18e)};}catch(_0x5a699d){return{'step':0x7,'label':_0x4f1d31(0x123),'ok':![],'detail':_0x5a699d['message']};}}function tryStat(_0x32616c){try{return statSync(_0x32616c);}catch{return undefined;}}function a136_0x313b(_0x3441b6,_0x51e480){_0x3441b6=_0x3441b6-0x11c;const _0xbde80c=a136_0xbde8();let _0x313b5c=_0xbde80c[_0x3441b6];return _0x313b5c;}function printSummary(_0x567217){const _0x475fda=a136_0x36a9b3;console[_0x475fda(0x131)](''),console['log'](a136_0x38dbad[_0x475fda(0x16d)](_0x475fda(0x172))),console['log']('');for(const _0x5bfdd7 of _0x567217){const _0x22038f=_0x5bfdd7['ok']?a136_0x38dbad['green']('OK'):a136_0x38dbad[_0x475fda(0x13b)]('FAIL');console['log']('\x20\x20'+_0x22038f+_0x475fda(0x152)+_0x5bfdd7[_0x475fda(0x12c)]+':\x20'+_0x5bfdd7[_0x475fda(0x136)]);if(_0x5bfdd7[_0x475fda(0x178)])console[_0x475fda(0x131)](_0x475fda(0x138)+a136_0x38dbad[_0x475fda(0x14e)](_0x5bfdd7[_0x475fda(0x178)]));}console[_0x475fda(0x131)]('');}export async function upgradeApp(_0x3514c8,_0x50a05c){const _0x1c9b16=a136_0x36a9b3,_0x3ad044=process[_0x1c9b16(0x147)](),_0xdc4984=analyse(_0x3ad044),_0x2f93ab=!_0xdc4984[_0x1c9b16(0x18b)]&&_0xdc4984[_0x1c9b16(0x180)][_0x1c9b16(0x162)]===0x0&&!_0xdc4984[_0x1c9b16(0x190)]&&!_0xdc4984[_0x1c9b16(0x145)]&&!_0xdc4984[_0x1c9b16(0x184)];if(_0x2f93ab){console[_0x1c9b16(0x131)](a136_0x38dbad['green'](_0x1c9b16(0x15d)));return;}printReport(_0xdc4984);const _0x43ea3e=!!(_0x50a05c['yes']||_0x50a05c['Y']||_0x3514c8);if(!_0x43ea3e)try{const _0x20458c=await askConfirm(_0x1c9b16(0x12b));if(!_0x20458c){console[_0x1c9b16(0x131)](a136_0x38dbad[_0x1c9b16(0x14e)](_0x1c9b16(0x143)));return;}}catch(_0x223632){if(_0x223632?.['message']===_0x1c9b16(0x199)){console[_0x1c9b16(0x131)](a136_0x38dbad['gray'](_0x1c9b16(0x143)));return;}throw _0x223632;}const _0x4addcc=[],_0x3aea6f=a136_0x3ca242({'text':_0x1c9b16(0x189),'color':_0x1c9b16(0x19b)})[_0x1c9b16(0x133)](),_0x4f6f8a=execConfigMigration(_0xdc4984,_0x3ad044);_0x4addcc[_0x1c9b16(0x14d)](_0x4f6f8a),_0x3aea6f[_0x4f6f8a['ok']?'succeed':'fail'](_0x1c9b16(0x193)+(_0x4f6f8a[_0x1c9b16(0x178)]??(_0x4f6f8a['ok']?'done':_0x1c9b16(0x161))));const _0x3d734c=resolve(_0x3ad044,_0x1c9b16(0x169)),_0x2b9b50=a136_0x3ca242({'text':_0x1c9b16(0x13d),'color':_0x1c9b16(0x19b)})[_0x1c9b16(0x133)]();if(existsSync(_0x3d734c))try{rmSync(_0x3d734c,{'recursive':!![],'force':!![]}),_0x2b9b50[_0x1c9b16(0x135)](_0x1c9b16(0x154)),_0x4addcc[_0x1c9b16(0x14d)]({'step':0x2,'label':_0x1c9b16(0x170),'ok':!![]});}catch(_0xceace7){_0x2b9b50['fail'](_0x1c9b16(0x121)+_0xceace7['message']),_0x4addcc[_0x1c9b16(0x14d)]({'step':0x2,'label':_0x1c9b16(0x170),'ok':![],'detail':_0xceace7['message']});}else _0x2b9b50['info']('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x4addcc['push']({'step':0x2,'label':_0x1c9b16(0x170),'ok':!![],'detail':'skipped'});const _0x2f530b=a136_0x3ca242({'text':_0x1c9b16(0x13f),'color':_0x1c9b16(0x19b)})[_0x1c9b16(0x133)](),_0x3a0c31=execRemoveOldArtifacts(_0xdc4984[_0x1c9b16(0x180)]);_0x4addcc[_0x1c9b16(0x14d)](_0x3a0c31),_0x2f530b[_0x3a0c31['ok']?_0x1c9b16(0x135):'fail']('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x3a0c31[_0x1c9b16(0x178)]??(_0x3a0c31['ok']?'done':_0x1c9b16(0x161))));const _0x500c30=a136_0x3ca242({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':_0x1c9b16(0x19b)})[_0x1c9b16(0x133)](),_0x47187b=execCleanMcp(_0xdc4984);_0x4addcc['push'](_0x47187b),_0x500c30[_0x47187b['ok']?_0x1c9b16(0x135):_0x1c9b16(0x130)](_0x1c9b16(0x16e)+(_0x47187b[_0x1c9b16(0x178)]??(_0x47187b['ok']?_0x1c9b16(0x126):_0x1c9b16(0x161))));const _0x2e7fdc=a136_0x3ca242({'text':_0x1c9b16(0x198),'color':_0x1c9b16(0x19b)})[_0x1c9b16(0x133)](),_0x1e93da=execSkillsRemove(_0x3ad044,_0x43ea3e);_0x4addcc[_0x1c9b16(0x14d)](_0x1e93da),_0x2e7fdc[_0x1e93da['ok']?'succeed':_0x1c9b16(0x130)](_0x1c9b16(0x182)+(_0x1e93da[_0x1c9b16(0x178)]??(_0x1e93da['ok']?_0x1c9b16(0x126):'failed')));const _0x40aceb=a136_0x3ca242({'text':_0x1c9b16(0x179),'color':_0x1c9b16(0x19b)})['start'](),_0x3906da=execSkillsAdd(_0x3ad044,_0x43ea3e);_0x4addcc[_0x1c9b16(0x14d)](_0x3906da),_0x40aceb[_0x3906da['ok']?_0x1c9b16(0x135):_0x1c9b16(0x130)](_0x1c9b16(0x151)+(_0x3906da[_0x1c9b16(0x178)]??(_0x3906da['ok']?_0x1c9b16(0x126):'failed')));const _0x42f12b=a136_0x3ca242({'text':_0x1c9b16(0x128),'color':_0x1c9b16(0x19b)})['start'](),_0x2acbcf=execUpgradeSdk(_0xdc4984);_0x4addcc[_0x1c9b16(0x14d)](_0x2acbcf),_0x42f12b[_0x2acbcf['ok']?'succeed':_0x1c9b16(0x130)](_0x1c9b16(0x137)+(_0x2acbcf['detail']??(_0x2acbcf['ok']?_0x1c9b16(0x126):'failed'))),printSummary(_0x4addcc);const _0x240bcc=_0x4addcc['some'](_0x177f8b=>!_0x177f8b['ok']);_0x240bcc?console['log'](a136_0x38dbad[_0x1c9b16(0x13a)](_0x1c9b16(0x188))):console['log'](a136_0x38dbad[_0x1c9b16(0x176)](_0x1c9b16(0x12f))),_0x2acbcf['ok']&&_0xdc4984[_0x1c9b16(0x184)]&&(console[_0x1c9b16(0x131)](''),console['log'](a136_0x38dbad[_0x1c9b16(0x16d)][_0x1c9b16(0x19b)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console['log'](a136_0x38dbad[_0x1c9b16(0x19b)](_0x1c9b16(0x171))),console['log'](''),console[_0x1c9b16(0x131)](a136_0x38dbad[_0x1c9b16(0x142)](_0x1c9b16(0x14c))),console[_0x1c9b16(0x131)](a136_0x38dbad[_0x1c9b16(0x142)]('\x20\x20#\x20or')),console['log'](a136_0x38dbad[_0x1c9b16(0x142)](_0x1c9b16(0x16a))),console[_0x1c9b16(0x131)](''));}
|
|
1
|
+
const a136_0x586351=a136_0x45bf;(function(_0x190221,_0xaea28b){const _0x4a33ee=a136_0x45bf,_0x16f11c=_0x190221();while(!![]){try{const _0x1f29dd=parseInt(_0x4a33ee(0x109))/0x1+-parseInt(_0x4a33ee(0xe1))/0x2+parseInt(_0x4a33ee(0xe2))/0x3+parseInt(_0x4a33ee(0x122))/0x4*(parseInt(_0x4a33ee(0x13d))/0x5)+-parseInt(_0x4a33ee(0xee))/0x6*(parseInt(_0x4a33ee(0x132))/0x7)+parseInt(_0x4a33ee(0xdf))/0x8+-parseInt(_0x4a33ee(0x104))/0x9;if(_0x1f29dd===_0xaea28b)break;else _0x16f11c['push'](_0x16f11c['shift']());}catch(_0x58f5a0){_0x16f11c['push'](_0x16f11c['shift']());}}}(a136_0x2de8,0xce79e));function a136_0x2de8(){const _0x586e12=['log','lovrabet/lovrabet-skill\x20removed','string','[\x22@lovrabet/sdk\x22]:\x20','Step\x201/7:\x20Config\x20migration\x20—\x20','.cursor/mcp.json','\x20\x20Action:\x20delete','cwd','no\x20matching\x20entry\x20found','\x20removed\x20(','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','skipped\x20(no\x20legacy\x20config)','bold','@lovrabet/dataset-mcp-server','path','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','step','start','Install\x20new\x20skill','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','FOUND','lovrabet/rabetbase\x20installed\x20globally','stringify','done','Step\x205/7:\x20Removing\x20old\x20skill...','some','\x20→\x20latest','package.json','Step\x201/7:\x20Migrating\x20config...','isArray','Remove\x20legacy\x20artifacts','label','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','5869136EDHcSD','===\x20Upgrade\x20Summary\x20===','811334leddYZ','4528005oCAwme','skipped','\x20(backup:\x20','needsSkillSwap','includes','undefined','Upgrade\x20cancelled.','mcpServers','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','@lovrabet/sdk:','oldPath','Step\x204/7:\x20Cleaning\x20MCP\x20config...','17358oWzVWm','gray','files','Remove\x20old\x20skill','utf8','FAIL','\x20removed','oldMcpConfig','failed','no\x20legacy\x20config\x20found','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','\x20→\x20','error','length','\x20\x20\x20\x20\x20\x20\x20','Remove\x20.lovrabet/','values','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','.bak','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','parse','dependencies','22631337tRnvij','Config\x20migration','detail','push','hasNewConfig','888230TEakhH','yellow','Step\x204/7:\x20MCP\x20config\x20—\x20','green','not\x20needed','fail','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Clean\x20MCP\x20config','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','exit\x20','object','needed','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','MCP\x20config:','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','white','filter','configMigration','===\x20Upgrade\x20Analysis\x20===','Config\x20file:','\x20→\x20keys:\x20','Upgrade\x20@lovrabet/sdk','isDirectory','Skill\x20swap:','.lovrabet','6172724YGyXqt','message','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','\x20\x20Fields\x20to\x20migrate:\x20','not\x20found\x20or\x20already\x20at\x20latest','@lovrabet/sdk','\x20\x20Current\x20version\x20in\x20','sdkUpgrade','\x20\x20npm\x20install','join','Step\x206/7:\x20Installing\x20new\x20skill...','succeed','.claude/skills/lovrabet','\x20\x20New\x20config\x20(.rabetbase.json):\x20','cyan','entries','2198vhePSJ','red','status','not\x20found\x20(will\x20create)','info','Legacy\x20artifacts:','Proceed\x20with\x20upgrade?','keys','latest','args','inherit','5UVqlya','removed\x20','no\x20legacy\x20entry'];a136_0x2de8=function(){return _0x586e12;};return a136_0x2de8();}import a136_0x4382bc from'chalk';import a136_0x3c7968 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';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[a136_0x586351(0x119)](_0x4ae1bf=>_0x4ae1bf!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x5b4af6){const _0x30f6a1=a136_0x586351,_0x11fc6c=[];for(const _0x43903d of Object[_0x30f6a1(0xfe)](CORE_IDE_CONFIGS)){if(_0x43903d[_0x30f6a1(0xf0)])for(const _0x822094 of _0x43903d[_0x30f6a1(0xf0)]){_0x11fc6c['push'](resolve(_0x5b4af6,_0x822094[_0x30f6a1(0x14e)]));}}return _0x11fc6c;}function analyse(_0x558648){const _0x1da894=a136_0x586351;let _0x4dd338=null;const _0x2c4014=resolve(_0x558648,NEW_CONFIG_NAME),_0x45e48a=existsSync(_0x2c4014);for(const _0x2ae7bc of LEGACY_CONFIG_NAMES){const _0x136ddd=resolve(_0x558648,_0x2ae7bc);if(existsSync(_0x136ddd)){const _0x34420b=readConfigFile(_0x136ddd),_0x428aa6=Object[_0x1da894(0x139)](_0x34420b)[_0x1da894(0x119)](_0xbff2dd=>typeof _0x34420b[_0xbff2dd]!==_0x1da894(0xe7));_0x4dd338={'oldPath':_0x136ddd,'hasNewConfig':_0x45e48a,'fields':_0x428aa6};break;}}const _0x12fa0d=[],_0x38419a=resolve(_0x558648,_0x1da894(0x121));if(existsSync(_0x38419a))_0x12fa0d[_0x1da894(0x107)](_0x38419a);const _0x4c0856=resolve(_0x558648,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x4c0856))_0x12fa0d[_0x1da894(0x107)](_0x4c0856);const _0xd0ca2f=resolve(_0x558648,_0x1da894(0x12e));if(existsSync(_0xd0ca2f))_0x12fa0d['push'](_0xd0ca2f);for(const _0x181ceb of collectIdeSkillFiles(_0x558648)){if(existsSync(_0x181ceb))_0x12fa0d['push'](_0x181ceb);}let _0x23108d=null;const _0x243671=resolve(_0x558648,_0x1da894(0x145));if(existsSync(_0x243671))try{const _0x35859b=JSON[_0x1da894(0x102)](readFileSync(_0x243671,'utf8'));if(_0x35859b?.[_0x1da894(0xe9)]&&typeof _0x35859b['mcpServers']===_0x1da894(0x113)){const _0x4a1947=[];for(const [_0x3c113c,_0x4aa19d]of Object[_0x1da894(0x131)](_0x35859b[_0x1da894(0xe9)])){const _0x5235ac=_0x4aa19d;_0x5235ac?.['args']&&Array['isArray'](_0x5235ac[_0x1da894(0x13b)])&&_0x5235ac[_0x1da894(0x13b)][_0x1da894(0xd7)](_0x1c824d=>typeof _0x1c824d===_0x1da894(0x142)&&_0x1c824d[_0x1da894(0xe6)]('@lovrabet/dataset-mcp-server'))&&_0x4a1947['push'](_0x3c113c);}_0x4a1947[_0x1da894(0xfb)]>0x0&&(_0x23108d={'path':_0x243671,'keys':_0x4a1947});}}catch{}const _0x5d90d2=_0x12fa0d[_0x1da894(0xfb)]>0x0||_0x4dd338!==null;let _0x33e891=null;const _0x4181b3=resolve(_0x558648,_0x1da894(0xd9));if(existsSync(_0x4181b3))try{const _0x1d2972=JSON['parse'](readFileSync(_0x4181b3,'utf8'));for(const _0x112a20 of[_0x1da894(0x103),'devDependencies']){const _0x4ebbd8=_0x1d2972?.[_0x112a20]?.[_0x1da894(0x127)];if(typeof _0x4ebbd8===_0x1da894(0x142)){_0x4ebbd8!==_0x1da894(0x13a)&&(_0x33e891={'pkgPath':_0x4181b3,'currentVersion':_0x4ebbd8,'field':_0x112a20});break;}}}catch{}return{'configMigration':_0x4dd338,'oldArtifacts':_0x12fa0d,'oldMcpConfig':_0x23108d,'needsSkillSwap':_0x5d90d2,'sdkUpgrade':_0x33e891};}function printReport(_0x5af43f){const _0x3582f9=a136_0x586351,{configMigration:_0x3a2a4b,oldArtifacts:_0x1aee87,oldMcpConfig:_0x13597e,needsSkillSwap:_0x49156a}=_0x5af43f;console[_0x3582f9(0x140)](''),console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x14c)](_0x3582f9(0x11b))),console['log']('');_0x3a2a4b?(console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0x11c))+('\x20\x20'+a136_0x4382bc[_0x3582f9(0x10a)](_0x3a2a4b[_0x3582f9(0xec)]))),console[_0x3582f9(0x140)](_0x3582f9(0x12f)+(_0x3a2a4b[_0x3582f9(0x108)]?a136_0x4382bc['green']('already\x20exists\x20(will\x20merge)'):a136_0x4382bc[_0x3582f9(0xef)](_0x3582f9(0x135)))),console[_0x3582f9(0x140)](_0x3582f9(0x125)+_0x3a2a4b['fields']['join'](',\x20')),console['log'](_0x3582f9(0x14a))):console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0x11c))+'\x20\x20'+a136_0x4382bc[_0x3582f9(0xef)](_0x3582f9(0xf7)));console['log']('');if(_0x1aee87[_0x3582f9(0xfb)]>0x0){console[_0x3582f9(0x140)](a136_0x4382bc['cyan']('Legacy\x20artifacts:'));for(const _0x5e79f7 of _0x1aee87){console[_0x3582f9(0x140)]('\x20\x20'+a136_0x4382bc[_0x3582f9(0x133)](_0x3582f9(0x154))+'\x20\x20'+_0x5e79f7);}console['log'](_0x3582f9(0x146));}else console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0x137))+'\x20\x20'+a136_0x4382bc[_0x3582f9(0xef)]('none\x20found'));console[_0x3582f9(0x140)]('');_0x13597e?(console['log'](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0x116))+('\x20\x20'+a136_0x4382bc['yellow'](_0x13597e[_0x3582f9(0x14e)])+_0x3582f9(0x11d)+_0x13597e[_0x3582f9(0x139)][_0x3582f9(0x12b)](',\x20'))),console[_0x3582f9(0x140)](_0x3582f9(0x153))):console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x130)]('MCP\x20config:')+'\x20\x20'+a136_0x4382bc['gray'](_0x3582f9(0x13f)));console[_0x3582f9(0x140)](''),console['log'](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0x120))+('\x20\x20'+(_0x49156a?a136_0x4382bc[_0x3582f9(0x10a)](_0x3582f9(0x114)):a136_0x4382bc[_0x3582f9(0x10c)](_0x3582f9(0x10d)))));_0x49156a&&console[_0x3582f9(0x140)](_0x3582f9(0x115)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x3582f9(0x140)]('');if(_0x5af43f[_0x3582f9(0x129)]){const {currentVersion:_0x26e753,field:_0x427225,pkgPath:_0x32e8ef}=_0x5af43f[_0x3582f9(0x129)];console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0xeb))+('\x20\x20'+a136_0x4382bc[_0x3582f9(0x10a)](_0x32e8ef))),console[_0x3582f9(0x140)](_0x3582f9(0x128)+_0x427225+':\x20'+a136_0x4382bc[_0x3582f9(0x10a)](_0x26e753)+_0x3582f9(0xf9)+a136_0x4382bc[_0x3582f9(0x10c)](_0x3582f9(0x13a))),console[_0x3582f9(0x140)](_0x3582f9(0xff));}else console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0xeb))+'\x20\x20'+a136_0x4382bc[_0x3582f9(0xef)](_0x3582f9(0x126)));console['log']('');}function execConfigMigration(_0x2a810b,_0x2c54a9){const _0x357dee=a136_0x586351,{configMigration:_0x5dfff2}=_0x2a810b;if(!_0x5dfff2?.['oldPath'])return{'step':0x1,'label':_0x357dee(0x105),'ok':!![],'detail':_0x357dee(0x14b)};const _0x3006ba=readConfigFile(_0x5dfff2['oldPath']),_0x30c91e=resolve(_0x2c54a9,NEW_CONFIG_NAME),_0x263c0b=_0x5dfff2[_0x357dee(0x108)]?readConfigFile(_0x30c91e):{};for(const [_0x300e95,_0x2d4add]of Object[_0x357dee(0x131)](_0x3006ba)){!(_0x300e95 in _0x263c0b)&&(_0x263c0b[_0x300e95]=_0x2d4add);}writeConfigFile(_0x30c91e,_0x263c0b);const _0x5a1937=_0x5dfff2[_0x357dee(0xec)]+_0x357dee(0x100);return renameSync(_0x5dfff2[_0x357dee(0xec)],_0x5a1937),{'step':0x1,'label':_0x357dee(0x105),'ok':!![],'detail':_0x5dfff2[_0x357dee(0xec)]+_0x357dee(0xf9)+_0x30c91e+_0x357dee(0xe4)+_0x5a1937+')'};}function execRemoveOldArtifacts(_0x47b6e9){const _0x29fbdb=a136_0x586351,_0x572727=[];for(const _0x10fe07 of _0x47b6e9){try{if(!existsSync(_0x10fe07))continue;const _0x4ddf5a=tryStat(_0x10fe07);_0x4ddf5a?.[_0x29fbdb(0x11f)]()?rmSync(_0x10fe07,{'recursive':!![],'force':!![]}):unlinkSync(_0x10fe07);}catch(_0x2ced23){_0x572727[_0x29fbdb(0x107)](_0x10fe07+':\x20'+_0x2ced23['message']);}}return{'step':0x3,'label':_0x29fbdb(0xdc),'ok':_0x572727[_0x29fbdb(0xfb)]===0x0,'detail':_0x572727[_0x29fbdb(0xfb)]>0x0?_0x47b6e9['length']-_0x572727[_0x29fbdb(0xfb)]+'/'+_0x47b6e9['length']+_0x29fbdb(0x149)+_0x572727[_0x29fbdb(0x12b)](';\x20')+')':_0x47b6e9[_0x29fbdb(0xfb)]+_0x29fbdb(0xf4)};}function execCleanMcp(_0x52512b){const _0x30e5ce=a136_0x586351;if(!_0x52512b['oldMcpConfig'])return{'step':0x4,'label':_0x30e5ce(0x110),'ok':!![],'detail':'skipped'};try{const _0x5b381c=readFileSync(_0x52512b['oldMcpConfig'][_0x30e5ce(0x14e)],_0x30e5ce(0xf2)),_0x2fcb26=JSON[_0x30e5ce(0x102)](_0x5b381c);if(_0x2fcb26?.[_0x30e5ce(0xe9)]&&typeof _0x2fcb26[_0x30e5ce(0xe9)]===_0x30e5ce(0x113)){const _0x14e26d=[];for(const [_0xc7be3c,_0x5e7116]of Object[_0x30e5ce(0x131)](_0x2fcb26[_0x30e5ce(0xe9)])){_0x5e7116?.[_0x30e5ce(0x13b)]&&Array[_0x30e5ce(0xdb)](_0x5e7116[_0x30e5ce(0x13b)])&&_0x5e7116[_0x30e5ce(0x13b)]['some'](_0xd61727=>typeof _0xd61727==='string'&&_0xd61727[_0x30e5ce(0xe6)](_0x30e5ce(0x14d)))&&_0x14e26d[_0x30e5ce(0x107)](_0xc7be3c);}for(const _0x5853b4 of _0x14e26d){delete _0x2fcb26[_0x30e5ce(0xe9)][_0x5853b4];}return _0x14e26d[_0x30e5ce(0xfb)]>0x0&&writeFileSync(_0x52512b[_0x30e5ce(0xf5)][_0x30e5ce(0x14e)],JSON[_0x30e5ce(0x156)](_0x2fcb26,null,0x2)+'\x0a',_0x30e5ce(0xf2)),{'step':0x4,'label':_0x30e5ce(0x110),'ok':!![],'detail':_0x30e5ce(0x13e)+_0x14e26d[_0x30e5ce(0x12b)](',\x20')+'\x20from\x20'+_0x52512b[_0x30e5ce(0xf5)][_0x30e5ce(0x14e)]};}return{'step':0x4,'label':_0x30e5ce(0x110),'ok':!![],'detail':_0x30e5ce(0x148)};}catch(_0x2f1593){return{'step':0x4,'label':_0x30e5ce(0x110),'ok':![],'detail':_0x2f1593['message']};}}function execSkillsRemove(_0x508cbc,_0x2b70cf){const _0x5221ee=a136_0x586351,_0x48531a=runNpxSkillsRemove(_0x508cbc,{'stdio':'inherit','yes':_0x2b70cf});return{'step':0x5,'label':_0x5221ee(0xf1),'ok':_0x48531a['ok'],'detail':_0x48531a['ok']?_0x5221ee(0x141):_0x48531a[_0x5221ee(0xfa)]??_0x5221ee(0x112)+_0x48531a[_0x5221ee(0x134)]};}function execSkillsAdd(_0x404769,_0x43d773){const _0x5f21f7=a136_0x586351,_0x5ae271=runNpxSkillsAddGlobal(_0x404769,'lovrabet/rabetbase',{'stdio':_0x5f21f7(0x13c),'yes':_0x43d773});return{'step':0x6,'label':_0x5f21f7(0x152),'ok':_0x5ae271['ok'],'detail':_0x5ae271['ok']?_0x5f21f7(0x155):_0x5ae271['error']??_0x5f21f7(0x112)+_0x5ae271['status']};}function execUpgradeSdk(_0x224f42){const _0x2deac7=a136_0x586351;if(!_0x224f42[_0x2deac7(0x129)])return{'step':0x7,'label':_0x2deac7(0x11e),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x46be3a,currentVersion:_0x57d96b,field:_0x3064a5}=_0x224f42['sdkUpgrade'];try{const _0x5a6cc3=readFileSync(_0x46be3a,_0x2deac7(0xf2)),_0x165653=JSON[_0x2deac7(0x102)](_0x5a6cc3);return _0x165653[_0x3064a5]['@lovrabet/sdk']=_0x2deac7(0x13a),writeFileSync(_0x46be3a,JSON[_0x2deac7(0x156)](_0x165653,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':_0x2deac7(0x11e),'ok':!![],'detail':_0x3064a5+_0x2deac7(0x143)+_0x57d96b+_0x2deac7(0xd8)};}catch(_0x5de46b){return{'step':0x7,'label':_0x2deac7(0x11e),'ok':![],'detail':_0x5de46b[_0x2deac7(0x123)]};}}function a136_0x45bf(_0x203a1a,_0x4c5309){_0x203a1a=_0x203a1a-0xd7;const _0x2de8dd=a136_0x2de8();let _0x45bfb5=_0x2de8dd[_0x203a1a];return _0x45bfb5;}function tryStat(_0x7d11ac){try{return statSync(_0x7d11ac);}catch{return undefined;}}function printSummary(_0x1f3222){const _0x5cbd91=a136_0x586351;console[_0x5cbd91(0x140)](''),console[_0x5cbd91(0x140)](a136_0x4382bc[_0x5cbd91(0x14c)](_0x5cbd91(0xe0))),console[_0x5cbd91(0x140)]('');for(const _0x1bac5b of _0x1f3222){const _0x38287f=_0x1bac5b['ok']?a136_0x4382bc['green']('OK'):a136_0x4382bc[_0x5cbd91(0x133)](_0x5cbd91(0xf3));console[_0x5cbd91(0x140)]('\x20\x20'+_0x38287f+'\x20\x20Step\x20'+_0x1bac5b[_0x5cbd91(0x150)]+':\x20'+_0x1bac5b[_0x5cbd91(0xdd)]);if(_0x1bac5b[_0x5cbd91(0x106)])console[_0x5cbd91(0x140)](_0x5cbd91(0xfc)+a136_0x4382bc[_0x5cbd91(0xef)](_0x1bac5b['detail']));}console[_0x5cbd91(0x140)]('');}export async function upgradeApp(_0x5d2824,_0x44ee41){const _0x1d738f=a136_0x586351,_0x586e85=process[_0x1d738f(0x147)](),_0x1a140d=analyse(_0x586e85),_0x3f0aca=!_0x1a140d[_0x1d738f(0x11a)]&&_0x1a140d['oldArtifacts'][_0x1d738f(0xfb)]===0x0&&!_0x1a140d['oldMcpConfig']&&!_0x1a140d[_0x1d738f(0xe5)]&&!_0x1a140d[_0x1d738f(0x129)];if(_0x3f0aca){console[_0x1d738f(0x140)](a136_0x4382bc['green'](_0x1d738f(0xde)));return;}printReport(_0x1a140d);const _0x28cb24=!!(_0x44ee41['yes']||_0x44ee41['Y']||_0x5d2824);if(!_0x28cb24)try{const _0x1c1dc7=await askConfirm(_0x1d738f(0x138));if(!_0x1c1dc7){console['log'](a136_0x4382bc['gray'](_0x1d738f(0xe8)));return;}}catch(_0x5e930a){if(_0x5e930a?.[_0x1d738f(0x123)]==='CANCEL'){console['log'](a136_0x4382bc[_0x1d738f(0xef)](_0x1d738f(0xe8)));return;}throw _0x5e930a;}const _0x5baf47=[],_0x3b66f6=a136_0x3c7968({'text':_0x1d738f(0xda),'color':_0x1d738f(0x130)})[_0x1d738f(0x151)](),_0x4e4b91=execConfigMigration(_0x1a140d,_0x586e85);_0x5baf47['push'](_0x4e4b91),_0x3b66f6[_0x4e4b91['ok']?_0x1d738f(0x12d):'fail'](_0x1d738f(0x144)+(_0x4e4b91[_0x1d738f(0x106)]??(_0x4e4b91['ok']?_0x1d738f(0x157):'failed')));const _0x219dad=resolve(_0x586e85,_0x1d738f(0x121)),_0x1d4d5a=a136_0x3c7968({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':_0x1d738f(0x130)})['start']();if(existsSync(_0x219dad))try{rmSync(_0x219dad,{'recursive':!![],'force':!![]}),_0x1d4d5a[_0x1d738f(0x12d)](_0x1d738f(0xea)),_0x5baf47['push']({'step':0x2,'label':_0x1d738f(0xfd),'ok':!![]});}catch(_0x2ef046){_0x1d4d5a[_0x1d738f(0x10e)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x2ef046[_0x1d738f(0x123)]),_0x5baf47[_0x1d738f(0x107)]({'step':0x2,'label':_0x1d738f(0xfd),'ok':![],'detail':_0x2ef046['message']});}else _0x1d4d5a[_0x1d738f(0x136)](_0x1d738f(0x111)),_0x5baf47[_0x1d738f(0x107)]({'step':0x2,'label':_0x1d738f(0xfd),'ok':!![],'detail':_0x1d738f(0xe3)});const _0x4b9653=a136_0x3c7968({'text':_0x1d738f(0xf8),'color':_0x1d738f(0x130)})['start'](),_0x17d415=execRemoveOldArtifacts(_0x1a140d['oldArtifacts']);_0x5baf47['push'](_0x17d415),_0x4b9653[_0x17d415['ok']?_0x1d738f(0x12d):_0x1d738f(0x10e)](_0x1d738f(0x117)+(_0x17d415[_0x1d738f(0x106)]??(_0x17d415['ok']?_0x1d738f(0x157):_0x1d738f(0xf6))));const _0x1143a6=a136_0x3c7968({'text':_0x1d738f(0xed),'color':'cyan'})[_0x1d738f(0x151)](),_0x392892=execCleanMcp(_0x1a140d);_0x5baf47['push'](_0x392892),_0x1143a6[_0x392892['ok']?_0x1d738f(0x12d):_0x1d738f(0x10e)](_0x1d738f(0x10b)+(_0x392892[_0x1d738f(0x106)]??(_0x392892['ok']?'done':_0x1d738f(0xf6))));const _0x5a5cf5=a136_0x3c7968({'text':_0x1d738f(0x158),'color':_0x1d738f(0x130)})[_0x1d738f(0x151)](),_0x107ea1=execSkillsRemove(_0x586e85,_0x28cb24);_0x5baf47[_0x1d738f(0x107)](_0x107ea1),_0x5a5cf5[_0x107ea1['ok']?_0x1d738f(0x12d):_0x1d738f(0x10e)](_0x1d738f(0x124)+(_0x107ea1[_0x1d738f(0x106)]??(_0x107ea1['ok']?_0x1d738f(0x157):_0x1d738f(0xf6))));const _0x3065f5=a136_0x3c7968({'text':_0x1d738f(0x12c),'color':_0x1d738f(0x130)})['start'](),_0x263514=execSkillsAdd(_0x586e85,_0x28cb24);_0x5baf47[_0x1d738f(0x107)](_0x263514),_0x3065f5[_0x263514['ok']?'succeed':_0x1d738f(0x10e)](_0x1d738f(0x14f)+(_0x263514[_0x1d738f(0x106)]??(_0x263514['ok']?_0x1d738f(0x157):_0x1d738f(0xf6))));const _0x4e696b=a136_0x3c7968({'text':_0x1d738f(0x101),'color':'cyan'})[_0x1d738f(0x151)](),_0x20ec2c=execUpgradeSdk(_0x1a140d);_0x5baf47[_0x1d738f(0x107)](_0x20ec2c),_0x4e696b[_0x20ec2c['ok']?_0x1d738f(0x12d):'fail']('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x20ec2c[_0x1d738f(0x106)]??(_0x20ec2c['ok']?'done':'failed'))),printSummary(_0x5baf47);const _0x15f025=_0x5baf47[_0x1d738f(0xd7)](_0x40ac4e=>!_0x40ac4e['ok']);_0x15f025?console['log'](a136_0x4382bc[_0x1d738f(0x10a)](_0x1d738f(0x10f))):console['log'](a136_0x4382bc[_0x1d738f(0x10c)]('Upgrade\x20completed\x20successfully!')),_0x20ec2c['ok']&&_0x1a140d['sdkUpgrade']&&(console[_0x1d738f(0x140)](''),console[_0x1d738f(0x140)](a136_0x4382bc[_0x1d738f(0x14c)][_0x1d738f(0x130)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x1d738f(0x140)](a136_0x4382bc[_0x1d738f(0x130)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x1d738f(0x140)](''),console[_0x1d738f(0x140)](a136_0x4382bc[_0x1d738f(0x118)](_0x1d738f(0x12a))),console[_0x1d738f(0x140)](a136_0x4382bc[_0x1d738f(0x118)]('\x20\x20#\x20or')),console[_0x1d738f(0x140)](a136_0x4382bc['white']('\x20\x20bun\x20install')),console['log'](''));}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x48bc58=a137_0x4026;(function(_0x35b47b,_0x2ea536){const _0x4b5a40=a137_0x4026,_0x3024ae=_0x35b47b();while(!![]){try{const _0x2b52ed=-parseInt(_0x4b5a40(0x15c))/0x1*(parseInt(_0x4b5a40(0x156))/0x2)+-parseInt(_0x4b5a40(0x16a))/0x3*(-parseInt(_0x4b5a40(0x16d))/0x4)+-parseInt(_0x4b5a40(0x197))/0x5*(parseInt(_0x4b5a40(0x164))/0x6)+parseInt(_0x4b5a40(0x177))/0x7+parseInt(_0x4b5a40(0x15e))/0x8+-parseInt(_0x4b5a40(0x194))/0x9+-parseInt(_0x4b5a40(0x180))/0xa;if(_0x2b52ed===_0x2ea536)break;else _0x3024ae['push'](_0x3024ae['shift']());}catch(_0x393d6b){_0x3024ae['push'](_0x3024ae['shift']());}}}(a137_0x28d4,0xac6df));function a137_0x28d4(){const _0x1bb623=['1833702ebpIQs','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','preview','8nfyzFs','map','has','Authentication','API\x20Development','Roles','start','install','remote','from','5988787ALQKvP','Project','Run\x20any\x20package.json\x20script','values','`rabetbase\x20','risk','skills','service','Instant\x20API','89280DNczeA','auth','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','Self\x20Update','app\x20remote','login','use','app\x20use','Database\x20Connections','wildcardDef','skill\x20','write','Runtime\x20App\x20Config\x20Management','\x20\x20[write]','Diagnostics','Logs','CLI\x20Built-in\x20Skill','push','app','build','9387675vASUmc','create','hidden','1699175yadOSN','Workspace','Smart\x20List\x20Pages','skill','178cabuHc','set','run','Permissions','Configuration','read','9649VlEeaC','description','9749568SEpHwv','SQL\x20Queries','Quick\x20Start','isSingleCommand','Platform\x20Issue','Menu','12zJQAXM','command','Dataset\x20&\x20Operations','get','<script>','Run\x20Scripts'];a137_0x28d4=function(){return _0x1bb623;};return a137_0x28d4();}function a137_0x4026(_0x40db12,_0x441415){_0x40db12=_0x40db12-0x153;const _0x28d46c=a137_0x28d4();let _0x402684=_0x28d46c[_0x40db12];return _0x402684;}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{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/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(_0x5704f9){const _0x3c0ad7=a137_0x4026;for(const _0x1c0e1f of _0x5704f9){definitions[_0x3c0ad7(0x157)](_0x1c0e1f[_0x3c0ad7(0x17e)]+':'+_0x1c0e1f[_0x3c0ad7(0x165)],_0x1c0e1f);let _0x4ecc6c=serviceGroups[_0x3c0ad7(0x167)](_0x1c0e1f[_0x3c0ad7(0x17e)]);!_0x4ecc6c&&(_0x4ecc6c=[],serviceGroups[_0x3c0ad7(0x157)](_0x1c0e1f[_0x3c0ad7(0x17e)],_0x4ecc6c)),_0x4ecc6c[_0x3c0ad7(0x191)](_0x1c0e1f);}}function registerDeclarativeService(_0x3115b3,_0x3a7dbe,_0x47c38e){const _0xeb2c02=a137_0x4026;registerDefinitions(_0x3a7dbe);_0x47c38e?.['wildcardDef']&®isterDefinitions([_0x47c38e[_0xeb2c02(0x189)]]);const _0x41f078=_0x146235=>_0x146235===_0xeb2c02(0x15b)?'':_0x146235===_0xeb2c02(0x18b)?_0xeb2c02(0x18d):'\x20\x20[high-risk-write]',_0x12dc00={'service':_0x3a7dbe[0x0]['service'],'label':_0x3115b3,'commands':_0x3a7dbe['filter'](_0x1eb9e4=>!_0x1eb9e4[_0xeb2c02(0x196)])[_0xeb2c02(0x16e)](_0x532b38=>({'command':_0x532b38[_0xeb2c02(0x165)],'description':_0x532b38[_0xeb2c02(0x15d)],'tag':_0x41f078(_0x532b38[_0xeb2c02(0x17c)])})),'declarative':!![],'defaultCommand':_0x47c38e?.['defaultCommand']??(_0x47c38e?.[_0xeb2c02(0x161)]?_0x3a7dbe[0x0][_0xeb2c02(0x165)]:undefined),'wildcardDef':_0x47c38e?.[_0xeb2c02(0x189)],'isSingleCommand':_0x47c38e?.[_0xeb2c02(0x161)]};serviceRegistry[_0xeb2c02(0x191)](_0x12dc00),serviceByName[_0xeb2c02(0x157)](_0x12dc00[_0xeb2c02(0x17e)],_0x12dc00);}registerDeclarativeService(a137_0x48bc58(0x160),initDefinitions,{'defaultCommand':a137_0x48bc58(0x158),'isSingleCommand':!![]}),registerDeclarativeService(a137_0x48bc58(0x178),projectDefinitions),registerDeclarativeService(a137_0x48bc58(0x153),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a137_0x48bc58(0x170),authDefinitions,{'defaultCommand':a137_0x48bc58(0x185)}),registerDeclarativeService(a137_0x48bc58(0x166),datasetDefinitions),registerDeclarativeService(a137_0x48bc58(0x154),pageDefinitions),registerDeclarativeService(a137_0x48bc58(0x171),apiDefinitions),registerDeclarativeService(a137_0x48bc58(0x17f),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a137_0x48bc58(0x15f),sqlDefinitions),registerDeclarativeService(a137_0x48bc58(0x188),dbDefinitions),registerDeclarativeService(a137_0x48bc58(0x163),menuDefinitions),registerDeclarativeService(a137_0x48bc58(0x172),roleDefinitions),registerDeclarativeService(a137_0x48bc58(0x159),permitDefinitions),registerDeclarativeService(a137_0x48bc58(0x18c),appConfigDefinitions),registerDeclarativeService(a137_0x48bc58(0x162),issueDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a137_0x48bc58(0x15a),configDefinitions),registerDeclarativeService(a137_0x48bc58(0x18e),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a137_0x48bc58(0x183),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a137_0x48bc58(0x190),cliSkillDefinitions,{'defaultCommand':a137_0x48bc58(0x174)}),registerDeclarativeService(a137_0x48bc58(0x18f),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a137_0x48bc58(0x169),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last['commands']=[{'command':a137_0x48bc58(0x168),'description':a137_0x48bc58(0x179),'tag':''}];}export const deprecatedAliases={'create':{'service':'project','command':a137_0x48bc58(0x195)},'start':{'service':a137_0x48bc58(0x158),'command':a137_0x48bc58(0x173)},'build':{'service':a137_0x48bc58(0x158),'command':a137_0x48bc58(0x193)},'preview':{'service':a137_0x48bc58(0x158),'command':a137_0x48bc58(0x16c)},'logout':{'service':a137_0x48bc58(0x181),'command':'logout'}};const CLI_SKILL_INSTALL_REMOVED_HINT='Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.',APP_REMOTE_REMOVED_HINT='Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.',APP_USE_REMOVED_HINT=a137_0x48bc58(0x182);export function resolveRemovedCommand(_0x5d228f,_0x50082e){const _0x31721c=a137_0x48bc58;if(_0x5d228f===_0x31721c(0x155)){const _0x1ea0c0=_0x50082e?_0x31721c(0x18a)+_0x50082e:_0x31721c(0x155);return{'command':_0x1ea0c0,'message':_0x31721c(0x17b)+_0x1ea0c0+'`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x5d228f===_0x31721c(0x17d))return{'command':_0x31721c(0x17d),'message':'`rabetbase\x20skills`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x5d228f===_0x31721c(0x192)&&_0x50082e===_0x31721c(0x175))return{'command':_0x31721c(0x184),'message':_0x31721c(0x16b),'hint':APP_REMOTE_REMOVED_HINT};if(_0x5d228f===_0x31721c(0x192)&&_0x50082e===_0x31721c(0x186))return{'command':_0x31721c(0x187),'message':'`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':a137_0x48bc58(0x195)},'sql':{'new':a137_0x48bc58(0x195)}};export function resolveDeprecatedSubcommand(_0x11983f,_0x57b6f0){return deprecatedSubcommands[_0x11983f]?.[_0x57b6f0];}export function findDefinition(_0x121fd6,_0x533b08){const _0x38e69f=a137_0x48bc58;return definitions[_0x38e69f(0x167)](_0x121fd6+':'+_0x533b08);}export function isKnownService(_0x30893d){const _0x913747=a137_0x48bc58;return serviceByName[_0x913747(0x16f)](_0x30893d);}export function isDeclarativeService(_0x2bc0ac){const _0x14a751=a137_0x48bc58;return serviceGroups['has'](_0x2bc0ac)||serviceByName[_0x14a751(0x167)](_0x2bc0ac)?.[_0x14a751(0x189)]!==undefined;}export function getServiceEntry(_0x33b8eb){const _0x3d4b40=a137_0x48bc58;return serviceByName[_0x3d4b40(0x167)](_0x33b8eb);}export function getLegacyHandler(_0xd1c194,_0x36f364){return undefined;}export function getAllDefinitions(){const _0x44ca29=a137_0x48bc58;return Array[_0x44ca29(0x176)](definitions[_0x44ca29(0x17a)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a138_0x1751ed=a138_0x2541;(function(_0x36b8db,_0x18c904){const _0x992fdb=a138_0x2541,_0x3dc407=_0x36b8db();while(!![]){try{const _0x5c86da=-parseInt(_0x992fdb(0x1f2))/0x1*(-parseInt(_0x992fdb(0x1eb))/0x2)+parseInt(_0x992fdb(0x1e2))/0x3+parseInt(_0x992fdb(0x1de))/0x4+-parseInt(_0x992fdb(0x1f0))/0x5+-parseInt(_0x992fdb(0x1e6))/0x6*(-parseInt(_0x992fdb(0x1e0))/0x7)+-parseInt(_0x992fdb(0x1dc))/0x8+parseInt(_0x992fdb(0x1e7))/0x9*(-parseInt(_0x992fdb(0x1ee))/0xa);if(_0x5c86da===_0x18c904)break;else _0x3dc407['push'](_0x3dc407['shift']());}catch(_0x3597ce){_0x3dc407['push'](_0x3dc407['shift']());}}}(a138_0x178c,0xe4711));import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a138_0x2541(_0x4147e4,_0x586830){_0x4147e4=_0x4147e4-0x1da;const _0x178c49=a138_0x178c();let _0x25411f=_0x178c49[_0x4147e4];return _0x25411f;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH=a138_0x1751ed(0x1ec);function readName(_0x3307dc){const _0x25a432=a138_0x1751ed,_0x1e1d97=_0x3307dc[_0x25a432(0x1f4)](_0x25a432(0x1ef))['trim']();if(!_0x1e1d97)throw CliErrors['flagMissing']('name',_0x25a432(0x1f1));if(_0x1e1d97[_0x25a432(0x1ed)]>0x40)throw CliErrors[_0x25a432(0x1ea)](_0x25a432(0x1da));return _0x1e1d97;}export const roleCreate={'service':a138_0x1751ed(0x1e8),'command':a138_0x1751ed(0x1db),'description':a138_0x1751ed(0x1e9),'risk':a138_0x1751ed(0x1e4),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x24ba6a){readName(_0x24ba6a);},async 'dryRun'(_0xef7cf0){const _0x5ea9ab=a138_0x1751ed,_0x538d53=readName(_0xef7cf0),_0x4933fa=_0xef7cf0['str'](_0x5ea9ab(0x1f3))[_0x5ea9ab(0x1dd)]()||undefined;return asDryRunResult({'operation':_0x5ea9ab(0x1db),'selector':{'appCode':_0xef7cf0[_0x5ea9ab(0x1df)],'roleName':_0x538d53},'before':null,'after':{'roleName':_0x538d53,'roleType':'CUSTOM','remark':_0x4933fa},'dryRun':!![],'backend':{'method':_0x5ea9ab(0x1e1),'path':CREATE_PATH},'warnings':[]},{'method':_0x5ea9ab(0x1e1),'url':CREATE_PATH});},async 'execute'(_0x167c54){const _0x5544b0=a138_0x1751ed,_0x3af1b6=readName(_0x167c54),_0x34c598=_0x167c54['str'](_0x5544b0(0x1f3))['trim']()||undefined,_0x225555=await createAppRole({'appCode':_0x167c54[_0x5544b0(0x1df)],'roleName':_0x3af1b6,..._0x34c598?{'remark':_0x34c598}:{}});return{'ok':!![],'data':{'operation':_0x5544b0(0x1db),'selector':{'appCode':_0x167c54[_0x5544b0(0x1df)],'roleId':_0x225555['id'],'roleName':_0x3af1b6},'before':null,'after':projectRole(_0x225555),'dryRun':![],'backend':{'method':_0x5544b0(0x1e1),'path':CREATE_PATH},'warnings':[]},'message':'Created\x20role\x20'+_0x225555[_0x5544b0(0x1e5)]+_0x5544b0(0x1e3)+_0x225555['id']+')'};}};function a138_0x178c(){const _0x5b949a=['create','858640zYqqTT','trim','3270100fjfyRp','appCode','2575916AhlpcB','POST','4329831qJFJph','\x20(id=','write','roleName','18XUMusU','36WXKbIS','role','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','validation','2RfZLmg','/smartapi/permit/role/create','length','8151580CzmKwo','name','1135460clqAya','Pass\x20--name\x20<roleName>.','1165985sseJHS','remark','str','Role\x20name\x20cannot\x20exceed\x2064\x20characters.'];a138_0x178c=function(){return _0x5b949a;};return a138_0x178c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a139_0x15e86a=a139_0x5b0e;(function(_0x10e806,_0x5cc240){const _0xdeae6b=a139_0x5b0e,_0x5128d6=_0x10e806();while(!![]){try{const _0x593757=parseInt(_0xdeae6b(0x118))/0x1*(parseInt(_0xdeae6b(0x11c))/0x2)+-parseInt(_0xdeae6b(0x105))/0x3+-parseInt(_0xdeae6b(0x110))/0x4*(-parseInt(_0xdeae6b(0x107))/0x5)+-parseInt(_0xdeae6b(0x10b))/0x6*(-parseInt(_0xdeae6b(0x10a))/0x7)+parseInt(_0xdeae6b(0x10f))/0x8+parseInt(_0xdeae6b(0x11a))/0x9*(-parseInt(_0xdeae6b(0x114))/0xa)+-parseInt(_0xdeae6b(0x111))/0xb*(parseInt(_0xdeae6b(0x11b))/0xc);if(_0x593757===_0x5cc240)break;else _0x5128d6['push'](_0x5128d6['shift']());}catch(_0x4ffbaa){_0x5128d6['push'](_0x5128d6['shift']());}}}(a139_0x20ee,0x75ab4));import{deleteAppRole}from'../../core/api-client.js';function a139_0x5b0e(_0x1ff897,_0x4e2e31){_0x1ff897=_0x1ff897-0x105;const _0x20ee33=a139_0x20ee();let _0x5b0e9a=_0x20ee33[_0x1ff897];return _0x5b0e9a;}function a139_0x20ee(){const _0x2c6b97=['\x20(id=','userCount','125314BZhMBQ','186nJAfJX','POST','Deleted\x20role\x20','delete','1102888PEjgIP','1124rcXGrL','8555767alzMuz','/smartapi/permit/role/delete','roleName','293630cpIbvk','appCode','role','Role\x20still\x20has\x20','43iCyktH','num','9cRtSLt','24IWFwkZ','43468yaDhBc','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','500562HlrQou','high-risk-write','10790QxYdyl'];a139_0x20ee=function(){return _0x2c6b97;};return a139_0x20ee();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a139_0x15e86a(0x112);export const roleDelete={'service':a139_0x15e86a(0x116),'command':a139_0x15e86a(0x10e),'description':'Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','risk':a139_0x15e86a(0x106),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x28f886){const _0x41a772=a139_0x15e86a,_0x467eda=_0x28f886[_0x41a772(0x119)]('id'),_0x3f974a=await getRoleById(_0x28f886['appCode'],_0x467eda);return assertCustomRole(_0x3f974a,'delete'),asDryRunResult({'operation':'delete','selector':{'appCode':_0x28f886[_0x41a772(0x115)],'roleId':_0x467eda,'roleName':_0x3f974a[_0x41a772(0x113)]},'before':projectRole(_0x3f974a),'after':null,'dryRun':!![],'backend':{'method':_0x41a772(0x10c),'path':DELETE_PATH},'warnings':_0x3f974a['userCount']>0x0?[_0x41a772(0x117)+_0x3f974a[_0x41a772(0x109)]+_0x41a772(0x11d)]:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x40bdc4){const _0x110ac8=a139_0x15e86a,_0x60450a=_0x40bdc4[_0x110ac8(0x119)]('id'),_0x41fc51=await getRoleById(_0x40bdc4[_0x110ac8(0x115)],_0x60450a);return assertCustomRole(_0x41fc51,_0x110ac8(0x10e)),await deleteAppRole(_0x60450a),{'ok':!![],'data':{'operation':'delete','selector':{'appCode':_0x40bdc4[_0x110ac8(0x115)],'roleId':_0x60450a,'roleName':_0x41fc51[_0x110ac8(0x113)]},'before':projectRole(_0x41fc51),'after':null,'dryRun':![],'backend':{'method':_0x110ac8(0x10c),'path':DELETE_PATH},'warnings':[]},'message':_0x110ac8(0x10d)+_0x41fc51[_0x110ac8(0x113)]+_0x110ac8(0x108)+_0x60450a+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a140_0x3fda2b=a140_0x4b28;function a140_0x2e33(){const _0x3907a6=['23720fwCuzC','Show\x20a\x20single\x20role\x27s\x20detail','roleType','333MhcdIF','num','18160AMdDnE','1625224JhEcIH','268429Mggcdx','3050140mipNXc','331097jAfXCk','8723EHBGSA','appCode','Role\x20','30519cRUGcv','36wnuLaT','read','1240pgmWgV','role'];a140_0x2e33=function(){return _0x3907a6;};return a140_0x2e33();}(function(_0x1f2d66,_0x435573){const _0x267a92=a140_0x4b28,_0x5e850d=_0x1f2d66();while(!![]){try{const _0x162526=parseInt(_0x267a92(0xf7))/0x1+-parseInt(_0x267a92(0x106))/0x2+parseInt(_0x267a92(0x103))/0x3*(-parseInt(_0x267a92(0x100))/0x4)+-parseInt(_0x267a92(0xf6))/0x5+-parseInt(_0x267a92(0xfc))/0x6*(-parseInt(_0x267a92(0xf5))/0x7)+parseInt(_0x267a92(0xfe))/0x8*(parseInt(_0x267a92(0xfb))/0x9)+-parseInt(_0x267a92(0x105))/0xa*(-parseInt(_0x267a92(0xf8))/0xb);if(_0x162526===_0x435573)break;else _0x5e850d['push'](_0x5e850d['shift']());}catch(_0x519f9b){_0x5e850d['push'](_0x5e850d['shift']());}}}(a140_0x2e33,0x6ce32));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a140_0x4b28(_0x3953a4,_0x587fe8){_0x3953a4=_0x3953a4-0xf5;const _0x2e332c=a140_0x2e33();let _0x4b282e=_0x2e332c[_0x3953a4];return _0x4b282e;}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a140_0x3fda2b(0xff),'command':'detail','description':a140_0x3fda2b(0x101),'risk':a140_0x3fda2b(0xfd),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x48df99){const _0x418277=a140_0x3fda2b,_0x3ae8b1=_0x48df99[_0x418277(0x104)]('id'),_0x54d181=await getRoleById(_0x48df99[_0x418277(0xf9)],_0x3ae8b1);return{'ok':!![],'data':{'role':projectRole(_0x54d181)},'message':_0x418277(0xfa)+_0x54d181['roleName']+'\x20('+_0x54d181[_0x418277(0x102)]+')'};}};
|