@lovrabet/rabetbase-cli 2.3.4-beta.4 → 2.3.4
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(_0x2ea391,_0x3765c9){const _0x2becbf=a128_0x8c2f,_0x1bd103=_0x2ea391();while(!![]){try{const _0x429a5c=parseInt(_0x2becbf(0x1e7))/0x1*(-parseInt(_0x2becbf(0x1fd))/0x2)+-parseInt(_0x2becbf(0x205))/0x3+parseInt(_0x2becbf(0x1b1))/0x4*(-parseInt(_0x2becbf(0x1b9))/0x5)+parseInt(_0x2becbf(0x1c2))/0x6+-parseInt(_0x2becbf(0x1c1))/0x7*(parseInt(_0x2becbf(0x1eb))/0x8)+parseInt(_0x2becbf(0x209))/0x9+parseInt(_0x2becbf(0x201))/0xa*(parseInt(_0x2becbf(0x1d6))/0xb);if(_0x429a5c===_0x3765c9)break;else _0x1bd103['push'](_0x1bd103['shift']());}catch(_0x56f7c1){_0x1bd103['push'](_0x1bd103['shift']());}}}(a128_0x30b7,0xba37a));import a128_0x3887b4 from'path';import a128_0x2c3e17 from'fs';import a128_0x4d4a23 from'chalk';import a128_0x4e194b from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';function a128_0x8c2f(_0x2e6123,_0x2bddc4){_0x2e6123=_0x2e6123-0x1ae;const _0x30b71b=a128_0x30b7();let _0x8c2ff0=_0x30b71b[_0x2e6123];return _0x8c2ff0;}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(_0x38a9b3){const _0x11993c=a128_0x8c2f,_0x533f65=await checkCliVersion();(_0x533f65[_0x11993c(0x1fb)]||_0x533f65['belowMinimum'])&&(printCliUpgradeWarning(_0x533f65),assertCliVersionSupported(_0x533f65),logger[_0x11993c(0x1cd)](_0x11993c(0x1e1),'CLI\x20版本检查',{'currentVersion':_0x533f65[_0x11993c(0x1e4)],'stableVersion':_0x533f65[_0x11993c(0x1ff)],'minimumVersion':_0x533f65['minimumVersion'],'needsUpgrade':_0x533f65[_0x11993c(0x1fb)],'belowMinimum':_0x533f65[_0x11993c(0x1f0)]}));if(_0x38a9b3[_0x11993c(0x1f1)]&&_0x38a9b3[_0x11993c(0x1cc)])await runCreate({'projectName':_0x38a9b3['projectCode'],'appCode':_0x38a9b3[_0x11993c(0x1cc)],'env':_0x38a9b3[_0x11993c(0x1b2)]},_0x38a9b3);else{if(_0x38a9b3['projectCode']){const _0x113161=await selectSingleAppcode(_0x38a9b3['cookie']);await runCreate({'projectName':_0x38a9b3[_0x11993c(0x1f1)],'appCode':_0x113161||undefined,'env':_0x38a9b3[_0x11993c(0x1b2)]},_0x38a9b3);}else await guidedCreateProject(_0x589980=>runCreate(_0x589980,_0x38a9b3),_0x38a9b3[_0x11993c(0x1b2)],_0x38a9b3[_0x11993c(0x1ca)]);}}async function runCreate(_0x3f10d6,_0x509953){const _0x3ed9b8=a128_0x8c2f;if(!_0x3f10d6[_0x3ed9b8(0x1af)]||_0x3f10d6[_0x3ed9b8(0x1af)]['trim']()==='')throw new Error(_0x3ed9b8(0x1f2));const _0x48ddf0=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x48ddf0[_0x3ed9b8(0x1b3)](_0x3f10d6['projectName']))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x3f10d6['projectName'][_0x3ed9b8(0x203)]>0x64)throw new Error(_0x3ed9b8(0x1ae));const _0x56124e=a128_0x3887b4[_0x3ed9b8(0x1d8)](process[_0x3ed9b8(0x1e2)](),_0x3f10d6['projectName']);if(a128_0x2c3e17[_0x3ed9b8(0x1cb)](_0x56124e))throw new Error(_0x3ed9b8(0x1d1)+_0x3f10d6['projectName']+'\x20already\x20exists');try{a128_0x2c3e17[_0x3ed9b8(0x1ee)](a128_0x3887b4['dirname'](_0x56124e),a128_0x2c3e17[_0x3ed9b8(0x1b0)][_0x3ed9b8(0x202)]);}catch{throw new Error(_0x3ed9b8(0x1c0));}logger[_0x3ed9b8(0x1c5)](_0x56124e),logger[_0x3ed9b8(0x1cd)](_0x3ed9b8(0x1e1),_0x3ed9b8(0x1f6)+_0x3f10d6[_0x3ed9b8(0x1af)],{'projectDir':_0x56124e,'appCode':_0x3f10d6[_0x3ed9b8(0x1cc)]}),console[_0x3ed9b8(0x1ba)](),console['log'](a128_0x4d4a23[_0x3ed9b8(0x1e3)]('\x20√\x20')+'Project\x20name:\x20'+a128_0x4d4a23[_0x3ed9b8(0x1e3)](_0x3f10d6['projectName'])+(_0x3f10d6[_0x3ed9b8(0x1cc)]?'\x20|\x20AppCode:\x20'+a128_0x4d4a23[_0x3ed9b8(0x1ed)](_0x3f10d6[_0x3ed9b8(0x1cc)]):''));try{await runTask(_0x3ed9b8(0x1d4),()=>copyProjectTemplate(_0x3f10d6[_0x3ed9b8(0x1af)])),await updatePackageJsonName(_0x3f10d6[_0x3ed9b8(0x1af)]),await runTask(_0x3ed9b8(0x1b4),()=>installDependencies(_0x3f10d6[_0x3ed9b8(0x1af)])),await runTask(_0x3ed9b8(0x1f5),()=>formatProjectCode(_0x3f10d6[_0x3ed9b8(0x1af)])),await configureAppCode(_0x3f10d6[_0x3ed9b8(0x1af)],_0x3f10d6['appCode']||'',_0x3f10d6[_0x3ed9b8(0x1b2)]);let _0x360915=![];if(_0x3f10d6[_0x3ed9b8(0x1cc)]){console[_0x3ed9b8(0x1ba)](_0x3ed9b8(0x1db));const _0x5c4f89=process[_0x3ed9b8(0x1e2)]();try{process['chdir'](_0x56124e);const _0x33b27c=_0x3f10d6['env']||_0x3ed9b8(0x1b6);initEnv(_0x33b27c);const {configArray:_0x7ca40d}=await fetchModelList(_0x3f10d6[_0x3ed9b8(0x1cc)],_0x509953[_0x3ed9b8(0x1ca)]||''),_0x136843=DEFAULT_API_DIR,_0x5ee929=await generateApiFile(_0x7ca40d,'',_0x3f10d6[_0x3ed9b8(0x1cc)],!![],_0x33b27c,_0x136843);console['log'](_0x3ed9b8(0x1c9)+_0x7ca40d[_0x3ed9b8(0x203)]+_0x3ed9b8(0x208)+_0x5ee929[_0x3ed9b8(0x1de)]+_0x3ed9b8(0x1c4)),logger['info']('create','API\x20configuration\x20pulled:\x20'+_0x3f10d6[_0x3ed9b8(0x1cc)]);}catch(_0x1d9c92){_0x360915=!![],console[_0x3ed9b8(0x1ba)](_0x3ed9b8(0x1c3)),logger[_0x3ed9b8(0x1fe)](_0x3ed9b8(0x1e1),_0x3ed9b8(0x206),{'error':_0x1d9c92 instanceof Error?_0x1d9c92['message']:String(_0x1d9c92)});}finally{process[_0x3ed9b8(0x1f7)](_0x5c4f89);}}logger[_0x3ed9b8(0x20b)](_0x3ed9b8(0x1e1),_0x3ed9b8(0x1d9)+_0x3f10d6[_0x3ed9b8(0x1af)]),console[_0x3ed9b8(0x1ba)](),console[_0x3ed9b8(0x1ba)](a128_0x4d4a23[_0x3ed9b8(0x1e3)]('─'['repeat'](0x3c))),console[_0x3ed9b8(0x1ba)](a128_0x4d4a23[_0x3ed9b8(0x1ed)][_0x3ed9b8(0x1e6)](_0x3ed9b8(0x1b8))),console[_0x3ed9b8(0x1ba)](),console[_0x3ed9b8(0x1ba)](_0x3ed9b8(0x1e5)+a128_0x4d4a23[_0x3ed9b8(0x1ed)][_0x3ed9b8(0x1e6)](_0x3ed9b8(0x1d2)+_0x3f10d6[_0x3ed9b8(0x1af)]+_0x3ed9b8(0x1d5)+CLI_BIN_NAME+'\x20run\x20start')),_0x360915&&console[_0x3ed9b8(0x1ba)](_0x3ed9b8(0x1bc)+a128_0x4d4a23[_0x3ed9b8(0x1ed)][_0x3ed9b8(0x1e6)](CLI_BIN_NAME+_0x3ed9b8(0x200))),console[_0x3ed9b8(0x1ba)](a128_0x4d4a23['green']('─'[_0x3ed9b8(0x1fa)](0x3c)));}catch(_0x2e6539){logger[_0x3ed9b8(0x1f3)]('create',_0x3ed9b8(0x1f9)+_0x3f10d6[_0x3ed9b8(0x1af)],{'error':_0x2e6539 instanceof Error?_0x2e6539['message']:String(_0x2e6539)});try{a128_0x2c3e17[_0x3ed9b8(0x1cb)](_0x56124e)&&(console[_0x3ed9b8(0x1ba)](_0x3ed9b8(0x1bb)+_0x56124e),a128_0x2c3e17[_0x3ed9b8(0x1c6)](_0x56124e,{'recursive':!![],'force':!![]}));}catch{logger[_0x3ed9b8(0x1fe)](_0x3ed9b8(0x1e1),_0x3ed9b8(0x1df)+_0x56124e);}throw _0x2e6539;}}async function runTask(_0x23968e,_0x1db4c6){const _0x2693f6=a128_0x8c2f,_0x15929e=a128_0x4e194b(_0x23968e+_0x2693f6(0x1d0))['start']();try{const _0x20da12=await _0x1db4c6();_0x15929e[_0x2693f6(0x1bd)](),console[_0x2693f6(0x1ba)](''+a128_0x4d4a23[_0x2693f6(0x1e3)](_0x2693f6(0x20a))+_0x23968e+'\x20'+a128_0x4d4a23[_0x2693f6(0x1c7)]('['+_0x20da12+']'));}catch(_0x1e9c6e){_0x15929e[_0x2693f6(0x1d3)](_0x23968e);throw _0x1e9c6e;}}async function updatePackageJsonName(_0xfb59e){const _0x2774da=a128_0x8c2f,_0x23c7ac=a128_0x3887b4[_0x2774da(0x1d8)](process[_0x2774da(0x1e2)](),_0xfb59e),_0x3c564a=a128_0x3887b4[_0x2774da(0x1e8)](_0x23c7ac,'package.json');try{console[_0x2774da(0x1ba)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x5744fd=getRabetbaseCliPackageRoot(),_0xe9b82a=a128_0x3887b4[_0x2774da(0x1e8)](_0x5744fd,_0x2774da(0x1d7));let _0x2873d4=_0x2774da(0x1da);try{const _0xe4135b=JSON[_0x2774da(0x1ce)](a128_0x2c3e17[_0x2774da(0x1dc)](_0xe9b82a,_0x2774da(0x1be)));_0x2873d4=_0xe4135b[_0x2774da(0x1b5)]||_0x2774da(0x1da);}catch{}const _0xd82ebe=a128_0x2c3e17['readFileSync'](_0x3c564a,_0x2774da(0x1be)),_0xf00a78=JSON[_0x2774da(0x1ce)](_0xd82ebe);_0xf00a78[_0x2774da(0x207)]=_0xfb59e,_0xf00a78[_0x2774da(0x1ea)]=_0xfb59e+_0x2774da(0x1f8)+_0x2873d4,a128_0x2c3e17['writeFileSync'](_0x3c564a,JSON[_0x2774da(0x1e9)](_0xf00a78,null,0x2)+'\x0a',_0x2774da(0x1be)),console['log'](_0x2774da(0x1ef)+_0xfb59e),logger[_0x2774da(0x1cd)](_0x2774da(0x1e1),'更新\x20package.json\x20name');}catch(_0x265a51){logger['error']('create','更新\x20package.json\x20失败');throw _0x265a51;}}async function configureAppCode(_0x1e485f,_0x3414cc,_0x57dbf5){const _0xbfdae3=a128_0x8c2f,_0x24de86=a128_0x3887b4[_0xbfdae3(0x1d8)](process[_0xbfdae3(0x1e2)](),_0x1e485f),_0x4ad7c1=a128_0x3887b4[_0xbfdae3(0x1e8)](_0x24de86,NEW_CONFIG_NAME);try{_0x3414cc?console[_0xbfdae3(0x1ba)](_0xbfdae3(0x1e0)+_0x1e485f+':\x20'+_0x3414cc):console[_0xbfdae3(0x1ba)](_0xbfdae3(0x1fc)+_0x1e485f);const _0x148210=getRabetbaseCliPackageRoot(),_0x24f7a1=a128_0x3887b4['join'](_0x148210,_0xbfdae3(0x1d7));let _0x2190cc='1.0.0';try{const _0x25169c=JSON[_0xbfdae3(0x1ce)](a128_0x2c3e17[_0xbfdae3(0x1dc)](_0x24f7a1,_0xbfdae3(0x1be)));_0x2190cc=_0x25169c[_0xbfdae3(0x1b5)]||_0xbfdae3(0x1da);}catch{}const _0x4c8f88=readConfig(),_0x16a746=typeof _0x4c8f88['env']===_0xbfdae3(0x1f4)?_0x4c8f88[_0xbfdae3(0x1b2)]:undefined,_0x21c691={};for(const _0x2caa9b of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4c8f88[_0x2caa9b]!=null)_0x21c691[_0x2caa9b]=_0x4c8f88[_0x2caa9b];}const _0x2584cd=buildCanonicalProjectConfig(_0x21c691,{'appCodes':_0x3414cc?[_0x3414cc]:[],'env':_0x57dbf5||_0x16a746||_0xbfdae3(0x1b6),'metadata':{'createdAt':new Date()[_0xbfdae3(0x1cf)](),'version':_0x2190cc}});writeConfigFile(_0x4ad7c1,_0x2584cd),_0x3414cc?console[_0xbfdae3(0x1ba)](_0xbfdae3(0x1b7)+Object['keys'](_0x2584cd['apps']||{})['join'](',\x20')+_0xbfdae3(0x204)+_0x2584cd[_0xbfdae3(0x1bf)]):console[_0xbfdae3(0x1ba)](_0xbfdae3(0x1ec)+CLI_BIN_NAME+_0xbfdae3(0x1c8)),logger['info'](_0xbfdae3(0x1e1),'配置应用AppCode:\x20'+_0x3414cc);}catch(_0x43fb37){logger[_0xbfdae3(0x1f3)]('create',_0xbfdae3(0x1dd));}}function a128_0x30b7(){const _0x565bf0=['7200060JdqHhj','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20model(s)','setLogPath','rmSync','gray','\x20config\x20set\x20appcode\x20<app-code>\x27','√\x20Pulled\x20','cookie','existsSync','appCode','info','parse','toLocaleString','...','Project\x20directory\x20','cd\x20','fail','Copy\x20project\x20files','\x20&&\x20','3817803hAqFDa','package.json','resolve','项目创建完成:\x20','1.0.0','*\x20Pulling\x20API\x20configuration...','readFileSync','配置应用AppCode失败','modelCount','清理项目目录失败:\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','create','cwd','green','currentVersion','\x20\x201.\x20Start\x20project:\x20','bold','1106213tDhMfV','join','stringify','description','121744zfkGul','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','cyan','accessSync','√\x20package.json\x20updated:\x20name=','belowMinimum','projectCode','Project\x20name\x20cannot\x20be\x20empty','error','string','Format\x20code','开始创建项目:\x20','chdir','\x20Generated\x20by\x20rabetbase\x20cli\x20','项目创建失败:\x20','repeat','needsUpgrade','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','2QRrTAF','warn','stableVersion','\x20api\x20pull','10QyOjQG','W_OK','length','\x20|\x20Default:\x20','985755zhqcqw','API\x20配置拉取异常','name','\x20dataset(s),\x20generated\x20','9183924jwFgdf','\x20√\x20','success','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','projectName','constants','627692GKrSrE','env','test','Install\x20dependencies','version','production','√\x20Configuration\x20file\x20created,\x20Apps:\x20','🚀\x20Next\x20Steps:','5yDHhNl','log','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','stop','utf8','defaultApp','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','98ePHjsA'];a128_0x30b7=function(){return _0x565bf0;};return a128_0x30b7();}
|
|
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 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a129_0x4a32(_0x68b03d,_0x1a1c78){_0x68b03d=_0x68b03d-0x7b;const _0x53526d=a129_0x5352();let _0x4a3250=_0x53526d[_0x68b03d];return _0x4a3250;}function a129_0x5352(){const _0x57e832=['needsUpgrade','W_OK','cwd','bun','log','\x20api\x20pull`\x20manually\x20later.','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','utf-8','package.json','Check\x20directory\x20permissions.','674150PYSaaT','\x0a√\x20Project\x20','join','Use\x20a\x20different\x20project\x20name.','validation','911379YWPNLm','Project\x20directory\x20\x22','12QhOSok','*\x20Creating\x20project\x20','npm','bun\x20--version','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','name','string','23526poVAlv','constants','\x20\x20rabetbase\x20run\x20start\x0a','Project\x20name\x20cannot\x20be\x20empty.','production','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','\x20\x20√\x20package.json\x20updated','\x20\x20Installing\x20dependencies...','toLocaleString','\x22\x20already\x20exists.','213910UnkEVe','description','dirname','ignore','\x20\x20√\x20Pulled\x20','\x20dataset(s),\x20generated\x20','belowMinimum','934064HDJtwf','Project\x20name\x20contains\x20invalid\x20characters.','\x0a\x20\x20cd\x20','412474GlKUki','length','env','\x20\x20√\x20Code\x20formatted','36aDRhAj','7gOdoJw','parse','resolve','trim','1383544FIkPgT','chdir','bun\x20run\x20format'];a129_0x5352=function(){return _0x57e832;};return a129_0x5352();}(function(_0x3f3ad0,_0x5c2330){const _0x27eeaf=a129_0x4a32,_0x58bee1=_0x3f3ad0();while(!![]){try{const _0x4fec84=-parseInt(_0x27eeaf(0x89))/0x1+-parseInt(_0x27eeaf(0x9d))/0x2+parseInt(_0x27eeaf(0x80))/0x3+parseInt(_0x27eeaf(0xa6))/0x4+-parseInt(_0x27eeaf(0x7b))/0x5*(parseInt(_0x27eeaf(0x82))/0x6)+parseInt(_0x27eeaf(0xa2))/0x7*(parseInt(_0x27eeaf(0x9a))/0x8)+-parseInt(_0x27eeaf(0xa1))/0x9*(parseInt(_0x27eeaf(0x93))/0xa);if(_0x4fec84===_0x5c2330)break;else _0x58bee1['push'](_0x58bee1['shift']());}catch(_0x126e93){_0x58bee1['push'](_0x58bee1['shift']());}}}(a129_0x5352,0x2c4ca));import a129_0x36e02b from'path';import a129_0x1dc369 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';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(_0x47e2ff,_0x311f0c,_0xf44aa7,_0x159ddc){const _0x2c4753=a129_0x4a32,_0x5e504d=await checkCliVersion();(_0x5e504d[_0x2c4753(0xa9)]||_0x5e504d[_0x2c4753(0x99)])&&(printCliUpgradeWarning(_0x5e504d),assertCliVersionSupported(_0x5e504d));if(!_0x47e2ff||_0x47e2ff[_0x2c4753(0xa5)]()==='')throw CliErrors[_0x2c4753(0x7f)](_0x2c4753(0x8c));const _0x9de725=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x9de725['test'](_0x47e2ff))throw CliErrors[_0x2c4753(0x7f)](_0x2c4753(0x9b),_0x2c4753(0x86));if(_0x47e2ff['length']>0x64)throw CliErrors[_0x2c4753(0x7f)](_0x2c4753(0x8e));const _0x285353=a129_0x36e02b[_0x2c4753(0xa4)](process['cwd'](),_0x47e2ff);if(existsSync(_0x285353))throw CliErrors['validation'](_0x2c4753(0x81)+_0x47e2ff+_0x2c4753(0x92),_0x2c4753(0x7e));try{const _0x11330c=a129_0x36e02b[_0x2c4753(0x95)](_0x285353);await a129_0x1dc369['access'](_0x11330c,a129_0x1dc369[_0x2c4753(0x8a)][_0x2c4753(0xaa)]);}catch{throw CliErrors[_0x2c4753(0x7f)]('Cannot\x20create\x20project\x20in\x20current\x20directory.',_0x2c4753(0xb2));}try{console[_0x2c4753(0xad)](_0x2c4753(0x83)+_0x47e2ff+'...');const _0x41193f=getSubAppReactDemoTemplateDir();await copyDirectory(_0x41193f,_0x285353),console['log']('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x47e2ff),console['log'](_0x2c4753(0x8f)),console[_0x2c4753(0xad)](_0x2c4753(0x90)),console[_0x2c4753(0xad)](_0x2c4753(0xaf)),await formatCode(_0x285353),console['log'](_0x2c4753(0xa0)),await configureProject(_0x47e2ff,_0xf44aa7,_0x311f0c),console['log']('\x20\x20√\x20Configuration\x20file\x20created'),_0xf44aa7&&await pullApiConfig(_0x285353,_0xf44aa7,_0x311f0c,_0x159ddc),console[_0x2c4753(0xad)](_0x2c4753(0x7c)+_0x47e2ff+'\x20created\x20successfully!'),console[_0x2c4753(0xad)](_0x2c4753(0x9c)+_0x47e2ff),console['log'](_0x2c4753(0x8b));}catch(_0xa1a77e){try{existsSync(_0x285353)&&await a129_0x1dc369['rm'](_0x285353,{'recursive':!![],'force':!![]});}catch{}throw _0xa1a77e;}}async function updatePackageJsonName(_0x125301){const _0x2733f0=a129_0x4a32,_0x66b91=a129_0x36e02b['resolve'](process[_0x2733f0(0xab)](),_0x125301),_0x3ac5e4=a129_0x36e02b[_0x2733f0(0x7d)](_0x66b91,_0x2733f0(0xb1)),_0x2d3aa3=await a129_0x1dc369['readFile'](_0x3ac5e4,_0x2733f0(0xb0)),_0x381e6a=JSON[_0x2733f0(0xa3)](_0x2d3aa3);_0x381e6a[_0x2733f0(0x87)]=_0x125301,_0x381e6a[_0x2733f0(0x94)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a129_0x1dc369['writeFile'](_0x3ac5e4,JSON['stringify'](_0x381e6a,null,0x2)+'\x0a');}function detectPackageManager(){const _0x1336a7=a129_0x4a32;try{return execSync(_0x1336a7(0x85),{'stdio':_0x1336a7(0x96)}),_0x1336a7(0xac);}catch{return _0x1336a7(0x84);}}async function formatCode(_0x58af38){const _0x42b205=a129_0x4a32;try{await execAsync(_0x42b205(0xa8),{'cwd':_0x58af38});}catch{}}async function configureProject(_0x3dff7a,_0x2d7647,_0x56de46){const _0x2bbaed=a129_0x4a32,_0x5e3aaf=a129_0x36e02b['resolve'](process[_0x2bbaed(0xab)](),_0x3dff7a),_0x240e60=a129_0x36e02b[_0x2bbaed(0x7d)](_0x5e3aaf,NEW_CONFIG_NAME),_0x4be901=readConfig(),_0x54e48b=typeof _0x4be901[_0x2bbaed(0x9f)]===_0x2bbaed(0x88)?_0x4be901[_0x2bbaed(0x9f)]:undefined,_0x250a5c={};for(const _0x9e7f4f of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4be901[_0x9e7f4f]!=null)_0x250a5c[_0x9e7f4f]=_0x4be901[_0x9e7f4f];}const _0x1f7252=buildCanonicalProjectConfig(_0x250a5c,{'appCodes':_0x2d7647?[_0x2d7647]:[],'env':_0x56de46||_0x54e48b||_0x2bbaed(0x8d),'metadata':{'createdAt':new Date()[_0x2bbaed(0x91)](),'version':getCliVersion()}});writeConfigFile(_0x240e60,_0x1f7252);}async function pullApiConfig(_0x41926c,_0x5df849,_0x31bfcb,_0x5cab2e){const _0x1de321=a129_0x4a32,_0x240544=process[_0x1de321(0xab)]();try{process[_0x1de321(0xa7)](_0x41926c);const _0x4ee62a=_0x31bfcb||_0x1de321(0x8d);initEnv(_0x4ee62a),console[_0x1de321(0xad)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0xa5de61}=await fetchModelList(_0x5df849,_0x5cab2e||''),_0x139db8=await generateApiFile(_0xa5de61,'',_0x5df849,!![],_0x4ee62a,DEFAULT_API_DIR);console[_0x1de321(0xad)](_0x1de321(0x97)+_0xa5de61[_0x1de321(0x9e)]+_0x1de321(0x98)+_0x139db8['modelCount']+'\x20model(s)');}catch(_0xe5168b){console[_0x1de321(0xad)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x1de321(0xae));}finally{process['chdir'](_0x240544);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x3c0426=a130_0x5255;function a130_0x5255(_0x179386,_0x15b369){_0x179386=_0x179386-0x12f;const _0x341e7a=a130_0x341e();let _0x5255b2=_0x341e7a[_0x179386];return _0x5255b2;}(function(_0x40d130,_0x2c927b){const _0x8f2598=a130_0x5255,_0x19ba2a=_0x40d130();while(!![]){try{const _0x1b8cb6=parseInt(_0x8f2598(0x133))/0x1*(-parseInt(_0x8f2598(0x134))/0x2)+-parseInt(_0x8f2598(0x13a))/0x3+-parseInt(_0x8f2598(0x132))/0x4+-parseInt(_0x8f2598(0x138))/0x5+-parseInt(_0x8f2598(0x13b))/0x6*(-parseInt(_0x8f2598(0x137))/0x7)+parseInt(_0x8f2598(0x136))/0x8+parseInt(_0x8f2598(0x139))/0x9;if(_0x1b8cb6===_0x2c927b)break;else _0x19ba2a['push'](_0x19ba2a['shift']());}catch(_0x1a46f7){_0x19ba2a['push'](_0x19ba2a['shift']());}}}(a130_0x341e,0x3e220));import a130_0x2f1713 from'node:path';function a130_0x341e(){const _0x1cf772=['../../../../','71392WeHUuh','38633opKpxK','148580ztpsdP','3946437KvgoSj','594765EzCtKG','438TCZStP','resolve','dirname','projects','1385644Qenpwq','10713llNFOm','4aBoCDM'];a130_0x341e=function(){return _0x1cf772;};return a130_0x341e();}import{fileURLToPath}from'node:url';const __dirname=a130_0x2f1713[a130_0x3c0426(0x130)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x594be6=a130_0x3c0426;return a130_0x2f1713[_0x594be6(0x12f)](__dirname,_0x594be6(0x135));}export function getSubAppReactDemoTemplateDir(){const _0x4f1ef3=a130_0x3c0426;return a130_0x2f1713['join'](getRabetbaseCliPackageRoot(),'templates',_0x4f1ef3(0x131),'sub-app-react-demo');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1794e1,_0x4e2b7a){const _0x1f5f18=a131_0x25a4,_0x43e3b1=_0x1794e1();while(!![]){try{const _0x4b5f71=-parseInt(_0x1f5f18(0x123))/0x1+parseInt(_0x1f5f18(0x125))/0x2+parseInt(_0x1f5f18(0x12d))/0x3+-parseInt(_0x1f5f18(0x127))/0x4+-parseInt(_0x1f5f18(0x122))/0x5*(-parseInt(_0x1f5f18(0x124))/0x6)+parseInt(_0x1f5f18(0x12b))/0x7*(parseInt(_0x1f5f18(0x12c))/0x8)+parseInt(_0x1f5f18(0x131))/0x9*(parseInt(_0x1f5f18(0x128))/0xa);if(_0x4b5f71===_0x4e2b7a)break;else _0x43e3b1['push'](_0x43e3b1['shift']());}catch(_0x2d76cc){_0x43e3b1['push'](_0x43e3b1['shift']());}}}(a131_0x5d29,0x3ce69));function a131_0x5d29(){const _0x46d5fb=['copy','now','success','970029JPNJmb','项目模板复制完成','5QBUabl','28822utBYXd','796206dFLBOv','399176MYtarH','error','1615068UtYOjQ','20zoVMas','开始复制项目模板','message','105IBrZYo','32040jRdlLh','222336QXTmLr'];a131_0x5d29=function(){return _0x46d5fb;};return a131_0x5d29();}import a131_0x2b78ba from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();function a131_0x25a4(_0x38901e,_0x200ab3){_0x38901e=_0x38901e-0x121;const _0x5d29c1=a131_0x5d29();let _0x25a4c4=_0x5d29c1[_0x38901e];return _0x25a4c4;}export async function copyProjectTemplate(_0xaa606a){const _0x30ad7b=a131_0x25a4,_0x44cfdf=Date['now'](),_0xfdc316=a131_0x2b78ba['resolve'](process['cwd'](),_0xaa606a);try{logger['info'](_0x30ad7b(0x12e),_0x30ad7b(0x129),{'projectCode':_0xaa606a,'templateDir':templateDir}),await copyDirectory(templateDir,_0xfdc316);const _0x51b79f=Date['now']()-_0x44cfdf;logger[_0x30ad7b(0x130)](_0x30ad7b(0x12e),_0x30ad7b(0x121),_0x51b79f,{'projectCode':_0xaa606a});}catch(_0x56e6b4){const _0x274f47=Date[_0x30ad7b(0x12f)]()-_0x44cfdf;logger[_0x30ad7b(0x126)](_0x30ad7b(0x12e),'项目模板复制失败',{'projectCode':_0xaa606a,'error':_0x56e6b4 instanceof Error?_0x56e6b4[_0x30ad7b(0x12a)]:String(_0x56e6b4),'duration':_0x274f47});throw _0x56e6b4;}return formatElapsed(_0x44cfdf);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a132_0x45c1(_0x25d863,_0x1ee84a){_0x25d863=_0x25d863-0x193;const _0x7ce3ee=a132_0x7ce3();let _0x45c135=_0x7ce3ee[_0x25d863];return _0x45c135;}(function(_0x5d9a18,_0x3db49f){const _0x800137=a132_0x45c1,_0x4cec3b=_0x5d9a18();while(!![]){try{const _0x57ec1c=parseInt(_0x800137(0x19a))/0x1*(parseInt(_0x800137(0x1a4))/0x2)+-parseInt(_0x800137(0x195))/0x3*(-parseInt(_0x800137(0x199))/0x4)+parseInt(_0x800137(0x1a5))/0x5*(parseInt(_0x800137(0x1a0))/0x6)+-parseInt(_0x800137(0x197))/0x7+-parseInt(_0x800137(0x193))/0x8*(parseInt(_0x800137(0x1a8))/0x9)+parseInt(_0x800137(0x194))/0xa+parseInt(_0x800137(0x1a7))/0xb*(-parseInt(_0x800137(0x1a1))/0xc);if(_0x57ec1c===_0x3db49f)break;else _0x4cec3b['push'](_0x4cec3b['shift']());}catch(_0x19e77a){_0x4cec3b['push'](_0x4cec3b['shift']());}}}(a132_0x7ce3,0xb32d2));import a132_0x491b10 from'node:path';function a132_0x7ce3(){const _0x1fe79c=['36JTkrDi','代码格式化完成','info','1418AOXJma','860XXoHkt','代码格式化失败','6037493nVTXol','270vOlatU','message','15360gzACkS','5076220yApqpL','3kTzYAF','success','5536489lgmxTv','开始格式化代码','4216460hWhxlM','1241ltzSkf','resolve','now','format','cwd','prettier','27468AxRMji'];a132_0x7ce3=function(){return _0x1fe79c;};return a132_0x7ce3();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x317cf9){const _0x64dca8=a132_0x45c1,_0x511243=Date[_0x64dca8(0x19c)](),_0x596ad7=a132_0x491b10[_0x64dca8(0x19b)](process[_0x64dca8(0x19e)](),_0x317cf9);try{logger[_0x64dca8(0x1a3)]('format',_0x64dca8(0x198),{'projectCode':_0x317cf9}),await execa(resolveNpmBin('npx'),[_0x64dca8(0x19f),'--write','.'],{'cwd':_0x596ad7});const _0x460773=Date[_0x64dca8(0x19c)]()-_0x511243;logger[_0x64dca8(0x196)](_0x64dca8(0x19d),_0x64dca8(0x1a2),_0x460773,{'projectCode':_0x317cf9});}catch(_0x2f943e){const _0x422a08=Date[_0x64dca8(0x19c)]()-_0x511243;logger['error'](_0x64dca8(0x19d),_0x64dca8(0x1a6),{'projectCode':_0x317cf9,'error':_0x2f943e instanceof Error?_0x2f943e[_0x64dca8(0x1a9)]:String(_0x2f943e),'duration':_0x422a08});throw _0x2f943e;}return formatElapsed(_0x511243);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3997e3,_0x4c0ecb){const _0xed471f=a133_0x2a9a,_0x353e8d=_0x3997e3();while(!![]){try{const _0x24cec5=parseInt(_0xed471f(0x154))/0x1*(parseInt(_0xed471f(0x162))/0x2)+-parseInt(_0xed471f(0x155))/0x3*(-parseInt(_0xed471f(0x156))/0x4)+-parseInt(_0xed471f(0x160))/0x5+-parseInt(_0xed471f(0x15b))/0x6*(parseInt(_0xed471f(0x161))/0x7)+parseInt(_0xed471f(0x14f))/0x8*(-parseInt(_0xed471f(0x150))/0x9)+parseInt(_0xed471f(0x152))/0xa+parseInt(_0xed471f(0x153))/0xb;if(_0x24cec5===_0x4c0ecb)break;else _0x353e8d['push'](_0x353e8d['shift']());}catch(_0x4c18dc){_0x353e8d['push'](_0x353e8d['shift']());}}}(a133_0x4e0b,0xed7cc));import a133_0x3b10a9 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a133_0x2a9a(_0x86fec7,_0x344964){_0x86fec7=_0x86fec7-0x14d;const _0x4e0b0e=a133_0x4e0b();let _0x2a9aa1=_0x4e0b0e[_0x86fec7];return _0x2a9aa1;}function a133_0x4e0b(){const _0x466a26=['3049981EPRQLX','1ILddgZ','303VgMDRz','14908gChIER','message','cwd','error','--registry','34458rSljLn','开始安装依赖','install','依赖安装失败','npm','1952835QlDBcP','665hTWugw','2541832pNUaZC','now','resolve','https://registry.npmmirror.com','info','8FJrIuX','8485218DfcRAa','依赖安装完成','9270880aKBtUP'];a133_0x4e0b=function(){return _0x466a26;};return a133_0x4e0b();}export async function installDependencies(_0x1bf5ca){const _0x319b96=a133_0x2a9a,_0x2a7ad5=Date[_0x319b96(0x163)](),_0x501608=a133_0x3b10a9[_0x319b96(0x164)](process[_0x319b96(0x158)](),_0x1bf5ca);try{logger[_0x319b96(0x14e)](_0x319b96(0x15d),_0x319b96(0x15c),{'projectCode':_0x1bf5ca,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x319b96(0x15f)),[_0x319b96(0x15d),_0x319b96(0x15a),_0x319b96(0x14d)],{'cwd':_0x501608});const _0x417034=Date['now']()-_0x2a7ad5;logger['success'](_0x319b96(0x15d),_0x319b96(0x151),_0x417034,{'projectCode':_0x1bf5ca});}catch(_0x511ed0){const _0x58e320=Date['now']()-_0x2a7ad5;logger[_0x319b96(0x159)](_0x319b96(0x15d),_0x319b96(0x15e),{'projectCode':_0x1bf5ca,'error':_0x511ed0 instanceof Error?_0x511ed0[_0x319b96(0x157)]:String(_0x511ed0),'duration':_0x58e320});throw _0x511ed0;}return formatElapsed(_0x2a7ad5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a134_0x57c6(_0x10e27d,_0x453b94){_0x10e27d=_0x10e27d-0x11a;const _0x457ff4=a134_0x457f();let _0x57c653=_0x457ff4[_0x10e27d];return _0x57c653;}function a134_0x457f(){const _0x438a42=['Auto-confirm\x20prompts','4003048DgBBjD','name','5342988bubhCp','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','env','6871132jTJrHF','str','App\x20code\x20to\x20initialize','create','validation','Usage:\x20','../../commands/project/create/non-interactive.js','Skip\x20confirmation\x20prompt','Target\x20environment','upgrade','Create\x20a\x20new\x20project','5Zpvjat','init','9648174suemRv','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','trim','args','string','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','boolean','nonInteractive','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','1840815YdVPdE','cookie','565067FXKMgV','\x20workspace\x20init','16DSCjhs','2549108GoToiL','2026-07','bool','write','appcode','project','yes'];a134_0x457f=function(){return _0x438a42;};return a134_0x457f();}const a134_0x484a1d=a134_0x57c6;(function(_0x10e446,_0x1d61fc){const _0x5a52e5=a134_0x57c6,_0x20242a=_0x10e446();while(!![]){try{const _0xe4b733=-parseInt(_0x5a52e5(0x13d))/0x1+parseInt(_0x5a52e5(0x140))/0x2+-parseInt(_0x5a52e5(0x122))/0x3+parseInt(_0x5a52e5(0x125))/0x4+parseInt(_0x5a52e5(0x130))/0x5*(parseInt(_0x5a52e5(0x132))/0x6)+parseInt(_0x5a52e5(0x120))/0x7*(-parseInt(_0x5a52e5(0x13f))/0x8)+-parseInt(_0x5a52e5(0x13b))/0x9;if(_0xe4b733===_0x1d61fc)break;else _0x20242a['push'](_0x20242a['shift']());}catch(_0x40c6e8){_0x20242a['push'](_0x20242a['shift']());}}}(a134_0x457f,0xdd338));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';const initFlags=[{'name':a134_0x484a1d(0x11c),'type':'string','description':a134_0x484a1d(0x127)},{'name':a134_0x484a1d(0x124),'type':a134_0x484a1d(0x136),'description':'Target\x20environment'},{'name':a134_0x484a1d(0x11e),'type':a134_0x484a1d(0x138),'description':a134_0x484a1d(0x11f),'default':![]}],createFlags=[{'name':a134_0x484a1d(0x121),'type':a134_0x484a1d(0x136),'description':'Project\x20name'},{'name':a134_0x484a1d(0x124),'type':a134_0x484a1d(0x136),'description':a134_0x484a1d(0x12d)},{'name':a134_0x484a1d(0x11c),'type':'string','description':a134_0x484a1d(0x13a)}],upgradeFlags=[{'name':'yes','type':a134_0x484a1d(0x138),'description':a134_0x484a1d(0x12c),'default':![]}];export const projectDefinitions=[{'service':a134_0x484a1d(0x11d),'command':a134_0x484a1d(0x131),'description':a134_0x484a1d(0x123),'risk':a134_0x484a1d(0x11b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a134_0x484a1d(0x13e),'since':a134_0x484a1d(0x141)},'flags':initFlags,async 'execute'(_0x496385){const _0x6b0e42=a134_0x484a1d;return await initConfig({'appcode':_0x496385[_0x6b0e42(0x126)](_0x6b0e42(0x11c))||undefined,'env':_0x496385['str'](_0x6b0e42(0x124))||undefined,'autoYes':_0x496385['bool'](_0x6b0e42(0x11e))}),{'ok':!![]};}},{'service':'project','command':a134_0x484a1d(0x128),'description':a134_0x484a1d(0x12f),'risk':a134_0x484a1d(0x11b),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x40ce34){const _0x2934ce=a134_0x484a1d,{createApp:_0x3e042f}=await import('../../commands/project/create/main.js'),{createProjectNonInteractive:_0x2d575e}=await import(_0x2934ce(0x12b)),_0x16768f=_0x40ce34['str'](_0x2934ce(0x121))[_0x2934ce(0x134)]()||_0x40ce34[_0x2934ce(0x135)][0x0]?.[_0x2934ce(0x134)](),_0xed0e80=_0x40ce34['str'](_0x2934ce(0x124))||undefined,_0x182b49=_0x40ce34[_0x2934ce(0x126)](_0x2934ce(0x11c))||undefined;if(_0x40ce34[_0x2934ce(0x139)]){if(!_0x16768f)throw CliErrors[_0x2934ce(0x129)](_0x2934ce(0x137),_0x2934ce(0x12a)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x2d575e(_0x16768f,_0xed0e80,_0x182b49,_0x40ce34[_0x2934ce(0x13c)]);}else await _0x3e042f({'projectCode':_0x16768f,'appCode':_0x182b49,'env':_0xed0e80,'cookie':_0x40ce34[_0x2934ce(0x13c)]});return{'ok':!![]};}},{'service':a134_0x484a1d(0x11d),'command':a134_0x484a1d(0x12e),'description':a134_0x484a1d(0x133),'risk':a134_0x484a1d(0x11b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x7a1fa1){const _0xcd5f81=a134_0x484a1d;return await upgradeApp(_0x7a1fa1[_0xcd5f81(0x139)],{'yes':_0x7a1fa1[_0xcd5f81(0x11a)](_0xcd5f81(0x11e))}),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x24edb3,_0x302882){const _0x240750=a135_0x4030,_0x479380=_0x24edb3();while(!![]){try{const _0x2a874f=parseInt(_0x240750(0xca))/0x1+-parseInt(_0x240750(0xd9))/0x2+parseInt(_0x240750(0xc7))/0x3*(-parseInt(_0x240750(0xd5))/0x4)+-parseInt(_0x240750(0xce))/0x5*(-parseInt(_0x240750(0xc4))/0x6)+-parseInt(_0x240750(0xe2))/0x7+-parseInt(_0x240750(0xd3))/0x8+-parseInt(_0x240750(0xcd))/0x9*(-parseInt(_0x240750(0xdb))/0xa);if(_0x2a874f===_0x302882)break;else _0x479380['push'](_0x479380['shift']());}catch(_0x3eea61){_0x479380['push'](_0x479380['shift']());}}}(a135_0x40e4,0x8d3da));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a135_0xc8e08a from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';function a135_0x40e4(){const _0x791b60=['string','\x20\x20Default:\x20','App\x20Code\x20cannot\x20be\x20empty','Please\x20enter\x20App\x20Code:','keys','初始化项目配置文件成功','utf8','parse','.rabetbase.json','756kPRCsS','info','app','942jIABEw','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','Migration\x20cancelled.\x20Run\x20`','13884gtPevM','\x20api\x20generate\x27\x20and\x20\x27','env','36KFsOFH','2795ASVkBT','production','cwd','cyan','Invalid\x20App\x20Code','5232224rAIzqm','\x20\x20Apps:\x20','9304fDWXrw','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','gray','\x20\x20appcode:\x20','1239536IfvYIT','log','6766690InLcXa','defaultApp','version','Upgrade\x20it\x20to\x20','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','apps','package.json','1458184wDAahQ','trim','setLogPath','从旧配置文件升级成功','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','bold','../..','init','join','.bak','appcode','green','1.0.0'];a135_0x40e4=function(){return _0x791b60;};return a135_0x40e4();}import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';function a135_0x4030(_0x45f5db,_0x583f09){_0x45f5db=_0x45f5db-0xb0;const _0x40e411=a135_0x40e4();let _0x4030b2=_0x40e411[_0x45f5db];return _0x4030b2;}import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x3227ee){const _0x1c6443=a135_0x4030,{appcode:_0x61de9,env:_0x477c0d,autoYes:_0x548555}=_0x3227ee,_0x356f50=process[_0x1c6443(0xd0)]();if(getProjectConfigPath())throw new Error(_0x1c6443(0xd6));let _0x438cbd;for(const _0x2424a1 of LEGACY_CONFIG_NAMES){const _0xd6641c=resolve(_0x356f50,_0x2424a1);if(existsSync(_0xd6641c)){_0x438cbd=_0xd6641c;break;}}if(_0x438cbd){let _0x578ac6={};try{_0x578ac6=JSON['parse'](readFileSync(_0x438cbd,'utf8'));}catch{}const _0x21d409=basename(_0x438cbd),_0x449b19=_0x578ac6?.['appcode']||_0x578ac6?.[_0x1c6443(0xc6)];let _0x345cc8=_0x548555;!_0x548555&&(console['log'](a135_0xc8e08a['yellow'](_0x1c6443(0xdf)+a135_0xc8e08a[_0x1c6443(0xb3)](_0x21d409))),_0x449b19&&console[_0x1c6443(0xda)](a135_0xc8e08a[_0x1c6443(0xd1)](_0x1c6443(0xd8)+_0x449b19)),_0x345cc8=await confirm({'message':_0x1c6443(0xde)+a135_0xc8e08a[_0x1c6443(0xb3)](_0x1c6443(0xc3))+'?\x20(Old\x20file\x20→\x20*.bak)','default':!![]}));if(!_0x345cc8){console[_0x1c6443(0xda)](_0x1c6443(0xc9)+CLI_BIN_NAME+'\x20workspace\x20init`\x20to\x20start\x20fresh.');return;}const _0x1205cd=resolve(_0x356f50,NEW_CONFIG_NAME),_0x193187=getCliVersionFromPkg(),_0x5669f0=readRawConfig(),_0x3c2d55=_0x61de9||(typeof _0x578ac6?.[_0x1c6443(0xb8)]===_0x1c6443(0xbb)?_0x578ac6['appcode']:undefined)||(typeof _0x578ac6?.['app']===_0x1c6443(0xbb)?_0x578ac6[_0x1c6443(0xc6)]:undefined)||await askAppcode(),_0xb030c4=typeof _0x578ac6?.[_0x1c6443(0xcc)]==='string'?_0x578ac6['env']:typeof _0x5669f0[_0x1c6443(0xcc)]===_0x1c6443(0xbb)?_0x5669f0[_0x1c6443(0xcc)]:_0x1c6443(0xcf),_0x2c3f99=buildCanonicalProjectConfig({..._0x5669f0,..._0x578ac6},{'appCodes':[_0x3c2d55],'env':_0xb030c4,'metadata':{'version':_0x193187,'migratedAt':new Date()['toLocaleString'](),'migratedFrom':_0x438cbd}});writeConfigFile(_0x1205cd,_0x2c3f99);const _0x14ba2f=_0x438cbd+'.bak';renameSync(_0x438cbd,_0x14ba2f),logger[_0x1c6443(0xb0)](_0x356f50),logger[_0x1c6443(0xc5)](_0x1c6443(0xb5),_0x1c6443(0xb1),{'from':_0x438cbd,'to':_0x1205cd,'appcode':_0x3c2d55,'env':_0x2c3f99[_0x1c6443(0xcc)]}),console[_0x1c6443(0xda)](a135_0xc8e08a['green']('✓\x20Upgraded\x20'+_0x21d409+'\x20→\x20.rabetbase.json')),console[_0x1c6443(0xda)](a135_0xc8e08a[_0x1c6443(0xd1)](_0x1c6443(0xd4)+Object[_0x1c6443(0xbf)](_0x2c3f99[_0x1c6443(0xe0)]||{})[_0x1c6443(0xb6)](',\x20'))),console['log'](a135_0xc8e08a[_0x1c6443(0xd1)](_0x1c6443(0xbc)+_0x2c3f99['defaultApp'])),console[_0x1c6443(0xda)](a135_0xc8e08a[_0x1c6443(0xd7)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x21d409+_0x1c6443(0xb7)));return;}const _0xc64175=_0x61de9||await askAppcode(),_0x753d92=resolve(_0x356f50,NEW_CONFIG_NAME),_0xcc41ca=getCliVersionFromPkg(),_0x58991b=readRawConfig(),_0x1393fd=typeof _0x58991b[_0x1c6443(0xcc)]==='string'?_0x58991b[_0x1c6443(0xcc)]:undefined,_0x3bf321=buildCanonicalProjectConfig({},{'appCodes':[_0xc64175],'env':_0x477c0d||_0x1393fd||_0x1c6443(0xcf),'metadata':{'version':_0xcc41ca,'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x753d92,_0x3bf321),logger[_0x1c6443(0xb0)](_0x356f50),logger[_0x1c6443(0xc5)](_0x1c6443(0xb5),_0x1c6443(0xc0),{'appcode':_0xc64175,'env':_0x3bf321[_0x1c6443(0xcc)],'version':_0x3bf321[_0x1c6443(0xdd)],'configPath':_0x753d92}),console[_0x1c6443(0xda)](a135_0xc8e08a[_0x1c6443(0xb9)](_0x1c6443(0xc8))),console[_0x1c6443(0xda)](a135_0xc8e08a['cyan'](_0x1c6443(0xd4)+Object[_0x1c6443(0xbf)](_0x3bf321[_0x1c6443(0xe0)]||{})[_0x1c6443(0xb6)](',\x20'))),console[_0x1c6443(0xda)](a135_0xc8e08a['cyan'](_0x1c6443(0xbc)+_0x3bf321[_0x1c6443(0xdc)])),console['log'](_0x1c6443(0xb2)+CLI_BIN_NAME+_0x1c6443(0xcb)+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){const _0x3eb89b=a135_0x4030;return input({'message':_0x3eb89b(0xbe),'validate':_0x5b7760=>{const _0x571d33=_0x3eb89b;if(!_0x5b7760[_0x571d33(0xe3)]())return _0x571d33(0xbd);const {valid:_0x14af3f,message:_0x495f83}=validateAppcode(_0x5b7760[_0x571d33(0xe3)]());return _0x14af3f||_0x495f83||_0x571d33(0xd2);}});}function getCliVersionFromPkg(){const _0x47b5f0=a135_0x4030;try{const _0x4b68dd=fileURLToPath(import.meta.url),_0x2e6db0=resolve(dirname(_0x4b68dd),_0x47b5f0(0xb4)),_0x4c417b=JSON[_0x47b5f0(0xc2)](readFileSync(resolve(_0x2e6db0,_0x47b5f0(0xe1)),_0x47b5f0(0xc1)));return _0x4c417b['version']||_0x47b5f0(0xba);}catch{return _0x47b5f0(0xba);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1c6e08,_0x36f892){const _0x1cdc9e=a136_0x3f03,_0x576a12=_0x1c6e08();while(!![]){try{const _0x15c209=-parseInt(_0x1cdc9e(0x79))/0x1*(parseInt(_0x1cdc9e(0x8c))/0x2)+-parseInt(_0x1cdc9e(0xd0))/0x3+-parseInt(_0x1cdc9e(0xc5))/0x4*(-parseInt(_0x1cdc9e(0x7c))/0x5)+-parseInt(_0x1cdc9e(0xe5))/0x6*(-parseInt(_0x1cdc9e(0x86))/0x7)+parseInt(_0x1cdc9e(0x8a))/0x8+-parseInt(_0x1cdc9e(0x8e))/0x9+-parseInt(_0x1cdc9e(0x7e))/0xa;if(_0x15c209===_0x36f892)break;else _0x576a12['push'](_0x576a12['shift']());}catch(_0x458551){_0x576a12['push'](_0x576a12['shift']());}}}(a136_0x1fc7,0xc04a3));function a136_0x1fc7(){const _0x51ce5d=['No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','white','cyan','stringify','not\x20needed','done','329464FUyqIp','inherit','lovrabet/rabetbase\x20installed\x20globally','args','@lovrabet/sdk','[\x22@lovrabet/sdk\x22]:\x20','Remove\x20.lovrabet/','Upgrade\x20cancelled.','isArray','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','2222925SwngmE','hasNewConfig','some','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Config\x20migration','\x20\x20bun\x20install','skipped','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','info','join','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','red','FOUND','bold','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','exit\x20','includes','removed\x20','parse','.cursor/mcp.json','oldMcpConfig','2262ldHRWu','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Step\x204/7:\x20Cleaning\x20MCP\x20config...','Step\x206/7:\x20Installing\x20new\x20skill...','Proceed\x20with\x20upgrade?','\x20\x20Current\x20version\x20in\x20','\x20removed','MCP\x20config:','lovrabet/rabetbase','fields','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','error','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','label','@lovrabet/dataset-mcp-server','CANCEL','\x20→\x20','18KzoZjL','succeed','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','70czNxoA','green','1591170asdejy','oldPath','sdkUpgrade','configMigration','needsSkillSwap','\x20→\x20keys:\x20','not\x20found\x20(will\x20create)','\x20removed\x20(','1421tZihtj','start','@lovrabet/sdk:','yellow','5295824BJDoXl','\x20\x20Step\x20','22570KMdwpH','log','7128qmfSGe','path','latest','Step\x201/7:\x20Migrating\x20config...','status','push','Clean\x20MCP\x20config','\x20→\x20latest','message','detail','keys','Remove\x20legacy\x20artifacts','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','\x20\x20Fields\x20to\x20migrate:\x20','cwd','Upgrade\x20@lovrabet/sdk','undefined','mcpServers','failed','Install\x20new\x20skill','needed','files','object','oldArtifacts','Step\x205/7:\x20Removing\x20old\x20skill...','gray','no\x20legacy\x20entry','Config\x20file:','step','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','\x20\x20npm\x20install','\x20(backup:\x20','Legacy\x20artifacts:','none\x20found','===\x20Upgrade\x20Summary\x20===','lovrabet/lovrabet-skill\x20removed','string','.claude/skills/lovrabet','length','isDirectory','entries','fail','\x20\x20Action:\x20delete','\x20\x20\x20\x20\x20\x20\x20','.bak','no\x20matching\x20entry\x20found','skipped\x20(no\x20legacy\x20config)','utf8','===\x20Upgrade\x20Analysis\x20==='];a136_0x1fc7=function(){return _0x51ce5d;};return a136_0x1fc7();}import a136_0x4a64f5 from'chalk';import a136_0x22ad8a 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';function a136_0x3f03(_0xa3406c,_0x1dc279){_0xa3406c=_0xa3406c-0x6c;const _0x1fc7e2=a136_0x1fc7();let _0x3f0303=_0x1fc7e2[_0xa3406c];return _0x3f0303;}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['filter'](_0x59d448=>_0x59d448!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x224b99){const _0x8ede2d=a136_0x3f03,_0x30a4e7=[];for(const _0x55048e of Object['values'](CORE_IDE_CONFIGS)){if(_0x55048e[_0x8ede2d(0xa3)])for(const _0x4c23e7 of _0x55048e['files']){_0x30a4e7['push'](resolve(_0x224b99,_0x4c23e7[_0x8ede2d(0x8f)]));}}return _0x30a4e7;}function analyse(_0x3d7a63){const _0xa1c99=a136_0x3f03;let _0x253b3d=null;const _0x3f01fd=resolve(_0x3d7a63,NEW_CONFIG_NAME),_0x3bef79=existsSync(_0x3f01fd);for(const _0x2c7659 of LEGACY_CONFIG_NAMES){const _0x407db7=resolve(_0x3d7a63,_0x2c7659);if(existsSync(_0x407db7)){const _0x1306e1=readConfigFile(_0x407db7),_0x4b98ff=Object[_0xa1c99(0x98)](_0x1306e1)['filter'](_0x29aec1=>typeof _0x1306e1[_0x29aec1]!==_0xa1c99(0x9e));_0x253b3d={'oldPath':_0x407db7,'hasNewConfig':_0x3bef79,'fields':_0x4b98ff};break;}}const _0x22956c=[],_0x1f50ae=resolve(_0x3d7a63,'.lovrabet');if(existsSync(_0x1f50ae))_0x22956c['push'](_0x1f50ae);const _0x338658=resolve(_0x3d7a63,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x338658))_0x22956c[_0xa1c99(0x93)](_0x338658);const _0x3a0f8a=resolve(_0x3d7a63,_0xa1c99(0xb3));if(existsSync(_0x3a0f8a))_0x22956c[_0xa1c99(0x93)](_0x3a0f8a);for(const _0x327e02 of collectIdeSkillFiles(_0x3d7a63)){if(existsSync(_0x327e02))_0x22956c['push'](_0x327e02);}let _0x33bc55=null;const _0x352ee1=resolve(_0x3d7a63,_0xa1c99(0xe3));if(existsSync(_0x352ee1))try{const _0x485a13=JSON[_0xa1c99(0xe2)](readFileSync(_0x352ee1,'utf8'));if(_0x485a13?.['mcpServers']&&typeof _0x485a13['mcpServers']===_0xa1c99(0xa4)){const _0x2ee421=[];for(const [_0x490190,_0x27d01c]of Object[_0xa1c99(0xb6)](_0x485a13[_0xa1c99(0x9f)])){const _0x4b233d=_0x27d01c;_0x4b233d?.['args']&&Array['isArray'](_0x4b233d['args'])&&_0x4b233d[_0xa1c99(0xc8)][_0xa1c99(0xd2)](_0x4c9693=>typeof _0x4c9693==='string'&&_0x4c9693[_0xa1c99(0xe0)](_0xa1c99(0x76)))&&_0x2ee421['push'](_0x490190);}_0x2ee421['length']>0x0&&(_0x33bc55={'path':_0x352ee1,'keys':_0x2ee421});}}catch{}const _0x1cdaec=_0x22956c[_0xa1c99(0xb4)]>0x0||_0x253b3d!==null;let _0x13b029=null;const _0x249e50=resolve(_0x3d7a63,'package.json');if(existsSync(_0x249e50))try{const _0x8b1dc3=JSON[_0xa1c99(0xe2)](readFileSync(_0x249e50,_0xa1c99(0xbd)));for(const _0x162ca6 of['dependencies','devDependencies']){const _0x2d0d35=_0x8b1dc3?.[_0x162ca6]?.[_0xa1c99(0xc9)];if(typeof _0x2d0d35===_0xa1c99(0xb2)){_0x2d0d35!=='latest'&&(_0x13b029={'pkgPath':_0x249e50,'currentVersion':_0x2d0d35,'field':_0x162ca6});break;}}}catch{}return{'configMigration':_0x253b3d,'oldArtifacts':_0x22956c,'oldMcpConfig':_0x33bc55,'needsSkillSwap':_0x1cdaec,'sdkUpgrade':_0x13b029};}function printReport(_0x1500b8){const _0x21ee17=a136_0x3f03,{configMigration:_0x4b27d5,oldArtifacts:_0xadc18,oldMcpConfig:_0x16c409,needsSkillSwap:_0x41be5d}=_0x1500b8;console[_0x21ee17(0x8d)](''),console[_0x21ee17(0x8d)](a136_0x4a64f5[_0x21ee17(0xdd)](_0x21ee17(0xbe))),console[_0x21ee17(0x8d)]('');_0x4b27d5?(console[_0x21ee17(0x8d)](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0xa9))+('\x20\x20'+a136_0x4a64f5[_0x21ee17(0x89)](_0x4b27d5['oldPath']))),console[_0x21ee17(0x8d)](_0x21ee17(0xd3)+(_0x4b27d5[_0x21ee17(0xd1)]?a136_0x4a64f5['green']('already\x20exists\x20(will\x20merge)'):a136_0x4a64f5['gray'](_0x21ee17(0x84)))),console[_0x21ee17(0x8d)](_0x21ee17(0x9b)+_0x4b27d5[_0x21ee17(0x70)][_0x21ee17(0xd9)](',\x20')),console[_0x21ee17(0x8d)](_0x21ee17(0xab))):console['log'](a136_0x4a64f5['cyan'](_0x21ee17(0xa9))+'\x20\x20'+a136_0x4a64f5[_0x21ee17(0xa7)]('no\x20legacy\x20config\x20found'));console['log']('');if(_0xadc18['length']>0x0){console['log'](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0xae)));for(const _0x558b9b of _0xadc18){console[_0x21ee17(0x8d)]('\x20\x20'+a136_0x4a64f5[_0x21ee17(0xdb)](_0x21ee17(0xdc))+'\x20\x20'+_0x558b9b);}console[_0x21ee17(0x8d)](_0x21ee17(0xb8));}else console[_0x21ee17(0x8d)](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0xae))+'\x20\x20'+a136_0x4a64f5[_0x21ee17(0xa7)](_0x21ee17(0xaf)));console['log']('');_0x16c409?(console['log'](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0x6e))+('\x20\x20'+a136_0x4a64f5[_0x21ee17(0x89)](_0x16c409[_0x21ee17(0x8f)])+_0x21ee17(0x83)+_0x16c409[_0x21ee17(0x98)][_0x21ee17(0xd9)](',\x20'))),console['log'](_0x21ee17(0xde))):console[_0x21ee17(0x8d)](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0x6e))+'\x20\x20'+a136_0x4a64f5[_0x21ee17(0xa7)](_0x21ee17(0xa8)));console[_0x21ee17(0x8d)](''),console['log'](a136_0x4a64f5['cyan']('Skill\x20swap:')+('\x20\x20'+(_0x41be5d?a136_0x4a64f5['yellow'](_0x21ee17(0xa2)):a136_0x4a64f5[_0x21ee17(0x7d)](_0x21ee17(0xc3)))));_0x41be5d&&console['log'](_0x21ee17(0xce)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x21ee17(0x8d)]('');if(_0x1500b8[_0x21ee17(0x80)]){const {currentVersion:_0x50d141,field:_0x181fbd,pkgPath:_0x7119ad}=_0x1500b8[_0x21ee17(0x80)];console[_0x21ee17(0x8d)](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0x88))+('\x20\x20'+a136_0x4a64f5[_0x21ee17(0x89)](_0x7119ad))),console['log'](_0x21ee17(0x6c)+_0x181fbd+':\x20'+a136_0x4a64f5['yellow'](_0x50d141)+_0x21ee17(0x78)+a136_0x4a64f5[_0x21ee17(0x7d)](_0x21ee17(0x90))),console[_0x21ee17(0x8d)](_0x21ee17(0xd7));}else console['log'](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0x88))+'\x20\x20'+a136_0x4a64f5[_0x21ee17(0xa7)]('not\x20found\x20or\x20already\x20at\x20latest'));console[_0x21ee17(0x8d)]('');}function execConfigMigration(_0x44986d,_0x3b67dd){const _0x27d5db=a136_0x3f03,{configMigration:_0x403029}=_0x44986d;if(!_0x403029?.['oldPath'])return{'step':0x1,'label':_0x27d5db(0xd4),'ok':!![],'detail':_0x27d5db(0xbc)};const _0x5740d9=readConfigFile(_0x403029[_0x27d5db(0x7f)]),_0x229ba9=resolve(_0x3b67dd,NEW_CONFIG_NAME),_0x2dac1c=_0x403029[_0x27d5db(0xd1)]?readConfigFile(_0x229ba9):{};for(const [_0x1b58ea,_0x586176]of Object[_0x27d5db(0xb6)](_0x5740d9)){!(_0x1b58ea in _0x2dac1c)&&(_0x2dac1c[_0x1b58ea]=_0x586176);}writeConfigFile(_0x229ba9,_0x2dac1c);const _0x1ec85c=_0x403029[_0x27d5db(0x7f)]+_0x27d5db(0xba);return renameSync(_0x403029['oldPath'],_0x1ec85c),{'step':0x1,'label':_0x27d5db(0xd4),'ok':!![],'detail':_0x403029[_0x27d5db(0x7f)]+_0x27d5db(0x78)+_0x229ba9+_0x27d5db(0xad)+_0x1ec85c+')'};}function execRemoveOldArtifacts(_0x2216e3){const _0x5dc336=a136_0x3f03,_0x215f65=[];for(const _0x5ed12b of _0x2216e3){try{if(!existsSync(_0x5ed12b))continue;const _0x40343f=tryStat(_0x5ed12b);_0x40343f?.[_0x5dc336(0xb5)]()?rmSync(_0x5ed12b,{'recursive':!![],'force':!![]}):unlinkSync(_0x5ed12b);}catch(_0x4c4bc2){_0x215f65['push'](_0x5ed12b+':\x20'+_0x4c4bc2[_0x5dc336(0x96)]);}}return{'step':0x3,'label':_0x5dc336(0x99),'ok':_0x215f65['length']===0x0,'detail':_0x215f65[_0x5dc336(0xb4)]>0x0?_0x2216e3[_0x5dc336(0xb4)]-_0x215f65[_0x5dc336(0xb4)]+'/'+_0x2216e3[_0x5dc336(0xb4)]+_0x5dc336(0x85)+_0x215f65[_0x5dc336(0xd9)](';\x20')+')':_0x2216e3[_0x5dc336(0xb4)]+_0x5dc336(0x6d)};}function execCleanMcp(_0x54b726){const _0x27c595=a136_0x3f03;if(!_0x54b726[_0x27c595(0xe4)])return{'step':0x4,'label':_0x27c595(0x94),'ok':!![],'detail':_0x27c595(0xd6)};try{const _0x10e638=readFileSync(_0x54b726[_0x27c595(0xe4)][_0x27c595(0x8f)],_0x27c595(0xbd)),_0x22b2f5=JSON[_0x27c595(0xe2)](_0x10e638);if(_0x22b2f5?.[_0x27c595(0x9f)]&&typeof _0x22b2f5[_0x27c595(0x9f)]==='object'){const _0x548ba4=[];for(const [_0x3c2113,_0xe09019]of Object[_0x27c595(0xb6)](_0x22b2f5['mcpServers'])){_0xe09019?.[_0x27c595(0xc8)]&&Array[_0x27c595(0xcd)](_0xe09019[_0x27c595(0xc8)])&&_0xe09019[_0x27c595(0xc8)][_0x27c595(0xd2)](_0x81fc63=>typeof _0x81fc63==='string'&&_0x81fc63[_0x27c595(0xe0)](_0x27c595(0x76)))&&_0x548ba4[_0x27c595(0x93)](_0x3c2113);}for(const _0x383f46 of _0x548ba4){delete _0x22b2f5[_0x27c595(0x9f)][_0x383f46];}return _0x548ba4['length']>0x0&&writeFileSync(_0x54b726['oldMcpConfig']['path'],JSON[_0x27c595(0xc2)](_0x22b2f5,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x27c595(0x94),'ok':!![],'detail':_0x27c595(0xe1)+_0x548ba4[_0x27c595(0xd9)](',\x20')+'\x20from\x20'+_0x54b726['oldMcpConfig'][_0x27c595(0x8f)]};}return{'step':0x4,'label':_0x27c595(0x94),'ok':!![],'detail':_0x27c595(0xbb)};}catch(_0x597a8e){return{'step':0x4,'label':_0x27c595(0x94),'ok':![],'detail':_0x597a8e[_0x27c595(0x96)]};}}function execSkillsRemove(_0x73fd43,_0x2618a5){const _0x74b6a1=a136_0x3f03,_0x6b5b3f=runNpxSkillsRemove(_0x73fd43,{'stdio':_0x74b6a1(0xc6),'yes':_0x2618a5});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x6b5b3f['ok'],'detail':_0x6b5b3f['ok']?_0x74b6a1(0xb1):_0x6b5b3f['error']??_0x74b6a1(0xdf)+_0x6b5b3f[_0x74b6a1(0x92)]};}function execSkillsAdd(_0x44706e,_0x4ae3fb){const _0x242d0c=a136_0x3f03,_0x2fa62f=runNpxSkillsAddGlobal(_0x44706e,_0x242d0c(0x6f),{'stdio':'inherit','yes':_0x4ae3fb});return{'step':0x6,'label':_0x242d0c(0xa1),'ok':_0x2fa62f['ok'],'detail':_0x2fa62f['ok']?_0x242d0c(0xc7):_0x2fa62f[_0x242d0c(0x72)]??_0x242d0c(0xdf)+_0x2fa62f['status']};}function execUpgradeSdk(_0x3fd3be){const _0xf9d79d=a136_0x3f03;if(!_0x3fd3be['sdkUpgrade'])return{'step':0x7,'label':_0xf9d79d(0x9d),'ok':!![],'detail':_0xf9d79d(0x71)};const {pkgPath:_0x4cbee7,currentVersion:_0x2cabd5,field:_0x423a09}=_0x3fd3be[_0xf9d79d(0x80)];try{const _0x30defa=readFileSync(_0x4cbee7,_0xf9d79d(0xbd)),_0x145880=JSON[_0xf9d79d(0xe2)](_0x30defa);return _0x145880[_0x423a09][_0xf9d79d(0xc9)]=_0xf9d79d(0x90),writeFileSync(_0x4cbee7,JSON[_0xf9d79d(0xc2)](_0x145880,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':_0xf9d79d(0x9d),'ok':!![],'detail':_0x423a09+_0xf9d79d(0xca)+_0x2cabd5+_0xf9d79d(0x95)};}catch(_0x5695f5){return{'step':0x7,'label':_0xf9d79d(0x9d),'ok':![],'detail':_0x5695f5[_0xf9d79d(0x96)]};}}function tryStat(_0x236f56){try{return statSync(_0x236f56);}catch{return undefined;}}function printSummary(_0x238d99){const _0x1a9b45=a136_0x3f03;console[_0x1a9b45(0x8d)](''),console['log'](a136_0x4a64f5['bold'](_0x1a9b45(0xb0))),console[_0x1a9b45(0x8d)]('');for(const _0x26019c of _0x238d99){const _0x5a0638=_0x26019c['ok']?a136_0x4a64f5[_0x1a9b45(0x7d)]('OK'):a136_0x4a64f5[_0x1a9b45(0xdb)]('FAIL');console[_0x1a9b45(0x8d)]('\x20\x20'+_0x5a0638+_0x1a9b45(0x8b)+_0x26019c[_0x1a9b45(0xaa)]+':\x20'+_0x26019c[_0x1a9b45(0x75)]);if(_0x26019c['detail'])console['log'](_0x1a9b45(0xb9)+a136_0x4a64f5[_0x1a9b45(0xa7)](_0x26019c['detail']));}console[_0x1a9b45(0x8d)]('');}export async function upgradeApp(_0x17e281,_0x2a9c39){const _0x3aa96d=a136_0x3f03,_0x484e92=process[_0x3aa96d(0x9c)](),_0x721220=analyse(_0x484e92),_0x584fd4=!_0x721220[_0x3aa96d(0x81)]&&_0x721220[_0x3aa96d(0xa5)][_0x3aa96d(0xb4)]===0x0&&!_0x721220['oldMcpConfig']&&!_0x721220[_0x3aa96d(0x82)]&&!_0x721220[_0x3aa96d(0x80)];if(_0x584fd4){console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0x7d)](_0x3aa96d(0xbf)));return;}printReport(_0x721220);const _0x33158e=!!(_0x2a9c39['yes']||_0x2a9c39['Y']||_0x17e281);if(!_0x33158e)try{const _0x17bb18=await askConfirm(_0x3aa96d(0xea));if(!_0x17bb18){console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0xa7)]('Upgrade\x20cancelled.'));return;}}catch(_0x2ab837){if(_0x2ab837?.[_0x3aa96d(0x96)]===_0x3aa96d(0x77)){console[_0x3aa96d(0x8d)](a136_0x4a64f5['gray'](_0x3aa96d(0xcc)));return;}throw _0x2ab837;}const _0x113645=[],_0x5bb351=a136_0x22ad8a({'text':_0x3aa96d(0x91),'color':_0x3aa96d(0xc1)})[_0x3aa96d(0x87)](),_0x554782=execConfigMigration(_0x721220,_0x484e92);_0x113645['push'](_0x554782),_0x5bb351[_0x554782['ok']?_0x3aa96d(0x7a):_0x3aa96d(0xb7)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x554782[_0x3aa96d(0x97)]??(_0x554782['ok']?'done':'failed')));const _0x22d164=resolve(_0x484e92,'.lovrabet'),_0xba2204=a136_0x22ad8a({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':'cyan'})[_0x3aa96d(0x87)]();if(existsSync(_0x22d164))try{rmSync(_0x22d164,{'recursive':!![],'force':!![]}),_0xba2204[_0x3aa96d(0x7a)](_0x3aa96d(0x73)),_0x113645[_0x3aa96d(0x93)]({'step':0x2,'label':_0x3aa96d(0xcb),'ok':!![]});}catch(_0x219f5d){_0xba2204[_0x3aa96d(0xb7)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x219f5d[_0x3aa96d(0x96)]),_0x113645[_0x3aa96d(0x93)]({'step':0x2,'label':_0x3aa96d(0xcb),'ok':![],'detail':_0x219f5d['message']});}else _0xba2204[_0x3aa96d(0xd8)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x113645[_0x3aa96d(0x93)]({'step':0x2,'label':_0x3aa96d(0xcb),'ok':!![],'detail':_0x3aa96d(0xd6)});const _0x35720d=a136_0x22ad8a({'text':_0x3aa96d(0xe6),'color':_0x3aa96d(0xc1)})[_0x3aa96d(0x87)](),_0x2c440d=execRemoveOldArtifacts(_0x721220[_0x3aa96d(0xa5)]);_0x113645['push'](_0x2c440d),_0x35720d[_0x2c440d['ok']?_0x3aa96d(0x7a):_0x3aa96d(0xb7)](_0x3aa96d(0x9a)+(_0x2c440d[_0x3aa96d(0x97)]??(_0x2c440d['ok']?'done':_0x3aa96d(0xa0))));const _0x2249c2=a136_0x22ad8a({'text':_0x3aa96d(0xe8),'color':_0x3aa96d(0xc1)})[_0x3aa96d(0x87)](),_0x4996d6=execCleanMcp(_0x721220);_0x113645['push'](_0x4996d6),_0x2249c2[_0x4996d6['ok']?_0x3aa96d(0x7a):_0x3aa96d(0xb7)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x4996d6['detail']??(_0x4996d6['ok']?_0x3aa96d(0xc4):_0x3aa96d(0xa0))));const _0x3ed1bd=a136_0x22ad8a({'text':_0x3aa96d(0xa6),'color':_0x3aa96d(0xc1)})[_0x3aa96d(0x87)](),_0x3b6bf5=execSkillsRemove(_0x484e92,_0x33158e);_0x113645[_0x3aa96d(0x93)](_0x3b6bf5),_0x3ed1bd[_0x3b6bf5['ok']?_0x3aa96d(0x7a):_0x3aa96d(0xb7)](_0x3aa96d(0xcf)+(_0x3b6bf5[_0x3aa96d(0x97)]??(_0x3b6bf5['ok']?'done':_0x3aa96d(0xa0))));const _0x3d8d32=a136_0x22ad8a({'text':_0x3aa96d(0xe9),'color':'cyan'})[_0x3aa96d(0x87)](),_0x3c82cc=execSkillsAdd(_0x484e92,_0x33158e);_0x113645[_0x3aa96d(0x93)](_0x3c82cc),_0x3d8d32[_0x3c82cc['ok']?_0x3aa96d(0x7a):'fail'](_0x3aa96d(0xda)+(_0x3c82cc[_0x3aa96d(0x97)]??(_0x3c82cc['ok']?_0x3aa96d(0xc4):_0x3aa96d(0xa0))));const _0xc6a4d9=a136_0x22ad8a({'text':_0x3aa96d(0x7b),'color':_0x3aa96d(0xc1)})['start'](),_0x20b237=execUpgradeSdk(_0x721220);_0x113645['push'](_0x20b237),_0xc6a4d9[_0x20b237['ok']?'succeed':'fail']('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x20b237['detail']??(_0x20b237['ok']?_0x3aa96d(0xc4):'failed'))),printSummary(_0x113645);const _0x59944b=_0x113645[_0x3aa96d(0xd2)](_0xce1a65=>!_0xce1a65['ok']);_0x59944b?console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0x89)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0x7d)]('Upgrade\x20completed\x20successfully!')),_0x20b237['ok']&&_0x721220[_0x3aa96d(0x80)]&&(console[_0x3aa96d(0x8d)](''),console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0xdd)][_0x3aa96d(0xc1)](_0x3aa96d(0xe7))),console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0xc1)](_0x3aa96d(0x74))),console[_0x3aa96d(0x8d)](''),console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0xc0)](_0x3aa96d(0xac))),console['log'](a136_0x4a64f5['white']('\x20\x20#\x20or')),console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0xc0)](_0x3aa96d(0xd5))),console[_0x3aa96d(0x8d)](''));}
|
|
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)](''));}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x38748f=a137_0x576b;(function(_0x57298b,_0x44517a){const _0x5b467a=a137_0x576b,_0x1c6df3=_0x57298b();while(!![]){try{const _0x5120df=parseInt(_0x5b467a(0xb2))/0x1*(-parseInt(_0x5b467a(0x94))/0x2)+parseInt(_0x5b467a(0x96))/0x3+parseInt(_0x5b467a(0x87))/0x4*(parseInt(_0x5b467a(0xab))/0x5)+parseInt(_0x5b467a(0xb9))/0x6*(-parseInt(_0x5b467a(0x92))/0x7)+-parseInt(_0x5b467a(0xb5))/0x8+-parseInt(_0x5b467a(0xae))/0x9*(-parseInt(_0x5b467a(0x9b))/0xa)+-parseInt(_0x5b467a(0x9a))/0xb;if(_0x5120df===_0x44517a)break;else _0x1c6df3['push'](_0x1c6df3['shift']());}catch(_0x1dd017){_0x1c6df3['push'](_0x1c6df3['shift']());}}}(a137_0x472e,0x589ba));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 a137_0x576b(_0x11b59c,_0x415089){_0x11b59c=_0x11b59c-0x78;const _0x472ea0=a137_0x472e();let _0x576bb1=_0x472ea0[_0x11b59c];return _0x576bb1;}function registerDefinitions(_0x1a5e57){const _0x521a97=a137_0x576b;for(const _0x512769 of _0x1a5e57){definitions[_0x521a97(0x97)](_0x512769[_0x521a97(0xba)]+':'+_0x512769[_0x521a97(0x80)],_0x512769);let _0x5c3c00=serviceGroups['get'](_0x512769[_0x521a97(0xba)]);!_0x5c3c00&&(_0x5c3c00=[],serviceGroups[_0x521a97(0x97)](_0x512769['service'],_0x5c3c00)),_0x5c3c00[_0x521a97(0xa9)](_0x512769);}}function registerDeclarativeService(_0x12b42a,_0x1dd033,_0x402339){const _0x124d63=a137_0x576b;registerDefinitions(_0x1dd033);_0x402339?.[_0x124d63(0x8b)]&®isterDefinitions([_0x402339[_0x124d63(0x8b)]]);const _0x5599db=_0x5344f5=>_0x5344f5==='read'?'':_0x5344f5===_0x124d63(0xbb)?'\x20\x20[write]':_0x124d63(0x9e),_0x48f006={'service':_0x1dd033[0x0][_0x124d63(0xba)],'label':_0x12b42a,'commands':_0x1dd033[_0x124d63(0x9c)](_0x514c9d=>!_0x514c9d[_0x124d63(0x8f)])['map'](_0x9a05bd=>({'command':_0x9a05bd[_0x124d63(0x80)],'description':_0x9a05bd[_0x124d63(0x8d)],'tag':_0x5599db(_0x9a05bd[_0x124d63(0xb6)])})),'declarative':!![],'defaultCommand':_0x402339?.[_0x124d63(0x85)]??(_0x402339?.[_0x124d63(0x79)]?_0x1dd033[0x0]['command']:undefined),'wildcardDef':_0x402339?.[_0x124d63(0x8b)],'isSingleCommand':_0x402339?.[_0x124d63(0x79)]};serviceRegistry[_0x124d63(0xa9)](_0x48f006),serviceByName[_0x124d63(0x97)](_0x48f006[_0x124d63(0xba)],_0x48f006);}registerDeclarativeService(a137_0x38748f(0xa4),initDefinitions,{'defaultCommand':'run','isSingleCommand':!![]}),registerDeclarativeService('Project',projectDefinitions),registerDeclarativeService(a137_0x38748f(0xad),workspaceDefinitions),registerDeclarativeService(a137_0x38748f(0x88),appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a137_0x38748f(0x7b)}),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService('Smart\x20List\x20Pages',pageDefinitions),registerDeclarativeService(a137_0x38748f(0xb7),apiDefinitions),registerDeclarativeService(a137_0x38748f(0xb4),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a137_0x38748f(0x8a),sqlDefinitions),registerDeclarativeService(a137_0x38748f(0x90),dbDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a137_0x38748f(0x98),permitDefinitions),registerDeclarativeService(a137_0x38748f(0x82),appConfigDefinitions),registerDeclarativeService(a137_0x38748f(0xa7),issueDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a137_0x38748f(0xb3),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a137_0x38748f(0x93),cliSkillDefinitions,{'defaultCommand':a137_0x38748f(0x7e)}),registerDeclarativeService(a137_0x38748f(0x86),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a137_0x38748f(0x84),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a137_0x38748f(0xaa)]=[{'command':'<script>','description':a137_0x38748f(0x81),'tag':''}];}export const deprecatedAliases={'create':{'service':a137_0x38748f(0x8e),'command':a137_0x38748f(0x9d)},'start':{'service':a137_0x38748f(0xb8),'command':a137_0x38748f(0x7f)},'build':{'service':a137_0x38748f(0xb8),'command':a137_0x38748f(0x7a)},'preview':{'service':a137_0x38748f(0xb8),'command':a137_0x38748f(0xa0)},'logout':{'service':'auth','command':a137_0x38748f(0x83)}};const CLI_SKILL_INSTALL_REMOVED_HINT=a137_0x38748f(0x89),APP_REMOTE_REMOVED_HINT=a137_0x38748f(0xb1),APP_USE_REMOVED_HINT=a137_0x38748f(0x8c);export function resolveRemovedCommand(_0x1e291a,_0x4b431c){const _0x1a803f=a137_0x38748f;if(_0x1e291a===_0x1a803f(0x99)){const _0x260c38=_0x4b431c?_0x1a803f(0x95)+_0x4b431c:_0x1a803f(0x99);return{'command':_0x260c38,'message':_0x1a803f(0xa3)+_0x260c38+_0x1a803f(0xa5),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x1e291a===_0x1a803f(0xaf))return{'command':_0x1a803f(0xaf),'message':'`rabetbase\x20skills`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x1e291a==='app'&&_0x4b431c===_0x1a803f(0x78))return{'command':_0x1a803f(0xa8),'message':_0x1a803f(0xa2),'hint':APP_REMOTE_REMOVED_HINT};if(_0x1e291a===_0x1a803f(0x7d)&&_0x4b431c===_0x1a803f(0xb0))return{'command':_0x1a803f(0xa1),'message':_0x1a803f(0xa6),'hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':a137_0x38748f(0x9d)},'sql':{'new':a137_0x38748f(0x9d)}};export function resolveDeprecatedSubcommand(_0x3af839,_0x509cda){return deprecatedSubcommands[_0x3af839]?.[_0x509cda];}function a137_0x472e(){const _0x189bec=['Logs','32xvpmcl','App\x20Management','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','SQL\x20Queries','wildcardDef','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','description','project','hidden','Database\x20Connections','get','14NupRHU','CLI\x20Built-in\x20Skill','170IgfISm','skill\x20','1678656dZfsGC','set','Permissions','skill','6058481yFsPzj','104110lLYkUK','filter','create','\x20\x20[high-risk-write]','from','preview','app\x20use','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','`rabetbase\x20','Quick\x20Start','`\x20has\x20been\x20removed.','`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','Platform\x20Issue','app\x20remote','push','commands','354620eQoVjC','has','Workspace','423DGeozf','skills','use','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','6127LkagpL','Self\x20Update','Instant\x20API','443512vTHKEj','risk','API\x20Development','run','378954ZwcmGq','service','write','remote','isSingleCommand','build','login','values','app','install','start','command','Run\x20any\x20package.json\x20script','Runtime\x20App\x20Config\x20Management','logout','Run\x20Scripts','defaultCommand'];a137_0x472e=function(){return _0x189bec;};return a137_0x472e();}export function findDefinition(_0x30792b,_0x2fec08){const _0x20ea95=a137_0x38748f;return definitions[_0x20ea95(0x91)](_0x30792b+':'+_0x2fec08);}export function isKnownService(_0x381c35){const _0x187381=a137_0x38748f;return serviceByName[_0x187381(0xac)](_0x381c35);}export function isDeclarativeService(_0x43ee06){const _0x1ca742=a137_0x38748f;return serviceGroups[_0x1ca742(0xac)](_0x43ee06)||serviceByName[_0x1ca742(0x91)](_0x43ee06)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x4d560e){const _0x22c89a=a137_0x38748f;return serviceByName[_0x22c89a(0x91)](_0x4d560e);}export function getLegacyHandler(_0x497472,_0x245d79){return undefined;}export function getAllDefinitions(){const _0x1abd80=a137_0x38748f;return Array[_0x1abd80(0x9f)](definitions[_0x1abd80(0x7c)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a138_0x172531=a138_0x3743;function a138_0x3743(_0x4c63bb,_0x45db7b){_0x4c63bb=_0x4c63bb-0x1e3;const _0x2c8a7f=a138_0x2c8a();let _0x374319=_0x2c8a7f[_0x4c63bb];return _0x374319;}(function(_0xc8b7c4,_0x26ea04){const _0x396d9d=a138_0x3743,_0x1292b0=_0xc8b7c4();while(!![]){try{const _0x27a3dd=parseInt(_0x396d9d(0x1ec))/0x1+-parseInt(_0x396d9d(0x1ef))/0x2*(parseInt(_0x396d9d(0x1f0))/0x3)+parseInt(_0x396d9d(0x1f8))/0x4*(parseInt(_0x396d9d(0x1f6))/0x5)+-parseInt(_0x396d9d(0x1f5))/0x6*(-parseInt(_0x396d9d(0x1e9))/0x7)+-parseInt(_0x396d9d(0x1e6))/0x8*(-parseInt(_0x396d9d(0x1e7))/0x9)+-parseInt(_0x396d9d(0x1fa))/0xa*(parseInt(_0x396d9d(0x1f1))/0xb)+-parseInt(_0x396d9d(0x1e4))/0xc;if(_0x27a3dd===_0x26ea04)break;else _0x1292b0['push'](_0x1292b0['shift']());}catch(_0x3dfd85){_0x1292b0['push'](_0x1292b0['shift']());}}}(a138_0x2c8a,0xb96dc));import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';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='/smartapi/permit/role/create';function readName(_0x4e91f6){const _0x2630be=a138_0x3743,_0x1d7d8d=_0x4e91f6[_0x2630be(0x1f7)]('name')[_0x2630be(0x1ee)]();if(!_0x1d7d8d)throw CliErrors[_0x2630be(0x1ea)]('name',_0x2630be(0x1eb));if(_0x1d7d8d[_0x2630be(0x1f2)]>0x40)throw CliErrors['validation']('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');return _0x1d7d8d;}function a138_0x2c8a(){const _0x1c318e=['appCode','8159610XOtBVA','5HJdkvo','str','4475468pPPvsF','remark','10oplZeV','POST','34039932KmqGpb','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','24rOTZMC','2305683iBPmsw','roleName','7oKRqcl','flagMissing','Pass\x20--name\x20<roleName>.','1407784fFMPjJ','create','trim','2gJWazK','1390506cRPmJy','6550148MiyPdM','length','role'];a138_0x2c8a=function(){return _0x1c318e;};return a138_0x2c8a();}export const roleCreate={'service':a138_0x172531(0x1f3),'command':a138_0x172531(0x1ed),'description':a138_0x172531(0x1e5),'risk':'write','flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x22b4fb){readName(_0x22b4fb);},async 'dryRun'(_0x22064b){const _0x808744=a138_0x172531,_0x478944=readName(_0x22064b),_0x893c2c=_0x22064b[_0x808744(0x1f7)]('remark')[_0x808744(0x1ee)]()||undefined;return asDryRunResult({'operation':_0x808744(0x1ed),'selector':{'appCode':_0x22064b[_0x808744(0x1f4)],'roleName':_0x478944},'before':null,'after':{'roleName':_0x478944,'roleType':'CUSTOM','remark':_0x893c2c},'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[]},{'method':_0x808744(0x1e3),'url':CREATE_PATH});},async 'execute'(_0x3f3801){const _0x5d8bc9=a138_0x172531,_0x18bf6a=readName(_0x3f3801),_0x39cfc9=_0x3f3801['str'](_0x5d8bc9(0x1f9))[_0x5d8bc9(0x1ee)]()||undefined,_0x401de3=await createAppRole({'appCode':_0x3f3801[_0x5d8bc9(0x1f4)],'roleName':_0x18bf6a,..._0x39cfc9?{'remark':_0x39cfc9}:{}});return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x3f3801[_0x5d8bc9(0x1f4)],'roleId':_0x401de3['id'],'roleName':_0x18bf6a},'before':null,'after':projectRole(_0x401de3),'dryRun':![],'backend':{'method':_0x5d8bc9(0x1e3),'path':CREATE_PATH},'warnings':[]},'message':'Created\x20role\x20'+_0x401de3[_0x5d8bc9(0x1e8)]+'\x20(id='+_0x401de3['id']+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a139_0x3c28f5=a139_0xea33;(function(_0x14693c,_0xe35f3e){const _0x49a769=a139_0xea33,_0x30e6c2=_0x14693c();while(!![]){try{const _0x127aab=parseInt(_0x49a769(0xa3))/0x1*(-parseInt(_0x49a769(0x9b))/0x2)+-parseInt(_0x49a769(0x94))/0x3+-parseInt(_0x49a769(0x9d))/0x4+-parseInt(_0x49a769(0xa4))/0x5*(-parseInt(_0x49a769(0x9c))/0x6)+-parseInt(_0x49a769(0x95))/0x7+parseInt(_0x49a769(0x9f))/0x8+parseInt(_0x49a769(0x99))/0x9;if(_0x127aab===_0xe35f3e)break;else _0x30e6c2['push'](_0x30e6c2['shift']());}catch(_0x47d093){_0x30e6c2['push'](_0x30e6c2['shift']());}}}(a139_0x2ab9,0xcd7c6));function a139_0xea33(_0x40bf8b,_0x436673){_0x40bf8b=_0x40bf8b-0x92;const _0x2ab9ef=a139_0x2ab9();let _0xea337d=_0x2ab9ef[_0x40bf8b];return _0xea337d;}function a139_0x2ab9(){const _0x3c4f90=['Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','1yUrDJQ','7505705FNMkDp','appCode','POST','num','1496301pkZjYp','3730916VfMDJq','roleName','Role\x20still\x20has\x20','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','10008162xWUuOu','delete','503578AVLtSi','6gseMcy','3979116yiudXl','userCount','4054672amQslg','Deleted\x20role\x20','high-risk-write'];a139_0x2ab9=function(){return _0x3c4f90;};return a139_0x2ab9();}import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':'role','command':a139_0x3c28f5(0x9a),'description':a139_0x3c28f5(0xa2),'risk':a139_0x3c28f5(0xa1),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x115509){const _0x3e7b5a=a139_0x3c28f5,_0x3dc47a=_0x115509['num']('id'),_0x4e6857=await getRoleById(_0x115509[_0x3e7b5a(0xa5)],_0x3dc47a);return assertCustomRole(_0x4e6857,'delete'),asDryRunResult({'operation':_0x3e7b5a(0x9a),'selector':{'appCode':_0x115509['appCode'],'roleId':_0x3dc47a,'roleName':_0x4e6857[_0x3e7b5a(0x96)]},'before':projectRole(_0x4e6857),'after':null,'dryRun':!![],'backend':{'method':_0x3e7b5a(0x92),'path':DELETE_PATH},'warnings':_0x4e6857[_0x3e7b5a(0x9e)]>0x0?[_0x3e7b5a(0x97)+_0x4e6857['userCount']+_0x3e7b5a(0x98)]:[]},{'method':_0x3e7b5a(0x92),'url':DELETE_PATH});},async 'execute'(_0xfda67e){const _0x10ddef=a139_0x3c28f5,_0xc9b3cd=_0xfda67e[_0x10ddef(0x93)]('id'),_0x1b1c6a=await getRoleById(_0xfda67e[_0x10ddef(0xa5)],_0xc9b3cd);return assertCustomRole(_0x1b1c6a,_0x10ddef(0x9a)),await deleteAppRole(_0xc9b3cd),{'ok':!![],'data':{'operation':'delete','selector':{'appCode':_0xfda67e['appCode'],'roleId':_0xc9b3cd,'roleName':_0x1b1c6a[_0x10ddef(0x96)]},'before':projectRole(_0x1b1c6a),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x10ddef(0xa0)+_0x1b1c6a[_0x10ddef(0x96)]+'\x20(id='+_0xc9b3cd+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a140_0x5981c9=a140_0x2762;(function(_0x2201dd,_0x25812d){const _0x379486=a140_0x2762,_0x4eb952=_0x2201dd();while(!![]){try{const _0x3172e9=-parseInt(_0x379486(0x7e))/0x1+-parseInt(_0x379486(0x7b))/0x2+parseInt(_0x379486(0x7f))/0x3*(-parseInt(_0x379486(0x79))/0x4)+-parseInt(_0x379486(0x81))/0x5+-parseInt(_0x379486(0x85))/0x6*(-parseInt(_0x379486(0x7c))/0x7)+parseInt(_0x379486(0x84))/0x8*(parseInt(_0x379486(0x80))/0x9)+-parseInt(_0x379486(0x88))/0xa*(-parseInt(_0x379486(0x7a))/0xb);if(_0x3172e9===_0x25812d)break;else _0x4eb952['push'](_0x4eb952['shift']());}catch(_0x4fe29e){_0x4eb952['push'](_0x4eb952['shift']());}}}(a140_0x4327,0x2bed1));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a140_0x2762(_0x3e6d57,_0xd63879){_0x3e6d57=_0x3e6d57-0x79;const _0x43279b=a140_0x4327();let _0x2762c1=_0x43279b[_0x3e6d57];return _0x2762c1;}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a140_0x5981c9(0x7d),'command':a140_0x5981c9(0x82),'description':a140_0x5981c9(0x89),'risk':a140_0x5981c9(0x8a),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x42543a){const _0xb91d9d=a140_0x5981c9,_0x1973c4=_0x42543a[_0xb91d9d(0x87)]('id'),_0x20baea=await getRoleById(_0x42543a[_0xb91d9d(0x83)],_0x1973c4);return{'ok':!![],'data':{'role':projectRole(_0x20baea)},'message':'Role\x20'+_0x20baea['roleName']+'\x20('+_0x20baea[_0xb91d9d(0x86)]+')'};}};function a140_0x4327(){const _0x59f1c1=['356210zlribg','14084ZxVIAC','role','132864TQCVfu','335109RUwBia','63czKKyZ','651925qZBCQG','detail','appCode','197488udJwih','1056Bxnhan','roleType','num','670uVthBG','Show\x20a\x20single\x20role\x27s\x20detail','read','12dnatlb','70510NPNKoX'];a140_0x4327=function(){return _0x59f1c1;};return a140_0x4327();}
|