@lovrabet/rabetbase-cli 2.3.4 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.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/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/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-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/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a125_0x1e066c=a125_0x1489;(function(_0x3fa665,_0x25310e){const _0x3febf7=a125_0x1489,_0x4d214f=_0x3fa665();while(!![]){try{const _0x1087e8=-parseInt(_0x3febf7(0x219))/0x1*(parseInt(_0x3febf7(0x224))/0x2)+-parseInt(_0x3febf7(0x1f5))/0x3+-parseInt(_0x3febf7(0x1e5))/0x4+-parseInt(_0x3febf7(0x1f2))/0x5*(parseInt(_0x3febf7(0x1f7))/0x6)+parseInt(_0x3febf7(0x1fe))/0x7*(parseInt(_0x3febf7(0x226))/0x8)+-parseInt(_0x3febf7(0x21c))/0x9*(parseInt(_0x3febf7(0x21e))/0xa)+parseInt(_0x3febf7(0x21f))/0xb;if(_0x1087e8===_0x25310e)break;else _0x4d214f['push'](_0x4d214f['shift']());}catch(_0xa09dc9){_0x4d214f['push'](_0x4d214f['shift']());}}}(a125_0x3002,0xe7f6d));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a125_0x1e066c(0x1d6),'type':'number','required':!![],'description':a125_0x1e066c(0x1e3)};export const ROLE_REF_FLAG={'name':'role','type':a125_0x1e066c(0x1f3),'required':!![],'description':'Role\x20id\x20or\x20role\x20name'};export const GRANT_FLAG={'name':'grant','type':a125_0x1e066c(0x225),'required':![],'description':a125_0x1e066c(0x1ee)};function a125_0x1489(_0x278ea4,_0xd0bded){_0x278ea4=_0x278ea4-0x1d1;const _0x300241=a125_0x3002();let _0x14898f=_0x300241[_0x278ea4];return _0x14898f;}export const REVOKE_FLAG={'name':a125_0x1e066c(0x1e1),'type':a125_0x1e066c(0x225),'required':![],'description':a125_0x1e066c(0x21a)};export const MENUS_FLAG={'name':a125_0x1e066c(0x1e6),'type':a125_0x1e066c(0x1f3),'required':!![],'description':a125_0x1e066c(0x223)};export const DATASETS_FLAG={'name':a125_0x1e066c(0x221),'type':'string','required':!![],'description':a125_0x1e066c(0x200)};export const PAGE_SLOT_SPECS=[{'flag':a125_0x1e066c(0x1d8),'key':a125_0x1e066c(0x1ed),'allowSelf':![],'label':a125_0x1e066c(0x20e)},{'flag':a125_0x1e066c(0x1e2),'key':a125_0x1e066c(0x1d7),'allowSelf':![],'label':a125_0x1e066c(0x1f8)},{'flag':a125_0x1e066c(0x1d5),'key':a125_0x1e066c(0x216),'allowSelf':![],'label':'data\x20update'},{'flag':a125_0x1e066c(0x1fd),'key':a125_0x1e066c(0x1e0),'allowSelf':![],'label':a125_0x1e066c(0x1ef)},{'flag':'detail-roles','key':a125_0x1e066c(0x218),'allowSelf':![],'label':'data\x20detail'},{'flag':a125_0x1e066c(0x207),'key':a125_0x1e066c(0x1f0),'allowSelf':![],'label':a125_0x1e066c(0x210)},{'flag':a125_0x1e066c(0x1d2),'key':a125_0x1e066c(0x204),'allowSelf':!![],'label':a125_0x1e066c(0x1dd)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a125_0x1e066c(0x1ff)](_0x23985a=>({'name':_0x23985a[a125_0x1e066c(0x20b)],'type':a125_0x1e066c(0x1f3),'required':![],'description':a125_0x1e066c(0x21d)+_0x23985a[a125_0x1e066c(0x202)]+'\x20(comma-separated\x20SELF/ALL/id/name)'+(_0x23985a['allowSelf']?';\x20SELF\x20=\x20only\x20own\x20rows':'')}));function a125_0x3002(){const _0x4ccc14=['data\x20export','roleName','\x20is\x20not\x20available\x20for\x20this\x20app.','\x22\x20not\x20found.','Missing\x20action.','rolePermit','dataUpdate','push','dataDetail','1619uWPwbn','Revoke\x20access\x20to\x20the\x20listed\x20resources','bool','15936813jGhDCW','Roles\x20for\x20','10wqVWlF','72695227OgGnqg','action','datasets','ALL','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','1488HDsQMw','boolean','8ZBNWQj','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','row-roles','resourceCode','length','update-roles','menu-id','dataCreate','menu-roles','SELF\x20is\x20not\x20allowed\x20for\x20','pageNodeList','test','\x20not\x20found.','row\x20visibility','roleType','key','dataDelete','revoke','create-roles','Menu\x20id\x20(from\x20`menu\x20list`)','find','5951620KRFyCw','menus','entries','Disambiguate\x20with\x20an\x20id.','join','allowedActions','SELF','get','menuPermit','Grant\x20access\x20to\x20the\x20listed\x20resources','data\x20delete','dataExport','validation','80smrZgc','string','resourceName','2437275ZDkOcl','Role\x20\x22','288786biDHKW','data\x20create','trim','datasetCode','access','filter','delete-roles','2710309AFEIqK','map','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','Pass\x20--role\x20<id|name>.','label','toUpperCase','dataPermit','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','set','export-roles','\x22\x20is\x20ambiguous\x20(ids:\x20','role','appCode','flag','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','grant','menu\x20visibility','allowSelf'];a125_0x3002=function(){return _0x4ccc14;};return a125_0x3002();}export function splitList(_0x5c2b64){const _0x3d38cc=a125_0x1e066c;return _0x5c2b64['split'](',')[_0x3d38cc(0x1ff)](_0x4319fe=>_0x4319fe[_0x3d38cc(0x1f9)]())[_0x3d38cc(0x1fc)](Boolean);}export function projectRoleRef(_0x2febc7){const _0x2fc20a=a125_0x1e066c;return{'id':_0x2febc7['id'],'roleName':_0x2febc7['roleName'],'roleType':_0x2febc7[_0x2fc20a(0x1de)]};}export async function resolvePermitRoles(_0x6d5072,_0x3c7caf,_0x422b09){const _0x288ecb=a125_0x1e066c,_0x283330=await listPermitRoles(_0x6d5072,{'needSelf':!![],'needPublic':!![]}),_0x13afc8=[];for(const _0x5ab025 of _0x3c7caf){const _0x33ca51=resolveOnePermitRole(_0x283330,_0x5ab025);if(!_0x422b09[_0x288ecb(0x20f)]&&_0x33ca51['roleType']===_0x288ecb(0x1eb))throw CliErrors[_0x288ecb(0x1f1)](_0x288ecb(0x1d9)+_0x422b09[_0x288ecb(0x202)]+'.',_0x288ecb(0x1d1));if(!_0x13afc8['some'](_0x26af96=>_0x26af96['id']===_0x33ca51['id']))_0x13afc8[_0x288ecb(0x217)](_0x33ca51);}return _0x13afc8;}function resolveOnePermitRole(_0x505be4,_0x1913d4){const _0x165f49=a125_0x1e066c,_0x2e1157=_0x1913d4[_0x165f49(0x1f9)](),_0x2b1711=_0x2e1157[_0x165f49(0x203)]();if(_0x2b1711==='SELF'||_0x2b1711===_0x165f49(0x222)){const _0x5833d4=_0x505be4[_0x165f49(0x1e4)](_0x33fbbf=>_0x33fbbf[_0x165f49(0x1de)]===_0x2b1711);if(!_0x5833d4)throw CliErrors[_0x165f49(0x1f1)]('Special\x20role\x20'+_0x2b1711+_0x165f49(0x212));return _0x5833d4;}if(/^-?\d+$/[_0x165f49(0x1db)](_0x2e1157)){const _0x4a9a7f=Number(_0x2e1157),_0x333d60=_0x505be4[_0x165f49(0x1e4)](_0xb45724=>_0xb45724['id']===_0x4a9a7f);if(!_0x333d60)throw CliErrors[_0x165f49(0x1f1)]('Role\x20id\x20'+_0x4a9a7f+_0x165f49(0x1dc),'Run\x20`role\x20list`.');return _0x333d60;}const _0x189c0b=_0x505be4[_0x165f49(0x1fc)](_0x226d2f=>_0x226d2f[_0x165f49(0x211)]===_0x2e1157);if(_0x189c0b[_0x165f49(0x1d4)]===0x0)throw CliErrors[_0x165f49(0x1f1)](_0x165f49(0x1f6)+_0x2e1157+_0x165f49(0x213),_0x165f49(0x205));if(_0x189c0b[_0x165f49(0x1d4)]>0x1)throw CliErrors[_0x165f49(0x1f1)](_0x165f49(0x1f6)+_0x2e1157+_0x165f49(0x208)+_0x189c0b[_0x165f49(0x1ff)](_0x2bfa7e=>_0x2bfa7e['id'])[_0x165f49(0x1e9)](',\x20')+').',_0x165f49(0x1e8));return _0x189c0b[0x0];}export function projectPageSlot(_0x1445f9){const _0x4b9fd5=a125_0x1e066c;if(!_0x1445f9)return null;return{'resourceCode':_0x1445f9[_0x4b9fd5(0x1d3)],'roles':(_0x1445f9[_0x4b9fd5(0x215)]??[])[_0x4b9fd5(0x1ff)](projectRoleRef)};}export function projectPagePermit(_0x42607f){const _0x1212d3=a125_0x1e066c,_0x131081={'menuId':_0x42607f['menuId'],'appCode':_0x42607f[_0x1212d3(0x20a)],'menuPermit':projectPageSlot(_0x42607f[_0x1212d3(0x1ed)])};for(const _0x3aaa09 of PAGE_SLOT_SPECS){if(_0x3aaa09[_0x1212d3(0x1df)]==='menuPermit')continue;_0x131081[_0x3aaa09[_0x1212d3(0x1df)]]=projectPageSlot(_0x42607f[_0x3aaa09[_0x1212d3(0x1df)]]);}return _0x131081;}export function flattenMenuResources(_0x38bfb5){const _0x23e08e=new Map(),_0x5c7813=_0x31f9c3=>{const _0x5c03b3=a125_0x1489;for(const _0x3afd2c of _0x31f9c3??[]){_0x23e08e[_0x5c03b3(0x206)](_0x3afd2c[_0x5c03b3(0x1d3)],{'resourceCode':_0x3afd2c[_0x5c03b3(0x1d3)],'resourceName':_0x3afd2c[_0x5c03b3(0x1f4)],'action':_0x3afd2c[_0x5c03b3(0x1ea)]?.[0x0]??'0'});if(_0x3afd2c[_0x5c03b3(0x1da)])_0x5c7813(_0x3afd2c['pageNodeList']);}};return _0x5c7813(_0x38bfb5),_0x23e08e;}export function flattenApiResources(_0x414867){const _0x2ad3d1=a125_0x1e066c,_0x40b2e0=new Map(),_0x43e09f=new Map();for(const _0x1a15d4 of _0x414867){const _0x15ede1=_0x1a15d4['apiList']??{};for(const [_0x3da72c,_0x51dd60]of Object[_0x2ad3d1(0x1e7)](_0x15ede1)){_0x40b2e0[_0x2ad3d1(0x206)](_0x3da72c,{'resourceCode':_0x3da72c,'resourceName':_0x1a15d4[_0x2ad3d1(0x1f4)],'datasetCode':_0x1a15d4[_0x2ad3d1(0x1fa)],'action':_0x51dd60?.[0x0]??'0'});const _0x362f80=_0x43e09f[_0x2ad3d1(0x1ec)](_0x1a15d4[_0x2ad3d1(0x1fa)])??[];_0x362f80[_0x2ad3d1(0x217)](_0x3da72c),_0x43e09f['set'](_0x1a15d4[_0x2ad3d1(0x1fa)],_0x362f80);}}return{'byCode':_0x40b2e0,'byDataset':_0x43e09f};}export function buildPermits(_0x1f9473,_0x673d6b){const _0x404067=a125_0x1e066c,_0x3c5fd5={};for(const [_0x3c65de,_0x3952aa]of _0x1f9473){const _0x430c2b=_0x673d6b[_0x404067(0x1ec)](_0x3c65de)??_0x3952aa[_0x404067(0x220)];_0x3c5fd5[_0x3c65de]=[_0x430c2b];}return _0x3c5fd5;}export function readRoleRef(_0xa5f30d){const _0x17c5b3=a125_0x1e066c,_0x565e66=_0xa5f30d['str'](_0x17c5b3(0x209))[_0x17c5b3(0x1f9)]();if(!_0x565e66)throw CliErrors['flagMissing'](_0x17c5b3(0x209),_0x17c5b3(0x201));return _0x565e66;}export function readGrantRevoke(_0x1a4f8d){const _0x1a2a82=a125_0x1e066c,_0x4d2dd0=_0x1a4f8d[_0x1a2a82(0x21b)](_0x1a2a82(0x20d)),_0x5bb232=_0x1a4f8d[_0x1a2a82(0x21b)](_0x1a2a82(0x1e1));if(_0x4d2dd0&&_0x5bb232)throw CliErrors['validation'](_0x1a2a82(0x20c));if(!_0x4d2dd0&&!_0x5bb232)throw CliErrors[_0x1a2a82(0x1f1)](_0x1a2a82(0x214),'Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.');return _0x4d2dd0?_0x1a2a82(0x1fb):'0';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2cad7a,_0x2f0fe6){const _0x55c8ab=a126_0xa044,_0x379b6f=_0x2cad7a();while(!![]){try{const _0x265b4b=parseInt(_0x55c8ab(0x181))/0x1+parseInt(_0x55c8ab(0x176))/0x2*(parseInt(_0x55c8ab(0x17c))/0x3)+-parseInt(_0x55c8ab(0x16b))/0x4*(-parseInt(_0x55c8ab(0x171))/0x5)+parseInt(_0x55c8ab(0x16e))/0x6*(-parseInt(_0x55c8ab(0x17f))/0x7)+parseInt(_0x55c8ab(0x17a))/0x8+-parseInt(_0x55c8ab(0x182))/0x9+parseInt(_0x55c8ab(0x180))/0xa*(parseInt(_0x55c8ab(0x17b))/0xb);if(_0x265b4b===_0x2f0fe6)break;else _0x379b6f['push'](_0x379b6f['shift']());}catch(_0x2d9a4a){_0x379b6f['push'](_0x379b6f['shift']());}}}(a126_0x52b0,0xab99b));import{existsSync}from'node:fs';import a126_0x3ba694 from'node:path';import a126_0x237e6e from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';function a126_0xa044(_0x42eaf8,_0x1eb392){_0x42eaf8=_0x42eaf8-0x166;const _0x52b0eb=a126_0x52b0();let _0xa044b8=_0x52b0eb[_0x42eaf8];return _0xa044b8;}import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';function a126_0x52b0(){const _0x1e5bd5=['2470008KinHoW','4175369XpUEgP','5361rsjYvM','√\x20Login\x20status:\x20','green','7PWYxGa','10gAMRVq','144668mSMnKq','5296887Enlmzi','Skipped','string','Directory\x20\x22','√\x20Project\x20Name:\x20','production','log','test','\x22\x20already\x20exists','4IhgdgA','env','Not\x20set','1606662GyJNUl','√\x20App\x20Code:\x20','resolve','2469435vHmGqQ','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','cwd','trim','my-app','260DJxSFC','Logged\x20in','Login\x20failed','cyan'];a126_0x52b0=function(){return _0x1e5bd5;};return a126_0x52b0();}export async function guidedCreateProject(_0xf164ff,_0x4e2a2d,_0x4a8d11){const _0x1ae393=a126_0xa044,_0x34bcc4=_0x1ae393(0x175),_0x17f337=readConfig(),_0x5a3815=typeof _0x17f337['env']===_0x1ae393(0x184)?_0x17f337[_0x1ae393(0x16c)]:undefined,_0x1bf7f6=await input({'message':'Project\x20name:','default':_0x34bcc4,'validate':_0x4979d0=>{const _0xca407a=_0x1ae393,_0x3bb848=_0x4979d0[_0xca407a(0x174)]()||_0x34bcc4;if(_0x3bb848['length']>0x32)return'Project\x20name\x20cannot\x20exceed\x2050\x20characters';const _0x3d0f65=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x3bb848&&!_0x3d0f65[_0xca407a(0x169)](_0x3bb848))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0x3eafe7=a126_0x3ba694[_0xca407a(0x170)](process[_0xca407a(0x173)](),_0x3bb848);if(existsSync(_0x3eafe7))return _0xca407a(0x185)+_0x3bb848+_0xca407a(0x16a);return!![];}});console['log'](a126_0x237e6e[_0x1ae393(0x17e)](_0x1ae393(0x166)+a126_0x237e6e[_0x1ae393(0x179)](_0x1bf7f6)));const _0x1ebe2e=await selectSingleAppcode(_0x4a8d11);console['log'](a126_0x237e6e[_0x1ae393(0x17e)](_0x1ae393(0x16f)+a126_0x237e6e[_0x1ae393(0x179)](_0x1ebe2e||_0x1ae393(0x16d))));if(_0x1ebe2e){const _0x5e35fd=await getIsSessionValid();if(!_0x5e35fd){const _0x2645f1=await confirm({'message':_0x1ae393(0x172),'default':!![]});if(_0x2645f1){const _0xbc5b39=await authServer({'silent':!![]});console[_0x1ae393(0x168)](a126_0x237e6e[_0x1ae393(0x17e)](_0x1ae393(0x17d)+a126_0x237e6e[_0x1ae393(0x179)](_0xbc5b39?_0x1ae393(0x177):_0x1ae393(0x178))));}else console[_0x1ae393(0x168)](a126_0x237e6e[_0x1ae393(0x17e)](_0x1ae393(0x17d)+a126_0x237e6e[_0x1ae393(0x179)](_0x1ae393(0x183))));}await _0xf164ff({'projectName':_0x1bf7f6,'appCode':_0x1ebe2e,'env':_0x4e2a2d||_0x5a3815||_0x1ae393(0x167)});}else await _0xf164ff({'projectName':_0x1bf7f6,'env':_0x4e2a2d||_0x5a3815||_0x1ae393(0x167)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a127_0x1a69(){const _0x866786=['24201aIjKWH','15cjRcbY','1608303QEMFMa','2AQhZgz','13927100BDTjfb','toFixed','1789128FpyQJS','760956ALnBYh','now','3276777EkYzzz','177743spbgED','1624mZqPEX','replace'];a127_0x1a69=function(){return _0x866786;};return a127_0x1a69();}function a127_0x219c(_0x3060a7,_0xffed5e){_0x3060a7=_0x3060a7-0x1e0;const _0x1a6937=a127_0x1a69();let _0x219cb9=_0x1a6937[_0x3060a7];return _0x219cb9;}(function(_0x54564e,_0x3284a4){const _0x4c3f94=a127_0x219c,_0x3e7c06=_0x54564e();while(!![]){try{const _0x5b3dec=parseInt(_0x4c3f94(0x1e0))/0x1+parseInt(_0x4c3f94(0x1e6))/0x2*(-parseInt(_0x4c3f94(0x1e5))/0x3)+parseInt(_0x4c3f94(0x1ea))/0x4*(parseInt(_0x4c3f94(0x1e4))/0x5)+-parseInt(_0x4c3f94(0x1e9))/0x6+-parseInt(_0x4c3f94(0x1ec))/0x7+-parseInt(_0x4c3f94(0x1e1))/0x8*(parseInt(_0x4c3f94(0x1e3))/0x9)+parseInt(_0x4c3f94(0x1e7))/0xa;if(_0x5b3dec===_0x3284a4)break;else _0x3e7c06['push'](_0x3e7c06['shift']());}catch(_0x5eea50){_0x3e7c06['push'](_0x3e7c06['shift']());}}}(a127_0x1a69,0x47827));export function formatElapsed(_0x392c7e){const _0x40306e=a127_0x219c,_0x4d3748=Date[_0x40306e(0x1eb)]()-_0x392c7e;if(_0x4d3748<0x3e8)return _0x4d3748+'ms';const _0x559eb8=(_0x4d3748/0x3e8)[_0x40306e(0x1e8)](0x2),_0x139a52=_0x559eb8[_0x40306e(0x1e2)](/\.?0+$/u,'');return _0x139a52+'s';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a128_0x3441(_0x16bb6a,_0x3f3cdb){_0x16bb6a=_0x16bb6a-0xe0;const _0x4d85ac=a128_0x4d85();let _0x3441ae=_0x4d85ac[_0x16bb6a];return _0x3441ae;}(function(_0x1d2159,_0x3f6a05){const _0x121acf=a128_0x3441,_0x2243a9=_0x1d2159();while(!![]){try{const _0x1aff60=parseInt(_0x121acf(0x113))/0x1*(-parseInt(_0x121acf(0xfc))/0x2)+-parseInt(_0x121acf(0x127))/0x3+parseInt(_0x121acf(0x103))/0x4*(parseInt(_0x121acf(0xfe))/0x5)+parseInt(_0x121acf(0x12f))/0x6*(parseInt(_0x121acf(0x10d))/0x7)+parseInt(_0x121acf(0x12a))/0x8*(parseInt(_0x121acf(0x12b))/0x9)+-parseInt(_0x121acf(0x11a))/0xa*(parseInt(_0x121acf(0xed))/0xb)+parseInt(_0x121acf(0x12e))/0xc*(parseInt(_0x121acf(0x133))/0xd);if(_0x1aff60===_0x3f6a05)break;else _0x2243a9['push'](_0x2243a9['shift']());}catch(_0x9afb6b){_0x2243a9['push'](_0x2243a9['shift']());}}}(a128_0x4d85,0x8d2df));import a128_0x1b62da from'path';import a128_0x29fbe4 from'fs';function a128_0x4d85(){const _0x13fd61=['setLogPath','Project\x20name:\x20','rmSync','needsUpgrade','\x20|\x20Default:\x20','项目创建失败:\x20','writeFileSync','green','apps','projectName','cyan','cd\x20','11OedSrI','trim','Copy\x20project\x20files','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','package.json','readFileSync','API\x20配置拉取异常','repeat','existsSync','cookie','belowMinimum','resolve','warn','bold','gray','908MHepRJ','join','10965WDExzO','...','配置应用AppCode失败','projectCode','\x20\x201.\x20Start\x20project:\x20','1132gQpOdI','keys','\x20\x202.\x20Pull\x20API\x20configuration:\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','fail','*\x20Pulling\x20API\x20configuration...','string','API\x20configuration\x20pulled:\x20','\x20Generated\x20by\x20rabetbase\x20cli\x20','W_OK','1583512opeobN','utf8','log','\x20|\x20AppCode:\x20','stringify','accessSync','2137BejWHI','√\x20Pulled\x20','appCode','toLocaleString','message','更新\x20package.json\x20name','modelCount','10659830EhiNKi','\x20config\x20set\x20appcode\x20<app-code>\x27','info','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20model(s)','parse','\x20api\x20pull','\x20run\x20start','√\x20Configuration\x20file\x20created,\x20Apps:\x20','\x20&&\x20','name','√\x20package.json\x20updated:\x20name=','Install\x20dependencies','270948PXyWmr','create','更新\x20package.json\x20失败','1744NupLDk','44406ZNeVPE','配置应用AppCode:\x20','version','132MYIcOQ','12pHiqfW','\x20dataset(s),\x20generated\x20','1.0.0','chdir','657215Sqkpsw','dirname','stop','Project\x20directory\x20','\x20already\x20exists','start','🚀\x20Next\x20Steps:','cwd','error','length','minimumVersion','env','stableVersion','constants','项目创建完成:\x20','test','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','production'];a128_0x4d85=function(){return _0x13fd61;};return a128_0x4d85();}import a128_0x500199 from'chalk';import a128_0x382e95 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';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';export async function createApp(_0x2dd12e){const _0x37d875=a128_0x3441,_0x23ded1=await checkCliVersion();(_0x23ded1['needsUpgrade']||_0x23ded1['belowMinimum'])&&(printCliUpgradeWarning(_0x23ded1),assertCliVersionSupported(_0x23ded1),logger[_0x37d875(0x11c)](_0x37d875(0x128),'CLI\x20版本检查',{'currentVersion':_0x23ded1['currentVersion'],'stableVersion':_0x23ded1[_0x37d875(0x13f)],'minimumVersion':_0x23ded1[_0x37d875(0x13d)],'needsUpgrade':_0x23ded1[_0x37d875(0xe4)],'belowMinimum':_0x23ded1[_0x37d875(0xf7)]}));if(_0x2dd12e[_0x37d875(0x101)]&&_0x2dd12e['appCode'])await runCreate({'projectName':_0x2dd12e['projectCode'],'appCode':_0x2dd12e[_0x37d875(0x115)],'env':_0x2dd12e['env']},_0x2dd12e);else{if(_0x2dd12e['projectCode']){const _0x5cf141=await selectSingleAppcode(_0x2dd12e[_0x37d875(0xf6)]);await runCreate({'projectName':_0x2dd12e[_0x37d875(0x101)],'appCode':_0x5cf141||undefined,'env':_0x2dd12e[_0x37d875(0x13e)]},_0x2dd12e);}else await guidedCreateProject(_0x2e9f7d=>runCreate(_0x2e9f7d,_0x2dd12e),_0x2dd12e[_0x37d875(0x13e)],_0x2dd12e[_0x37d875(0xf6)]);}}async function runCreate(_0x3c8809,_0x1003c0){const _0x84e48=a128_0x3441;if(!_0x3c8809[_0x84e48(0xea)]||_0x3c8809[_0x84e48(0xea)][_0x84e48(0xee)]()==='')throw new Error('Project\x20name\x20cannot\x20be\x20empty');const _0x523cc0=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x523cc0[_0x84e48(0x142)](_0x3c8809[_0x84e48(0xea)]))throw new Error(_0x84e48(0xf0));if(_0x3c8809[_0x84e48(0xea)]['length']>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x3c8f59=a128_0x1b62da[_0x84e48(0xf8)](process[_0x84e48(0x13a)](),_0x3c8809[_0x84e48(0xea)]);if(a128_0x29fbe4[_0x84e48(0xf5)](_0x3c8f59))throw new Error(_0x84e48(0x136)+_0x3c8809[_0x84e48(0xea)]+_0x84e48(0x137));try{a128_0x29fbe4[_0x84e48(0x112)](a128_0x1b62da[_0x84e48(0x134)](_0x3c8f59),a128_0x29fbe4[_0x84e48(0x140)][_0x84e48(0x10c)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x84e48(0xe1)](_0x3c8f59),logger[_0x84e48(0x11c)](_0x84e48(0x128),'开始创建项目:\x20'+_0x3c8809[_0x84e48(0xea)],{'projectDir':_0x3c8f59,'appCode':_0x3c8809[_0x84e48(0x115)]}),console[_0x84e48(0x10f)](),console[_0x84e48(0x10f)](a128_0x500199[_0x84e48(0xe8)]('\x20√\x20')+_0x84e48(0xe2)+a128_0x500199[_0x84e48(0xe8)](_0x3c8809['projectName'])+(_0x3c8809[_0x84e48(0x115)]?_0x84e48(0x110)+a128_0x500199['cyan'](_0x3c8809[_0x84e48(0x115)]):''));try{await runTask(_0x84e48(0xef),()=>copyProjectTemplate(_0x3c8809[_0x84e48(0xea)])),await updatePackageJsonName(_0x3c8809['projectName']),await runTask(_0x84e48(0x126),()=>installDependencies(_0x3c8809['projectName'])),await runTask('Format\x20code',()=>formatProjectCode(_0x3c8809[_0x84e48(0xea)])),await configureAppCode(_0x3c8809[_0x84e48(0xea)],_0x3c8809['appCode']||'',_0x3c8809[_0x84e48(0x13e)]);let _0x2287c8=![];if(_0x3c8809[_0x84e48(0x115)]){console[_0x84e48(0x10f)](_0x84e48(0x108));const _0x3a097f=process['cwd']();try{process[_0x84e48(0x132)](_0x3c8f59);const _0x46cfb3=_0x3c8809[_0x84e48(0x13e)]||'production';initEnv(_0x46cfb3);const {configArray:_0x409b14}=await fetchModelList(_0x3c8809['appCode'],_0x1003c0['cookie']||''),_0x3b2767=DEFAULT_API_DIR,_0x2def6a=await generateApiFile(_0x409b14,'',_0x3c8809[_0x84e48(0x115)],!![],_0x46cfb3,_0x3b2767);console['log'](_0x84e48(0x114)+_0x409b14[_0x84e48(0x13c)]+_0x84e48(0x130)+_0x2def6a[_0x84e48(0x119)]+_0x84e48(0x11e)),logger[_0x84e48(0x11c)]('create',_0x84e48(0x10a)+_0x3c8809[_0x84e48(0x115)]);}catch(_0xcd66){_0x2287c8=!![],console[_0x84e48(0x10f)](_0x84e48(0x11d)),logger[_0x84e48(0xf9)](_0x84e48(0x128),_0x84e48(0xf3),{'error':_0xcd66 instanceof Error?_0xcd66[_0x84e48(0x117)]:String(_0xcd66)});}finally{process['chdir'](_0x3a097f);}}logger['success'](_0x84e48(0x128),_0x84e48(0x141)+_0x3c8809[_0x84e48(0xea)]),console[_0x84e48(0x10f)](),console[_0x84e48(0x10f)](a128_0x500199['green']('─'[_0x84e48(0xf4)](0x3c))),console[_0x84e48(0x10f)](a128_0x500199[_0x84e48(0xeb)][_0x84e48(0xfa)](_0x84e48(0x139))),console[_0x84e48(0x10f)](),console[_0x84e48(0x10f)](_0x84e48(0x102)+a128_0x500199[_0x84e48(0xeb)]['bold'](_0x84e48(0xec)+_0x3c8809[_0x84e48(0xea)]+_0x84e48(0x123)+CLI_BIN_NAME+_0x84e48(0x121))),_0x2287c8&&console[_0x84e48(0x10f)](_0x84e48(0x105)+a128_0x500199['cyan']['bold'](CLI_BIN_NAME+_0x84e48(0x120))),console[_0x84e48(0x10f)](a128_0x500199[_0x84e48(0xe8)]('─'[_0x84e48(0xf4)](0x3c)));}catch(_0x3b50ad){logger['error'](_0x84e48(0x128),_0x84e48(0xe6)+_0x3c8809[_0x84e48(0xea)],{'error':_0x3b50ad instanceof Error?_0x3b50ad[_0x84e48(0x117)]:String(_0x3b50ad)});try{a128_0x29fbe4[_0x84e48(0xf5)](_0x3c8f59)&&(console['log'](_0x84e48(0x106)+_0x3c8f59),a128_0x29fbe4[_0x84e48(0xe3)](_0x3c8f59,{'recursive':!![],'force':!![]}));}catch{logger[_0x84e48(0xf9)]('create','清理项目目录失败:\x20'+_0x3c8f59);}throw _0x3b50ad;}}async function runTask(_0x53c722,_0x52ac82){const _0x3d05b9=a128_0x3441,_0x5bd5b8=a128_0x382e95(_0x53c722+_0x3d05b9(0xff))[_0x3d05b9(0x138)]();try{const _0x476a91=await _0x52ac82();_0x5bd5b8[_0x3d05b9(0x135)](),console[_0x3d05b9(0x10f)](''+a128_0x500199[_0x3d05b9(0xe8)]('\x20√\x20')+_0x53c722+'\x20'+a128_0x500199[_0x3d05b9(0xfb)]('['+_0x476a91+']'));}catch(_0x1dfe79){_0x5bd5b8[_0x3d05b9(0x107)](_0x53c722);throw _0x1dfe79;}}async function updatePackageJsonName(_0x2ab632){const _0x20c5af=a128_0x3441,_0x5bf910=a128_0x1b62da[_0x20c5af(0xf8)](process[_0x20c5af(0x13a)](),_0x2ab632),_0x438ac2=a128_0x1b62da[_0x20c5af(0xfd)](_0x5bf910,_0x20c5af(0xf1));try{console[_0x20c5af(0x10f)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x5804f7=getRabetbaseCliPackageRoot(),_0x9652da=a128_0x1b62da[_0x20c5af(0xfd)](_0x5804f7,_0x20c5af(0xf1));let _0x16468f=_0x20c5af(0x131);try{const _0x29ba21=JSON[_0x20c5af(0x11f)](a128_0x29fbe4[_0x20c5af(0xf2)](_0x9652da,_0x20c5af(0x10e)));_0x16468f=_0x29ba21[_0x20c5af(0x12d)]||_0x20c5af(0x131);}catch{}const _0x372440=a128_0x29fbe4[_0x20c5af(0xf2)](_0x438ac2,_0x20c5af(0x10e)),_0x345b55=JSON[_0x20c5af(0x11f)](_0x372440);_0x345b55[_0x20c5af(0x124)]=_0x2ab632,_0x345b55['description']=_0x2ab632+_0x20c5af(0x10b)+_0x16468f,a128_0x29fbe4[_0x20c5af(0xe7)](_0x438ac2,JSON[_0x20c5af(0x111)](_0x345b55,null,0x2)+'\x0a','utf8'),console[_0x20c5af(0x10f)](_0x20c5af(0x125)+_0x2ab632),logger['info'](_0x20c5af(0x128),_0x20c5af(0x118));}catch(_0xc81750){logger[_0x20c5af(0x13b)](_0x20c5af(0x128),_0x20c5af(0x129));throw _0xc81750;}}async function configureAppCode(_0x5319ef,_0x41656c,_0x3d5a4a){const _0x4a8d8e=a128_0x3441,_0x1bbe9d=a128_0x1b62da[_0x4a8d8e(0xf8)](process[_0x4a8d8e(0x13a)](),_0x5319ef),_0x563772=a128_0x1b62da['join'](_0x1bbe9d,NEW_CONFIG_NAME);try{_0x41656c?console[_0x4a8d8e(0x10f)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x5319ef+':\x20'+_0x41656c):console[_0x4a8d8e(0x10f)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x5319ef);const _0x45e823=getRabetbaseCliPackageRoot(),_0x280b6a=a128_0x1b62da[_0x4a8d8e(0xfd)](_0x45e823,_0x4a8d8e(0xf1));let _0x1b73c1=_0x4a8d8e(0x131);try{const _0x1d7696=JSON[_0x4a8d8e(0x11f)](a128_0x29fbe4['readFileSync'](_0x280b6a,_0x4a8d8e(0x10e)));_0x1b73c1=_0x1d7696[_0x4a8d8e(0x12d)]||'1.0.0';}catch{}const _0x11ba12=readConfig(),_0x5a31cc=typeof _0x11ba12['env']===_0x4a8d8e(0x109)?_0x11ba12[_0x4a8d8e(0x13e)]:undefined,_0x2d7d70={};for(const _0x7bc748 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x11ba12[_0x7bc748]!=null)_0x2d7d70[_0x7bc748]=_0x11ba12[_0x7bc748];}const _0x58fc1f=buildCanonicalProjectConfig(_0x2d7d70,{'appCodes':_0x41656c?[_0x41656c]:[],'env':_0x3d5a4a||_0x5a31cc||_0x4a8d8e(0xe0),'metadata':{'createdAt':new Date()[_0x4a8d8e(0x116)](),'version':_0x1b73c1}});writeConfigFile(_0x563772,_0x58fc1f),_0x41656c?console[_0x4a8d8e(0x10f)](_0x4a8d8e(0x122)+Object[_0x4a8d8e(0x104)](_0x58fc1f[_0x4a8d8e(0xe9)]||{})[_0x4a8d8e(0xfd)](',\x20')+_0x4a8d8e(0xe5)+_0x58fc1f['defaultApp']):console[_0x4a8d8e(0x10f)](_0x4a8d8e(0x143)+CLI_BIN_NAME+_0x4a8d8e(0x11b)),logger[_0x4a8d8e(0x11c)](_0x4a8d8e(0x128),_0x4a8d8e(0x12c)+_0x41656c);}catch(_0x303c54){logger[_0x4a8d8e(0x13b)](_0x4a8d8e(0x128),_0x4a8d8e(0x100));}}
|
|
1
|
+
(function(_0x536165,_0x4616f5){const _0x8f50f2=a128_0x4d40,_0x45dda6=_0x536165();while(!![]){try{const _0x39305e=-parseInt(_0x8f50f2(0x9a))/0x1*(-parseInt(_0x8f50f2(0x99))/0x2)+-parseInt(_0x8f50f2(0xb5))/0x3*(-parseInt(_0x8f50f2(0x89))/0x4)+-parseInt(_0x8f50f2(0x90))/0x5*(parseInt(_0x8f50f2(0xab))/0x6)+-parseInt(_0x8f50f2(0x9e))/0x7*(-parseInt(_0x8f50f2(0x8c))/0x8)+-parseInt(_0x8f50f2(0xd0))/0x9*(parseInt(_0x8f50f2(0x7b))/0xa)+-parseInt(_0x8f50f2(0x87))/0xb+parseInt(_0x8f50f2(0xca))/0xc;if(_0x39305e===_0x4616f5)break;else _0x45dda6['push'](_0x45dda6['shift']());}catch(_0xcb365d){_0x45dda6['push'](_0x45dda6['shift']());}}}(a128_0xa572,0x29a85));import a128_0x1dcb75 from'path';import a128_0x5e09dc from'fs';import a128_0x5049fa from'chalk';import a128_0x2c6340 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 a128_0x4d40(_0x252713,_0x4c0bf8){_0x252713=_0x252713-0x6d;const _0xa5725f=a128_0xa572();let _0x4d4056=_0xa5725f[_0x252713];return _0x4d4056;}import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';function a128_0xa572(){const _0x558de9=['stableVersion','length','233164rhPSNb','1JZYpml','resolve','trim','W_OK','119rbZKuA','...','API\x20配置拉取异常','info','belowMinimum','repeat','minimumVersion','\x20model(s)','Project\x20name:\x20','API\x20configuration\x20pulled:\x20','package.json','warn','create','960seBOOC','bold','keys','setLogPath','项目创建失败:\x20','production','*\x20Pulling\x20API\x20configuration...','\x20dataset(s),\x20generated\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','success','715311fkladx','log','\x20\x201.\x20Start\x20project:\x20','gray','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','更新\x20package.json\x20失败','√\x20package.json\x20updated:\x20name=','test','配置应用AppCode:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','version','stringify','rmSync','CLI\x20版本检查','更新\x20package.json\x20name','\x20|\x20AppCode:\x20','开始创建项目:\x20','existsSync','stop','\x20&&\x20','Install\x20dependencies','1042692KHhXwt','readFileSync','needsUpgrade','modelCount','parse','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','38322eKsnkM','√\x20Pulled\x20','项目创建完成:\x20','\x20|\x20Default:\x20','writeFileSync','\x20api\x20pull','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','utf8','join','Project\x20name\x20cannot\x20be\x20empty','projectName','\x20config\x20set\x20appcode\x20<app-code>\x27','error','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','currentVersion','800PMTVAM','chdir','🚀\x20Next\x20Steps:','green','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','accessSync','\x20Generated\x20by\x20rabetbase\x20cli\x20','\x20√\x20','√\x20Configuration\x20file\x20created,\x20Apps:\x20','Copy\x20project\x20files','defaultApp','\x20already\x20exists','104665qrUJhU','appCode','4SKNVbh','env','cwd','105936rgUisF','message','cookie','\x20run\x20start','4570nPNzhE','Format\x20code','projectCode','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','description','1.0.0','cyan'];a128_0xa572=function(){return _0x558de9;};return a128_0xa572();}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';export async function createApp(_0x545e3e){const _0x14e64a=a128_0x4d40,_0x136c50=await checkCliVersion();(_0x136c50[_0x14e64a(0xcc)]||_0x136c50[_0x14e64a(0xa2)])&&(printCliUpgradeWarning(_0x136c50),assertCliVersionSupported(_0x136c50),logger[_0x14e64a(0xa1)]('create',_0x14e64a(0xc2),{'currentVersion':_0x136c50[_0x14e64a(0x7a)],'stableVersion':_0x136c50[_0x14e64a(0x97)],'minimumVersion':_0x136c50[_0x14e64a(0xa4)],'needsUpgrade':_0x136c50['needsUpgrade'],'belowMinimum':_0x136c50['belowMinimum']}));if(_0x545e3e['projectCode']&&_0x545e3e['appCode'])await runCreate({'projectName':_0x545e3e['projectCode'],'appCode':_0x545e3e[_0x14e64a(0x88)],'env':_0x545e3e['env']},_0x545e3e);else{if(_0x545e3e['projectCode']){const _0x48b6d2=await selectSingleAppcode(_0x545e3e[_0x14e64a(0x8e)]);await runCreate({'projectName':_0x545e3e[_0x14e64a(0x92)],'appCode':_0x48b6d2||undefined,'env':_0x545e3e['env']},_0x545e3e);}else await guidedCreateProject(_0x48917c=>runCreate(_0x48917c,_0x545e3e),_0x545e3e[_0x14e64a(0x8a)],_0x545e3e[_0x14e64a(0x8e)]);}}async function runCreate(_0x2e4fb7,_0x48d8fe){const _0xda27be=a128_0x4d40;if(!_0x2e4fb7['projectName']||_0x2e4fb7[_0xda27be(0x76)][_0xda27be(0x9c)]()==='')throw new Error(_0xda27be(0x75));const _0x25c394=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x25c394[_0xda27be(0xbc)](_0x2e4fb7[_0xda27be(0x76)]))throw new Error(_0xda27be(0xb9));if(_0x2e4fb7['projectName'][_0xda27be(0x98)]>0x64)throw new Error(_0xda27be(0xbe));const _0x2d9ea4=a128_0x1dcb75['resolve'](process[_0xda27be(0x8b)](),_0x2e4fb7[_0xda27be(0x76)]);if(a128_0x5e09dc[_0xda27be(0xc6)](_0x2d9ea4))throw new Error('Project\x20directory\x20'+_0x2e4fb7[_0xda27be(0x76)]+_0xda27be(0x86));try{a128_0x5e09dc[_0xda27be(0x80)](a128_0x1dcb75['dirname'](_0x2d9ea4),a128_0x5e09dc['constants'][_0xda27be(0x9d)]);}catch{throw new Error(_0xda27be(0x79));}logger[_0xda27be(0xae)](_0x2d9ea4),logger['info'](_0xda27be(0xaa),_0xda27be(0xc5)+_0x2e4fb7[_0xda27be(0x76)],{'projectDir':_0x2d9ea4,'appCode':_0x2e4fb7[_0xda27be(0x88)]}),console[_0xda27be(0xb6)](),console[_0xda27be(0xb6)](a128_0x5049fa[_0xda27be(0x7e)](_0xda27be(0x82))+_0xda27be(0xa6)+a128_0x5049fa[_0xda27be(0x7e)](_0x2e4fb7['projectName'])+(_0x2e4fb7[_0xda27be(0x88)]?_0xda27be(0xc4)+a128_0x5049fa[_0xda27be(0x96)](_0x2e4fb7[_0xda27be(0x88)]):''));try{await runTask(_0xda27be(0x84),()=>copyProjectTemplate(_0x2e4fb7[_0xda27be(0x76)])),await updatePackageJsonName(_0x2e4fb7[_0xda27be(0x76)]),await runTask(_0xda27be(0xc9),()=>installDependencies(_0x2e4fb7[_0xda27be(0x76)])),await runTask(_0xda27be(0x91),()=>formatProjectCode(_0x2e4fb7[_0xda27be(0x76)])),await configureAppCode(_0x2e4fb7[_0xda27be(0x76)],_0x2e4fb7[_0xda27be(0x88)]||'',_0x2e4fb7['env']);let _0x16ed60=![];if(_0x2e4fb7['appCode']){console[_0xda27be(0xb6)](_0xda27be(0xb1));const _0x5639bd=process['cwd']();try{process[_0xda27be(0x7c)](_0x2d9ea4);const _0x59456b=_0x2e4fb7[_0xda27be(0x8a)]||_0xda27be(0xb0);initEnv(_0x59456b);const {configArray:_0x491fe5}=await fetchModelList(_0x2e4fb7[_0xda27be(0x88)],_0x48d8fe[_0xda27be(0x8e)]||''),_0x92220=DEFAULT_API_DIR,_0x4ee376=await generateApiFile(_0x491fe5,'',_0x2e4fb7[_0xda27be(0x88)],!![],_0x59456b,_0x92220);console[_0xda27be(0xb6)](_0xda27be(0x6d)+_0x491fe5[_0xda27be(0x98)]+_0xda27be(0xb2)+_0x4ee376[_0xda27be(0xcd)]+_0xda27be(0xa5)),logger['info']('create',_0xda27be(0xa7)+_0x2e4fb7[_0xda27be(0x88)]);}catch(_0x6ec517){_0x16ed60=!![],console[_0xda27be(0xb6)](_0xda27be(0x93)),logger[_0xda27be(0xa9)](_0xda27be(0xaa),_0xda27be(0xa0),{'error':_0x6ec517 instanceof Error?_0x6ec517[_0xda27be(0x8d)]:String(_0x6ec517)});}finally{process['chdir'](_0x5639bd);}}logger[_0xda27be(0xb4)](_0xda27be(0xaa),_0xda27be(0x6e)+_0x2e4fb7[_0xda27be(0x76)]),console[_0xda27be(0xb6)](),console[_0xda27be(0xb6)](a128_0x5049fa['green']('─'[_0xda27be(0xa3)](0x3c))),console[_0xda27be(0xb6)](a128_0x5049fa[_0xda27be(0x96)][_0xda27be(0xac)](_0xda27be(0x7d))),console[_0xda27be(0xb6)](),console[_0xda27be(0xb6)](_0xda27be(0xb7)+a128_0x5049fa['cyan']['bold']('cd\x20'+_0x2e4fb7['projectName']+_0xda27be(0xc8)+CLI_BIN_NAME+_0xda27be(0x8f))),_0x16ed60&&console[_0xda27be(0xb6)](_0xda27be(0xb3)+a128_0x5049fa[_0xda27be(0x96)][_0xda27be(0xac)](CLI_BIN_NAME+_0xda27be(0x71))),console[_0xda27be(0xb6)](a128_0x5049fa[_0xda27be(0x7e)]('─'[_0xda27be(0xa3)](0x3c)));}catch(_0x1ad4b5){logger['error'](_0xda27be(0xaa),_0xda27be(0xaf)+_0x2e4fb7[_0xda27be(0x76)],{'error':_0x1ad4b5 instanceof Error?_0x1ad4b5['message']:String(_0x1ad4b5)});try{a128_0x5e09dc[_0xda27be(0xc6)](_0x2d9ea4)&&(console[_0xda27be(0xb6)](_0xda27be(0xcf)+_0x2d9ea4),a128_0x5e09dc[_0xda27be(0xc1)](_0x2d9ea4,{'recursive':!![],'force':!![]}));}catch{logger[_0xda27be(0xa9)]('create','清理项目目录失败:\x20'+_0x2d9ea4);}throw _0x1ad4b5;}}async function runTask(_0x3221b5,_0x4eb694){const _0x4e819d=a128_0x4d40,_0x42e7b5=a128_0x2c6340(_0x3221b5+_0x4e819d(0x9f))['start']();try{const _0x4a164d=await _0x4eb694();_0x42e7b5[_0x4e819d(0xc7)](),console['log'](''+a128_0x5049fa[_0x4e819d(0x7e)](_0x4e819d(0x82))+_0x3221b5+'\x20'+a128_0x5049fa[_0x4e819d(0xb8)]('['+_0x4a164d+']'));}catch(_0x339759){_0x42e7b5['fail'](_0x3221b5);throw _0x339759;}}async function updatePackageJsonName(_0x3bc693){const _0x570311=a128_0x4d40,_0x4183f8=a128_0x1dcb75[_0x570311(0x9b)](process[_0x570311(0x8b)](),_0x3bc693),_0x547fe2=a128_0x1dcb75['join'](_0x4183f8,_0x570311(0xa8));try{console[_0x570311(0xb6)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x421d15=getRabetbaseCliPackageRoot(),_0x5ed5a0=a128_0x1dcb75['join'](_0x421d15,_0x570311(0xa8));let _0x245422=_0x570311(0x95);try{const _0x1e659d=JSON[_0x570311(0xce)](a128_0x5e09dc[_0x570311(0xcb)](_0x5ed5a0,_0x570311(0x73)));_0x245422=_0x1e659d[_0x570311(0xbf)]||_0x570311(0x95);}catch{}const _0x1a653b=a128_0x5e09dc[_0x570311(0xcb)](_0x547fe2,_0x570311(0x73)),_0x496b7b=JSON[_0x570311(0xce)](_0x1a653b);_0x496b7b['name']=_0x3bc693,_0x496b7b[_0x570311(0x94)]=_0x3bc693+_0x570311(0x81)+_0x245422,a128_0x5e09dc[_0x570311(0x70)](_0x547fe2,JSON[_0x570311(0xc0)](_0x496b7b,null,0x2)+'\x0a',_0x570311(0x73)),console[_0x570311(0xb6)](_0x570311(0xbb)+_0x3bc693),logger['info'](_0x570311(0xaa),_0x570311(0xc3));}catch(_0xf84fdc){logger[_0x570311(0x78)]('create',_0x570311(0xba));throw _0xf84fdc;}}async function configureAppCode(_0x3dc4fe,_0x9f3049,_0x1a2c78){const _0x3dff1b=a128_0x4d40,_0xb3a303=a128_0x1dcb75['resolve'](process[_0x3dff1b(0x8b)](),_0x3dc4fe),_0x48792f=a128_0x1dcb75[_0x3dff1b(0x74)](_0xb3a303,NEW_CONFIG_NAME);try{_0x9f3049?console[_0x3dff1b(0xb6)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x3dc4fe+':\x20'+_0x9f3049):console[_0x3dff1b(0xb6)](_0x3dff1b(0x72)+_0x3dc4fe);const _0x3c3a42=getRabetbaseCliPackageRoot(),_0x3aebe4=a128_0x1dcb75[_0x3dff1b(0x74)](_0x3c3a42,'package.json');let _0x2ef790=_0x3dff1b(0x95);try{const _0x586b11=JSON['parse'](a128_0x5e09dc[_0x3dff1b(0xcb)](_0x3aebe4,_0x3dff1b(0x73)));_0x2ef790=_0x586b11['version']||_0x3dff1b(0x95);}catch{}const _0x30bfaa=readConfig(),_0x5abaa0=typeof _0x30bfaa[_0x3dff1b(0x8a)]==='string'?_0x30bfaa[_0x3dff1b(0x8a)]:undefined,_0x5b6280={};for(const _0x1846f9 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x30bfaa[_0x1846f9]!=null)_0x5b6280[_0x1846f9]=_0x30bfaa[_0x1846f9];}const _0x515ef3=buildCanonicalProjectConfig(_0x5b6280,{'appCodes':_0x9f3049?[_0x9f3049]:[],'env':_0x1a2c78||_0x5abaa0||_0x3dff1b(0xb0),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x2ef790}});writeConfigFile(_0x48792f,_0x515ef3),_0x9f3049?console['log'](_0x3dff1b(0x83)+Object[_0x3dff1b(0xad)](_0x515ef3['apps']||{})['join'](',\x20')+_0x3dff1b(0x6f)+_0x515ef3[_0x3dff1b(0x85)]):console[_0x3dff1b(0xb6)](_0x3dff1b(0x7f)+CLI_BIN_NAME+_0x3dff1b(0x77)),logger[_0x3dff1b(0xa1)]('create',_0x3dff1b(0xbd)+_0x9f3049);}catch(_0x4e1041){logger[_0x3dff1b(0x78)]('create','配置应用AppCode失败');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a129_0x1483(){const _0xbd8b24=['*\x20Creating\x20project\x20','bun','43168hlzNro','needsUpgrade','parse','Project\x20name\x20contains\x20invalid\x20characters.','join','validation','1561932peUAoB','40431312QWuCbo','env','utf-8','\x0a\x20\x20cd\x20','test','description','bun\x20--version','constants','...','chdir','bun\x20run\x20format','cwd','Use\x20a\x20different\x20project\x20name.','451jTcDtP','\x20\x20Pulling\x20API\x20configuration...','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','trim','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x0a√\x20Project\x20','9JMGNqn','40548ArAaow','resolve','log','length','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','W_OK','dirname','\x20model(s)','1490zymGwp','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','belowMinimum','\x20created\x20successfully!','stringify','readFile','20200PUOCYb','\x20dataset(s),\x20generated\x20','name','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','1358EzayKi','594cFJKKh','modelCount','Project\x20name\x20cannot\x20be\x20empty.','39468hDntag','\x20\x20rabetbase\x20run\x20start\x0a','Check\x20directory\x20permissions.','production','ignore','277010xndBaD'];a129_0x1483=function(){return _0xbd8b24;};return a129_0x1483();}(function(_0x2ff849,_0x22ff22){const _0x349e93=a129_0xed7a,_0xd2646=_0x2ff849();while(!![]){try{const _0x1977b7=-parseInt(_0x349e93(0x1b4))/0x1+-parseInt(_0x349e93(0x1a6))/0x2*(-parseInt(_0x349e93(0x1c8))/0x3)+parseInt(_0x349e93(0x19e))/0x4*(-parseInt(_0x349e93(0x1d1))/0x5)+parseInt(_0x349e93(0x1c9))/0x6*(parseInt(_0x349e93(0x1a2))/0x7)+parseInt(_0x349e93(0x1ae))/0x8*(parseInt(_0x349e93(0x1a3))/0x9)+parseInt(_0x349e93(0x1ab))/0xa*(-parseInt(_0x349e93(0x1c2))/0xb)+parseInt(_0x349e93(0x1b5))/0xc;if(_0x1977b7===_0x22ff22)break;else _0xd2646['push'](_0xd2646['shift']());}catch(_0x291aa3){_0xd2646['push'](_0xd2646['shift']());}}}(a129_0x1483,0xda0a5));import a129_0x510bac from'path';import a129_0x172589 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';function a129_0xed7a(_0x246981,_0x1d029f){_0x246981=_0x246981-0x19b;const _0x148372=a129_0x1483();let _0xed7abc=_0x148372[_0x246981];return _0xed7abc;}import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x2855f0,_0x16967a,_0x573d7a,_0x5b33a3){const _0x4a5c03=a129_0xed7a,_0x4b45d4=await checkCliVersion();(_0x4b45d4[_0x4a5c03(0x1af)]||_0x4b45d4[_0x4a5c03(0x1d3)])&&(printCliUpgradeWarning(_0x4b45d4),assertCliVersionSupported(_0x4b45d4));if(!_0x2855f0||_0x2855f0[_0x4a5c03(0x1c5)]()==='')throw CliErrors[_0x4a5c03(0x1b3)](_0x4a5c03(0x1a5));const _0x1816b8=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1816b8[_0x4a5c03(0x1b9)](_0x2855f0))throw CliErrors[_0x4a5c03(0x1b3)](_0x4a5c03(0x1b1),_0x4a5c03(0x1d2));if(_0x2855f0[_0x4a5c03(0x1cc)]>0x64)throw CliErrors[_0x4a5c03(0x1b3)](_0x4a5c03(0x1a1));const _0x414ca9=a129_0x510bac[_0x4a5c03(0x1ca)](process[_0x4a5c03(0x1c0)](),_0x2855f0);if(existsSync(_0x414ca9))throw CliErrors[_0x4a5c03(0x1b3)]('Project\x20directory\x20\x22'+_0x2855f0+'\x22\x20already\x20exists.',_0x4a5c03(0x1c1));try{const _0x1fa885=a129_0x510bac[_0x4a5c03(0x1cf)](_0x414ca9);await a129_0x172589['access'](_0x1fa885,a129_0x172589[_0x4a5c03(0x1bc)][_0x4a5c03(0x1ce)]);}catch{throw CliErrors[_0x4a5c03(0x1b3)]('Cannot\x20create\x20project\x20in\x20current\x20directory.',_0x4a5c03(0x1a8));}try{console[_0x4a5c03(0x1cb)](_0x4a5c03(0x1ac)+_0x2855f0+_0x4a5c03(0x1bd));const _0x5beb6a=getSubAppReactDemoTemplateDir();await copyDirectory(_0x5beb6a,_0x414ca9),console['log']('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x2855f0),console['log']('\x20\x20√\x20package.json\x20updated'),console[_0x4a5c03(0x1cb)]('\x20\x20Installing\x20dependencies...'),console[_0x4a5c03(0x1cb)](_0x4a5c03(0x1cd)),await formatCode(_0x414ca9),console[_0x4a5c03(0x1cb)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x2855f0,_0x573d7a,_0x16967a),console['log']('\x20\x20√\x20Configuration\x20file\x20created'),_0x573d7a&&await pullApiConfig(_0x414ca9,_0x573d7a,_0x16967a,_0x5b33a3),console[_0x4a5c03(0x1cb)](_0x4a5c03(0x1c7)+_0x2855f0+_0x4a5c03(0x19b)),console['log'](_0x4a5c03(0x1b8)+_0x2855f0),console[_0x4a5c03(0x1cb)](_0x4a5c03(0x1a7));}catch(_0x511a37){try{existsSync(_0x414ca9)&&await a129_0x172589['rm'](_0x414ca9,{'recursive':!![],'force':!![]});}catch{}throw _0x511a37;}}async function updatePackageJsonName(_0x310899){const _0x165bea=a129_0xed7a,_0x565e24=a129_0x510bac[_0x165bea(0x1ca)](process['cwd'](),_0x310899),_0x21fc8c=a129_0x510bac[_0x165bea(0x1b2)](_0x565e24,'package.json'),_0x3e6fef=await a129_0x172589[_0x165bea(0x19d)](_0x21fc8c,_0x165bea(0x1b7)),_0x17c443=JSON[_0x165bea(0x1b0)](_0x3e6fef);_0x17c443[_0x165bea(0x1a0)]=_0x310899,_0x17c443[_0x165bea(0x1ba)]=_0x165bea(0x1c6),await a129_0x172589['writeFile'](_0x21fc8c,JSON[_0x165bea(0x19c)](_0x17c443,null,0x2)+'\x0a');}function detectPackageManager(){const _0x18ca38=a129_0xed7a;try{return execSync(_0x18ca38(0x1bb),{'stdio':_0x18ca38(0x1aa)}),_0x18ca38(0x1ad);}catch{return'npm';}}async function formatCode(_0x3b53d0){const _0x132101=a129_0xed7a;try{await execAsync(_0x132101(0x1bf),{'cwd':_0x3b53d0});}catch{}}async function configureProject(_0x5edd10,_0x898f4c,_0x3d7f56){const _0x19ff9c=a129_0xed7a,_0x413b77=a129_0x510bac[_0x19ff9c(0x1ca)](process[_0x19ff9c(0x1c0)](),_0x5edd10),_0x10b096=a129_0x510bac[_0x19ff9c(0x1b2)](_0x413b77,NEW_CONFIG_NAME),_0x28749e=readConfig(),_0xa0153a=typeof _0x28749e[_0x19ff9c(0x1b6)]==='string'?_0x28749e[_0x19ff9c(0x1b6)]:undefined,_0x234e6f={};for(const _0x92ec0c of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x28749e[_0x92ec0c]!=null)_0x234e6f[_0x92ec0c]=_0x28749e[_0x92ec0c];}const _0x177dca=buildCanonicalProjectConfig(_0x234e6f,{'appCodes':_0x898f4c?[_0x898f4c]:[],'env':_0x3d7f56||_0xa0153a||_0x19ff9c(0x1a9),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x10b096,_0x177dca);}async function pullApiConfig(_0x3e0efc,_0x51e73e,_0x446c91,_0x7217f0){const _0x319639=a129_0xed7a,_0x5bba65=process[_0x319639(0x1c0)]();try{process[_0x319639(0x1be)](_0x3e0efc);const _0x49c6b8=_0x446c91||'production';initEnv(_0x49c6b8),console[_0x319639(0x1cb)](_0x319639(0x1c3));const {configArray:_0x18371f}=await fetchModelList(_0x51e73e,_0x7217f0||''),_0x59216b=await generateApiFile(_0x18371f,'',_0x51e73e,!![],_0x49c6b8,DEFAULT_API_DIR);console[_0x319639(0x1cb)]('\x20\x20√\x20Pulled\x20'+_0x18371f['length']+_0x319639(0x19f)+_0x59216b[_0x319639(0x1a4)]+_0x319639(0x1d0));}catch(_0x203cea){console[_0x319639(0x1cb)](_0x319639(0x1c4)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x319639(0x1be)](_0x5bba65);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x1bf43b=a130_0xdfba;(function(_0x5b3a03,_0x3fcd56){const _0xe8f7ee=a130_0xdfba,_0x194541=_0x5b3a03();while(!![]){try{const _0x3dd5c0=-parseInt(_0xe8f7ee(0x88))/0x1*(-parseInt(_0xe8f7ee(0x7f))/0x2)+-parseInt(_0xe8f7ee(0x86))/0x3+parseInt(_0xe8f7ee(0x83))/0x4+parseInt(_0xe8f7ee(0x84))/0x5+-parseInt(_0xe8f7ee(0x8b))/0x6*(-parseInt(_0xe8f7ee(0x87))/0x7)+parseInt(_0xe8f7ee(0x8a))/0x8+-parseInt(_0xe8f7ee(0x81))/0x9*(parseInt(_0xe8f7ee(0x85))/0xa);if(_0x3dd5c0===_0x3fcd56)break;else _0x194541['push'](_0x194541['shift']());}catch(_0xe53d84){_0x194541['push'](_0x194541['shift']());}}}(a130_0x12c6,0x21c49));function a130_0xdfba(_0x259ed8,_0x30ee32){_0x259ed8=_0x259ed8-0x7d;const _0x12c636=a130_0x12c6();let _0xdfbaef=_0x12c636[_0x259ed8];return _0xdfbaef;}import a130_0x3d7d83 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a130_0x3d7d83[a130_0x1bf43b(0x7d)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){return a130_0x3d7d83['resolve'](__dirname,'../../../../');}function a130_0x12c6(){const _0x41be76=['693246caJRlj','79156tuBSFt','1uNtTkx','join','1353472DMnpsx','102wxxJPM','dirname','projects','480924olNOcj','templates','9jrzSca','sub-app-react-demo','666044DJNSOr','787195lNOEVh','5564370YyZPbO'];a130_0x12c6=function(){return _0x41be76;};return a130_0x12c6();}export function getSubAppReactDemoTemplateDir(){const _0xf96ac=a130_0x1bf43b;return a130_0x3d7d83[_0xf96ac(0x89)](getRabetbaseCliPackageRoot(),_0xf96ac(0x80),_0xf96ac(0x7e),_0xf96ac(0x82));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x218c6f,_0x24376c){const _0x29c3f3=a131_0x153d,_0xae79f7=_0x218c6f();while(!![]){try{const _0x3fc5f1=-parseInt(_0x29c3f3(0xb3))/0x1+-parseInt(_0x29c3f3(0xb0))/0x2*(-parseInt(_0x29c3f3(0xbf))/0x3)+-parseInt(_0x29c3f3(0xb6))/0x4*(-parseInt(_0x29c3f3(0xbe))/0x5)+parseInt(_0x29c3f3(0xae))/0x6*(-parseInt(_0x29c3f3(0xad))/0x7)+-parseInt(_0x29c3f3(0xbd))/0x8*(-parseInt(_0x29c3f3(0xb5))/0x9)+parseInt(_0x29c3f3(0xb7))/0xa*(parseInt(_0x29c3f3(0xb4))/0xb)+-parseInt(_0x29c3f3(0xba))/0xc*(parseInt(_0x29c3f3(0xbc))/0xd);if(_0x3fc5f1===_0x24376c)break;else _0xae79f7['push'](_0xae79f7['shift']());}catch(_0x31d512){_0xae79f7['push'](_0xae79f7['shift']());}}}(a131_0x3614,0x84694));import a131_0x137378 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';function a131_0x153d(_0x3bdfe8,_0x139703){_0x3bdfe8=_0x3bdfe8-0xad;const _0x3614b5=a131_0x3614();let _0x153df7=_0x3614b5[_0x3bdfe8];return _0x153df7;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x5e8902){const _0x12238d=a131_0x153d,_0x4677e7=Date[_0x12238d(0xbb)](),_0x464b96=a131_0x137378[_0x12238d(0xb8)](process[_0x12238d(0xaf)](),_0x5e8902);try{logger[_0x12238d(0xc0)]('copy',_0x12238d(0xc1),{'projectCode':_0x5e8902,'templateDir':templateDir}),await copyDirectory(templateDir,_0x464b96);const _0x4a84ff=Date[_0x12238d(0xbb)]()-_0x4677e7;logger['success']('copy',_0x12238d(0xb1),_0x4a84ff,{'projectCode':_0x5e8902});}catch(_0x176761){const _0x1e5eec=Date[_0x12238d(0xbb)]()-_0x4677e7;logger[_0x12238d(0xb2)]('copy',_0x12238d(0xb9),{'projectCode':_0x5e8902,'error':_0x176761 instanceof Error?_0x176761[_0x12238d(0xc2)]:String(_0x176761),'duration':_0x1e5eec});throw _0x176761;}return formatElapsed(_0x4677e7);}function a131_0x3614(){const _0x2aecde=['message','67690BLtEvU','648nJGrOb','cwd','101672wWIwfN','项目模板复制完成','error','460456lcssTB','146729MwXQrS','5193YWisln','269464IcqOBJ','730YXhHtD','resolve','项目模板复制失败','195228GDfFkJ','now','832ZdcmvJ','9160vJFnOj','40dUmmAm','54PJoDNS','info','开始复制项目模板'];a131_0x3614=function(){return _0x2aecde;};return a131_0x3614();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3f1ab3,_0x24818a){const _0x3c6df6=a132_0x3fc2,_0x15ab8f=_0x3f1ab3();while(!![]){try{const _0x2975f9=parseInt(_0x3c6df6(0x1d5))/0x1+-parseInt(_0x3c6df6(0x1c4))/0x2+-parseInt(_0x3c6df6(0x1d2))/0x3*(-parseInt(_0x3c6df6(0x1ce))/0x4)+parseInt(_0x3c6df6(0x1d3))/0x5+-parseInt(_0x3c6df6(0x1cd))/0x6+parseInt(_0x3c6df6(0x1cb))/0x7*(parseInt(_0x3c6df6(0x1d4))/0x8)+-parseInt(_0x3c6df6(0x1ca))/0x9*(parseInt(_0x3c6df6(0x1cc))/0xa);if(_0x2975f9===_0x24818a)break;else _0x15ab8f['push'](_0x15ab8f['shift']());}catch(_0x2883f5){_0x15ab8f['push'](_0x15ab8f['shift']());}}}(a132_0x5f15,0x4570a));import a132_0x20b0e5 from'node:path';import{execa}from'execa';function a132_0x3fc2(_0x559b08,_0x46e022){_0x559b08=_0x559b08-0x1c4;const _0x5f15ea=a132_0x5f15();let _0x3fc2e1=_0x5f15ea[_0x559b08];return _0x3fc2e1;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a132_0x5f15(){const _0x104698=['1180sKFmRi','2472840nUXBim','10792SPqJRl','error','now','info','243PYzDKj','1884695lmdfWz','1214632kLvHvF','192322itEnAp','185312BNKovV','resolve','代码格式化完成','success','开始格式化代码','format','34632dpSpUx','21OvmSdU'];a132_0x5f15=function(){return _0x104698;};return a132_0x5f15();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x15ce5b){const _0x535d57=a132_0x3fc2,_0xe5bdbb=Date[_0x535d57(0x1d0)](),_0x29f62f=a132_0x20b0e5[_0x535d57(0x1c5)](process['cwd'](),_0x15ce5b);try{logger[_0x535d57(0x1d1)](_0x535d57(0x1c9),_0x535d57(0x1c8),{'projectCode':_0x15ce5b}),await execa(resolveNpmBin('npx'),['prettier','--write','.'],{'cwd':_0x29f62f});const _0x2ef207=Date[_0x535d57(0x1d0)]()-_0xe5bdbb;logger[_0x535d57(0x1c7)]('format',_0x535d57(0x1c6),_0x2ef207,{'projectCode':_0x15ce5b});}catch(_0x11599c){const _0x4e365d=Date[_0x535d57(0x1d0)]()-_0xe5bdbb;logger[_0x535d57(0x1cf)](_0x535d57(0x1c9),'代码格式化失败',{'projectCode':_0x15ce5b,'error':_0x11599c instanceof Error?_0x11599c['message']:String(_0x11599c),'duration':_0x4e365d});throw _0x11599c;}return formatElapsed(_0xe5bdbb);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x312ad9,_0xf0114a){const _0x1e6be1=a133_0x574c,_0x452162=_0x312ad9();while(!![]){try{const _0x1141f1=parseInt(_0x1e6be1(0xa3))/0x1*(parseInt(_0x1e6be1(0xb6))/0x2)+parseInt(_0x1e6be1(0xb1))/0x3*(parseInt(_0x1e6be1(0xb2))/0x4)+-parseInt(_0x1e6be1(0xae))/0x5+parseInt(_0x1e6be1(0xa9))/0x6*(-parseInt(_0x1e6be1(0xb7))/0x7)+parseInt(_0x1e6be1(0xb5))/0x8+-parseInt(_0x1e6be1(0xaa))/0x9+-parseInt(_0x1e6be1(0xb3))/0xa*(-parseInt(_0x1e6be1(0xac))/0xb);if(_0x1141f1===_0xf0114a)break;else _0x452162['push'](_0x452162['shift']());}catch(_0x4ccc0c){_0x452162['push'](_0x452162['shift']());}}}(a133_0x35c5,0xb4d42));import a133_0x3edab6 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a133_0x574c(_0x376c38,_0x3af8a4){_0x376c38=_0x376c38-0xa1;const _0x35c5e5=a133_0x35c5();let _0x574c0c=_0x35c5e5[_0x376c38];return _0x574c0c;}function a133_0x35c5(){const _0x1f4558=['https://registry.npmmirror.com','now','3IEFpey','5570484ueSVeb','5776270DSjiBs','info','8949944MpjiGd','3726ckOHlv','3611804rxtxSi','cwd','依赖安装失败','25ZQURjo','message','success','resolve','--registry','npm','12SqDqrX','2543895npcnPE','开始安装依赖','11aBOyom','install','5401465QiHIOg'];a133_0x35c5=function(){return _0x1f4558;};return a133_0x35c5();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x4dec29){const _0x1d70c7=a133_0x574c,_0x412b6a=Date[_0x1d70c7(0xb0)](),_0x44166a=a133_0x3edab6[_0x1d70c7(0xa6)](process[_0x1d70c7(0xa1)](),_0x4dec29);try{logger[_0x1d70c7(0xb4)](_0x1d70c7(0xad),_0x1d70c7(0xab),{'projectCode':_0x4dec29,'registry':_0x1d70c7(0xaf)}),await execa(resolveNpmBin(_0x1d70c7(0xa8)),['install',_0x1d70c7(0xa7),_0x1d70c7(0xaf)],{'cwd':_0x44166a});const _0x4941c1=Date[_0x1d70c7(0xb0)]()-_0x412b6a;logger[_0x1d70c7(0xa5)](_0x1d70c7(0xad),'依赖安装完成',_0x4941c1,{'projectCode':_0x4dec29});}catch(_0x840d03){const _0x1e97b0=Date[_0x1d70c7(0xb0)]()-_0x412b6a;logger['error'](_0x1d70c7(0xad),_0x1d70c7(0xa2),{'projectCode':_0x4dec29,'error':_0x840d03 instanceof Error?_0x840d03[_0x1d70c7(0xa4)]:String(_0x840d03),'duration':_0x1e97b0});throw _0x840d03;}return formatElapsed(_0x412b6a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a134_0x15ea(_0x4b2197,_0x41ad3f){_0x4b2197=_0x4b2197-0x1c6;const _0x223bed=a134_0x223b();let _0x15eaac=_0x223bed[_0x4b2197];return _0x15eaac;}const a134_0x4775d1=a134_0x15ea;(function(_0xece5f6,_0x10d82f){const _0x33137e=a134_0x15ea,_0x19b9cf=_0xece5f6();while(!![]){try{const _0x27cf18=-parseInt(_0x33137e(0x1d4))/0x1+-parseInt(_0x33137e(0x1d8))/0x2*(parseInt(_0x33137e(0x1e9))/0x3)+parseInt(_0x33137e(0x1cc))/0x4+parseInt(_0x33137e(0x1dc))/0x5*(parseInt(_0x33137e(0x1d7))/0x6)+parseInt(_0x33137e(0x1ec))/0x7*(-parseInt(_0x33137e(0x1ee))/0x8)+-parseInt(_0x33137e(0x1e0))/0x9*(-parseInt(_0x33137e(0x1e3))/0xa)+-parseInt(_0x33137e(0x1e4))/0xb;if(_0x27cf18===_0x10d82f)break;else _0x19b9cf['push'](_0x19b9cf['shift']());}catch(_0x51b9c1){_0x19b9cf['push'](_0x19b9cf['shift']());}}}(a134_0x223b,0x8372e));function a134_0x223b(){const _0x54d65a=['Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','../../commands/project/create/main.js','27IcaqRn','env','trim','2106430QmVMgh','96492poDIVP','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Project\x20name','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','64002CbxWpV','Usage:\x20','Skip\x20confirmation\x20prompt','2051ZHvcRZ','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','20328tzkpge','2026-07','project','../../commands/project/create/non-interactive.js','App\x20code\x20to\x20initialize','nonInteractive','create','project-name','yes','3925068bzEfrM','boolean','cookie','string','args','\x20workspace\x20init','name','init','797817yUTwKR','appcode','bool','2985924bitFzy','2QsZUcD','write','Auto-confirm\x20prompts','upgrade','5fsUVor','str'];a134_0x223b=function(){return _0x54d65a;};return a134_0x223b();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':'appcode','type':a134_0x4775d1(0x1cf),'description':a134_0x4775d1(0x1c7)},{'name':a134_0x4775d1(0x1e1),'type':a134_0x4775d1(0x1cf),'description':'Target\x20environment'},{'name':a134_0x4775d1(0x1cb),'type':a134_0x4775d1(0x1cd),'description':a134_0x4775d1(0x1da),'default':![]}],createFlags=[{'name':a134_0x4775d1(0x1d2),'type':a134_0x4775d1(0x1cf),'description':a134_0x4775d1(0x1e7)},{'name':a134_0x4775d1(0x1e1),'type':a134_0x4775d1(0x1cf),'description':'Target\x20environment'},{'name':a134_0x4775d1(0x1d5),'type':'string','description':a134_0x4775d1(0x1ed)}],upgradeFlags=[{'name':a134_0x4775d1(0x1cb),'type':a134_0x4775d1(0x1cd),'description':a134_0x4775d1(0x1eb),'default':![]}];export const projectDefinitions=[{'service':a134_0x4775d1(0x1f0),'command':a134_0x4775d1(0x1d3),'description':a134_0x4775d1(0x1de),'risk':a134_0x4775d1(0x1d9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a134_0x4775d1(0x1d1),'since':a134_0x4775d1(0x1ef)},'flags':initFlags,async 'execute'(_0x472fe6){const _0x34b6d5=a134_0x4775d1;return await initConfig({'appcode':_0x472fe6[_0x34b6d5(0x1dd)](_0x34b6d5(0x1d5))||undefined,'env':_0x472fe6[_0x34b6d5(0x1dd)](_0x34b6d5(0x1e1))||undefined,'autoYes':_0x472fe6[_0x34b6d5(0x1d6)](_0x34b6d5(0x1cb))}),{'ok':!![]};}},{'service':'project','command':a134_0x4775d1(0x1c9),'description':'Create\x20a\x20new\x20project','risk':a134_0x4775d1(0x1d9),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a134_0x4775d1(0x1ca),'description':a134_0x4775d1(0x1e6),'required':![]}],'flags':createFlags,async 'execute'(_0x3bcbd6){const _0x386247=a134_0x4775d1,{createApp:_0x1c7704}=await import(_0x386247(0x1df)),{createProjectNonInteractive:_0x56aaee}=await import(_0x386247(0x1c6)),_0xbea383=_0x3bcbd6[_0x386247(0x1dd)](_0x386247(0x1d2))[_0x386247(0x1e2)]()||_0x3bcbd6[_0x386247(0x1d0)][0x0]?.['trim'](),_0x35a85b=_0x3bcbd6['str']('env')||undefined,_0x4a3389=_0x3bcbd6['str']('appcode')||undefined;if(_0x3bcbd6[_0x386247(0x1c8)]){if(!_0xbea383)throw CliErrors['validation']('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x386247(0x1ea)+CLI_BIN_NAME+_0x386247(0x1e5));await _0x56aaee(_0xbea383,_0x35a85b,_0x4a3389,_0x3bcbd6[_0x386247(0x1ce)]);}else await _0x1c7704({'projectCode':_0xbea383,'appCode':_0x4a3389,'env':_0x35a85b,'cookie':_0x3bcbd6[_0x386247(0x1ce)]});return{'ok':!![]};}},{'service':a134_0x4775d1(0x1f0),'command':a134_0x4775d1(0x1db),'description':a134_0x4775d1(0x1e8),'risk':a134_0x4775d1(0x1d9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x1dbf20){const _0x287888=a134_0x4775d1;return await upgradeApp(_0x1dbf20['nonInteractive'],{'yes':_0x1dbf20[_0x287888(0x1d6)]('yes')}),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x43d69a,_0x356937){const _0x462cf3=a135_0x2060,_0x5bf8bf=_0x43d69a();while(!![]){try{const _0xcbc065=parseInt(_0x462cf3(0x1e1))/0x1*(parseInt(_0x462cf3(0x208))/0x2)+-parseInt(_0x462cf3(0x1ec))/0x3*(-parseInt(_0x462cf3(0x1f3))/0x4)+parseInt(_0x462cf3(0x206))/0x5+parseInt(_0x462cf3(0x1d6))/0x6+-parseInt(_0x462cf3(0x1fc))/0x7+-parseInt(_0x462cf3(0x1e6))/0x8*(parseInt(_0x462cf3(0x1f8))/0x9)+-parseInt(_0x462cf3(0x207))/0xa*(parseInt(_0x462cf3(0x1dc))/0xb);if(_0xcbc065===_0x356937)break;else _0x5bf8bf['push'](_0x5bf8bf['shift']());}catch(_0x3836ad){_0x5bf8bf['push'](_0x5bf8bf['shift']());}}}(a135_0x29f5,0xeb1d9));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a135_0x4b2f8f from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';function a135_0x29f5(){const _0x55911d=['toLocaleString','\x20\x20Default:\x20','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','从旧配置文件升级成功','231XVnDMw','apps','setLogPath','appcode','\x20\x20appcode:\x20','1761371VrLprZ','\x20api\x20pull\x27','Invalid\x20App\x20Code','production','parse','584dkpxjT','\x20\x20Apps:\x20','✓\x20Upgraded\x20','version','yellow','log','96ibmNGB','defaultApp','string','app','../..','\x20api\x20generate\x27\x20and\x20\x27','init','175264cFRLsc','\x20→\x20.rabetbase.json','1.0.0','cyan','package.json','153981kperKA','App\x20Code\x20cannot\x20be\x20empty','green','gray','3476928OnPDmu','keys','cwd','join','初始化项目配置文件成功','env','?\x20(Old\x20file\x20→\x20*.bak)','trim','\x20workspace\x20init`\x20to\x20start\x20fresh.','bold','2212670DgCXtb','499410QVDWRV','2orpcQZ','.bak','utf8','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','Please\x20enter\x20App\x20Code:','info','908628pnmlvR'];a135_0x29f5=function(){return _0x55911d;};return a135_0x29f5();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x56f079){const _0x59c6c6=a135_0x2060,{appcode:_0x426d51,env:_0x352cdd,autoYes:_0x42b155}=_0x56f079,_0x194d23=process[_0x59c6c6(0x1fe)]();if(getProjectConfigPath())throw new Error(_0x59c6c6(0x20b));let _0x35ff94;for(const _0x31d0e5 of LEGACY_CONFIG_NAMES){const _0x24fab9=resolve(_0x194d23,_0x31d0e5);if(existsSync(_0x24fab9)){_0x35ff94=_0x24fab9;break;}}if(_0x35ff94){let _0x26678a={};try{_0x26678a=JSON[_0x59c6c6(0x1e5)](readFileSync(_0x35ff94,_0x59c6c6(0x20a)));}catch{}const _0x49927c=basename(_0x35ff94),_0x3459db=_0x26678a?.[_0x59c6c6(0x1df)]||_0x26678a?.[_0x59c6c6(0x1ef)];let _0x143dc8=_0x42b155;!_0x42b155&&(console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1ea)]('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a135_0x4b2f8f[_0x59c6c6(0x205)](_0x49927c))),_0x3459db&&console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1f6)](_0x59c6c6(0x1e0)+_0x3459db)),_0x143dc8=await confirm({'message':'Upgrade\x20it\x20to\x20'+a135_0x4b2f8f['bold']('.rabetbase.json')+_0x59c6c6(0x202),'default':!![]}));if(!_0x143dc8){console[_0x59c6c6(0x1eb)]('Migration\x20cancelled.\x20Run\x20`'+CLI_BIN_NAME+_0x59c6c6(0x204));return;}const _0x3e9230=resolve(_0x194d23,NEW_CONFIG_NAME),_0x18b09d=getCliVersionFromPkg(),_0x2e5b9e=readRawConfig(),_0x1d1b6=_0x426d51||(typeof _0x26678a?.[_0x59c6c6(0x1df)]===_0x59c6c6(0x1ee)?_0x26678a[_0x59c6c6(0x1df)]:undefined)||(typeof _0x26678a?.['app']===_0x59c6c6(0x1ee)?_0x26678a[_0x59c6c6(0x1ef)]:undefined)||await askAppcode(),_0x1c2c48=typeof _0x26678a?.[_0x59c6c6(0x201)]===_0x59c6c6(0x1ee)?_0x26678a[_0x59c6c6(0x201)]:typeof _0x2e5b9e[_0x59c6c6(0x201)]===_0x59c6c6(0x1ee)?_0x2e5b9e[_0x59c6c6(0x201)]:_0x59c6c6(0x1e4),_0x55123f=buildCanonicalProjectConfig({..._0x2e5b9e,..._0x26678a},{'appCodes':[_0x1d1b6],'env':_0x1c2c48,'metadata':{'version':_0x18b09d,'migratedAt':new Date()[_0x59c6c6(0x1d7)](),'migratedFrom':_0x35ff94}});writeConfigFile(_0x3e9230,_0x55123f);const _0x17375b=_0x35ff94+_0x59c6c6(0x209);renameSync(_0x35ff94,_0x17375b),logger[_0x59c6c6(0x1de)](_0x194d23),logger[_0x59c6c6(0x1d5)](_0x59c6c6(0x1f2),_0x59c6c6(0x1db),{'from':_0x35ff94,'to':_0x3e9230,'appcode':_0x1d1b6,'env':_0x55123f[_0x59c6c6(0x201)]}),console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1fa)](_0x59c6c6(0x1e8)+_0x49927c+_0x59c6c6(0x1f4))),console['log'](a135_0x4b2f8f['cyan']('\x20\x20Apps:\x20'+Object['keys'](_0x55123f[_0x59c6c6(0x1dd)]||{})['join'](',\x20'))),console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1f6)](_0x59c6c6(0x1d8)+_0x55123f['defaultApp'])),console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1fb)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x49927c+_0x59c6c6(0x209)));return;}const _0x4ae277=_0x426d51||await askAppcode(),_0x376244=resolve(_0x194d23,NEW_CONFIG_NAME),_0x4bcfc7=getCliVersionFromPkg(),_0x22c24d=readRawConfig(),_0x494011=typeof _0x22c24d[_0x59c6c6(0x201)]===_0x59c6c6(0x1ee)?_0x22c24d[_0x59c6c6(0x201)]:undefined,_0x31799c=buildCanonicalProjectConfig({},{'appCodes':[_0x4ae277],'env':_0x352cdd||_0x494011||_0x59c6c6(0x1e4),'metadata':{'version':_0x4bcfc7,'createdAt':new Date()[_0x59c6c6(0x1d7)]()}});writeConfigFile(_0x376244,_0x31799c),logger[_0x59c6c6(0x1de)](_0x194d23),logger['info']('init',_0x59c6c6(0x200),{'appcode':_0x4ae277,'env':_0x31799c[_0x59c6c6(0x201)],'version':_0x31799c[_0x59c6c6(0x1e9)],'configPath':_0x376244}),console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1fa)](_0x59c6c6(0x1da))),console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1f6)](_0x59c6c6(0x1e7)+Object[_0x59c6c6(0x1fd)](_0x31799c[_0x59c6c6(0x1dd)]||{})[_0x59c6c6(0x1ff)](',\x20'))),console['log'](a135_0x4b2f8f[_0x59c6c6(0x1f6)](_0x59c6c6(0x1d8)+_0x31799c[_0x59c6c6(0x1ed)])),console[_0x59c6c6(0x1eb)](_0x59c6c6(0x1d9)+CLI_BIN_NAME+_0x59c6c6(0x1f1)+CLI_BIN_NAME+_0x59c6c6(0x1e2));}function askAppcode(){const _0xa86cb9=a135_0x2060;return input({'message':_0xa86cb9(0x1d4),'validate':_0x59f557=>{const _0x5e8d7c=_0xa86cb9;if(!_0x59f557['trim']())return _0x5e8d7c(0x1f9);const {valid:_0xca9cea,message:_0x2ba9bd}=validateAppcode(_0x59f557[_0x5e8d7c(0x203)]());return _0xca9cea||_0x2ba9bd||_0x5e8d7c(0x1e3);}});}function a135_0x2060(_0x515905,_0x416073){_0x515905=_0x515905-0x1d4;const _0x29f5c4=a135_0x29f5();let _0x206076=_0x29f5c4[_0x515905];return _0x206076;}function getCliVersionFromPkg(){const _0x2e299b=a135_0x2060;try{const _0x2d824d=fileURLToPath(import.meta.url),_0x368d46=resolve(dirname(_0x2d824d),_0x2e299b(0x1f0)),_0x562d1f=JSON[_0x2e299b(0x1e5)](readFileSync(resolve(_0x368d46,_0x2e299b(0x1f7)),'utf8'));return _0x562d1f['version']||_0x2e299b(0x1f5);}catch{return _0x2e299b(0x1f5);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a136_0x36a9b3=a136_0x313b;(function(_0x59ed69,_0x154ff7){const _0x1c9fad=a136_0x313b,_0x24834b=_0x59ed69();while(!![]){try{const _0x9559fa=parseInt(_0x1c9fad(0x139))/0x1+-parseInt(_0x1c9fad(0x196))/0x2*(parseInt(_0x1c9fad(0x177))/0x3)+parseInt(_0x1c9fad(0x129))/0x4*(parseInt(_0x1c9fad(0x153))/0x5)+parseInt(_0x1c9fad(0x18c))/0x6*(parseInt(_0x1c9fad(0x163))/0x7)+parseInt(_0x1c9fad(0x185))/0x8+-parseInt(_0x1c9fad(0x13e))/0x9*(-parseInt(_0x1c9fad(0x160))/0xa)+-parseInt(_0x1c9fad(0x17c))/0xb;if(_0x9559fa===_0x154ff7)break;else _0x24834b['push'](_0x24834b['shift']());}catch(_0x275c6e){_0x24834b['push'](_0x24834b['shift']());}}}(a136_0xbde8,0xe2068));import a136_0x38dbad from'chalk';import a136_0x3ca242 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a136_0x36a9b3(0x191)](_0x25d122=>_0x25d122!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x47b102){const _0x6b39b9=a136_0x36a9b3,_0x39d48d=[];for(const _0x56af17 of Object['values'](CORE_IDE_CONFIGS)){if(_0x56af17[_0x6b39b9(0x167)])for(const _0x3cc53d of _0x56af17[_0x6b39b9(0x167)]){_0x39d48d['push'](resolve(_0x47b102,_0x3cc53d['path']));}}return _0x39d48d;}function analyse(_0x2829d9){const _0x4d4fbd=a136_0x36a9b3;let _0x4dec5f=null;const _0xac11f5=resolve(_0x2829d9,NEW_CONFIG_NAME),_0x5a2ea0=existsSync(_0xac11f5);for(const _0x5e06ca of LEGACY_CONFIG_NAMES){const _0x2b9e69=resolve(_0x2829d9,_0x5e06ca);if(existsSync(_0x2b9e69)){const _0x3880e6=readConfigFile(_0x2b9e69),_0x11721d=Object[_0x4d4fbd(0x144)](_0x3880e6)['filter'](_0x570975=>typeof _0x3880e6[_0x570975]!==_0x4d4fbd(0x14a));_0x4dec5f={'oldPath':_0x2b9e69,'hasNewConfig':_0x5a2ea0,'fields':_0x11721d};break;}}const _0x35fb1e=[],_0x24fad1=resolve(_0x2829d9,_0x4d4fbd(0x169));if(existsSync(_0x24fad1))_0x35fb1e[_0x4d4fbd(0x14d)](_0x24fad1);const _0x1c2a39=resolve(_0x2829d9,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x1c2a39))_0x35fb1e[_0x4d4fbd(0x14d)](_0x1c2a39);const _0x120759=resolve(_0x2829d9,_0x4d4fbd(0x175));if(existsSync(_0x120759))_0x35fb1e[_0x4d4fbd(0x14d)](_0x120759);for(const _0x186bae of collectIdeSkillFiles(_0x2829d9)){if(existsSync(_0x186bae))_0x35fb1e['push'](_0x186bae);}let _0x483777=null;const _0x176731=resolve(_0x2829d9,'.cursor/mcp.json');if(existsSync(_0x176731))try{const _0x4eb5fb=JSON[_0x4d4fbd(0x181)](readFileSync(_0x176731,_0x4d4fbd(0x150)));if(_0x4eb5fb?.['mcpServers']&&typeof _0x4eb5fb['mcpServers']===_0x4d4fbd(0x166)){const _0xc172ac=[];for(const [_0x23d20a,_0x487c71]of Object[_0x4d4fbd(0x197)](_0x4eb5fb[_0x4d4fbd(0x18d)])){const _0x35b092=_0x487c71;_0x35b092?.[_0x4d4fbd(0x17b)]&&Array[_0x4d4fbd(0x146)](_0x35b092['args'])&&_0x35b092[_0x4d4fbd(0x17b)][_0x4d4fbd(0x17f)](_0x35c3bf=>typeof _0x35c3bf===_0x4d4fbd(0x17a)&&_0x35c3bf[_0x4d4fbd(0x15b)](_0x4d4fbd(0x148)))&&_0xc172ac['push'](_0x23d20a);}_0xc172ac[_0x4d4fbd(0x162)]>0x0&&(_0x483777={'path':_0x176731,'keys':_0xc172ac});}}catch{}const _0x34d903=_0x35fb1e[_0x4d4fbd(0x162)]>0x0||_0x4dec5f!==null;let _0x4817fd=null;const _0x39d8bd=resolve(_0x2829d9,_0x4d4fbd(0x12d));if(existsSync(_0x39d8bd))try{const _0x1f0659=JSON[_0x4d4fbd(0x181)](readFileSync(_0x39d8bd,_0x4d4fbd(0x150)));for(const _0x5488 of[_0x4d4fbd(0x132),'devDependencies']){const _0x1e4668=_0x1f0659?.[_0x5488]?.['@lovrabet/sdk'];if(typeof _0x1e4668==='string'){_0x1e4668!==_0x4d4fbd(0x159)&&(_0x4817fd={'pkgPath':_0x39d8bd,'currentVersion':_0x1e4668,'field':_0x5488});break;}}}catch{}return{'configMigration':_0x4dec5f,'oldArtifacts':_0x35fb1e,'oldMcpConfig':_0x483777,'needsSkillSwap':_0x34d903,'sdkUpgrade':_0x4817fd};}function a136_0xbde8(){const _0x2d9842=['none\x20found','latest','status','includes','\x20removed','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','[\x22@lovrabet/sdk\x22]:\x20','not\x20found\x20or\x20already\x20at\x20latest','827880sMHqKu','failed','length','1099TxxGRH','\x20→\x20','hasNewConfig','object','files','MCP\x20config:','.lovrabet','\x20\x20bun\x20install','\x20\x20Current\x20version\x20in\x20','needed','bold','Step\x204/7:\x20MCP\x20config\x20—\x20','no\x20matching\x20entry\x20found','Remove\x20.lovrabet/','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','===\x20Upgrade\x20Summary\x20===','Install\x20new\x20skill','@lovrabet/sdk:','.claude/skills/lovrabet','green','3TeLOCm','detail','Step\x206/7:\x20Installing\x20new\x20skill...','string','args','51127197APMqXu','oldPath','path','some','oldArtifacts','parse','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','join','sdkUpgrade','12848344pBgGhe','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Skill\x20swap:','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Step\x201/7:\x20Migrating\x20config...','\x20→\x20keys:\x20','configMigration','17814NbNgfm','mcpServers','\x20→\x20latest','Legacy\x20artifacts:','oldMcpConfig','filter','Clean\x20MCP\x20config','Step\x201/7:\x20Config\x20migration\x20—\x20','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','not\x20found\x20(will\x20create)','766046MKbUbb','entries','Step\x205/7:\x20Removing\x20old\x20skill...','CANCEL','message','cyan','no\x20legacy\x20entry','FOUND','===\x20Upgrade\x20Analysis\x20===','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Config\x20file:','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','\x20removed\x20(','Upgrade\x20@lovrabet/sdk','fields','skipped\x20(no\x20legacy\x20config)','done','Remove\x20legacy\x20artifacts','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','358612LXvYEH','inherit','Proceed\x20with\x20upgrade?','step','package.json','.bak','Upgrade\x20completed\x20successfully!','fail','log','dependencies','start','not\x20needed','succeed','label','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','\x20\x20\x20\x20\x20\x20\x20','780636mGoaAT','yellow','red','exit\x20','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','162rEenGd','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Config\x20migration','stringify','white','Upgrade\x20cancelled.','keys','needsSkillSwap','isArray','cwd','@lovrabet/dataset-mcp-server','\x20from\x20','undefined','lovrabet/rabetbase\x20installed\x20globally','\x20\x20npm\x20install','push','gray','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','utf8','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','\x20\x20Step\x20','90IOrBTj','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','\x20(backup:\x20','error','already\x20exists\x20(will\x20merge)'];a136_0xbde8=function(){return _0x2d9842;};return a136_0xbde8();}function printReport(_0x52cbb7){const _0x2f3e27=a136_0x36a9b3,{configMigration:_0x39b025,oldArtifacts:_0xea8618,oldMcpConfig:_0x42fb12,needsSkillSwap:_0x30ad69}=_0x52cbb7;console[_0x2f3e27(0x131)](''),console['log'](a136_0x38dbad['bold'](_0x2f3e27(0x11e))),console[_0x2f3e27(0x131)]('');_0x39b025?(console[_0x2f3e27(0x131)](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x120))+('\x20\x20'+a136_0x38dbad[_0x2f3e27(0x13a)](_0x39b025['oldPath']))),console['log'](_0x2f3e27(0x11f)+(_0x39b025[_0x2f3e27(0x165)]?a136_0x38dbad['green'](_0x2f3e27(0x157)):a136_0x38dbad['gray'](_0x2f3e27(0x195)))),console[_0x2f3e27(0x131)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x39b025[_0x2f3e27(0x124)][_0x2f3e27(0x183)](',\x20')),console[_0x2f3e27(0x131)]('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x2f3e27(0x131)](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x120))+'\x20\x20'+a136_0x38dbad['gray']('no\x20legacy\x20config\x20found'));console[_0x2f3e27(0x131)]('');if(_0xea8618[_0x2f3e27(0x162)]>0x0){console['log'](a136_0x38dbad[_0x2f3e27(0x19b)]('Legacy\x20artifacts:'));for(const _0x1043a2 of _0xea8618){console['log']('\x20\x20'+a136_0x38dbad['red'](_0x2f3e27(0x11d))+'\x20\x20'+_0x1043a2);}console[_0x2f3e27(0x131)]('\x20\x20Action:\x20delete');}else console['log'](a136_0x38dbad['cyan'](_0x2f3e27(0x18f))+'\x20\x20'+a136_0x38dbad['gray'](_0x2f3e27(0x158)));console[_0x2f3e27(0x131)]('');_0x42fb12?(console[_0x2f3e27(0x131)](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x168))+('\x20\x20'+a136_0x38dbad[_0x2f3e27(0x13a)](_0x42fb12['path'])+_0x2f3e27(0x18a)+_0x42fb12[_0x2f3e27(0x144)][_0x2f3e27(0x183)](',\x20'))),console[_0x2f3e27(0x131)]('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console[_0x2f3e27(0x131)](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x168))+'\x20\x20'+a136_0x38dbad[_0x2f3e27(0x14e)](_0x2f3e27(0x11c)));console[_0x2f3e27(0x131)](''),console['log'](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x187))+('\x20\x20'+(_0x30ad69?a136_0x38dbad['yellow'](_0x2f3e27(0x16c)):a136_0x38dbad[_0x2f3e27(0x176)](_0x2f3e27(0x134)))));_0x30ad69&&console[_0x2f3e27(0x131)](_0x2f3e27(0x186)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x2f3e27(0x131)]('');if(_0x52cbb7[_0x2f3e27(0x184)]){const {currentVersion:_0xec3454,field:_0x138d48,pkgPath:_0x48a91e}=_0x52cbb7[_0x2f3e27(0x184)];console['log'](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x174))+('\x20\x20'+a136_0x38dbad['yellow'](_0x48a91e))),console['log'](_0x2f3e27(0x16b)+_0x138d48+':\x20'+a136_0x38dbad[_0x2f3e27(0x13a)](_0xec3454)+_0x2f3e27(0x164)+a136_0x38dbad[_0x2f3e27(0x176)](_0x2f3e27(0x159))),console[_0x2f3e27(0x131)](_0x2f3e27(0x14f));}else console[_0x2f3e27(0x131)](a136_0x38dbad[_0x2f3e27(0x19b)](_0x2f3e27(0x174))+'\x20\x20'+a136_0x38dbad[_0x2f3e27(0x14e)](_0x2f3e27(0x15f)));console[_0x2f3e27(0x131)]('');}function execConfigMigration(_0x231f5b,_0x45bef8){const _0x164376=a136_0x36a9b3,{configMigration:_0x2a2574}=_0x231f5b;if(!_0x2a2574?.['oldPath'])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x164376(0x125)};const _0x113287=readConfigFile(_0x2a2574[_0x164376(0x17d)]),_0x18c799=resolve(_0x45bef8,NEW_CONFIG_NAME),_0x3b9d5a=_0x2a2574['hasNewConfig']?readConfigFile(_0x18c799):{};for(const [_0x13a5a1,_0x394174]of Object[_0x164376(0x197)](_0x113287)){!(_0x13a5a1 in _0x3b9d5a)&&(_0x3b9d5a[_0x13a5a1]=_0x394174);}writeConfigFile(_0x18c799,_0x3b9d5a);const _0x234cdb=_0x2a2574[_0x164376(0x17d)]+_0x164376(0x12e);return renameSync(_0x2a2574[_0x164376(0x17d)],_0x234cdb),{'step':0x1,'label':_0x164376(0x140),'ok':!![],'detail':_0x2a2574[_0x164376(0x17d)]+'\x20→\x20'+_0x18c799+_0x164376(0x155)+_0x234cdb+')'};}function execRemoveOldArtifacts(_0x22590a){const _0x30f6c9=a136_0x36a9b3,_0x4ad911=[];for(const _0x3fe5f8 of _0x22590a){try{if(!existsSync(_0x3fe5f8))continue;const _0x34d2dd=tryStat(_0x3fe5f8);_0x34d2dd?.['isDirectory']()?rmSync(_0x3fe5f8,{'recursive':!![],'force':!![]}):unlinkSync(_0x3fe5f8);}catch(_0x32ef54){_0x4ad911[_0x30f6c9(0x14d)](_0x3fe5f8+':\x20'+_0x32ef54[_0x30f6c9(0x19a)]);}}return{'step':0x3,'label':_0x30f6c9(0x127),'ok':_0x4ad911[_0x30f6c9(0x162)]===0x0,'detail':_0x4ad911[_0x30f6c9(0x162)]>0x0?_0x22590a[_0x30f6c9(0x162)]-_0x4ad911[_0x30f6c9(0x162)]+'/'+_0x22590a[_0x30f6c9(0x162)]+_0x30f6c9(0x122)+_0x4ad911[_0x30f6c9(0x183)](';\x20')+')':_0x22590a[_0x30f6c9(0x162)]+_0x30f6c9(0x15c)};}function execCleanMcp(_0x29b95e){const _0x54268c=a136_0x36a9b3;if(!_0x29b95e[_0x54268c(0x190)])return{'step':0x4,'label':_0x54268c(0x192),'ok':!![],'detail':'skipped'};try{const _0x2d12e6=readFileSync(_0x29b95e[_0x54268c(0x190)]['path'],_0x54268c(0x150)),_0x267f43=JSON[_0x54268c(0x181)](_0x2d12e6);if(_0x267f43?.[_0x54268c(0x18d)]&&typeof _0x267f43['mcpServers']===_0x54268c(0x166)){const _0x548b49=[];for(const [_0x2f4f7c,_0x1653ff]of Object[_0x54268c(0x197)](_0x267f43['mcpServers'])){_0x1653ff?.[_0x54268c(0x17b)]&&Array[_0x54268c(0x146)](_0x1653ff['args'])&&_0x1653ff[_0x54268c(0x17b)][_0x54268c(0x17f)](_0x906b72=>typeof _0x906b72===_0x54268c(0x17a)&&_0x906b72[_0x54268c(0x15b)](_0x54268c(0x148)))&&_0x548b49[_0x54268c(0x14d)](_0x2f4f7c);}for(const _0x138501 of _0x548b49){delete _0x267f43[_0x54268c(0x18d)][_0x138501];}return _0x548b49[_0x54268c(0x162)]>0x0&&writeFileSync(_0x29b95e[_0x54268c(0x190)]['path'],JSON[_0x54268c(0x141)](_0x267f43,null,0x2)+'\x0a',_0x54268c(0x150)),{'step':0x4,'label':_0x54268c(0x192),'ok':!![],'detail':'removed\x20'+_0x548b49[_0x54268c(0x183)](',\x20')+_0x54268c(0x149)+_0x29b95e[_0x54268c(0x190)][_0x54268c(0x17e)]};}return{'step':0x4,'label':_0x54268c(0x192),'ok':!![],'detail':_0x54268c(0x16f)};}catch(_0x5b80d9){return{'step':0x4,'label':_0x54268c(0x192),'ok':![],'detail':_0x5b80d9[_0x54268c(0x19a)]};}}function execSkillsRemove(_0x1d81ce,_0x248e3c){const _0x1ae33c=a136_0x36a9b3,_0x4d71e4=runNpxSkillsRemove(_0x1d81ce,{'stdio':_0x1ae33c(0x12a),'yes':_0x248e3c});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x4d71e4['ok'],'detail':_0x4d71e4['ok']?'lovrabet/lovrabet-skill\x20removed':_0x4d71e4['error']??_0x1ae33c(0x13c)+_0x4d71e4[_0x1ae33c(0x15a)]};}function execSkillsAdd(_0x27988e,_0x362eae){const _0x1472c6=a136_0x36a9b3,_0x1c0f02=runNpxSkillsAddGlobal(_0x27988e,'lovrabet/rabetbase',{'stdio':'inherit','yes':_0x362eae});return{'step':0x6,'label':_0x1472c6(0x173),'ok':_0x1c0f02['ok'],'detail':_0x1c0f02['ok']?_0x1472c6(0x14b):_0x1c0f02[_0x1472c6(0x156)]??'exit\x20'+_0x1c0f02['status']};}function execUpgradeSdk(_0x1318e2){const _0x4f1d31=a136_0x36a9b3;if(!_0x1318e2[_0x4f1d31(0x184)])return{'step':0x7,'label':_0x4f1d31(0x123),'ok':!![],'detail':_0x4f1d31(0x194)};const {pkgPath:_0x5db9c3,currentVersion:_0x58ce74,field:_0x545b5a}=_0x1318e2[_0x4f1d31(0x184)];try{const _0x1280f=readFileSync(_0x5db9c3,_0x4f1d31(0x150)),_0x2dc18b=JSON[_0x4f1d31(0x181)](_0x1280f);return _0x2dc18b[_0x545b5a]['@lovrabet/sdk']='latest',writeFileSync(_0x5db9c3,JSON[_0x4f1d31(0x141)](_0x2dc18b,null,0x2)+'\x0a',_0x4f1d31(0x150)),{'step':0x7,'label':_0x4f1d31(0x123),'ok':!![],'detail':_0x545b5a+_0x4f1d31(0x15e)+_0x58ce74+_0x4f1d31(0x18e)};}catch(_0x5a699d){return{'step':0x7,'label':_0x4f1d31(0x123),'ok':![],'detail':_0x5a699d['message']};}}function tryStat(_0x32616c){try{return statSync(_0x32616c);}catch{return undefined;}}function a136_0x313b(_0x3441b6,_0x51e480){_0x3441b6=_0x3441b6-0x11c;const _0xbde80c=a136_0xbde8();let _0x313b5c=_0xbde80c[_0x3441b6];return _0x313b5c;}function printSummary(_0x567217){const _0x475fda=a136_0x36a9b3;console[_0x475fda(0x131)](''),console['log'](a136_0x38dbad[_0x475fda(0x16d)](_0x475fda(0x172))),console['log']('');for(const _0x5bfdd7 of _0x567217){const _0x22038f=_0x5bfdd7['ok']?a136_0x38dbad['green']('OK'):a136_0x38dbad[_0x475fda(0x13b)]('FAIL');console['log']('\x20\x20'+_0x22038f+_0x475fda(0x152)+_0x5bfdd7[_0x475fda(0x12c)]+':\x20'+_0x5bfdd7[_0x475fda(0x136)]);if(_0x5bfdd7[_0x475fda(0x178)])console[_0x475fda(0x131)](_0x475fda(0x138)+a136_0x38dbad[_0x475fda(0x14e)](_0x5bfdd7[_0x475fda(0x178)]));}console[_0x475fda(0x131)]('');}export async function upgradeApp(_0x3514c8,_0x50a05c){const _0x1c9b16=a136_0x36a9b3,_0x3ad044=process[_0x1c9b16(0x147)](),_0xdc4984=analyse(_0x3ad044),_0x2f93ab=!_0xdc4984[_0x1c9b16(0x18b)]&&_0xdc4984[_0x1c9b16(0x180)][_0x1c9b16(0x162)]===0x0&&!_0xdc4984[_0x1c9b16(0x190)]&&!_0xdc4984[_0x1c9b16(0x145)]&&!_0xdc4984[_0x1c9b16(0x184)];if(_0x2f93ab){console[_0x1c9b16(0x131)](a136_0x38dbad['green'](_0x1c9b16(0x15d)));return;}printReport(_0xdc4984);const _0x43ea3e=!!(_0x50a05c['yes']||_0x50a05c['Y']||_0x3514c8);if(!_0x43ea3e)try{const _0x20458c=await askConfirm(_0x1c9b16(0x12b));if(!_0x20458c){console[_0x1c9b16(0x131)](a136_0x38dbad[_0x1c9b16(0x14e)](_0x1c9b16(0x143)));return;}}catch(_0x223632){if(_0x223632?.['message']===_0x1c9b16(0x199)){console[_0x1c9b16(0x131)](a136_0x38dbad['gray'](_0x1c9b16(0x143)));return;}throw _0x223632;}const _0x4addcc=[],_0x3aea6f=a136_0x3ca242({'text':_0x1c9b16(0x189),'color':_0x1c9b16(0x19b)})[_0x1c9b16(0x133)](),_0x4f6f8a=execConfigMigration(_0xdc4984,_0x3ad044);_0x4addcc[_0x1c9b16(0x14d)](_0x4f6f8a),_0x3aea6f[_0x4f6f8a['ok']?'succeed':'fail'](_0x1c9b16(0x193)+(_0x4f6f8a[_0x1c9b16(0x178)]??(_0x4f6f8a['ok']?'done':_0x1c9b16(0x161))));const _0x3d734c=resolve(_0x3ad044,_0x1c9b16(0x169)),_0x2b9b50=a136_0x3ca242({'text':_0x1c9b16(0x13d),'color':_0x1c9b16(0x19b)})[_0x1c9b16(0x133)]();if(existsSync(_0x3d734c))try{rmSync(_0x3d734c,{'recursive':!![],'force':!![]}),_0x2b9b50[_0x1c9b16(0x135)](_0x1c9b16(0x154)),_0x4addcc[_0x1c9b16(0x14d)]({'step':0x2,'label':_0x1c9b16(0x170),'ok':!![]});}catch(_0xceace7){_0x2b9b50['fail'](_0x1c9b16(0x121)+_0xceace7['message']),_0x4addcc[_0x1c9b16(0x14d)]({'step':0x2,'label':_0x1c9b16(0x170),'ok':![],'detail':_0xceace7['message']});}else _0x2b9b50['info']('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x4addcc['push']({'step':0x2,'label':_0x1c9b16(0x170),'ok':!![],'detail':'skipped'});const _0x2f530b=a136_0x3ca242({'text':_0x1c9b16(0x13f),'color':_0x1c9b16(0x19b)})[_0x1c9b16(0x133)](),_0x3a0c31=execRemoveOldArtifacts(_0xdc4984[_0x1c9b16(0x180)]);_0x4addcc[_0x1c9b16(0x14d)](_0x3a0c31),_0x2f530b[_0x3a0c31['ok']?_0x1c9b16(0x135):'fail']('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x3a0c31[_0x1c9b16(0x178)]??(_0x3a0c31['ok']?'done':_0x1c9b16(0x161))));const _0x500c30=a136_0x3ca242({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':_0x1c9b16(0x19b)})[_0x1c9b16(0x133)](),_0x47187b=execCleanMcp(_0xdc4984);_0x4addcc['push'](_0x47187b),_0x500c30[_0x47187b['ok']?_0x1c9b16(0x135):_0x1c9b16(0x130)](_0x1c9b16(0x16e)+(_0x47187b[_0x1c9b16(0x178)]??(_0x47187b['ok']?_0x1c9b16(0x126):_0x1c9b16(0x161))));const _0x2e7fdc=a136_0x3ca242({'text':_0x1c9b16(0x198),'color':_0x1c9b16(0x19b)})[_0x1c9b16(0x133)](),_0x1e93da=execSkillsRemove(_0x3ad044,_0x43ea3e);_0x4addcc[_0x1c9b16(0x14d)](_0x1e93da),_0x2e7fdc[_0x1e93da['ok']?'succeed':_0x1c9b16(0x130)](_0x1c9b16(0x182)+(_0x1e93da[_0x1c9b16(0x178)]??(_0x1e93da['ok']?_0x1c9b16(0x126):'failed')));const _0x40aceb=a136_0x3ca242({'text':_0x1c9b16(0x179),'color':_0x1c9b16(0x19b)})['start'](),_0x3906da=execSkillsAdd(_0x3ad044,_0x43ea3e);_0x4addcc[_0x1c9b16(0x14d)](_0x3906da),_0x40aceb[_0x3906da['ok']?_0x1c9b16(0x135):_0x1c9b16(0x130)](_0x1c9b16(0x151)+(_0x3906da[_0x1c9b16(0x178)]??(_0x3906da['ok']?_0x1c9b16(0x126):'failed')));const _0x42f12b=a136_0x3ca242({'text':_0x1c9b16(0x128),'color':_0x1c9b16(0x19b)})['start'](),_0x2acbcf=execUpgradeSdk(_0xdc4984);_0x4addcc[_0x1c9b16(0x14d)](_0x2acbcf),_0x42f12b[_0x2acbcf['ok']?'succeed':_0x1c9b16(0x130)](_0x1c9b16(0x137)+(_0x2acbcf['detail']??(_0x2acbcf['ok']?_0x1c9b16(0x126):'failed'))),printSummary(_0x4addcc);const _0x240bcc=_0x4addcc['some'](_0x177f8b=>!_0x177f8b['ok']);_0x240bcc?console['log'](a136_0x38dbad[_0x1c9b16(0x13a)](_0x1c9b16(0x188))):console['log'](a136_0x38dbad[_0x1c9b16(0x176)](_0x1c9b16(0x12f))),_0x2acbcf['ok']&&_0xdc4984[_0x1c9b16(0x184)]&&(console[_0x1c9b16(0x131)](''),console['log'](a136_0x38dbad[_0x1c9b16(0x16d)][_0x1c9b16(0x19b)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console['log'](a136_0x38dbad[_0x1c9b16(0x19b)](_0x1c9b16(0x171))),console['log'](''),console[_0x1c9b16(0x131)](a136_0x38dbad[_0x1c9b16(0x142)](_0x1c9b16(0x14c))),console[_0x1c9b16(0x131)](a136_0x38dbad[_0x1c9b16(0x142)]('\x20\x20#\x20or')),console['log'](a136_0x38dbad[_0x1c9b16(0x142)](_0x1c9b16(0x16a))),console[_0x1c9b16(0x131)](''));}
|
|
1
|
+
const a136_0x1eca33=a136_0x2a8a;(function(_0xb49438,_0x3a8f7c){const _0x5382bf=a136_0x2a8a,_0x5bd076=_0xb49438();while(!![]){try{const _0x166375=-parseInt(_0x5382bf(0x183))/0x1*(parseInt(_0x5382bf(0x11e))/0x2)+-parseInt(_0x5382bf(0x154))/0x3+parseInt(_0x5382bf(0x155))/0x4*(parseInt(_0x5382bf(0x19d))/0x5)+parseInt(_0x5382bf(0x170))/0x6*(-parseInt(_0x5382bf(0x176))/0x7)+parseInt(_0x5382bf(0x17f))/0x8*(-parseInt(_0x5382bf(0x149))/0x9)+parseInt(_0x5382bf(0x166))/0xa*(parseInt(_0x5382bf(0x125))/0xb)+parseInt(_0x5382bf(0x138))/0xc*(parseInt(_0x5382bf(0x195))/0xd);if(_0x166375===_0x3a8f7c)break;else _0x5bd076['push'](_0x5bd076['shift']());}catch(_0x43d988){_0x5bd076['push'](_0x5bd076['shift']());}}}(a136_0x15ed,0x37ed1));import a136_0xf079f0 from'chalk';import a136_0x2c2eb8 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a136_0x1eca33(0x18f)](_0x1934bc=>_0x1934bc!==NEW_CONFIG_NAME);function a136_0x15ed(){const _0x11cd8e=['info','fail','\x20→\x20','isArray','.cursor/rules/lovrabet_rules.mdc','some','Remove\x20old\x20skill','exit\x20','\x20→\x20latest','oldArtifacts','white','189110FhMsdo','.lovrabet','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','includes','entries','Step\x204/7:\x20MCP\x20config\x20—\x20','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','failed','red','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','174XRbEow','sdkUpgrade','cyan','package.json','fields','join','22715nwxOtv','FAIL','not\x20found\x20(will\x20create)','bold','log','files','object','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','MCP\x20config:','2985624ESpRZz','.claude/skills/lovrabet','mcpServers','push','1eciRFS','inherit','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','@lovrabet/dataset-mcp-server','lovrabet/rabetbase','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','oldMcpConfig','oldPath','none\x20found','hasNewConfig','configMigration','===\x20Upgrade\x20Summary\x20===','filter','yellow','yes','not\x20found\x20or\x20already\x20at\x20latest','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','\x20\x20Action:\x20delete','5134766EAYnZP','@lovrabet/sdk:','keys','Step\x201/7:\x20Migrating\x20config...','Upgrade\x20@lovrabet/sdk','cwd','skipped\x20(no\x20legacy\x20config)','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','90290bmxPjs','lovrabet/rabetbase\x20installed\x20globally','Install\x20new\x20skill','Skill\x20swap:','string','Legacy\x20artifacts:','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','isDirectory','\x20removed','Config\x20file:','344870gryjKk','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','Clean\x20MCP\x20config','Config\x20migration','stringify','\x20→\x20keys:\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','209uEZvDH','needed','detail','error','\x20\x20bun\x20install','already\x20exists\x20(will\x20merge)','gray','succeed','green','path','done','length','FOUND','\x20removed\x20(','needsSkillSwap','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','message','\x20\x20#\x20or','skipped','12GhTAHP','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','\x20\x20Step\x20','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','.bak','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','values','removed\x20','\x20\x20Current\x20version\x20in\x20','Upgrade\x20cancelled.','parse','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','latest','[\x22@lovrabet/sdk\x22]:\x20','start','9tdzlvO','devDependencies','undefined','Upgrade\x20completed\x20successfully!','===\x20Upgrade\x20Analysis\x20===','\x20(backup:\x20','\x20\x20New\x20config\x20(.rabetbase.json):\x20','utf8','Step\x206/7:\x20Installing\x20new\x20skill...','step','args','414861UKjjZH','56VbYGhz','not\x20needed','Remove\x20.lovrabet/','no\x20legacy\x20entry','label','@lovrabet/sdk'];a136_0x15ed=function(){return _0x11cd8e;};return a136_0x15ed();}function collectIdeSkillFiles(_0x2e1c60){const _0xaabf13=a136_0x1eca33,_0x4b155d=[];for(const _0x32e475 of Object[_0xaabf13(0x13f)](CORE_IDE_CONFIGS)){if(_0x32e475[_0xaabf13(0x17b)])for(const _0x184c6d of _0x32e475[_0xaabf13(0x17b)]){_0x4b155d['push'](resolve(_0x2e1c60,_0x184c6d[_0xaabf13(0x12e)]));}}return _0x4b155d;}function analyse(_0x29ae53){const _0x4fc2f3=a136_0x1eca33;let _0x421e83=null;const _0xb9148a=resolve(_0x29ae53,NEW_CONFIG_NAME),_0x9e4bb5=existsSync(_0xb9148a);for(const _0x3c3812 of LEGACY_CONFIG_NAMES){const _0x49dbdf=resolve(_0x29ae53,_0x3c3812);if(existsSync(_0x49dbdf)){const _0x3f098f=readConfigFile(_0x49dbdf),_0x28f761=Object[_0x4fc2f3(0x197)](_0x3f098f)[_0x4fc2f3(0x18f)](_0x9396e3=>typeof _0x3f098f[_0x9396e3]!==_0x4fc2f3(0x14b));_0x421e83={'oldPath':_0x49dbdf,'hasNewConfig':_0x9e4bb5,'fields':_0x28f761};break;}}const _0x19f875=[],_0x276b6b=resolve(_0x29ae53,'.lovrabet');if(existsSync(_0x276b6b))_0x19f875['push'](_0x276b6b);const _0x67f9a4=resolve(_0x29ae53,_0x4fc2f3(0x15f));if(existsSync(_0x67f9a4))_0x19f875[_0x4fc2f3(0x182)](_0x67f9a4);const _0x5013eb=resolve(_0x29ae53,_0x4fc2f3(0x180));if(existsSync(_0x5013eb))_0x19f875['push'](_0x5013eb);for(const _0x57be05 of collectIdeSkillFiles(_0x29ae53)){if(existsSync(_0x57be05))_0x19f875['push'](_0x57be05);}let _0x35bbc3=null;const _0x42dfa1=resolve(_0x29ae53,'.cursor/mcp.json');if(existsSync(_0x42dfa1))try{const _0x4afbf8=JSON[_0x4fc2f3(0x143)](readFileSync(_0x42dfa1,_0x4fc2f3(0x150)));if(_0x4afbf8?.[_0x4fc2f3(0x181)]&&typeof _0x4afbf8[_0x4fc2f3(0x181)]===_0x4fc2f3(0x17c)){const _0x3dfee3=[];for(const [_0x391e95,_0x38e6d2]of Object[_0x4fc2f3(0x16a)](_0x4afbf8[_0x4fc2f3(0x181)])){const _0x5c1730=_0x38e6d2;_0x5c1730?.[_0x4fc2f3(0x153)]&&Array['isArray'](_0x5c1730['args'])&&_0x5c1730[_0x4fc2f3(0x153)][_0x4fc2f3(0x160)](_0x3a307b=>typeof _0x3a307b==='string'&&_0x3a307b[_0x4fc2f3(0x169)](_0x4fc2f3(0x186)))&&_0x3dfee3[_0x4fc2f3(0x182)](_0x391e95);}_0x3dfee3[_0x4fc2f3(0x130)]>0x0&&(_0x35bbc3={'path':_0x42dfa1,'keys':_0x3dfee3});}}catch{}const _0x262c8c=_0x19f875[_0x4fc2f3(0x130)]>0x0||_0x421e83!==null;let _0x196b68=null;const _0x4e452c=resolve(_0x29ae53,_0x4fc2f3(0x173));if(existsSync(_0x4e452c))try{const _0x291b3c=JSON['parse'](readFileSync(_0x4e452c,_0x4fc2f3(0x150)));for(const _0x45e804 of['dependencies',_0x4fc2f3(0x14a)]){const _0x91685=_0x291b3c?.[_0x45e804]?.[_0x4fc2f3(0x15a)];if(typeof _0x91685===_0x4fc2f3(0x1a1)){_0x91685!==_0x4fc2f3(0x146)&&(_0x196b68={'pkgPath':_0x4e452c,'currentVersion':_0x91685,'field':_0x45e804});break;}}}catch{}return{'configMigration':_0x421e83,'oldArtifacts':_0x19f875,'oldMcpConfig':_0x35bbc3,'needsSkillSwap':_0x262c8c,'sdkUpgrade':_0x196b68};}function a136_0x2a8a(_0x1dc0a1,_0x2db43a){_0x1dc0a1=_0x1dc0a1-0x119;const _0x15ed59=a136_0x15ed();let _0x2a8a70=_0x15ed59[_0x1dc0a1];return _0x2a8a70;}function printReport(_0x3b644b){const _0x4f0f3=a136_0x1eca33,{configMigration:_0x44ac84,oldArtifacts:_0x194681,oldMcpConfig:_0x3fd9f8,needsSkillSwap:_0x56c9d5}=_0x3b644b;console[_0x4f0f3(0x17a)](''),console[_0x4f0f3(0x17a)](a136_0xf079f0['bold'](_0x4f0f3(0x14d))),console[_0x4f0f3(0x17a)]('');_0x44ac84?(console['log'](a136_0xf079f0[_0x4f0f3(0x172)](_0x4f0f3(0x11d))+('\x20\x20'+a136_0xf079f0[_0x4f0f3(0x190)](_0x44ac84['oldPath']))),console[_0x4f0f3(0x17a)](_0x4f0f3(0x14f)+(_0x44ac84[_0x4f0f3(0x18c)]?a136_0xf079f0[_0x4f0f3(0x12d)](_0x4f0f3(0x12a)):a136_0xf079f0[_0x4f0f3(0x12b)](_0x4f0f3(0x178)))),console['log']('\x20\x20Fields\x20to\x20migrate:\x20'+_0x44ac84[_0x4f0f3(0x174)][_0x4f0f3(0x175)](',\x20')),console[_0x4f0f3(0x17a)](_0x4f0f3(0x145))):console[_0x4f0f3(0x17a)](a136_0xf079f0[_0x4f0f3(0x172)](_0x4f0f3(0x11d))+'\x20\x20'+a136_0xf079f0[_0x4f0f3(0x12b)]('no\x20legacy\x20config\x20found'));console['log']('');if(_0x194681[_0x4f0f3(0x130)]>0x0){console[_0x4f0f3(0x17a)](a136_0xf079f0[_0x4f0f3(0x172)]('Legacy\x20artifacts:'));for(const _0x5ea8d7 of _0x194681){console[_0x4f0f3(0x17a)]('\x20\x20'+a136_0xf079f0[_0x4f0f3(0x16e)](_0x4f0f3(0x131))+'\x20\x20'+_0x5ea8d7);}console['log'](_0x4f0f3(0x194));}else console[_0x4f0f3(0x17a)](a136_0xf079f0[_0x4f0f3(0x172)](_0x4f0f3(0x119))+'\x20\x20'+a136_0xf079f0[_0x4f0f3(0x12b)](_0x4f0f3(0x18b)));console[_0x4f0f3(0x17a)]('');_0x3fd9f8?(console[_0x4f0f3(0x17a)](a136_0xf079f0[_0x4f0f3(0x172)](_0x4f0f3(0x17e))+('\x20\x20'+a136_0xf079f0[_0x4f0f3(0x190)](_0x3fd9f8[_0x4f0f3(0x12e)])+_0x4f0f3(0x123)+_0x3fd9f8[_0x4f0f3(0x197)][_0x4f0f3(0x175)](',\x20'))),console['log'](_0x4f0f3(0x19c))):console[_0x4f0f3(0x17a)](a136_0xf079f0[_0x4f0f3(0x172)](_0x4f0f3(0x17e))+'\x20\x20'+a136_0xf079f0[_0x4f0f3(0x12b)](_0x4f0f3(0x158)));console[_0x4f0f3(0x17a)](''),console[_0x4f0f3(0x17a)](a136_0xf079f0['cyan'](_0x4f0f3(0x1a0))+('\x20\x20'+(_0x56c9d5?a136_0xf079f0['yellow'](_0x4f0f3(0x126)):a136_0xf079f0['green'](_0x4f0f3(0x156)))));_0x56c9d5&&console[_0x4f0f3(0x17a)](_0x4f0f3(0x144)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x4f0f3(0x17a)]('');if(_0x3b644b[_0x4f0f3(0x171)]){const {currentVersion:_0x561084,field:_0x4971b0,pkgPath:_0x248492}=_0x3b644b['sdkUpgrade'];console['log'](a136_0xf079f0[_0x4f0f3(0x172)](_0x4f0f3(0x196))+('\x20\x20'+a136_0xf079f0[_0x4f0f3(0x190)](_0x248492))),console[_0x4f0f3(0x17a)](_0x4f0f3(0x141)+_0x4971b0+':\x20'+a136_0xf079f0[_0x4f0f3(0x190)](_0x561084)+'\x20→\x20'+a136_0xf079f0['green'](_0x4f0f3(0x146))),console[_0x4f0f3(0x17a)](_0x4f0f3(0x188));}else console['log'](a136_0xf079f0['cyan']('@lovrabet/sdk:')+'\x20\x20'+a136_0xf079f0[_0x4f0f3(0x12b)](_0x4f0f3(0x192)));console[_0x4f0f3(0x17a)]('');}function execConfigMigration(_0x170fbc,_0x315737){const _0x439995=a136_0x1eca33,{configMigration:_0x3d0d28}=_0x170fbc;if(!_0x3d0d28?.[_0x439995(0x18a)])return{'step':0x1,'label':_0x439995(0x121),'ok':!![],'detail':_0x439995(0x19b)};const _0x3f000a=readConfigFile(_0x3d0d28[_0x439995(0x18a)]),_0x591c6f=resolve(_0x315737,NEW_CONFIG_NAME),_0x23e508=_0x3d0d28[_0x439995(0x18c)]?readConfigFile(_0x591c6f):{};for(const [_0x1e9414,_0x367b55]of Object[_0x439995(0x16a)](_0x3f000a)){!(_0x1e9414 in _0x23e508)&&(_0x23e508[_0x1e9414]=_0x367b55);}writeConfigFile(_0x591c6f,_0x23e508);const _0x407da1=_0x3d0d28['oldPath']+_0x439995(0x13d);return renameSync(_0x3d0d28[_0x439995(0x18a)],_0x407da1),{'step':0x1,'label':_0x439995(0x121),'ok':!![],'detail':_0x3d0d28[_0x439995(0x18a)]+_0x439995(0x15d)+_0x591c6f+_0x439995(0x14e)+_0x407da1+')'};}function execRemoveOldArtifacts(_0x3e6517){const _0x2d764f=a136_0x1eca33,_0x560c41=[];for(const _0x1154ee of _0x3e6517){try{if(!existsSync(_0x1154ee))continue;const _0x3b6139=tryStat(_0x1154ee);_0x3b6139?.[_0x2d764f(0x11b)]()?rmSync(_0x1154ee,{'recursive':!![],'force':!![]}):unlinkSync(_0x1154ee);}catch(_0x190f60){_0x560c41[_0x2d764f(0x182)](_0x1154ee+':\x20'+_0x190f60[_0x2d764f(0x135)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x560c41[_0x2d764f(0x130)]===0x0,'detail':_0x560c41[_0x2d764f(0x130)]>0x0?_0x3e6517[_0x2d764f(0x130)]-_0x560c41[_0x2d764f(0x130)]+'/'+_0x3e6517[_0x2d764f(0x130)]+_0x2d764f(0x132)+_0x560c41[_0x2d764f(0x175)](';\x20')+')':_0x3e6517['length']+_0x2d764f(0x11c)};}function execCleanMcp(_0x478703){const _0x2aa3ac=a136_0x1eca33;if(!_0x478703[_0x2aa3ac(0x189)])return{'step':0x4,'label':_0x2aa3ac(0x120),'ok':!![],'detail':_0x2aa3ac(0x137)};try{const _0x58a9ad=readFileSync(_0x478703[_0x2aa3ac(0x189)]['path'],'utf8'),_0x4acf17=JSON[_0x2aa3ac(0x143)](_0x58a9ad);if(_0x4acf17?.['mcpServers']&&typeof _0x4acf17[_0x2aa3ac(0x181)]==='object'){const _0x206d5c=[];for(const [_0x16e847,_0x3e5076]of Object[_0x2aa3ac(0x16a)](_0x4acf17[_0x2aa3ac(0x181)])){_0x3e5076?.['args']&&Array[_0x2aa3ac(0x15e)](_0x3e5076[_0x2aa3ac(0x153)])&&_0x3e5076[_0x2aa3ac(0x153)][_0x2aa3ac(0x160)](_0x48cf0d=>typeof _0x48cf0d===_0x2aa3ac(0x1a1)&&_0x48cf0d[_0x2aa3ac(0x169)](_0x2aa3ac(0x186)))&&_0x206d5c[_0x2aa3ac(0x182)](_0x16e847);}for(const _0x90847a of _0x206d5c){delete _0x4acf17[_0x2aa3ac(0x181)][_0x90847a];}return _0x206d5c[_0x2aa3ac(0x130)]>0x0&&writeFileSync(_0x478703[_0x2aa3ac(0x189)]['path'],JSON[_0x2aa3ac(0x122)](_0x4acf17,null,0x2)+'\x0a',_0x2aa3ac(0x150)),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x2aa3ac(0x140)+_0x206d5c[_0x2aa3ac(0x175)](',\x20')+'\x20from\x20'+_0x478703['oldMcpConfig']['path']};}return{'step':0x4,'label':_0x2aa3ac(0x120),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x4f133b){return{'step':0x4,'label':_0x2aa3ac(0x120),'ok':![],'detail':_0x4f133b['message']};}}function execSkillsRemove(_0x415639,_0x24c210){const _0x266826=a136_0x1eca33,_0x2268db=runNpxSkillsRemove(_0x415639,{'stdio':_0x266826(0x184),'yes':_0x24c210});return{'step':0x5,'label':_0x266826(0x161),'ok':_0x2268db['ok'],'detail':_0x2268db['ok']?'lovrabet/lovrabet-skill\x20removed':_0x2268db[_0x266826(0x128)]??_0x266826(0x162)+_0x2268db['status']};}function execSkillsAdd(_0x46d99c,_0xa1a9aa){const _0x50ee03=a136_0x1eca33,_0x373d2b=runNpxSkillsAddGlobal(_0x46d99c,_0x50ee03(0x187),{'stdio':'inherit','yes':_0xa1a9aa});return{'step':0x6,'label':_0x50ee03(0x19f),'ok':_0x373d2b['ok'],'detail':_0x373d2b['ok']?_0x50ee03(0x19e):_0x373d2b['error']??_0x50ee03(0x162)+_0x373d2b['status']};}function execUpgradeSdk(_0x3d0a95){const _0x1092a3=a136_0x1eca33;if(!_0x3d0a95['sdkUpgrade'])return{'step':0x7,'label':_0x1092a3(0x199),'ok':!![],'detail':_0x1092a3(0x11f)};const {pkgPath:_0x593778,currentVersion:_0x13c3f6,field:_0x5e055e}=_0x3d0a95[_0x1092a3(0x171)];try{const _0x96477=readFileSync(_0x593778,'utf8'),_0x5b3ea8=JSON[_0x1092a3(0x143)](_0x96477);return _0x5b3ea8[_0x5e055e][_0x1092a3(0x15a)]=_0x1092a3(0x146),writeFileSync(_0x593778,JSON[_0x1092a3(0x122)](_0x5b3ea8,null,0x2)+'\x0a',_0x1092a3(0x150)),{'step':0x7,'label':_0x1092a3(0x199),'ok':!![],'detail':_0x5e055e+_0x1092a3(0x147)+_0x13c3f6+_0x1092a3(0x163)};}catch(_0x116ee3){return{'step':0x7,'label':_0x1092a3(0x199),'ok':![],'detail':_0x116ee3[_0x1092a3(0x135)]};}}function tryStat(_0x495cfd){try{return statSync(_0x495cfd);}catch{return undefined;}}function printSummary(_0xbe3925){const _0x3ea50a=a136_0x1eca33;console[_0x3ea50a(0x17a)](''),console['log'](a136_0xf079f0[_0x3ea50a(0x179)](_0x3ea50a(0x18e))),console['log']('');for(const _0x551047 of _0xbe3925){const _0x32e9b6=_0x551047['ok']?a136_0xf079f0[_0x3ea50a(0x12d)]('OK'):a136_0xf079f0[_0x3ea50a(0x16e)](_0x3ea50a(0x177));console[_0x3ea50a(0x17a)]('\x20\x20'+_0x32e9b6+_0x3ea50a(0x13a)+_0x551047[_0x3ea50a(0x152)]+':\x20'+_0x551047[_0x3ea50a(0x159)]);if(_0x551047[_0x3ea50a(0x127)])console[_0x3ea50a(0x17a)]('\x20\x20\x20\x20\x20\x20\x20'+a136_0xf079f0[_0x3ea50a(0x12b)](_0x551047[_0x3ea50a(0x127)]));}console[_0x3ea50a(0x17a)]('');}export async function upgradeApp(_0x362b16,_0xbaa820){const _0x25068e=a136_0x1eca33,_0x3cad5b=process[_0x25068e(0x19a)](),_0x47add5=analyse(_0x3cad5b),_0x37f3c9=!_0x47add5[_0x25068e(0x18d)]&&_0x47add5['oldArtifacts']['length']===0x0&&!_0x47add5[_0x25068e(0x189)]&&!_0x47add5[_0x25068e(0x133)]&&!_0x47add5[_0x25068e(0x171)];if(_0x37f3c9){console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x12d)](_0x25068e(0x13b)));return;}printReport(_0x47add5);const _0x3ddcee=!!(_0xbaa820[_0x25068e(0x191)]||_0xbaa820['Y']||_0x362b16);if(!_0x3ddcee)try{const _0x511c83=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x511c83){console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x12b)](_0x25068e(0x142)));return;}}catch(_0x2e5b00){if(_0x2e5b00?.[_0x25068e(0x135)]==='CANCEL'){console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x12b)](_0x25068e(0x142)));return;}throw _0x2e5b00;}const _0xe78a0c=[],_0x474340=a136_0x2c2eb8({'text':_0x25068e(0x198),'color':_0x25068e(0x172)})['start'](),_0x4bc40a=execConfigMigration(_0x47add5,_0x3cad5b);_0xe78a0c[_0x25068e(0x182)](_0x4bc40a),_0x474340[_0x4bc40a['ok']?_0x25068e(0x12c):_0x25068e(0x15c)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x4bc40a[_0x25068e(0x127)]??(_0x4bc40a['ok']?_0x25068e(0x12f):_0x25068e(0x16d))));const _0x147696=resolve(_0x3cad5b,_0x25068e(0x167)),_0x492134=a136_0x2c2eb8({'text':_0x25068e(0x11a),'color':'cyan'})[_0x25068e(0x148)]();if(existsSync(_0x147696))try{rmSync(_0x147696,{'recursive':!![],'force':!![]}),_0x492134[_0x25068e(0x12c)](_0x25068e(0x185)),_0xe78a0c[_0x25068e(0x182)]({'step':0x2,'label':_0x25068e(0x157),'ok':!![]});}catch(_0x182413){_0x492134[_0x25068e(0x15c)](_0x25068e(0x134)+_0x182413[_0x25068e(0x135)]),_0xe78a0c[_0x25068e(0x182)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x182413[_0x25068e(0x135)]});}else _0x492134[_0x25068e(0x15b)](_0x25068e(0x16f)),_0xe78a0c[_0x25068e(0x182)]({'step':0x2,'label':_0x25068e(0x157),'ok':!![],'detail':'skipped'});const _0xf44a59=a136_0x2c2eb8({'text':_0x25068e(0x193),'color':_0x25068e(0x172)})['start'](),_0x395ef0=execRemoveOldArtifacts(_0x47add5[_0x25068e(0x164)]);_0xe78a0c['push'](_0x395ef0),_0xf44a59[_0x395ef0['ok']?_0x25068e(0x12c):_0x25068e(0x15c)](_0x25068e(0x13c)+(_0x395ef0[_0x25068e(0x127)]??(_0x395ef0['ok']?_0x25068e(0x12f):_0x25068e(0x16d))));const _0x1aec14=a136_0x2c2eb8({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':'cyan'})[_0x25068e(0x148)](),_0x40d984=execCleanMcp(_0x47add5);_0xe78a0c['push'](_0x40d984),_0x1aec14[_0x40d984['ok']?_0x25068e(0x12c):_0x25068e(0x15c)](_0x25068e(0x16b)+(_0x40d984[_0x25068e(0x127)]??(_0x40d984['ok']?'done':_0x25068e(0x16d))));const _0x3d6c7a=a136_0x2c2eb8({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x25068e(0x172)})[_0x25068e(0x148)](),_0x3638ff=execSkillsRemove(_0x3cad5b,_0x3ddcee);_0xe78a0c[_0x25068e(0x182)](_0x3638ff),_0x3d6c7a[_0x3638ff['ok']?_0x25068e(0x12c):_0x25068e(0x15c)](_0x25068e(0x139)+(_0x3638ff['detail']??(_0x3638ff['ok']?_0x25068e(0x12f):_0x25068e(0x16d))));const _0x3fef18=a136_0x2c2eb8({'text':_0x25068e(0x151),'color':_0x25068e(0x172)})[_0x25068e(0x148)](),_0x1b6521=execSkillsAdd(_0x3cad5b,_0x3ddcee);_0xe78a0c['push'](_0x1b6521),_0x3fef18[_0x1b6521['ok']?_0x25068e(0x12c):_0x25068e(0x15c)](_0x25068e(0x124)+(_0x1b6521[_0x25068e(0x127)]??(_0x1b6521['ok']?_0x25068e(0x12f):'failed')));const _0x5f54e6=a136_0x2c2eb8({'text':_0x25068e(0x17d),'color':'cyan'})[_0x25068e(0x148)](),_0x330325=execUpgradeSdk(_0x47add5);_0xe78a0c['push'](_0x330325),_0x5f54e6[_0x330325['ok']?_0x25068e(0x12c):_0x25068e(0x15c)](_0x25068e(0x13e)+(_0x330325['detail']??(_0x330325['ok']?_0x25068e(0x12f):'failed'))),printSummary(_0xe78a0c);const _0x22b59d=_0xe78a0c[_0x25068e(0x160)](_0x302ca2=>!_0x302ca2['ok']);_0x22b59d?console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x190)](_0x25068e(0x16c))):console['log'](a136_0xf079f0[_0x25068e(0x12d)](_0x25068e(0x14c))),_0x330325['ok']&&_0x47add5[_0x25068e(0x171)]&&(console[_0x25068e(0x17a)](''),console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x179)][_0x25068e(0x172)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console['log'](a136_0xf079f0[_0x25068e(0x172)](_0x25068e(0x168))),console[_0x25068e(0x17a)](''),console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x165)]('\x20\x20npm\x20install')),console['log'](a136_0xf079f0[_0x25068e(0x165)](_0x25068e(0x136))),console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x165)](_0x25068e(0x129))),console[_0x25068e(0x17a)](''));}
|