@lovrabet/rabetbase-cli 2.4.4-beta.1 → 2.4.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/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.d.ts +1 -0
- 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/{permit/index.d.ts → dataset/business-groups.d.ts} +1 -1
- package/lib/commands/dataset/business-groups.js +1 -0
- 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.d.ts +15 -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.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-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/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/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/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.d.ts +15 -17
- 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.d.ts +70 -79
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +1 -0
- 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 +18 -24
- package/skills/rabetbase/guides/database-connection-workflow.md +6 -2
- package/skills/rabetbase/references/rabetbase-dataset-business-groups.md +28 -0
- package/skills/rabetbase/references/rabetbase-dataset-delete.md +7 -5
- package/skills/rabetbase/references/rabetbase-dataset-list.md +6 -6
- package/skills/rabetbase/references/rabetbase-dataset-restore.md +5 -5
- package/skills/rabetbase/references/rabetbase-db-create.md +3 -0
- package/skills/rabetbase/references/rabetbase-db-delete.md +10 -2
- package/skills/rabetbase/references/rabetbase-db-detail.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-list.md +3 -2
- package/skills/rabetbase/references/rabetbase-db-update.md +4 -2
- package/skills/rabetbase/references/rabetbase-role-list.md +9 -17
- package/skills/rabetbase/references/rabetbase-role-user-add.md +44 -16
- package/skills/rabetbase/references/rabetbase-role-user-resolve.md +2 -2
- package/skills/rabetbase.manifest.json +4 -7
- package/lib/commands/permit/index.js +0 -1
- package/lib/commands/permit/page-get.d.ts +0 -2
- package/lib/commands/permit/page-get.js +0 -1
- package/lib/commands/permit/page-set.d.ts +0 -2
- package/lib/commands/permit/page-set.js +0 -1
- package/lib/commands/permit/role-apis-set.d.ts +0 -2
- package/lib/commands/permit/role-apis-set.js +0 -1
- package/lib/commands/permit/role-menus-set.d.ts +0 -2
- package/lib/commands/permit/role-menus-set.js +0 -1
- package/lib/commands/permit/role-menus.d.ts +0 -2
- package/lib/commands/permit/role-menus.js +0 -1
- package/lib/commands/permit/shared.d.ts +0 -74
- package/lib/commands/permit/shared.js +0 -1
- package/lib/commands/role/create.d.ts +0 -2
- package/lib/commands/role/create.js +0 -1
- package/skills/rabetbase/guides/role-permit-workflow.md +0 -127
- package/skills/rabetbase/references/rabetbase-permit-page-set.md +0 -69
- package/skills/rabetbase/references/rabetbase-permit-role-apis-set.md +0 -53
- package/skills/rabetbase/references/rabetbase-permit-role-menus-set.md +0 -57
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a163_0x23a0a1=a163_0x3b0f;function a163_0x3b0f(_0x119af0,_0x1f5618){_0x119af0=_0x119af0-0x67;const _0x16dc3d=a163_0x16dc();let _0x3b0fc2=_0x16dc3d[_0x119af0];return _0x3b0fc2;}(function(_0x305542,_0x4e72b2){const _0x28ea1c=a163_0x3b0f,_0x2865a4=_0x305542();while(!![]){try{const _0x20b50e=parseInt(_0x28ea1c(0xa0))/0x1*(-parseInt(_0x28ea1c(0x71))/0x2)+parseInt(_0x28ea1c(0x90))/0x3*(-parseInt(_0x28ea1c(0x70))/0x4)+parseInt(_0x28ea1c(0x73))/0x5+parseInt(_0x28ea1c(0x6e))/0x6*(parseInt(_0x28ea1c(0xa5))/0x7)+-parseInt(_0x28ea1c(0xb6))/0x8*(parseInt(_0x28ea1c(0xb7))/0x9)+parseInt(_0x28ea1c(0x84))/0xa+-parseInt(_0x28ea1c(0xb2))/0xb*(-parseInt(_0x28ea1c(0x8e))/0xc);if(_0x20b50e===_0x4e72b2)break;else _0x2865a4['push'](_0x2865a4['shift']());}catch(_0x164f54){_0x2865a4['push'](_0x2865a4['shift']());}}}(a163_0x16dc,0x962e2));import{createHash}from'node:crypto';function a163_0x16dc(){const _0x4cae4d=['string','releaseLock','ENOENT','validation','dev','ino','readdir','Project\x20directory\x20already\x20exists:\x20','cdn','package.json','isFinite','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','isDirectory','163561kDfVZD','toLowerCase','trim','code','body','21KDzENT','hex','basename','dirname','includes','resolving','parse','object',',\x20received\x20','Use\x20a\x20different\x20project\x20name.','test','abort','content-length','13750waTmAO','sha256:','sub-app-react-demo','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','32IHyjtv','2764404dDiLQU','lstat','length','read','posix','push','EEXIST','join','get','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','application/zip','signal','headers','1668366xonGpd','projectTemplate','28JQeNtD','2rJuFnu','update','3298255qRelnF','protocol','verifying','project','origin','version','pathname','cancel','Project\x20template\x20package.json\x20is\x20invalid.','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','extracting','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','mkdir','status','https:','utf8','resolve','5088620vNkQQA','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','startsWith','from','concat','mkdtemp','size','readFile','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','name','9156JnYwRv','arrayBuffer','406767Aaqdxh','byteLength','sha256'];a163_0x16dc=function(){return _0x4cae4d;};return a163_0x16dc();}import a163_0x14fd7b from'node:fs/promises';import a163_0x170185 from'node:path';import{PROJECT_TEMPLATE_ASSET_BASE_URL}from'../../../constant/cdn.js';import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';import{getRabetbaseCdnConfig}from'../../../utils/cli-version-policy.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID=a163_0x23a0a1(0xb4),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x4de89a){const _0x31a026=a163_0x23a0a1;return typeof _0x4de89a===_0x31a026(0x93)&&_0x4de89a[_0x31a026(0xa2)]()?_0x4de89a[_0x31a026(0xa2)]():null;}function parseDescriptor(_0x297513){const _0x46d2ca=a163_0x23a0a1;if(!_0x297513||typeof _0x297513!=='object')throw new Error(_0x46d2ca(0x7e)+TEMPLATE_ID+'\x22.');const _0x2232d1=_0x297513,_0x3a14da=nonEmptyString(_0x2232d1['version']),_0x158a1f=nonEmptyString(_0x2232d1[_0x46d2ca(0x8d)]),_0x384624=nonEmptyString(_0x2232d1['sha256'])?.[_0x46d2ca(0xa1)](),_0x17c9f1=_0x2232d1[_0x46d2ca(0x8a)];if(!_0x3a14da||!_0x158a1f||_0x158a1f!==a163_0x170185[_0x46d2ca(0xbb)][_0x46d2ca(0xa7)](_0x158a1f)||_0x158a1f[_0x46d2ca(0xa9)]('\x5c')||!_0x384624||!/^sha256:[a-f0-9]{64}$/[_0x46d2ca(0xaf)](_0x384624)||typeof _0x17c9f1!=='number'||!Number['isSafeInteger'](_0x17c9f1)||_0x17c9f1<=0x0||_0x17c9f1>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22'+TEMPLATE_ID+'\x22.');return{'version':_0x3a14da,'name':_0x158a1f,'sha256':_0x384624,'size':_0x17c9f1};}async function fetchWithTimeout(_0x421eba,_0x31439a,_0x356eab,_0x6c35fd){const _0x417d96=a163_0x23a0a1,_0xd8aebd=new AbortController(),_0x259370=setTimeout(()=>_0xd8aebd[_0x417d96(0xb0)](),_0x31439a);try{const _0x5ca25a=await fetch(_0x421eba,{'headers':{'Accept':_0x356eab},'signal':_0xd8aebd[_0x417d96(0x6c)]});return await _0x6c35fd(_0x5ca25a);}finally{clearTimeout(_0x259370);}}async function fetchTemplateDescriptor(){const _0x3444e3=a163_0x23a0a1,_0x675b17=await getRabetbaseCdnConfig();if(!_0x675b17)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');return parseDescriptor(_0x675b17[_0x3444e3(0x6f)]);}function resolveArchiveUrl(_0x13594f){const _0x555915=a163_0x23a0a1,_0x15bdae=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x3bbb2e=new URL(_0x13594f,_0x15bdae);if(_0x3bbb2e[_0x555915(0x74)]!==_0x555915(0x81)||_0x3bbb2e[_0x555915(0x77)]!==_0x15bdae['origin']||!_0x3bbb2e['pathname'][_0x555915(0x86)](_0x15bdae[_0x555915(0x79)]))throw new Error(_0x555915(0x6a));return _0x3bbb2e['href'];}async function readResponseBytes(_0x52516a,_0x5e328c){const _0x279144=a163_0x23a0a1;if(!_0x52516a['body']){const _0x178086=Buffer[_0x279144(0x87)](await _0x52516a[_0x279144(0x8f)]());if(_0x178086[_0x279144(0xb9)]>_0x5e328c)throw new Error(_0x279144(0x85));return _0x178086;}const _0x3f8f9d=_0x52516a[_0x279144(0xa4)]['getReader'](),_0x47b00b=[];let _0x45f73e=0x0;try{while(!![]){const {done:_0x20be86,value:_0x36d669}=await _0x3f8f9d[_0x279144(0xba)]();if(_0x20be86)break;_0x45f73e+=_0x36d669[_0x279144(0x91)];if(_0x45f73e>_0x5e328c){await _0x3f8f9d[_0x279144(0x7a)]();throw new Error(_0x279144(0x85));}_0x47b00b[_0x279144(0xbc)](Buffer[_0x279144(0x87)](_0x36d669));}}finally{_0x3f8f9d[_0x279144(0x94)]();}return Buffer[_0x279144(0x88)](_0x47b00b,_0x45f73e);}async function downloadArchive(_0x4b1655,_0x4c2c43,_0x17caf4){const _0x3b28de=a163_0x23a0a1,_0x2b25d6=await fetchWithTimeout(resolveArchiveUrl(_0x4b1655[_0x3b28de(0x8d)]),ARCHIVE_TIMEOUT_MS,_0x3b28de(0x6b),async _0x381f87=>{const _0x226c83=_0x3b28de;if(!_0x381f87['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x381f87[_0x226c83(0x80)]+'.');const _0x58a573=Number(_0x381f87[_0x226c83(0x6d)][_0x226c83(0x69)](_0x226c83(0xb1)));if(Number[_0x226c83(0x9d)](_0x58a573)&&_0x58a573>MAX_ARCHIVE_SIZE)throw new Error(_0x226c83(0x9e));return readResponseBytes(_0x381f87,_0x4b1655[_0x226c83(0x8a)]);});if(_0x2b25d6['length']!==_0x4b1655[_0x3b28de(0x8a)])throw new Error(_0x3b28de(0x8c)+_0x4b1655[_0x3b28de(0x8a)]+_0x3b28de(0xad)+_0x2b25d6[_0x3b28de(0xb9)]+'.');_0x17caf4?.(_0x3b28de(0x75));const _0x5e5791=_0x3b28de(0xb3)+createHash(_0x3b28de(0x92))[_0x3b28de(0x72)](_0x2b25d6)['digest'](_0x3b28de(0xa6));if(_0x5e5791!==_0x4b1655[_0x3b28de(0x92)])throw new Error('CDN\x20project\x20template\x20checksum\x20verification\x20failed.');await a163_0x14fd7b['writeFile'](_0x4c2c43,_0x2b25d6,{'flag':'wx'});}async function assertTemplateRoot(_0x5256a2){const _0x583c71=a163_0x23a0a1,_0x2944b0=a163_0x170185['join'](_0x5256a2,_0x583c71(0x9c)),_0x1699ec=JSON[_0x583c71(0xab)](await a163_0x14fd7b[_0x583c71(0x8b)](_0x2944b0,_0x583c71(0x82)));if(!_0x1699ec||typeof _0x1699ec!==_0x583c71(0xac))throw new Error(_0x583c71(0x7b));}async function readDirectoryIdentity(_0x5b55a9){const _0x14ef50=a163_0x23a0a1;try{const _0xdf9e81=await a163_0x14fd7b[_0x14ef50(0xb8)](_0x5b55a9);if(!_0xdf9e81[_0x14ef50(0x9f)]())return null;return{'dev':_0xdf9e81[_0x14ef50(0x97)],'ino':_0xdf9e81[_0x14ef50(0x98)]};}catch{return null;}}async function commitStagedProject(_0x574c03,_0x48d9e5){const _0x1e055e=a163_0x23a0a1;await a163_0x14fd7b[_0x1e055e(0x7f)](_0x48d9e5);const _0x5396a8=await readDirectoryIdentity(_0x48d9e5);if(!_0x5396a8)throw new Error('Unable\x20to\x20claim\x20the\x20project\x20directory.');try{for(const _0x2d2ea1 of await a163_0x14fd7b[_0x1e055e(0x99)](_0x574c03)){await a163_0x14fd7b['rename'](a163_0x170185[_0x1e055e(0x68)](_0x574c03,_0x2d2ea1),a163_0x170185[_0x1e055e(0x68)](_0x48d9e5,_0x2d2ea1));}}catch(_0x152d81){const _0x5b107f=await readDirectoryIdentity(_0x48d9e5);_0x5b107f?.[_0x1e055e(0x97)]===_0x5396a8[_0x1e055e(0x97)]&&_0x5b107f['ino']===_0x5396a8[_0x1e055e(0x98)]&&await a163_0x14fd7b['rm'](_0x48d9e5,{'recursive':!![],'force':!![]});throw _0x152d81;}}export async function materializeProjectTemplate(_0x4031ba,_0x563094){const _0x161e58=a163_0x23a0a1,_0x3bdc6a=a163_0x170185[_0x161e58(0x83)](_0x4031ba),_0x3ac9c3=a163_0x170185[_0x161e58(0xa8)](_0x3bdc6a);try{await a163_0x14fd7b['lstat'](_0x3bdc6a);throw new Error(_0x161e58(0x9a)+_0x3bdc6a);}catch(_0x434a36){if(_0x434a36[_0x161e58(0xa3)]!==_0x161e58(0x95))throw _0x434a36;}const _0x15cf72=await a163_0x14fd7b[_0x161e58(0x89)](a163_0x170185[_0x161e58(0x68)](_0x3ac9c3,'.rabetbase-create-')),_0x1250b1=a163_0x170185[_0x161e58(0x68)](_0x15cf72,_0x161e58(0x76)),_0x436dc7=a163_0x170185[_0x161e58(0x68)](_0x15cf72,'template.zip');try{try{_0x563094?.(_0x161e58(0xaa));const _0x2f73de=await fetchTemplateDescriptor();return _0x563094?.('downloading'),await downloadArchive(_0x2f73de,_0x436dc7,_0x563094),_0x563094?.(_0x161e58(0x7d)),await extractProjectTemplateArchive(_0x436dc7,_0x1250b1),await assertTemplateRoot(_0x1250b1),await commitStagedProject(_0x1250b1,_0x3bdc6a),{'source':_0x161e58(0x9b),'version':_0x2f73de[_0x161e58(0x78)]};}catch(_0x21ac5c){if(_0x21ac5c[_0x161e58(0xa3)]===_0x161e58(0x67))throw CliErrors['validation'](_0x161e58(0x9a)+_0x3bdc6a,_0x161e58(0xae));const _0x560493=_0x21ac5c instanceof Error?_0x21ac5c['message']:String(_0x21ac5c);throw CliErrors[_0x161e58(0x96)](_0x161e58(0xb5),_0x161e58(0x7c)+_0x560493);}}finally{await a163_0x14fd7b['rm'](_0x15cf72,{'recursive':!![],'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x535357,_0x4df750){const _0x394962=a164_0x3764,_0x2edbfc=_0x535357();while(!![]){try{const _0x90ff9e=parseInt(_0x394962(0x199))/0x1*(-parseInt(_0x394962(0x18e))/0x2)+parseInt(_0x394962(0x18f))/0x3*(-parseInt(_0x394962(0x190))/0x4)+parseInt(_0x394962(0x198))/0x5*(parseInt(_0x394962(0x19d))/0x6)+parseInt(_0x394962(0x192))/0x7*(-parseInt(_0x394962(0x196))/0x8)+-parseInt(_0x394962(0x19a))/0x9*(parseInt(_0x394962(0x195))/0xa)+parseInt(_0x394962(0x197))/0xb*(parseInt(_0x394962(0x19e))/0xc)+parseInt(_0x394962(0x18c))/0xd*(parseInt(_0x394962(0x191))/0xe);if(_0x90ff9e===_0x4df750)break;else _0x2edbfc['push'](_0x2edbfc['shift']());}catch(_0x3f3f27){_0x2edbfc['push'](_0x2edbfc['shift']());}}}(a164_0x29f9,0x6a5ca));function a164_0x29f9(){const _0x2a9729=['42ABYfsK','84aHDarn','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','validation','890jBbqSw','120928wqLtjD','11pVfqds','18785OPVCwt','13ibfqUV','39519PnQesu','\x22\x20is\x20reserved\x20on\x20Windows','trim','294OfYeSq','5612988OxIXGg','\x20characters','Project\x20name\x20\x22','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','Project\x20name\x20cannot\x20be\x20empty','length','2975167Bnpyge','test','6002fXTqPy','3usvQZh','1166228nMbTVp'];a164_0x29f9=function(){return _0x2a9729;};return a164_0x29f9();}import{CliErrors}from'../../../errors.js';function a164_0x3764(_0x51f136,_0x2cf68a){_0x51f136=_0x51f136-0x188;const _0x29f957=a164_0x29f9();let _0x376485=_0x29f957[_0x51f136];return _0x376485;}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;export function getProjectNameValidationError(_0x528dc5){const _0x1ca7c5=a164_0x3764,_0x4df251=_0x528dc5[_0x1ca7c5(0x19c)]();if(!_0x4df251)return _0x1ca7c5(0x18a);if(_0x4df251[_0x1ca7c5(0x18b)]>MAX_PROJECT_NAME_LENGTH)return'Project\x20name\x20cannot\x20exceed\x20'+MAX_PROJECT_NAME_LENGTH+_0x1ca7c5(0x19f);if(!PROJECT_NAME_PATTERN[_0x1ca7c5(0x18d)](_0x4df251))return _0x1ca7c5(0x193);if(WINDOWS_RESERVED_NAME[_0x1ca7c5(0x18d)](_0x4df251))return _0x1ca7c5(0x188)+_0x4df251+_0x1ca7c5(0x19b);return null;}export function validateProjectName(_0x36d3f9){const _0x177aed=a164_0x3764,_0x5d876e=_0x36d3f9[_0x177aed(0x19c)](),_0x21b368=getProjectNameValidationError(_0x5d876e);if(_0x21b368)throw CliErrors[_0x177aed(0x194)](_0x21b368,_0x177aed(0x189));return _0x5d876e;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15eeb6,_0x4dd7d3){const _0x1a0cac=a165_0x1fbc,_0x18317c=_0x15eeb6();while(!![]){try{const _0x2e8141=parseInt(_0x1a0cac(0x161))/0x1+parseInt(_0x1a0cac(0x150))/0x2*(parseInt(_0x1a0cac(0x154))/0x3)+-parseInt(_0x1a0cac(0x14c))/0x4+-parseInt(_0x1a0cac(0x141))/0x5+-parseInt(_0x1a0cac(0x156))/0x6+-parseInt(_0x1a0cac(0x13e))/0x7+-parseInt(_0x1a0cac(0x155))/0x8*(-parseInt(_0x1a0cac(0x15c))/0x9);if(_0x2e8141===_0x4dd7d3)break;else _0x18317c['push'](_0x18317c['shift']());}catch(_0x1b21b8){_0x18317c['push'](_0x18317c['shift']());}}}(a165_0x2529,0x86284));import{createWriteStream}from'node:fs';import a165_0x118f06 from'node:fs/promises';function a165_0x2529(){const _0x5a199e=['27322iidnXU','endsWith','readEntry','uncompressedSize','141uVZAXQ','16271336BFOQTb','4292670XWwAEL','Case-conflicting\x20ZIP\x20entry\x20path:\x20','join','split','test','fileName','9HpqZxU','isEncrypted','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','get','sep','179394aZXJsg','en-US','open','openReadStream','startsWith','1699187EASNgg','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','end','2866625zZZgoJ','add','dirname','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','toLocaleLowerCase','entry','mkdir','error','externalFileAttributes','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','has','3097436xLRupM','catch','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','\x20entries.'];a165_0x2529=function(){return _0x5a199e;};return a165_0x2529();}function a165_0x1fbc(_0x2d8a62,_0x2be1aa){_0x2d8a62=_0x2d8a62-0x13e;const _0x2529fc=a165_0x2529();let _0x1fbc8e=_0x2529fc[_0x2d8a62];return _0x1fbc8e;}import a165_0x3ecd4d from'node:path';import{pipeline}from'node:stream/promises';import a165_0x223c4b from'yauzl';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(_0x45c898){return new Promise((_0x140911,_0x44a3ac)=>{const _0x484c43=a165_0x1fbc;a165_0x223c4b[_0x484c43(0x163)](_0x45c898,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x2779b0,_0x48e314)=>{if(_0x2779b0||!_0x48e314){_0x44a3ac(_0x2779b0||new Error('Unable\x20to\x20open\x20project\x20template\x20archive.'));return;}_0x140911(_0x48e314);});});}function openEntryStream(_0x37af53,_0x596799){return new Promise((_0x42b3b8,_0x213ac5)=>{const _0x3438f6=a165_0x1fbc;_0x37af53[_0x3438f6(0x164)](_0x596799,(_0x1508e2,_0x131ee3)=>{if(_0x1508e2||!_0x131ee3){_0x213ac5(_0x1508e2||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0x596799['fileName']));return;}_0x42b3b8(_0x131ee3);});});}function validateEntryPath(_0x143d42){const _0xf0041c=a165_0x1fbc,_0x43471f=_0x143d42['replace'](/\\/g,'/'),_0x4b90d8=_0x43471f['endsWith']('/'),_0x5f2bbb=_0x4b90d8?_0x43471f['slice'](0x0,-0x1):_0x43471f;if(!_0x5f2bbb||_0x43471f[_0xf0041c(0x165)]('/')||/^[A-Za-z]:\//[_0xf0041c(0x15a)](_0x43471f))throw new Error(_0xf0041c(0x15e)+_0x143d42);const _0x522de9=_0x5f2bbb[_0xf0041c(0x159)]('/');for(const _0x502f3b of _0x522de9){if(!_0x502f3b||_0x502f3b==='.'||_0x502f3b==='..'||_0x502f3b[_0xf0041c(0x151)]('.')||_0x502f3b[_0xf0041c(0x151)]('\x20')||WINDOWS_INVALID_CHAR['test'](_0x502f3b)||WINDOWS_RESERVED_NAME[_0xf0041c(0x15a)](_0x502f3b))throw new Error(_0xf0041c(0x13f)+_0x143d42);}return{'relativePath':_0x522de9[_0xf0041c(0x158)](a165_0x3ecd4d[_0xf0041c(0x160)]),'directory':_0x4b90d8};}function isSymbolicLink(_0x279d56){const _0x228f19=a165_0x1fbc,_0x4c4744=_0x279d56[_0x228f19(0x149)]>>>0x10&0xffff;return(_0x4c4744&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x3e364a,_0x16d688){const _0x8fa384=a165_0x1fbc,_0x3d2e59=await openZip(_0x3e364a),_0x1e0c18=a165_0x3ecd4d['resolve'](_0x16d688),_0x22c6bd=new Set(),_0x422f60=new Map();let _0x4452a4=0x0,_0x5ac555=0x0;await a165_0x118f06[_0x8fa384(0x147)](_0x1e0c18,{'recursive':!![]}),await new Promise((_0x3bdad9,_0x2180e1)=>{const _0x2a710d=_0x8fa384;let _0x522992=![];const _0x17c963=_0x2f49b3=>{if(_0x522992)return;_0x522992=!![],_0x3d2e59['close'](),_0x2180e1(_0x2f49b3 instanceof Error?_0x2f49b3:new Error(String(_0x2f49b3)));};_0x3d2e59['once'](_0x2a710d(0x148),_0x17c963),_0x3d2e59['once'](_0x2a710d(0x140),()=>{if(_0x522992)return;_0x522992=!![],_0x3bdad9();}),_0x3d2e59['on'](_0x2a710d(0x146),_0x169f08=>{const _0x221d07=_0x2a710d;void(async()=>{const _0x4002f3=a165_0x1fbc;_0x4452a4+=0x1,_0x5ac555+=_0x169f08[_0x4002f3(0x153)];if(_0x4452a4>MAX_ENTRY_COUNT)throw new Error('Project\x20template\x20ZIP\x20exceeds\x20'+MAX_ENTRY_COUNT+_0x4002f3(0x14f));if(_0x5ac555>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x4002f3(0x14a));if(_0x169f08[_0x4002f3(0x15d)]())throw new Error(_0x4002f3(0x14e)+_0x169f08[_0x4002f3(0x15b)]);if(isSymbolicLink(_0x169f08))throw new Error('Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20'+_0x169f08[_0x4002f3(0x15b)]);const {relativePath:_0x51ecc7,directory:_0x1fdc1e}=validateEntryPath(_0x169f08[_0x4002f3(0x15b)]),_0x26f957=_0x51ecc7[_0x4002f3(0x159)](a165_0x3ecd4d[_0x4002f3(0x160)]);for(let _0x905046=0x1;_0x905046<=_0x26f957['length'];_0x905046+=0x1){const _0x30a049=_0x26f957['slice'](0x0,_0x905046)[_0x4002f3(0x158)](a165_0x3ecd4d[_0x4002f3(0x160)]),_0x4cc7b2=_0x30a049[_0x4002f3(0x145)]('en-US'),_0x1e0853=_0x422f60[_0x4002f3(0x15f)](_0x4cc7b2);if(_0x1e0853&&_0x1e0853!==_0x30a049)throw new Error(_0x4002f3(0x157)+_0x169f08[_0x4002f3(0x15b)]);_0x422f60['set'](_0x4cc7b2,_0x30a049);}const _0x45a69c=_0x51ecc7[_0x4002f3(0x145)](_0x4002f3(0x162));if(_0x22c6bd[_0x4002f3(0x14b)](_0x45a69c))throw new Error('Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20'+_0x169f08[_0x4002f3(0x15b)]);_0x22c6bd[_0x4002f3(0x142)](_0x45a69c);const _0x67f745=a165_0x3ecd4d['resolve'](_0x1e0c18,_0x51ecc7);if(_0x67f745!==_0x1e0c18&&!_0x67f745[_0x4002f3(0x165)](''+_0x1e0c18+a165_0x3ecd4d[_0x4002f3(0x160)]))throw new Error(_0x4002f3(0x144)+_0x169f08['fileName']);if(_0x1fdc1e)await a165_0x118f06[_0x4002f3(0x147)](_0x67f745,{'recursive':!![]});else{await a165_0x118f06['mkdir'](a165_0x3ecd4d[_0x4002f3(0x143)](_0x67f745),{'recursive':!![]});const _0x29f5c0=await openEntryStream(_0x3d2e59,_0x169f08);await pipeline(_0x29f5c0,createWriteStream(_0x67f745,{'flags':'wx','mode':0x1a4}));}_0x3d2e59[_0x4002f3(0x152)]();})()[_0x221d07(0x14d)](_0x17c963);}),_0x3d2e59[_0x2a710d(0x152)]();});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a166_0xe77d(_0x3f7b0e,_0xc032cb){_0x3f7b0e=_0x3f7b0e-0x74;const _0xf44c75=a166_0xf44c();let _0xe77d31=_0xf44c75[_0x3f7b0e];return _0xe77d31;}(function(_0x1a8eb1,_0x3a05b3){const _0x3b9864=a166_0xe77d,_0x4d3c25=_0x1a8eb1();while(!![]){try{const _0x275716=-parseInt(_0x3b9864(0x7d))/0x1+-parseInt(_0x3b9864(0x76))/0x2*(-parseInt(_0x3b9864(0x7c))/0x3)+parseInt(_0x3b9864(0x77))/0x4+parseInt(_0x3b9864(0x7b))/0x5+-parseInt(_0x3b9864(0x75))/0x6+-parseInt(_0x3b9864(0x7e))/0x7*(-parseInt(_0x3b9864(0x74))/0x8)+-parseInt(_0x3b9864(0x7a))/0x9*(parseInt(_0x3b9864(0x78))/0xa);if(_0x275716===_0x3a05b3)break;else _0x4d3c25['push'](_0x4d3c25['shift']());}catch(_0x3fe758){_0x4d3c25['push'](_0x4d3c25['shift']());}}}(a166_0xf44c,0x27f1d));import a166_0x56fb2f from'node:path';import{fileURLToPath}from'node:url';const __dirname=a166_0x56fb2f['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x3e8bc4=a166_0xe77d;return a166_0x56fb2f[_0x3e8bc4(0x79)](__dirname,_0x3e8bc4(0x7f));}function a166_0xf44c(){const _0x14c572=['837QKjSZa','170234euAhOs','754439dLHMLr','../../../../','16ivSuMA','1296324yCZoDJ','1914bNYzmb','485784qmZGIO','430vRGECh','resolve','30240MMCYGU','451890FmCIsd'];a166_0xf44c=function(){return _0x14c572;};return a166_0xf44c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x214204,_0x26902c){const _0x12d2d6=a167_0x5bb3,_0x3849e2=_0x214204();while(!![]){try{const _0x32f8af=-parseInt(_0x12d2d6(0x1b3))/0x1+parseInt(_0x12d2d6(0x1b7))/0x2*(-parseInt(_0x12d2d6(0x1bb))/0x3)+-parseInt(_0x12d2d6(0x1c1))/0x4*(parseInt(_0x12d2d6(0x1c2))/0x5)+-parseInt(_0x12d2d6(0x1b0))/0x6*(parseInt(_0x12d2d6(0x1b8))/0x7)+-parseInt(_0x12d2d6(0x1b6))/0x8*(parseInt(_0x12d2d6(0x1ae))/0x9)+-parseInt(_0x12d2d6(0x1bf))/0xa*(-parseInt(_0x12d2d6(0x1ad))/0xb)+-parseInt(_0x12d2d6(0x1ab))/0xc*(-parseInt(_0x12d2d6(0x1b1))/0xd);if(_0x32f8af===_0x26902c)break;else _0x3849e2['push'](_0x3849e2['shift']());}catch(_0x11afc9){_0x3849e2['push'](_0x3849e2['shift']());}}}(a167_0x4073,0x83491));function a167_0x5bb3(_0x5558f9,_0x3fc4f7){_0x5558f9=_0x5558f9-0x1ab;const _0x4073cf=a167_0x4073();let _0x5bb3ff=_0x4073cf[_0x5558f9];return _0x5bb3ff;}import a167_0x416b7b from'node:path';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(_0x55b70b,_0x3f02ec){const _0x5d944b=a167_0x5bb3,_0x40f9ca=Date['now'](),_0x40c00d=a167_0x416b7b[_0x5d944b(0x1c3)](process[_0x5d944b(0x1b5)](),_0x55b70b);try{logger[_0x5d944b(0x1bd)](_0x5d944b(0x1bc),'开始创建项目模板',{'projectCode':_0x55b70b});const _0x1bfd82=await materializeProjectTemplate(_0x40c00d,_0x3f02ec),_0x2ebd47=Date[_0x5d944b(0x1b2)]()-_0x40f9ca;logger[_0x5d944b(0x1ac)]('copy',_0x5d944b(0x1b9),_0x2ebd47,{'projectCode':_0x55b70b,'templateSource':_0x1bfd82[_0x5d944b(0x1ba)],'templateVersion':_0x1bfd82[_0x5d944b(0x1be)]});}catch(_0x8787c8){const _0x11a428=Date[_0x5d944b(0x1b2)]()-_0x40f9ca;logger[_0x5d944b(0x1af)]('copy',_0x5d944b(0x1c0),{'projectCode':_0x55b70b,'error':_0x8787c8 instanceof Error?_0x8787c8[_0x5d944b(0x1b4)]:String(_0x8787c8),'duration':_0x11a428});throw _0x8787c8;}return formatElapsed(_0x40f9ca);}function a167_0x4073(){const _0x5ef565=['项目模板创建完成','source','156366QackSs','copy','info','version','5580DUpWrv','项目模板复制失败','5044xckVHz','3270aAxbEt','resolve','12QJNkhu','success','5709AjSqfL','8748981sQczWB','error','3633102syVWZt','43063787tKOGQg','now','193038VWcMeX','message','cwd','8mGEZbl','18HzGbeq','7tUIsnD'];a167_0x4073=function(){return _0x5ef565;};return a167_0x4073();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x22eb50,_0x40a07f){const _0x1899d5=a168_0x41ee,_0x2d8838=_0x22eb50();while(!![]){try{const _0x584cb3=parseInt(_0x1899d5(0x148))/0x1+-parseInt(_0x1899d5(0x13f))/0x2*(-parseInt(_0x1899d5(0x13a))/0x3)+-parseInt(_0x1899d5(0x138))/0x4*(-parseInt(_0x1899d5(0x140))/0x5)+parseInt(_0x1899d5(0x146))/0x6+-parseInt(_0x1899d5(0x13e))/0x7*(parseInt(_0x1899d5(0x147))/0x8)+parseInt(_0x1899d5(0x142))/0x9*(-parseInt(_0x1899d5(0x139))/0xa)+-parseInt(_0x1899d5(0x149))/0xb;if(_0x584cb3===_0x40a07f)break;else _0x2d8838['push'](_0x2d8838['shift']());}catch(_0x30a795){_0x2d8838['push'](_0x2d8838['shift']());}}}(a168_0x562e,0xa32ff));import a168_0x398006 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a168_0x41ee(_0x307cf4,_0x31320e){_0x307cf4=_0x307cf4-0x135;const _0x562ee1=a168_0x562e();let _0x41eea8=_0x562ee1[_0x307cf4];return _0x41eea8;}function a168_0x562e(){const _0x31d93b=['--write','54HcPOio','npx','info','cwd','5153268JXvSxs','1998488teptth','1308247aPSnFC','21431190dFncIx','format','message','error','代码格式化完成','代码格式化失败','开始格式化代码','1220iGFqTR','1398730nwKmJG','289329HZvhkz','resolve','now','prettier','7ehSuDm','26xVSeDX','4670oKKgRQ'];a168_0x562e=function(){return _0x31d93b;};return a168_0x562e();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x4e3d3d){const _0x2872bd=a168_0x41ee,_0x23f49f=Date[_0x2872bd(0x13c)](),_0x5a6479=a168_0x398006[_0x2872bd(0x13b)](process[_0x2872bd(0x145)](),_0x4e3d3d);try{logger[_0x2872bd(0x144)](_0x2872bd(0x14a),_0x2872bd(0x137),{'projectCode':_0x4e3d3d}),await execa(resolveNpmBin(_0x2872bd(0x143)),[_0x2872bd(0x13d),_0x2872bd(0x141),'.'],{'cwd':_0x5a6479});const _0x40a475=Date[_0x2872bd(0x13c)]()-_0x23f49f;logger['success']('format',_0x2872bd(0x135),_0x40a475,{'projectCode':_0x4e3d3d});}catch(_0xaf4660){const _0x4ee959=Date['now']()-_0x23f49f;logger[_0x2872bd(0x14c)](_0x2872bd(0x14a),_0x2872bd(0x136),{'projectCode':_0x4e3d3d,'error':_0xaf4660 instanceof Error?_0xaf4660[_0x2872bd(0x14b)]:String(_0xaf4660),'duration':_0x4ee959});throw _0xaf4660;}return formatElapsed(_0x23f49f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x34e6ec,_0x8911a1){const _0x2275bb=a169_0x2f5c,_0x585b4a=_0x34e6ec();while(!![]){try{const _0x111240=parseInt(_0x2275bb(0x167))/0x1*(parseInt(_0x2275bb(0x15d))/0x2)+-parseInt(_0x2275bb(0x158))/0x3+parseInt(_0x2275bb(0x15b))/0x4+-parseInt(_0x2275bb(0x164))/0x5+parseInt(_0x2275bb(0x163))/0x6*(-parseInt(_0x2275bb(0x15c))/0x7)+-parseInt(_0x2275bb(0x155))/0x8+parseInt(_0x2275bb(0x166))/0x9;if(_0x111240===_0x8911a1)break;else _0x585b4a['push'](_0x585b4a['shift']());}catch(_0x290c6b){_0x585b4a['push'](_0x585b4a['shift']());}}}(a169_0x4856,0xc76a4));import a169_0x5ce064 from'node:path';import{execa}from'execa';function a169_0x4856(){const _0x42222c=['info','cwd','--registry','npm','18EJpbEX','7669850dXWMJo','https://registry.npmmirror.com','30563532ldSWPN','22rBNgED','message','441152dwEtOJ','resolve','install','3724326SZCLtz','error','success','1043276osvWNb','3368267vybkEd','130376czqkCj','now'];a169_0x4856=function(){return _0x42222c;};return a169_0x4856();}function a169_0x2f5c(_0x28de08,_0x1d8a6d){_0x28de08=_0x28de08-0x155;const _0x485653=a169_0x4856();let _0x2f5c01=_0x485653[_0x28de08];return _0x2f5c01;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x976dca){const _0x78ec4f=a169_0x2f5c,_0x9a5289=Date[_0x78ec4f(0x15e)](),_0x39958b=a169_0x5ce064[_0x78ec4f(0x156)](process[_0x78ec4f(0x160)](),_0x976dca);try{logger[_0x78ec4f(0x15f)](_0x78ec4f(0x157),'开始安装依赖',{'projectCode':_0x976dca,'registry':_0x78ec4f(0x165)}),await execa(resolveNpmBin(_0x78ec4f(0x162)),[_0x78ec4f(0x157),_0x78ec4f(0x161),_0x78ec4f(0x165)],{'cwd':_0x39958b});const _0x369b24=Date[_0x78ec4f(0x15e)]()-_0x9a5289;logger[_0x78ec4f(0x15a)]('install','依赖安装完成',_0x369b24,{'projectCode':_0x976dca});}catch(_0x482839){const _0x25031b=Date[_0x78ec4f(0x15e)]()-_0x9a5289;logger[_0x78ec4f(0x159)](_0x78ec4f(0x157),'依赖安装失败',{'projectCode':_0x976dca,'error':_0x482839 instanceof Error?_0x482839[_0x78ec4f(0x168)]:String(_0x482839),'duration':_0x25031b});throw _0x482839;}return formatElapsed(_0x9a5289);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a170_0x58deaf=a170_0x7531;(function(_0x1ea2f8,_0x5394c2){const _0x344599=a170_0x7531,_0x57782c=_0x1ea2f8();while(!![]){try{const _0x137054=-parseInt(_0x344599(0xc0))/0x1*(parseInt(_0x344599(0xb7))/0x2)+parseInt(_0x344599(0xb8))/0x3+-parseInt(_0x344599(0xc4))/0x4+-parseInt(_0x344599(0xbc))/0x5+-parseInt(_0x344599(0xbe))/0x6+-parseInt(_0x344599(0xbb))/0x7*(-parseInt(_0x344599(0xbd))/0x8)+parseInt(_0x344599(0xad))/0x9;if(_0x137054===_0x5394c2)break;else _0x57782c['push'](_0x57782c['shift']());}catch(_0x284348){_0x57782c['push'](_0x57782c['shift']());}}}(a170_0x3d41,0xc3621));import{CliErrors}from'../../errors.js';function a170_0x7531(_0x5a5093,_0x48bc9f){_0x5a5093=_0x5a5093-0xa5;const _0x3d4175=a170_0x3d41();let _0x7531e2=_0x3d4175[_0x5a5093];return _0x7531e2;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':a170_0x58deaf(0xc1),'type':a170_0x58deaf(0xa6),'description':'Project\x20name'},{'name':'env','type':a170_0x58deaf(0xa6),'description':'Target\x20environment'},{'name':a170_0x58deaf(0xb1),'type':a170_0x58deaf(0xa6),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a170_0x58deaf(0xab),'type':'boolean','description':a170_0x58deaf(0xb4),'default':![]}];export const projectDefinitions=[{'service':a170_0x58deaf(0xae),'command':a170_0x58deaf(0xbf),'description':a170_0x58deaf(0xb6),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a170_0x58deaf(0xb0),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x39b961){const _0x4aed34=a170_0x58deaf,{createApp:_0x51b82a}=await import(_0x4aed34(0xc3)),_0x1e61e0=_0x39b961['str']('name')[_0x4aed34(0xb9)]()||_0x39b961['args'][0x0]?.[_0x4aed34(0xb9)](),_0xe47bc4=_0x39b961[_0x4aed34(0xa9)](_0x4aed34(0xa8))||undefined,_0x524e14=_0x39b961[_0x4aed34(0xa9)](_0x4aed34(0xb1))||undefined;if(_0x39b961[_0x4aed34(0xac)]){if(!_0x1e61e0)throw CliErrors[_0x4aed34(0xa5)](_0x4aed34(0xaf),_0x4aed34(0xa7)+CLI_BIN_NAME+_0x4aed34(0xc2));await _0x51b82a({'projectCode':_0x1e61e0,'appCode':_0x524e14,'env':_0xe47bc4,'cookie':_0x39b961[_0x4aed34(0xb5)],'nonInteractive':!![]});}else await _0x51b82a({'projectCode':_0x1e61e0,'appCode':_0x524e14,'env':_0xe47bc4,'cookie':_0x39b961[_0x4aed34(0xb5)]});return{'ok':!![]};}},{'service':a170_0x58deaf(0xae),'command':a170_0x58deaf(0xaa),'description':a170_0x58deaf(0xb3),'risk':a170_0x58deaf(0xba),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x1c4075){const _0xfd6eb1=a170_0x58deaf;return await upgradeApp(_0x1c4075['nonInteractive'],{'yes':_0x1c4075[_0xfd6eb1(0xb2)](_0xfd6eb1(0xab))}),{'ok':!![]};}}];function a170_0x3d41(){const _0x5224b9=['bool','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Skip\x20confirmation\x20prompt','cookie','Create\x20a\x20new\x20project','1038lpXGVe','4360530JNTVhx','trim','write','10010wsTPqk','80930XYPsjK','2568iezKzI','4025430AKQaSK','create','1639XaqSGm','name','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','../../commands/project/create/main.js','2141096GqsniV','validation','string','Usage:\x20','env','str','upgrade','yes','nonInteractive','8646795GOEkju','project','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','project-name','appcode'];a170_0x3d41=function(){return _0x5224b9;};return a170_0x3d41();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a177_0x3857b3=a177_0x577b;(function(_0xe15af8,_0x4cee51){const _0x354aa4=a177_0x577b,_0x1f36f4=_0xe15af8();while(!![]){try{const _0x321157=parseInt(_0x354aa4(0xbd))/0x1*(parseInt(_0x354aa4(0x117))/0x2)+parseInt(_0x354aa4(0x101))/0x3*(-parseInt(_0x354aa4(0xba))/0x4)+parseInt(_0x354aa4(0x10f))/0x5+parseInt(_0x354aa4(0xbf))/0x6+-parseInt(_0x354aa4(0xb4))/0x7+parseInt(_0x354aa4(0xe1))/0x8*(-parseInt(_0x354aa4(0xee))/0x9)+parseInt(_0x354aa4(0xfb))/0xa*(parseInt(_0x354aa4(0xbc))/0xb);if(_0x321157===_0x4cee51)break;else _0x1f36f4['push'](_0x1f36f4['shift']());}catch(_0x392b70){_0x1f36f4['push'](_0x1f36f4['shift']());}}}(a177_0x593d,0x3f395));import a177_0x3b781c from'chalk';import a177_0x8b40ee from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a177_0x3857b3(0xe3)](_0x148587=>_0x148587!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x363975){const _0x33d927=a177_0x3857b3,_0x224e51=[];for(const _0x2dbbca of Object[_0x33d927(0xf9)](CORE_IDE_CONFIGS)){if(_0x2dbbca[_0x33d927(0x11b)])for(const _0x52f072 of _0x2dbbca[_0x33d927(0x11b)]){_0x224e51[_0x33d927(0x128)](resolve(_0x363975,_0x52f072[_0x33d927(0xd3)]));}}return _0x224e51;}function analyse(_0x3c713e){const _0x220699=a177_0x3857b3;let _0x41b4e7=null;const _0x1cdb61=resolve(_0x3c713e,NEW_CONFIG_NAME),_0x1d2aae=existsSync(_0x1cdb61);for(const _0x5385fd of LEGACY_CONFIG_NAMES){const _0x1057a5=resolve(_0x3c713e,_0x5385fd);if(existsSync(_0x1057a5)){const _0x3c46ee=readConfigFile(_0x1057a5),_0x2ba635=Object[_0x220699(0xb3)](_0x3c46ee)['filter'](_0x4c92fa=>typeof _0x3c46ee[_0x4c92fa]!==_0x220699(0x129));_0x41b4e7={'oldPath':_0x1057a5,'hasNewConfig':_0x1d2aae,'fields':_0x2ba635};break;}}const _0x45362d=[],_0xd4be00=resolve(_0x3c713e,'.lovrabet');if(existsSync(_0xd4be00))_0x45362d[_0x220699(0x128)](_0xd4be00);const _0x169436=resolve(_0x3c713e,_0x220699(0x120));if(existsSync(_0x169436))_0x45362d[_0x220699(0x128)](_0x169436);const _0x558acf=resolve(_0x3c713e,_0x220699(0xdc));if(existsSync(_0x558acf))_0x45362d[_0x220699(0x128)](_0x558acf);for(const _0x5c852d of collectIdeSkillFiles(_0x3c713e)){if(existsSync(_0x5c852d))_0x45362d[_0x220699(0x128)](_0x5c852d);}let _0x17c0d0=null;const _0x5bb362=resolve(_0x3c713e,_0x220699(0xd9));if(existsSync(_0x5bb362))try{const _0x8b0f74=JSON[_0x220699(0xc0)](readFileSync(_0x5bb362,_0x220699(0xfe)));if(_0x8b0f74?.[_0x220699(0xd1)]&&typeof _0x8b0f74['mcpServers']===_0x220699(0xd6)){const _0x29797e=[];for(const [_0x22ed54,_0x346574]of Object[_0x220699(0x105)](_0x8b0f74[_0x220699(0xd1)])){const _0x104943=_0x346574;_0x104943?.['args']&&Array['isArray'](_0x104943[_0x220699(0xfd)])&&_0x104943[_0x220699(0xfd)][_0x220699(0x112)](_0x24b6d7=>typeof _0x24b6d7===_0x220699(0xe5)&&_0x24b6d7[_0x220699(0x11c)]('@lovrabet/dataset-mcp-server'))&&_0x29797e[_0x220699(0x128)](_0x22ed54);}_0x29797e[_0x220699(0xf8)]>0x0&&(_0x17c0d0={'path':_0x5bb362,'keys':_0x29797e});}}catch{}const _0x21945b=_0x45362d[_0x220699(0xf8)]>0x0||_0x41b4e7!==null;let _0x27d0fd=null;const _0x3a818d=resolve(_0x3c713e,_0x220699(0xeb));if(existsSync(_0x3a818d))try{const _0x1b4bb0=JSON[_0x220699(0xc0)](readFileSync(_0x3a818d,_0x220699(0xfe)));for(const _0x1b0b6b of[_0x220699(0xb2),_0x220699(0xf1)]){const _0x5b6fe4=_0x1b4bb0?.[_0x1b0b6b]?.[_0x220699(0x104)];if(typeof _0x5b6fe4===_0x220699(0xe5)){_0x5b6fe4!==_0x220699(0xde)&&(_0x27d0fd={'pkgPath':_0x3a818d,'currentVersion':_0x5b6fe4,'field':_0x1b0b6b});break;}}}catch{}return{'configMigration':_0x41b4e7,'oldArtifacts':_0x45362d,'oldMcpConfig':_0x17c0d0,'needsSkillSwap':_0x21945b,'sdkUpgrade':_0x27d0fd};}function printReport(_0x38d24a){const _0x28864c=a177_0x3857b3,{configMigration:_0x446384,oldArtifacts:_0x46ef1c,oldMcpConfig:_0x5802ae,needsSkillSwap:_0x20e9fc}=_0x38d24a;console[_0x28864c(0x12f)](''),console[_0x28864c(0x12f)](a177_0x3b781c[_0x28864c(0xf6)]('===\x20Upgrade\x20Analysis\x20===')),console['log']('');_0x446384?(console[_0x28864c(0x12f)](a177_0x3b781c[_0x28864c(0x12d)](_0x28864c(0x11d))+('\x20\x20'+a177_0x3b781c[_0x28864c(0x118)](_0x446384[_0x28864c(0x115)]))),console[_0x28864c(0x12f)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x446384[_0x28864c(0x106)]?a177_0x3b781c['green'](_0x28864c(0xcd)):a177_0x3b781c['gray'](_0x28864c(0xd7)))),console[_0x28864c(0x12f)](_0x28864c(0x10b)+_0x446384['fields'][_0x28864c(0xbb)](',\x20')),console['log']('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x28864c(0x12f)](a177_0x3b781c[_0x28864c(0x12d)](_0x28864c(0x11d))+'\x20\x20'+a177_0x3b781c[_0x28864c(0xb6)](_0x28864c(0xc6)));console['log']('');if(_0x46ef1c[_0x28864c(0xf8)]>0x0){console['log'](a177_0x3b781c[_0x28864c(0x12d)](_0x28864c(0x110)));for(const _0x5c6118 of _0x46ef1c){console['log']('\x20\x20'+a177_0x3b781c[_0x28864c(0xe6)](_0x28864c(0x119))+'\x20\x20'+_0x5c6118);}console[_0x28864c(0x12f)]('\x20\x20Action:\x20delete');}else console['log'](a177_0x3b781c[_0x28864c(0x12d)](_0x28864c(0x110))+'\x20\x20'+a177_0x3b781c[_0x28864c(0xb6)]('none\x20found'));console[_0x28864c(0x12f)]('');_0x5802ae?(console[_0x28864c(0x12f)](a177_0x3b781c[_0x28864c(0x12d)](_0x28864c(0x123))+('\x20\x20'+a177_0x3b781c[_0x28864c(0x118)](_0x5802ae[_0x28864c(0xd3)])+_0x28864c(0xed)+_0x5802ae[_0x28864c(0xb3)][_0x28864c(0xbb)](',\x20'))),console[_0x28864c(0x12f)](_0x28864c(0x10c))):console['log'](a177_0x3b781c[_0x28864c(0x12d)](_0x28864c(0x123))+'\x20\x20'+a177_0x3b781c[_0x28864c(0xb6)](_0x28864c(0xcf)));console[_0x28864c(0x12f)](''),console[_0x28864c(0x12f)](a177_0x3b781c[_0x28864c(0x12d)]('Skill\x20swap:')+('\x20\x20'+(_0x20e9fc?a177_0x3b781c[_0x28864c(0x118)]('needed'):a177_0x3b781c['green'](_0x28864c(0x107)))));_0x20e9fc&&console[_0x28864c(0x12f)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x28864c(0x12f)]('');if(_0x38d24a['sdkUpgrade']){const {currentVersion:_0x5c1529,field:_0x436eab,pkgPath:_0x298b0c}=_0x38d24a[_0x28864c(0xe7)];console['log'](a177_0x3b781c['cyan'](_0x28864c(0xe8))+('\x20\x20'+a177_0x3b781c[_0x28864c(0x118)](_0x298b0c))),console['log']('\x20\x20Current\x20version\x20in\x20'+_0x436eab+':\x20'+a177_0x3b781c[_0x28864c(0x118)](_0x5c1529)+_0x28864c(0x127)+a177_0x3b781c['green']('latest')),console['log'](_0x28864c(0x11e));}else console[_0x28864c(0x12f)](a177_0x3b781c['cyan'](_0x28864c(0xe8))+'\x20\x20'+a177_0x3b781c[_0x28864c(0xb6)](_0x28864c(0x10e)));console[_0x28864c(0x12f)]('');}function execConfigMigration(_0x3948b3,_0x382dbd){const _0x58a226=a177_0x3857b3,{configMigration:_0x3bed5c}=_0x3948b3;if(!_0x3bed5c?.[_0x58a226(0x115)])return{'step':0x1,'label':_0x58a226(0xd2),'ok':!![],'detail':_0x58a226(0xbe)};const _0xfacf26=readConfigFile(_0x3bed5c[_0x58a226(0x115)]),_0x23418f=resolve(_0x382dbd,NEW_CONFIG_NAME),_0x2dedca=_0x3bed5c[_0x58a226(0x106)]?readConfigFile(_0x23418f):{};for(const [_0x2f290a,_0x2be655]of Object[_0x58a226(0x105)](_0xfacf26)){!(_0x2f290a in _0x2dedca)&&(_0x2dedca[_0x2f290a]=_0x2be655);}writeConfigFile(_0x23418f,_0x2dedca);const _0x477282=_0x3bed5c['oldPath']+_0x58a226(0xd5);return renameSync(_0x3bed5c[_0x58a226(0x115)],_0x477282),{'step':0x1,'label':_0x58a226(0xd2),'ok':!![],'detail':_0x3bed5c['oldPath']+_0x58a226(0x127)+_0x23418f+_0x58a226(0x116)+_0x477282+')'};}function a177_0x593d(){const _0x32ae4a=['.lovrabet','.cursor/mcp.json','\x20removed\x20(','\x20\x20#\x20or','.claude/skills/lovrabet','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','latest','lovrabet/rabetbase\x20installed\x20globally','exit\x20','1982520JijBay','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','filter','oldMcpConfig','string','red','sdkUpgrade','@lovrabet/sdk:','oldArtifacts','message','package.json','step','\x20→\x20keys:\x20','9UcIOzr','white','failed','devDependencies','green','info','Clean\x20MCP\x20config','\x20from\x20','bold','Remove\x20old\x20skill','length','values','FAIL','9590nCQOft','\x20→\x20latest','args','utf8','stringify','lovrabet/lovrabet-skill\x20removed','9Qeuwgz','\x20\x20bun\x20install','Remove\x20.lovrabet/','@lovrabet/sdk','entries','hasNewConfig','not\x20needed','\x20\x20Step\x20','Remove\x20legacy\x20artifacts','isDirectory','\x20\x20Fields\x20to\x20migrate:\x20','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','not\x20found\x20or\x20already\x20at\x20latest','257580vlYoLh','Legacy\x20artifacts:','status','some','fail','start','oldPath','\x20(backup:\x20','13970AmUGgK','yellow','FOUND','Step\x201/7:\x20Config\x20migration\x20—\x20','files','includes','Config\x20file:','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','.cursor/rules/lovrabet_rules.mdc','succeed','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','MCP\x20config:','Step\x204/7:\x20MCP\x20config\x20—\x20','label','Upgrade\x20@lovrabet/sdk','\x20→\x20','push','undefined','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','Proceed\x20with\x20upgrade?','no\x20matching\x20entry\x20found','cyan','done','log','dependencies','keys','944643uhbwrn','Install\x20new\x20skill','gray','needsSkillSwap','skipped','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','663416tVIFuG','join','9053XuGxae','5JITevB','skipped\x20(no\x20legacy\x20config)','1581558JUYwsZ','parse','Step\x201/7:\x20Migrating\x20config...','configMigration','Upgrade\x20cancelled.','\x20removed','detail','no\x20legacy\x20config\x20found','Upgrade\x20completed\x20successfully!','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','\x20\x20npm\x20install','yes','error','inherit','already\x20exists\x20(will\x20merge)','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','no\x20legacy\x20entry','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','mcpServers','Config\x20migration','path','removed\x20','.bak','object','not\x20found\x20(will\x20create)'];a177_0x593d=function(){return _0x32ae4a;};return a177_0x593d();}function execRemoveOldArtifacts(_0x266666){const _0x1d5c42=a177_0x3857b3,_0x2b87ef=[];for(const _0x586765 of _0x266666){try{if(!existsSync(_0x586765))continue;const _0x558b7c=tryStat(_0x586765);_0x558b7c?.[_0x1d5c42(0x10a)]()?rmSync(_0x586765,{'recursive':!![],'force':!![]}):unlinkSync(_0x586765);}catch(_0x3908f9){_0x2b87ef['push'](_0x586765+':\x20'+_0x3908f9[_0x1d5c42(0xea)]);}}return{'step':0x3,'label':_0x1d5c42(0x109),'ok':_0x2b87ef[_0x1d5c42(0xf8)]===0x0,'detail':_0x2b87ef[_0x1d5c42(0xf8)]>0x0?_0x266666[_0x1d5c42(0xf8)]-_0x2b87ef['length']+'/'+_0x266666[_0x1d5c42(0xf8)]+_0x1d5c42(0xda)+_0x2b87ef['join'](';\x20')+')':_0x266666['length']+_0x1d5c42(0xc4)};}function execCleanMcp(_0x16ab23){const _0x1b88eb=a177_0x3857b3;if(!_0x16ab23[_0x1b88eb(0xe4)])return{'step':0x4,'label':_0x1b88eb(0xf4),'ok':!![],'detail':_0x1b88eb(0xb8)};try{const _0x793771=readFileSync(_0x16ab23['oldMcpConfig'][_0x1b88eb(0xd3)],_0x1b88eb(0xfe)),_0x2d9cbb=JSON[_0x1b88eb(0xc0)](_0x793771);if(_0x2d9cbb?.[_0x1b88eb(0xd1)]&&typeof _0x2d9cbb['mcpServers']===_0x1b88eb(0xd6)){const _0x3bcb92=[];for(const [_0x3791d6,_0x4eb583]of Object[_0x1b88eb(0x105)](_0x2d9cbb['mcpServers'])){_0x4eb583?.[_0x1b88eb(0xfd)]&&Array['isArray'](_0x4eb583['args'])&&_0x4eb583[_0x1b88eb(0xfd)][_0x1b88eb(0x112)](_0x2f13e8=>typeof _0x2f13e8==='string'&&_0x2f13e8[_0x1b88eb(0x11c)]('@lovrabet/dataset-mcp-server'))&&_0x3bcb92['push'](_0x3791d6);}for(const _0x14abe1 of _0x3bcb92){delete _0x2d9cbb['mcpServers'][_0x14abe1];}return _0x3bcb92['length']>0x0&&writeFileSync(_0x16ab23[_0x1b88eb(0xe4)][_0x1b88eb(0xd3)],JSON[_0x1b88eb(0xff)](_0x2d9cbb,null,0x2)+'\x0a',_0x1b88eb(0xfe)),{'step':0x4,'label':_0x1b88eb(0xf4),'ok':!![],'detail':_0x1b88eb(0xd4)+_0x3bcb92['join'](',\x20')+_0x1b88eb(0xf5)+_0x16ab23[_0x1b88eb(0xe4)][_0x1b88eb(0xd3)]};}return{'step':0x4,'label':_0x1b88eb(0xf4),'ok':!![],'detail':_0x1b88eb(0x12c)};}catch(_0x4a5b3d){return{'step':0x4,'label':_0x1b88eb(0xf4),'ok':![],'detail':_0x4a5b3d[_0x1b88eb(0xea)]};}}function execSkillsRemove(_0x4f637a,_0x3eee60){const _0x544e2e=a177_0x3857b3,_0x320ab7=runNpxSkillsRemove(_0x4f637a,{'stdio':_0x544e2e(0xcc),'yes':_0x3eee60});return{'step':0x5,'label':_0x544e2e(0xf7),'ok':_0x320ab7['ok'],'detail':_0x320ab7['ok']?_0x544e2e(0x100):_0x320ab7['error']??_0x544e2e(0xe0)+_0x320ab7[_0x544e2e(0x111)]};}function execSkillsAdd(_0x1a48bc,_0x72254e){const _0x463587=a177_0x3857b3,_0x3bbeb1=runNpxSkillsAddGlobal(_0x1a48bc,'lovrabet/rabetbase',{'stdio':_0x463587(0xcc),'yes':_0x72254e});return{'step':0x6,'label':_0x463587(0xb5),'ok':_0x3bbeb1['ok'],'detail':_0x3bbeb1['ok']?_0x463587(0xdf):_0x3bbeb1[_0x463587(0xcb)]??_0x463587(0xe0)+_0x3bbeb1[_0x463587(0x111)]};}function a177_0x577b(_0x326308,_0x3eeb53){_0x326308=_0x326308-0xb2;const _0x593d1c=a177_0x593d();let _0x577b9e=_0x593d1c[_0x326308];return _0x577b9e;}function execUpgradeSdk(_0x548f03){const _0x5551d4=a177_0x3857b3;if(!_0x548f03[_0x5551d4(0xe7)])return{'step':0x7,'label':_0x5551d4(0x126),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x2b0f92,currentVersion:_0x3954c7,field:_0x105be6}=_0x548f03[_0x5551d4(0xe7)];try{const _0x9aec99=readFileSync(_0x2b0f92,_0x5551d4(0xfe)),_0x3b9baf=JSON[_0x5551d4(0xc0)](_0x9aec99);return _0x3b9baf[_0x105be6][_0x5551d4(0x104)]='latest',writeFileSync(_0x2b0f92,JSON[_0x5551d4(0xff)](_0x3b9baf,null,0x2)+'\x0a',_0x5551d4(0xfe)),{'step':0x7,'label':_0x5551d4(0x126),'ok':!![],'detail':_0x105be6+'[\x22@lovrabet/sdk\x22]:\x20'+_0x3954c7+_0x5551d4(0xfc)};}catch(_0x5acc5a){return{'step':0x7,'label':_0x5551d4(0x126),'ok':![],'detail':_0x5acc5a[_0x5551d4(0xea)]};}}function tryStat(_0x188519){try{return statSync(_0x188519);}catch{return undefined;}}function printSummary(_0x3d3365){const _0x4458e9=a177_0x3857b3;console['log'](''),console[_0x4458e9(0x12f)](a177_0x3b781c[_0x4458e9(0xf6)]('===\x20Upgrade\x20Summary\x20===')),console[_0x4458e9(0x12f)]('');for(const _0x3be17f of _0x3d3365){const _0x180bae=_0x3be17f['ok']?a177_0x3b781c['green']('OK'):a177_0x3b781c[_0x4458e9(0xe6)](_0x4458e9(0xfa));console[_0x4458e9(0x12f)]('\x20\x20'+_0x180bae+_0x4458e9(0x108)+_0x3be17f[_0x4458e9(0xec)]+':\x20'+_0x3be17f[_0x4458e9(0x125)]);if(_0x3be17f['detail'])console['log']('\x20\x20\x20\x20\x20\x20\x20'+a177_0x3b781c[_0x4458e9(0xb6)](_0x3be17f[_0x4458e9(0xc5)]));}console[_0x4458e9(0x12f)]('');}export async function upgradeApp(_0x1ea223,_0x35d8bc){const _0x2e0cf0=a177_0x3857b3,_0x4ace46=process['cwd'](),_0x1c91e6=analyse(_0x4ace46),_0xbf31d9=!_0x1c91e6[_0x2e0cf0(0xc2)]&&_0x1c91e6['oldArtifacts']['length']===0x0&&!_0x1c91e6[_0x2e0cf0(0xe4)]&&!_0x1c91e6[_0x2e0cf0(0xb7)]&&!_0x1c91e6['sdkUpgrade'];if(_0xbf31d9){console[_0x2e0cf0(0x12f)](a177_0x3b781c[_0x2e0cf0(0xf2)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x1c91e6);const _0x4981b1=!!(_0x35d8bc[_0x2e0cf0(0xca)]||_0x35d8bc['Y']||_0x1ea223);if(!_0x4981b1)try{const _0x4aec0d=await askConfirm(_0x2e0cf0(0x12b));if(!_0x4aec0d){console[_0x2e0cf0(0x12f)](a177_0x3b781c[_0x2e0cf0(0xb6)](_0x2e0cf0(0xc3)));return;}}catch(_0x560480){if(_0x560480?.[_0x2e0cf0(0xea)]==='CANCEL'){console[_0x2e0cf0(0x12f)](a177_0x3b781c[_0x2e0cf0(0xb6)](_0x2e0cf0(0xc3)));return;}throw _0x560480;}const _0x23e2f3=[],_0x23ff54=a177_0x8b40ee({'text':_0x2e0cf0(0xc1),'color':_0x2e0cf0(0x12d)})['start'](),_0x269ce9=execConfigMigration(_0x1c91e6,_0x4ace46);_0x23e2f3['push'](_0x269ce9),_0x23ff54[_0x269ce9['ok']?_0x2e0cf0(0x121):'fail'](_0x2e0cf0(0x11a)+(_0x269ce9['detail']??(_0x269ce9['ok']?'done':_0x2e0cf0(0xf0))));const _0x38bc60=resolve(_0x4ace46,_0x2e0cf0(0xd8)),_0x2739b0=a177_0x8b40ee({'text':_0x2e0cf0(0xce),'color':_0x2e0cf0(0x12d)})[_0x2e0cf0(0x114)]();if(existsSync(_0x38bc60))try{rmSync(_0x38bc60,{'recursive':!![],'force':!![]}),_0x2739b0[_0x2e0cf0(0x121)](_0x2e0cf0(0x122)),_0x23e2f3['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x3b944f){_0x2739b0[_0x2e0cf0(0x113)](_0x2e0cf0(0xd0)+_0x3b944f[_0x2e0cf0(0xea)]),_0x23e2f3[_0x2e0cf0(0x128)]({'step':0x2,'label':_0x2e0cf0(0x103),'ok':![],'detail':_0x3b944f[_0x2e0cf0(0xea)]});}else _0x2739b0[_0x2e0cf0(0xf3)](_0x2e0cf0(0x10d)),_0x23e2f3['push']({'step':0x2,'label':_0x2e0cf0(0x103),'ok':!![],'detail':_0x2e0cf0(0xb8)});const _0x264685=a177_0x8b40ee({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x2e0cf0(0x12d)})['start'](),_0x265293=execRemoveOldArtifacts(_0x1c91e6[_0x2e0cf0(0xe9)]);_0x23e2f3['push'](_0x265293),_0x264685[_0x265293['ok']?_0x2e0cf0(0x121):_0x2e0cf0(0x113)](_0x2e0cf0(0x12a)+(_0x265293[_0x2e0cf0(0xc5)]??(_0x265293['ok']?'done':_0x2e0cf0(0xf0))));const _0x54ccae=a177_0x8b40ee({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':_0x2e0cf0(0x12d)})[_0x2e0cf0(0x114)](),_0xf2c3b2=execCleanMcp(_0x1c91e6);_0x23e2f3[_0x2e0cf0(0x128)](_0xf2c3b2),_0x54ccae[_0xf2c3b2['ok']?'succeed':'fail'](_0x2e0cf0(0x124)+(_0xf2c3b2['detail']??(_0xf2c3b2['ok']?_0x2e0cf0(0x12e):'failed')));const _0x5e5991=a177_0x8b40ee({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x2e0cf0(0x12d)})['start'](),_0x42f11e=execSkillsRemove(_0x4ace46,_0x4981b1);_0x23e2f3[_0x2e0cf0(0x128)](_0x42f11e),_0x5e5991[_0x42f11e['ok']?'succeed':_0x2e0cf0(0x113)](_0x2e0cf0(0xe2)+(_0x42f11e['detail']??(_0x42f11e['ok']?'done':'failed')));const _0x1de140=a177_0x8b40ee({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':_0x2e0cf0(0x12d)})[_0x2e0cf0(0x114)](),_0x43e4c2=execSkillsAdd(_0x4ace46,_0x4981b1);_0x23e2f3[_0x2e0cf0(0x128)](_0x43e4c2),_0x1de140[_0x43e4c2['ok']?_0x2e0cf0(0x121):_0x2e0cf0(0x113)](_0x2e0cf0(0xb9)+(_0x43e4c2[_0x2e0cf0(0xc5)]??(_0x43e4c2['ok']?_0x2e0cf0(0x12e):_0x2e0cf0(0xf0))));const _0x902b0b=a177_0x8b40ee({'text':'Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':'cyan'})['start'](),_0x9a8cbb=execUpgradeSdk(_0x1c91e6);_0x23e2f3['push'](_0x9a8cbb),_0x902b0b[_0x9a8cbb['ok']?_0x2e0cf0(0x121):'fail'](_0x2e0cf0(0xc8)+(_0x9a8cbb[_0x2e0cf0(0xc5)]??(_0x9a8cbb['ok']?_0x2e0cf0(0x12e):_0x2e0cf0(0xf0)))),printSummary(_0x23e2f3);const _0x25fbbb=_0x23e2f3[_0x2e0cf0(0x112)](_0x22ae95=>!_0x22ae95['ok']);_0x25fbbb?console[_0x2e0cf0(0x12f)](a177_0x3b781c[_0x2e0cf0(0x118)](_0x2e0cf0(0x11f))):console['log'](a177_0x3b781c[_0x2e0cf0(0xf2)](_0x2e0cf0(0xc7))),_0x9a8cbb['ok']&&_0x1c91e6[_0x2e0cf0(0xe7)]&&(console[_0x2e0cf0(0x12f)](''),console[_0x2e0cf0(0x12f)](a177_0x3b781c['bold']['cyan'](_0x2e0cf0(0xdd))),console[_0x2e0cf0(0x12f)](a177_0x3b781c[_0x2e0cf0(0x12d)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x2e0cf0(0x12f)](''),console[_0x2e0cf0(0x12f)](a177_0x3b781c['white'](_0x2e0cf0(0xc9))),console[_0x2e0cf0(0x12f)](a177_0x3b781c[_0x2e0cf0(0xef)](_0x2e0cf0(0xdb))),console['log'](a177_0x3b781c[_0x2e0cf0(0xef)](_0x2e0cf0(0x102))),console[_0x2e0cf0(0x12f)](''));}
|
|
1
|
+
const a171_0x102239=a171_0x59ff;(function(_0x294de6,_0xad713){const _0x31f651=a171_0x59ff,_0x1ca5d3=_0x294de6();while(!![]){try{const _0x95cb6=-parseInt(_0x31f651(0x1d0))/0x1*(parseInt(_0x31f651(0x20c))/0x2)+parseInt(_0x31f651(0x1ed))/0x3*(-parseInt(_0x31f651(0x1dc))/0x4)+parseInt(_0x31f651(0x1d7))/0x5*(-parseInt(_0x31f651(0x1e3))/0x6)+parseInt(_0x31f651(0x205))/0x7+-parseInt(_0x31f651(0x1c0))/0x8*(-parseInt(_0x31f651(0x201))/0x9)+parseInt(_0x31f651(0x1e5))/0xa*(parseInt(_0x31f651(0x1f3))/0xb)+parseInt(_0x31f651(0x1e2))/0xc*(parseInt(_0x31f651(0x20d))/0xd);if(_0x95cb6===_0xad713)break;else _0x1ca5d3['push'](_0x1ca5d3['shift']());}catch(_0x37a2d5){_0x1ca5d3['push'](_0x1ca5d3['shift']());}}}(a171_0x537e,0x205f9));function a171_0x59ff(_0x19e54e,_0x3cb8c4){_0x19e54e=_0x19e54e-0x1bb;const _0x537e6c=a171_0x537e();let _0x59ff1d=_0x537e6c[_0x19e54e];return _0x59ff1d;}import a171_0x5a8535 from'chalk';import a171_0x23dfde from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a171_0x102239(0x221)](_0x273fb1=>_0x273fb1!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x51cd29){const _0x4da779=a171_0x102239,_0x4b9edd=[];for(const _0x624d2c of Object['values'](CORE_IDE_CONFIGS)){if(_0x624d2c[_0x4da779(0x21a)])for(const _0x246302 of _0x624d2c[_0x4da779(0x21a)]){_0x4b9edd[_0x4da779(0x1bb)](resolve(_0x51cd29,_0x246302['path']));}}return _0x4b9edd;}function analyse(_0x23f2ce){const _0x16b718=a171_0x102239;let _0x1e23d7=null;const _0x3e5620=resolve(_0x23f2ce,NEW_CONFIG_NAME),_0x2f30bb=existsSync(_0x3e5620);for(const _0x1a18d0 of LEGACY_CONFIG_NAMES){const _0x1ba240=resolve(_0x23f2ce,_0x1a18d0);if(existsSync(_0x1ba240)){const _0x30bedc=readConfigFile(_0x1ba240),_0x1e2495=Object[_0x16b718(0x1d9)](_0x30bedc)[_0x16b718(0x221)](_0x368679=>typeof _0x30bedc[_0x368679]!==_0x16b718(0x1c7));_0x1e23d7={'oldPath':_0x1ba240,'hasNewConfig':_0x2f30bb,'fields':_0x1e2495};break;}}const _0xe6f0a2=[],_0x271426=resolve(_0x23f2ce,'.lovrabet');if(existsSync(_0x271426))_0xe6f0a2[_0x16b718(0x1bb)](_0x271426);const _0x4b8692=resolve(_0x23f2ce,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x4b8692))_0xe6f0a2[_0x16b718(0x1bb)](_0x4b8692);const _0x1ab39a=resolve(_0x23f2ce,_0x16b718(0x237));if(existsSync(_0x1ab39a))_0xe6f0a2[_0x16b718(0x1bb)](_0x1ab39a);for(const _0x11b4ac of collectIdeSkillFiles(_0x23f2ce)){if(existsSync(_0x11b4ac))_0xe6f0a2[_0x16b718(0x1bb)](_0x11b4ac);}let _0x1638bb=null;const _0x47afc9=resolve(_0x23f2ce,'.cursor/mcp.json');if(existsSync(_0x47afc9))try{const _0x3cd440=JSON[_0x16b718(0x1f6)](readFileSync(_0x47afc9,_0x16b718(0x204)));if(_0x3cd440?.[_0x16b718(0x1ec)]&&typeof _0x3cd440['mcpServers']===_0x16b718(0x227)){const _0x156925=[];for(const [_0x112b7a,_0x30e593]of Object[_0x16b718(0x1d3)](_0x3cd440[_0x16b718(0x1ec)])){const _0x1e4f01=_0x30e593;_0x1e4f01?.['args']&&Array[_0x16b718(0x1f8)](_0x1e4f01['args'])&&_0x1e4f01[_0x16b718(0x1d4)]['some'](_0x2dfe69=>typeof _0x2dfe69==='string'&&_0x2dfe69[_0x16b718(0x1df)](_0x16b718(0x228)))&&_0x156925[_0x16b718(0x1bb)](_0x112b7a);}_0x156925[_0x16b718(0x1da)]>0x0&&(_0x1638bb={'path':_0x47afc9,'keys':_0x156925});}}catch{}const _0x3c1a10=_0xe6f0a2[_0x16b718(0x1da)]>0x0||_0x1e23d7!==null;let _0x459b11=null;const _0x4c34ab=resolve(_0x23f2ce,_0x16b718(0x1f4));if(existsSync(_0x4c34ab))try{const _0x4609f4=JSON[_0x16b718(0x1f6)](readFileSync(_0x4c34ab,_0x16b718(0x204)));for(const _0xa3537a of[_0x16b718(0x1f9),_0x16b718(0x1c6)]){const _0x5b77f3=_0x4609f4?.[_0xa3537a]?.[_0x16b718(0x22b)];if(typeof _0x5b77f3===_0x16b718(0x1f5)){_0x5b77f3!==_0x16b718(0x1d6)&&(_0x459b11={'pkgPath':_0x4c34ab,'currentVersion':_0x5b77f3,'field':_0xa3537a});break;}}}catch{}return{'configMigration':_0x1e23d7,'oldArtifacts':_0xe6f0a2,'oldMcpConfig':_0x1638bb,'needsSkillSwap':_0x3c1a10,'sdkUpgrade':_0x459b11};}function printReport(_0x5a368e){const _0x4718cd=a171_0x102239,{configMigration:_0x547e28,oldArtifacts:_0x17be14,oldMcpConfig:_0x1c2fd1,needsSkillSwap:_0x220dd1}=_0x5a368e;console[_0x4718cd(0x233)](''),console['log'](a171_0x5a8535[_0x4718cd(0x225)]('===\x20Upgrade\x20Analysis\x20===')),console['log']('');_0x547e28?(console[_0x4718cd(0x233)](a171_0x5a8535[_0x4718cd(0x230)](_0x4718cd(0x213))+('\x20\x20'+a171_0x5a8535['yellow'](_0x547e28[_0x4718cd(0x216)]))),console[_0x4718cd(0x233)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x547e28[_0x4718cd(0x220)]?a171_0x5a8535[_0x4718cd(0x1e1)](_0x4718cd(0x209)):a171_0x5a8535['gray'](_0x4718cd(0x231)))),console[_0x4718cd(0x233)](_0x4718cd(0x1c1)+_0x547e28[_0x4718cd(0x1f7)][_0x4718cd(0x1bc)](',\x20')),console[_0x4718cd(0x233)](_0x4718cd(0x1f1))):console[_0x4718cd(0x233)](a171_0x5a8535[_0x4718cd(0x230)](_0x4718cd(0x213))+'\x20\x20'+a171_0x5a8535[_0x4718cd(0x1bf)](_0x4718cd(0x239)));console[_0x4718cd(0x233)]('');if(_0x17be14[_0x4718cd(0x1da)]>0x0){console[_0x4718cd(0x233)](a171_0x5a8535[_0x4718cd(0x230)]('Legacy\x20artifacts:'));for(const _0x3a0c8b of _0x17be14){console[_0x4718cd(0x233)]('\x20\x20'+a171_0x5a8535[_0x4718cd(0x1e0)](_0x4718cd(0x1de))+'\x20\x20'+_0x3a0c8b);}console[_0x4718cd(0x233)](_0x4718cd(0x1c2));}else console['log'](a171_0x5a8535['cyan']('Legacy\x20artifacts:')+'\x20\x20'+a171_0x5a8535[_0x4718cd(0x1bf)](_0x4718cd(0x22c)));console[_0x4718cd(0x233)]('');_0x1c2fd1?(console[_0x4718cd(0x233)](a171_0x5a8535[_0x4718cd(0x230)]('MCP\x20config:')+('\x20\x20'+a171_0x5a8535['yellow'](_0x1c2fd1['path'])+_0x4718cd(0x223)+_0x1c2fd1[_0x4718cd(0x1d9)][_0x4718cd(0x1bc)](',\x20'))),console['log'](_0x4718cd(0x1ce))):console[_0x4718cd(0x233)](a171_0x5a8535[_0x4718cd(0x230)](_0x4718cd(0x1d1))+'\x20\x20'+a171_0x5a8535['gray']('no\x20legacy\x20entry'));console[_0x4718cd(0x233)](''),console[_0x4718cd(0x233)](a171_0x5a8535['cyan'](_0x4718cd(0x1c3))+('\x20\x20'+(_0x220dd1?a171_0x5a8535[_0x4718cd(0x215)]('needed'):a171_0x5a8535[_0x4718cd(0x1e1)](_0x4718cd(0x217)))));_0x220dd1&&console[_0x4718cd(0x233)](_0x4718cd(0x202)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x5a368e[_0x4718cd(0x210)]){const {currentVersion:_0x6a7e6d,field:_0x37fb00,pkgPath:_0x33f395}=_0x5a368e[_0x4718cd(0x210)];console[_0x4718cd(0x233)](a171_0x5a8535[_0x4718cd(0x230)](_0x4718cd(0x212))+('\x20\x20'+a171_0x5a8535[_0x4718cd(0x215)](_0x33f395))),console[_0x4718cd(0x233)](_0x4718cd(0x21d)+_0x37fb00+':\x20'+a171_0x5a8535[_0x4718cd(0x215)](_0x6a7e6d)+'\x20→\x20'+a171_0x5a8535[_0x4718cd(0x1e1)](_0x4718cd(0x1d6))),console[_0x4718cd(0x233)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0x4718cd(0x233)](a171_0x5a8535['cyan'](_0x4718cd(0x212))+'\x20\x20'+a171_0x5a8535[_0x4718cd(0x1bf)]('not\x20found\x20or\x20already\x20at\x20latest'));console['log']('');}function a171_0x537e(){const _0x53b8bd=['3918ZAbYRy','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','810990hiuyWV','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','Remove\x20.lovrabet/','detail','start','Clean\x20MCP\x20config','fail','mcpServers','203769SfzUNQ','oldMcpConfig','Upgrade\x20cancelled.','Step\x201/7:\x20Migrating\x20config...','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Step\x201/7:\x20Config\x20migration\x20—\x20','33ieErEl','package.json','string','parse','fields','isArray','dependencies','Config\x20migration','\x20\x20\x20\x20\x20\x20\x20','removed\x20','Remove\x20legacy\x20artifacts','lovrabet/rabetbase','\x20from\x20','inherit','372195uOffWe','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','done','utf8','44457jaOBFB','stringify','info','step','already\x20exists\x20(will\x20merge)','\x20→\x20latest','failed','1438xiTqyB','2615145DSuqdt','Proceed\x20with\x20upgrade?','Step\x206/7:\x20Installing\x20new\x20skill...','sdkUpgrade','FAIL','@lovrabet/sdk:','Config\x20file:','lovrabet/rabetbase\x20installed\x20globally','yellow','oldPath','not\x20needed','Step\x204/7:\x20MCP\x20config\x20—\x20','[\x22@lovrabet/sdk\x22]:\x20','files','\x20removed','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','\x20\x20Current\x20version\x20in\x20','error','cwd','hasNewConfig','filter','\x20(backup:\x20','\x20→\x20keys:\x20','exit\x20','bold','yes','object','@lovrabet/dataset-mcp-server','\x20→\x20','white','@lovrabet/sdk','none\x20found','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','skipped','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','cyan','not\x20found\x20(will\x20create)','needsSkillSwap','log','isDirectory','Remove\x20old\x20skill','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','.claude/skills/lovrabet','no\x20matching\x20entry\x20found','no\x20legacy\x20config\x20found','push','join','\x20\x20bun\x20install','.bak','gray','24DtbKBo','\x20\x20Fields\x20to\x20migrate:\x20','\x20\x20Action:\x20delete','Skill\x20swap:','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Upgrade\x20@lovrabet/sdk','devDependencies','undefined','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','Upgrade\x20completed\x20successfully!','\x20\x20Step\x20','\x20removed\x20(','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','oldArtifacts','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Step\x204/7:\x20Cleaning\x20MCP\x20config...','62tWZDce','MCP\x20config:','some','entries','args','succeed','latest','2005wzcYlY','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','keys','length','path','8ioDrgO','message','FOUND','includes','red','green','12jcgwwl'];a171_0x537e=function(){return _0x53b8bd;};return a171_0x537e();}function execConfigMigration(_0x32ae5d,_0x13a2cc){const _0x20f13a=a171_0x102239,{configMigration:_0x3f1103}=_0x32ae5d;if(!_0x3f1103?.[_0x20f13a(0x216)])return{'step':0x1,'label':_0x20f13a(0x1fa),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x509ced=readConfigFile(_0x3f1103[_0x20f13a(0x216)]),_0x2bf992=resolve(_0x13a2cc,NEW_CONFIG_NAME),_0x128464=_0x3f1103[_0x20f13a(0x220)]?readConfigFile(_0x2bf992):{};for(const [_0x51f4a7,_0x19df34]of Object['entries'](_0x509ced)){!(_0x51f4a7 in _0x128464)&&(_0x128464[_0x51f4a7]=_0x19df34);}writeConfigFile(_0x2bf992,_0x128464);const _0x3b3e5d=_0x3f1103[_0x20f13a(0x216)]+_0x20f13a(0x1be);return renameSync(_0x3f1103[_0x20f13a(0x216)],_0x3b3e5d),{'step':0x1,'label':_0x20f13a(0x1fa),'ok':!![],'detail':_0x3f1103[_0x20f13a(0x216)]+_0x20f13a(0x229)+_0x2bf992+_0x20f13a(0x222)+_0x3b3e5d+')'};}function execRemoveOldArtifacts(_0x390fa5){const _0x5c6310=a171_0x102239,_0x18fe2e=[];for(const _0x132ee7 of _0x390fa5){try{if(!existsSync(_0x132ee7))continue;const _0x85ffea=tryStat(_0x132ee7);_0x85ffea?.[_0x5c6310(0x234)]()?rmSync(_0x132ee7,{'recursive':!![],'force':!![]}):unlinkSync(_0x132ee7);}catch(_0x16705f){_0x18fe2e['push'](_0x132ee7+':\x20'+_0x16705f[_0x5c6310(0x1dd)]);}}return{'step':0x3,'label':_0x5c6310(0x1fd),'ok':_0x18fe2e[_0x5c6310(0x1da)]===0x0,'detail':_0x18fe2e[_0x5c6310(0x1da)]>0x0?_0x390fa5[_0x5c6310(0x1da)]-_0x18fe2e[_0x5c6310(0x1da)]+'/'+_0x390fa5[_0x5c6310(0x1da)]+_0x5c6310(0x1cb)+_0x18fe2e['join'](';\x20')+')':_0x390fa5[_0x5c6310(0x1da)]+_0x5c6310(0x21b)};}function execCleanMcp(_0x589e62){const _0x37e84f=a171_0x102239;if(!_0x589e62['oldMcpConfig'])return{'step':0x4,'label':_0x37e84f(0x1ea),'ok':!![],'detail':_0x37e84f(0x22e)};try{const _0x27b529=readFileSync(_0x589e62[_0x37e84f(0x1ee)][_0x37e84f(0x1db)],_0x37e84f(0x204)),_0x102d2f=JSON[_0x37e84f(0x1f6)](_0x27b529);if(_0x102d2f?.['mcpServers']&&typeof _0x102d2f[_0x37e84f(0x1ec)]===_0x37e84f(0x227)){const _0x45f571=[];for(const [_0xda3afb,_0x1c8eaf]of Object['entries'](_0x102d2f['mcpServers'])){_0x1c8eaf?.[_0x37e84f(0x1d4)]&&Array[_0x37e84f(0x1f8)](_0x1c8eaf['args'])&&_0x1c8eaf['args'][_0x37e84f(0x1d2)](_0x2628e3=>typeof _0x2628e3===_0x37e84f(0x1f5)&&_0x2628e3[_0x37e84f(0x1df)](_0x37e84f(0x228)))&&_0x45f571[_0x37e84f(0x1bb)](_0xda3afb);}for(const _0x14c525 of _0x45f571){delete _0x102d2f[_0x37e84f(0x1ec)][_0x14c525];}return _0x45f571[_0x37e84f(0x1da)]>0x0&&writeFileSync(_0x589e62['oldMcpConfig'][_0x37e84f(0x1db)],JSON[_0x37e84f(0x206)](_0x102d2f,null,0x2)+'\x0a',_0x37e84f(0x204)),{'step':0x4,'label':_0x37e84f(0x1ea),'ok':!![],'detail':_0x37e84f(0x1fc)+_0x45f571[_0x37e84f(0x1bc)](',\x20')+_0x37e84f(0x1ff)+_0x589e62[_0x37e84f(0x1ee)][_0x37e84f(0x1db)]};}return{'step':0x4,'label':_0x37e84f(0x1ea),'ok':!![],'detail':_0x37e84f(0x238)};}catch(_0x401b82){return{'step':0x4,'label':_0x37e84f(0x1ea),'ok':![],'detail':_0x401b82[_0x37e84f(0x1dd)]};}}function execSkillsRemove(_0x3b0a54,_0x75c7c5){const _0x46e29f=a171_0x102239,_0x217854=runNpxSkillsRemove(_0x3b0a54,{'stdio':_0x46e29f(0x200),'yes':_0x75c7c5});return{'step':0x5,'label':_0x46e29f(0x235),'ok':_0x217854['ok'],'detail':_0x217854['ok']?'lovrabet/lovrabet-skill\x20removed':_0x217854[_0x46e29f(0x21e)]??'exit\x20'+_0x217854['status']};}function execSkillsAdd(_0x3dce44,_0x34ce41){const _0x3a4c53=a171_0x102239,_0x57cda5=runNpxSkillsAddGlobal(_0x3dce44,_0x3a4c53(0x1fe),{'stdio':'inherit','yes':_0x34ce41});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x57cda5['ok'],'detail':_0x57cda5['ok']?_0x3a4c53(0x214):_0x57cda5['error']??_0x3a4c53(0x224)+_0x57cda5['status']};}function execUpgradeSdk(_0x588528){const _0x256387=a171_0x102239;if(!_0x588528['sdkUpgrade'])return{'step':0x7,'label':_0x256387(0x1c5),'ok':!![],'detail':_0x256387(0x21c)};const {pkgPath:_0x59e7b3,currentVersion:_0xc8883f,field:_0x4b7143}=_0x588528[_0x256387(0x210)];try{const _0x15f7b6=readFileSync(_0x59e7b3,_0x256387(0x204)),_0x499582=JSON['parse'](_0x15f7b6);return _0x499582[_0x4b7143]['@lovrabet/sdk']=_0x256387(0x1d6),writeFileSync(_0x59e7b3,JSON[_0x256387(0x206)](_0x499582,null,0x2)+'\x0a',_0x256387(0x204)),{'step':0x7,'label':_0x256387(0x1c5),'ok':!![],'detail':_0x4b7143+_0x256387(0x219)+_0xc8883f+_0x256387(0x20a)};}catch(_0x3ec454){return{'step':0x7,'label':_0x256387(0x1c5),'ok':![],'detail':_0x3ec454[_0x256387(0x1dd)]};}}function tryStat(_0x15aba8){try{return statSync(_0x15aba8);}catch{return undefined;}}function printSummary(_0x466179){const _0xa67d53=a171_0x102239;console['log'](''),console[_0xa67d53(0x233)](a171_0x5a8535[_0xa67d53(0x225)]('===\x20Upgrade\x20Summary\x20===')),console['log']('');for(const _0x384720 of _0x466179){const _0x55af8c=_0x384720['ok']?a171_0x5a8535['green']('OK'):a171_0x5a8535['red'](_0xa67d53(0x211));console[_0xa67d53(0x233)]('\x20\x20'+_0x55af8c+_0xa67d53(0x1ca)+_0x384720[_0xa67d53(0x208)]+':\x20'+_0x384720['label']);if(_0x384720[_0xa67d53(0x1e8)])console[_0xa67d53(0x233)](_0xa67d53(0x1fb)+a171_0x5a8535['gray'](_0x384720[_0xa67d53(0x1e8)]));}console[_0xa67d53(0x233)]('');}export async function upgradeApp(_0x324f36,_0x4d5009){const _0x12934b=a171_0x102239,_0x30430e=process[_0x12934b(0x21f)](),_0x28d115=analyse(_0x30430e),_0x123654=!_0x28d115['configMigration']&&_0x28d115[_0x12934b(0x1cd)][_0x12934b(0x1da)]===0x0&&!_0x28d115[_0x12934b(0x1ee)]&&!_0x28d115[_0x12934b(0x232)]&&!_0x28d115[_0x12934b(0x210)];if(_0x123654){console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x1e1)](_0x12934b(0x236)));return;}printReport(_0x28d115);const _0x3bb189=!!(_0x4d5009[_0x12934b(0x226)]||_0x4d5009['Y']||_0x324f36);if(!_0x3bb189)try{const _0x592ca9=await askConfirm(_0x12934b(0x20e));if(!_0x592ca9){console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x1bf)]('Upgrade\x20cancelled.'));return;}}catch(_0x17f73f){if(_0x17f73f?.[_0x12934b(0x1dd)]==='CANCEL'){console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x1bf)](_0x12934b(0x1ef)));return;}throw _0x17f73f;}const _0x145c14=[],_0x2a3183=a171_0x23dfde({'text':_0x12934b(0x1f0),'color':_0x12934b(0x230)})[_0x12934b(0x1e9)](),_0x59d1ca=execConfigMigration(_0x28d115,_0x30430e);_0x145c14['push'](_0x59d1ca),_0x2a3183[_0x59d1ca['ok']?_0x12934b(0x1d5):_0x12934b(0x1eb)](_0x12934b(0x1f2)+(_0x59d1ca['detail']??(_0x59d1ca['ok']?_0x12934b(0x203):_0x12934b(0x20b))));const _0x297b72=resolve(_0x30430e,'.lovrabet'),_0x56da7e=a171_0x23dfde({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':'cyan'})[_0x12934b(0x1e9)]();if(existsSync(_0x297b72))try{rmSync(_0x297b72,{'recursive':!![],'force':!![]}),_0x56da7e[_0x12934b(0x1d5)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x145c14[_0x12934b(0x1bb)]({'step':0x2,'label':_0x12934b(0x1e7),'ok':!![]});}catch(_0x41f3dd){_0x56da7e[_0x12934b(0x1eb)](_0x12934b(0x1e4)+_0x41f3dd[_0x12934b(0x1dd)]),_0x145c14[_0x12934b(0x1bb)]({'step':0x2,'label':_0x12934b(0x1e7),'ok':![],'detail':_0x41f3dd[_0x12934b(0x1dd)]});}else _0x56da7e[_0x12934b(0x207)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x145c14[_0x12934b(0x1bb)]({'step':0x2,'label':_0x12934b(0x1e7),'ok':!![],'detail':'skipped'});const _0x5b6872=a171_0x23dfde({'text':_0x12934b(0x1cc),'color':'cyan'})[_0x12934b(0x1e9)](),_0x51e750=execRemoveOldArtifacts(_0x28d115[_0x12934b(0x1cd)]);_0x145c14[_0x12934b(0x1bb)](_0x51e750),_0x5b6872[_0x51e750['ok']?'succeed':_0x12934b(0x1eb)](_0x12934b(0x1e6)+(_0x51e750['detail']??(_0x51e750['ok']?_0x12934b(0x203):_0x12934b(0x20b))));const _0x371ed6=a171_0x23dfde({'text':_0x12934b(0x1cf),'color':_0x12934b(0x230)})[_0x12934b(0x1e9)](),_0x2be15b=execCleanMcp(_0x28d115);_0x145c14[_0x12934b(0x1bb)](_0x2be15b),_0x371ed6[_0x2be15b['ok']?_0x12934b(0x1d5):_0x12934b(0x1eb)](_0x12934b(0x218)+(_0x2be15b['detail']??(_0x2be15b['ok']?_0x12934b(0x203):'failed')));const _0x2c9b27=a171_0x23dfde({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x12934b(0x230)})[_0x12934b(0x1e9)](),_0x33e1a6=execSkillsRemove(_0x30430e,_0x3bb189);_0x145c14[_0x12934b(0x1bb)](_0x33e1a6),_0x2c9b27[_0x33e1a6['ok']?_0x12934b(0x1d5):_0x12934b(0x1eb)]('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x33e1a6[_0x12934b(0x1e8)]??(_0x33e1a6['ok']?_0x12934b(0x203):_0x12934b(0x20b))));const _0x1fa656=a171_0x23dfde({'text':_0x12934b(0x20f),'color':_0x12934b(0x230)})[_0x12934b(0x1e9)](),_0xafdbea=execSkillsAdd(_0x30430e,_0x3bb189);_0x145c14['push'](_0xafdbea),_0x1fa656[_0xafdbea['ok']?_0x12934b(0x1d5):_0x12934b(0x1eb)](_0x12934b(0x1c4)+(_0xafdbea['detail']??(_0xafdbea['ok']?_0x12934b(0x203):_0x12934b(0x20b))));const _0x2be330=a171_0x23dfde({'text':_0x12934b(0x1c8),'color':_0x12934b(0x230)})['start'](),_0x4edd8a=execUpgradeSdk(_0x28d115);_0x145c14[_0x12934b(0x1bb)](_0x4edd8a),_0x2be330[_0x4edd8a['ok']?_0x12934b(0x1d5):_0x12934b(0x1eb)](_0x12934b(0x22d)+(_0x4edd8a[_0x12934b(0x1e8)]??(_0x4edd8a['ok']?'done':'failed'))),printSummary(_0x145c14);const _0x2c91da=_0x145c14[_0x12934b(0x1d2)](_0x5798d2=>!_0x5798d2['ok']);_0x2c91da?console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x215)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x1e1)](_0x12934b(0x1c9))),_0x4edd8a['ok']&&_0x28d115[_0x12934b(0x210)]&&(console['log'](''),console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x225)][_0x12934b(0x230)](_0x12934b(0x22f))),console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x230)](_0x12934b(0x1d8))),console[_0x12934b(0x233)](''),console['log'](a171_0x5a8535['white']('\x20\x20npm\x20install')),console[_0x12934b(0x233)](a171_0x5a8535['white']('\x20\x20#\x20or')),console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x22a)](_0x12934b(0x1bd))),console[_0x12934b(0x233)](''));}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a178_0x58ebe4=a178_0xfa01;(function(_0x317d99,_0x6895a7){const _0x5151d1=a178_0xfa01,_0x28d514=_0x317d99();while(!![]){try{const _0xb99ac5=parseInt(_0x5151d1(0xba))/0x1+parseInt(_0x5151d1(0xbd))/0x2*(parseInt(_0x5151d1(0xb2))/0x3)+-parseInt(_0x5151d1(0xe3))/0x4*(parseInt(_0x5151d1(0x10a))/0x5)+parseInt(_0x5151d1(0xd1))/0x6+-parseInt(_0x5151d1(0xc7))/0x7*(-parseInt(_0x5151d1(0xdf))/0x8)+parseInt(_0x5151d1(0xe4))/0x9*(parseInt(_0x5151d1(0xd5))/0xa)+-parseInt(_0x5151d1(0xd8))/0xb*(parseInt(_0x5151d1(0x102))/0xc);if(_0xb99ac5===_0x6895a7)break;else _0x28d514['push'](_0x28d514['shift']());}catch(_0x167fbe){_0x28d514['push'](_0x28d514['shift']());}}}(a178_0x6514,0xcd8fc));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{permitDefinitions}from'../commands/permit/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{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();function a178_0x6514(){const _0x143525=['rabetbase\x20sql\x20create','project:init','Configuration','7xTrrWh','Permissions','read','Run\x20any\x20package.json\x20script','has','menu:update','skills:install','rabetbase\x20menu\x20asset-update','File','rabetbase\x20app\x20list\x20--remote','3538404eOrmDn','API\x20Development','Logs','Use\x20`','114020rQpVeZ','run','\x20\x20[','14817jeMOff','push','rabetbase\x20auth\x20logout','rabetbase\x20kb\x20detail','rabetbase\x20kb\x20update','bff:new','hidden','1368184iHTZZu','Authentication','defaultCommand','BFF\x20Scripts','16oiLWfc','747AadRSU','OCR','Quick\x20Start','rabetbase\x20workspace\x20use\x20--app\x20<name>','Tenant\x20Members','set','knowledge-base:delete','commands','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','values','Smart\x20List\x20Pages\x20&\x20React\x20Custom\x20Pages','Database\x20Connections','rabetbase\x20kb\x20list','Notification\x20Configuration','create','write','Code\x20Generation','rabetbase\x20run\x20preview','wildcardDef','Roles','skills:','description','Schema','Project','rabetbase\x20workspace\x20remove\x20<name>','map','show','rabetbase\x20kb\x20delete','filter','app:add','30288NtxzJu','rabetbase\x20run\x20build','Menu','rabetbase\x20kb\x20create','skill:install','`\x20instead.','app:remove','rabetbase\x20project\x20create\x20<project-name>','694615AXwXNl','\x20\x20[write]','knowledge-base:create','rabetbase\x20cli-skill\x20install','App\x20Management','isSingleCommand','skill:','sql:new','from','366mtuoZa','SQL\x20Queries','Runtime\x20App\x20Config\x20Management','service','start','command','rabetbase\x20bff\x20create','Workspace','1478269rxNFtj','\x20\x20[high-risk-write]','logout','26428kGnmnD','rabetbase\x20run\x20start','install','get','app:use','length','knowledge-base:list'];a178_0x6514=function(){return _0x143525;};return a178_0x6514();}export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x3ad901){const _0x33ed8a=a178_0xfa01;for(const _0x164f44 of _0x3ad901){definitions[_0x33ed8a(0xe9)](_0x164f44[_0x33ed8a(0xb5)]+':'+_0x164f44[_0x33ed8a(0xb7)],_0x164f44);let _0x49f74e=serviceGroups[_0x33ed8a(0xc0)](_0x164f44[_0x33ed8a(0xb5)]);!_0x49f74e&&(_0x49f74e=[],serviceGroups[_0x33ed8a(0xe9)](_0x164f44[_0x33ed8a(0xb5)],_0x49f74e)),_0x49f74e[_0x33ed8a(0xd9)](_0x164f44);}}function registerDeclarativeService(_0x2afaf1,_0x5511bd,_0x6c5979){const _0x468b2c=a178_0xfa01;registerDefinitions(_0x5511bd);_0x6c5979?.[_0x468b2c(0xf6)]&®isterDefinitions([_0x6c5979['wildcardDef']]);const _0x326087=_0x47e2bd=>_0x47e2bd===_0x468b2c(0xc9)?'':_0x47e2bd===_0x468b2c(0xf3)?_0x468b2c(0x10b):_0x468b2c(0xbb),_0x368c5={'service':_0x5511bd[0x0]['service'],'label':_0x2afaf1,'commands':_0x5511bd[_0x468b2c(0x100)](_0x13142c=>!_0x13142c[_0x468b2c(0xde)])[_0x468b2c(0xfd)](_0x3a202f=>({'command':_0x3a202f[_0x468b2c(0xb7)],'description':_0x3a202f[_0x468b2c(0xf9)],'tag':_0x326087(_0x3a202f['risk'])})),'declarative':!![],'defaultCommand':_0x6c5979?.[_0x468b2c(0xe1)]??(_0x6c5979?.[_0x468b2c(0x10f)]?_0x5511bd[0x0]['command']:undefined),'wildcardDef':_0x6c5979?.[_0x468b2c(0xf6)],'isSingleCommand':_0x6c5979?.[_0x468b2c(0x10f)]};serviceRegistry[_0x468b2c(0xd9)](_0x368c5),serviceByName[_0x468b2c(0xe9)](_0x368c5[_0x468b2c(0xb5)],_0x368c5);}registerDeclarativeService(a178_0x58ebe4(0xe6),initDefinitions,{'defaultCommand':a178_0x58ebe4(0xd6),'isSingleCommand':!![]}),registerDeclarativeService(a178_0x58ebe4(0xfb),projectDefinitions),registerDeclarativeService(a178_0x58ebe4(0xb9),workspaceDefinitions),registerDeclarativeService(a178_0x58ebe4(0x10e),appDefinitions),registerDeclarativeService(a178_0x58ebe4(0xe0),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a178_0x58ebe4(0xe8),tenantDefinitions),registerDeclarativeService('User\x20Accounts',userAccountDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService(a178_0x58ebe4(0xee),pageDefinitions),registerDeclarativeService(a178_0x58ebe4(0xd2),apiDefinitions),registerDeclarativeService('Instant\x20API',dataDefinitions),registerDeclarativeService(a178_0x58ebe4(0xe2),bffDefinitions),registerDeclarativeService(a178_0x58ebe4(0xf1),notificationDefinitions),registerDeclarativeService(a178_0x58ebe4(0xb3),sqlDefinitions),registerDeclarativeService(a178_0x58ebe4(0xef),dbDefinitions),registerDeclarativeService(a178_0x58ebe4(0x104),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService(a178_0x58ebe4(0xf7),roleDefinitions),registerDeclarativeService(a178_0x58ebe4(0xc8),permitDefinitions),registerDeclarativeService(a178_0x58ebe4(0xb4),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a178_0x58ebe4(0xcf),fileDefinitions),registerDeclarativeService(a178_0x58ebe4(0xe5),ocrDefinitions),registerDeclarativeService(a178_0x58ebe4(0xf4),codegenDefinitions),registerDeclarativeService(a178_0x58ebe4(0xc6),configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a178_0x58ebe4(0xfa),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a178_0x58ebe4(0xbf)}),registerDeclarativeService(a178_0x58ebe4(0xd3),logsDefinitions,{'defaultCommand':a178_0x58ebe4(0xfe)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a178_0x58ebe4(0xc2)]-0x1];last[a178_0x58ebe4(0xeb)]=[{'command':'<script>','description':a178_0x58ebe4(0xca),'tag':a178_0x58ebe4(0xd7)+runDefinition['risk']+']'}];}function a178_0xfa01(_0x533571,_0x25bbd1){_0x533571=_0x533571-0xb2;const _0x6514d=a178_0x6514();let _0xfa01d6=_0x6514d[_0x533571];return _0xfa01d6;}const REMOVED_COMMAND_REPLACEMENTS=new Map([['sql:save','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a178_0x58ebe4(0xdd),a178_0x58ebe4(0xb8)],[a178_0x58ebe4(0x111),a178_0x58ebe4(0xc4)],[a178_0x58ebe4(0xcc),a178_0x58ebe4(0xce)],[a178_0x58ebe4(0xc5),'rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],[a178_0x58ebe4(0x110),a178_0x58ebe4(0x10d)],[a178_0x58ebe4(0x106),a178_0x58ebe4(0x10d)],[a178_0x58ebe4(0xf8),a178_0x58ebe4(0x10d)],[a178_0x58ebe4(0xcd),a178_0x58ebe4(0x10d)],['app:remote',a178_0x58ebe4(0xd0)],[a178_0x58ebe4(0xc1),a178_0x58ebe4(0xe7)],[a178_0x58ebe4(0x101),a178_0x58ebe4(0xec)],[a178_0x58ebe4(0x108),a178_0x58ebe4(0xfc)],[a178_0x58ebe4(0xc3),a178_0x58ebe4(0xf0)],['knowledge-base:detail',a178_0x58ebe4(0xdb)],[a178_0x58ebe4(0x10c),a178_0x58ebe4(0x105)],['knowledge-base:update',a178_0x58ebe4(0xdc)],[a178_0x58ebe4(0xea),a178_0x58ebe4(0xff)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a178_0x58ebe4(0xf2),a178_0x58ebe4(0x109)],[a178_0x58ebe4(0xb6),a178_0x58ebe4(0xbe)],['build',a178_0x58ebe4(0x103)],['preview',a178_0x58ebe4(0xf5)],[a178_0x58ebe4(0xbc),a178_0x58ebe4(0xda)]]);export function resolveRemovedCommand(_0x18c12a,_0x455c34){const _0x47e995=a178_0x58ebe4;if(!_0x18c12a)return undefined;const _0x315ff9=REMOVED_COMMAND_REPLACEMENTS['get'](_0x18c12a+':'+(_0x455c34??'')),_0x568296=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x47e995(0xc0)](_0x18c12a),_0x1aff07=_0x315ff9??_0x568296;if(!_0x1aff07)return undefined;const _0x65317f=_0x568296?_0x18c12a:_0x455c34?_0x18c12a+'\x20'+_0x455c34:_0x18c12a;return{'command':_0x65317f,'message':'`rabetbase\x20'+_0x65317f+'`\x20has\x20been\x20removed.','hint':_0x47e995(0xd4)+_0x1aff07+_0x47e995(0x107)};}export function findDefinition(_0x35f5ed,_0x2d60d1){const _0x559f8d=a178_0x58ebe4;return definitions[_0x559f8d(0xc0)](_0x35f5ed+':'+_0x2d60d1);}export function isKnownService(_0x334c61){const _0x53a810=a178_0x58ebe4;return serviceByName[_0x53a810(0xcb)](_0x334c61);}export function isDeclarativeService(_0x53d97f){const _0x3346fc=a178_0x58ebe4;return serviceGroups[_0x3346fc(0xcb)](_0x53d97f)||serviceByName['get'](_0x53d97f)?.[_0x3346fc(0xf6)]!==undefined;}export function getServiceEntry(_0x28bd49){return serviceByName['get'](_0x28bd49);}export function getLegacyHandler(_0x35655b,_0x1b9719){return undefined;}export function getAllDefinitions(){const _0x443329=a178_0x58ebe4;return Array[_0x443329(0x112)](definitions[_0x443329(0xed)]());}
|
|
1
|
+
const a172_0x581ed5=a172_0x1384;(function(_0x486023,_0x3767b8){const _0x445e8f=a172_0x1384,_0x27d1be=_0x486023();while(!![]){try{const _0x3a0d7d=parseInt(_0x445e8f(0x102))/0x1+-parseInt(_0x445e8f(0xf6))/0x2*(-parseInt(_0x445e8f(0xe8))/0x3)+parseInt(_0x445e8f(0xd9))/0x4*(parseInt(_0x445e8f(0xe3))/0x5)+parseInt(_0x445e8f(0xce))/0x6*(parseInt(_0x445e8f(0xb6))/0x7)+-parseInt(_0x445e8f(0xe7))/0x8*(parseInt(_0x445e8f(0xbb))/0x9)+-parseInt(_0x445e8f(0xcf))/0xa+-parseInt(_0x445e8f(0xcd))/0xb;if(_0x3a0d7d===_0x3767b8)break;else _0x27d1be['push'](_0x27d1be['shift']());}catch(_0x10ab86){_0x27d1be['push'](_0x27d1be['shift']());}}}(a172_0x4f95,0x21361));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_0x1384(_0x5b48e6,_0x59e37c){_0x5b48e6=_0x5b48e6-0xb2;const _0x4f955d=a172_0x4f95();let _0x138406=_0x4f955d[_0x5b48e6];return _0x138406;}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';function a172_0x4f95(){const _0x44c768=['Dataset\x20&\x20Operations','login','app:remove','write','knowledge-base:create','skill:install','rabetbase\x20kb\x20detail','1180515hbWQrq','values','rabetbase\x20cli-skill\x20install','SQL\x20Queries','432NMCOeC','3ltIQUf','rabetbase\x20run\x20build','rabetbase\x20bff\x20create','Instant\x20API','permit:role-apis-set','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','get','isSingleCommand','CLI\x20Built-in\x20Skill','push','BFF\x20Scripts','permit:page-set','length','permit:page-get','355302sixpQh','rabetbase\x20workspace\x20remove\x20<name>','Company\x20Knowledge\x20Base','skill:','Run\x20any\x20package.json\x20script','Logs','rabetbase\x20kb\x20delete','run','\x20\x20[write]','command','Project','Workspace','98827pRacbn','role:create','hidden','\x20\x20[','Self\x20Update','description','risk','map','read','Menu','rabetbase\x20kb\x20list','set','service','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20kb\x20update','`\x20has\x20been\x20removed.','Database\x20Connections','OCR','Quick\x20Start','14YzByUh','Use\x20`','sql:new','rabetbase\x20role\x20list','rabetbase\x20run\x20preview','13473ADLRIr','app:add','rabetbase\x20app\x20list\x20--remote','knowledge-base:delete','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','File','`\x20instead.','<script>','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Schema','from','start','Run\x20Scripts','sql:save','knowledge-base:list','preview','commands','wildcardDef','2848098TLeAZa','285378YPRway','1319180QOVEPJ','bff:new','menu:update','create','show','logout','skills:install','Tenant\x20Members','has','API\x20Development','4uvqOqn','knowledge-base:update','Authentication'];a172_0x4f95=function(){return _0x44c768;};return a172_0x4f95();}import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{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(_0x59c916){const _0x13a4e6=a172_0x1384;for(const _0x529508 of _0x59c916){definitions[_0x13a4e6(0x10d)](_0x529508[_0x13a4e6(0x10e)]+':'+_0x529508[_0x13a4e6(0xff)],_0x529508);let _0x111878=serviceGroups['get'](_0x529508[_0x13a4e6(0x10e)]);!_0x111878&&(_0x111878=[],serviceGroups[_0x13a4e6(0x10d)](_0x529508[_0x13a4e6(0x10e)],_0x111878)),_0x111878[_0x13a4e6(0xf1)](_0x529508);}}function registerDeclarativeService(_0x32c130,_0xd1c07e,_0x4e25b0){const _0x2b8557=a172_0x1384;registerDefinitions(_0xd1c07e);_0x4e25b0?.[_0x2b8557(0xcc)]&®isterDefinitions([_0x4e25b0[_0x2b8557(0xcc)]]);const _0x71c20f=_0x33c23f=>_0x33c23f===_0x2b8557(0x10a)?'':_0x33c23f===_0x2b8557(0xdf)?_0x2b8557(0xfe):'\x20\x20[high-risk-write]',_0x349797={'service':_0xd1c07e[0x0][_0x2b8557(0x10e)],'label':_0x32c130,'commands':_0xd1c07e['filter'](_0x46cb97=>!_0x46cb97[_0x2b8557(0x104)])[_0x2b8557(0x109)](_0x1dbfbe=>({'command':_0x1dbfbe[_0x2b8557(0xff)],'description':_0x1dbfbe[_0x2b8557(0x107)],'tag':_0x71c20f(_0x1dbfbe[_0x2b8557(0x108)])})),'declarative':!![],'defaultCommand':_0x4e25b0?.['defaultCommand']??(_0x4e25b0?.[_0x2b8557(0xef)]?_0xd1c07e[0x0][_0x2b8557(0xff)]:undefined),'wildcardDef':_0x4e25b0?.[_0x2b8557(0xcc)],'isSingleCommand':_0x4e25b0?.[_0x2b8557(0xef)]};serviceRegistry[_0x2b8557(0xf1)](_0x349797),serviceByName[_0x2b8557(0x10d)](_0x349797['service'],_0x349797);}registerDeclarativeService(a172_0x581ed5(0xb5),initDefinitions,{'defaultCommand':a172_0x581ed5(0xfd),'isSingleCommand':!![]}),registerDeclarativeService(a172_0x581ed5(0x100),projectDefinitions),registerDeclarativeService(a172_0x581ed5(0x101),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a172_0x581ed5(0xdb),authDefinitions,{'defaultCommand':a172_0x581ed5(0xdd)}),registerDeclarativeService(a172_0x581ed5(0xd6),tenantDefinitions),registerDeclarativeService('User\x20Accounts',userAccountDefinitions),registerDeclarativeService(a172_0x581ed5(0xdc),datasetDefinitions),registerDeclarativeService('Smart\x20List\x20Pages\x20&\x20React\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService(a172_0x581ed5(0xd8),apiDefinitions),registerDeclarativeService(a172_0x581ed5(0xeb),dataDefinitions),registerDeclarativeService(a172_0x581ed5(0xf2),bffDefinitions),registerDeclarativeService('Notification\x20Configuration',notificationDefinitions),registerDeclarativeService(a172_0x581ed5(0xe6),sqlDefinitions),registerDeclarativeService(a172_0x581ed5(0xb3),dbDefinitions),registerDeclarativeService(a172_0x581ed5(0x10b),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService(a172_0x581ed5(0xf8),kbDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a172_0x581ed5(0xc0),fileDefinitions),registerDeclarativeService(a172_0x581ed5(0xb4),ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a172_0x581ed5(0xc4),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a172_0x581ed5(0x106),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a172_0x581ed5(0xf0),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a172_0x581ed5(0xfb),logsDefinitions,{'defaultCommand':a172_0x581ed5(0xd3)}),registerDeclarativeService(a172_0x581ed5(0xc7),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a172_0x581ed5(0xf4)]-0x1];last[a172_0x581ed5(0xcb)]=[{'command':a172_0x581ed5(0xc2),'description':a172_0x581ed5(0xfa),'tag':a172_0x581ed5(0x105)+runDefinition[a172_0x581ed5(0x108)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a172_0x581ed5(0xc8),a172_0x581ed5(0xc3)],[a172_0x581ed5(0xd0),a172_0x581ed5(0xea)],[a172_0x581ed5(0xb8),'rabetbase\x20sql\x20create'],[a172_0x581ed5(0xd1),'rabetbase\x20menu\x20asset-update'],['project:init',a172_0x581ed5(0xed)],[a172_0x581ed5(0xf9),a172_0x581ed5(0xe5)],[a172_0x581ed5(0xe1),a172_0x581ed5(0xe5)],['skills:',a172_0x581ed5(0xe5)],[a172_0x581ed5(0xd5),a172_0x581ed5(0xe5)],['app:remote',a172_0x581ed5(0xbd)],['app:use','rabetbase\x20workspace\x20use\x20--app\x20<name>'],[a172_0x581ed5(0xbc),a172_0x581ed5(0xbf)],[a172_0x581ed5(0xde),a172_0x581ed5(0xf7)],[a172_0x581ed5(0xc9),a172_0x581ed5(0x10c)],['knowledge-base:detail',a172_0x581ed5(0xe2)],[a172_0x581ed5(0xe0),'rabetbase\x20kb\x20create'],[a172_0x581ed5(0xda),a172_0x581ed5(0x110)],[a172_0x581ed5(0xbe),a172_0x581ed5(0xfc)],[a172_0x581ed5(0x103),a172_0x581ed5(0xb9)]]),REMOVED_COMMAND_HINTS=new Map([[a172_0x581ed5(0xf5),a172_0x581ed5(0x10f)],[a172_0x581ed5(0xf3),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],['permit:role-menus',a172_0x581ed5(0x10f)],['permit:role-menus-set','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a172_0x581ed5(0xec),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a172_0x581ed5(0xd2),'rabetbase\x20project\x20create\x20<project-name>'],[a172_0x581ed5(0xc6),'rabetbase\x20run\x20start'],['build',a172_0x581ed5(0xe9)],[a172_0x581ed5(0xca),a172_0x581ed5(0xba)],[a172_0x581ed5(0xd4),'rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0xa1f263,_0xb984b1){const _0x360146=a172_0x581ed5;if(!_0xa1f263)return undefined;const _0x1205e0=REMOVED_COMMAND_REPLACEMENTS[_0x360146(0xee)](_0xa1f263+':'+(_0xb984b1??'')),_0x4676c1=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x360146(0xee)](_0xa1f263),_0x95db88=_0x1205e0??_0x4676c1,_0x2db330=REMOVED_COMMAND_HINTS['get'](_0xa1f263+':'+(_0xb984b1??''));if(!_0x95db88&&!_0x2db330)return undefined;const _0x2de93a=_0x4676c1?_0xa1f263:_0xb984b1?_0xa1f263+'\x20'+_0xb984b1:_0xa1f263;return{'command':_0x2de93a,'message':'`rabetbase\x20'+_0x2de93a+_0x360146(0xb2),'hint':_0x2db330??_0x360146(0xb7)+_0x95db88+_0x360146(0xc1)};}export function findDefinition(_0x2e3b0c,_0x4ca921){const _0x4bfb8f=a172_0x581ed5;return definitions[_0x4bfb8f(0xee)](_0x2e3b0c+':'+_0x4ca921);}export function isKnownService(_0x48c864){const _0x2740b0=a172_0x581ed5;return serviceByName[_0x2740b0(0xd7)](_0x48c864);}export function isDeclarativeService(_0x45c5b4){const _0x25e724=a172_0x581ed5;return serviceGroups[_0x25e724(0xd7)](_0x45c5b4)||serviceByName[_0x25e724(0xee)](_0x45c5b4)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x1b7030){return serviceByName['get'](_0x1b7030);}export function getLegacyHandler(_0x13c8f3,_0x571c0e){return undefined;}export function getAllDefinitions(){const _0x33d291=a172_0x581ed5;return Array[_0x33d291(0xc5)](definitions[_0x33d291(0xe4)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a173_0x276d48=a173_0x5411;function a173_0x5411(_0x2d8f67,_0x183bf2){_0x2d8f67=_0x2d8f67-0x1db;const _0x31fcff=a173_0x31fc();let _0x54115d=_0x31fcff[_0x2d8f67];return _0x54115d;}(function(_0x2db5ec,_0x48ac44){const _0x4e523e=a173_0x5411,_0x478fbd=_0x2db5ec();while(!![]){try{const _0x268540=-parseInt(_0x4e523e(0x1ea))/0x1+parseInt(_0x4e523e(0x1eb))/0x2+parseInt(_0x4e523e(0x1dd))/0x3*(-parseInt(_0x4e523e(0x1f1))/0x4)+-parseInt(_0x4e523e(0x1ef))/0x5*(parseInt(_0x4e523e(0x1e7))/0x6)+-parseInt(_0x4e523e(0x1ec))/0x7+-parseInt(_0x4e523e(0x1ed))/0x8*(-parseInt(_0x4e523e(0x1df))/0x9)+-parseInt(_0x4e523e(0x1e1))/0xa*(-parseInt(_0x4e523e(0x1ee))/0xb);if(_0x268540===_0x48ac44)break;else _0x478fbd['push'](_0x478fbd['shift']());}catch(_0x23fa4c){_0x478fbd['push'](_0x478fbd['shift']());}}}(a173_0x31fc,0xb6dc2));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';function a173_0x31fc(){const _0x2442f0=['48GQCMOm','19580yuVUlE','2395owzevu','delete','11456jyrjfa','dev','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','1161YupsHm','/smartapi/permit/role/delete','924534EeMoEK','Deleted\x20role\x20','16010ocPMBg','POST','high-risk-write','num','roleName','userCount','546JIOxTo','role','appCode','1293524wWmuSP','1534930LdFkgg','7273882ZvVHvd'];a173_0x31fc=function(){return _0x2442f0;};return a173_0x31fc();}const DELETE_PATH=a173_0x276d48(0x1de);export const roleDelete={'service':a173_0x276d48(0x1e8),'command':a173_0x276d48(0x1f0),'description':a173_0x276d48(0x1dc),'risk':a173_0x276d48(0x1e3),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x55477f){const _0x5ca1d5=a173_0x276d48,_0x201c8b=_0x55477f[_0x5ca1d5(0x1e4)]('id'),_0x1964bd=await getRoleById(_0x55477f['appCode'],_0x201c8b);return assertCustomRole(_0x1964bd,'delete'),asDryRunResult({'scope':_0x5ca1d5(0x1db),'operation':_0x5ca1d5(0x1f0),'selector':{'appCode':_0x55477f[_0x5ca1d5(0x1e9)],'roleId':_0x201c8b,'roleName':_0x1964bd['roleName']},'before':projectRole(_0x1964bd),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x1964bd['userCount']>0x0?['Role\x20still\x20has\x20'+_0x1964bd[_0x5ca1d5(0x1e6)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':_0x5ca1d5(0x1e2),'url':DELETE_PATH});},async 'execute'(_0xa70f7f){const _0x10396f=a173_0x276d48,_0x180f35=_0xa70f7f[_0x10396f(0x1e4)]('id'),_0x56294f=await getRoleById(_0xa70f7f[_0x10396f(0x1e9)],_0x180f35);return assertCustomRole(_0x56294f,_0x10396f(0x1f0)),await deleteAppRole(_0x180f35),{'ok':!![],'data':{'scope':'dev','operation':_0x10396f(0x1f0),'selector':{'appCode':_0xa70f7f[_0x10396f(0x1e9)],'roleId':_0x180f35,'roleName':_0x56294f[_0x10396f(0x1e5)]},'before':projectRole(_0x56294f),'after':null,'dryRun':![],'backend':{'method':_0x10396f(0x1e2),'path':DELETE_PATH},'warnings':[]},'message':_0x10396f(0x1e0)+_0x56294f[_0x10396f(0x1e5)]+'\x20(id='+_0x180f35+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a174_0x4c6733=a174_0x2146;(function(_0x459786,_0x276a55){const _0x56513d=a174_0x2146,_0x519e62=_0x459786();while(!![]){try{const _0xbaecc7=parseInt(_0x56513d(0x1d8))/0x1+parseInt(_0x56513d(0x1db))/0x2*(-parseInt(_0x56513d(0x1dd))/0x3)+parseInt(_0x56513d(0x1d1))/0x4*(-parseInt(_0x56513d(0x1de))/0x5)+-parseInt(_0x56513d(0x1cb))/0x6*(-parseInt(_0x56513d(0x1df))/0x7)+-parseInt(_0x56513d(0x1d2))/0x8+-parseInt(_0x56513d(0x1dc))/0x9*(parseInt(_0x56513d(0x1d3))/0xa)+-parseInt(_0x56513d(0x1d4))/0xb*(-parseInt(_0x56513d(0x1cd))/0xc);if(_0xbaecc7===_0x276a55)break;else _0x519e62['push'](_0x519e62['shift']());}catch(_0x4d10ac){_0x519e62['push'](_0x519e62['shift']());}}}(a174_0x123c,0xadc2c));function a174_0x123c(){const _0x601b8e=['roleType','938230eBfbGF','role','dev','60464dHeiBQ','43767GclBQV','105tZuWag','3148765pBApJg','15981ZDzAow','3522bSXeAM','appCode','21491172ZRQHGb','detail','roleName','num','4PilLKL','3281344xRUIJU','2590jOYiGd','11wadMsB','read','Role\x20'];a174_0x123c=function(){return _0x601b8e;};return a174_0x123c();}function a174_0x2146(_0x4987b1,_0x16b5e1){_0x4987b1=_0x4987b1-0x1cb;const _0x123c24=a174_0x123c();let _0x21464c=_0x123c24[_0x4987b1];return _0x21464c;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a174_0x4c6733(0x1d9),'command':a174_0x4c6733(0x1ce),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a174_0x4c6733(0x1d5),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x143a9a){const _0x167b7a=a174_0x4c6733,_0x18031e=_0x143a9a[_0x167b7a(0x1d0)]('id'),_0x5211cf=await getRoleById(_0x143a9a[_0x167b7a(0x1cc)],_0x18031e);return{'ok':!![],'data':{'scope':_0x167b7a(0x1da),'role':projectRole(_0x5211cf)},'message':_0x167b7a(0x1d6)+_0x5211cf[_0x167b7a(0x1cf)]+'\x20('+_0x5211cf[_0x167b7a(0x1d7)]+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x360449,_0x39f640){const _0x2c7c15=a175_0x3296,_0x381284=_0x360449();while(!![]){try{const _0x534ca6=parseInt(_0x2c7c15(0x1cd))/0x1*(-parseInt(_0x2c7c15(0x1d0))/0x2)+-parseInt(_0x2c7c15(0x1cc))/0x3*(-parseInt(_0x2c7c15(0x1cf))/0x4)+-parseInt(_0x2c7c15(0x1d3))/0x5*(parseInt(_0x2c7c15(0x1d7))/0x6)+-parseInt(_0x2c7c15(0x1ce))/0x7*(-parseInt(_0x2c7c15(0x1d8))/0x8)+-parseInt(_0x2c7c15(0x1d4))/0x9+parseInt(_0x2c7c15(0x1d6))/0xa*(parseInt(_0x2c7c15(0x1d5))/0xb)+parseInt(_0x2c7c15(0x1d1))/0xc*(parseInt(_0x2c7c15(0x1d2))/0xd);if(_0x534ca6===_0x39f640)break;else _0x381284['push'](_0x381284['shift']());}catch(_0x1feeba){_0x381284['push'](_0x381284['shift']());}}}(a175_0x276b,0x43af6));function a175_0x3296(_0x33b174,_0x2fa5f0){_0x33b174=_0x33b174-0x1cc;const _0x276b20=a175_0x276b();let _0x329681=_0x276b20[_0x33b174];return _0x329681;}import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';function a175_0x276b(){const _0x1aa1f3=['112eaBzSK','6cSDpUg','1ZjNMvA','241451OwAMEY','746980PXBucl','1013918pKsmhj','7948956wPaHxx','13PUSGxt','5kobGtt','3909132jKrVii','11pCKodW','1414860nKmSRm','2650476VyZdAr'];a175_0x276b=function(){return _0x1aa1f3;};return a175_0x276b();}import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a176_0x223a5a=a176_0x1184;(function(_0x4421df,_0x3f4789){const _0x54a4aa=a176_0x1184,_0x47cab2=_0x4421df();while(!![]){try{const _0x2b6bc7=parseInt(_0x54a4aa(0x1a9))/0x1*(-parseInt(_0x54a4aa(0x19a))/0x2)+parseInt(_0x54a4aa(0x195))/0x3*(-parseInt(_0x54a4aa(0x1a5))/0x4)+-parseInt(_0x54a4aa(0x197))/0x5*(parseInt(_0x54a4aa(0x180))/0x6)+parseInt(_0x54a4aa(0x183))/0x7*(parseInt(_0x54a4aa(0x1a4))/0x8)+parseInt(_0x54a4aa(0x191))/0x9*(parseInt(_0x54a4aa(0x18d))/0xa)+-parseInt(_0x54a4aa(0x1a0))/0xb+parseInt(_0x54a4aa(0x19f))/0xc;if(_0x2b6bc7===_0x3f4789)break;else _0x47cab2['push'](_0x47cab2['shift']());}catch(_0x5ef3d1){_0x47cab2['push'](_0x47cab2['shift']());}}}(a176_0x9fcd,0xaced7));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a176_0x9fcd(){const _0x4df787=['trim','Filter\x20by\x20role\x20type','Found\x20','120EkNNNu','1776LTNUDs','validation','page','roleType','228613cgvANY','94038PbXhxb','\x20role(s)','string','173131BFJHyo','pagesize','Invalid\x20--type\x20\x22','str','ADMIN','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','number','length','read','appCode','251890aqgHJr','DEV','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','map','459MqLtls','filter','dev','num','5004keVgly','Page\x20size\x20(1-100)','295ZKcyDK','type','list','8UMssww','role','OWNER','join','toUpperCase','19947708lpVnnX','328691KsktWk'];a176_0x9fcd=function(){return _0x4df787;};return a176_0x9fcd();}function a176_0x1184(_0x45eb39,_0xd6f1f7){_0x45eb39=_0x45eb39-0x180;const _0x9fcd2=a176_0x9fcd();let _0x1184bd=_0x9fcd2[_0x45eb39];return _0x1184bd;}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a176_0x223a5a(0x187),a176_0x223a5a(0x18e),a176_0x223a5a(0x19c),'CUSTOM'];export const roleList={'service':a176_0x223a5a(0x19b),'command':a176_0x223a5a(0x199),'description':a176_0x223a5a(0x188),'risk':a176_0x223a5a(0x18b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a176_0x223a5a(0x198),'type':a176_0x223a5a(0x182),'required':![],'description':a176_0x223a5a(0x1a2),'enum':ROLE_TYPES},{'name':a176_0x223a5a(0x1a7),'type':a176_0x223a5a(0x189),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a176_0x223a5a(0x184),'type':a176_0x223a5a(0x189),'description':a176_0x223a5a(0x196),'default':0x64}],async 'validate'(_0x311167){const _0x59308e=a176_0x223a5a,_0x87ecad=_0x311167[_0x59308e(0x186)](_0x59308e(0x198))[_0x59308e(0x1a1)]();if(_0x87ecad&&!ROLE_TYPES['includes'](_0x87ecad[_0x59308e(0x19e)]()))throw CliErrors[_0x59308e(0x1a6)](_0x59308e(0x185)+_0x87ecad+'\x22.','Use\x20one\x20of:\x20'+ROLE_TYPES[_0x59308e(0x19d)](',\x20')+'.');const _0x18b185=_0x311167[_0x59308e(0x194)](_0x59308e(0x1a7),0x1),_0x4852f0=_0x311167[_0x59308e(0x194)]('pagesize',0x64);if(_0x18b185<0x1)throw CliErrors[_0x59308e(0x1a6)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x4852f0<0x1||_0x4852f0>0x64)throw CliErrors[_0x59308e(0x1a6)](_0x59308e(0x18f));},async 'execute'(_0x1bd9c8){const _0x4b108b=a176_0x223a5a,_0x451a04=_0x1bd9c8[_0x4b108b(0x194)](_0x4b108b(0x1a7),0x1)||0x1,_0x256b86=_0x1bd9c8[_0x4b108b(0x194)](_0x4b108b(0x184),0x64)||0x64,_0x5c5278=_0x1bd9c8[_0x4b108b(0x186)](_0x4b108b(0x198))[_0x4b108b(0x1a1)]()['toUpperCase'](),{items:_0x2a7df8,paging:_0x22d3a3}=await listAppRoles(_0x1bd9c8[_0x4b108b(0x18c)],{'currentPage':_0x451a04,'pageSize':_0x256b86}),_0x4bd37d=_0x5c5278?_0x2a7df8[_0x4b108b(0x192)](_0x4a52fd=>_0x4a52fd[_0x4b108b(0x1a8)]===_0x5c5278):_0x2a7df8,_0x3eea23=_0x4bd37d[_0x4b108b(0x190)](projectRole);return{'ok':!![],'data':{'scope':_0x4b108b(0x193),'roles':_0x3eea23,'paging':_0x22d3a3},'message':_0x4b108b(0x1a3)+_0x3eea23[_0x4b108b(0x18a)]+_0x4b108b(0x181)};}};
|