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