@lovrabet/rabetbase-cli 2.1.1 → 2.1.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -0
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -0
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.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/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/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/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/logs/index.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/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -0
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -0
- 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/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -0
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/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/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
- package/lib/commands/api/doc.js +0 -1
- package/lib/commands/app/remote.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11036d,_0x1025f2){const _0x4988fc=a72_0x4469,_0x586c78=_0x11036d();while(!![]){try{const _0x5eaf7b=-parseInt(_0x4988fc(0x64))/0x1*(parseInt(_0x4988fc(0x78))/0x2)+parseInt(_0x4988fc(0x6f))/0x3+parseInt(_0x4988fc(0x7e))/0x4+parseInt(_0x4988fc(0x75))/0x5+-parseInt(_0x4988fc(0x74))/0x6*(parseInt(_0x4988fc(0x69))/0x7)+-parseInt(_0x4988fc(0x7a))/0x8+-parseInt(_0x4988fc(0x80))/0x9*(parseInt(_0x4988fc(0x6e))/0xa);if(_0x5eaf7b===_0x1025f2)break;else _0x586c78['push'](_0x586c78['shift']());}catch(_0x5c194d){_0x586c78['push'](_0x586c78['shift']());}}}(a72_0x5dfb,0x82221));function a72_0x4469(_0x3ac34e,_0x4ec4f3){_0x3ac34e=_0x3ac34e-0x64;const _0x5dfb54=a72_0x5dfb();let _0x4469a5=_0x5dfb54[_0x3ac34e];return _0x4469a5;}import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';function a72_0x5dfb(){const _0x3a4add=['290nplvwS','105729UlSRbi','push','find','JS\x20URL\x20is\x20unreachable','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','121056BCVgiQ','2287890cHFvmS','status','map','2UeNJMU','filter','1124688NYdghN','path','allSettled','has','2865156IvQkLC','join','35406kwdzou','260005BhpaMF','No\x20local\x20pages\x20matched\x20labels:\x20','CSS\x20URL\x20is\x20unreachable','trim','errors','56ODJzQB','length','label','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','resources'];a72_0x5dfb=function(){return _0x3a4add;};return a72_0x5dfb();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x592d08){const _0x1787df=a72_0x4469,_0x3f6097=[];return!isValidJsHttpsUrl(_0x592d08)&&_0x3f6097[_0x1787df(0x70)](_0x1787df(0x6c)),{'ok':_0x3f6097['length']===0x0,'errors':_0x3f6097};}export function validateCssUrl(_0x1caa08){const _0xfa91cc=a72_0x4469,_0x3f1840=[];return!isValidCssHttpsUrl(_0x1caa08)&&_0x3f1840[_0xfa91cc(0x70)](_0xfa91cc(0x73)),{'ok':_0x3f1840['length']===0x0,'errors':_0x3f1840};}export async function validateJsUrlReachable(_0x40c938){const _0x2c1733=a72_0x4469,_0x17eff4=validateJsUrl(_0x40c938);if(!_0x17eff4['ok'])return _0x17eff4;const _0x43a035=await isUrlReachable(_0x40c938);if(!_0x43a035)_0x17eff4[_0x2c1733(0x68)][_0x2c1733(0x70)](_0x2c1733(0x72));return{'ok':_0x17eff4[_0x2c1733(0x68)][_0x2c1733(0x6a)]===0x0,'errors':_0x17eff4['errors']};}export async function validateCssUrlReachable(_0x2fe15d){const _0x21c49c=a72_0x4469,_0xb245ea=validateCssUrl(_0x2fe15d);if(!_0xb245ea['ok'])return _0xb245ea;const _0x2696e6=await isUrlReachable(_0x2fe15d);if(!_0x2696e6)_0xb245ea[_0x21c49c(0x68)][_0x21c49c(0x70)](_0x21c49c(0x66));return{'ok':_0xb245ea['errors'][_0x21c49c(0x6a)]===0x0,'errors':_0xb245ea[_0x21c49c(0x68)]};}export function buildCompareRows(_0x5e5ef5,_0x142afd){const _0xed7505=a72_0x4469;return _0x5e5ef5[_0xed7505(0x77)](_0x115dd5=>({'label':_0x115dd5[_0xed7505(0x6b)],'path':_0x115dd5['path'],'local':!![],'online':_0x142afd[_0xed7505(0x7d)](_0x115dd5['path'])}));}export function filterNewPages(_0x5c079c,_0x3f65e6,_0x2ba7b5){const _0x1c8b12=a72_0x4469;if(_0x2ba7b5&&_0x2ba7b5[_0x1c8b12(0x6a)]>0x0){const _0x16f018=new Set(_0x2ba7b5['map'](_0x2cfc74=>_0x2cfc74[_0x1c8b12(0x67)]())),_0x4cd6f6=_0x5c079c['filter'](_0x5b18bc=>_0x16f018[_0x1c8b12(0x7d)](_0x5b18bc[_0x1c8b12(0x6b)]));if(_0x4cd6f6['length']===0x0)throw new Error(_0x1c8b12(0x65)+[..._0x16f018][_0x1c8b12(0x7f)](',\x20'));return _0x4cd6f6;}return _0x5c079c[_0x1c8b12(0x79)](_0x255e03=>!_0x3f65e6[_0x1c8b12(0x7d)](_0x255e03[_0x1c8b12(0x7b)]));}export function filterPagesByLabels(_0x6a4ce2,_0x256ef1){const _0xadca3c=a72_0x4469,_0x51bf53=[],_0x308637=[];for(const _0x45d23e of _0x256ef1){const _0x1e011b=_0x45d23e[_0xadca3c(0x67)](),_0x463c91=_0x6a4ce2[_0xadca3c(0x71)](_0x59db77=>_0x59db77['label']===_0x1e011b);if(_0x463c91)_0x51bf53[_0xadca3c(0x70)](_0x463c91);else _0x308637['push'](_0x45d23e);}return{'matched':_0x51bf53,'unmatched':_0x308637};}export async function doCreateMenus(_0x154c3b,_0x4dd18c,_0x37b598,_0x51fa14){const _0x4b1980=a72_0x4469;return await createMenus(_0x154c3b,_0x4dd18c,_0x37b598,_0x51fa14),{'created':_0x37b598['length'],'failed':0x0,'labels':_0x37b598[_0x4b1980(0x77)](_0xcd2cab=>_0xcd2cab['label'])};}export function filterMenusWithResources(_0x3ac719){const _0x2ce2cd=a72_0x4469;return _0x3ac719[_0x2ce2cd(0x79)](_0x5dac18=>_0x5dac18['resources'][_0x2ce2cd(0x6a)]>0x0);}export async function doUpdateCdnUrls(_0x3e3a3d,_0x32aa79,_0x563ee2,_0xb1b6a9){const _0x425f3b=a72_0x4469,_0x41f352=_0x563ee2[_0x425f3b(0x79)](_0x2cf5d8=>_0x2cf5d8[_0x425f3b(0x6d)]['length']>0x0),_0x5a5879=await Promise[_0x425f3b(0x7c)](_0x41f352['map'](_0x4a1613=>updateMenuCdnUrl(_0x3e3a3d,_0x32aa79,{'id':_0x4a1613['id'],'label':_0x4a1613[_0x425f3b(0x6b)],'path':_0x4a1613[_0x425f3b(0x7b)],'resources':_0xb1b6a9}))),_0xf50102=_0x5a5879[_0x425f3b(0x79)](_0x1621df=>_0x1621df[_0x425f3b(0x76)]==='rejected')['length'];return{'updated':_0x41f352[_0x425f3b(0x6a)]-_0xf50102,'failed':_0xf50102};}export async function fetchMenuData(_0x56408f,_0x1b4013){const _0x273cea=a72_0x4469,_0x55069d=getLocalPages(),_0x405295=await getOnlineMenuList(_0x56408f,_0x1b4013),_0x4da81b=new Set(_0x405295[_0x273cea(0x77)](_0x1eadb9=>_0x1eadb9[_0x273cea(0x7b)]));return{'localPages':_0x55069d,'onlineMenuList':_0x405295,'onlinePaths':_0x4da81b};}export async function fetchOnlineMenuList(_0x58c36c,_0x4bfdff){return getOnlineMenuList(_0x58c36c,_0x4bfdff);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3397d9,_0xc47f4b){const _0x57200c=a73_0x3503,_0x2c6353=_0x3397d9();while(!![]){try{const _0x474485=-parseInt(_0x57200c(0xe3))/0x1*(-parseInt(_0x57200c(0xef))/0x2)+parseInt(_0x57200c(0x105))/0x3+parseInt(_0x57200c(0xf2))/0x4*(parseInt(_0x57200c(0xf1))/0x5)+parseInt(_0x57200c(0x10c))/0x6*(parseInt(_0x57200c(0xf9))/0x7)+-parseInt(_0x57200c(0xfa))/0x8+parseInt(_0x57200c(0xfd))/0x9+-parseInt(_0x57200c(0xe6))/0xa;if(_0x474485===_0xc47f4b)break;else _0x2c6353['push'](_0x2c6353['shift']());}catch(_0x4e6e40){_0x2c6353['push'](_0x2c6353['shift']());}}}(a73_0xadce,0x401bb));import{getApiDomain}from'../../../constant/domain.js';function a73_0x3503(_0x1994bb,_0x420922){_0x1994bb=_0x1994bb-0xe0;const _0xadcec9=a73_0xadce();let _0x35034a=_0xadcec9[_0x1994bb];return _0x35034a;}import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x40b595,_0xa16916){const _0x22aada=a73_0x3503,_0x248f41=getEnv();logger[_0x22aada(0x10b)](_0x22aada(0xfc),isProduction(_0x248f41)?_0x22aada(0x104)+_0x40b595+')':_0x22aada(0x101)+_0x40b595+')');const _0x410b0e=await platformFetch(getApiDomain()+_0x22aada(0xf3)+_0x40b595,{'cookie':_0xa16916,'label':_0x22aada(0xe0)});if(!_0x410b0e)return logger[_0x22aada(0x10b)]('get-online-menu-list',_0x22aada(0x102)),[];return logger['info'](_0x22aada(0xfc),_0x22aada(0x103)+_0x410b0e[_0x22aada(0x10a)]+_0x22aada(0xff)),_0x410b0e['map'](flattenMenuItem)[_0x22aada(0xec)]();}function a73_0xadce(){const _0x25d7ee=['import','\x20online\x20menus\x20successfully','Update\x20menu\x20assets\x20\x22','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Server\x20returned\x20empty\x20menu\x20list','Fetched\x20','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','1413678BsNpjy','Updating\x20menu\x20asset\x20links:\x20','map','Creating\x20menu:\x20','push','length','info','167490erpdBN','Menu\x20assets\x20synced:\x20','Fetch\x20menu\x20list','resources','Create\x20menu\x20\x22','1hLWCbe','path','POST','8674340FMLlJx','isArray','update-menu-cdn-url','stringify','label','extend','flat','Start\x20batch\x20menu\x20creation,\x20total\x20','Batch\x20menu\x20creation\x20completed,\x20total\x20','888128yzibIO','/smartapi/menu/create','60baCRFn','57676VgdDst','/smartapi/menu/find?appCode=','create-menus','all','procode','/smartapi/menu/update','create-menu','7QUiYdb','3167232efPRAT','children','get-online-menu-list','3687228TDetxd'];a73_0xadce=function(){return _0x25d7ee;};return a73_0xadce();}function flattenMenuItem(_0x9a050d){const _0x38b8d2=a73_0x3503;let _0x27fc29=[];try{if(_0x9a050d['extend']?.[_0x38b8d2(0xe1)]){const _0x571178=JSON['parse'](_0x9a050d[_0x38b8d2(0xeb)][_0x38b8d2(0xe1)]);if(Array[_0x38b8d2(0xe7)](_0x571178))_0x27fc29=_0x571178;}}catch{}const _0x1b8256=[{'id':_0x9a050d['id'],'path':_0x9a050d[_0x38b8d2(0xe4)],'label':_0x9a050d[_0x38b8d2(0xea)],'resources':_0x27fc29}];if(_0x9a050d[_0x38b8d2(0xfb)]&&_0x9a050d[_0x38b8d2(0xfb)][_0x38b8d2(0x10a)]>0x0)for(const _0xf4d1d9 of _0x9a050d[_0x38b8d2(0xfb)]){_0x1b8256[_0x38b8d2(0x109)](...flattenMenuItem(_0xf4d1d9));}return _0x1b8256;}export async function createMenu(_0x2242eb,_0x133550,_0x4c2551){const _0x34a2d5=a73_0x3503;logger[_0x34a2d5(0x10b)](_0x34a2d5(0xf8),_0x34a2d5(0x108)+_0x4c2551['label']+'\x20('+_0x4c2551[_0x34a2d5(0xe4)]+')');const _0x2b131a={'appCode':_0x2242eb,'type':_0x34a2d5(0xf6),'sort':0x0,'extend':{'loadScriptMode':_0x34a2d5(0xfe),'resources':_0x4c2551[_0x34a2d5(0xe1)]?JSON[_0x34a2d5(0xe9)](_0x4c2551['resources']):undefined},..._0x4c2551};await platformFetch(getApiDomain()+_0x34a2d5(0xf0),{'method':'POST','body':_0x2b131a,'cookie':_0x133550,'label':_0x34a2d5(0xe2)+_0x4c2551[_0x34a2d5(0xea)]+'\x22'}),logger['info'](_0x34a2d5(0xf8),'Menu\x20created\x20successfully:\x20'+_0x4c2551['label']);}async function createSingleMenu(_0x56094f,_0x318fb7,_0x2e510f,_0x10dc94){const _0x230b1a=a73_0x3503,_0x168baa={'appCode':_0x56094f,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x230b1a(0xfe),'resources':_0x10dc94?JSON[_0x230b1a(0xe9)](_0x10dc94):undefined},'label':_0x2e510f[_0x230b1a(0xea)],'path':_0x2e510f[_0x230b1a(0xe4)]};await platformFetch(getApiDomain()+_0x230b1a(0xf0),{'method':_0x230b1a(0xe5),'body':_0x168baa,'cookie':_0x318fb7,'label':_0x230b1a(0xe2)+_0x2e510f[_0x230b1a(0xea)]+'\x22'}),logger[_0x230b1a(0x10b)](_0x230b1a(0xf8),'Menu\x20created\x20successfully:\x20'+_0x2e510f[_0x230b1a(0xea)]);}export async function createMenus(_0x2cbf2f,_0x4eaa7c,_0x1c59f9,_0x2d8d47){const _0x5da32c=a73_0x3503;logger[_0x5da32c(0x10b)](_0x5da32c(0xf4),_0x5da32c(0xed)+_0x1c59f9[_0x5da32c(0x10a)]),await Promise[_0x5da32c(0xf5)](_0x1c59f9[_0x5da32c(0x107)](_0xfb8d0f=>createSingleMenu(_0x2cbf2f,_0x4eaa7c,_0xfb8d0f,_0x2d8d47))),logger['info'](_0x5da32c(0xf4),_0x5da32c(0xee)+_0x1c59f9[_0x5da32c(0x10a)]);}export async function updateMenuCdnUrl(_0x51562a,_0x5187c9,_0x4c86b6){const _0x2564f1=a73_0x3503;logger[_0x2564f1(0x10b)](_0x2564f1(0xe8),_0x2564f1(0x106)+_0x4c86b6[_0x2564f1(0xea)]+'\x20('+_0x4c86b6[_0x2564f1(0xe4)]+')');const _0x9b89d4={'id':_0x4c86b6['id'],'appCode':_0x51562a,'extend':{'loadScriptMode':'import','resources':_0x4c86b6[_0x2564f1(0xe1)]?JSON['stringify'](_0x4c86b6[_0x2564f1(0xe1)]):undefined}};await platformFetch(getApiDomain()+_0x2564f1(0xf7),{'method':_0x2564f1(0xe5),'body':_0x9b89d4,'cookie':_0x5187c9,'label':_0x2564f1(0x100)+_0x4c86b6[_0x2564f1(0xea)]+'\x22'}),logger[_0x2564f1(0x10b)](_0x2564f1(0xe8),_0x2564f1(0x10d)+_0x4c86b6[_0x2564f1(0xea)],undefined);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f2ad3,_0x27a09d){const _0x4d0e79=a74_0x1174,_0x1dfd62=_0x1f2ad3();while(!![]){try{const _0x2beddc=-parseInt(_0x4d0e79(0x129))/0x1+-parseInt(_0x4d0e79(0x134))/0x2+-parseInt(_0x4d0e79(0x13e))/0x3+-parseInt(_0x4d0e79(0x13c))/0x4+-parseInt(_0x4d0e79(0x11d))/0x5*(-parseInt(_0x4d0e79(0x112))/0x6)+parseInt(_0x4d0e79(0x139))/0x7*(parseInt(_0x4d0e79(0x137))/0x8)+parseInt(_0x4d0e79(0x11c))/0x9*(parseInt(_0x4d0e79(0x12d))/0xa);if(_0x2beddc===_0x27a09d)break;else _0x1dfd62['push'](_0x1dfd62['shift']());}catch(_0x38c018){_0x1dfd62['push'](_0x1dfd62['shift']());}}}(a74_0x291d,0x3792f));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x1ba197){const _0x665ed5=a74_0x1174,_0xf2c309=[];return _0x1ba197[_0x665ed5(0x132)]&&!isValidJsHttpsUrl(_0x1ba197['jsUrl'])&&_0xf2c309[_0x665ed5(0x119)]({'field':'jsUrl','message':_0x665ed5(0x12a)}),_0x1ba197[_0x665ed5(0x120)]&&!isValidCssHttpsUrl(_0x1ba197[_0x665ed5(0x120)])&&_0xf2c309[_0x665ed5(0x119)]({'field':_0x665ed5(0x120),'message':_0x665ed5(0x133)}),_0xf2c309;}function a74_0x291d(){const _0x201a65=['message','152zLvsbk','No\x20local\x20pages\x20matched\x20labels:\x20','138271prEnTT','trim','--params.','944212EAJqNH','pages','554661nXrytG','map','6JWFNPR','setLogPath','stdin','isTTY','Start\x20non-interactive\x20menu\x20sync','end','length','push','path','isArray','1701KcTlwR','1086105JqCNkQ','has','data','cssUrl','readableEnded','join','filter','Menu\x20sync\x20completed','object','startsWith','field','info','259887sVQRus','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Invalid\x20--params:\x20','\x0a\x20\x20Available\x20local\x20pages:\x20','19240LUIAQX','menu-sync','label','string','cwd','jsUrl','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','95412HKbrDx','selectedLabels'];a74_0x291d=function(){return _0x201a65;};return a74_0x291d();}export async function runMenuSyncCore(_0x542611,_0x3aefa2,_0x49aee4=[],_0x1fa826){const _0xd6bf27=a74_0x1174,_0x3692f8=parseParamsFlag(_0x1fa826),_0x5a41fe=_0x49aee4[_0xd6bf27(0x118)]>0x0?_0x49aee4:_0x3692f8[_0xd6bf27(0x135)],_0x2899a1=_0x3692f8[_0xd6bf27(0x132)],_0x38de03=_0x3692f8[_0xd6bf27(0x120)],_0x22b02e=[];if(_0x2899a1)_0x22b02e[_0xd6bf27(0x119)](_0x2899a1);if(_0x38de03)_0x22b02e[_0xd6bf27(0x119)](_0x38de03);const _0x4e123c=validateParams(_0x3692f8);if(_0x4e123c[_0xd6bf27(0x118)]>0x0){const _0x3b2d46=_0x4e123c[_0xd6bf27(0x111)](_0xedf697=>_0xd6bf27(0x13b)+_0xedf697[_0xd6bf27(0x127)]+':\x20'+_0xedf697[_0xd6bf27(0x136)])[_0xd6bf27(0x122)](';\x20');throw new Error(_0xd6bf27(0x12b)+_0x3b2d46);}logger[_0xd6bf27(0x113)](process[_0xd6bf27(0x131)]()),logger['info'](_0xd6bf27(0x12e),_0xd6bf27(0x116),{'appCode':_0x542611,'selectedCount':_0x5a41fe?.[_0xd6bf27(0x118)],'jsUrl':_0x2899a1,'cssUrl':_0x38de03});if(_0x2899a1){const _0x2da5ad=await isUrlReachable(_0x2899a1);if(!_0x2da5ad)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x2899a1);}if(_0x38de03){const _0x266848=await isUrlReachable(_0x38de03);if(!_0x266848)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x38de03);}const _0x55b6a5=getLocalPages();if(_0x55b6a5[_0xd6bf27(0x118)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x367f21=await getOnlineMenuList(_0x542611,_0x3aefa2),_0x23659d=new Set(_0x367f21[_0xd6bf27(0x111)](_0x19d34b=>_0x19d34b[_0xd6bf27(0x11a)]));let _0x5f1bbb;if(_0x5a41fe&&_0x5a41fe[_0xd6bf27(0x118)]>0x0){const _0x3651f5=new Set(_0x5a41fe[_0xd6bf27(0x111)](_0x529e09=>_0x529e09[_0xd6bf27(0x13a)]()));_0x5f1bbb=_0x55b6a5[_0xd6bf27(0x123)](_0x40aa2d=>_0x3651f5[_0xd6bf27(0x11e)](_0x40aa2d[_0xd6bf27(0x12f)]));if(_0x5f1bbb['length']===0x0){const _0x5898e4=_0x55b6a5[_0xd6bf27(0x111)](_0x31b907=>_0x31b907[_0xd6bf27(0x12f)])[_0xd6bf27(0x122)](',\x20');throw new Error(_0xd6bf27(0x138)+[..._0x3651f5][_0xd6bf27(0x122)](',\x20')+_0xd6bf27(0x12c)+_0x5898e4);}}else _0x5f1bbb=_0x55b6a5[_0xd6bf27(0x123)](_0x48dfc3=>!_0x23659d[_0xd6bf27(0x11e)](_0x48dfc3[_0xd6bf27(0x11a)]));if(_0x5f1bbb[_0xd6bf27(0x118)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x542611,_0x3aefa2,_0x5f1bbb,_0x22b02e[_0xd6bf27(0x118)]>0x0?_0x22b02e:undefined),logger[_0xd6bf27(0x128)](_0xd6bf27(0x12e),_0xd6bf27(0x124),{'count':_0x5f1bbb[_0xd6bf27(0x118)],'resources':_0x22b02e}),{'created':_0x5f1bbb[_0xd6bf27(0x118)],'skipped':![],'targetPages':_0x5f1bbb};}function a74_0x1174(_0xfda1b6,_0x33c099){_0xfda1b6=_0xfda1b6-0x111;const _0x291dfa=a74_0x291d();let _0x11747d=_0x291dfa[_0xfda1b6];return _0x11747d;}export async function readPageLabelsFromStdin(){const _0x1a14eb=a74_0x1174;if(!process[_0x1a14eb(0x114)][_0x1a14eb(0x115)]&&!process[_0x1a14eb(0x114)][_0x1a14eb(0x121)])return new Promise(_0x4b7391=>{const _0x50d7dd=_0x1a14eb,_0x32cc35=[];process[_0x50d7dd(0x114)]['on'](_0x50d7dd(0x11f),_0x2fe682=>_0x32cc35[_0x50d7dd(0x119)](_0x2fe682)),process['stdin']['on'](_0x50d7dd(0x117),()=>{const _0x3f8e55=_0x50d7dd,_0x12489f=Buffer['concat'](_0x32cc35)['toString']('utf8'),_0x42cd01=_0x12489f['split']('\x0a')[_0x3f8e55(0x111)](_0xd0c28c=>_0xd0c28c[_0x3f8e55(0x13a)]())['filter'](_0x13abd5=>_0x13abd5['length']>0x0&&!_0x13abd5[_0x3f8e55(0x126)]('#'));_0x4b7391(_0x42cd01);}),setTimeout(()=>_0x4b7391([]),0x1f4);});return[];}function parseParamsFlag(_0x396eaf){const _0x2a15e9=a74_0x1174;if(!_0x396eaf||typeof _0x396eaf!==_0x2a15e9(0x130))return{};try{const _0x5d0b64=JSON['parse'](_0x396eaf);if(typeof _0x5d0b64!==_0x2a15e9(0x125)||_0x5d0b64===null||Array[_0x2a15e9(0x11b)](_0x5d0b64))return{};return{'selectedLabels':Array[_0x2a15e9(0x11b)](_0x5d0b64[_0x2a15e9(0x13d)])?_0x5d0b64['pages'][_0x2a15e9(0x111)](String):undefined,'jsUrl':typeof _0x5d0b64[_0x2a15e9(0x132)]==='string'?_0x5d0b64['jsUrl']['trim']():undefined,'cssUrl':typeof _0x5d0b64[_0x2a15e9(0x120)]===_0x2a15e9(0x130)?_0x5d0b64[_0x2a15e9(0x120)][_0x2a15e9(0x13a)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a76_0x40c2(){const _0x38aea5=['field','object','status','jsUrl','Start\x20non-interactive\x20menu\x20update','map','1402509cgtJrB','920298tnfPnX','cssUrl','CSS\x20URL\x20is\x20unreachable:\x20','12367432IMQTaY','1153915DRinSZ','JS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params:\x20','label','string','info','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','rejected','--params.','trim','resources','1827636QOtugF','cwd','123180yptOQS','10122FqomJY','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','length','setLogPath','filter','parse','1445ByEJxw','push'];a76_0x40c2=function(){return _0x38aea5;};return a76_0x40c2();}(function(_0x3aa496,_0x319d2e){const _0x24b5cf=a76_0x18b0,_0x13876e=_0x3aa496();while(!![]){try{const _0x32e2c7=-parseInt(_0x24b5cf(0x1a8))/0x1+-parseInt(_0x24b5cf(0x197))/0x2+parseInt(_0x24b5cf(0x196))/0x3+-parseInt(_0x24b5cf(0x1a6))/0x4+-parseInt(_0x24b5cf(0x1af))/0x5*(parseInt(_0x24b5cf(0x1a9))/0x6)+-parseInt(_0x24b5cf(0x19b))/0x7+parseInt(_0x24b5cf(0x19a))/0x8;if(_0x32e2c7===_0x319d2e)break;else _0x13876e['push'](_0x13876e['shift']());}catch(_0x21cb65){_0x13876e['push'](_0x13876e['shift']());}}}(a76_0x40c2,0x4e526));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a76_0x18b0(_0x180eb3,_0x3d94b7){_0x180eb3=_0x180eb3-0x193;const _0x40c2c7=a76_0x40c2();let _0x18b0bd=_0x40c2c7[_0x180eb3];return _0x18b0bd;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x102ca0){const _0x22451f=a76_0x18b0,_0x4dedd7=[];return _0x102ca0[_0x22451f(0x193)]&&!isValidJsHttpsUrl(_0x102ca0[_0x22451f(0x193)])&&_0x4dedd7['push']({'field':_0x22451f(0x193),'message':_0x22451f(0x1aa)}),_0x102ca0[_0x22451f(0x198)]&&!isValidCssHttpsUrl(_0x102ca0[_0x22451f(0x198)])&&_0x4dedd7['push']({'field':_0x22451f(0x198),'message':_0x22451f(0x1a1)}),_0x4dedd7;}export async function runMenuUpdateCore(_0x5abba6,_0x4ac9ec,_0x316028){const _0x5390b3=a76_0x18b0,_0x21f099=parseUpdateParamsFlag(_0x316028),_0x2b0498=[];if(_0x21f099['jsUrl'])_0x2b0498[_0x5390b3(0x1b0)](_0x21f099['jsUrl']);if(_0x21f099[_0x5390b3(0x198)])_0x2b0498[_0x5390b3(0x1b0)](_0x21f099[_0x5390b3(0x198)]);const _0x1feaee=validateParams(_0x21f099);if(_0x1feaee['length']>0x0){const _0x17a51f=_0x1feaee[_0x5390b3(0x195)](_0xf891f1=>_0x5390b3(0x1a3)+_0xf891f1[_0x5390b3(0x1b1)]+':\x20'+_0xf891f1['message'])['join'](';\x20');throw new Error(_0x5390b3(0x19d)+_0x17a51f);}logger[_0x5390b3(0x1ac)](process[_0x5390b3(0x1a7)]()),logger[_0x5390b3(0x1a0)]('menu-update',_0x5390b3(0x194),{'appCode':_0x5abba6,'jsUrl':_0x21f099['jsUrl'],'cssUrl':_0x21f099[_0x5390b3(0x198)]});if(_0x21f099[_0x5390b3(0x193)]){const _0x5419a7=await isUrlReachable(_0x21f099[_0x5390b3(0x193)]);if(!_0x5419a7)throw new Error(_0x5390b3(0x19c)+_0x21f099[_0x5390b3(0x193)]);}if(_0x21f099['cssUrl']){const _0xcaef67=await isUrlReachable(_0x21f099[_0x5390b3(0x198)]);if(!_0xcaef67)throw new Error(_0x5390b3(0x199)+_0x21f099['cssUrl']);}const _0x279a8f=await getOnlineMenuList(_0x5abba6,_0x4ac9ec),_0x9e823d=_0x279a8f['filter'](_0x282dd5=>_0x282dd5[_0x5390b3(0x1a5)]['length']>0x0);if(_0x9e823d['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x40acfb=await Promise['allSettled'](_0x9e823d[_0x5390b3(0x195)](_0x27a663=>updateMenuCdnUrl(_0x5abba6,_0x4ac9ec,{'id':_0x27a663['id'],'label':_0x27a663[_0x5390b3(0x19e)],'path':_0x27a663['path'],'resources':_0x2b0498}))),_0x32c2d6=_0x40acfb[_0x5390b3(0x1ad)](_0x7068b1=>_0x7068b1[_0x5390b3(0x1b3)]===_0x5390b3(0x1a2))[_0x5390b3(0x1ab)];return logger[_0x5390b3(0x1a0)]('menu-update','Menu\x20update\x20completed',{'count':_0x9e823d[_0x5390b3(0x1ab)],'resources':_0x2b0498}),{'updated':_0x9e823d['length']-_0x32c2d6,'failed':_0x32c2d6,'skipped':![]};}function parseUpdateParamsFlag(_0xff90b3){const _0x5cd02e=a76_0x18b0;if(!_0xff90b3||typeof _0xff90b3!==_0x5cd02e(0x19f))return{};try{const _0x13bc92=JSON[_0x5cd02e(0x1ae)](_0xff90b3);if(typeof _0x13bc92!==_0x5cd02e(0x1b2)||_0x13bc92===null||Array['isArray'](_0x13bc92))return{};return{'jsUrl':typeof _0x13bc92[_0x5cd02e(0x193)]===_0x5cd02e(0x19f)?_0x13bc92[_0x5cd02e(0x193)][_0x5cd02e(0x1a4)]():undefined,'cssUrl':typeof _0x13bc92[_0x5cd02e(0x198)]==='string'?_0x13bc92[_0x5cd02e(0x198)][_0x5cd02e(0x1a4)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a77_0x4750(){const _0x32bf3d=['338382uDpKui','1418139RRxYVU','18gveKni','243490EFnmYj','4bYEckG','1948107xpBFwC','80837vwNBHH','test','6LdNBdm','trim','5382144jYDKFC','5820419XQsKzE','30dhQFkz'];a77_0x4750=function(){return _0x32bf3d;};return a77_0x4750();}(function(_0x236049,_0xc29b56){const _0x4298fa=a77_0x23f5,_0x97e869=_0x236049();while(!![]){try{const _0x36ecf7=-parseInt(_0x4298fa(0xfe))/0x1*(parseInt(_0x4298fa(0x107))/0x2)+parseInt(_0x4298fa(0x106))/0x3*(parseInt(_0x4298fa(0x109))/0x4)+-parseInt(_0x4298fa(0x108))/0x5+parseInt(_0x4298fa(0x100))/0x6*(-parseInt(_0x4298fa(0xfd))/0x7)+-parseInt(_0x4298fa(0x102))/0x8+parseInt(_0x4298fa(0x105))/0x9+parseInt(_0x4298fa(0x104))/0xa*(parseInt(_0x4298fa(0x103))/0xb);if(_0x36ecf7===_0xc29b56)break;else _0x97e869['push'](_0x97e869['shift']());}catch(_0x255bff){_0x97e869['push'](_0x97e869['shift']());}}}(a77_0x4750,0x5a6de));function a77_0x23f5(_0x4e8ce7,_0x5ec276){_0x4e8ce7=_0x4e8ce7-0xfd;const _0x475043=a77_0x4750();let _0x23f590=_0x475043[_0x4e8ce7];return _0x23f590;}export function isValidJsHttpsUrl(_0x2f8b88){const _0x128ea7=a77_0x23f5;return/^https:\/\/.+\.js(\?.*)?$/[_0x128ea7(0xff)](_0x2f8b88['trim']());}export function isValidCssHttpsUrl(_0x447314){const _0x56565a=a77_0x23f5;return/^https:\/\/.+\.css(\?.*)?$/[_0x56565a(0xff)](_0x447314[_0x56565a(0x101)]());}export async function isUrlReachable(_0x51a10d){try{const _0x4b27bc=await fetch(_0x51a10d,{'method':'HEAD'});return _0x4b27bc['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0x3cd45d=a78_0x496d;function a78_0x50bf(){const _0x1aeafc=['Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','pages','1256020tmvIPT','\x20menu(s)\x20created','str','Failed\x20to\x20fetch\x20online\x20menu\x20list','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','length','yellow','\x20page(s)','\x20and\x20CSS:\x20','Created\x20','cyan','created','sync','✓\x20Menu\x20sync\x20completed:\x20','\x20\x20Continue\x20with\x20creation?','\x20\x20✓\x20Selected:\x20','246AKnBsM','cssUrl','10071234ffpTms','jsUrl','\x20\x20Create\x20','Online\x20menu\x20list\x20fetched','validation','onlineMenuList','flag','params','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','20622IYHglb','\x20\x20Cancelled.','Menu\x20sync\x20completed:\x20','message','yes','failed','1529655fsYSeq','cookie','\x20menu(s)','\x20failed.','string','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','342CeUwHC','3356eQxIpb','87350ZrgdxR','menu','\x20menu(s)\x20with\x20JS:\x20','parse','trim','object','Creating\x20','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Menu\x20creation\x20failed','onlinePaths','appCode','skipped','700600gbPrWQ','Fetching\x20online\x20menu\x20list...'];a78_0x50bf=function(){return _0x1aeafc;};return a78_0x50bf();}(function(_0x189d74,_0x3085d5){const _0x3ed928=a78_0x496d,_0x50d8a1=_0x189d74();while(!![]){try{const _0x2aca2b=-parseInt(_0x3ed928(0x1f2))/0x1+-parseInt(_0x3ed928(0x1f1))/0x2*(parseInt(_0x3ed928(0x1f0))/0x3)+-parseInt(_0x3ed928(0x202))/0x4+-parseInt(_0x3ed928(0x223))/0x5+-parseInt(_0x3ed928(0x212))/0x6*(parseInt(_0x3ed928(0x21d))/0x7)+parseInt(_0x3ed928(0x1fe))/0x8+parseInt(_0x3ed928(0x214))/0x9;if(_0x2aca2b===_0x3085d5)break;else _0x50d8a1['push'](_0x50d8a1['shift']());}catch(_0x3c7e41){_0x50d8a1['push'](_0x50d8a1['shift']());}}}(a78_0x50bf,0x2db65));import a78_0x3eb91c from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a78_0x496d(_0x4be461,_0x2a1c72){_0x4be461=_0x4be461-0x1ec;const _0x50bff0=a78_0x50bf();let _0x496de6=_0x50bff0[_0x4be461];return _0x496de6;}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';export const menuSync={'service':a78_0x3cd45d(0x1f3),'command':a78_0x3cd45d(0x20e),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':'write','flags':[{'name':a78_0x3cd45d(0x21b),'type':a78_0x3cd45d(0x1ee),'description':a78_0x3cd45d(0x200)+a78_0x3cd45d(0x21c)},{'name':a78_0x3cd45d(0x221),'type':'boolean','description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0x5519b7){const _0x18505f=a78_0x3cd45d,_0x5ace9e=_0x5519b7[_0x18505f(0x21a)]('yes'),_0x642b0e=_0x5519b7[_0x18505f(0x204)](_0x18505f(0x21b)),_0x2f7c09=parseParams(_0x642b0e),_0x44b1eb=!!(_0x2f7c09[_0x18505f(0x215)]||_0x2f7c09[_0x18505f(0x213)]||_0x2f7c09[_0x18505f(0x201)]&&_0x2f7c09[_0x18505f(0x201)][_0x18505f(0x207)]>0x0);if(_0x5ace9e||_0x44b1eb){let _0x1d8945=[];!isInteractive()&&!_0x2f7c09['pages']?.[_0x18505f(0x207)]&&(_0x1d8945=await readPageLabelsFromStdin());const _0x3864d5=await runMenuSyncCore(_0x5519b7[_0x18505f(0x1fc)],_0x5519b7[_0x18505f(0x224)],_0x1d8945['length']>0x0?_0x1d8945:_0x2f7c09['pages']??[],_0x642b0e);if(_0x3864d5[_0x18505f(0x1fd)]){const _0x40ae4b=getLocalPages();_0x40ae4b['length']===0x0?writeCliSideChannelLine(_0x18505f(0x1ef)):writeCliSideChannelLine(_0x18505f(0x206));}else writeCliSideChannelLine(_0x18505f(0x20f)+_0x3864d5[_0x18505f(0x20d)]+_0x18505f(0x203));return{'ok':!![]};}requireInteractive();const _0x2198ca=startSpinner(_0x18505f(0x1ff));let _0x37ff75,_0x184271,_0x49643a;try{const _0x2f721d=await fetchMenuData(_0x5519b7[_0x18505f(0x1fc)],_0x5519b7[_0x18505f(0x224)]);_0x37ff75=_0x2f721d['localPages'],_0x184271=_0x2f721d[_0x18505f(0x1fb)],_0x49643a=_0x2f721d[_0x18505f(0x219)],stopSpinner(_0x2198ca,_0x18505f(0x217),!![]);}catch(_0x2b1e45){stopSpinner(_0x2198ca,_0x18505f(0x205),![]);throw CliErrors['validation'](_0x2b1e45 instanceof Error?_0x2b1e45[_0x18505f(0x220)]:_0x18505f(0x205));}if(_0x37ff75[_0x18505f(0x207)]===0x0)return writeCliSideChannelLine(a78_0x3eb91c[_0x18505f(0x208)](_0x18505f(0x1f9))),{'ok':!![]};const _0x5b63b0=buildCompareRows(_0x37ff75,_0x184271);writeCliSideChannelLine(renderCompareTable(_0x5b63b0)),writeCliSideChannelLine('');const _0x3c6c71=_0x2f7c09[_0x18505f(0x201)],_0x44f9b9=await selectPages(_0x37ff75,_0x184271,_0x3c6c71);writeCliSideChannelLine(''),writeCliSideChannelLine(a78_0x3eb91c[_0x18505f(0x20c)](_0x18505f(0x211)+_0x44f9b9[_0x18505f(0x207)]+_0x18505f(0x209)));const _0x14ce0a=_0x2f7c09[_0x18505f(0x215)]&&_0x2f7c09[_0x18505f(0x213)];if(!_0x14ce0a){writeCliSideChannelLine(renderSyncSummary(_0x44f9b9,_0x184271['size']>0x0));const _0x235576=await askConfirm(_0x18505f(0x210));if(!_0x235576)return writeCliSideChannelLine(a78_0x3eb91c['gray'](_0x18505f(0x21e))),{'ok':!![]};}let _0x32d096=_0x2f7c09[_0x18505f(0x215)],_0x1639e8=_0x2f7c09[_0x18505f(0x213)];!_0x32d096&&(_0x32d096=await askJsUrl());!_0x1639e8&&(_0x1639e8=await askCssUrl());const _0x4c3032=await askConfirm(_0x18505f(0x216)+_0x44f9b9[_0x18505f(0x207)]+_0x18505f(0x1f4)+_0x32d096+_0x18505f(0x20a)+_0x1639e8+'?');if(!_0x4c3032)return writeCliSideChannelLine(a78_0x3eb91c['gray'](_0x18505f(0x21e))),{'ok':!![]};const _0x4741e9=[_0x32d096,_0x1639e8],_0x11c6ab=startSpinner(_0x18505f(0x1f8)+_0x44f9b9[_0x18505f(0x207)]+'\x20menu(s)...');try{const _0x151a8b=await doCreateMenus(_0x5519b7[_0x18505f(0x1fc)],_0x5519b7[_0x18505f(0x224)],_0x44f9b9,_0x4741e9);return stopSpinner(_0x11c6ab,_0x18505f(0x20b)+_0x151a8b[_0x18505f(0x20d)]+_0x18505f(0x1ec),!![]),{'ok':!![],'data':_0x151a8b,'message':_0x18505f(0x21f)+_0x151a8b[_0x18505f(0x20d)]+'\x20created,\x20'+_0x151a8b[_0x18505f(0x222)]+_0x18505f(0x1ed)};}catch(_0x17f71e){stopSpinner(_0x11c6ab,_0x18505f(0x1fa),![]);throw CliErrors[_0x18505f(0x218)](_0x17f71e instanceof Error?_0x17f71e[_0x18505f(0x220)]:_0x18505f(0x1fa));}}};function parseParams(_0x2f263e){const _0x125962=a78_0x3cd45d;if(!_0x2f263e)return{};try{const _0x3342a1=JSON[_0x125962(0x1f5)](_0x2f263e);if(typeof _0x3342a1!==_0x125962(0x1f7)||_0x3342a1===null||Array['isArray'](_0x3342a1))return{};return{'jsUrl':typeof _0x3342a1['jsUrl']===_0x125962(0x1ee)?_0x3342a1[_0x125962(0x215)][_0x125962(0x1f6)]():undefined,'cssUrl':typeof _0x3342a1['cssUrl']===_0x125962(0x1ee)?_0x3342a1['cssUrl'][_0x125962(0x1f6)]():undefined,'pages':Array['isArray'](_0x3342a1[_0x125962(0x201)])?_0x3342a1[_0x125962(0x201)]['map'](String):undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a79_0x18455b=a79_0x1200;(function(_0x116c90,_0x403378){const _0x1b34f7=a79_0x1200,_0x31066b=_0x116c90();while(!![]){try{const _0x2a0ef2=-parseInt(_0x1b34f7(0x15e))/0x1*(-parseInt(_0x1b34f7(0x167))/0x2)+parseInt(_0x1b34f7(0x137))/0x3+parseInt(_0x1b34f7(0x163))/0x4*(-parseInt(_0x1b34f7(0x14a))/0x5)+-parseInt(_0x1b34f7(0x169))/0x6*(parseInt(_0x1b34f7(0x139))/0x7)+parseInt(_0x1b34f7(0x144))/0x8*(-parseInt(_0x1b34f7(0x148))/0x9)+-parseInt(_0x1b34f7(0x13c))/0xa+parseInt(_0x1b34f7(0x15b))/0xb;if(_0x2a0ef2===_0x403378)break;else _0x31066b['push'](_0x31066b['shift']());}catch(_0x43de13){_0x31066b['push'](_0x31066b['shift']());}}}(a79_0x262f,0x54ec9));import a79_0x302177 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';function a79_0x262f(){const _0x23efd2=['\x20updated.','8hpHOdA','\x20failed.','isArray','Updated\x20','1067454xVivRv','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation','5mreAeO','Fetching\x20online\x20menu\x20list...','\x20\x20Update\x20','validation','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','Updating\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','✓\x20Menu\x20update\x20completed:\x20','cookie','\x20menu(s)','object','Online\x20menu\x20list\x20fetched','map','skipped','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','string','update','7699934NgKDcY','yes','\x20menu(s)\x20with\x20JS:\x20','7665vgaqMi','appCode','write','yellow','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','1521164GCUSMo','params','menu','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','154VSndiL','Menu\x20update\x20completed:\x20','6HGKUjI','\x20menu(s)\x20updated','\x20updated,\x20','updated','length','str','\x20menu(s)\x20failed','\x20and\x20CSS:\x20','Menu\x20update\x20failed','failed','jsUrl','\x20\x20Found\x20','trim','parse','message','333810NDdfUA','cssUrl','1640296UnMLws','\x20\x20Cancelled.','gray','3203950fuZgmE','flag','boolean','label','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20menu(s)\x20with\x20existing\x20resources','\x20menu(s)...'];a79_0x262f=function(){return _0x23efd2;};return a79_0x262f();}import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a79_0x1200(_0x119468,_0x21757b){_0x119468=_0x119468-0x12d;const _0x262f74=a79_0x262f();let _0x120092=_0x262f74[_0x119468];return _0x120092;}import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';export const menuUpdate={'service':a79_0x18455b(0x165),'command':a79_0x18455b(0x15a),'description':a79_0x18455b(0x14e),'risk':a79_0x18455b(0x160),'flags':[{'name':a79_0x18455b(0x164),'type':a79_0x18455b(0x159),'description':a79_0x18455b(0x166)+a79_0x18455b(0x140)},{'name':'yes','type':a79_0x18455b(0x13e),'description':a79_0x18455b(0x149)}],async 'execute'(_0x13155d){const _0x8b9c4f=a79_0x18455b,_0x48a654=_0x13155d[_0x8b9c4f(0x13d)](_0x8b9c4f(0x15c)),_0x20e741=_0x13155d[_0x8b9c4f(0x12d)](_0x8b9c4f(0x164)),_0x16a2bd=parseParams(_0x20e741),_0xdd2fb=!!(_0x16a2bd[_0x8b9c4f(0x132)]||_0x16a2bd[_0x8b9c4f(0x138)]);if(_0x48a654||_0xdd2fb&&!isInteractive()){const _0x122457=await runMenuUpdateCore(_0x13155d[_0x8b9c4f(0x15f)],_0x13155d[_0x8b9c4f(0x152)],_0x20e741);return _0x122457[_0x8b9c4f(0x157)]?writeCliSideChannelLine(_0x8b9c4f(0x162)):(writeCliSideChannelLine(_0x8b9c4f(0x151)+_0x122457['updated']+_0x8b9c4f(0x16a)),_0x122457[_0x8b9c4f(0x131)]>0x0&&writeCliSideChannelLine('!\x20'+_0x122457[_0x8b9c4f(0x131)]+_0x8b9c4f(0x12e))),{'ok':_0x122457[_0x8b9c4f(0x131)]===0x0};}requireInteractive();const _0x2a0b1a=startSpinner(_0x8b9c4f(0x14b));let _0x5e37fc;try{_0x5e37fc=await fetchOnlineMenuList(_0x13155d[_0x8b9c4f(0x15f)],_0x13155d[_0x8b9c4f(0x152)]),stopSpinner(_0x2a0b1a,_0x8b9c4f(0x155),!![]);}catch(_0x54749f){stopSpinner(_0x2a0b1a,_0x8b9c4f(0x150),![]);throw CliErrors[_0x8b9c4f(0x14d)](_0x54749f instanceof Error?_0x54749f[_0x8b9c4f(0x136)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}const _0x3b3309=filterMenusWithResources(_0x5e37fc);if(_0x3b3309[_0x8b9c4f(0x16d)]===0x0)return writeCliSideChannelLine(a79_0x302177[_0x8b9c4f(0x161)](_0x8b9c4f(0x158))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a79_0x302177['cyan'](_0x8b9c4f(0x133)+_0x3b3309['length']+_0x8b9c4f(0x141))),writeCliSideChannelLine(renderUpdateSummary(_0x3b3309[_0x8b9c4f(0x156)](_0x4e8488=>_0x4e8488[_0x8b9c4f(0x13f)]),[_0x16a2bd[_0x8b9c4f(0x132)],_0x16a2bd[_0x8b9c4f(0x138)]])),writeCliSideChannelLine('');let _0x2cca74=_0x16a2bd[_0x8b9c4f(0x132)],_0x4a6d20=_0x16a2bd[_0x8b9c4f(0x138)];!_0x2cca74&&(_0x2cca74=await askJsUrl());!_0x4a6d20&&(_0x4a6d20=await askCssUrl());const _0x2e7789=await askConfirm(_0x8b9c4f(0x14c)+_0x3b3309[_0x8b9c4f(0x16d)]+_0x8b9c4f(0x15d)+_0x2cca74+_0x8b9c4f(0x12f)+_0x4a6d20+'?');if(!_0x2e7789)return writeCliSideChannelLine(a79_0x302177[_0x8b9c4f(0x13b)](_0x8b9c4f(0x13a))),{'ok':!![]};const _0x4c0845=[_0x2cca74,_0x4a6d20],_0x3194b6=startSpinner(_0x8b9c4f(0x14f)+_0x3b3309['length']+_0x8b9c4f(0x142));try{const _0x444f9c=await doUpdateCdnUrls(_0x13155d[_0x8b9c4f(0x15f)],_0x13155d['cookie'],_0x3b3309,_0x4c0845);return stopSpinner(_0x3194b6,_0x8b9c4f(0x147)+_0x444f9c['updated']+_0x8b9c4f(0x153),_0x444f9c[_0x8b9c4f(0x131)]===0x0),{'ok':_0x444f9c[_0x8b9c4f(0x131)]===0x0,'data':_0x444f9c,'message':_0x444f9c[_0x8b9c4f(0x131)]>0x0?_0x8b9c4f(0x168)+_0x444f9c[_0x8b9c4f(0x16c)]+_0x8b9c4f(0x16b)+_0x444f9c[_0x8b9c4f(0x131)]+_0x8b9c4f(0x145):_0x8b9c4f(0x168)+_0x444f9c['updated']+_0x8b9c4f(0x143)};}catch(_0x13635f){stopSpinner(_0x3194b6,'Menu\x20update\x20failed',![]);throw CliErrors[_0x8b9c4f(0x14d)](_0x13635f instanceof Error?_0x13635f['message']:_0x8b9c4f(0x130));}}};function parseParams(_0x3426aa){const _0x101e05=a79_0x18455b;if(!_0x3426aa)return{};try{const _0x522edf=JSON[_0x101e05(0x135)](_0x3426aa);if(typeof _0x522edf!==_0x101e05(0x154)||_0x522edf===null||Array[_0x101e05(0x146)](_0x522edf))return{};return{'jsUrl':typeof _0x522edf[_0x101e05(0x132)]===_0x101e05(0x159)?_0x522edf[_0x101e05(0x132)][_0x101e05(0x134)]():undefined,'cssUrl':typeof _0x522edf[_0x101e05(0x138)]===_0x101e05(0x159)?_0x522edf[_0x101e05(0x138)][_0x101e05(0x134)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x180b50,_0x30f2b6){const _0x1bd93a=a80_0x3764,_0x7c0a85=_0x180b50();while(!![]){try{const _0x4c910a=parseInt(_0x1bd93a(0xc6))/0x1*(-parseInt(_0x1bd93a(0xbf))/0x2)+-parseInt(_0x1bd93a(0xb8))/0x3+-parseInt(_0x1bd93a(0xac))/0x4+-parseInt(_0x1bd93a(0xb1))/0x5*(parseInt(_0x1bd93a(0xbe))/0x6)+-parseInt(_0x1bd93a(0xbc))/0x7+parseInt(_0x1bd93a(0xc5))/0x8*(-parseInt(_0x1bd93a(0xc1))/0x9)+-parseInt(_0x1bd93a(0xb9))/0xa*(-parseInt(_0x1bd93a(0xaf))/0xb);if(_0x4c910a===_0x30f2b6)break;else _0x7c0a85['push'](_0x7c0a85['shift']());}catch(_0x1fc5bf){_0x7c0a85['push'](_0x7c0a85['shift']());}}}(a80_0xd144,0x26beb));import{existsSync}from'node:fs';import a80_0x23f2f7 from'node:path';import a80_0x2223a7 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';function a80_0x3764(_0x1cd4b1,_0x2ef011){_0x1cd4b1=_0x1cd4b1-0xac;const _0xd144e5=a80_0xd144();let _0x376476=_0xd144e5[_0x1cd4b1];return _0x376476;}function a80_0xd144(){const _0x37fbf9=['trim','resolve','1062663dVxnRl','√\x20App\x20Code:\x20','12vLobrX','4qFXhZV','Directory\x20\x22','4500GiSQqz','Login\x20failed','Project\x20name\x20cannot\x20exceed\x2050\x20characters','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','5064iiDPpa','158428ExgTsC','production','√\x20Login\x20status:\x20','log','Project\x20name:','test','string','1203660DmtVFP','cyan','Not\x20set','11tcLixz','√\x20Project\x20Name:\x20','660670acCQmR','length','my-app','green','\x22\x20already\x20exists','env','cwd','947001zgKYzL','18247140zxYAts'];a80_0xd144=function(){return _0x37fbf9;};return a80_0xd144();}import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x4c2d5e,_0x5cb914,_0x154cfc){const _0x59748c=a80_0x3764,_0x485fee=_0x59748c(0xb3),_0x437701=readConfig(),_0x573ba0=typeof _0x437701[_0x59748c(0xb6)]===_0x59748c(0xcc)?_0x437701[_0x59748c(0xb6)]:undefined,_0x2a276c=await input({'message':_0x59748c(0xca),'default':_0x485fee,'validate':_0x148e29=>{const _0x4d7f80=_0x59748c,_0x3a1b=_0x148e29[_0x4d7f80(0xba)]()||_0x485fee;if(_0x3a1b[_0x4d7f80(0xb2)]>0x32)return _0x4d7f80(0xc3);const _0x39c1b9=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x3a1b&&!_0x39c1b9[_0x4d7f80(0xcb)](_0x3a1b))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0x4df6a4=a80_0x23f2f7[_0x4d7f80(0xbb)](process[_0x4d7f80(0xb7)](),_0x3a1b);if(existsSync(_0x4df6a4))return _0x4d7f80(0xc0)+_0x3a1b+_0x4d7f80(0xb5);return!![];}});console[_0x59748c(0xc9)](a80_0x2223a7[_0x59748c(0xb4)](_0x59748c(0xb0)+a80_0x2223a7['cyan'](_0x2a276c)));const _0x1e0c08=await selectSingleAppcode(_0x154cfc);console[_0x59748c(0xc9)](a80_0x2223a7[_0x59748c(0xb4)](_0x59748c(0xbd)+a80_0x2223a7['cyan'](_0x1e0c08||_0x59748c(0xae))));if(_0x1e0c08){const _0x4f61f9=await getIsSessionValid();if(!_0x4f61f9){const _0x202c00=await confirm({'message':_0x59748c(0xc4),'default':!![]});if(_0x202c00){const _0x4e7e2d=await authServer({'silent':!![]});console[_0x59748c(0xc9)](a80_0x2223a7['green'](_0x59748c(0xc8)+a80_0x2223a7[_0x59748c(0xad)](_0x4e7e2d?'Logged\x20in':_0x59748c(0xc2))));}else console[_0x59748c(0xc9)](a80_0x2223a7[_0x59748c(0xb4)](_0x59748c(0xc8)+a80_0x2223a7[_0x59748c(0xad)]('Skipped')));}await _0x4c2d5e({'projectName':_0x2a276c,'appCode':_0x1e0c08,'env':_0x5cb914||_0x573ba0||_0x59748c(0xc7)});}else await _0x4c2d5e({'projectName':_0x2a276c,'env':_0x5cb914||_0x573ba0||_0x59748c(0xc7)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a81_0x240b(_0x4d6b18,_0x84c52c){_0x4d6b18=_0x4d6b18-0x1b6;const _0x2d61cd=a81_0x2d61();let _0x240b51=_0x2d61cd[_0x4d6b18];return _0x240b51;}function a81_0x2d61(){const _0x1d88df=['14126184htYkjN','20cXkUQw','33HCxUme','6752oCSzWt','4123308IYcKJT','5152259FZGhtW','3135yuIqIm','449zAvIKR','replace','32310tpdSJi','1475LahPCZ','7293996tZXClD','now','toFixed','1198qhiRDy'];a81_0x2d61=function(){return _0x1d88df;};return a81_0x2d61();}(function(_0x498395,_0x12c4d0){const _0x4fa358=a81_0x240b,_0x4a03cf=_0x498395();while(!![]){try{const _0x3bbccf=parseInt(_0x4fa358(0x1ba))/0x1*(parseInt(_0x4fa358(0x1c1))/0x2)+-parseInt(_0x4fa358(0x1b9))/0x3*(-parseInt(_0x4fa358(0x1b6))/0x4)+-parseInt(_0x4fa358(0x1bd))/0x5*(parseInt(_0x4fa358(0x1bc))/0x6)+-parseInt(_0x4fa358(0x1b8))/0x7+parseInt(_0x4fa358(0x1c2))/0x8+parseInt(_0x4fa358(0x1be))/0x9*(-parseInt(_0x4fa358(0x1c3))/0xa)+parseInt(_0x4fa358(0x1c4))/0xb*(parseInt(_0x4fa358(0x1b7))/0xc);if(_0x3bbccf===_0x12c4d0)break;else _0x4a03cf['push'](_0x4a03cf['shift']());}catch(_0x5de44e){_0x4a03cf['push'](_0x4a03cf['shift']());}}}(a81_0x2d61,0xd7d2b));export function formatElapsed(_0x3a1af4){const _0x1fb3a1=a81_0x240b,_0x37ae1c=Date[_0x1fb3a1(0x1bf)]()-_0x3a1af4;if(_0x37ae1c<0x3e8)return _0x37ae1c+'ms';const _0x52c8a8=(_0x37ae1c/0x3e8)[_0x1fb3a1(0x1c0)](0x2),_0x10771d=_0x52c8a8[_0x1fb3a1(0x1bb)](/\.?0+$/u,'');return _0x10771d+'s';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a81_0x41e4(_0x21a5ae,_0x554dc8){_0x21a5ae=_0x21a5ae-0x146;const _0x321965=a81_0x3219();let _0x41e4ec=_0x321965[_0x21a5ae];return _0x41e4ec;}(function(_0x936c31,_0x223940){const _0x1e9699=a81_0x41e4,_0x5bc3aa=_0x936c31();while(!![]){try{const _0x2b06ca=parseInt(_0x1e9699(0x148))/0x1+-parseInt(_0x1e9699(0x156))/0x2*(parseInt(_0x1e9699(0x18d))/0x3)+parseInt(_0x1e9699(0x180))/0x4*(parseInt(_0x1e9699(0x14f))/0x5)+-parseInt(_0x1e9699(0x189))/0x6+-parseInt(_0x1e9699(0x192))/0x7+-parseInt(_0x1e9699(0x16e))/0x8+-parseInt(_0x1e9699(0x190))/0x9*(-parseInt(_0x1e9699(0x16d))/0xa);if(_0x2b06ca===_0x223940)break;else _0x5bc3aa['push'](_0x5bc3aa['shift']());}catch(_0x3d8ba7){_0x5bc3aa['push'](_0x5bc3aa['shift']());}}}(a81_0x3219,0xdd0bb));import a81_0x1dfd94 from'path';import a81_0x861ea7 from'fs';import a81_0x5ab7cc from'chalk';import a81_0x3611f2 from'ora';import{guidedCreateProject}from'../../../commands/project/create/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{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';function a81_0x3219(){const _0x3e4f81=['currentVersion','4388wTQlMa','version','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','parse','accessKey','stableVersion','green','rmSync','更新\x20package.json\x20失败','7389954BOvbUk','W_OK','accessSync','\x20√\x20','3NahlgP','description','1.0.0','9ZoqKsw','gray','12408053SfPrNu','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','toLocaleString','更新\x20package.json\x20name','API\x20configuration\x20pulled:\x20','production','\x20\x201.\x20Start\x20project:\x20','error','√\x20package.json\x20updated:\x20name=','stop','locale','API\x20配置拉取异常','Project\x20name\x20cannot\x20be\x20empty','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','清理项目目录失败:\x20','bold','\x20dataset(s),\x20generated\x20','success','test','message','\x20config\x20set\x20appcode\x20<app-code>\x27','cwd','64886HhcwhN','resolve','info','existsSync','utf8','√\x20Pulled\x20','appCode','3430AaSWvb','项目创建完成:\x20','CLI\x20版本检查','chdir','join','constants','projectName','740082XYdDwv','stringify','start','needsUpgrade','format','create','\x20run\x20start','cyan','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','\x20|\x20AppCode:\x20','projectCode','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','\x20Generated\x20by\x20rabetbase\x20cli\x20','Project\x20directory\x20','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','readFileSync','配置应用AppCode失败','riskLevel','length','Project\x20name:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','\x20&&\x20','writeFileSync','39585350uoEMvN','3970248YRcHmm','warn','repeat','🚀\x20Next\x20Steps:','...','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','Install\x20dependencies','cookie','\x20\x202.\x20Pull\x20API\x20configuration:\x20','cd\x20','setLogPath','配置应用AppCode:\x20','fail','Format\x20code','log','env','\x20model(s)'];a81_0x3219=function(){return _0x3e4f81;};return a81_0x3219();}import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x229b89){const _0x1a489e=a81_0x41e4,_0x4868cd=await checkCliVersion();_0x4868cd[_0x1a489e(0x159)]&&(printCliUpgradeWarning(_0x4868cd),logger[_0x1a489e(0x14a)](_0x1a489e(0x15b),_0x1a489e(0x151),{'currentVersion':_0x4868cd[_0x1a489e(0x17f)],'stableVersion':_0x4868cd[_0x1a489e(0x185)],'needsUpgrade':_0x4868cd[_0x1a489e(0x159)]}));if(_0x229b89[_0x1a489e(0x160)]&&_0x229b89[_0x1a489e(0x14e)])await runCreate({'projectName':_0x229b89[_0x1a489e(0x160)],'appCode':_0x229b89['appCode'],'env':_0x229b89[_0x1a489e(0x17d)]},_0x229b89);else{if(_0x229b89['projectCode']){const _0x34b929=await selectSingleAppcode(_0x229b89[_0x1a489e(0x175)]);await runCreate({'projectName':_0x229b89['projectCode'],'appCode':_0x34b929||undefined,'env':_0x229b89[_0x1a489e(0x17d)]},_0x229b89);}else await guidedCreateProject(_0xf6c1=>runCreate(_0xf6c1,_0x229b89),_0x229b89['env'],_0x229b89['cookie']);}}async function runCreate(_0x409a01,_0x33c2a3){const _0xb4b380=a81_0x41e4;if(!_0x409a01['projectName']||_0x409a01[_0xb4b380(0x155)]['trim']()==='')throw new Error(_0xb4b380(0x19e));const _0x5d2120=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5d2120[_0xb4b380(0x1a4)](_0x409a01[_0xb4b380(0x155)]))throw new Error(_0xb4b380(0x182));if(_0x409a01['projectName'][_0xb4b380(0x168)]>0x64)throw new Error(_0xb4b380(0x16a));const _0x1f0d35=a81_0x1dfd94[_0xb4b380(0x149)](process[_0xb4b380(0x147)](),_0x409a01[_0xb4b380(0x155)]);if(a81_0x861ea7[_0xb4b380(0x14b)](_0x1f0d35))throw new Error(_0xb4b380(0x163)+_0x409a01['projectName']+'\x20already\x20exists');try{a81_0x861ea7[_0xb4b380(0x18b)](a81_0x1dfd94['dirname'](_0x1f0d35),a81_0x861ea7[_0xb4b380(0x154)][_0xb4b380(0x18a)]);}catch{throw new Error(_0xb4b380(0x161));}logger[_0xb4b380(0x178)](_0x1f0d35),logger['info'](_0xb4b380(0x15b),'开始创建项目:\x20'+_0x409a01[_0xb4b380(0x155)],{'projectDir':_0x1f0d35,'appCode':_0x409a01[_0xb4b380(0x14e)]}),console['log'](),console[_0xb4b380(0x17c)](a81_0x5ab7cc['green'](_0xb4b380(0x18c))+_0xb4b380(0x169)+a81_0x5ab7cc['green'](_0x409a01[_0xb4b380(0x155)])+(_0x409a01[_0xb4b380(0x14e)]?_0xb4b380(0x15f)+a81_0x5ab7cc[_0xb4b380(0x15d)](_0x409a01[_0xb4b380(0x14e)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x409a01['projectName'])),await updatePackageJsonName(_0x409a01[_0xb4b380(0x155)]),await runTask(_0xb4b380(0x174),()=>installDependencies(_0x409a01[_0xb4b380(0x155)])),await runTask(_0xb4b380(0x17b),()=>formatProjectCode(_0x409a01[_0xb4b380(0x155)])),await configureAppCode(_0x409a01[_0xb4b380(0x155)],_0x409a01[_0xb4b380(0x14e)]||'',_0x409a01[_0xb4b380(0x17d)]);let _0x2f6f88=![];if(_0x409a01[_0xb4b380(0x14e)]){console['log']('*\x20Pulling\x20API\x20configuration...');const _0x14f2aa=process[_0xb4b380(0x147)]();try{process[_0xb4b380(0x152)](_0x1f0d35);const _0x3038aa=_0x409a01['env']||_0xb4b380(0x197);initEnv(_0x3038aa);const {configArray:_0x4aeb88}=await fetchModelList(_0x409a01[_0xb4b380(0x14e)],_0x33c2a3[_0xb4b380(0x175)]||''),_0x3922ad=DEFAULT_API_DIR,_0x20dbd3=await generateApiFile(_0x4aeb88,'',_0x409a01[_0xb4b380(0x14e)],!![],_0x3038aa,_0x3922ad);console[_0xb4b380(0x17c)](_0xb4b380(0x14d)+_0x4aeb88[_0xb4b380(0x168)]+_0xb4b380(0x1a2)+_0x20dbd3['modelCount']+_0xb4b380(0x17e)),logger['info'](_0xb4b380(0x15b),_0xb4b380(0x196)+_0x409a01[_0xb4b380(0x14e)]);}catch(_0x161658){_0x2f6f88=!![],console[_0xb4b380(0x17c)](_0xb4b380(0x19f)),logger[_0xb4b380(0x16f)]('create',_0xb4b380(0x19d),{'error':_0x161658 instanceof Error?_0x161658[_0xb4b380(0x1a5)]:String(_0x161658)});}finally{process[_0xb4b380(0x152)](_0x14f2aa);}}logger[_0xb4b380(0x1a3)](_0xb4b380(0x15b),_0xb4b380(0x150)+_0x409a01[_0xb4b380(0x155)]),console[_0xb4b380(0x17c)](),console[_0xb4b380(0x17c)](a81_0x5ab7cc[_0xb4b380(0x186)]('─'[_0xb4b380(0x170)](0x3c))),console[_0xb4b380(0x17c)](a81_0x5ab7cc[_0xb4b380(0x15d)]['bold'](_0xb4b380(0x171))),console[_0xb4b380(0x17c)](),console[_0xb4b380(0x17c)](_0xb4b380(0x198)+a81_0x5ab7cc['cyan'][_0xb4b380(0x1a1)](_0xb4b380(0x177)+_0x409a01['projectName']+_0xb4b380(0x16b)+CLI_BIN_NAME+_0xb4b380(0x15c))),_0x2f6f88&&console['log'](_0xb4b380(0x176)+a81_0x5ab7cc['cyan'][_0xb4b380(0x1a1)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0xb4b380(0x17c)](a81_0x5ab7cc[_0xb4b380(0x186)]('─'[_0xb4b380(0x170)](0x3c)));}catch(_0x1df9ab){logger['error'](_0xb4b380(0x15b),'项目创建失败:\x20'+_0x409a01[_0xb4b380(0x155)],{'error':_0x1df9ab instanceof Error?_0x1df9ab['message']:String(_0x1df9ab)});try{a81_0x861ea7[_0xb4b380(0x14b)](_0x1f0d35)&&(console[_0xb4b380(0x17c)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x1f0d35),a81_0x861ea7[_0xb4b380(0x187)](_0x1f0d35,{'recursive':!![],'force':!![]}));}catch{logger[_0xb4b380(0x16f)](_0xb4b380(0x15b),_0xb4b380(0x1a0)+_0x1f0d35);}throw _0x1df9ab;}}async function runTask(_0x46a4b0,_0x5c3002){const _0x1eb65b=a81_0x41e4,_0x39ad58=a81_0x3611f2(_0x46a4b0+_0x1eb65b(0x172))[_0x1eb65b(0x158)]();try{const _0x5617c2=await _0x5c3002();_0x39ad58[_0x1eb65b(0x19b)](),console[_0x1eb65b(0x17c)](''+a81_0x5ab7cc[_0x1eb65b(0x186)](_0x1eb65b(0x18c))+_0x46a4b0+'\x20'+a81_0x5ab7cc[_0x1eb65b(0x191)]('['+_0x5617c2+']'));}catch(_0x37850d){_0x39ad58[_0x1eb65b(0x17a)](_0x46a4b0);throw _0x37850d;}}async function updatePackageJsonName(_0x30933a){const _0x2604bc=a81_0x41e4,_0x1d673d=a81_0x1dfd94[_0x2604bc(0x149)](process[_0x2604bc(0x147)](),_0x30933a),_0x48b08f=a81_0x1dfd94['join'](_0x1d673d,'package.json');try{console[_0x2604bc(0x17c)](_0x2604bc(0x164));const _0xbe5f12=getRabetbaseCliPackageRoot(),_0x53f3c6=a81_0x1dfd94[_0x2604bc(0x153)](_0xbe5f12,'package.json');let _0x33eb37=_0x2604bc(0x18f);try{const _0xbf6447=JSON[_0x2604bc(0x183)](a81_0x861ea7[_0x2604bc(0x165)](_0x53f3c6,_0x2604bc(0x14c)));_0x33eb37=_0xbf6447[_0x2604bc(0x181)]||_0x2604bc(0x18f);}catch{}const _0x3c14ca=a81_0x861ea7['readFileSync'](_0x48b08f,_0x2604bc(0x14c)),_0x23401e=JSON[_0x2604bc(0x183)](_0x3c14ca);_0x23401e['name']=_0x30933a,_0x23401e[_0x2604bc(0x18e)]=_0x30933a+_0x2604bc(0x162)+_0x33eb37,a81_0x861ea7[_0x2604bc(0x16c)](_0x48b08f,JSON[_0x2604bc(0x157)](_0x23401e,null,0x2)+'\x0a',_0x2604bc(0x14c)),console[_0x2604bc(0x17c)](_0x2604bc(0x19a)+_0x30933a),logger[_0x2604bc(0x14a)](_0x2604bc(0x15b),_0x2604bc(0x195));}catch(_0x47319b){logger[_0x2604bc(0x199)](_0x2604bc(0x15b),_0x2604bc(0x188));throw _0x47319b;}}async function configureAppCode(_0xa46077,_0x3a0582,_0x242fe5){const _0x3f95d0=a81_0x41e4,_0x3b7ee4=a81_0x1dfd94[_0x3f95d0(0x149)](process[_0x3f95d0(0x147)](),_0xa46077),_0x4cccdc=a81_0x1dfd94[_0x3f95d0(0x153)](_0x3b7ee4,NEW_CONFIG_NAME);try{_0x3a0582?console[_0x3f95d0(0x17c)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0xa46077+':\x20'+_0x3a0582):console[_0x3f95d0(0x17c)](_0x3f95d0(0x193)+_0xa46077);const _0x138c29=getRabetbaseCliPackageRoot(),_0x449602=a81_0x1dfd94[_0x3f95d0(0x153)](_0x138c29,'package.json');let _0x2508a1=_0x3f95d0(0x18f);try{const _0x50bf0c=JSON[_0x3f95d0(0x183)](a81_0x861ea7[_0x3f95d0(0x165)](_0x449602,_0x3f95d0(0x14c)));_0x2508a1=_0x50bf0c[_0x3f95d0(0x181)]||_0x3f95d0(0x18f);}catch{}const _0x530077=readConfig(),_0x1310ff=typeof _0x530077[_0x3f95d0(0x17d)]==='string'?_0x530077[_0x3f95d0(0x17d)]:undefined,_0xcdf0a0=[_0x3f95d0(0x175),_0x3f95d0(0x184),_0x3f95d0(0x19c),_0x3f95d0(0x15a),_0x3f95d0(0x167)],_0x42b0c8={};for(const _0x455462 of _0xcdf0a0){if(_0x530077[_0x455462]!=null)_0x42b0c8[_0x455462]=_0x530077[_0x455462];}const _0x36fc0e={..._0x42b0c8,'appcode':_0x3a0582||'','env':_0x242fe5||_0x1310ff||_0x3f95d0(0x197),'createdAt':new Date()[_0x3f95d0(0x194)](),'version':_0x2508a1};writeConfigFile(_0x4cccdc,_0x36fc0e),_0x3a0582?console[_0x3f95d0(0x17c)](_0x3f95d0(0x15e)+_0x3a0582):console[_0x3f95d0(0x17c)](_0x3f95d0(0x173)+CLI_BIN_NAME+_0x3f95d0(0x146)),logger[_0x3f95d0(0x14a)](_0x3f95d0(0x15b),_0x3f95d0(0x179)+_0x3a0582);}catch(_0x4b443e){logger['error'](_0x3f95d0(0x15b),_0x3f95d0(0x166));}}
|
|
1
|
+
(function(_0x343d0b,_0x297b2d){const _0xa6976c=a82_0x2650,_0x53d8d6=_0x343d0b();while(!![]){try{const _0x9472c2=parseInt(_0xa6976c(0x122))/0x1*(parseInt(_0xa6976c(0xec))/0x2)+-parseInt(_0xa6976c(0x119))/0x3+parseInt(_0xa6976c(0x110))/0x4*(-parseInt(_0xa6976c(0x107))/0x5)+parseInt(_0xa6976c(0x114))/0x6+parseInt(_0xa6976c(0xe3))/0x7*(-parseInt(_0xa6976c(0xd4))/0x8)+-parseInt(_0xa6976c(0xe5))/0x9+parseInt(_0xa6976c(0x105))/0xa*(parseInt(_0xa6976c(0x11a))/0xb);if(_0x9472c2===_0x297b2d)break;else _0x53d8d6['push'](_0x53d8d6['shift']());}catch(_0x38fc09){_0x53d8d6['push'](_0x53d8d6['shift']());}}}(a82_0x1bf2,0x6ccd1));import a82_0x486c43 from'path';import a82_0x525149 from'fs';import a82_0x1d9aad from'chalk';import a82_0x1b7c1f from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';function a82_0x2650(_0x8c6b29,_0x497320){_0x8c6b29=_0x8c6b29-0xcc;const _0x1bf230=a82_0x1bf2();let _0x265026=_0x1bf230[_0x8c6b29];return _0x265026;}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{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';function a82_0x1bf2(){const _0x1d0b7d=['existsSync','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','production','stringify','\x20|\x20AppCode:\x20','readFileSync','rmSync','3UkSjWj','√\x20Configuration\x20file\x20created,\x20Apps:\x20','Project\x20directory\x20','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','version','\x20dataset(s),\x20generated\x20','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','\x20api\x20pull','start','create','🚀\x20Next\x20Steps:','*\x20Pulling\x20API\x20configuration...','description','projectCode','2128072KSntkd','API\x20configuration\x20pulled:\x20','projectName','test','repeat','keys','currentVersion','green','W_OK','utf8','join','writeFileSync','\x20&&\x20','\x20|\x20Default:\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','14CZmeUC','cwd','4470300kkPiKW','\x20already\x20exists','info','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','message','bold','resolve','574936dbOJjq','error','\x20\x202.\x20Pull\x20API\x20configuration:\x20','更新\x20package.json\x20失败','Copy\x20project\x20files','*\x20Configuring\x20AppCode\x20for\x20project\x20','needsUpgrade','appCode','项目创建完成:\x20','更新\x20package.json\x20name','package.json','Project\x20name:\x20','modelCount','API\x20配置拉取异常','cyan','cookie','dirname','√\x20Pulled\x20','defaultApp','cd\x20','CLI\x20版本检查','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','开始创建项目:\x20','1.0.0','\x20\x201.\x20Start\x20project:\x20','53470VIveNh','length','205uXxEgF','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','配置应用AppCode失败','string','constants','apps','env','清理项目目录失败:\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','46616UqgSHS','\x20config\x20set\x20appcode\x20<app-code>\x27','trim','log','3515760CTVvZE','parse','chdir','\x20Generated\x20by\x20rabetbase\x20cli\x20','Install\x20dependencies','1648626ynUNHW','2167KeYxYZ'];a82_0x1bf2=function(){return _0x1d0b7d;};return a82_0x1bf2();}import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x646208){const _0xd061b2=a82_0x2650,_0x20149c=await checkCliVersion();_0x20149c[_0xd061b2(0xf2)]&&(printCliUpgradeWarning(_0x20149c),logger[_0xd061b2(0xe7)](_0xd061b2(0xcf),_0xd061b2(0x100),{'currentVersion':_0x20149c[_0xd061b2(0xda)],'stableVersion':_0x20149c['stableVersion'],'needsUpgrade':_0x20149c['needsUpgrade']}));if(_0x646208['projectCode']&&_0x646208['appCode'])await runCreate({'projectName':_0x646208[_0xd061b2(0xd3)],'appCode':_0x646208[_0xd061b2(0xf3)],'env':_0x646208['env']},_0x646208);else{if(_0x646208[_0xd061b2(0xd3)]){const _0x4008c5=await selectSingleAppcode(_0x646208[_0xd061b2(0xfb)]);await runCreate({'projectName':_0x646208[_0xd061b2(0xd3)],'appCode':_0x4008c5||undefined,'env':_0x646208['env']},_0x646208);}else await guidedCreateProject(_0x4d656b=>runCreate(_0x4d656b,_0x646208),_0x646208[_0xd061b2(0x10d)],_0x646208[_0xd061b2(0xfb)]);}}async function runCreate(_0x432209,_0x2b94c6){const _0x8439da=a82_0x2650;if(!_0x432209['projectName']||_0x432209[_0x8439da(0xd6)][_0x8439da(0x112)]()==='')throw new Error('Project\x20name\x20cannot\x20be\x20empty');const _0x4e6972=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4e6972[_0x8439da(0xd7)](_0x432209[_0x8439da(0xd6)]))throw new Error(_0x8439da(0x10f));if(_0x432209[_0x8439da(0xd6)][_0x8439da(0x106)]>0x64)throw new Error(_0x8439da(0x11c));const _0x154678=a82_0x486c43[_0x8439da(0xeb)](process[_0x8439da(0xe4)](),_0x432209[_0x8439da(0xd6)]);if(a82_0x525149[_0x8439da(0x11b)](_0x154678))throw new Error(_0x8439da(0x124)+_0x432209[_0x8439da(0xd6)]+_0x8439da(0xe6));try{a82_0x525149['accessSync'](a82_0x486c43[_0x8439da(0xfc)](_0x154678),a82_0x525149[_0x8439da(0x10b)][_0x8439da(0xdc)]);}catch{throw new Error(_0x8439da(0xcc));}logger['setLogPath'](_0x154678),logger[_0x8439da(0xe7)](_0x8439da(0xcf),_0x8439da(0x102)+_0x432209[_0x8439da(0xd6)],{'projectDir':_0x154678,'appCode':_0x432209['appCode']}),console[_0x8439da(0x113)](),console[_0x8439da(0x113)](a82_0x1d9aad[_0x8439da(0xdb)]('\x20√\x20')+_0x8439da(0xf7)+a82_0x1d9aad[_0x8439da(0xdb)](_0x432209[_0x8439da(0xd6)])+(_0x432209['appCode']?_0x8439da(0x11f)+a82_0x1d9aad[_0x8439da(0xfa)](_0x432209['appCode']):''));try{await runTask(_0x8439da(0xf0),()=>copyProjectTemplate(_0x432209[_0x8439da(0xd6)])),await updatePackageJsonName(_0x432209['projectName']),await runTask(_0x8439da(0x118),()=>installDependencies(_0x432209[_0x8439da(0xd6)])),await runTask('Format\x20code',()=>formatProjectCode(_0x432209[_0x8439da(0xd6)])),await configureAppCode(_0x432209[_0x8439da(0xd6)],_0x432209[_0x8439da(0xf3)]||'',_0x432209[_0x8439da(0x10d)]);let _0x60f54d=![];if(_0x432209[_0x8439da(0xf3)]){console[_0x8439da(0x113)](_0x8439da(0xd1));const _0x48d360=process['cwd']();try{process['chdir'](_0x154678);const _0x2dc24a=_0x432209[_0x8439da(0x10d)]||'production';initEnv(_0x2dc24a);const {configArray:_0x41bd31}=await fetchModelList(_0x432209[_0x8439da(0xf3)],_0x2b94c6[_0x8439da(0xfb)]||''),_0x56ef2e=DEFAULT_API_DIR,_0x1c3ed6=await generateApiFile(_0x41bd31,'',_0x432209['appCode'],!![],_0x2dc24a,_0x56ef2e);console[_0x8439da(0x113)](_0x8439da(0xfd)+_0x41bd31[_0x8439da(0x106)]+_0x8439da(0x127)+_0x1c3ed6[_0x8439da(0xf8)]+'\x20model(s)'),logger['info'](_0x8439da(0xcf),_0x8439da(0xd5)+_0x432209[_0x8439da(0xf3)]);}catch(_0x106265){_0x60f54d=!![],console[_0x8439da(0x113)](_0x8439da(0xe8)),logger['warn']('create',_0x8439da(0xf9),{'error':_0x106265 instanceof Error?_0x106265[_0x8439da(0xe9)]:String(_0x106265)});}finally{process[_0x8439da(0x116)](_0x48d360);}}logger['success'](_0x8439da(0xcf),_0x8439da(0xf4)+_0x432209[_0x8439da(0xd6)]),console[_0x8439da(0x113)](),console[_0x8439da(0x113)](a82_0x1d9aad['green']('─'['repeat'](0x3c))),console['log'](a82_0x1d9aad[_0x8439da(0xfa)][_0x8439da(0xea)](_0x8439da(0xd0))),console[_0x8439da(0x113)](),console[_0x8439da(0x113)](_0x8439da(0x104)+a82_0x1d9aad['cyan'][_0x8439da(0xea)](_0x8439da(0xff)+_0x432209[_0x8439da(0xd6)]+_0x8439da(0xe0)+CLI_BIN_NAME+'\x20run\x20start')),_0x60f54d&&console[_0x8439da(0x113)](_0x8439da(0xee)+a82_0x1d9aad['cyan'][_0x8439da(0xea)](CLI_BIN_NAME+_0x8439da(0xcd))),console[_0x8439da(0x113)](a82_0x1d9aad[_0x8439da(0xdb)]('─'[_0x8439da(0xd8)](0x3c)));}catch(_0x328ec3){logger[_0x8439da(0xed)](_0x8439da(0xcf),'项目创建失败:\x20'+_0x432209[_0x8439da(0xd6)],{'error':_0x328ec3 instanceof Error?_0x328ec3[_0x8439da(0xe9)]:String(_0x328ec3)});try{a82_0x525149[_0x8439da(0x11b)](_0x154678)&&(console[_0x8439da(0x113)](_0x8439da(0xe2)+_0x154678),a82_0x525149[_0x8439da(0x121)](_0x154678,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x8439da(0xcf),_0x8439da(0x10e)+_0x154678);}throw _0x328ec3;}}async function runTask(_0x3cbbac,_0x43d290){const _0x2664a1=a82_0x2650,_0xd1d809=a82_0x1b7c1f(_0x3cbbac+'...')[_0x2664a1(0xce)]();try{const _0x42906a=await _0x43d290();_0xd1d809['stop'](),console[_0x2664a1(0x113)](''+a82_0x1d9aad[_0x2664a1(0xdb)]('\x20√\x20')+_0x3cbbac+'\x20'+a82_0x1d9aad['gray']('['+_0x42906a+']'));}catch(_0x360b10){_0xd1d809['fail'](_0x3cbbac);throw _0x360b10;}}async function updatePackageJsonName(_0x59e7f3){const _0x3b39c4=a82_0x2650,_0x4e44d8=a82_0x486c43['resolve'](process[_0x3b39c4(0xe4)](),_0x59e7f3),_0x20210f=a82_0x486c43['join'](_0x4e44d8,_0x3b39c4(0xf6));try{console[_0x3b39c4(0x113)](_0x3b39c4(0x125));const _0x34ef37=getRabetbaseCliPackageRoot(),_0x4e8064=a82_0x486c43[_0x3b39c4(0xde)](_0x34ef37,_0x3b39c4(0xf6));let _0x8207d1=_0x3b39c4(0x103);try{const _0x39dba5=JSON[_0x3b39c4(0x115)](a82_0x525149['readFileSync'](_0x4e8064,_0x3b39c4(0xdd)));_0x8207d1=_0x39dba5[_0x3b39c4(0x126)]||_0x3b39c4(0x103);}catch{}const _0x49cc56=a82_0x525149[_0x3b39c4(0x120)](_0x20210f,'utf8'),_0x2c815a=JSON[_0x3b39c4(0x115)](_0x49cc56);_0x2c815a['name']=_0x59e7f3,_0x2c815a[_0x3b39c4(0xd2)]=_0x59e7f3+_0x3b39c4(0x117)+_0x8207d1,a82_0x525149[_0x3b39c4(0xdf)](_0x20210f,JSON[_0x3b39c4(0x11e)](_0x2c815a,null,0x2)+'\x0a','utf8'),console['log']('√\x20package.json\x20updated:\x20name='+_0x59e7f3),logger[_0x3b39c4(0xe7)](_0x3b39c4(0xcf),_0x3b39c4(0xf5));}catch(_0x2e2a31){logger[_0x3b39c4(0xed)](_0x3b39c4(0xcf),_0x3b39c4(0xef));throw _0x2e2a31;}}async function configureAppCode(_0xa78083,_0x3e811e,_0x569ff1){const _0x576853=a82_0x2650,_0x520e5a=a82_0x486c43['resolve'](process[_0x576853(0xe4)](),_0xa78083),_0x4175c8=a82_0x486c43[_0x576853(0xde)](_0x520e5a,NEW_CONFIG_NAME);try{_0x3e811e?console['log'](_0x576853(0xf1)+_0xa78083+':\x20'+_0x3e811e):console['log'](_0x576853(0x101)+_0xa78083);const _0x221e29=getRabetbaseCliPackageRoot(),_0x5c8728=a82_0x486c43[_0x576853(0xde)](_0x221e29,_0x576853(0xf6));let _0x21206d='1.0.0';try{const _0x36dc5a=JSON[_0x576853(0x115)](a82_0x525149['readFileSync'](_0x5c8728,_0x576853(0xdd)));_0x21206d=_0x36dc5a[_0x576853(0x126)]||'1.0.0';}catch{}const _0xa85e72=readConfig(),_0x4af824=typeof _0xa85e72[_0x576853(0x10d)]===_0x576853(0x10a)?_0xa85e72[_0x576853(0x10d)]:undefined,_0x49c278={};for(const _0x539304 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0xa85e72[_0x539304]!=null)_0x49c278[_0x539304]=_0xa85e72[_0x539304];}const _0x2ce961=buildCanonicalProjectConfig(_0x49c278,{'appCodes':_0x3e811e?[_0x3e811e]:[],'env':_0x569ff1||_0x4af824||_0x576853(0x11d),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x21206d}});writeConfigFile(_0x4175c8,_0x2ce961),_0x3e811e?console[_0x576853(0x113)](_0x576853(0x123)+Object[_0x576853(0xd9)](_0x2ce961[_0x576853(0x10c)]||{})['join'](',\x20')+_0x576853(0xe1)+_0x2ce961[_0x576853(0xfe)]):console[_0x576853(0x113)](_0x576853(0x108)+CLI_BIN_NAME+_0x576853(0x111)),logger[_0x576853(0xe7)](_0x576853(0xcf),'配置应用AppCode:\x20'+_0x3e811e);}catch(_0x20d5d0){logger[_0x576853(0xed)](_0x576853(0xcf),_0x576853(0x109));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfe223d,_0x1fcfc9){const _0x1f1ad3=a83_0x29a3,_0x49befb=_0xfe223d();while(!![]){try{const _0xaadd4b=-parseInt(_0x1f1ad3(0x110))/0x1+-parseInt(_0x1f1ad3(0x136))/0x2*(-parseInt(_0x1f1ad3(0x11a))/0x3)+-parseInt(_0x1f1ad3(0x12c))/0x4+parseInt(_0x1f1ad3(0x121))/0x5+parseInt(_0x1f1ad3(0x120))/0x6*(parseInt(_0x1f1ad3(0x116))/0x7)+parseInt(_0x1f1ad3(0x12e))/0x8+-parseInt(_0x1f1ad3(0x108))/0x9;if(_0xaadd4b===_0x1fcfc9)break;else _0x49befb['push'](_0x49befb['shift']());}catch(_0x2e1277){_0x49befb['push'](_0x49befb['shift']());}}}(a83_0x24ac,0xeab10));import a83_0x2797d6 from'path';import a83_0xece064 from'fs/promises';import{existsSync}from'fs';function a83_0x24ac(){const _0x20f97d=['\x20\x20Pulling\x20API\x20configuration...','\x20\x20Installing\x20dependencies...','\x20created\x20successfully!','readFile','...','bun\x20run\x20format','resolve','\x20\x20√\x20package.json\x20updated','4069856NcXzUD','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','9782736yngzvQ','Cannot\x20create\x20project\x20in\x20current\x20directory.','dirname','npm','bun\x20--version','*\x20Creating\x20project\x20','description','length','23302FkAarK','string','env','\x0a\x20\x20cd\x20','chdir','cwd','\x20dataset(s),\x20generated\x20','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','\x20\x20√\x20Configuration\x20file\x20created','\x0a√\x20Project\x20','test','log','Use\x20a\x20different\x20project\x20name.','stringify','23447277vJTKaR','Project\x20name\x20contains\x20invalid\x20characters.','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','needsUpgrade','writeFile','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','production','446808FTrQIu','toLocaleString','name','modelCount','access','\x22\x20already\x20exists.','14sztWdU','\x20api\x20pull`\x20manually\x20later.','\x20model(s)','package.json','381JhJdlf','join','Check\x20directory\x20permissions.','Project\x20name\x20cannot\x20be\x20empty.','ignore','Project\x20directory\x20\x22','2930916WZuPXu','6756650NTYIeW','validation','constants'];a83_0x24ac=function(){return _0x20f97d;};return a83_0x24ac();}import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';function a83_0x29a3(_0x165112,_0x322ca2){_0x165112=_0x165112-0x101;const _0x24acf3=a83_0x24ac();let _0x29a383=_0x24acf3[_0x165112];return _0x29a383;}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x2adc19,_0x175177,_0x53b5f2,_0x34f364){const _0x16b0de=a83_0x29a3,_0x1e350c=await checkCliVersion();_0x1e350c[_0x16b0de(0x10b)]&&printCliUpgradeWarning(_0x1e350c);if(!_0x2adc19||_0x2adc19['trim']()==='')throw CliErrors['validation'](_0x16b0de(0x11d));const _0x44891f=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x44891f[_0x16b0de(0x104)](_0x2adc19))throw CliErrors[_0x16b0de(0x122)](_0x16b0de(0x109),_0x16b0de(0x10e));if(_0x2adc19[_0x16b0de(0x135)]>0x64)throw CliErrors[_0x16b0de(0x122)](_0x16b0de(0x12d));const _0x377736=a83_0x2797d6['resolve'](process[_0x16b0de(0x13b)](),_0x2adc19);if(existsSync(_0x377736))throw CliErrors['validation'](_0x16b0de(0x11f)+_0x2adc19+_0x16b0de(0x115),_0x16b0de(0x106));try{const _0x1730d0=a83_0x2797d6[_0x16b0de(0x130)](_0x377736);await a83_0xece064[_0x16b0de(0x114)](_0x1730d0,a83_0xece064[_0x16b0de(0x123)]['W_OK']);}catch{throw CliErrors[_0x16b0de(0x122)](_0x16b0de(0x12f),_0x16b0de(0x11c));}try{console[_0x16b0de(0x105)](_0x16b0de(0x133)+_0x2adc19+_0x16b0de(0x128));const _0xc286b2=getSubAppReactDemoTemplateDir();await copyDirectory(_0xc286b2,_0x377736),console[_0x16b0de(0x105)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x2adc19),console[_0x16b0de(0x105)](_0x16b0de(0x12b)),console[_0x16b0de(0x105)](_0x16b0de(0x125)),console[_0x16b0de(0x105)](_0x16b0de(0x10a)),await formatCode(_0x377736),console[_0x16b0de(0x105)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x2adc19,_0x53b5f2,_0x175177),console[_0x16b0de(0x105)](_0x16b0de(0x102)),_0x53b5f2&&await pullApiConfig(_0x377736,_0x53b5f2,_0x175177,_0x34f364),console[_0x16b0de(0x105)](_0x16b0de(0x103)+_0x2adc19+_0x16b0de(0x126)),console['log'](_0x16b0de(0x139)+_0x2adc19),console['log']('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0xf61459){try{existsSync(_0x377736)&&await a83_0xece064['rm'](_0x377736,{'recursive':!![],'force':!![]});}catch{}throw _0xf61459;}}async function updatePackageJsonName(_0x28d81d){const _0x368e13=a83_0x29a3,_0x18210c=a83_0x2797d6[_0x368e13(0x12a)](process[_0x368e13(0x13b)](),_0x28d81d),_0x590449=a83_0x2797d6[_0x368e13(0x11b)](_0x18210c,_0x368e13(0x119)),_0x36a38a=await a83_0xece064[_0x368e13(0x127)](_0x590449,'utf-8'),_0x4e027c=JSON['parse'](_0x36a38a);_0x4e027c[_0x368e13(0x112)]=_0x28d81d,_0x4e027c[_0x368e13(0x134)]=_0x368e13(0x10d),await a83_0xece064[_0x368e13(0x10c)](_0x590449,JSON[_0x368e13(0x107)](_0x4e027c,null,0x2)+'\x0a');}function detectPackageManager(){const _0x3b0d3a=a83_0x29a3;try{return execSync(_0x3b0d3a(0x132),{'stdio':_0x3b0d3a(0x11e)}),'bun';}catch{return _0x3b0d3a(0x131);}}async function formatCode(_0x40d73c){const _0x3faf2c=a83_0x29a3;try{await execAsync(_0x3faf2c(0x129),{'cwd':_0x40d73c});}catch{}}async function configureProject(_0x4a2def,_0x2cec90,_0x4aa691){const _0xf3b746=a83_0x29a3,_0x468e1b=a83_0x2797d6['resolve'](process[_0xf3b746(0x13b)](),_0x4a2def),_0x5a09ed=a83_0x2797d6[_0xf3b746(0x11b)](_0x468e1b,NEW_CONFIG_NAME),_0x1b3dff=readConfig(),_0x20fc17=typeof _0x1b3dff[_0xf3b746(0x138)]===_0xf3b746(0x137)?_0x1b3dff[_0xf3b746(0x138)]:undefined,_0x1f8c98={};for(const _0x25daf4 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1b3dff[_0x25daf4]!=null)_0x1f8c98[_0x25daf4]=_0x1b3dff[_0x25daf4];}const _0x469b2c=buildCanonicalProjectConfig(_0x1f8c98,{'appCodes':_0x2cec90?[_0x2cec90]:[],'env':_0x4aa691||_0x20fc17||_0xf3b746(0x10f),'metadata':{'createdAt':new Date()[_0xf3b746(0x111)](),'version':getCliVersion()}});writeConfigFile(_0x5a09ed,_0x469b2c);}async function pullApiConfig(_0x45481e,_0x394f2c,_0x78910e,_0x46a83a){const _0x5522dc=a83_0x29a3,_0x316775=process['cwd']();try{process[_0x5522dc(0x13a)](_0x45481e);const _0x4e66da=_0x78910e||_0x5522dc(0x10f);initEnv(_0x4e66da),console[_0x5522dc(0x105)](_0x5522dc(0x124));const {configArray:_0x358e03}=await fetchModelList(_0x394f2c,_0x46a83a||''),_0x18c22e=await generateApiFile(_0x358e03,'',_0x394f2c,!![],_0x4e66da,DEFAULT_API_DIR);console[_0x5522dc(0x105)]('\x20\x20√\x20Pulled\x20'+_0x358e03[_0x5522dc(0x135)]+_0x5522dc(0x13c)+_0x18c22e[_0x5522dc(0x113)]+_0x5522dc(0x118));}catch(_0x34694c){console['log'](_0x5522dc(0x101)+CLI_BIN_NAME+_0x5522dc(0x117));}finally{process['chdir'](_0x316775);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a84_0x173c(_0x50bf87,_0x35b7b1){_0x50bf87=_0x50bf87-0x9e;const _0x3af13f=a84_0x3af1();let _0x173c47=_0x3af13f[_0x50bf87];return _0x173c47;}const a84_0x11e1a8=a84_0x173c;(function(_0x5088fc,_0x49d4f2){const _0x1ed49f=a84_0x173c,_0xaad675=_0x5088fc();while(!![]){try{const _0xfcec0a=parseInt(_0x1ed49f(0xa6))/0x1+-parseInt(_0x1ed49f(0xa0))/0x2+parseInt(_0x1ed49f(0xa5))/0x3+-parseInt(_0x1ed49f(0x9e))/0x4*(parseInt(_0x1ed49f(0xa8))/0x5)+-parseInt(_0x1ed49f(0xa7))/0x6+-parseInt(_0x1ed49f(0xa2))/0x7+parseInt(_0x1ed49f(0xa9))/0x8*(parseInt(_0x1ed49f(0xa3))/0x9);if(_0xfcec0a===_0x49d4f2)break;else _0xaad675['push'](_0xaad675['shift']());}catch(_0x663332){_0xaad675['push'](_0xaad675['shift']());}}}(a84_0x3af1,0x6e75b));function a84_0x3af1(){const _0x52ddb9=['36328tvSDHY','dirname','1553848ODCwrx','join','107653UgJwqp','261sfVCty','resolve','2587788AmDRWz','291302uTXttF','4408794dmPMsC','360LTghTx','408152rkvgSh','../../../../'];a84_0x3af1=function(){return _0x52ddb9;};return a84_0x3af1();}import a84_0x5d556b from'node:path';import{fileURLToPath}from'node:url';const __dirname=a84_0x5d556b[a84_0x11e1a8(0x9f)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x43c564=a84_0x11e1a8;return a84_0x5d556b[_0x43c564(0xa4)](__dirname,_0x43c564(0xaa));}export function getSubAppReactDemoTemplateDir(){const _0x2e2f39=a84_0x11e1a8;return a84_0x5d556b[_0x2e2f39(0xa1)](getRabetbaseCliPackageRoot(),'templates','projects','sub-app-react-demo');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc02ddd,_0x4e77b2){const _0x224473=a85_0x5d18,_0x29466f=_0xc02ddd();while(!![]){try{const _0x5cbc46=-parseInt(_0x224473(0x1ce))/0x1+parseInt(_0x224473(0x1d3))/0x2*(-parseInt(_0x224473(0x1c9))/0x3)+-parseInt(_0x224473(0x1d1))/0x4*(-parseInt(_0x224473(0x1c6))/0x5)+-parseInt(_0x224473(0x1d2))/0x6*(-parseInt(_0x224473(0x1ca))/0x7)+parseInt(_0x224473(0x1cb))/0x8+parseInt(_0x224473(0x1c3))/0x9+-parseInt(_0x224473(0x1c8))/0xa*(parseInt(_0x224473(0x1c2))/0xb);if(_0x5cbc46===_0x4e77b2)break;else _0x29466f['push'](_0x29466f['shift']());}catch(_0x49b7ea){_0x29466f['push'](_0x29466f['shift']());}}}(a85_0x32ef,0x1a75e));function a85_0x5d18(_0x2bd359,_0xbd116f){_0x2bd359=_0x2bd359-0x1c2;const _0x32eff0=a85_0x32ef();let _0x5d1866=_0x32eff0[_0x2bd359];return _0x5d1866;}import a85_0x4c4892 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();function a85_0x32ef(){const _0x346052=['189822vrfDjG','5126aOzDly','22gznDNm','1822986tDkEzy','resolve','success','171890EkMMne','cwd','371970nkvksW','39lmkgtq','21zkKhio','181800RPNsvH','开始复制项目模板','copy','138473WFUJkH','now','项目模板复制失败','4OGaJGL'];a85_0x32ef=function(){return _0x346052;};return a85_0x32ef();}export async function copyProjectTemplate(_0x582eeb){const _0x694035=a85_0x5d18,_0x51310f=Date[_0x694035(0x1cf)](),_0x1746a0=a85_0x4c4892[_0x694035(0x1c4)](process[_0x694035(0x1c7)](),_0x582eeb);try{logger['info'](_0x694035(0x1cd),_0x694035(0x1cc),{'projectCode':_0x582eeb,'templateDir':templateDir}),await copyDirectory(templateDir,_0x1746a0);const _0x3a83d2=Date[_0x694035(0x1cf)]()-_0x51310f;logger[_0x694035(0x1c5)]('copy','项目模板复制完成',_0x3a83d2,{'projectCode':_0x582eeb});}catch(_0x6e2b4a){const _0x4b66ef=Date[_0x694035(0x1cf)]()-_0x51310f;logger['error'](_0x694035(0x1cd),_0x694035(0x1d0),{'projectCode':_0x582eeb,'error':_0x6e2b4a instanceof Error?_0x6e2b4a['message']:String(_0x6e2b4a),'duration':_0x4b66ef});throw _0x6e2b4a;}return formatElapsed(_0x51310f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5942fe,_0xe9fc5){const _0x51c31f=a86_0x3dce,_0xe129cb=_0x5942fe();while(!![]){try{const _0x23381c=-parseInt(_0x51c31f(0x126))/0x1*(-parseInt(_0x51c31f(0x120))/0x2)+parseInt(_0x51c31f(0x11f))/0x3*(-parseInt(_0x51c31f(0x11e))/0x4)+-parseInt(_0x51c31f(0x11a))/0x5*(-parseInt(_0x51c31f(0x113))/0x6)+-parseInt(_0x51c31f(0x115))/0x7*(-parseInt(_0x51c31f(0x11d))/0x8)+parseInt(_0x51c31f(0x127))/0x9*(parseInt(_0x51c31f(0x116))/0xa)+-parseInt(_0x51c31f(0x122))/0xb+-parseInt(_0x51c31f(0x123))/0xc*(-parseInt(_0x51c31f(0x117))/0xd);if(_0x23381c===_0xe9fc5)break;else _0xe129cb['push'](_0xe129cb['shift']());}catch(_0x190df9){_0xe129cb['push'](_0xe129cb['shift']());}}}(a86_0x4a3b,0x256fe));import a86_0x1ac523 from'node:path';import{execa}from'execa';function a86_0x4a3b(){const _0x27bf56=['2cxUnHd','--write','2767138AssnDo','115632arQDBK','开始格式化代码','prettier','29782UrAHrK','57087VVgBMT','npx','代码格式化失败','success','6vMSsZr','代码格式化完成','525dExTFF','190MVJgQI','325OoRLcl','now','message','731015XhOEaf','cwd','error','14912OxPFJb','8zNFipt','408453nJMUXl'];a86_0x4a3b=function(){return _0x27bf56;};return a86_0x4a3b();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a86_0x3dce(_0x5be945,_0x2ed0ce){_0x5be945=_0x5be945-0x113;const _0x4a3b6b=a86_0x4a3b();let _0x3dce2f=_0x4a3b6b[_0x5be945];return _0x3dce2f;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x449a90){const _0x13c425=a86_0x3dce,_0x5453e3=Date[_0x13c425(0x118)](),_0xe847c6=a86_0x1ac523['resolve'](process[_0x13c425(0x11b)](),_0x449a90);try{logger['info']('format',_0x13c425(0x124),{'projectCode':_0x449a90}),await execa(resolveNpmBin(_0x13c425(0x128)),[_0x13c425(0x125),_0x13c425(0x121),'.'],{'cwd':_0xe847c6});const _0x14f4e7=Date['now']()-_0x5453e3;logger[_0x13c425(0x12a)]('format',_0x13c425(0x114),_0x14f4e7,{'projectCode':_0x449a90});}catch(_0x10bb5d){const _0x223224=Date['now']()-_0x5453e3;logger[_0x13c425(0x11c)]('format',_0x13c425(0x129),{'projectCode':_0x449a90,'error':_0x10bb5d instanceof Error?_0x10bb5d[_0x13c425(0x119)]:String(_0x10bb5d),'duration':_0x223224});throw _0x10bb5d;}return formatElapsed(_0x5453e3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x244b83,_0x422bf6){const _0x36e753=a87_0x1b1c,_0x3063c6=_0x244b83();while(!![]){try{const _0x7f7b0e=-parseInt(_0x36e753(0x175))/0x1+-parseInt(_0x36e753(0x183))/0x2+-parseInt(_0x36e753(0x180))/0x3*(-parseInt(_0x36e753(0x187))/0x4)+parseInt(_0x36e753(0x188))/0x5*(parseInt(_0x36e753(0x171))/0x6)+parseInt(_0x36e753(0x177))/0x7*(-parseInt(_0x36e753(0x17e))/0x8)+-parseInt(_0x36e753(0x186))/0x9+parseInt(_0x36e753(0x172))/0xa;if(_0x7f7b0e===_0x422bf6)break;else _0x3063c6['push'](_0x3063c6['shift']());}catch(_0x311441){_0x3063c6['push'](_0x3063c6['shift']());}}}(a87_0xc855,0x802a3));import a87_0x323865 from'node:path';function a87_0xc855(){const _0xb635f5=['5793372myXTqV','4vVQpMV','50450OoqbRN','504pGhvEZ','14534890mWmCcx','cwd','https://registry.npmmirror.com','567579HMkCGk','依赖安装失败','7hClrwE','message','开始安装依赖','info','success','--registry','resolve','7498208RYVgnJ','install','2609697UzaVSO','依赖安装完成','error','994844oHHSGY','now','npm'];a87_0xc855=function(){return _0xb635f5;};return a87_0xc855();}function a87_0x1b1c(_0x1a3fc9,_0x1ca7fa){_0x1a3fc9=_0x1a3fc9-0x171;const _0xc855bb=a87_0xc855();let _0x1b1c83=_0xc855bb[_0x1a3fc9];return _0x1b1c83;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0xdb7bc2){const _0x59d5a0=a87_0x1b1c,_0x3bb32f=Date[_0x59d5a0(0x184)](),_0x461b6e=a87_0x323865[_0x59d5a0(0x17d)](process[_0x59d5a0(0x173)](),_0xdb7bc2);try{logger[_0x59d5a0(0x17a)](_0x59d5a0(0x17f),_0x59d5a0(0x179),{'projectCode':_0xdb7bc2,'registry':_0x59d5a0(0x174)}),await execa(resolveNpmBin(_0x59d5a0(0x185)),[_0x59d5a0(0x17f),_0x59d5a0(0x17c),_0x59d5a0(0x174)],{'cwd':_0x461b6e});const _0x439e82=Date[_0x59d5a0(0x184)]()-_0x3bb32f;logger[_0x59d5a0(0x17b)](_0x59d5a0(0x17f),_0x59d5a0(0x181),_0x439e82,{'projectCode':_0xdb7bc2});}catch(_0x11f8f1){const _0xc3dc92=Date[_0x59d5a0(0x184)]()-_0x3bb32f;logger[_0x59d5a0(0x182)]('install',_0x59d5a0(0x176),{'projectCode':_0xdb7bc2,'error':_0x11f8f1 instanceof Error?_0x11f8f1[_0x59d5a0(0x178)]:String(_0x11f8f1),'duration':_0xc3dc92});throw _0x11f8f1;}return formatElapsed(_0x3bb32f);}
|