@lovrabet/rabetbase-cli 2.0.11 → 2.0.12
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/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote.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/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/save.js +1 -1
- package/lib/commands/sql/validate.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/constant/paths.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/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.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/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a51_0x436c(_0x29d347,_0x41e75f){_0x29d347=_0x29d347-0x129;const _0x5e751c=a51_0x5e75();let _0x436c91=_0x5e751c[_0x29d347];return _0x436c91;}const a51_0x5bf32a=a51_0x436c;(function(_0x3d3b4e,_0x4f0b5a){const _0x170b1e=a51_0x436c,_0x13e5e5=_0x3d3b4e();while(!![]){try{const _0x55cb41=parseInt(_0x170b1e(0x13b))/0x1+parseInt(_0x170b1e(0x148))/0x2+parseInt(_0x170b1e(0x137))/0x3+-parseInt(_0x170b1e(0x14d))/0x4*(parseInt(_0x170b1e(0x133))/0x5)+parseInt(_0x170b1e(0x150))/0x6*(parseInt(_0x170b1e(0x15a))/0x7)+-parseInt(_0x170b1e(0x131))/0x8*(parseInt(_0x170b1e(0x12e))/0x9)+-parseInt(_0x170b1e(0x14f))/0xa;if(_0x55cb41===_0x4f0b5a)break;else _0x13e5e5['push'](_0x13e5e5['shift']());}catch(_0x1242ea){_0x13e5e5['push'](_0x13e5e5['shift']());}}}(a51_0x5e75,0xc6e08));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';function a51_0x5e75(){const _0x51b2d7=['\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','appCode','检测到旧配置文件,正在自动升级...\x0a','\x20\x20Apps:\x20','yes','nonInteractive','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','Target\x20environment','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','init','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','385110mjjvKZ','boolean','string','join','App\x20code\x20to\x20initialize\x20with','870980nmSFrN','bool','3128520pRueRA','117822JtbAYW','flagMissing','global','str','validation','appcode','Auto-confirm\x20prompts','run','length','production','336DUPctL','\x20config','../../commands/project/init.js','Usage:\x20','\x20\x20Env:\x20','write','env','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','5094513NHljZi','daily','log','8WOzlhv','toLocaleString','15SIAOyb','defaultApp','project','\x0a✓\x20Successfully\x20initialized\x20','2674797ghQGmn','message','\x20\x20Default:\x20','apps','320014ikGJBD','\x20\x20Config:\x20'];a51_0x5e75=function(){return _0x51b2d7;};return a51_0x5e75();}import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';function syntheticApp(_0x2dede8){return{'appCode':_0x2dede8,'appName':_0x2dede8};}function writeInitConfig(_0xe7ff90,_0x56bbe8,_0x39bf93){const _0x36b71b=a51_0x436c,_0x1c3b91=resolveWriteConfigPath(_0xe7ff90),_0x8d3fc7={'version':getCliVersion(),'createdAt':new Date()[_0x36b71b(0x132)](),'env':_0x39bf93};if(_0x56bbe8[_0x36b71b(0x158)]===0x1)_0x8d3fc7['appcode']=_0x56bbe8[0x0]['appCode'];else{_0x8d3fc7[_0x36b71b(0x13a)]={};for(const _0x177a78 of _0x56bbe8){_0x8d3fc7['apps'][_0x177a78[_0x36b71b(0x13e)]]={'appcode':_0x177a78[_0x36b71b(0x13e)],'env':_0x39bf93};}_0x8d3fc7[_0x36b71b(0x134)]=_0x56bbe8[0x0][_0x36b71b(0x13e)];}writeConfigFile(_0x1c3b91,_0x8d3fc7);const _0x42359a=_0xe7ff90===_0x36b71b(0x152)?_0x36b71b(0x152):'project';console[_0x36b71b(0x130)](_0x36b71b(0x136)+_0x42359a+_0x36b71b(0x15b)),_0x56bbe8[_0x36b71b(0x158)]===0x1?console[_0x36b71b(0x130)]('\x20\x20AppCode:\x20'+_0x56bbe8[0x0][_0x36b71b(0x13e)]):(console[_0x36b71b(0x130)](_0x36b71b(0x140)+_0x56bbe8['map'](_0x46507e=>_0x46507e[_0x36b71b(0x13e)])[_0x36b71b(0x14b)](',\x20')),console[_0x36b71b(0x130)](_0x36b71b(0x139)+_0x8d3fc7[_0x36b71b(0x134)])),console['log'](_0x36b71b(0x12a)+_0x8d3fc7[_0x36b71b(0x12c)]),console[_0x36b71b(0x130)](_0x36b71b(0x13c)+_0x1c3b91);}async function runSmartInit(_0x6a36f){const _0x7a67c5=a51_0x436c,_0x2afefd=process['cwd'](),_0x149f41=_0x6a36f[_0x7a67c5(0x14e)](_0x7a67c5(0x152))?_0x7a67c5(0x152):_0x7a67c5(0x135),_0x259128=_0x6a36f[_0x7a67c5(0x153)](_0x7a67c5(0x12c))||_0x7a67c5(0x159),_0x244b8b=_0x6a36f['str'](_0x7a67c5(0x155))||undefined,_0x3894b5=_0x6a36f[_0x7a67c5(0x14e)](_0x7a67c5(0x135));if(_0x3894b5){const {initConfig:_0x55c6e2}=await import(_0x7a67c5(0x15c));return _0x55c6e2({'appcode':_0x244b8b,'env':_0x259128,'autoYes':_0x6a36f[_0x7a67c5(0x14e)](_0x7a67c5(0x141))});}if(_0x149f41==='project'){const _0x1aef1c=existsSync(resolve(_0x2afefd,NEW_CONFIG_NAME)),_0x553c36=LEGACY_CONFIG_NAMES['some'](_0x49bff9=>existsSync(resolve(_0x2afefd,_0x49bff9)));if(_0x553c36&&!_0x1aef1c)return console[_0x7a67c5(0x130)](_0x7a67c5(0x13f)),upgradeApp(_0x6a36f['nonInteractive'],{'yes':_0x6a36f[_0x7a67c5(0x14e)](_0x7a67c5(0x141))});if(_0x1aef1c)throw CliErrors[_0x7a67c5(0x154)](_0x7a67c5(0x12d),'Use\x20`'+CLI_BIN_NAME+_0x7a67c5(0x13d));}if(_0x244b8b){const _0x2da8d3=validateAppcode(_0x244b8b);if(!_0x2da8d3['valid'])throw CliErrors[_0x7a67c5(0x154)](_0x2da8d3[_0x7a67c5(0x138)]);writeInitConfig(_0x149f41,[syntheticApp(_0x244b8b)],_0x259128);return;}if(_0x6a36f[_0x7a67c5(0x142)])throw CliErrors[_0x7a67c5(0x151)](_0x7a67c5(0x155),_0x7a67c5(0x129)+CLI_BIN_NAME+_0x7a67c5(0x143));const _0x3187e7=getCookie(),_0x26f196=await selectMultipleApps(_0x3187e7),_0x2cb7c0=_0x26f196==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x26f196;writeInitConfig(_0x149f41,_0x2cb7c0,_0x259128);}const initFlags=[{'name':a51_0x5bf32a(0x152),'type':'boolean','description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':a51_0x5bf32a(0x12c),'type':a51_0x5bf32a(0x14a),'description':a51_0x5bf32a(0x144),'default':a51_0x5bf32a(0x159),'enum':[a51_0x5bf32a(0x159),a51_0x5bf32a(0x12f)]},{'name':'appcode','type':a51_0x5bf32a(0x14a),'description':a51_0x5bf32a(0x14c)},{'name':'project','type':a51_0x5bf32a(0x149),'description':a51_0x5bf32a(0x147),'default':![]},{'name':'yes','type':a51_0x5bf32a(0x149),'description':a51_0x5bf32a(0x156),'default':![]}];export const initDefinitions=[{'service':a51_0x5bf32a(0x146),'command':a51_0x5bf32a(0x157),'description':a51_0x5bf32a(0x145),'risk':a51_0x5bf32a(0x12b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x523f8a){return await runSmartInit(_0x523f8a),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a52_0x2aaa(){const _0x56abaa=['readLogs','*\x20Lovrabet\x20CLI\x20logs:\x0a','message','\x20\x20\x20Details:\x20','View\x20command\x20history\x20logs','1566972SJgmKX','duration','2371581YZPxwI','469336lGfLfu','level','write','91EGrxoc','\x20\x20\x20Duration:\x20','1607040GpBLeG','12KudMuX','details','clearLogs','en-US','\x20\x20\x20Time:\x20','log','106880qHOobv','24340zJwDJR','success','469926fPqXkd','*\x20Logs\x20cleared','warn','clear','588smXSwd','logs','Clear\x20command\x20history\x20logs','toLocaleString','forEach','timestamp','command','keys','error','read'];a52_0x2aaa=function(){return _0x56abaa;};return a52_0x2aaa();}const a52_0x737ae3=a52_0x3a37;(function(_0x44839f,_0x4f8650){const _0x503658=a52_0x3a37,_0x42985e=_0x44839f();while(!![]){try{const _0x9b2dfd=parseInt(_0x503658(0x1a4))/0x1*(-parseInt(_0x503658(0x1aa))/0x2)+-parseInt(_0x503658(0x19d))/0x3+parseInt(_0x503658(0x19b))/0x4+-parseInt(_0x503658(0x1ab))/0x5*(-parseInt(_0x503658(0x18c))/0x6)+-parseInt(_0x503658(0x1a1))/0x7*(-parseInt(_0x503658(0x19e))/0x8)+parseInt(_0x503658(0x1ad))/0x9+parseInt(_0x503658(0x1a3))/0xa;if(_0x9b2dfd===_0x4f8650)break;else _0x42985e['push'](_0x42985e['shift']());}catch(_0x409283){_0x42985e['push'](_0x42985e['shift']());}}}(a52_0x2aaa,0x64bad));function a52_0x3a37(_0x21c932,_0x2c753a){_0x21c932=_0x21c932-0x18b;const _0x2aaada=a52_0x2aaa();let _0x3a3724=_0x2aaada[_0x21c932];return _0x3a3724;}import{logger}from'../../utils/logger.js';function printLogs(_0x987b5f){const _0x9803d3=a52_0x3a37;if(_0x987b5f['length']===0x0){console[_0x9803d3(0x1a9)]('*\x20No\x20logs\x20found');return;}console[_0x9803d3(0x1a9)](_0x9803d3(0x197)),_0x987b5f[_0x9803d3(0x190)]((_0x5432d2,_0x135c1f)=>{const _0x56ad0c=_0x9803d3,_0x58361d=new Date(_0x5432d2[_0x56ad0c(0x191)])[_0x56ad0c(0x18f)](_0x56ad0c(0x1a7)),_0x2915ba=_0x5432d2['level']===_0x56ad0c(0x1ac)?'√':_0x5432d2['level']===_0x56ad0c(0x194)?'×':_0x5432d2[_0x56ad0c(0x19f)]===_0x56ad0c(0x1af)?'!':'i';console[_0x56ad0c(0x1a9)](_0x135c1f+0x1+'.\x20'+_0x2915ba+'\x20['+_0x5432d2[_0x56ad0c(0x192)]+']\x20'+_0x5432d2[_0x56ad0c(0x198)]),console[_0x56ad0c(0x1a9)](_0x56ad0c(0x1a8)+_0x58361d),_0x5432d2[_0x56ad0c(0x19c)]&&console[_0x56ad0c(0x1a9)](_0x56ad0c(0x1a2)+_0x5432d2[_0x56ad0c(0x19c)]+'ms'),_0x5432d2['details']&&Object[_0x56ad0c(0x193)](_0x5432d2[_0x56ad0c(0x1a5)])['length']>0x0&&console[_0x56ad0c(0x1a9)](_0x56ad0c(0x199)+JSON['stringify'](_0x5432d2[_0x56ad0c(0x1a5)],null,0x2)),console[_0x56ad0c(0x1a9)]('');});}export const logsDefinitions=[{'service':a52_0x737ae3(0x18d),'command':'show','description':a52_0x737ae3(0x19a),'risk':a52_0x737ae3(0x195),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x105d12){const _0x2239c5=a52_0x737ae3;return printLogs(logger[_0x2239c5(0x196)]()),{'ok':!![]};}},{'service':'logs','command':a52_0x737ae3(0x18b),'description':a52_0x737ae3(0x18e),'risk':a52_0x737ae3(0x1a0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2e5811){const _0x63e07=a52_0x737ae3;return logger[_0x63e07(0x1a6)](),console['log'](_0x63e07(0x1ae)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a53_0x3a69(){const _0x227500=['610510UtmISm','2088LpZkmd','1418232WDCAyv','200827jFdHfV','72ySJGGX','2776314VGuOKM','1548665skIPBQ','8dwFEKc','8FfonqO','6048888BFvPzF','7973287PVuJzv','5RShUKz'];a53_0x3a69=function(){return _0x227500;};return a53_0x3a69();}(function(_0xf185bc,_0xaf1687){const _0x336ecb=a53_0x17cd,_0x21c805=_0xf185bc();while(!![]){try{const _0x3a5865=-parseInt(_0x336ecb(0x148))/0x1+-parseInt(_0x336ecb(0x147))/0x2+-parseInt(_0x336ecb(0x150))/0x3*(parseInt(_0x336ecb(0x14a))/0x4)+-parseInt(_0x336ecb(0x14d))/0x5*(-parseInt(_0x336ecb(0x14b))/0x6)+parseInt(_0x336ecb(0x14c))/0x7*(parseInt(_0x336ecb(0x149))/0x8)+parseInt(_0x336ecb(0x146))/0x9*(-parseInt(_0x336ecb(0x14e))/0xa)+-parseInt(_0x336ecb(0x151))/0xb*(-parseInt(_0x336ecb(0x14f))/0xc);if(_0x3a5865===_0xaf1687)break;else _0x21c805['push'](_0x21c805['shift']());}catch(_0x4548c0){_0x21c805['push'](_0x21c805['shift']());}}}(a53_0x3a69,0xe8b65));import{menuSync}from'../../commands/menu/sync.js';function a53_0x17cd(_0x5d9e15,_0x232a1d){_0x5d9e15=_0x5d9e15-0x146;const _0x3a6947=a53_0x3a69();let _0x17cd6f=_0x3a6947[_0x5d9e15];return _0x17cd6f;}import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuSync,menuUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ae08c,_0x2e7f87){const _0x45f7b9=a54_0x9d2d,_0x2926ea=_0x2ae08c();while(!![]){try{const _0x25ed6d=parseInt(_0x45f7b9(0x114))/0x1+parseInt(_0x45f7b9(0x113))/0x2*(parseInt(_0x45f7b9(0x120))/0x3)+parseInt(_0x45f7b9(0x12b))/0x4*(parseInt(_0x45f7b9(0x11e))/0x5)+parseInt(_0x45f7b9(0x11a))/0x6*(-parseInt(_0x45f7b9(0x124))/0x7)+parseInt(_0x45f7b9(0x117))/0x8*(-parseInt(_0x45f7b9(0x125))/0x9)+parseInt(_0x45f7b9(0x127))/0xa+-parseInt(_0x45f7b9(0x116))/0xb*(parseInt(_0x45f7b9(0x10f))/0xc);if(_0x25ed6d===_0x2e7f87)break;else _0x2926ea['push'](_0x2926ea['shift']());}catch(_0x3c0d9b){_0x2926ea['push'](_0x2926ea['shift']());}}}(a54_0x2324,0xe1850));function strWidth(_0x1c863e){const _0x22a613=a54_0x9d2d;let _0x2b4356=0x0;for(const _0x5b409d of _0x1c863e){_0x2b4356+=/[\u4e00-\u9fa5]/[_0x22a613(0x121)](_0x5b409d)?0x2:0x1;}return _0x2b4356;}function padRight(_0x2da061,_0xbd2673){const _0x3956bf=a54_0x9d2d,_0x5d41c2=strWidth(_0x2da061);return _0x2da061+'\x20'[_0x3956bf(0x122)](Math['max'](0x0,_0xbd2673-_0x5d41c2));}export function renderCompareTable(_0x6e6cda,_0x1aa220={}){const _0x56998c=a54_0x9d2d;if(_0x6e6cda[_0x56998c(0x126)]===0x0)return'';const _0xff719c=_0x1aa220['showOnline']??!![],_0x32b87e=Math[_0x56998c(0x11c)](0x1e,..._0x6e6cda['map'](_0x49a79a=>strWidth(_0x49a79a['label']))),_0x5c9c9f=0x4,_0x522541=[],_0x44760b='\x20\x20'+padRight(_0x56998c(0x111),_0x32b87e),_0xf3f47e=padRight(_0x56998c(0x123),_0x5c9c9f),_0x1b6096=_0xff719c?'\x20\x20'+padRight(_0x56998c(0x118),_0x5c9c9f):'';_0x522541[_0x56998c(0x119)](_0x44760b+'\x20\x20'+_0xf3f47e+(_0xff719c?_0x1b6096:'')),_0x522541['push']('\x20\x20'+'─'['repeat'](_0x32b87e)+'\x20\x20'+'─'[_0x56998c(0x122)](_0x5c9c9f)+(_0xff719c?'\x20\x20'+'─'[_0x56998c(0x122)](_0x5c9c9f):''));for(const _0x49e4e8 of _0x6e6cda){const _0x43aeba=padRight(_0x49e4e8['label'],_0x32b87e),_0x5c9511=_0x49e4e8['local']?'✓':'✗',_0x492ad4=padRight(_0x5c9511,_0x5c9c9f);let _0x429201='\x20\x20'+_0x43aeba+'\x20\x20'+_0x492ad4;if(_0xff719c){const _0x441bd0=_0x49e4e8[_0x56998c(0x11f)]?'✓':'✗';_0x429201+='\x20\x20'+padRight(_0x441bd0,_0x5c9c9f);}_0x522541[_0x56998c(0x119)](_0x429201);}return _0x522541[_0x56998c(0x10e)]('\x0a');}export function renderSyncSummary(_0x14aaaf,_0x31270b){const _0x3b4f75=a54_0x9d2d;if(_0x14aaaf[_0x3b4f75(0x126)]===0x0)return _0x31270b?_0x3b4f75(0x11b):_0x3b4f75(0x129);const _0x40cb44=['\x20\x20'+_0x14aaaf[_0x3b4f75(0x126)]+'\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];for(const _0x157e1b of _0x14aaaf){_0x40cb44['push']('\x20\x20\x20\x20•\x20'+_0x157e1b[_0x3b4f75(0x12a)]+'\x20('+_0x157e1b['path']+')');}return _0x40cb44['join']('\x0a');}export function renderUpdateSummary(_0x5d1134,_0x3847c6){const _0x234ef3=a54_0x9d2d;if(_0x5d1134[_0x234ef3(0x126)]===0x0)return _0x234ef3(0x128);const _0x4a07ea=['\x20\x20'+_0x5d1134['length']+_0x234ef3(0x110),'\x20\x20\x20\x20JS:\x20\x20'+(_0x3847c6[0x0]??_0x234ef3(0x112)),_0x234ef3(0x11d)+(_0x3847c6[0x1]??_0x234ef3(0x112)),'',_0x234ef3(0x115)+_0x5d1134['join'](',\x20')];return _0x4a07ea[_0x234ef3(0x10e)]('\x0a');}function a54_0x9d2d(_0x3e157d,_0xc33a24){_0x3e157d=_0x3e157d-0x10e;const _0x232457=a54_0x2324();let _0x9d2d04=_0x232457[_0x3e157d];return _0x9d2d04;}function a54_0x2324(){const _0x1cf542=['online','3Mbsviv','test','repeat','Local','1323NjAAAs','403281mcqNlQ','length','5828120tfIyWO','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','\x20\x20No\x20pages\x20to\x20sync.','label','32HrtZRQ','join','60tGqzxU','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','Menu\x20Name','(unchanged)','3123944dzgsgo','1480117dYTUZy','\x20\x20Affected\x20menus:\x20','3639295BvHINh','264bLmrtS','Platform','push','41082HKZYBj','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','max','\x20\x20\x20\x20CSS:\x20','1078645sbdhxh'];a54_0x2324=function(){return _0x1cf542;};return a54_0x2324();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47b29f,_0x2fa99a){var _0x10d53f=a55_0x233b,_0x5d5b2a=_0x47b29f();while(!![]){try{var _0x27f366=parseInt(_0x10d53f(0x1f3))/0x1*(-parseInt(_0x10d53f(0x1fb))/0x2)+parseInt(_0x10d53f(0x1f4))/0x3*(parseInt(_0x10d53f(0x1f6))/0x4)+-parseInt(_0x10d53f(0x1f5))/0x5*(-parseInt(_0x10d53f(0x1f7))/0x6)+parseInt(_0x10d53f(0x1f9))/0x7*(-parseInt(_0x10d53f(0x1fd))/0x8)+parseInt(_0x10d53f(0x1f8))/0x9*(-parseInt(_0x10d53f(0x1fc))/0xa)+-parseInt(_0x10d53f(0x1fe))/0xb*(-parseInt(_0x10d53f(0x1fa))/0xc)+parseInt(_0x10d53f(0x1ff))/0xd;if(_0x27f366===_0x2fa99a)break;else _0x5d5b2a['push'](_0x5d5b2a['shift']());}catch(_0x37e83c){_0x5d5b2a['push'](_0x5d5b2a['shift']());}}}(a55_0x2f34,0xef53b));function a55_0x233b(_0x3bbc1c,_0x2b659f){_0x3bbc1c=_0x3bbc1c-0x1f3;var _0x2f34a4=a55_0x2f34();var _0x233be0=_0x2f34a4[_0x3bbc1c];return _0x233be0;}export*from'../../../commands/menu/shared/types.js';function a55_0x2f34(){var _0x552e4a=['34429317KpDBmz','1WVmbda','3AQbnuJ','172090BfThno','4918108jfJpcE','144jowhSn','108IEMWlK','63CXnlQF','420eJnIej','3785746xeYjsC','707720etENZD','892616xAymAt','7117pUmAZm'];a55_0x2f34=function(){return _0x552e4a;};return a55_0x2f34();}export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3dec6a,_0x3c4b4b){const _0x2de8c2=a56_0x1bc2,_0x8a118a=_0x3dec6a();while(!![]){try{const _0x5b0f4e=-parseInt(_0x2de8c2(0xaa))/0x1*(parseInt(_0x2de8c2(0x89))/0x2)+-parseInt(_0x2de8c2(0x8b))/0x3+parseInt(_0x2de8c2(0x9b))/0x4*(-parseInt(_0x2de8c2(0xa8))/0x5)+-parseInt(_0x2de8c2(0x8f))/0x6*(parseInt(_0x2de8c2(0x86))/0x7)+parseInt(_0x2de8c2(0x84))/0x8+-parseInt(_0x2de8c2(0xa5))/0x9*(parseInt(_0x2de8c2(0xb0))/0xa)+parseInt(_0x2de8c2(0x94))/0xb*(parseInt(_0x2de8c2(0x93))/0xc);if(_0x5b0f4e===_0x3c4b4b)break;else _0x8a118a['push'](_0x8a118a['shift']());}catch(_0xf6e399){_0x8a118a['push'](_0x8a118a['shift']());}}}(a56_0xb8e7,0x863ed));import a56_0x35236c from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a56_0x3b2d90 from'ora';function a56_0x1bc2(_0x1912c1,_0xfc939b){_0x1912c1=_0x1912c1-0x84;const _0xb8e74b=a56_0xb8e7();let _0x1bc2d2=_0xb8e74b[_0x1912c1];return _0x1bc2d2;}import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x2b0dd9){const _0x5bc961=a56_0x1bc2;return _0x2b0dd9[_0x5bc961(0xad)](_0x1b9b2f=>{const _0x430a59=_0x5bc961;if(_0x1b9b2f?.[_0x430a59(0x87)]==='ExitPromptError')throw CliErrors['cancelled'](_0x430a59(0xae));throw _0x1b9b2f;});}export function startSpinner(_0xf0a93b){const _0x1d57d6=a56_0x1bc2;return a56_0x3b2d90({'text':_0xf0a93b,'color':_0x1d57d6(0x85)})[_0x1d57d6(0x9e)]();}export function stopSpinner(_0x19b823,_0xdc2410,_0x2d8acc){const _0x5e6a5b=a56_0x1bc2;_0x2d8acc?_0x19b823['succeed'](_0xdc2410):_0x19b823[_0x5e6a5b(0xa3)](_0xdc2410);}export async function askConfirm(_0x53a21a){return onCancel(confirm({'message':_0x53a21a,'theme':{'prefix':''}}));}export async function askJsUrl(_0xf7a271){const _0x361ec0=a56_0x1bc2;while(!![]){const _0x547336=await onCancel(input({'message':_0x361ec0(0x97),'default':_0xf7a271,'theme':{'prefix':''}}));if(_0x547336['trim']()==='')throw CliErrors['cancelled'](_0x361ec0(0xae));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x361ec0(0x8a)](_0x547336[_0x361ec0(0x88)]())){console[_0x361ec0(0xa7)](a56_0x35236c[_0x361ec0(0x9a)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x26ffaa=startSpinner(_0x361ec0(0xa0));try{const _0x5b6018=await isUrlReachable(_0x547336['trim']());stopSpinner(_0x26ffaa,'JS\x20URL\x20checked',_0x5b6018);if(!_0x5b6018){console[_0x361ec0(0xa7)](a56_0x35236c[_0x361ec0(0x9a)]('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x547336[_0x361ec0(0x88)]();}catch(_0x2069b0){stopSpinner(_0x26ffaa,_0x361ec0(0xa1),![]);throw _0x2069b0;}}}export async function askCssUrl(_0x5ced84){const _0x55dc44=a56_0x1bc2;while(!![]){const _0xfdd6de=await onCancel(input({'message':_0x55dc44(0xa9),'default':_0x5ced84,'theme':{'prefix':''}}));if(_0xfdd6de[_0x55dc44(0x88)]()==='')throw CliErrors[_0x55dc44(0xa6)](_0x55dc44(0xae));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x55dc44(0x8a)](_0xfdd6de[_0x55dc44(0x88)]())){console[_0x55dc44(0xa7)](a56_0x35236c[_0x55dc44(0x9a)](_0x55dc44(0x9d)));continue;}const _0xe4b9bf=startSpinner(_0x55dc44(0x98));try{const _0x4f6e97=await isUrlReachable(_0xfdd6de[_0x55dc44(0x88)]());stopSpinner(_0xe4b9bf,_0x55dc44(0xaf),_0x4f6e97);if(!_0x4f6e97){console[_0x55dc44(0xa7)](a56_0x35236c[_0x55dc44(0x9a)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0xfdd6de[_0x55dc44(0x88)]();}catch(_0x19cfb6){stopSpinner(_0xe4b9bf,'CSS\x20URL\x20check\x20failed',![]);throw _0x19cfb6;}}}export async function selectPages(_0x31c780,_0x2b04d9,_0x1eea59){const _0x328902=a56_0x1bc2,_0x300b86=_0x31c780[_0x328902(0x8c)](_0x1b3837=>({'name':_0x1b3837[_0x328902(0x96)]+'\x20\x20'+(_0x2b04d9[_0x328902(0x9f)](_0x1b3837[_0x328902(0x91)])?a56_0x35236c[_0x328902(0x95)](_0x328902(0x99)):a56_0x35236c['green'](_0x328902(0x92))),'value':_0x1b3837['label'],'checked':_0x1eea59?_0x1eea59[_0x328902(0x8e)](_0x1b3837[_0x328902(0x96)]):!_0x2b04d9[_0x328902(0x9f)](_0x1b3837['path'])}));if(_0x300b86[_0x328902(0xab)]===0x0)throw new Error(_0x328902(0xa2));const _0x3f2fdd=await onCancel(checkbox({'message':_0x328902(0xac),'choices':_0x300b86,'loop':![],'theme':{'prefix':''}}));if(_0x3f2fdd[_0x328902(0xab)]===0x0)throw new Error('No\x20menus\x20selected.');return _0x31c780[_0x328902(0xa4)](_0x48ab2c=>_0x3f2fdd[_0x328902(0x8e)](_0x48ab2c[_0x328902(0x96)]));}function a56_0xb8e7(){const _0x410bbc=['6355072IDHDNC','cyan','91987awgXSV','name','trim','860294DEkJvW','test','2189577lsRmcM','map','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','includes','162yYJhaU','stdin','path','[new]','168KZtJEH','2132889bXHBPZ','gray','label','\x20\x20JS\x20URL:','\x20\x20Checking\x20CSS\x20URL\x20reachability...','[already\x20on\x20platform]','red','1612aDWJjq','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','start','has','\x20\x20Checking\x20JS\x20URL\x20reachability...','JS\x20URL\x20check\x20failed','No\x20local\x20pages\x20found.','fail','filter','5931IfCLin','cancelled','error','12155vlPMdc','\x20\x20CSS\x20URL:','1yzkPrS','length','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','catch','Cancelled.','CSS\x20URL\x20checked','7050lwrsWm'];a56_0xb8e7=function(){return _0x410bbc;};return a56_0xb8e7();}export function isInteractive(){const _0x1db7f2=a56_0x1bc2;return process[_0x1db7f2(0x90)]['isTTY']===!![];}export function requireInteractive(){const _0xec63e6=a56_0x1bc2;if(!isInteractive())throw new Error(_0xec63e6(0x8d)+_0xec63e6(0x9c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x15b634=a57_0xfc51;(function(_0x30be39,_0x27452e){const _0x1bd84b=a57_0xfc51,_0x57b43d=_0x30be39();while(!![]){try{const _0x3aaef3=parseInt(_0x1bd84b(0x162))/0x1*(-parseInt(_0x1bd84b(0x154))/0x2)+parseInt(_0x1bd84b(0x16c))/0x3*(parseInt(_0x1bd84b(0x151))/0x4)+-parseInt(_0x1bd84b(0x156))/0x5*(-parseInt(_0x1bd84b(0x159))/0x6)+-parseInt(_0x1bd84b(0x15c))/0x7*(-parseInt(_0x1bd84b(0x167))/0x8)+parseInt(_0x1bd84b(0x14e))/0x9*(-parseInt(_0x1bd84b(0x16b))/0xa)+-parseInt(_0x1bd84b(0x166))/0xb*(parseInt(_0x1bd84b(0x15e))/0xc)+parseInt(_0x1bd84b(0x157))/0xd*(parseInt(_0x1bd84b(0x14f))/0xe);if(_0x3aaef3===_0x27452e)break;else _0x57b43d['push'](_0x57b43d['shift']());}catch(_0x238e1d){_0x57b43d['push'](_0x57b43d['shift']());}}}(a57_0x1e2f,0xc5f27));function a57_0x1e2f(){const _0x3990f7=['3wDwamw','concat','3522726WIOWzN','8021482JQhjux','push','1545644BGduiE','endsWith','match','461888kciBoa','replaceAll','2785aYNVOd','13lbgyTD','join','8448aCONBu','utf-8','cwd','21TiLpDu','index.tsx','1053624fdoIOF','replace','trim','path','4sjRFsf','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','split','slice','88pHrfvy','2892712eliesy','isDirectory','filter','src/pages','10QbaZkS'];a57_0x1e2f=function(){return _0x3990f7;};return a57_0x1e2f();}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a57_0x15b634(0x15b)](),a57_0x15b634(0x16a));function a57_0xfc51(_0x1b80f5,_0x37e8ed){_0x1b80f5=_0x1b80f5-0x14d;const _0x1e2fc9=a57_0x1e2f();let _0xfc5163=_0x1e2fc9[_0x1b80f5];return _0xfc5163;}export function extractTitleFromComment(_0x315a36){const _0x5499ce=a57_0x15b634;try{const _0x43340f=readFileSync(_0x315a36,_0x5499ce(0x15a)),_0x1e0418=_0x43340f[_0x5499ce(0x153)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x1e0418&&_0x1e0418[0x1]){const _0x241878=_0x1e0418[0x1],_0x3858e5=_0x241878['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x3858e5&&_0x3858e5[0x1])return _0x3858e5[0x1][_0x5499ce(0x160)]();}let _0xe60c05=null;const _0x3aa421=_0x43340f[_0x5499ce(0x153)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x3aa421&&_0x3aa421[0x1]&&(_0xe60c05=_0x3aa421[0x1]);if(!_0xe60c05){const _0x35da1c=_0x43340f[_0x5499ce(0x153)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x35da1c&&_0x35da1c[0x1]&&(_0xe60c05=_0x35da1c[0x1]);}if(_0xe60c05){const _0x5b86c1=new RegExp('\x5cb'+_0xe60c05+_0x5499ce(0x163)),_0x38f6e4=_0x43340f[_0x5499ce(0x153)](_0x5b86c1);if(_0x38f6e4&&_0x38f6e4[0x1])return _0x38f6e4[0x1];return _0xe60c05;}return null;}catch(_0x2ba5be){return null;}}export function getLocalPages(_0x26ecbc=pagesDir,_0xcfcc22=pagesDir){const _0x1cfec6=a57_0x15b634;let _0x1484cf=[];const _0x586ec2=readdirSync(_0x26ecbc);return _0x586ec2['forEach'](_0x374d4e=>{const _0x15699b=a57_0xfc51,_0xfde19a=join(_0x26ecbc,_0x374d4e),_0x1e5685=statSync(_0xfde19a);if(_0x1e5685&&_0x1e5685[_0x15699b(0x168)]())_0x1484cf=_0x1484cf[_0x15699b(0x14d)](getLocalPages(_0xfde19a,_0xcfcc22));else{if(_0x374d4e[_0x15699b(0x152)]('.tsx')){let _0x2b86fb=relative(_0xcfcc22,_0xfde19a);_0x2b86fb['endsWith'](_0x15699b(0x15d))?_0x2b86fb=_0x2b86fb[_0x15699b(0x15f)](/index\.tsx$/,''):_0x2b86fb=_0x2b86fb[_0x15699b(0x15f)](/\.tsx$/,'');_0x2b86fb[_0x15699b(0x152)](sep)&&(_0x2b86fb=_0x2b86fb[_0x15699b(0x165)](0x0,-0x1));const _0x1dda97=_0x2b86fb[_0x15699b(0x164)](sep)[_0x15699b(0x158)]('/'),_0x585340=extractTitleFromComment(_0xfde19a),_0x374efd=_0x585340||_0x1dda97;_0x1484cf[_0x15699b(0x150)]({'path':_0x1dda97[_0x15699b(0x155)]('$',':'),'label':_0x374efd});}}}),_0x1484cf[_0x1cfec6(0x169)](_0x5dc4ff=>_0x5dc4ff[_0x1cfec6(0x161)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x31999e,_0x417c21){const _0x20aefa=a58_0x4929,_0x567d4c=_0x31999e();while(!![]){try{const _0x320965=-parseInt(_0x20aefa(0x109))/0x1*(-parseInt(_0x20aefa(0x11d))/0x2)+-parseInt(_0x20aefa(0x113))/0x3*(-parseInt(_0x20aefa(0x123))/0x4)+parseInt(_0x20aefa(0x107))/0x5+-parseInt(_0x20aefa(0x110))/0x6*(parseInt(_0x20aefa(0x115))/0x7)+parseInt(_0x20aefa(0x122))/0x8*(-parseInt(_0x20aefa(0x10d))/0x9)+parseInt(_0x20aefa(0x124))/0xa*(parseInt(_0x20aefa(0x10c))/0xb)+parseInt(_0x20aefa(0x111))/0xc*(parseInt(_0x20aefa(0x117))/0xd);if(_0x320965===_0x417c21)break;else _0x567d4c['push'](_0x567d4c['shift']());}catch(_0x33078b){_0x567d4c['push'](_0x567d4c['shift']());}}}(a58_0x38df,0x3ca89));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a58_0x38df(){const _0x2b84a2=['176285hNFCKD','CSS\x20URL\x20is\x20unreachable','1kHQbmk','label','push','10175fjOHDD','43767ogckqu','allSettled','length','52158fpyZNx','12yHnFAx','filter','105591TzeKGT','map','322ImmbgU','trim','2068001HmTWdg','path','status','No\x20local\x20pages\x20matched\x20labels:\x20','join','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','651442zuaEAp','has','find','resources','errors','744ZAzSiX','48lXqRGh','1710huFTUi'];a58_0x38df=function(){return _0x2b84a2;};return a58_0x38df();}import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x21be75){const _0x5f196d=a58_0x4929,_0x2d9e81=[];return!isValidJsHttpsUrl(_0x21be75)&&_0x2d9e81[_0x5f196d(0x10b)]('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x2d9e81[_0x5f196d(0x10f)]===0x0,'errors':_0x2d9e81};}export function validateCssUrl(_0x7c5c16){const _0x958ba2=a58_0x4929,_0x1588fa=[];return!isValidCssHttpsUrl(_0x7c5c16)&&_0x1588fa['push'](_0x958ba2(0x11c)),{'ok':_0x1588fa[_0x958ba2(0x10f)]===0x0,'errors':_0x1588fa};}export async function validateJsUrlReachable(_0x1efb1a){const _0x1a4b73=a58_0x4929,_0x29553c=validateJsUrl(_0x1efb1a);if(!_0x29553c['ok'])return _0x29553c;const _0xb90494=await isUrlReachable(_0x1efb1a);if(!_0xb90494)_0x29553c[_0x1a4b73(0x121)][_0x1a4b73(0x10b)]('JS\x20URL\x20is\x20unreachable');return{'ok':_0x29553c[_0x1a4b73(0x121)][_0x1a4b73(0x10f)]===0x0,'errors':_0x29553c[_0x1a4b73(0x121)]};}export async function validateCssUrlReachable(_0x15274f){const _0x55793c=a58_0x4929,_0x486a0c=validateCssUrl(_0x15274f);if(!_0x486a0c['ok'])return _0x486a0c;const _0x11eef7=await isUrlReachable(_0x15274f);if(!_0x11eef7)_0x486a0c['errors']['push'](_0x55793c(0x108));return{'ok':_0x486a0c[_0x55793c(0x121)]['length']===0x0,'errors':_0x486a0c[_0x55793c(0x121)]};}export function buildCompareRows(_0x46aa05,_0x21e39a){const _0x4470cc=a58_0x4929;return _0x46aa05[_0x4470cc(0x114)](_0x2be88a=>({'label':_0x2be88a['label'],'path':_0x2be88a[_0x4470cc(0x118)],'local':!![],'online':_0x21e39a[_0x4470cc(0x11e)](_0x2be88a[_0x4470cc(0x118)])}));}export function filterNewPages(_0x21e190,_0x568bad,_0x13343d){const _0x2f74af=a58_0x4929;if(_0x13343d&&_0x13343d['length']>0x0){const _0x2f826b=new Set(_0x13343d[_0x2f74af(0x114)](_0x4b8cdd=>_0x4b8cdd[_0x2f74af(0x116)]())),_0x4e10d3=_0x21e190[_0x2f74af(0x112)](_0x4f6bfb=>_0x2f826b[_0x2f74af(0x11e)](_0x4f6bfb[_0x2f74af(0x10a)]));if(_0x4e10d3[_0x2f74af(0x10f)]===0x0)throw new Error(_0x2f74af(0x11a)+[..._0x2f826b][_0x2f74af(0x11b)](',\x20'));return _0x4e10d3;}return _0x21e190[_0x2f74af(0x112)](_0x13bbd2=>!_0x568bad[_0x2f74af(0x11e)](_0x13bbd2[_0x2f74af(0x118)]));}export function filterPagesByLabels(_0x1d220f,_0x4b512e){const _0x3005c5=a58_0x4929,_0x2cf0c3=[],_0x13477b=[];for(const _0x368291 of _0x4b512e){const _0x1417bd=_0x368291[_0x3005c5(0x116)](),_0x4c300e=_0x1d220f[_0x3005c5(0x11f)](_0x448493=>_0x448493[_0x3005c5(0x10a)]===_0x1417bd);if(_0x4c300e)_0x2cf0c3['push'](_0x4c300e);else _0x13477b[_0x3005c5(0x10b)](_0x368291);}return{'matched':_0x2cf0c3,'unmatched':_0x13477b};}export async function doCreateMenus(_0xabe915,_0x86bc2,_0x5e0118,_0x1c3443){const _0x45f756=a58_0x4929;return await createMenus(_0xabe915,_0x86bc2,_0x5e0118,_0x1c3443),{'created':_0x5e0118[_0x45f756(0x10f)],'failed':0x0,'labels':_0x5e0118[_0x45f756(0x114)](_0x1d59a9=>_0x1d59a9[_0x45f756(0x10a)])};}function a58_0x4929(_0x8d2301,_0x4696d7){_0x8d2301=_0x8d2301-0x107;const _0x38df63=a58_0x38df();let _0x492926=_0x38df63[_0x8d2301];return _0x492926;}export function filterMenusWithResources(_0x329bc8){const _0x2d17ee=a58_0x4929;return _0x329bc8[_0x2d17ee(0x112)](_0x3ed52e=>_0x3ed52e[_0x2d17ee(0x120)][_0x2d17ee(0x10f)]>0x0);}export async function doUpdateCdnUrls(_0x268286,_0x708836,_0x9c26d8,_0xc1d1b5){const _0x4ed600=a58_0x4929,_0xb8c03f=_0x9c26d8[_0x4ed600(0x112)](_0xbadf78=>_0xbadf78[_0x4ed600(0x120)][_0x4ed600(0x10f)]>0x0),_0x55ca11=await Promise[_0x4ed600(0x10e)](_0xb8c03f[_0x4ed600(0x114)](_0x15ab0c=>updateMenuCdnUrl(_0x268286,_0x708836,{'id':_0x15ab0c['id'],'label':_0x15ab0c['label'],'path':_0x15ab0c[_0x4ed600(0x118)],'resources':_0xc1d1b5}))),_0x14de09=_0x55ca11[_0x4ed600(0x112)](_0x147aa7=>_0x147aa7[_0x4ed600(0x119)]==='rejected')[_0x4ed600(0x10f)];return{'updated':_0xb8c03f[_0x4ed600(0x10f)]-_0x14de09,'failed':_0x14de09};}export async function fetchMenuData(_0x482589,_0x3defc5){const _0x455b24=a58_0x4929,_0xa741c6=getLocalPages(),_0x1dd3ce=await getOnlineMenuList(_0x482589,_0x3defc5),_0x262538=new Set(_0x1dd3ce[_0x455b24(0x114)](_0x1a40b7=>_0x1a40b7['path']));return{'localPages':_0xa741c6,'onlineMenuList':_0x1dd3ce,'onlinePaths':_0x262538};}export async function fetchOnlineMenuList(_0x3e4e51,_0x2d51ec){return getOnlineMenuList(_0x3e4e51,_0x2d51ec);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d292e,_0x2ad008){const _0xabd741=a59_0x59d0,_0x34afc6=_0x2d292e();while(!![]){try{const _0x24fb57=-parseInt(_0xabd741(0x14f))/0x1*(-parseInt(_0xabd741(0x133))/0x2)+parseInt(_0xabd741(0x153))/0x3+parseInt(_0xabd741(0x14e))/0x4+parseInt(_0xabd741(0x139))/0x5*(-parseInt(_0xabd741(0x143))/0x6)+parseInt(_0xabd741(0x155))/0x7*(-parseInt(_0xabd741(0x145))/0x8)+-parseInt(_0xabd741(0x136))/0x9+-parseInt(_0xabd741(0x130))/0xa*(-parseInt(_0xabd741(0x13f))/0xb);if(_0x24fb57===_0x2ad008)break;else _0x34afc6['push'](_0x34afc6['shift']());}catch(_0x3ec585){_0x34afc6['push'](_0x34afc6['shift']());}}}(a59_0x3145,0x3cfa8));import{getApiDomain}from'../../../constant/domain.js';import{getEnv}from'../../../constant/env.js';function a59_0x3145(){const _0x8a7e24=['/smartapi/menu/find?appCode=','update-menu-cdn-url','4311810ZbCgSr','procode','create-menus','101350nsNIBR','map','\x20online\x20menus\x20successfully','create-menu','flat','label','22RNiVOh','POST','Create\x20menu\x20\x22','Server\x20returned\x20empty\x20menu\x20list','42RKYWAV','Updating\x20menu\x20asset\x20links:\x20','24PgxrDG','Menu\x20created\x20successfully:\x20','resources','Start\x20batch\x20menu\x20creation,\x20total\x20','stringify','info','Batch\x20menu\x20creation\x20completed,\x20total\x20','/smartapi/menu/create','length','488796OttMKL','423209npQrVH','all','online','children','356154Gkcour','Fetched\x20','851844QvzSoF','Creating\x20menu:\x20','path','push','Fetch\x20menu\x20list','Menu\x20assets\x20synced:\x20','extend','import','get-online-menu-list','2858490nYFWCl','/smartapi/menu/update','parse','2CfdAlQ'];a59_0x3145=function(){return _0x8a7e24;};return a59_0x3145();}import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0xcaf9be,_0x542c4a){const _0x340994=a59_0x59d0,_0x297969=getEnv();logger[_0x340994(0x14a)](_0x340994(0x15d),_0x297969===_0x340994(0x151)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0xcaf9be+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0xcaf9be+')');const _0x2fa97b=await platformFetch(getApiDomain()+_0x340994(0x134)+_0xcaf9be,{'cookie':_0x542c4a,'label':_0x340994(0x159)});if(!_0x2fa97b)return logger[_0x340994(0x14a)](_0x340994(0x15d),_0x340994(0x142)),[];return logger[_0x340994(0x14a)]('get-online-menu-list',_0x340994(0x154)+_0x2fa97b[_0x340994(0x14d)]+_0x340994(0x13b)),_0x2fa97b[_0x340994(0x13a)](flattenMenuItem)[_0x340994(0x13d)]();}function flattenMenuItem(_0x188a0e){const _0x1af622=a59_0x59d0;let _0x2a0bb4=[];try{if(_0x188a0e[_0x1af622(0x15b)]?.[_0x1af622(0x147)]){const _0x531431=JSON[_0x1af622(0x132)](_0x188a0e[_0x1af622(0x15b)]['resources']);if(Array['isArray'](_0x531431))_0x2a0bb4=_0x531431;}}catch{}const _0x4bd3b3=[{'id':_0x188a0e['id'],'path':_0x188a0e[_0x1af622(0x157)],'label':_0x188a0e[_0x1af622(0x13e)],'resources':_0x2a0bb4}];if(_0x188a0e['children']&&_0x188a0e['children']['length']>0x0)for(const _0x4e03e2 of _0x188a0e[_0x1af622(0x152)]){_0x4bd3b3[_0x1af622(0x158)](...flattenMenuItem(_0x4e03e2));}return _0x4bd3b3;}export async function createMenu(_0x2f9484,_0x13f8f8,_0x322392){const _0x26d97f=a59_0x59d0;logger[_0x26d97f(0x14a)](_0x26d97f(0x13c),_0x26d97f(0x156)+_0x322392[_0x26d97f(0x13e)]+'\x20('+_0x322392['path']+')');const _0x1a66ed={'appCode':_0x2f9484,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x26d97f(0x15c),'resources':_0x322392[_0x26d97f(0x147)]?JSON[_0x26d97f(0x149)](_0x322392[_0x26d97f(0x147)]):undefined},..._0x322392};await platformFetch(getApiDomain()+_0x26d97f(0x14c),{'method':'POST','body':_0x1a66ed,'cookie':_0x13f8f8,'label':'Create\x20menu\x20\x22'+_0x322392['label']+'\x22'}),logger[_0x26d97f(0x14a)](_0x26d97f(0x13c),'Menu\x20created\x20successfully:\x20'+_0x322392[_0x26d97f(0x13e)]);}function a59_0x59d0(_0x1be6a1,_0x218e4a){_0x1be6a1=_0x1be6a1-0x130;const _0x31450b=a59_0x3145();let _0x59d043=_0x31450b[_0x1be6a1];return _0x59d043;}async function createSingleMenu(_0x350054,_0x174a0f,_0x18c27d,_0x1518d6){const _0x15e51a=a59_0x59d0,_0x3fe63f={'appCode':_0x350054,'type':_0x15e51a(0x137),'sort':0x0,'extend':{'loadScriptMode':_0x15e51a(0x15c),'resources':_0x1518d6?JSON[_0x15e51a(0x149)](_0x1518d6):undefined},'label':_0x18c27d[_0x15e51a(0x13e)],'path':_0x18c27d[_0x15e51a(0x157)]};await platformFetch(getApiDomain()+_0x15e51a(0x14c),{'method':_0x15e51a(0x140),'body':_0x3fe63f,'cookie':_0x174a0f,'label':_0x15e51a(0x141)+_0x18c27d[_0x15e51a(0x13e)]+'\x22'}),logger['info'](_0x15e51a(0x13c),_0x15e51a(0x146)+_0x18c27d[_0x15e51a(0x13e)]);}export async function createMenus(_0x50e1ce,_0x34a8a8,_0x3f89c6,_0x1249f5){const _0x3e81fa=a59_0x59d0;logger[_0x3e81fa(0x14a)]('create-menus',_0x3e81fa(0x148)+_0x3f89c6[_0x3e81fa(0x14d)]),await Promise[_0x3e81fa(0x150)](_0x3f89c6[_0x3e81fa(0x13a)](_0x255187=>createSingleMenu(_0x50e1ce,_0x34a8a8,_0x255187,_0x1249f5))),logger[_0x3e81fa(0x14a)](_0x3e81fa(0x138),_0x3e81fa(0x14b)+_0x3f89c6[_0x3e81fa(0x14d)]);}export async function updateMenuCdnUrl(_0x2a1e2a,_0x26106c,_0x5ad751){const _0xb2036=a59_0x59d0;logger[_0xb2036(0x14a)](_0xb2036(0x135),_0xb2036(0x144)+_0x5ad751[_0xb2036(0x13e)]+'\x20('+_0x5ad751[_0xb2036(0x157)]+')');const _0x2cd53b={'id':_0x5ad751['id'],'appCode':_0x2a1e2a,'extend':{'loadScriptMode':_0xb2036(0x15c),'resources':_0x5ad751['resources']?JSON[_0xb2036(0x149)](_0x5ad751[_0xb2036(0x147)]):undefined}};await platformFetch(getApiDomain()+_0xb2036(0x131),{'method':_0xb2036(0x140),'body':_0x2cd53b,'cookie':_0x26106c,'label':'Update\x20menu\x20assets\x20\x22'+_0x5ad751['label']+'\x22'}),logger[_0xb2036(0x14a)](_0xb2036(0x135),_0xb2036(0x15a)+_0x5ad751['label'],undefined);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a60_0x2850(){const _0x45a0ce=['isArray','object','toString','field','--params.','menu-sync','string','join','2084048XtTbso','selectedLabels','453768PxJgLW','setLogPath','message','utf8','270524ZSlSTx','14QzVnIu','473MPLMFD','16839810DIzufK','jsUrl','concat','data','path','filter','CSS\x20URL\x20is\x20unreachable:\x20','No\x20local\x20pages\x20matched\x20labels:\x20','stdin','cssUrl','\x0a\x20\x20Available\x20local\x20pages:\x20','info','1854175HvwrzY','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','trim','readableEnded','2082suveAH','push','has','pages','parse','length','isTTY','cwd','837474QmNKYI','map','JS\x20URL\x20is\x20unreachable:\x20','Start\x20non-interactive\x20menu\x20sync','startsWith','label'];a60_0x2850=function(){return _0x45a0ce;};return a60_0x2850();}(function(_0x2d6983,_0x1bfb7d){const _0x58350a=a60_0x5081,_0x69943=_0x2d6983();while(!![]){try{const _0x54c4ad=parseInt(_0x58350a(0x187))/0x1*(-parseInt(_0x58350a(0x198))/0x2)+-parseInt(_0x58350a(0x181))/0x3+parseInt(_0x58350a(0x185))/0x4+-parseInt(_0x58350a(0x194))/0x5+-parseInt(_0x58350a(0x1a0))/0x6+-parseInt(_0x58350a(0x186))/0x7*(parseInt(_0x58350a(0x17f))/0x8)+parseInt(_0x58350a(0x188))/0x9;if(_0x54c4ad===_0x1bfb7d)break;else _0x69943['push'](_0x69943['shift']());}catch(_0x1a687f){_0x69943['push'](_0x69943['shift']());}}}(a60_0x2850,0x405de));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';function a60_0x5081(_0x26e1ba,_0x579204){_0x26e1ba=_0x26e1ba-0x176;const _0x28503a=a60_0x2850();let _0x50812a=_0x28503a[_0x26e1ba];return _0x50812a;}import{logger}from'../../../utils/logger.js';function validateParams(_0xe07d7c){const _0x3de42a=a60_0x5081,_0x38f5ad=[];return _0xe07d7c[_0x3de42a(0x189)]&&!isValidJsHttpsUrl(_0xe07d7c[_0x3de42a(0x189)])&&_0x38f5ad[_0x3de42a(0x199)]({'field':_0x3de42a(0x189),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0xe07d7c[_0x3de42a(0x191)]&&!isValidCssHttpsUrl(_0xe07d7c['cssUrl'])&&_0x38f5ad[_0x3de42a(0x199)]({'field':'cssUrl','message':_0x3de42a(0x195)}),_0x38f5ad;}export async function runMenuSyncCore(_0x5f41e7,_0x59c4e0,_0x4520c4=[],_0xad98ff){const _0x7247f1=a60_0x5081,_0x176ce8=parseParamsFlag(_0xad98ff),_0x5092e1=_0x4520c4[_0x7247f1(0x19d)]>0x0?_0x4520c4:_0x176ce8[_0x7247f1(0x180)],_0x49851c=_0x176ce8[_0x7247f1(0x189)],_0x141812=_0x176ce8[_0x7247f1(0x191)],_0x2acc01=[];if(_0x49851c)_0x2acc01[_0x7247f1(0x199)](_0x49851c);if(_0x141812)_0x2acc01[_0x7247f1(0x199)](_0x141812);const _0x2fad34=validateParams(_0x176ce8);if(_0x2fad34['length']>0x0){const _0x4fc248=_0x2fad34[_0x7247f1(0x1a1)](_0x2d6e24=>_0x7247f1(0x17b)+_0x2d6e24[_0x7247f1(0x17a)]+':\x20'+_0x2d6e24[_0x7247f1(0x183)])[_0x7247f1(0x17e)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x4fc248);}logger[_0x7247f1(0x182)](process[_0x7247f1(0x19f)]()),logger[_0x7247f1(0x193)](_0x7247f1(0x17c),_0x7247f1(0x1a3),{'appCode':_0x5f41e7,'selectedCount':_0x5092e1?.['length'],'jsUrl':_0x49851c,'cssUrl':_0x141812});if(_0x49851c){const _0x11bdc5=await isUrlReachable(_0x49851c);if(!_0x11bdc5)throw new Error(_0x7247f1(0x1a2)+_0x49851c);}if(_0x141812){const _0x5def7d=await isUrlReachable(_0x141812);if(!_0x5def7d)throw new Error(_0x7247f1(0x18e)+_0x141812);}const _0x441c37=getLocalPages();if(_0x441c37['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x5f05e7=await getOnlineMenuList(_0x5f41e7,_0x59c4e0),_0x23b584=new Set(_0x5f05e7[_0x7247f1(0x1a1)](_0x81526e=>_0x81526e[_0x7247f1(0x18c)]));let _0x5142f8;if(_0x5092e1&&_0x5092e1[_0x7247f1(0x19d)]>0x0){const _0x2369f3=new Set(_0x5092e1[_0x7247f1(0x1a1)](_0x3520ed=>_0x3520ed['trim']()));_0x5142f8=_0x441c37[_0x7247f1(0x18d)](_0x30a122=>_0x2369f3['has'](_0x30a122[_0x7247f1(0x176)]));if(_0x5142f8[_0x7247f1(0x19d)]===0x0){const _0x1cd3f1=_0x441c37[_0x7247f1(0x1a1)](_0x506f36=>_0x506f36[_0x7247f1(0x176)])['join'](',\x20');throw new Error(_0x7247f1(0x18f)+[..._0x2369f3]['join'](',\x20')+_0x7247f1(0x192)+_0x1cd3f1);}}else _0x5142f8=_0x441c37[_0x7247f1(0x18d)](_0x41361d=>!_0x23b584[_0x7247f1(0x19a)](_0x41361d['path']));if(_0x5142f8[_0x7247f1(0x19d)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x5f41e7,_0x59c4e0,_0x5142f8,_0x2acc01['length']>0x0?_0x2acc01:undefined),logger['info'](_0x7247f1(0x17c),'Menu\x20sync\x20completed',{'count':_0x5142f8['length'],'resources':_0x2acc01}),{'created':_0x5142f8[_0x7247f1(0x19d)],'skipped':![],'targetPages':_0x5142f8};}export async function readPageLabelsFromStdin(){const _0x3a6d50=a60_0x5081;if(!process[_0x3a6d50(0x190)][_0x3a6d50(0x19e)]&&!process[_0x3a6d50(0x190)][_0x3a6d50(0x197)])return new Promise(_0x5f12d6=>{const _0x3faa6d=_0x3a6d50,_0x9fc65d=[];process[_0x3faa6d(0x190)]['on'](_0x3faa6d(0x18b),_0x25ee79=>_0x9fc65d['push'](_0x25ee79)),process['stdin']['on']('end',()=>{const _0x4685d6=_0x3faa6d,_0x3419e9=Buffer[_0x4685d6(0x18a)](_0x9fc65d)[_0x4685d6(0x179)](_0x4685d6(0x184)),_0x594e8a=_0x3419e9['split']('\x0a')[_0x4685d6(0x1a1)](_0x1623a5=>_0x1623a5[_0x4685d6(0x196)]())[_0x4685d6(0x18d)](_0x5d3f74=>_0x5d3f74[_0x4685d6(0x19d)]>0x0&&!_0x5d3f74[_0x4685d6(0x1a4)]('#'));_0x5f12d6(_0x594e8a);}),setTimeout(()=>_0x5f12d6([]),0x1f4);});return[];}function parseParamsFlag(_0x39442b){const _0x2b72aa=a60_0x5081;if(!_0x39442b||typeof _0x39442b!=='string')return{};try{const _0x22946f=JSON[_0x2b72aa(0x19c)](_0x39442b);if(typeof _0x22946f!==_0x2b72aa(0x178)||_0x22946f===null||Array[_0x2b72aa(0x177)](_0x22946f))return{};return{'selectedLabels':Array[_0x2b72aa(0x177)](_0x22946f[_0x2b72aa(0x19b)])?_0x22946f[_0x2b72aa(0x19b)][_0x2b72aa(0x1a1)](String):undefined,'jsUrl':typeof _0x22946f['jsUrl']===_0x2b72aa(0x17d)?_0x22946f[_0x2b72aa(0x189)][_0x2b72aa(0x196)]():undefined,'cssUrl':typeof _0x22946f[_0x2b72aa(0x191)]===_0x2b72aa(0x17d)?_0x22946f['cssUrl'][_0x2b72aa(0x196)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3938cd,_0x297e64){const _0x15b5d1=a62_0xd9c9,_0x2f0cbb=_0x3938cd();while(!![]){try{const _0x1ca179=parseInt(_0x15b5d1(0x1ac))/0x1*(-parseInt(_0x15b5d1(0x1ae))/0x2)+parseInt(_0x15b5d1(0x1b8))/0x3+parseInt(_0x15b5d1(0x1bf))/0x4*(-parseInt(_0x15b5d1(0x1bd))/0x5)+-parseInt(_0x15b5d1(0x1a0))/0x6*(parseInt(_0x15b5d1(0x1ad))/0x7)+parseInt(_0x15b5d1(0x1a6))/0x8*(parseInt(_0x15b5d1(0x1bc))/0x9)+-parseInt(_0x15b5d1(0x1a5))/0xa+parseInt(_0x15b5d1(0x1b6))/0xb;if(_0x1ca179===_0x297e64)break;else _0x2f0cbb['push'](_0x2f0cbb['shift']());}catch(_0x240a7c){_0x2f0cbb['push'](_0x2f0cbb['shift']());}}}(a62_0x2d96,0x1f98c));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a62_0x2d96(){const _0x353620=['63BlYStu','7570Keeymk','allSettled','636TwLndA','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','cwd','join','map','filter','78qHOsyV','path','Start\x20non-interactive\x20menu\x20update','Menu\x20update\x20completed','Invalid\x20--params:\x20','649660ZbvojZ','79448XiHQBh','rejected','setLogPath','length','cssUrl','jsUrl','52467VHKrnY','64309llflHR','6kzTjzu','info','JS\x20URL\x20is\x20unreachable:\x20','status','object','push','trim','message','4399978HGZBgi','string','727287MMLWPk','--params.','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','CSS\x20URL\x20is\x20unreachable:\x20'];a62_0x2d96=function(){return _0x353620;};return a62_0x2d96();}import{logger}from'../../../utils/logger.js';function a62_0xd9c9(_0x2bd957,_0x508129){_0x2bd957=_0x2bd957-0x19e;const _0x2d96c2=a62_0x2d96();let _0xd9c9c1=_0x2d96c2[_0x2bd957];return _0xd9c9c1;}function validateParams(_0x50ec99){const _0x3fb631=a62_0xd9c9,_0x2008de=[];return _0x50ec99['jsUrl']&&!isValidJsHttpsUrl(_0x50ec99[_0x3fb631(0x1ab)])&&_0x2008de['push']({'field':_0x3fb631(0x1ab),'message':_0x3fb631(0x1ba)}),_0x50ec99[_0x3fb631(0x1aa)]&&!isValidCssHttpsUrl(_0x50ec99[_0x3fb631(0x1aa)])&&_0x2008de['push']({'field':'cssUrl','message':_0x3fb631(0x1c0)}),_0x2008de;}export async function runMenuUpdateCore(_0x46036d,_0x5ee38f,_0x4d3723){const _0x2ab2ae=a62_0xd9c9,_0x49cb65=parseUpdateParamsFlag(_0x4d3723),_0x814c48=[];if(_0x49cb65['jsUrl'])_0x814c48[_0x2ab2ae(0x1b3)](_0x49cb65[_0x2ab2ae(0x1ab)]);if(_0x49cb65['cssUrl'])_0x814c48[_0x2ab2ae(0x1b3)](_0x49cb65['cssUrl']);const _0x277b42=validateParams(_0x49cb65);if(_0x277b42[_0x2ab2ae(0x1a9)]>0x0){const _0x4a8089=_0x277b42[_0x2ab2ae(0x19e)](_0x8686ef=>_0x2ab2ae(0x1b9)+_0x8686ef['field']+':\x20'+_0x8686ef[_0x2ab2ae(0x1b5)])[_0x2ab2ae(0x1c2)](';\x20');throw new Error(_0x2ab2ae(0x1a4)+_0x4a8089);}logger[_0x2ab2ae(0x1a8)](process[_0x2ab2ae(0x1c1)]()),logger[_0x2ab2ae(0x1af)]('menu-update',_0x2ab2ae(0x1a2),{'appCode':_0x46036d,'jsUrl':_0x49cb65['jsUrl'],'cssUrl':_0x49cb65[_0x2ab2ae(0x1aa)]});if(_0x49cb65[_0x2ab2ae(0x1ab)]){const _0x5c0066=await isUrlReachable(_0x49cb65[_0x2ab2ae(0x1ab)]);if(!_0x5c0066)throw new Error(_0x2ab2ae(0x1b0)+_0x49cb65[_0x2ab2ae(0x1ab)]);}if(_0x49cb65['cssUrl']){const _0x41eab5=await isUrlReachable(_0x49cb65[_0x2ab2ae(0x1aa)]);if(!_0x41eab5)throw new Error(_0x2ab2ae(0x1bb)+_0x49cb65[_0x2ab2ae(0x1aa)]);}const _0x1d1b06=await getOnlineMenuList(_0x46036d,_0x5ee38f),_0x1bc337=_0x1d1b06[_0x2ab2ae(0x19f)](_0x489de4=>_0x489de4['resources'][_0x2ab2ae(0x1a9)]>0x0);if(_0x1bc337[_0x2ab2ae(0x1a9)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x45e2c3=await Promise[_0x2ab2ae(0x1be)](_0x1bc337[_0x2ab2ae(0x19e)](_0xe2c645=>updateMenuCdnUrl(_0x46036d,_0x5ee38f,{'id':_0xe2c645['id'],'label':_0xe2c645['label'],'path':_0xe2c645[_0x2ab2ae(0x1a1)],'resources':_0x814c48}))),_0x2b7bb7=_0x45e2c3[_0x2ab2ae(0x19f)](_0x1c883d=>_0x1c883d[_0x2ab2ae(0x1b1)]===_0x2ab2ae(0x1a7))[_0x2ab2ae(0x1a9)];return logger[_0x2ab2ae(0x1af)]('menu-update',_0x2ab2ae(0x1a3),{'count':_0x1bc337['length'],'resources':_0x814c48}),{'updated':_0x1bc337[_0x2ab2ae(0x1a9)]-_0x2b7bb7,'failed':_0x2b7bb7,'skipped':![]};}function parseUpdateParamsFlag(_0x539fa4){const _0x160d9d=a62_0xd9c9;if(!_0x539fa4||typeof _0x539fa4!=='string')return{};try{const _0x37b40d=JSON['parse'](_0x539fa4);if(typeof _0x37b40d!==_0x160d9d(0x1b2)||_0x37b40d===null||Array['isArray'](_0x37b40d))return{};return{'jsUrl':typeof _0x37b40d[_0x160d9d(0x1ab)]===_0x160d9d(0x1b7)?_0x37b40d[_0x160d9d(0x1ab)]['trim']():undefined,'cssUrl':typeof _0x37b40d['cssUrl']===_0x160d9d(0x1b7)?_0x37b40d[_0x160d9d(0x1aa)][_0x160d9d(0x1b4)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4382b6,_0x46b5ec){const _0x5a4d68=a63_0x4412,_0x5b2513=_0x4382b6();while(!![]){try{const _0x1d0967=parseInt(_0x5a4d68(0x1c4))/0x1+-parseInt(_0x5a4d68(0x1c6))/0x2+-parseInt(_0x5a4d68(0x1c8))/0x3+parseInt(_0x5a4d68(0x1c3))/0x4+parseInt(_0x5a4d68(0x1be))/0x5+parseInt(_0x5a4d68(0x1c0))/0x6*(parseInt(_0x5a4d68(0x1bf))/0x7)+-parseInt(_0x5a4d68(0x1c2))/0x8;if(_0x1d0967===_0x46b5ec)break;else _0x5b2513['push'](_0x5b2513['shift']());}catch(_0x34c986){_0x5b2513['push'](_0x5b2513['shift']());}}}(a63_0x71cc,0xa0b27));export function isValidJsHttpsUrl(_0x1b9f5f){const _0x57e879=a63_0x4412;return/^https:\/\/.+\.js(\?.*)?$/[_0x57e879(0x1c7)](_0x1b9f5f[_0x57e879(0x1c1)]());}export function isValidCssHttpsUrl(_0xafe2b6){const _0x576026=a63_0x4412;return/^https:\/\/.+\.css(\?.*)?$/[_0x576026(0x1c7)](_0xafe2b6['trim']());}export async function isUrlReachable(_0x502535){const _0x2fed87=a63_0x4412;try{const _0x15122e=await fetch(_0x502535,{'method':_0x2fed87(0x1c5)});return _0x15122e['ok'];}catch{return![];}}function a63_0x4412(_0x1d36a7,_0x2b7b04){_0x1d36a7=_0x1d36a7-0x1be;const _0x71cc9d=a63_0x71cc();let _0x441216=_0x71cc9d[_0x1d36a7];return _0x441216;}function a63_0x71cc(){const _0x25b916=['trim','11648240sTtfSO','3786984rYkXDN','310127AbVDqB','HEAD','1735628vRNVnE','test','751053lAvaoQ','6509150DcHiqd','1571983QTSaNw','18VzUIOs'];a63_0x71cc=function(){return _0x25b916;};return a63_0x71cc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x59b597=a64_0x39a7;(function(_0x57c910,_0x2ab7ac){const _0x806cf3=a64_0x39a7,_0x362cf6=_0x57c910();while(!![]){try{const _0x1b8968=parseInt(_0x806cf3(0x138))/0x1+-parseInt(_0x806cf3(0x133))/0x2*(-parseInt(_0x806cf3(0x13a))/0x3)+parseInt(_0x806cf3(0x151))/0x4*(-parseInt(_0x806cf3(0x136))/0x5)+-parseInt(_0x806cf3(0x129))/0x6*(parseInt(_0x806cf3(0x13e))/0x7)+parseInt(_0x806cf3(0x125))/0x8+-parseInt(_0x806cf3(0x13f))/0x9+parseInt(_0x806cf3(0x12d))/0xa*(parseInt(_0x806cf3(0x12e))/0xb);if(_0x1b8968===_0x2ab7ac)break;else _0x362cf6['push'](_0x362cf6['shift']());}catch(_0x2c743e){_0x362cf6['push'](_0x362cf6['shift']());}}}(a64_0x3f89,0x6b59a));import a64_0xa769ba from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a64_0x39a7(_0x46bbaf,_0x52eb08){_0x46bbaf=_0x46bbaf-0x125;const _0x3f890a=a64_0x3f89();let _0x39a770=_0x3f890a[_0x46bbaf];return _0x39a770;}import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';export const menuSync={'service':'menu','command':a64_0x59b597(0x134),'description':a64_0x59b597(0x12a),'risk':a64_0x59b597(0x13c),'flags':[{'name':a64_0x59b597(0x15d),'type':a64_0x59b597(0x154),'description':a64_0x59b597(0x144)+a64_0x59b597(0x150)},{'name':a64_0x59b597(0x14b),'type':a64_0x59b597(0x152),'description':a64_0x59b597(0x14e)}],async 'execute'(_0x45410d){const _0x1befb6=a64_0x59b597,_0x27a363=_0x45410d[_0x1befb6(0x153)](_0x1befb6(0x14b)),_0x89413e=_0x45410d['str'](_0x1befb6(0x15d)),_0x5233c9=parseParams(_0x89413e),_0x173c5b=!!(_0x5233c9[_0x1befb6(0x148)]||_0x5233c9[_0x1befb6(0x131)]||_0x5233c9[_0x1befb6(0x149)]&&_0x5233c9[_0x1befb6(0x149)][_0x1befb6(0x127)]>0x0);if(_0x27a363||_0x173c5b){let _0x50f2de=[];!isInteractive()&&!_0x5233c9[_0x1befb6(0x149)]?.[_0x1befb6(0x127)]&&(_0x50f2de=await readPageLabelsFromStdin());const _0x4d9fc1=await runMenuSyncCore(_0x45410d[_0x1befb6(0x14c)],_0x45410d[_0x1befb6(0x145)],_0x50f2de[_0x1befb6(0x127)]>0x0?_0x50f2de:_0x5233c9[_0x1befb6(0x149)]??[],_0x89413e);if(_0x4d9fc1['skipped']){const _0x14812f=getLocalPages();_0x14812f[_0x1befb6(0x127)]===0x0?console[_0x1befb6(0x13d)](_0x1befb6(0x126)):console['log'](_0x1befb6(0x141));}else console[_0x1befb6(0x13d)](_0x1befb6(0x147)+_0x4d9fc1[_0x1befb6(0x14a)]+_0x1befb6(0x142));return{'ok':!![]};}requireInteractive();const _0x5730ea=startSpinner(_0x1befb6(0x137));let _0x13b6bb,_0x4f37c3,_0x505dba;try{const _0x282ee1=await fetchMenuData(_0x45410d[_0x1befb6(0x14c)],_0x45410d['cookie']);_0x13b6bb=_0x282ee1[_0x1befb6(0x158)],_0x4f37c3=_0x282ee1[_0x1befb6(0x128)],_0x505dba=_0x282ee1[_0x1befb6(0x130)],stopSpinner(_0x5730ea,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x461a9d){stopSpinner(_0x5730ea,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x461a9d instanceof Error?_0x461a9d[_0x1befb6(0x15e)]:_0x1befb6(0x12f));}if(_0x13b6bb[_0x1befb6(0x127)]===0x0)return console[_0x1befb6(0x13d)](a64_0xa769ba[_0x1befb6(0x146)](_0x1befb6(0x160))),{'ok':!![]};const _0x288ab3=buildCompareRows(_0x13b6bb,_0x4f37c3);console['log'](renderCompareTable(_0x288ab3)),console['log']();const _0x50322c=_0x5233c9[_0x1befb6(0x149)],_0x4436c4=await selectPages(_0x13b6bb,_0x4f37c3,_0x50322c);console[_0x1befb6(0x13d)](),console[_0x1befb6(0x13d)](a64_0xa769ba[_0x1befb6(0x13b)](_0x1befb6(0x140)+_0x4436c4[_0x1befb6(0x127)]+_0x1befb6(0x15f)));const _0x4b4d26=_0x5233c9['jsUrl']&&_0x5233c9[_0x1befb6(0x131)];if(!_0x4b4d26){console[_0x1befb6(0x13d)](renderSyncSummary(_0x4436c4,_0x4f37c3[_0x1befb6(0x135)]>0x0));const _0x890f06=await askConfirm(_0x1befb6(0x155));if(!_0x890f06)return console[_0x1befb6(0x13d)](a64_0xa769ba['gray'](_0x1befb6(0x132))),{'ok':!![]};}let _0x434960=_0x5233c9['jsUrl'],_0x550bb0=_0x5233c9[_0x1befb6(0x131)];!_0x434960&&(_0x434960=await askJsUrl());!_0x550bb0&&(_0x550bb0=await askCssUrl());const _0x23ac50=await askConfirm('\x20\x20Create\x20'+_0x4436c4['length']+'\x20menu(s)\x20with\x20JS:\x20'+_0x434960+_0x1befb6(0x139)+_0x550bb0+'?');if(!_0x23ac50)return console[_0x1befb6(0x13d)](a64_0xa769ba[_0x1befb6(0x156)](_0x1befb6(0x132))),{'ok':!![]};const _0x61367=[_0x434960,_0x550bb0],_0x5fe8a4=startSpinner('Creating\x20'+_0x4436c4[_0x1befb6(0x127)]+'\x20menu(s)...');try{const _0x3177d2=await doCreateMenus(_0x45410d[_0x1befb6(0x14c)],_0x45410d['cookie'],_0x4436c4,_0x61367);return stopSpinner(_0x5fe8a4,'Created\x20'+_0x3177d2[_0x1befb6(0x14a)]+_0x1befb6(0x12b),!![]),{'ok':!![],'data':_0x3177d2,'message':_0x1befb6(0x14d)+_0x3177d2['created']+_0x1befb6(0x15a)+_0x3177d2[_0x1befb6(0x161)]+_0x1befb6(0x14f)};}catch(_0x3fbef1){stopSpinner(_0x5fe8a4,_0x1befb6(0x12c),![]);throw CliErrors['validation'](_0x3fbef1 instanceof Error?_0x3fbef1[_0x1befb6(0x15e)]:_0x1befb6(0x12c));}}};function parseParams(_0x456577){const _0x38a717=a64_0x59b597;if(!_0x456577)return{};try{const _0x5534ef=JSON[_0x38a717(0x15c)](_0x456577);if(typeof _0x5534ef!==_0x38a717(0x15b)||_0x5534ef===null||Array[_0x38a717(0x143)](_0x5534ef))return{};return{'jsUrl':typeof _0x5534ef[_0x38a717(0x148)]==='string'?_0x5534ef[_0x38a717(0x148)][_0x38a717(0x159)]():undefined,'cssUrl':typeof _0x5534ef[_0x38a717(0x131)]==='string'?_0x5534ef['cssUrl'][_0x38a717(0x159)]():undefined,'pages':Array[_0x38a717(0x143)](_0x5534ef[_0x38a717(0x149)])?_0x5534ef[_0x38a717(0x149)][_0x38a717(0x157)](String):undefined};}catch{return{};}}function a64_0x3f89(){const _0x543448=['Menu\x20creation\x20failed','146380daUHYg','99bjYnHX','Failed\x20to\x20fetch\x20online\x20menu\x20list','onlineMenuList','cssUrl','\x20\x20Cancelled.','4bYTSlO','sync','size','5jWRFWK','Fetching\x20online\x20menu\x20list...','851604yxZWAd','\x20and\x20CSS:\x20','72693TCysEI','cyan','write','log','1715QrmXKw','3010320hGietp','\x20\x20✓\x20Selected:\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20menu(s)\x20created','isArray','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','cookie','yellow','✓\x20Menu\x20sync\x20completed:\x20','jsUrl','pages','created','yes','appCode','Menu\x20sync\x20completed:\x20','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','\x20failed.','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','2845784aJeJiq','boolean','flag','string','\x20\x20Continue\x20with\x20creation?','gray','map','localPages','trim','\x20created,\x20','object','parse','params','message','\x20page(s)','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','failed','4004952edPXxx','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','length','onlinePaths','1146ZASqSk','Sync\x20local\x20pages\x20as\x20platform\x20menus','\x20menu(s)'];a64_0x3f89=function(){return _0x543448;};return a64_0x3f89();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a65_0xee71(_0x5da186,_0x52f1c7){_0x5da186=_0x5da186-0x1ab;const _0x1ad356=a65_0x1ad3();let _0xee71b9=_0x1ad356[_0x5da186];return _0xee71b9;}const a65_0x4df611=a65_0xee71;(function(_0x14ce46,_0x42c630){const _0x210539=a65_0xee71,_0x364a8e=_0x14ce46();while(!![]){try{const _0x21107f=-parseInt(_0x210539(0x1c4))/0x1*(-parseInt(_0x210539(0x1c2))/0x2)+parseInt(_0x210539(0x1bc))/0x3*(-parseInt(_0x210539(0x1c6))/0x4)+-parseInt(_0x210539(0x1df))/0x5+parseInt(_0x210539(0x1c0))/0x6*(parseInt(_0x210539(0x1cd))/0x7)+-parseInt(_0x210539(0x1d4))/0x8+parseInt(_0x210539(0x1b7))/0x9*(parseInt(_0x210539(0x1d1))/0xa)+-parseInt(_0x210539(0x1c9))/0xb*(-parseInt(_0x210539(0x1d5))/0xc);if(_0x21107f===_0x42c630)break;else _0x364a8e['push'](_0x364a8e['shift']());}catch(_0x3e74f1){_0x364a8e['push'](_0x364a8e['shift']());}}}(a65_0x1ad3,0x4bea0));import a65_0x4a6d35 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';export const menuUpdate={'service':a65_0x4df611(0x1da),'command':'update','description':a65_0x4df611(0x1d8),'risk':a65_0x4df611(0x1c8),'flags':[{'name':'params','type':'string','description':a65_0x4df611(0x1be)+a65_0x4df611(0x1bf)},{'name':'yes','type':a65_0x4df611(0x1af),'description':'Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation'}],async 'execute'(_0x6bc858){const _0xe21c5=a65_0x4df611,_0x31c4a3=_0x6bc858[_0xe21c5(0x1b2)]('yes'),_0x2e74df=_0x6bc858[_0xe21c5(0x1c3)]('params'),_0x2f8750=parseParams(_0x2e74df),_0x585343=!!(_0x2f8750[_0xe21c5(0x1ac)]||_0x2f8750['cssUrl']);if(_0x31c4a3||_0x585343&&!isInteractive()){const _0x1cb9d9=await runMenuUpdateCore(_0x6bc858[_0xe21c5(0x1d6)],_0x6bc858[_0xe21c5(0x1ab)],_0x2e74df);return _0x1cb9d9[_0xe21c5(0x1c5)]?console[_0xe21c5(0x1ca)]('!\x20No\x20menus\x20with\x20existing\x20resources\x20found'):(console[_0xe21c5(0x1ca)]('✓\x20Menu\x20update\x20completed:\x20'+_0x1cb9d9[_0xe21c5(0x1b1)]+'\x20menu(s)\x20updated'),_0x1cb9d9['failed']>0x0&&console['error']('!\x20'+_0x1cb9d9[_0xe21c5(0x1bb)]+_0xe21c5(0x1b6))),{'ok':_0x1cb9d9[_0xe21c5(0x1bb)]===0x0};}requireInteractive();const _0x19c0d0=startSpinner(_0xe21c5(0x1ce));let _0x1e548b;try{_0x1e548b=await fetchOnlineMenuList(_0x6bc858[_0xe21c5(0x1d6)],_0x6bc858['cookie']),stopSpinner(_0x19c0d0,_0xe21c5(0x1b3),!![]);}catch(_0x5694a4){stopSpinner(_0x19c0d0,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0xe21c5(0x1bd)](_0x5694a4 instanceof Error?_0x5694a4[_0xe21c5(0x1d9)]:_0xe21c5(0x1c7));}const _0xdf282c=filterMenusWithResources(_0x1e548b);if(_0xdf282c[_0xe21c5(0x1d7)]===0x0)return console[_0xe21c5(0x1ca)](a65_0x4a6d35['yellow'](_0xe21c5(0x1c1))),{'ok':!![]};console[_0xe21c5(0x1ca)](),console[_0xe21c5(0x1ca)](a65_0x4a6d35[_0xe21c5(0x1b8)](_0xe21c5(0x1b0)+_0xdf282c[_0xe21c5(0x1d7)]+'\x20menu(s)\x20with\x20existing\x20resources')),console[_0xe21c5(0x1ca)](renderUpdateSummary(_0xdf282c[_0xe21c5(0x1ae)](_0x42a7a3=>_0x42a7a3[_0xe21c5(0x1cb)]),[_0x2f8750[_0xe21c5(0x1ac)],_0x2f8750[_0xe21c5(0x1e0)]])),console[_0xe21c5(0x1ca)]();let _0x4cb29c=_0x2f8750[_0xe21c5(0x1ac)],_0x164bcb=_0x2f8750['cssUrl'];!_0x4cb29c&&(_0x4cb29c=await askJsUrl());!_0x164bcb&&(_0x164bcb=await askCssUrl());const _0x3fef7a=await askConfirm(_0xe21c5(0x1cc)+_0xdf282c['length']+_0xe21c5(0x1de)+_0x4cb29c+_0xe21c5(0x1d3)+_0x164bcb+'?');if(!_0x3fef7a)return console[_0xe21c5(0x1ca)](a65_0x4a6d35[_0xe21c5(0x1ad)](_0xe21c5(0x1dd))),{'ok':!![]};const _0x140437=[_0x4cb29c,_0x164bcb],_0x54f37e=startSpinner(_0xe21c5(0x1b5)+_0xdf282c[_0xe21c5(0x1d7)]+'\x20menu(s)...');try{const _0x4959ba=await doUpdateCdnUrls(_0x6bc858[_0xe21c5(0x1d6)],_0x6bc858[_0xe21c5(0x1ab)],_0xdf282c,_0x140437);return stopSpinner(_0x54f37e,_0xe21c5(0x1d0)+_0x4959ba['updated']+_0xe21c5(0x1b9),_0x4959ba[_0xe21c5(0x1bb)]===0x0),{'ok':_0x4959ba[_0xe21c5(0x1bb)]===0x0,'data':_0x4959ba,'message':_0x4959ba[_0xe21c5(0x1bb)]>0x0?_0xe21c5(0x1ba)+_0x4959ba[_0xe21c5(0x1b1)]+'\x20updated,\x20'+_0x4959ba['failed']+_0xe21c5(0x1b4):'Menu\x20update\x20completed:\x20'+_0x4959ba[_0xe21c5(0x1b1)]+_0xe21c5(0x1d2)};}catch(_0x1c2c74){stopSpinner(_0x54f37e,_0xe21c5(0x1db),![]);throw CliErrors[_0xe21c5(0x1bd)](_0x1c2c74 instanceof Error?_0x1c2c74[_0xe21c5(0x1d9)]:_0xe21c5(0x1db));}}};function a65_0x1ad3(){const _0x5ee30a=['\x20failed.','Updating\x20','\x20menu(s)\x20failed','27HxGxAv','cyan','\x20menu(s)','Menu\x20update\x20completed:\x20','failed','705RdwJap','validation','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','18LuFJNL','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','65420AaUbRm','str','16JsHOiV','skipped','7724sPmfuT','Failed\x20to\x20fetch\x20online\x20menu\x20list','write','737YGUlEC','log','label','\x20\x20Update\x20','336749tknPoa','Fetching\x20online\x20menu\x20list...','parse','Updated\x20','1935090ERPfHs','\x20updated.','\x20and\x20CSS:\x20','2244176RWfUXA','68280CEKGLu','appCode','length','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','message','menu','Menu\x20update\x20failed','string','\x20\x20Cancelled.','\x20menu(s)\x20with\x20JS:\x20','2920935PSNCgk','cssUrl','trim','object','cookie','jsUrl','gray','map','boolean','\x20\x20Found\x20','updated','flag','Online\x20menu\x20list\x20fetched'];a65_0x1ad3=function(){return _0x5ee30a;};return a65_0x1ad3();}function parseParams(_0x13c243){const _0x3efb85=a65_0x4df611;if(!_0x13c243)return{};try{const _0x4b69bf=JSON[_0x3efb85(0x1cf)](_0x13c243);if(typeof _0x4b69bf!==_0x3efb85(0x1e2)||_0x4b69bf===null||Array['isArray'](_0x4b69bf))return{};return{'jsUrl':typeof _0x4b69bf[_0x3efb85(0x1ac)]===_0x3efb85(0x1dc)?_0x4b69bf[_0x3efb85(0x1ac)][_0x3efb85(0x1e1)]():undefined,'cssUrl':typeof _0x4b69bf[_0x3efb85(0x1e0)]===_0x3efb85(0x1dc)?_0x4b69bf[_0x3efb85(0x1e0)][_0x3efb85(0x1e1)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x72f42f,_0x2de988){const _0x317cfd=a66_0x3e1d,_0x582106=_0x72f42f();while(!![]){try{const _0x3af089=parseInt(_0x317cfd(0x204))/0x1+parseInt(_0x317cfd(0x1f5))/0x2+parseInt(_0x317cfd(0x1f2))/0x3+parseInt(_0x317cfd(0x1fd))/0x4*(parseInt(_0x317cfd(0x206))/0x5)+parseInt(_0x317cfd(0x1f1))/0x6*(-parseInt(_0x317cfd(0x1f8))/0x7)+-parseInt(_0x317cfd(0x200))/0x8+-parseInt(_0x317cfd(0x207))/0x9;if(_0x3af089===_0x2de988)break;else _0x582106['push'](_0x582106['shift']());}catch(_0x1432c7){_0x582106['push'](_0x582106['shift']());}}}(a66_0xf60e,0xf1f17));import{existsSync}from'node:fs';import a66_0x3fb5bf from'node:path';import a66_0x54070b from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';function a66_0x3e1d(_0xd2e441,_0x23f3e3){_0xd2e441=_0xd2e441-0x1f0;const _0xf60eea=a66_0xf60e();let _0x3e1d64=_0xf60eea[_0xd2e441];return _0x3e1d64;}import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x3b3537,_0x4b185a,_0x5104c2){const _0x454d32=a66_0x3e1d,_0x1a80b5='my-app',_0x146c1c=readConfig(),_0x3ffd87=typeof _0x146c1c[_0x454d32(0x1f7)]==='string'?_0x146c1c[_0x454d32(0x1f7)]:undefined,_0x485b59=await input({'message':_0x454d32(0x208),'default':_0x1a80b5,'validate':_0x50519e=>{const _0x35be5d=_0x454d32,_0x10149a=_0x50519e[_0x35be5d(0x201)]()||_0x1a80b5;if(_0x10149a['length']>0x32)return _0x35be5d(0x205);const _0x5c0db4=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x10149a&&!_0x5c0db4[_0x35be5d(0x1f3)](_0x10149a))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0x3df914=a66_0x3fb5bf[_0x35be5d(0x1fb)](process['cwd'](),_0x10149a);if(existsSync(_0x3df914))return'Directory\x20\x22'+_0x10149a+_0x35be5d(0x1f0);return!![];}});console[_0x454d32(0x209)](a66_0x54070b[_0x454d32(0x203)](_0x454d32(0x202)+a66_0x54070b[_0x454d32(0x1f4)](_0x485b59)));const _0x185526=await selectSingleAppcode(_0x5104c2);console[_0x454d32(0x209)](a66_0x54070b[_0x454d32(0x203)](_0x454d32(0x1fc)+a66_0x54070b[_0x454d32(0x1f4)](_0x185526||_0x454d32(0x1f6))));if(_0x185526){const _0x1b6adc=await getIsSessionValid();if(!_0x1b6adc){const _0x12476a=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x12476a){const _0x5b4332=await authServer({'silent':!![]});console['log'](a66_0x54070b[_0x454d32(0x203)]('√\x20Login\x20status:\x20'+a66_0x54070b[_0x454d32(0x1f4)](_0x5b4332?_0x454d32(0x1fe):_0x454d32(0x1ff))));}else console[_0x454d32(0x209)](a66_0x54070b[_0x454d32(0x203)](_0x454d32(0x1f9)+a66_0x54070b['cyan'](_0x454d32(0x1fa))));}await _0x3b3537({'projectName':_0x485b59,'appCode':_0x185526,'env':_0x4b185a||_0x3ffd87||'production'});}else await _0x3b3537({'projectName':_0x485b59,'env':_0x4b185a||_0x3ffd87||'production'});}function a66_0xf60e(){const _0x3ad790=['Project\x20name:','log','\x22\x20already\x20exists','3858kdITMo','5274495rrQqta','test','cyan','1768986fWuWSO','Not\x20set','env','11732aDwUPw','√\x20Login\x20status:\x20','Skipped','resolve','√\x20App\x20Code:\x20','11364gWYnbP','Logged\x20in','Login\x20failed','8482696tUWOFO','trim','√\x20Project\x20Name:\x20','green','491908eZNWXJ','Project\x20name\x20cannot\x20exceed\x2050\x20characters','1780dNOJyC','9152622mbvgRg'];a66_0xf60e=function(){return _0x3ad790;};return a66_0xf60e();}
|