@lovrabet/rabetbase-cli 2.3.13-beta.1 → 2.3.13-beta.3
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/README.md +1 -1
- 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/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/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/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/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/asset-update.js +1 -0
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -0
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.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/task/index.js +1 -1
- package/lib/commands/task/status.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-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.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
- package/lib/commands/menu/update.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x227371,_0x5bfbae){const _0x32f355=a146_0x3672,_0x279df4=_0x227371();while(!![]){try{const _0x2a67db=parseInt(_0x32f355(0x9d))/0x1+parseInt(_0x32f355(0x89))/0x2*(parseInt(_0x32f355(0x80))/0x3)+-parseInt(_0x32f355(0x78))/0x4*(parseInt(_0x32f355(0x70))/0x5)+parseInt(_0x32f355(0x7f))/0x6+parseInt(_0x32f355(0x8b))/0x7*(parseInt(_0x32f355(0x9a))/0x8)+parseInt(_0x32f355(0x9e))/0x9+-parseInt(_0x32f355(0x8f))/0xa;if(_0x2a67db===_0x5bfbae)break;else _0x279df4['push'](_0x279df4['shift']());}catch(_0x65cf74){_0x279df4['push'](_0x279df4['shift']());}}}(a146_0x3a2a,0x79f90));import a146_0xa43529 from'path';import a146_0x500c52 from'fs/promises';import{existsSync}from'fs';function a146_0x3672(_0x27c1b4,_0x1ff8ea){_0x27c1b4=_0x27c1b4-0x6b;const _0x3a2aee=a146_0x3a2a();let _0x3672b9=_0x3a2aee[_0x27c1b4];return _0x3672b9;}import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x37a756,_0xf855b9,_0xb83759,_0x2fdbc7){const _0x2bebf3=a146_0x3672,_0x304581=await checkCliVersion();(_0x304581[_0x2bebf3(0x7c)]||_0x304581[_0x2bebf3(0x9b)])&&(printCliUpgradeWarning(_0x304581),assertCliVersionSupported(_0x304581));if(!_0x37a756||_0x37a756[_0x2bebf3(0x6d)]()==='')throw CliErrors[_0x2bebf3(0x87)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x59802a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x59802a[_0x2bebf3(0x86)](_0x37a756))throw CliErrors[_0x2bebf3(0x87)](_0x2bebf3(0x88),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x37a756[_0x2bebf3(0x84)]>0x64)throw CliErrors[_0x2bebf3(0x87)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x581ab6=a146_0xa43529['resolve'](process[_0x2bebf3(0x7d)](),_0x37a756);if(existsSync(_0x581ab6))throw CliErrors[_0x2bebf3(0x87)](_0x2bebf3(0x6f)+_0x37a756+_0x2bebf3(0x8e),_0x2bebf3(0xa4));try{const _0x2ae858=a146_0xa43529[_0x2bebf3(0x94)](_0x581ab6);await a146_0x500c52['access'](_0x2ae858,a146_0x500c52[_0x2bebf3(0x72)][_0x2bebf3(0x74)]);}catch{throw CliErrors[_0x2bebf3(0x87)](_0x2bebf3(0x9c),_0x2bebf3(0x96));}try{console['log'](_0x2bebf3(0x76)+_0x37a756+_0x2bebf3(0x97));const _0x24509d=getSubAppReactDemoTemplateDir();await copyDirectory(_0x24509d,_0x581ab6),console[_0x2bebf3(0x93)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x37a756),console[_0x2bebf3(0x93)]('\x20\x20√\x20package.json\x20updated'),console['log'](_0x2bebf3(0x8a)),console[_0x2bebf3(0x93)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x581ab6),console['log'](_0x2bebf3(0x6c)),await configureProject(_0x37a756,_0xb83759,_0xf855b9),console[_0x2bebf3(0x93)]('\x20\x20√\x20Configuration\x20file\x20created'),_0xb83759&&await pullApiConfig(_0x581ab6,_0xb83759,_0xf855b9,_0x2fdbc7),console['log'](_0x2bebf3(0x82)+_0x37a756+_0x2bebf3(0x83)),console[_0x2bebf3(0x93)]('\x0a\x20\x20cd\x20'+_0x37a756),console[_0x2bebf3(0x93)](_0x2bebf3(0x85));}catch(_0x42403a){try{existsSync(_0x581ab6)&&await a146_0x500c52['rm'](_0x581ab6,{'recursive':!![],'force':!![]});}catch{}throw _0x42403a;}}function a146_0x3a2a(){const _0x8883=['join','readFile','\x20\x20Pulling\x20API\x20configuration...','production','parse','Use\x20a\x20different\x20project\x20name.','chdir','\x20\x20√\x20Code\x20formatted','trim','\x20dataset(s),\x20generated\x20','Project\x20directory\x20\x22','4412855mGUEMI','\x20model(s)','constants','package.json','W_OK','\x20api\x20pull`\x20manually\x20later.','*\x20Creating\x20project\x20','bun\x20run\x20format','4ZlxVZC','bun\x20--version','stringify','string','needsUpgrade','cwd','bun','5102322QSzcgS','91452sPxhAx','modelCount','\x0a√\x20Project\x20','\x20created\x20successfully!','length','\x20\x20rabetbase\x20run\x20start\x0a','test','validation','Project\x20name\x20contains\x20invalid\x20characters.','52bUETlU','\x20\x20Installing\x20dependencies...','4397827RYxowj','env','npm','\x22\x20already\x20exists.','12755920uZrCHH','\x20\x20√\x20Pulled\x20','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','name','log','dirname','utf-8','Check\x20directory\x20permissions.','...','resolve','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','8FpMrCL','belowMinimum','Cannot\x20create\x20project\x20in\x20current\x20directory.','280525qfkdPT','954054BJjDUN'];a146_0x3a2a=function(){return _0x8883;};return a146_0x3a2a();}async function updatePackageJsonName(_0x36f2a2){const _0x429209=a146_0x3672,_0x323a88=a146_0xa43529[_0x429209(0x98)](process['cwd'](),_0x36f2a2),_0x1df7b4=a146_0xa43529['join'](_0x323a88,_0x429209(0x73)),_0x104ea7=await a146_0x500c52[_0x429209(0xa0)](_0x1df7b4,_0x429209(0x95)),_0x5b5a00=JSON[_0x429209(0xa3)](_0x104ea7);_0x5b5a00[_0x429209(0x92)]=_0x36f2a2,_0x5b5a00['description']=_0x429209(0x91),await a146_0x500c52['writeFile'](_0x1df7b4,JSON[_0x429209(0x7a)](_0x5b5a00,null,0x2)+'\x0a');}function detectPackageManager(){const _0x121dd4=a146_0x3672;try{return execSync(_0x121dd4(0x79),{'stdio':'ignore'}),_0x121dd4(0x7e);}catch{return _0x121dd4(0x8d);}}async function formatCode(_0x2a2a54){const _0x5069d2=a146_0x3672;try{await execAsync(_0x5069d2(0x77),{'cwd':_0x2a2a54});}catch{}}async function configureProject(_0xb3eaed,_0x31451b,_0xed9294){const _0x448eac=a146_0x3672,_0x161160=a146_0xa43529[_0x448eac(0x98)](process[_0x448eac(0x7d)](),_0xb3eaed),_0x5d9bd1=a146_0xa43529[_0x448eac(0x9f)](_0x161160,NEW_CONFIG_NAME),_0x205823=readConfig(),_0x40a873=typeof _0x205823[_0x448eac(0x8c)]===_0x448eac(0x7b)?_0x205823[_0x448eac(0x8c)]:undefined,_0x27c98a={};for(const _0x3b5530 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x205823[_0x3b5530]!=null)_0x27c98a[_0x3b5530]=_0x205823[_0x3b5530];}const _0x3d5a82=buildCanonicalProjectConfig(_0x27c98a,{'appCodes':_0x31451b?[_0x31451b]:[],'env':_0xed9294||_0x40a873||_0x448eac(0xa2),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x5d9bd1,_0x3d5a82);}async function pullApiConfig(_0x54b4f3,_0x504ac7,_0x57d2c4,_0x15f6e5){const _0x34a866=a146_0x3672,_0x368a72=process[_0x34a866(0x7d)]();try{process[_0x34a866(0x6b)](_0x54b4f3);const _0x4d2241=_0x57d2c4||_0x34a866(0xa2);initEnv(_0x4d2241),console[_0x34a866(0x93)](_0x34a866(0xa1));const {configArray:_0x435de4}=await fetchModelList(_0x504ac7,_0x15f6e5||''),_0x11b426=await generateApiFile(_0x435de4,'',_0x504ac7,!![],_0x4d2241,DEFAULT_API_DIR);console[_0x34a866(0x93)](_0x34a866(0x90)+_0x435de4[_0x34a866(0x84)]+_0x34a866(0x6e)+_0x11b426[_0x34a866(0x81)]+_0x34a866(0x71));}catch(_0x1f8e50){console[_0x34a866(0x93)](_0x34a866(0x99)+CLI_BIN_NAME+_0x34a866(0x75));}finally{process[_0x34a866(0x6b)](_0x368a72);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a147_0x1ddd(){const _0x9ff46a=['601461aOrZfs','291NORFGv','6498359YmIvTU','692RFIFlp','projects','3296WzNGgR','260pnLTMG','dirname','5102592cGPVhc','66060cDcIGd','7023696vxUsrv','join','6294005xOuyDY','sub-app-react-demo','templates'];a147_0x1ddd=function(){return _0x9ff46a;};return a147_0x1ddd();}const a147_0x4845af=a147_0x2bf8;(function(_0x311bff,_0x34c937){const _0x400f0f=a147_0x2bf8,_0x206096=_0x311bff();while(!![]){try{const _0x4b19e5=parseInt(_0x400f0f(0x130))/0x1*(-parseInt(_0x400f0f(0x12e))/0x2)+-parseInt(_0x400f0f(0x12c))/0x3*(-parseInt(_0x400f0f(0x125))/0x4)+parseInt(_0x400f0f(0x128))/0x5+parseInt(_0x400f0f(0x124))/0x6+parseInt(_0x400f0f(0x12d))/0x7+-parseInt(_0x400f0f(0x126))/0x8+parseInt(_0x400f0f(0x12b))/0x9*(-parseInt(_0x400f0f(0x122))/0xa);if(_0x4b19e5===_0x34c937)break;else _0x206096['push'](_0x206096['shift']());}catch(_0x5b3447){_0x206096['push'](_0x206096['shift']());}}}(a147_0x1ddd,0xd7b89));import a147_0x3937d8 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a147_0x3937d8[a147_0x4845af(0x123)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){return a147_0x3937d8['resolve'](__dirname,'../../../../');}function a147_0x2bf8(_0x4a5363,_0x26c08d){_0x4a5363=_0x4a5363-0x122;const _0x1ddd23=a147_0x1ddd();let _0x2bf89d=_0x1ddd23[_0x4a5363];return _0x2bf89d;}export function getSubAppReactDemoTemplateDir(){const _0x329e0b=a147_0x4845af;return a147_0x3937d8[_0x329e0b(0x127)](getRabetbaseCliPackageRoot(),_0x329e0b(0x12a),_0x329e0b(0x12f),_0x329e0b(0x129));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x401cfe,_0x42c3f4){const _0x1b714b=a148_0x12c7,_0x85c9e7=_0x401cfe();while(!![]){try{const _0x5dcbba=-parseInt(_0x1b714b(0xbf))/0x1*(parseInt(_0x1b714b(0xc2))/0x2)+-parseInt(_0x1b714b(0xbe))/0x3+parseInt(_0x1b714b(0xc1))/0x4+-parseInt(_0x1b714b(0xc3))/0x5+-parseInt(_0x1b714b(0xbd))/0x6+parseInt(_0x1b714b(0xc0))/0x7+parseInt(_0x1b714b(0xb9))/0x8*(parseInt(_0x1b714b(0xba))/0x9);if(_0x5dcbba===_0x42c3f4)break;else _0x85c9e7['push'](_0x85c9e7['shift']());}catch(_0x4d656c){_0x85c9e7['push'](_0x85c9e7['shift']());}}}(a148_0x1226,0xce6f6));import a148_0xb6c99c from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a148_0x1226(){const _0x294a1a=['开始复制项目模板','4042770QoVoxE','4024182tPemqZ','31rLeosL','1957284CwsCyh','4997268CKAVok','92222TnDBrQ','6717120TYpfYu','success','now','message','copy','resolve','info','cwd','88FlCzgC','3358377UmEkzg','项目模板复制完成'];a148_0x1226=function(){return _0x294a1a;};return a148_0x1226();}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a148_0x12c7(_0x5a2de2,_0x3996fb){_0x5a2de2=_0x5a2de2-0xb5;const _0x1226f9=a148_0x1226();let _0x12c7c5=_0x1226f9[_0x5a2de2];return _0x12c7c5;}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x4a9835){const _0x3938a9=a148_0x12c7,_0x16b286=Date[_0x3938a9(0xc5)](),_0xa9288a=a148_0xb6c99c[_0x3938a9(0xb6)](process[_0x3938a9(0xb8)](),_0x4a9835);try{logger[_0x3938a9(0xb7)]('copy',_0x3938a9(0xbc),{'projectCode':_0x4a9835,'templateDir':templateDir}),await copyDirectory(templateDir,_0xa9288a);const _0x28a959=Date[_0x3938a9(0xc5)]()-_0x16b286;logger[_0x3938a9(0xc4)]('copy',_0x3938a9(0xbb),_0x28a959,{'projectCode':_0x4a9835});}catch(_0x59bbac){const _0x4dad01=Date['now']()-_0x16b286;logger['error'](_0x3938a9(0xb5),'项目模板复制失败',{'projectCode':_0x4a9835,'error':_0x59bbac instanceof Error?_0x59bbac[_0x3938a9(0xc6)]:String(_0x59bbac),'duration':_0x4dad01});throw _0x59bbac;}return formatElapsed(_0x16b286);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45f8ea,_0x5d4ea1){const _0x159088=a149_0x1e7a,_0x4c1756=_0x45f8ea();while(!![]){try{const _0x623874=-parseInt(_0x159088(0xce))/0x1*(parseInt(_0x159088(0xcc))/0x2)+-parseInt(_0x159088(0xca))/0x3*(parseInt(_0x159088(0xcf))/0x4)+parseInt(_0x159088(0xcb))/0x5*(-parseInt(_0x159088(0xd5))/0x6)+-parseInt(_0x159088(0xd4))/0x7+-parseInt(_0x159088(0xd0))/0x8*(parseInt(_0x159088(0xd3))/0x9)+parseInt(_0x159088(0xc5))/0xa+parseInt(_0x159088(0xc3))/0xb*(parseInt(_0x159088(0xc9))/0xc);if(_0x623874===_0x5d4ea1)break;else _0x4c1756['push'](_0x4c1756['shift']());}catch(_0x2bf4bc){_0x4c1756['push'](_0x4c1756['shift']());}}}(a149_0x2051,0x38b34));import a149_0x143674 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a149_0x2051(){const _0x1996ca=['173636wMShkz','56BKPXyG','error','info','408636OSCSpI','2590756vVHVTk','18VWZcUO','开始格式化代码','resolve','3561811drZlhS','now','1198910nPTjhd','cwd','prettier','代码格式化完成','60AsmSnJ','21FWKHVJ','180365JyoULU','406634qTxzIy','success','2FtswGL'];a149_0x2051=function(){return _0x1996ca;};return a149_0x2051();}function a149_0x1e7a(_0x1d2a18,_0x438efa){_0x1d2a18=_0x1d2a18-0xc2;const _0x205118=a149_0x2051();let _0x1e7a37=_0x205118[_0x1d2a18];return _0x1e7a37;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x148753){const _0x222530=a149_0x1e7a,_0x1b4cbb=Date['now'](),_0x399e2d=a149_0x143674[_0x222530(0xc2)](process[_0x222530(0xc6)](),_0x148753);try{logger[_0x222530(0xd2)]('format',_0x222530(0xd6),{'projectCode':_0x148753}),await execa(resolveNpmBin('npx'),[_0x222530(0xc7),'--write','.'],{'cwd':_0x399e2d});const _0x3d6e1a=Date[_0x222530(0xc4)]()-_0x1b4cbb;logger[_0x222530(0xcd)]('format',_0x222530(0xc8),_0x3d6e1a,{'projectCode':_0x148753});}catch(_0x56a387){const _0x76e428=Date[_0x222530(0xc4)]()-_0x1b4cbb;logger[_0x222530(0xd1)]('format','代码格式化失败',{'projectCode':_0x148753,'error':_0x56a387 instanceof Error?_0x56a387['message']:String(_0x56a387),'duration':_0x76e428});throw _0x56a387;}return formatElapsed(_0x1b4cbb);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a150_0x40b4(){const _0x2ac7d7=['install','依赖安装完成','error','183943fAdIWp','npm','10ZreZmo','36639075Fadwaz','2745940VuxZkZ','now','1464486WoTREE','cwd','12QpCcUf','https://registry.npmmirror.com','49763RClJrJ','依赖安装失败','728478QctViv','12XMGMsm','848vBhGlv','1593369pglIvP','--registry'];a150_0x40b4=function(){return _0x2ac7d7;};return a150_0x40b4();}function a150_0x53d5(_0x1aafa1,_0xfd6300){_0x1aafa1=_0x1aafa1-0xeb;const _0x40b439=a150_0x40b4();let _0x53d509=_0x40b439[_0x1aafa1];return _0x53d509;}(function(_0x573370,_0xe6d5c1){const _0x4ccbe0=a150_0x53d5,_0x11554b=_0x573370();while(!![]){try{const _0x2ea094=-parseInt(_0x4ccbe0(0xf6))/0x1*(parseInt(_0x4ccbe0(0xfe))/0x2)+parseInt(_0x4ccbe0(0xee))/0x3*(-parseInt(_0x4ccbe0(0xef))/0x4)+-parseInt(_0x4ccbe0(0xfa))/0x5+parseInt(_0x4ccbe0(0xfc))/0x6+-parseInt(_0x4ccbe0(0xec))/0x7*(parseInt(_0x4ccbe0(0xf0))/0x8)+parseInt(_0x4ccbe0(0xf1))/0x9*(parseInt(_0x4ccbe0(0xf8))/0xa)+parseInt(_0x4ccbe0(0xf9))/0xb;if(_0x2ea094===_0xe6d5c1)break;else _0x11554b['push'](_0x11554b['shift']());}catch(_0x212fd8){_0x11554b['push'](_0x11554b['shift']());}}}(a150_0x40b4,0x96a6d));import a150_0x3f8c2e from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x34031d){const _0x458827=a150_0x53d5,_0x1866c3=Date['now'](),_0xfead49=a150_0x3f8c2e['resolve'](process[_0x458827(0xfd)](),_0x34031d);try{logger['info'](_0x458827(0xf3),'开始安装依赖',{'projectCode':_0x34031d,'registry':_0x458827(0xeb)}),await execa(resolveNpmBin(_0x458827(0xf7)),['install',_0x458827(0xf2),_0x458827(0xeb)],{'cwd':_0xfead49});const _0xc91317=Date[_0x458827(0xfb)]()-_0x1866c3;logger['success'](_0x458827(0xf3),_0x458827(0xf4),_0xc91317,{'projectCode':_0x34031d});}catch(_0x2bb1a5){const _0x5592cf=Date[_0x458827(0xfb)]()-_0x1866c3;logger[_0x458827(0xf5)](_0x458827(0xf3),_0x458827(0xed),{'projectCode':_0x34031d,'error':_0x2bb1a5 instanceof Error?_0x2bb1a5['message']:String(_0x2bb1a5),'duration':_0x5592cf});throw _0x2bb1a5;}return formatElapsed(_0x1866c3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x1b428b=a151_0x49a3;(function(_0x480fb6,_0x574868){const _0x13d0f3=a151_0x49a3,_0x454cef=_0x480fb6();while(!![]){try{const _0x464aef=-parseInt(_0x13d0f3(0x190))/0x1*(-parseInt(_0x13d0f3(0x180))/0x2)+parseInt(_0x13d0f3(0x17f))/0x3*(-parseInt(_0x13d0f3(0x19f))/0x4)+parseInt(_0x13d0f3(0x1a3))/0x5*(-parseInt(_0x13d0f3(0x19d))/0x6)+parseInt(_0x13d0f3(0x196))/0x7*(-parseInt(_0x13d0f3(0x183))/0x8)+parseInt(_0x13d0f3(0x18c))/0x9+-parseInt(_0x13d0f3(0x193))/0xa*(parseInt(_0x13d0f3(0x1a2))/0xb)+-parseInt(_0x13d0f3(0x17c))/0xc*(-parseInt(_0x13d0f3(0x189))/0xd);if(_0x464aef===_0x574868)break;else _0x454cef['push'](_0x454cef['shift']());}catch(_0x28d59b){_0x454cef['push'](_0x454cef['shift']());}}}(a151_0x3275,0xd957e));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a151_0x49a3(_0x5e234,_0x1acfab){_0x5e234=_0x5e234-0x17b;const _0x32759a=a151_0x3275();let _0x49a349=_0x32759a[_0x5e234];return _0x49a349;}import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a151_0x1b428b(0x1a4),'type':'string','description':'App\x20code\x20to\x20initialize'},{'name':'env','type':a151_0x1b428b(0x17d),'description':a151_0x1b428b(0x192)},{'name':a151_0x1b428b(0x195),'type':a151_0x1b428b(0x19a),'description':a151_0x1b428b(0x1a5),'default':![]}],createFlags=[{'name':a151_0x1b428b(0x1a0),'type':'string','description':a151_0x1b428b(0x181)},{'name':a151_0x1b428b(0x18f),'type':a151_0x1b428b(0x17d),'description':a151_0x1b428b(0x192)},{'name':a151_0x1b428b(0x1a4),'type':'string','description':a151_0x1b428b(0x1a1)}],upgradeFlags=[{'name':'yes','type':a151_0x1b428b(0x19a),'description':a151_0x1b428b(0x185),'default':![]}];export const projectDefinitions=[{'service':'project','command':a151_0x1b428b(0x18a),'description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a151_0x1b428b(0x1a6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a151_0x1b428b(0x19b),'since':a151_0x1b428b(0x199)},'flags':initFlags,async 'execute'(_0x424ab4){const _0x177fe1=a151_0x1b428b;return await initConfig({'appcode':_0x424ab4[_0x177fe1(0x18b)](_0x177fe1(0x1a4))||undefined,'env':_0x424ab4['str'](_0x177fe1(0x18f))||undefined,'autoYes':_0x424ab4[_0x177fe1(0x19c)](_0x177fe1(0x195))}),{'ok':!![]};}},{'service':a151_0x1b428b(0x17e),'command':a151_0x1b428b(0x19e),'description':a151_0x1b428b(0x186),'risk':a151_0x1b428b(0x1a6),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a151_0x1b428b(0x197),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x272a92){const _0x50577e=a151_0x1b428b,{createApp:_0x2ae993}=await import(_0x50577e(0x182)),{createProjectNonInteractive:_0x5df000}=await import(_0x50577e(0x18e)),_0x2b7652=_0x272a92[_0x50577e(0x18b)](_0x50577e(0x1a0))[_0x50577e(0x188)]()||_0x272a92[_0x50577e(0x187)][0x0]?.['trim'](),_0x47345f=_0x272a92[_0x50577e(0x18b)](_0x50577e(0x18f))||undefined,_0x6e7db6=_0x272a92['str'](_0x50577e(0x1a4))||undefined;if(_0x272a92[_0x50577e(0x184)]){if(!_0x2b7652)throw CliErrors['validation'](_0x50577e(0x198),_0x50577e(0x18d)+CLI_BIN_NAME+_0x50577e(0x17b));await _0x5df000(_0x2b7652,_0x47345f,_0x6e7db6,_0x272a92[_0x50577e(0x194)]);}else await _0x2ae993({'projectCode':_0x2b7652,'appCode':_0x6e7db6,'env':_0x47345f,'cookie':_0x272a92['cookie']});return{'ok':!![]};}},{'service':a151_0x1b428b(0x17e),'command':'upgrade','description':a151_0x1b428b(0x191),'risk':a151_0x1b428b(0x1a6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x277edd){const _0x448549=a151_0x1b428b;return await upgradeApp(_0x277edd['nonInteractive'],{'yes':_0x277edd[_0x448549(0x19c)]('yes')}),{'ok':!![]};}}];function a151_0x3275(){const _0x3cdbd6=['project-name','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','2026-07','boolean','\x20workspace\x20init','bool','712230TvsuYM','create','3863668WeWRPG','name','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','5514245CtlMrG','55dyopSK','appcode','Auto-confirm\x20prompts','write','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','12514416tsoIVu','string','project','3XPrBLc','3177802rTLckz','Project\x20name','../../commands/project/create/main.js','1645408OvZiMo','nonInteractive','Skip\x20confirmation\x20prompt','Create\x20a\x20new\x20project','args','trim','13xMnFcZ','init','str','11134008liJVvQ','Usage:\x20','../../commands/project/create/non-interactive.js','env','1viZOmN','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Target\x20environment','10rjYqdh','cookie','yes','7VxhuOE'];a151_0x3275=function(){return _0x3cdbd6;};return a151_0x3275();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a152_0x499b(){const _0x43900c=['1571546GPlcMN','从旧配置文件升级成功','5610805uhcqqN','init','env','app','trim','yellow','.bak','toLocaleString','App\x20Code\x20cannot\x20be\x20empty','8DiVZDQ','info','string','46841000UXHbuL','../..','green','parse','.rabetbase.json','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','defaultApp','\x20→\x20.rabetbase.json','1.0.0','Please\x20enter\x20App\x20Code:','keys','462702EPqRZk','\x20\x20Default:\x20','\x20\x20Apps:\x20','gray','log','utf8','version','Migration\x20cancelled.\x20Run\x20`','join','6UmeUSO','bold','apps','Upgrade\x20it\x20to\x20','package.json','6941361MahXTF','production','cyan','3FFwekZ','3474156zPiFJC','✓\x20Upgraded\x20','Invalid\x20App\x20Code','1600785ZvKdLr','初始化项目配置文件成功','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','?\x20(Old\x20file\x20→\x20*.bak)','appcode'];a152_0x499b=function(){return _0x43900c;};return a152_0x499b();}(function(_0x575665,_0x307708){const _0x16534e=a152_0x343a,_0x2dd7e3=_0x575665();while(!![]){try{const _0x45ac24=-parseInt(_0x16534e(0xbe))/0x1+parseInt(_0x16534e(0xd8))/0x2*(-parseInt(_0x16534e(0xcf))/0x3)+-parseInt(_0x16534e(0xd0))/0x4+-parseInt(_0x16534e(0xda))/0x5*(parseInt(_0x16534e(0xc7))/0x6)+-parseInt(_0x16534e(0xcc))/0x7+parseInt(_0x16534e(0xe3))/0x8*(parseInt(_0x16534e(0xd3))/0x9)+parseInt(_0x16534e(0xe6))/0xa;if(_0x45ac24===_0x307708)break;else _0x2dd7e3['push'](_0x2dd7e3['shift']());}catch(_0x17b19c){_0x2dd7e3['push'](_0x2dd7e3['shift']());}}}(a152_0x499b,0x9a17f));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a152_0x3ee650 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x35a2ad){const _0xb7a659=a152_0x343a,{appcode:_0x44a0ac,env:_0x3bbb94,autoYes:_0x37675a}=_0x35a2ad,_0x3045d9=process['cwd']();if(getProjectConfigPath())throw new Error(_0xb7a659(0xeb));let _0x4f5643;for(const _0xae9a3 of LEGACY_CONFIG_NAMES){const _0x902564=resolve(_0x3045d9,_0xae9a3);if(existsSync(_0x902564)){_0x4f5643=_0x902564;break;}}if(_0x4f5643){let _0x3c7094={};try{_0x3c7094=JSON[_0xb7a659(0xe9)](readFileSync(_0x4f5643,_0xb7a659(0xc3)));}catch{}const _0x4a4613=basename(_0x4f5643),_0x57e9af=_0x3c7094?.['appcode']||_0x3c7094?.[_0xb7a659(0xdd)];let _0x37bda5=_0x37675a;!_0x37675a&&(console['log'](a152_0x3ee650[_0xb7a659(0xdf)]('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a152_0x3ee650['bold'](_0x4a4613))),_0x57e9af&&console['log'](a152_0x3ee650[_0xb7a659(0xce)]('\x20\x20appcode:\x20'+_0x57e9af)),_0x37bda5=await confirm({'message':_0xb7a659(0xca)+a152_0x3ee650[_0xb7a659(0xc8)](_0xb7a659(0xea))+_0xb7a659(0xd6),'default':!![]}));if(!_0x37bda5){console[_0xb7a659(0xc2)](_0xb7a659(0xc5)+CLI_BIN_NAME+'\x20workspace\x20init`\x20to\x20start\x20fresh.');return;}const _0x5af158=resolve(_0x3045d9,NEW_CONFIG_NAME),_0x1622dd=getCliVersionFromPkg(),_0x34951d=readRawConfig(),_0x620e8d=_0x44a0ac||(typeof _0x3c7094?.[_0xb7a659(0xd7)]==='string'?_0x3c7094['appcode']:undefined)||(typeof _0x3c7094?.[_0xb7a659(0xdd)]===_0xb7a659(0xe5)?_0x3c7094[_0xb7a659(0xdd)]:undefined)||await askAppcode(),_0x4ba0e1=typeof _0x3c7094?.[_0xb7a659(0xdc)]===_0xb7a659(0xe5)?_0x3c7094[_0xb7a659(0xdc)]:typeof _0x34951d[_0xb7a659(0xdc)]===_0xb7a659(0xe5)?_0x34951d[_0xb7a659(0xdc)]:_0xb7a659(0xcd),_0x3e76ce=buildCanonicalProjectConfig({..._0x34951d,..._0x3c7094},{'appCodes':[_0x620e8d],'env':_0x4ba0e1,'metadata':{'version':_0x1622dd,'migratedAt':new Date()[_0xb7a659(0xe1)](),'migratedFrom':_0x4f5643}});writeConfigFile(_0x5af158,_0x3e76ce);const _0x57cee4=_0x4f5643+_0xb7a659(0xe0);renameSync(_0x4f5643,_0x57cee4),logger['setLogPath'](_0x3045d9),logger[_0xb7a659(0xe4)](_0xb7a659(0xdb),_0xb7a659(0xd9),{'from':_0x4f5643,'to':_0x5af158,'appcode':_0x620e8d,'env':_0x3e76ce['env']}),console[_0xb7a659(0xc2)](a152_0x3ee650[_0xb7a659(0xe8)](_0xb7a659(0xd1)+_0x4a4613+_0xb7a659(0xba))),console[_0xb7a659(0xc2)](a152_0x3ee650['cyan'](_0xb7a659(0xc0)+Object[_0xb7a659(0xbd)](_0x3e76ce[_0xb7a659(0xc9)]||{})[_0xb7a659(0xc6)](',\x20'))),console[_0xb7a659(0xc2)](a152_0x3ee650[_0xb7a659(0xce)](_0xb7a659(0xbf)+_0x3e76ce[_0xb7a659(0xec)])),console[_0xb7a659(0xc2)](a152_0x3ee650[_0xb7a659(0xc1)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x4a4613+'.bak'));return;}const _0x1ef616=_0x44a0ac||await askAppcode(),_0x489d1e=resolve(_0x3045d9,NEW_CONFIG_NAME),_0x2a7a2b=getCliVersionFromPkg(),_0x7e45e7=readRawConfig(),_0x4651c9=typeof _0x7e45e7[_0xb7a659(0xdc)]===_0xb7a659(0xe5)?_0x7e45e7[_0xb7a659(0xdc)]:undefined,_0x2e6ae0=buildCanonicalProjectConfig({},{'appCodes':[_0x1ef616],'env':_0x3bbb94||_0x4651c9||_0xb7a659(0xcd),'metadata':{'version':_0x2a7a2b,'createdAt':new Date()[_0xb7a659(0xe1)]()}});writeConfigFile(_0x489d1e,_0x2e6ae0),logger['setLogPath'](_0x3045d9),logger[_0xb7a659(0xe4)]('init',_0xb7a659(0xd4),{'appcode':_0x1ef616,'env':_0x2e6ae0[_0xb7a659(0xdc)],'version':_0x2e6ae0[_0xb7a659(0xc4)],'configPath':_0x489d1e}),console[_0xb7a659(0xc2)](a152_0x3ee650[_0xb7a659(0xe8)]('✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory')),console[_0xb7a659(0xc2)](a152_0x3ee650[_0xb7a659(0xce)](_0xb7a659(0xc0)+Object[_0xb7a659(0xbd)](_0x2e6ae0[_0xb7a659(0xc9)]||{})[_0xb7a659(0xc6)](',\x20'))),console[_0xb7a659(0xc2)](a152_0x3ee650[_0xb7a659(0xce)](_0xb7a659(0xbf)+_0x2e6ae0[_0xb7a659(0xec)])),console[_0xb7a659(0xc2)](_0xb7a659(0xd5)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+'\x20api\x20pull\x27');}function a152_0x343a(_0x230543,_0x2d7fc5){_0x230543=_0x230543-0xba;const _0x499b6c=a152_0x499b();let _0x343ac2=_0x499b6c[_0x230543];return _0x343ac2;}function askAppcode(){const _0x34476c=a152_0x343a;return input({'message':_0x34476c(0xbc),'validate':_0x4d0909=>{const _0x4c974f=_0x34476c;if(!_0x4d0909[_0x4c974f(0xde)]())return _0x4c974f(0xe2);const {valid:_0xacc668,message:_0x2d4855}=validateAppcode(_0x4d0909['trim']());return _0xacc668||_0x2d4855||_0x4c974f(0xd2);}});}function getCliVersionFromPkg(){const _0x3a38b1=a152_0x343a;try{const _0x1de252=fileURLToPath(import.meta.url),_0x77043=resolve(dirname(_0x1de252),_0x3a38b1(0xe7)),_0x677b97=JSON[_0x3a38b1(0xe9)](readFileSync(resolve(_0x77043,_0x3a38b1(0xcb)),_0x3a38b1(0xc3)));return _0x677b97[_0x3a38b1(0xc4)]||_0x3a38b1(0xbb);}catch{return _0x3a38b1(0xbb);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a152_0x3299d8=a152_0x26b3;(function(_0x19c70d,_0x3f81ea){const _0x25ac30=a152_0x26b3,_0x48d72c=_0x19c70d();while(!![]){try{const _0x4c699d=-parseInt(_0x25ac30(0x178))/0x1*(parseInt(_0x25ac30(0x174))/0x2)+-parseInt(_0x25ac30(0x138))/0x3*(parseInt(_0x25ac30(0x154))/0x4)+-parseInt(_0x25ac30(0x145))/0x5+parseInt(_0x25ac30(0x162))/0x6+parseInt(_0x25ac30(0x18b))/0x7+-parseInt(_0x25ac30(0x13f))/0x8+parseInt(_0x25ac30(0x133))/0x9;if(_0x4c699d===_0x3f81ea)break;else _0x48d72c['push'](_0x48d72c['shift']());}catch(_0x4e1454){_0x48d72c['push'](_0x48d72c['shift']());}}}(a152_0x39ff,0xaa51d));import a152_0x252ba0 from'chalk';function a152_0x26b3(_0xb7a06b,_0x1ece20){_0xb7a06b=_0xb7a06b-0x133;const _0x39ff2c=a152_0x39ff();let _0x26b3ba=_0x39ff2c[_0xb7a06b];return _0x26b3ba;}function a152_0x39ff(){const _0x40d934=['fail','status','path','latest','skipped','@lovrabet/sdk','7320488ZBoJIV','succeed','configMigration','devDependencies','keys','undefined','3972515OIbuJZ','\x20→\x20','log','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','bold','detail','error','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','.lovrabet','stringify','Upgrade\x20@lovrabet/sdk','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','sdkUpgrade','===\x20Upgrade\x20Analysis\x20===','join','236iKrvJw','done','yellow','needsSkillSwap','fields','gray','.claude/skills/lovrabet','info','no\x20legacy\x20entry','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','\x20\x20New\x20config\x20(.rabetbase.json):\x20','args','Install\x20new\x20skill','Upgrade\x20completed\x20successfully!','7280538ouJGNg','red','message','failed','utf8','Step\x201/7:\x20Migrating\x20config...','length','not\x20found\x20(will\x20create)','MCP\x20config:','\x20\x20#\x20or','.cursor/rules/lovrabet_rules.mdc','package.json','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','oldMcpConfig','\x20\x20Fields\x20to\x20migrate:\x20','string','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Remove\x20old\x20skill','1726958gXKYMl','hasNewConfig','parse','entries','1UrkTer','cyan','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','Remove\x20legacy\x20artifacts','oldArtifacts','[\x22@lovrabet/sdk\x22]:\x20','white','.cursor/mcp.json','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','FOUND','\x20→\x20keys:\x20','filter','Config\x20migration','CANCEL','@lovrabet/sdk:','mcpServers','includes','removed\x20','isDirectory','9126551nLiIbY','some','no\x20matching\x20entry\x20found','Legacy\x20artifacts:','\x20\x20\x20\x20\x20\x20\x20','\x20from\x20','exit\x20','start','values','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','\x20\x20bun\x20install','oldPath','inherit','push','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','dependencies','Clean\x20MCP\x20config','\x20removed','Step\x206/7:\x20Installing\x20new\x20skill...','\x20\x20npm\x20install','files','yes','Remove\x20.lovrabet/','Step\x204/7:\x20Cleaning\x20MCP\x20config...','green','skipped\x20(no\x20legacy\x20config)','needed','Step\x204/7:\x20MCP\x20config\x20—\x20','\x20\x20Step\x20','object','Proceed\x20with\x20upgrade?','\x20(backup:\x20','@lovrabet/dataset-mcp-server','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','label','15562782GDcLfD','\x20\x20Current\x20version\x20in\x20','already\x20exists\x20(will\x20merge)','Step\x201/7:\x20Config\x20migration\x20—\x20','isArray','49614OJxguh'];a152_0x39ff=function(){return _0x40d934;};return a152_0x39ff();}import a152_0xf3a2d9 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[a152_0x3299d8(0x183)](_0x5ee006=>_0x5ee006!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x1b0320){const _0x2b21de=a152_0x3299d8,_0x53258d=[];for(const _0x3a7f2c of Object[_0x2b21de(0x193)](CORE_IDE_CONFIGS)){if(_0x3a7f2c[_0x2b21de(0x19f)])for(const _0x38ec1a of _0x3a7f2c[_0x2b21de(0x19f)]){_0x53258d['push'](resolve(_0x1b0320,_0x38ec1a[_0x2b21de(0x13b)]));}}return _0x53258d;}function analyse(_0x290886){const _0x2e16df=a152_0x3299d8;let _0x4da4dc=null;const _0x3c6b23=resolve(_0x290886,NEW_CONFIG_NAME),_0x56565f=existsSync(_0x3c6b23);for(const _0x1fd528 of LEGACY_CONFIG_NAMES){const _0x2de2d4=resolve(_0x290886,_0x1fd528);if(existsSync(_0x2de2d4)){const _0x243da4=readConfigFile(_0x2de2d4),_0x3c9a4c=Object[_0x2e16df(0x143)](_0x243da4)['filter'](_0x20a20a=>typeof _0x243da4[_0x20a20a]!==_0x2e16df(0x144));_0x4da4dc={'oldPath':_0x2de2d4,'hasNewConfig':_0x56565f,'fields':_0x3c9a4c};break;}}const _0x4cd57f=[],_0x3b1de2=resolve(_0x290886,'.lovrabet');if(existsSync(_0x3b1de2))_0x4cd57f['push'](_0x3b1de2);const _0x93a97d=resolve(_0x290886,_0x2e16df(0x16c));if(existsSync(_0x93a97d))_0x4cd57f[_0x2e16df(0x198)](_0x93a97d);const _0x3170e0=resolve(_0x290886,_0x2e16df(0x15a));if(existsSync(_0x3170e0))_0x4cd57f[_0x2e16df(0x198)](_0x3170e0);for(const _0x16d23a of collectIdeSkillFiles(_0x290886)){if(existsSync(_0x16d23a))_0x4cd57f[_0x2e16df(0x198)](_0x16d23a);}let _0x42f1dd=null;const _0xab7900=resolve(_0x290886,_0x2e16df(0x17f));if(existsSync(_0xab7900))try{const _0x21eb21=JSON[_0x2e16df(0x176)](readFileSync(_0xab7900,'utf8'));if(_0x21eb21?.[_0x2e16df(0x187)]&&typeof _0x21eb21[_0x2e16df(0x187)]==='object'){const _0x27904e=[];for(const [_0x540483,_0x4438f6]of Object[_0x2e16df(0x177)](_0x21eb21[_0x2e16df(0x187)])){const _0x4aedc7=_0x4438f6;_0x4aedc7?.['args']&&Array['isArray'](_0x4aedc7[_0x2e16df(0x15f)])&&_0x4aedc7[_0x2e16df(0x15f)][_0x2e16df(0x18c)](_0x491be8=>typeof _0x491be8===_0x2e16df(0x171)&&_0x491be8[_0x2e16df(0x188)](_0x2e16df(0x1ab)))&&_0x27904e[_0x2e16df(0x198)](_0x540483);}_0x27904e[_0x2e16df(0x168)]>0x0&&(_0x42f1dd={'path':_0xab7900,'keys':_0x27904e});}}catch{}const _0x445eac=_0x4cd57f[_0x2e16df(0x168)]>0x0||_0x4da4dc!==null;let _0x504e58=null;const _0x56787e=resolve(_0x290886,_0x2e16df(0x16d));if(existsSync(_0x56787e))try{const _0xd06727=JSON[_0x2e16df(0x176)](readFileSync(_0x56787e,_0x2e16df(0x166)));for(const _0x4d1921 of[_0x2e16df(0x19a),_0x2e16df(0x142)]){const _0x1b8b83=_0xd06727?.[_0x4d1921]?.[_0x2e16df(0x13e)];if(typeof _0x1b8b83===_0x2e16df(0x171)){_0x1b8b83!==_0x2e16df(0x13c)&&(_0x504e58={'pkgPath':_0x56787e,'currentVersion':_0x1b8b83,'field':_0x4d1921});break;}}}catch{}return{'configMigration':_0x4da4dc,'oldArtifacts':_0x4cd57f,'oldMcpConfig':_0x42f1dd,'needsSkillSwap':_0x445eac,'sdkUpgrade':_0x504e58};}function printReport(_0x474388){const _0x1c57c6=a152_0x3299d8,{configMigration:_0x45a76c,oldArtifacts:_0x592eb8,oldMcpConfig:_0x2c74f1,needsSkillSwap:_0x35c0eb}=_0x474388;console[_0x1c57c6(0x147)](''),console['log'](a152_0x252ba0['bold'](_0x1c57c6(0x152))),console[_0x1c57c6(0x147)]('');_0x45a76c?(console['log'](a152_0x252ba0[_0x1c57c6(0x179)]('Config\x20file:')+('\x20\x20'+a152_0x252ba0[_0x1c57c6(0x156)](_0x45a76c[_0x1c57c6(0x196)]))),console['log'](_0x1c57c6(0x15e)+(_0x45a76c[_0x1c57c6(0x175)]?a152_0x252ba0['green'](_0x1c57c6(0x135)):a152_0x252ba0[_0x1c57c6(0x159)](_0x1c57c6(0x169)))),console[_0x1c57c6(0x147)](_0x1c57c6(0x170)+_0x45a76c[_0x1c57c6(0x158)]['join'](',\x20')),console[_0x1c57c6(0x147)](_0x1c57c6(0x1ac))):console['log'](a152_0x252ba0[_0x1c57c6(0x179)]('Config\x20file:')+'\x20\x20'+a152_0x252ba0[_0x1c57c6(0x159)]('no\x20legacy\x20config\x20found'));console[_0x1c57c6(0x147)]('');if(_0x592eb8['length']>0x0){console[_0x1c57c6(0x147)](a152_0x252ba0[_0x1c57c6(0x179)](_0x1c57c6(0x18e)));for(const _0x219bf9 of _0x592eb8){console[_0x1c57c6(0x147)]('\x20\x20'+a152_0x252ba0[_0x1c57c6(0x163)](_0x1c57c6(0x181))+'\x20\x20'+_0x219bf9);}console[_0x1c57c6(0x147)]('\x20\x20Action:\x20delete');}else console['log'](a152_0x252ba0['cyan']('Legacy\x20artifacts:')+'\x20\x20'+a152_0x252ba0[_0x1c57c6(0x159)]('none\x20found'));console[_0x1c57c6(0x147)]('');_0x2c74f1?(console[_0x1c57c6(0x147)](a152_0x252ba0[_0x1c57c6(0x179)](_0x1c57c6(0x16a))+('\x20\x20'+a152_0x252ba0['yellow'](_0x2c74f1['path'])+_0x1c57c6(0x182)+_0x2c74f1[_0x1c57c6(0x143)][_0x1c57c6(0x153)](',\x20'))),console[_0x1c57c6(0x147)](_0x1c57c6(0x14c))):console[_0x1c57c6(0x147)](a152_0x252ba0[_0x1c57c6(0x179)](_0x1c57c6(0x16a))+'\x20\x20'+a152_0x252ba0['gray'](_0x1c57c6(0x15c)));console[_0x1c57c6(0x147)](''),console['log'](a152_0x252ba0[_0x1c57c6(0x179)]('Skill\x20swap:')+('\x20\x20'+(_0x35c0eb?a152_0x252ba0['yellow'](_0x1c57c6(0x1a5)):a152_0x252ba0[_0x1c57c6(0x1a3)]('not\x20needed'))));_0x35c0eb&&console[_0x1c57c6(0x147)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x1c57c6(0x147)]('');if(_0x474388[_0x1c57c6(0x151)]){const {currentVersion:_0x552415,field:_0x4020c8,pkgPath:_0x185cb2}=_0x474388[_0x1c57c6(0x151)];console['log'](a152_0x252ba0[_0x1c57c6(0x179)](_0x1c57c6(0x186))+('\x20\x20'+a152_0x252ba0[_0x1c57c6(0x156)](_0x185cb2))),console[_0x1c57c6(0x147)](_0x1c57c6(0x134)+_0x4020c8+':\x20'+a152_0x252ba0[_0x1c57c6(0x156)](_0x552415)+_0x1c57c6(0x146)+a152_0x252ba0[_0x1c57c6(0x1a3)](_0x1c57c6(0x13c))),console[_0x1c57c6(0x147)](_0x1c57c6(0x1ad));}else console[_0x1c57c6(0x147)](a152_0x252ba0[_0x1c57c6(0x179)](_0x1c57c6(0x186))+'\x20\x20'+a152_0x252ba0['gray']('not\x20found\x20or\x20already\x20at\x20latest'));console[_0x1c57c6(0x147)]('');}function execConfigMigration(_0x4d9126,_0x380a9b){const _0x3d5bc6=a152_0x3299d8,{configMigration:_0x56391f}=_0x4d9126;if(!_0x56391f?.[_0x3d5bc6(0x196)])return{'step':0x1,'label':_0x3d5bc6(0x184),'ok':!![],'detail':_0x3d5bc6(0x1a4)};const _0x36936a=readConfigFile(_0x56391f[_0x3d5bc6(0x196)]),_0x1095b9=resolve(_0x380a9b,NEW_CONFIG_NAME),_0x234cfb=_0x56391f[_0x3d5bc6(0x175)]?readConfigFile(_0x1095b9):{};for(const [_0x1232b8,_0x28c857]of Object[_0x3d5bc6(0x177)](_0x36936a)){!(_0x1232b8 in _0x234cfb)&&(_0x234cfb[_0x1232b8]=_0x28c857);}writeConfigFile(_0x1095b9,_0x234cfb);const _0x508d95=_0x56391f[_0x3d5bc6(0x196)]+'.bak';return renameSync(_0x56391f[_0x3d5bc6(0x196)],_0x508d95),{'step':0x1,'label':_0x3d5bc6(0x184),'ok':!![],'detail':_0x56391f[_0x3d5bc6(0x196)]+_0x3d5bc6(0x146)+_0x1095b9+_0x3d5bc6(0x1aa)+_0x508d95+')'};}function execRemoveOldArtifacts(_0x32fa24){const _0x58061f=a152_0x3299d8,_0x4169d3=[];for(const _0x4ae31c of _0x32fa24){try{if(!existsSync(_0x4ae31c))continue;const _0x272510=tryStat(_0x4ae31c);_0x272510?.[_0x58061f(0x18a)]()?rmSync(_0x4ae31c,{'recursive':!![],'force':!![]}):unlinkSync(_0x4ae31c);}catch(_0x54b688){_0x4169d3[_0x58061f(0x198)](_0x4ae31c+':\x20'+_0x54b688[_0x58061f(0x164)]);}}return{'step':0x3,'label':_0x58061f(0x17b),'ok':_0x4169d3[_0x58061f(0x168)]===0x0,'detail':_0x4169d3[_0x58061f(0x168)]>0x0?_0x32fa24['length']-_0x4169d3[_0x58061f(0x168)]+'/'+_0x32fa24[_0x58061f(0x168)]+'\x20removed\x20('+_0x4169d3['join'](';\x20')+')':_0x32fa24['length']+_0x58061f(0x19c)};}function execCleanMcp(_0x3715ae){const _0x243351=a152_0x3299d8;if(!_0x3715ae[_0x243351(0x16f)])return{'step':0x4,'label':_0x243351(0x19b),'ok':!![],'detail':_0x243351(0x13d)};try{const _0x5bef97=readFileSync(_0x3715ae[_0x243351(0x16f)][_0x243351(0x13b)],'utf8'),_0x271281=JSON['parse'](_0x5bef97);if(_0x271281?.[_0x243351(0x187)]&&typeof _0x271281['mcpServers']===_0x243351(0x1a8)){const _0x43df64=[];for(const [_0x2fcfe8,_0x114d1d]of Object['entries'](_0x271281[_0x243351(0x187)])){_0x114d1d?.[_0x243351(0x15f)]&&Array[_0x243351(0x137)](_0x114d1d[_0x243351(0x15f)])&&_0x114d1d[_0x243351(0x15f)]['some'](_0x431aa8=>typeof _0x431aa8===_0x243351(0x171)&&_0x431aa8[_0x243351(0x188)](_0x243351(0x1ab)))&&_0x43df64[_0x243351(0x198)](_0x2fcfe8);}for(const _0x2e7851 of _0x43df64){delete _0x271281[_0x243351(0x187)][_0x2e7851];}return _0x43df64[_0x243351(0x168)]>0x0&&writeFileSync(_0x3715ae['oldMcpConfig'][_0x243351(0x13b)],JSON[_0x243351(0x14e)](_0x271281,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x243351(0x19b),'ok':!![],'detail':_0x243351(0x189)+_0x43df64[_0x243351(0x153)](',\x20')+_0x243351(0x190)+_0x3715ae['oldMcpConfig'][_0x243351(0x13b)]};}return{'step':0x4,'label':_0x243351(0x19b),'ok':!![],'detail':_0x243351(0x18d)};}catch(_0xf833c){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0xf833c['message']};}}function execSkillsRemove(_0x34140b,_0x4e7391){const _0x4d24b7=a152_0x3299d8,_0x556029=runNpxSkillsRemove(_0x34140b,{'stdio':_0x4d24b7(0x197),'yes':_0x4e7391});return{'step':0x5,'label':_0x4d24b7(0x173),'ok':_0x556029['ok'],'detail':_0x556029['ok']?'lovrabet/lovrabet-skill\x20removed':_0x556029[_0x4d24b7(0x14b)]??_0x4d24b7(0x191)+_0x556029[_0x4d24b7(0x13a)]};}function execSkillsAdd(_0x4c9c29,_0x4243dc){const _0x44d0c9=a152_0x3299d8,_0x1ce1f0=runNpxSkillsAddGlobal(_0x4c9c29,'lovrabet/rabetbase',{'stdio':_0x44d0c9(0x197),'yes':_0x4243dc});return{'step':0x6,'label':_0x44d0c9(0x160),'ok':_0x1ce1f0['ok'],'detail':_0x1ce1f0['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x1ce1f0[_0x44d0c9(0x14b)]??_0x44d0c9(0x191)+_0x1ce1f0[_0x44d0c9(0x13a)]};}function execUpgradeSdk(_0x3976f8){const _0x4bf1f3=a152_0x3299d8;if(!_0x3976f8['sdkUpgrade'])return{'step':0x7,'label':_0x4bf1f3(0x14f),'ok':!![],'detail':_0x4bf1f3(0x150)};const {pkgPath:_0x340243,currentVersion:_0x36f834,field:_0x35e956}=_0x3976f8[_0x4bf1f3(0x151)];try{const _0x22c429=readFileSync(_0x340243,_0x4bf1f3(0x166)),_0x367f15=JSON[_0x4bf1f3(0x176)](_0x22c429);return _0x367f15[_0x35e956][_0x4bf1f3(0x13e)]=_0x4bf1f3(0x13c),writeFileSync(_0x340243,JSON[_0x4bf1f3(0x14e)](_0x367f15,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':_0x4bf1f3(0x14f),'ok':!![],'detail':_0x35e956+_0x4bf1f3(0x17d)+_0x36f834+'\x20→\x20latest'};}catch(_0x3801be){return{'step':0x7,'label':_0x4bf1f3(0x14f),'ok':![],'detail':_0x3801be[_0x4bf1f3(0x164)]};}}function tryStat(_0x280902){try{return statSync(_0x280902);}catch{return undefined;}}function printSummary(_0x5b9bf6){const _0x420920=a152_0x3299d8;console[_0x420920(0x147)](''),console[_0x420920(0x147)](a152_0x252ba0[_0x420920(0x149)]('===\x20Upgrade\x20Summary\x20===')),console[_0x420920(0x147)]('');for(const _0x369418 of _0x5b9bf6){const _0x8eb70b=_0x369418['ok']?a152_0x252ba0[_0x420920(0x1a3)]('OK'):a152_0x252ba0[_0x420920(0x163)]('FAIL');console['log']('\x20\x20'+_0x8eb70b+_0x420920(0x1a7)+_0x369418['step']+':\x20'+_0x369418[_0x420920(0x1ae)]);if(_0x369418[_0x420920(0x14a)])console[_0x420920(0x147)](_0x420920(0x18f)+a152_0x252ba0[_0x420920(0x159)](_0x369418[_0x420920(0x14a)]));}console[_0x420920(0x147)]('');}export async function upgradeApp(_0xbf4a7e,_0x56c18f){const _0x4436c7=a152_0x3299d8,_0x1194a4=process['cwd'](),_0x485497=analyse(_0x1194a4),_0x124f6d=!_0x485497[_0x4436c7(0x141)]&&_0x485497[_0x4436c7(0x17c)]['length']===0x0&&!_0x485497[_0x4436c7(0x16f)]&&!_0x485497[_0x4436c7(0x157)]&&!_0x485497[_0x4436c7(0x151)];if(_0x124f6d){console[_0x4436c7(0x147)](a152_0x252ba0[_0x4436c7(0x1a3)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x485497);const _0x11ba5a=!!(_0x56c18f[_0x4436c7(0x1a0)]||_0x56c18f['Y']||_0xbf4a7e);if(!_0x11ba5a)try{const _0x5e5a11=await askConfirm(_0x4436c7(0x1a9));if(!_0x5e5a11){console[_0x4436c7(0x147)](a152_0x252ba0[_0x4436c7(0x159)]('Upgrade\x20cancelled.'));return;}}catch(_0x35d505){if(_0x35d505?.[_0x4436c7(0x164)]===_0x4436c7(0x185)){console[_0x4436c7(0x147)](a152_0x252ba0[_0x4436c7(0x159)]('Upgrade\x20cancelled.'));return;}throw _0x35d505;}const _0x38d8a1=[],_0xf8d1dc=a152_0xf3a2d9({'text':_0x4436c7(0x167),'color':'cyan'})[_0x4436c7(0x192)](),_0x28be13=execConfigMigration(_0x485497,_0x1194a4);_0x38d8a1[_0x4436c7(0x198)](_0x28be13),_0xf8d1dc[_0x28be13['ok']?_0x4436c7(0x140):_0x4436c7(0x139)](_0x4436c7(0x136)+(_0x28be13[_0x4436c7(0x14a)]??(_0x28be13['ok']?_0x4436c7(0x155):'failed')));const _0x5cae55=resolve(_0x1194a4,_0x4436c7(0x14d)),_0x63e82c=a152_0xf3a2d9({'text':_0x4436c7(0x148),'color':_0x4436c7(0x179)})[_0x4436c7(0x192)]();if(existsSync(_0x5cae55))try{rmSync(_0x5cae55,{'recursive':!![],'force':!![]}),_0x63e82c[_0x4436c7(0x140)](_0x4436c7(0x172)),_0x38d8a1[_0x4436c7(0x198)]({'step':0x2,'label':_0x4436c7(0x1a1),'ok':!![]});}catch(_0x2ef9f3){_0x63e82c[_0x4436c7(0x139)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x2ef9f3['message']),_0x38d8a1[_0x4436c7(0x198)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x2ef9f3[_0x4436c7(0x164)]});}else _0x63e82c[_0x4436c7(0x15b)](_0x4436c7(0x15d)),_0x38d8a1['push']({'step':0x2,'label':_0x4436c7(0x1a1),'ok':!![],'detail':_0x4436c7(0x13d)});const _0x20224e=a152_0xf3a2d9({'text':_0x4436c7(0x194),'color':_0x4436c7(0x179)})['start'](),_0x37ab11=execRemoveOldArtifacts(_0x485497[_0x4436c7(0x17c)]);_0x38d8a1[_0x4436c7(0x198)](_0x37ab11),_0x20224e[_0x37ab11['ok']?_0x4436c7(0x140):_0x4436c7(0x139)](_0x4436c7(0x199)+(_0x37ab11[_0x4436c7(0x14a)]??(_0x37ab11['ok']?'done':_0x4436c7(0x165))));const _0x323522=a152_0xf3a2d9({'text':_0x4436c7(0x1a2),'color':_0x4436c7(0x179)})['start'](),_0x26b729=execCleanMcp(_0x485497);_0x38d8a1[_0x4436c7(0x198)](_0x26b729),_0x323522[_0x26b729['ok']?_0x4436c7(0x140):_0x4436c7(0x139)](_0x4436c7(0x1a6)+(_0x26b729[_0x4436c7(0x14a)]??(_0x26b729['ok']?'done':_0x4436c7(0x165))));const _0x4e87c3=a152_0xf3a2d9({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x4436c7(0x179)})[_0x4436c7(0x192)](),_0x561d65=execSkillsRemove(_0x1194a4,_0x11ba5a);_0x38d8a1[_0x4436c7(0x198)](_0x561d65),_0x4e87c3[_0x561d65['ok']?_0x4436c7(0x140):_0x4436c7(0x139)]('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x561d65[_0x4436c7(0x14a)]??(_0x561d65['ok']?'done':'failed')));const _0x19de06=a152_0xf3a2d9({'text':_0x4436c7(0x19d),'color':'cyan'})['start'](),_0x176b94=execSkillsAdd(_0x1194a4,_0x11ba5a);_0x38d8a1[_0x4436c7(0x198)](_0x176b94),_0x19de06[_0x176b94['ok']?'succeed':_0x4436c7(0x139)](_0x4436c7(0x16e)+(_0x176b94[_0x4436c7(0x14a)]??(_0x176b94['ok']?_0x4436c7(0x155):_0x4436c7(0x165))));const _0x3c8b51=a152_0xf3a2d9({'text':_0x4436c7(0x180),'color':_0x4436c7(0x179)})['start'](),_0x49ae2e=execUpgradeSdk(_0x485497);_0x38d8a1[_0x4436c7(0x198)](_0x49ae2e),_0x3c8b51[_0x49ae2e['ok']?_0x4436c7(0x140):_0x4436c7(0x139)](_0x4436c7(0x17a)+(_0x49ae2e[_0x4436c7(0x14a)]??(_0x49ae2e['ok']?_0x4436c7(0x155):_0x4436c7(0x165)))),printSummary(_0x38d8a1);const _0x529c37=_0x38d8a1['some'](_0xa1a936=>!_0xa1a936['ok']);_0x529c37?console[_0x4436c7(0x147)](a152_0x252ba0[_0x4436c7(0x156)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x4436c7(0x147)](a152_0x252ba0[_0x4436c7(0x1a3)](_0x4436c7(0x161))),_0x49ae2e['ok']&&_0x485497[_0x4436c7(0x151)]&&(console[_0x4436c7(0x147)](''),console[_0x4436c7(0x147)](a152_0x252ba0[_0x4436c7(0x149)][_0x4436c7(0x179)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x4436c7(0x147)](a152_0x252ba0[_0x4436c7(0x179)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console['log'](''),console['log'](a152_0x252ba0['white'](_0x4436c7(0x19e))),console[_0x4436c7(0x147)](a152_0x252ba0['white'](_0x4436c7(0x16b))),console[_0x4436c7(0x147)](a152_0x252ba0[_0x4436c7(0x17e)](_0x4436c7(0x195))),console['log'](''));}
|
|
1
|
+
(function(_0x137b80,_0x1b9fd6){const _0xf99e6a=a153_0xceae,_0x2a170f=_0x137b80();while(!![]){try{const _0xb97df9=parseInt(_0xf99e6a(0x10f))/0x1+-parseInt(_0xf99e6a(0x13b))/0x2*(-parseInt(_0xf99e6a(0x149))/0x3)+parseInt(_0xf99e6a(0x170))/0x4*(parseInt(_0xf99e6a(0x13c))/0x5)+-parseInt(_0xf99e6a(0x165))/0x6*(parseInt(_0xf99e6a(0x12f))/0x7)+parseInt(_0xf99e6a(0x152))/0x8+-parseInt(_0xf99e6a(0x18a))/0x9+parseInt(_0xf99e6a(0x14a))/0xa;if(_0xb97df9===_0x1b9fd6)break;else _0x2a170f['push'](_0x2a170f['shift']());}catch(_0x13dc3f){_0x2a170f['push'](_0x2a170f['shift']());}}}(a153_0x3e9f,0x262b6));import a153_0x895096 from'chalk';import a153_0x31d6bd 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';function a153_0xceae(_0x23ad7a,_0x1f79d2){_0x23ad7a=_0x23ad7a-0x10e;const _0x3e9f6f=a153_0x3e9f();let _0xceae1e=_0x3e9f6f[_0x23ad7a];return _0xceae1e;}const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x5f5876=>_0x5f5876!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0xb38e46){const _0x302c90=a153_0xceae,_0x313b47=[];for(const _0x207421 of Object[_0x302c90(0x180)](CORE_IDE_CONFIGS)){if(_0x207421['files'])for(const _0x496a78 of _0x207421[_0x302c90(0x15c)]){_0x313b47[_0x302c90(0x142)](resolve(_0xb38e46,_0x496a78[_0x302c90(0x17f)]));}}return _0x313b47;}function analyse(_0x5033c8){const _0x559b66=a153_0xceae;let _0x23cade=null;const _0x5cca36=resolve(_0x5033c8,NEW_CONFIG_NAME),_0x1c75e7=existsSync(_0x5cca36);for(const _0x288164 of LEGACY_CONFIG_NAMES){const _0x50ddc9=resolve(_0x5033c8,_0x288164);if(existsSync(_0x50ddc9)){const _0x3c995e=readConfigFile(_0x50ddc9),_0x4b8c39=Object[_0x559b66(0x179)](_0x3c995e)[_0x559b66(0x11b)](_0x612ef8=>typeof _0x3c995e[_0x612ef8]!==_0x559b66(0x18d));_0x23cade={'oldPath':_0x50ddc9,'hasNewConfig':_0x1c75e7,'fields':_0x4b8c39};break;}}const _0x4443a0=[],_0x15bc7d=resolve(_0x5033c8,'.lovrabet');if(existsSync(_0x15bc7d))_0x4443a0[_0x559b66(0x142)](_0x15bc7d);const _0x24ec65=resolve(_0x5033c8,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x24ec65))_0x4443a0[_0x559b66(0x142)](_0x24ec65);const _0x954260=resolve(_0x5033c8,_0x559b66(0x13e));if(existsSync(_0x954260))_0x4443a0[_0x559b66(0x142)](_0x954260);for(const _0x1b6fad of collectIdeSkillFiles(_0x5033c8)){if(existsSync(_0x1b6fad))_0x4443a0[_0x559b66(0x142)](_0x1b6fad);}let _0x440f7b=null;const _0x23800e=resolve(_0x5033c8,_0x559b66(0x148));if(existsSync(_0x23800e))try{const _0x18b337=JSON[_0x559b66(0x144)](readFileSync(_0x23800e,_0x559b66(0x167)));if(_0x18b337?.[_0x559b66(0x15f)]&&typeof _0x18b337['mcpServers']===_0x559b66(0x14b)){const _0x464047=[];for(const [_0x5fcc85,_0x968fc0]of Object[_0x559b66(0x10e)](_0x18b337[_0x559b66(0x15f)])){const _0x5aa368=_0x968fc0;_0x5aa368?.[_0x559b66(0x182)]&&Array[_0x559b66(0x15d)](_0x5aa368[_0x559b66(0x182)])&&_0x5aa368[_0x559b66(0x182)]['some'](_0x5b5c25=>typeof _0x5b5c25===_0x559b66(0x112)&&_0x5b5c25[_0x559b66(0x12d)]('@lovrabet/dataset-mcp-server'))&&_0x464047[_0x559b66(0x142)](_0x5fcc85);}_0x464047[_0x559b66(0x134)]>0x0&&(_0x440f7b={'path':_0x23800e,'keys':_0x464047});}}catch{}const _0x55c926=_0x4443a0[_0x559b66(0x134)]>0x0||_0x23cade!==null;let _0x29978d=null;const _0x35c496=resolve(_0x5033c8,_0x559b66(0x17b));if(existsSync(_0x35c496))try{const _0x3af10a=JSON[_0x559b66(0x144)](readFileSync(_0x35c496,_0x559b66(0x167)));for(const _0xc750aa of['dependencies',_0x559b66(0x121)]){const _0x2b5a1d=_0x3af10a?.[_0xc750aa]?.['@lovrabet/sdk'];if(typeof _0x2b5a1d===_0x559b66(0x112)){_0x2b5a1d!=='latest'&&(_0x29978d={'pkgPath':_0x35c496,'currentVersion':_0x2b5a1d,'field':_0xc750aa});break;}}}catch{}return{'configMigration':_0x23cade,'oldArtifacts':_0x4443a0,'oldMcpConfig':_0x440f7b,'needsSkillSwap':_0x55c926,'sdkUpgrade':_0x29978d};}function printReport(_0x12929d){const _0x2fd230=a153_0xceae,{configMigration:_0x2b0a9a,oldArtifacts:_0xd4badc,oldMcpConfig:_0x4b342e,needsSkillSwap:_0x29a679}=_0x12929d;console['log'](''),console[_0x2fd230(0x110)](a153_0x895096['bold'](_0x2fd230(0x16b))),console[_0x2fd230(0x110)]('');_0x2b0a9a?(console['log'](a153_0x895096[_0x2fd230(0x175)](_0x2fd230(0x154))+('\x20\x20'+a153_0x895096[_0x2fd230(0x11a)](_0x2b0a9a['oldPath']))),console['log'](_0x2fd230(0x129)+(_0x2b0a9a[_0x2fd230(0x120)]?a153_0x895096['green'](_0x2fd230(0x14c)):a153_0x895096['gray'](_0x2fd230(0x164)))),console['log'](_0x2fd230(0x169)+_0x2b0a9a[_0x2fd230(0x161)][_0x2fd230(0x12e)](',\x20')),console[_0x2fd230(0x110)]('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x2fd230(0x110)](a153_0x895096['cyan'](_0x2fd230(0x154))+'\x20\x20'+a153_0x895096['gray'](_0x2fd230(0x18e)));console[_0x2fd230(0x110)]('');if(_0xd4badc[_0x2fd230(0x134)]>0x0){console[_0x2fd230(0x110)](a153_0x895096[_0x2fd230(0x175)]('Legacy\x20artifacts:'));for(const _0x3dbd8f of _0xd4badc){console[_0x2fd230(0x110)]('\x20\x20'+a153_0x895096[_0x2fd230(0x156)](_0x2fd230(0x16a))+'\x20\x20'+_0x3dbd8f);}console[_0x2fd230(0x110)](_0x2fd230(0x186));}else console['log'](a153_0x895096['cyan']('Legacy\x20artifacts:')+'\x20\x20'+a153_0x895096[_0x2fd230(0x139)]('none\x20found'));console[_0x2fd230(0x110)]('');_0x4b342e?(console[_0x2fd230(0x110)](a153_0x895096[_0x2fd230(0x175)](_0x2fd230(0x113))+('\x20\x20'+a153_0x895096[_0x2fd230(0x11a)](_0x4b342e[_0x2fd230(0x17f)])+_0x2fd230(0x11e)+_0x4b342e[_0x2fd230(0x179)]['join'](',\x20'))),console[_0x2fd230(0x110)](_0x2fd230(0x153))):console['log'](a153_0x895096['cyan'](_0x2fd230(0x113))+'\x20\x20'+a153_0x895096[_0x2fd230(0x139)](_0x2fd230(0x157)));console['log'](''),console['log'](a153_0x895096[_0x2fd230(0x175)](_0x2fd230(0x126))+('\x20\x20'+(_0x29a679?a153_0x895096[_0x2fd230(0x11a)](_0x2fd230(0x11f)):a153_0x895096['green'](_0x2fd230(0x174)))));_0x29a679&&console[_0x2fd230(0x110)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x12929d['sdkUpgrade']){const {currentVersion:_0x184c9f,field:_0x2dfec6,pkgPath:_0x4107e5}=_0x12929d[_0x2fd230(0x114)];console[_0x2fd230(0x110)](a153_0x895096[_0x2fd230(0x175)](_0x2fd230(0x151))+('\x20\x20'+a153_0x895096[_0x2fd230(0x11a)](_0x4107e5))),console[_0x2fd230(0x110)](_0x2fd230(0x115)+_0x2dfec6+':\x20'+a153_0x895096[_0x2fd230(0x11a)](_0x184c9f)+_0x2fd230(0x137)+a153_0x895096[_0x2fd230(0x143)](_0x2fd230(0x116))),console[_0x2fd230(0x110)](_0x2fd230(0x135));}else console[_0x2fd230(0x110)](a153_0x895096[_0x2fd230(0x175)](_0x2fd230(0x151))+'\x20\x20'+a153_0x895096[_0x2fd230(0x139)](_0x2fd230(0x123)));console[_0x2fd230(0x110)]('');}function execConfigMigration(_0x25a871,_0x5dcc2e){const _0x2e6e45=a153_0xceae,{configMigration:_0x551079}=_0x25a871;if(!_0x551079?.[_0x2e6e45(0x14f)])return{'step':0x1,'label':_0x2e6e45(0x14e),'ok':!![],'detail':_0x2e6e45(0x181)};const _0x313aab=readConfigFile(_0x551079['oldPath']),_0xcd500e=resolve(_0x5dcc2e,NEW_CONFIG_NAME),_0x39f366=_0x551079[_0x2e6e45(0x120)]?readConfigFile(_0xcd500e):{};for(const [_0x2a2e44,_0x5a42f4]of Object['entries'](_0x313aab)){!(_0x2a2e44 in _0x39f366)&&(_0x39f366[_0x2a2e44]=_0x5a42f4);}writeConfigFile(_0xcd500e,_0x39f366);const _0x4457cd=_0x551079[_0x2e6e45(0x14f)]+'.bak';return renameSync(_0x551079[_0x2e6e45(0x14f)],_0x4457cd),{'step':0x1,'label':_0x2e6e45(0x14e),'ok':!![],'detail':_0x551079[_0x2e6e45(0x14f)]+_0x2e6e45(0x137)+_0xcd500e+_0x2e6e45(0x159)+_0x4457cd+')'};}function execRemoveOldArtifacts(_0x21363c){const _0x1da56c=a153_0xceae,_0x11a81b=[];for(const _0xa01b10 of _0x21363c){try{if(!existsSync(_0xa01b10))continue;const _0x162a18=tryStat(_0xa01b10);_0x162a18?.[_0x1da56c(0x12c)]()?rmSync(_0xa01b10,{'recursive':!![],'force':!![]}):unlinkSync(_0xa01b10);}catch(_0x318843){_0x11a81b[_0x1da56c(0x142)](_0xa01b10+':\x20'+_0x318843[_0x1da56c(0x13d)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x11a81b[_0x1da56c(0x134)]===0x0,'detail':_0x11a81b[_0x1da56c(0x134)]>0x0?_0x21363c[_0x1da56c(0x134)]-_0x11a81b[_0x1da56c(0x134)]+'/'+_0x21363c[_0x1da56c(0x134)]+_0x1da56c(0x133)+_0x11a81b[_0x1da56c(0x12e)](';\x20')+')':_0x21363c[_0x1da56c(0x134)]+_0x1da56c(0x173)};}function execCleanMcp(_0x4c8bb1){const _0x16f671=a153_0xceae;if(!_0x4c8bb1[_0x16f671(0x171)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x16f671(0x184)};try{const _0x2ff3a3=readFileSync(_0x4c8bb1[_0x16f671(0x171)][_0x16f671(0x17f)],_0x16f671(0x167)),_0x4cb1a1=JSON[_0x16f671(0x144)](_0x2ff3a3);if(_0x4cb1a1?.[_0x16f671(0x15f)]&&typeof _0x4cb1a1[_0x16f671(0x15f)]===_0x16f671(0x14b)){const _0x1b8b0f=[];for(const [_0x22bd2f,_0x58ac7d]of Object[_0x16f671(0x10e)](_0x4cb1a1[_0x16f671(0x15f)])){_0x58ac7d?.[_0x16f671(0x182)]&&Array[_0x16f671(0x15d)](_0x58ac7d[_0x16f671(0x182)])&&_0x58ac7d['args'][_0x16f671(0x119)](_0x8b4c2a=>typeof _0x8b4c2a===_0x16f671(0x112)&&_0x8b4c2a[_0x16f671(0x12d)](_0x16f671(0x127)))&&_0x1b8b0f['push'](_0x22bd2f);}for(const _0x321c5f of _0x1b8b0f){delete _0x4cb1a1['mcpServers'][_0x321c5f];}return _0x1b8b0f[_0x16f671(0x134)]>0x0&&writeFileSync(_0x4c8bb1[_0x16f671(0x171)][_0x16f671(0x17f)],JSON['stringify'](_0x4cb1a1,null,0x2)+'\x0a',_0x16f671(0x167)),{'step':0x4,'label':_0x16f671(0x163),'ok':!![],'detail':'removed\x20'+_0x1b8b0f[_0x16f671(0x12e)](',\x20')+'\x20from\x20'+_0x4c8bb1[_0x16f671(0x171)][_0x16f671(0x17f)]};}return{'step':0x4,'label':_0x16f671(0x163),'ok':!![],'detail':_0x16f671(0x147)};}catch(_0x5dac1b){return{'step':0x4,'label':_0x16f671(0x163),'ok':![],'detail':_0x5dac1b[_0x16f671(0x13d)]};}}function execSkillsRemove(_0x3deeb4,_0x44264a){const _0x3ace4a=a153_0xceae,_0x3bd456=runNpxSkillsRemove(_0x3deeb4,{'stdio':'inherit','yes':_0x44264a});return{'step':0x5,'label':_0x3ace4a(0x16c),'ok':_0x3bd456['ok'],'detail':_0x3bd456['ok']?_0x3ace4a(0x166):_0x3bd456[_0x3ace4a(0x189)]??_0x3ace4a(0x145)+_0x3bd456[_0x3ace4a(0x13f)]};}function a153_0x3e9f(){const _0x34173d=['needed','hasNewConfig','devDependencies','step','not\x20found\x20or\x20already\x20at\x20latest','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','done','Skill\x20swap:','@lovrabet/dataset-mcp-server','FAIL','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Step\x204/7:\x20MCP\x20config\x20—\x20','Upgrade\x20cancelled.','isDirectory','includes','join','1939TmAvgC','\x20\x20Step\x20','oldArtifacts','Step\x206/7:\x20Installing\x20new\x20skill...','\x20removed\x20(','length','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','Upgrade\x20completed\x20successfully!','\x20→\x20','bold','gray','needsSkillSwap','278dycomD','5jMuNKG','message','.claude/skills/lovrabet','status','lovrabet/rabetbase\x20installed\x20globally','Remove\x20.lovrabet/','push','green','parse','exit\x20','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','no\x20matching\x20entry\x20found','.cursor/mcp.json','3150QFieVr','2370780DxxJeh','object','already\x20exists\x20(will\x20merge)','Upgrade\x20@lovrabet/sdk','Config\x20migration','oldPath','Step\x204/7:\x20Cleaning\x20MCP\x20config...','@lovrabet/sdk:','406464CqdrGN','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Config\x20file:','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','red','no\x20legacy\x20entry','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','\x20(backup:\x20','start','[\x22@lovrabet/sdk\x22]:\x20','files','isArray','lovrabet/rabetbase','mcpServers','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','fields','detail','Clean\x20MCP\x20config','not\x20found\x20(will\x20create)','6294IiyCJO','lovrabet/lovrabet-skill\x20removed','utf8','Step\x205/7:\x20Removing\x20old\x20skill...','\x20\x20Fields\x20to\x20migrate:\x20','FOUND','===\x20Upgrade\x20Analysis\x20===','Remove\x20old\x20skill','succeed','===\x20Upgrade\x20Summary\x20===','\x20→\x20latest','840916ESrkRj','oldMcpConfig','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','\x20removed','not\x20needed','cyan','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','\x20\x20#\x20or','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','keys','white','package.json','failed','configMigration','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','path','values','skipped\x20(no\x20legacy\x20config)','args','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','skipped','\x20\x20bun\x20install','\x20\x20Action:\x20delete','info','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','error','2758986XYgAjD','@lovrabet/sdk','CANCEL','undefined','no\x20legacy\x20config\x20found','entries','109404oksVNR','log','Step\x201/7:\x20Config\x20migration\x20—\x20','string','MCP\x20config:','sdkUpgrade','\x20\x20Current\x20version\x20in\x20','latest','cwd','fail','some','yellow','filter','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Install\x20new\x20skill','\x20→\x20keys:\x20'];a153_0x3e9f=function(){return _0x34173d;};return a153_0x3e9f();}function execSkillsAdd(_0x2ceacd,_0x44c0f1){const _0x572448=a153_0xceae,_0xa9eb3e=runNpxSkillsAddGlobal(_0x2ceacd,_0x572448(0x15e),{'stdio':'inherit','yes':_0x44c0f1});return{'step':0x6,'label':_0x572448(0x11d),'ok':_0xa9eb3e['ok'],'detail':_0xa9eb3e['ok']?_0x572448(0x140):_0xa9eb3e[_0x572448(0x189)]??'exit\x20'+_0xa9eb3e[_0x572448(0x13f)]};}function execUpgradeSdk(_0x2ac850){const _0x2afd0b=a153_0xceae;if(!_0x2ac850[_0x2afd0b(0x114)])return{'step':0x7,'label':_0x2afd0b(0x14d),'ok':!![],'detail':_0x2afd0b(0x178)};const {pkgPath:_0x3bb55f,currentVersion:_0x6ed49b,field:_0x422eea}=_0x2ac850['sdkUpgrade'];try{const _0x19108f=readFileSync(_0x3bb55f,'utf8'),_0x1a292d=JSON[_0x2afd0b(0x144)](_0x19108f);return _0x1a292d[_0x422eea][_0x2afd0b(0x18b)]='latest',writeFileSync(_0x3bb55f,JSON['stringify'](_0x1a292d,null,0x2)+'\x0a',_0x2afd0b(0x167)),{'step':0x7,'label':_0x2afd0b(0x14d),'ok':!![],'detail':_0x422eea+_0x2afd0b(0x15b)+_0x6ed49b+_0x2afd0b(0x16f)};}catch(_0x4e84e9){return{'step':0x7,'label':_0x2afd0b(0x14d),'ok':![],'detail':_0x4e84e9[_0x2afd0b(0x13d)]};}}function tryStat(_0x7c0bdf){try{return statSync(_0x7c0bdf);}catch{return undefined;}}function printSummary(_0x30910e){const _0x6bb010=a153_0xceae;console[_0x6bb010(0x110)](''),console['log'](a153_0x895096[_0x6bb010(0x138)](_0x6bb010(0x16e))),console['log']('');for(const _0x9ded70 of _0x30910e){const _0x37e858=_0x9ded70['ok']?a153_0x895096[_0x6bb010(0x143)]('OK'):a153_0x895096['red'](_0x6bb010(0x128));console[_0x6bb010(0x110)]('\x20\x20'+_0x37e858+_0x6bb010(0x130)+_0x9ded70[_0x6bb010(0x122)]+':\x20'+_0x9ded70['label']);if(_0x9ded70[_0x6bb010(0x162)])console[_0x6bb010(0x110)]('\x20\x20\x20\x20\x20\x20\x20'+a153_0x895096['gray'](_0x9ded70['detail']));}console[_0x6bb010(0x110)]('');}export async function upgradeApp(_0x426a56,_0x840105){const _0x213308=a153_0xceae,_0x37d83b=process[_0x213308(0x117)](),_0x3e5e7a=analyse(_0x37d83b),_0xf7c31f=!_0x3e5e7a[_0x213308(0x17d)]&&_0x3e5e7a[_0x213308(0x131)]['length']===0x0&&!_0x3e5e7a[_0x213308(0x171)]&&!_0x3e5e7a[_0x213308(0x13a)]&&!_0x3e5e7a[_0x213308(0x114)];if(_0xf7c31f){console[_0x213308(0x110)](a153_0x895096[_0x213308(0x143)](_0x213308(0x183)));return;}printReport(_0x3e5e7a);const _0x492be8=!!(_0x840105['yes']||_0x840105['Y']||_0x426a56);if(!_0x492be8)try{const _0x2fcd09=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x2fcd09){console[_0x213308(0x110)](a153_0x895096[_0x213308(0x139)](_0x213308(0x12b)));return;}}catch(_0x1b9c11){if(_0x1b9c11?.[_0x213308(0x13d)]===_0x213308(0x18c)){console['log'](a153_0x895096[_0x213308(0x139)](_0x213308(0x12b)));return;}throw _0x1b9c11;}const _0x38f269=[],_0x198dbf=a153_0x31d6bd({'text':'Step\x201/7:\x20Migrating\x20config...','color':'cyan'})['start'](),_0x511bb7=execConfigMigration(_0x3e5e7a,_0x37d83b);_0x38f269[_0x213308(0x142)](_0x511bb7),_0x198dbf[_0x511bb7['ok']?'succeed':_0x213308(0x118)](_0x213308(0x111)+(_0x511bb7[_0x213308(0x162)]??(_0x511bb7['ok']?_0x213308(0x125):_0x213308(0x17c))));const _0x2a2e57=resolve(_0x37d83b,'.lovrabet'),_0x4eb122=a153_0x31d6bd({'text':_0x213308(0x188),'color':_0x213308(0x175)})[_0x213308(0x15a)]();if(existsSync(_0x2a2e57))try{rmSync(_0x2a2e57,{'recursive':!![],'force':!![]}),_0x4eb122[_0x213308(0x16d)](_0x213308(0x172)),_0x38f269[_0x213308(0x142)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x562c85){_0x4eb122['fail'](_0x213308(0x160)+_0x562c85['message']),_0x38f269['push']({'step':0x2,'label':_0x213308(0x141),'ok':![],'detail':_0x562c85['message']});}else _0x4eb122[_0x213308(0x187)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x38f269[_0x213308(0x142)]({'step':0x2,'label':_0x213308(0x141),'ok':!![],'detail':_0x213308(0x184)});const _0x5a6285=a153_0x31d6bd({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x213308(0x175)})['start'](),_0x442554=execRemoveOldArtifacts(_0x3e5e7a[_0x213308(0x131)]);_0x38f269[_0x213308(0x142)](_0x442554),_0x5a6285[_0x442554['ok']?_0x213308(0x16d):_0x213308(0x118)](_0x213308(0x158)+(_0x442554[_0x213308(0x162)]??(_0x442554['ok']?_0x213308(0x125):'failed')));const _0x40e3e4=a153_0x31d6bd({'text':_0x213308(0x150),'color':'cyan'})[_0x213308(0x15a)](),_0x3cf9a7=execCleanMcp(_0x3e5e7a);_0x38f269[_0x213308(0x142)](_0x3cf9a7),_0x40e3e4[_0x3cf9a7['ok']?_0x213308(0x16d):_0x213308(0x118)](_0x213308(0x12a)+(_0x3cf9a7[_0x213308(0x162)]??(_0x3cf9a7['ok']?_0x213308(0x125):_0x213308(0x17c))));const _0x41475d=a153_0x31d6bd({'text':_0x213308(0x168),'color':_0x213308(0x175)})['start'](),_0x21c0fc=execSkillsRemove(_0x37d83b,_0x492be8);_0x38f269[_0x213308(0x142)](_0x21c0fc),_0x41475d[_0x21c0fc['ok']?_0x213308(0x16d):_0x213308(0x118)](_0x213308(0x17e)+(_0x21c0fc[_0x213308(0x162)]??(_0x21c0fc['ok']?_0x213308(0x125):_0x213308(0x17c))));const _0x5a32a9=a153_0x31d6bd({'text':_0x213308(0x132),'color':'cyan'})[_0x213308(0x15a)](),_0x397f68=execSkillsAdd(_0x37d83b,_0x492be8);_0x38f269[_0x213308(0x142)](_0x397f68),_0x5a32a9[_0x397f68['ok']?'succeed':'fail'](_0x213308(0x155)+(_0x397f68[_0x213308(0x162)]??(_0x397f68['ok']?_0x213308(0x125):'failed')));const _0x7dda5=a153_0x31d6bd({'text':_0x213308(0x124),'color':'cyan'})[_0x213308(0x15a)](),_0x16302e=execUpgradeSdk(_0x3e5e7a);_0x38f269[_0x213308(0x142)](_0x16302e),_0x7dda5[_0x16302e['ok']?_0x213308(0x16d):_0x213308(0x118)](_0x213308(0x146)+(_0x16302e[_0x213308(0x162)]??(_0x16302e['ok']?'done':_0x213308(0x17c)))),printSummary(_0x38f269);const _0x49551e=_0x38f269['some'](_0x29df42=>!_0x29df42['ok']);_0x49551e?console[_0x213308(0x110)](a153_0x895096['yellow'](_0x213308(0x176))):console[_0x213308(0x110)](a153_0x895096[_0x213308(0x143)](_0x213308(0x136))),_0x16302e['ok']&&_0x3e5e7a[_0x213308(0x114)]&&(console[_0x213308(0x110)](''),console['log'](a153_0x895096[_0x213308(0x138)][_0x213308(0x175)](_0x213308(0x11c))),console[_0x213308(0x110)](a153_0x895096['cyan']('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x213308(0x110)](''),console[_0x213308(0x110)](a153_0x895096[_0x213308(0x17a)]('\x20\x20npm\x20install')),console[_0x213308(0x110)](a153_0x895096[_0x213308(0x17a)](_0x213308(0x177))),console[_0x213308(0x110)](a153_0x895096[_0x213308(0x17a)](_0x213308(0x185))),console['log'](''));}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a153_0x3ab4d6=a153_0xd86c;(function(_0x516b08,_0x5c5692){const _0x9d7ca5=a153_0xd86c,_0xd5561=_0x516b08();while(!![]){try{const _0x5d7332=parseInt(_0x9d7ca5(0x157))/0x1+-parseInt(_0x9d7ca5(0x16d))/0x2*(parseInt(_0x9d7ca5(0x140))/0x3)+-parseInt(_0x9d7ca5(0x165))/0x4*(parseInt(_0x9d7ca5(0x163))/0x5)+-parseInt(_0x9d7ca5(0x187))/0x6*(parseInt(_0x9d7ca5(0x166))/0x7)+parseInt(_0x9d7ca5(0x14a))/0x8+parseInt(_0x9d7ca5(0x184))/0x9*(parseInt(_0x9d7ca5(0x155))/0xa)+parseInt(_0x9d7ca5(0x182))/0xb;if(_0x5d7332===_0x5c5692)break;else _0xd5561['push'](_0xd5561['shift']());}catch(_0x3055d8){_0xd5561['push'](_0xd5561['shift']());}}}(a153_0x51a5,0x48565));import{apiDefinitions}from'../commands/api/index.js';function a153_0xd86c(_0x2f3aac,_0x337af5){_0x2f3aac=_0x2f3aac-0x13c;const _0x51a54a=a153_0x51a5();let _0xd86c1c=_0x51a54a[_0x2f3aac];return _0xd86c1c;}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{taskDefinitions}from'../commands/task/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{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';function a153_0x51a5(){const _0x56ca3d=['description','auth','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','filter','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','skills','Project','4088770JERZyK','Self\x20Update','286969LEtRoB','skill\x20','build','show','Code\x20Generation','Instant\x20API','run','Schema','Menu','Dataset\x20&\x20Operations','get','from','824185iwpGJr','start','4TWndMs','406833dtihnm','values','API\x20Development','Authentication','SQL\x20Queries','set','create','854018EKvSKI','app\x20use','risk','Async\x20Tasks','remote','\x20\x20[high-risk-write]','logout','use','Diagnostics','has','Database\x20Connections','map','hidden','BFF\x20Scripts','`rabetbase\x20skills`\x20has\x20been\x20removed.','Logs','Roles','Quick\x20Start','CLI\x20Built-in\x20Skill','preview','isSingleCommand','1560207fDgDMm','<script>','9kIECdx','Platform\x20Issue','command','48fqzrBv','`\x20has\x20been\x20removed.','install','defaultCommand','Runtime\x20App\x20Config\x20Management','File','commands','length','3SYQrYI','`rabetbase\x20','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','project','Notification\x20Configuration','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','service','wildcardDef','app\x20remote','Smart\x20List\x20Pages','4123264PAUpFz','app','push','Workspace'];a153_0x51a5=function(){return _0x56ca3d;};return a153_0x51a5();}import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/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(_0xde5eda){const _0x59dd5c=a153_0xd86c;for(const _0x4c06aa of _0xde5eda){definitions['set'](_0x4c06aa[_0x59dd5c(0x146)]+':'+_0x4c06aa[_0x59dd5c(0x186)],_0x4c06aa);let _0x1b103d=serviceGroups[_0x59dd5c(0x161)](_0x4c06aa['service']);!_0x1b103d&&(_0x1b103d=[],serviceGroups[_0x59dd5c(0x16b)](_0x4c06aa[_0x59dd5c(0x146)],_0x1b103d)),_0x1b103d[_0x59dd5c(0x14c)](_0x4c06aa);}}function registerDeclarativeService(_0x1479b0,_0xdc3bb7,_0x351bc3){const _0xf7b37a=a153_0xd86c;registerDefinitions(_0xdc3bb7);_0x351bc3?.[_0xf7b37a(0x147)]&®isterDefinitions([_0x351bc3[_0xf7b37a(0x147)]]);const _0x15f384=_0x1be544=>_0x1be544==='read'?'':_0x1be544==='write'?'\x20\x20[write]':_0xf7b37a(0x172),_0x2a17a4={'service':_0xdc3bb7[0x0][_0xf7b37a(0x146)],'label':_0x1479b0,'commands':_0xdc3bb7[_0xf7b37a(0x151)](_0x402825=>!_0x402825[_0xf7b37a(0x179)])[_0xf7b37a(0x178)](_0x265bcd=>({'command':_0x265bcd['command'],'description':_0x265bcd[_0xf7b37a(0x14e)],'tag':_0x15f384(_0x265bcd[_0xf7b37a(0x16f)])})),'declarative':!![],'defaultCommand':_0x351bc3?.[_0xf7b37a(0x18a)]??(_0x351bc3?.[_0xf7b37a(0x181)]?_0xdc3bb7[0x0][_0xf7b37a(0x186)]:undefined),'wildcardDef':_0x351bc3?.['wildcardDef'],'isSingleCommand':_0x351bc3?.[_0xf7b37a(0x181)]};serviceRegistry[_0xf7b37a(0x14c)](_0x2a17a4),serviceByName[_0xf7b37a(0x16b)](_0x2a17a4[_0xf7b37a(0x146)],_0x2a17a4);}registerDeclarativeService(a153_0x3ab4d6(0x17e),initDefinitions,{'defaultCommand':a153_0x3ab4d6(0x15d),'isSingleCommand':!![]}),registerDeclarativeService(a153_0x3ab4d6(0x154),projectDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x14d),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x169),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a153_0x3ab4d6(0x160),datasetDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x149),pageDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x168),apiDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x15c),dataDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x17a),bffDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x144),notificationDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x16a),sqlDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x177),dbDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x15f),menuDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x170),taskDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x17d),roleDefinitions),registerDeclarativeService('Permissions',permitDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x13c),appConfigDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x185),issueDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x13d),fileDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x15b),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a153_0x3ab4d6(0x175),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a153_0x3ab4d6(0x15e),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a153_0x3ab4d6(0x156),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a153_0x3ab4d6(0x17f),cliSkillDefinitions,{'defaultCommand':a153_0x3ab4d6(0x189)}),registerDeclarativeService(a153_0x3ab4d6(0x17c),logsDefinitions,{'defaultCommand':a153_0x3ab4d6(0x15a)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a153_0x3ab4d6(0x13f)]-0x1];last[a153_0x3ab4d6(0x13e)]=[{'command':a153_0x3ab4d6(0x183),'description':'Run\x20any\x20package.json\x20script','tag':''}];}export const deprecatedAliases={'create':{'service':a153_0x3ab4d6(0x143),'command':a153_0x3ab4d6(0x16c)},'start':{'service':a153_0x3ab4d6(0x15d),'command':a153_0x3ab4d6(0x164)},'build':{'service':a153_0x3ab4d6(0x15d),'command':a153_0x3ab4d6(0x159)},'preview':{'service':'run','command':a153_0x3ab4d6(0x180)},'logout':{'service':a153_0x3ab4d6(0x14f),'command':a153_0x3ab4d6(0x173)}};const CLI_SKILL_INSTALL_REMOVED_HINT=a153_0x3ab4d6(0x145),APP_REMOTE_REMOVED_HINT=a153_0x3ab4d6(0x152),APP_USE_REMOVED_HINT=a153_0x3ab4d6(0x142);export function resolveRemovedCommand(_0x4e9cde,_0x375e5b){const _0xb8d6c3=a153_0x3ab4d6;if(_0x4e9cde==='skill'){const _0x39aea9=_0x375e5b?_0xb8d6c3(0x158)+_0x375e5b:'skill';return{'command':_0x39aea9,'message':_0xb8d6c3(0x141)+_0x39aea9+_0xb8d6c3(0x188),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x4e9cde===_0xb8d6c3(0x153))return{'command':_0xb8d6c3(0x153),'message':_0xb8d6c3(0x17b),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x4e9cde===_0xb8d6c3(0x14b)&&_0x375e5b===_0xb8d6c3(0x171))return{'command':_0xb8d6c3(0x148),'message':_0xb8d6c3(0x150),'hint':APP_REMOTE_REMOVED_HINT};if(_0x4e9cde==='app'&&_0x375e5b===_0xb8d6c3(0x174))return{'command':_0xb8d6c3(0x16e),'message':'`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':a153_0x3ab4d6(0x16c)}};export function resolveDeprecatedSubcommand(_0x1ece8e,_0xdeaf88){return deprecatedSubcommands[_0x1ece8e]?.[_0xdeaf88];}export function findDefinition(_0x39eee6,_0x2129cb){const _0x34cf6b=a153_0x3ab4d6;return definitions[_0x34cf6b(0x161)](_0x39eee6+':'+_0x2129cb);}export function isKnownService(_0x5cef1b){return serviceByName['has'](_0x5cef1b);}export function isDeclarativeService(_0x1f7654){const _0x499c8a=a153_0x3ab4d6;return serviceGroups[_0x499c8a(0x176)](_0x1f7654)||serviceByName[_0x499c8a(0x161)](_0x1f7654)?.[_0x499c8a(0x147)]!==undefined;}export function getServiceEntry(_0x1b2122){const _0x53436b=a153_0x3ab4d6;return serviceByName[_0x53436b(0x161)](_0x1b2122);}export function getLegacyHandler(_0x35fd70,_0x53af47){return undefined;}export function getAllDefinitions(){const _0xb7bb57=a153_0x3ab4d6;return Array[_0xb7bb57(0x162)](definitions[_0xb7bb57(0x167)]());}
|
|
1
|
+
const a154_0x1ff2aa=a154_0x21ec;(function(_0x376b6e,_0x33fb76){const _0x4b8214=a154_0x21ec,_0x7919c1=_0x376b6e();while(!![]){try{const _0x37b89b=parseInt(_0x4b8214(0x1b4))/0x1*(parseInt(_0x4b8214(0x19f))/0x2)+parseInt(_0x4b8214(0x1b7))/0x3*(parseInt(_0x4b8214(0x19b))/0x4)+parseInt(_0x4b8214(0x1bb))/0x5*(parseInt(_0x4b8214(0x188))/0x6)+parseInt(_0x4b8214(0x1b0))/0x7+-parseInt(_0x4b8214(0x18d))/0x8*(parseInt(_0x4b8214(0x181))/0x9)+parseInt(_0x4b8214(0x1bf))/0xa+-parseInt(_0x4b8214(0x17f))/0xb;if(_0x37b89b===_0x33fb76)break;else _0x7919c1['push'](_0x7919c1['shift']());}catch(_0x506a32){_0x7919c1['push'](_0x7919c1['shift']());}}}(a154_0x44f2,0x37d19));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{taskDefinitions}from'../commands/task/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{notificationDefinitions}from'../commands/notification/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{fileDefinitions}from'../commands/file/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 a154_0x44f2(){const _0x56c7ff=['CLI\x20Built-in\x20Skill','20gGmQoc','run','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','command','2277450OgZXTX','map','risk','File','Workspace','use','wildcardDef','app','Notification\x20Configuration','length','defaultCommand','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','Permissions','10428440uSclot','from','27iYPudX','set','`\x20has\x20been\x20removed.','login','Diagnostics','has','Roles','502746sPiQLx','<script>','values','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','filter','393288epfWVo','`rabetbase\x20','Self\x20Update','Async\x20Tasks','write','build','Project','Schema','get','auth','Database\x20Connections','show','service','Code\x20Generation','4fdSkPp','Menu','Authentication','skills','12RvDlfc','\x20\x20[write]','create','preview','Smart\x20List\x20Pages','remote','skill\x20','install','Platform\x20Issue','read','Dataset\x20&\x20Operations','Logs','app\x20use','push','API\x20Development','description','Instant\x20API','3085264xJlfGV','app\x20remote','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','Quick\x20Start','41802onVDvB','\x20\x20[high-risk-write]','commands','209049VzjEnk','Configuration','skill'];a154_0x44f2=function(){return _0x56c7ff;};return a154_0x44f2();}function registerDefinitions(_0x51533b){const _0x361a43=a154_0x21ec;for(const _0x318179 of _0x51533b){definitions[_0x361a43(0x182)](_0x318179[_0x361a43(0x199)]+':'+_0x318179[_0x361a43(0x1be)],_0x318179);let _0x3733b6=serviceGroups['get'](_0x318179['service']);!_0x3733b6&&(_0x3733b6=[],serviceGroups[_0x361a43(0x182)](_0x318179[_0x361a43(0x199)],_0x3733b6)),_0x3733b6[_0x361a43(0x1ac)](_0x318179);}}function registerDeclarativeService(_0x300e41,_0x3f8ac9,_0x1b278e){const _0xaff232=a154_0x21ec;registerDefinitions(_0x3f8ac9);_0x1b278e?.[_0xaff232(0x1c5)]&®isterDefinitions([_0x1b278e['wildcardDef']]);const _0x1ff4ea=_0x4b27b0=>_0x4b27b0===_0xaff232(0x1a8)?'':_0x4b27b0===_0xaff232(0x191)?_0xaff232(0x1a0):_0xaff232(0x1b5),_0x4ee141={'service':_0x3f8ac9[0x0][_0xaff232(0x199)],'label':_0x300e41,'commands':_0x3f8ac9[_0xaff232(0x18c)](_0x405560=>!_0x405560['hidden'])[_0xaff232(0x1c0)](_0x40ffec=>({'command':_0x40ffec[_0xaff232(0x1be)],'description':_0x40ffec[_0xaff232(0x1ae)],'tag':_0x1ff4ea(_0x40ffec[_0xaff232(0x1c1)])})),'declarative':!![],'defaultCommand':_0x1b278e?.[_0xaff232(0x1c9)]??(_0x1b278e?.['isSingleCommand']?_0x3f8ac9[0x0][_0xaff232(0x1be)]:undefined),'wildcardDef':_0x1b278e?.[_0xaff232(0x1c5)],'isSingleCommand':_0x1b278e?.['isSingleCommand']};serviceRegistry['push'](_0x4ee141),serviceByName['set'](_0x4ee141['service'],_0x4ee141);}registerDeclarativeService(a154_0x1ff2aa(0x1b3),initDefinitions,{'defaultCommand':a154_0x1ff2aa(0x1bc),'isSingleCommand':!![]}),registerDeclarativeService(a154_0x1ff2aa(0x193),projectDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1c3),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x19d),authDefinitions,{'defaultCommand':a154_0x1ff2aa(0x184)}),registerDeclarativeService(a154_0x1ff2aa(0x1a9),datasetDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1a3),pageDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1ad),apiDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1af),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1c7),notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x197),dbDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x19c),menuDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x190),taskDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x187),roleDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x17e),permitDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1a7),issueDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1c2),fileDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x19a),codegenDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1b8),configDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x185),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a154_0x1ff2aa(0x194),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a154_0x1ff2aa(0x18f),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a154_0x1ff2aa(0x1ba),cliSkillDefinitions,{'defaultCommand':a154_0x1ff2aa(0x1a6)}),registerDeclarativeService(a154_0x1ff2aa(0x1aa),logsDefinitions,{'defaultCommand':a154_0x1ff2aa(0x198)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a154_0x1ff2aa(0x1c8)]-0x1];last[a154_0x1ff2aa(0x1b6)]=[{'command':a154_0x1ff2aa(0x189),'description':'Run\x20any\x20package.json\x20script','tag':''}];}export const deprecatedAliases={'create':{'service':'project','command':a154_0x1ff2aa(0x1a1)},'start':{'service':a154_0x1ff2aa(0x1bc),'command':'start'},'build':{'service':a154_0x1ff2aa(0x1bc),'command':a154_0x1ff2aa(0x192)},'preview':{'service':'run','command':a154_0x1ff2aa(0x1a2)},'logout':{'service':a154_0x1ff2aa(0x196),'command':'logout'}};function a154_0x21ec(_0x595beb,_0x33b13f){_0x595beb=_0x595beb-0x17e;const _0x44f28c=a154_0x44f2();let _0x21eca2=_0x44f28c[_0x595beb];return _0x21eca2;}const CLI_SKILL_INSTALL_REMOVED_HINT=a154_0x1ff2aa(0x18b),APP_REMOTE_REMOVED_HINT=a154_0x1ff2aa(0x1bd),APP_USE_REMOVED_HINT=a154_0x1ff2aa(0x1b2);export function resolveRemovedCommand(_0x50f2c9,_0x5f27b0){const _0x5ddd17=a154_0x1ff2aa;if(_0x50f2c9===_0x5ddd17(0x1b9)){const _0x2d1a8f=_0x5f27b0?_0x5ddd17(0x1a5)+_0x5f27b0:_0x5ddd17(0x1b9);return{'command':_0x2d1a8f,'message':_0x5ddd17(0x18e)+_0x2d1a8f+_0x5ddd17(0x183),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x50f2c9===_0x5ddd17(0x19e))return{'command':_0x5ddd17(0x19e),'message':'`rabetbase\x20skills`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x50f2c9===_0x5ddd17(0x1c6)&&_0x5f27b0===_0x5ddd17(0x1a4))return{'command':_0x5ddd17(0x1b1),'message':_0x5ddd17(0x1ca),'hint':APP_REMOTE_REMOVED_HINT};if(_0x50f2c9===_0x5ddd17(0x1c6)&&_0x5f27b0===_0x5ddd17(0x1c4))return{'command':_0x5ddd17(0x1ab),'message':'`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':a154_0x1ff2aa(0x1a1)},'menu':{'update':'asset-update'}};export function resolveDeprecatedSubcommand(_0x2c1024,_0xcfe373){return deprecatedSubcommands[_0x2c1024]?.[_0xcfe373];}export function findDefinition(_0x1b3270,_0x10408d){const _0x1617d7=a154_0x1ff2aa;return definitions[_0x1617d7(0x195)](_0x1b3270+':'+_0x10408d);}export function isKnownService(_0x1405a1){const _0x4267a0=a154_0x1ff2aa;return serviceByName[_0x4267a0(0x186)](_0x1405a1);}export function isDeclarativeService(_0x19c1cf){const _0x499519=a154_0x1ff2aa;return serviceGroups[_0x499519(0x186)](_0x19c1cf)||serviceByName[_0x499519(0x195)](_0x19c1cf)?.[_0x499519(0x1c5)]!==undefined;}export function getServiceEntry(_0x435a7d){return serviceByName['get'](_0x435a7d);}export function getLegacyHandler(_0x2f0ed8,_0x59dd07){return undefined;}export function getAllDefinitions(){const _0x6113ec=a154_0x1ff2aa;return Array[_0x6113ec(0x180)](definitions[_0x6113ec(0x18a)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a155_0x29c059=a155_0x4d73;(function(_0x2537fc,_0x1878e3){const _0x54fbac=a155_0x4d73,_0x3783a8=_0x2537fc();while(!![]){try{const _0xc38d77=parseInt(_0x54fbac(0x1bc))/0x1*(-parseInt(_0x54fbac(0x1b1))/0x2)+-parseInt(_0x54fbac(0x1b3))/0x3*(parseInt(_0x54fbac(0x1ca))/0x4)+-parseInt(_0x54fbac(0x1c5))/0x5*(-parseInt(_0x54fbac(0x1bd))/0x6)+-parseInt(_0x54fbac(0x1be))/0x7*(-parseInt(_0x54fbac(0x1b7))/0x8)+parseInt(_0x54fbac(0x1b8))/0x9*(parseInt(_0x54fbac(0x1b9))/0xa)+-parseInt(_0x54fbac(0x1ac))/0xb+-parseInt(_0x54fbac(0x1c8))/0xc*(parseInt(_0x54fbac(0x1b6))/0xd);if(_0xc38d77===_0x1878e3)break;else _0x3783a8['push'](_0x3783a8['shift']());}catch(_0x4d2483){_0x3783a8['push'](_0x3783a8['shift']());}}}(a155_0x31ab,0xecdfa));function a155_0x31ab(){const _0xb38c72=['8042538waTsOP','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','CUSTOM','create','length','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','flagMissing','3201315pKtRLv','POST','write','25572hawfKs','trim','12WzpoAb','12317492jBQKrW','name','roleName','appCode','Pass\x20--name\x20<roleName>.','2pIeaSv','validation','1172058AgcZEp','str','remark','91skuAwy','8UnhGQW','15142050pzyIhD','10RDZbEB','role','/smartapi/permit/role/create','834929MJcjvh','12DYcpEy'];a155_0x31ab=function(){return _0xb38c72;};return a155_0x31ab();}import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a155_0x4d73(_0x4f610a,_0x8620ce){_0x4f610a=_0x4f610a-0x1ac;const _0x31ab5b=a155_0x31ab();let _0x4d73b0=_0x31ab5b[_0x4f610a];return _0x4d73b0;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH=a155_0x29c059(0x1bb);function readName(_0x3c2380){const _0x3b4f27=a155_0x29c059,_0x1ac7c6=_0x3c2380[_0x3b4f27(0x1b4)](_0x3b4f27(0x1ad))[_0x3b4f27(0x1c9)]();if(!_0x1ac7c6)throw CliErrors[_0x3b4f27(0x1c4)](_0x3b4f27(0x1ad),_0x3b4f27(0x1b0));if(_0x1ac7c6[_0x3b4f27(0x1c2)]>0x40)throw CliErrors[_0x3b4f27(0x1b2)](_0x3b4f27(0x1c3));return _0x1ac7c6;}export const roleCreate={'service':a155_0x29c059(0x1ba),'command':a155_0x29c059(0x1c1),'description':a155_0x29c059(0x1bf),'risk':a155_0x29c059(0x1c7),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4a3596){readName(_0x4a3596);},async 'dryRun'(_0x1b8f33){const _0x47f36e=a155_0x29c059,_0xc2e156=readName(_0x1b8f33),_0x4d40cd=_0x1b8f33[_0x47f36e(0x1b4)](_0x47f36e(0x1b5))[_0x47f36e(0x1c9)]()||undefined;return asDryRunResult({'operation':_0x47f36e(0x1c1),'selector':{'appCode':_0x1b8f33[_0x47f36e(0x1af)],'roleName':_0xc2e156},'before':null,'after':{'roleName':_0xc2e156,'roleType':_0x47f36e(0x1c0),'remark':_0x4d40cd},'dryRun':!![],'backend':{'method':_0x47f36e(0x1c6),'path':CREATE_PATH},'warnings':[]},{'method':_0x47f36e(0x1c6),'url':CREATE_PATH});},async 'execute'(_0x40c16a){const _0x4e6817=a155_0x29c059,_0x2fdf61=readName(_0x40c16a),_0x30090e=_0x40c16a[_0x4e6817(0x1b4)](_0x4e6817(0x1b5))['trim']()||undefined,_0x459693=await createAppRole({'appCode':_0x40c16a[_0x4e6817(0x1af)],'roleName':_0x2fdf61,..._0x30090e?{'remark':_0x30090e}:{}});return{'ok':!![],'data':{'operation':_0x4e6817(0x1c1),'selector':{'appCode':_0x40c16a[_0x4e6817(0x1af)],'roleId':_0x459693['id'],'roleName':_0x2fdf61},'before':null,'after':projectRole(_0x459693),'dryRun':![],'backend':{'method':_0x4e6817(0x1c6),'path':CREATE_PATH},'warnings':[]},'message':'Created\x20role\x20'+_0x459693[_0x4e6817(0x1ae)]+'\x20(id='+_0x459693['id']+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a156_0x4c8b01=a156_0x4909;(function(_0x439503,_0x5e17f3){const _0x198a81=a156_0x4909,_0x5602df=_0x439503();while(!![]){try{const _0xae1949=parseInt(_0x198a81(0x88))/0x1*(parseInt(_0x198a81(0x8b))/0x2)+-parseInt(_0x198a81(0x99))/0x3*(-parseInt(_0x198a81(0x90))/0x4)+-parseInt(_0x198a81(0x93))/0x5+-parseInt(_0x198a81(0x96))/0x6*(-parseInt(_0x198a81(0x84))/0x7)+-parseInt(_0x198a81(0x9a))/0x8*(-parseInt(_0x198a81(0x8a))/0x9)+parseInt(_0x198a81(0x95))/0xa*(-parseInt(_0x198a81(0x94))/0xb)+-parseInt(_0x198a81(0x98))/0xc;if(_0xae1949===_0x5e17f3)break;else _0x5602df['push'](_0x5602df['shift']());}catch(_0x6169d1){_0x5602df['push'](_0x5602df['shift']());}}}(a156_0x5818,0xbef4b));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a156_0x4c8b01(0x8f);function a156_0x4909(_0x51ac2d,_0x206462){_0x51ac2d=_0x51ac2d-0x84;const _0x581879=a156_0x5818();let _0x4909c2=_0x581879[_0x51ac2d];return _0x4909c2;}export const roleDelete={'service':a156_0x4c8b01(0x86),'command':a156_0x4c8b01(0x92),'description':'Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','risk':a156_0x4c8b01(0x97),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x244a4d){const _0x22f3bc=a156_0x4c8b01,_0x3a6604=_0x244a4d[_0x22f3bc(0x8d)]('id'),_0x2bf377=await getRoleById(_0x244a4d[_0x22f3bc(0x9b)],_0x3a6604);return assertCustomRole(_0x2bf377,'delete'),asDryRunResult({'operation':'delete','selector':{'appCode':_0x244a4d[_0x22f3bc(0x9b)],'roleId':_0x3a6604,'roleName':_0x2bf377['roleName']},'before':projectRole(_0x2bf377),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x2bf377[_0x22f3bc(0x89)]>0x0?[_0x22f3bc(0x8c)+_0x2bf377['userCount']+_0x22f3bc(0x8e)]:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x19300c){const _0xbc69c5=a156_0x4c8b01,_0xa9eac7=_0x19300c[_0xbc69c5(0x8d)]('id'),_0x19cbe6=await getRoleById(_0x19300c['appCode'],_0xa9eac7);return assertCustomRole(_0x19cbe6,_0xbc69c5(0x92)),await deleteAppRole(_0xa9eac7),{'ok':!![],'data':{'operation':_0xbc69c5(0x92),'selector':{'appCode':_0x19300c['appCode'],'roleId':_0xa9eac7,'roleName':_0x19cbe6[_0xbc69c5(0x87)]},'before':projectRole(_0x19cbe6),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0xbc69c5(0x85)+_0x19cbe6[_0xbc69c5(0x87)]+_0xbc69c5(0x91)+_0xa9eac7+')'};}};function a156_0x5818(){const _0x5eabf3=['num','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','/smartapi/permit/role/delete','94924vttDOm','\x20(id=','delete','4698485otvmeS','11pxTiJY','3963230LOUotW','15330bfMeLQ','high-risk-write','16369452WEvIpj','183ArlkCR','8qhVDxu','appCode','1253CtUAds','Deleted\x20role\x20','role','roleName','15843FMaxzI','userCount','2361519vZSLqo','166lQeoDt','Role\x20still\x20has\x20'];a156_0x5818=function(){return _0x5eabf3;};return a156_0x5818();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a157_0x57786c=a157_0x37b1;(function(_0x290c60,_0x2cad40){const _0x3d5e01=a157_0x37b1,_0x1726c8=_0x290c60();while(!![]){try{const _0xc8a609=parseInt(_0x3d5e01(0x11e))/0x1+parseInt(_0x3d5e01(0x119))/0x2+-parseInt(_0x3d5e01(0x120))/0x3*(-parseInt(_0x3d5e01(0x121))/0x4)+-parseInt(_0x3d5e01(0x117))/0x5+parseInt(_0x3d5e01(0x11f))/0x6*(parseInt(_0x3d5e01(0x124))/0x7)+-parseInt(_0x3d5e01(0x122))/0x8*(-parseInt(_0x3d5e01(0x11b))/0x9)+-parseInt(_0x3d5e01(0x118))/0xa;if(_0xc8a609===_0x2cad40)break;else _0x1726c8['push'](_0x1726c8['shift']());}catch(_0x48b952){_0x1726c8['push'](_0x1726c8['shift']());}}}(a157_0x1af5,0xe0948));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a157_0x1af5(){const _0x423609=['19636090AimHrq','241876JXxojI','appCode','98181xJOLmT','Role\x20','num','1511092GLRxAD','1345854cSftUv','2945742cHwrKX','4aWlfkm','712HvaJRq','roleName','21FvysrI','role','detail','roleType','6871415DullGV'];a157_0x1af5=function(){return _0x423609;};return a157_0x1af5();}function a157_0x37b1(_0x328e2d,_0x1f7b96){_0x328e2d=_0x328e2d-0x115;const _0x1af5af=a157_0x1af5();let _0x37b19b=_0x1af5af[_0x328e2d];return _0x37b19b;}export const roleDetail={'service':a157_0x57786c(0x125),'command':a157_0x57786c(0x115),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x553376){const _0x1dcecd=a157_0x57786c,_0xb0c813=_0x553376[_0x1dcecd(0x11d)]('id'),_0x51b96d=await getRoleById(_0x553376[_0x1dcecd(0x11a)],_0xb0c813);return{'ok':!![],'data':{'role':projectRole(_0x51b96d)},'message':_0x1dcecd(0x11c)+_0x51b96d[_0x1dcecd(0x123)]+'\x20('+_0x51b96d[_0x1dcecd(0x116)]+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x260c2d,_0x50aaec){const _0xa8b7e9=a158_0x1fef,_0x1fdfef=_0x260c2d();while(!![]){try{const _0x2237f6=parseInt(_0xa8b7e9(0x13c))/0x1+-parseInt(_0xa8b7e9(0x13e))/0x2*(-parseInt(_0xa8b7e9(0x139))/0x3)+-parseInt(_0xa8b7e9(0x140))/0x4+parseInt(_0xa8b7e9(0x13b))/0x5+parseInt(_0xa8b7e9(0x13d))/0x6*(-parseInt(_0xa8b7e9(0x137))/0x7)+-parseInt(_0xa8b7e9(0x13a))/0x8*(parseInt(_0xa8b7e9(0x141))/0x9)+-parseInt(_0xa8b7e9(0x13f))/0xa*(-parseInt(_0xa8b7e9(0x138))/0xb);if(_0x2237f6===_0x50aaec)break;else _0x1fdfef['push'](_0x1fdfef['shift']());}catch(_0x22564e){_0x1fdfef['push'](_0x1fdfef['shift']());}}}(a158_0x451c,0xa7cba));function a158_0x451c(){const _0x30b125=['7104186DnFdeH','2064yHhaBL','26090IqcVFu','4430080aTgxAA','225864JiQFsr','7qVwPdr','2519LZHvjm','1977ufrfNt','16XqBjbX','4114585fJGYUM','928567ZfxtFL'];a158_0x451c=function(){return _0x30b125;};return a158_0x451c();}import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';function a158_0x1fef(_0x5d145f,_0x2d5594){_0x5d145f=_0x5d145f-0x137;const _0x451cbc=a158_0x451c();let _0x1fef64=_0x451cbc[_0x5d145f];return _0x1fef64;}export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a159_0x475955=a159_0x46d0;(function(_0x106eeb,_0xe00b8){const _0x5dba3a=a159_0x46d0,_0x45949b=_0x106eeb();while(!![]){try{const _0x211f62=parseInt(_0x5dba3a(0x84))/0x1*(parseInt(_0x5dba3a(0x7e))/0x2)+parseInt(_0x5dba3a(0x8c))/0x3*(parseInt(_0x5dba3a(0x6d))/0x4)+parseInt(_0x5dba3a(0x76))/0x5*(-parseInt(_0x5dba3a(0x6c))/0x6)+-parseInt(_0x5dba3a(0x89))/0x7*(parseInt(_0x5dba3a(0x71))/0x8)+parseInt(_0x5dba3a(0x74))/0x9*(parseInt(_0x5dba3a(0x8a))/0xa)+-parseInt(_0x5dba3a(0x7a))/0xb+parseInt(_0x5dba3a(0x93))/0xc;if(_0x211f62===_0xe00b8)break;else _0x45949b['push'](_0x45949b['shift']());}catch(_0xc7a463){_0x45949b['push'](_0x45949b['shift']());}}}(a159_0x51cf,0x38344));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a159_0x51cf(){const _0x2b8db1=['number','Use\x20one\x20of:\x20','Page\x20size\x20(1-100)','Invalid\x20--type\x20\x22','1312787CkdIev','10vbvFXo','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','66JRJged','page','toUpperCase','pagesize','join','appCode','\x20role(s)','7629216DbzbzJ','12eoOFfs','24068bJCnzj','str','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','CUSTOM','16IFAPYi','string','filter','1075005ZNcCXy','Found\x20','674375nsbWMZ','roleType','Page\x20index\x20(1-based)','role','2399661bwJPtf','DEV','validation','trim','137072JkebqL','num','type','list','Filter\x20by\x20role\x20type','map','3beuuPw'];a159_0x51cf=function(){return _0x2b8db1;};return a159_0x51cf();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=['ADMIN',a159_0x475955(0x7b),'USER',a159_0x475955(0x70)];function a159_0x46d0(_0x5024df,_0xb01ac5){_0x5024df=_0x5024df-0x6c;const _0x51cf63=a159_0x51cf();let _0x46d050=_0x51cf63[_0x5024df];return _0x46d050;}export const roleList={'service':a159_0x475955(0x79),'command':a159_0x475955(0x81),'description':a159_0x475955(0x8b),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a159_0x475955(0x72),'required':![],'description':a159_0x475955(0x82),'enum':ROLE_TYPES},{'name':a159_0x475955(0x8d),'type':'number','description':a159_0x475955(0x78),'default':0x1},{'name':a159_0x475955(0x8f),'type':a159_0x475955(0x85),'description':a159_0x475955(0x87),'default':0x64}],async 'validate'(_0x45c49e){const _0x3d95ae=a159_0x475955,_0x39b892=_0x45c49e['str'](_0x3d95ae(0x80))[_0x3d95ae(0x7d)]();if(_0x39b892&&!ROLE_TYPES['includes'](_0x39b892['toUpperCase']()))throw CliErrors[_0x3d95ae(0x7c)](_0x3d95ae(0x88)+_0x39b892+'\x22.',_0x3d95ae(0x86)+ROLE_TYPES[_0x3d95ae(0x90)](',\x20')+'.');const _0x33a186=_0x45c49e[_0x3d95ae(0x7f)]('page',0x1),_0x1165f3=_0x45c49e[_0x3d95ae(0x7f)](_0x3d95ae(0x8f),0x64);if(_0x33a186<0x1)throw CliErrors[_0x3d95ae(0x7c)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x1165f3<0x1||_0x1165f3>0x64)throw CliErrors['validation'](_0x3d95ae(0x6f));},async 'execute'(_0x565730){const _0x33f089=a159_0x475955,_0x59acf7=_0x565730['num']('page',0x1)||0x1,_0x2a4772=_0x565730[_0x33f089(0x7f)](_0x33f089(0x8f),0x64)||0x64,_0x36562d=_0x565730[_0x33f089(0x6e)](_0x33f089(0x80))[_0x33f089(0x7d)]()[_0x33f089(0x8e)](),{items:_0x52702c,paging:_0x1d30b3}=await listAppRoles(_0x565730[_0x33f089(0x91)],{'currentPage':_0x59acf7,'pageSize':_0x2a4772}),_0x448cea=_0x36562d?_0x52702c[_0x33f089(0x73)](_0x2289f4=>_0x2289f4[_0x33f089(0x77)]===_0x36562d):_0x52702c,_0x21293e=_0x448cea[_0x33f089(0x83)](projectRole);return{'ok':!![],'data':{'roles':_0x21293e,'paging':_0x1d30b3},'message':_0x33f089(0x75)+_0x21293e['length']+_0x33f089(0x92)};}};
|