@lovrabet/rabetbase-cli 2.3.15-beta.2 → 2.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/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 -1
- 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 -1
- 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/rename.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/ocr/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/restore.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
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2ca04b,_0x4d6252){const _0x4f1a2b=a156_0x49ae,_0x2cd3f1=_0x2ca04b();while(!![]){try{const _0x4efd99=-parseInt(_0x4f1a2b(0x113))/0x1+-parseInt(_0x4f1a2b(0x10f))/0x2+-parseInt(_0x4f1a2b(0x116))/0x3*(-parseInt(_0x4f1a2b(0xc6))/0x4)+parseInt(_0x4f1a2b(0xb4))/0x5+parseInt(_0x4f1a2b(0xf2))/0x6+parseInt(_0x4f1a2b(0xe3))/0x7*(parseInt(_0x4f1a2b(0x11c))/0x8)+-parseInt(_0x4f1a2b(0xea))/0x9*(parseInt(_0x4f1a2b(0x107))/0xa);if(_0x4efd99===_0x4d6252)break;else _0x2cd3f1['push'](_0x2cd3f1['shift']());}catch(_0x3ab2a7){_0x2cd3f1['push'](_0x2cd3f1['shift']());}}}(a156_0x5856,0x4dffa));import a156_0x410482 from'chalk';import a156_0x2ac73f from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';function a156_0x5856(){const _0x22359a=['Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','532720CjeFeg','status','Remove\x20legacy\x20artifacts','CANCEL','keys','message','done','yes','189152aUDJEc','\x20\x20Step\x20','length','latest','193731RyXPft','red','skipped','6ArFdxu','no\x20legacy\x20config\x20found','\x20\x20New\x20config\x20(.rabetbase.json):\x20','\x20removed','package.json','Upgrade\x20completed\x20successfully!','40xlIHsw','fail','isArray','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','sdkUpgrade','hasNewConfig','.cursor/rules/lovrabet_rules.mdc','needed','info','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','oldMcpConfig','args','Step\x201/7:\x20Migrating\x20config...','oldPath','path','no\x20matching\x20entry\x20found','Remove\x20old\x20skill','MCP\x20config:','@lovrabet/dataset-mcp-server','Upgrade\x20cancelled.','green','dependencies','@lovrabet/sdk:','cyan','detail','FOUND','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','gray','files','Config\x20file:','oldArtifacts','.bak','filter','lovrabet/rabetbase\x20installed\x20globally','2225210KIIzFf','configMigration','cwd','[\x22@lovrabet/sdk\x22]:\x20','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','succeed','Remove\x20.lovrabet/','step','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','entries','@lovrabet/sdk','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Step\x205/7:\x20Removing\x20old\x20skill...','.claude/skills/lovrabet','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','error','\x20\x20Current\x20version\x20in\x20','\x20\x20Action:\x20delete','1223132hszjUr','yellow','\x20from\x20','label','not\x20found\x20(will\x20create)','Config\x20migration','Step\x204/7:\x20Cleaning\x20MCP\x20config...','.lovrabet','===\x20Upgrade\x20Summary\x20===','push','removed\x20','Skill\x20swap:','Legacy\x20artifacts:','white','lovrabet/lovrabet-skill\x20removed','lovrabet/rabetbase','.cursor/mcp.json','Step\x206/7:\x20Installing\x20new\x20skill...','\x20\x20npm\x20install','log','Proceed\x20with\x20upgrade?','not\x20found\x20or\x20already\x20at\x20latest','failed','\x20→\x20','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','parse','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','mcpServers','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','473466QhsYdc','\x20\x20#\x20or','no\x20legacy\x20entry','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','start','Upgrade\x20@lovrabet/sdk','135vCsJVn','none\x20found','object','inherit','already\x20exists\x20(will\x20merge)','Step\x204/7:\x20MCP\x20config\x20—\x20','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','Clean\x20MCP\x20config','72426jRhaFR','stringify','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','undefined','\x20removed\x20(','isDirectory','string','utf8','bold','\x20→\x20keys:\x20','some','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','\x20\x20bun\x20install','includes','not\x20needed','FAIL','\x20\x20\x20\x20\x20\x20\x20','Install\x20new\x20skill','join'];a156_0x5856=function(){return _0x22359a;};return a156_0x5856();}import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x3fee1a=>_0x3fee1a!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x288e9c){const _0x5cee15=a156_0x49ae,_0x3d30ae=[];for(const _0x50ec84 of Object['values'](CORE_IDE_CONFIGS)){if(_0x50ec84[_0x5cee15(0xae)])for(const _0x281267 of _0x50ec84['files']){_0x3d30ae[_0x5cee15(0xcf)](resolve(_0x288e9c,_0x281267[_0x5cee15(0xa0)]));}}return _0x3d30ae;}function analyse(_0x1ffcb6){const _0x98f3b1=a156_0x49ae;let _0x1ae682=null;const _0x452a6d=resolve(_0x1ffcb6,NEW_CONFIG_NAME),_0x3cd8ad=existsSync(_0x452a6d);for(const _0xfd3fcf of LEGACY_CONFIG_NAMES){const _0x1b5308=resolve(_0x1ffcb6,_0xfd3fcf);if(existsSync(_0x1b5308)){const _0x282c41=readConfigFile(_0x1b5308),_0x45c243=Object[_0x98f3b1(0x10b)](_0x282c41)[_0x98f3b1(0xb2)](_0x44e131=>typeof _0x282c41[_0x44e131]!==_0x98f3b1(0xf6));_0x1ae682={'oldPath':_0x1b5308,'hasNewConfig':_0x3cd8ad,'fields':_0x45c243};break;}}const _0x542c49=[],_0x3ad9a4=resolve(_0x1ffcb6,_0x98f3b1(0xcd));if(existsSync(_0x3ad9a4))_0x542c49[_0x98f3b1(0xcf)](_0x3ad9a4);const _0x283d14=resolve(_0x1ffcb6,_0x98f3b1(0x122));if(existsSync(_0x283d14))_0x542c49[_0x98f3b1(0xcf)](_0x283d14);const _0x571c43=resolve(_0x1ffcb6,_0x98f3b1(0xc1));if(existsSync(_0x571c43))_0x542c49['push'](_0x571c43);for(const _0x17c566 of collectIdeSkillFiles(_0x1ffcb6)){if(existsSync(_0x17c566))_0x542c49[_0x98f3b1(0xcf)](_0x17c566);}let _0x527660=null;const _0x54eacb=resolve(_0x1ffcb6,_0x98f3b1(0xd6));if(existsSync(_0x54eacb))try{const _0x431724=JSON[_0x98f3b1(0xdf)](readFileSync(_0x54eacb,_0x98f3b1(0xfa)));if(_0x431724?.[_0x98f3b1(0xe1)]&&typeof _0x431724[_0x98f3b1(0xe1)]==='object'){const _0x54c933=[];for(const [_0x134ce4,_0x5bdc94]of Object[_0x98f3b1(0xbd)](_0x431724['mcpServers'])){const _0x439eb8=_0x5bdc94;_0x439eb8?.['args']&&Array[_0x98f3b1(0x11e)](_0x439eb8[_0x98f3b1(0x9d)])&&_0x439eb8[_0x98f3b1(0x9d)][_0x98f3b1(0xfd)](_0x2baa39=>typeof _0x2baa39===_0x98f3b1(0xf9)&&_0x2baa39[_0x98f3b1(0x100)]('@lovrabet/dataset-mcp-server'))&&_0x54c933[_0x98f3b1(0xcf)](_0x134ce4);}_0x54c933[_0x98f3b1(0x111)]>0x0&&(_0x527660={'path':_0x54eacb,'keys':_0x54c933});}}catch{}const _0x118daa=_0x542c49[_0x98f3b1(0x111)]>0x0||_0x1ae682!==null;let _0x322f2a=null;const _0x4c37cc=resolve(_0x1ffcb6,_0x98f3b1(0x11a));if(existsSync(_0x4c37cc))try{const _0x5a35f0=JSON[_0x98f3b1(0xdf)](readFileSync(_0x4c37cc,'utf8'));for(const _0x2c16a6 of[_0x98f3b1(0xa7),'devDependencies']){const _0x2a8909=_0x5a35f0?.[_0x2c16a6]?.[_0x98f3b1(0xbe)];if(typeof _0x2a8909===_0x98f3b1(0xf9)){_0x2a8909!==_0x98f3b1(0x112)&&(_0x322f2a={'pkgPath':_0x4c37cc,'currentVersion':_0x2a8909,'field':_0x2c16a6});break;}}}catch{}return{'configMigration':_0x1ae682,'oldArtifacts':_0x542c49,'oldMcpConfig':_0x527660,'needsSkillSwap':_0x118daa,'sdkUpgrade':_0x322f2a};}function printReport(_0xaccc31){const _0x37c16b=a156_0x49ae,{configMigration:_0x237abd,oldArtifacts:_0x52d8e1,oldMcpConfig:_0x374886,needsSkillSwap:_0x551264}=_0xaccc31;console['log'](''),console[_0x37c16b(0xd9)](a156_0x410482[_0x37c16b(0xfb)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x37c16b(0xd9)]('');_0x237abd?(console[_0x37c16b(0xd9)](a156_0x410482[_0x37c16b(0xa9)](_0x37c16b(0xaf))+('\x20\x20'+a156_0x410482[_0x37c16b(0xc7)](_0x237abd[_0x37c16b(0x9f)]))),console[_0x37c16b(0xd9)](_0x37c16b(0x118)+(_0x237abd['hasNewConfig']?a156_0x410482[_0x37c16b(0xa6)](_0x37c16b(0xee)):a156_0x410482[_0x37c16b(0xad)](_0x37c16b(0xca)))),console[_0x37c16b(0xd9)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x237abd['fields'][_0x37c16b(0x105)](',\x20')),console['log'](_0x37c16b(0x9b))):console['log'](a156_0x410482[_0x37c16b(0xa9)](_0x37c16b(0xaf))+'\x20\x20'+a156_0x410482[_0x37c16b(0xad)](_0x37c16b(0x117)));console[_0x37c16b(0xd9)]('');if(_0x52d8e1[_0x37c16b(0x111)]>0x0){console[_0x37c16b(0xd9)](a156_0x410482[_0x37c16b(0xa9)](_0x37c16b(0xd2)));for(const _0x21ac81 of _0x52d8e1){console[_0x37c16b(0xd9)]('\x20\x20'+a156_0x410482['red'](_0x37c16b(0xab))+'\x20\x20'+_0x21ac81);}console['log'](_0x37c16b(0xc5));}else console['log'](a156_0x410482[_0x37c16b(0xa9)]('Legacy\x20artifacts:')+'\x20\x20'+a156_0x410482[_0x37c16b(0xad)](_0x37c16b(0xeb)));console['log']('');_0x374886?(console[_0x37c16b(0xd9)](a156_0x410482[_0x37c16b(0xa9)](_0x37c16b(0xa3))+('\x20\x20'+a156_0x410482[_0x37c16b(0xc7)](_0x374886[_0x37c16b(0xa0)])+_0x37c16b(0xfc)+_0x374886[_0x37c16b(0x10b)][_0x37c16b(0x105)](',\x20'))),console['log'](_0x37c16b(0xb8))):console[_0x37c16b(0xd9)](a156_0x410482[_0x37c16b(0xa9)](_0x37c16b(0xa3))+'\x20\x20'+a156_0x410482[_0x37c16b(0xad)](_0x37c16b(0xe5)));console['log'](''),console[_0x37c16b(0xd9)](a156_0x410482['cyan'](_0x37c16b(0xd1))+('\x20\x20'+(_0x551264?a156_0x410482['yellow'](_0x37c16b(0x123)):a156_0x410482[_0x37c16b(0xa6)](_0x37c16b(0x101)))));_0x551264&&console['log'](_0x37c16b(0xe7)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x37c16b(0xd9)]('');if(_0xaccc31[_0x37c16b(0x120)]){const {currentVersion:_0x47b8d5,field:_0x3d94d5,pkgPath:_0x1bad72}=_0xaccc31[_0x37c16b(0x120)];console[_0x37c16b(0xd9)](a156_0x410482[_0x37c16b(0xa9)](_0x37c16b(0xa8))+('\x20\x20'+a156_0x410482['yellow'](_0x1bad72))),console[_0x37c16b(0xd9)](_0x37c16b(0xc4)+_0x3d94d5+':\x20'+a156_0x410482[_0x37c16b(0xc7)](_0x47b8d5)+'\x20→\x20'+a156_0x410482[_0x37c16b(0xa6)](_0x37c16b(0x112))),console[_0x37c16b(0xd9)](_0x37c16b(0xf5));}else console[_0x37c16b(0xd9)](a156_0x410482[_0x37c16b(0xa9)](_0x37c16b(0xa8))+'\x20\x20'+a156_0x410482[_0x37c16b(0xad)](_0x37c16b(0xdb)));console[_0x37c16b(0xd9)]('');}function execConfigMigration(_0x2b09b0,_0x44453b){const _0x359e81=a156_0x49ae,{configMigration:_0x5d0e56}=_0x2b09b0;if(!_0x5d0e56?.[_0x359e81(0x9f)])return{'step':0x1,'label':_0x359e81(0xcb),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x46efb0=readConfigFile(_0x5d0e56[_0x359e81(0x9f)]),_0x3c6fba=resolve(_0x44453b,NEW_CONFIG_NAME),_0x1a8da0=_0x5d0e56[_0x359e81(0x121)]?readConfigFile(_0x3c6fba):{};for(const [_0x200b63,_0x205184]of Object[_0x359e81(0xbd)](_0x46efb0)){!(_0x200b63 in _0x1a8da0)&&(_0x1a8da0[_0x200b63]=_0x205184);}writeConfigFile(_0x3c6fba,_0x1a8da0);const _0x1a19ce=_0x5d0e56[_0x359e81(0x9f)]+_0x359e81(0xb1);return renameSync(_0x5d0e56['oldPath'],_0x1a19ce),{'step':0x1,'label':_0x359e81(0xcb),'ok':!![],'detail':_0x5d0e56[_0x359e81(0x9f)]+_0x359e81(0xdd)+_0x3c6fba+'\x20(backup:\x20'+_0x1a19ce+')'};}function execRemoveOldArtifacts(_0x11a6b4){const _0x44d677=a156_0x49ae,_0xe50a99=[];for(const _0x3f50a2 of _0x11a6b4){try{if(!existsSync(_0x3f50a2))continue;const _0x479ddf=tryStat(_0x3f50a2);_0x479ddf?.[_0x44d677(0xf8)]()?rmSync(_0x3f50a2,{'recursive':!![],'force':!![]}):unlinkSync(_0x3f50a2);}catch(_0x240037){_0xe50a99[_0x44d677(0xcf)](_0x3f50a2+':\x20'+_0x240037['message']);}}return{'step':0x3,'label':_0x44d677(0x109),'ok':_0xe50a99[_0x44d677(0x111)]===0x0,'detail':_0xe50a99[_0x44d677(0x111)]>0x0?_0x11a6b4[_0x44d677(0x111)]-_0xe50a99[_0x44d677(0x111)]+'/'+_0x11a6b4[_0x44d677(0x111)]+_0x44d677(0xf7)+_0xe50a99[_0x44d677(0x105)](';\x20')+')':_0x11a6b4[_0x44d677(0x111)]+_0x44d677(0x119)};}function execCleanMcp(_0x5ac508){const _0x5672fa=a156_0x49ae;if(!_0x5ac508['oldMcpConfig'])return{'step':0x4,'label':_0x5672fa(0xf1),'ok':!![],'detail':'skipped'};try{const _0x126655=readFileSync(_0x5ac508[_0x5672fa(0x9c)][_0x5672fa(0xa0)],_0x5672fa(0xfa)),_0x193b97=JSON[_0x5672fa(0xdf)](_0x126655);if(_0x193b97?.['mcpServers']&&typeof _0x193b97[_0x5672fa(0xe1)]===_0x5672fa(0xec)){const _0x17b421=[];for(const [_0x3e6b68,_0xb7abb0]of Object[_0x5672fa(0xbd)](_0x193b97['mcpServers'])){_0xb7abb0?.[_0x5672fa(0x9d)]&&Array[_0x5672fa(0x11e)](_0xb7abb0[_0x5672fa(0x9d)])&&_0xb7abb0['args'][_0x5672fa(0xfd)](_0x182627=>typeof _0x182627===_0x5672fa(0xf9)&&_0x182627[_0x5672fa(0x100)](_0x5672fa(0xa4)))&&_0x17b421['push'](_0x3e6b68);}for(const _0x2b7634 of _0x17b421){delete _0x193b97['mcpServers'][_0x2b7634];}return _0x17b421[_0x5672fa(0x111)]>0x0&&writeFileSync(_0x5ac508['oldMcpConfig'][_0x5672fa(0xa0)],JSON['stringify'](_0x193b97,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x5672fa(0xf1),'ok':!![],'detail':_0x5672fa(0xd0)+_0x17b421[_0x5672fa(0x105)](',\x20')+_0x5672fa(0xc8)+_0x5ac508[_0x5672fa(0x9c)]['path']};}return{'step':0x4,'label':_0x5672fa(0xf1),'ok':!![],'detail':_0x5672fa(0xa1)};}catch(_0x59dd21){return{'step':0x4,'label':_0x5672fa(0xf1),'ok':![],'detail':_0x59dd21[_0x5672fa(0x10c)]};}}function execSkillsRemove(_0x153051,_0x3ebe12){const _0x48e05c=a156_0x49ae,_0xf0e986=runNpxSkillsRemove(_0x153051,{'stdio':_0x48e05c(0xed),'yes':_0x3ebe12});return{'step':0x5,'label':_0x48e05c(0xa2),'ok':_0xf0e986['ok'],'detail':_0xf0e986['ok']?_0x48e05c(0xd4):_0xf0e986['error']??'exit\x20'+_0xf0e986[_0x48e05c(0x108)]};}function execSkillsAdd(_0x1911cc,_0x26014d){const _0x150cd2=a156_0x49ae,_0x1110e4=runNpxSkillsAddGlobal(_0x1911cc,_0x150cd2(0xd5),{'stdio':_0x150cd2(0xed),'yes':_0x26014d});return{'step':0x6,'label':_0x150cd2(0x104),'ok':_0x1110e4['ok'],'detail':_0x1110e4['ok']?_0x150cd2(0xb3):_0x1110e4[_0x150cd2(0xc3)]??'exit\x20'+_0x1110e4[_0x150cd2(0x108)]};}function a156_0x49ae(_0x5db12e,_0x2d5601){_0x5db12e=_0x5db12e-0x9b;const _0x585686=a156_0x5856();let _0x49aebc=_0x585686[_0x5db12e];return _0x49aebc;}function execUpgradeSdk(_0x30daf7){const _0x5bb88a=a156_0x49ae;if(!_0x30daf7[_0x5bb88a(0x120)])return{'step':0x7,'label':_0x5bb88a(0xe9),'ok':!![],'detail':_0x5bb88a(0xfe)};const {pkgPath:_0x38983c,currentVersion:_0x201169,field:_0x3db0cc}=_0x30daf7[_0x5bb88a(0x120)];try{const _0x1214cd=readFileSync(_0x38983c,_0x5bb88a(0xfa)),_0x3e1ad0=JSON[_0x5bb88a(0xdf)](_0x1214cd);return _0x3e1ad0[_0x3db0cc]['@lovrabet/sdk']=_0x5bb88a(0x112),writeFileSync(_0x38983c,JSON[_0x5bb88a(0xf3)](_0x3e1ad0,null,0x2)+'\x0a',_0x5bb88a(0xfa)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x3db0cc+_0x5bb88a(0xb7)+_0x201169+'\x20→\x20latest'};}catch(_0x5ee2bd){return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x5ee2bd[_0x5bb88a(0x10c)]};}}function tryStat(_0x2ca2ff){try{return statSync(_0x2ca2ff);}catch{return undefined;}}function printSummary(_0x2d106f){const _0xae89f=a156_0x49ae;console[_0xae89f(0xd9)](''),console[_0xae89f(0xd9)](a156_0x410482[_0xae89f(0xfb)](_0xae89f(0xce))),console[_0xae89f(0xd9)]('');for(const _0x1dead6 of _0x2d106f){const _0x43b5db=_0x1dead6['ok']?a156_0x410482['green']('OK'):a156_0x410482[_0xae89f(0x114)](_0xae89f(0x102));console['log']('\x20\x20'+_0x43b5db+_0xae89f(0x110)+_0x1dead6[_0xae89f(0xbb)]+':\x20'+_0x1dead6[_0xae89f(0xc9)]);if(_0x1dead6[_0xae89f(0xaa)])console[_0xae89f(0xd9)](_0xae89f(0x103)+a156_0x410482['gray'](_0x1dead6[_0xae89f(0xaa)]));}console[_0xae89f(0xd9)]('');}export async function upgradeApp(_0x276916,_0x336947){const _0x28ce7e=a156_0x49ae,_0x429dee=process[_0x28ce7e(0xb6)](),_0x1bbe87=analyse(_0x429dee),_0x4d6576=!_0x1bbe87[_0x28ce7e(0xb5)]&&_0x1bbe87[_0x28ce7e(0xb0)][_0x28ce7e(0x111)]===0x0&&!_0x1bbe87[_0x28ce7e(0x9c)]&&!_0x1bbe87['needsSkillSwap']&&!_0x1bbe87[_0x28ce7e(0x120)];if(_0x4d6576){console[_0x28ce7e(0xd9)](a156_0x410482[_0x28ce7e(0xa6)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x1bbe87);const _0x429b86=!!(_0x336947[_0x28ce7e(0x10e)]||_0x336947['Y']||_0x276916);if(!_0x429b86)try{const _0x1c39bd=await askConfirm(_0x28ce7e(0xda));if(!_0x1c39bd){console['log'](a156_0x410482[_0x28ce7e(0xad)]('Upgrade\x20cancelled.'));return;}}catch(_0x5f5220){if(_0x5f5220?.['message']===_0x28ce7e(0x10a)){console[_0x28ce7e(0xd9)](a156_0x410482[_0x28ce7e(0xad)](_0x28ce7e(0xa5)));return;}throw _0x5f5220;}const _0x3c8f18=[],_0x4b2db2=a156_0x2ac73f({'text':_0x28ce7e(0x9e),'color':'cyan'})['start'](),_0x2ad095=execConfigMigration(_0x1bbe87,_0x429dee);_0x3c8f18[_0x28ce7e(0xcf)](_0x2ad095),_0x4b2db2[_0x2ad095['ok']?_0x28ce7e(0xb9):_0x28ce7e(0x11d)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x2ad095[_0x28ce7e(0xaa)]??(_0x2ad095['ok']?_0x28ce7e(0x10d):_0x28ce7e(0xdc))));const _0x3d980a=resolve(_0x429dee,_0x28ce7e(0xcd)),_0x39492b=a156_0x2ac73f({'text':_0x28ce7e(0xe2),'color':_0x28ce7e(0xa9)})[_0x28ce7e(0xe8)]();if(existsSync(_0x3d980a))try{rmSync(_0x3d980a,{'recursive':!![],'force':!![]}),_0x39492b['succeed'](_0x28ce7e(0xac)),_0x3c8f18[_0x28ce7e(0xcf)]({'step':0x2,'label':_0x28ce7e(0xba),'ok':!![]});}catch(_0x5bf389){_0x39492b[_0x28ce7e(0x11d)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x5bf389[_0x28ce7e(0x10c)]),_0x3c8f18[_0x28ce7e(0xcf)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x5bf389[_0x28ce7e(0x10c)]});}else _0x39492b[_0x28ce7e(0x124)](_0x28ce7e(0xf0)),_0x3c8f18[_0x28ce7e(0xcf)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x28ce7e(0x115)});const _0x2ac83e=a156_0x2ac73f({'text':_0x28ce7e(0xde),'color':_0x28ce7e(0xa9)})[_0x28ce7e(0xe8)](),_0x1cd21c=execRemoveOldArtifacts(_0x1bbe87['oldArtifacts']);_0x3c8f18[_0x28ce7e(0xcf)](_0x1cd21c),_0x2ac83e[_0x1cd21c['ok']?'succeed':_0x28ce7e(0x11d)](_0x28ce7e(0xe6)+(_0x1cd21c['detail']??(_0x1cd21c['ok']?'done':_0x28ce7e(0xdc))));const _0x214c91=a156_0x2ac73f({'text':_0x28ce7e(0xcc),'color':_0x28ce7e(0xa9)})['start'](),_0x341364=execCleanMcp(_0x1bbe87);_0x3c8f18[_0x28ce7e(0xcf)](_0x341364),_0x214c91[_0x341364['ok']?_0x28ce7e(0xb9):'fail'](_0x28ce7e(0xef)+(_0x341364[_0x28ce7e(0xaa)]??(_0x341364['ok']?_0x28ce7e(0x10d):_0x28ce7e(0xdc))));const _0x5e57f5=a156_0x2ac73f({'text':_0x28ce7e(0xc0),'color':_0x28ce7e(0xa9)})['start'](),_0x1b062c=execSkillsRemove(_0x429dee,_0x429b86);_0x3c8f18['push'](_0x1b062c),_0x5e57f5[_0x1b062c['ok']?_0x28ce7e(0xb9):_0x28ce7e(0x11d)](_0x28ce7e(0x106)+(_0x1b062c[_0x28ce7e(0xaa)]??(_0x1b062c['ok']?_0x28ce7e(0x10d):_0x28ce7e(0xdc))));const _0x200258=a156_0x2ac73f({'text':_0x28ce7e(0xd7),'color':_0x28ce7e(0xa9)})[_0x28ce7e(0xe8)](),_0x870757=execSkillsAdd(_0x429dee,_0x429b86);_0x3c8f18['push'](_0x870757),_0x200258[_0x870757['ok']?_0x28ce7e(0xb9):_0x28ce7e(0x11d)](_0x28ce7e(0xf4)+(_0x870757[_0x28ce7e(0xaa)]??(_0x870757['ok']?_0x28ce7e(0x10d):'failed')));const _0x131a06=a156_0x2ac73f({'text':_0x28ce7e(0x11f),'color':'cyan'})[_0x28ce7e(0xe8)](),_0x3342f5=execUpgradeSdk(_0x1bbe87);_0x3c8f18[_0x28ce7e(0xcf)](_0x3342f5),_0x131a06[_0x3342f5['ok']?_0x28ce7e(0xb9):_0x28ce7e(0x11d)](_0x28ce7e(0xc2)+(_0x3342f5[_0x28ce7e(0xaa)]??(_0x3342f5['ok']?_0x28ce7e(0x10d):_0x28ce7e(0xdc)))),printSummary(_0x3c8f18);const _0x594378=_0x3c8f18[_0x28ce7e(0xfd)](_0x4a27e8=>!_0x4a27e8['ok']);_0x594378?console[_0x28ce7e(0xd9)](a156_0x410482['yellow'](_0x28ce7e(0xe0))):console['log'](a156_0x410482[_0x28ce7e(0xa6)](_0x28ce7e(0x11b))),_0x3342f5['ok']&&_0x1bbe87[_0x28ce7e(0x120)]&&(console[_0x28ce7e(0xd9)](''),console[_0x28ce7e(0xd9)](a156_0x410482[_0x28ce7e(0xfb)]['cyan'](_0x28ce7e(0xbf))),console[_0x28ce7e(0xd9)](a156_0x410482[_0x28ce7e(0xa9)](_0x28ce7e(0xbc))),console[_0x28ce7e(0xd9)](''),console[_0x28ce7e(0xd9)](a156_0x410482[_0x28ce7e(0xd3)](_0x28ce7e(0xd8))),console[_0x28ce7e(0xd9)](a156_0x410482[_0x28ce7e(0xd3)](_0x28ce7e(0xe4))),console['log'](a156_0x410482[_0x28ce7e(0xd3)](_0x28ce7e(0xff))),console[_0x28ce7e(0xd9)](''));}
|
|
1
|
+
const a156_0x3f57d2=a156_0x3f5b;(function(_0x5d9e1a,_0x3b6fb2){const _0x52b687=a156_0x3f5b,_0x277d7b=_0x5d9e1a();while(!![]){try{const _0x5605ff=parseInt(_0x52b687(0x163))/0x1*(-parseInt(_0x52b687(0x164))/0x2)+parseInt(_0x52b687(0x19e))/0x3+parseInt(_0x52b687(0x16a))/0x4+-parseInt(_0x52b687(0x1be))/0x5*(-parseInt(_0x52b687(0x157))/0x6)+-parseInt(_0x52b687(0x15d))/0x7*(parseInt(_0x52b687(0x1b6))/0x8)+-parseInt(_0x52b687(0x1b5))/0x9*(-parseInt(_0x52b687(0x177))/0xa)+parseInt(_0x52b687(0x1cc))/0xb*(-parseInt(_0x52b687(0x16b))/0xc);if(_0x5605ff===_0x3b6fb2)break;else _0x277d7b['push'](_0x277d7b['shift']());}catch(_0x105e8c){_0x277d7b['push'](_0x277d7b['shift']());}}}(a156_0x2e5e,0x95bbc));import a156_0xc020fa from'chalk';import a156_0x3db68e 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[a156_0x3f57d2(0x1d2)](_0x5544a1=>_0x5544a1!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x5ddc11){const _0x393582=a156_0x3f57d2,_0x3881ce=[];for(const _0x4f7fb8 of Object[_0x393582(0x19c)](CORE_IDE_CONFIGS)){if(_0x4f7fb8[_0x393582(0x159)])for(const _0x1a271a of _0x4f7fb8['files']){_0x3881ce['push'](resolve(_0x5ddc11,_0x1a271a[_0x393582(0x195)]));}}return _0x3881ce;}function analyse(_0x39dff0){const _0x28b98d=a156_0x3f57d2;let _0x56fcd9=null;const _0x468d15=resolve(_0x39dff0,NEW_CONFIG_NAME),_0x307773=existsSync(_0x468d15);for(const _0x3b60b9 of LEGACY_CONFIG_NAMES){const _0x488b47=resolve(_0x39dff0,_0x3b60b9);if(existsSync(_0x488b47)){const _0x738cb2=readConfigFile(_0x488b47),_0x175c05=Object[_0x28b98d(0x184)](_0x738cb2)[_0x28b98d(0x1d2)](_0x68e81c=>typeof _0x738cb2[_0x68e81c]!==_0x28b98d(0x1bf));_0x56fcd9={'oldPath':_0x488b47,'hasNewConfig':_0x307773,'fields':_0x175c05};break;}}const _0x591952=[],_0x303056=resolve(_0x39dff0,_0x28b98d(0x170));if(existsSync(_0x303056))_0x591952['push'](_0x303056);const _0x4793c5=resolve(_0x39dff0,_0x28b98d(0x1b1));if(existsSync(_0x4793c5))_0x591952[_0x28b98d(0x1b4)](_0x4793c5);const _0x48b203=resolve(_0x39dff0,_0x28b98d(0x15c));if(existsSync(_0x48b203))_0x591952['push'](_0x48b203);for(const _0x3c6b00 of collectIdeSkillFiles(_0x39dff0)){if(existsSync(_0x3c6b00))_0x591952[_0x28b98d(0x1b4)](_0x3c6b00);}let _0x5db8ee=null;const _0x1fa32e=resolve(_0x39dff0,_0x28b98d(0x1a9));if(existsSync(_0x1fa32e))try{const _0xba6a57=JSON[_0x28b98d(0x186)](readFileSync(_0x1fa32e,'utf8'));if(_0xba6a57?.[_0x28b98d(0x188)]&&typeof _0xba6a57[_0x28b98d(0x188)]===_0x28b98d(0x173)){const _0x29a800=[];for(const [_0x4b1942,_0xf7e945]of Object['entries'](_0xba6a57[_0x28b98d(0x188)])){const _0x23938f=_0xf7e945;_0x23938f?.[_0x28b98d(0x189)]&&Array[_0x28b98d(0x1aa)](_0x23938f[_0x28b98d(0x189)])&&_0x23938f[_0x28b98d(0x189)][_0x28b98d(0x171)](_0x1b9890=>typeof _0x1b9890===_0x28b98d(0x1b3)&&_0x1b9890['includes'](_0x28b98d(0x194)))&&_0x29a800['push'](_0x4b1942);}_0x29a800['length']>0x0&&(_0x5db8ee={'path':_0x1fa32e,'keys':_0x29a800});}}catch{}const _0x5e60c9=_0x591952[_0x28b98d(0x15b)]>0x0||_0x56fcd9!==null;let _0x597bcd=null;const _0x2befb4=resolve(_0x39dff0,'package.json');if(existsSync(_0x2befb4))try{const _0x4e71a3=JSON[_0x28b98d(0x186)](readFileSync(_0x2befb4,_0x28b98d(0x1de)));for(const _0x571813 of['dependencies',_0x28b98d(0x1cf)]){const _0xe9d49=_0x4e71a3?.[_0x571813]?.[_0x28b98d(0x174)];if(typeof _0xe9d49===_0x28b98d(0x1b3)){_0xe9d49!==_0x28b98d(0x1bd)&&(_0x597bcd={'pkgPath':_0x2befb4,'currentVersion':_0xe9d49,'field':_0x571813});break;}}}catch{}return{'configMigration':_0x56fcd9,'oldArtifacts':_0x591952,'oldMcpConfig':_0x5db8ee,'needsSkillSwap':_0x5e60c9,'sdkUpgrade':_0x597bcd};}function printReport(_0x2fd213){const _0x2640b9=a156_0x3f57d2,{configMigration:_0x50cbf6,oldArtifacts:_0x14074e,oldMcpConfig:_0x3b8c24,needsSkillSwap:_0x326c0b}=_0x2fd213;console[_0x2640b9(0x1c5)](''),console[_0x2640b9(0x1c5)](a156_0xc020fa['bold'](_0x2640b9(0x1dc))),console[_0x2640b9(0x1c5)]('');_0x50cbf6?(console[_0x2640b9(0x1c5)](a156_0xc020fa[_0x2640b9(0x1ba)]('Config\x20file:')+('\x20\x20'+a156_0xc020fa[_0x2640b9(0x167)](_0x50cbf6[_0x2640b9(0x172)]))),console[_0x2640b9(0x1c5)](_0x2640b9(0x15e)+(_0x50cbf6[_0x2640b9(0x1da)]?a156_0xc020fa[_0x2640b9(0x1af)](_0x2640b9(0x18c)):a156_0xc020fa[_0x2640b9(0x199)](_0x2640b9(0x169)))),console[_0x2640b9(0x1c5)](_0x2640b9(0x1a1)+_0x50cbf6[_0x2640b9(0x1a4)][_0x2640b9(0x1c1)](',\x20')),console['log'](_0x2640b9(0x1a5))):console['log'](a156_0xc020fa[_0x2640b9(0x1ba)]('Config\x20file:')+'\x20\x20'+a156_0xc020fa[_0x2640b9(0x199)](_0x2640b9(0x1a0)));console['log']('');if(_0x14074e['length']>0x0){console['log'](a156_0xc020fa[_0x2640b9(0x1ba)](_0x2640b9(0x1c8)));for(const _0x47e4d4 of _0x14074e){console[_0x2640b9(0x1c5)]('\x20\x20'+a156_0xc020fa[_0x2640b9(0x158)]('FOUND')+'\x20\x20'+_0x47e4d4);}console[_0x2640b9(0x1c5)]('\x20\x20Action:\x20delete');}else console[_0x2640b9(0x1c5)](a156_0xc020fa[_0x2640b9(0x1ba)](_0x2640b9(0x1c8))+'\x20\x20'+a156_0xc020fa[_0x2640b9(0x199)](_0x2640b9(0x1d7)));console[_0x2640b9(0x1c5)]('');_0x3b8c24?(console[_0x2640b9(0x1c5)](a156_0xc020fa[_0x2640b9(0x1ba)](_0x2640b9(0x192))+('\x20\x20'+a156_0xc020fa[_0x2640b9(0x167)](_0x3b8c24['path'])+_0x2640b9(0x1c4)+_0x3b8c24[_0x2640b9(0x184)][_0x2640b9(0x1c1)](',\x20'))),console[_0x2640b9(0x1c5)](_0x2640b9(0x1ab))):console[_0x2640b9(0x1c5)](a156_0xc020fa[_0x2640b9(0x1ba)](_0x2640b9(0x192))+'\x20\x20'+a156_0xc020fa[_0x2640b9(0x199)](_0x2640b9(0x193)));console[_0x2640b9(0x1c5)](''),console['log'](a156_0xc020fa[_0x2640b9(0x1ba)]('Skill\x20swap:')+('\x20\x20'+(_0x326c0b?a156_0xc020fa[_0x2640b9(0x167)](_0x2640b9(0x162)):a156_0xc020fa[_0x2640b9(0x1af)](_0x2640b9(0x1cd)))));_0x326c0b&&console[_0x2640b9(0x1c5)](_0x2640b9(0x1a6)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x2640b9(0x1c5)]('');if(_0x2fd213[_0x2640b9(0x1a8)]){const {currentVersion:_0x222580,field:_0x430aa6,pkgPath:_0x300aa0}=_0x2fd213[_0x2640b9(0x1a8)];console['log'](a156_0xc020fa[_0x2640b9(0x1ba)](_0x2640b9(0x1c6))+('\x20\x20'+a156_0xc020fa[_0x2640b9(0x167)](_0x300aa0))),console['log'](_0x2640b9(0x161)+_0x430aa6+':\x20'+a156_0xc020fa['yellow'](_0x222580)+'\x20→\x20'+a156_0xc020fa['green']('latest')),console[_0x2640b9(0x1c5)](_0x2640b9(0x178));}else console[_0x2640b9(0x1c5)](a156_0xc020fa['cyan'](_0x2640b9(0x1c6))+'\x20\x20'+a156_0xc020fa[_0x2640b9(0x199)](_0x2640b9(0x180)));console[_0x2640b9(0x1c5)]('');}function execConfigMigration(_0x4ff54d,_0x488872){const _0x3bdb08=a156_0x3f57d2,{configMigration:_0x547dc3}=_0x4ff54d;if(!_0x547dc3?.[_0x3bdb08(0x172)])return{'step':0x1,'label':_0x3bdb08(0x1a2),'ok':!![],'detail':_0x3bdb08(0x191)};const _0x41eb12=readConfigFile(_0x547dc3[_0x3bdb08(0x172)]),_0x88f372=resolve(_0x488872,NEW_CONFIG_NAME),_0x1a6da3=_0x547dc3['hasNewConfig']?readConfigFile(_0x88f372):{};for(const [_0x2721de,_0x23ffe8]of Object[_0x3bdb08(0x187)](_0x41eb12)){!(_0x2721de in _0x1a6da3)&&(_0x1a6da3[_0x2721de]=_0x23ffe8);}writeConfigFile(_0x88f372,_0x1a6da3);const _0x1a6fa4=_0x547dc3[_0x3bdb08(0x172)]+_0x3bdb08(0x1b0);return renameSync(_0x547dc3[_0x3bdb08(0x172)],_0x1a6fa4),{'step':0x1,'label':_0x3bdb08(0x1a2),'ok':!![],'detail':_0x547dc3['oldPath']+_0x3bdb08(0x19b)+_0x88f372+_0x3bdb08(0x17a)+_0x1a6fa4+')'};}function a156_0x2e5e(){const _0x24b65c=['No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','stringify','CANCEL','gray','oldMcpConfig','\x20→\x20','values','isDirectory','999921wMgkLJ','oldArtifacts','no\x20legacy\x20config\x20found','\x20\x20Fields\x20to\x20migrate:\x20','Config\x20migration','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','fields','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Step\x204/7:\x20Cleaning\x20MCP\x20config...','sdkUpgrade','.cursor/mcp.json','isArray','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','yes','\x20\x20#\x20or','done','green','.bak','.cursor/rules/lovrabet_rules.mdc','inherit','string','push','9MiBVVa','464AkNLlL','\x20\x20bun\x20install','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','Remove\x20old\x20skill','cyan','lovrabet/rabetbase\x20installed\x20globally','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','latest','5xFzqJX','undefined','white','join','Upgrade\x20completed\x20successfully!','lovrabet/rabetbase','\x20→\x20keys:\x20','log','@lovrabet/sdk:','\x20removed','Legacy\x20artifacts:','\x20→\x20latest','\x20\x20\x20\x20\x20\x20\x20','no\x20matching\x20entry\x20found','11QFIiDV','not\x20needed','===\x20Upgrade\x20Summary\x20===','devDependencies','detail','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','filter','start','\x20removed\x20(','\x20from\x20','error','none\x20found','status','Remove\x20.lovrabet/','hasNewConfig','skipped','===\x20Upgrade\x20Analysis\x20===','includes','utf8','5088522fwJSqC','red','files','Clean\x20MCP\x20config','length','.claude/skills/lovrabet','46564ELkhbq','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Upgrade\x20cancelled.','message','\x20\x20Current\x20version\x20in\x20','needed','255770ESxxHv','6LxTkdN','fail','Step\x205/7:\x20Removing\x20old\x20skill...','yellow','exit\x20','not\x20found\x20(will\x20create)','983668raYPsp','5978436wtvRXy','succeed','Step\x206/7:\x20Installing\x20new\x20skill...','Upgrade\x20@lovrabet/sdk','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','.lovrabet','some','oldPath','object','@lovrabet/sdk','Step\x201/7:\x20Migrating\x20config...','FAIL','8373260fPHuml','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','failed','\x20(backup:\x20','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','[\x22@lovrabet/sdk\x22]:\x20','Proceed\x20with\x20upgrade?','label','Install\x20new\x20skill','not\x20found\x20or\x20already\x20at\x20latest','bold','Step\x204/7:\x20MCP\x20config\x20—\x20','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','keys','step','parse','entries','mcpServers','args','needsSkillSwap','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','already\x20exists\x20(will\x20merge)','Step\x201/7:\x20Config\x20migration\x20—\x20','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','configMigration','skipped\x20(no\x20legacy\x20config)','MCP\x20config:','no\x20legacy\x20entry','@lovrabet/dataset-mcp-server','path'];a156_0x2e5e=function(){return _0x24b65c;};return a156_0x2e5e();}function execRemoveOldArtifacts(_0x2b3201){const _0x10bd53=a156_0x3f57d2,_0x9fe870=[];for(const _0x40e9f3 of _0x2b3201){try{if(!existsSync(_0x40e9f3))continue;const _0x1b978b=tryStat(_0x40e9f3);_0x1b978b?.[_0x10bd53(0x19d)]()?rmSync(_0x40e9f3,{'recursive':!![],'force':!![]}):unlinkSync(_0x40e9f3);}catch(_0x18f857){_0x9fe870[_0x10bd53(0x1b4)](_0x40e9f3+':\x20'+_0x18f857[_0x10bd53(0x160)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x9fe870[_0x10bd53(0x15b)]===0x0,'detail':_0x9fe870['length']>0x0?_0x2b3201[_0x10bd53(0x15b)]-_0x9fe870[_0x10bd53(0x15b)]+'/'+_0x2b3201[_0x10bd53(0x15b)]+_0x10bd53(0x1d4)+_0x9fe870[_0x10bd53(0x1c1)](';\x20')+')':_0x2b3201['length']+_0x10bd53(0x1c7)};}function execCleanMcp(_0x334ae3){const _0x59c11b=a156_0x3f57d2;if(!_0x334ae3['oldMcpConfig'])return{'step':0x4,'label':_0x59c11b(0x15a),'ok':!![],'detail':'skipped'};try{const _0x1effdf=readFileSync(_0x334ae3[_0x59c11b(0x19a)][_0x59c11b(0x195)],_0x59c11b(0x1de)),_0x1de3ce=JSON[_0x59c11b(0x186)](_0x1effdf);if(_0x1de3ce?.[_0x59c11b(0x188)]&&typeof _0x1de3ce[_0x59c11b(0x188)]===_0x59c11b(0x173)){const _0x591985=[];for(const [_0x169c97,_0x4b0ee5]of Object['entries'](_0x1de3ce['mcpServers'])){_0x4b0ee5?.[_0x59c11b(0x189)]&&Array[_0x59c11b(0x1aa)](_0x4b0ee5[_0x59c11b(0x189)])&&_0x4b0ee5[_0x59c11b(0x189)]['some'](_0x40017a=>typeof _0x40017a===_0x59c11b(0x1b3)&&_0x40017a[_0x59c11b(0x1dd)](_0x59c11b(0x194)))&&_0x591985[_0x59c11b(0x1b4)](_0x169c97);}for(const _0x4e4e45 of _0x591985){delete _0x1de3ce['mcpServers'][_0x4e4e45];}return _0x591985[_0x59c11b(0x15b)]>0x0&&writeFileSync(_0x334ae3['oldMcpConfig'][_0x59c11b(0x195)],JSON[_0x59c11b(0x197)](_0x1de3ce,null,0x2)+'\x0a',_0x59c11b(0x1de)),{'step':0x4,'label':_0x59c11b(0x15a),'ok':!![],'detail':'removed\x20'+_0x591985[_0x59c11b(0x1c1)](',\x20')+_0x59c11b(0x1d5)+_0x334ae3[_0x59c11b(0x19a)][_0x59c11b(0x195)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x59c11b(0x1cb)};}catch(_0x2f366a){return{'step':0x4,'label':_0x59c11b(0x15a),'ok':![],'detail':_0x2f366a[_0x59c11b(0x160)]};}}function execSkillsRemove(_0x1ac766,_0x3a75a3){const _0x2033a0=a156_0x3f57d2,_0x2a57de=runNpxSkillsRemove(_0x1ac766,{'stdio':_0x2033a0(0x1b2),'yes':_0x3a75a3});return{'step':0x5,'label':_0x2033a0(0x1b9),'ok':_0x2a57de['ok'],'detail':_0x2a57de['ok']?'lovrabet/lovrabet-skill\x20removed':_0x2a57de[_0x2033a0(0x1d6)]??_0x2033a0(0x168)+_0x2a57de[_0x2033a0(0x1d8)]};}function execSkillsAdd(_0x260e83,_0x4f5336){const _0x260487=a156_0x3f57d2,_0x3ecaae=runNpxSkillsAddGlobal(_0x260e83,_0x260487(0x1c3),{'stdio':'inherit','yes':_0x4f5336});return{'step':0x6,'label':_0x260487(0x17f),'ok':_0x3ecaae['ok'],'detail':_0x3ecaae['ok']?_0x260487(0x1bb):_0x3ecaae[_0x260487(0x1d6)]??'exit\x20'+_0x3ecaae[_0x260487(0x1d8)]};}function a156_0x3f5b(_0x1c5f3a,_0x217c47){_0x1c5f3a=_0x1c5f3a-0x157;const _0x2e5e30=a156_0x2e5e();let _0x3f5b1b=_0x2e5e30[_0x1c5f3a];return _0x3f5b1b;}function execUpgradeSdk(_0x192583){const _0x2acc65=a156_0x3f57d2;if(!_0x192583[_0x2acc65(0x1a8)])return{'step':0x7,'label':_0x2acc65(0x16e),'ok':!![],'detail':_0x2acc65(0x18e)};const {pkgPath:_0x273d77,currentVersion:_0x5505a5,field:_0xbf7bf1}=_0x192583['sdkUpgrade'];try{const _0x181eff=readFileSync(_0x273d77,'utf8'),_0x9fd791=JSON[_0x2acc65(0x186)](_0x181eff);return _0x9fd791[_0xbf7bf1][_0x2acc65(0x174)]=_0x2acc65(0x1bd),writeFileSync(_0x273d77,JSON[_0x2acc65(0x197)](_0x9fd791,null,0x2)+'\x0a',_0x2acc65(0x1de)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0xbf7bf1+_0x2acc65(0x17c)+_0x5505a5+_0x2acc65(0x1c9)};}catch(_0x513afb){return{'step':0x7,'label':_0x2acc65(0x16e),'ok':![],'detail':_0x513afb[_0x2acc65(0x160)]};}}function tryStat(_0x29188e){try{return statSync(_0x29188e);}catch{return undefined;}}function printSummary(_0x3a769b){const _0x27a836=a156_0x3f57d2;console['log'](''),console[_0x27a836(0x1c5)](a156_0xc020fa[_0x27a836(0x181)](_0x27a836(0x1ce))),console[_0x27a836(0x1c5)]('');for(const _0x3531a1 of _0x3a769b){const _0x59c03f=_0x3531a1['ok']?a156_0xc020fa[_0x27a836(0x1af)]('OK'):a156_0xc020fa[_0x27a836(0x158)](_0x27a836(0x176));console['log']('\x20\x20'+_0x59c03f+'\x20\x20Step\x20'+_0x3531a1[_0x27a836(0x185)]+':\x20'+_0x3531a1[_0x27a836(0x17e)]);if(_0x3531a1[_0x27a836(0x1d0)])console['log'](_0x27a836(0x1ca)+a156_0xc020fa[_0x27a836(0x199)](_0x3531a1[_0x27a836(0x1d0)]));}console[_0x27a836(0x1c5)]('');}export async function upgradeApp(_0x1fb839,_0x4b75d3){const _0x5b17fa=a156_0x3f57d2,_0x50b859=process['cwd'](),_0x5d290d=analyse(_0x50b859),_0x3ab4dc=!_0x5d290d[_0x5b17fa(0x190)]&&_0x5d290d[_0x5b17fa(0x19f)]['length']===0x0&&!_0x5d290d[_0x5b17fa(0x19a)]&&!_0x5d290d[_0x5b17fa(0x18a)]&&!_0x5d290d['sdkUpgrade'];if(_0x3ab4dc){console[_0x5b17fa(0x1c5)](a156_0xc020fa[_0x5b17fa(0x1af)](_0x5b17fa(0x196)));return;}printReport(_0x5d290d);const _0x11dfc0=!!(_0x4b75d3[_0x5b17fa(0x1ac)]||_0x4b75d3['Y']||_0x1fb839);if(!_0x11dfc0)try{const _0x3e0eed=await askConfirm(_0x5b17fa(0x17d));if(!_0x3e0eed){console[_0x5b17fa(0x1c5)](a156_0xc020fa[_0x5b17fa(0x199)](_0x5b17fa(0x15f)));return;}}catch(_0x4d291b){if(_0x4d291b?.[_0x5b17fa(0x160)]===_0x5b17fa(0x198)){console[_0x5b17fa(0x1c5)](a156_0xc020fa[_0x5b17fa(0x199)](_0x5b17fa(0x15f)));return;}throw _0x4d291b;}const _0x420368=[],_0x1c9f96=a156_0x3db68e({'text':_0x5b17fa(0x175),'color':_0x5b17fa(0x1ba)})[_0x5b17fa(0x1d3)](),_0x40ac17=execConfigMigration(_0x5d290d,_0x50b859);_0x420368[_0x5b17fa(0x1b4)](_0x40ac17),_0x1c9f96[_0x40ac17['ok']?_0x5b17fa(0x16c):_0x5b17fa(0x165)](_0x5b17fa(0x18d)+(_0x40ac17[_0x5b17fa(0x1d0)]??(_0x40ac17['ok']?_0x5b17fa(0x1ae):_0x5b17fa(0x179))));const _0x3ab631=resolve(_0x50b859,_0x5b17fa(0x170)),_0x19546c=a156_0x3db68e({'text':_0x5b17fa(0x16f),'color':'cyan'})[_0x5b17fa(0x1d3)]();if(existsSync(_0x3ab631))try{rmSync(_0x3ab631,{'recursive':!![],'force':!![]}),_0x19546c[_0x5b17fa(0x16c)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x420368[_0x5b17fa(0x1b4)]({'step':0x2,'label':_0x5b17fa(0x1d9),'ok':!![]});}catch(_0x8a2b58){_0x19546c[_0x5b17fa(0x165)](_0x5b17fa(0x183)+_0x8a2b58[_0x5b17fa(0x160)]),_0x420368['push']({'step':0x2,'label':_0x5b17fa(0x1d9),'ok':![],'detail':_0x8a2b58[_0x5b17fa(0x160)]});}else _0x19546c['info']('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x420368[_0x5b17fa(0x1b4)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x5b17fa(0x1db)});const _0x85483a=a156_0x3db68e({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x5b17fa(0x1ba)})['start'](),_0x2bc713=execRemoveOldArtifacts(_0x5d290d[_0x5b17fa(0x19f)]);_0x420368['push'](_0x2bc713),_0x85483a[_0x2bc713['ok']?_0x5b17fa(0x16c):'fail'](_0x5b17fa(0x1b8)+(_0x2bc713[_0x5b17fa(0x1d0)]??(_0x2bc713['ok']?'done':'failed')));const _0x2e2b7c=a156_0x3db68e({'text':_0x5b17fa(0x1a7),'color':_0x5b17fa(0x1ba)})[_0x5b17fa(0x1d3)](),_0x47184b=execCleanMcp(_0x5d290d);_0x420368[_0x5b17fa(0x1b4)](_0x47184b),_0x2e2b7c[_0x47184b['ok']?'succeed':_0x5b17fa(0x165)](_0x5b17fa(0x182)+(_0x47184b[_0x5b17fa(0x1d0)]??(_0x47184b['ok']?_0x5b17fa(0x1ae):_0x5b17fa(0x179))));const _0x4e4a51=a156_0x3db68e({'text':_0x5b17fa(0x166),'color':_0x5b17fa(0x1ba)})[_0x5b17fa(0x1d3)](),_0x53f237=execSkillsRemove(_0x50b859,_0x11dfc0);_0x420368[_0x5b17fa(0x1b4)](_0x53f237),_0x4e4a51[_0x53f237['ok']?_0x5b17fa(0x16c):'fail'](_0x5b17fa(0x18b)+(_0x53f237['detail']??(_0x53f237['ok']?_0x5b17fa(0x1ae):'failed')));const _0x748ca=a156_0x3db68e({'text':_0x5b17fa(0x16d),'color':_0x5b17fa(0x1ba)})[_0x5b17fa(0x1d3)](),_0x1cc22c=execSkillsAdd(_0x50b859,_0x11dfc0);_0x420368['push'](_0x1cc22c),_0x748ca[_0x1cc22c['ok']?_0x5b17fa(0x16c):'fail']('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x1cc22c[_0x5b17fa(0x1d0)]??(_0x1cc22c['ok']?_0x5b17fa(0x1ae):'failed')));const _0x3c3fd1=a156_0x3db68e({'text':_0x5b17fa(0x17b),'color':'cyan'})[_0x5b17fa(0x1d3)](),_0x24bcb3=execUpgradeSdk(_0x5d290d);_0x420368[_0x5b17fa(0x1b4)](_0x24bcb3),_0x3c3fd1[_0x24bcb3['ok']?_0x5b17fa(0x16c):'fail'](_0x5b17fa(0x1d1)+(_0x24bcb3[_0x5b17fa(0x1d0)]??(_0x24bcb3['ok']?'done':'failed'))),printSummary(_0x420368);const _0x5f153b=_0x420368[_0x5b17fa(0x171)](_0x2205bf=>!_0x2205bf['ok']);_0x5f153b?console[_0x5b17fa(0x1c5)](a156_0xc020fa[_0x5b17fa(0x167)](_0x5b17fa(0x1a3))):console[_0x5b17fa(0x1c5)](a156_0xc020fa['green'](_0x5b17fa(0x1c2))),_0x24bcb3['ok']&&_0x5d290d[_0x5b17fa(0x1a8)]&&(console[_0x5b17fa(0x1c5)](''),console[_0x5b17fa(0x1c5)](a156_0xc020fa[_0x5b17fa(0x181)][_0x5b17fa(0x1ba)](_0x5b17fa(0x18f))),console[_0x5b17fa(0x1c5)](a156_0xc020fa[_0x5b17fa(0x1ba)](_0x5b17fa(0x1bc))),console[_0x5b17fa(0x1c5)](''),console[_0x5b17fa(0x1c5)](a156_0xc020fa['white']('\x20\x20npm\x20install')),console['log'](a156_0xc020fa[_0x5b17fa(0x1c0)](_0x5b17fa(0x1ad))),console[_0x5b17fa(0x1c5)](a156_0xc020fa['white'](_0x5b17fa(0x1b7))),console[_0x5b17fa(0x1c5)](''));}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a157_0x5ee886=a157_0x4ab7;(function(_0x5e898d,_0x4c2f3a){const _0xa1c69=a157_0x4ab7,_0xbabab9=_0x5e898d();while(!![]){try{const _0x4902f6=-parseInt(_0xa1c69(0x186))/0x1*(-parseInt(_0xa1c69(0x18f))/0x2)+-parseInt(_0xa1c69(0x1a1))/0x3+parseInt(_0xa1c69(0x1a9))/0x4+-parseInt(_0xa1c69(0x1a3))/0x5*(-parseInt(_0xa1c69(0x171))/0x6)+parseInt(_0xa1c69(0x183))/0x7+parseInt(_0xa1c69(0x180))/0x8*(-parseInt(_0xa1c69(0x170))/0x9)+parseInt(_0xa1c69(0x16d))/0xa*(-parseInt(_0xa1c69(0x169))/0xb);if(_0x4902f6===_0x4c2f3a)break;else _0xbabab9['push'](_0xbabab9['shift']());}catch(_0x219ab0){_0xbabab9['push'](_0xbabab9['shift']());}}}(a157_0x36ab,0x2198f));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{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';function a157_0x4ab7(_0x2f7c9a,_0x5c1d98){_0x2f7c9a=_0x2f7c9a-0x169;const _0x36abd2=a157_0x36ab();let _0x4ab7f4=_0x36abd2[_0x2f7c9a];return _0x4ab7f4;}import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];function a157_0x36ab(){const _0x49be38=['write','create','skill','app','347850XhQFqP','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','288590AvFvJB','\x20\x20[write]','Logs','start','`\x20has\x20been\x20removed.','CLI\x20Built-in\x20Skill','947984MyFmqN','Run\x20any\x20package.json\x20script','values','command','`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','File','Schema','asset-update','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','<script>','572fmPupJ','service','run','Platform\x20Issue','51370wectDj','hidden','isSingleCommand','4104URXSzh','6FlVWlS','Workspace','logout','from','Quick\x20Start','set','`rabetbase\x20','`rabetbase\x20skills`\x20has\x20been\x20removed.','project','wildcardDef','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','push','Configuration','Roles','has','128ZSyznf','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','Database\x20Connections','1516627ckEveW','remote','Smart\x20List\x20Pages','2JhhvOu','app\x20use','API\x20Development','Diagnostics','read','App\x20Management','build','Code\x20Generation','Runtime\x20App\x20Config\x20Management','16610IRsRuo','login','map','defaultCommand','Notification\x20Configuration','preview','BFF\x20Scripts','Dataset\x20&\x20Operations','SQL\x20Queries','skill\x20','get','Async\x20Tasks','filter','commands'];a157_0x36ab=function(){return _0x49be38;};return a157_0x36ab();}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x596c65){const _0x115b5d=a157_0x4ab7;for(const _0x3f7564 of _0x596c65){definitions[_0x115b5d(0x176)](_0x3f7564[_0x115b5d(0x16a)]+':'+_0x3f7564[_0x115b5d(0x1ac)],_0x3f7564);let _0x599422=serviceGroups[_0x115b5d(0x199)](_0x3f7564[_0x115b5d(0x16a)]);!_0x599422&&(_0x599422=[],serviceGroups[_0x115b5d(0x176)](_0x3f7564[_0x115b5d(0x16a)],_0x599422)),_0x599422[_0x115b5d(0x17c)](_0x3f7564);}}function registerDeclarativeService(_0x3fe49e,_0xbac111,_0x334ce8){const _0x2f7cfe=a157_0x4ab7;registerDefinitions(_0xbac111);_0x334ce8?.[_0x2f7cfe(0x17a)]&®isterDefinitions([_0x334ce8['wildcardDef']]);const _0xfdf60=_0x4250dd=>_0x4250dd===_0x2f7cfe(0x18a)?'':_0x4250dd===_0x2f7cfe(0x19d)?_0x2f7cfe(0x1a4):'\x20\x20[high-risk-write]',_0x1a6af8={'service':_0xbac111[0x0]['service'],'label':_0x3fe49e,'commands':_0xbac111[_0x2f7cfe(0x19b)](_0x390abc=>!_0x390abc[_0x2f7cfe(0x16e)])[_0x2f7cfe(0x191)](_0xb102da=>({'command':_0xb102da[_0x2f7cfe(0x1ac)],'description':_0xb102da['description'],'tag':_0xfdf60(_0xb102da['risk'])})),'declarative':!![],'defaultCommand':_0x334ce8?.[_0x2f7cfe(0x192)]??(_0x334ce8?.[_0x2f7cfe(0x16f)]?_0xbac111[0x0][_0x2f7cfe(0x1ac)]:undefined),'wildcardDef':_0x334ce8?.['wildcardDef'],'isSingleCommand':_0x334ce8?.[_0x2f7cfe(0x16f)]};serviceRegistry[_0x2f7cfe(0x17c)](_0x1a6af8),serviceByName['set'](_0x1a6af8['service'],_0x1a6af8);}registerDeclarativeService(a157_0x5ee886(0x175),initDefinitions,{'defaultCommand':'run','isSingleCommand':!![]}),registerDeclarativeService('Project',projectDefinitions),registerDeclarativeService(a157_0x5ee886(0x172),workspaceDefinitions),registerDeclarativeService(a157_0x5ee886(0x18b),appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a157_0x5ee886(0x190)}),registerDeclarativeService(a157_0x5ee886(0x196),datasetDefinitions),registerDeclarativeService(a157_0x5ee886(0x185),pageDefinitions),registerDeclarativeService(a157_0x5ee886(0x188),apiDefinitions),registerDeclarativeService('Instant\x20API',dataDefinitions),registerDeclarativeService(a157_0x5ee886(0x195),bffDefinitions),registerDeclarativeService(a157_0x5ee886(0x193),notificationDefinitions),registerDeclarativeService(a157_0x5ee886(0x197),sqlDefinitions),registerDeclarativeService(a157_0x5ee886(0x182),dbDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a157_0x5ee886(0x19a),taskDefinitions),registerDeclarativeService(a157_0x5ee886(0x17e),roleDefinitions),registerDeclarativeService('Permissions',permitDefinitions),registerDeclarativeService(a157_0x5ee886(0x18e),appConfigDefinitions),registerDeclarativeService(a157_0x5ee886(0x16c),issueDefinitions),registerDeclarativeService(a157_0x5ee886(0x1ae),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a157_0x5ee886(0x18d),codegenDefinitions),registerDeclarativeService(a157_0x5ee886(0x17d),configDefinitions),registerDeclarativeService(a157_0x5ee886(0x189),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a157_0x5ee886(0x1af),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a157_0x5ee886(0x1a8),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a157_0x5ee886(0x1a5),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a157_0x5ee886(0x19c)]=[{'command':a157_0x5ee886(0x1b2),'description':a157_0x5ee886(0x1aa),'tag':''}];}export const deprecatedAliases={'create':{'service':a157_0x5ee886(0x179),'command':a157_0x5ee886(0x19e)},'start':{'service':a157_0x5ee886(0x16b),'command':a157_0x5ee886(0x1a6)},'build':{'service':a157_0x5ee886(0x16b),'command':a157_0x5ee886(0x18c)},'preview':{'service':a157_0x5ee886(0x16b),'command':a157_0x5ee886(0x194)},'logout':{'service':'auth','command':a157_0x5ee886(0x173)}};const CLI_SKILL_INSTALL_REMOVED_HINT=a157_0x5ee886(0x1a2),APP_REMOTE_REMOVED_HINT=a157_0x5ee886(0x181),APP_USE_REMOVED_HINT=a157_0x5ee886(0x1b1);export function resolveRemovedCommand(_0x5cbc42,_0x1bc857){const _0x2a2d43=a157_0x5ee886;if(_0x5cbc42==='skill'){const _0x5a8414=_0x1bc857?_0x2a2d43(0x198)+_0x1bc857:_0x2a2d43(0x19f);return{'command':_0x5a8414,'message':_0x2a2d43(0x177)+_0x5a8414+_0x2a2d43(0x1a7),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x5cbc42==='skills')return{'command':'skills','message':_0x2a2d43(0x178),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x5cbc42===_0x2a2d43(0x1a0)&&_0x1bc857===_0x2a2d43(0x184))return{'command':'app\x20remote','message':_0x2a2d43(0x17b),'hint':APP_REMOTE_REMOVED_HINT};if(_0x5cbc42==='app'&&_0x1bc857==='use')return{'command':_0x2a2d43(0x187),'message':_0x2a2d43(0x1ad),'hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':a157_0x5ee886(0x19e)},'menu':{'update':a157_0x5ee886(0x1b0)}};export function resolveDeprecatedSubcommand(_0x3fc075,_0x435805){return deprecatedSubcommands[_0x3fc075]?.[_0x435805];}export function findDefinition(_0x2e06f8,_0x17317a){const _0x531481=a157_0x5ee886;return definitions[_0x531481(0x199)](_0x2e06f8+':'+_0x17317a);}export function isKnownService(_0x3f47b2){const _0x37f4fa=a157_0x5ee886;return serviceByName[_0x37f4fa(0x17f)](_0x3f47b2);}export function isDeclarativeService(_0x1f677d){const _0x4b3b79=a157_0x5ee886;return serviceGroups[_0x4b3b79(0x17f)](_0x1f677d)||serviceByName[_0x4b3b79(0x199)](_0x1f677d)?.[_0x4b3b79(0x17a)]!==undefined;}export function getServiceEntry(_0x3f1284){const _0x531208=a157_0x5ee886;return serviceByName[_0x531208(0x199)](_0x3f1284);}export function getLegacyHandler(_0x137bc3,_0x39373b){return undefined;}export function getAllDefinitions(){const _0x515756=a157_0x5ee886;return Array[_0x515756(0x174)](definitions[_0x515756(0x1ab)]());}
|
|
1
|
+
const a157_0x50d7e3=a157_0x5218;(function(_0x3ab67a,_0x14efdb){const _0xf5572f=a157_0x5218,_0xd9f6f5=_0x3ab67a();while(!![]){try{const _0x25ce59=parseInt(_0xf5572f(0x197))/0x1*(-parseInt(_0xf5572f(0x19d))/0x2)+parseInt(_0xf5572f(0x19e))/0x3*(parseInt(_0xf5572f(0x172))/0x4)+-parseInt(_0xf5572f(0x199))/0x5+-parseInt(_0xf5572f(0x17a))/0x6*(parseInt(_0xf5572f(0x156))/0x7)+-parseInt(_0xf5572f(0x15b))/0x8+-parseInt(_0xf5572f(0x17f))/0x9*(-parseInt(_0xf5572f(0x198))/0xa)+parseInt(_0xf5572f(0x176))/0xb*(parseInt(_0xf5572f(0x173))/0xc);if(_0x25ce59===_0x14efdb)break;else _0xd9f6f5['push'](_0xd9f6f5['shift']());}catch(_0x2c842a){_0xd9f6f5['push'](_0xd9f6f5['shift']());}}}(a157_0x113a,0x5c90b));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';function a157_0x113a(){const _0x18c322=['commands','4wHcdQo','7260804wFElhK','Project','service','11SGcJhC','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','`rabetbase\x20skills`\x20has\x20been\x20removed.','preview','6tDrFGV','Async\x20Tasks','filter','skills','<script>','252KWQnvN','defaultCommand','login','read','Self\x20Update','App\x20Management','get','has','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','length','install','Menu','start','Database\x20Connections','show','Instant\x20API','\x20\x20[write]','Logs','Diagnostics','hidden','risk','map','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','Run\x20any\x20package.json\x20script','1xXsgFJ','235010PiYVNC','1445040harYPr','run','Run\x20Scripts','API\x20Development','412642ZphhyB','413529LhetFZ','Smart\x20List\x20Pages','Permissions','wildcardDef','use','3538101gySJZm','\x20\x20[high-risk-write]','BFF\x20Scripts','build','`\x20has\x20been\x20removed.','168152tlnPoH','set','`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','Workspace','app\x20use','write','isSingleCommand','skill','create','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','`rabetbase\x20','SQL\x20Queries','Dataset\x20&\x20Operations','command','OCR','app','Quick\x20Start','File','Notification\x20Configuration','push','app\x20remote','remote'];a157_0x113a=function(){return _0x18c322;};return a157_0x113a();}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{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{authDefinitions}from'../commands/auth/index.js';function a157_0x5218(_0x2c9c67,_0x51fd4f){_0x2c9c67=_0x2c9c67-0x156;const _0x113a7c=a157_0x113a();let _0x5218e0=_0x113a7c[_0x2c9c67];return _0x5218e0;}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(_0x2f4f42){const _0x288df9=a157_0x5218;for(const _0x233a43 of _0x2f4f42){definitions[_0x288df9(0x15c)](_0x233a43[_0x288df9(0x175)]+':'+_0x233a43['command'],_0x233a43);let _0x24c424=serviceGroups[_0x288df9(0x185)](_0x233a43['service']);!_0x24c424&&(_0x24c424=[],serviceGroups['set'](_0x233a43[_0x288df9(0x175)],_0x24c424)),_0x24c424[_0x288df9(0x16e)](_0x233a43);}}function registerDeclarativeService(_0x345886,_0x347fe7,_0x4edd4a){const _0x51ff6b=a157_0x5218;registerDefinitions(_0x347fe7);_0x4edd4a?.['wildcardDef']&®isterDefinitions([_0x4edd4a[_0x51ff6b(0x1a1)]]);const _0x48eca9=_0x45c08f=>_0x45c08f===_0x51ff6b(0x182)?'':_0x45c08f===_0x51ff6b(0x160)?_0x51ff6b(0x18f):_0x51ff6b(0x157),_0x4bc766={'service':_0x347fe7[0x0][_0x51ff6b(0x175)],'label':_0x345886,'commands':_0x347fe7[_0x51ff6b(0x17c)](_0x4f06e9=>!_0x4f06e9[_0x51ff6b(0x192)])[_0x51ff6b(0x194)](_0x47d946=>({'command':_0x47d946['command'],'description':_0x47d946['description'],'tag':_0x48eca9(_0x47d946[_0x51ff6b(0x193)])})),'declarative':!![],'defaultCommand':_0x4edd4a?.[_0x51ff6b(0x180)]??(_0x4edd4a?.[_0x51ff6b(0x161)]?_0x347fe7[0x0][_0x51ff6b(0x168)]:undefined),'wildcardDef':_0x4edd4a?.[_0x51ff6b(0x1a1)],'isSingleCommand':_0x4edd4a?.[_0x51ff6b(0x161)]};serviceRegistry[_0x51ff6b(0x16e)](_0x4bc766),serviceByName[_0x51ff6b(0x15c)](_0x4bc766[_0x51ff6b(0x175)],_0x4bc766);}registerDeclarativeService(a157_0x50d7e3(0x16b),initDefinitions,{'defaultCommand':a157_0x50d7e3(0x19a),'isSingleCommand':!![]}),registerDeclarativeService(a157_0x50d7e3(0x174),projectDefinitions),registerDeclarativeService(a157_0x50d7e3(0x15e),workspaceDefinitions),registerDeclarativeService(a157_0x50d7e3(0x184),appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a157_0x50d7e3(0x181)}),registerDeclarativeService(a157_0x50d7e3(0x167),datasetDefinitions),registerDeclarativeService(a157_0x50d7e3(0x19f),pageDefinitions),registerDeclarativeService(a157_0x50d7e3(0x19c),apiDefinitions),registerDeclarativeService(a157_0x50d7e3(0x18e),dataDefinitions),registerDeclarativeService(a157_0x50d7e3(0x158),bffDefinitions),registerDeclarativeService(a157_0x50d7e3(0x16d),notificationDefinitions),registerDeclarativeService(a157_0x50d7e3(0x166),sqlDefinitions),registerDeclarativeService(a157_0x50d7e3(0x18c),dbDefinitions),registerDeclarativeService(a157_0x50d7e3(0x18a),menuDefinitions),registerDeclarativeService(a157_0x50d7e3(0x17b),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a157_0x50d7e3(0x1a0),permitDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a157_0x50d7e3(0x16c),fileDefinitions),registerDeclarativeService(a157_0x50d7e3(0x169),ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a157_0x50d7e3(0x191),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a157_0x50d7e3(0x183),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a157_0x50d7e3(0x189)}),registerDeclarativeService(a157_0x50d7e3(0x190),logsDefinitions,{'defaultCommand':a157_0x50d7e3(0x18d)}),registerDeclarativeService(a157_0x50d7e3(0x19b),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a157_0x50d7e3(0x188)]-0x1];last[a157_0x50d7e3(0x171)]=[{'command':a157_0x50d7e3(0x17e),'description':a157_0x50d7e3(0x196),'tag':''}];}export const deprecatedAliases={'create':{'service':'project','command':a157_0x50d7e3(0x163)},'start':{'service':a157_0x50d7e3(0x19a),'command':a157_0x50d7e3(0x18b)},'build':{'service':a157_0x50d7e3(0x19a),'command':a157_0x50d7e3(0x159)},'preview':{'service':a157_0x50d7e3(0x19a),'command':a157_0x50d7e3(0x179)},'logout':{'service':'auth','command':'logout'}};const CLI_SKILL_INSTALL_REMOVED_HINT=a157_0x50d7e3(0x195),APP_REMOTE_REMOVED_HINT=a157_0x50d7e3(0x187),APP_USE_REMOVED_HINT=a157_0x50d7e3(0x164);export function resolveRemovedCommand(_0x3b7f72,_0x2863d2){const _0x26b9f5=a157_0x50d7e3;if(_0x3b7f72==='skill'){const _0x1058ba=_0x2863d2?'skill\x20'+_0x2863d2:_0x26b9f5(0x162);return{'command':_0x1058ba,'message':_0x26b9f5(0x165)+_0x1058ba+_0x26b9f5(0x15a),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x3b7f72===_0x26b9f5(0x17d))return{'command':_0x26b9f5(0x17d),'message':_0x26b9f5(0x178),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x3b7f72===_0x26b9f5(0x16a)&&_0x2863d2===_0x26b9f5(0x170))return{'command':_0x26b9f5(0x16f),'message':_0x26b9f5(0x177),'hint':APP_REMOTE_REMOVED_HINT};if(_0x3b7f72==='app'&&_0x2863d2===_0x26b9f5(0x1a2))return{'command':_0x26b9f5(0x15f),'message':_0x26b9f5(0x15d),'hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':a157_0x50d7e3(0x163)},'menu':{'update':'asset-update'}};export function resolveDeprecatedSubcommand(_0x91c12d,_0x2a8f06){return deprecatedSubcommands[_0x91c12d]?.[_0x2a8f06];}export function findDefinition(_0x346aa4,_0x197d3e){const _0x39f942=a157_0x50d7e3;return definitions[_0x39f942(0x185)](_0x346aa4+':'+_0x197d3e);}export function isKnownService(_0x1ac987){const _0x1a90eb=a157_0x50d7e3;return serviceByName[_0x1a90eb(0x186)](_0x1ac987);}export function isDeclarativeService(_0x207253){const _0x5b5892=a157_0x50d7e3;return serviceGroups[_0x5b5892(0x186)](_0x207253)||serviceByName[_0x5b5892(0x185)](_0x207253)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x19565f){const _0xfa9e87=a157_0x50d7e3;return serviceByName[_0xfa9e87(0x185)](_0x19565f);}export function getLegacyHandler(_0x45ebc9,_0x77ee1a){return undefined;}export function getAllDefinitions(){return Array['from'](definitions['values']());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x2ed7a1=a158_0x4aa0;(function(_0x406d50,_0x505c2f){const _0x26a497=a158_0x4aa0,_0x2adbc9=_0x406d50();while(!![]){try{const _0x4d6590=-parseInt(_0x26a497(0x1aa))/0x1*(-parseInt(_0x26a497(0x1a4))/0x2)+-parseInt(_0x26a497(0x1b5))/0x3+-parseInt(_0x26a497(0x1ae))/0x4*(parseInt(_0x26a497(0x1b3))/0x5)+parseInt(_0x26a497(0x1b6))/0x6*(parseInt(_0x26a497(0x1b2))/0x7)+parseInt(_0x26a497(0x1b1))/0x8+parseInt(_0x26a497(0x1ac))/0x9*(parseInt(_0x26a497(0x1ab))/0xa)+-parseInt(_0x26a497(0x1a7))/0xb*(-parseInt(_0x26a497(0x1a1))/0xc);if(_0x4d6590===_0x505c2f)break;else _0x2adbc9['push'](_0x2adbc9['shift']());}catch(_0x1353a6){_0x2adbc9['push'](_0x2adbc9['shift']());}}}(a158_0x2bb3,0x34be7));function a158_0x2bb3(){const _0x11ad3c=['6VfTaHT','POST','appCode','create','\x20(id=','roleName','trim','2483436SfYsxx','str','validation','112ChgixA','remark','role','22jlMQtO','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','length','2081DRGcOV','10JfPsLB','2383515pPVuOB','Created\x20role\x20','3204QdJzxn','/smartapi/permit/role/create','name','571936YbCkSP','1041523LfCdHP','2495dIfvbb','flagMissing','1199460pyKjjl'];a158_0x2bb3=function(){return _0x11ad3c;};return a158_0x2bb3();}import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH=a158_0x2ed7a1(0x1af);function a158_0x4aa0(_0x2b89bd,_0x16767b){_0x2b89bd=_0x2b89bd-0x19d;const _0x2bb371=a158_0x2bb3();let _0x4aa06f=_0x2bb371[_0x2b89bd];return _0x4aa06f;}function readName(_0x58d016){const _0x2e7568=a158_0x2ed7a1,_0xabfb99=_0x58d016[_0x2e7568(0x1a2)](_0x2e7568(0x1b0))['trim']();if(!_0xabfb99)throw CliErrors[_0x2e7568(0x1b4)](_0x2e7568(0x1b0),'Pass\x20--name\x20<roleName>.');if(_0xabfb99[_0x2e7568(0x1a9)]>0x40)throw CliErrors[_0x2e7568(0x1a3)]('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');return _0xabfb99;}export const roleCreate={'service':a158_0x2ed7a1(0x1a6),'command':'create','description':a158_0x2ed7a1(0x1a8),'risk':'write','flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1b6053){readName(_0x1b6053);},async 'dryRun'(_0x510505){const _0x28c255=a158_0x2ed7a1,_0xfe542a=readName(_0x510505),_0x38820e=_0x510505[_0x28c255(0x1a2)](_0x28c255(0x1a5))[_0x28c255(0x1a0)]()||undefined;return asDryRunResult({'operation':_0x28c255(0x19d),'selector':{'appCode':_0x510505[_0x28c255(0x1b8)],'roleName':_0xfe542a},'before':null,'after':{'roleName':_0xfe542a,'roleType':'CUSTOM','remark':_0x38820e},'dryRun':!![],'backend':{'method':_0x28c255(0x1b7),'path':CREATE_PATH},'warnings':[]},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x20c920){const _0x48cdca=a158_0x2ed7a1,_0xf4b3a0=readName(_0x20c920),_0x3055b7=_0x20c920[_0x48cdca(0x1a2)](_0x48cdca(0x1a5))['trim']()||undefined,_0x521165=await createAppRole({'appCode':_0x20c920[_0x48cdca(0x1b8)],'roleName':_0xf4b3a0,..._0x3055b7?{'remark':_0x3055b7}:{}});return{'ok':!![],'data':{'operation':_0x48cdca(0x19d),'selector':{'appCode':_0x20c920[_0x48cdca(0x1b8)],'roleId':_0x521165['id'],'roleName':_0xf4b3a0},'before':null,'after':projectRole(_0x521165),'dryRun':![],'backend':{'method':_0x48cdca(0x1b7),'path':CREATE_PATH},'warnings':[]},'message':_0x48cdca(0x1ad)+_0x521165[_0x48cdca(0x19f)]+_0x48cdca(0x19e)+_0x521165['id']+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a159_0x393e8f=a159_0x3700;function a159_0x3700(_0x21a503,_0x313e5c){_0x21a503=_0x21a503-0x1a4;const _0x32ee74=a159_0x32ee();let _0x370061=_0x32ee74[_0x21a503];return _0x370061;}(function(_0x31173d,_0x429b36){const _0x59c90b=a159_0x3700,_0x16a4da=_0x31173d();while(!![]){try{const _0x4c153f=-parseInt(_0x59c90b(0x1a8))/0x1*(parseInt(_0x59c90b(0x1a5))/0x2)+-parseInt(_0x59c90b(0x1b5))/0x3+parseInt(_0x59c90b(0x1a6))/0x4+-parseInt(_0x59c90b(0x1a4))/0x5+-parseInt(_0x59c90b(0x1b1))/0x6+parseInt(_0x59c90b(0x1a9))/0x7+parseInt(_0x59c90b(0x1aa))/0x8;if(_0x4c153f===_0x429b36)break;else _0x16a4da['push'](_0x16a4da['shift']());}catch(_0x1a15af){_0x16a4da['push'](_0x16a4da['shift']());}}}(a159_0x32ee,0x90b55));function a159_0x32ee(){const _0x1f3fa5=['/smartapi/permit/role/delete','userCount','2348124Tyqifd','528410CPjWfI','2582oyvcBf','560108BNnvkk','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','361GVfVbo','3157658Vugldv','14433088pGsYKq','role','appCode','Role\x20still\x20has\x20','POST','delete','roleName','2688546ApDvjH','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.'];a159_0x32ee=function(){return _0x1f3fa5;};return a159_0x32ee();}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=a159_0x393e8f(0x1b3);export const roleDelete={'service':a159_0x393e8f(0x1ab),'command':a159_0x393e8f(0x1af),'description':a159_0x393e8f(0x1a7),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x1d09c6){const _0x843c35=a159_0x393e8f,_0x26a165=_0x1d09c6['num']('id'),_0x2d9d03=await getRoleById(_0x1d09c6[_0x843c35(0x1ac)],_0x26a165);return assertCustomRole(_0x2d9d03,_0x843c35(0x1af)),asDryRunResult({'operation':_0x843c35(0x1af),'selector':{'appCode':_0x1d09c6['appCode'],'roleId':_0x26a165,'roleName':_0x2d9d03['roleName']},'before':projectRole(_0x2d9d03),'after':null,'dryRun':!![],'backend':{'method':_0x843c35(0x1ae),'path':DELETE_PATH},'warnings':_0x2d9d03['userCount']>0x0?[_0x843c35(0x1ad)+_0x2d9d03[_0x843c35(0x1b4)]+_0x843c35(0x1b2)]:[]},{'method':_0x843c35(0x1ae),'url':DELETE_PATH});},async 'execute'(_0x165cda){const _0x4264de=a159_0x393e8f,_0x1cd4cb=_0x165cda['num']('id'),_0xd51d35=await getRoleById(_0x165cda['appCode'],_0x1cd4cb);return assertCustomRole(_0xd51d35,_0x4264de(0x1af)),await deleteAppRole(_0x1cd4cb),{'ok':!![],'data':{'operation':'delete','selector':{'appCode':_0x165cda[_0x4264de(0x1ac)],'roleId':_0x1cd4cb,'roleName':_0xd51d35[_0x4264de(0x1b0)]},'before':projectRole(_0xd51d35),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0xd51d35[_0x4264de(0x1b0)]+'\x20(id='+_0x1cd4cb+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a160_0x1a9ef6=a160_0x34c8;function a160_0x34c8(_0x8230f3,_0xb9c1a6){_0x8230f3=_0x8230f3-0xf6;const _0xe03f1d=a160_0xe03f();let _0x34c867=_0xe03f1d[_0x8230f3];return _0x34c867;}(function(_0x396dff,_0x29675f){const _0x71beb9=a160_0x34c8,_0x1fa15e=_0x396dff();while(!![]){try{const _0x4620ca=-parseInt(_0x71beb9(0xf6))/0x1*(-parseInt(_0x71beb9(0x103))/0x2)+parseInt(_0x71beb9(0xfa))/0x3+-parseInt(_0x71beb9(0xfe))/0x4+-parseInt(_0x71beb9(0x104))/0x5+-parseInt(_0x71beb9(0x101))/0x6*(parseInt(_0x71beb9(0x102))/0x7)+parseInt(_0x71beb9(0xf7))/0x8*(-parseInt(_0x71beb9(0xf9))/0x9)+parseInt(_0x71beb9(0xff))/0xa*(parseInt(_0x71beb9(0x100))/0xb);if(_0x4620ca===_0x29675f)break;else _0x1fa15e['push'](_0x1fa15e['shift']());}catch(_0x1fb46f){_0x1fa15e['push'](_0x1fa15e['shift']());}}}(a160_0xe03f,0x2277e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a160_0xe03f(){const _0x1d4b45=['48CGNXHW','17563VMebii','2SLIyun','877750nrREwZ','153967ktpbhj','8ZTCiuT','appCode','2459745fcaQDf','651999KtkipQ','role','num','roleType','443520WOnGel','1230qLJQSt','31273qwwzCd'];a160_0xe03f=function(){return _0x1d4b45;};return a160_0xe03f();}export const roleDetail={'service':a160_0x1a9ef6(0xfb),'command':'detail','description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xc85295){const _0x186463=a160_0x1a9ef6,_0x285d8f=_0xc85295[_0x186463(0xfc)]('id'),_0x51917e=await getRoleById(_0xc85295[_0x186463(0xf8)],_0x285d8f);return{'ok':!![],'data':{'role':projectRole(_0x51917e)},'message':'Role\x20'+_0x51917e['roleName']+'\x20('+_0x51917e[_0x186463(0xfd)]+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x30bdeb,_0x5e287d){const _0x296a66=a161_0x1367,_0x3e6f7e=_0x30bdeb();while(!![]){try{const _0x24f076=parseInt(_0x296a66(0x1ab))/0x1+-parseInt(_0x296a66(0x1a6))/0x2*(parseInt(_0x296a66(0x1a1))/0x3)+parseInt(_0x296a66(0x1a7))/0x4*(parseInt(_0x296a66(0x1a9))/0x5)+-parseInt(_0x296a66(0x1a3))/0x6*(parseInt(_0x296a66(0x1a4))/0x7)+parseInt(_0x296a66(0x1a8))/0x8*(-parseInt(_0x296a66(0x1a5))/0x9)+parseInt(_0x296a66(0x1a2))/0xa+parseInt(_0x296a66(0x1aa))/0xb;if(_0x24f076===_0x5e287d)break;else _0x3e6f7e['push'](_0x3e6f7e['shift']());}catch(_0x135b65){_0x3e6f7e['push'](_0x3e6f7e['shift']());}}}(a161_0x10f7,0xbff07));function a161_0x10f7(){const _0x90bc62=['36wMJPvO','2015802sbfbvC','44UqECIO','3139784vsHCsq','645215FnoNGI','23675124wuoKYi','816475IzhKnm','3zSrpuv','4122060hNyhiR','6KweHXN','10055234KyyJgr'];a161_0x10f7=function(){return _0x90bc62;};return a161_0x10f7();}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';function a161_0x1367(_0x3f9faf,_0x1b6954){_0x3f9faf=_0x3f9faf-0x1a1;const _0x10f78c=a161_0x10f7();let _0x136758=_0x10f78c[_0x3f9faf];return _0x136758;}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';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a162_0x2cde(_0x41f0dc,_0x435b15){_0x41f0dc=_0x41f0dc-0x14a;const _0xacd012=a162_0xacd0();let _0x2cded6=_0xacd012[_0x41f0dc];return _0x2cded6;}const a162_0x577c61=a162_0x2cde;(function(_0xafdff9,_0x370e1e){const _0x47865d=a162_0x2cde,_0x3f61ba=_0xafdff9();while(!![]){try{const _0x351e20=parseInt(_0x47865d(0x16a))/0x1+parseInt(_0x47865d(0x158))/0x2*(parseInt(_0x47865d(0x14f))/0x3)+-parseInt(_0x47865d(0x16f))/0x4+parseInt(_0x47865d(0x163))/0x5+parseInt(_0x47865d(0x165))/0x6*(parseInt(_0x47865d(0x150))/0x7)+parseInt(_0x47865d(0x170))/0x8*(parseInt(_0x47865d(0x16b))/0x9)+-parseInt(_0x47865d(0x14c))/0xa*(parseInt(_0x47865d(0x16c))/0xb);if(_0x351e20===_0x370e1e)break;else _0x3f61ba['push'](_0x3f61ba['shift']());}catch(_0x268095){_0x3f61ba['push'](_0x3f61ba['shift']());}}}(a162_0xacd0,0x55ecb));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a162_0xacd0(){const _0x4036b1=['\x20role(s)','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','2750485BVkYOC','Filter\x20by\x20role\x20type','12NZsJlS','CUSTOM','length','page','str','104216iyJZgH','2113974ArrYFB','11cFaAyW','roleType','join','78944maxgBN','8iDbtkV','trim','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','14335580pDyGOd','ADMIN','Use\x20one\x20of:\x20','273201ReeoCD','1931209YsTRtS','pagesize','type','list','includes','read','toUpperCase','DEV','8nukcrX','number','Invalid\x20--type\x20\x22','Page\x20size\x20(1-100)','map','validation','num','USER','filter'];a162_0xacd0=function(){return _0x4036b1;};return a162_0xacd0();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a162_0x577c61(0x14d),a162_0x577c61(0x157),a162_0x577c61(0x15f),a162_0x577c61(0x166)];export const roleList={'service':'role','command':a162_0x577c61(0x153),'description':a162_0x577c61(0x14b),'risk':a162_0x577c61(0x155),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','required':![],'description':a162_0x577c61(0x164),'enum':ROLE_TYPES},{'name':a162_0x577c61(0x168),'type':a162_0x577c61(0x159),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a162_0x577c61(0x151),'type':'number','description':a162_0x577c61(0x15b),'default':0x64}],async 'validate'(_0x4eef65){const _0x2ea670=a162_0x577c61,_0x46ce35=_0x4eef65[_0x2ea670(0x169)](_0x2ea670(0x152))[_0x2ea670(0x14a)]();if(_0x46ce35&&!ROLE_TYPES[_0x2ea670(0x154)](_0x46ce35['toUpperCase']()))throw CliErrors[_0x2ea670(0x15d)](_0x2ea670(0x15a)+_0x46ce35+'\x22.',_0x2ea670(0x14e)+ROLE_TYPES[_0x2ea670(0x16e)](',\x20')+'.');const _0x585ec0=_0x4eef65['num'](_0x2ea670(0x168),0x1),_0x8f718a=_0x4eef65[_0x2ea670(0x15e)](_0x2ea670(0x151),0x64);if(_0x585ec0<0x1)throw CliErrors[_0x2ea670(0x15d)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x8f718a<0x1||_0x8f718a>0x64)throw CliErrors[_0x2ea670(0x15d)](_0x2ea670(0x162));},async 'execute'(_0x545f08){const _0x411154=a162_0x577c61,_0x18ad7f=_0x545f08[_0x411154(0x15e)](_0x411154(0x168),0x1)||0x1,_0x2404c6=_0x545f08[_0x411154(0x15e)]('pagesize',0x64)||0x64,_0x2ea38a=_0x545f08['str'](_0x411154(0x152))['trim']()[_0x411154(0x156)](),{items:_0x20a45c,paging:_0x1c5d7c}=await listAppRoles(_0x545f08['appCode'],{'currentPage':_0x18ad7f,'pageSize':_0x2404c6}),_0x1aa08e=_0x2ea38a?_0x20a45c[_0x411154(0x160)](_0x19e69e=>_0x19e69e[_0x411154(0x16d)]===_0x2ea38a):_0x20a45c,_0x5a27c6=_0x1aa08e[_0x411154(0x15c)](projectRole);return{'ok':!![],'data':{'roles':_0x5a27c6,'paging':_0x1c5d7c},'message':'Found\x20'+_0x5a27c6[_0x411154(0x167)]+_0x411154(0x161)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a163_0x1e85f6=a163_0x2e91;(function(_0x3331ca,_0x39890f){const _0x4acd37=a163_0x2e91,_0x54a6ec=_0x3331ca();while(!![]){try{const _0x53c78c=-parseInt(_0x4acd37(0x1bf))/0x1*(parseInt(_0x4acd37(0x1ac))/0x2)+parseInt(_0x4acd37(0x1df))/0x3*(parseInt(_0x4acd37(0x1a7))/0x4)+parseInt(_0x4acd37(0x1c8))/0x5+-parseInt(_0x4acd37(0x1c9))/0x6+-parseInt(_0x4acd37(0x1b3))/0x7*(-parseInt(_0x4acd37(0x1ab))/0x8)+parseInt(_0x4acd37(0x1b5))/0x9*(-parseInt(_0x4acd37(0x1e1))/0xa)+parseInt(_0x4acd37(0x1ce))/0xb;if(_0x53c78c===_0x39890f)break;else _0x54a6ec['push'](_0x54a6ec['shift']());}catch(_0x5cde90){_0x54a6ec['push'](_0x54a6ec['shift']());}}}(a163_0x4cf9,0x36f28));import{getAppRole,getTenantMembers,listAppRoles,listRoleUsers}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':a163_0x1e85f6(0x1b6),'required':!![],'description':a163_0x1e85f6(0x1a6)};export const ROLE_REF_FLAG={'name':a163_0x1e85f6(0x1bb),'type':'string','required':!![],'description':a163_0x1e85f6(0x1c1)};export const USER_REF_FLAG={'name':a163_0x1e85f6(0x1e7),'type':a163_0x1e85f6(0x1ec),'required':!![],'description':a163_0x1e85f6(0x1c6)};export const NAME_FLAG={'name':a163_0x1e85f6(0x1d6),'type':'string','required':!![],'description':a163_0x1e85f6(0x1e2)};export const USER_NAME_FLAG={'name':a163_0x1e85f6(0x1d6),'type':a163_0x1e85f6(0x1ec),'required':!![],'description':a163_0x1e85f6(0x1e3)};export const REMARK_FLAG={'name':a163_0x1e85f6(0x1d2),'type':a163_0x1e85f6(0x1ec),'required':![],'description':a163_0x1e85f6(0x1de)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a163_0x1e85f6(0x1b6),'required':![],'description':a163_0x1e85f6(0x1d5)};export const BUILTIN_ROLE_TYPES=[a163_0x1e85f6(0x1d0),'DEV',a163_0x1e85f6(0x1bd)];export function isBuiltinRole(_0x2a7588){return BUILTIN_ROLE_TYPES['includes'](_0x2a7588);}export function assertCustomRole(_0x5091a9,_0x1cf613){const _0x2b7d71=a163_0x1e85f6;if(_0x5091a9[_0x2b7d71(0x1dd)]!=='CUSTOM')throw CliErrors[_0x2b7d71(0x1ad)](_0x2b7d71(0x1b2)+_0x1cf613+_0x2b7d71(0x1c4)+_0x5091a9['roleName']+'\x20('+_0x5091a9[_0x2b7d71(0x1dd)]+').',_0x2b7d71(0x1e9));}export function assertPermConfigurable(_0x18630d){const _0x37e4ed=a163_0x1e85f6;if(_0x18630d['roleType']===_0x37e4ed(0x1a9)||_0x18630d[_0x37e4ed(0x1dd)]===_0x37e4ed(0x1d0))throw CliErrors[_0x37e4ed(0x1ad)](_0x37e4ed(0x1c5)+_0x18630d[_0x37e4ed(0x1d8)]+'\x20('+_0x18630d[_0x37e4ed(0x1dd)]+').',_0x37e4ed(0x1ef));}function a163_0x2e91(_0x541f8e,_0x367b13){_0x541f8e=_0x541f8e-0x1a2;const _0x4cf957=a163_0x4cf9();let _0x2e91ef=_0x4cf957[_0x541f8e];return _0x2e91ef;}export function projectRole(_0x31b746){const _0x1372af=a163_0x1e85f6;return{'id':_0x31b746['id'],'roleName':_0x31b746[_0x1372af(0x1d8)],'roleType':_0x31b746['roleType'],'remark':_0x31b746[_0x1372af(0x1d2)],'userCount':_0x31b746[_0x1372af(0x1cc)],'permitCount':_0x31b746['permitCount'],'builtin':isBuiltinRole(_0x31b746[_0x1372af(0x1dd)])};}export async function resolveRoleRef(_0x164bba,_0x5a3ad9){const _0xb059a3=a163_0x1e85f6,_0x5dd022=_0x5a3ad9['trim']();if(!_0x5dd022)throw CliErrors[_0xb059a3(0x1ad)](_0xb059a3(0x1b1),_0xb059a3(0x1e8));if(/^\d+$/['test'](_0x5dd022))return getRoleById(_0x164bba,Number(_0x5dd022));const _0x57f33e=await listAllAppRoles(_0x164bba),_0xab6ddf=_0x57f33e[_0xb059a3(0x1a4)](_0x359df8=>_0x359df8[_0xb059a3(0x1d8)]===_0x5dd022);if(_0xab6ddf['length']===0x0)throw CliErrors['validation'](_0xb059a3(0x1e0)+_0x5dd022+_0xb059a3(0x1c3)+_0x164bba+'.',_0xb059a3(0x1e4));if(_0xab6ddf[_0xb059a3(0x1ea)]>0x1){const _0x25fe4c=_0xab6ddf[_0xb059a3(0x1ae)](_0x5161c8=>_0x5161c8['id'])[_0xb059a3(0x1f1)](',\x20');throw CliErrors[_0xb059a3(0x1ad)](_0xb059a3(0x1e0)+_0x5dd022+_0xb059a3(0x1f3)+_0x25fe4c+').','Disambiguate\x20with\x20--role\x20<id>.');}return _0xab6ddf[0x0];}function a163_0x4cf9(){const _0xfcd2bb=['Role\x20name\x20\x22','1370skRzfJ','Role\x20name','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','userList','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','user','Pass\x20--role\x20<id|name>.','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','length','test','string','expect-user-count','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','DEV\x20/\x20ADMIN\x20keep\x20full\x20access\x20by\x20design;\x20configure\x20a\x20CUSTOM\x20role\x20instead.','flagMissing','join','tenant','\x22\x20is\x20ambiguous\x20(ids:\x20',';\x20no\x20change.','\x20member(s)\x20but\x20role\x20has\x20','filter','User\x20','Role\x20id\x20(from\x20`role\x20list`)','164380crmJGh','No\x20tenant\x20member\x20matches\x20\x22','DEV','findIndex','3165672OPDTsn','24CswWFn','validation','map','username','Anti-drift\x20check\x20failed:\x20expected\x20','Missing\x20role\x20reference.','Cannot\x20','7qIDsJs','splice','24408hedLOP','number','appCode','\x22:\x20','user-add','tenant_code','role','\x20is\x20not\x20a\x20member\x20of\x20role\x20','USER','Role\x20id\x20','27532ogmICi','nickname','Role\x20id\x20or\x20role\x20name\x20(CUSTOM\x20roles\x20may\x20be\x20referenced\x20by\x20name)','\x20not\x20found\x20in\x20the\x20user-role\x20list.','\x22\x20not\x20found\x20in\x20app\x20','\x20built-in\x20role\x20','Cannot\x20change\x20the\x20permission\x20matrix\x20of\x20built-in\x20role\x20','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','find','828650ZkdFxJ','2172522KriKdu','totalCount','Disambiguate\x20with\x20--user\x20<id>.','userCount','toLowerCase','7551995vxMDyt','POST','ADMIN','trim','remark','dryRun','Pass\x20--user\x20<id|name>.','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','name','push','roleName','Check\x20the\x20nickname/username,\x20or\x20pass\x20--user\x20<id>.','expectUserCount','userId','/smartapi/permit/user-role/update-user-list','roleType','Optional\x20role\x20remark/description','3RLxFzE'];a163_0x4cf9=function(){return _0xfcd2bb;};return a163_0x4cf9();}export async function getRoleById(_0x1bb931,_0x4c0030){const _0x104921=a163_0x1e85f6,_0x20c6a3=await getAppRole(_0x4c0030);if(!_0x20c6a3)throw CliErrors[_0x104921(0x1ad)](_0x104921(0x1be)+_0x4c0030+'\x20not\x20found\x20in\x20app\x20'+_0x1bb931+'.',_0x104921(0x1e6));return _0x20c6a3;}async function listAllAppRoles(_0x532b46){const _0x540290=a163_0x1e85f6,_0x1029d4=0x64,_0x40a9c0=[];for(let _0x2de772=0x1;;_0x2de772+=0x1){const {items:_0x5cf627,paging:_0x4809ff}=await listAppRoles(_0x532b46,{'currentPage':_0x2de772,'pageSize':_0x1029d4});_0x40a9c0[_0x540290(0x1d7)](..._0x5cf627);if(_0x5cf627[_0x540290(0x1ea)]<_0x1029d4||_0x4809ff&&_0x40a9c0[_0x540290(0x1ea)]>=_0x4809ff[_0x540290(0x1ca)])return _0x40a9c0;}}export async function resolveTenantCode(){const _0x58ca6c=a163_0x1e85f6,_0x48cf97=await getSessionUserInfo(),_0x4bf237=_0x48cf97?.[_0x58ca6c(0x1e7)]?.[_0x58ca6c(0x1f2)]?.[_0x58ca6c(0x1ba)];if(!_0x4bf237)throw CliErrors['authRequired'](_0x58ca6c(0x1ee));return _0x4bf237;}function matchMember(_0x4c26ab,_0xd9416b){const _0x3f5684=a163_0x1e85f6,_0x1083e2=_0xd9416b[_0x3f5684(0x1d1)]()[_0x3f5684(0x1cd)]();return(_0x4c26ab[_0x3f5684(0x1c0)]??'')[_0x3f5684(0x1cd)]()===_0x1083e2||(_0x4c26ab[_0x3f5684(0x1af)]??'')[_0x3f5684(0x1cd)]()===_0x1083e2;}export async function resolveUserRef(_0x4a5105){const _0x4e0567=a163_0x1e85f6,_0x235526=_0x4a5105[_0x4e0567(0x1d1)]();if(!_0x235526)throw CliErrors[_0x4e0567(0x1ad)]('Missing\x20user\x20reference.','Pass\x20--user\x20<id|name>.');const _0x2e4f30=await resolveTenantCode(),_0x2e3a09=await getTenantMembers(_0x2e4f30);if(/^\d+$/[_0x4e0567(0x1eb)](_0x235526)){const _0x22941e=Number(_0x235526),_0x5ca887=_0x2e3a09[_0x4e0567(0x1c7)](_0x49e423=>_0x49e423[_0x4e0567(0x1db)]===_0x22941e);return{'userId':_0x22941e,'username':_0x5ca887?.[_0x4e0567(0x1af)]??String(_0x22941e),'nickname':_0x5ca887?.[_0x4e0567(0x1c0)],'matchedBy':'id'};}const _0x2a15d0=_0x2e3a09[_0x4e0567(0x1a4)](_0x215147=>matchMember(_0x215147,_0x235526));if(_0x2a15d0['length']===0x0)throw CliErrors[_0x4e0567(0x1ad)](_0x4e0567(0x1a8)+_0x235526+'\x22.',_0x4e0567(0x1d9));if(_0x2a15d0[_0x4e0567(0x1ea)]>0x1){const _0x112640=_0x2a15d0[_0x4e0567(0x1ae)](_0x38660c=>(_0x38660c[_0x4e0567(0x1c0)]??_0x38660c[_0x4e0567(0x1af)]??'?')+'('+_0x38660c[_0x4e0567(0x1db)]+')')[_0x4e0567(0x1f1)](',\x20');throw CliErrors[_0x4e0567(0x1ad)]('Multiple\x20tenant\x20members\x20match\x20\x22'+_0x235526+_0x4e0567(0x1b8)+_0x112640+'.',_0x4e0567(0x1cb));}const _0x492194=_0x2a15d0[0x0];return{'userId':_0x492194[_0x4e0567(0x1db)],'username':_0x492194[_0x4e0567(0x1af)]??String(_0x492194[_0x4e0567(0x1db)]),'nickname':_0x492194[_0x4e0567(0x1c0)],'matchedBy':_0x4e0567(0x1d6)};}export const UPDATE_USER_LIST_PATH=a163_0x1e85f6(0x1dc);function userIdsOf(_0x5f031e){const _0x84b353=a163_0x1e85f6;return(_0x5f031e?.['userList']??[])[_0x84b353(0x1ae)](_0x4ae0db=>_0x4ae0db[_0x84b353(0x1db)]);}export function computeRoleUserMutation(_0x58d90a){const _0x5cb532=a163_0x1e85f6,{operation:_0x39cb51,appCode:_0x772edb,roleUsers:_0x21fcb7,targetRoleId:_0x1fb1c5,user:_0x281d08}=_0x58d90a,_0x4c1e19=_0x21fcb7[_0x5cb532(0x1c7)](_0x410d03=>_0x410d03['id']===_0x1fb1c5);if(!_0x4c1e19)throw CliErrors[_0x5cb532(0x1ad)](_0x5cb532(0x1be)+_0x1fb1c5+_0x5cb532(0x1c2),_0x5cb532(0x1e6));const _0x55baf2=userIdsOf(_0x4c1e19),_0x4f1a50=[];if(_0x58d90a[_0x5cb532(0x1da)]!==undefined&&_0x58d90a['expectUserCount']!==_0x55baf2[_0x5cb532(0x1ea)])throw CliErrors[_0x5cb532(0x1ad)](_0x5cb532(0x1b0)+_0x58d90a[_0x5cb532(0x1da)]+_0x5cb532(0x1a3)+_0x55baf2[_0x5cb532(0x1ea)]+'.','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.');const _0x4e6b8b=_0x55baf2['includes'](_0x281d08[_0x5cb532(0x1db)]);let _0x236bb2=![];const _0x7e64d4=[..._0x4c1e19[_0x5cb532(0x1e5)]];if(_0x39cb51===_0x5cb532(0x1b9))_0x4e6b8b?_0x4f1a50['push'](_0x5cb532(0x1a5)+_0x281d08[_0x5cb532(0x1db)]+'\x20is\x20already\x20a\x20member\x20of\x20role\x20'+_0x4c1e19[_0x5cb532(0x1d8)]+_0x5cb532(0x1a2)):(_0x7e64d4['push']({'userId':_0x281d08[_0x5cb532(0x1db)],'username':_0x281d08[_0x5cb532(0x1af)],..._0x281d08[_0x5cb532(0x1c0)]?{'nickname':_0x281d08['nickname']}:{}}),_0x236bb2=!![]);else{if(!_0x4e6b8b)_0x4f1a50[_0x5cb532(0x1d7)](_0x5cb532(0x1a5)+_0x281d08['userId']+_0x5cb532(0x1bc)+_0x4c1e19['roleName']+_0x5cb532(0x1a2));else{const _0x2cfe20=_0x7e64d4[_0x5cb532(0x1aa)](_0x3a51cd=>_0x3a51cd[_0x5cb532(0x1db)]===_0x281d08[_0x5cb532(0x1db)]);if(_0x2cfe20>=0x0)_0x7e64d4[_0x5cb532(0x1b4)](_0x2cfe20,0x1);_0x236bb2=!![];}}const _0x16e54f=_0x21fcb7[_0x5cb532(0x1ae)](_0x307873=>_0x307873['id']===_0x1fb1c5?{..._0x307873,'userList':_0x7e64d4}:_0x307873),_0x291c2f=_0x7e64d4[_0x5cb532(0x1ae)](_0x2ac23f=>_0x2ac23f[_0x5cb532(0x1db)]),_0x587f34={'operation':_0x39cb51,'selector':{'appCode':_0x772edb,'roleId':_0x1fb1c5,'roleName':_0x4c1e19[_0x5cb532(0x1d8)],'userId':_0x281d08[_0x5cb532(0x1db)]},'before':{'userIds':_0x55baf2},'after':{'userIds':_0x291c2f},'dryRun':_0x58d90a[_0x5cb532(0x1d3)],'backend':{'method':_0x5cb532(0x1cf),'path':UPDATE_USER_LIST_PATH},'warnings':_0x4f1a50};return{'roleList':_0x16e54f,'mutation':_0x587f34,'changed':_0x236bb2};}export async function loadRoleUsers(_0x1634a8){return listRoleUsers(_0x1634a8);}export function readRoleRef(_0xcda261){const _0x114b46=a163_0x1e85f6,_0x26b852=_0xcda261['str'](_0x114b46(0x1bb))[_0x114b46(0x1d1)]();if(!_0x26b852)throw CliErrors[_0x114b46(0x1f0)](_0x114b46(0x1bb),_0x114b46(0x1e8));return _0x26b852;}export async function prepareUserMutation(_0x22af13,_0x5368c7,_0x1b6a99){const _0x257979=a163_0x1e85f6,_0x123aaa=readRoleRef(_0x22af13),_0x5ef62f=_0x22af13['str'](_0x257979(0x1e7))[_0x257979(0x1d1)]();if(!_0x5ef62f)throw CliErrors[_0x257979(0x1f0)](_0x257979(0x1e7),_0x257979(0x1d4));const _0x3999ba=_0x22af13['flag'](_0x257979(0x1ed)),_0x29827b=_0x3999ba===undefined||_0x3999ba===null?undefined:Number(_0x3999ba),_0x117517=await resolveRoleRef(_0x22af13[_0x257979(0x1b7)],_0x123aaa),_0x3c4d0b=await resolveUserRef(_0x5ef62f),_0x6e215f=await loadRoleUsers(_0x22af13['appCode']);return computeRoleUserMutation({'operation':_0x5368c7,'appCode':_0x22af13[_0x257979(0x1b7)],'roleUsers':_0x6e215f,'targetRoleId':_0x117517['id'],'user':{'userId':_0x3c4d0b[_0x257979(0x1db)],'username':_0x3c4d0b[_0x257979(0x1af)],'nickname':_0x3c4d0b[_0x257979(0x1c0)]},'dryRun':_0x1b6a99,..._0x29827b!==undefined?{'expectUserCount':_0x29827b}:{}});}
|
|
1
|
+
const a163_0x3ac524=a163_0x537b;(function(_0x5e700e,_0x59b544){const _0x313ade=a163_0x537b,_0x8b95ff=_0x5e700e();while(!![]){try{const _0x4573a8=parseInt(_0x313ade(0xeb))/0x1+parseInt(_0x313ade(0x10c))/0x2+-parseInt(_0x313ade(0x109))/0x3*(parseInt(_0x313ade(0xf9))/0x4)+-parseInt(_0x313ade(0xfe))/0x5+-parseInt(_0x313ade(0xe1))/0x6*(-parseInt(_0x313ade(0xe7))/0x7)+-parseInt(_0x313ade(0xdf))/0x8+parseInt(_0x313ade(0xfd))/0x9;if(_0x4573a8===_0x59b544)break;else _0x8b95ff['push'](_0x8b95ff['shift']());}catch(_0x5dcca0){_0x8b95ff['push'](_0x8b95ff['shift']());}}}(a163_0xb0b2,0x9e92d));import{getAppRole,getTenantMembers,listAppRoles,listRoleUsers}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':a163_0x3ac524(0xfa),'required':!![],'description':a163_0x3ac524(0x112)};export const ROLE_REF_FLAG={'name':a163_0x3ac524(0x11b),'type':'string','required':!![],'description':a163_0x3ac524(0xe2)};export const USER_REF_FLAG={'name':'user','type':a163_0x3ac524(0x117),'required':!![],'description':a163_0x3ac524(0xef)};export const NAME_FLAG={'name':a163_0x3ac524(0xea),'type':a163_0x3ac524(0x117),'required':!![],'description':a163_0x3ac524(0xe9)};export const USER_NAME_FLAG={'name':a163_0x3ac524(0xea),'type':a163_0x3ac524(0x117),'required':!![],'description':a163_0x3ac524(0x114)};export const REMARK_FLAG={'name':'remark','type':a163_0x3ac524(0x117),'required':![],'description':'Optional\x20role\x20remark/description'};export const EXPECT_USER_COUNT_FLAG={'name':a163_0x3ac524(0x111),'type':a163_0x3ac524(0xfa),'required':![],'description':a163_0x3ac524(0xe6)};export const BUILTIN_ROLE_TYPES=[a163_0x3ac524(0x102),'DEV','USER'];export function isBuiltinRole(_0xe5fb7f){return BUILTIN_ROLE_TYPES['includes'](_0xe5fb7f);}export function assertCustomRole(_0x39507e,_0x3b3623){const _0x527ac9=a163_0x3ac524;if(_0x39507e[_0x527ac9(0xfc)]!==_0x527ac9(0xe8))throw CliErrors[_0x527ac9(0xec)](_0x527ac9(0x113)+_0x3b3623+_0x527ac9(0x10b)+_0x39507e['roleName']+'\x20('+_0x39507e[_0x527ac9(0xfc)]+').',_0x527ac9(0xf4));}export function assertPermConfigurable(_0x37b727){const _0x419de1=a163_0x3ac524;if(_0x37b727[_0x419de1(0xfc)]==='DEV'||_0x37b727[_0x419de1(0xfc)]==='ADMIN')throw CliErrors['validation'](_0x419de1(0xe4)+_0x37b727['roleName']+'\x20('+_0x37b727['roleType']+').',_0x419de1(0x108));}export function projectRole(_0x183f76){const _0x107009=a163_0x3ac524;return{'id':_0x183f76['id'],'roleName':_0x183f76[_0x107009(0x116)],'roleType':_0x183f76[_0x107009(0xfc)],'remark':_0x183f76[_0x107009(0xee)],'userCount':_0x183f76[_0x107009(0xf7)],'permitCount':_0x183f76[_0x107009(0xe5)],'builtin':isBuiltinRole(_0x183f76['roleType'])};}export async function resolveRoleRef(_0x4e0f2a,_0x4c5295){const _0x3d7276=a163_0x3ac524,_0x3b48e2=_0x4c5295[_0x3d7276(0x11f)]();if(!_0x3b48e2)throw CliErrors[_0x3d7276(0xec)]('Missing\x20role\x20reference.',_0x3d7276(0xed));if(/^\d+$/[_0x3d7276(0xdb)](_0x3b48e2))return getRoleById(_0x4e0f2a,Number(_0x3b48e2));const _0x1f8bee=await listAllAppRoles(_0x4e0f2a),_0x33bb81=_0x1f8bee['filter'](_0x18858=>_0x18858['roleName']===_0x3b48e2);if(_0x33bb81['length']===0x0)throw CliErrors['validation'](_0x3d7276(0xdd)+_0x3b48e2+_0x3d7276(0xf3)+_0x4e0f2a+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.');if(_0x33bb81['length']>0x1){const _0x10654c=_0x33bb81[_0x3d7276(0x11a)](_0x29015a=>_0x29015a['id'])['join'](',\x20');throw CliErrors[_0x3d7276(0xec)](_0x3d7276(0xdd)+_0x3b48e2+_0x3d7276(0x106)+_0x10654c+').',_0x3d7276(0xf8));}return _0x33bb81[0x0];}export async function getRoleById(_0x218a57,_0x47a662){const _0x11ebac=a163_0x3ac524,_0x3f6997=await getAppRole(_0x47a662);if(!_0x3f6997)throw CliErrors[_0x11ebac(0xec)](_0x11ebac(0xf0)+_0x47a662+'\x20not\x20found\x20in\x20app\x20'+_0x218a57+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x3f6997;}function a163_0xb0b2(){const _0x3a31cd=['/smartapi/permit/user-role/update-user-list','7687432mMEgKw','join','711366Jkhpqt','Role\x20id\x20or\x20role\x20name\x20(CUSTOM\x20roles\x20may\x20be\x20referenced\x20by\x20name)','tenant_code','Cannot\x20change\x20the\x20permission\x20matrix\x20of\x20built-in\x20role\x20','permitCount','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','42TysTAD','CUSTOM','Role\x20name','name','358566RTskqn','validation','Pass\x20--role\x20<id|name>.','remark','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','Role\x20id\x20','splice','toLowerCase','\x22\x20not\x20found\x20in\x20app\x20','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','dryRun','POST','userCount','Disambiguate\x20with\x20--role\x20<id>.','900572qykzHr','number','nickname','roleType','12784149cnLggX','3845020qIwArX','user','str','appCode','ADMIN','Pass\x20--user\x20<id|name>.','userList','authRequired','\x22\x20is\x20ambiguous\x20(ids:\x20','Multiple\x20tenant\x20members\x20match\x20\x22','DEV\x20/\x20ADMIN\x20keep\x20full\x20access\x20by\x20design;\x20configure\x20a\x20CUSTOM\x20role\x20instead.','15rswAIE','username','\x20built-in\x20role\x20','2029544SePSNJ','Missing\x20user\x20reference.','userId','\x22:\x20','includes','expect-user-count','Role\x20id\x20(from\x20`role\x20list`)','Cannot\x20','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','\x20is\x20not\x20a\x20member\x20of\x20role\x20','roleName','string','flag','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','map','role','expectUserCount','user-add','find','trim','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','User\x20','push',';\x20no\x20change.','flagMissing','\x20is\x20already\x20a\x20member\x20of\x20role\x20','No\x20tenant\x20member\x20matches\x20\x22','length','test','Anti-drift\x20check\x20failed:\x20expected\x20','Role\x20name\x20\x22'];a163_0xb0b2=function(){return _0x3a31cd;};return a163_0xb0b2();}async function listAllAppRoles(_0x30c365){const _0x52fbfe=a163_0x3ac524,_0x5da16d=0x64,_0x3278fe=[];for(let _0x5984c0=0x1;;_0x5984c0+=0x1){const {items:_0x33130e,paging:_0x4908ab}=await listAppRoles(_0x30c365,{'currentPage':_0x5984c0,'pageSize':_0x5da16d});_0x3278fe[_0x52fbfe(0xd5)](..._0x33130e);if(_0x33130e['length']<_0x5da16d||_0x4908ab&&_0x3278fe[_0x52fbfe(0xda)]>=_0x4908ab['totalCount'])return _0x3278fe;}}export async function resolveTenantCode(){const _0x42a21f=a163_0x3ac524,_0xbc0a1f=await getSessionUserInfo(),_0x4a637e=_0xbc0a1f?.[_0x42a21f(0xff)]?.['tenant']?.[_0x42a21f(0xe3)];if(!_0x4a637e)throw CliErrors[_0x42a21f(0x105)]('Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.');return _0x4a637e;}function matchMember(_0x44617b,_0x3e8486){const _0x5c264a=a163_0x3ac524,_0x5d92b4=_0x3e8486[_0x5c264a(0x11f)]()['toLowerCase']();return(_0x44617b[_0x5c264a(0xfb)]??'')[_0x5c264a(0xf2)]()===_0x5d92b4||(_0x44617b['username']??'')[_0x5c264a(0xf2)]()===_0x5d92b4;}export async function resolveUserRef(_0xdd49ab){const _0x4f0256=a163_0x3ac524,_0x3e7ea7=_0xdd49ab[_0x4f0256(0x11f)]();if(!_0x3e7ea7)throw CliErrors[_0x4f0256(0xec)](_0x4f0256(0x10d),_0x4f0256(0x103));const _0xbf0f1f=await resolveTenantCode(),_0x1f8513=await getTenantMembers(_0xbf0f1f);if(/^\d+$/[_0x4f0256(0xdb)](_0x3e7ea7)){const _0x858e7e=Number(_0x3e7ea7),_0x1698a5=_0x1f8513[_0x4f0256(0x11e)](_0x2759d1=>_0x2759d1[_0x4f0256(0x10e)]===_0x858e7e);return{'userId':_0x858e7e,'username':_0x1698a5?.[_0x4f0256(0x10a)]??String(_0x858e7e),'nickname':_0x1698a5?.[_0x4f0256(0xfb)],'matchedBy':'id'};}const _0xca651=_0x1f8513['filter'](_0x5a4ebb=>matchMember(_0x5a4ebb,_0x3e7ea7));if(_0xca651[_0x4f0256(0xda)]===0x0)throw CliErrors[_0x4f0256(0xec)](_0x4f0256(0xd9)+_0x3e7ea7+'\x22.','Check\x20the\x20nickname/username,\x20or\x20pass\x20--user\x20<id>.');if(_0xca651['length']>0x1){const _0x599ede=_0xca651[_0x4f0256(0x11a)](_0x43d3c9=>(_0x43d3c9[_0x4f0256(0xfb)]??_0x43d3c9[_0x4f0256(0x10a)]??'?')+'('+_0x43d3c9[_0x4f0256(0x10e)]+')')[_0x4f0256(0xe0)](',\x20');throw CliErrors[_0x4f0256(0xec)](_0x4f0256(0x107)+_0x3e7ea7+_0x4f0256(0x10f)+_0x599ede+'.','Disambiguate\x20with\x20--user\x20<id>.');}const _0x45a72c=_0xca651[0x0];return{'userId':_0x45a72c[_0x4f0256(0x10e)],'username':_0x45a72c['username']??String(_0x45a72c[_0x4f0256(0x10e)]),'nickname':_0x45a72c[_0x4f0256(0xfb)],'matchedBy':_0x4f0256(0xea)};}export const UPDATE_USER_LIST_PATH=a163_0x3ac524(0xde);function a163_0x537b(_0x10505e,_0x4c86fe){_0x10505e=_0x10505e-0xd4;const _0xb0b21a=a163_0xb0b2();let _0x537ba7=_0xb0b21a[_0x10505e];return _0x537ba7;}function userIdsOf(_0x391955){const _0x43e2a5=a163_0x3ac524;return(_0x391955?.[_0x43e2a5(0x104)]??[])[_0x43e2a5(0x11a)](_0x251c10=>_0x251c10[_0x43e2a5(0x10e)]);}export function computeRoleUserMutation(_0x4866ee){const _0x4fb76c=a163_0x3ac524,{operation:_0x49d3aa,appCode:_0x180757,roleUsers:_0x33844d,targetRoleId:_0x9e6be0,user:_0x3440b8}=_0x4866ee,_0x3a185b=_0x33844d[_0x4fb76c(0x11e)](_0x34a644=>_0x34a644['id']===_0x9e6be0);if(!_0x3a185b)throw CliErrors[_0x4fb76c(0xec)]('Role\x20id\x20'+_0x9e6be0+'\x20not\x20found\x20in\x20the\x20user-role\x20list.',_0x4fb76c(0x120));const _0x14305b=userIdsOf(_0x3a185b),_0x2cb22b=[];if(_0x4866ee[_0x4fb76c(0x11c)]!==undefined&&_0x4866ee[_0x4fb76c(0x11c)]!==_0x14305b['length'])throw CliErrors['validation'](_0x4fb76c(0xdc)+_0x4866ee['expectUserCount']+'\x20member(s)\x20but\x20role\x20has\x20'+_0x14305b[_0x4fb76c(0xda)]+'.',_0x4fb76c(0x119));const _0x1191cc=_0x14305b[_0x4fb76c(0x110)](_0x3440b8[_0x4fb76c(0x10e)]);let _0x42d464=![];const _0x301aa8=[..._0x3a185b[_0x4fb76c(0x104)]];if(_0x49d3aa===_0x4fb76c(0x11d))_0x1191cc?_0x2cb22b['push']('User\x20'+_0x3440b8[_0x4fb76c(0x10e)]+_0x4fb76c(0xd8)+_0x3a185b[_0x4fb76c(0x116)]+_0x4fb76c(0xd6)):(_0x301aa8[_0x4fb76c(0xd5)]({'userId':_0x3440b8[_0x4fb76c(0x10e)],'username':_0x3440b8[_0x4fb76c(0x10a)],..._0x3440b8[_0x4fb76c(0xfb)]?{'nickname':_0x3440b8[_0x4fb76c(0xfb)]}:{}}),_0x42d464=!![]);else{if(!_0x1191cc)_0x2cb22b['push'](_0x4fb76c(0xd4)+_0x3440b8[_0x4fb76c(0x10e)]+_0x4fb76c(0x115)+_0x3a185b[_0x4fb76c(0x116)]+_0x4fb76c(0xd6));else{const _0x35f336=_0x301aa8['findIndex'](_0x1112bb=>_0x1112bb[_0x4fb76c(0x10e)]===_0x3440b8['userId']);if(_0x35f336>=0x0)_0x301aa8[_0x4fb76c(0xf1)](_0x35f336,0x1);_0x42d464=!![];}}const _0x9d9f0e=_0x33844d[_0x4fb76c(0x11a)](_0x40c66a=>_0x40c66a['id']===_0x9e6be0?{..._0x40c66a,'userList':_0x301aa8}:_0x40c66a),_0x2ddb5f=_0x301aa8['map'](_0x3d5ac0=>_0x3d5ac0[_0x4fb76c(0x10e)]),_0x155f9b={'operation':_0x49d3aa,'selector':{'appCode':_0x180757,'roleId':_0x9e6be0,'roleName':_0x3a185b['roleName'],'userId':_0x3440b8[_0x4fb76c(0x10e)]},'before':{'userIds':_0x14305b},'after':{'userIds':_0x2ddb5f},'dryRun':_0x4866ee[_0x4fb76c(0xf5)],'backend':{'method':_0x4fb76c(0xf6),'path':UPDATE_USER_LIST_PATH},'warnings':_0x2cb22b};return{'roleList':_0x9d9f0e,'mutation':_0x155f9b,'changed':_0x42d464};}export async function loadRoleUsers(_0x553b5e){return listRoleUsers(_0x553b5e);}export function readRoleRef(_0x3fd66b){const _0x7dde9=a163_0x3ac524,_0x57eb70=_0x3fd66b[_0x7dde9(0x100)]('role')[_0x7dde9(0x11f)]();if(!_0x57eb70)throw CliErrors[_0x7dde9(0xd7)](_0x7dde9(0x11b),_0x7dde9(0xed));return _0x57eb70;}export async function prepareUserMutation(_0x1c16ee,_0x4354cf,_0x46846d){const _0x2a08b9=a163_0x3ac524,_0x282529=readRoleRef(_0x1c16ee),_0x575723=_0x1c16ee['str'](_0x2a08b9(0xff))['trim']();if(!_0x575723)throw CliErrors['flagMissing'](_0x2a08b9(0xff),'Pass\x20--user\x20<id|name>.');const _0x14e385=_0x1c16ee[_0x2a08b9(0x118)]('expect-user-count'),_0x131655=_0x14e385===undefined||_0x14e385===null?undefined:Number(_0x14e385),_0x6bf5b5=await resolveRoleRef(_0x1c16ee[_0x2a08b9(0x101)],_0x282529),_0x3dc6fc=await resolveUserRef(_0x575723),_0x250cfc=await loadRoleUsers(_0x1c16ee[_0x2a08b9(0x101)]);return computeRoleUserMutation({'operation':_0x4354cf,'appCode':_0x1c16ee['appCode'],'roleUsers':_0x250cfc,'targetRoleId':_0x6bf5b5['id'],'user':{'userId':_0x3dc6fc[_0x2a08b9(0x10e)],'username':_0x3dc6fc['username'],'nickname':_0x3dc6fc[_0x2a08b9(0xfb)]},'dryRun':_0x46846d,..._0x131655!==undefined?{'expectUserCount':_0x131655}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a164_0x307149=a164_0x16f9;(function(_0x410ed8,_0x310c59){const _0x51f04b=a164_0x16f9,_0x49085e=_0x410ed8();while(!![]){try{const _0x3a8c35=parseInt(_0x51f04b(0x206))/0x1+parseInt(_0x51f04b(0x202))/0x2+-parseInt(_0x51f04b(0x1f7))/0x3*(-parseInt(_0x51f04b(0x20a))/0x4)+-parseInt(_0x51f04b(0x1f9))/0x5*(parseInt(_0x51f04b(0x203))/0x6)+-parseInt(_0x51f04b(0x1f0))/0x7+parseInt(_0x51f04b(0x1ff))/0x8*(parseInt(_0x51f04b(0x1f6))/0x9)+-parseInt(_0x51f04b(0x200))/0xa*(-parseInt(_0x51f04b(0x204))/0xb);if(_0x3a8c35===_0x310c59)break;else _0x49085e['push'](_0x49085e['shift']());}catch(_0x42b49d){_0x49085e['push'](_0x49085e['shift']());}}}(a164_0xd856,0xe2a4e));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';function a164_0x16f9(_0x55655b,_0x12f254){_0x55655b=_0x55655b-0x1f0;const _0xd856f8=a164_0xd856();let _0x16f9f7=_0xd856f8[_0x55655b];return _0x16f9f7;}function readPatch(_0x8edc1b){const _0x1fa022=a164_0x16f9,_0x2cfed6=_0x8edc1b[_0x1fa022(0x1f8)](_0x1fa022(0x1f3)),_0x12b143=_0x8edc1b[_0x1fa022(0x1f8)](_0x1fa022(0x1fc)),_0x2c4f38={};if(_0x2cfed6!==undefined&&_0x2cfed6!==null){const _0x4124cc=String(_0x2cfed6)[_0x1fa022(0x1f2)]();if(!_0x4124cc)throw CliErrors[_0x1fa022(0x207)](_0x1fa022(0x209));if(_0x4124cc['length']>0x40)throw CliErrors[_0x1fa022(0x207)](_0x1fa022(0x1fb));_0x2c4f38['roleName']=_0x4124cc;}_0x12b143!==undefined&&_0x12b143!==null&&(_0x2c4f38[_0x1fa022(0x1fc)]=String(_0x12b143));if(_0x2c4f38[_0x1fa022(0x1fe)]===undefined&&_0x2c4f38['remark']===undefined)throw CliErrors['validation']('Nothing\x20to\x20update.','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x2c4f38;}function a164_0xd856(){const _0x17d7d1=['Role\x20name\x20cannot\x20exceed\x2064\x20characters.','remark','appCode','roleName','603416YNXMbW','10OwBjjY','\x20(id=','1461138AcfJwk','1632aseVZQ','15710541BCqkzq','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(DEV/ADMIN\x20rejected)','118592bJGyyj','validation','update','--name\x20cannot\x20be\x20empty.','28AbsQTi','4491088kzCIPj','string','trim','name','POST','role','45IheCaw','298827vVEzrG','flag','32755lGWGMy','Updated\x20role\x20'];a164_0xd856=function(){return _0x17d7d1;};return a164_0xd856();}export const roleUpdate={'service':a164_0x307149(0x1f5),'command':a164_0x307149(0x208),'description':a164_0x307149(0x205),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':'name','type':a164_0x307149(0x1f1),'required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4870a8){readPatch(_0x4870a8);},async 'dryRun'(_0x5e8ad0){const _0x37677e=a164_0x307149,_0x3fa776=_0x5e8ad0['num']('id'),_0x133188=readPatch(_0x5e8ad0),_0x17e8a9=await getRoleById(_0x5e8ad0[_0x37677e(0x1fd)],_0x3fa776);return assertCustomRole(_0x17e8a9,_0x37677e(0x208)),asDryRunResult({'operation':_0x37677e(0x208),'selector':{'appCode':_0x5e8ad0['appCode'],'roleId':_0x3fa776,'roleName':_0x17e8a9[_0x37677e(0x1fe)]},'before':projectRole(_0x17e8a9),'after':projectRole({..._0x17e8a9,..._0x133188[_0x37677e(0x1fe)]!==undefined?{'roleName':_0x133188['roleName']}:{},..._0x133188['remark']!==undefined?{'remark':_0x133188[_0x37677e(0x1fc)]}:{}}),'dryRun':!![],'backend':{'method':_0x37677e(0x1f4),'path':UPDATE_PATH},'warnings':[]},{'method':_0x37677e(0x1f4),'url':UPDATE_PATH});},async 'execute'(_0x3fa4bb){const _0x4bb447=a164_0x307149,_0x2878b8=_0x3fa4bb['num']('id'),_0x2009f0=readPatch(_0x3fa4bb),_0x1586c6=await getRoleById(_0x3fa4bb[_0x4bb447(0x1fd)],_0x2878b8);assertCustomRole(_0x1586c6,_0x4bb447(0x208)),await updateAppRole({'id':_0x2878b8,'appCode':_0x3fa4bb[_0x4bb447(0x1fd)],..._0x2009f0['roleName']!==undefined?{'roleName':_0x2009f0[_0x4bb447(0x1fe)]}:{},..._0x2009f0[_0x4bb447(0x1fc)]!==undefined?{'remark':_0x2009f0[_0x4bb447(0x1fc)]}:{}});const _0x398586=await getRoleById(_0x3fa4bb[_0x4bb447(0x1fd)],_0x2878b8);return{'ok':!![],'data':{'operation':_0x4bb447(0x208),'selector':{'appCode':_0x3fa4bb[_0x4bb447(0x1fd)],'roleId':_0x2878b8,'roleName':_0x398586[_0x4bb447(0x1fe)]},'before':projectRole(_0x1586c6),'after':projectRole(_0x398586),'dryRun':![],'backend':{'method':_0x4bb447(0x1f4),'path':UPDATE_PATH},'warnings':[]},'message':_0x4bb447(0x1fa)+_0x398586[_0x4bb447(0x1fe)]+_0x4bb447(0x201)+_0x2878b8+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x197348=a165_0x2e00;function a165_0x2e00(_0x4132c4,_0x3cbe82){_0x4132c4=_0x4132c4-0xab;const _0x4fb4c2=a165_0x4fb4();let _0x2e00eb=_0x4fb4c2[_0x4132c4];return _0x2e00eb;}(function(_0x34e2ac,_0x34f8da){const _0x29fb5f=a165_0x2e00,_0x376711=_0x34e2ac();while(!![]){try{const _0x52103e=-parseInt(_0x29fb5f(0xb8))/0x1+parseInt(_0x29fb5f(0xb3))/0x2*(parseInt(_0x29fb5f(0xba))/0x3)+parseInt(_0x29fb5f(0xac))/0x4*(-parseInt(_0x29fb5f(0xaf))/0x5)+-parseInt(_0x29fb5f(0xb1))/0x6+parseInt(_0x29fb5f(0xae))/0x7*(-parseInt(_0x29fb5f(0xbc))/0x8)+-parseInt(_0x29fb5f(0xbd))/0x9+parseInt(_0x29fb5f(0xb4))/0xa*(parseInt(_0x29fb5f(0xbb))/0xb);if(_0x52103e===_0x34f8da)break;else _0x376711['push'](_0x376711['shift']());}catch(_0x178845){_0x376711['push'](_0x376711['shift']());}}}(a165_0x4fb4,0x3a243));import{updateRoleUsers}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,prepareUserMutation,ROLE_REF_FLAG,UPDATE_USER_LIST_PATH,USER_REF_FLAG}from'../../commands/role/shared.js';function a165_0x4fb4(){const _0x45be4a=['4zkomAy','\x20already\x20in\x20role\x20','7GBepPO','2271470ilrzBd','No\x20change:\x20user\x20','406896eJfFBB','roleName','895946xxVJyq','29180lpCknl','\x20to\x20role\x20','userId','POST','369849PHzwcZ','user-add','3DaAaQs','4631cLFVYr','1942176eyJQgU','2732157NKTmEO','selector'];a165_0x4fb4=function(){return _0x45be4a;};return a165_0x4fb4();}export const roleUserAdd={'service':'role','command':a165_0x197348(0xb9),'description':'Add\x20a\x20user\x20to\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x56963f){const _0x3c3f30=a165_0x197348,{mutation:_0x35de15}=await prepareUserMutation(_0x56963f,_0x3c3f30(0xb9),!![]);return asDryRunResult(_0x35de15,{'method':_0x3c3f30(0xb7),'url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x10d9fb){const _0x30a53d=a165_0x197348,{roleList:_0x304a67,mutation:_0x3f3d89,changed:_0x55433a}=await prepareUserMutation(_0x10d9fb,'user-add',![]);return _0x55433a&&await updateRoleUsers(_0x10d9fb['appCode'],_0x304a67),{'ok':!![],'data':_0x3f3d89,'message':_0x55433a?'Added\x20user\x20'+_0x3f3d89[_0x30a53d(0xab)]['userId']+_0x30a53d(0xb5)+_0x3f3d89[_0x30a53d(0xab)][_0x30a53d(0xb2)]:_0x30a53d(0xb0)+_0x3f3d89[_0x30a53d(0xab)][_0x30a53d(0xb6)]+_0x30a53d(0xad)+_0x3f3d89['selector'][_0x30a53d(0xb2)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a166_0x199cbb=a166_0x5b6f;(function(_0x3b6d32,_0x31067a){const _0x45cc19=a166_0x5b6f,_0x59dbab=_0x3b6d32();while(!![]){try{const _0x4a7f2d=parseInt(_0x45cc19(0x193))/0x1+parseInt(_0x45cc19(0x19d))/0x2+parseInt(_0x45cc19(0x18d))/0x3*(parseInt(_0x45cc19(0x1a0))/0x4)+-parseInt(_0x45cc19(0x191))/0x5+parseInt(_0x45cc19(0x19a))/0x6*(-parseInt(_0x45cc19(0x195))/0x7)+parseInt(_0x45cc19(0x19b))/0x8*(-parseInt(_0x45cc19(0x197))/0x9)+-parseInt(_0x45cc19(0x196))/0xa*(-parseInt(_0x45cc19(0x198))/0xb);if(_0x4a7f2d===_0x31067a)break;else _0x59dbab['push'](_0x59dbab['shift']());}catch(_0x37dbec){_0x59dbab['push'](_0x59dbab['shift']());}}}(a166_0xce77,0xab282));function a166_0xce77(){const _0x2437ae=['\x20from\x20role\x20','\x20not\x20in\x20role\x20','3436yNZGro','selector','Remove\x20a\x20user\x20from\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','high-risk-write','3372bHIqto','No\x20change:\x20user\x20','POST','roleName','4295740qxQKUs','userId','1013243SjJtoN','role','840kKmJKK','30MlyIVC','9tJxuBa','1236224moioMq','Removed\x20user\x20','50028eSabJD','6323064ykRWSf','user-remove','2070476PzReZY'];a166_0xce77=function(){return _0x2437ae;};return a166_0xce77();}import{updateRoleUsers}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a166_0x5b6f(_0x2c4451,_0x4b678d){_0x2c4451=_0x2c4451-0x18d;const _0xce775e=a166_0xce77();let _0x5b6f32=_0xce775e[_0x2c4451];return _0x5b6f32;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,prepareUserMutation,ROLE_REF_FLAG,UPDATE_USER_LIST_PATH,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a166_0x199cbb(0x194),'command':'user-remove','description':a166_0x199cbb(0x1a2),'risk':a166_0x199cbb(0x1a3),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x97f13){const _0x3a217a=a166_0x199cbb,{mutation:_0x4200f4}=await prepareUserMutation(_0x97f13,_0x3a217a(0x19c),!![]);return asDryRunResult(_0x4200f4,{'method':_0x3a217a(0x18f),'url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x2293b2){const _0x17a4fe=a166_0x199cbb,{roleList:_0x5628bf,mutation:_0x36ed64,changed:_0x2be532}=await prepareUserMutation(_0x2293b2,_0x17a4fe(0x19c),![]);return _0x2be532&&await updateRoleUsers(_0x2293b2['appCode'],_0x5628bf),{'ok':!![],'data':_0x36ed64,'message':_0x2be532?_0x17a4fe(0x199)+_0x36ed64[_0x17a4fe(0x1a1)][_0x17a4fe(0x192)]+_0x17a4fe(0x19e)+_0x36ed64[_0x17a4fe(0x1a1)][_0x17a4fe(0x190)]:_0x17a4fe(0x18e)+_0x36ed64[_0x17a4fe(0x1a1)]['userId']+_0x17a4fe(0x19f)+_0x36ed64[_0x17a4fe(0x1a1)]['roleName']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a167_0x3333ca=a167_0x508b;function a167_0x30bf(){const _0x5d2186=['matchedBy','15117NamBaj','name','2309209Queotu','8WeQJwf','2253018yTjmcY','role','nickname','1397214sVPTTR','trim','user-resolve','read','username','518572haHCJL','5634765WBKhte','Resolved\x20\x22','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','Pass\x20--name\x20<nickname|username>.','70OhTBvy','5kFCvVQ','flagMissing','12506980phqfCU'];a167_0x30bf=function(){return _0x5d2186;};return a167_0x30bf();}(function(_0x58a5b3,_0x552f31){const _0x287c4b=a167_0x508b,_0x31c186=_0x58a5b3();while(!![]){try{const _0xed7c5d=parseInt(_0x287c4b(0x104))/0x1*(parseInt(_0x287c4b(0xff))/0x2)+parseInt(_0x287c4b(0xf2))/0x3+parseInt(_0x287c4b(0xfa))/0x4*(-parseInt(_0x287c4b(0x100))/0x5)+parseInt(_0x287c4b(0xf5))/0x6+-parseInt(_0x287c4b(0xf0))/0x7*(parseInt(_0x287c4b(0xf1))/0x8)+parseInt(_0x287c4b(0xfb))/0x9+-parseInt(_0x287c4b(0x102))/0xa;if(_0xed7c5d===_0x552f31)break;else _0x31c186['push'](_0x31c186['shift']());}catch(_0x3c3e46){_0x31c186['push'](_0x31c186['shift']());}}}(a167_0x30bf,0x68b1b));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a167_0x508b(_0x419a7f,_0x335090){_0x419a7f=_0x419a7f-0xf0;const _0x30bf60=a167_0x30bf();let _0x508bac=_0x30bf60[_0x419a7f];return _0x508bac;}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a167_0x3333ca(0xf3),'command':a167_0x3333ca(0xf7),'description':a167_0x3333ca(0xfd),'risk':a167_0x3333ca(0xf8),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x38b408){const _0xee5fdb=a167_0x3333ca;if(!_0x38b408['str'](_0xee5fdb(0x105))[_0xee5fdb(0xf6)]())throw CliErrors[_0xee5fdb(0x101)]('name',_0xee5fdb(0xfe));},async 'execute'(_0x133e92){const _0x128c45=a167_0x3333ca,_0x456c13=_0x133e92['str'](_0x128c45(0x105))['trim'](),_0x4f8b82=await resolveUserRef(_0x456c13);return{'ok':!![],'data':{'user':{'userId':_0x4f8b82['userId'],'username':_0x4f8b82[_0x128c45(0xf9)],'nickname':_0x4f8b82[_0x128c45(0xf4)],'matchedBy':_0x4f8b82[_0x128c45(0x103)]}},'message':_0x128c45(0xfc)+_0x456c13+'\x22\x20→\x20userId\x20'+_0x4f8b82['userId']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a168_0x44d9f3=a168_0x164c;(function(_0x371924,_0x25a6dd){const _0x49099a=a168_0x164c,_0x2048d9=_0x371924();while(!![]){try{const _0x1211f2=parseInt(_0x49099a(0xff))/0x1+-parseInt(_0x49099a(0x130))/0x2*(-parseInt(_0x49099a(0x126))/0x3)+parseInt(_0x49099a(0x102))/0x4+parseInt(_0x49099a(0x107))/0x5+parseInt(_0x49099a(0x115))/0x6+-parseInt(_0x49099a(0x12f))/0x7+parseInt(_0x49099a(0x10e))/0x8*(-parseInt(_0x49099a(0x123))/0x9);if(_0x1211f2===_0x25a6dd)break;else _0x2048d9['push'](_0x2048d9['shift']());}catch(_0x134720){_0x2048d9['push'](_0x2048d9['shift']());}}}(a168_0x39da,0xb565c));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';function a168_0x164c(_0x2194d8,_0x7056de){_0x2194d8=_0x2194d8-0xf8;const _0x39da60=a168_0x39da();let _0x164c47=_0x39da60[_0x2194d8];return _0x164c47;}const VERSION_CHECK_SCRIPTS=new Set([a168_0x44d9f3(0xf8),a168_0x44d9f3(0xf9)]);function readPackageScripts(_0x37357d){const _0x59ccbb=a168_0x44d9f3,_0x4942a5=resolve(_0x37357d,_0x59ccbb(0x12e));if(!existsSync(_0x4942a5))return null;try{const _0x1646ae=JSON[_0x59ccbb(0x132)](readFileSync(_0x4942a5,_0x59ccbb(0x10a)));return _0x1646ae[_0x59ccbb(0x105)]??{};}catch{return null;}}function detectPackageManager(_0x40ed04){const _0x26e68b=a168_0x44d9f3;if(existsSync(resolve(_0x40ed04,_0x26e68b(0x10f)))||existsSync(resolve(_0x40ed04,_0x26e68b(0x122))))return'bun';if(existsSync(resolve(_0x40ed04,'pnpm-lock.yaml')))return _0x26e68b(0x131);if(existsSync(resolve(_0x40ed04,_0x26e68b(0x12a))))return _0x26e68b(0x11f);return _0x26e68b(0x124);}function a168_0x39da(){const _0x3e4e95=['\x22\x20not\x20found\x20in\x20package.json.','scripts','\x20run\x20','715200WUfOxT','read','all','utf-8','args','watch','belowMinimum','27311224npoPjX','bun.lockb','\x20exited\x20with\x20code\x20','has','\x0a\x20\x20Usage:\x20','(none)','node_modules','7052694ydUBrs','\x20\x20\x20\x20','No\x20scripts\x20defined\x20in\x20package.json.','keys','needsUpgrade','Run\x20a\x20package.json\x20script','inherit','\x20run\x20preview','push','validation','yarn','Script\x20name\x20defined\x20in\x20package.json','preview','bun.lock','9SMBnfe','npm','Enable\x20watch\x20mode\x20for\x20preview','12TBndeo','Available:\x20','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','join','yarn.lock','cwd','\x20\x20EXAMPLES','error','package.json','1300628QGrphD','567172JDCYia','pnpm','parse','vite\x20preview\x20exited\x20with\x20code\x20','.bin','run','\x20run\x20start','start','dev','Script\x20\x22','log','slice','\x20run\x20build','No\x20package.json\x20found\x20in\x20current\x20directory.','940227dXpLVy','\x20run\x20<script>\x0a','bool','3798604btzTNn','close'];a168_0x39da=function(){return _0x3e4e95;};return a168_0x39da();}async function versionCheck(_0x468034){const _0x451cff=a168_0x44d9f3,_0x438a16=await checkCliVersion();(_0x438a16[_0x451cff(0x119)]||_0x438a16[_0x451cff(0x10d)])&&(printCliUpgradeWarning(_0x438a16),assertCliVersionSupported(_0x438a16));const _0x5477b1=await checkSdkVersion(_0x468034);if(_0x5477b1[_0x451cff(0x119)])printSdkUpgradeWarning(_0x5477b1);}function spawnScript(_0x4cded8,_0xbcd94c,_0x35be4a,_0xb25ed9){return new Promise((_0x550d21,_0x392481)=>{const _0x5bac57=a168_0x164c,_0x1be665=[_0x5bac57(0x135),_0xbcd94c,..._0x35be4a],_0x42e3b9=spawn(_0x4cded8,_0x1be665,{'cwd':_0xb25ed9,'stdio':_0x5bac57(0x11b),'shell':!![],'env':{...process.env,'PATH':''+join(_0xb25ed9,_0x5bac57(0x114),_0x5bac57(0x134))+delimiter+process.env.PATH}});_0x42e3b9['on'](_0x5bac57(0x103),_0x2b6bd0=>{const _0x30d0a3=_0x5bac57;if(_0x2b6bd0===0x0||_0x2b6bd0===null)_0x550d21();else _0x392481(new Error(_0x4cded8+_0x30d0a3(0x106)+_0xbcd94c+_0x30d0a3(0x110)+_0x2b6bd0));}),_0x42e3b9['on'](_0x5bac57(0x12d),_0x392481);});}function spawnViteBuildWatch(_0x5d6eae){return new Promise((_0x5670b4,_0x5e423b)=>{const _0x3e9db0=a168_0x164c,_0x367e9b=spawn('vite',['build','--watch'],{'cwd':_0x5d6eae,'stdio':_0x3e9db0(0x11b),'shell':!![],'env':{...process.env,'PATH':''+join(_0x5d6eae,'node_modules',_0x3e9db0(0x134))+delimiter+process.env.PATH}});_0x367e9b['on']('close',_0x3f9fdd=>{const _0x390a31=_0x3e9db0;if(_0x3f9fdd===0x0||_0x3f9fdd===null)_0x5670b4();else _0x5e423b(new Error(_0x390a31(0x128)+_0x3f9fdd));}),_0x367e9b['on'](_0x3e9db0(0x12d),_0x5e423b);});}function spawnVitePreview(_0xb05874){return new Promise((_0x217e6b,_0x490a85)=>{const _0x1c6479=a168_0x164c,_0x19399f=spawn('vite',[_0x1c6479(0x121)],{'cwd':_0xb05874,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0xb05874,_0x1c6479(0x114),_0x1c6479(0x134))+delimiter+process.env.PATH}});_0x19399f['on'](_0x1c6479(0x103),_0xa03136=>{const _0x26112f=_0x1c6479;if(_0xa03136===0x0||_0xa03136===null)_0x217e6b();else _0x490a85(new Error(_0x26112f(0x133)+_0xa03136));}),_0x19399f['on'](_0x1c6479(0x12d),_0x490a85);});}const runFlags=[{'name':a168_0x44d9f3(0x10c),'type':'boolean','description':a168_0x44d9f3(0x125),'default':![]}];export const runDefinition={'service':a168_0x44d9f3(0x135),'command':a168_0x44d9f3(0x135),'description':a168_0x44d9f3(0x11a),'risk':a168_0x44d9f3(0x108),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':a168_0x44d9f3(0x120),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x421bea=a168_0x44d9f3,_0x2f6a78=[];return _0x2f6a78['push'](_0x421bea(0x12c)),_0x2f6a78[_0x421bea(0x11d)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x421bea(0x136)),_0x2f6a78[_0x421bea(0x11d)](_0x421bea(0x116)+CLI_BIN_NAME+_0x421bea(0xfd)),_0x2f6a78[_0x421bea(0x11d)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x421bea(0x11c)),_0x2f6a78[_0x421bea(0x11d)]('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20preview\x20--watch'),_0x2f6a78[_0x421bea(0x129)]('\x0a');},async 'execute'(_0x1f48f4){const _0x1da6e4=a168_0x44d9f3,_0x3dcc7c=process[_0x1da6e4(0x12b)](),_0x53f69e=_0x1f48f4[_0x1da6e4(0x10b)][0x0],_0x5a5043=_0x1f48f4[_0x1da6e4(0x10b)][_0x1da6e4(0xfc)](0x1),_0x4b7ed8=readPackageScripts(_0x3dcc7c);if(!_0x4b7ed8)throw CliErrors[_0x1da6e4(0x11e)](_0x1da6e4(0xfe));if(!_0x53f69e){const _0x55cca6=Object[_0x1da6e4(0x118)](_0x4b7ed8);if(_0x55cca6['length']===0x0)console['log'](_0x1da6e4(0x117));else{console[_0x1da6e4(0xfb)]('\x0a\x20\x20Available\x20scripts:\x0a');for(const _0x343693 of _0x55cca6){console['log']('\x20\x20\x20\x20'+_0x343693);}console['log'](_0x1da6e4(0x112)+CLI_BIN_NAME+_0x1da6e4(0x100));}return{'ok':!![]};}if(!_0x4b7ed8[_0x53f69e])throw CliErrors[_0x1da6e4(0x11e)](_0x1da6e4(0xfa)+_0x53f69e+_0x1da6e4(0x104),_0x1da6e4(0x127)+(Object[_0x1da6e4(0x118)](_0x4b7ed8)[_0x1da6e4(0x129)](',\x20')||_0x1da6e4(0x113)));const _0x47d2ca=detectPackageManager(_0x3dcc7c);VERSION_CHECK_SCRIPTS[_0x1da6e4(0x111)](_0x53f69e)&&await versionCheck(_0x3dcc7c);if(_0x53f69e===_0x1da6e4(0x121)&&_0x1f48f4[_0x1da6e4(0x101)](_0x1da6e4(0x10c)))return await Promise[_0x1da6e4(0x109)]([spawnViteBuildWatch(_0x3dcc7c),spawnVitePreview(_0x3dcc7c)]),{'ok':!![]};return await spawnScript(_0x47d2ca,_0x53f69e,_0x5a5043,_0x3dcc7c),{'ok':!![]};}};
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a169_0x2d8d3d=a169_0x2221;(function(_0x2aa52f,_0xfdad71){const _0x6a910a=a169_0x2221,_0x4615d5=_0x2aa52f();while(!![]){try{const _0x1368a6=-parseInt(_0x6a910a(0x16f))/0x1+-parseInt(_0x6a910a(0x174))/0x2*(parseInt(_0x6a910a(0x17b))/0x3)+-parseInt(_0x6a910a(0x175))/0x4+-parseInt(_0x6a910a(0x173))/0x5+parseInt(_0x6a910a(0x178))/0x6+parseInt(_0x6a910a(0x170))/0x7*(parseInt(_0x6a910a(0x179))/0x8)+parseInt(_0x6a910a(0x176))/0x9;if(_0x1368a6===_0xfdad71)break;else _0x4615d5['push'](_0x4615d5['shift']());}catch(_0x320ca0){_0x4615d5['push'](_0x4615d5['shift']());}}}(a169_0x2f39,0x5a651));import{buildSchemaPayload}from'../framework/schema-export.js';function a169_0x2221(_0x55a533,_0x44249c){_0x55a533=_0x55a533-0x16e;const _0x2f39fb=a169_0x2f39();let _0x22213b=_0x2f39fb[_0x55a533];return _0x22213b;}async function execute(_0x38e7bc){const _0x13341a=await buildSchemaPayload();return{'ok':!![],'data':_0x13341a};}function a169_0x2f39(){const _0x37cd09=['237308PDVaRi','21iohCae','Export\x20machine-readable\x20command\x20schema\x20(JSON)','json','567235RMKlgB','234538BxSzjV','1547444JADCly','4264389xMMpNu','read','837852OSsdJB','1631144qsMhvL','export','3SsTLEQ','schema'];a169_0x2f39=function(){return _0x37cd09;};return a169_0x2f39();}export const schemaDefinition={'service':a169_0x2d8d3d(0x16e),'command':a169_0x2d8d3d(0x17a),'description':a169_0x2d8d3d(0x171),'risk':a169_0x2d8d3d(0x177),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a169_0x2d8d3d(0x172),'flags':[],'execute':execute};
|