@lovrabet/rabetbase-cli 2.0.2-beta.7 → 2.0.2-beta.9
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/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/doc.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/app.js +1 -1
- package/lib/commands/auth.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/new.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/build.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/flags.js +1 -1
- package/lib/commands/config.js +1 -1
- package/lib/commands/create.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/logout.js +1 -1
- package/lib/commands/logs.js +1 -1
- package/lib/commands/menu/index.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/preview.js +1 -1
- package/lib/commands/project-upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run.js +1 -1
- package/lib/commands/skill.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/save.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/start.js +1 -1
- package/lib/config/config-help.js +1 -1
- package/lib/config/main.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.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/sql-validator.js +1 -1
- package/lib/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/non-interactive.js +1 -1
- package/lib/create-app/task-finished.js +1 -1
- package/lib/create-app/task-loading.js +1 -1
- package/lib/create-app/task-running.js +1 -1
- package/lib/create-app/task-time.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/errors.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.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/init/main.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/utils/ai_config.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/config.js +1 -1
- package/lib/utils/copy-directory.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/logger.js +1 -1
- package/lib/utils/platform.js +1 -0
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/package.json +2 -2
- package/lib/ai-setup/config.js +0 -1
- package/lib/commands/mcp.js +0 -1
- package/lib/mcp/McpInstallUI.js +0 -1
- package/lib/mcp/claude.js +0 -1
- package/lib/mcp/cursor.js +0 -1
- package/lib/mcp/main.js +0 -1
- package/lib/mcp/mcp-install-non-interactive.js +0 -1
- package/lib/mcp/mcp-installer.js +0 -1
- package/lib/telemetry/otel-logger-version.js +0 -1
- package/lib/ui/IDESelector.js +0 -1
- package/lib/ui/useIDESelection.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a77_0x5e5d9d=a77_0x2cf6;(function(_0x5f448e,_0x203559){const _0x59dcd0=a77_0x2cf6,_0x597a85=_0x5f448e();while(!![]){try{const _0x3ac656=-parseInt(_0x59dcd0(0x8a))/0x1*(-parseInt(_0x59dcd0(0x98))/0x2)+parseInt(_0x59dcd0(0x89))/0x3*(-parseInt(_0x59dcd0(0x90))/0x4)+-parseInt(_0x59dcd0(0x9d))/0x5+parseInt(_0x59dcd0(0x81))/0x6*(-parseInt(_0x59dcd0(0x79))/0x7)+parseInt(_0x59dcd0(0x91))/0x8+-parseInt(_0x59dcd0(0x85))/0x9*(parseInt(_0x59dcd0(0x95))/0xa)+parseInt(_0x59dcd0(0x8e))/0xb*(parseInt(_0x59dcd0(0x83))/0xc);if(_0x3ac656===_0x203559)break;else _0x597a85['push'](_0x597a85['shift']());}catch(_0x3a5a9c){_0x597a85['push'](_0x597a85['shift']());}}}(a77_0x3d48,0x80f01));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'./utils.js';export const SUPPORTED_BFF_TYPES=[a77_0x5e5d9d(0x82),a77_0x5e5d9d(0x7b),a77_0x5e5d9d(0x96)];export function normalizeBffType(_0x2e53c2){const _0x2cf927=a77_0x5e5d9d;if(!_0x2e53c2)return undefined;const _0x2b2631=_0x2e53c2[_0x2cf927(0x94)]()[_0x2cf927(0x88)]();return SUPPORTED_BFF_TYPES['includes'](_0x2b2631)?_0x2b2631:undefined;}async function scanJsFilesRecursively(_0x2fea27,_0x4b562b){const _0x195033=a77_0x5e5d9d,_0x2764ef=[];try{const _0x264254=await readdir(_0x2fea27,{'withFileTypes':!![]});for(const _0x37fbd2 of _0x264254){const _0x2bf6d4=join(_0x2fea27,_0x37fbd2[_0x195033(0x9a)]);if(_0x37fbd2[_0x195033(0x80)]())_0x2764ef['push'](...await scanJsFilesRecursively(_0x2bf6d4,_0x4b562b+'/'+_0x37fbd2[_0x195033(0x9a)]));else _0x37fbd2['isFile']()&&_0x37fbd2[_0x195033(0x9a)][_0x195033(0x93)]('.js')&&_0x2764ef['push']({'lockKey':_0x4b562b+'/'+_0x37fbd2[_0x195033(0x9a)][_0x195033(0x7e)](/\.js$/,''),'filePath':_0x2bf6d4});}}catch(_0x5702f3){if(_0x5702f3[_0x195033(0x86)]!=='ENOENT')throw _0x5702f3;}return _0x2764ef;}async function scanFlatFunctions(_0x56ee2a,_0x3f5f33){const _0x48ec0c=a77_0x5e5d9d,_0x536f99=join(_0x56ee2a[_0x48ec0c(0x99)],_0x3f5f33),_0x6b217f=await scanJsFilesRecursively(_0x536f99,_0x3f5f33);return _0x6b217f['map'](({lockKey:_0x3ca51f,filePath:_0x25e919})=>({'type':_0x3f5f33,'name':_0x3ca51f[_0x48ec0c(0x84)]('/')['at'](-0x1)??'','filePath':_0x25e919,'lockKey':_0x3ca51f}));}async function scanHookFunctions(_0x3d0e8f){const _0x198266=a77_0x5e5d9d,_0x25a78b=join(_0x3d0e8f[_0x198266(0x99)],_0x198266(0x96)),_0x1871a0=[];try{const _0x5603c9=await readdir(_0x25a78b,{'withFileTypes':!![]});for(const _0x157832 of _0x5603c9){if(!_0x157832[_0x198266(0x80)]())continue;const _0x1ade8f=_0x157832[_0x198266(0x9a)],_0x4794ab=join(_0x25a78b,_0x1ade8f),_0x38bf40=await readdir(_0x4794ab,{'withFileTypes':!![]});for(const _0x401935 of _0x38bf40){if(!_0x401935[_0x198266(0x80)]())continue;const _0x5c040f=_0x401935['name'],_0x1db911=join(_0x4794ab,_0x5c040f),_0x5b0b37=await readdir(_0x1db911,{'withFileTypes':!![]});for(const _0x190a75 of _0x5b0b37){if(!_0x190a75[_0x198266(0x80)]())continue;const _0x581d60=_0x190a75[_0x198266(0x9a)],_0x559231=join(_0x1db911,_0x581d60),_0x18f0a2=await readdir(_0x559231,{'withFileTypes':!![]});for(const _0x56270d of _0x18f0a2){if(!_0x56270d[_0x198266(0x8c)]()||!_0x56270d['name']['endsWith']('.js'))continue;const _0x3b9a28=_0x56270d[_0x198266(0x9a)][_0x198266(0x7e)](/\.js$/,'');_0x1871a0[_0x198266(0x77)]({'type':_0x198266(0x96),'name':_0x3b9a28,'filePath':join(_0x559231,_0x56270d['name']),'lockKey':'HOOK/'+_0x1ade8f+'/'+_0x5c040f+'/'+_0x581d60+'/'+_0x3b9a28,'alias':_0x1ade8f,'operationType':_0x5c040f,'functionNode':_0x581d60});}}}}}catch(_0x138fc8){if(_0x138fc8[_0x198266(0x86)]!==_0x198266(0x7f))throw _0x138fc8;}return _0x1871a0;}function a77_0x2cf6(_0x3257de,_0x4f442c){_0x3257de=_0x3257de-0x77;const _0x3d48c5=a77_0x3d48();let _0x2cf65b=_0x3d48c5[_0x3257de];return _0x2cf65b;}export async function scanLocalBffFunctions(_0x520b98,_0x3b977b){const _0x5051de=a77_0x5e5d9d;if(_0x3b977b==='COMMON'||_0x3b977b===_0x5051de(0x7b))return scanFlatFunctions(_0x520b98,_0x3b977b);if(_0x3b977b===_0x5051de(0x96))return scanHookFunctions(_0x520b98);const [_0x2be4f5,_0x431e5f,_0x4f7271]=await Promise[_0x5051de(0x7d)]([scanFlatFunctions(_0x520b98,'COMMON'),scanFlatFunctions(_0x520b98,_0x5051de(0x7b)),scanHookFunctions(_0x520b98)]);return[..._0x2be4f5,..._0x431e5f,..._0x4f7271];}export function resolveLocalFilePathFromLockKey(_0x497494,_0x4841a2){const _0x228913=a77_0x5e5d9d;return join(_0x497494[_0x228913(0x99)],..._0x4841a2['split']('/'))+_0x228913(0x8d);}export function createHookLocationMap(_0x5cb1bf){const _0x9e65ac=a77_0x5e5d9d,_0x38a3ff=new Map();for(const _0x27b14e of _0x5cb1bf){_0x27b14e[_0x9e65ac(0x78)]&&_0x38a3ff[_0x9e65ac(0x7a)](_0x27b14e[_0x9e65ac(0x78)],{'datasetCode':_0x27b14e[_0x9e65ac(0x92)],'operationType':snakeToCamel(_0x27b14e['operationType']),'functionNode':_0x9e65ac(0x9c)}),_0x27b14e['afterScriptId']&&_0x38a3ff['set'](_0x27b14e[_0x9e65ac(0x7c)],{'datasetCode':_0x27b14e[_0x9e65ac(0x92)],'operationType':snakeToCamel(_0x27b14e[_0x9e65ac(0x97)]),'functionNode':'after'});}return _0x38a3ff;}export function resolveRemoteScriptTarget(_0x2655ca,_0x406c87,_0x59ca88,_0x273dc2,_0x1ee288){const _0x24acf2=a77_0x5e5d9d,_0xe3f3a4=normalizeBffType(_0x406c87['scriptType']);if(!_0xe3f3a4||!_0x406c87[_0x24acf2(0x8b)])return null;if(_0xe3f3a4===_0x24acf2(0x96)){const _0x3abf4a=(_0x406c87['id']?_0x59ca88['get'](_0x406c87['id']):undefined)??findHookLocationByRemoteId(_0x273dc2,_0x406c87['id']);if(!_0x3abf4a)return null;const _0x4e37ea=_0x3abf4a['alias']||_0x1ee288[_0x24acf2(0x87)](_0x3abf4a['datasetCode']),_0xa6a303=_0x4e37ea??_0x3abf4a[_0x24acf2(0x92)],_0x3e261f={..._0x3abf4a,'alias':_0x4e37ea},_0x1f507d='HOOK/'+_0xa6a303+'/'+_0x3e261f[_0x24acf2(0x97)]+'/'+_0x3e261f[_0x24acf2(0x8f)]+'/'+_0x406c87[_0x24acf2(0x8b)];return{'lockKey':_0x1f507d,'filePath':resolveLocalFilePathFromLockKey(_0x2655ca,_0x1f507d),'type':_0x24acf2(0x96),'hookLocation':_0x3e261f};}const _0x11349d=_0xe3f3a4+'/'+_0x406c87[_0x24acf2(0x8b)];return{'lockKey':_0x11349d,'filePath':resolveLocalFilePathFromLockKey(_0x2655ca,_0x11349d),'type':_0xe3f3a4};}function a77_0x3d48(){const _0xe82494=['.js','8239PILlQU','functionNode','4wWyxFb','4127560DfyRrt','datasetCode','endsWith','trim','3210yBHogy','HOOK','operationType','2NKUwIP','scriptsRootDir','name','F_OK','before','3528790LBeZIY','push','beforeScriptId','209839NZYEcR','set','ENDPOINT','afterScriptId','all','replace','ENOENT','isDirectory','138HOHLkv','COMMON','24312SzEKJJ','split','20133QRREzK','code','get','toUpperCase','585831gFWGfn','803293MDWJsn','functionName','isFile'];a77_0x3d48=function(){return _0xe82494;};return a77_0x3d48();}export async function ensureParentDirectory(_0x55e132){await mkdir(dirname(_0x55e132),{'recursive':!![]});}export async function fileExists(_0x12125a){const _0x1dd359=a77_0x5e5d9d;try{return await access(_0x12125a,constants[_0x1dd359(0x9b)]),!![];}catch{return![];}}export async function directoryExists(_0x2981de){const _0x31aaef=a77_0x5e5d9d;try{const _0x249f4b=await stat(_0x2981de);return _0x249f4b[_0x31aaef(0x80)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x504407,_0x254bca){const _0x39da81=a78_0x2992,_0x1365a7=_0x504407();while(!![]){try{const _0x1a0b0d=-parseInt(_0x39da81(0xc6))/0x1+-parseInt(_0x39da81(0xc7))/0x2+-parseInt(_0x39da81(0xcd))/0x3*(-parseInt(_0x39da81(0xc0))/0x4)+parseInt(_0x39da81(0xc9))/0x5*(-parseInt(_0x39da81(0xc4))/0x6)+-parseInt(_0x39da81(0xc8))/0x7+-parseInt(_0x39da81(0xbf))/0x8*(parseInt(_0x39da81(0xc5))/0x9)+parseInt(_0x39da81(0xcb))/0xa;if(_0x1a0b0d===_0x254bca)break;else _0x1365a7['push'](_0x1365a7['shift']());}catch(_0x100eb6){_0x1365a7['push'](_0x1365a7['shift']());}}}(a78_0x5a64,0x28235));import{readFile}from'node:fs/promises';import a78_0x4a5aa0 from'node:crypto';export function computeContentHash(_0x1a9e58){const _0x235821=a78_0x2992;return a78_0x4a5aa0[_0x235821(0xc3)]('md5')[_0x235821(0xca)](_0x1a9e58)[_0x235821(0xc1)](_0x235821(0xc2));}function a78_0x2992(_0x502c94,_0x47699f){_0x502c94=_0x502c94-0xbf;const _0x5a64e6=a78_0x5a64();let _0x2992a2=_0x5a64e6[_0x502c94];return _0x2992a2;}function a78_0x5a64(){const _0x376044=['336oCUVDx','207ompvOI','124013TCiZpF','294544pIpngy','1712361ZPmjcs','10920BPSFZP','update','9668730MCFLaO','utf8','260643OElqHg','87352LHlGqV','4nrdIao','digest','hex','createHash'];a78_0x5a64=function(){return _0x376044;};return a78_0x5a64();}export async function computeFileHash(_0x117e41){const _0x15f4e0=a78_0x2992,_0x31b50b=await readFile(_0x117e41,_0x15f4e0(0xcc));return computeContentHash(_0x31b50b);}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a79_0x33ec(){const _0x3cc896=['aliases','1013388NzhoNO','lastSync','5110553vblgvE','current\x20\x22','default','functions',':\x20scriptsRoot\x20mismatch\x20—\x20','3373532tQrkzs','stringify','utf8','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','1775865ITkbuU','parse','\x22\x20vs\x20lock\x20\x22','apps','code','559164jQWhZI','trim','appCode','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','278070RMYYla','meta','scriptsRoot','\x22.\x20','2224116plJmiF','object'];a79_0x33ec=function(){return _0x3cc896;};return a79_0x33ec();}(function(_0x521d2f,_0x43012f){const _0x171f3a=a79_0x4f40,_0x356c45=_0x521d2f();while(!![]){try{const _0x1934a8=parseInt(_0x171f3a(0xfc))/0x1+-parseInt(_0x171f3a(0xf8))/0x2+parseInt(_0x171f3a(0x103))/0x3+parseInt(_0x171f3a(0x10a))/0x4+parseInt(_0x171f3a(0x10e))/0x5+-parseInt(_0x171f3a(0x100))/0x6+-parseInt(_0x171f3a(0x105))/0x7;if(_0x1934a8===_0x43012f)break;else _0x356c45['push'](_0x356c45['shift']());}catch(_0x483dc0){_0x356c45['push'](_0x356c45['shift']());}}}(a79_0x33ec,0x69f9b));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(_0x2aaa59){return{'aliases':_0x2aaa59?{'default':_0x2aaa59}:{},'apps':{}};}function a79_0x4f40(_0x1eb654,_0x43c75b){_0x1eb654=_0x1eb654-0xf6;const _0x33eccb=a79_0x33ec();let _0x4f4009=_0x33eccb[_0x1eb654];return _0x4f4009;}function normalizeLockFile(_0x4aa9c0,_0x1ab39d,_0x78132c){const _0x36aff2=a79_0x4f40;if(_0x36aff2(0xf6)in _0x4aa9c0&&_0x4aa9c0[_0x36aff2(0xf6)]&&typeof _0x4aa9c0[_0x36aff2(0xf6)]===_0x36aff2(0x101))return(!_0x4aa9c0['aliases']||typeof _0x4aa9c0['aliases']!==_0x36aff2(0x101))&&(_0x4aa9c0['aliases']={}),!_0x4aa9c0['aliases'][_0x36aff2(0x107)]&&(_0x4aa9c0['aliases'][_0x36aff2(0x107)]=_0x1ab39d),_0x4aa9c0;const _0xf6f72f=_0x4aa9c0,_0x18714a=_0xf6f72f[_0x36aff2(0xfd)]?.[_0x36aff2(0xfa)]?.['trim']()||_0x1ab39d,_0x16b4a3=_0xf6f72f[_0x36aff2(0xfd)]?.[_0x36aff2(0xfe)]?.[_0x36aff2(0xf9)]()||_0x78132c;return{'aliases':{'default':_0x18714a},'apps':{[_0x18714a]:{'scriptsRoot':_0x16b4a3,'lastSync':_0xf6f72f[_0x36aff2(0x104)]||'','functions':_0xf6f72f[_0x36aff2(0x108)]||{}}}};}export function ensureLockScope(_0x4e3a1f,_0x473304,_0x25a272,_0x5152a8,_0x36f958,_0x3335c8){const _0x150e9c=a79_0x4f40,_0x33ad73=normalizeLockFile(_0x4e3a1f,_0x36f958,_0x3335c8);!_0x33ad73[_0x150e9c(0x102)][_0x150e9c(0x107)]&&(_0x33ad73[_0x150e9c(0x102)]['default']=_0x36f958);let _0x318490=_0x33ad73[_0x150e9c(0xf6)][_0x473304];if(!_0x318490)return _0x318490={'scriptsRoot':_0x25a272,'lastSync':'','functions':{}},_0x33ad73[_0x150e9c(0xf6)][_0x473304]=_0x318490,{'lockData':_0x33ad73,'appLock':_0x318490};if(!_0x318490[_0x150e9c(0xfe)])_0x318490[_0x150e9c(0xfe)]=_0x25a272;else{if(_0x318490['scriptsRoot']!==_0x25a272)throw new Error(_0x5152a8+_0x150e9c(0x109)+(_0x150e9c(0x106)+_0x25a272+_0x150e9c(0x110)+_0x318490[_0x150e9c(0xfe)]+_0x150e9c(0xff))+_0x150e9c(0x10d));}return!_0x318490[_0x150e9c(0x108)]&&(_0x318490[_0x150e9c(0x108)]={}),!_0x318490[_0x150e9c(0x104)]&&(_0x318490[_0x150e9c(0x104)]=''),{'lockData':_0x33ad73,'appLock':_0x318490};}export async function readBffLockFile(_0xdf9fd9){const _0x22d9cb=a79_0x4f40;try{const _0x509f91=await readFile(_0xdf9fd9,_0x22d9cb(0x10c));return JSON[_0x22d9cb(0x10f)](_0x509f91);}catch(_0x1e0570){if(_0x1e0570[_0x22d9cb(0xf7)]==='ENOENT')return null;throw new Error(_0x22d9cb(0xfb)+String(_0x1e0570));}}export async function writeBffLockFile(_0x563c67,_0x3e9613){const _0x20ecc5=a79_0x4f40;await mkdir(dirname(_0x563c67),{'recursive':!![]}),await writeFile(_0x563c67,JSON[_0x20ecc5(0x10b)](_0x3e9613,null,0x2),_0x20ecc5(0x10c));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x312beb,_0x56668e){const _0x3d6472=a81_0x24a9,_0x38e02f=_0x312beb();while(!![]){try{const _0x1df968=parseInt(_0x3d6472(0x1a6))/0x1+parseInt(_0x3d6472(0x1a5))/0x2+-parseInt(_0x3d6472(0x1a1))/0x3*(-parseInt(_0x3d6472(0x1a8))/0x4)+-parseInt(_0x3d6472(0x1ac))/0x5*(-parseInt(_0x3d6472(0x1a9))/0x6)+-parseInt(_0x3d6472(0x198))/0x7+-parseInt(_0x3d6472(0x1a3))/0x8*(parseInt(_0x3d6472(0x1a0))/0x9)+parseInt(_0x3d6472(0x19b))/0xa*(-parseInt(_0x3d6472(0x1a4))/0xb);if(_0x1df968===_0x56668e)break;else _0x38e02f['push'](_0x38e02f['shift']());}catch(_0x367cd6){_0x38e02f['push'](_0x38e02f['shift']());}}}(a81_0x13e6,0x9cc73));export function snakeToCamel(_0x340600){const _0x4ba7ef=a81_0x24a9;return _0x340600[_0x4ba7ef(0x199)]()[_0x4ba7ef(0x19a)](/_([a-z])/g,(_0x5b3c2f,_0x51ae38)=>_0x51ae38[_0x4ba7ef(0x1aa)]());}export function findHookLocationByRemoteId(_0x5658d7,_0x42a3e8){const _0x162f00=a81_0x24a9;if(!_0x42a3e8)return undefined;for(const _0x1aac67 of Object[_0x162f00(0x1ab)](_0x5658d7)){if(_0x1aac67[_0x162f00(0x1a7)]===_0x42a3e8&&_0x1aac67[_0x162f00(0x19f)]&&_0x1aac67['operationType']&&_0x1aac67['functionNode'])return{'datasetCode':_0x1aac67['datasetCode'],'operationType':_0x1aac67[_0x162f00(0x1ad)],'functionNode':_0x1aac67['functionNode']};}return undefined;}function a81_0x13e6(){const _0x3f691c=['2051340LSuVem','747018iPKmpm','remoteId','13088xtyzRe','84mHsfVs','toUpperCase','values','29515jKBGob','operationType','3199882NfwLES','toLowerCase','replace','10cwkkzy','before','match','trim','datasetCode','9eLRWej','1149dAlWfP','after','6680120wfyllx','12916222PFuknd'];a81_0x13e6=function(){return _0x3f691c;};return a81_0x13e6();}function a81_0x24a9(_0x18fa05,_0x4fc003){_0x18fa05=_0x18fa05-0x198;const _0x13e667=a81_0x13e6();let _0x24a9cd=_0x13e667[_0x18fa05];return _0x24a9cd;}export function extractScriptDescription(_0x367ee4){const _0x4d885f=a81_0x24a9,_0x2fb721=_0x367ee4[_0x4d885f(0x19d)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x2fb721?.[0x1]?.[_0x4d885f(0x19e)]()||undefined;}export function isValidBffFunctionName(_0x200c68){return/^[A-Za-z_$][A-Za-z0-9_$]*$/['test'](_0x200c68);}export function normalizeHookFunctionNode(_0x4b047c){const _0x35efb3=a81_0x24a9;if(!_0x4b047c)return undefined;const _0x2f99d1=_0x4b047c[_0x35efb3(0x19e)]()[_0x35efb3(0x199)]();if(_0x2f99d1===_0x35efb3(0x19c)||_0x2f99d1===_0x35efb3(0x1a2))return _0x2f99d1;return undefined;}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x468acc,_0x408df2){const _0x574a42=a82_0x431e,_0xd665fe=_0x468acc();while(!![]){try{const _0x345d39=-parseInt(_0x574a42(0x12f))/0x1+parseInt(_0x574a42(0x13f))/0x2*(parseInt(_0x574a42(0x140))/0x3)+parseInt(_0x574a42(0x133))/0x4+parseInt(_0x574a42(0x13b))/0x5*(-parseInt(_0x574a42(0x13e))/0x6)+-parseInt(_0x574a42(0x143))/0x7+parseInt(_0x574a42(0x12a))/0x8*(parseInt(_0x574a42(0x136))/0x9)+parseInt(_0x574a42(0x131))/0xa*(parseInt(_0x574a42(0x137))/0xb);if(_0x345d39===_0x408df2)break;else _0xd665fe['push'](_0xd665fe['shift']());}catch(_0xe25717){_0xd665fe['push'](_0xd665fe['shift']());}}}(a82_0x3081,0xa3432));import{listDatasets}from'./api-client.js';function a82_0x431e(_0xff2e0b,_0x152afd){_0xff2e0b=_0xff2e0b-0x126;const _0x308174=a82_0x3081();let _0x431e26=_0x308174[_0xff2e0b];return _0x431e26;}function a82_0x3081(){const _0x318cda=['5104284wtTaRL','dbName','set','2925ppFBeB','3347047YQQtFG','\x22.\x20Available:\x20','\x22\x20matches\x20multiple\x20databases:\x20','join','15vDdNrF','filter','length','1671906Iozokj','46078ndTmgD','84hSzXFQ','db-','dbtableConfig','8979635jsMLmf','.\x20Be\x20more\x20specific.','has','map','isNaN','31248MXtaxJ','dbId','toLowerCase','includes','get','1011687rjjWDS','No\x20linked\x20databases\x20found\x20for\x20this\x20app.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','20wYdABA','find'];a82_0x3081=function(){return _0x318cda;};return a82_0x3081();}const cache=new Map();export async function listDatabases(_0x3c05c9){const _0x489205=a82_0x431e;if(cache[_0x489205(0x127)](_0x3c05c9))return cache[_0x489205(0x12e)](_0x3c05c9);const _0x5d1b2c=await listDatasets(_0x3c05c9),_0x51e345=new Map();for(const _0x3c3481 of _0x5d1b2c){const _0x2fce81=_0x3c3481[_0x489205(0x142)];_0x2fce81?.[_0x489205(0x12b)]!=null&&_0x51e345[_0x489205(0x135)](_0x2fce81[_0x489205(0x12b)],_0x2fce81[_0x489205(0x134)]??_0x489205(0x141)+_0x2fce81[_0x489205(0x12b)]);}const _0x3d2aac=[..._0x51e345['entries']()][_0x489205(0x128)](([_0x12b123,_0x2de445])=>({'dbId':_0x12b123,'dbName':_0x2de445}));return cache[_0x489205(0x135)](_0x3c05c9,_0x3d2aac),_0x3d2aac;}export async function resolveDb(_0x284d7d,_0x5b0607){const _0x32aa37=a82_0x431e,_0x3be095=await listDatabases(_0x284d7d);if(_0x3be095[_0x32aa37(0x13d)]===0x0)return{'resolved':[],'error':_0x32aa37(0x130)};if(!_0x5b0607)return{'resolved':_0x3be095};const _0x40c9ef=Number(_0x5b0607);if(!Number[_0x32aa37(0x129)](_0x40c9ef)){const _0x18a332=_0x3be095['find'](_0x385031=>_0x385031[_0x32aa37(0x12b)]===_0x40c9ef);if(_0x18a332)return{'resolved':[_0x18a332]};}const _0x3f5834=_0x5b0607['toLowerCase'](),_0x9a19d6=_0x3be095[_0x32aa37(0x13c)](_0x5dd3a8=>_0x5dd3a8[_0x32aa37(0x134)][_0x32aa37(0x12c)]()[_0x32aa37(0x12d)](_0x3f5834));if(_0x9a19d6[_0x32aa37(0x13d)]>0x0)return{'resolved':_0x9a19d6};const _0x981e4a=_0x3be095[_0x32aa37(0x128)](_0x2afa5e=>_0x2afa5e['dbName']+'\x20('+_0x2afa5e['dbId']+')')[_0x32aa37(0x13a)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x5b0607+_0x32aa37(0x138)+_0x981e4a};}export async function resolveOneDb(_0x1646d6,_0x2d6124){const _0x2c23ca=a82_0x431e,{resolved:_0x2fc696,error:_0x482613}=await resolveDb(_0x1646d6,_0x2d6124);if(_0x482613)return{'db':null,'error':_0x482613};if(_0x2fc696[_0x2c23ca(0x13d)]===0x1)return{'db':_0x2fc696[0x0]};if(!_0x2d6124){const _0x3982cb=_0x2fc696[_0x2c23ca(0x128)](_0x316b35=>_0x316b35[_0x2c23ca(0x134)]+'\x20('+_0x316b35[_0x2c23ca(0x12b)]+')')[_0x2c23ca(0x13a)](',\x20');return{'db':null,'error':'Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20'+_0x3982cb};}const _0x4bb1bf=_0x2fc696[_0x2c23ca(0x128)](_0xccc241=>_0xccc241['dbName']+'\x20('+_0xccc241[_0x2c23ca(0x12b)]+')')[_0x2c23ca(0x13a)](',\x20');return{'db':null,'error':'\x22'+_0x2d6124+_0x2c23ca(0x139)+_0x4bb1bf+_0x2c23ca(0x126)};}export async function getDbName(_0xf6fbb8,_0x50ef7a){const _0x16c056=a82_0x431e,_0x50aae5=await listDatabases(_0xf6fbb8);return _0x50aae5[_0x16c056(0x132)](_0x241ffa=>_0x241ffa[_0x16c056(0x12b)]===_0x50ef7a)?.[_0x16c056(0x134)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a83_0x42d5(){const _0x1a00c3=['INSERT','includes','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','358zlyGtN','4162260SqYhWd','UPDATE','11472qAQsHe','match','matchAll','split','join','reason','test','UNKNOWN','replace','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','\x20with\x20parameters:\x20','from','2562uiCRNV','push','length','add','192IfmmgN','isDangerous','SELECT','unknown\x20table(s)','startsWith','60315uZjZjf','\x20query\x20targeting\x20','trim','504145EQBfku','DELETE','type','4677cXUECe','5597352xirKVn','DDL','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','WITH','25701410CiPFGf'];a83_0x42d5=function(){return _0x1a00c3;};return a83_0x42d5();}(function(_0x4edc35,_0xb739d6){const _0x200708=a83_0x44cc,_0x3128d6=_0x4edc35();while(!![]){try{const _0x15345b=parseInt(_0x200708(0x17c))/0x1+parseInt(_0x200708(0x188))/0x2*(parseInt(_0x200708(0x17f))/0x3)+parseInt(_0x200708(0x189))/0x4+-parseInt(_0x200708(0x179))/0x5*(-parseInt(_0x200708(0x174))/0x6)+parseInt(_0x200708(0x170))/0x7*(parseInt(_0x200708(0x18b))/0x8)+parseInt(_0x200708(0x180))/0x9+-parseInt(_0x200708(0x184))/0xa;if(_0x15345b===_0xb739d6)break;else _0x3128d6['push'](_0x3128d6['shift']());}catch(_0x1380c6){_0x3128d6['push'](_0x3128d6['shift']());}}}(a83_0x42d5,0xbfff2));export function detectSqlType(_0x8d0375){const _0x4de7fd=a83_0x44cc;if(!_0x8d0375?.[_0x4de7fd(0x17b)]())return{'type':_0x4de7fd(0x192),'isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x4d66a0=_0x8d0375['replace'](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x4de7fd(0x193)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x4de7fd(0x193)](/\/\*[\s\S]*?\*\//g,'')[_0x4de7fd(0x17b)](),_0x12155b=_0x4d66a0[_0x4de7fd(0x18e)]('\x0a');let _0x585705='';for(const _0x3b7bc2 of _0x12155b){const _0x3d71a2=_0x3b7bc2['trim']();if(!_0x3d71a2||_0x3d71a2[_0x4de7fd(0x178)]('--')||_0x3d71a2[_0x4de7fd(0x178)]('/*'))continue;_0x585705=_0x3d71a2;break;}const _0x4ad12f=_0x585705['toUpperCase']();if(_0x4ad12f[_0x4de7fd(0x178)](_0x4de7fd(0x176))||_0x4ad12f[_0x4de7fd(0x178)](_0x4de7fd(0x183))){const _0x29975d=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x4de7fd(0x191)](_0x4d66a0);return{'type':_0x4de7fd(0x176),'isSelectOnly':!_0x29975d,'isDangerous':_0x29975d,'reason':_0x29975d?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x4ad12f[_0x4de7fd(0x178)](_0x4de7fd(0x185)))return{'type':_0x4de7fd(0x185),'isSelectOnly':![],'isDangerous':![]};if(_0x4ad12f[_0x4de7fd(0x178)]('UPDATE'))return{'type':_0x4de7fd(0x18a),'isSelectOnly':![],'isDangerous':![]};if(_0x4ad12f[_0x4de7fd(0x178)](_0x4de7fd(0x17d)))return{'type':'DELETE','isSelectOnly':![],'isDangerous':!![],'reason':_0x4de7fd(0x16d)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x4de7fd(0x191)](_0x4ad12f))return{'type':_0x4de7fd(0x181),'isSelectOnly':![],'isDangerous':!![],'reason':_0x4de7fd(0x182)};return{'type':_0x4de7fd(0x192),'isSelectOnly':![],'isDangerous':![]};}function extractTables(_0x4d8cb2){const _0x39619c=a83_0x44cc,_0x524538=_0x4d8cb2[_0x39619c(0x193)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x39619c(0x193)](/'[^']*'/g,'\x27\x27')[_0x39619c(0x193)](/--.*$/gm,'')[_0x39619c(0x193)](/\/\*[\s\S]*?\*\//g,''),_0x5be096=[],_0x5aa020=_0x524538[_0x39619c(0x18c)](/FROM\s+([^\s,)(]+)/i);if(_0x5aa020?.[0x1])_0x5be096['push'](_0x5aa020[0x1][_0x39619c(0x193)](/[`"]/g,''));for(const _0xbabe4e of _0x524538[_0x39619c(0x18d)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x241d6f=_0xbabe4e[0x1]?.[_0x39619c(0x193)](/[`"]/g,'');if(_0x241d6f&&!_0x5be096[_0x39619c(0x186)](_0x241d6f))_0x5be096[_0x39619c(0x171)](_0x241d6f);}const _0xd251cb=_0x524538[_0x39619c(0x18c)](/INTO\s+([^\s(]+)/i);if(_0xd251cb?.[0x1]){const _0x23f158=_0xd251cb[0x1][_0x39619c(0x193)](/[`"]/g,'');if(!_0x5be096['includes'](_0x23f158))_0x5be096['push'](_0x23f158);}const _0x32ff76=_0x524538['match'](/UPDATE\s+([^\s,)(]+)/i);if(_0x32ff76?.[0x1]){const _0x1ebd2f=_0x32ff76[0x1][_0x39619c(0x193)](/[`"]/g,'');if(!_0x5be096[_0x39619c(0x186)](_0x1ebd2f))_0x5be096[_0x39619c(0x171)](_0x1ebd2f);}return _0x5be096;}function extractParameters(_0x56beb2){const _0x44b173=a83_0x44cc,_0x168619=new Set();for(const _0x1280d3 of _0x56beb2['matchAll'](/#\{(\w+)\}/g))if(_0x1280d3[0x1])_0x168619[_0x44b173(0x173)](_0x1280d3[0x1]);for(const _0x2dc9e8 of _0x56beb2[_0x44b173(0x18d)](/\$\{(\w+)\}/g))if(_0x2dc9e8[0x1])_0x168619[_0x44b173(0x173)](_0x2dc9e8[0x1]);return Array[_0x44b173(0x16f)](_0x168619);}function a83_0x44cc(_0x35fae1,_0x388e65){_0x35fae1=_0x35fae1-0x16d;const _0x42d53a=a83_0x42d5();let _0x44cc5c=_0x42d53a[_0x35fae1];return _0x44cc5c;}export function validateSql(_0x15ee1e){const _0x5574d9=a83_0x44cc,_0x356f54=detectSqlType(_0x15ee1e),_0x1baf05=extractTables(_0x15ee1e),_0x172494=extractParameters(_0x15ee1e);if(_0x356f54[_0x5574d9(0x175)])return{'valid':![],'sqlType':_0x356f54,'tables':_0x1baf05,'parameters':_0x172494,'message':_0x356f54[_0x5574d9(0x190)]||_0x356f54['type']+'\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.'};if(_0x356f54['type']===_0x5574d9(0x192))return{'valid':![],'sqlType':_0x356f54,'tables':_0x1baf05,'parameters':_0x172494,'message':_0x5574d9(0x187)};return{'valid':!![],'sqlType':_0x356f54,'tables':_0x1baf05,'parameters':_0x172494,'message':_0x356f54[_0x5574d9(0x17e)]+_0x5574d9(0x17a)+(_0x1baf05[_0x5574d9(0x172)]?_0x1baf05['join'](',\x20'):_0x5574d9(0x177))+(_0x172494['length']?_0x5574d9(0x16e)+_0x172494[_0x5574d9(0x18f)](',\x20'):'')};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x183a89,_0x4dd4ca){const _0x5b7a40=a86_0xfdb9,_0x5a85a5=_0x183a89();while(!![]){try{const _0x227d90=parseInt(_0x5b7a40(0xc3))/0x1+-parseInt(_0x5b7a40(0xe4))/0x2*(parseInt(_0x5b7a40(0xb0))/0x3)+-parseInt(_0x5b7a40(0xd6))/0x4*(parseInt(_0x5b7a40(0xa1))/0x5)+parseInt(_0x5b7a40(0xb9))/0x6+parseInt(_0x5b7a40(0xa7))/0x7+-parseInt(_0x5b7a40(0xde))/0x8*(parseInt(_0x5b7a40(0xc2))/0x9)+parseInt(_0x5b7a40(0xbd))/0xa;if(_0x227d90===_0x4dd4ca)break;else _0x5a85a5['push'](_0x5a85a5['shift']());}catch(_0x37b89f){_0x5a85a5['push'](_0x5a85a5['shift']());}}}(a86_0x8f48,0xe17c8));function a86_0xfdb9(_0x2c1674,_0x289f3f){_0x2c1674=_0x2c1674-0xa1;const _0x8f48=a86_0x8f48();let _0xfdb93a=_0x8f48[_0x2c1674];return _0xfdb93a;}import{jsx as a86_0x1bfb89,jsxs as a86_0x19d4ef,Fragment as a86_0xd926ad}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';import{existsSync}from'node:fs';import a86_0x1bddd8 from'node:path';import{getIsSessionValid}from'../auth/is-session-valid.js';function a86_0x8f48(){const _0x58e5d4=['Invalid\x20project\x20name','\x20←\x20','map','Login\x20status','*\x20AppCode\x20','\x22\x20already\x20exists','Login\x20failed','app-code','1381014yBGJEs','my-app','project-name','env','12915050UAiAdG','*\x20Project\x20name:\x20','Logged\x20in','resolve','value','2284533Secvig','1449250shmlsn','Invalid\x20AppCode','login-process','login-prompt','AppCode\x20cannot\x20exceed\x20100\x20characters','rightArrow','gray','*\x20Checking\x20login\x20status...','return','leftArrow','backspace','Login\x20skipped','label','test','\x20\x20Use\x20←→\x20to\x20choose,\x20press\x20Enter\x20to\x20confirm','string','Bind\x20AppCode\x20to\x20auto-configure\x20API,\x20e.g.\x20app-c4c89304\x20(press\x20Enter\x20to\x20skip)','delete','Yes','16rzdZPG','*\x20Creating\x20project...','creating','login-check','*\x20Logging\x20in,\x20please\x20complete\x20in\x20browser...','production','green','login','40BFvZno','Not\x20set','!\x20No\x20valid\x20login\x20detected','includes','*\x20Create\x20new\x20project','red','48578CWWcPA','1396915sDRdjz','column','cyan','slice','Directory\x20\x22','step','5436109yfWnoO','Press\x20Enter\x20to\x20confirm\x20or\x20type\x20a\x20custom\x20name','trim','Project\x20name\x20cannot\x20exceed\x2050\x20characters','length','Project\x20name\x20must\x20start\x20with\x20a\x20letter\x20or\x20number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','yellow','*\x20Login\x20first\x20to\x20pull\x20API\x20config?','AppCode\x20can\x20only\x20contain\x20letters,\x20numbers,\x20hyphens\x20and\x20underscores,\x20and\x20must\x20start\x20with\x20a\x20letter\x20or\x20number','54CGbrqq'];a86_0x8f48=function(){return _0x58e5d4;};return a86_0x8f48();}import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x180c84){const _0x55237d=a86_0xfdb9,{onCreate:_0x2c0f92,env:_0x1c7f49}=_0x180c84,[_0x46b402,_0x578bcc]=useState(_0x55237d(0xbb)),[_0x1696d5,_0x34179d]=useState(''),[_0x11ea2f,_0x15b8a7]=useState(''),[_0x2bb249,_0x4664f3]=useState(''),[_0x40041c,_0x38f17e]=useState(''),[_0x374308,_0x4f9b16]=useState([]),[_0x232170,_0x213c17]=useState(null),[_0x228091,_0x204607]=useState(![]),[_0x436d36,_0x15c768]=useState(![]),[_0x373787,_0x5341da]=useState(0x0),[_0xb9bdd9,_0x1c60bf]=useState(''),_0x50e756=_0x55237d(0xba),_0x53f3e8=readConfig(),_0x20af1a=typeof _0x53f3e8[_0x55237d(0xbc)]===_0x55237d(0xd2)?_0x53f3e8[_0x55237d(0xbc)]:undefined;function _0x1c4470(_0x7e1122){const _0x45276e=_0x55237d,_0x1548c5=_0x7e1122||_0x50e756,_0x4d16b5=a86_0x1bddd8[_0x45276e(0xc0)](process['cwd'](),_0x1548c5);return existsSync(_0x4d16b5);}function _0x2c9461(_0x6c2a2f){const _0x437f2a=_0x55237d;if(_0x6c2a2f[_0x437f2a(0xab)]>0x32)return{'valid':![],'message':_0x437f2a(0xaa)};const _0x1df550=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x6c2a2f?.[_0x437f2a(0xa9)]()&&!_0x1df550[_0x437f2a(0xd0)](_0x6c2a2f))return{'valid':![],'message':_0x437f2a(0xac)};return{'valid':!![]};}function _0x2359f6(_0x3cb8c2){const _0x3cdf9a=_0x55237d;if(!_0x3cb8c2[_0x3cdf9a(0xa9)]())return{'valid':!![]};if(_0x3cb8c2[_0x3cdf9a(0xab)]>0x64)return{'valid':![],'message':_0x3cdf9a(0xc7)};const _0x3f6799=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x3f6799[_0x3cdf9a(0xd0)](_0x3cb8c2))return{'valid':![],'message':_0x3cdf9a(0xaf)};return{'valid':!![]};}async function _0x29a060(){_0x204607(!![]);try{const _0x4ac039=await getIsSessionValid();return _0x213c17(_0x4ac039),_0x4ac039;}catch(_0x1bd876){return _0x213c17(![]),![];}finally{_0x204607(![]);}}async function _0xc4bce1(){_0x15c768(!![]);try{const _0xb28268=await authServer({'silent':!![]});return _0x213c17(_0xb28268),_0xb28268;}catch(_0x2a08e1){return _0x213c17(![]),![];}finally{_0x15c768(![]);}}function _0x52044c(_0xc27a75){const _0xeb174c=_0x55237d,_0x23a395=_0x1c7f49||_0x20af1a||_0xeb174c(0xdb);_0x2c0f92({'projectName':_0x1696d5,'appCode':_0xc27a75,'env':_0x23a395}),_0x578bcc(_0xeb174c(0xd8));}return useInput(async(_0x20b1a0,_0x23392a)=>{const _0x10b0fc=_0x55237d;if(_0x23392a[_0x10b0fc(0xcc)]||_0x23392a[_0x10b0fc(0xc8)]){if(_0x46b402===_0x10b0fc(0xc6)){_0x5341da(_0x296de2=>_0x296de2===0x0?0x1:0x0);return;}}if(_0x23392a[_0x10b0fc(0xcb)]){if(_0x46b402===_0x10b0fc(0xbb)){const _0x3ceeaf=_0x2bb249['trim']()||_0x50e756;if(_0x40041c)return;if(_0x1c4470(_0x3ceeaf)){_0x1c60bf('Project\x20directory\x20'+_0x3ceeaf+'\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name');return;}_0x34179d(_0x3ceeaf),_0x4f9b16([{'step':'project-name','label':'Project\x20Name','value':_0x3ceeaf}]),_0x4664f3(''),_0x38f17e(''),_0x1c60bf(''),_0x578bcc(_0x10b0fc(0xb8));return;}if(_0x46b402===_0x10b0fc(0xb8)){if(_0x40041c)return;const _0x9f335e=_0x2bb249['trim']();_0x15b8a7(_0x9f335e),_0x4f9b16(_0x1c56f4=>[..._0x1c56f4,{'step':_0x10b0fc(0xb8),'label':'App\x20Code','value':_0x9f335e||_0x10b0fc(0xdf)}]),_0x4664f3(''),_0x38f17e('');if(_0x9f335e){_0x578bcc('login-check');const _0x2420b7=await _0x29a060();_0x2420b7?_0x52044c(_0x9f335e):_0x578bcc(_0x10b0fc(0xc6));}else _0x52044c(undefined);return;}if(_0x46b402===_0x10b0fc(0xc6)){const _0x47ff84=_0x373787===0x0;if(_0x47ff84){_0x578bcc('login-process');const _0x31f17b=await _0xc4bce1();_0x31f17b?(_0x4f9b16(_0xd39d6c=>[..._0xd39d6c,{'step':_0x10b0fc(0xdd),'label':_0x10b0fc(0xb4),'value':_0x10b0fc(0xbf)}]),_0x52044c(_0x11ea2f)):(_0x4f9b16(_0x536894=>[..._0x536894,{'step':'login','label':_0x10b0fc(0xb4),'value':_0x10b0fc(0xb7)}]),_0x52044c(_0x11ea2f));}else _0x4f9b16(_0x11722e=>[..._0x11722e,{'step':'login','label':'Login\x20status','value':_0x10b0fc(0xce)}]),_0x52044c(_0x11ea2f);return;}}if(_0x23392a[_0x10b0fc(0xcd)]||_0x23392a[_0x10b0fc(0xd4)]){_0x4664f3(_0x14019e=>{const _0x14e3ab=_0x10b0fc,_0x4b06e6=_0x14019e[_0x14e3ab(0xa4)](0x0,-0x1);if(_0x46b402===_0x14e3ab(0xbb)){const {valid:_0x1cca82,message:_0x20ceb3}=_0x2c9461(_0x4b06e6);_0x38f17e(_0x1cca82?'':_0x20ceb3||_0x14e3ab(0xb1));if(_0x1cca82&&!_0x40041c){const _0x4ae025=_0x4b06e6||_0x50e756;_0x1c4470(_0x4ae025)?_0x1c60bf(_0x14e3ab(0xa5)+_0x4ae025+'\x22\x20already\x20exists'):_0x1c60bf('');}}else{if(_0x46b402===_0x14e3ab(0xb8)){const {valid:_0x2782fc,message:_0x20a8f0}=_0x2359f6(_0x4b06e6);_0x38f17e(_0x2782fc?'':_0x20a8f0||_0x14e3ab(0xc4));}}return _0x4b06e6;});return;}if([_0x10b0fc(0xd8),_0x10b0fc(0xd9),_0x10b0fc(0xc5),_0x10b0fc(0xc6)][_0x10b0fc(0xe1)](_0x46b402))return;_0x4664f3(_0x137638=>{const _0x4d50ae=_0x10b0fc,_0x3f5108=_0x137638+_0x20b1a0;if(_0x46b402===_0x4d50ae(0xbb)){const {valid:_0x247f5d,message:_0x529ba8}=_0x2c9461(_0x3f5108);_0x38f17e(_0x247f5d?'':_0x529ba8||_0x4d50ae(0xb1));if(_0x247f5d&&!_0x40041c){const _0x34cf80=_0x3f5108||_0x50e756;_0x1c4470(_0x34cf80)?_0x1c60bf('Directory\x20\x22'+_0x34cf80+_0x4d50ae(0xb6)):_0x1c60bf('');}}else{if(_0x46b402===_0x4d50ae(0xb8)){const {valid:_0x3cf5f3,message:_0x297ed9}=_0x2359f6(_0x3f5108);_0x38f17e(_0x3cf5f3?'':_0x297ed9||_0x4d50ae(0xc4));}}return _0x3f5108;});}),a86_0x19d4ef(Box,{'flexDirection':_0x55237d(0xa2),'marginTop':0x1,'children':[_0x374308[_0x55237d(0xab)]===0x0&&a86_0x1bfb89(Box,{'children':a86_0x1bfb89(Text,{'color':_0x55237d(0xa3),'children':_0x55237d(0xe2)})}),_0x374308[_0x55237d(0xb3)](_0x240ac0=>a86_0x19d4ef(Box,{'children':[a86_0x1bfb89(Text,{'color':_0x55237d(0xdc),'children':'√\x20'+_0x240ac0[_0x55237d(0xcf)]+':\x20'}),a86_0x1bfb89(Text,{'color':'cyan','children':_0x240ac0[_0x55237d(0xc1)]})]},_0x240ac0[_0x55237d(0xa6)])),_0x46b402==='project-name'&&a86_0x19d4ef(a86_0xd926ad,{'children':[a86_0x19d4ef(Box,{'children':[a86_0x1bfb89(Text,{'children':_0x55237d(0xbe)}),_0x2bb249?a86_0x1bfb89(Text,{'color':_0x55237d(0xdc),'children':_0x2bb249}):a86_0x1bfb89(Text,{'color':_0x55237d(0xc9),'children':_0x50e756}),_0x40041c&&a86_0x19d4ef(Text,{'color':_0x55237d(0xe3),'children':['\x20←\x20',_0x40041c]}),_0xb9bdd9&&a86_0x19d4ef(Text,{'color':_0x55237d(0xe3),'children':[_0x55237d(0xb2),_0xb9bdd9]})]}),!_0x40041c&&!_0xb9bdd9&&!_0x2bb249&&a86_0x1bfb89(Box,{'children':a86_0x1bfb89(Text,{'color':_0x55237d(0xc9),'children':_0x55237d(0xa8)})})]}),_0x46b402===_0x55237d(0xb8)&&a86_0x19d4ef(a86_0xd926ad,{'children':[a86_0x19d4ef(Box,{'children':[a86_0x1bfb89(Text,{'children':_0x55237d(0xb5)}),a86_0x1bfb89(Text,{'color':_0x55237d(0xc9),'children':'[optional]:\x20'}),a86_0x1bfb89(Text,{'color':'green','children':_0x2bb249}),_0x40041c&&a86_0x19d4ef(Text,{'color':_0x55237d(0xe3),'children':[_0x55237d(0xb2),_0x40041c]})]}),!_0x40041c&&a86_0x1bfb89(Box,{'children':a86_0x1bfb89(Text,{'color':'gray','children':_0x55237d(0xd3)})})]}),_0x46b402==='login-check'&&a86_0x19d4ef(Box,{'children':[a86_0x1bfb89(Text,{'children':_0x55237d(0xca)}),_0x228091&&a86_0x1bfb89(Text,{'color':'gray','children':'\x20Checking...'})]}),_0x46b402==='login-prompt'&&a86_0x19d4ef(a86_0xd926ad,{'children':[a86_0x1bfb89(Box,{'children':a86_0x1bfb89(Text,{'color':_0x55237d(0xad),'children':_0x55237d(0xe0)})}),a86_0x1bfb89(Box,{'marginTop':0x1,'children':a86_0x1bfb89(Text,{'children':_0x55237d(0xae)})}),a86_0x19d4ef(Box,{'marginLeft':0x2,'children':[a86_0x19d4ef(Text,{'color':_0x373787===0x0?_0x55237d(0xdc):_0x55237d(0xc9),'children':[_0x373787===0x0?'▶\x20':'\x20\x20',_0x55237d(0xd5)]}),a86_0x1bfb89(Text,{'children':'\x20'}),a86_0x19d4ef(Text,{'color':_0x373787===0x1?'green':'gray','children':[_0x373787===0x1?'▶\x20':'\x20\x20','No']})]}),a86_0x1bfb89(Box,{'children':a86_0x1bfb89(Text,{'color':_0x55237d(0xc9),'children':_0x55237d(0xd1)})})]}),_0x46b402==='login-process'&&a86_0x19d4ef(Box,{'children':[a86_0x1bfb89(Text,{'children':_0x55237d(0xda)}),_0x436d36&&a86_0x1bfb89(Text,{'color':'gray','children':'\x20Logging\x20in...'})]}),_0x46b402===_0x55237d(0xd8)&&a86_0x1bfb89(Box,{'children':a86_0x1bfb89(Text,{'color':'green','children':_0x55237d(0xd7)})})]});}
|
|
1
|
+
(function(_0x2828bc,_0x467e2e){const _0x343600=a84_0x3938,_0x4a1565=_0x2828bc();while(!![]){try{const _0x48c5e7=parseInt(_0x343600(0x142))/0x1*(-parseInt(_0x343600(0x15d))/0x2)+-parseInt(_0x343600(0x13b))/0x3*(-parseInt(_0x343600(0x13f))/0x4)+-parseInt(_0x343600(0x136))/0x5*(parseInt(_0x343600(0x151))/0x6)+parseInt(_0x343600(0x154))/0x7+parseInt(_0x343600(0x141))/0x8*(-parseInt(_0x343600(0x150))/0x9)+-parseInt(_0x343600(0x14f))/0xa+parseInt(_0x343600(0x14a))/0xb;if(_0x48c5e7===_0x467e2e)break;else _0x4a1565['push'](_0x4a1565['shift']());}catch(_0x20eaac){_0x4a1565['push'](_0x4a1565['shift']());}}}(a84_0x1495,0xca55f));import{jsx as a84_0x1378e1,jsxs as a84_0x561b51,Fragment as a84_0x36f67b}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';import{existsSync}from'node:fs';import a84_0x10df2b from'node:path';import{getIsSessionValid}from'../auth/is-session-valid.js';function a84_0x3938(_0x10cf0f,_0x23b56a){_0x10cf0f=_0x10cf0f-0x128;const _0x149507=a84_0x1495();let _0x393833=_0x149507[_0x10cf0f];return _0x393833;}import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';function a84_0x1495(){const _0x4d4967=['login-process','Bind\x20AppCode\x20to\x20auto-configure\x20API,\x20e.g.\x20app-c4c89304\x20(press\x20Enter\x20to\x20skip)','Login\x20failed','Project\x20directory\x20','*\x20Checking\x20login\x20status...','includes','32NDwyOA','leftArrow','my-app','map','column','gray','Login\x20skipped','yellow','Invalid\x20AppCode','Login\x20status','rightArrow','test','step','env','Invalid\x20project\x20name','Yes','login','\x20Logging\x20in...','*\x20Create\x20new\x20project','*\x20AppCode\x20','\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name','project-name','cyan','50TKIESt','return','*\x20Logging\x20in,\x20please\x20complete\x20in\x20browser...','app-code','label','339699YXcqxe','backspace','delete','Project\x20Name','4CjLlYY','green','8HCqpNJ','1057XWhgYt','AppCode\x20cannot\x20exceed\x20100\x20characters','Project\x20name\x20must\x20start\x20with\x20a\x20letter\x20or\x20number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','login-check','trim','\x20←\x20','length','\x20Checking...','27847787HtOAvA','Directory\x20\x22','login-prompt','string','*\x20Creating\x20project...','13909310CvNvHy','3123369HpOMkO','101274EVmvSh','creating','AppCode\x20can\x20only\x20contain\x20letters,\x20numbers,\x20hyphens\x20and\x20underscores,\x20and\x20must\x20start\x20with\x20a\x20letter\x20or\x20number','753137tnArDa','red','[optional]:\x20'];a84_0x1495=function(){return _0x4d4967;};return a84_0x1495();}export function EnhancedGuidedCreate(_0x5f0d8d){const _0x47e5a2=a84_0x3938,{onCreate:_0x1c3e6f,env:_0x4aebe3}=_0x5f0d8d,[_0x3d5967,_0x27dd6d]=useState(_0x47e5a2(0x134)),[_0x5674bf,_0x1b158f]=useState(''),[_0x2a5a1d,_0x2b06cd]=useState(''),[_0x3007ca,_0x5ee992]=useState(''),[_0x584950,_0x32144a]=useState(''),[_0x59f96d,_0x4168c4]=useState([]),[_0x26d100,_0x1840e9]=useState(null),[_0x54ddf4,_0x17e017]=useState(![]),[_0x3ea1b7,_0x3709d1]=useState(![]),[_0x2ca662,_0x5b367a]=useState(0x0),[_0x4d84df,_0x212064]=useState(''),_0x5bcf81=_0x47e5a2(0x15f),_0x4c6a40=readConfig(),_0x21bde8=typeof _0x4c6a40[_0x47e5a2(0x12c)]===_0x47e5a2(0x14d)?_0x4c6a40['env']:undefined;function _0x426389(_0x437577){const _0x2812af=_0x437577||_0x5bcf81,_0x583f62=a84_0x10df2b['resolve'](process['cwd'](),_0x2812af);return existsSync(_0x583f62);}function _0x2bea0b(_0x4b29b5){const _0x90fd9e=_0x47e5a2;if(_0x4b29b5['length']>0x32)return{'valid':![],'message':'Project\x20name\x20cannot\x20exceed\x2050\x20characters'};const _0x245427=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x4b29b5?.[_0x90fd9e(0x146)]()&&!_0x245427[_0x90fd9e(0x12a)](_0x4b29b5))return{'valid':![],'message':_0x90fd9e(0x144)};return{'valid':!![]};}function _0xc53bfa(_0x4e040c){const _0x23dfbb=_0x47e5a2;if(!_0x4e040c['trim']())return{'valid':!![]};if(_0x4e040c[_0x23dfbb(0x148)]>0x64)return{'valid':![],'message':_0x23dfbb(0x143)};const _0x55b357=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x55b357['test'](_0x4e040c))return{'valid':![],'message':_0x23dfbb(0x153)};return{'valid':!![]};}async function _0x361f99(){_0x17e017(!![]);try{const _0x40c579=await getIsSessionValid();return _0x1840e9(_0x40c579),_0x40c579;}catch(_0x51eed3){return _0x1840e9(![]),![];}finally{_0x17e017(![]);}}async function _0x5a5454(){_0x3709d1(!![]);try{const _0x289c90=await authServer({'silent':!![]});return _0x1840e9(_0x289c90),_0x289c90;}catch(_0x4ec484){return _0x1840e9(![]),![];}finally{_0x3709d1(![]);}}function _0x4d0212(_0x8e5345){const _0x5118f8=_0x4aebe3||_0x21bde8||'production';_0x1c3e6f({'projectName':_0x5674bf,'appCode':_0x8e5345,'env':_0x5118f8}),_0x27dd6d('creating');}return useInput(async(_0x20a2f7,_0x371a03)=>{const _0x3a1627=_0x47e5a2;if(_0x371a03[_0x3a1627(0x15e)]||_0x371a03[_0x3a1627(0x129)]){if(_0x3d5967===_0x3a1627(0x14c)){_0x5b367a(_0x2a5347=>_0x2a5347===0x0?0x1:0x0);return;}}if(_0x371a03[_0x3a1627(0x137)]){if(_0x3d5967===_0x3a1627(0x134)){const _0x3dcd7d=_0x3007ca['trim']()||_0x5bcf81;if(_0x584950)return;if(_0x426389(_0x3dcd7d)){_0x212064(_0x3a1627(0x15a)+_0x3dcd7d+_0x3a1627(0x133));return;}_0x1b158f(_0x3dcd7d),_0x4168c4([{'step':_0x3a1627(0x134),'label':_0x3a1627(0x13e),'value':_0x3dcd7d}]),_0x5ee992(''),_0x32144a(''),_0x212064(''),_0x27dd6d(_0x3a1627(0x139));return;}if(_0x3d5967===_0x3a1627(0x139)){if(_0x584950)return;const _0x5dc816=_0x3007ca[_0x3a1627(0x146)]();_0x2b06cd(_0x5dc816),_0x4168c4(_0x45a3b5=>[..._0x45a3b5,{'step':_0x3a1627(0x139),'label':'App\x20Code','value':_0x5dc816||'Not\x20set'}]),_0x5ee992(''),_0x32144a('');if(_0x5dc816){_0x27dd6d(_0x3a1627(0x145));const _0x45a71a=await _0x361f99();_0x45a71a?_0x4d0212(_0x5dc816):_0x27dd6d('login-prompt');}else _0x4d0212(undefined);return;}if(_0x3d5967==='login-prompt'){const _0x18c1b4=_0x2ca662===0x0;if(_0x18c1b4){_0x27dd6d(_0x3a1627(0x157));const _0xcff423=await _0x5a5454();_0xcff423?(_0x4168c4(_0x31b979=>[..._0x31b979,{'step':_0x3a1627(0x12f),'label':_0x3a1627(0x128),'value':'Logged\x20in'}]),_0x4d0212(_0x2a5a1d)):(_0x4168c4(_0x39f145=>[..._0x39f145,{'step':_0x3a1627(0x12f),'label':_0x3a1627(0x128),'value':_0x3a1627(0x159)}]),_0x4d0212(_0x2a5a1d));}else _0x4168c4(_0x350bbf=>[..._0x350bbf,{'step':_0x3a1627(0x12f),'label':_0x3a1627(0x128),'value':_0x3a1627(0x163)}]),_0x4d0212(_0x2a5a1d);return;}}if(_0x371a03[_0x3a1627(0x13c)]||_0x371a03[_0x3a1627(0x13d)]){_0x5ee992(_0x292514=>{const _0x2e8c18=_0x3a1627,_0x5993ad=_0x292514['slice'](0x0,-0x1);if(_0x3d5967===_0x2e8c18(0x134)){const {valid:_0xa431da,message:_0x3a5832}=_0x2bea0b(_0x5993ad);_0x32144a(_0xa431da?'':_0x3a5832||_0x2e8c18(0x12d));if(_0xa431da&&!_0x584950){const _0x150d7f=_0x5993ad||_0x5bcf81;_0x426389(_0x150d7f)?_0x212064('Directory\x20\x22'+_0x150d7f+'\x22\x20already\x20exists'):_0x212064('');}}else{if(_0x3d5967===_0x2e8c18(0x139)){const {valid:_0xbc7f97,message:_0x4a438c}=_0xc53bfa(_0x5993ad);_0x32144a(_0xbc7f97?'':_0x4a438c||_0x2e8c18(0x165));}}return _0x5993ad;});return;}if([_0x3a1627(0x152),_0x3a1627(0x145),_0x3a1627(0x157),'login-prompt'][_0x3a1627(0x15c)](_0x3d5967))return;_0x5ee992(_0x321c7a=>{const _0x26e6e9=_0x3a1627,_0x32a181=_0x321c7a+_0x20a2f7;if(_0x3d5967===_0x26e6e9(0x134)){const {valid:_0xadb77e,message:_0x4bcf5e}=_0x2bea0b(_0x32a181);_0x32144a(_0xadb77e?'':_0x4bcf5e||_0x26e6e9(0x12d));if(_0xadb77e&&!_0x584950){const _0x267d24=_0x32a181||_0x5bcf81;_0x426389(_0x267d24)?_0x212064(_0x26e6e9(0x14b)+_0x267d24+'\x22\x20already\x20exists'):_0x212064('');}}else{if(_0x3d5967===_0x26e6e9(0x139)){const {valid:_0x3f6c31,message:_0x265e4e}=_0xc53bfa(_0x32a181);_0x32144a(_0x3f6c31?'':_0x265e4e||_0x26e6e9(0x165));}}return _0x32a181;});}),a84_0x561b51(Box,{'flexDirection':_0x47e5a2(0x161),'marginTop':0x1,'children':[_0x59f96d[_0x47e5a2(0x148)]===0x0&&a84_0x1378e1(Box,{'children':a84_0x1378e1(Text,{'color':_0x47e5a2(0x135),'children':_0x47e5a2(0x131)})}),_0x59f96d[_0x47e5a2(0x160)](_0x4aaf73=>a84_0x561b51(Box,{'children':[a84_0x1378e1(Text,{'color':_0x47e5a2(0x140),'children':'√\x20'+_0x4aaf73[_0x47e5a2(0x13a)]+':\x20'}),a84_0x1378e1(Text,{'color':_0x47e5a2(0x135),'children':_0x4aaf73['value']})]},_0x4aaf73[_0x47e5a2(0x12b)])),_0x3d5967==='project-name'&&a84_0x561b51(a84_0x36f67b,{'children':[a84_0x561b51(Box,{'children':[a84_0x1378e1(Text,{'children':'*\x20Project\x20name:\x20'}),_0x3007ca?a84_0x1378e1(Text,{'color':_0x47e5a2(0x140),'children':_0x3007ca}):a84_0x1378e1(Text,{'color':_0x47e5a2(0x162),'children':_0x5bcf81}),_0x584950&&a84_0x561b51(Text,{'color':'red','children':[_0x47e5a2(0x147),_0x584950]}),_0x4d84df&&a84_0x561b51(Text,{'color':'red','children':[_0x47e5a2(0x147),_0x4d84df]})]}),!_0x584950&&!_0x4d84df&&!_0x3007ca&&a84_0x1378e1(Box,{'children':a84_0x1378e1(Text,{'color':_0x47e5a2(0x162),'children':'Press\x20Enter\x20to\x20confirm\x20or\x20type\x20a\x20custom\x20name'})})]}),_0x3d5967===_0x47e5a2(0x139)&&a84_0x561b51(a84_0x36f67b,{'children':[a84_0x561b51(Box,{'children':[a84_0x1378e1(Text,{'children':_0x47e5a2(0x132)}),a84_0x1378e1(Text,{'color':_0x47e5a2(0x162),'children':_0x47e5a2(0x156)}),a84_0x1378e1(Text,{'color':_0x47e5a2(0x140),'children':_0x3007ca}),_0x584950&&a84_0x561b51(Text,{'color':_0x47e5a2(0x155),'children':[_0x47e5a2(0x147),_0x584950]})]}),!_0x584950&&a84_0x1378e1(Box,{'children':a84_0x1378e1(Text,{'color':_0x47e5a2(0x162),'children':_0x47e5a2(0x158)})})]}),_0x3d5967===_0x47e5a2(0x145)&&a84_0x561b51(Box,{'children':[a84_0x1378e1(Text,{'children':_0x47e5a2(0x15b)}),_0x54ddf4&&a84_0x1378e1(Text,{'color':'gray','children':_0x47e5a2(0x149)})]}),_0x3d5967==='login-prompt'&&a84_0x561b51(a84_0x36f67b,{'children':[a84_0x1378e1(Box,{'children':a84_0x1378e1(Text,{'color':_0x47e5a2(0x164),'children':'!\x20No\x20valid\x20login\x20detected'})}),a84_0x1378e1(Box,{'marginTop':0x1,'children':a84_0x1378e1(Text,{'children':'*\x20Login\x20first\x20to\x20pull\x20API\x20config?'})}),a84_0x561b51(Box,{'marginLeft':0x2,'children':[a84_0x561b51(Text,{'color':_0x2ca662===0x0?_0x47e5a2(0x140):_0x47e5a2(0x162),'children':[_0x2ca662===0x0?'▶\x20':'\x20\x20',_0x47e5a2(0x12e)]}),a84_0x1378e1(Text,{'children':'\x20'}),a84_0x561b51(Text,{'color':_0x2ca662===0x1?'green':_0x47e5a2(0x162),'children':[_0x2ca662===0x1?'▶\x20':'\x20\x20','No']})]}),a84_0x1378e1(Box,{'children':a84_0x1378e1(Text,{'color':_0x47e5a2(0x162),'children':'\x20\x20Use\x20←→\x20to\x20choose,\x20press\x20Enter\x20to\x20confirm'})})]}),_0x3d5967===_0x47e5a2(0x157)&&a84_0x561b51(Box,{'children':[a84_0x1378e1(Text,{'children':_0x47e5a2(0x138)}),_0x3ea1b7&&a84_0x1378e1(Text,{'color':_0x47e5a2(0x162),'children':_0x47e5a2(0x130)})]}),_0x3d5967===_0x47e5a2(0x152)&&a84_0x1378e1(Box,{'children':a84_0x1378e1(Text,{'color':_0x47e5a2(0x140),'children':_0x47e5a2(0x14e)})})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a85_0x3001(_0x580fe3,_0x10f4cd){_0x580fe3=_0x580fe3-0x10c;const _0x226f40=a85_0x226f();let _0x300159=_0x226f40[_0x580fe3];return _0x300159;}(function(_0x2de7d6,_0x5a27a1){const _0x47711e=a85_0x3001,_0x574d9c=_0x2de7d6();while(!![]){try{const _0x4f67cd=-parseInt(_0x47711e(0x110))/0x1+parseInt(_0x47711e(0x10c))/0x2+-parseInt(_0x47711e(0x115))/0x3*(parseInt(_0x47711e(0x114))/0x4)+parseInt(_0x47711e(0x113))/0x5+-parseInt(_0x47711e(0x111))/0x6*(-parseInt(_0x47711e(0x112))/0x7)+-parseInt(_0x47711e(0x10e))/0x8+parseInt(_0x47711e(0x116))/0x9*(parseInt(_0x47711e(0x10d))/0xa);if(_0x4f67cd===_0x5a27a1)break;else _0x574d9c['push'](_0x574d9c['shift']());}catch(_0x168f9f){_0x574d9c['push'](_0x574d9c['shift']());}}}(a85_0x226f,0x53776));export function formatElapsed(_0x797ace){const _0x31c846=a85_0x3001,_0x12f959=Date[_0x31c846(0x10f)]()-_0x797ace;if(_0x12f959<0x3e8)return _0x12f959+'ms';const _0x49c9a8=(_0x12f959/0x3e8)[_0x31c846(0x117)](0x2),_0x66f3d1=_0x49c9a8['replace'](/\.?0+$/u,'');return _0x66f3d1+'s';}function a85_0x226f(){const _0x77c5bb=['463938Wddvnb','10NAFWYs','3082128QlzCFg','now','347537enBPQz','92124nSkToK','308MoDsLd','1744410SeJdWb','4vkAVTV','849909RhKreh','914013VzLIYG','toFixed'];a85_0x226f=function(){return _0x77c5bb;};return a85_0x226f();}
|
package/lib/create-app/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xed39f0,_0x14a9fd){const _0x43ca66=a88_0x4d3e,_0x580f14=_0xed39f0();while(!![]){try{const _0x45e8bb=-parseInt(_0x43ca66(0x17c))/0x1+parseInt(_0x43ca66(0x15d))/0x2*(-parseInt(_0x43ca66(0x195))/0x3)+-parseInt(_0x43ca66(0x18d))/0x4+parseInt(_0x43ca66(0x172))/0x5+-parseInt(_0x43ca66(0x1a2))/0x6*(-parseInt(_0x43ca66(0x19e))/0x7)+parseInt(_0x43ca66(0x188))/0x8+parseInt(_0x43ca66(0x184))/0x9*(parseInt(_0x43ca66(0x19d))/0xa);if(_0x45e8bb===_0x14a9fd)break;else _0x580f14['push'](_0x580f14['shift']());}catch(_0x3d6bec){_0x580f14['push'](_0x580f14['shift']());}}}(a88_0xbd85,0x7406b));function a88_0x4d3e(_0x5c96cb,_0x467f28){_0x5c96cb=_0x5c96cb-0x159;const _0xbd85f8=a88_0xbd85();let _0x4d3e3=_0xbd85f8[_0x5c96cb];return _0x4d3e3;}import{jsx as a88_0x165e89,Fragment as a88_0x187d90,jsxs as a88_0x3d4fb7}from'react/jsx-runtime';import a88_0x43b42f from'path';import a88_0x345ca1 from'fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';function a88_0xbd85(){const _0xa3de5e=['dirname','doTask','*\x20Configuring\x20AppCode\x20for\x20project\x20','repeat','×\x20Project\x20creation\x20failed:\x20','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','11191815jsMuWR','success','更新\x20package.json\x20失败','version','321408CxNfNP','writeFileSync','currentVersion','existsSync','2.\x20','1774284YijfRT','项目创建失败:\x20','toLocaleString','string','utf8','Project\x20name\x20contains\x20invalid\x20characters.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','error','resolve','89772pRFIRe','join','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27rabetbase\x20config\x20set\x20appcode\x20<app-code>\x27','API\x20configuration\x20pulled:\x20','chdir','\x20&&\x20rabetbase\x20run\x20start','清理项目目录失败:\x20','\x20√\x20','10xuCvSk','7BvFuqK','green','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','log','2479458SFezsW','CLI\x20版本检查','配置应用AppCode失败','production','配置应用AppCode:\x20','cyan','√\x20package.json\x20updated:\x20name=','\x20Generated\x20by\x20rabetbase\x20cli\x20','needsUpgrade','appCode','*\x20Pulling\x20API\x20configuration...','🚀\x20Next\x20Steps:','parse','readFileSync','length','开始创建项目:\x20','1.\x20','package.json','cd\x20','34iqdsSV','description','rmSync','then','Start\x20project:','\x20|\x20AppCode:\x20','stableVersion','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','message','rabetbase\x20api\x20pull','test','name','√\x20Pulled\x20','create','W_OK','Project\x20directory\x20','cookie','info','white','env','3227095moJWcH','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','cwd','accessSync','Project\x20name:\x20','warn','projectCode','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','../..','projectName','914851QttNZs','1.0.0'];a88_0xbd85=function(){return _0xa3de5e;};return a88_0xbd85();}import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{fetchModelList}from'../api/fetch-model-list.js';import{generateApiFile}from'../api/generate-api-file.js';import{initEnv}from'../constant/env.js';import{readConfig}from'../utils/config.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export function CreateApp(_0x22e9f2){const _0x347452=a88_0x4d3e,[_0xe58826,_0x148231]=useState(![]),[_0x3499b0,_0x1caa91]=useState(![]),[_0x1a1aa1,_0x26ee34]=useState(![]),[_0xcde3ea,_0x59001b]=useState(null),_0x48cdc9=useCopyProjectTemplate(),_0x190789=useInstallDependencies(),_0x41ffd4=useFormatCode();useEffect(()=>{const _0x12bf0e=a88_0x4d3e;checkCliVersion()[_0x12bf0e(0x160)](_0x146a2f=>{const _0x47f881=_0x12bf0e;_0x146a2f[_0x47f881(0x1aa)]&&(printCliUpgradeWarning(_0x146a2f),logger['info'](_0x47f881(0x16b),_0x47f881(0x1a3),{'currentVersion':_0x146a2f[_0x47f881(0x18a)],'stableVersion':_0x146a2f[_0x47f881(0x163)],'needsUpgrade':_0x146a2f[_0x47f881(0x1aa)]}));});},[]);const _0x3747f1=async _0x1448ff=>{const _0xf3ef7d=a88_0x4d3e;if(!_0x1448ff['projectName']||_0x1448ff[_0xf3ef7d(0x17b)]['trim']()===''){console['error']('Project\x20name\x20cannot\x20be\x20empty');return;}const _0x74e7f0=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x74e7f0[_0xf3ef7d(0x168)](_0x1448ff[_0xf3ef7d(0x17b)])){console[_0xf3ef7d(0x193)](_0xf3ef7d(0x192));return;}if(_0x1448ff[_0xf3ef7d(0x17b)][_0xf3ef7d(0x1b0)]>0x64){console[_0xf3ef7d(0x193)](_0xf3ef7d(0x165));return;}const _0x43eddc=a88_0x43b42f['resolve'](process['cwd'](),_0x1448ff[_0xf3ef7d(0x17b)]);if(a88_0x345ca1[_0xf3ef7d(0x18b)](_0x43eddc)){console['error'](_0xf3ef7d(0x16d)+_0x1448ff[_0xf3ef7d(0x17b)]+'\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name');return;}try{const _0x4374cc=a88_0x43b42f[_0xf3ef7d(0x17e)](_0x43eddc);a88_0x345ca1[_0xf3ef7d(0x175)](_0x4374cc,a88_0x345ca1['constants'][_0xf3ef7d(0x16c)]);}catch(_0x41d3b0){console['error'](_0xf3ef7d(0x183));return;}_0x59001b(_0x1448ff),_0x148231(!![]),logger['setLogPath'](_0x43eddc),logger[_0xf3ef7d(0x16f)](_0xf3ef7d(0x16b),_0xf3ef7d(0x159)+_0x1448ff[_0xf3ef7d(0x17b)],{'projectDir':_0x43eddc,'appCode':_0x1448ff[_0xf3ef7d(0x1ab)]});try{await _0x48cdc9[_0xf3ef7d(0x17f)](_0x1448ff['projectName']),await _0xf14b84(_0x1448ff[_0xf3ef7d(0x17b)]),await _0x190789['doTask'](_0x1448ff[_0xf3ef7d(0x17b)]),await _0x41ffd4[_0xf3ef7d(0x17f)](_0x1448ff[_0xf3ef7d(0x17b)]),await _0x3d9f82(_0x1448ff[_0xf3ef7d(0x17b)],_0x1448ff[_0xf3ef7d(0x1ab)]||'',_0x1448ff[_0xf3ef7d(0x171)]);if(_0x1448ff[_0xf3ef7d(0x1ab)]){console[_0xf3ef7d(0x1a1)](_0xf3ef7d(0x1ac));const _0x1fb885=process[_0xf3ef7d(0x174)]();try{process[_0xf3ef7d(0x199)](_0x43eddc);const _0x1f387c=_0x1448ff[_0xf3ef7d(0x171)]||'production';initEnv(_0x1f387c);const {configArray:_0x139f2e}=await fetchModelList(_0x1448ff[_0xf3ef7d(0x1ab)],_0x22e9f2[_0xf3ef7d(0x16e)]||''),_0x1c3f77='./src/api/',_0x2b7e69=await generateApiFile(_0x139f2e,'',_0x1448ff[_0xf3ef7d(0x1ab)],!![],_0x1f387c,_0x1c3f77);console[_0xf3ef7d(0x1a1)](_0xf3ef7d(0x16a)+_0x139f2e['length']+'\x20dataset(s),\x20generated\x20'+_0x2b7e69['modelCount']+'\x20model(s)'),logger[_0xf3ef7d(0x16f)]('create',_0xf3ef7d(0x198)+_0x1448ff[_0xf3ef7d(0x1ab)]),_0x26ee34(!![]);}catch(_0x3c4d3c){console[_0xf3ef7d(0x1a1)]('!\x20API\x20configuration\x20pull\x20error,\x20project\x20created,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0xf3ef7d(0x177)](_0xf3ef7d(0x16b),'API\x20配置拉取异常',{'error':_0x3c4d3c instanceof Error?_0x3c4d3c[_0xf3ef7d(0x166)]:String(_0x3c4d3c)});}finally{process['chdir'](_0x1fb885);}}logger[_0xf3ef7d(0x185)](_0xf3ef7d(0x16b),'项目创建完成:\x20'+_0x1448ff['projectName']),_0x1caa91(!![]),_0x148231(![]);}catch(_0x349732){logger[_0xf3ef7d(0x193)]('create',_0xf3ef7d(0x18e)+_0x1448ff[_0xf3ef7d(0x17b)],{'error':_0x349732 instanceof Error?_0x349732[_0xf3ef7d(0x166)]:String(_0x349732)});try{a88_0x345ca1['existsSync'](_0x43eddc)&&(console[_0xf3ef7d(0x1a1)](_0xf3ef7d(0x1a0)+_0x43eddc),a88_0x345ca1[_0xf3ef7d(0x15f)](_0x43eddc,{'recursive':!![],'force':!![]}));}catch(_0x1a335b){logger['warn'](_0xf3ef7d(0x16b),_0xf3ef7d(0x19b)+_0x43eddc);}_0x148231(![]),console[_0xf3ef7d(0x193)](_0xf3ef7d(0x182)+(_0x349732 instanceof Error?_0x349732[_0xf3ef7d(0x166)]:String(_0x349732)));}},_0x58b54c=async _0x2db9fc=>{const _0x59dfb5=a88_0x4d3e;await _0x3747f1({'projectName':_0x2db9fc,'env':_0x22e9f2[_0x59dfb5(0x171)]});},_0xf14b84=async _0x344507=>{const _0x4b83e6=a88_0x4d3e,_0x34bb5f=a88_0x43b42f[_0x4b83e6(0x194)](process[_0x4b83e6(0x174)](),_0x344507),_0x3091b0=a88_0x43b42f['join'](_0x34bb5f,'package.json');try{console[_0x4b83e6(0x1a1)](_0x4b83e6(0x173));const _0x4ced8b=fileURLToPath(import.meta.url),_0x1d67cc=a88_0x43b42f[_0x4b83e6(0x194)](a88_0x43b42f[_0x4b83e6(0x17e)](_0x4ced8b),_0x4b83e6(0x17a)),_0x530469=a88_0x43b42f[_0x4b83e6(0x196)](_0x1d67cc,_0x4b83e6(0x15b));let _0x48f488=_0x4b83e6(0x17d);try{const _0x1a33ae=JSON[_0x4b83e6(0x1ae)](a88_0x345ca1[_0x4b83e6(0x1af)](_0x530469,_0x4b83e6(0x191)));_0x48f488=_0x1a33ae[_0x4b83e6(0x187)]||'1.0.0';}catch(_0x2e75d6){}const _0x5d831b=a88_0x345ca1[_0x4b83e6(0x1af)](_0x3091b0,_0x4b83e6(0x191)),_0x3458aa=JSON[_0x4b83e6(0x1ae)](_0x5d831b);_0x3458aa[_0x4b83e6(0x169)]=_0x344507,_0x3458aa[_0x4b83e6(0x15e)]=_0x344507+_0x4b83e6(0x1a9)+_0x48f488,a88_0x345ca1[_0x4b83e6(0x189)](_0x3091b0,JSON['stringify'](_0x3458aa,null,0x2)+'\x0a','utf8'),console[_0x4b83e6(0x1a1)](_0x4b83e6(0x1a8)+_0x344507),logger[_0x4b83e6(0x16f)]('create','更新\x20package.json\x20name');}catch(_0x2c0e79){logger[_0x4b83e6(0x193)]('create',_0x4b83e6(0x186));throw _0x2c0e79;}},_0x3d9f82=async(_0x145989,_0x375121,_0x3893ec)=>{const _0x5117da=a88_0x4d3e,_0x1aeb33=a88_0x43b42f[_0x5117da(0x194)](process[_0x5117da(0x174)](),_0x145989),_0x42c13b=a88_0x43b42f[_0x5117da(0x196)](_0x1aeb33,NEW_CONFIG_NAME);try{_0x375121?console[_0x5117da(0x1a1)](_0x5117da(0x180)+_0x145989+':\x20'+_0x375121):console[_0x5117da(0x1a1)](_0x5117da(0x164)+_0x145989);const _0x557a0b=fileURLToPath(import.meta.url),_0x324ba5=a88_0x43b42f[_0x5117da(0x194)](a88_0x43b42f['dirname'](_0x557a0b),'../..'),_0x4c835e=a88_0x43b42f['join'](_0x324ba5,_0x5117da(0x15b));let _0x256143=_0x5117da(0x17d);try{const _0x5cda48=JSON[_0x5117da(0x1ae)](a88_0x345ca1['readFileSync'](_0x4c835e,_0x5117da(0x191)));_0x256143=_0x5cda48[_0x5117da(0x187)]||_0x5117da(0x17d);}catch{}const _0x7430be=readConfig(),_0x51d112=typeof _0x7430be[_0x5117da(0x171)]===_0x5117da(0x190)?_0x7430be[_0x5117da(0x171)]:undefined,{app:_0x384cb1,appcode:_0x43b895,..._0x517ef7}=_0x7430be,_0x37dc3={..._0x517ef7,'appcode':_0x375121||'','env':_0x3893ec||_0x51d112||_0x5117da(0x1a5),'createdAt':new Date()[_0x5117da(0x18f)](),'version':_0x256143};writeConfigFile(_0x42c13b,_0x37dc3),_0x375121?console[_0x5117da(0x1a1)](_0x5117da(0x179)+_0x375121):console[_0x5117da(0x1a1)](_0x5117da(0x197)),logger[_0x5117da(0x16f)](_0x5117da(0x16b),_0x5117da(0x1a6)+_0x375121);}catch(_0x1dbd8a){logger[_0x5117da(0x193)](_0x5117da(0x16b),_0x5117da(0x1a4));}};useEffect(()=>{const _0xf8fed2=a88_0x4d3e;_0x22e9f2[_0xf8fed2(0x178)]&&_0x58b54c(_0x22e9f2[_0xf8fed2(0x178)]);},[_0x22e9f2[_0x347452(0x178)]]);if(!_0xe58826&&!_0x3499b0&&!_0x22e9f2[_0x347452(0x178)])return a88_0x165e89(EnhancedGuidedCreate,{'onCreate':_0x3747f1,'env':_0x22e9f2[_0x347452(0x171)]});if(_0xe58826)return a88_0x3d4fb7(a88_0x187d90,{'children':[a88_0x3d4fb7(Box,{'marginTop':0x1,'children':[a88_0x165e89(Box,{'width':'1'}),a88_0x165e89(Text,{'color':_0x347452(0x19f),'children':'\x20√\x20'}),a88_0x165e89(Text,{'children':_0x347452(0x176)}),a88_0x165e89(Text,{'color':_0x347452(0x19f),'children':_0xcde3ea?.[_0x347452(0x17b)]}),_0xcde3ea?.['appCode']&&a88_0x3d4fb7(a88_0x187d90,{'children':[a88_0x165e89(Text,{'children':_0x347452(0x162)}),a88_0x165e89(Text,{'color':_0x347452(0x1a7),'children':_0xcde3ea[_0x347452(0x1ab)]})]})]}),a88_0x165e89(TaskRunning,{..._0x48cdc9}),a88_0x165e89(TaskRunning,{..._0x190789}),a88_0x165e89(TaskRunning,{..._0x41ffd4})]});if(_0x3499b0)return a88_0x3d4fb7(a88_0x187d90,{'children':[a88_0x3d4fb7(Box,{'marginTop':0x1,'children':[a88_0x165e89(Box,{'width':'1'}),a88_0x165e89(Text,{'color':_0x347452(0x19f),'children':_0x347452(0x19c)}),a88_0x165e89(Text,{'children':_0x347452(0x176)}),a88_0x165e89(Text,{'color':'green','children':_0xcde3ea?.['projectName']}),_0xcde3ea?.[_0x347452(0x1ab)]&&a88_0x3d4fb7(a88_0x187d90,{'children':[a88_0x165e89(Text,{'children':'\x20|\x20AppCode:\x20'}),a88_0x165e89(Text,{'color':_0x347452(0x1a7),'children':_0xcde3ea[_0x347452(0x1ab)]})]})]}),a88_0x165e89(TaskFinished,{..._0x48cdc9}),a88_0x165e89(TaskFinished,{..._0x190789}),a88_0x165e89(TaskFinished,{..._0x41ffd4}),a88_0x165e89(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a88_0x165e89(Text,{'color':'green','children':'─'[_0x347452(0x181)](0x3c)})}),a88_0x165e89(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a88_0x165e89(Text,{'color':_0x347452(0x1a7),'bold':!![],'children':_0x347452(0x1ad)})}),a88_0x3d4fb7(Box,{'marginLeft':0x2,'flexDirection':'column','children':[a88_0x3d4fb7(Box,{'children':[a88_0x165e89(Text,{'color':_0x347452(0x19f),'children':_0x347452(0x15a)}),a88_0x165e89(Text,{'color':_0x347452(0x170),'children':_0x347452(0x161)}),a88_0x165e89(Text,{'color':_0x347452(0x1a7),'bold':!![],'children':_0x347452(0x15c)+_0xcde3ea?.[_0x347452(0x17b)]+_0x347452(0x19a)})]}),_0xcde3ea?.[_0x347452(0x1ab)]&&!_0x1a1aa1&&a88_0x3d4fb7(Box,{'marginTop':0x1,'children':[a88_0x165e89(Text,{'color':'yellow','children':_0x347452(0x18c)}),a88_0x165e89(Text,{'color':'white','children':'Pull\x20API\x20configuration:'}),a88_0x165e89(Text,{'color':_0x347452(0x1a7),'bold':!![],'children':_0x347452(0x167)})]})]}),a88_0x165e89(Box,{'marginTop':0x1,'children':a88_0x165e89(Text,{'color':_0x347452(0x19f),'children':'─'[_0x347452(0x181)](0x3c)})})]});return null;}
|
|
1
|
+
(function(_0x8ad4d4,_0x44270d){const _0x388d0a=a86_0xb9e6,_0x410070=_0x8ad4d4();while(!![]){try{const _0x1d04bf=-parseInt(_0x388d0a(0x11f))/0x1*(parseInt(_0x388d0a(0x100))/0x2)+parseInt(_0x388d0a(0xf5))/0x3*(parseInt(_0x388d0a(0x12b))/0x4)+parseInt(_0x388d0a(0x117))/0x5*(parseInt(_0x388d0a(0x12d))/0x6)+parseInt(_0x388d0a(0x103))/0x7*(parseInt(_0x388d0a(0x144))/0x8)+parseInt(_0x388d0a(0x13c))/0x9*(-parseInt(_0x388d0a(0x13b))/0xa)+-parseInt(_0x388d0a(0x121))/0xb+parseInt(_0x388d0a(0x107))/0xc*(parseInt(_0x388d0a(0xf1))/0xd);if(_0x1d04bf===_0x44270d)break;else _0x410070['push'](_0x410070['shift']());}catch(_0x70f18c){_0x410070['push'](_0x410070['shift']());}}}(a86_0x3094,0xc83d7));import{jsx as a86_0x537554,Fragment as a86_0xecc98d,jsxs as a86_0x1018a2}from'react/jsx-runtime';import a86_0x3d3fd3 from'path';import a86_0x39eb60 from'fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{fetchModelList}from'../api/fetch-model-list.js';import{generateApiFile}from'../api/generate-api-file.js';import{initEnv}from'../constant/env.js';import{readConfig}from'../utils/config.js';function a86_0xb9e6(_0x2e35e3,_0x5f2552){_0x2e35e3=_0x2e35e3-0xe7;const _0x30943b=a86_0x3094();let _0xb9e675=_0x30943b[_0x2e35e3];return _0xb9e675;}import{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';function a86_0x3094(){const _0xfb9cc3=['\x20&&\x20rabetbase\x20run\x20start','1.\x20','cwd','length','parse','304VnbILa','warn','26748sHbdUG','accessSync','info','column','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','√\x20package.json\x20updated:\x20name=','string','\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name','resolve','green','./src/api/','writeFileSync','stringify','white','194760LGNiVI','153lqWDxB','API\x20配置拉取异常','配置应用AppCode:\x20','√\x20Pulled\x20','W_OK','projectCode','Project\x20directory\x20','\x20dataset(s),\x20generated\x20','1535816upQYII','version','projectName','开始创建项目:\x20','constants','chdir','更新\x20package.json\x20name','Project\x20name:\x20','🚀\x20Next\x20Steps:','项目创建失败:\x20','env','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','CLI\x20版本检查','1733134TMRVnK','cyan','dirname','description','10839tnuJXX','currentVersion','cd\x20','create','repeat','Project\x20name\x20contains\x20invalid\x20characters.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','modelCount','*\x20Pulling\x20API\x20configuration...','*\x20Configuring\x20AppCode\x20for\x20project\x20','trim','join','34186vKDdjD','message','doTask','14GtOdZU','cookie','×\x20Project\x20creation\x20failed:\x20','appCode','60TrXHrr','toLocaleString','utf8','rmSync','stableVersion','production','1.0.0','rabetbase\x20api\x20pull','../..','setLogPath','\x20√\x20','\x20|\x20AppCode:\x20','existsSync','success','API\x20configuration\x20pulled:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','125EpvKMZ','\x20model(s)','更新\x20package.json\x20失败','!\x20API\x20configuration\x20pull\x20error,\x20project\x20created,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','yellow','package.json','Start\x20project:','needsUpgrade','5pwGqbo','log','2198262KOrObO','error','readFileSync','then','配置应用AppCode失败'];a86_0x3094=function(){return _0xfb9cc3;};return a86_0x3094();}export function CreateApp(_0x5e2adf){const _0x249422=a86_0xb9e6,[_0x3b7601,_0x56e2d5]=useState(![]),[_0x2802df,_0xed1e45]=useState(![]),[_0xcee65c,_0x4b5b53]=useState(![]),[_0x3dede1,_0x5d6e2e]=useState(null),_0x58ab5a=useCopyProjectTemplate(),_0x32bbbd=useInstallDependencies(),_0x14c100=useFormatCode();useEffect(()=>{const _0x48331d=a86_0xb9e6;checkCliVersion()[_0x48331d(0x124)](_0x164a1f=>{const _0x407288=_0x48331d;_0x164a1f[_0x407288(0x11e)]&&(printCliUpgradeWarning(_0x164a1f),logger['info'](_0x407288(0xf8),_0x407288(0xf0),{'currentVersion':_0x164a1f[_0x407288(0xf6)],'stableVersion':_0x164a1f[_0x407288(0x10b)],'needsUpgrade':_0x164a1f['needsUpgrade']}));});},[]);const _0x385c3c=async _0x2494d6=>{const _0x5bd11a=a86_0xb9e6;if(!_0x2494d6[_0x5bd11a(0x146)]||_0x2494d6['projectName'][_0x5bd11a(0xfe)]()===''){console[_0x5bd11a(0x122)]('Project\x20name\x20cannot\x20be\x20empty');return;}const _0x1fa53a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1fa53a['test'](_0x2494d6['projectName'])){console[_0x5bd11a(0x122)](_0x5bd11a(0xfa));return;}if(_0x2494d6[_0x5bd11a(0x146)][_0x5bd11a(0x129)]>0x64){console['error'](_0x5bd11a(0x116));return;}const _0x4b57b5=a86_0x3d3fd3[_0x5bd11a(0x135)](process[_0x5bd11a(0x128)](),_0x2494d6[_0x5bd11a(0x146)]);if(a86_0x39eb60[_0x5bd11a(0x113)](_0x4b57b5)){console[_0x5bd11a(0x122)](_0x5bd11a(0x142)+_0x2494d6[_0x5bd11a(0x146)]+_0x5bd11a(0x134));return;}try{const _0x241693=a86_0x3d3fd3[_0x5bd11a(0xf3)](_0x4b57b5);a86_0x39eb60[_0x5bd11a(0x12e)](_0x241693,a86_0x39eb60[_0x5bd11a(0xe7)][_0x5bd11a(0x140)]);}catch(_0x5be97a){console[_0x5bd11a(0x122)]('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');return;}_0x5d6e2e(_0x2494d6),_0x56e2d5(!![]),logger[_0x5bd11a(0x110)](_0x4b57b5),logger[_0x5bd11a(0x12f)](_0x5bd11a(0xf8),_0x5bd11a(0x147)+_0x2494d6['projectName'],{'projectDir':_0x4b57b5,'appCode':_0x2494d6[_0x5bd11a(0x106)]});try{await _0x58ab5a[_0x5bd11a(0x102)](_0x2494d6[_0x5bd11a(0x146)]),await _0x1b161d(_0x2494d6['projectName']),await _0x32bbbd[_0x5bd11a(0x102)](_0x2494d6[_0x5bd11a(0x146)]),await _0x14c100[_0x5bd11a(0x102)](_0x2494d6[_0x5bd11a(0x146)]),await _0x2e2fe5(_0x2494d6[_0x5bd11a(0x146)],_0x2494d6[_0x5bd11a(0x106)]||'',_0x2494d6['env']);if(_0x2494d6[_0x5bd11a(0x106)]){console[_0x5bd11a(0x120)](_0x5bd11a(0xfc));const _0x31086f=process[_0x5bd11a(0x128)]();try{process[_0x5bd11a(0xe8)](_0x4b57b5);const _0x4fb328=_0x2494d6['env']||_0x5bd11a(0x10c);initEnv(_0x4fb328);const {configArray:_0x38a04b}=await fetchModelList(_0x2494d6['appCode'],_0x5e2adf[_0x5bd11a(0x104)]||''),_0x19bbb2=_0x5bd11a(0x137),_0x4530e9=await generateApiFile(_0x38a04b,'',_0x2494d6[_0x5bd11a(0x106)],!![],_0x4fb328,_0x19bbb2);console[_0x5bd11a(0x120)](_0x5bd11a(0x13f)+_0x38a04b[_0x5bd11a(0x129)]+_0x5bd11a(0x143)+_0x4530e9[_0x5bd11a(0xfb)]+_0x5bd11a(0x118)),logger[_0x5bd11a(0x12f)](_0x5bd11a(0xf8),_0x5bd11a(0x115)+_0x2494d6[_0x5bd11a(0x106)]),_0x4b5b53(!![]);}catch(_0x3e2a5b){console[_0x5bd11a(0x120)](_0x5bd11a(0x11a)),logger[_0x5bd11a(0x12c)](_0x5bd11a(0xf8),_0x5bd11a(0x13d),{'error':_0x3e2a5b instanceof Error?_0x3e2a5b[_0x5bd11a(0x101)]:String(_0x3e2a5b)});}finally{process[_0x5bd11a(0xe8)](_0x31086f);}}logger[_0x5bd11a(0x114)](_0x5bd11a(0xf8),'项目创建完成:\x20'+_0x2494d6[_0x5bd11a(0x146)]),_0xed1e45(!![]),_0x56e2d5(![]);}catch(_0x318236){logger[_0x5bd11a(0x122)](_0x5bd11a(0xf8),_0x5bd11a(0xec)+_0x2494d6[_0x5bd11a(0x146)],{'error':_0x318236 instanceof Error?_0x318236['message']:String(_0x318236)});try{a86_0x39eb60['existsSync'](_0x4b57b5)&&(console[_0x5bd11a(0x120)](_0x5bd11a(0xee)+_0x4b57b5),a86_0x39eb60[_0x5bd11a(0x10a)](_0x4b57b5,{'recursive':!![],'force':!![]}));}catch(_0x14a475){logger[_0x5bd11a(0x12c)]('create','清理项目目录失败:\x20'+_0x4b57b5);}_0x56e2d5(![]),console[_0x5bd11a(0x122)](_0x5bd11a(0x105)+(_0x318236 instanceof Error?_0x318236[_0x5bd11a(0x101)]:String(_0x318236)));}},_0x20be04=async _0xa3a559=>{await _0x385c3c({'projectName':_0xa3a559,'env':_0x5e2adf['env']});},_0x1b161d=async _0x51376a=>{const _0x4ec0ef=a86_0xb9e6,_0x309b47=a86_0x3d3fd3[_0x4ec0ef(0x135)](process[_0x4ec0ef(0x128)](),_0x51376a),_0x25a97a=a86_0x3d3fd3[_0x4ec0ef(0xff)](_0x309b47,_0x4ec0ef(0x11c));try{console[_0x4ec0ef(0x120)](_0x4ec0ef(0xef));const _0xba867b=fileURLToPath(import.meta.url),_0x286be5=a86_0x3d3fd3['resolve'](a86_0x3d3fd3[_0x4ec0ef(0xf3)](_0xba867b),_0x4ec0ef(0x10f)),_0x539560=a86_0x3d3fd3[_0x4ec0ef(0xff)](_0x286be5,'package.json');let _0x5cafcb='1.0.0';try{const _0x13e6e9=JSON[_0x4ec0ef(0x12a)](a86_0x39eb60[_0x4ec0ef(0x123)](_0x539560,_0x4ec0ef(0x109)));_0x5cafcb=_0x13e6e9['version']||_0x4ec0ef(0x10d);}catch(_0x36525a){}const _0x26e5dd=a86_0x39eb60[_0x4ec0ef(0x123)](_0x25a97a,'utf8'),_0x4c537b=JSON[_0x4ec0ef(0x12a)](_0x26e5dd);_0x4c537b['name']=_0x51376a,_0x4c537b[_0x4ec0ef(0xf4)]=_0x51376a+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x5cafcb,a86_0x39eb60[_0x4ec0ef(0x138)](_0x25a97a,JSON[_0x4ec0ef(0x139)](_0x4c537b,null,0x2)+'\x0a',_0x4ec0ef(0x109)),console[_0x4ec0ef(0x120)](_0x4ec0ef(0x132)+_0x51376a),logger[_0x4ec0ef(0x12f)](_0x4ec0ef(0xf8),_0x4ec0ef(0xe9));}catch(_0x60ee06){logger[_0x4ec0ef(0x122)]('create',_0x4ec0ef(0x119));throw _0x60ee06;}},_0x2e2fe5=async(_0x343802,_0x2c9902,_0xfc15c0)=>{const _0x3db85d=a86_0xb9e6,_0x1e62d6=a86_0x3d3fd3[_0x3db85d(0x135)](process[_0x3db85d(0x128)](),_0x343802),_0xcc5e02=a86_0x3d3fd3[_0x3db85d(0xff)](_0x1e62d6,NEW_CONFIG_NAME);try{_0x2c9902?console[_0x3db85d(0x120)](_0x3db85d(0xfd)+_0x343802+':\x20'+_0x2c9902):console['log']('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x343802);const _0x39d7e2=fileURLToPath(import.meta.url),_0x2f8ed2=a86_0x3d3fd3[_0x3db85d(0x135)](a86_0x3d3fd3[_0x3db85d(0xf3)](_0x39d7e2),'../..'),_0x464c26=a86_0x3d3fd3[_0x3db85d(0xff)](_0x2f8ed2,_0x3db85d(0x11c));let _0x40230f=_0x3db85d(0x10d);try{const _0x442ccc=JSON[_0x3db85d(0x12a)](a86_0x39eb60[_0x3db85d(0x123)](_0x464c26,_0x3db85d(0x109)));_0x40230f=_0x442ccc[_0x3db85d(0x145)]||_0x3db85d(0x10d);}catch{}const _0x48f2bf=readConfig(),_0x548e5f=typeof _0x48f2bf['env']===_0x3db85d(0x133)?_0x48f2bf['env']:undefined,{app:_0x3aa288,appcode:_0x52c1d3,..._0x1651c0}=_0x48f2bf,_0x3c29f6={..._0x1651c0,'appcode':_0x2c9902||'','env':_0xfc15c0||_0x548e5f||_0x3db85d(0x10c),'createdAt':new Date()[_0x3db85d(0x108)](),'version':_0x40230f};writeConfigFile(_0xcc5e02,_0x3c29f6),_0x2c9902?console[_0x3db85d(0x120)](_0x3db85d(0x131)+_0x2c9902):console['log']('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27rabetbase\x20config\x20set\x20appcode\x20<app-code>\x27'),logger['info'](_0x3db85d(0xf8),_0x3db85d(0x13e)+_0x2c9902);}catch(_0x3b527f){logger[_0x3db85d(0x122)](_0x3db85d(0xf8),_0x3db85d(0x125));}};useEffect(()=>{const _0x2d8fcb=a86_0xb9e6;_0x5e2adf[_0x2d8fcb(0x141)]&&_0x20be04(_0x5e2adf[_0x2d8fcb(0x141)]);},[_0x5e2adf[_0x249422(0x141)]]);if(!_0x3b7601&&!_0x2802df&&!_0x5e2adf[_0x249422(0x141)])return a86_0x537554(EnhancedGuidedCreate,{'onCreate':_0x385c3c,'env':_0x5e2adf[_0x249422(0xed)]});if(_0x3b7601)return a86_0x1018a2(a86_0xecc98d,{'children':[a86_0x1018a2(Box,{'marginTop':0x1,'children':[a86_0x537554(Box,{'width':'1'}),a86_0x537554(Text,{'color':'green','children':_0x249422(0x111)}),a86_0x537554(Text,{'children':_0x249422(0xea)}),a86_0x537554(Text,{'color':_0x249422(0x136),'children':_0x3dede1?.[_0x249422(0x146)]}),_0x3dede1?.[_0x249422(0x106)]&&a86_0x1018a2(a86_0xecc98d,{'children':[a86_0x537554(Text,{'children':_0x249422(0x112)}),a86_0x537554(Text,{'color':_0x249422(0xf2),'children':_0x3dede1[_0x249422(0x106)]})]})]}),a86_0x537554(TaskRunning,{..._0x58ab5a}),a86_0x537554(TaskRunning,{..._0x32bbbd}),a86_0x537554(TaskRunning,{..._0x14c100})]});if(_0x2802df)return a86_0x1018a2(a86_0xecc98d,{'children':[a86_0x1018a2(Box,{'marginTop':0x1,'children':[a86_0x537554(Box,{'width':'1'}),a86_0x537554(Text,{'color':_0x249422(0x136),'children':'\x20√\x20'}),a86_0x537554(Text,{'children':_0x249422(0xea)}),a86_0x537554(Text,{'color':'green','children':_0x3dede1?.[_0x249422(0x146)]}),_0x3dede1?.[_0x249422(0x106)]&&a86_0x1018a2(a86_0xecc98d,{'children':[a86_0x537554(Text,{'children':_0x249422(0x112)}),a86_0x537554(Text,{'color':_0x249422(0xf2),'children':_0x3dede1[_0x249422(0x106)]})]})]}),a86_0x537554(TaskFinished,{..._0x58ab5a}),a86_0x537554(TaskFinished,{..._0x32bbbd}),a86_0x537554(TaskFinished,{..._0x14c100}),a86_0x537554(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a86_0x537554(Text,{'color':_0x249422(0x136),'children':'─'[_0x249422(0xf9)](0x3c)})}),a86_0x537554(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a86_0x537554(Text,{'color':_0x249422(0xf2),'bold':!![],'children':_0x249422(0xeb)})}),a86_0x1018a2(Box,{'marginLeft':0x2,'flexDirection':_0x249422(0x130),'children':[a86_0x1018a2(Box,{'children':[a86_0x537554(Text,{'color':'green','children':_0x249422(0x127)}),a86_0x537554(Text,{'color':'white','children':_0x249422(0x11d)}),a86_0x537554(Text,{'color':_0x249422(0xf2),'bold':!![],'children':_0x249422(0xf7)+_0x3dede1?.[_0x249422(0x146)]+_0x249422(0x126)})]}),_0x3dede1?.[_0x249422(0x106)]&&!_0xcee65c&&a86_0x1018a2(Box,{'marginTop':0x1,'children':[a86_0x537554(Text,{'color':_0x249422(0x11b),'children':'2.\x20'}),a86_0x537554(Text,{'color':_0x249422(0x13a),'children':'Pull\x20API\x20configuration:'}),a86_0x537554(Text,{'color':_0x249422(0xf2),'bold':!![],'children':_0x249422(0x10e)})]})]}),a86_0x537554(Box,{'marginTop':0x1,'children':a86_0x537554(Text,{'color':_0x249422(0x136),'children':'─'['repeat'](0x3c)})})]});return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4d4efc,_0x40678f){const _0x2035af=a87_0x49e4,_0x390c58=_0x4d4efc();while(!![]){try{const _0x574704=parseInt(_0x2035af(0x195))/0x1*(-parseInt(_0x2035af(0x1ae))/0x2)+-parseInt(_0x2035af(0x18f))/0x3+-parseInt(_0x2035af(0x18c))/0x4*(-parseInt(_0x2035af(0x183))/0x5)+parseInt(_0x2035af(0x1a5))/0x6*(-parseInt(_0x2035af(0x199))/0x7)+parseInt(_0x2035af(0x19a))/0x8+-parseInt(_0x2035af(0x188))/0x9*(-parseInt(_0x2035af(0x18b))/0xa)+parseInt(_0x2035af(0x1b1))/0xb*(parseInt(_0x2035af(0x1a2))/0xc);if(_0x574704===_0x40678f)break;else _0x390c58['push'](_0x390c58['shift']());}catch(_0x3d6153){_0x390c58['push'](_0x390c58['shift']());}}}(a87_0x4788,0x6686d));import a87_0x1a102a from'path';import{fileURLToPath}from'url';import a87_0x323f8c from'fs/promises';import{existsSync}from'fs';function a87_0x49e4(_0x2e519a,_0xf99f66){_0x2e519a=_0x2e519a-0x17e;const _0x4788e3=a87_0x4788();let _0x49e40b=_0x4788e3[_0x2e519a];return _0x49e40b;}import{exec,execSync}from'child_process';import{copyDirectory}from'../utils/copy-directory.js';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';const execAsync=promisify(exec);function getTemplateDir(){const _0x511930=a87_0x49e4,_0x3bbbff=fileURLToPath(import.meta.url),_0x44f948=a87_0x1a102a[_0x511930(0x197)](_0x3bbbff);return a87_0x1a102a[_0x511930(0x1a4)](_0x44f948,_0x511930(0x1ab));}function a87_0x4788(){const _0x27a091=['391835snEjhq','\x20\x20√\x20Code\x20formatted','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','W_OK','message','603lqPDqy','\x0a\x20\x20cd\x20','trim','45130ZEZvGJ','32XcXIIu','ignore','\x20\x20rabetbase\x20run\x20start\x0a','1066281bVkMqX','exit','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','bun\x20--version','\x20\x20√\x20package.json\x20updated','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','837541DiZmlf','writeFile','dirname','依赖安装失败:\x20','7RqYElU','2918184AugUgN','log','×\x20Project\x20creation\x20failed:\x20','env','\x20\x20√\x20Environment\x20configured','stringify','\x20\x20√\x20Project\x20template\x20created','...','2784EkmXsq','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','resolve','855666SZvYtM','readFile','package.json','name','parse','bun\x20run\x20format','../../templates/projects/sub-app-react-demo','length','utf-8','2LtBYAq','\x20install','join','21879PzayXG','access','\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name','constants','cwd','needsUpgrade','error'];a87_0x4788=function(){return _0x27a091;};return a87_0x4788();}export async function createProjectNonInteractive(_0x383789,_0xd33d01){const _0x19be74=a87_0x49e4,_0x84374=await checkCliVersion();_0x84374[_0x19be74(0x181)]&&printCliUpgradeWarning(_0x84374);(!_0x383789||_0x383789[_0x19be74(0x18a)]()==='')&&(console[_0x19be74(0x182)]('Project\x20name\x20cannot\x20be\x20empty'),process[_0x19be74(0x190)](0x1));const _0x3ab905=/[<>:"|?*\x00-\x1f\x7f]/;_0x3ab905['test'](_0x383789)&&(console[_0x19be74(0x182)]('Project\x20name\x20contains\x20invalid\x20characters.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters'),process[_0x19be74(0x190)](0x1));_0x383789[_0x19be74(0x1ac)]>0x64&&(console['error'](_0x19be74(0x194)),process['exit'](0x1));const _0x5c1b1f=a87_0x1a102a[_0x19be74(0x1a4)](process[_0x19be74(0x180)](),_0x383789);existsSync(_0x5c1b1f)&&(console[_0x19be74(0x182)]('Project\x20directory\x20'+_0x383789+_0x19be74(0x17e)),process[_0x19be74(0x190)](0x1));try{const _0x3a27cd=a87_0x1a102a[_0x19be74(0x197)](_0x5c1b1f);await a87_0x323f8c[_0x19be74(0x1b2)](_0x3a27cd,a87_0x323f8c[_0x19be74(0x17f)][_0x19be74(0x186)]);}catch(_0x13ba69){console[_0x19be74(0x182)](_0x19be74(0x185)),process[_0x19be74(0x190)](0x1);}try{console['log']('*\x20Creating\x20project\x20'+_0x383789+_0x19be74(0x1a1));const _0x1dfb4e=getTemplateDir();await copyDirectory(_0x1dfb4e,_0x5c1b1f),console['log'](_0x19be74(0x1a0)),await updatePackageJsonName(_0x383789),console[_0x19be74(0x19b)](_0x19be74(0x193)),console[_0x19be74(0x19b)]('\x20\x20Installing\x20dependencies...'),console[_0x19be74(0x19b)](_0x19be74(0x1a3)),await formatCode(_0x5c1b1f),console[_0x19be74(0x19b)](_0x19be74(0x184)),await configureAppEnv(_0x383789,_0xd33d01),console['log'](_0x19be74(0x19e)),console[_0x19be74(0x19b)]('\x0a√\x20Project\x20'+_0x383789+'\x20created\x20successfully!'),console[_0x19be74(0x19b)](_0x19be74(0x189)+_0x383789),console[_0x19be74(0x19b)](_0x19be74(0x18e));}catch(_0x7e3e1d){const _0x4e2d4d=_0x7e3e1d instanceof Error?_0x7e3e1d[_0x19be74(0x187)]:String(_0x7e3e1d);try{existsSync(_0x5c1b1f)&&await a87_0x323f8c['rm'](_0x5c1b1f,{'recursive':!![],'force':!![]});}catch{}console[_0x19be74(0x182)](_0x19be74(0x19c)+_0x4e2d4d),process[_0x19be74(0x190)](0x1);}}async function updatePackageJsonName(_0x2ecef8){const _0xd53a80=a87_0x49e4,_0x5e4903=a87_0x1a102a[_0xd53a80(0x1a4)](process[_0xd53a80(0x180)](),_0x2ecef8),_0x47d4ca=a87_0x1a102a[_0xd53a80(0x1b0)](_0x5e4903,_0xd53a80(0x1a7)),_0x4effe0=await a87_0x323f8c[_0xd53a80(0x1a6)](_0x47d4ca,_0xd53a80(0x1ad)),_0x143512=JSON[_0xd53a80(0x1a9)](_0x4effe0);_0x143512[_0xd53a80(0x1a8)]=_0x2ecef8,_0x143512['description']=_0xd53a80(0x191),await a87_0x323f8c['writeFile'](_0x47d4ca,JSON[_0xd53a80(0x19f)](_0x143512,null,0x2)+'\x0a');}async function installDependencies(_0x26f176){const _0x3eaaad=a87_0x49e4,_0x3cb9f4=detectPackageManager(),_0x232845=_0x3cb9f4+_0x3eaaad(0x1af);try{await execAsync(_0x232845,{'cwd':_0x26f176});}catch(_0x10bfc6){throw new Error(_0x3eaaad(0x198)+_0x10bfc6);}}function detectPackageManager(){const _0x1991e5=a87_0x49e4;try{return execSync(_0x1991e5(0x192),{'stdio':_0x1991e5(0x18d)}),'bun';}catch{return'npm';}}async function formatCode(_0x5c88ad){const _0xb7fe09=a87_0x49e4;try{await execAsync(_0xb7fe09(0x1aa),{'cwd':_0x5c88ad});}catch{}}async function configureAppEnv(_0x71ddd0,_0x3931dc){const _0x358a42=a87_0x49e4,_0x45249b=a87_0x1a102a['resolve'](process[_0x358a42(0x180)](),_0x71ddd0),_0x445e71=a87_0x1a102a[_0x358a42(0x1b0)](_0x45249b,'rabetbase.config.json');let _0x35dd07={};if(existsSync(_0x445e71)){const _0x526c20=await a87_0x323f8c[_0x358a42(0x1a6)](_0x445e71,_0x358a42(0x1ad));_0x35dd07=JSON[_0x358a42(0x1a9)](_0x526c20);}_0x3931dc&&(_0x35dd07[_0x358a42(0x19d)]=_0x3931dc),await a87_0x323f8c[_0x358a42(0x196)](_0x445e71,JSON[_0x358a42(0x19f)](_0x35dd07,null,0x2)+'\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3012b0,_0x52fd9a){var _0x2bb484=a88_0x38c4,_0x189c6a=_0x3012b0();while(!![]){try{var _0x2fdc5e=-parseInt(_0x2bb484(0x7b))/0x1+parseInt(_0x2bb484(0x7d))/0x2+-parseInt(_0x2bb484(0x82))/0x3+-parseInt(_0x2bb484(0x81))/0x4+parseInt(_0x2bb484(0x7c))/0x5+parseInt(_0x2bb484(0x83))/0x6*(parseInt(_0x2bb484(0x7e))/0x7)+parseInt(_0x2bb484(0x7f))/0x8;if(_0x2fdc5e===_0x52fd9a)break;else _0x189c6a['push'](_0x189c6a['shift']());}catch(_0x5a85ac){_0x189c6a['push'](_0x189c6a['shift']());}}}(a88_0x15b6,0x57768));function a88_0x38c4(_0x18a14b,_0x49c09f){_0x18a14b=_0x18a14b-0x7b;var _0x15b6d3=a88_0x15b6();var _0x38c4a8=_0x15b6d3[_0x18a14b];return _0x38c4a8;}import{jsx as a88_0x29ea25,jsxs as a88_0x309428}from'react/jsx-runtime';import{Box,Text}from'ink';function a88_0x15b6(){var _0x1ec681=['1293775HTJFps','546838RFWakm','1481991vUCOGn','6045872bACiLl','taskName','110948pYRtEh','2038623AODzlo','12FMovoF','green','645808LXOhPZ'];a88_0x15b6=function(){return _0x1ec681;};return a88_0x15b6();}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x2399f1){var _0x46bc08=a88_0x38c4;return a88_0x309428(Box,{'children':[a88_0x29ea25(Box,{'width':'1'}),a88_0x29ea25(Text,{'color':_0x46bc08(0x84),'children':'\x20√\x20'}),a88_0x29ea25(Text,{'children':_0x2399f1[_0x46bc08(0x80)]}),a88_0x29ea25(TaskTime,{'elapsed':_0x2399f1['elapsed']})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x394e93,_0x3567b8){var _0x781b70=a89_0x13d7,_0x24be23=_0x394e93();while(!![]){try{var _0x26a7a5=-parseInt(_0x781b70(0x93))/0x1*(-parseInt(_0x781b70(0x9e))/0x2)+parseInt(_0x781b70(0x9d))/0x3+parseInt(_0x781b70(0x95))/0x4*(-parseInt(_0x781b70(0x97))/0x5)+parseInt(_0x781b70(0x99))/0x6+parseInt(_0x781b70(0xa0))/0x7+-parseInt(_0x781b70(0x98))/0x8+-parseInt(_0x781b70(0x96))/0x9;if(_0x26a7a5===_0x3567b8)break;else _0x24be23['push'](_0x24be23['shift']());}catch(_0x52ca12){_0x24be23['push'](_0x24be23['shift']());}}}(a89_0xcd9d,0x2cfa8));function a89_0x13d7(_0x54819d,_0x31497b){_0x54819d=_0x54819d-0x92;var _0xcd9df2=a89_0xcd9d();var _0x13d740=_0xcd9df2[_0x54819d];return _0x13d740;}import{jsx as a89_0x42db2e,jsxs as a89_0xd40eb8}from'react/jsx-runtime';import{Text}from'ink';import a89_0x492466 from'ink-spinner';export function TaskLoading(_0x4f2c42){var _0x4a599=a89_0x13d7;if(_0x4f2c42[_0x4a599(0x9c)])return a89_0x42db2e(Text,{'color':_0x4a599(0x94),'children':_0x4a599(0x92)});if(_0x4f2c42[_0x4a599(0x9f)])return a89_0xd40eb8(Text,{'color':_0x4a599(0x94),'children':['\x20',a89_0x42db2e(a89_0x492466,{'type':_0x4a599(0x9a)}),'\x20']});return a89_0x42db2e(Text,{'children':_0x4a599(0x9b)});}function a89_0xcd9d(){var _0x344fda=['2035894BibeAk','\x20√\x20','3jaOehh','green','194932qvuvFP','594081XUGJhr','25jdQlYe','2146456EJanFv','635898oiMAFR','dots','\x20\x20\x20','finished','494703rIWYIT','133658VXzrhL','loading'];a89_0xcd9d=function(){return _0x344fda;};return a89_0xcd9d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a90_0x36ea(_0x27ab4c,_0x4e71d6){_0x27ab4c=_0x27ab4c-0x1b1;var _0x286476=a90_0x2864();var _0x36ea6e=_0x286476[_0x27ab4c];return _0x36ea6e;}(function(_0xb50e10,_0x3ff218){var _0x7c64a0=a90_0x36ea,_0x456716=_0xb50e10();while(!![]){try{var _0x27ef84=parseInt(_0x7c64a0(0x1b7))/0x1+-parseInt(_0x7c64a0(0x1b2))/0x2+-parseInt(_0x7c64a0(0x1b8))/0x3+-parseInt(_0x7c64a0(0x1b4))/0x4+parseInt(_0x7c64a0(0x1b1))/0x5*(parseInt(_0x7c64a0(0x1b3))/0x6)+-parseInt(_0x7c64a0(0x1b6))/0x7+parseInt(_0x7c64a0(0x1b9))/0x8*(parseInt(_0x7c64a0(0x1b5))/0x9);if(_0x27ef84===_0x3ff218)break;else _0x456716['push'](_0x456716['shift']());}catch(_0x2314a0){_0x456716['push'](_0x456716['shift']());}}}(a90_0x2864,0xac44b));import{jsx as a90_0x100661,jsxs as a90_0x57aa2e}from'react/jsx-runtime';function a90_0x2864(){var _0x4f7288=['1786252dxoLnn','20574VQyQQd','4313120wLdesA','206882dKlJTK','1975773ktJyCf','8416WdbiEJ','elapsed','5qwluZY','1952088acMMiv','4747290mcrhir'];a90_0x2864=function(){return _0x4f7288;};return a90_0x2864();}import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x127496){var _0x23528e=a90_0x36ea;return a90_0x57aa2e(Box,{'children':[a90_0x100661(Box,{'width':'1'}),a90_0x100661(TaskLoading,{..._0x127496}),a90_0x100661(Text,{'children':_0x127496['taskName']}),a90_0x100661(TaskTime,{'elapsed':_0x127496[_0x23528e(0x1ba)]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x410148,_0x423614){var _0x49a54b=a91_0x2c3f,_0x4ea7dc=_0x410148();while(!![]){try{var _0x38c88d=parseInt(_0x49a54b(0x1d2))/0x1*(parseInt(_0x49a54b(0x1d9))/0x2)+-parseInt(_0x49a54b(0x1d1))/0x3+parseInt(_0x49a54b(0x1cf))/0x4*(-parseInt(_0x49a54b(0x1ce))/0x5)+-parseInt(_0x49a54b(0x1d8))/0x6*(parseInt(_0x49a54b(0x1d7))/0x7)+-parseInt(_0x49a54b(0x1d3))/0x8*(parseInt(_0x49a54b(0x1d6))/0x9)+-parseInt(_0x49a54b(0x1cc))/0xa*(parseInt(_0x49a54b(0x1d0))/0xb)+parseInt(_0x49a54b(0x1cb))/0xc*(parseInt(_0x49a54b(0x1cd))/0xd);if(_0x38c88d===_0x423614)break;else _0x4ea7dc['push'](_0x4ea7dc['shift']());}catch(_0x1be75c){_0x4ea7dc['push'](_0x4ea7dc['shift']());}}}(a91_0x1cee,0x3f6f7));import{jsx as a91_0x48d0a6,Fragment as a91_0x4ac2c9,jsxs as a91_0xb90b56}from'react/jsx-runtime';function a91_0x1cee(){var _0x43662a=['gray','elapsed','6363YhJfPl','495565kwaIQl','18otGZkw','274460AkHRpI','6036PTqwWf','2286430rhDjEi','37271DDZaWr','2126610FaZylQ','4xVEImx','11qqBGrk','619221PzLrLD','1xXCMOl','2792OnmeeX'];a91_0x1cee=function(){return _0x43662a;};return a91_0x1cee();}function a91_0x2c3f(_0x53c774,_0x142813){_0x53c774=_0x53c774-0x1cb;var _0x1cee5a=a91_0x1cee();var _0x2c3fec=_0x1cee5a[_0x53c774];return _0x2c3fec;}import{Text}from'ink';export function TaskTime(_0x4b74c3){var _0x5d932e=a91_0x2c3f;if(_0x4b74c3['elapsed'])return a91_0xb90b56(a91_0x4ac2c9,{'children':[a91_0x48d0a6(Text,{'color':_0x5d932e(0x1d4),'children':'\x20['}),a91_0x48d0a6(Text,{'color':'gray','bold':!![],'children':_0x4b74c3[_0x5d932e(0x1d5)]}),a91_0x48d0a6(Text,{'color':_0x5d932e(0x1d4),'children':']'})]});return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x5e12d7=a92_0x3385;(function(_0x109b11,_0x2331b2){const _0xdaefe1=a92_0x3385,_0x56f898=_0x109b11();while(!![]){try{const _0x4f2c22=-parseInt(_0xdaefe1(0x1c6))/0x1+parseInt(_0xdaefe1(0x1da))/0x2*(-parseInt(_0xdaefe1(0x1db))/0x3)+parseInt(_0xdaefe1(0x1ce))/0x4+parseInt(_0xdaefe1(0x1d8))/0x5*(-parseInt(_0xdaefe1(0x1cd))/0x6)+-parseInt(_0xdaefe1(0x1d2))/0x7+parseInt(_0xdaefe1(0x1c9))/0x8*(-parseInt(_0xdaefe1(0x1d5))/0x9)+parseInt(_0xdaefe1(0x1d1))/0xa;if(_0x4f2c22===_0x2331b2)break;else _0x56f898['push'](_0x56f898['shift']());}catch(_0x257113){_0x56f898['push'](_0x56f898['shift']());}}}(a92_0x4e1f,0x9c742));import a92_0x28437b from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';function a92_0x4e1f(){const _0x56fadc=['info','error','cwd','3018VfSffP','1184680fFkShn','项目模板复制失败','success','47280270GKHqiF','7229033VITiEm','message','开始复制项目模板','76887oiGCds','项目模板复制完成','now','11810KNIkKo','resolve','14TdElDU','324741QMrBgo','1182711kobxta','dirname','../../templates/projects/sub-app-react-demo','208eWNLxT'];a92_0x4e1f=function(){return _0x56fadc;};return a92_0x4e1f();}function a92_0x3385(_0x468234,_0x7b2a11){_0x468234=_0x468234-0x1c6;const _0x4e1ffc=a92_0x4e1f();let _0x33852e=_0x4e1ffc[_0x468234];return _0x33852e;}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a92_0x28437b[a92_0x5e12d7(0x1c7)](fileURLToPath(import.meta.url)),templateDir=a92_0x28437b[a92_0x5e12d7(0x1d9)](__dirname,a92_0x5e12d7(0x1c8));export function useCopyProjectTemplate(){const [_0x1ad428,_0x5a54f0]=useState(![]),[_0x5681ac,_0x1d2676]=useState(![]),[_0x5799b9,_0x4c238d]=useState(''),_0x1a6c55=useCallback(async _0x1a80b3=>{const _0x1a3a90=a92_0x3385,_0x314226=Date[_0x1a3a90(0x1d7)](),_0x416733=a92_0x28437b[_0x1a3a90(0x1d9)](process[_0x1a3a90(0x1cc)](),_0x1a80b3);_0x5a54f0(!![]);try{logger[_0x1a3a90(0x1ca)]('copy',_0x1a3a90(0x1d4),{'projectCode':_0x1a80b3,'templateDir':templateDir}),await copyDirectory(templateDir,_0x416733);const _0x252cb5=Date['now']()-_0x314226;logger[_0x1a3a90(0x1d0)]('copy',_0x1a3a90(0x1d6),_0x252cb5,{'projectCode':_0x1a80b3});}catch(_0x4d7553){const _0x42a1d4=Date[_0x1a3a90(0x1d7)]()-_0x314226;logger[_0x1a3a90(0x1cb)]('copy',_0x1a3a90(0x1cf),{'projectCode':_0x1a80b3,'error':_0x4d7553 instanceof Error?_0x4d7553[_0x1a3a90(0x1d3)]:String(_0x4d7553),'duration':_0x42a1d4});throw _0x4d7553;}finally{_0x5a54f0(![]),_0x1d2676(!![]),_0x4c238d(formatElapsed(_0x314226));}},[]);return{'taskName':'Copy\x20project\x20files','finished':_0x5681ac,'loading':_0x1ad428,'elapsed':_0x5799b9,'doTask':_0x1a6c55};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xe4f82,_0x52c6ef){const _0x3c4494=a93_0x32fc,_0x18b6d8=_0xe4f82();while(!![]){try{const _0x38eb54=parseInt(_0x3c4494(0xb6))/0x1+parseInt(_0x3c4494(0xb8))/0x2*(parseInt(_0x3c4494(0xc5))/0x3)+-parseInt(_0x3c4494(0xbd))/0x4+parseInt(_0x3c4494(0xb7))/0x5*(-parseInt(_0x3c4494(0xc4))/0x6)+-parseInt(_0x3c4494(0xb1))/0x7+parseInt(_0x3c4494(0xc3))/0x8+parseInt(_0x3c4494(0xb2))/0x9*(parseInt(_0x3c4494(0xb0))/0xa);if(_0x38eb54===_0x52c6ef)break;else _0x18b6d8['push'](_0x18b6d8['shift']());}catch(_0xccd12){_0x18b6d8['push'](_0x18b6d8['shift']());}}}(a93_0x2657,0x86865));import a93_0x52acde from'node:path';function a93_0x2657(){const _0x58dc52=['info','2388364glxFkX','success','format','resolve','Format\x20code','message','2518872DmYKGi','414126Laopvr','1236483mniYdq','代码格式化失败','10WjfulV','4589900jKYZQv','14578767cJjnPP','cwd','npx','prettier','216152SfKecq','55QOwVDk','2zDlHJW','error','now','--write'];a93_0x2657=function(){return _0x58dc52;};return a93_0x2657();}import{useCallback,useState}from'react';import{execa}from'execa';function a93_0x32fc(_0x5e03ea,_0x374277){_0x5e03ea=_0x5e03ea-0xaf;const _0x2657bb=a93_0x2657();let _0x32fc09=_0x2657bb[_0x5e03ea];return _0x32fc09;}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';import{resolveNpmBin}from'../utils/platform.js';export function useFormatCode(){const _0x4acce1=a93_0x32fc,[_0x5d6a72,_0x4e885b]=useState(![]),[_0x12e016,_0x4dff89]=useState(![]),[_0x429b3a,_0x281868]=useState(''),_0x50d9f7=useCallback(async _0x425d93=>{const _0x4b6790=a93_0x32fc,_0x1bfc3d=Date[_0x4b6790(0xba)](),_0x41ac2d=a93_0x52acde[_0x4b6790(0xc0)](process[_0x4b6790(0xb3)](),_0x425d93);_0x4e885b(!![]);try{logger[_0x4b6790(0xbc)](_0x4b6790(0xbf),'开始格式化代码',{'projectCode':_0x425d93}),await execa(resolveNpmBin(_0x4b6790(0xb4)),[_0x4b6790(0xb5),_0x4b6790(0xbb),'.'],{'cwd':_0x41ac2d});const _0x175c5d=Date[_0x4b6790(0xba)]()-_0x1bfc3d;logger[_0x4b6790(0xbe)](_0x4b6790(0xbf),'代码格式化完成',_0x175c5d,{'projectCode':_0x425d93});}catch(_0x9f5ca){const _0x1fcc95=Date[_0x4b6790(0xba)]()-_0x1bfc3d;logger[_0x4b6790(0xb9)](_0x4b6790(0xbf),_0x4b6790(0xaf),{'projectCode':_0x425d93,'error':_0x9f5ca instanceof Error?_0x9f5ca[_0x4b6790(0xc2)]:String(_0x9f5ca),'duration':_0x1fcc95});throw _0x9f5ca;}finally{_0x4e885b(![]),_0x4dff89(!![]),_0x281868(formatElapsed(_0x1bfc3d));}},[]);return{'taskName':_0x4acce1(0xc1),'finished':_0x12e016,'loading':_0x5d6a72,'elapsed':_0x429b3a,'doTask':_0x50d9f7};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5c7c86,_0x342a84){const _0x38d62d=a94_0x11d3,_0x413b1d=_0x5c7c86();while(!![]){try{const _0x4ddd41=-parseInt(_0x38d62d(0xcd))/0x1*(parseInt(_0x38d62d(0xc4))/0x2)+parseInt(_0x38d62d(0xd6))/0x3+parseInt(_0x38d62d(0xcf))/0x4+parseInt(_0x38d62d(0xd5))/0x5*(-parseInt(_0x38d62d(0xc7))/0x6)+-parseInt(_0x38d62d(0xca))/0x7+parseInt(_0x38d62d(0xcb))/0x8+-parseInt(_0x38d62d(0xd3))/0x9*(-parseInt(_0x38d62d(0xce))/0xa);if(_0x4ddd41===_0x342a84)break;else _0x413b1d['push'](_0x413b1d['shift']());}catch(_0xc23d80){_0x413b1d['push'](_0x413b1d['shift']());}}}(a94_0x3974,0x42669));import a94_0x3e8adb from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a94_0x11d3(_0x3608c7,_0xae4e28){_0x3608c7=_0x3608c7-0xc4;const _0x39747f=a94_0x3974();let _0x11d3dd=_0x39747f[_0x3608c7];return _0x11d3dd;}import{resolveNpmBin}from'../utils/platform.js';function a94_0x3974(){const _0x272555=['727314YmwaUA','cwd','install','3028788XcjYhC','1287584zGmbmZ','npm','1rMtWot','60QtqRfp','511480zfGyzp','https://registry.npmmirror.com','now','success','1015893ZUVWNK','resolve','20mSTKwF','1577856aJyuqB','开始安装依赖','依赖安装失败','Install\x20dependencies','604990gqVliy','info','--registry'];a94_0x3974=function(){return _0x272555;};return a94_0x3974();}export function useInstallDependencies(){const _0x2a5e07=a94_0x11d3,[_0x316921,_0x59cd76]=useState(![]),[_0xdc5345,_0x398c56]=useState(![]),[_0xbb4849,_0x443a76]=useState(''),_0x54eedf=useCallback(async _0x18b8d2=>{const _0x1670da=a94_0x11d3,_0x4ae440=Date[_0x1670da(0xd1)](),_0xe1ce95=a94_0x3e8adb[_0x1670da(0xd4)](process[_0x1670da(0xc8)](),_0x18b8d2);_0x59cd76(!![]),_0x398c56(![]);const _0x41cf5a=async(_0x4f83c7,_0x5f34f6)=>{await execa(_0x4f83c7,_0x5f34f6,{'cwd':_0xe1ce95});};try{logger[_0x1670da(0xc5)](_0x1670da(0xc9),_0x1670da(0xd7),{'projectCode':_0x18b8d2,'registry':_0x1670da(0xd0)}),await _0x41cf5a(resolveNpmBin(_0x1670da(0xcc)),[_0x1670da(0xc9),_0x1670da(0xc6),_0x1670da(0xd0)]);const _0xad18c3=Date[_0x1670da(0xd1)]()-_0x4ae440;logger[_0x1670da(0xd2)]('install','依赖安装完成',_0xad18c3,{'projectCode':_0x18b8d2});}catch(_0x16a9d7){const _0x460a13=Date[_0x1670da(0xd1)]()-_0x4ae440;logger['error'](_0x1670da(0xc9),_0x1670da(0xd8),{'projectCode':_0x18b8d2,'error':_0x16a9d7 instanceof Error?_0x16a9d7['message']:String(_0x16a9d7),'duration':_0x460a13});throw _0x16a9d7;}finally{_0x59cd76(![]),_0x398c56(!![]),_0x443a76(formatElapsed(_0x4ae440));}},[]);return{'taskName':_0x2a5e07(0xd9),'finished':_0xdc5345,'loading':_0x316921,'elapsed':_0xbb4849,'doTask':_0x54eedf};}
|