@lovrabet/rabetbase-cli 2.4.6 → 2.4.7-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.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.d.ts +2 -0
- package/lib/commands/kb/search.js +1 -0
- 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/menu/visibility-update.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/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +16 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +4 -4
- package/skills/rabetbase/references/rabetbase-kb.md +13 -3
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54d522,_0x127379){const _0x15183b=a162_0x508f,_0x470027=_0x54d522();while(!![]){try{const _0x4eddfe=parseInt(_0x15183b(0x99))/0x1+-parseInt(_0x15183b(0x93))/0x2*(parseInt(_0x15183b(0x90))/0x3)+parseInt(_0x15183b(0xa4))/0x4+-parseInt(_0x15183b(0x9f))/0x5+parseInt(_0x15183b(0xa7))/0x6+-parseInt(_0x15183b(0xa1))/0x7*(-parseInt(_0x15183b(0x91))/0x8)+-parseInt(_0x15183b(0x8d))/0x9*(parseInt(_0x15183b(0xa5))/0xa);if(_0x4eddfe===_0x127379)break;else _0x470027['push'](_0x470027['shift']());}catch(_0x189724){_0x470027['push'](_0x470027['shift']());}}}(a162_0x4932,0x54457));import{existsSync}from'node:fs';function a162_0x4932(){const _0x4a2b90=['\x22\x20already\x20exists','green','3SqdUlK','2368848LqxNUb','Skipped','1066652hgMTpI','Directory\x20\x22','Not\x20set','trim','production','Logged\x20in','565411JxGCEX','√\x20Login\x20status:\x20','Project\x20name:','env','resolve','cyan','1606540oXkWvh','√\x20Project\x20Name:\x20','7wcfftR','Login\x20failed','√\x20App\x20Code:\x20','2104088nSkxKk','190SIVWUN','log','3385740Htfvvc','356220YuKRHU'];a162_0x4932=function(){return _0x4a2b90;};return a162_0x4932();}import a162_0x4f352d from'node:path';import a162_0x3af774 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a162_0x508f(_0x18d2f3,_0x4f6167){_0x18d2f3=_0x18d2f3-0x8d;const _0x4932e1=a162_0x4932();let _0x508fbe=_0x4932e1[_0x18d2f3];return _0x508fbe;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getProjectNameValidationError}from'../../../commands/project/create/project-name.js';export async function guidedCreateProject(_0x19cc19,_0x2f5a95,_0x3f94ca){const _0x3d7624=a162_0x508f,_0x25362a='my-app',_0x35274a=readConfig(),_0x69d96d=typeof _0x35274a[_0x3d7624(0x9c)]==='string'?_0x35274a[_0x3d7624(0x9c)]:undefined,_0x2eeb4b=await input({'message':_0x3d7624(0x9b),'default':_0x25362a,'validate':_0x36be26=>{const _0x129f44=_0x3d7624,_0x50c315=_0x36be26[_0x129f44(0x96)]()||_0x25362a,_0x4d854f=getProjectNameValidationError(_0x50c315);if(_0x4d854f)return _0x4d854f;const _0x34357e=a162_0x4f352d[_0x129f44(0x9d)](process['cwd'](),_0x50c315);if(existsSync(_0x34357e))return _0x129f44(0x94)+_0x50c315+_0x129f44(0x8e);return!![];}});console[_0x3d7624(0xa6)](a162_0x3af774[_0x3d7624(0x8f)](_0x3d7624(0xa0)+a162_0x3af774[_0x3d7624(0x9e)](_0x2eeb4b)));const _0x43c6a0=await selectSingleAppcode(_0x3f94ca);console[_0x3d7624(0xa6)](a162_0x3af774[_0x3d7624(0x8f)](_0x3d7624(0xa3)+a162_0x3af774[_0x3d7624(0x9e)](_0x43c6a0||_0x3d7624(0x95))));if(_0x43c6a0){const _0x54ba63=await getIsSessionValid();if(!_0x54ba63){const _0x250dc8=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x250dc8){const _0x36cae7=await authServer({'silent':!![]});console[_0x3d7624(0xa6)](a162_0x3af774[_0x3d7624(0x8f)]('√\x20Login\x20status:\x20'+a162_0x3af774[_0x3d7624(0x9e)](_0x36cae7?_0x3d7624(0x98):_0x3d7624(0xa2))));}else console['log'](a162_0x3af774[_0x3d7624(0x8f)](_0x3d7624(0x9a)+a162_0x3af774['cyan'](_0x3d7624(0x92))));}await _0x19cc19({'projectName':_0x2eeb4b,'appCode':_0x43c6a0,'env':_0x2f5a95||_0x69d96d||_0x3d7624(0x97)});}else await _0x19cc19({'projectName':_0x2eeb4b,'env':_0x2f5a95||_0x69d96d||_0x3d7624(0x97)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1a8117,_0x1dc26a){const _0x182cf1=a163_0x299d,_0x7bf31c=_0x1a8117();while(!![]){try{const _0x1f8204=parseInt(_0x182cf1(0x1c2))/0x1+-parseInt(_0x182cf1(0x1c8))/0x2+-parseInt(_0x182cf1(0x1cb))/0x3+parseInt(_0x182cf1(0x1ca))/0x4*(-parseInt(_0x182cf1(0x1c7))/0x5)+-parseInt(_0x182cf1(0x1cd))/0x6*(parseInt(_0x182cf1(0x1c3))/0x7)+-parseInt(_0x182cf1(0x1c5))/0x8*(-parseInt(_0x182cf1(0x1c4))/0x9)+parseInt(_0x182cf1(0x1c6))/0xa;if(_0x1f8204===_0x1dc26a)break;else _0x7bf31c['push'](_0x7bf31c['shift']());}catch(_0x3675a3){_0x7bf31c['push'](_0x7bf31c['shift']());}}}(a163_0x1af4,0xa26b2));export function formatElapsed(_0x18ff76){const _0x5cd687=a163_0x299d,_0x5c78db=Date['now']()-_0x18ff76;if(_0x5c78db<0x3e8)return _0x5c78db+'ms';const _0x8ebdb=(_0x5c78db/0x3e8)[_0x5cd687(0x1c9)](0x2),_0x48e9d0=_0x8ebdb[_0x5cd687(0x1cc)](/\.?0+$/u,'');return _0x48e9d0+'s';}function a163_0x299d(_0x317098,_0x126d95){_0x317098=_0x317098-0x1c2;const _0x1af417=a163_0x1af4();let _0x299d70=_0x1af417[_0x317098];return _0x299d70;}function a163_0x1af4(){const _0x5e019a=['replace','6uPvkef','1161071WVwLpG','6997025BZPixw','11049633wtQLtG','8oPJirF','11029680enVBgV','2060085CAcjiZ','927266SoJSka','toFixed','8saLPtL','1617804PCydbz'];a163_0x1af4=function(){return _0x5e019a;};return a163_0x1af4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3d5541,_0x4e8987){const _0x1d462f=a163_0x2460,_0x3cd4fe=_0x3d5541();while(!![]){try{const _0x4d8964=-parseInt(_0x1d462f(0x153))/0x1*(-parseInt(_0x1d462f(0x158))/0x2)+parseInt(_0x1d462f(0x185))/0x3*(parseInt(_0x1d462f(0x165))/0x4)+-parseInt(_0x1d462f(0x168))/0x5*(parseInt(_0x1d462f(0x16a))/0x6)+parseInt(_0x1d462f(0x13d))/0x7*(-parseInt(_0x1d462f(0x15e))/0x8)+-parseInt(_0x1d462f(0x144))/0x9+parseInt(_0x1d462f(0x164))/0xa*(parseInt(_0x1d462f(0x18e))/0xb)+-parseInt(_0x1d462f(0x141))/0xc*(-parseInt(_0x1d462f(0x150))/0xd);if(_0x4d8964===_0x4e8987)break;else _0x3cd4fe['push'](_0x3cd4fe['shift']());}catch(_0x374763){_0x3cd4fe['push'](_0x3cd4fe['shift']());}}}(a163_0x435e,0x40881));import a163_0x5ea840 from'path';import a163_0x49aa9a from'fs';import a163_0x407329 from'chalk';import a163_0x328bdd from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';function a163_0x435e(){const _0x2b9140=['chdir','\x20config\x20set\x20appcode\x20<app-code>\x27','W_OK','projectCode','8984MfRgST','\x20already\x20exists','Install\x20dependencies','stringify','green','dev','1530uqVzRA','14392BQFBBU','production','warn','850bnpnVX','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','4104hBKwLD','keys','utf8','appCode','start','string','verifying','projectName','nonInteractive','√\x20package.json\x20updated:\x20name=','1.0.0','cookie','\x20\x201.\x20Start\x20project:\x20','package.json','清理项目目录失败:\x20','\x20dataset(s),\x20generated\x20','readFileSync','\x20√\x20','Extracting\x20project\x20template','cyan','Verifying\x20project\x20template','constants','env','stableVersion','Project\x20directory\x20','跳过清理:项目目录所有权已变化:\x20','version','237lipBnr','*\x20Pulling\x20API\x20configuration...','*\x20Configuring\x20AppCode\x20for\x20project\x20','Project\x20name:\x20','message','Resolving\x20project\x20template','toLocaleString','ino','needsUpgrade','27808AKnvnJ','success','resolve','error','create','API\x20配置拉取异常','log','setLogPath','modelCount','更新\x20package.json\x20name','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','name','cwd','resolving','bold','join','更新\x20package.json\x20失败','text','2002iaFbVY','Project\x20template\x20ready','√\x20Configuration\x20file\x20created,\x20Apps:\x20','currentVersion','18108gwopeL','Downloading\x20project\x20template','Format\x20code','2461023VoATmW','minimumVersion','\x20|\x20AppCode:\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','defaultApp','项目创建失败:\x20','parse','项目创建完成:\x20','accessSync','dirname','配置应用AppCode失败','existsSync','1768nIrKrH','开始创建项目:\x20','lstatSync','6186tXHlkl','\x20|\x20Default:\x20','\x20api\x20pull','cd\x20','info','32KiisBK','writeFileSync'];a163_0x435e=function(){return _0x2b9140;};return a163_0x435e();}import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';function a163_0x2460(_0x4f1047,_0x3e41d2){_0x4f1047=_0x4f1047-0x137;const _0x435e90=a163_0x435e();let _0x246044=_0x435e90[_0x4f1047];return _0x246044;}import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';import{validateProjectName}from'../../../commands/project/create/project-name.js';function readDirectoryIdentity(_0x248585){const _0x20b390=a163_0x2460;try{const _0x11d969=a163_0x49aa9a[_0x20b390(0x152)](_0x248585);if(!_0x11d969['isDirectory']())return null;return{'dev':_0x11d969[_0x20b390(0x163)],'ino':_0x11d969['ino']};}catch{return null;}}export async function createApp(_0x1dac95){const _0xd07f23=a163_0x2460,_0x5b8dbc=await checkCliVersion();(_0x5b8dbc[_0xd07f23(0x18d)]||_0x5b8dbc['belowMinimum'])&&(printCliUpgradeWarning(_0x5b8dbc),assertCliVersionSupported(_0x5b8dbc),logger[_0xd07f23(0x157)]('create','CLI\x20版本检查',{'currentVersion':_0x5b8dbc[_0xd07f23(0x140)],'stableVersion':_0x5b8dbc[_0xd07f23(0x181)],'minimumVersion':_0x5b8dbc[_0xd07f23(0x145)],'needsUpgrade':_0x5b8dbc[_0xd07f23(0x18d)],'belowMinimum':_0x5b8dbc['belowMinimum']}));if(_0x1dac95[_0xd07f23(0x15d)]&&(_0x1dac95[_0xd07f23(0x16d)]||_0x1dac95[_0xd07f23(0x172)]))await runCreate({'projectName':_0x1dac95[_0xd07f23(0x15d)],'appCode':_0x1dac95[_0xd07f23(0x16d)],'env':_0x1dac95[_0xd07f23(0x180)]},_0x1dac95);else{if(_0x1dac95[_0xd07f23(0x15d)]){const _0x31a0b0=await selectSingleAppcode(_0x1dac95[_0xd07f23(0x175)]);await runCreate({'projectName':_0x1dac95[_0xd07f23(0x15d)],'appCode':_0x31a0b0||undefined,'env':_0x1dac95[_0xd07f23(0x180)]},_0x1dac95);}else await guidedCreateProject(_0x31caf4=>runCreate(_0x31caf4,_0x1dac95),_0x1dac95[_0xd07f23(0x180)],_0x1dac95[_0xd07f23(0x175)]);}}async function runCreate(_0x2cd174,_0x2e7a35){const _0x2e558d=a163_0x2460;_0x2cd174[_0x2e558d(0x171)]=validateProjectName(_0x2cd174[_0x2e558d(0x171)]);const _0xbb44b5=a163_0x5ea840[_0x2e558d(0x190)](process[_0x2e558d(0x137)](),_0x2cd174[_0x2e558d(0x171)]);if(a163_0x49aa9a[_0x2e558d(0x14f)](_0xbb44b5))throw new Error(_0x2e558d(0x182)+_0x2cd174['projectName']+_0x2e558d(0x15f));let _0x54eb70=null;try{a163_0x49aa9a[_0x2e558d(0x14c)](a163_0x5ea840[_0x2e558d(0x14d)](_0xbb44b5),a163_0x49aa9a[_0x2e558d(0x17f)][_0x2e558d(0x15c)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x2e558d(0x157)](_0x2e558d(0x192),_0x2e558d(0x151)+_0x2cd174['projectName'],{'projectDir':_0xbb44b5,'appCode':_0x2cd174[_0x2e558d(0x16d)]}),console[_0x2e558d(0x194)](),console[_0x2e558d(0x194)](a163_0x407329[_0x2e558d(0x162)](_0x2e558d(0x17b))+_0x2e558d(0x188)+a163_0x407329[_0x2e558d(0x162)](_0x2cd174[_0x2e558d(0x171)])+(_0x2cd174['appCode']?_0x2e558d(0x146)+a163_0x407329[_0x2e558d(0x17d)](_0x2cd174[_0x2e558d(0x16d)]):''));try{await runTask('Resolving\x20project\x20template',_0x28b5d7=>copyProjectTemplate(_0x2cd174[_0x2e558d(0x171)],_0x4042f2=>_0x28b5d7(projectTemplateStageLabel(_0x4042f2))),_0x2e558d(0x13e)),_0x54eb70=readDirectoryIdentity(_0xbb44b5);if(!_0x54eb70)throw new Error('Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory');await updatePackageJsonName(_0x2cd174[_0x2e558d(0x171)]),await runTask(_0x2e558d(0x160),()=>installDependencies(_0x2cd174[_0x2e558d(0x171)])),await runTask(_0x2e558d(0x143),()=>formatProjectCode(_0x2cd174['projectName'])),await configureAppCode(_0x2cd174[_0x2e558d(0x171)],_0x2cd174['appCode']||'',_0x2cd174[_0x2e558d(0x180)]);let _0x70a9e4=![];if(_0x2cd174[_0x2e558d(0x16d)]){console[_0x2e558d(0x194)](_0x2e558d(0x186));const _0x4b5051=process['cwd']();try{process[_0x2e558d(0x15a)](_0xbb44b5);const _0x44b3a6=_0x2cd174[_0x2e558d(0x180)]||_0x2e558d(0x166);initEnv(_0x44b3a6);const {configArray:_0x1ebe62}=await fetchModelList(_0x2cd174[_0x2e558d(0x16d)],_0x2e7a35['cookie']||''),_0x4dec72=DEFAULT_API_DIR,_0x385802=await generateApiFile(_0x1ebe62,'',_0x2cd174[_0x2e558d(0x16d)],!![],_0x44b3a6,_0x4dec72);console[_0x2e558d(0x194)]('√\x20Pulled\x20'+_0x1ebe62['length']+_0x2e558d(0x179)+_0x385802[_0x2e558d(0x196)]+'\x20model(s)'),logger[_0x2e558d(0x157)](_0x2e558d(0x192),'API\x20configuration\x20pulled:\x20'+_0x2cd174['appCode']);}catch(_0x5a820c){_0x70a9e4=!![],console['log'](_0x2e558d(0x198)),logger[_0x2e558d(0x167)](_0x2e558d(0x192),_0x2e558d(0x193),{'error':_0x5a820c instanceof Error?_0x5a820c[_0x2e558d(0x189)]:String(_0x5a820c)});}finally{process[_0x2e558d(0x15a)](_0x4b5051);}}logger[_0x2e558d(0x195)](_0xbb44b5),logger[_0x2e558d(0x18f)](_0x2e558d(0x192),_0x2e558d(0x14b)+_0x2cd174[_0x2e558d(0x171)]),console[_0x2e558d(0x194)](),console['log'](a163_0x407329['green']('─'['repeat'](0x3c))),console[_0x2e558d(0x194)](a163_0x407329[_0x2e558d(0x17d)][_0x2e558d(0x139)]('🚀\x20Next\x20Steps:')),console[_0x2e558d(0x194)](),console[_0x2e558d(0x194)](_0x2e558d(0x176)+a163_0x407329[_0x2e558d(0x17d)][_0x2e558d(0x139)](_0x2e558d(0x156)+_0x2cd174[_0x2e558d(0x171)]+'\x20&&\x20'+CLI_BIN_NAME+'\x20run\x20start')),_0x70a9e4&&console[_0x2e558d(0x194)](_0x2e558d(0x147)+a163_0x407329['cyan'][_0x2e558d(0x139)](CLI_BIN_NAME+_0x2e558d(0x155))),console['log'](a163_0x407329[_0x2e558d(0x162)]('─'['repeat'](0x3c)));}catch(_0xb19121){logger[_0x2e558d(0x191)](_0x2e558d(0x192),_0x2e558d(0x149)+_0x2cd174[_0x2e558d(0x171)],{'error':_0xb19121 instanceof Error?_0xb19121['message']:String(_0xb19121)});try{const _0x3cc73d=readDirectoryIdentity(_0xbb44b5);if(_0x54eb70&&_0x3cc73d?.[_0x2e558d(0x163)]===_0x54eb70['dev']&&_0x3cc73d['ino']===_0x54eb70[_0x2e558d(0x18c)])console[_0x2e558d(0x194)](_0x2e558d(0x169)+_0xbb44b5),a163_0x49aa9a['rmSync'](_0xbb44b5,{'recursive':!![],'force':!![]});else _0x3cc73d&&logger[_0x2e558d(0x167)](_0x2e558d(0x192),_0x2e558d(0x183)+_0xbb44b5);}catch{logger['warn'](_0x2e558d(0x192),_0x2e558d(0x178)+_0xbb44b5);}throw _0xb19121;}}async function runTask(_0x5ba6dd,_0x14f1c1,_0x9101e5=_0x5ba6dd){const _0xf8d3d4=a163_0x2460,_0x515688=a163_0x328bdd(_0x5ba6dd+'...')[_0xf8d3d4(0x16e)]();try{const _0x36aaa6=await _0x14f1c1(_0x58b2c9=>{const _0x597ece=_0xf8d3d4;_0x515688[_0x597ece(0x13c)]=_0x58b2c9+'...';});_0x515688['stop'](),console[_0xf8d3d4(0x194)](''+a163_0x407329[_0xf8d3d4(0x162)](_0xf8d3d4(0x17b))+_0x9101e5+'\x20'+a163_0x407329['gray']('['+_0x36aaa6+']'));}catch(_0x196bac){_0x515688['fail'](_0x5ba6dd);throw _0x196bac;}}function projectTemplateStageLabel(_0x36f620){const _0x40a497=a163_0x2460;switch(_0x36f620){case _0x40a497(0x138):return _0x40a497(0x18a);case'downloading':return _0x40a497(0x142);case _0x40a497(0x170):return _0x40a497(0x17e);case'extracting':return _0x40a497(0x17c);}}async function updatePackageJsonName(_0x46ba84){const _0x4e0582=a163_0x2460,_0x2248b6=a163_0x5ea840[_0x4e0582(0x190)](process['cwd'](),_0x46ba84),_0x34133b=a163_0x5ea840[_0x4e0582(0x13a)](_0x2248b6,_0x4e0582(0x177));try{console[_0x4e0582(0x194)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x83b2fe=getRabetbaseCliPackageRoot(),_0x1c3be2=a163_0x5ea840['join'](_0x83b2fe,_0x4e0582(0x177));let _0x98475=_0x4e0582(0x174);try{const _0x2060ca=JSON[_0x4e0582(0x14a)](a163_0x49aa9a[_0x4e0582(0x17a)](_0x1c3be2,_0x4e0582(0x16c)));_0x98475=_0x2060ca[_0x4e0582(0x184)]||_0x4e0582(0x174);}catch{}const _0x1ef85f=a163_0x49aa9a[_0x4e0582(0x17a)](_0x34133b,'utf8'),_0x28570e=JSON[_0x4e0582(0x14a)](_0x1ef85f);_0x28570e[_0x4e0582(0x199)]=_0x46ba84,_0x28570e['description']=_0x46ba84+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x98475,a163_0x49aa9a[_0x4e0582(0x159)](_0x34133b,JSON[_0x4e0582(0x161)](_0x28570e,null,0x2)+'\x0a',_0x4e0582(0x16c)),console[_0x4e0582(0x194)](_0x4e0582(0x173)+_0x46ba84),logger[_0x4e0582(0x157)](_0x4e0582(0x192),_0x4e0582(0x197));}catch(_0x54e9f9){logger[_0x4e0582(0x191)](_0x4e0582(0x192),_0x4e0582(0x13b));throw _0x54e9f9;}}async function configureAppCode(_0x4424ae,_0x52756b,_0x5c119e){const _0x3f1cf1=a163_0x2460,_0x3a4c1=a163_0x5ea840[_0x3f1cf1(0x190)](process['cwd'](),_0x4424ae),_0x51baba=a163_0x5ea840[_0x3f1cf1(0x13a)](_0x3a4c1,NEW_CONFIG_NAME);try{_0x52756b?console[_0x3f1cf1(0x194)](_0x3f1cf1(0x187)+_0x4424ae+':\x20'+_0x52756b):console['log']('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x4424ae);const _0x238547=getRabetbaseCliPackageRoot(),_0x55d548=a163_0x5ea840[_0x3f1cf1(0x13a)](_0x238547,_0x3f1cf1(0x177));let _0x1940cc=_0x3f1cf1(0x174);try{const _0x4f694f=JSON['parse'](a163_0x49aa9a[_0x3f1cf1(0x17a)](_0x55d548,_0x3f1cf1(0x16c)));_0x1940cc=_0x4f694f[_0x3f1cf1(0x184)]||'1.0.0';}catch{}const _0x21690b=readConfig(),_0xeeb3cc=typeof _0x21690b['env']===_0x3f1cf1(0x16f)?_0x21690b[_0x3f1cf1(0x180)]:undefined,_0x50be0e={};for(const _0x23af7d of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x21690b[_0x23af7d]!=null)_0x50be0e[_0x23af7d]=_0x21690b[_0x23af7d];}const _0xe9752a=buildCanonicalProjectConfig(_0x50be0e,{'appCodes':_0x52756b?[_0x52756b]:[],'env':_0x5c119e||_0xeeb3cc||'production','metadata':{'createdAt':new Date()[_0x3f1cf1(0x18b)](),'version':_0x1940cc}});writeConfigFile(_0x51baba,_0xe9752a),_0x52756b?console[_0x3f1cf1(0x194)](_0x3f1cf1(0x13f)+Object[_0x3f1cf1(0x16b)](_0xe9752a['apps']||{})[_0x3f1cf1(0x13a)](',\x20')+_0x3f1cf1(0x154)+_0xe9752a[_0x3f1cf1(0x148)]):console[_0x3f1cf1(0x194)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x3f1cf1(0x15b)),logger[_0x3f1cf1(0x157)](_0x3f1cf1(0x192),'配置应用AppCode:\x20'+_0x52756b);}catch(_0x46b9c0){logger[_0x3f1cf1(0x191)](_0x3f1cf1(0x192),_0x3f1cf1(0x14e));throw _0x46b9c0;}}
|
|
1
|
+
(function(_0x3cf30c,_0x1c3300){const _0x1a7a10=a164_0xd170,_0x5be2f8=_0x3cf30c();while(!![]){try{const _0x1310df=parseInt(_0x1a7a10(0xf1))/0x1+parseInt(_0x1a7a10(0xad))/0x2*(-parseInt(_0x1a7a10(0xda))/0x3)+-parseInt(_0x1a7a10(0xff))/0x4*(parseInt(_0x1a7a10(0x107))/0x5)+-parseInt(_0x1a7a10(0xbe))/0x6*(-parseInt(_0x1a7a10(0xb7))/0x7)+parseInt(_0x1a7a10(0xb0))/0x8*(parseInt(_0x1a7a10(0x10e))/0x9)+parseInt(_0x1a7a10(0xbc))/0xa*(-parseInt(_0x1a7a10(0x102))/0xb)+-parseInt(_0x1a7a10(0xf9))/0xc*(-parseInt(_0x1a7a10(0x115))/0xd);if(_0x1310df===_0x1c3300)break;else _0x5be2f8['push'](_0x5be2f8['shift']());}catch(_0xbb2654){_0x5be2f8['push'](_0x5be2f8['shift']());}}}(a164_0x1d80,0xd59f4));import a164_0x4a03ef from'path';import a164_0xad5882 from'fs';import a164_0x5a37c6 from'chalk';import a164_0x2f3ae1 from'ora';function a164_0x1d80(){const _0x5f5df4=['warn','setLogPath','配置应用AppCode:\x20','CLI\x20版本检查','Project\x20name:\x20','32CmLCyA','\x20run\x20start','Project\x20template\x20ready','114609vCtJWq','\x20config\x20set\x20appcode\x20<app-code>\x27','chdir','1.0.0','keys','640895BAeLpU','stableVersion','配置应用AppCode失败','readFileSync','resolve','existsSync','join','13316859tPOrDy','更新\x20package.json\x20失败','lstatSync','string','\x20&&\x20','projectName','\x20model(s)','26yyIXUV','production','text','Resolving\x20project\x20template','Format\x20code','needsUpgrade','458bsArtX','Extracting\x20project\x20template','rmSync','8rKJYaf','清理项目目录失败:\x20','dirname','√\x20package.json\x20updated:\x20name=','repeat','fail','description','895097rzrAYy','writeFileSync','resolving','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','appCode','370BWzODo','apps','18HNWcdU','\x20\x202.\x20Pull\x20API\x20configuration:\x20','ino','info','message','stop','Verifying\x20project\x20template','green','项目创建完成:\x20','*\x20Pulling\x20API\x20configuration...','*\x20Configuring\x20AppCode\x20for\x20project\x20','projectCode','verifying','nonInteractive','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory','\x20|\x20AppCode:\x20','parse','dev','defaultApp','Project\x20directory\x20','\x20\x201.\x20Start\x20project:\x20','create','length','package.json','success','currentVersion','√\x20Pulled\x20','17454spRXul','log','accessSync','cwd','belowMinimum','cookie','start','isDirectory','🚀\x20Next\x20Steps:','toLocaleString','version','utf8','error','cyan','constants','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','gray','Downloading\x20project\x20template','跳过清理:项目目录所有权已变化:\x20','\x20|\x20Default:\x20','name','项目创建失败:\x20','Install\x20dependencies','639375jrEpQG','bold','\x20already\x20exists','env','cd\x20','extracting','...','开始创建项目:\x20','6693684Kycpzs'];a164_0x1d80=function(){return _0x5f5df4;};return a164_0x1d80();}import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';function a164_0xd170(_0x5700c2,_0x4107b9){_0x5700c2=_0x5700c2-0xad;const _0x1d8049=a164_0x1d80();let _0xd170b6=_0x1d8049[_0x5700c2];return _0xd170b6;}import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';import{validateProjectName}from'../../../commands/project/create/project-name.js';function readDirectoryIdentity(_0xa3a561){const _0x1a02c7=a164_0xd170;try{const _0x24d041=a164_0xad5882[_0x1a02c7(0x110)](_0xa3a561);if(!_0x24d041[_0x1a02c7(0xe1)]())return null;return{'dev':_0x24d041[_0x1a02c7(0xd0)],'ino':_0x24d041[_0x1a02c7(0xc0)]};}catch{return null;}}export async function createApp(_0x30bd15){const _0x163fce=a164_0xd170,_0x417085=await checkCliVersion();(_0x417085[_0x163fce(0x11a)]||_0x417085[_0x163fce(0xde)])&&(printCliUpgradeWarning(_0x417085),assertCliVersionSupported(_0x417085),logger[_0x163fce(0xc1)]('create',_0x163fce(0xfd),{'currentVersion':_0x417085[_0x163fce(0xd8)],'stableVersion':_0x417085[_0x163fce(0x108)],'minimumVersion':_0x417085['minimumVersion'],'needsUpgrade':_0x417085[_0x163fce(0x11a)],'belowMinimum':_0x417085[_0x163fce(0xde)]}));if(_0x30bd15[_0x163fce(0xc9)]&&(_0x30bd15[_0x163fce(0xbb)]||_0x30bd15[_0x163fce(0xcb)]))await runCreate({'projectName':_0x30bd15['projectCode'],'appCode':_0x30bd15[_0x163fce(0xbb)],'env':_0x30bd15[_0x163fce(0xf4)]},_0x30bd15);else{if(_0x30bd15[_0x163fce(0xc9)]){const _0x44b626=await selectSingleAppcode(_0x30bd15[_0x163fce(0xdf)]);await runCreate({'projectName':_0x30bd15['projectCode'],'appCode':_0x44b626||undefined,'env':_0x30bd15[_0x163fce(0xf4)]},_0x30bd15);}else await guidedCreateProject(_0x312c75=>runCreate(_0x312c75,_0x30bd15),_0x30bd15[_0x163fce(0xf4)],_0x30bd15[_0x163fce(0xdf)]);}}async function runCreate(_0xf4ddab,_0x26d6d5){const _0x2000f3=a164_0xd170;_0xf4ddab[_0x2000f3(0x113)]=validateProjectName(_0xf4ddab['projectName']);const _0x34c83c=a164_0x4a03ef[_0x2000f3(0x10b)](process[_0x2000f3(0xdd)](),_0xf4ddab[_0x2000f3(0x113)]);if(a164_0xad5882[_0x2000f3(0x10c)](_0x34c83c))throw new Error(_0x2000f3(0xd2)+_0xf4ddab['projectName']+_0x2000f3(0xf3));let _0x2ed754=null;try{a164_0xad5882[_0x2000f3(0xdc)](a164_0x4a03ef[_0x2000f3(0xb2)](_0x34c83c),a164_0xad5882[_0x2000f3(0xe8)]['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x2000f3(0xc1)](_0x2000f3(0xd4),_0x2000f3(0xf8)+_0xf4ddab[_0x2000f3(0x113)],{'projectDir':_0x34c83c,'appCode':_0xf4ddab['appCode']}),console['log'](),console['log'](a164_0x5a37c6[_0x2000f3(0xc5)]('\x20√\x20')+_0x2000f3(0xfe)+a164_0x5a37c6[_0x2000f3(0xc5)](_0xf4ddab[_0x2000f3(0x113)])+(_0xf4ddab[_0x2000f3(0xbb)]?_0x2000f3(0xce)+a164_0x5a37c6[_0x2000f3(0xe7)](_0xf4ddab[_0x2000f3(0xbb)]):''));try{await runTask(_0x2000f3(0x118),_0x316025=>copyProjectTemplate(_0xf4ddab[_0x2000f3(0x113)],_0x2700e2=>_0x316025(projectTemplateStageLabel(_0x2700e2))),_0x2000f3(0x101)),_0x2ed754=readDirectoryIdentity(_0x34c83c);if(!_0x2ed754)throw new Error(_0x2000f3(0xcd));await updatePackageJsonName(_0xf4ddab[_0x2000f3(0x113)]),await runTask(_0x2000f3(0xf0),()=>installDependencies(_0xf4ddab[_0x2000f3(0x113)])),await runTask(_0x2000f3(0x119),()=>formatProjectCode(_0xf4ddab[_0x2000f3(0x113)])),await configureAppCode(_0xf4ddab[_0x2000f3(0x113)],_0xf4ddab[_0x2000f3(0xbb)]||'',_0xf4ddab[_0x2000f3(0xf4)]);let _0x4a0559=![];if(_0xf4ddab['appCode']){console['log'](_0x2000f3(0xc7));const _0x1bf00b=process[_0x2000f3(0xdd)]();try{process[_0x2000f3(0x104)](_0x34c83c);const _0x17c04f=_0xf4ddab['env']||'production';initEnv(_0x17c04f);const {configArray:_0x7c2626}=await fetchModelList(_0xf4ddab[_0x2000f3(0xbb)],_0x26d6d5[_0x2000f3(0xdf)]||''),_0x207a47=DEFAULT_API_DIR,_0x550004=await generateApiFile(_0x7c2626,'',_0xf4ddab[_0x2000f3(0xbb)],!![],_0x17c04f,_0x207a47);console[_0x2000f3(0xdb)](_0x2000f3(0xd9)+_0x7c2626[_0x2000f3(0xd5)]+'\x20dataset(s),\x20generated\x20'+_0x550004['modelCount']+_0x2000f3(0x114)),logger['info'](_0x2000f3(0xd4),'API\x20configuration\x20pulled:\x20'+_0xf4ddab[_0x2000f3(0xbb)]);}catch(_0x471264){_0x4a0559=!![],console['log'](_0x2000f3(0xba)),logger[_0x2000f3(0xfa)](_0x2000f3(0xd4),'API\x20配置拉取异常',{'error':_0x471264 instanceof Error?_0x471264[_0x2000f3(0xc2)]:String(_0x471264)});}finally{process['chdir'](_0x1bf00b);}}logger[_0x2000f3(0xfb)](_0x34c83c),logger[_0x2000f3(0xd7)](_0x2000f3(0xd4),_0x2000f3(0xc6)+_0xf4ddab[_0x2000f3(0x113)]),console[_0x2000f3(0xdb)](),console[_0x2000f3(0xdb)](a164_0x5a37c6['green']('─'['repeat'](0x3c))),console['log'](a164_0x5a37c6[_0x2000f3(0xe7)][_0x2000f3(0xf2)](_0x2000f3(0xe2))),console[_0x2000f3(0xdb)](),console[_0x2000f3(0xdb)](_0x2000f3(0xd3)+a164_0x5a37c6[_0x2000f3(0xe7)][_0x2000f3(0xf2)](_0x2000f3(0xf5)+_0xf4ddab['projectName']+_0x2000f3(0x112)+CLI_BIN_NAME+_0x2000f3(0x100))),_0x4a0559&&console['log'](_0x2000f3(0xbf)+a164_0x5a37c6[_0x2000f3(0xe7)][_0x2000f3(0xf2)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x2000f3(0xdb)](a164_0x5a37c6['green']('─'[_0x2000f3(0xb4)](0x3c)));}catch(_0x1f9cae){logger['error'](_0x2000f3(0xd4),_0x2000f3(0xef)+_0xf4ddab[_0x2000f3(0x113)],{'error':_0x1f9cae instanceof Error?_0x1f9cae[_0x2000f3(0xc2)]:String(_0x1f9cae)});try{const _0x58cb16=readDirectoryIdentity(_0x34c83c);if(_0x2ed754&&_0x58cb16?.['dev']===_0x2ed754[_0x2000f3(0xd0)]&&_0x58cb16[_0x2000f3(0xc0)]===_0x2ed754[_0x2000f3(0xc0)])console[_0x2000f3(0xdb)](_0x2000f3(0xcc)+_0x34c83c),a164_0xad5882[_0x2000f3(0xaf)](_0x34c83c,{'recursive':!![],'force':!![]});else _0x58cb16&&logger[_0x2000f3(0xfa)](_0x2000f3(0xd4),_0x2000f3(0xec)+_0x34c83c);}catch{logger[_0x2000f3(0xfa)](_0x2000f3(0xd4),_0x2000f3(0xb1)+_0x34c83c);}throw _0x1f9cae;}}async function runTask(_0xdc456d,_0x397b3e,_0x17de25=_0xdc456d){const _0x44b809=a164_0xd170,_0x1b52a1=a164_0x2f3ae1(_0xdc456d+_0x44b809(0xf7))[_0x44b809(0xe0)]();try{const _0xd921c0=await _0x397b3e(_0x41f22e=>{const _0x41a1ad=_0x44b809;_0x1b52a1[_0x41a1ad(0x117)]=_0x41f22e+'...';});_0x1b52a1[_0x44b809(0xc3)](),console[_0x44b809(0xdb)](''+a164_0x5a37c6[_0x44b809(0xc5)]('\x20√\x20')+_0x17de25+'\x20'+a164_0x5a37c6[_0x44b809(0xea)]('['+_0xd921c0+']'));}catch(_0x155f96){_0x1b52a1[_0x44b809(0xb5)](_0xdc456d);throw _0x155f96;}}function projectTemplateStageLabel(_0xc745f6){const _0x56bd4c=a164_0xd170;switch(_0xc745f6){case _0x56bd4c(0xb9):return'Resolving\x20project\x20template';case'downloading':return _0x56bd4c(0xeb);case _0x56bd4c(0xca):return _0x56bd4c(0xc4);case _0x56bd4c(0xf6):return _0x56bd4c(0xae);}}async function updatePackageJsonName(_0x270225){const _0x2de136=a164_0xd170,_0x49d7a3=a164_0x4a03ef[_0x2de136(0x10b)](process[_0x2de136(0xdd)](),_0x270225),_0x11743f=a164_0x4a03ef[_0x2de136(0x10d)](_0x49d7a3,_0x2de136(0xd6));try{console[_0x2de136(0xdb)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x126431=getRabetbaseCliPackageRoot(),_0x4b3031=a164_0x4a03ef[_0x2de136(0x10d)](_0x126431,_0x2de136(0xd6));let _0x33d4f9=_0x2de136(0x105);try{const _0x28782c=JSON[_0x2de136(0xcf)](a164_0xad5882[_0x2de136(0x10a)](_0x4b3031,_0x2de136(0xe5)));_0x33d4f9=_0x28782c[_0x2de136(0xe4)]||'1.0.0';}catch{}const _0xd13394=a164_0xad5882[_0x2de136(0x10a)](_0x11743f,_0x2de136(0xe5)),_0x846b44=JSON[_0x2de136(0xcf)](_0xd13394);_0x846b44[_0x2de136(0xee)]=_0x270225,_0x846b44[_0x2de136(0xb6)]=_0x270225+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x33d4f9,a164_0xad5882[_0x2de136(0xb8)](_0x11743f,JSON['stringify'](_0x846b44,null,0x2)+'\x0a',_0x2de136(0xe5)),console[_0x2de136(0xdb)](_0x2de136(0xb3)+_0x270225),logger[_0x2de136(0xc1)](_0x2de136(0xd4),'更新\x20package.json\x20name');}catch(_0x4864de){logger[_0x2de136(0xe6)](_0x2de136(0xd4),_0x2de136(0x10f));throw _0x4864de;}}async function configureAppCode(_0x3847b8,_0x1f219f,_0x265b82){const _0x6eb9be=a164_0xd170,_0x563e25=a164_0x4a03ef[_0x6eb9be(0x10b)](process[_0x6eb9be(0xdd)](),_0x3847b8),_0x22032a=a164_0x4a03ef[_0x6eb9be(0x10d)](_0x563e25,NEW_CONFIG_NAME);try{_0x1f219f?console[_0x6eb9be(0xdb)](_0x6eb9be(0xc8)+_0x3847b8+':\x20'+_0x1f219f):console['log'](_0x6eb9be(0xe9)+_0x3847b8);const _0x401a7b=getRabetbaseCliPackageRoot(),_0x43504f=a164_0x4a03ef['join'](_0x401a7b,_0x6eb9be(0xd6));let _0x599d71=_0x6eb9be(0x105);try{const _0x10811b=JSON['parse'](a164_0xad5882[_0x6eb9be(0x10a)](_0x43504f,_0x6eb9be(0xe5)));_0x599d71=_0x10811b[_0x6eb9be(0xe4)]||_0x6eb9be(0x105);}catch{}const _0xb81bfc=readConfig(),_0x16c133=typeof _0xb81bfc[_0x6eb9be(0xf4)]===_0x6eb9be(0x111)?_0xb81bfc[_0x6eb9be(0xf4)]:undefined,_0x36115f={};for(const _0xeb0d8e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0xb81bfc[_0xeb0d8e]!=null)_0x36115f[_0xeb0d8e]=_0xb81bfc[_0xeb0d8e];}const _0x11010a=buildCanonicalProjectConfig(_0x36115f,{'appCodes':_0x1f219f?[_0x1f219f]:[],'env':_0x265b82||_0x16c133||_0x6eb9be(0x116),'metadata':{'createdAt':new Date()[_0x6eb9be(0xe3)](),'version':_0x599d71}});writeConfigFile(_0x22032a,_0x11010a),_0x1f219f?console['log']('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x6eb9be(0x106)](_0x11010a[_0x6eb9be(0xbd)]||{})[_0x6eb9be(0x10d)](',\x20')+_0x6eb9be(0xed)+_0x11010a[_0x6eb9be(0xd1)]):console[_0x6eb9be(0xdb)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x6eb9be(0x103)),logger[_0x6eb9be(0xc1)](_0x6eb9be(0xd4),_0x6eb9be(0xfc)+_0x1f219f);}catch(_0x592eba){logger['error']('create',_0x6eb9be(0x109));throw _0x592eba;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x29bbfe=a165_0x32d0;(function(_0x565871,_0x44a6ea){const _0x548024=a165_0x32d0,_0x32b271=_0x565871();while(!![]){try{const _0x569f55=parseInt(_0x548024(0x22d))/0x1+parseInt(_0x548024(0x22c))/0x2*(parseInt(_0x548024(0x21a))/0x3)+parseInt(_0x548024(0x20b))/0x4*(-parseInt(_0x548024(0x215))/0x5)+parseInt(_0x548024(0x22e))/0x6+-parseInt(_0x548024(0x201))/0x7+-parseInt(_0x548024(0x219))/0x8*(-parseInt(_0x548024(0x1fa))/0x9)+parseInt(_0x548024(0x226))/0xa;if(_0x569f55===_0x44a6ea)break;else _0x32b271['push'](_0x32b271['shift']());}catch(_0x4eb55a){_0x32b271['push'](_0x32b271['shift']());}}}(a165_0x3224,0xa11a5));import{createHash}from'node:crypto';function a165_0x3224(){const _0x2d3041=['extracting','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','byteLength','length','href','isSafeInteger','arrayBuffer','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','signal','application/zip','getReader','releaseLock','trim','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','Project\x20template\x20package.json\x20is\x20invalid.','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','ino','verifying','size','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','hex','cancel','protocol','push','writeFile','template.zip','status','join','7090317QHGVDw','headers','mkdtemp','from','includes','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','code','4858560QwvSZh','cdn','resolve','test','.rabetbase-create-','sha256','string','mkdir','object','pathname','374584lCJkCf','validation','projectTemplate','digest','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','toLowerCase','startsWith','message','dev','resolving','45RzhUkh','number','dirname','readdir','8IvINwa','6hmQtAf','content-length','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','origin','Project\x20directory\x20already\x20exists:\x20','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','parse','name','isDirectory','body','isFinite','downloading','7546330LohEwV','project','package.json',',\x20received\x20','abort','Use\x20a\x20different\x20project\x20name.','16246plnBkh','324937VlrRAv','1878852MLkHKF','version','rename','utf8','sha256:','get','lstat','sub-app-react-demo'];a165_0x3224=function(){return _0x2d3041;};return a165_0x3224();}import a165_0x5a3c8a from'node:fs/promises';import a165_0x5b7362 from'node:path';function a165_0x32d0(_0x1fab59,_0x48ebbc){_0x1fab59=_0x1fab59-0x1e6;const _0x32241a=a165_0x3224();let _0x32d044=_0x32241a[_0x1fab59];return _0x32d044;}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=a165_0x29bbfe(0x235),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x4a4103){const _0x1c4123=a165_0x29bbfe;return typeof _0x4a4103===_0x1c4123(0x207)&&_0x4a4103[_0x1c4123(0x1ea)]()?_0x4a4103[_0x1c4123(0x1ea)]():null;}function parseDescriptor(_0x70bc34){const _0x4a19a7=a165_0x29bbfe;if(!_0x70bc34||typeof _0x70bc34!==_0x4a19a7(0x209))throw new Error(_0x4a19a7(0x23d)+TEMPLATE_ID+'\x22.');const _0xfb142=_0x70bc34,_0x24d404=nonEmptyString(_0xfb142[_0x4a19a7(0x22f)]),_0x5e6cc2=nonEmptyString(_0xfb142[_0x4a19a7(0x221)]),_0xfc3cfe=nonEmptyString(_0xfb142['sha256'])?.[_0x4a19a7(0x210)](),_0x2ca698=_0xfb142['size'];if(!_0x24d404||!_0x5e6cc2||_0x5e6cc2!==a165_0x5b7362['posix']['basename'](_0x5e6cc2)||_0x5e6cc2[_0x4a19a7(0x1fe)]('\x5c')||!_0xfc3cfe||!/^sha256:[a-f0-9]{64}$/[_0x4a19a7(0x204)](_0xfc3cfe)||typeof _0x2ca698!==_0x4a19a7(0x216)||!Number[_0x4a19a7(0x23b)](_0x2ca698)||_0x2ca698<=0x0||_0x2ca698>MAX_ARCHIVE_SIZE)throw new Error(_0x4a19a7(0x1f1)+TEMPLATE_ID+'\x22.');return{'version':_0x24d404,'name':_0x5e6cc2,'sha256':_0xfc3cfe,'size':_0x2ca698};}async function fetchWithTimeout(_0x109d9c,_0x43e929,_0x1b3cd2,_0x3bc0cc){const _0x1d40c0=a165_0x29bbfe,_0x26c2ba=new AbortController(),_0xe39df8=setTimeout(()=>_0x26c2ba[_0x1d40c0(0x22a)](),_0x43e929);try{const _0x4fc895=await fetch(_0x109d9c,{'headers':{'Accept':_0x1b3cd2},'signal':_0x26c2ba[_0x1d40c0(0x1e6)]});return await _0x3bc0cc(_0x4fc895);}finally{clearTimeout(_0xe39df8);}}async function fetchTemplateDescriptor(){const _0x5c49ef=a165_0x29bbfe,_0x9506eb=await getRabetbaseCdnConfig();if(!_0x9506eb)throw new Error(_0x5c49ef(0x1ff));return parseDescriptor(_0x9506eb[_0x5c49ef(0x20d)]);}function resolveArchiveUrl(_0x549058){const _0x108c2e=a165_0x29bbfe,_0x5e4130=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x3ac100=new URL(_0x549058,_0x5e4130);if(_0x3ac100[_0x108c2e(0x1f4)]!=='https:'||_0x3ac100[_0x108c2e(0x21d)]!==_0x5e4130[_0x108c2e(0x21d)]||!_0x3ac100[_0x108c2e(0x20a)][_0x108c2e(0x211)](_0x5e4130[_0x108c2e(0x20a)]))throw new Error(_0x108c2e(0x21f));return _0x3ac100[_0x108c2e(0x23a)];}async function readResponseBytes(_0x54e422,_0x3ce025){const _0x1668ad=a165_0x29bbfe;if(!_0x54e422[_0x1668ad(0x223)]){const _0x318515=Buffer[_0x1668ad(0x1fd)](await _0x54e422[_0x1668ad(0x23c)]());if(_0x318515[_0x1668ad(0x239)]>_0x3ce025)throw new Error(_0x1668ad(0x20f));return _0x318515;}const _0x3f813f=_0x54e422[_0x1668ad(0x223)][_0x1668ad(0x1e8)](),_0x18f121=[];let _0x17c8f1=0x0;try{while(!![]){const {done:_0x3db483,value:_0x103a4d}=await _0x3f813f['read']();if(_0x3db483)break;_0x17c8f1+=_0x103a4d[_0x1668ad(0x238)];if(_0x17c8f1>_0x3ce025){await _0x3f813f[_0x1668ad(0x1f3)]();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0x18f121[_0x1668ad(0x1f5)](Buffer[_0x1668ad(0x1fd)](_0x103a4d));}}finally{_0x3f813f[_0x1668ad(0x1e9)]();}return Buffer['concat'](_0x18f121,_0x17c8f1);}async function downloadArchive(_0x5a8220,_0x15992b,_0xa4edc3){const _0x3aaa9e=a165_0x29bbfe,_0xd35edf=await fetchWithTimeout(resolveArchiveUrl(_0x5a8220[_0x3aaa9e(0x221)]),ARCHIVE_TIMEOUT_MS,_0x3aaa9e(0x1e7),async _0x2f1e13=>{const _0x51c4eb=_0x3aaa9e;if(!_0x2f1e13['ok'])throw new Error(_0x51c4eb(0x1eb)+_0x2f1e13[_0x51c4eb(0x1f8)]+'.');const _0x2e6505=Number(_0x2f1e13[_0x51c4eb(0x1fb)][_0x51c4eb(0x233)](_0x51c4eb(0x21b)));if(Number[_0x51c4eb(0x224)](_0x2e6505)&&_0x2e6505>MAX_ARCHIVE_SIZE)throw new Error(_0x51c4eb(0x1ed));return readResponseBytes(_0x2f1e13,_0x5a8220[_0x51c4eb(0x1f0)]);});if(_0xd35edf['length']!==_0x5a8220[_0x3aaa9e(0x1f0)])throw new Error('CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20'+_0x5a8220[_0x3aaa9e(0x1f0)]+_0x3aaa9e(0x229)+_0xd35edf[_0x3aaa9e(0x239)]+'.');_0xa4edc3?.(_0x3aaa9e(0x1ef));const _0x25cdb7=_0x3aaa9e(0x232)+createHash(_0x3aaa9e(0x206))['update'](_0xd35edf)[_0x3aaa9e(0x20e)](_0x3aaa9e(0x1f2));if(_0x25cdb7!==_0x5a8220[_0x3aaa9e(0x206)])throw new Error(_0x3aaa9e(0x21c));await a165_0x5a3c8a[_0x3aaa9e(0x1f6)](_0x15992b,_0xd35edf,{'flag':'wx'});}async function assertTemplateRoot(_0x4b4ed9){const _0x5b6e67=a165_0x29bbfe,_0x318242=a165_0x5b7362[_0x5b6e67(0x1f9)](_0x4b4ed9,_0x5b6e67(0x228)),_0x3570ee=JSON[_0x5b6e67(0x220)](await a165_0x5a3c8a['readFile'](_0x318242,_0x5b6e67(0x231)));if(!_0x3570ee||typeof _0x3570ee!=='object')throw new Error(_0x5b6e67(0x1ec));}async function readDirectoryIdentity(_0x371b10){const _0x117c4a=a165_0x29bbfe;try{const _0x321123=await a165_0x5a3c8a['lstat'](_0x371b10);if(!_0x321123[_0x117c4a(0x222)]())return null;return{'dev':_0x321123[_0x117c4a(0x213)],'ino':_0x321123[_0x117c4a(0x1ee)]};}catch{return null;}}async function commitStagedProject(_0x45b12b,_0x35e8a9){const _0x488c9e=a165_0x29bbfe;await a165_0x5a3c8a[_0x488c9e(0x208)](_0x35e8a9);const _0x1fa0eb=await readDirectoryIdentity(_0x35e8a9);if(!_0x1fa0eb)throw new Error('Unable\x20to\x20claim\x20the\x20project\x20directory.');try{for(const _0x6eb87d of await a165_0x5a3c8a[_0x488c9e(0x218)](_0x45b12b)){await a165_0x5a3c8a[_0x488c9e(0x230)](a165_0x5b7362[_0x488c9e(0x1f9)](_0x45b12b,_0x6eb87d),a165_0x5b7362[_0x488c9e(0x1f9)](_0x35e8a9,_0x6eb87d));}}catch(_0x546458){const _0xaab012=await readDirectoryIdentity(_0x35e8a9);_0xaab012?.['dev']===_0x1fa0eb['dev']&&_0xaab012['ino']===_0x1fa0eb[_0x488c9e(0x1ee)]&&await a165_0x5a3c8a['rm'](_0x35e8a9,{'recursive':!![],'force':!![]});throw _0x546458;}}export async function materializeProjectTemplate(_0x174f1,_0xbc48cb){const _0x1ef3dc=a165_0x29bbfe,_0x19a2b1=a165_0x5b7362[_0x1ef3dc(0x203)](_0x174f1),_0x29af4d=a165_0x5b7362[_0x1ef3dc(0x217)](_0x19a2b1);try{await a165_0x5a3c8a[_0x1ef3dc(0x234)](_0x19a2b1);throw new Error('Project\x20directory\x20already\x20exists:\x20'+_0x19a2b1);}catch(_0x136b01){if(_0x136b01[_0x1ef3dc(0x200)]!=='ENOENT')throw _0x136b01;}const _0x1ef270=await a165_0x5a3c8a[_0x1ef3dc(0x1fc)](a165_0x5b7362['join'](_0x29af4d,_0x1ef3dc(0x205))),_0x5dcd93=a165_0x5b7362[_0x1ef3dc(0x1f9)](_0x1ef270,_0x1ef3dc(0x227)),_0x4ca55e=a165_0x5b7362[_0x1ef3dc(0x1f9)](_0x1ef270,_0x1ef3dc(0x1f7));try{try{_0xbc48cb?.(_0x1ef3dc(0x214));const _0x205c33=await fetchTemplateDescriptor();return _0xbc48cb?.(_0x1ef3dc(0x225)),await downloadArchive(_0x205c33,_0x4ca55e,_0xbc48cb),_0xbc48cb?.(_0x1ef3dc(0x236)),await extractProjectTemplateArchive(_0x4ca55e,_0x5dcd93),await assertTemplateRoot(_0x5dcd93),await commitStagedProject(_0x5dcd93,_0x19a2b1),{'source':_0x1ef3dc(0x202),'version':_0x205c33['version']};}catch(_0x492dd8){if(_0x492dd8['code']==='EEXIST')throw CliErrors[_0x1ef3dc(0x20c)](_0x1ef3dc(0x21e)+_0x19a2b1,_0x1ef3dc(0x22b));const _0x4c2aca=_0x492dd8 instanceof Error?_0x492dd8[_0x1ef3dc(0x212)]:String(_0x492dd8);throw CliErrors[_0x1ef3dc(0x20c)](_0x1ef3dc(0x23e),_0x1ef3dc(0x237)+_0x4c2aca);}}finally{await a165_0x5a3c8a['rm'](_0x1ef270,{'recursive':!![],'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x292e6c,_0x4a86c6){const _0x1847a2=a166_0x55de,_0xea39bb=_0x292e6c();while(!![]){try{const _0x39d889=-parseInt(_0x1847a2(0x71))/0x1+-parseInt(_0x1847a2(0x70))/0x2*(parseInt(_0x1847a2(0x79))/0x3)+-parseInt(_0x1847a2(0x72))/0x4*(parseInt(_0x1847a2(0x78))/0x5)+-parseInt(_0x1847a2(0x6c))/0x6+parseInt(_0x1847a2(0x73))/0x7+parseInt(_0x1847a2(0x77))/0x8+parseInt(_0x1847a2(0x69))/0x9*(parseInt(_0x1847a2(0x68))/0xa);if(_0x39d889===_0x4a86c6)break;else _0xea39bb['push'](_0xea39bb['shift']());}catch(_0x55bad9){_0xea39bb['push'](_0xea39bb['shift']());}}}(a166_0xd1af,0xc90ba));import{CliErrors}from'../../../errors.js';function a166_0xd1af(){const _0x2e1c75=['423734aRaeoi','1403627HUqjEs','12VNmSYa','11196094fTNSTB','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','test','trim','7039160fToUai','1736100JFFDVI','15nCLbkD','44830LmNxRF','3879TkyoWz','Project\x20name\x20\x22','Project\x20name\x20cannot\x20exceed\x20','500436BKxxyX','\x20characters','validation','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.'];a166_0xd1af=function(){return _0x2e1c75;};return a166_0xd1af();}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(_0x43b1b6){const _0x4ca284=a166_0x55de,_0x40b023=_0x43b1b6['trim']();if(!_0x40b023)return'Project\x20name\x20cannot\x20be\x20empty';if(_0x40b023['length']>MAX_PROJECT_NAME_LENGTH)return _0x4ca284(0x6b)+MAX_PROJECT_NAME_LENGTH+_0x4ca284(0x6d);if(!PROJECT_NAME_PATTERN[_0x4ca284(0x75)](_0x40b023))return _0x4ca284(0x74);if(WINDOWS_RESERVED_NAME[_0x4ca284(0x75)](_0x40b023))return _0x4ca284(0x6a)+_0x40b023+'\x22\x20is\x20reserved\x20on\x20Windows';return null;}function a166_0x55de(_0x7c9c60,_0x2f5326){_0x7c9c60=_0x7c9c60-0x68;const _0xd1afd=a166_0xd1af();let _0x55defd=_0xd1afd[_0x7c9c60];return _0x55defd;}export function validateProjectName(_0x23a101){const _0x2cad7d=a166_0x55de,_0x1571e5=_0x23a101[_0x2cad7d(0x76)](),_0x30d60d=getProjectNameValidationError(_0x1571e5);if(_0x30d60d)throw CliErrors[_0x2cad7d(0x6e)](_0x30d60d,_0x2cad7d(0x6f));return _0x1571e5;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x586a28,_0x13acca){const _0x41672d=a167_0xdc97,_0x581954=_0x586a28();while(!![]){try{const _0x16e0f6=-parseInt(_0x41672d(0x1f3))/0x1+parseInt(_0x41672d(0x1fd))/0x2*(parseInt(_0x41672d(0x204))/0x3)+parseInt(_0x41672d(0x20f))/0x4+parseInt(_0x41672d(0x1fc))/0x5+parseInt(_0x41672d(0x1f8))/0x6*(parseInt(_0x41672d(0x1f9))/0x7)+-parseInt(_0x41672d(0x213))/0x8+-parseInt(_0x41672d(0x216))/0x9;if(_0x16e0f6===_0x13acca)break;else _0x581954['push'](_0x581954['shift']());}catch(_0x34fa24){_0x581954['push'](_0x581954['shift']());}}}(a167_0x4709,0x2329b));import{createWriteStream}from'node:fs';import a167_0x38a8c2 from'node:fs/promises';function a167_0xdc97(_0x3a28eb,_0x2a1ac3){_0x3a28eb=_0x3a28eb-0x1f0;const _0x47095a=a167_0x4709();let _0xdc97e6=_0x47095a[_0x3a28eb];return _0xdc97e6;}import a167_0x4ddcca from'node:path';import{pipeline}from'node:stream/promises';function a167_0x4709(){const _0x525f3f=['286397OmkPcW','test','join','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','length','253272zWRXfn','28vpRQJW','entry','once','763540hfDTNg','220118RuSTHU','Project\x20template\x20ZIP\x20exceeds\x20','isEncrypted','endsWith','readEntry','en-US','mkdir','3MXkrDg','\x20entries.','startsWith','Case-conflicting\x20ZIP\x20entry\x20path:\x20','get','fileName','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','Unable\x20to\x20open\x20project\x20template\x20archive.','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','slice','resolve','364296mtpwhy','add','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','192968TUhIDr','uncompressedSize','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','613296HiyoLb','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','dirname','split','set','openReadStream','sep','toLocaleLowerCase','replace','close'];a167_0x4709=function(){return _0x525f3f;};return a167_0x4709();}import a167_0x22fe0b 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(_0x3ff8fe){return new Promise((_0x23dfed,_0x57a832)=>{a167_0x22fe0b['open'](_0x3ff8fe,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x113d0e,_0x44e6a2)=>{const _0x2c66f6=a167_0xdc97;if(_0x113d0e||!_0x44e6a2){_0x57a832(_0x113d0e||new Error(_0x2c66f6(0x20b)));return;}_0x23dfed(_0x44e6a2);});});}function openEntryStream(_0x2af610,_0x42ee7c){return new Promise((_0xcb5dcb,_0x5658f4)=>{const _0x38baee=a167_0xdc97;_0x2af610[_0x38baee(0x21b)](_0x42ee7c,(_0x42fb6c,_0x3e934e)=>{const _0x517055=_0x38baee;if(_0x42fb6c||!_0x3e934e){_0x5658f4(_0x42fb6c||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0x42ee7c[_0x517055(0x209)]));return;}_0xcb5dcb(_0x3e934e);});});}function validateEntryPath(_0x4ecb88){const _0xbe318=a167_0xdc97,_0x352d5c=_0x4ecb88[_0xbe318(0x1f1)](/\\/g,'/'),_0x5d0b3c=_0x352d5c['endsWith']('/'),_0xebc1fc=_0x5d0b3c?_0x352d5c[_0xbe318(0x20d)](0x0,-0x1):_0x352d5c;if(!_0xebc1fc||_0x352d5c[_0xbe318(0x206)]('/')||/^[A-Za-z]:\//[_0xbe318(0x1f4)](_0x352d5c))throw new Error(_0xbe318(0x215)+_0x4ecb88);const _0x278225=_0xebc1fc[_0xbe318(0x219)]('/');for(const _0x3e9b15 of _0x278225){if(!_0x3e9b15||_0x3e9b15==='.'||_0x3e9b15==='..'||_0x3e9b15[_0xbe318(0x200)]('.')||_0x3e9b15['endsWith']('\x20')||WINDOWS_INVALID_CHAR['test'](_0x3e9b15)||WINDOWS_RESERVED_NAME[_0xbe318(0x1f4)](_0x3e9b15))throw new Error(_0xbe318(0x20a)+_0x4ecb88);}return{'relativePath':_0x278225[_0xbe318(0x1f5)](a167_0x4ddcca['sep']),'directory':_0x5d0b3c};}function isSymbolicLink(_0x56796e){const _0x284795=_0x56796e['externalFileAttributes']>>>0x10&0xffff;return(_0x284795&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x20c65a,_0x59cec7){const _0x1dc986=a167_0xdc97,_0x3b2820=await openZip(_0x20c65a),_0x2a63ac=a167_0x4ddcca['resolve'](_0x59cec7),_0x5101b1=new Set(),_0x33404e=new Map();let _0x2c38cf=0x0,_0x59b21a=0x0;await a167_0x38a8c2[_0x1dc986(0x203)](_0x2a63ac,{'recursive':!![]}),await new Promise((_0x35d12d,_0x105ca3)=>{const _0x319ca1=_0x1dc986;let _0x9bad76=![];const _0x45ac7a=_0x489662=>{const _0x4f2d50=a167_0xdc97;if(_0x9bad76)return;_0x9bad76=!![],_0x3b2820[_0x4f2d50(0x1f2)](),_0x105ca3(_0x489662 instanceof Error?_0x489662:new Error(String(_0x489662)));};_0x3b2820[_0x319ca1(0x1fb)]('error',_0x45ac7a),_0x3b2820[_0x319ca1(0x1fb)]('end',()=>{if(_0x9bad76)return;_0x9bad76=!![],_0x35d12d();}),_0x3b2820['on'](_0x319ca1(0x1fa),_0x5efd8a=>{void(async()=>{const _0x404f98=a167_0xdc97;_0x2c38cf+=0x1,_0x59b21a+=_0x5efd8a[_0x404f98(0x214)];if(_0x2c38cf>MAX_ENTRY_COUNT)throw new Error(_0x404f98(0x1fe)+MAX_ENTRY_COUNT+_0x404f98(0x205));if(_0x59b21a>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x404f98(0x212));if(_0x5efd8a[_0x404f98(0x1ff)]())throw new Error(_0x404f98(0x1f6)+_0x5efd8a[_0x404f98(0x209)]);if(isSymbolicLink(_0x5efd8a))throw new Error(_0x404f98(0x211)+_0x5efd8a[_0x404f98(0x209)]);const {relativePath:_0x1bbe52,directory:_0x25fb84}=validateEntryPath(_0x5efd8a[_0x404f98(0x209)]),_0x112f90=_0x1bbe52[_0x404f98(0x219)](a167_0x4ddcca[_0x404f98(0x21c)]);for(let _0x21287c=0x1;_0x21287c<=_0x112f90[_0x404f98(0x1f7)];_0x21287c+=0x1){const _0x2f9fba=_0x112f90[_0x404f98(0x20d)](0x0,_0x21287c)[_0x404f98(0x1f5)](a167_0x4ddcca[_0x404f98(0x21c)]),_0x24cc79=_0x2f9fba[_0x404f98(0x1f0)](_0x404f98(0x202)),_0x33ba11=_0x33404e[_0x404f98(0x208)](_0x24cc79);if(_0x33ba11&&_0x33ba11!==_0x2f9fba)throw new Error(_0x404f98(0x207)+_0x5efd8a[_0x404f98(0x209)]);_0x33404e[_0x404f98(0x21a)](_0x24cc79,_0x2f9fba);}const _0x4649f4=_0x1bbe52['toLocaleLowerCase'](_0x404f98(0x202));if(_0x5101b1['has'](_0x4649f4))throw new Error(_0x404f98(0x20c)+_0x5efd8a['fileName']);_0x5101b1[_0x404f98(0x210)](_0x4649f4);const _0x43278b=a167_0x4ddcca[_0x404f98(0x20e)](_0x2a63ac,_0x1bbe52);if(_0x43278b!==_0x2a63ac&&!_0x43278b['startsWith'](''+_0x2a63ac+a167_0x4ddcca[_0x404f98(0x21c)]))throw new Error(_0x404f98(0x217)+_0x5efd8a['fileName']);if(_0x25fb84)await a167_0x38a8c2[_0x404f98(0x203)](_0x43278b,{'recursive':!![]});else{await a167_0x38a8c2[_0x404f98(0x203)](a167_0x4ddcca[_0x404f98(0x218)](_0x43278b),{'recursive':!![]});const _0x416a36=await openEntryStream(_0x3b2820,_0x5efd8a);await pipeline(_0x416a36,createWriteStream(_0x43278b,{'flags':'wx','mode':0x1a4}));}_0x3b2820[_0x404f98(0x201)]();})()['catch'](_0x45ac7a);}),_0x3b2820[_0x319ca1(0x201)]();});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a168_0x580a31=a168_0x5deb;(function(_0x177895,_0x1fcda9){const _0x47bf70=a168_0x5deb,_0x5ef3f7=_0x177895();while(!![]){try{const _0x2d922a=-parseInt(_0x47bf70(0x11e))/0x1*(-parseInt(_0x47bf70(0x12a))/0x2)+-parseInt(_0x47bf70(0x120))/0x3+parseInt(_0x47bf70(0x121))/0x4+-parseInt(_0x47bf70(0x124))/0x5+-parseInt(_0x47bf70(0x123))/0x6*(-parseInt(_0x47bf70(0x129))/0x7)+parseInt(_0x47bf70(0x125))/0x8*(-parseInt(_0x47bf70(0x122))/0x9)+-parseInt(_0x47bf70(0x127))/0xa*(parseInt(_0x47bf70(0x128))/0xb);if(_0x2d922a===_0x1fcda9)break;else _0x5ef3f7['push'](_0x5ef3f7['shift']());}catch(_0x33a65b){_0x5ef3f7['push'](_0x5ef3f7['shift']());}}}(a168_0x2d01,0x4d13f));import a168_0x535895 from'node:path';import{fileURLToPath}from'node:url';function a168_0x2d01(){const _0x3d07c1=['42114jALcgB','688465zoWrrK','8hNDaJD','dirname','1250erDylI','27467ByOwEY','378PnYtni','798JzOcOm','../../../../','1470SkPbkO','resolve','771681PMZdrk','1297732CZPzPH','2405097cWQEVS'];a168_0x2d01=function(){return _0x3d07c1;};return a168_0x2d01();}const __dirname=a168_0x535895[a168_0x580a31(0x126)](fileURLToPath(import.meta.url));function a168_0x5deb(_0x1c715c,_0x50283f){_0x1c715c=_0x1c715c-0x11e;const _0x2d01da=a168_0x2d01();let _0x5deb88=_0x2d01da[_0x1c715c];return _0x5deb88;}export function getRabetbaseCliPackageRoot(){const _0x2aec26=a168_0x580a31;return a168_0x535895[_0x2aec26(0x11f)](__dirname,_0x2aec26(0x12b));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11ce0a,_0x4d5bb1){const _0x41866b=a169_0x1cd7,_0x1c62f2=_0x11ce0a();while(!![]){try{const _0x122ebe=-parseInt(_0x41866b(0x192))/0x1*(parseInt(_0x41866b(0x19a))/0x2)+-parseInt(_0x41866b(0x19f))/0x3+-parseInt(_0x41866b(0x196))/0x4*(parseInt(_0x41866b(0x1a1))/0x5)+-parseInt(_0x41866b(0x19e))/0x6*(-parseInt(_0x41866b(0x19c))/0x7)+-parseInt(_0x41866b(0x18c))/0x8*(-parseInt(_0x41866b(0x193))/0x9)+parseInt(_0x41866b(0x194))/0xa*(parseInt(_0x41866b(0x1a0))/0xb)+parseInt(_0x41866b(0x199))/0xc;if(_0x122ebe===_0x4d5bb1)break;else _0x1c62f2['push'](_0x1c62f2['shift']());}catch(_0x5c3e88){_0x1c62f2['push'](_0x1c62f2['shift']());}}}(a169_0x551c,0xe4549));function a169_0x551c(){const _0x9bba09=['2134wKTcqH','项目模板创建完成','159243qiJenX','source','426TtiZjP','3647370zJajMg','11JOeMxw','5oxDxMc','3054824OcVsCv','success','cwd','copy','resolve','now','1369YjbsHK','18HUzUKN','771840YwDyIZ','项目模板复制失败','3660HRyskR','error','开始创建项目模板','13879200tXLrFR'];a169_0x551c=function(){return _0x9bba09;};return a169_0x551c();}function a169_0x1cd7(_0x3974e6,_0x2718d8){_0x3974e6=_0x3974e6-0x18c;const _0x551ce4=a169_0x551c();let _0x1cd747=_0x551ce4[_0x3974e6];return _0x1cd747;}import a169_0x13145e 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(_0x58069a,_0x3744b0){const _0x405ca3=a169_0x1cd7,_0x4f77c3=Date[_0x405ca3(0x191)](),_0x49011f=a169_0x13145e[_0x405ca3(0x190)](process[_0x405ca3(0x18e)](),_0x58069a);try{logger['info'](_0x405ca3(0x18f),_0x405ca3(0x198),{'projectCode':_0x58069a});const _0x8c7eeb=await materializeProjectTemplate(_0x49011f,_0x3744b0),_0x43d760=Date[_0x405ca3(0x191)]()-_0x4f77c3;logger[_0x405ca3(0x18d)](_0x405ca3(0x18f),_0x405ca3(0x19b),_0x43d760,{'projectCode':_0x58069a,'templateSource':_0x8c7eeb[_0x405ca3(0x19d)],'templateVersion':_0x8c7eeb['version']});}catch(_0x1618b4){const _0x39d013=Date[_0x405ca3(0x191)]()-_0x4f77c3;logger[_0x405ca3(0x197)]('copy',_0x405ca3(0x195),{'projectCode':_0x58069a,'error':_0x1618b4 instanceof Error?_0x1618b4['message']:String(_0x1618b4),'duration':_0x39d013});throw _0x1618b4;}return formatElapsed(_0x4f77c3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1efc9d,_0xae3fa1){const _0x1e0ed3=a170_0x574d,_0x2269d4=_0x1efc9d();while(!![]){try{const _0x3c6e5a=-parseInt(_0x1e0ed3(0xa5))/0x1+-parseInt(_0x1e0ed3(0x99))/0x2+-parseInt(_0x1e0ed3(0xa3))/0x3*(-parseInt(_0x1e0ed3(0x9c))/0x4)+-parseInt(_0x1e0ed3(0xa0))/0x5+-parseInt(_0x1e0ed3(0xa6))/0x6+parseInt(_0x1e0ed3(0x93))/0x7+-parseInt(_0x1e0ed3(0x9a))/0x8*(-parseInt(_0x1e0ed3(0x9d))/0x9);if(_0x3c6e5a===_0xae3fa1)break;else _0x2269d4['push'](_0x2269d4['shift']());}catch(_0x921672){_0x2269d4['push'](_0x2269d4['shift']());}}}(a170_0x3f2f,0xc091c));import a170_0x49e14a from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a170_0x3f2f(){const _0x5b59f2=['5219440FefOyz','resolve','cwd','82383ruasGq','error','707306haoggX','3817854eQitFO','7458619xSoQnt','代码格式化失败','success','format','now','prettier','2105738zMnmDn','108384hVCFop','message','76lArRTW','1755xPsXBd','--write','info'];a170_0x3f2f=function(){return _0x5b59f2;};return a170_0x3f2f();}import{resolveNpmBin}from'../../../utils/platform.js';function a170_0x574d(_0x40ae79,_0x135898){_0x40ae79=_0x40ae79-0x93;const _0x3f2f72=a170_0x3f2f();let _0x574dd1=_0x3f2f72[_0x40ae79];return _0x574dd1;}export async function formatProjectCode(_0x47ec85){const _0x2168f7=a170_0x574d,_0x46b34d=Date[_0x2168f7(0x97)](),_0x57bed9=a170_0x49e14a[_0x2168f7(0xa1)](process[_0x2168f7(0xa2)](),_0x47ec85);try{logger[_0x2168f7(0x9f)](_0x2168f7(0x96),'开始格式化代码',{'projectCode':_0x47ec85}),await execa(resolveNpmBin('npx'),[_0x2168f7(0x98),_0x2168f7(0x9e),'.'],{'cwd':_0x57bed9});const _0x5362d3=Date['now']()-_0x46b34d;logger[_0x2168f7(0x95)](_0x2168f7(0x96),'代码格式化完成',_0x5362d3,{'projectCode':_0x47ec85});}catch(_0x54722e){const _0x40fff1=Date[_0x2168f7(0x97)]()-_0x46b34d;logger[_0x2168f7(0xa4)](_0x2168f7(0x96),_0x2168f7(0x94),{'projectCode':_0x47ec85,'error':_0x54722e instanceof Error?_0x54722e[_0x2168f7(0x9b)]:String(_0x54722e),'duration':_0x40fff1});throw _0x54722e;}return formatElapsed(_0x46b34d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16eb31,_0xbbff4b){const _0x30712d=a171_0x5102,_0x2193e2=_0x16eb31();while(!![]){try{const _0x43d43c=parseInt(_0x30712d(0x9f))/0x1+-parseInt(_0x30712d(0xb1))/0x2+parseInt(_0x30712d(0xa8))/0x3+-parseInt(_0x30712d(0xab))/0x4*(parseInt(_0x30712d(0xa7))/0x5)+-parseInt(_0x30712d(0xb0))/0x6*(parseInt(_0x30712d(0xa3))/0x7)+parseInt(_0x30712d(0xad))/0x8+-parseInt(_0x30712d(0xa5))/0x9*(parseInt(_0x30712d(0x9e))/0xa);if(_0x43d43c===_0xbbff4b)break;else _0x2193e2['push'](_0x2193e2['shift']());}catch(_0x1bb4d9){_0x2193e2['push'](_0x2193e2['shift']());}}}(a171_0x527e,0x87723));import a171_0x265a61 from'node:path';import{execa}from'execa';function a171_0x527e(){const _0x54613d=['resolve','280780CNgofr','install','8080560CLbghj','依赖安装完成','npm','618SRlYay','931234hgpUpt','https://registry.npmmirror.com','10icCLPX','4497Oewvkt','message','依赖安装失败','success','56266SKuwSR','info','412785RCODuA','now','15mHXHmq','3270603fuHQho','开始安装依赖'];a171_0x527e=function(){return _0x54613d;};return a171_0x527e();}function a171_0x5102(_0x12fd73,_0x5458c3){_0x12fd73=_0x12fd73-0x9e;const _0x527e5c=a171_0x527e();let _0x51029b=_0x527e5c[_0x12fd73];return _0x51029b;}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(_0x1982f4){const _0xdd0640=a171_0x5102,_0x8cb6f4=Date['now'](),_0x3d29bb=a171_0x265a61[_0xdd0640(0xaa)](process['cwd'](),_0x1982f4);try{logger[_0xdd0640(0xa4)]('install',_0xdd0640(0xa9),{'projectCode':_0x1982f4,'registry':_0xdd0640(0xb2)}),await execa(resolveNpmBin(_0xdd0640(0xaf)),[_0xdd0640(0xac),'--registry',_0xdd0640(0xb2)],{'cwd':_0x3d29bb});const _0x11e218=Date[_0xdd0640(0xa6)]()-_0x8cb6f4;logger[_0xdd0640(0xa2)](_0xdd0640(0xac),_0xdd0640(0xae),_0x11e218,{'projectCode':_0x1982f4});}catch(_0x1a1200){const _0x2e9a66=Date['now']()-_0x8cb6f4;logger['error'](_0xdd0640(0xac),_0xdd0640(0xa1),{'projectCode':_0x1982f4,'error':_0x1a1200 instanceof Error?_0x1a1200[_0xdd0640(0xa0)]:String(_0x1a1200),'duration':_0x2e9a66});throw _0x1a1200;}return formatElapsed(_0x8cb6f4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a172_0x4f23eb=a172_0x518e;function a172_0x518e(_0x4beab0,_0x3165f1){_0x4beab0=_0x4beab0-0x1bb;const _0x200708=a172_0x2007();let _0x518ed2=_0x200708[_0x4beab0];return _0x518ed2;}(function(_0x10c75c,_0x542d81){const _0x1c9e00=a172_0x518e,_0x41cd7d=_0x10c75c();while(!![]){try{const _0x54f01c=parseInt(_0x1c9e00(0x1d5))/0x1+-parseInt(_0x1c9e00(0x1bf))/0x2+parseInt(_0x1c9e00(0x1c0))/0x3+parseInt(_0x1c9e00(0x1cb))/0x4+-parseInt(_0x1c9e00(0x1d3))/0x5+-parseInt(_0x1c9e00(0x1d9))/0x6*(-parseInt(_0x1c9e00(0x1c6))/0x7)+parseInt(_0x1c9e00(0x1c3))/0x8*(-parseInt(_0x1c9e00(0x1cc))/0x9);if(_0x54f01c===_0x542d81)break;else _0x41cd7d['push'](_0x41cd7d['shift']());}catch(_0x5755fa){_0x41cd7d['push'](_0x41cd7d['shift']());}}}(a172_0x2007,0xded56));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a172_0x2007(){const _0x33852e=['Usage:\x20','env','5431205gmIwOv','Target\x20environment','1525473XrJWIl','boolean','trim','write','28146CxFhit','str','cookie','validation','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','609340RAVbQu','4295295RfOoHj','Skip\x20confirmation\x20prompt','yes','2952hXSqSD','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','2051YSbrzZ','string','create','args','appcode','1025660GeaOEy','55719tkeYMI','upgrade','name','../../commands/project/create/main.js','project-name'];a172_0x2007=function(){return _0x33852e;};return a172_0x2007();}import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':a172_0x4f23eb(0x1ce),'type':a172_0x4f23eb(0x1c7),'description':'Project\x20name'},{'name':a172_0x4f23eb(0x1d2),'type':a172_0x4f23eb(0x1c7),'description':a172_0x4f23eb(0x1d4)},{'name':a172_0x4f23eb(0x1ca),'type':a172_0x4f23eb(0x1c7),'description':a172_0x4f23eb(0x1c4)}],upgradeFlags=[{'name':a172_0x4f23eb(0x1c2),'type':a172_0x4f23eb(0x1d6),'description':a172_0x4f23eb(0x1c1),'default':![]}];export const projectDefinitions=[{'service':'project','command':a172_0x4f23eb(0x1c8),'description':'Create\x20a\x20new\x20project','risk':a172_0x4f23eb(0x1d8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a172_0x4f23eb(0x1d0),'description':a172_0x4f23eb(0x1be),'required':![]}],'flags':createFlags,async 'execute'(_0x2d4da4){const _0x8a3352=a172_0x4f23eb,{createApp:_0x58c334}=await import(_0x8a3352(0x1cf)),_0x382f00=_0x2d4da4[_0x8a3352(0x1bb)]('name')[_0x8a3352(0x1d7)]()||_0x2d4da4[_0x8a3352(0x1c9)][0x0]?.[_0x8a3352(0x1d7)](),_0x57d160=_0x2d4da4[_0x8a3352(0x1bb)]('env')||undefined,_0x484a3b=_0x2d4da4[_0x8a3352(0x1bb)](_0x8a3352(0x1ca))||undefined;if(_0x2d4da4['nonInteractive']){if(!_0x382f00)throw CliErrors[_0x8a3352(0x1bd)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x8a3352(0x1d1)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x58c334({'projectCode':_0x382f00,'appCode':_0x484a3b,'env':_0x57d160,'cookie':_0x2d4da4[_0x8a3352(0x1bc)],'nonInteractive':!![]});}else await _0x58c334({'projectCode':_0x382f00,'appCode':_0x484a3b,'env':_0x57d160,'cookie':_0x2d4da4['cookie']});return{'ok':!![]};}},{'service':'project','command':a172_0x4f23eb(0x1cd),'description':a172_0x4f23eb(0x1c5),'risk':a172_0x4f23eb(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x595f97){const _0x4c6d23=a172_0x4f23eb;return await upgradeApp(_0x595f97['nonInteractive'],{'yes':_0x595f97['bool'](_0x4c6d23(0x1c2))}),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a172_0x738f06=a172_0x5bcc;(function(_0x742ab1,_0x3370c2){const _0x110840=a172_0x5bcc,_0x48cede=_0x742ab1();while(!![]){try{const _0xc278a0=-parseInt(_0x110840(0x103))/0x1*(-parseInt(_0x110840(0x153))/0x2)+-parseInt(_0x110840(0x116))/0x3+-parseInt(_0x110840(0x108))/0x4+parseInt(_0x110840(0x117))/0x5*(-parseInt(_0x110840(0x163))/0x6)+-parseInt(_0x110840(0x136))/0x7*(parseInt(_0x110840(0x15f))/0x8)+parseInt(_0x110840(0x166))/0x9+parseInt(_0x110840(0x112))/0xa*(parseInt(_0x110840(0x14f))/0xb);if(_0xc278a0===_0x3370c2)break;else _0x48cede['push'](_0x48cede['shift']());}catch(_0xfafc98){_0x48cede['push'](_0x48cede['shift']());}}}(a172_0xbd8a,0xc5b96));import a172_0x33f5ee from'chalk';import a172_0x3cc9c9 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';function a172_0xbd8a(){const _0x37d089=['oldMcpConfig','mcpServers','red','@lovrabet/sdk','isDirectory','already\x20exists\x20(will\x20merge)','Step\x205/7:\x20Removing\x20old\x20skill...','\x20\x20npm\x20install','sdkUpgrade','Skill\x20swap:','fields','.lovrabet','keys','Config\x20file:','CANCEL','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','utf8','Remove\x20.lovrabet/','label','dependencies','Upgrade\x20completed\x20successfully!','1nTgRXs','Proceed\x20with\x20upgrade?','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','push','inherit','1888628xxZPjV','FOUND','@lovrabet/sdk:','path','configMigration','Upgrade\x20@lovrabet/sdk','latest','no\x20legacy\x20entry','files','===\x20Upgrade\x20Summary\x20===','27624070bBfctc','undefined','not\x20needed','exit\x20','1649919LzJAUi','25xSGYqR','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','\x20\x20Step\x20','start','Upgrade\x20cancelled.','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','skipped\x20(no\x20legacy\x20config)','\x20→\x20latest','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','args','===\x20Upgrade\x20Analysis\x20===','FAIL','lovrabet/rabetbase\x20installed\x20globally','entries','.cursor/rules/lovrabet_rules.mdc','string','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','object','cwd','stringify','done','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','step','Step\x204/7:\x20MCP\x20config\x20—\x20','Step\x204/7:\x20Cleaning\x20MCP\x20config...','message','devDependencies','[\x22@lovrabet/sdk\x22]:\x20','\x20from\x20','none\x20found','\x20\x20bun\x20install','898093ZsvSTF','yes','lovrabet/lovrabet-skill\x20removed','\x20\x20Action:\x20delete','parse','cyan','failed','package.json','detail','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','join','log','\x20removed\x20(','removed\x20','\x20→\x20keys:\x20','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','length','gray','filter','green','oldArtifacts','\x20(backup:\x20','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','error','yellow','11XEpwzg','Install\x20new\x20skill','\x20\x20#\x20or','succeed','2043046cRzvCy','Remove\x20legacy\x20artifacts','\x20\x20New\x20config\x20(.rabetbase.json):\x20','MCP\x20config:','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Step\x201/7:\x20Migrating\x20config...','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','bold','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Clean\x20MCP\x20config','status','skipped','80xLcnvl','includes','.claude/skills/lovrabet','not\x20found\x20(will\x20create)','1049052RwfhMs','white','Step\x201/7:\x20Config\x20migration\x20—\x20','1847502hShgIS','\x20removed','\x20→\x20','some','Config\x20migration','hasNewConfig','fail','oldPath','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Legacy\x20artifacts:','@lovrabet/dataset-mcp-server'];a172_0xbd8a=function(){return _0x37d089;};return a172_0xbd8a();}import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a172_0x738f06(0x148)](_0x369588=>_0x369588!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x113086){const _0x20ee7a=a172_0x738f06,_0x371b8c=[];for(const _0x31c608 of Object['values'](CORE_IDE_CONFIGS)){if(_0x31c608[_0x20ee7a(0x110)])for(const _0x31ca59 of _0x31c608['files']){_0x371b8c[_0x20ee7a(0x106)](resolve(_0x113086,_0x31ca59[_0x20ee7a(0x10b)]));}}return _0x371b8c;}function analyse(_0x53134a){const _0x3fbdb5=a172_0x738f06;let _0x17820f=null;const _0xe17b35=resolve(_0x53134a,NEW_CONFIG_NAME),_0x3c373a=existsSync(_0xe17b35);for(const _0xf559b9 of LEGACY_CONFIG_NAMES){const _0x218ef5=resolve(_0x53134a,_0xf559b9);if(existsSync(_0x218ef5)){const _0x38065a=readConfigFile(_0x218ef5),_0x42aaa5=Object[_0x3fbdb5(0xf9)](_0x38065a)[_0x3fbdb5(0x148)](_0x36764b=>typeof _0x38065a[_0x36764b]!==_0x3fbdb5(0x113));_0x17820f={'oldPath':_0x218ef5,'hasNewConfig':_0x3c373a,'fields':_0x42aaa5};break;}}const _0x4cbafa=[],_0x2a3353=resolve(_0x53134a,_0x3fbdb5(0xf8));if(existsSync(_0x2a3353))_0x4cbafa['push'](_0x2a3353);const _0x14c544=resolve(_0x53134a,_0x3fbdb5(0x125));if(existsSync(_0x14c544))_0x4cbafa[_0x3fbdb5(0x106)](_0x14c544);const _0x1c4574=resolve(_0x53134a,_0x3fbdb5(0x161));if(existsSync(_0x1c4574))_0x4cbafa[_0x3fbdb5(0x106)](_0x1c4574);for(const _0x598621 of collectIdeSkillFiles(_0x53134a)){if(existsSync(_0x598621))_0x4cbafa['push'](_0x598621);}let _0x45339a=null;const _0x15f820=resolve(_0x53134a,'.cursor/mcp.json');if(existsSync(_0x15f820))try{const _0x16ea9d=JSON[_0x3fbdb5(0x13a)](readFileSync(_0x15f820,'utf8'));if(_0x16ea9d?.[_0x3fbdb5(0x172)]&&typeof _0x16ea9d[_0x3fbdb5(0x172)]===_0x3fbdb5(0x128)){const _0x105192=[];for(const [_0x3d075a,_0x131ad7]of Object['entries'](_0x16ea9d['mcpServers'])){const _0x2d9956=_0x131ad7;_0x2d9956?.['args']&&Array['isArray'](_0x2d9956[_0x3fbdb5(0x120)])&&_0x2d9956[_0x3fbdb5(0x120)][_0x3fbdb5(0x169)](_0x4b6f1e=>typeof _0x4b6f1e==='string'&&_0x4b6f1e['includes'](_0x3fbdb5(0x170)))&&_0x105192[_0x3fbdb5(0x106)](_0x3d075a);}_0x105192['length']>0x0&&(_0x45339a={'path':_0x15f820,'keys':_0x105192});}}catch{}const _0x5a6d05=_0x4cbafa[_0x3fbdb5(0x146)]>0x0||_0x17820f!==null;let _0x70daa4=null;const _0x1f7d48=resolve(_0x53134a,_0x3fbdb5(0x13d));if(existsSync(_0x1f7d48))try{const _0x22abe0=JSON[_0x3fbdb5(0x13a)](readFileSync(_0x1f7d48,'utf8'));for(const _0x2506f2 of[_0x3fbdb5(0x101),_0x3fbdb5(0x131)]){const _0x523a1c=_0x22abe0?.[_0x2506f2]?.['@lovrabet/sdk'];if(typeof _0x523a1c===_0x3fbdb5(0x126)){_0x523a1c!=='latest'&&(_0x70daa4={'pkgPath':_0x1f7d48,'currentVersion':_0x523a1c,'field':_0x2506f2});break;}}}catch{}return{'configMigration':_0x17820f,'oldArtifacts':_0x4cbafa,'oldMcpConfig':_0x45339a,'needsSkillSwap':_0x5a6d05,'sdkUpgrade':_0x70daa4};}function printReport(_0x526022){const _0xf6f73f=a172_0x738f06,{configMigration:_0x1c24f6,oldArtifacts:_0x204d49,oldMcpConfig:_0x17a3d4,needsSkillSwap:_0x2dd482}=_0x526022;console[_0xf6f73f(0x141)](''),console[_0xf6f73f(0x141)](a172_0x33f5ee[_0xf6f73f(0x15a)](_0xf6f73f(0x121))),console[_0xf6f73f(0x141)]('');_0x1c24f6?(console[_0xf6f73f(0x141)](a172_0x33f5ee[_0xf6f73f(0x13b)](_0xf6f73f(0xfa))+('\x20\x20'+a172_0x33f5ee[_0xf6f73f(0x14e)](_0x1c24f6[_0xf6f73f(0x16d)]))),console[_0xf6f73f(0x141)](_0xf6f73f(0x155)+(_0x1c24f6[_0xf6f73f(0x16b)]?a172_0x33f5ee[_0xf6f73f(0x149)](_0xf6f73f(0xf2)):a172_0x33f5ee[_0xf6f73f(0x147)](_0xf6f73f(0x162)))),console[_0xf6f73f(0x141)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x1c24f6[_0xf6f73f(0xf7)][_0xf6f73f(0x140)](',\x20')),console[_0xf6f73f(0x141)](_0xf6f73f(0x127))):console['log'](a172_0x33f5ee[_0xf6f73f(0x13b)]('Config\x20file:')+'\x20\x20'+a172_0x33f5ee[_0xf6f73f(0x147)]('no\x20legacy\x20config\x20found'));console[_0xf6f73f(0x141)]('');if(_0x204d49['length']>0x0){console[_0xf6f73f(0x141)](a172_0x33f5ee[_0xf6f73f(0x13b)](_0xf6f73f(0x16f)));for(const _0x1dd5fe of _0x204d49){console[_0xf6f73f(0x141)]('\x20\x20'+a172_0x33f5ee[_0xf6f73f(0x173)](_0xf6f73f(0x109))+'\x20\x20'+_0x1dd5fe);}console[_0xf6f73f(0x141)](_0xf6f73f(0x139));}else console[_0xf6f73f(0x141)](a172_0x33f5ee[_0xf6f73f(0x13b)](_0xf6f73f(0x16f))+'\x20\x20'+a172_0x33f5ee['gray'](_0xf6f73f(0x134)));console[_0xf6f73f(0x141)]('');_0x17a3d4?(console[_0xf6f73f(0x141)](a172_0x33f5ee['cyan'](_0xf6f73f(0x156))+('\x20\x20'+a172_0x33f5ee[_0xf6f73f(0x14e)](_0x17a3d4[_0xf6f73f(0x10b)])+_0xf6f73f(0x144)+_0x17a3d4[_0xf6f73f(0xf9)][_0xf6f73f(0x140)](',\x20'))),console['log'](_0xf6f73f(0xfd))):console[_0xf6f73f(0x141)](a172_0x33f5ee['cyan'](_0xf6f73f(0x156))+'\x20\x20'+a172_0x33f5ee['gray'](_0xf6f73f(0x10f)));console[_0xf6f73f(0x141)](''),console[_0xf6f73f(0x141)](a172_0x33f5ee[_0xf6f73f(0x13b)](_0xf6f73f(0xf6))+('\x20\x20'+(_0x2dd482?a172_0x33f5ee[_0xf6f73f(0x14e)]('needed'):a172_0x33f5ee[_0xf6f73f(0x149)](_0xf6f73f(0x114)))));_0x2dd482&&console[_0xf6f73f(0x141)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x526022['sdkUpgrade']){const {currentVersion:_0x247c64,field:_0x22e2d5,pkgPath:_0x23834f}=_0x526022[_0xf6f73f(0xf5)];console[_0xf6f73f(0x141)](a172_0x33f5ee[_0xf6f73f(0x13b)](_0xf6f73f(0x10a))+('\x20\x20'+a172_0x33f5ee[_0xf6f73f(0x14e)](_0x23834f))),console[_0xf6f73f(0x141)]('\x20\x20Current\x20version\x20in\x20'+_0x22e2d5+':\x20'+a172_0x33f5ee[_0xf6f73f(0x14e)](_0x247c64)+_0xf6f73f(0x168)+a172_0x33f5ee[_0xf6f73f(0x149)](_0xf6f73f(0x10e))),console[_0xf6f73f(0x141)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0xf6f73f(0x141)](a172_0x33f5ee['cyan'](_0xf6f73f(0x10a))+'\x20\x20'+a172_0x33f5ee[_0xf6f73f(0x147)]('not\x20found\x20or\x20already\x20at\x20latest'));console[_0xf6f73f(0x141)]('');}function execConfigMigration(_0x7e7e37,_0x1d802e){const _0x10ad95=a172_0x738f06,{configMigration:_0x2a5cb1}=_0x7e7e37;if(!_0x2a5cb1?.[_0x10ad95(0x16d)])return{'step':0x1,'label':_0x10ad95(0x16a),'ok':!![],'detail':_0x10ad95(0x11d)};const _0x5dc46b=readConfigFile(_0x2a5cb1[_0x10ad95(0x16d)]),_0x598b86=resolve(_0x1d802e,NEW_CONFIG_NAME),_0x77cd57=_0x2a5cb1['hasNewConfig']?readConfigFile(_0x598b86):{};for(const [_0x459fee,_0x4f8bc9]of Object[_0x10ad95(0x124)](_0x5dc46b)){!(_0x459fee in _0x77cd57)&&(_0x77cd57[_0x459fee]=_0x4f8bc9);}writeConfigFile(_0x598b86,_0x77cd57);const _0x43dac3=_0x2a5cb1[_0x10ad95(0x16d)]+'.bak';return renameSync(_0x2a5cb1[_0x10ad95(0x16d)],_0x43dac3),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x2a5cb1[_0x10ad95(0x16d)]+_0x10ad95(0x168)+_0x598b86+_0x10ad95(0x14b)+_0x43dac3+')'};}function execRemoveOldArtifacts(_0x40a6ae){const _0x2580e6=a172_0x738f06,_0x41e986=[];for(const _0x301450 of _0x40a6ae){try{if(!existsSync(_0x301450))continue;const _0x2887f8=tryStat(_0x301450);_0x2887f8?.[_0x2580e6(0x175)]()?rmSync(_0x301450,{'recursive':!![],'force':!![]}):unlinkSync(_0x301450);}catch(_0x2e05bc){_0x41e986[_0x2580e6(0x106)](_0x301450+':\x20'+_0x2e05bc[_0x2580e6(0x130)]);}}return{'step':0x3,'label':_0x2580e6(0x154),'ok':_0x41e986[_0x2580e6(0x146)]===0x0,'detail':_0x41e986['length']>0x0?_0x40a6ae[_0x2580e6(0x146)]-_0x41e986['length']+'/'+_0x40a6ae[_0x2580e6(0x146)]+_0x2580e6(0x142)+_0x41e986[_0x2580e6(0x140)](';\x20')+')':_0x40a6ae[_0x2580e6(0x146)]+_0x2580e6(0x167)};}function execCleanMcp(_0x56955b){const _0x2288b9=a172_0x738f06;if(!_0x56955b[_0x2288b9(0x171)])return{'step':0x4,'label':_0x2288b9(0x15c),'ok':!![],'detail':'skipped'};try{const _0x2cc0b5=readFileSync(_0x56955b[_0x2288b9(0x171)][_0x2288b9(0x10b)],_0x2288b9(0xfe)),_0x1e33af=JSON['parse'](_0x2cc0b5);if(_0x1e33af?.[_0x2288b9(0x172)]&&typeof _0x1e33af[_0x2288b9(0x172)]===_0x2288b9(0x128)){const _0x3752dc=[];for(const [_0x5d4615,_0x135977]of Object[_0x2288b9(0x124)](_0x1e33af[_0x2288b9(0x172)])){_0x135977?.[_0x2288b9(0x120)]&&Array['isArray'](_0x135977[_0x2288b9(0x120)])&&_0x135977[_0x2288b9(0x120)]['some'](_0x2d989e=>typeof _0x2d989e===_0x2288b9(0x126)&&_0x2d989e[_0x2288b9(0x160)](_0x2288b9(0x170)))&&_0x3752dc[_0x2288b9(0x106)](_0x5d4615);}for(const _0x586c05 of _0x3752dc){delete _0x1e33af[_0x2288b9(0x172)][_0x586c05];}return _0x3752dc[_0x2288b9(0x146)]>0x0&&writeFileSync(_0x56955b['oldMcpConfig']['path'],JSON['stringify'](_0x1e33af,null,0x2)+'\x0a',_0x2288b9(0xfe)),{'step':0x4,'label':_0x2288b9(0x15c),'ok':!![],'detail':_0x2288b9(0x143)+_0x3752dc[_0x2288b9(0x140)](',\x20')+_0x2288b9(0x133)+_0x56955b[_0x2288b9(0x171)][_0x2288b9(0x10b)]};}return{'step':0x4,'label':_0x2288b9(0x15c),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x2bbff7){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x2bbff7[_0x2288b9(0x130)]};}}function execSkillsRemove(_0x47b614,_0x4b3df9){const _0x381287=a172_0x738f06,_0x21858a=runNpxSkillsRemove(_0x47b614,{'stdio':_0x381287(0x107),'yes':_0x4b3df9});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x21858a['ok'],'detail':_0x21858a['ok']?_0x381287(0x138):_0x21858a[_0x381287(0x14d)]??_0x381287(0x115)+_0x21858a[_0x381287(0x15d)]};}function a172_0x5bcc(_0x230eeb,_0x2a7aca){_0x230eeb=_0x230eeb-0xf2;const _0xbd8a77=a172_0xbd8a();let _0x5bcc73=_0xbd8a77[_0x230eeb];return _0x5bcc73;}function execSkillsAdd(_0x4fea8e,_0x4d4c21){const _0x18058c=a172_0x738f06,_0x313533=runNpxSkillsAddGlobal(_0x4fea8e,'lovrabet/rabetbase',{'stdio':_0x18058c(0x107),'yes':_0x4d4c21});return{'step':0x6,'label':_0x18058c(0x150),'ok':_0x313533['ok'],'detail':_0x313533['ok']?_0x18058c(0x123):_0x313533[_0x18058c(0x14d)]??_0x18058c(0x115)+_0x313533['status']};}function execUpgradeSdk(_0x1927ba){const _0x602269=a172_0x738f06;if(!_0x1927ba[_0x602269(0xf5)])return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x602269(0x11c)};const {pkgPath:_0x65d453,currentVersion:_0x1d7bc6,field:_0x388cf8}=_0x1927ba[_0x602269(0xf5)];try{const _0x5949f5=readFileSync(_0x65d453,_0x602269(0xfe)),_0x592a4f=JSON[_0x602269(0x13a)](_0x5949f5);return _0x592a4f[_0x388cf8][_0x602269(0x174)]=_0x602269(0x10e),writeFileSync(_0x65d453,JSON[_0x602269(0x12a)](_0x592a4f,null,0x2)+'\x0a',_0x602269(0xfe)),{'step':0x7,'label':_0x602269(0x10d),'ok':!![],'detail':_0x388cf8+_0x602269(0x132)+_0x1d7bc6+_0x602269(0x11e)};}catch(_0x576edb){return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x576edb[_0x602269(0x130)]};}}function tryStat(_0x20183a){try{return statSync(_0x20183a);}catch{return undefined;}}function printSummary(_0x349320){const _0x15beef=a172_0x738f06;console[_0x15beef(0x141)](''),console[_0x15beef(0x141)](a172_0x33f5ee[_0x15beef(0x15a)](_0x15beef(0x111))),console[_0x15beef(0x141)]('');for(const _0x138b1a of _0x349320){const _0x17dfdc=_0x138b1a['ok']?a172_0x33f5ee[_0x15beef(0x149)]('OK'):a172_0x33f5ee['red'](_0x15beef(0x122));console[_0x15beef(0x141)]('\x20\x20'+_0x17dfdc+_0x15beef(0x119)+_0x138b1a[_0x15beef(0x12d)]+':\x20'+_0x138b1a[_0x15beef(0x100)]);if(_0x138b1a[_0x15beef(0x13e)])console[_0x15beef(0x141)]('\x20\x20\x20\x20\x20\x20\x20'+a172_0x33f5ee[_0x15beef(0x147)](_0x138b1a[_0x15beef(0x13e)]));}console[_0x15beef(0x141)]('');}export async function upgradeApp(_0x226c95,_0x2fb7b0){const _0xbdcf65=a172_0x738f06,_0x235c61=process[_0xbdcf65(0x129)](),_0x2ca253=analyse(_0x235c61),_0x52a1f8=!_0x2ca253[_0xbdcf65(0x10c)]&&_0x2ca253[_0xbdcf65(0x14a)]['length']===0x0&&!_0x2ca253[_0xbdcf65(0x171)]&&!_0x2ca253['needsSkillSwap']&&!_0x2ca253['sdkUpgrade'];if(_0x52a1f8){console[_0xbdcf65(0x141)](a172_0x33f5ee[_0xbdcf65(0x149)](_0xbdcf65(0x14c)));return;}printReport(_0x2ca253);const _0x2987d8=!!(_0x2fb7b0[_0xbdcf65(0x137)]||_0x2fb7b0['Y']||_0x226c95);if(!_0x2987d8)try{const _0x186454=await askConfirm(_0xbdcf65(0x104));if(!_0x186454){console[_0xbdcf65(0x141)](a172_0x33f5ee[_0xbdcf65(0x147)](_0xbdcf65(0x11b)));return;}}catch(_0x4dd64c){if(_0x4dd64c?.['message']===_0xbdcf65(0xfb)){console['log'](a172_0x33f5ee['gray']('Upgrade\x20cancelled.'));return;}throw _0x4dd64c;}const _0x4eb8bd=[],_0x507e21=a172_0x3cc9c9({'text':_0xbdcf65(0x158),'color':_0xbdcf65(0x13b)})[_0xbdcf65(0x11a)](),_0x41b66f=execConfigMigration(_0x2ca253,_0x235c61);_0x4eb8bd[_0xbdcf65(0x106)](_0x41b66f),_0x507e21[_0x41b66f['ok']?_0xbdcf65(0x152):_0xbdcf65(0x16c)](_0xbdcf65(0x165)+(_0x41b66f[_0xbdcf65(0x13e)]??(_0x41b66f['ok']?_0xbdcf65(0x12b):_0xbdcf65(0x13c))));const _0x27a597=resolve(_0x235c61,_0xbdcf65(0xf8)),_0x2fed57=a172_0x3cc9c9({'text':_0xbdcf65(0x13f),'color':_0xbdcf65(0x13b)})[_0xbdcf65(0x11a)]();if(existsSync(_0x27a597))try{rmSync(_0x27a597,{'recursive':!![],'force':!![]}),_0x2fed57[_0xbdcf65(0x152)](_0xbdcf65(0x157)),_0x4eb8bd['push']({'step':0x2,'label':_0xbdcf65(0xff),'ok':!![]});}catch(_0x54f229){_0x2fed57[_0xbdcf65(0x16c)](_0xbdcf65(0xfc)+_0x54f229[_0xbdcf65(0x130)]),_0x4eb8bd[_0xbdcf65(0x106)]({'step':0x2,'label':_0xbdcf65(0xff),'ok':![],'detail':_0x54f229[_0xbdcf65(0x130)]});}else _0x2fed57['info']('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x4eb8bd[_0xbdcf65(0x106)]({'step':0x2,'label':_0xbdcf65(0xff),'ok':!![],'detail':_0xbdcf65(0x15e)});const _0x5da3f8=a172_0x3cc9c9({'text':_0xbdcf65(0x16e),'color':_0xbdcf65(0x13b)})[_0xbdcf65(0x11a)](),_0x5e4dc5=execRemoveOldArtifacts(_0x2ca253[_0xbdcf65(0x14a)]);_0x4eb8bd[_0xbdcf65(0x106)](_0x5e4dc5),_0x5da3f8[_0x5e4dc5['ok']?_0xbdcf65(0x152):_0xbdcf65(0x16c)](_0xbdcf65(0x145)+(_0x5e4dc5[_0xbdcf65(0x13e)]??(_0x5e4dc5['ok']?_0xbdcf65(0x12b):'failed')));const _0x4a4fdf=a172_0x3cc9c9({'text':_0xbdcf65(0x12f),'color':'cyan'})['start'](),_0x3debe=execCleanMcp(_0x2ca253);_0x4eb8bd[_0xbdcf65(0x106)](_0x3debe),_0x4a4fdf[_0x3debe['ok']?'succeed':_0xbdcf65(0x16c)](_0xbdcf65(0x12e)+(_0x3debe[_0xbdcf65(0x13e)]??(_0x3debe['ok']?_0xbdcf65(0x12b):_0xbdcf65(0x13c))));const _0x585d66=a172_0x3cc9c9({'text':_0xbdcf65(0xf3),'color':'cyan'})['start'](),_0x4e573b=execSkillsRemove(_0x235c61,_0x2987d8);_0x4eb8bd[_0xbdcf65(0x106)](_0x4e573b),_0x585d66[_0x4e573b['ok']?_0xbdcf65(0x152):_0xbdcf65(0x16c)](_0xbdcf65(0x118)+(_0x4e573b[_0xbdcf65(0x13e)]??(_0x4e573b['ok']?_0xbdcf65(0x12b):_0xbdcf65(0x13c))));const _0x49fc34=a172_0x3cc9c9({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':_0xbdcf65(0x13b)})[_0xbdcf65(0x11a)](),_0x44a6ec=execSkillsAdd(_0x235c61,_0x2987d8);_0x4eb8bd[_0xbdcf65(0x106)](_0x44a6ec),_0x49fc34[_0x44a6ec['ok']?_0xbdcf65(0x152):_0xbdcf65(0x16c)](_0xbdcf65(0x11f)+(_0x44a6ec[_0xbdcf65(0x13e)]??(_0x44a6ec['ok']?_0xbdcf65(0x12b):_0xbdcf65(0x13c))));const _0x2b3ea5=a172_0x3cc9c9({'text':_0xbdcf65(0x159),'color':'cyan'})['start'](),_0x41208a=execUpgradeSdk(_0x2ca253);_0x4eb8bd[_0xbdcf65(0x106)](_0x41208a),_0x2b3ea5[_0x41208a['ok']?_0xbdcf65(0x152):_0xbdcf65(0x16c)](_0xbdcf65(0x12c)+(_0x41208a[_0xbdcf65(0x13e)]??(_0x41208a['ok']?_0xbdcf65(0x12b):_0xbdcf65(0x13c)))),printSummary(_0x4eb8bd);const _0x527cae=_0x4eb8bd['some'](_0x42bca4=>!_0x42bca4['ok']);_0x527cae?console[_0xbdcf65(0x141)](a172_0x33f5ee[_0xbdcf65(0x14e)](_0xbdcf65(0x15b))):console['log'](a172_0x33f5ee[_0xbdcf65(0x149)](_0xbdcf65(0x102))),_0x41208a['ok']&&_0x2ca253[_0xbdcf65(0xf5)]&&(console[_0xbdcf65(0x141)](''),console['log'](a172_0x33f5ee[_0xbdcf65(0x15a)][_0xbdcf65(0x13b)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0xbdcf65(0x141)](a172_0x33f5ee['cyan'](_0xbdcf65(0x105))),console[_0xbdcf65(0x141)](''),console[_0xbdcf65(0x141)](a172_0x33f5ee[_0xbdcf65(0x164)](_0xbdcf65(0xf4))),console['log'](a172_0x33f5ee[_0xbdcf65(0x164)](_0xbdcf65(0x151))),console['log'](a172_0x33f5ee[_0xbdcf65(0x164)](_0xbdcf65(0x135))),console[_0xbdcf65(0x141)](''));}
|
|
1
|
+
const a173_0x86723d=a173_0x373e;(function(_0x16cc3e,_0x285804){const _0x1ca258=a173_0x373e,_0x4800dd=_0x16cc3e();while(!![]){try{const _0x5b0665=parseInt(_0x1ca258(0x157))/0x1+parseInt(_0x1ca258(0x168))/0x2*(-parseInt(_0x1ca258(0x119))/0x3)+parseInt(_0x1ca258(0x158))/0x4+parseInt(_0x1ca258(0x127))/0x5+-parseInt(_0x1ca258(0x145))/0x6*(-parseInt(_0x1ca258(0x11c))/0x7)+parseInt(_0x1ca258(0x135))/0x8*(parseInt(_0x1ca258(0x136))/0x9)+parseInt(_0x1ca258(0x141))/0xa*(-parseInt(_0x1ca258(0x122))/0xb);if(_0x5b0665===_0x285804)break;else _0x4800dd['push'](_0x4800dd['shift']());}catch(_0x2d046e){_0x4800dd['push'](_0x4800dd['shift']());}}}(a173_0x19b0,0x21c08));import a173_0x231642 from'chalk';import a173_0xc79344 from'ora';function a173_0x373e(_0x15ab8a,_0x1aca60){_0x15ab8a=_0x15ab8a-0xf5;const _0x19b093=a173_0x19b0();let _0x373ec8=_0x19b093[_0x15ab8a];return _0x373ec8;}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[a173_0x86723d(0x102)](_0xf18a55=>_0xf18a55!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x13b89f){const _0x288855=a173_0x86723d,_0x12cc60=[];for(const _0x4d568c of Object[_0x288855(0x146)](CORE_IDE_CONFIGS)){if(_0x4d568c['files'])for(const _0x2f60cb of _0x4d568c[_0x288855(0x10f)]){_0x12cc60[_0x288855(0x173)](resolve(_0x13b89f,_0x2f60cb[_0x288855(0x10d)]));}}return _0x12cc60;}function analyse(_0x170f28){const _0x2fc35a=a173_0x86723d;let _0x1a001c=null;const _0x301214=resolve(_0x170f28,NEW_CONFIG_NAME),_0x5a2310=existsSync(_0x301214);for(const _0x38869c of LEGACY_CONFIG_NAMES){const _0x3e97d8=resolve(_0x170f28,_0x38869c);if(existsSync(_0x3e97d8)){const _0x47d84f=readConfigFile(_0x3e97d8),_0x4087b2=Object[_0x2fc35a(0x14f)](_0x47d84f)['filter'](_0x1b1dd3=>typeof _0x47d84f[_0x1b1dd3]!=='undefined');_0x1a001c={'oldPath':_0x3e97d8,'hasNewConfig':_0x5a2310,'fields':_0x4087b2};break;}}const _0x45739f=[],_0x43f2c7=resolve(_0x170f28,'.lovrabet');if(existsSync(_0x43f2c7))_0x45739f['push'](_0x43f2c7);const _0x19414c=resolve(_0x170f28,_0x2fc35a(0x134));if(existsSync(_0x19414c))_0x45739f[_0x2fc35a(0x173)](_0x19414c);const _0x3601cf=resolve(_0x170f28,_0x2fc35a(0x160));if(existsSync(_0x3601cf))_0x45739f[_0x2fc35a(0x173)](_0x3601cf);for(const _0x43a574 of collectIdeSkillFiles(_0x170f28)){if(existsSync(_0x43a574))_0x45739f['push'](_0x43a574);}let _0x26d51f=null;const _0x5508f8=resolve(_0x170f28,_0x2fc35a(0x115));if(existsSync(_0x5508f8))try{const _0x393c37=JSON[_0x2fc35a(0x106)](readFileSync(_0x5508f8,_0x2fc35a(0x12c)));if(_0x393c37?.[_0x2fc35a(0x13a)]&&typeof _0x393c37[_0x2fc35a(0x13a)]===_0x2fc35a(0x12a)){const _0x1b97be=[];for(const [_0x44ea91,_0xba12d]of Object[_0x2fc35a(0x163)](_0x393c37[_0x2fc35a(0x13a)])){const _0xddddf2=_0xba12d;_0xddddf2?.[_0x2fc35a(0x171)]&&Array[_0x2fc35a(0x12b)](_0xddddf2[_0x2fc35a(0x171)])&&_0xddddf2[_0x2fc35a(0x171)][_0x2fc35a(0x103)](_0x13da8a=>typeof _0x13da8a===_0x2fc35a(0x111)&&_0x13da8a[_0x2fc35a(0x142)]('@lovrabet/dataset-mcp-server'))&&_0x1b97be[_0x2fc35a(0x173)](_0x44ea91);}_0x1b97be[_0x2fc35a(0x144)]>0x0&&(_0x26d51f={'path':_0x5508f8,'keys':_0x1b97be});}}catch{}const _0x21289b=_0x45739f[_0x2fc35a(0x144)]>0x0||_0x1a001c!==null;let _0x364e7b=null;const _0x5f13cf=resolve(_0x170f28,'package.json');if(existsSync(_0x5f13cf))try{const _0x5e73f0=JSON[_0x2fc35a(0x106)](readFileSync(_0x5f13cf,_0x2fc35a(0x12c)));for(const _0x386661 of[_0x2fc35a(0x104),_0x2fc35a(0xff)]){const _0x255272=_0x5e73f0?.[_0x386661]?.['@lovrabet/sdk'];if(typeof _0x255272===_0x2fc35a(0x111)){_0x255272!==_0x2fc35a(0x101)&&(_0x364e7b={'pkgPath':_0x5f13cf,'currentVersion':_0x255272,'field':_0x386661});break;}}}catch{}return{'configMigration':_0x1a001c,'oldArtifacts':_0x45739f,'oldMcpConfig':_0x26d51f,'needsSkillSwap':_0x21289b,'sdkUpgrade':_0x364e7b};}function printReport(_0x1f56e9){const _0x6d0da1=a173_0x86723d,{configMigration:_0x2a7bf9,oldArtifacts:_0x1ad811,oldMcpConfig:_0xfd86ee,needsSkillSwap:_0x494ba6}=_0x1f56e9;console[_0x6d0da1(0x151)](''),console[_0x6d0da1(0x151)](a173_0x231642[_0x6d0da1(0x133)](_0x6d0da1(0x11b))),console['log']('');_0x2a7bf9?(console[_0x6d0da1(0x151)](a173_0x231642[_0x6d0da1(0x143)](_0x6d0da1(0x12f))+('\x20\x20'+a173_0x231642[_0x6d0da1(0x126)](_0x2a7bf9[_0x6d0da1(0x16e)]))),console[_0x6d0da1(0x151)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x2a7bf9[_0x6d0da1(0x175)]?a173_0x231642[_0x6d0da1(0xf9)](_0x6d0da1(0x138)):a173_0x231642[_0x6d0da1(0x130)](_0x6d0da1(0xf6)))),console[_0x6d0da1(0x151)](_0x6d0da1(0x14d)+_0x2a7bf9[_0x6d0da1(0x176)]['join'](',\x20')),console[_0x6d0da1(0x151)](_0x6d0da1(0x100))):console[_0x6d0da1(0x151)](a173_0x231642[_0x6d0da1(0x143)](_0x6d0da1(0x12f))+'\x20\x20'+a173_0x231642[_0x6d0da1(0x130)](_0x6d0da1(0x170)));console[_0x6d0da1(0x151)]('');if(_0x1ad811[_0x6d0da1(0x144)]>0x0){console[_0x6d0da1(0x151)](a173_0x231642['cyan'](_0x6d0da1(0x12e)));for(const _0x1055df of _0x1ad811){console[_0x6d0da1(0x151)]('\x20\x20'+a173_0x231642[_0x6d0da1(0xfe)](_0x6d0da1(0x117))+'\x20\x20'+_0x1055df);}console[_0x6d0da1(0x151)](_0x6d0da1(0xf8));}else console[_0x6d0da1(0x151)](a173_0x231642[_0x6d0da1(0x143)](_0x6d0da1(0x12e))+'\x20\x20'+a173_0x231642[_0x6d0da1(0x130)]('none\x20found'));console['log']('');_0xfd86ee?(console[_0x6d0da1(0x151)](a173_0x231642[_0x6d0da1(0x143)](_0x6d0da1(0x152))+('\x20\x20'+a173_0x231642[_0x6d0da1(0x126)](_0xfd86ee['path'])+_0x6d0da1(0x137)+_0xfd86ee[_0x6d0da1(0x14f)][_0x6d0da1(0x15d)](',\x20'))),console[_0x6d0da1(0x151)](_0x6d0da1(0x156))):console[_0x6d0da1(0x151)](a173_0x231642[_0x6d0da1(0x143)](_0x6d0da1(0x152))+'\x20\x20'+a173_0x231642['gray'](_0x6d0da1(0x13d)));console[_0x6d0da1(0x151)](''),console['log'](a173_0x231642[_0x6d0da1(0x143)](_0x6d0da1(0x10b))+('\x20\x20'+(_0x494ba6?a173_0x231642[_0x6d0da1(0x126)](_0x6d0da1(0xfa)):a173_0x231642[_0x6d0da1(0xf9)](_0x6d0da1(0x147)))));_0x494ba6&&console['log']('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x6d0da1(0x151)]('');if(_0x1f56e9['sdkUpgrade']){const {currentVersion:_0x3c92ee,field:_0x509b47,pkgPath:_0x2b8c05}=_0x1f56e9[_0x6d0da1(0xf5)];console[_0x6d0da1(0x151)](a173_0x231642[_0x6d0da1(0x143)](_0x6d0da1(0x108))+('\x20\x20'+a173_0x231642['yellow'](_0x2b8c05))),console[_0x6d0da1(0x151)](_0x6d0da1(0x166)+_0x509b47+':\x20'+a173_0x231642[_0x6d0da1(0x126)](_0x3c92ee)+'\x20→\x20'+a173_0x231642['green'](_0x6d0da1(0x101))),console['log'](_0x6d0da1(0x15b));}else console[_0x6d0da1(0x151)](a173_0x231642[_0x6d0da1(0x143)](_0x6d0da1(0x108))+'\x20\x20'+a173_0x231642[_0x6d0da1(0x130)](_0x6d0da1(0x110)));console[_0x6d0da1(0x151)]('');}function execConfigMigration(_0x1248f9,_0x2b6d1a){const _0x4d191f=a173_0x86723d,{configMigration:_0x1ae784}=_0x1248f9;if(!_0x1ae784?.[_0x4d191f(0x16e)])return{'step':0x1,'label':_0x4d191f(0x11e),'ok':!![],'detail':_0x4d191f(0x162)};const _0x2cfdb0=readConfigFile(_0x1ae784['oldPath']),_0x4f8f29=resolve(_0x2b6d1a,NEW_CONFIG_NAME),_0x842572=_0x1ae784['hasNewConfig']?readConfigFile(_0x4f8f29):{};for(const [_0x419c75,_0x337590]of Object['entries'](_0x2cfdb0)){!(_0x419c75 in _0x842572)&&(_0x842572[_0x419c75]=_0x337590);}writeConfigFile(_0x4f8f29,_0x842572);const _0x4f054f=_0x1ae784[_0x4d191f(0x16e)]+_0x4d191f(0x15f);return renameSync(_0x1ae784[_0x4d191f(0x16e)],_0x4f054f),{'step':0x1,'label':_0x4d191f(0x11e),'ok':!![],'detail':_0x1ae784[_0x4d191f(0x16e)]+_0x4d191f(0x112)+_0x4f8f29+_0x4d191f(0x113)+_0x4f054f+')'};}function execRemoveOldArtifacts(_0x257d00){const _0x7ad0c5=a173_0x86723d,_0x2f5abc=[];for(const _0x51da3b of _0x257d00){try{if(!existsSync(_0x51da3b))continue;const _0x53d4e5=tryStat(_0x51da3b);_0x53d4e5?.[_0x7ad0c5(0x174)]()?rmSync(_0x51da3b,{'recursive':!![],'force':!![]}):unlinkSync(_0x51da3b);}catch(_0x432743){_0x2f5abc['push'](_0x51da3b+':\x20'+_0x432743[_0x7ad0c5(0x105)]);}}return{'step':0x3,'label':_0x7ad0c5(0x118),'ok':_0x2f5abc[_0x7ad0c5(0x144)]===0x0,'detail':_0x2f5abc[_0x7ad0c5(0x144)]>0x0?_0x257d00[_0x7ad0c5(0x144)]-_0x2f5abc[_0x7ad0c5(0x144)]+'/'+_0x257d00[_0x7ad0c5(0x144)]+_0x7ad0c5(0x16a)+_0x2f5abc[_0x7ad0c5(0x15d)](';\x20')+')':_0x257d00[_0x7ad0c5(0x144)]+_0x7ad0c5(0x124)};}function execCleanMcp(_0x24d720){const _0x3cdcb9=a173_0x86723d;if(!_0x24d720['oldMcpConfig'])return{'step':0x4,'label':_0x3cdcb9(0xfc),'ok':!![],'detail':_0x3cdcb9(0x165)};try{const _0x4e2cac=readFileSync(_0x24d720[_0x3cdcb9(0xf7)][_0x3cdcb9(0x10d)],_0x3cdcb9(0x12c)),_0x13e3ab=JSON[_0x3cdcb9(0x106)](_0x4e2cac);if(_0x13e3ab?.['mcpServers']&&typeof _0x13e3ab[_0x3cdcb9(0x13a)]===_0x3cdcb9(0x12a)){const _0x3b4904=[];for(const [_0x4c4aa0,_0x41fd84]of Object[_0x3cdcb9(0x163)](_0x13e3ab[_0x3cdcb9(0x13a)])){_0x41fd84?.[_0x3cdcb9(0x171)]&&Array['isArray'](_0x41fd84[_0x3cdcb9(0x171)])&&_0x41fd84[_0x3cdcb9(0x171)]['some'](_0x390b96=>typeof _0x390b96===_0x3cdcb9(0x111)&&_0x390b96['includes'](_0x3cdcb9(0xfd)))&&_0x3b4904[_0x3cdcb9(0x173)](_0x4c4aa0);}for(const _0x5d2eb7 of _0x3b4904){delete _0x13e3ab['mcpServers'][_0x5d2eb7];}return _0x3b4904[_0x3cdcb9(0x144)]>0x0&&writeFileSync(_0x24d720['oldMcpConfig'][_0x3cdcb9(0x10d)],JSON[_0x3cdcb9(0x159)](_0x13e3ab,null,0x2)+'\x0a',_0x3cdcb9(0x12c)),{'step':0x4,'label':_0x3cdcb9(0xfc),'ok':!![],'detail':_0x3cdcb9(0x120)+_0x3b4904[_0x3cdcb9(0x15d)](',\x20')+'\x20from\x20'+_0x24d720['oldMcpConfig'][_0x3cdcb9(0x10d)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x3829bc){return{'step':0x4,'label':_0x3cdcb9(0xfc),'ok':![],'detail':_0x3829bc[_0x3cdcb9(0x105)]};}}function execSkillsRemove(_0x20182b,_0x5ea905){const _0x15909a=a173_0x86723d,_0x291020=runNpxSkillsRemove(_0x20182b,{'stdio':_0x15909a(0x11a),'yes':_0x5ea905});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x291020['ok'],'detail':_0x291020['ok']?_0x15909a(0x15c):_0x291020['error']??_0x15909a(0x172)+_0x291020[_0x15909a(0x13c)]};}function execSkillsAdd(_0x3282cf,_0x1235c1){const _0x4a7d86=a173_0x86723d,_0x5cabfa=runNpxSkillsAddGlobal(_0x3282cf,_0x4a7d86(0x109),{'stdio':'inherit','yes':_0x1235c1});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x5cabfa['ok'],'detail':_0x5cabfa['ok']?_0x4a7d86(0x107):_0x5cabfa[_0x4a7d86(0x153)]??'exit\x20'+_0x5cabfa[_0x4a7d86(0x13c)]};}function execUpgradeSdk(_0xcee814){const _0x55281c=a173_0x86723d;if(!_0xcee814['sdkUpgrade'])return{'step':0x7,'label':_0x55281c(0x169),'ok':!![],'detail':_0x55281c(0x11f)};const {pkgPath:_0xc0fcfa,currentVersion:_0x328364,field:_0x4d47d7}=_0xcee814[_0x55281c(0xf5)];try{const _0x44c46e=readFileSync(_0xc0fcfa,_0x55281c(0x12c)),_0x315545=JSON[_0x55281c(0x106)](_0x44c46e);return _0x315545[_0x4d47d7][_0x55281c(0x129)]='latest',writeFileSync(_0xc0fcfa,JSON[_0x55281c(0x159)](_0x315545,null,0x2)+'\x0a',_0x55281c(0x12c)),{'step':0x7,'label':_0x55281c(0x169),'ok':!![],'detail':_0x4d47d7+_0x55281c(0x149)+_0x328364+'\x20→\x20latest'};}catch(_0xa849a2){return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0xa849a2[_0x55281c(0x105)]};}}function tryStat(_0x4242ce){try{return statSync(_0x4242ce);}catch{return undefined;}}function a173_0x19b0(){const _0x49e317=['latest','filter','some','dependencies','message','parse','lovrabet/rabetbase\x20installed\x20globally','@lovrabet/sdk:','lovrabet/rabetbase','cwd','Skill\x20swap:','CANCEL','path','\x20\x20Step\x20','files','not\x20found\x20or\x20already\x20at\x20latest','string','\x20→\x20','\x20(backup:\x20','info','.cursor/mcp.json','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','FOUND','Remove\x20legacy\x20artifacts','99KqxBQU','inherit','===\x20Upgrade\x20Analysis\x20===','7MkjylZ','Step\x206/7:\x20Installing\x20new\x20skill...','Config\x20migration','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','removed\x20','Step\x204/7:\x20Cleaning\x20MCP\x20config...','1984708SFdJmy','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','\x20removed','\x20\x20#\x20or','yellow','1341225tusplf','Remove\x20.lovrabet/','@lovrabet/sdk','object','isArray','utf8','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','Legacy\x20artifacts:','Config\x20file:','gray','fail','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','bold','.cursor/rules/lovrabet_rules.mdc','128lnYmUe','138519oSncPi','\x20→\x20keys:\x20','already\x20exists\x20(will\x20merge)','\x20\x20npm\x20install','mcpServers','Step\x205/7:\x20Removing\x20old\x20skill...','status','no\x20legacy\x20entry','start','FAIL','oldArtifacts','30CQSSUv','includes','cyan','length','1174362CUKZZG','values','not\x20needed','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','[\x22@lovrabet/sdk\x22]:\x20','Step\x201/7:\x20Config\x20migration\x20—\x20','detail','needsSkillSwap','\x20\x20Fields\x20to\x20migrate:\x20','Step\x201/7:\x20Migrating\x20config...','keys','Proceed\x20with\x20upgrade?','log','MCP\x20config:','error','failed','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','200012KEzCZx','34300HbapAc','stringify','white','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','lovrabet/lovrabet-skill\x20removed','join','done','.bak','.claude/skills/lovrabet','Upgrade\x20cancelled.','skipped\x20(no\x20legacy\x20config)','entries','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','skipped','\x20\x20Current\x20version\x20in\x20','succeed','14502BTSthA','Upgrade\x20@lovrabet/sdk','\x20removed\x20(','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','.lovrabet','label','oldPath','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','no\x20legacy\x20config\x20found','args','exit\x20','push','isDirectory','hasNewConfig','fields','sdkUpgrade','not\x20found\x20(will\x20create)','oldMcpConfig','\x20\x20Action:\x20delete','green','needed','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Clean\x20MCP\x20config','@lovrabet/dataset-mcp-server','red','devDependencies','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak'];a173_0x19b0=function(){return _0x49e317;};return a173_0x19b0();}function printSummary(_0x3c7f43){const _0x483adb=a173_0x86723d;console[_0x483adb(0x151)](''),console[_0x483adb(0x151)](a173_0x231642[_0x483adb(0x133)]('===\x20Upgrade\x20Summary\x20===')),console['log']('');for(const _0x2a2438 of _0x3c7f43){const _0x3637bf=_0x2a2438['ok']?a173_0x231642[_0x483adb(0xf9)]('OK'):a173_0x231642[_0x483adb(0xfe)](_0x483adb(0x13f));console[_0x483adb(0x151)]('\x20\x20'+_0x3637bf+_0x483adb(0x10e)+_0x2a2438['step']+':\x20'+_0x2a2438[_0x483adb(0x16d)]);if(_0x2a2438['detail'])console[_0x483adb(0x151)]('\x20\x20\x20\x20\x20\x20\x20'+a173_0x231642['gray'](_0x2a2438[_0x483adb(0x14b)]));}console[_0x483adb(0x151)]('');}export async function upgradeApp(_0x1f3620,_0x3a57c8){const _0x17ae57=a173_0x86723d,_0x4735a4=process[_0x17ae57(0x10a)](),_0x108eb7=analyse(_0x4735a4),_0x1ce0db=!_0x108eb7['configMigration']&&_0x108eb7[_0x17ae57(0x140)][_0x17ae57(0x144)]===0x0&&!_0x108eb7['oldMcpConfig']&&!_0x108eb7[_0x17ae57(0x14c)]&&!_0x108eb7[_0x17ae57(0xf5)];if(_0x1ce0db){console['log'](a173_0x231642[_0x17ae57(0xf9)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x108eb7);const _0x1aac86=!!(_0x3a57c8['yes']||_0x3a57c8['Y']||_0x1f3620);if(!_0x1aac86)try{const _0x5c79a8=await askConfirm(_0x17ae57(0x150));if(!_0x5c79a8){console[_0x17ae57(0x151)](a173_0x231642[_0x17ae57(0x130)](_0x17ae57(0x161)));return;}}catch(_0x3bba07){if(_0x3bba07?.[_0x17ae57(0x105)]===_0x17ae57(0x10c)){console['log'](a173_0x231642[_0x17ae57(0x130)](_0x17ae57(0x161)));return;}throw _0x3bba07;}const _0x6b1f1d=[],_0x23e741=a173_0xc79344({'text':_0x17ae57(0x14e),'color':_0x17ae57(0x143)})[_0x17ae57(0x13e)](),_0x267a3f=execConfigMigration(_0x108eb7,_0x4735a4);_0x6b1f1d[_0x17ae57(0x173)](_0x267a3f),_0x23e741[_0x267a3f['ok']?_0x17ae57(0x167):_0x17ae57(0x131)](_0x17ae57(0x14a)+(_0x267a3f[_0x17ae57(0x14b)]??(_0x267a3f['ok']?'done':_0x17ae57(0x154))));const _0x354ffd=resolve(_0x4735a4,_0x17ae57(0x16c)),_0x5d9c52=a173_0xc79344({'text':_0x17ae57(0x155),'color':'cyan'})[_0x17ae57(0x13e)]();if(existsSync(_0x354ffd))try{rmSync(_0x354ffd,{'recursive':!![],'force':!![]}),_0x5d9c52[_0x17ae57(0x167)](_0x17ae57(0x16b)),_0x6b1f1d[_0x17ae57(0x173)]({'step':0x2,'label':_0x17ae57(0x128),'ok':!![]});}catch(_0x4e457c){_0x5d9c52[_0x17ae57(0x131)](_0x17ae57(0x123)+_0x4e457c[_0x17ae57(0x105)]),_0x6b1f1d[_0x17ae57(0x173)]({'step':0x2,'label':_0x17ae57(0x128),'ok':![],'detail':_0x4e457c[_0x17ae57(0x105)]});}else _0x5d9c52[_0x17ae57(0x114)](_0x17ae57(0x132)),_0x6b1f1d['push']({'step':0x2,'label':_0x17ae57(0x128),'ok':!![],'detail':'skipped'});const _0x5cbf6a=a173_0xc79344({'text':_0x17ae57(0x116),'color':'cyan'})[_0x17ae57(0x13e)](),_0x15b122=execRemoveOldArtifacts(_0x108eb7[_0x17ae57(0x140)]);_0x6b1f1d[_0x17ae57(0x173)](_0x15b122),_0x5cbf6a[_0x15b122['ok']?_0x17ae57(0x167):'fail'](_0x17ae57(0x12d)+(_0x15b122[_0x17ae57(0x14b)]??(_0x15b122['ok']?_0x17ae57(0x15e):_0x17ae57(0x154))));const _0xdec390=a173_0xc79344({'text':_0x17ae57(0x121),'color':_0x17ae57(0x143)})[_0x17ae57(0x13e)](),_0x528f4a=execCleanMcp(_0x108eb7);_0x6b1f1d[_0x17ae57(0x173)](_0x528f4a),_0xdec390[_0x528f4a['ok']?'succeed':_0x17ae57(0x131)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x528f4a[_0x17ae57(0x14b)]??(_0x528f4a['ok']?_0x17ae57(0x15e):_0x17ae57(0x154))));const _0x5a34c8=a173_0xc79344({'text':_0x17ae57(0x13b),'color':'cyan'})[_0x17ae57(0x13e)](),_0x506005=execSkillsRemove(_0x4735a4,_0x1aac86);_0x6b1f1d[_0x17ae57(0x173)](_0x506005),_0x5a34c8[_0x506005['ok']?_0x17ae57(0x167):_0x17ae57(0x131)]('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x506005[_0x17ae57(0x14b)]??(_0x506005['ok']?_0x17ae57(0x15e):_0x17ae57(0x154))));const _0x18c3af=a173_0xc79344({'text':_0x17ae57(0x11d),'color':_0x17ae57(0x143)})[_0x17ae57(0x13e)](),_0x21cb9e=execSkillsAdd(_0x4735a4,_0x1aac86);_0x6b1f1d['push'](_0x21cb9e),_0x18c3af[_0x21cb9e['ok']?'succeed':_0x17ae57(0x131)](_0x17ae57(0x16f)+(_0x21cb9e['detail']??(_0x21cb9e['ok']?_0x17ae57(0x15e):_0x17ae57(0x154))));const _0x33e475=a173_0xc79344({'text':_0x17ae57(0x164),'color':_0x17ae57(0x143)})[_0x17ae57(0x13e)](),_0xac70ea=execUpgradeSdk(_0x108eb7);_0x6b1f1d[_0x17ae57(0x173)](_0xac70ea),_0x33e475[_0xac70ea['ok']?_0x17ae57(0x167):_0x17ae57(0x131)](_0x17ae57(0x148)+(_0xac70ea[_0x17ae57(0x14b)]??(_0xac70ea['ok']?_0x17ae57(0x15e):_0x17ae57(0x154)))),printSummary(_0x6b1f1d);const _0x35594d=_0x6b1f1d[_0x17ae57(0x103)](_0x560912=>!_0x560912['ok']);_0x35594d?console[_0x17ae57(0x151)](a173_0x231642[_0x17ae57(0x126)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x17ae57(0x151)](a173_0x231642[_0x17ae57(0xf9)]('Upgrade\x20completed\x20successfully!')),_0xac70ea['ok']&&_0x108eb7['sdkUpgrade']&&(console[_0x17ae57(0x151)](''),console[_0x17ae57(0x151)](a173_0x231642['bold'][_0x17ae57(0x143)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x17ae57(0x151)](a173_0x231642[_0x17ae57(0x143)](_0x17ae57(0xfb))),console[_0x17ae57(0x151)](''),console['log'](a173_0x231642[_0x17ae57(0x15a)](_0x17ae57(0x139))),console[_0x17ae57(0x151)](a173_0x231642[_0x17ae57(0x15a)](_0x17ae57(0x125))),console['log'](a173_0x231642[_0x17ae57(0x15a)]('\x20\x20bun\x20install')),console['log'](''));}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a173_0x46b566=a173_0x48e8;(function(_0x1840e3,_0x4f230d){const _0x3301a2=a173_0x48e8,_0x13fa73=_0x1840e3();while(!![]){try{const _0x572b20=parseInt(_0x3301a2(0xee))/0x1*(-parseInt(_0x3301a2(0xe2))/0x2)+-parseInt(_0x3301a2(0x108))/0x3+-parseInt(_0x3301a2(0xf0))/0x4*(parseInt(_0x3301a2(0xfe))/0x5)+parseInt(_0x3301a2(0xfa))/0x6*(parseInt(_0x3301a2(0xfb))/0x7)+-parseInt(_0x3301a2(0xe5))/0x8*(parseInt(_0x3301a2(0xd2))/0x9)+-parseInt(_0x3301a2(0xaa))/0xa+parseInt(_0x3301a2(0xf5))/0xb;if(_0x572b20===_0x4f230d)break;else _0x13fa73['push'](_0x13fa73['shift']());}catch(_0xcc5683){_0x13fa73['push'](_0x13fa73['shift']());}}}(a173_0x4c74,0xbf081));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';function a173_0x4c74(){const _0x1b143a=['skills:','Logs','wildcardDef','risk','`\x20instead.','from','sql:new','Dataset\x20&\x20Operations','service','has','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','rabetbase\x20page\x20custom-publish','<script>','Platform\x20Issue','app:use','skills:install','permit:role-apis-set','defaultCommand','Project','rabetbase\x20menu\x20asset-update','values','page:react-create','page:standard-page-status','83043jJbAST','rabetbase\x20page\x20data-list-status','permit:role-menus-set','rabetbase\x20kb\x20detail','Roles','Workspace','`\x20has\x20been\x20removed.','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','rabetbase\x20cli-skill\x20install','Authentication','role:create','rabetbase\x20page\x20custom-detail','hidden','Configuration','page:react-detail','Diagnostics','116306dGSBow','install','create','8RhYBrE','isSingleCommand','rabetbase\x20page\x20custom-list','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','\x20\x20[write]','menu:update','push','app:remote','Tenant\x20Members','2wUDJSH','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','64528FbClIo','\x20\x20[','start','permit:page-get','login','27779994ulWrKT','permit:page-set','Run\x20Scripts','rabetbase\x20kb\x20delete','rabetbase\x20workspace\x20use\x20--app\x20<name>','9109218BNezDc','7RNthef','length','Instant\x20API','410VPlMHJ','run','skill:install','knowledge-base:create','BFF\x20Scripts','rabetbase\x20kb\x20list','command','Schema','page:react-update','bff:new','2307636cguwMm','Notification\x20Configuration','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','rabetbase\x20page\x20custom-update','description','show','page:custom-create','10436230OwpUAz','set','App\x20Management','User\x20Accounts','page:react-publish','rabetbase\x20kb\x20update','permit:role-menus','rabetbase\x20app\x20list\x20--remote','API\x20Development','filter','Code\x20Generation','Run\x20any\x20package.json\x20script','rabetbase\x20sql\x20create','knowledge-base:update','commands','Async\x20Tasks','get'];a173_0x4c74=function(){return _0x1b143a;};return a173_0x4c74();}import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';function a173_0x48e8(_0x48debe,_0x4ea4a8){_0x48debe=_0x48debe-0xa7;const _0x4c742e=a173_0x4c74();let _0x48e8df=_0x4c742e[_0x48debe];return _0x48e8df;}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(_0x2cf295){const _0x965961=a173_0x48e8;for(const _0x53a793 of _0x2cf295){definitions[_0x965961(0xab)](_0x53a793['service']+':'+_0x53a793['command'],_0x53a793);let _0x1fd4ad=serviceGroups[_0x965961(0xba)](_0x53a793[_0x965961(0xc3)]);!_0x1fd4ad&&(_0x1fd4ad=[],serviceGroups[_0x965961(0xab)](_0x53a793[_0x965961(0xc3)],_0x1fd4ad)),_0x1fd4ad['push'](_0x53a793);}}function registerDeclarativeService(_0x58c14e,_0x30b2ec,_0x4acc45){const _0x48128f=a173_0x48e8;registerDefinitions(_0x30b2ec);_0x4acc45?.[_0x48128f(0xbd)]&®isterDefinitions([_0x4acc45[_0x48128f(0xbd)]]);const _0x3ec3ba=_0x45956e=>_0x45956e==='read'?'':_0x45956e==='write'?_0x48128f(0xe9):'\x20\x20[high-risk-write]',_0x4732b8={'service':_0x30b2ec[0x0][_0x48128f(0xc3)],'label':_0x58c14e,'commands':_0x30b2ec[_0x48128f(0xb3)](_0x98f43a=>!_0x98f43a[_0x48128f(0xde)])['map'](_0x2aa1d3=>({'command':_0x2aa1d3[_0x48128f(0x104)],'description':_0x2aa1d3[_0x48128f(0xa7)],'tag':_0x3ec3ba(_0x2aa1d3[_0x48128f(0xbe)])})),'declarative':!![],'defaultCommand':_0x4acc45?.[_0x48128f(0xcc)]??(_0x4acc45?.['isSingleCommand']?_0x30b2ec[0x0][_0x48128f(0x104)]:undefined),'wildcardDef':_0x4acc45?.[_0x48128f(0xbd)],'isSingleCommand':_0x4acc45?.[_0x48128f(0xe6)]};serviceRegistry[_0x48128f(0xeb)](_0x4732b8),serviceByName['set'](_0x4732b8[_0x48128f(0xc3)],_0x4732b8);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a173_0x46b566(0xff),'isSingleCommand':!![]}),registerDeclarativeService(a173_0x46b566(0xcd),projectDefinitions),registerDeclarativeService(a173_0x46b566(0xd7),workspaceDefinitions),registerDeclarativeService(a173_0x46b566(0xac),appDefinitions),registerDeclarativeService(a173_0x46b566(0xdb),authDefinitions,{'defaultCommand':a173_0x46b566(0xf4)}),registerDeclarativeService(a173_0x46b566(0xed),tenantDefinitions),registerDeclarativeService(a173_0x46b566(0xad),userAccountDefinitions),registerDeclarativeService(a173_0x46b566(0xc2),datasetDefinitions),registerDeclarativeService(a173_0x46b566(0x10a),pageDefinitions),registerDeclarativeService(a173_0x46b566(0xb2),apiDefinitions),registerDeclarativeService(a173_0x46b566(0xfd),dataDefinitions),registerDeclarativeService(a173_0x46b566(0x102),bffDefinitions),registerDeclarativeService(a173_0x46b566(0x109),notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a173_0x46b566(0xb9),taskDefinitions),registerDeclarativeService(a173_0x46b566(0xd6),roleDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService(a173_0x46b566(0xc8),issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a173_0x46b566(0xb4),codegenDefinitions),registerDeclarativeService(a173_0x46b566(0xdf),configDefinitions),registerDeclarativeService(a173_0x46b566(0xe1),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a173_0x46b566(0x105),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a173_0x46b566(0xe3)}),registerDeclarativeService(a173_0x46b566(0xbc),logsDefinitions,{'defaultCommand':a173_0x46b566(0xa8)}),registerDeclarativeService(a173_0x46b566(0xf7),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a173_0x46b566(0xfc)]-0x1];last[a173_0x46b566(0xb8)]=[{'command':a173_0x46b566(0xc7),'description':a173_0x46b566(0xb5),'tag':a173_0x46b566(0xf1)+runDefinition[a173_0x46b566(0xbe)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([['sql:save','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a173_0x46b566(0x107),'rabetbase\x20bff\x20create'],[a173_0x46b566(0xc1),a173_0x46b566(0xb6)],[a173_0x46b566(0xea),a173_0x46b566(0xce)],['project:init',a173_0x46b566(0xd9)],['skill:',a173_0x46b566(0xda)],[a173_0x46b566(0x100),'rabetbase\x20cli-skill\x20install'],[a173_0x46b566(0xbb),a173_0x46b566(0xda)],[a173_0x46b566(0xca),a173_0x46b566(0xda)],[a173_0x46b566(0xec),a173_0x46b566(0xb1)],[a173_0x46b566(0xc9),a173_0x46b566(0xf9)],['app:add',a173_0x46b566(0xc5)],['app:remove','rabetbase\x20workspace\x20remove\x20<name>'],['knowledge-base:list',a173_0x46b566(0x103)],['knowledge-base:detail',a173_0x46b566(0xd5)],[a173_0x46b566(0x101),'rabetbase\x20kb\x20create'],[a173_0x46b566(0xb7),a173_0x46b566(0xaf)],['knowledge-base:delete',a173_0x46b566(0xf8)],[a173_0x46b566(0xdc),'rabetbase\x20role\x20list'],[a173_0x46b566(0xd1),a173_0x46b566(0xd3)],[a173_0x46b566(0xd0),a173_0x46b566(0xe8)],[a173_0x46b566(0xa9),'rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],['page:react-list',a173_0x46b566(0xe7)],[a173_0x46b566(0xe0),a173_0x46b566(0xdd)],[a173_0x46b566(0x106),a173_0x46b566(0x10b)],[a173_0x46b566(0xae),a173_0x46b566(0xc6)]]),REMOVED_COMMAND_HINTS=new Map([[a173_0x46b566(0xf3),a173_0x46b566(0xef)],[a173_0x46b566(0xf6),a173_0x46b566(0xef)],[a173_0x46b566(0xb0),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a173_0x46b566(0xd4),a173_0x46b566(0xef)],[a173_0x46b566(0xcb),a173_0x46b566(0xef)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a173_0x46b566(0xe4),'rabetbase\x20project\x20create\x20<project-name>'],[a173_0x46b566(0xf2),'rabetbase\x20run\x20start'],['build','rabetbase\x20run\x20build'],['preview','rabetbase\x20run\x20preview'],['logout','rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x512ef1,_0x527114){const _0x29c0f1=a173_0x46b566;if(!_0x512ef1)return undefined;const _0x3c4328=REMOVED_COMMAND_REPLACEMENTS['get'](_0x512ef1+':'+(_0x527114??'')),_0x263a55=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x29c0f1(0xba)](_0x512ef1),_0x1bec8b=_0x3c4328??_0x263a55,_0x3c5996=REMOVED_COMMAND_HINTS[_0x29c0f1(0xba)](_0x512ef1+':'+(_0x527114??''));if(!_0x1bec8b&&!_0x3c5996)return undefined;const _0xb3b246=_0x263a55?_0x512ef1:_0x527114?_0x512ef1+'\x20'+_0x527114:_0x512ef1;return{'command':_0xb3b246,'message':'`rabetbase\x20'+_0xb3b246+_0x29c0f1(0xd8),'hint':_0x3c5996??'Use\x20`'+_0x1bec8b+_0x29c0f1(0xbf)};}export function findDefinition(_0x5de5b9,_0x5ade79){const _0x541790=a173_0x46b566;return definitions[_0x541790(0xba)](_0x5de5b9+':'+_0x5ade79);}export function isKnownService(_0x10b002){const _0xfcc8c8=a173_0x46b566;return serviceByName[_0xfcc8c8(0xc4)](_0x10b002);}export function isDeclarativeService(_0x4ee800){const _0x448ca5=a173_0x46b566;return serviceGroups['has'](_0x4ee800)||serviceByName[_0x448ca5(0xba)](_0x4ee800)?.[_0x448ca5(0xbd)]!==undefined;}export function getServiceEntry(_0x4b5c1b){const _0x4eff38=a173_0x46b566;return serviceByName[_0x4eff38(0xba)](_0x4b5c1b);}export function getLegacyHandler(_0x1c79df,_0x81923){return undefined;}export function getAllDefinitions(){const _0x4e9dfa=a173_0x46b566;return Array[_0x4e9dfa(0xc0)](definitions[_0x4e9dfa(0xcf)]());}
|
|
1
|
+
const a174_0xf24e93=a174_0x48c0;(function(_0x401b90,_0x13a704){const _0x347644=a174_0x48c0,_0x1a0e40=_0x401b90();while(!![]){try{const _0x449093=parseInt(_0x347644(0x20b))/0x1*(parseInt(_0x347644(0x233))/0x2)+-parseInt(_0x347644(0x1f9))/0x3*(-parseInt(_0x347644(0x1f8))/0x4)+-parseInt(_0x347644(0x1ef))/0x5+-parseInt(_0x347644(0x1f1))/0x6+-parseInt(_0x347644(0x1e2))/0x7+parseInt(_0x347644(0x1fa))/0x8+parseInt(_0x347644(0x215))/0x9;if(_0x449093===_0x13a704)break;else _0x1a0e40['push'](_0x1a0e40['shift']());}catch(_0x35b517){_0x1a0e40['push'](_0x1a0e40['shift']());}}}(a174_0x2583,0xca25f));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';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=[];function a174_0x48c0(_0x4efd81,_0x333eac){_0x4efd81=_0x4efd81-0x1de;const _0x258365=a174_0x2583();let _0x48c0b1=_0x258365[_0x4efd81];return _0x48c0b1;}const serviceByName=new Map();export const definitions=new Map();function a174_0x2583(){const _0x3befa5=['rabetbase\x20sql\x20create','sql:new','description','permit:page-set','Dataset\x20&\x20Operations','27806391UHulwv','hidden','Configuration','role:create','install','push','Logs','page:react-detail','bff:new','rabetbase\x20page\x20custom-list','menu:update','rabetbase\x20kb\x20list','app:use','has','rabetbase\x20kb\x20create','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','rabetbase\x20kb\x20detail','rabetbase\x20run\x20start','page:react-list','CLI\x20Built-in\x20Skill','Company\x20Knowledge\x20Base','app:add','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','\x20\x20[high-risk-write]','defaultCommand','set','rabetbase\x20cli-skill\x20install','service','page:react-publish','821584GgBbqf','show','Runtime\x20App\x20Config\x20Management','rabetbase\x20run\x20preview','Platform\x20Issue','BFF\x20Scripts','\x20\x20[write]','rabetbase\x20menu\x20asset-update','rabetbase\x20workspace\x20remove\x20<name>','Tenant\x20Members','API\x20Development','permit:page-get','page:custom-create','Roles','app:remove','OCR','Use\x20`','rabetbase\x20workspace\x20use\x20--app\x20<name>','Notification\x20Configuration','knowledge-base:update','Code\x20Generation','rabetbase\x20kb\x20update','rabetbase\x20project\x20create\x20<project-name>','build','5678015IDbiwu','knowledge-base:list','run','wildcardDef','sql:save','rabetbase\x20run\x20build','Workspace','map','File','rabetbase\x20bff\x20create','Run\x20any\x20package.json\x20script','get','SQL\x20Queries','7180465weFYcu','skill:install','7374678gnjxAh','skill:','rabetbase\x20page\x20data-list-status','App\x20Management','\x20\x20[','Quick\x20Start','filter','585944WFjJrO','9eDxcnY','2916008ZHrOHz','knowledge-base:delete','`\x20instead.','create','permit:role-apis-set','rabetbase\x20page\x20custom-detail','app:remote','`rabetbase\x20','values','page:react-create','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','Schema','rabetbase\x20page\x20custom-publish','rabetbase\x20page\x20custom-update','Project','<script>','isSingleCommand','1rtLCcu','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','risk','length','`\x20has\x20been\x20removed.'];a174_0x2583=function(){return _0x3befa5;};return a174_0x2583();}export const serviceGroups=new Map();function registerDefinitions(_0x19262f){const _0x17f647=a174_0x48c0;for(const _0x39a8b2 of _0x19262f){definitions[_0x17f647(0x22f)](_0x39a8b2[_0x17f647(0x231)]+':'+_0x39a8b2['command'],_0x39a8b2);let _0x3971bc=serviceGroups[_0x17f647(0x1ed)](_0x39a8b2[_0x17f647(0x231)]);!_0x3971bc&&(_0x3971bc=[],serviceGroups['set'](_0x39a8b2[_0x17f647(0x231)],_0x3971bc)),_0x3971bc[_0x17f647(0x21a)](_0x39a8b2);}}function registerDeclarativeService(_0x51ba4d,_0x2df2e3,_0x3c8aa0){const _0x438a28=a174_0x48c0;registerDefinitions(_0x2df2e3);_0x3c8aa0?.[_0x438a28(0x1e5)]&®isterDefinitions([_0x3c8aa0[_0x438a28(0x1e5)]]);const _0x2e5fc2=_0x180953=>_0x180953==='read'?'':_0x180953==='write'?_0x438a28(0x239):_0x438a28(0x22d),_0x3a117={'service':_0x2df2e3[0x0]['service'],'label':_0x51ba4d,'commands':_0x2df2e3[_0x438a28(0x1f7)](_0x25704f=>!_0x25704f[_0x438a28(0x216)])[_0x438a28(0x1e9)](_0x35ff9a=>({'command':_0x35ff9a['command'],'description':_0x35ff9a[_0x438a28(0x212)],'tag':_0x2e5fc2(_0x35ff9a[_0x438a28(0x20d)])})),'declarative':!![],'defaultCommand':_0x3c8aa0?.[_0x438a28(0x22e)]??(_0x3c8aa0?.[_0x438a28(0x20a)]?_0x2df2e3[0x0]['command']:undefined),'wildcardDef':_0x3c8aa0?.['wildcardDef'],'isSingleCommand':_0x3c8aa0?.[_0x438a28(0x20a)]};serviceRegistry['push'](_0x3a117),serviceByName[_0x438a28(0x22f)](_0x3a117[_0x438a28(0x231)],_0x3a117);}registerDeclarativeService(a174_0xf24e93(0x1f6),initDefinitions,{'defaultCommand':a174_0xf24e93(0x1e4),'isSingleCommand':!![]}),registerDeclarativeService(a174_0xf24e93(0x208),projectDefinitions),registerDeclarativeService(a174_0xf24e93(0x1e8),workspaceDefinitions),registerDeclarativeService(a174_0xf24e93(0x1f4),appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a174_0xf24e93(0x23c),tenantDefinitions),registerDeclarativeService('User\x20Accounts',userAccountDefinitions),registerDeclarativeService(a174_0xf24e93(0x214),datasetDefinitions),registerDeclarativeService(a174_0xf24e93(0x204),pageDefinitions),registerDeclarativeService(a174_0xf24e93(0x23d),apiDefinitions),registerDeclarativeService('Instant\x20API',dataDefinitions),registerDeclarativeService(a174_0xf24e93(0x238),bffDefinitions),registerDeclarativeService(a174_0xf24e93(0x245),notificationDefinitions),registerDeclarativeService(a174_0xf24e93(0x1ee),sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService(a174_0xf24e93(0x240),roleDefinitions),registerDeclarativeService(a174_0xf24e93(0x235),appConfigDefinitions),registerDeclarativeService(a174_0xf24e93(0x22a),kbDefinitions),registerDeclarativeService(a174_0xf24e93(0x237),issueDefinitions),registerDeclarativeService(a174_0xf24e93(0x1ea),fileDefinitions),registerDeclarativeService(a174_0xf24e93(0x242),ocrDefinitions),registerDeclarativeService(a174_0xf24e93(0x1de),codegenDefinitions),registerDeclarativeService(a174_0xf24e93(0x217),configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a174_0xf24e93(0x205),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a174_0xf24e93(0x229),cliSkillDefinitions,{'defaultCommand':a174_0xf24e93(0x219)}),registerDeclarativeService(a174_0xf24e93(0x21b),logsDefinitions,{'defaultCommand':a174_0xf24e93(0x234)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a174_0xf24e93(0x20e)]-0x1];last['commands']=[{'command':a174_0xf24e93(0x209),'description':a174_0xf24e93(0x1ec),'tag':a174_0xf24e93(0x1f5)+runDefinition[a174_0xf24e93(0x20d)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a174_0xf24e93(0x1e6),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a174_0xf24e93(0x21d),a174_0xf24e93(0x1eb)],[a174_0xf24e93(0x211),a174_0xf24e93(0x210)],[a174_0xf24e93(0x21f),a174_0xf24e93(0x23a)],['project:init',a174_0xf24e93(0x22c)],[a174_0xf24e93(0x1f2),a174_0xf24e93(0x230)],[a174_0xf24e93(0x1f0),a174_0xf24e93(0x230)],['skills:',a174_0xf24e93(0x230)],['skills:install','rabetbase\x20cli-skill\x20install'],[a174_0xf24e93(0x200),'rabetbase\x20app\x20list\x20--remote'],[a174_0xf24e93(0x221),a174_0xf24e93(0x244)],[a174_0xf24e93(0x22b),a174_0xf24e93(0x20c)],[a174_0xf24e93(0x241),a174_0xf24e93(0x23b)],[a174_0xf24e93(0x1e3),a174_0xf24e93(0x220)],['knowledge-base:detail',a174_0xf24e93(0x226)],['knowledge-base:create',a174_0xf24e93(0x223)],[a174_0xf24e93(0x246),a174_0xf24e93(0x1df)],[a174_0xf24e93(0x1fb),'rabetbase\x20kb\x20delete'],[a174_0xf24e93(0x218),'rabetbase\x20role\x20list'],['page:standard-page-status',a174_0xf24e93(0x1f3)],[a174_0xf24e93(0x203),a174_0xf24e93(0x225)],[a174_0xf24e93(0x23f),a174_0xf24e93(0x225)],[a174_0xf24e93(0x228),a174_0xf24e93(0x21e)],[a174_0xf24e93(0x21c),a174_0xf24e93(0x1ff)],['page:react-update',a174_0xf24e93(0x207)],[a174_0xf24e93(0x232),a174_0xf24e93(0x206)]]),REMOVED_COMMAND_HINTS=new Map([[a174_0xf24e93(0x23e),a174_0xf24e93(0x224)],[a174_0xf24e93(0x213),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],['permit:role-menus',a174_0xf24e93(0x224)],['permit:role-menus-set','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a174_0xf24e93(0x1fe),a174_0xf24e93(0x224)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a174_0xf24e93(0x1fd),a174_0xf24e93(0x1e0)],['start',a174_0xf24e93(0x227)],[a174_0xf24e93(0x1e1),a174_0xf24e93(0x1e7)],['preview',a174_0xf24e93(0x236)],['logout','rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x4eb708,_0x123c6e){const _0x396b6f=a174_0xf24e93;if(!_0x4eb708)return undefined;const _0x5baa0b=REMOVED_COMMAND_REPLACEMENTS[_0x396b6f(0x1ed)](_0x4eb708+':'+(_0x123c6e??'')),_0x1b0553=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x4eb708),_0xfeca01=_0x5baa0b??_0x1b0553,_0x422518=REMOVED_COMMAND_HINTS[_0x396b6f(0x1ed)](_0x4eb708+':'+(_0x123c6e??''));if(!_0xfeca01&&!_0x422518)return undefined;const _0x59476=_0x1b0553?_0x4eb708:_0x123c6e?_0x4eb708+'\x20'+_0x123c6e:_0x4eb708;return{'command':_0x59476,'message':_0x396b6f(0x201)+_0x59476+_0x396b6f(0x20f),'hint':_0x422518??_0x396b6f(0x243)+_0xfeca01+_0x396b6f(0x1fc)};}export function findDefinition(_0x528fd7,_0xa0cd60){return definitions['get'](_0x528fd7+':'+_0xa0cd60);}export function isKnownService(_0x33dca0){const _0x3b04a5=a174_0xf24e93;return serviceByName[_0x3b04a5(0x222)](_0x33dca0);}export function isDeclarativeService(_0x4b5040){const _0xa72913=a174_0xf24e93;return serviceGroups[_0xa72913(0x222)](_0x4b5040)||serviceByName[_0xa72913(0x1ed)](_0x4b5040)?.[_0xa72913(0x1e5)]!==undefined;}export function getServiceEntry(_0xc3cc56){return serviceByName['get'](_0xc3cc56);}export function getLegacyHandler(_0x3cf118,_0x3cc173){return undefined;}export function getAllDefinitions(){const _0x3be675=a174_0xf24e93;return Array['from'](definitions[_0x3be675(0x202)]());}
|