@lovrabet/rabetbase-cli 2.4.6-beta.1 → 2.4.6-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.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/business-groups.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-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.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.d.ts +8 -7
- 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/types.d.ts +17 -2
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.d.ts +2 -0
- package/lib/commands/menu/visibility-update.js +1 -0
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.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/sync.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/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.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/upgrade.js +1 -1
- package/lib/commands/registry.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/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/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.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.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.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/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +4 -3
- package/skills/rabetbase/references/rabetbase-menu-list.md +3 -1
- package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +59 -0
- package/skills/rabetbase/references/rabetbase-ocr.md +17 -2
- package/skills/rabetbase.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a164_0x1da298=a164_0x45b4;(function(_0x46ee94,_0x1e2eb5){const _0x17e193=a164_0x45b4,_0x1a45b0=_0x46ee94();while(!![]){try{const _0x76f601=-parseInt(_0x17e193(0xf6))/0x1+parseInt(_0x17e193(0x101))/0x2*(-parseInt(_0x17e193(0xe2))/0x3)+-parseInt(_0x17e193(0xc7))/0x4+-parseInt(_0x17e193(0xb6))/0x5+-parseInt(_0x17e193(0xfa))/0x6+-parseInt(_0x17e193(0xe9))/0x7+parseInt(_0x17e193(0xe4))/0x8;if(_0x76f601===_0x1e2eb5)break;else _0x1a45b0['push'](_0x1a45b0['shift']());}catch(_0x5b0d55){_0x1a45b0['push'](_0x1a45b0['shift']());}}}(a164_0x249e,0x70179));import{createHash}from'node:crypto';import a164_0x283b0c from'node:fs/promises';import a164_0x4b66ad from'node:path';import{PROJECT_TEMPLATE_ASSET_BASE_URL}from'../../../constant/cdn.js';import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';function a164_0x45b4(_0x23a32d,_0x29c9fc){_0x23a32d=_0x23a32d-0xb2;const _0x249e5a=a164_0x249e();let _0x45b4ab=_0x249e5a[_0x23a32d];return _0x45b4ab;}import{getRabetbaseCdnConfig}from'../../../utils/cli-version-policy.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID=a164_0x1da298(0xbd),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0xde092e){const _0x479d09=a164_0x1da298;return typeof _0xde092e===_0x479d09(0xde)&&_0xde092e['trim']()?_0xde092e[_0x479d09(0xea)]():null;}function parseDescriptor(_0x4786be){const _0x3686f7=a164_0x1da298;if(!_0x4786be||typeof _0x4786be!==_0x3686f7(0x100))throw new Error(_0x3686f7(0xf3)+TEMPLATE_ID+'\x22.');const _0x20aa3c=_0x4786be,_0x4f5af0=nonEmptyString(_0x20aa3c[_0x3686f7(0xd1)]),_0x41bb27=nonEmptyString(_0x20aa3c[_0x3686f7(0xb3)]),_0x468516=nonEmptyString(_0x20aa3c['sha256'])?.[_0x3686f7(0xda)](),_0x31112d=_0x20aa3c['size'];if(!_0x4f5af0||!_0x41bb27||_0x41bb27!==a164_0x4b66ad[_0x3686f7(0xbe)][_0x3686f7(0xc8)](_0x41bb27)||_0x41bb27[_0x3686f7(0xd4)]('\x5c')||!_0x468516||!/^sha256:[a-f0-9]{64}$/[_0x3686f7(0xff)](_0x468516)||typeof _0x31112d!=='number'||!Number[_0x3686f7(0xc3)](_0x31112d)||_0x31112d<=0x0||_0x31112d>MAX_ARCHIVE_SIZE)throw new Error(_0x3686f7(0xd5)+TEMPLATE_ID+'\x22.');return{'version':_0x4f5af0,'name':_0x41bb27,'sha256':_0x468516,'size':_0x31112d};}function a164_0x249e(){const _0x302bd1=['project','Use\x20a\x20different\x20project\x20name.','796753fCbQtN','headers','origin','length','4787148sWMWcl','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','ino','signal','join','test','object','9350GOchSg','.rabetbase-create-','ENOENT','pathname','name','size','template.zip','2837810fVqtan','sha256','resolving','application/zip','hex','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','update','sub-app-react-demo','posix','push','resolve','concat',',\x20received\x20','isSafeInteger','content-length','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','getReader','3065744LtsLfK','basename','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','Project\x20template\x20package.json\x20is\x20invalid.','writeFile','get','message','rename','downloading','sha256:','version','from','Project\x20directory\x20already\x20exists:\x20','includes','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','read','mkdtemp','startsWith','dirname','toLowerCase','byteLength','dev','readdir','string','digest','arrayBuffer','cdn','111eZXuKi','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','35568960mvnWfc','isFinite','package.json','isDirectory','body','6197849PEykKk','trim','mkdir','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','verifying','extracting','Unable\x20to\x20claim\x20the\x20project\x20directory.','code','validation','https:','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22'];a164_0x249e=function(){return _0x302bd1;};return a164_0x249e();}async function fetchWithTimeout(_0x3fc2f8,_0x39c743,_0x5f53d1,_0x5293ed){const _0x20dd4a=a164_0x1da298,_0x1edad7=new AbortController(),_0x38e296=setTimeout(()=>_0x1edad7['abort'](),_0x39c743);try{const _0x485d4b=await fetch(_0x3fc2f8,{'headers':{'Accept':_0x5f53d1},'signal':_0x1edad7[_0x20dd4a(0xfd)]});return await _0x5293ed(_0x485d4b);}finally{clearTimeout(_0x38e296);}}async function fetchTemplateDescriptor(){const _0xe8fa08=a164_0x1da298,_0x51c02c=await getRabetbaseCdnConfig();if(!_0x51c02c)throw new Error(_0xe8fa08(0xc9));return parseDescriptor(_0x51c02c['projectTemplate']);}function resolveArchiveUrl(_0x2a682a){const _0x494a14=a164_0x1da298,_0x21b922=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x45c77f=new URL(_0x2a682a,_0x21b922);if(_0x45c77f['protocol']!==_0x494a14(0xf2)||_0x45c77f[_0x494a14(0xf8)]!==_0x21b922[_0x494a14(0xf8)]||!_0x45c77f[_0x494a14(0xb2)][_0x494a14(0xd8)](_0x21b922[_0x494a14(0xb2)]))throw new Error(_0x494a14(0xe3));return _0x45c77f['href'];}async function readResponseBytes(_0x270587,_0x9ffb39){const _0x55d18b=a164_0x1da298;if(!_0x270587[_0x55d18b(0xe8)]){const _0xba063a=Buffer[_0x55d18b(0xd2)](await _0x270587[_0x55d18b(0xe0)]());if(_0xba063a['length']>_0x9ffb39)throw new Error(_0x55d18b(0xc5));return _0xba063a;}const _0x324b83=_0x270587[_0x55d18b(0xe8)][_0x55d18b(0xc6)](),_0x3cc759=[];let _0x5bb87a=0x0;try{while(!![]){const {done:_0x5ca96f,value:_0x48d8c0}=await _0x324b83[_0x55d18b(0xd6)]();if(_0x5ca96f)break;_0x5bb87a+=_0x48d8c0[_0x55d18b(0xdb)];if(_0x5bb87a>_0x9ffb39){await _0x324b83['cancel']();throw new Error(_0x55d18b(0xc5));}_0x3cc759[_0x55d18b(0xbf)](Buffer[_0x55d18b(0xd2)](_0x48d8c0));}}finally{_0x324b83['releaseLock']();}return Buffer[_0x55d18b(0xc1)](_0x3cc759,_0x5bb87a);}async function downloadArchive(_0x5ead7d,_0x1f8668,_0x3a073a){const _0x469e52=a164_0x1da298,_0x1dc6a0=await fetchWithTimeout(resolveArchiveUrl(_0x5ead7d['name']),ARCHIVE_TIMEOUT_MS,_0x469e52(0xb9),async _0x19d1e7=>{const _0x2ad0cd=_0x469e52;if(!_0x19d1e7['ok'])throw new Error(_0x2ad0cd(0xbb)+_0x19d1e7['status']+'.');const _0x39c564=Number(_0x19d1e7[_0x2ad0cd(0xf7)][_0x2ad0cd(0xcc)](_0x2ad0cd(0xc4)));if(Number[_0x2ad0cd(0xe5)](_0x39c564)&&_0x39c564>MAX_ARCHIVE_SIZE)throw new Error(_0x2ad0cd(0xec));return readResponseBytes(_0x19d1e7,_0x5ead7d['size']);});if(_0x1dc6a0[_0x469e52(0xf9)]!==_0x5ead7d[_0x469e52(0xb4)])throw new Error('CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20'+_0x5ead7d['size']+_0x469e52(0xc2)+_0x1dc6a0[_0x469e52(0xf9)]+'.');_0x3a073a?.(_0x469e52(0xed));const _0x4f25e3=_0x469e52(0xd0)+createHash(_0x469e52(0xb7))[_0x469e52(0xbc)](_0x1dc6a0)[_0x469e52(0xdf)](_0x469e52(0xba));if(_0x4f25e3!==_0x5ead7d[_0x469e52(0xb7)])throw new Error('CDN\x20project\x20template\x20checksum\x20verification\x20failed.');await a164_0x283b0c[_0x469e52(0xcb)](_0x1f8668,_0x1dc6a0,{'flag':'wx'});}async function assertTemplateRoot(_0x147b6a){const _0x3461dd=a164_0x1da298,_0x5027c5=a164_0x4b66ad[_0x3461dd(0xfe)](_0x147b6a,_0x3461dd(0xe6)),_0x429ecf=JSON['parse'](await a164_0x283b0c['readFile'](_0x5027c5,'utf8'));if(!_0x429ecf||typeof _0x429ecf!==_0x3461dd(0x100))throw new Error(_0x3461dd(0xca));}async function readDirectoryIdentity(_0x3872e6){const _0x5728bf=a164_0x1da298;try{const _0x365c3c=await a164_0x283b0c['lstat'](_0x3872e6);if(!_0x365c3c[_0x5728bf(0xe7)]())return null;return{'dev':_0x365c3c[_0x5728bf(0xdc)],'ino':_0x365c3c[_0x5728bf(0xfc)]};}catch{return null;}}async function commitStagedProject(_0x4937ac,_0x2d720c){const _0x5e006e=a164_0x1da298;await a164_0x283b0c[_0x5e006e(0xeb)](_0x2d720c);const _0x4ab495=await readDirectoryIdentity(_0x2d720c);if(!_0x4ab495)throw new Error(_0x5e006e(0xef));try{for(const _0x7d6e1 of await a164_0x283b0c[_0x5e006e(0xdd)](_0x4937ac)){await a164_0x283b0c[_0x5e006e(0xce)](a164_0x4b66ad[_0x5e006e(0xfe)](_0x4937ac,_0x7d6e1),a164_0x4b66ad[_0x5e006e(0xfe)](_0x2d720c,_0x7d6e1));}}catch(_0x23ce85){const _0x23454b=await readDirectoryIdentity(_0x2d720c);_0x23454b?.[_0x5e006e(0xdc)]===_0x4ab495[_0x5e006e(0xdc)]&&_0x23454b[_0x5e006e(0xfc)]===_0x4ab495[_0x5e006e(0xfc)]&&await a164_0x283b0c['rm'](_0x2d720c,{'recursive':!![],'force':!![]});throw _0x23ce85;}}export async function materializeProjectTemplate(_0x479a2c,_0x2b1b2c){const _0x53d9aa=a164_0x1da298,_0x596eba=a164_0x4b66ad[_0x53d9aa(0xc0)](_0x479a2c),_0x148def=a164_0x4b66ad[_0x53d9aa(0xd9)](_0x596eba);try{await a164_0x283b0c['lstat'](_0x596eba);throw new Error(_0x53d9aa(0xd3)+_0x596eba);}catch(_0x2f7060){if(_0x2f7060[_0x53d9aa(0xf0)]!==_0x53d9aa(0x103))throw _0x2f7060;}const _0x2e5f4f=await a164_0x283b0c[_0x53d9aa(0xd7)](a164_0x4b66ad[_0x53d9aa(0xfe)](_0x148def,_0x53d9aa(0x102))),_0x5324dd=a164_0x4b66ad[_0x53d9aa(0xfe)](_0x2e5f4f,_0x53d9aa(0xf4)),_0x2635cb=a164_0x4b66ad['join'](_0x2e5f4f,_0x53d9aa(0xb5));try{try{_0x2b1b2c?.(_0x53d9aa(0xb8));const _0x18c81c=await fetchTemplateDescriptor();return _0x2b1b2c?.(_0x53d9aa(0xcf)),await downloadArchive(_0x18c81c,_0x2635cb,_0x2b1b2c),_0x2b1b2c?.(_0x53d9aa(0xee)),await extractProjectTemplateArchive(_0x2635cb,_0x5324dd),await assertTemplateRoot(_0x5324dd),await commitStagedProject(_0x5324dd,_0x596eba),{'source':_0x53d9aa(0xe1),'version':_0x18c81c[_0x53d9aa(0xd1)]};}catch(_0x415c1b){if(_0x415c1b[_0x53d9aa(0xf0)]==='EEXIST')throw CliErrors[_0x53d9aa(0xf1)](_0x53d9aa(0xd3)+_0x596eba,_0x53d9aa(0xf5));const _0x42da4d=_0x415c1b instanceof Error?_0x415c1b[_0x53d9aa(0xcd)]:String(_0x415c1b);throw CliErrors['validation'](_0x53d9aa(0xfb),'Check\x20your\x20network\x20and\x20retry.\x20Details:\x20'+_0x42da4d);}}finally{await a164_0x283b0c['rm'](_0x2e5f4f,{'recursive':!![],'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a165_0x4bdc(_0x3d6989,_0x4531a3){_0x3d6989=_0x3d6989-0x129;const _0x480aa6=a165_0x480a();let _0x4bdc8e=_0x480aa6[_0x3d6989];return _0x4bdc8e;}(function(_0x594135,_0x5ae132){const _0x3b2d11=a165_0x4bdc,_0x1246a6=_0x594135();while(!![]){try{const _0x30c7e5=parseInt(_0x3b2d11(0x134))/0x1+-parseInt(_0x3b2d11(0x129))/0x2*(parseInt(_0x3b2d11(0x13b))/0x3)+-parseInt(_0x3b2d11(0x12f))/0x4*(-parseInt(_0x3b2d11(0x12d))/0x5)+-parseInt(_0x3b2d11(0x133))/0x6+-parseInt(_0x3b2d11(0x131))/0x7*(parseInt(_0x3b2d11(0x137))/0x8)+parseInt(_0x3b2d11(0x12e))/0x9+parseInt(_0x3b2d11(0x135))/0xa*(parseInt(_0x3b2d11(0x138))/0xb);if(_0x30c7e5===_0x5ae132)break;else _0x1246a6['push'](_0x1246a6['shift']());}catch(_0x55a67a){_0x1246a6['push'](_0x1246a6['shift']());}}}(a165_0x480a,0x9a82d));import{CliErrors}from'../../../errors.js';const PROJECT_NAME_PATTERN=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i,MAX_PROJECT_NAME_LENGTH=0x64;function a165_0x480a(){const _0x419a29=['5QrvUQj','8205633BzyVuE','1164712mKWkQN','Project\x20name\x20\x22','588OKKCOG','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','7528524ItxZtz','809832AYfjpd','310fPZJwQ','trim','10792FspcAZ','158829ASAKeV','test','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','1167UMkgGz','2362HEzXjK','validation','\x20characters','Project\x20name\x20cannot\x20be\x20empty'];a165_0x480a=function(){return _0x419a29;};return a165_0x480a();}export function getProjectNameValidationError(_0x59e1c5){const _0x5e18bf=a165_0x4bdc,_0x86d2c8=_0x59e1c5[_0x5e18bf(0x136)]();if(!_0x86d2c8)return _0x5e18bf(0x12c);if(_0x86d2c8['length']>MAX_PROJECT_NAME_LENGTH)return'Project\x20name\x20cannot\x20exceed\x20'+MAX_PROJECT_NAME_LENGTH+_0x5e18bf(0x12b);if(!PROJECT_NAME_PATTERN[_0x5e18bf(0x139)](_0x86d2c8))return _0x5e18bf(0x13a);if(WINDOWS_RESERVED_NAME[_0x5e18bf(0x139)](_0x86d2c8))return _0x5e18bf(0x130)+_0x86d2c8+'\x22\x20is\x20reserved\x20on\x20Windows';return null;}export function validateProjectName(_0x5a66e6){const _0x5ae97c=a165_0x4bdc,_0x3d16a1=_0x5a66e6['trim'](),_0x68ba34=getProjectNameValidationError(_0x3d16a1);if(_0x68ba34)throw CliErrors[_0x5ae97c(0x12a)](_0x68ba34,_0x5ae97c(0x132));return _0x3d16a1;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x429b2e,_0x2e070e){const _0xe4b07e=a166_0xe3e4,_0x4a9bd0=_0x429b2e();while(!![]){try{const _0xb4b9d6=-parseInt(_0xe4b07e(0x15c))/0x1*(parseInt(_0xe4b07e(0x16c))/0x2)+parseInt(_0xe4b07e(0x162))/0x3*(parseInt(_0xe4b07e(0x14f))/0x4)+-parseInt(_0xe4b07e(0x15d))/0x5*(parseInt(_0xe4b07e(0x168))/0x6)+parseInt(_0xe4b07e(0x177))/0x7+-parseInt(_0xe4b07e(0x171))/0x8*(-parseInt(_0xe4b07e(0x151))/0x9)+-parseInt(_0xe4b07e(0x165))/0xa+parseInt(_0xe4b07e(0x159))/0xb;if(_0xb4b9d6===_0x2e070e)break;else _0x4a9bd0['push'](_0x4a9bd0['shift']());}catch(_0x5df35f){_0x4a9bd0['push'](_0x4a9bd0['shift']());}}}(a166_0x48fe,0xba797));import{createWriteStream}from'node:fs';import a166_0x262a99 from'node:fs/promises';import a166_0x325bc5 from'node:path';import{pipeline}from'node:stream/promises';import a166_0x49bb7c from'yauzl';function a166_0x48fe(){const _0x38ac5f=['test','join','481696cAJjkp','has','261mWNBXP','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','replace','end','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','mkdir','externalFileAttributes','length','19002181gCGTtN','fileName','startsWith','3499BVrmKN','24045ZrdWVO','Project\x20template\x20ZIP\x20exceeds\x20','catch','openReadStream','entry','18qhfhqx','get','sep','3255640WoUnmO','uncompressedSize','once','1482RKtRRJ','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','Unable\x20to\x20read\x20ZIP\x20entry:\x20','dirname','628kNBUuC','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','toLocaleLowerCase','split','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','104648rUiFXA','resolve','slice','endsWith','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','set','3825556qztZcd','readEntry'];a166_0x48fe=function(){return _0x38ac5f;};return a166_0x48fe();}const MAX_ENTRY_COUNT=0x7d0,MAX_UNCOMPRESSED_SIZE=0x32*0x400*0x400,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i,WINDOWS_INVALID_CHAR=/[<>:"|?*\x00-\x1f]/;function openZip(_0x2364d5){return new Promise((_0x4e354e,_0xb0d0b2)=>{a166_0x49bb7c['open'](_0x2364d5,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x228238,_0x1499ae)=>{if(_0x228238||!_0x1499ae){_0xb0d0b2(_0x228238||new Error('Unable\x20to\x20open\x20project\x20template\x20archive.'));return;}_0x4e354e(_0x1499ae);});});}function a166_0xe3e4(_0xc0bb6b,_0x5354f6){_0xc0bb6b=_0xc0bb6b-0x14e;const _0x48fe53=a166_0x48fe();let _0xe3e41b=_0x48fe53[_0xc0bb6b];return _0xe3e41b;}function openEntryStream(_0x1bcb8b,_0x1157f6){return new Promise((_0x48ec6c,_0x2c848f)=>{const _0x4c3d59=a166_0xe3e4;_0x1bcb8b[_0x4c3d59(0x160)](_0x1157f6,(_0x4c0f1e,_0x8e7fc2)=>{const _0x3391f6=_0x4c3d59;if(_0x4c0f1e||!_0x8e7fc2){_0x2c848f(_0x4c0f1e||new Error(_0x3391f6(0x16a)+_0x1157f6['fileName']));return;}_0x48ec6c(_0x8e7fc2);});});}function validateEntryPath(_0x38ade4){const _0x475881=a166_0xe3e4,_0x365bfb=_0x38ade4[_0x475881(0x153)](/\\/g,'/'),_0x1fb214=_0x365bfb[_0x475881(0x174)]('/'),_0x4908ce=_0x1fb214?_0x365bfb[_0x475881(0x173)](0x0,-0x1):_0x365bfb;if(!_0x4908ce||_0x365bfb[_0x475881(0x15b)]('/')||/^[A-Za-z]:\//[_0x475881(0x179)](_0x365bfb))throw new Error(_0x475881(0x155)+_0x38ade4);const _0x3aac48=_0x4908ce[_0x475881(0x16f)]('/');for(const _0x3aaa1f of _0x3aac48){if(!_0x3aaa1f||_0x3aaa1f==='.'||_0x3aaa1f==='..'||_0x3aaa1f['endsWith']('.')||_0x3aaa1f[_0x475881(0x174)]('\x20')||WINDOWS_INVALID_CHAR[_0x475881(0x179)](_0x3aaa1f)||WINDOWS_RESERVED_NAME[_0x475881(0x179)](_0x3aaa1f))throw new Error(_0x475881(0x170)+_0x38ade4);}return{'relativePath':_0x3aac48[_0x475881(0x14e)](a166_0x325bc5['sep']),'directory':_0x1fb214};}function isSymbolicLink(_0x3f9c69){const _0x278664=a166_0xe3e4,_0x3b7702=_0x3f9c69[_0x278664(0x157)]>>>0x10&0xffff;return(_0x3b7702&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x3a2a2c,_0x54e34a){const _0x2fad90=a166_0xe3e4,_0x51c3ca=await openZip(_0x3a2a2c),_0x50d5b6=a166_0x325bc5[_0x2fad90(0x172)](_0x54e34a),_0x1b6dc3=new Set(),_0x413f7b=new Map();let _0x3f6648=0x0,_0x554676=0x0;await a166_0x262a99[_0x2fad90(0x156)](_0x50d5b6,{'recursive':!![]}),await new Promise((_0x3b1d41,_0x523bef)=>{const _0x2883e1=_0x2fad90;let _0x20cfc4=![];const _0x5ee8ba=_0x309575=>{if(_0x20cfc4)return;_0x20cfc4=!![],_0x51c3ca['close'](),_0x523bef(_0x309575 instanceof Error?_0x309575:new Error(String(_0x309575)));};_0x51c3ca[_0x2883e1(0x167)]('error',_0x5ee8ba),_0x51c3ca[_0x2883e1(0x167)](_0x2883e1(0x154),()=>{if(_0x20cfc4)return;_0x20cfc4=!![],_0x3b1d41();}),_0x51c3ca['on'](_0x2883e1(0x161),_0x48fa5d=>{const _0x55d258=_0x2883e1;void(async()=>{const _0x51190c=a166_0xe3e4;_0x3f6648+=0x1,_0x554676+=_0x48fa5d[_0x51190c(0x166)];if(_0x3f6648>MAX_ENTRY_COUNT)throw new Error(_0x51190c(0x15e)+MAX_ENTRY_COUNT+'\x20entries.');if(_0x554676>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x51190c(0x152));if(_0x48fa5d['isEncrypted']())throw new Error(_0x51190c(0x169)+_0x48fa5d[_0x51190c(0x15a)]);if(isSymbolicLink(_0x48fa5d))throw new Error(_0x51190c(0x16d)+_0x48fa5d[_0x51190c(0x15a)]);const {relativePath:_0x162c23,directory:_0x5959ce}=validateEntryPath(_0x48fa5d[_0x51190c(0x15a)]),_0x5e5ca6=_0x162c23[_0x51190c(0x16f)](a166_0x325bc5[_0x51190c(0x164)]);for(let _0x27833d=0x1;_0x27833d<=_0x5e5ca6[_0x51190c(0x158)];_0x27833d+=0x1){const _0x4b172d=_0x5e5ca6[_0x51190c(0x173)](0x0,_0x27833d)['join'](a166_0x325bc5['sep']),_0x2a8d54=_0x4b172d[_0x51190c(0x16e)]('en-US'),_0x25bacb=_0x413f7b[_0x51190c(0x163)](_0x2a8d54);if(_0x25bacb&&_0x25bacb!==_0x4b172d)throw new Error('Case-conflicting\x20ZIP\x20entry\x20path:\x20'+_0x48fa5d[_0x51190c(0x15a)]);_0x413f7b[_0x51190c(0x176)](_0x2a8d54,_0x4b172d);}const _0x40891f=_0x162c23[_0x51190c(0x16e)]('en-US');if(_0x1b6dc3[_0x51190c(0x150)](_0x40891f))throw new Error(_0x51190c(0x175)+_0x48fa5d[_0x51190c(0x15a)]);_0x1b6dc3['add'](_0x40891f);const _0x29a207=a166_0x325bc5[_0x51190c(0x172)](_0x50d5b6,_0x162c23);if(_0x29a207!==_0x50d5b6&&!_0x29a207['startsWith'](''+_0x50d5b6+a166_0x325bc5[_0x51190c(0x164)]))throw new Error('ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20'+_0x48fa5d[_0x51190c(0x15a)]);if(_0x5959ce)await a166_0x262a99[_0x51190c(0x156)](_0x29a207,{'recursive':!![]});else{await a166_0x262a99[_0x51190c(0x156)](a166_0x325bc5[_0x51190c(0x16b)](_0x29a207),{'recursive':!![]});const _0x5b0f8f=await openEntryStream(_0x51c3ca,_0x48fa5d);await pipeline(_0x5b0f8f,createWriteStream(_0x29a207,{'flags':'wx','mode':0x1a4}));}_0x51c3ca['readEntry']();})()[_0x55d258(0x15f)](_0x5ee8ba);}),_0x51c3ca[_0x2883e1(0x178)]();});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a167_0x18af26=a167_0x1487;function a167_0x51f5(){const _0x45d20f=['5347700HkLxbd','12xnHBxq','../../../../','1519ZMsYyN','723145JUczjx','resolve','1877283YeMHmG','dirname','1121358zTBnqY','1410apBiPA','87496ndWgkw','2379iBNqEm','16488tERykU'];a167_0x51f5=function(){return _0x45d20f;};return a167_0x51f5();}(function(_0x373968,_0x1f99a7){const _0x82fbb=a167_0x1487,_0x4c0821=_0x373968();while(!![]){try{const _0x233fb2=parseInt(_0x82fbb(0x164))/0x1+parseInt(_0x82fbb(0x163))/0x2*(parseInt(_0x82fbb(0x165))/0x3)+parseInt(_0x82fbb(0x168))/0x4*(-parseInt(_0x82fbb(0x15e))/0x5)+-parseInt(_0x82fbb(0x162))/0x6+parseInt(_0x82fbb(0x15d))/0x7*(-parseInt(_0x82fbb(0x166))/0x8)+parseInt(_0x82fbb(0x160))/0x9+parseInt(_0x82fbb(0x167))/0xa;if(_0x233fb2===_0x1f99a7)break;else _0x4c0821['push'](_0x4c0821['shift']());}catch(_0x44efd3){_0x4c0821['push'](_0x4c0821['shift']());}}}(a167_0x51f5,0x4e96d));import a167_0x2f30ca from'node:path';function a167_0x1487(_0x365f8e,_0xc68d70){_0x365f8e=_0x365f8e-0x15c;const _0x51f589=a167_0x51f5();let _0x14873f=_0x51f589[_0x365f8e];return _0x14873f;}import{fileURLToPath}from'node:url';const __dirname=a167_0x2f30ca[a167_0x18af26(0x161)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0xd7786f=a167_0x18af26;return a167_0x2f30ca[_0xd7786f(0x15f)](__dirname,_0xd7786f(0x15c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f2519,_0x7f91d6){const _0x2c8929=a168_0x5727,_0x5894f0=_0x1f2519();while(!![]){try{const _0xe83bbe=-parseInt(_0x2c8929(0xc7))/0x1*(parseInt(_0x2c8929(0xc2))/0x2)+parseInt(_0x2c8929(0xc5))/0x3*(-parseInt(_0x2c8929(0xb2))/0x4)+-parseInt(_0x2c8929(0xb7))/0x5*(-parseInt(_0x2c8929(0xbd))/0x6)+parseInt(_0x2c8929(0xc0))/0x7*(parseInt(_0x2c8929(0xb9))/0x8)+parseInt(_0x2c8929(0xbf))/0x9+-parseInt(_0x2c8929(0xc1))/0xa*(parseInt(_0x2c8929(0xbc))/0xb)+parseInt(_0x2c8929(0xb3))/0xc;if(_0xe83bbe===_0x7f91d6)break;else _0x5894f0['push'](_0x5894f0['shift']());}catch(_0xe4a7e4){_0x5894f0['push'](_0x5894f0['shift']());}}}(a168_0x6921,0xbbc0b));import a168_0x5770a6 from'node:path';function a168_0x5727(_0xc0034c,_0x320856){_0xc0034c=_0xc0034c-0xb0;const _0x692135=a168_0x6921();let _0x5727b6=_0x692135[_0xc0034c];return _0x5727b6;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x3337e5,_0x1c8565){const _0xd5a32c=a168_0x5727,_0x5240c1=Date['now'](),_0x1503d7=a168_0x5770a6[_0xd5a32c(0xbb)](process[_0xd5a32c(0xb8)](),_0x3337e5);try{logger[_0xd5a32c(0xb0)](_0xd5a32c(0xc3),_0xd5a32c(0xb4),{'projectCode':_0x3337e5});const _0x52f5f0=await materializeProjectTemplate(_0x1503d7,_0x1c8565),_0x1c6615=Date['now']()-_0x5240c1;logger[_0xd5a32c(0xbe)](_0xd5a32c(0xc3),_0xd5a32c(0xc6),_0x1c6615,{'projectCode':_0x3337e5,'templateSource':_0x52f5f0[_0xd5a32c(0xb5)],'templateVersion':_0x52f5f0[_0xd5a32c(0xb6)]});}catch(_0x67506f){const _0x4afaf7=Date['now']()-_0x5240c1;logger[_0xd5a32c(0xc4)](_0xd5a32c(0xc3),_0xd5a32c(0xba),{'projectCode':_0x3337e5,'error':_0x67506f instanceof Error?_0x67506f[_0xd5a32c(0xb1)]:String(_0x67506f),'duration':_0x4afaf7});throw _0x67506f;}return formatElapsed(_0x5240c1);}function a168_0x6921(){const _0x47992f=['14iShHZn','430swpCcO','1475478EdGodN','copy','error','55311KXxkoo','项目模板创建完成','2WaStDr','info','message','308eDYuym','37717968IrXHFz','开始创建项目模板','source','version','1960wSGpJM','cwd','4857016lrIZxL','项目模板复制失败','resolve','226798pOEVHp','1038QSpQDn','success','1129518yhcgZJ'];a168_0x6921=function(){return _0x47992f;};return a168_0x6921();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x527bb6,_0x587374){const _0x24c691=a169_0x52ab,_0x2ee79b=_0x527bb6();while(!![]){try{const _0x43a8ba=parseInt(_0x24c691(0x1ad))/0x1*(-parseInt(_0x24c691(0x1ac))/0x2)+parseInt(_0x24c691(0x1a6))/0x3+parseInt(_0x24c691(0x19e))/0x4*(-parseInt(_0x24c691(0x19a))/0x5)+parseInt(_0x24c691(0x1a4))/0x6*(parseInt(_0x24c691(0x1a8))/0x7)+-parseInt(_0x24c691(0x1ab))/0x8+parseInt(_0x24c691(0x1a1))/0x9*(-parseInt(_0x24c691(0x1a7))/0xa)+-parseInt(_0x24c691(0x1a0))/0xb*(-parseInt(_0x24c691(0x19c))/0xc);if(_0x43a8ba===_0x587374)break;else _0x2ee79b['push'](_0x2ee79b['shift']());}catch(_0x250ef9){_0x2ee79b['push'](_0x2ee79b['shift']());}}}(a169_0x1b29,0x6d12e));import a169_0x210604 from'node:path';import{execa}from'execa';function a169_0x1b29(){const _0x809e95=['12OsqLfX','npx','434784zRAPtX','8873730legvqH','626507IvzLJZ','开始格式化代码','error','3542704lSnZXy','50wKqaHM','11589JUYhIh','--write','now','3235qNtdjO','format','813912SuguWS','success','128srJdiV','info','286qNniNT','9MfKATs','代码格式化失败','代码格式化完成'];a169_0x1b29=function(){return _0x809e95;};return a169_0x1b29();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a169_0x52ab(_0x35515b,_0x5ec124){_0x35515b=_0x35515b-0x198;const _0x1b29d6=a169_0x1b29();let _0x52ab41=_0x1b29d6[_0x35515b];return _0x52ab41;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0xf11668){const _0x49ea6d=a169_0x52ab,_0x1c2124=Date[_0x49ea6d(0x199)](),_0x2d4a1c=a169_0x210604['resolve'](process['cwd'](),_0xf11668);try{logger[_0x49ea6d(0x19f)](_0x49ea6d(0x19b),_0x49ea6d(0x1a9),{'projectCode':_0xf11668}),await execa(resolveNpmBin(_0x49ea6d(0x1a5)),['prettier',_0x49ea6d(0x198),'.'],{'cwd':_0x2d4a1c});const _0x22e453=Date[_0x49ea6d(0x199)]()-_0x1c2124;logger[_0x49ea6d(0x19d)](_0x49ea6d(0x19b),_0x49ea6d(0x1a3),_0x22e453,{'projectCode':_0xf11668});}catch(_0x3ac1fe){const _0x2f29ed=Date[_0x49ea6d(0x199)]()-_0x1c2124;logger[_0x49ea6d(0x1aa)](_0x49ea6d(0x19b),_0x49ea6d(0x1a2),{'projectCode':_0xf11668,'error':_0x3ac1fe instanceof Error?_0x3ac1fe['message']:String(_0x3ac1fe),'duration':_0x2f29ed});throw _0x3ac1fe;}return formatElapsed(_0x1c2124);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x345d71,_0x2cf0ca){const _0x20076f=a170_0x34ce,_0x3c6316=_0x345d71();while(!![]){try{const _0x398da2=parseInt(_0x20076f(0x1f7))/0x1+-parseInt(_0x20076f(0x1ea))/0x2*(parseInt(_0x20076f(0x1fc))/0x3)+parseInt(_0x20076f(0x1ff))/0x4*(parseInt(_0x20076f(0x1eb))/0x5)+-parseInt(_0x20076f(0x1f3))/0x6+-parseInt(_0x20076f(0x1ed))/0x7*(parseInt(_0x20076f(0x1fd))/0x8)+-parseInt(_0x20076f(0x1fb))/0x9*(-parseInt(_0x20076f(0x1f5))/0xa)+-parseInt(_0x20076f(0x1fa))/0xb*(-parseInt(_0x20076f(0x1ee))/0xc);if(_0x398da2===_0x2cf0ca)break;else _0x3c6316['push'](_0x3c6316['shift']());}catch(_0x55c8a2){_0x3c6316['push'](_0x3c6316['shift']());}}}(a170_0x1640,0xdf0b5));function a170_0x1640(){const _0x5e5cc2=['https://registry.npmmirror.com','25724hnhUZb','38vYNMDT','465VDsJWS','npm','7ANSqUv','36MonxAy','info','error','install','message','1175910WsDHzU','now','480aAKpVG','依赖安装完成','129812IwmWOl','依赖安装失败','success','628441XOcPhG','294282dqyQdt','209253jihjxk','271592UgalGa'];a170_0x1640=function(){return _0x5e5cc2;};return a170_0x1640();}import a170_0x5993df from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a170_0x34ce(_0x3255d8,_0x3fb4af){_0x3255d8=_0x3255d8-0x1ea;const _0x1640bd=a170_0x1640();let _0x34ce16=_0x1640bd[_0x3255d8];return _0x34ce16;}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x86acc1){const _0x5b77fc=a170_0x34ce,_0x368966=Date[_0x5b77fc(0x1f4)](),_0x894fbf=a170_0x5993df['resolve'](process['cwd'](),_0x86acc1);try{logger[_0x5b77fc(0x1ef)]('install','开始安装依赖',{'projectCode':_0x86acc1,'registry':_0x5b77fc(0x1fe)}),await execa(resolveNpmBin(_0x5b77fc(0x1ec)),[_0x5b77fc(0x1f1),'--registry',_0x5b77fc(0x1fe)],{'cwd':_0x894fbf});const _0x50ce34=Date[_0x5b77fc(0x1f4)]()-_0x368966;logger[_0x5b77fc(0x1f9)]('install',_0x5b77fc(0x1f6),_0x50ce34,{'projectCode':_0x86acc1});}catch(_0x4fc334){const _0xc18225=Date['now']()-_0x368966;logger[_0x5b77fc(0x1f0)]('install',_0x5b77fc(0x1f8),{'projectCode':_0x86acc1,'error':_0x4fc334 instanceof Error?_0x4fc334[_0x5b77fc(0x1f2)]:String(_0x4fc334),'duration':_0xc18225});throw _0x4fc334;}return formatElapsed(_0x368966);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a171_0x17eb29=a171_0x33a1;function a171_0x49ae(){const _0x17c5ec=['482tCqBEI','665GCUQEQ','args','project','4203ZbyyBH','boolean','string','appcode','env','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','cookie','6028506DJQrrn','nonInteractive','30784500XklcSC','name','upgrade','Usage:\x20','project-name','32632GMtlbo','bool','../../commands/project/create/main.js','trim','write','yes','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','2768636PTmtBj','2421000qoBALy','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','2058294ktfDfy','Target\x20environment','str'];a171_0x49ae=function(){return _0x17c5ec;};return a171_0x49ae();}(function(_0xc2fadf,_0xe37445){const _0xb2cc3a=a171_0x33a1,_0x4e8cac=_0xc2fadf();while(!![]){try{const _0x35f994=parseInt(_0xb2cc3a(0x1bd))/0x1*(-parseInt(_0xb2cc3a(0x1d8))/0x2)+parseInt(_0xb2cc3a(0x1d5))/0x3+-parseInt(_0xb2cc3a(0x1d2))/0x4+-parseInt(_0xb2cc3a(0x1d3))/0x5+-parseInt(_0xb2cc3a(0x1c4))/0x6+parseInt(_0xb2cc3a(0x1d9))/0x7*(-parseInt(_0xb2cc3a(0x1cb))/0x8)+parseInt(_0xb2cc3a(0x1c6))/0x9;if(_0x35f994===_0xe37445)break;else _0x4e8cac['push'](_0x4e8cac['shift']());}catch(_0x35f905){_0x4e8cac['push'](_0x4e8cac['shift']());}}}(a171_0x49ae,0x80304));function a171_0x33a1(_0x4715a9,_0x1153fc){_0x4715a9=_0x4715a9-0x1bb;const _0x49ae72=a171_0x49ae();let _0x33a102=_0x49ae72[_0x4715a9];return _0x33a102;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':a171_0x17eb29(0x1c7),'type':a171_0x17eb29(0x1bf),'description':'Project\x20name'},{'name':a171_0x17eb29(0x1c1),'type':a171_0x17eb29(0x1bf),'description':a171_0x17eb29(0x1d6)},{'name':a171_0x17eb29(0x1c0),'type':a171_0x17eb29(0x1bf),'description':a171_0x17eb29(0x1d4)}],upgradeFlags=[{'name':a171_0x17eb29(0x1d0),'type':a171_0x17eb29(0x1be),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a171_0x17eb29(0x1bc),'command':'create','description':'Create\x20a\x20new\x20project','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a171_0x17eb29(0x1ca),'description':a171_0x17eb29(0x1c2),'required':![]}],'flags':createFlags,async 'execute'(_0x4ef3e8){const _0x180f71=a171_0x17eb29,{createApp:_0x2374e7}=await import(_0x180f71(0x1cd)),_0x45787d=_0x4ef3e8['str'](_0x180f71(0x1c7))[_0x180f71(0x1ce)]()||_0x4ef3e8[_0x180f71(0x1bb)][0x0]?.[_0x180f71(0x1ce)](),_0x5733ef=_0x4ef3e8[_0x180f71(0x1d7)](_0x180f71(0x1c1))||undefined,_0x1c607d=_0x4ef3e8[_0x180f71(0x1d7)](_0x180f71(0x1c0))||undefined;if(_0x4ef3e8[_0x180f71(0x1c5)]){if(!_0x45787d)throw CliErrors['validation']('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x180f71(0x1c9)+CLI_BIN_NAME+_0x180f71(0x1d1));await _0x2374e7({'projectCode':_0x45787d,'appCode':_0x1c607d,'env':_0x5733ef,'cookie':_0x4ef3e8[_0x180f71(0x1c3)],'nonInteractive':!![]});}else await _0x2374e7({'projectCode':_0x45787d,'appCode':_0x1c607d,'env':_0x5733ef,'cookie':_0x4ef3e8[_0x180f71(0x1c3)]});return{'ok':!![]};}},{'service':a171_0x17eb29(0x1bc),'command':a171_0x17eb29(0x1c8),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a171_0x17eb29(0x1cf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x3d3402){const _0x32e0e9=a171_0x17eb29;return await upgradeApp(_0x3d3402['nonInteractive'],{'yes':_0x3d3402[_0x32e0e9(0x1cc)]('yes')}),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a171_0x504292=a171_0x390b;(function(_0x36e11c,_0x285aaf){const _0x34e5c6=a171_0x390b,_0x5c02c5=_0x36e11c();while(!![]){try{const _0x36d5ec=parseInt(_0x34e5c6(0x1e2))/0x1*(-parseInt(_0x34e5c6(0x19f))/0x2)+parseInt(_0x34e5c6(0x1f9))/0x3*(parseInt(_0x34e5c6(0x1c3))/0x4)+parseInt(_0x34e5c6(0x1c7))/0x5*(parseInt(_0x34e5c6(0x1aa))/0x6)+parseInt(_0x34e5c6(0x202))/0x7+-parseInt(_0x34e5c6(0x1da))/0x8+parseInt(_0x34e5c6(0x210))/0x9+parseInt(_0x34e5c6(0x1fa))/0xa*(-parseInt(_0x34e5c6(0x1b8))/0xb);if(_0x36d5ec===_0x285aaf)break;else _0x5c02c5['push'](_0x5c02c5['shift']());}catch(_0x1ebcec){_0x5c02c5['push'](_0x5c02c5['shift']());}}}(a171_0x56a5,0x60ea0));import a171_0x286f9f from'chalk';function a171_0x56a5(){const _0x5148f5=['662SUvYgS','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','.bak','\x20from\x20','\x20\x20New\x20config\x20(.rabetbase.json):\x20','yes','log','red','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','oldPath','parse','Proceed\x20with\x20upgrade?','entries','bold','skipped','none\x20found','green','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','gray','Remove\x20old\x20skill','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','lovrabet/rabetbase\x20installed\x20globally','exit\x20','3CUTUDL','20aYRemk','skipped\x20(no\x20legacy\x20config)','inherit','isDirectory','stringify','Step\x204/7:\x20Cleaning\x20MCP\x20config...','step','\x20\x20\x20\x20\x20\x20\x20','4387908oDboAC','@lovrabet/dataset-mcp-server','latest','@lovrabet/sdk','utf8','object','no\x20legacy\x20entry','Step\x201/7:\x20Config\x20migration\x20—\x20','keys','Remove\x20legacy\x20artifacts','yellow','no\x20legacy\x20config\x20found','Step\x206/7:\x20Installing\x20new\x20skill...','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','3509388ncjeot','\x20removed','package.json','Step\x205/7:\x20Removing\x20old\x20skill...','status','lovrabet/rabetbase','Clean\x20MCP\x20config','white','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','dependencies','\x20→\x20latest','filter','\x20\x20Fields\x20to\x20migrate:\x20','not\x20found\x20or\x20already\x20at\x20latest','722kSfFmK','join','fail','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','FAIL','.cursor/rules/lovrabet_rules.mdc','[\x22@lovrabet/sdk\x22]:\x20','configMigration','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','message','6AOyPKo','CANCEL','Step\x204/7:\x20MCP\x20config\x20—\x20','info','not\x20found\x20(will\x20create)','.lovrabet','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','length','Upgrade\x20cancelled.','===\x20Upgrade\x20Analysis\x20===','not\x20needed','some','needed','error','2929201CZqfWA','mcpServers','undefined','Upgrade\x20@lovrabet/sdk','args','Upgrade\x20completed\x20successfully!','FOUND','devDependencies','.cursor/mcp.json','\x20→\x20keys:\x20','\x20→\x20','736240gDvXKV','path','succeed','failed','2263740WbDJLI','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','done','MCP\x20config:','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Legacy\x20artifacts:','sdkUpgrade','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','start','@lovrabet/sdk:','\x20\x20bun\x20install','Remove\x20.lovrabet/','oldMcpConfig','isArray','\x20\x20Step\x20','already\x20exists\x20(will\x20merge)','detail','string','push','3880480uaBPnN','needsSkillSwap','cyan','Config\x20migration','\x20removed\x20(','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','includes','Config\x20file:'];a171_0x56a5=function(){return _0x5148f5;};return a171_0x56a5();}import a171_0x399492 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';function a171_0x390b(_0x558a90,_0x1ad781){_0x558a90=_0x558a90-0x193;const _0x56a549=a171_0x56a5();let _0x390b26=_0x56a549[_0x558a90];return _0x390b26;}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[a171_0x504292(0x19c)](_0x235a79=>_0x235a79!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x2d8a2b){const _0x39604e=a171_0x504292,_0x41b4f0=[];for(const _0x2bd8b6 of Object['values'](CORE_IDE_CONFIGS)){if(_0x2bd8b6['files'])for(const _0x3bc32e of _0x2bd8b6['files']){_0x41b4f0[_0x39604e(0x1d9)](resolve(_0x2d8a2b,_0x3bc32e['path']));}}return _0x41b4f0;}function analyse(_0x5bf260){const _0x10b487=a171_0x504292;let _0x3db43e=null;const _0x37664f=resolve(_0x5bf260,NEW_CONFIG_NAME),_0x1b1274=existsSync(_0x37664f);for(const _0x4d9daf of LEGACY_CONFIG_NAMES){const _0x38820b=resolve(_0x5bf260,_0x4d9daf);if(existsSync(_0x38820b)){const _0x5f32a3=readConfigFile(_0x38820b),_0x2bda45=Object['keys'](_0x5f32a3)['filter'](_0x7cf784=>typeof _0x5f32a3[_0x7cf784]!==_0x10b487(0x1ba));_0x3db43e={'oldPath':_0x38820b,'hasNewConfig':_0x1b1274,'fields':_0x2bda45};break;}}const _0x378bf4=[],_0x5cc5e4=resolve(_0x5bf260,_0x10b487(0x1af));if(existsSync(_0x5cc5e4))_0x378bf4['push'](_0x5cc5e4);const _0x534291=resolve(_0x5bf260,_0x10b487(0x1a5));if(existsSync(_0x534291))_0x378bf4['push'](_0x534291);const _0x14ae2f=resolve(_0x5bf260,'.claude/skills/lovrabet');if(existsSync(_0x14ae2f))_0x378bf4['push'](_0x14ae2f);for(const _0xa3973e of collectIdeSkillFiles(_0x5bf260)){if(existsSync(_0xa3973e))_0x378bf4[_0x10b487(0x1d9)](_0xa3973e);}let _0x29065c=null;const _0xeab4d4=resolve(_0x5bf260,_0x10b487(0x1c0));if(existsSync(_0xeab4d4))try{const _0x1d6709=JSON['parse'](readFileSync(_0xeab4d4,_0x10b487(0x206)));if(_0x1d6709?.['mcpServers']&&typeof _0x1d6709[_0x10b487(0x1b9)]==='object'){const _0x5b1583=[];for(const [_0x3303db,_0x4ae18f]of Object[_0x10b487(0x1ee)](_0x1d6709[_0x10b487(0x1b9)])){const _0x34539d=_0x4ae18f;_0x34539d?.['args']&&Array[_0x10b487(0x1d4)](_0x34539d[_0x10b487(0x1bc)])&&_0x34539d[_0x10b487(0x1bc)][_0x10b487(0x1b5)](_0xcc29c9=>typeof _0xcc29c9===_0x10b487(0x1d8)&&_0xcc29c9[_0x10b487(0x1e0)](_0x10b487(0x203)))&&_0x5b1583[_0x10b487(0x1d9)](_0x3303db);}_0x5b1583['length']>0x0&&(_0x29065c={'path':_0xeab4d4,'keys':_0x5b1583});}}catch{}const _0x31819d=_0x378bf4[_0x10b487(0x1b1)]>0x0||_0x3db43e!==null;let _0x433ff2=null;const _0x4c4a15=resolve(_0x5bf260,_0x10b487(0x193));if(existsSync(_0x4c4a15))try{const _0x3dcd25=JSON[_0x10b487(0x1ec)](readFileSync(_0x4c4a15,_0x10b487(0x206)));for(const _0x5a6306 of[_0x10b487(0x19a),_0x10b487(0x1bf)]){const _0x729024=_0x3dcd25?.[_0x5a6306]?.[_0x10b487(0x205)];if(typeof _0x729024===_0x10b487(0x1d8)){_0x729024!==_0x10b487(0x204)&&(_0x433ff2={'pkgPath':_0x4c4a15,'currentVersion':_0x729024,'field':_0x5a6306});break;}}}catch{}return{'configMigration':_0x3db43e,'oldArtifacts':_0x378bf4,'oldMcpConfig':_0x29065c,'needsSkillSwap':_0x31819d,'sdkUpgrade':_0x433ff2};}function printReport(_0x36eb07){const _0x53c15d=a171_0x504292,{configMigration:_0x2871ff,oldArtifacts:_0x4ccfa3,oldMcpConfig:_0x325f36,needsSkillSwap:_0xac2396}=_0x36eb07;console['log'](''),console[_0x53c15d(0x1e8)](a171_0x286f9f[_0x53c15d(0x1ef)](_0x53c15d(0x1b3))),console[_0x53c15d(0x1e8)]('');_0x2871ff?(console['log'](a171_0x286f9f[_0x53c15d(0x1dc)]('Config\x20file:')+('\x20\x20'+a171_0x286f9f[_0x53c15d(0x20c)](_0x2871ff[_0x53c15d(0x1eb)]))),console[_0x53c15d(0x1e8)](_0x53c15d(0x1e6)+(_0x2871ff['hasNewConfig']?a171_0x286f9f['green'](_0x53c15d(0x1d6)):a171_0x286f9f[_0x53c15d(0x1f4)](_0x53c15d(0x1ae)))),console[_0x53c15d(0x1e8)](_0x53c15d(0x19d)+_0x2871ff['fields'][_0x53c15d(0x1a0)](',\x20')),console[_0x53c15d(0x1e8)](_0x53c15d(0x1a8))):console[_0x53c15d(0x1e8)](a171_0x286f9f[_0x53c15d(0x1dc)](_0x53c15d(0x1e1))+'\x20\x20'+a171_0x286f9f['gray'](_0x53c15d(0x20d)));console['log']('');if(_0x4ccfa3['length']>0x0){console[_0x53c15d(0x1e8)](a171_0x286f9f[_0x53c15d(0x1dc)](_0x53c15d(0x1cc)));for(const _0x26c17e of _0x4ccfa3){console[_0x53c15d(0x1e8)]('\x20\x20'+a171_0x286f9f[_0x53c15d(0x1e9)](_0x53c15d(0x1be))+'\x20\x20'+_0x26c17e);}console[_0x53c15d(0x1e8)]('\x20\x20Action:\x20delete');}else console[_0x53c15d(0x1e8)](a171_0x286f9f[_0x53c15d(0x1dc)]('Legacy\x20artifacts:')+'\x20\x20'+a171_0x286f9f[_0x53c15d(0x1f4)](_0x53c15d(0x1f1)));console[_0x53c15d(0x1e8)]('');_0x325f36?(console[_0x53c15d(0x1e8)](a171_0x286f9f[_0x53c15d(0x1dc)](_0x53c15d(0x1ca))+('\x20\x20'+a171_0x286f9f[_0x53c15d(0x20c)](_0x325f36[_0x53c15d(0x1c4)])+_0x53c15d(0x1c1)+_0x325f36[_0x53c15d(0x20a)][_0x53c15d(0x1a0)](',\x20'))),console['log'](_0x53c15d(0x1cb))):console[_0x53c15d(0x1e8)](a171_0x286f9f['cyan'](_0x53c15d(0x1ca))+'\x20\x20'+a171_0x286f9f['gray'](_0x53c15d(0x208)));console[_0x53c15d(0x1e8)](''),console['log'](a171_0x286f9f[_0x53c15d(0x1dc)]('Skill\x20swap:')+('\x20\x20'+(_0xac2396?a171_0x286f9f[_0x53c15d(0x20c)](_0x53c15d(0x1b6)):a171_0x286f9f[_0x53c15d(0x1f2)](_0x53c15d(0x1b4)))));_0xac2396&&console['log'](_0x53c15d(0x1df)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x53c15d(0x1e8)]('');if(_0x36eb07[_0x53c15d(0x1cd)]){const {currentVersion:_0x4d4319,field:_0x473d61,pkgPath:_0xedd64}=_0x36eb07['sdkUpgrade'];console['log'](a171_0x286f9f[_0x53c15d(0x1dc)](_0x53c15d(0x1d0))+('\x20\x20'+a171_0x286f9f[_0x53c15d(0x20c)](_0xedd64))),console['log']('\x20\x20Current\x20version\x20in\x20'+_0x473d61+':\x20'+a171_0x286f9f[_0x53c15d(0x20c)](_0x4d4319)+_0x53c15d(0x1c2)+a171_0x286f9f[_0x53c15d(0x1f2)](_0x53c15d(0x204))),console[_0x53c15d(0x1e8)](_0x53c15d(0x1f3));}else console['log'](a171_0x286f9f[_0x53c15d(0x1dc)](_0x53c15d(0x1d0))+'\x20\x20'+a171_0x286f9f[_0x53c15d(0x1f4)](_0x53c15d(0x19e)));console[_0x53c15d(0x1e8)]('');}function execConfigMigration(_0x179fd0,_0x189ba7){const _0x281dd3=a171_0x504292,{configMigration:_0x155c81}=_0x179fd0;if(!_0x155c81?.[_0x281dd3(0x1eb)])return{'step':0x1,'label':_0x281dd3(0x1dd),'ok':!![],'detail':_0x281dd3(0x1fb)};const _0x32111d=readConfigFile(_0x155c81[_0x281dd3(0x1eb)]),_0x47f796=resolve(_0x189ba7,NEW_CONFIG_NAME),_0x3b2d6e=_0x155c81['hasNewConfig']?readConfigFile(_0x47f796):{};for(const [_0x56f878,_0x2d430f]of Object[_0x281dd3(0x1ee)](_0x32111d)){!(_0x56f878 in _0x3b2d6e)&&(_0x3b2d6e[_0x56f878]=_0x2d430f);}writeConfigFile(_0x47f796,_0x3b2d6e);const _0xb8d1f=_0x155c81[_0x281dd3(0x1eb)]+_0x281dd3(0x1e4);return renameSync(_0x155c81[_0x281dd3(0x1eb)],_0xb8d1f),{'step':0x1,'label':_0x281dd3(0x1dd),'ok':!![],'detail':_0x155c81[_0x281dd3(0x1eb)]+_0x281dd3(0x1c2)+_0x47f796+'\x20(backup:\x20'+_0xb8d1f+')'};}function execRemoveOldArtifacts(_0x3fa1d2){const _0x1377e6=a171_0x504292,_0x9ab7e9=[];for(const _0x187402 of _0x3fa1d2){try{if(!existsSync(_0x187402))continue;const _0x454434=tryStat(_0x187402);_0x454434?.[_0x1377e6(0x1fd)]()?rmSync(_0x187402,{'recursive':!![],'force':!![]}):unlinkSync(_0x187402);}catch(_0x65c915){_0x9ab7e9['push'](_0x187402+':\x20'+_0x65c915[_0x1377e6(0x1a9)]);}}return{'step':0x3,'label':_0x1377e6(0x20b),'ok':_0x9ab7e9['length']===0x0,'detail':_0x9ab7e9['length']>0x0?_0x3fa1d2['length']-_0x9ab7e9['length']+'/'+_0x3fa1d2['length']+_0x1377e6(0x1de)+_0x9ab7e9['join'](';\x20')+')':_0x3fa1d2[_0x1377e6(0x1b1)]+_0x1377e6(0x211)};}function execCleanMcp(_0xaba348){const _0x5dab9f=a171_0x504292;if(!_0xaba348[_0x5dab9f(0x1d3)])return{'step':0x4,'label':_0x5dab9f(0x197),'ok':!![],'detail':_0x5dab9f(0x1f0)};try{const _0x17c1a1=readFileSync(_0xaba348['oldMcpConfig']['path'],_0x5dab9f(0x206)),_0x88bd9e=JSON[_0x5dab9f(0x1ec)](_0x17c1a1);if(_0x88bd9e?.[_0x5dab9f(0x1b9)]&&typeof _0x88bd9e[_0x5dab9f(0x1b9)]===_0x5dab9f(0x207)){const _0x2d9b0=[];for(const [_0x193c19,_0x390e25]of Object[_0x5dab9f(0x1ee)](_0x88bd9e[_0x5dab9f(0x1b9)])){_0x390e25?.[_0x5dab9f(0x1bc)]&&Array[_0x5dab9f(0x1d4)](_0x390e25[_0x5dab9f(0x1bc)])&&_0x390e25[_0x5dab9f(0x1bc)][_0x5dab9f(0x1b5)](_0x37029d=>typeof _0x37029d===_0x5dab9f(0x1d8)&&_0x37029d['includes'](_0x5dab9f(0x203)))&&_0x2d9b0['push'](_0x193c19);}for(const _0x335f2a of _0x2d9b0){delete _0x88bd9e[_0x5dab9f(0x1b9)][_0x335f2a];}return _0x2d9b0[_0x5dab9f(0x1b1)]>0x0&&writeFileSync(_0xaba348[_0x5dab9f(0x1d3)][_0x5dab9f(0x1c4)],JSON[_0x5dab9f(0x1fe)](_0x88bd9e,null,0x2)+'\x0a',_0x5dab9f(0x206)),{'step':0x4,'label':_0x5dab9f(0x197),'ok':!![],'detail':'removed\x20'+_0x2d9b0[_0x5dab9f(0x1a0)](',\x20')+_0x5dab9f(0x1e5)+_0xaba348[_0x5dab9f(0x1d3)]['path']};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x4106a9){return{'step':0x4,'label':_0x5dab9f(0x197),'ok':![],'detail':_0x4106a9['message']};}}function execSkillsRemove(_0x33438f,_0xda9d81){const _0x2b92f2=a171_0x504292,_0xfec6ca=runNpxSkillsRemove(_0x33438f,{'stdio':'inherit','yes':_0xda9d81});return{'step':0x5,'label':_0x2b92f2(0x1f5),'ok':_0xfec6ca['ok'],'detail':_0xfec6ca['ok']?'lovrabet/lovrabet-skill\x20removed':_0xfec6ca[_0x2b92f2(0x1b7)]??_0x2b92f2(0x1f8)+_0xfec6ca[_0x2b92f2(0x195)]};}function execSkillsAdd(_0x38ef56,_0x2c9050){const _0x496dfe=a171_0x504292,_0x429c36=runNpxSkillsAddGlobal(_0x38ef56,_0x496dfe(0x196),{'stdio':_0x496dfe(0x1fc),'yes':_0x2c9050});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x429c36['ok'],'detail':_0x429c36['ok']?_0x496dfe(0x1f7):_0x429c36[_0x496dfe(0x1b7)]??_0x496dfe(0x1f8)+_0x429c36[_0x496dfe(0x195)]};}function execUpgradeSdk(_0x45b2ee){const _0xd5d137=a171_0x504292;if(!_0x45b2ee[_0xd5d137(0x1cd)])return{'step':0x7,'label':_0xd5d137(0x1bb),'ok':!![],'detail':_0xd5d137(0x1e3)};const {pkgPath:_0x109ba9,currentVersion:_0x173084,field:_0x18dcac}=_0x45b2ee[_0xd5d137(0x1cd)];try{const _0x11f716=readFileSync(_0x109ba9,'utf8'),_0x1a3971=JSON[_0xd5d137(0x1ec)](_0x11f716);return _0x1a3971[_0x18dcac][_0xd5d137(0x205)]=_0xd5d137(0x204),writeFileSync(_0x109ba9,JSON[_0xd5d137(0x1fe)](_0x1a3971,null,0x2)+'\x0a',_0xd5d137(0x206)),{'step':0x7,'label':_0xd5d137(0x1bb),'ok':!![],'detail':_0x18dcac+_0xd5d137(0x1a6)+_0x173084+_0xd5d137(0x19b)};}catch(_0x1fc6ce){return{'step':0x7,'label':_0xd5d137(0x1bb),'ok':![],'detail':_0x1fc6ce[_0xd5d137(0x1a9)]};}}function tryStat(_0x37e47f){try{return statSync(_0x37e47f);}catch{return undefined;}}function printSummary(_0x95701d){const _0x2f34ba=a171_0x504292;console[_0x2f34ba(0x1e8)](''),console[_0x2f34ba(0x1e8)](a171_0x286f9f[_0x2f34ba(0x1ef)]('===\x20Upgrade\x20Summary\x20===')),console[_0x2f34ba(0x1e8)]('');for(const _0x160166 of _0x95701d){const _0x3c6e0d=_0x160166['ok']?a171_0x286f9f['green']('OK'):a171_0x286f9f[_0x2f34ba(0x1e9)](_0x2f34ba(0x1a4));console[_0x2f34ba(0x1e8)]('\x20\x20'+_0x3c6e0d+_0x2f34ba(0x1d5)+_0x160166[_0x2f34ba(0x200)]+':\x20'+_0x160166['label']);if(_0x160166[_0x2f34ba(0x1d7)])console[_0x2f34ba(0x1e8)](_0x2f34ba(0x201)+a171_0x286f9f['gray'](_0x160166[_0x2f34ba(0x1d7)]));}console[_0x2f34ba(0x1e8)]('');}export async function upgradeApp(_0x5b939f,_0x79e59d){const _0x4ba6ed=a171_0x504292,_0x43af7f=process['cwd'](),_0x40d3a6=analyse(_0x43af7f),_0x5f5a58=!_0x40d3a6[_0x4ba6ed(0x1a7)]&&_0x40d3a6['oldArtifacts'][_0x4ba6ed(0x1b1)]===0x0&&!_0x40d3a6[_0x4ba6ed(0x1d3)]&&!_0x40d3a6[_0x4ba6ed(0x1db)]&&!_0x40d3a6[_0x4ba6ed(0x1cd)];if(_0x5f5a58){console[_0x4ba6ed(0x1e8)](a171_0x286f9f[_0x4ba6ed(0x1f2)](_0x4ba6ed(0x1b0)));return;}printReport(_0x40d3a6);const _0x3ef968=!!(_0x79e59d[_0x4ba6ed(0x1e7)]||_0x79e59d['Y']||_0x5b939f);if(!_0x3ef968)try{const _0x49cc34=await askConfirm(_0x4ba6ed(0x1ed));if(!_0x49cc34){console[_0x4ba6ed(0x1e8)](a171_0x286f9f[_0x4ba6ed(0x1f4)](_0x4ba6ed(0x1b2)));return;}}catch(_0x44f3b5){if(_0x44f3b5?.['message']===_0x4ba6ed(0x1ab)){console[_0x4ba6ed(0x1e8)](a171_0x286f9f[_0x4ba6ed(0x1f4)](_0x4ba6ed(0x1b2)));return;}throw _0x44f3b5;}const _0xaaee37=[],_0x5982c3=a171_0x399492({'text':'Step\x201/7:\x20Migrating\x20config...','color':_0x4ba6ed(0x1dc)})[_0x4ba6ed(0x1cf)](),_0x248184=execConfigMigration(_0x40d3a6,_0x43af7f);_0xaaee37[_0x4ba6ed(0x1d9)](_0x248184),_0x5982c3[_0x248184['ok']?_0x4ba6ed(0x1c5):_0x4ba6ed(0x1a1)](_0x4ba6ed(0x209)+(_0x248184[_0x4ba6ed(0x1d7)]??(_0x248184['ok']?_0x4ba6ed(0x1c9):_0x4ba6ed(0x1c6))));const _0x577c32=resolve(_0x43af7f,'.lovrabet'),_0x9ec111=a171_0x399492({'text':_0x4ba6ed(0x1a3),'color':_0x4ba6ed(0x1dc)})[_0x4ba6ed(0x1cf)]();if(existsSync(_0x577c32))try{rmSync(_0x577c32,{'recursive':!![],'force':!![]}),_0x9ec111[_0x4ba6ed(0x1c5)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0xaaee37[_0x4ba6ed(0x1d9)]({'step':0x2,'label':_0x4ba6ed(0x1d2),'ok':!![]});}catch(_0x13a644){_0x9ec111[_0x4ba6ed(0x1a1)](_0x4ba6ed(0x199)+_0x13a644['message']),_0xaaee37[_0x4ba6ed(0x1d9)]({'step':0x2,'label':_0x4ba6ed(0x1d2),'ok':![],'detail':_0x13a644['message']});}else _0x9ec111[_0x4ba6ed(0x1ad)](_0x4ba6ed(0x20f)),_0xaaee37[_0x4ba6ed(0x1d9)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':'skipped'});const _0x49b52d=a171_0x399492({'text':_0x4ba6ed(0x1ce),'color':_0x4ba6ed(0x1dc)})[_0x4ba6ed(0x1cf)](),_0x561766=execRemoveOldArtifacts(_0x40d3a6['oldArtifacts']);_0xaaee37[_0x4ba6ed(0x1d9)](_0x561766),_0x49b52d[_0x561766['ok']?_0x4ba6ed(0x1c5):'fail']('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x561766[_0x4ba6ed(0x1d7)]??(_0x561766['ok']?_0x4ba6ed(0x1c9):_0x4ba6ed(0x1c6))));const _0x468ea8=a171_0x399492({'text':_0x4ba6ed(0x1ff),'color':'cyan'})[_0x4ba6ed(0x1cf)](),_0x18f100=execCleanMcp(_0x40d3a6);_0xaaee37[_0x4ba6ed(0x1d9)](_0x18f100),_0x468ea8[_0x18f100['ok']?_0x4ba6ed(0x1c5):_0x4ba6ed(0x1a1)](_0x4ba6ed(0x1ac)+(_0x18f100[_0x4ba6ed(0x1d7)]??(_0x18f100['ok']?'done':_0x4ba6ed(0x1c6))));const _0x12833f=a171_0x399492({'text':_0x4ba6ed(0x194),'color':_0x4ba6ed(0x1dc)})[_0x4ba6ed(0x1cf)](),_0x4e925e=execSkillsRemove(_0x43af7f,_0x3ef968);_0xaaee37['push'](_0x4e925e),_0x12833f[_0x4e925e['ok']?'succeed':_0x4ba6ed(0x1a1)](_0x4ba6ed(0x1ea)+(_0x4e925e['detail']??(_0x4e925e['ok']?_0x4ba6ed(0x1c9):'failed')));const _0x4faca7=a171_0x399492({'text':_0x4ba6ed(0x20e),'color':_0x4ba6ed(0x1dc)})[_0x4ba6ed(0x1cf)](),_0x338e86=execSkillsAdd(_0x43af7f,_0x3ef968);_0xaaee37[_0x4ba6ed(0x1d9)](_0x338e86),_0x4faca7[_0x338e86['ok']?_0x4ba6ed(0x1c5):_0x4ba6ed(0x1a1)](_0x4ba6ed(0x1a2)+(_0x338e86[_0x4ba6ed(0x1d7)]??(_0x338e86['ok']?_0x4ba6ed(0x1c9):'failed')));const _0x174995=a171_0x399492({'text':'Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0x4ba6ed(0x1dc)})[_0x4ba6ed(0x1cf)](),_0x55db39=execUpgradeSdk(_0x40d3a6);_0xaaee37[_0x4ba6ed(0x1d9)](_0x55db39),_0x174995[_0x55db39['ok']?_0x4ba6ed(0x1c5):_0x4ba6ed(0x1a1)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x55db39[_0x4ba6ed(0x1d7)]??(_0x55db39['ok']?_0x4ba6ed(0x1c9):'failed'))),printSummary(_0xaaee37);const _0x1c6506=_0xaaee37['some'](_0xb61365=>!_0xb61365['ok']);_0x1c6506?console['log'](a171_0x286f9f['yellow']('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x4ba6ed(0x1e8)](a171_0x286f9f[_0x4ba6ed(0x1f2)](_0x4ba6ed(0x1bd))),_0x55db39['ok']&&_0x40d3a6[_0x4ba6ed(0x1cd)]&&(console['log'](''),console['log'](a171_0x286f9f[_0x4ba6ed(0x1ef)][_0x4ba6ed(0x1dc)](_0x4ba6ed(0x1f6))),console[_0x4ba6ed(0x1e8)](a171_0x286f9f[_0x4ba6ed(0x1dc)](_0x4ba6ed(0x1c8))),console[_0x4ba6ed(0x1e8)](''),console[_0x4ba6ed(0x1e8)](a171_0x286f9f[_0x4ba6ed(0x198)]('\x20\x20npm\x20install')),console[_0x4ba6ed(0x1e8)](a171_0x286f9f[_0x4ba6ed(0x198)]('\x20\x20#\x20or')),console['log'](a171_0x286f9f[_0x4ba6ed(0x198)](_0x4ba6ed(0x1d1))),console[_0x4ba6ed(0x1e8)](''));}
|
|
1
|
+
const a172_0x4e9e2e=a172_0x5c2b;(function(_0x23a664,_0x44eb12){const _0x117a41=a172_0x5c2b,_0x25f2e3=_0x23a664();while(!![]){try{const _0x2049ca=parseInt(_0x117a41(0x11d))/0x1+-parseInt(_0x117a41(0x14d))/0x2*(-parseInt(_0x117a41(0x16a))/0x3)+-parseInt(_0x117a41(0x111))/0x4+parseInt(_0x117a41(0x136))/0x5+-parseInt(_0x117a41(0x16c))/0x6*(-parseInt(_0x117a41(0x102))/0x7)+parseInt(_0x117a41(0x160))/0x8*(parseInt(_0x117a41(0x157))/0x9)+-parseInt(_0x117a41(0x154))/0xa;if(_0x2049ca===_0x44eb12)break;else _0x25f2e3['push'](_0x25f2e3['shift']());}catch(_0x2c229e){_0x25f2e3['push'](_0x25f2e3['shift']());}}}(a172_0x5885,0xd3250));function a172_0x5885(){const _0x4d09ee=['No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','\x20→\x20latest','Step\x201/7:\x20Config\x20migration\x20—\x20','latest','dependencies','Upgrade\x20completed\x20successfully!','Config\x20file:','.bak','args','480815OCBTOH','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','string','oldPath','step','red','\x20\x20npm\x20install','Upgrade\x20@lovrabet/sdk','parse','includes','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','===\x20Upgrade\x20Analysis\x20===','\x20\x20Fields\x20to\x20migrate:\x20','@lovrabet/sdk','label','sdkUpgrade','Config\x20migration','.lovrabet','@lovrabet/sdk:','Step\x206/7:\x20Installing\x20new\x20skill...','Clean\x20MCP\x20config','[\x22@lovrabet/sdk\x22]:\x20','26900bDlcmB','\x20\x20Action:\x20delete','message','mcpServers','needed','gray','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','33097370gVfbFs','exit\x20','Install\x20new\x20skill','2097BsakSl','\x20removed\x20(','path','entries','cwd','object','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','\x20→\x20keys:\x20','45368NmQyYz','\x20→\x20','@lovrabet/dataset-mcp-server','oldArtifacts','yellow','join','skipped\x20(no\x20legacy\x20config)','push','Step\x204/7:\x20MCP\x20config\x20—\x20','FAIL','354COUkDA','no\x20matching\x20entry\x20found','30vZFznv','\x20(backup:\x20','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','none\x20found','lovrabet/rabetbase','status','\x20\x20New\x20config\x20(.rabetbase.json):\x20','removed\x20','undefined','lovrabet/rabetbase\x20installed\x20globally','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','bold','Remove\x20.lovrabet/','some','MCP\x20config:','isDirectory','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','already\x20exists\x20(will\x20merge)','cyan','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','Remove\x20old\x20skill','start','.cursor/rules/lovrabet_rules.mdc','length','white','270697VETvVe','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','skipped','Remove\x20legacy\x20artifacts','inherit','error','stringify','isArray','failed','needsSkillSwap','files','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','utf8','\x20\x20bun\x20install','2199244gxCOVu','Upgrade\x20cancelled.','CANCEL','Legacy\x20artifacts:','filter','oldMcpConfig','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','package.json','fields','detail','succeed','\x20removed','1526435YFXAJx','Step\x204/7:\x20Cleaning\x20MCP\x20config...','lovrabet/lovrabet-skill\x20removed','configMigration','log','hasNewConfig','fail','keys','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','not\x20found\x20or\x20already\x20at\x20latest','Step\x201/7:\x20Migrating\x20config...','done','green','yes','\x20\x20#\x20or','values'];a172_0x5885=function(){return _0x4d09ee;};return a172_0x5885();}import a172_0x82445b from'chalk';import a172_0xde8e48 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';function a172_0x5c2b(_0x1b0719,_0x321fac){_0x1b0719=_0x1b0719-0xfc;const _0x58856b=a172_0x5885();let _0x5c2b31=_0x58856b[_0x1b0719];return _0x5c2b31;}import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a172_0x4e9e2e(0x115)](_0x5a5953=>_0x5a5953!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x368727){const _0x41724=a172_0x4e9e2e,_0x3257f6=[];for(const _0x46bfe9 of Object[_0x41724(0x12c)](CORE_IDE_CONFIGS)){if(_0x46bfe9[_0x41724(0x10d)])for(const _0x4a6fc5 of _0x46bfe9[_0x41724(0x10d)]){_0x3257f6[_0x41724(0x167)](resolve(_0x368727,_0x4a6fc5[_0x41724(0x159)]));}}return _0x3257f6;}function analyse(_0x33349b){const _0x16490a=a172_0x4e9e2e;let _0x11e245=null;const _0x3ff37f=resolve(_0x33349b,NEW_CONFIG_NAME),_0x4090f4=existsSync(_0x3ff37f);for(const _0x5ed9cf of LEGACY_CONFIG_NAMES){const _0x58de07=resolve(_0x33349b,_0x5ed9cf);if(existsSync(_0x58de07)){const _0x2b9f26=readConfigFile(_0x58de07),_0x1bc6e4=Object[_0x16490a(0x124)](_0x2b9f26)['filter'](_0x5c9634=>typeof _0x2b9f26[_0x5c9634]!==_0x16490a(0x174));_0x11e245={'oldPath':_0x58de07,'hasNewConfig':_0x4090f4,'fields':_0x1bc6e4};break;}}const _0x34d7d7=[],_0x2f71e4=resolve(_0x33349b,_0x16490a(0x148));if(existsSync(_0x2f71e4))_0x34d7d7[_0x16490a(0x167)](_0x2f71e4);const _0x52ce9c=resolve(_0x33349b,_0x16490a(0xff));if(existsSync(_0x52ce9c))_0x34d7d7[_0x16490a(0x167)](_0x52ce9c);const _0x56b59f=resolve(_0x33349b,'.claude/skills/lovrabet');if(existsSync(_0x56b59f))_0x34d7d7['push'](_0x56b59f);for(const _0x323cd5 of collectIdeSkillFiles(_0x33349b)){if(existsSync(_0x323cd5))_0x34d7d7['push'](_0x323cd5);}let _0x57b642=null;const _0x1a1ab1=resolve(_0x33349b,'.cursor/mcp.json');if(existsSync(_0x1a1ab1))try{const _0x4416cf=JSON[_0x16490a(0x13e)](readFileSync(_0x1a1ab1,_0x16490a(0x10f)));if(_0x4416cf?.['mcpServers']&&typeof _0x4416cf[_0x16490a(0x150)]===_0x16490a(0x15c)){const _0x5c79b3=[];for(const [_0x4fc2b6,_0x4e83f0]of Object[_0x16490a(0x15a)](_0x4416cf['mcpServers'])){const _0x244bde=_0x4e83f0;_0x244bde?.['args']&&Array['isArray'](_0x244bde[_0x16490a(0x135)])&&_0x244bde[_0x16490a(0x135)][_0x16490a(0x179)](_0x23d88c=>typeof _0x23d88c===_0x16490a(0x138)&&_0x23d88c[_0x16490a(0x13f)](_0x16490a(0x162)))&&_0x5c79b3[_0x16490a(0x167)](_0x4fc2b6);}_0x5c79b3[_0x16490a(0x100)]>0x0&&(_0x57b642={'path':_0x1a1ab1,'keys':_0x5c79b3});}}catch{}const _0x46ef9d=_0x34d7d7['length']>0x0||_0x11e245!==null;let _0x484521=null;const _0x5b1ab1=resolve(_0x33349b,_0x16490a(0x118));if(existsSync(_0x5b1ab1))try{const _0x3c167c=JSON[_0x16490a(0x13e)](readFileSync(_0x5b1ab1,_0x16490a(0x10f)));for(const _0x5b9d0e of[_0x16490a(0x131),'devDependencies']){const _0x336370=_0x3c167c?.[_0x5b9d0e]?.[_0x16490a(0x144)];if(typeof _0x336370===_0x16490a(0x138)){_0x336370!=='latest'&&(_0x484521={'pkgPath':_0x5b1ab1,'currentVersion':_0x336370,'field':_0x5b9d0e});break;}}}catch{}return{'configMigration':_0x11e245,'oldArtifacts':_0x34d7d7,'oldMcpConfig':_0x57b642,'needsSkillSwap':_0x46ef9d,'sdkUpgrade':_0x484521};}function printReport(_0x285398){const _0x23d502=a172_0x4e9e2e,{configMigration:_0x8e6d95,oldArtifacts:_0x389170,oldMcpConfig:_0xe51421,needsSkillSwap:_0x138a0e}=_0x285398;console['log'](''),console[_0x23d502(0x121)](a172_0x82445b['bold'](_0x23d502(0x142))),console[_0x23d502(0x121)]('');_0x8e6d95?(console['log'](a172_0x82445b[_0x23d502(0x17e)]('Config\x20file:')+('\x20\x20'+a172_0x82445b[_0x23d502(0x164)](_0x8e6d95['oldPath']))),console[_0x23d502(0x121)](_0x23d502(0x172)+(_0x8e6d95[_0x23d502(0x122)]?a172_0x82445b[_0x23d502(0x129)](_0x23d502(0x17d)):a172_0x82445b[_0x23d502(0x152)]('not\x20found\x20(will\x20create)'))),console['log'](_0x23d502(0x143)+_0x8e6d95[_0x23d502(0x119)]['join'](',\x20')),console[_0x23d502(0x121)](_0x23d502(0x10e))):console[_0x23d502(0x121)](a172_0x82445b[_0x23d502(0x17e)](_0x23d502(0x133))+'\x20\x20'+a172_0x82445b[_0x23d502(0x152)]('no\x20legacy\x20config\x20found'));console[_0x23d502(0x121)]('');if(_0x389170['length']>0x0){console[_0x23d502(0x121)](a172_0x82445b['cyan'](_0x23d502(0x114)));for(const _0x599f23 of _0x389170){console[_0x23d502(0x121)]('\x20\x20'+a172_0x82445b[_0x23d502(0x13b)]('FOUND')+'\x20\x20'+_0x599f23);}console['log'](_0x23d502(0x14e));}else console['log'](a172_0x82445b[_0x23d502(0x17e)]('Legacy\x20artifacts:')+'\x20\x20'+a172_0x82445b['gray'](_0x23d502(0x16f)));console['log']('');_0xe51421?(console[_0x23d502(0x121)](a172_0x82445b['cyan'](_0x23d502(0x17a))+('\x20\x20'+a172_0x82445b[_0x23d502(0x164)](_0xe51421['path'])+_0x23d502(0x15f)+_0xe51421['keys'][_0x23d502(0x165)](',\x20'))),console['log']('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console[_0x23d502(0x121)](a172_0x82445b[_0x23d502(0x17e)]('MCP\x20config:')+'\x20\x20'+a172_0x82445b[_0x23d502(0x152)]('no\x20legacy\x20entry'));console[_0x23d502(0x121)](''),console[_0x23d502(0x121)](a172_0x82445b[_0x23d502(0x17e)]('Skill\x20swap:')+('\x20\x20'+(_0x138a0e?a172_0x82445b[_0x23d502(0x164)](_0x23d502(0x151)):a172_0x82445b[_0x23d502(0x129)]('not\x20needed'))));_0x138a0e&&console[_0x23d502(0x121)](_0x23d502(0x16e)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x23d502(0x121)]('');if(_0x285398[_0x23d502(0x146)]){const {currentVersion:_0x5a5673,field:_0x1c35f9,pkgPath:_0x327c5b}=_0x285398[_0x23d502(0x146)];console['log'](a172_0x82445b['cyan'](_0x23d502(0x149))+('\x20\x20'+a172_0x82445b[_0x23d502(0x164)](_0x327c5b))),console['log']('\x20\x20Current\x20version\x20in\x20'+_0x1c35f9+':\x20'+a172_0x82445b[_0x23d502(0x164)](_0x5a5673)+_0x23d502(0x161)+a172_0x82445b[_0x23d502(0x129)]('latest')),console['log']('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console['log'](a172_0x82445b[_0x23d502(0x17e)](_0x23d502(0x149))+'\x20\x20'+a172_0x82445b[_0x23d502(0x152)](_0x23d502(0x126)));console[_0x23d502(0x121)]('');}function execConfigMigration(_0x107439,_0x337d90){const _0x33cfd7=a172_0x4e9e2e,{configMigration:_0x3de9c2}=_0x107439;if(!_0x3de9c2?.[_0x33cfd7(0x139)])return{'step':0x1,'label':_0x33cfd7(0x147),'ok':!![],'detail':_0x33cfd7(0x166)};const _0x4662ae=readConfigFile(_0x3de9c2['oldPath']),_0x43907a=resolve(_0x337d90,NEW_CONFIG_NAME),_0x4f9b9c=_0x3de9c2['hasNewConfig']?readConfigFile(_0x43907a):{};for(const [_0x57a383,_0x50c835]of Object[_0x33cfd7(0x15a)](_0x4662ae)){!(_0x57a383 in _0x4f9b9c)&&(_0x4f9b9c[_0x57a383]=_0x50c835);}writeConfigFile(_0x43907a,_0x4f9b9c);const _0x2e3831=_0x3de9c2[_0x33cfd7(0x139)]+_0x33cfd7(0x134);return renameSync(_0x3de9c2[_0x33cfd7(0x139)],_0x2e3831),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x3de9c2[_0x33cfd7(0x139)]+'\x20→\x20'+_0x43907a+_0x33cfd7(0x16d)+_0x2e3831+')'};}function execRemoveOldArtifacts(_0x5f1490){const _0x4e1035=a172_0x4e9e2e,_0x31babf=[];for(const _0x288b8c of _0x5f1490){try{if(!existsSync(_0x288b8c))continue;const _0x1fe4e4=tryStat(_0x288b8c);_0x1fe4e4?.[_0x4e1035(0x17b)]()?rmSync(_0x288b8c,{'recursive':!![],'force':!![]}):unlinkSync(_0x288b8c);}catch(_0x4bebf9){_0x31babf['push'](_0x288b8c+':\x20'+_0x4bebf9[_0x4e1035(0x14f)]);}}return{'step':0x3,'label':_0x4e1035(0x106),'ok':_0x31babf[_0x4e1035(0x100)]===0x0,'detail':_0x31babf['length']>0x0?_0x5f1490[_0x4e1035(0x100)]-_0x31babf['length']+'/'+_0x5f1490['length']+_0x4e1035(0x158)+_0x31babf['join'](';\x20')+')':_0x5f1490[_0x4e1035(0x100)]+_0x4e1035(0x11c)};}function execCleanMcp(_0x1dbe05){const _0x430de1=a172_0x4e9e2e;if(!_0x1dbe05[_0x430de1(0x116)])return{'step':0x4,'label':_0x430de1(0x14b),'ok':!![],'detail':'skipped'};try{const _0x1b4047=readFileSync(_0x1dbe05[_0x430de1(0x116)][_0x430de1(0x159)],_0x430de1(0x10f)),_0x539ad1=JSON[_0x430de1(0x13e)](_0x1b4047);if(_0x539ad1?.[_0x430de1(0x150)]&&typeof _0x539ad1[_0x430de1(0x150)]===_0x430de1(0x15c)){const _0x489686=[];for(const [_0x16caac,_0x2344ba]of Object[_0x430de1(0x15a)](_0x539ad1[_0x430de1(0x150)])){_0x2344ba?.[_0x430de1(0x135)]&&Array[_0x430de1(0x10a)](_0x2344ba[_0x430de1(0x135)])&&_0x2344ba[_0x430de1(0x135)]['some'](_0x16ce8f=>typeof _0x16ce8f===_0x430de1(0x138)&&_0x16ce8f[_0x430de1(0x13f)](_0x430de1(0x162)))&&_0x489686[_0x430de1(0x167)](_0x16caac);}for(const _0x2b8554 of _0x489686){delete _0x539ad1[_0x430de1(0x150)][_0x2b8554];}return _0x489686[_0x430de1(0x100)]>0x0&&writeFileSync(_0x1dbe05[_0x430de1(0x116)][_0x430de1(0x159)],JSON[_0x430de1(0x109)](_0x539ad1,null,0x2)+'\x0a',_0x430de1(0x10f)),{'step':0x4,'label':_0x430de1(0x14b),'ok':!![],'detail':_0x430de1(0x173)+_0x489686[_0x430de1(0x165)](',\x20')+'\x20from\x20'+_0x1dbe05[_0x430de1(0x116)][_0x430de1(0x159)]};}return{'step':0x4,'label':_0x430de1(0x14b),'ok':!![],'detail':_0x430de1(0x16b)};}catch(_0x240fbe){return{'step':0x4,'label':_0x430de1(0x14b),'ok':![],'detail':_0x240fbe['message']};}}function execSkillsRemove(_0x146e52,_0x411a17){const _0x2be9fd=a172_0x4e9e2e,_0x10dff3=runNpxSkillsRemove(_0x146e52,{'stdio':_0x2be9fd(0x107),'yes':_0x411a17});return{'step':0x5,'label':_0x2be9fd(0xfd),'ok':_0x10dff3['ok'],'detail':_0x10dff3['ok']?_0x2be9fd(0x11f):_0x10dff3[_0x2be9fd(0x108)]??_0x2be9fd(0x155)+_0x10dff3[_0x2be9fd(0x171)]};}function execSkillsAdd(_0x4e5b5c,_0x44c77d){const _0xfa4ed6=a172_0x4e9e2e,_0x309eb6=runNpxSkillsAddGlobal(_0x4e5b5c,_0xfa4ed6(0x170),{'stdio':'inherit','yes':_0x44c77d});return{'step':0x6,'label':_0xfa4ed6(0x156),'ok':_0x309eb6['ok'],'detail':_0x309eb6['ok']?_0xfa4ed6(0x175):_0x309eb6[_0xfa4ed6(0x108)]??_0xfa4ed6(0x155)+_0x309eb6[_0xfa4ed6(0x171)]};}function execUpgradeSdk(_0x4a7e5b){const _0x465d31=a172_0x4e9e2e;if(!_0x4a7e5b[_0x465d31(0x146)])return{'step':0x7,'label':_0x465d31(0x13d),'ok':!![],'detail':_0x465d31(0x153)};const {pkgPath:_0x106725,currentVersion:_0x3ffc75,field:_0x2b2393}=_0x4a7e5b['sdkUpgrade'];try{const _0x2a1638=readFileSync(_0x106725,_0x465d31(0x10f)),_0x18cf9b=JSON[_0x465d31(0x13e)](_0x2a1638);return _0x18cf9b[_0x2b2393][_0x465d31(0x144)]=_0x465d31(0x130),writeFileSync(_0x106725,JSON[_0x465d31(0x109)](_0x18cf9b,null,0x2)+'\x0a',_0x465d31(0x10f)),{'step':0x7,'label':_0x465d31(0x13d),'ok':!![],'detail':_0x2b2393+_0x465d31(0x14c)+_0x3ffc75+_0x465d31(0x12e)};}catch(_0x5d8b81){return{'step':0x7,'label':_0x465d31(0x13d),'ok':![],'detail':_0x5d8b81[_0x465d31(0x14f)]};}}function tryStat(_0x4bee1e){try{return statSync(_0x4bee1e);}catch{return undefined;}}function printSummary(_0x1fd3b9){const _0x2c8aed=a172_0x4e9e2e;console['log'](''),console[_0x2c8aed(0x121)](a172_0x82445b['bold']('===\x20Upgrade\x20Summary\x20===')),console['log']('');for(const _0x26051a of _0x1fd3b9){const _0x1beed9=_0x26051a['ok']?a172_0x82445b[_0x2c8aed(0x129)]('OK'):a172_0x82445b[_0x2c8aed(0x13b)](_0x2c8aed(0x169));console['log']('\x20\x20'+_0x1beed9+'\x20\x20Step\x20'+_0x26051a[_0x2c8aed(0x13a)]+':\x20'+_0x26051a[_0x2c8aed(0x145)]);if(_0x26051a[_0x2c8aed(0x11a)])console['log']('\x20\x20\x20\x20\x20\x20\x20'+a172_0x82445b[_0x2c8aed(0x152)](_0x26051a[_0x2c8aed(0x11a)]));}console['log']('');}export async function upgradeApp(_0x4d2737,_0x3e0e42){const _0x5b1da9=a172_0x4e9e2e,_0x1e99cf=process[_0x5b1da9(0x15b)](),_0x1a7af2=analyse(_0x1e99cf),_0x3a7c7d=!_0x1a7af2[_0x5b1da9(0x120)]&&_0x1a7af2[_0x5b1da9(0x163)][_0x5b1da9(0x100)]===0x0&&!_0x1a7af2[_0x5b1da9(0x116)]&&!_0x1a7af2[_0x5b1da9(0x10c)]&&!_0x1a7af2[_0x5b1da9(0x146)];if(_0x3a7c7d){console[_0x5b1da9(0x121)](a172_0x82445b['green'](_0x5b1da9(0x12d)));return;}printReport(_0x1a7af2);const _0x39fe99=!!(_0x3e0e42[_0x5b1da9(0x12a)]||_0x3e0e42['Y']||_0x4d2737);if(!_0x39fe99)try{const _0x310e95=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x310e95){console['log'](a172_0x82445b['gray'](_0x5b1da9(0x112)));return;}}catch(_0x4d8bbe){if(_0x4d8bbe?.[_0x5b1da9(0x14f)]===_0x5b1da9(0x113)){console[_0x5b1da9(0x121)](a172_0x82445b[_0x5b1da9(0x152)]('Upgrade\x20cancelled.'));return;}throw _0x4d8bbe;}const _0x580a96=[],_0x3f9a48=a172_0xde8e48({'text':_0x5b1da9(0x127),'color':_0x5b1da9(0x17e)})['start'](),_0x306365=execConfigMigration(_0x1a7af2,_0x1e99cf);_0x580a96['push'](_0x306365),_0x3f9a48[_0x306365['ok']?_0x5b1da9(0x11b):_0x5b1da9(0x123)](_0x5b1da9(0x12f)+(_0x306365['detail']??(_0x306365['ok']?_0x5b1da9(0x128):'failed')));const _0x3098a8=resolve(_0x1e99cf,_0x5b1da9(0x148)),_0x401dd4=a172_0xde8e48({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':_0x5b1da9(0x17e)})[_0x5b1da9(0xfe)]();if(existsSync(_0x3098a8))try{rmSync(_0x3098a8,{'recursive':!![],'force':!![]}),_0x401dd4['succeed'](_0x5b1da9(0x104)),_0x580a96[_0x5b1da9(0x167)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x275a91){_0x401dd4[_0x5b1da9(0x123)](_0x5b1da9(0x15d)+_0x275a91[_0x5b1da9(0x14f)]),_0x580a96[_0x5b1da9(0x167)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x275a91[_0x5b1da9(0x14f)]});}else _0x401dd4['info'](_0x5b1da9(0x137)),_0x580a96[_0x5b1da9(0x167)]({'step':0x2,'label':_0x5b1da9(0x178),'ok':!![],'detail':_0x5b1da9(0x105)});const _0x5b8a80=a172_0xde8e48({'text':_0x5b1da9(0x103),'color':_0x5b1da9(0x17e)})[_0x5b1da9(0xfe)](),_0xb21cb8=execRemoveOldArtifacts(_0x1a7af2['oldArtifacts']);_0x580a96[_0x5b1da9(0x167)](_0xb21cb8),_0x5b8a80[_0xb21cb8['ok']?_0x5b1da9(0x11b):'fail'](_0x5b1da9(0x117)+(_0xb21cb8[_0x5b1da9(0x11a)]??(_0xb21cb8['ok']?_0x5b1da9(0x128):_0x5b1da9(0x10b))));const _0x4bac5a=a172_0xde8e48({'text':_0x5b1da9(0x11e),'color':_0x5b1da9(0x17e)})[_0x5b1da9(0xfe)](),_0x50a066=execCleanMcp(_0x1a7af2);_0x580a96[_0x5b1da9(0x167)](_0x50a066),_0x4bac5a[_0x50a066['ok']?'succeed':_0x5b1da9(0x123)](_0x5b1da9(0x168)+(_0x50a066['detail']??(_0x50a066['ok']?_0x5b1da9(0x128):'failed')));const _0x5095f0=a172_0xde8e48({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x5b1da9(0x17e)})[_0x5b1da9(0xfe)](),_0x2e6200=execSkillsRemove(_0x1e99cf,_0x39fe99);_0x580a96[_0x5b1da9(0x167)](_0x2e6200),_0x5095f0[_0x2e6200['ok']?'succeed':_0x5b1da9(0x123)](_0x5b1da9(0x125)+(_0x2e6200[_0x5b1da9(0x11a)]??(_0x2e6200['ok']?'done':_0x5b1da9(0x10b))));const _0x5ad01a=a172_0xde8e48({'text':_0x5b1da9(0x14a),'color':_0x5b1da9(0x17e)})[_0x5b1da9(0xfe)](),_0x571511=execSkillsAdd(_0x1e99cf,_0x39fe99);_0x580a96[_0x5b1da9(0x167)](_0x571511),_0x5ad01a[_0x571511['ok']?_0x5b1da9(0x11b):'fail'](_0x5b1da9(0x176)+(_0x571511[_0x5b1da9(0x11a)]??(_0x571511['ok']?_0x5b1da9(0x128):_0x5b1da9(0x10b))));const _0x17c9f4=a172_0xde8e48({'text':_0x5b1da9(0x141),'color':_0x5b1da9(0x17e)})[_0x5b1da9(0xfe)](),_0x38485a=execUpgradeSdk(_0x1a7af2);_0x580a96['push'](_0x38485a),_0x17c9f4[_0x38485a['ok']?_0x5b1da9(0x11b):'fail'](_0x5b1da9(0xfc)+(_0x38485a[_0x5b1da9(0x11a)]??(_0x38485a['ok']?_0x5b1da9(0x128):_0x5b1da9(0x10b)))),printSummary(_0x580a96);const _0xb104f3=_0x580a96[_0x5b1da9(0x179)](_0x422ad3=>!_0x422ad3['ok']);_0xb104f3?console[_0x5b1da9(0x121)](a172_0x82445b[_0x5b1da9(0x164)](_0x5b1da9(0x15e))):console[_0x5b1da9(0x121)](a172_0x82445b[_0x5b1da9(0x129)](_0x5b1da9(0x132))),_0x38485a['ok']&&_0x1a7af2['sdkUpgrade']&&(console[_0x5b1da9(0x121)](''),console[_0x5b1da9(0x121)](a172_0x82445b[_0x5b1da9(0x177)][_0x5b1da9(0x17e)](_0x5b1da9(0x17c))),console[_0x5b1da9(0x121)](a172_0x82445b[_0x5b1da9(0x17e)](_0x5b1da9(0x140))),console[_0x5b1da9(0x121)](''),console[_0x5b1da9(0x121)](a172_0x82445b[_0x5b1da9(0x101)](_0x5b1da9(0x13c))),console[_0x5b1da9(0x121)](a172_0x82445b[_0x5b1da9(0x101)](_0x5b1da9(0x12b))),console[_0x5b1da9(0x121)](a172_0x82445b['white'](_0x5b1da9(0x110))),console[_0x5b1da9(0x121)](''));}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a172_0x3a5be0=a172_0x5a14;(function(_0x4e1538,_0x92bfe4){const _0x468946=a172_0x5a14,_0x27119c=_0x4e1538();while(!![]){try{const _0x3f9b27=parseInt(_0x468946(0x232))/0x1*(parseInt(_0x468946(0x1fc))/0x2)+-parseInt(_0x468946(0x21b))/0x3+parseInt(_0x468946(0x1f3))/0x4+-parseInt(_0x468946(0x1ea))/0x5+parseInt(_0x468946(0x1e3))/0x6*(parseInt(_0x468946(0x205))/0x7)+parseInt(_0x468946(0x238))/0x8*(parseInt(_0x468946(0x234))/0x9)+parseInt(_0x468946(0x213))/0xa*(-parseInt(_0x468946(0x23d))/0xb);if(_0x3f9b27===_0x92bfe4)break;else _0x27119c['push'](_0x27119c['shift']());}catch(_0x5d8952){_0x27119c['push'](_0x27119c['shift']());}}}(a172_0x1e5a,0x407f8));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';function a172_0x5a14(_0x21cfe0,_0x47bf96){_0x21cfe0=_0x21cfe0-0x1df;const _0x1e5a6a=a172_0x1e5a();let _0x5a1401=_0x1e5a6a[_0x21cfe0];return _0x5a1401;}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{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';function a172_0x1e5a(){const _0x14c924=['logout','Authentication','isSingleCommand','OCR','commands','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Project','74NMcQQd','install','knowledge-base:delete','set','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','rabetbase\x20page\x20custom-update','app:use','knowledge-base:update','write','143423hwCKdU','knowledge-base:detail','service','description','rabetbase\x20page\x20custom-detail','CLI\x20Built-in\x20Skill','`\x20has\x20been\x20removed.','Run\x20any\x20package.json\x20script','get','User\x20Accounts','rabetbase\x20page\x20data-list-status','permit:role-menus-set','read','rabetbase\x20menu\x20asset-update','550qhkAGN','page:standard-page-status','<script>','Database\x20Connections','map','rabetbase\x20run\x20start','rabetbase\x20kb\x20update','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','842715AmmWOb','Configuration','sql:new','start','page:react-create','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','\x20\x20[','App\x20Management','rabetbase\x20kb\x20detail','has','`\x20instead.','Code\x20Generation','length','rabetbase\x20run\x20build','menu:update','push','rabetbase\x20project\x20create\x20<project-name>','Dataset\x20&\x20Operations','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','rabetbase\x20run\x20preview','API\x20Development','rabetbase\x20bff\x20create','Run\x20Scripts','3916gaPjiO','rabetbase\x20workspace\x20use\x20--app\x20<name>','927RURcbh','Async\x20Tasks','values','Self\x20Update','23056FjZYoE','permit:role-apis-set','page:react-update','Quick\x20Start','permit:page-get','122287GkrtUp','Roles','rabetbase\x20cli-skill\x20install','show','wildcardDef','`rabetbase\x20','rabetbase\x20auth\x20logout','permit:page-set','File','skills:install','defaultCommand','Platform\x20Issue','Diagnostics','page:react-list','Company\x20Knowledge\x20Base','rabetbase\x20kb\x20create','skills:','sql:save','page:custom-create','Logs','run','144wqhvJk','Tenant\x20Members','skill:install','rabetbase\x20app\x20list\x20--remote','filter','risk','project:init','731505VIRdpj','login','permit:role-menus','command','knowledge-base:create','\x20\x20[write]','from','Instant\x20API','app:remote','1477404voJNRg'];a172_0x1e5a=function(){return _0x14c924;};return a172_0x1e5a();}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{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x1126ef){const _0x351982=a172_0x5a14;for(const _0x1cba71 of _0x1126ef){definitions['set'](_0x1cba71[_0x351982(0x207)]+':'+_0x1cba71['command'],_0x1cba71);let _0xb473a9=serviceGroups[_0x351982(0x20d)](_0x1cba71['service']);!_0xb473a9&&(_0xb473a9=[],serviceGroups[_0x351982(0x1ff)](_0x1cba71[_0x351982(0x207)],_0xb473a9)),_0xb473a9[_0x351982(0x22a)](_0x1cba71);}}function registerDeclarativeService(_0x26346b,_0x5eac55,_0xd07410){const _0x4f4968=a172_0x5a14;registerDefinitions(_0x5eac55);_0xd07410?.[_0x4f4968(0x241)]&®isterDefinitions([_0xd07410[_0x4f4968(0x241)]]);const _0x4497ee=_0x280cac=>_0x280cac===_0x4f4968(0x211)?'':_0x280cac===_0x4f4968(0x204)?_0x4f4968(0x1ef):'\x20\x20[high-risk-write]',_0x445f26={'service':_0x5eac55[0x0][_0x4f4968(0x207)],'label':_0x26346b,'commands':_0x5eac55[_0x4f4968(0x1e7)](_0xd98542=>!_0xd98542['hidden'])[_0x4f4968(0x217)](_0x831c0c=>({'command':_0x831c0c[_0x4f4968(0x1ed)],'description':_0x831c0c[_0x4f4968(0x208)],'tag':_0x4497ee(_0x831c0c['risk'])})),'declarative':!![],'defaultCommand':_0xd07410?.[_0x4f4968(0x247)]??(_0xd07410?.[_0x4f4968(0x1f6)]?_0x5eac55[0x0][_0x4f4968(0x1ed)]:undefined),'wildcardDef':_0xd07410?.['wildcardDef'],'isSingleCommand':_0xd07410?.[_0x4f4968(0x1f6)]};serviceRegistry[_0x4f4968(0x22a)](_0x445f26),serviceByName[_0x4f4968(0x1ff)](_0x445f26['service'],_0x445f26);}registerDeclarativeService(a172_0x3a5be0(0x23b),initDefinitions,{'defaultCommand':a172_0x3a5be0(0x1e2),'isSingleCommand':!![]}),registerDeclarativeService(a172_0x3a5be0(0x1fb),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a172_0x3a5be0(0x222),appDefinitions),registerDeclarativeService(a172_0x3a5be0(0x1f5),authDefinitions,{'defaultCommand':a172_0x3a5be0(0x1eb)}),registerDeclarativeService(a172_0x3a5be0(0x1e4),tenantDefinitions),registerDeclarativeService(a172_0x3a5be0(0x20e),userAccountDefinitions),registerDeclarativeService(a172_0x3a5be0(0x22c),datasetDefinitions),registerDeclarativeService(a172_0x3a5be0(0x21a),pageDefinitions),registerDeclarativeService(a172_0x3a5be0(0x22f),apiDefinitions),registerDeclarativeService(a172_0x3a5be0(0x1f1),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService('Notification\x20Configuration',notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService(a172_0x3a5be0(0x216),dbDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a172_0x3a5be0(0x235),taskDefinitions),registerDeclarativeService(a172_0x3a5be0(0x23e),roleDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService(a172_0x3a5be0(0x24b),kbDefinitions),registerDeclarativeService(a172_0x3a5be0(0x248),issueDefinitions),registerDeclarativeService(a172_0x3a5be0(0x245),fileDefinitions),registerDeclarativeService(a172_0x3a5be0(0x1f7),ocrDefinitions),registerDeclarativeService(a172_0x3a5be0(0x226),codegenDefinitions),registerDeclarativeService(a172_0x3a5be0(0x21c),configDefinitions),registerDeclarativeService(a172_0x3a5be0(0x249),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a172_0x3a5be0(0x237),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a172_0x3a5be0(0x20a),cliSkillDefinitions,{'defaultCommand':a172_0x3a5be0(0x1fd)}),registerDeclarativeService(a172_0x3a5be0(0x1e1),logsDefinitions,{'defaultCommand':a172_0x3a5be0(0x240)}),registerDeclarativeService(a172_0x3a5be0(0x231),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a172_0x3a5be0(0x227)]-0x1];last[a172_0x3a5be0(0x1f8)]=[{'command':a172_0x3a5be0(0x215),'description':a172_0x3a5be0(0x20c),'tag':a172_0x3a5be0(0x221)+runDefinition[a172_0x3a5be0(0x1e8)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a172_0x3a5be0(0x1df),a172_0x3a5be0(0x1fa)],['bff:new',a172_0x3a5be0(0x230)],[a172_0x3a5be0(0x21d),'rabetbase\x20sql\x20create'],[a172_0x3a5be0(0x229),a172_0x3a5be0(0x212)],[a172_0x3a5be0(0x1e9),a172_0x3a5be0(0x22d)],['skill:',a172_0x3a5be0(0x23f)],[a172_0x3a5be0(0x1e5),a172_0x3a5be0(0x23f)],[a172_0x3a5be0(0x24d),a172_0x3a5be0(0x23f)],[a172_0x3a5be0(0x246),a172_0x3a5be0(0x23f)],[a172_0x3a5be0(0x1f2),a172_0x3a5be0(0x1e6)],[a172_0x3a5be0(0x202),a172_0x3a5be0(0x233)],['app:add',a172_0x3a5be0(0x200)],['app:remove','rabetbase\x20workspace\x20remove\x20<name>'],['knowledge-base:list','rabetbase\x20kb\x20list'],[a172_0x3a5be0(0x206),a172_0x3a5be0(0x223)],[a172_0x3a5be0(0x1ee),a172_0x3a5be0(0x24c)],[a172_0x3a5be0(0x203),a172_0x3a5be0(0x219)],[a172_0x3a5be0(0x1fe),'rabetbase\x20kb\x20delete'],['role:create','rabetbase\x20role\x20list'],[a172_0x3a5be0(0x214),a172_0x3a5be0(0x20f)],[a172_0x3a5be0(0x21f),a172_0x3a5be0(0x220)],[a172_0x3a5be0(0x1e0),a172_0x3a5be0(0x220)],[a172_0x3a5be0(0x24a),'rabetbase\x20page\x20custom-list'],['page:react-detail',a172_0x3a5be0(0x209)],[a172_0x3a5be0(0x23a),a172_0x3a5be0(0x201)],['page:react-publish','rabetbase\x20page\x20custom-publish']]),REMOVED_COMMAND_HINTS=new Map([[a172_0x3a5be0(0x23c),a172_0x3a5be0(0x1f9)],[a172_0x3a5be0(0x244),a172_0x3a5be0(0x1f9)],[a172_0x3a5be0(0x1ec),a172_0x3a5be0(0x1f9)],[a172_0x3a5be0(0x210),a172_0x3a5be0(0x1f9)],[a172_0x3a5be0(0x239),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a172_0x3a5be0(0x22b)],[a172_0x3a5be0(0x21e),a172_0x3a5be0(0x218)],['build',a172_0x3a5be0(0x228)],['preview',a172_0x3a5be0(0x22e)],[a172_0x3a5be0(0x1f4),a172_0x3a5be0(0x243)]]);export function resolveRemovedCommand(_0x20cde0,_0x3c4824){const _0x19464c=a172_0x3a5be0;if(!_0x20cde0)return undefined;const _0xb24bef=REMOVED_COMMAND_REPLACEMENTS[_0x19464c(0x20d)](_0x20cde0+':'+(_0x3c4824??'')),_0x481215=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x19464c(0x20d)](_0x20cde0),_0x508b9d=_0xb24bef??_0x481215,_0x17413d=REMOVED_COMMAND_HINTS[_0x19464c(0x20d)](_0x20cde0+':'+(_0x3c4824??''));if(!_0x508b9d&&!_0x17413d)return undefined;const _0x1532bb=_0x481215?_0x20cde0:_0x3c4824?_0x20cde0+'\x20'+_0x3c4824:_0x20cde0;return{'command':_0x1532bb,'message':_0x19464c(0x242)+_0x1532bb+_0x19464c(0x20b),'hint':_0x17413d??'Use\x20`'+_0x508b9d+_0x19464c(0x225)};}export function findDefinition(_0x354e00,_0x25e351){const _0x17fde5=a172_0x3a5be0;return definitions[_0x17fde5(0x20d)](_0x354e00+':'+_0x25e351);}export function isKnownService(_0x4396f2){const _0x865720=a172_0x3a5be0;return serviceByName[_0x865720(0x224)](_0x4396f2);}export function isDeclarativeService(_0x21a471){const _0x3a17cb=a172_0x3a5be0;return serviceGroups['has'](_0x21a471)||serviceByName[_0x3a17cb(0x20d)](_0x21a471)?.[_0x3a17cb(0x241)]!==undefined;}export function getServiceEntry(_0x2acc2a){return serviceByName['get'](_0x2acc2a);}export function getLegacyHandler(_0x4899ed,_0x5b5008){return undefined;}export function getAllDefinitions(){const _0x2070af=a172_0x3a5be0;return Array[_0x2070af(0x1f0)](definitions[_0x2070af(0x236)]());}
|
|
1
|
+
const a173_0xf74a29=a173_0x21d3;(function(_0x1a9a24,_0x54b6d6){const _0x117f65=a173_0x21d3,_0x4cc7bc=_0x1a9a24();while(!![]){try{const _0x3bb139=-parseInt(_0x117f65(0x19f))/0x1+parseInt(_0x117f65(0x16d))/0x2*(parseInt(_0x117f65(0x1bf))/0x3)+-parseInt(_0x117f65(0x186))/0x4+-parseInt(_0x117f65(0x1cb))/0x5+-parseInt(_0x117f65(0x1cd))/0x6*(-parseInt(_0x117f65(0x1a7))/0x7)+parseInt(_0x117f65(0x16b))/0x8*(parseInt(_0x117f65(0x1af))/0x9)+-parseInt(_0x117f65(0x1b1))/0xa*(-parseInt(_0x117f65(0x18f))/0xb);if(_0x3bb139===_0x54b6d6)break;else _0x4cc7bc['push'](_0x4cc7bc['shift']());}catch(_0x36418c){_0x4cc7bc['push'](_0x4cc7bc['shift']());}}}(a173_0x57a8,0xe4a99));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{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';function a173_0x21d3(_0x109128,_0x432314){_0x109128=_0x109128-0x167;const _0x57a8fd=a173_0x57a8();let _0x21d3b4=_0x57a8fd[_0x109128];return _0x21d3b4;}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{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();function a173_0x57a8(){const _0xdfbb2a=['User\x20Accounts','`\x20has\x20been\x20removed.','rabetbase\x20run\x20build','role:create','Company\x20Knowledge\x20Base','rabetbase\x20cli-skill\x20install','command','isSingleCommand','Schema','\x20\x20[high-risk-write]','app:use','page:react-list','rabetbase\x20kb\x20detail','Platform\x20Issue','API\x20Development','Code\x20Generation','permit:page-set','menu:update','rabetbase\x20kb\x20create','4052120GLhGII','rabetbase\x20page\x20custom-publish','app:remote','page:custom-create','\x20\x20[','Project','rabetbase\x20page\x20data-list-status','BFF\x20Scripts','Roles','1496XbYXZh','rabetbase\x20kb\x20list','Run\x20Scripts','Dataset\x20&\x20Operations','Logs','hidden','Quick\x20Start','rabetbase\x20app\x20list\x20--remote','has','build','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','Diagnostics','Menu','push','sql:save','rabetbase\x20project\x20create\x20<project-name>','1775331sWqSJR','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','rabetbase\x20menu\x20asset-update','defaultCommand','<script>','create','knowledge-base:delete','sql:new','7EQSLDq','App\x20Management','service','knowledge-base:update','Run\x20any\x20package.json\x20script','risk','page:standard-page-status','rabetbase\x20kb\x20update','3519ExhcyA','knowledge-base:create','53100tPzOOH','permit:role-menus','rabetbase\x20role\x20list','Tenant\x20Members','login','set','page:react-publish','values','rabetbase\x20auth\x20logout','page:react-detail','rabetbase\x20run\x20preview','permit:role-menus-set','skill:','length','2878845rccFBf','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','wildcardDef','`rabetbase\x20','Configuration','logout','permit:page-get','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','page:react-update','rabetbase\x20page\x20custom-update','skills:install','map','372805SBRfIQ','\x20\x20[write]','8547030ougcIZ','rabetbase\x20sql\x20create','rabetbase\x20workspace\x20remove\x20<name>','get','Use\x20`','Runtime\x20App\x20Config\x20Management','write','14184seBjoK','File','2aLbOzC','bff:new','Instant\x20API','CLI\x20Built-in\x20Skill','rabetbase\x20page\x20custom-list','Notification\x20Configuration'];a173_0x57a8=function(){return _0xdfbb2a;};return a173_0x57a8();}export const serviceGroups=new Map();function registerDefinitions(_0x4e187a){const _0x417de8=a173_0x21d3;for(const _0x3be293 of _0x4e187a){definitions[_0x417de8(0x1b6)](_0x3be293['service']+':'+_0x3be293[_0x417de8(0x179)],_0x3be293);let _0x252943=serviceGroups['get'](_0x3be293[_0x417de8(0x1a9)]);!_0x252943&&(_0x252943=[],serviceGroups[_0x417de8(0x1b6)](_0x3be293['service'],_0x252943)),_0x252943[_0x417de8(0x19c)](_0x3be293);}}function registerDeclarativeService(_0x8a6aeb,_0x237886,_0xb8188a){const _0x436388=a173_0x21d3;registerDefinitions(_0x237886);_0xb8188a?.[_0x436388(0x1c1)]&®isterDefinitions([_0xb8188a[_0x436388(0x1c1)]]);const _0x5b12f4=_0x5708e1=>_0x5708e1==='read'?'':_0x5708e1===_0x436388(0x16a)?_0x436388(0x1cc):_0x436388(0x17c),_0x294902={'service':_0x237886[0x0][_0x436388(0x1a9)],'label':_0x8a6aeb,'commands':_0x237886['filter'](_0x177278=>!_0x177278[_0x436388(0x194)])[_0x436388(0x1ca)](_0x531348=>({'command':_0x531348['command'],'description':_0x531348['description'],'tag':_0x5b12f4(_0x531348[_0x436388(0x1ac)])})),'declarative':!![],'defaultCommand':_0xb8188a?.[_0x436388(0x1a2)]??(_0xb8188a?.[_0x436388(0x17a)]?_0x237886[0x0]['command']:undefined),'wildcardDef':_0xb8188a?.[_0x436388(0x1c1)],'isSingleCommand':_0xb8188a?.[_0x436388(0x17a)]};serviceRegistry[_0x436388(0x19c)](_0x294902),serviceByName[_0x436388(0x1b6)](_0x294902[_0x436388(0x1a9)],_0x294902);}registerDeclarativeService(a173_0xf74a29(0x195),initDefinitions,{'defaultCommand':'run','isSingleCommand':!![]}),registerDeclarativeService(a173_0xf74a29(0x18b),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a173_0xf74a29(0x1a8),appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a173_0xf74a29(0x1b5)}),registerDeclarativeService(a173_0xf74a29(0x1b4),tenantDefinitions),registerDeclarativeService(a173_0xf74a29(0x173),userAccountDefinitions),registerDeclarativeService(a173_0xf74a29(0x192),datasetDefinitions),registerDeclarativeService(a173_0xf74a29(0x1c0),pageDefinitions),registerDeclarativeService(a173_0xf74a29(0x181),apiDefinitions),registerDeclarativeService(a173_0xf74a29(0x16f),dataDefinitions),registerDeclarativeService(a173_0xf74a29(0x18d),bffDefinitions),registerDeclarativeService(a173_0xf74a29(0x172),notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a173_0xf74a29(0x19b),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService(a173_0xf74a29(0x18e),roleDefinitions),registerDeclarativeService(a173_0xf74a29(0x169),appConfigDefinitions),registerDeclarativeService(a173_0xf74a29(0x177),kbDefinitions),registerDeclarativeService(a173_0xf74a29(0x180),issueDefinitions),registerDeclarativeService(a173_0xf74a29(0x16c),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a173_0xf74a29(0x182),codegenDefinitions),registerDeclarativeService(a173_0xf74a29(0x1c3),configDefinitions),registerDeclarativeService(a173_0xf74a29(0x19a),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a173_0xf74a29(0x17b),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a173_0xf74a29(0x170),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a173_0xf74a29(0x193),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a173_0xf74a29(0x191),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a173_0xf74a29(0x1be)]-0x1];last['commands']=[{'command':a173_0xf74a29(0x1a3),'description':a173_0xf74a29(0x1ab),'tag':a173_0xf74a29(0x18a)+runDefinition[a173_0xf74a29(0x1ac)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a173_0xf74a29(0x19d),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a173_0xf74a29(0x16e),'rabetbase\x20bff\x20create'],[a173_0xf74a29(0x1a6),a173_0xf74a29(0x1ce)],[a173_0xf74a29(0x184),a173_0xf74a29(0x1a1)],['project:init',a173_0xf74a29(0x1a0)],[a173_0xf74a29(0x1bd),a173_0xf74a29(0x178)],['skill:install','rabetbase\x20cli-skill\x20install'],['skills:',a173_0xf74a29(0x178)],[a173_0xf74a29(0x1c9),a173_0xf74a29(0x178)],[a173_0xf74a29(0x188),a173_0xf74a29(0x196)],[a173_0xf74a29(0x17d),'rabetbase\x20workspace\x20use\x20--app\x20<name>'],['app:add','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],['app:remove',a173_0xf74a29(0x1cf)],['knowledge-base:list',a173_0xf74a29(0x190)],['knowledge-base:detail',a173_0xf74a29(0x17f)],[a173_0xf74a29(0x1b0),a173_0xf74a29(0x185)],[a173_0xf74a29(0x1aa),a173_0xf74a29(0x1ae)],[a173_0xf74a29(0x1a5),'rabetbase\x20kb\x20delete'],[a173_0xf74a29(0x176),a173_0xf74a29(0x1b3)],[a173_0xf74a29(0x1ad),a173_0xf74a29(0x18c)],['page:react-create',a173_0xf74a29(0x1c6)],[a173_0xf74a29(0x189),a173_0xf74a29(0x1c6)],[a173_0xf74a29(0x17e),a173_0xf74a29(0x171)],[a173_0xf74a29(0x1ba),'rabetbase\x20page\x20custom-detail'],[a173_0xf74a29(0x1c7),a173_0xf74a29(0x1c8)],[a173_0xf74a29(0x1b7),a173_0xf74a29(0x187)]]),REMOVED_COMMAND_HINTS=new Map([[a173_0xf74a29(0x1c5),a173_0xf74a29(0x199)],[a173_0xf74a29(0x183),a173_0xf74a29(0x199)],[a173_0xf74a29(0x1b2),a173_0xf74a29(0x199)],[a173_0xf74a29(0x1bc),a173_0xf74a29(0x199)],['permit:role-apis-set','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a173_0xf74a29(0x1a4),a173_0xf74a29(0x19e)],['start','rabetbase\x20run\x20start'],[a173_0xf74a29(0x198),a173_0xf74a29(0x175)],['preview',a173_0xf74a29(0x1bb)],[a173_0xf74a29(0x1c4),a173_0xf74a29(0x1b9)]]);export function resolveRemovedCommand(_0x18c74b,_0x4b6793){const _0x46ec76=a173_0xf74a29;if(!_0x18c74b)return undefined;const _0x5eea88=REMOVED_COMMAND_REPLACEMENTS['get'](_0x18c74b+':'+(_0x4b6793??'')),_0x333b25=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x46ec76(0x167)](_0x18c74b),_0xe865af=_0x5eea88??_0x333b25,_0x421104=REMOVED_COMMAND_HINTS['get'](_0x18c74b+':'+(_0x4b6793??''));if(!_0xe865af&&!_0x421104)return undefined;const _0x3aa395=_0x333b25?_0x18c74b:_0x4b6793?_0x18c74b+'\x20'+_0x4b6793:_0x18c74b;return{'command':_0x3aa395,'message':_0x46ec76(0x1c2)+_0x3aa395+_0x46ec76(0x174),'hint':_0x421104??_0x46ec76(0x168)+_0xe865af+'`\x20instead.'};}export function findDefinition(_0x4b93d1,_0x970d89){const _0x130c29=a173_0xf74a29;return definitions[_0x130c29(0x167)](_0x4b93d1+':'+_0x970d89);}export function isKnownService(_0x5828d1){const _0x274915=a173_0xf74a29;return serviceByName[_0x274915(0x197)](_0x5828d1);}export function isDeclarativeService(_0xd45d2f){const _0x98f5c8=a173_0xf74a29;return serviceGroups['has'](_0xd45d2f)||serviceByName[_0x98f5c8(0x167)](_0xd45d2f)?.[_0x98f5c8(0x1c1)]!==undefined;}export function getServiceEntry(_0x4d3640){return serviceByName['get'](_0x4d3640);}export function getLegacyHandler(_0x167a3d,_0x336cd9){return undefined;}export function getAllDefinitions(){const _0x32d221=a173_0xf74a29;return Array['from'](definitions[_0x32d221(0x1b8)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a174_0x47ac46=a174_0x1581;(function(_0x4b25e0,_0xac250c){const _0x4a97a=a174_0x1581,_0x46bc32=_0x4b25e0();while(!![]){try{const _0x36f823=-parseInt(_0x4a97a(0x80))/0x1+parseInt(_0x4a97a(0x6f))/0x2*(-parseInt(_0x4a97a(0x6a))/0x3)+parseInt(_0x4a97a(0x7a))/0x4*(parseInt(_0x4a97a(0x74))/0x5)+-parseInt(_0x4a97a(0x71))/0x6*(-parseInt(_0x4a97a(0x7c))/0x7)+parseInt(_0x4a97a(0x76))/0x8+parseInt(_0x4a97a(0x7e))/0x9*(parseInt(_0x4a97a(0x7f))/0xa)+-parseInt(_0x4a97a(0x77))/0xb;if(_0x36f823===_0xac250c)break;else _0x46bc32['push'](_0x46bc32['shift']());}catch(_0x595ce1){_0x46bc32['push'](_0x46bc32['shift']());}}}(a174_0x580a,0xeb52b));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':a174_0x47ac46(0x75),'command':a174_0x47ac46(0x79),'description':a174_0x47ac46(0x6b),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0xbd369){const _0x60861a=a174_0x47ac46,_0x522b79=_0xbd369[_0x60861a(0x6e)]('id'),_0x550b0c=await getRoleById(_0xbd369[_0x60861a(0x7d)],_0x522b79);return assertCustomRole(_0x550b0c,'delete'),asDryRunResult({'scope':_0x60861a(0x69),'operation':_0x60861a(0x79),'selector':{'appCode':_0xbd369[_0x60861a(0x7d)],'roleId':_0x522b79,'roleName':_0x550b0c['roleName']},'before':projectRole(_0x550b0c),'after':null,'dryRun':!![],'backend':{'method':_0x60861a(0x72),'path':DELETE_PATH},'warnings':_0x550b0c[_0x60861a(0x78)]>0x0?[_0x60861a(0x73)+_0x550b0c['userCount']+_0x60861a(0x7b)]:[]},{'method':_0x60861a(0x72),'url':DELETE_PATH});},async 'execute'(_0x26102f){const _0x4646ef=a174_0x47ac46,_0x3f6f87=_0x26102f[_0x4646ef(0x6e)]('id'),_0x38de03=await getRoleById(_0x26102f[_0x4646ef(0x7d)],_0x3f6f87);return assertCustomRole(_0x38de03,'delete'),await deleteAppRole(_0x3f6f87),{'ok':!![],'data':{'scope':_0x4646ef(0x69),'operation':'delete','selector':{'appCode':_0x26102f[_0x4646ef(0x7d)],'roleId':_0x3f6f87,'roleName':_0x38de03[_0x4646ef(0x6c)]},'before':projectRole(_0x38de03),'after':null,'dryRun':![],'backend':{'method':_0x4646ef(0x72),'path':DELETE_PATH},'warnings':[]},'message':_0x4646ef(0x70)+_0x38de03[_0x4646ef(0x6c)]+_0x4646ef(0x6d)+_0x3f6f87+')'};}};function a174_0x1581(_0x2a2356,_0x3ea3c7){_0x2a2356=_0x2a2356-0x69;const _0x580ad7=a174_0x580a();let _0x158105=_0x580ad7[_0x2a2356];return _0x158105;}function a174_0x580a(){const _0x233b54=['role','6757104ZrGBov','29278051Swehzs','userCount','delete','5276tVKAWB','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','511pTvTbR','appCode','18nJDETO','289580NWhwjC','144956edYHXU','dev','81yVsNvv','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','roleName','\x20(id=','num','298JJGSpR','Deleted\x20role\x20','119292QYjCqi','POST','Role\x20still\x20has\x20','5385WFcDMd'];a174_0x580a=function(){return _0x233b54;};return a174_0x580a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a175_0x2acc61=a175_0x10fd;function a175_0x4645(){const _0x15d26d=['Role\x20','appCode','4GBmVGk','246695gfEFhD','2419544rswtTr','roleName','1680xUtVtA','read','Show\x20a\x20single\x20role\x27s\x20detail','24896ymRHju','dev','roleType','850245WSfjBT','627985pSviVN','num','4836429GTihAP','6228qvljUo'];a175_0x4645=function(){return _0x15d26d;};return a175_0x4645();}function a175_0x10fd(_0x1802e3,_0x42ae2d){_0x1802e3=_0x1802e3-0x1ef;const _0x46457b=a175_0x4645();let _0x10fdb0=_0x46457b[_0x1802e3];return _0x10fdb0;}(function(_0x32ae21,_0x574981){const _0x339a97=a175_0x10fd,_0x15e5cc=_0x32ae21();while(!![]){try{const _0x3bc57f=-parseInt(_0x339a97(0x1f1))/0x1+parseInt(_0x339a97(0x1f7))/0x2+-parseInt(_0x339a97(0x1fa))/0x3*(-parseInt(_0x339a97(0x1f0))/0x4)+parseInt(_0x339a97(0x1fb))/0x5+-parseInt(_0x339a97(0x1fe))/0x6*(-parseInt(_0x339a97(0x1f4))/0x7)+parseInt(_0x339a97(0x1f2))/0x8+-parseInt(_0x339a97(0x1fd))/0x9;if(_0x3bc57f===_0x574981)break;else _0x15e5cc['push'](_0x15e5cc['shift']());}catch(_0x7f6f23){_0x15e5cc['push'](_0x15e5cc['shift']());}}}(a175_0x4645,0x2e213));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':'role','command':'detail','description':a175_0x2acc61(0x1f6),'risk':a175_0x2acc61(0x1f5),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1ea7c3){const _0x3b81d1=a175_0x2acc61,_0xc6fff=_0x1ea7c3[_0x3b81d1(0x1fc)]('id'),_0x251192=await getRoleById(_0x1ea7c3[_0x3b81d1(0x1ef)],_0xc6fff);return{'ok':!![],'data':{'scope':_0x3b81d1(0x1f8),'role':projectRole(_0x251192)},'message':_0x3b81d1(0x1ff)+_0x251192[_0x3b81d1(0x1f3)]+'\x20('+_0x251192[_0x3b81d1(0x1f9)]+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3cc278,_0x1e45da){const _0x1c1105=a176_0x5386,_0x24e92b=_0x3cc278();while(!![]){try{const _0x4987ea=-parseInt(_0x1c1105(0x9a))/0x1*(parseInt(_0x1c1105(0x9d))/0x2)+-parseInt(_0x1c1105(0x9b))/0x3+-parseInt(_0x1c1105(0xa1))/0x4+-parseInt(_0x1c1105(0xa0))/0x5*(-parseInt(_0x1c1105(0x9f))/0x6)+-parseInt(_0x1c1105(0x98))/0x7*(parseInt(_0x1c1105(0x99))/0x8)+parseInt(_0x1c1105(0xa2))/0x9+-parseInt(_0x1c1105(0x9c))/0xa*(-parseInt(_0x1c1105(0x9e))/0xb);if(_0x4987ea===_0x1e45da)break;else _0x24e92b['push'](_0x24e92b['shift']());}catch(_0x6d1a95){_0x24e92b['push'](_0x24e92b['shift']());}}}(a176_0xd06d,0x18ffd));import{roleList}from'../../commands/role/list.js';function a176_0xd06d(){const _0x33d3d6=['10nHZVMk','434LzRIlG','3464065fZDPjY','111486uVLSZf','5KZTBsg','144140BtTBpw','1319481hEFrNc','1087247SSVpvZ','8nOtgRe','461YPwqwQ','258945AHTQLX'];a176_0xd06d=function(){return _0x33d3d6;};return a176_0xd06d();}import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';function a176_0x5386(_0x486f6d,_0x4d2cda){_0x486f6d=_0x486f6d-0x98;const _0xd06da4=a176_0xd06d();let _0x53860b=_0xd06da4[_0x486f6d];return _0x53860b;}import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a177_0x5ebf94=a177_0x2364;(function(_0x3aee23,_0x5b232d){const _0x2559fd=a177_0x2364,_0x4d51dc=_0x3aee23();while(!![]){try{const _0x52a3d6=parseInt(_0x2559fd(0xfc))/0x1+-parseInt(_0x2559fd(0xe3))/0x2*(parseInt(_0x2559fd(0xe8))/0x3)+-parseInt(_0x2559fd(0xea))/0x4+parseInt(_0x2559fd(0xfb))/0x5*(-parseInt(_0x2559fd(0xf2))/0x6)+-parseInt(_0x2559fd(0xfe))/0x7+-parseInt(_0x2559fd(0xdc))/0x8*(parseInt(_0x2559fd(0xda))/0x9)+parseInt(_0x2559fd(0xe4))/0xa;if(_0x52a3d6===_0x5b232d)break;else _0x4d51dc['push'](_0x4d51dc['shift']());}catch(_0x3fa02c){_0x4d51dc['push'](_0x4d51dc['shift']());}}}(a177_0xd28d,0xdae2b));function a177_0xd28d(){const _0x4eb1f6=['--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','trim','roleType','filter','7889106vxmhrT','dev','read','Filter\x20by\x20role\x20type','string','num','pagesize','Found\x20','DEV','5qIklMZ','139727SzVuzB','appCode','1290121hhogdm','role','Use\x20one\x20of:\x20','number','4119912aICtQb','includes','8DCUvsd','Page\x20size\x20(1-100)','type','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','join','list','6soimud','59397260HNbLOD','length','str','map','1682730OaZNbt','toUpperCase','6172984vUWBul','validation','Page\x20index\x20(1-based)','page'];a177_0xd28d=function(){return _0x4eb1f6;};return a177_0xd28d();}import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a177_0x2364(_0x29beee,_0x427b5e){_0x29beee=_0x29beee-0xd8;const _0xd28d40=a177_0xd28d();let _0x236446=_0xd28d40[_0x29beee];return _0x236446;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=['ADMIN',a177_0x5ebf94(0xfa),'OWNER','CUSTOM'];export const roleList={'service':a177_0x5ebf94(0xff),'command':a177_0x5ebf94(0xe2),'description':a177_0x5ebf94(0xdf),'risk':a177_0x5ebf94(0xf4),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a177_0x5ebf94(0xf6),'required':![],'description':a177_0x5ebf94(0xf5),'enum':ROLE_TYPES},{'name':a177_0x5ebf94(0xed),'type':a177_0x5ebf94(0xd9),'description':a177_0x5ebf94(0xec),'default':0x1},{'name':'pagesize','type':a177_0x5ebf94(0xd9),'description':a177_0x5ebf94(0xdd),'default':0x64}],async 'validate'(_0x4d110a){const _0x1a0ff5=a177_0x5ebf94,_0x11a5c2=_0x4d110a[_0x1a0ff5(0xe6)](_0x1a0ff5(0xde))[_0x1a0ff5(0xef)]();if(_0x11a5c2&&!ROLE_TYPES[_0x1a0ff5(0xdb)](_0x11a5c2[_0x1a0ff5(0xe9)]()))throw CliErrors[_0x1a0ff5(0xeb)]('Invalid\x20--type\x20\x22'+_0x11a5c2+'\x22.',_0x1a0ff5(0xd8)+ROLE_TYPES[_0x1a0ff5(0xe1)](',\x20')+'.');const _0x391d46=_0x4d110a[_0x1a0ff5(0xf7)](_0x1a0ff5(0xed),0x1),_0x589b41=_0x4d110a[_0x1a0ff5(0xf7)](_0x1a0ff5(0xf8),0x64);if(_0x391d46<0x1)throw CliErrors[_0x1a0ff5(0xeb)](_0x1a0ff5(0xe0));if(_0x589b41<0x1||_0x589b41>0x64)throw CliErrors[_0x1a0ff5(0xeb)](_0x1a0ff5(0xee));},async 'execute'(_0x46bf44){const _0x5b34fc=a177_0x5ebf94,_0x40c601=_0x46bf44['num'](_0x5b34fc(0xed),0x1)||0x1,_0xcadc80=_0x46bf44[_0x5b34fc(0xf7)](_0x5b34fc(0xf8),0x64)||0x64,_0x24b939=_0x46bf44[_0x5b34fc(0xe6)](_0x5b34fc(0xde))[_0x5b34fc(0xef)]()[_0x5b34fc(0xe9)](),{items:_0x11c144,paging:_0x10f7eb}=await listAppRoles(_0x46bf44[_0x5b34fc(0xfd)],{'currentPage':_0x40c601,'pageSize':_0xcadc80}),_0x3e6f4c=_0x24b939?_0x11c144[_0x5b34fc(0xf1)](_0xbadb89=>_0xbadb89[_0x5b34fc(0xf0)]===_0x24b939):_0x11c144,_0x4a86b5=_0x3e6f4c[_0x5b34fc(0xe7)](projectRole);return{'ok':!![],'data':{'scope':_0x5b34fc(0xf3),'roles':_0x4a86b5,'paging':_0x10f7eb},'message':_0x5b34fc(0xf9)+_0x4a86b5[_0x5b34fc(0xe5)]+'\x20role(s)'};}};
|