@lovrabet/rabetbase-cli 2.0.9 → 2.0.11
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 -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.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 +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x25c044=a51_0x229f;(function(_0x12ddd2,_0x5b76fd){const _0x540d37=a51_0x229f,_0x3ee727=_0x12ddd2();while(!![]){try{const _0x2c7ff0=parseInt(_0x540d37(0xfb))/0x1*(parseInt(_0x540d37(0xd3))/0x2)+-parseInt(_0x540d37(0xf9))/0x3+parseInt(_0x540d37(0xe0))/0x4*(parseInt(_0x540d37(0xf5))/0x5)+-parseInt(_0x540d37(0x101))/0x6*(parseInt(_0x540d37(0xec))/0x7)+-parseInt(_0x540d37(0xd8))/0x8*(-parseInt(_0x540d37(0xdd))/0x9)+-parseInt(_0x540d37(0xde))/0xa*(parseInt(_0x540d37(0x105))/0xb)+parseInt(_0x540d37(0xef))/0xc;if(_0x2c7ff0===_0x5b76fd)break;else _0x3ee727['push'](_0x3ee727['shift']());}catch(_0x1bfe80){_0x3ee727['push'](_0x3ee727['shift']());}}}(a51_0x592a,0x45022));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';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';function syntheticApp(_0x314d74){return{'appCode':_0x314d74,'appName':_0x314d74};}function a51_0x229f(_0x3bdf30,_0x1c99a3){_0x3bdf30=_0x3bdf30-0xcf;const _0x592a47=a51_0x592a();let _0x229f8d=_0x592a47[_0x3bdf30];return _0x229f8d;}function writeInitConfig(_0x1c5c89,_0x5c2f92,_0x56baa9){const _0x373fb6=a51_0x229f,_0x474695=resolveWriteConfigPath(_0x1c5c89),_0x1649ad={'version':getCliVersion(),'createdAt':new Date()[_0x373fb6(0xeb)](),'env':_0x56baa9};if(_0x5c2f92[_0x373fb6(0xe9)]===0x1)_0x1649ad['appcode']=_0x5c2f92[0x0]['appCode'];else{_0x1649ad[_0x373fb6(0xd6)]={};for(const _0x185575 of _0x5c2f92){_0x1649ad[_0x373fb6(0xd6)][_0x185575[_0x373fb6(0xf3)]]={'appcode':_0x185575['appCode'],'env':_0x56baa9};}_0x1649ad[_0x373fb6(0xe3)]=_0x5c2f92[0x0][_0x373fb6(0xf3)];}writeConfigFile(_0x474695,_0x1649ad);const _0x47c12b=_0x1c5c89===_0x373fb6(0xe1)?_0x373fb6(0xe1):_0x373fb6(0xff);console[_0x373fb6(0xe5)](_0x373fb6(0xf7)+_0x47c12b+_0x373fb6(0x102)),_0x5c2f92[_0x373fb6(0xe9)]===0x1?console[_0x373fb6(0xe5)](_0x373fb6(0xd1)+_0x5c2f92[0x0][_0x373fb6(0xf3)]):(console[_0x373fb6(0xe5)](_0x373fb6(0xd9)+_0x5c2f92[_0x373fb6(0xf1)](_0x367dac=>_0x367dac['appCode'])[_0x373fb6(0xdf)](',\x20')),console[_0x373fb6(0xe5)](_0x373fb6(0xcf)+_0x1649ad[_0x373fb6(0xe3)])),console[_0x373fb6(0xe5)](_0x373fb6(0xdb)+_0x1649ad['env']),console['log'](_0x373fb6(0xf6)+_0x474695);}function a51_0x592a(){const _0x3dede7=['Target\x20environment','Usage:\x20','6913272RumSqE','Auto-confirm\x20prompts','map','bool','appCode','yes','25nabjkW','\x20\x20Config:\x20','\x0a✓\x20Successfully\x20initialized\x20','valid','1096269VSwdqD','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','321205KYkCks','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','daily','project','validation','150FvWZst','\x20config','init','boolean','19294hlfcvB','env','\x20\x20Default:\x20','str','\x20\x20AppCode:\x20','appcode','2zgopvl','write','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','apps','production','1080fFwbHJ','\x20\x20Apps:\x20','run','\x20\x20Env:\x20','flagMissing','20529yiRzph','1150uAiwzg','join','91016TROKZT','global','检测到旧配置文件,正在自动升级...\x0a','defaultApp','some','log','Write\x20to\x20global\x20config\x20instead\x20of\x20project','message','nonInteractive','length','cwd','toLocaleString','131383NrZHfw'];a51_0x592a=function(){return _0x3dede7;};return a51_0x592a();}async function runSmartInit(_0x185cea){const _0x3168ce=a51_0x229f,_0x2fb5cf=process[_0x3168ce(0xea)](),_0x302b6f=_0x185cea[_0x3168ce(0xf2)]('global')?'global':'project',_0x5065d0=_0x185cea[_0x3168ce(0xd0)](_0x3168ce(0x106))||'production',_0x2d14d3=_0x185cea[_0x3168ce(0xd0)](_0x3168ce(0xd2))||undefined,_0x48fa86=_0x185cea[_0x3168ce(0xf2)](_0x3168ce(0xff));if(_0x48fa86){const {initConfig:_0x414fe1}=await import('../../commands/project/init.js');return _0x414fe1({'appcode':_0x2d14d3,'env':_0x5065d0,'autoYes':_0x185cea['bool'](_0x3168ce(0xf4))});}if(_0x302b6f==='project'){const _0x4387cc=existsSync(resolve(_0x2fb5cf,NEW_CONFIG_NAME)),_0x589565=LEGACY_CONFIG_NAMES[_0x3168ce(0xe4)](_0x4b9dd1=>existsSync(resolve(_0x2fb5cf,_0x4b9dd1)));if(_0x589565&&!_0x4387cc)return console[_0x3168ce(0xe5)](_0x3168ce(0xe2)),upgradeApp(_0x185cea[_0x3168ce(0xe8)],{'yes':_0x185cea[_0x3168ce(0xf2)](_0x3168ce(0xf4))});if(_0x4387cc)throw CliErrors[_0x3168ce(0x100)](_0x3168ce(0xd5),'Use\x20`'+CLI_BIN_NAME+_0x3168ce(0xfc));}if(_0x2d14d3){const _0x1a5c5c=validateAppcode(_0x2d14d3);if(!_0x1a5c5c[_0x3168ce(0xf8)])throw CliErrors[_0x3168ce(0x100)](_0x1a5c5c[_0x3168ce(0xe7)]);writeInitConfig(_0x302b6f,[syntheticApp(_0x2d14d3)],_0x5065d0);return;}if(_0x185cea[_0x3168ce(0xe8)])throw CliErrors[_0x3168ce(0xdc)](_0x3168ce(0xd2),_0x3168ce(0xee)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]');const _0x4c8dec=getCookie(),_0x5109d2=await selectMultipleApps(_0x4c8dec),_0x55d726=_0x5109d2==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x5109d2;writeInitConfig(_0x302b6f,_0x55d726,_0x5065d0);}const initFlags=[{'name':a51_0x25c044(0xe1),'type':a51_0x25c044(0x104),'description':a51_0x25c044(0xe6),'default':![]},{'name':a51_0x25c044(0x106),'type':'string','description':a51_0x25c044(0xed),'default':a51_0x25c044(0xd7),'enum':['production',a51_0x25c044(0xfe)]},{'name':a51_0x25c044(0xd2),'type':'string','description':'App\x20code\x20to\x20initialize\x20with'},{'name':a51_0x25c044(0xff),'type':a51_0x25c044(0x104),'description':a51_0x25c044(0xfa),'default':![]},{'name':a51_0x25c044(0xf4),'type':a51_0x25c044(0x104),'description':a51_0x25c044(0xf0),'default':![]}];export const initDefinitions=[{'service':a51_0x25c044(0x103),'command':a51_0x25c044(0xda),'description':a51_0x25c044(0xfd),'risk':a51_0x25c044(0xd4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x4eb780){return await runSmartInit(_0x4eb780),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x3ec5a7=a52_0x55f8;function a52_0x55f8(_0x7c3123,_0x3b7ad1){_0x7c3123=_0x7c3123-0x149;const _0x15fcc3=a52_0x15fc();let _0x55f878=_0x15fcc3[_0x7c3123];return _0x55f878;}(function(_0x510c51,_0x5425d7){const _0x467a3c=a52_0x55f8,_0x13d4ce=_0x510c51();while(!![]){try{const _0x2ff1f1=-parseInt(_0x467a3c(0x14c))/0x1+-parseInt(_0x467a3c(0x164))/0x2+parseInt(_0x467a3c(0x162))/0x3+-parseInt(_0x467a3c(0x160))/0x4+-parseInt(_0x467a3c(0x151))/0x5+-parseInt(_0x467a3c(0x15d))/0x6*(parseInt(_0x467a3c(0x163))/0x7)+parseInt(_0x467a3c(0x14f))/0x8;if(_0x2ff1f1===_0x5425d7)break;else _0x13d4ce['push'](_0x13d4ce['shift']());}catch(_0x448ca3){_0x13d4ce['push'](_0x13d4ce['shift']());}}}(a52_0x15fc,0xed4a9));import{logger}from'../../utils/logger.js';function a52_0x15fc(){const _0x43209c=['message','length','clear','950540FDmuHM','logs','read','34163200ItbvGw','success','814825tCwpmK','write','show','stringify','keys','\x20\x20\x20Duration:\x20','log','level','duration','en-US','details','*\x20No\x20logs\x20found','78ZHUsfW','\x20\x20\x20Details:\x20','\x20\x20\x20Time:\x20','6186572RRwepF','error','2058396jtNqoO','639317XthBqu','274272tIaztd','readLogs','View\x20command\x20history\x20logs','warn','command','forEach','*\x20Logs\x20cleared'];a52_0x15fc=function(){return _0x43209c;};return a52_0x15fc();}function printLogs(_0x55e31d){const _0x5b95aa=a52_0x55f8;if(_0x55e31d[_0x5b95aa(0x14a)]===0x0){console['log'](_0x5b95aa(0x15c));return;}console[_0x5b95aa(0x157)]('*\x20Lovrabet\x20CLI\x20logs:\x0a'),_0x55e31d[_0x5b95aa(0x169)]((_0x5b9085,_0x10d872)=>{const _0x26a5d7=_0x5b95aa,_0x3d5a15=new Date(_0x5b9085['timestamp'])['toLocaleString'](_0x26a5d7(0x15a)),_0xe4e57=_0x5b9085[_0x26a5d7(0x158)]===_0x26a5d7(0x150)?'√':_0x5b9085['level']===_0x26a5d7(0x161)?'×':_0x5b9085['level']===_0x26a5d7(0x167)?'!':'i';console[_0x26a5d7(0x157)](_0x10d872+0x1+'.\x20'+_0xe4e57+'\x20['+_0x5b9085[_0x26a5d7(0x168)]+']\x20'+_0x5b9085[_0x26a5d7(0x149)]),console['log'](_0x26a5d7(0x15f)+_0x3d5a15),_0x5b9085['duration']&&console[_0x26a5d7(0x157)](_0x26a5d7(0x156)+_0x5b9085[_0x26a5d7(0x159)]+'ms'),_0x5b9085[_0x26a5d7(0x15b)]&&Object[_0x26a5d7(0x155)](_0x5b9085['details'])['length']>0x0&&console['log'](_0x26a5d7(0x15e)+JSON[_0x26a5d7(0x154)](_0x5b9085['details'],null,0x2)),console[_0x26a5d7(0x157)]('');});}export const logsDefinitions=[{'service':a52_0x3ec5a7(0x14d),'command':a52_0x3ec5a7(0x153),'description':a52_0x3ec5a7(0x166),'risk':a52_0x3ec5a7(0x14e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x14b320){const _0x859014=a52_0x3ec5a7;return printLogs(logger[_0x859014(0x165)]()),{'ok':!![]};}},{'service':'logs','command':a52_0x3ec5a7(0x14b),'description':'Clear\x20command\x20history\x20logs','risk':a52_0x3ec5a7(0x152),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1da14a){const _0x5c0fa4=a52_0x3ec5a7;return logger['clearLogs'](),console['log'](_0x5c0fa4(0x16a)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a53_0x1adc(){const _0x530f21=['214454rXBhiK','2747850gXqLfA','2905056ECTknF','34288JxOMls','90FupODQ','1650mvmqsl','53670fOnjtG','9260sTYXRz','4lbMcmm','1972860sCvQos','4565mxieWh'];a53_0x1adc=function(){return _0x530f21;};return a53_0x1adc();}(function(_0x242983,_0x1ca351){const _0x838198=a53_0x5806,_0x51089f=_0x242983();while(!![]){try{const _0x187cfe=parseInt(_0x838198(0x133))/0x1*(-parseInt(_0x838198(0x13b))/0x2)+-parseInt(_0x838198(0x131))/0x3+parseInt(_0x838198(0x13a))/0x4*(-parseInt(_0x838198(0x138))/0x5)+parseInt(_0x838198(0x135))/0x6+-parseInt(_0x838198(0x134))/0x7+-parseInt(_0x838198(0x136))/0x8*(parseInt(_0x838198(0x137))/0x9)+parseInt(_0x838198(0x139))/0xa*(parseInt(_0x838198(0x132))/0xb);if(_0x187cfe===_0x1ca351)break;else _0x51089f['push'](_0x51089f['shift']());}catch(_0x2d7de2){_0x51089f['push'](_0x51089f['shift']());}}}(a53_0x1adc,0x67e79));import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';function a53_0x5806(_0x11cdf8,_0x487803){_0x11cdf8=_0x11cdf8-0x131;const _0x1adc34=a53_0x1adc();let _0x5806fe=_0x1adc34[_0x11cdf8];return _0x5806fe;}export const menuDefinitions=[menuSync,menuUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe216bf,_0x425def){const _0x3d00ed=a54_0x2231,_0x1ee979=_0xe216bf();while(!![]){try{const _0xd0bd50=-parseInt(_0x3d00ed(0x87))/0x1*(parseInt(_0x3d00ed(0x80))/0x2)+parseInt(_0x3d00ed(0x8c))/0x3+parseInt(_0x3d00ed(0x8a))/0x4+parseInt(_0x3d00ed(0x7d))/0x5*(parseInt(_0x3d00ed(0x90))/0x6)+-parseInt(_0x3d00ed(0x8e))/0x7+parseInt(_0x3d00ed(0x81))/0x8*(-parseInt(_0x3d00ed(0x8d))/0x9)+parseInt(_0x3d00ed(0x75))/0xa*(-parseInt(_0x3d00ed(0x7a))/0xb);if(_0xd0bd50===_0x425def)break;else _0x1ee979['push'](_0x1ee979['shift']());}catch(_0x494ab0){_0x1ee979['push'](_0x1ee979['shift']());}}}(a54_0x3a25,0xcaa1d));function a54_0x2231(_0xeada97,_0x41ec76){_0xeada97=_0xeada97-0x74;const _0x3a2572=a54_0x3a25();let _0x223146=_0x3a2572[_0xeada97];return _0x223146;}function strWidth(_0x4897c3){const _0x1ad3eb=a54_0x2231;let _0x3ef484=0x0;for(const _0x322369 of _0x4897c3){_0x3ef484+=/[\u4e00-\u9fa5]/[_0x1ad3eb(0x91)](_0x322369)?0x2:0x1;}return _0x3ef484;}function a54_0x3a25(){const _0x3e20aa=['24ISFujA','test','online','(unchanged)','map','showOnline','493320ttfowl','max','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','Menu\x20Name','110QquTFO','repeat','path','1257085txhoAd','\x20\x20\x20\x20JS:\x20\x20','\x20\x20No\x20pages\x20to\x20sync.','2RrBjvv','4107128voOxGH','Platform','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','label','Local','284267UpmQaJ','length','push','832688FnHrEB','join','2912352XDQWbT','9hWEghp','445655lwumZd','\x20\x20Affected\x20menus:\x20'];a54_0x3a25=function(){return _0x3e20aa;};return a54_0x3a25();}function padRight(_0x1e967a,_0x211cbc){const _0x5bd3e8=a54_0x2231,_0x46043d=strWidth(_0x1e967a);return _0x1e967a+'\x20'[_0x5bd3e8(0x7b)](Math[_0x5bd3e8(0x76)](0x0,_0x211cbc-_0x46043d));}export function renderCompareTable(_0x45ca68,_0x14a5da={}){const _0x5c8ff0=a54_0x2231;if(_0x45ca68[_0x5c8ff0(0x88)]===0x0)return'';const _0x242455=_0x14a5da[_0x5c8ff0(0x74)]??!![],_0x2489a2=Math['max'](0x1e,..._0x45ca68[_0x5c8ff0(0x94)](_0x502614=>strWidth(_0x502614['label']))),_0x3139a9=0x4,_0xf30fab=[],_0x4d1285='\x20\x20'+padRight(_0x5c8ff0(0x79),_0x2489a2),_0x2b830c=padRight(_0x5c8ff0(0x86),_0x3139a9),_0x2a7478=_0x242455?'\x20\x20'+padRight(_0x5c8ff0(0x82),_0x3139a9):'';_0xf30fab['push'](_0x4d1285+'\x20\x20'+_0x2b830c+(_0x242455?_0x2a7478:'')),_0xf30fab[_0x5c8ff0(0x89)]('\x20\x20'+'─'[_0x5c8ff0(0x7b)](_0x2489a2)+'\x20\x20'+'─'[_0x5c8ff0(0x7b)](_0x3139a9)+(_0x242455?'\x20\x20'+'─'[_0x5c8ff0(0x7b)](_0x3139a9):''));for(const _0x23a3f9 of _0x45ca68){const _0x5dcb17=padRight(_0x23a3f9[_0x5c8ff0(0x85)],_0x2489a2),_0x575293=_0x23a3f9['local']?'✓':'✗',_0x5977f7=padRight(_0x575293,_0x3139a9);let _0x29ba83='\x20\x20'+_0x5dcb17+'\x20\x20'+_0x5977f7;if(_0x242455){const _0x5f460a=_0x23a3f9[_0x5c8ff0(0x92)]?'✓':'✗';_0x29ba83+='\x20\x20'+padRight(_0x5f460a,_0x3139a9);}_0xf30fab[_0x5c8ff0(0x89)](_0x29ba83);}return _0xf30fab[_0x5c8ff0(0x8b)]('\x0a');}export function renderSyncSummary(_0x4c74a6,_0x5985b5){const _0x473c1f=a54_0x2231;if(_0x4c74a6[_0x473c1f(0x88)]===0x0)return _0x5985b5?_0x473c1f(0x84):_0x473c1f(0x7f);const _0x2d4275=['\x20\x20'+_0x4c74a6[_0x473c1f(0x88)]+_0x473c1f(0x83)];for(const _0x3ce103 of _0x4c74a6){_0x2d4275['push']('\x20\x20\x20\x20•\x20'+_0x3ce103['label']+'\x20('+_0x3ce103[_0x473c1f(0x7c)]+')');}return _0x2d4275[_0x473c1f(0x8b)]('\x0a');}export function renderUpdateSummary(_0x2747ee,_0x2cb068){const _0x254536=a54_0x2231;if(_0x2747ee['length']===0x0)return _0x254536(0x77);const _0x12460=['\x20\x20'+_0x2747ee[_0x254536(0x88)]+_0x254536(0x78),_0x254536(0x7e)+(_0x2cb068[0x0]??_0x254536(0x93)),'\x20\x20\x20\x20CSS:\x20'+(_0x2cb068[0x1]??'(unchanged)'),'',_0x254536(0x8f)+_0x2747ee['join'](',\x20')];return _0x12460['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37f83a,_0x202315){var _0x549245=a55_0x2e7b,_0x1a6c42=_0x37f83a();while(!![]){try{var _0x35138d=parseInt(_0x549245(0xf0))/0x1+-parseInt(_0x549245(0xeb))/0x2*(parseInt(_0x549245(0xf1))/0x3)+parseInt(_0x549245(0xf2))/0x4*(parseInt(_0x549245(0xed))/0x5)+parseInt(_0x549245(0xf3))/0x6+parseInt(_0x549245(0xf4))/0x7*(-parseInt(_0x549245(0xee))/0x8)+-parseInt(_0x549245(0xef))/0x9+-parseInt(_0x549245(0xec))/0xa;if(_0x35138d===_0x202315)break;else _0x1a6c42['push'](_0x1a6c42['shift']());}catch(_0x3efe63){_0x1a6c42['push'](_0x1a6c42['shift']());}}}(a55_0x113e,0xc55b3));function a55_0x113e(){var _0x2a2120=['1110827IdGjnk','13893VfZaIo','6628yjdqmO','7547928IeClbz','7ofVvPt','184VGLCko','10028740vqBCfQ','4825mHMCXN','2671032DpjjKH','12569796pNnBGQ'];a55_0x113e=function(){return _0x2a2120;};return a55_0x113e();}export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';function a55_0x2e7b(_0x5286f5,_0x5e9f41){_0x5286f5=_0x5286f5-0xeb;var _0x113e89=a55_0x113e();var _0x2e7ba5=_0x113e89[_0x5286f5];return _0x2e7ba5;}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(_0x4abb3e,_0x3de15c){const _0xf73c5e=a56_0x13a4,_0x234530=_0x4abb3e();while(!![]){try{const _0x1e3098=parseInt(_0xf73c5e(0x19a))/0x1+parseInt(_0xf73c5e(0x184))/0x2+parseInt(_0xf73c5e(0x183))/0x3+parseInt(_0xf73c5e(0x19f))/0x4+-parseInt(_0xf73c5e(0x186))/0x5+parseInt(_0xf73c5e(0x199))/0x6*(parseInt(_0xf73c5e(0x187))/0x7)+-parseInt(_0xf73c5e(0x18e))/0x8;if(_0x1e3098===_0x3de15c)break;else _0x234530['push'](_0x234530['shift']());}catch(_0x307e54){_0x234530['push'](_0x234530['shift']());}}}(a56_0x34cd,0xab7c4));import a56_0x28642f from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a56_0xda2dc7 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x33f1be){const _0x3de250=a56_0x13a4;return _0x33f1be[_0x3de250(0x19c)](_0x245771=>{const _0x448839=_0x3de250;if(_0x245771?.[_0x448839(0x190)]==='ExitPromptError')throw CliErrors[_0x448839(0x18c)](_0x448839(0x1a1));throw _0x245771;});}function a56_0x13a4(_0x5b4d7d,_0x39d9cf){_0x5b4d7d=_0x5b4d7d-0x17b;const _0x34cdd7=a56_0x34cd();let _0x13a45c=_0x34cdd7[_0x5b4d7d];return _0x13a45c;}export function startSpinner(_0x13f482){const _0x4ca3cf=a56_0x13a4;return a56_0xda2dc7({'text':_0x13f482,'color':_0x4ca3cf(0x197)})['start']();}export function stopSpinner(_0x201196,_0xa7365,_0xc29dce){const _0x2e001b=a56_0x13a4;_0xc29dce?_0x201196[_0x2e001b(0x18a)](_0xa7365):_0x201196[_0x2e001b(0x1a2)](_0xa7365);}export async function askConfirm(_0x5bdcf2){return onCancel(confirm({'message':_0x5bdcf2,'theme':{'prefix':''}}));}export async function askJsUrl(_0x59a984){const _0x7305eb=a56_0x13a4;while(!![]){const _0x5e3b82=await onCancel(input({'message':_0x7305eb(0x182),'default':_0x59a984,'theme':{'prefix':''}}));if(_0x5e3b82[_0x7305eb(0x189)]()==='')throw CliErrors[_0x7305eb(0x18c)](_0x7305eb(0x1a1));if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x5e3b82[_0x7305eb(0x189)]())){console[_0x7305eb(0x19d)](a56_0x28642f[_0x7305eb(0x180)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x2c700e=startSpinner(_0x7305eb(0x191));try{const _0x837f32=await isUrlReachable(_0x5e3b82[_0x7305eb(0x189)]());stopSpinner(_0x2c700e,_0x7305eb(0x196),_0x837f32);if(!_0x837f32){console[_0x7305eb(0x19d)](a56_0x28642f[_0x7305eb(0x180)]('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x5e3b82[_0x7305eb(0x189)]();}catch(_0x47cd7e){stopSpinner(_0x2c700e,_0x7305eb(0x198),![]);throw _0x47cd7e;}}}export async function askCssUrl(_0x3c1ca4){const _0x6e7dfe=a56_0x13a4;while(!![]){const _0x442bf9=await onCancel(input({'message':_0x6e7dfe(0x195),'default':_0x3c1ca4,'theme':{'prefix':''}}));if(_0x442bf9['trim']()==='')throw CliErrors[_0x6e7dfe(0x18c)](_0x6e7dfe(0x1a1));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x6e7dfe(0x18f)](_0x442bf9[_0x6e7dfe(0x189)]())){console['error'](a56_0x28642f[_0x6e7dfe(0x180)](_0x6e7dfe(0x17b)));continue;}const _0x301274=startSpinner(_0x6e7dfe(0x1a3));try{const _0x501011=await isUrlReachable(_0x442bf9[_0x6e7dfe(0x189)]());stopSpinner(_0x301274,'CSS\x20URL\x20checked',_0x501011);if(!_0x501011){console[_0x6e7dfe(0x19d)](a56_0x28642f[_0x6e7dfe(0x180)](_0x6e7dfe(0x181)));continue;}return _0x442bf9['trim']();}catch(_0x6c06c9){stopSpinner(_0x301274,'CSS\x20URL\x20check\x20failed',![]);throw _0x6c06c9;}}}export async function selectPages(_0x352df7,_0xdc7f12,_0x471b17){const _0x311c82=a56_0x13a4,_0x54e00e=_0x352df7[_0x311c82(0x194)](_0x16161d=>({'name':_0x16161d[_0x311c82(0x18d)]+'\x20\x20'+(_0xdc7f12[_0x311c82(0x19e)](_0x16161d[_0x311c82(0x17c)])?a56_0x28642f[_0x311c82(0x17e)]('[already\x20on\x20platform]'):a56_0x28642f[_0x311c82(0x18b)](_0x311c82(0x185))),'value':_0x16161d[_0x311c82(0x18d)],'checked':_0x471b17?_0x471b17[_0x311c82(0x192)](_0x16161d['label']):!_0xdc7f12[_0x311c82(0x19e)](_0x16161d['path'])}));if(_0x54e00e[_0x311c82(0x193)]===0x0)throw new Error(_0x311c82(0x188));const _0x2a727a=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x54e00e,'loop':![],'theme':{'prefix':''}}));if(_0x2a727a[_0x311c82(0x193)]===0x0)throw new Error(_0x311c82(0x17f));return _0x352df7['filter'](_0x2e5117=>_0x2a727a[_0x311c82(0x192)](_0x2e5117['label']));}export function isInteractive(){const _0xf447cd=a56_0x13a4;return process[_0xf447cd(0x19b)]['isTTY']===!![];}function a56_0x34cd(){const _0x1e8c8f=['error','has','806116gHLXKC','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','Cancelled.','fail','\x20\x20Checking\x20CSS\x20URL\x20reachability...','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','path','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','gray','No\x20menus\x20selected.','red','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','\x20\x20JS\x20URL:','3884817dPGIsF','2748978qfcXua','[new]','4448050ASyQQD','88375ZSwhgx','No\x20local\x20pages\x20found.','trim','succeed','green','cancelled','label','24424144AKWSLr','test','name','\x20\x20Checking\x20JS\x20URL\x20reachability...','includes','length','map','\x20\x20CSS\x20URL:','JS\x20URL\x20checked','cyan','JS\x20URL\x20check\x20failed','516KiEfzI','688325pczPGU','stdin','catch'];a56_0x34cd=function(){return _0x1e8c8f;};return a56_0x34cd();}export function requireInteractive(){const _0x37df54=a56_0x13a4;if(!isInteractive())throw new Error(_0x37df54(0x1a0)+_0x37df54(0x17d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x421f1f=a57_0xcf7e;(function(_0xab379f,_0x38fbbb){const _0x580623=a57_0xcf7e,_0x32c7d5=_0xab379f();while(!![]){try{const _0x5df858=parseInt(_0x580623(0x78))/0x1*(parseInt(_0x580623(0x73))/0x2)+-parseInt(_0x580623(0x7c))/0x3*(parseInt(_0x580623(0x6e))/0x4)+parseInt(_0x580623(0x6d))/0x5*(parseInt(_0x580623(0x68))/0x6)+parseInt(_0x580623(0x77))/0x7+parseInt(_0x580623(0x71))/0x8*(parseInt(_0x580623(0x6c))/0x9)+parseInt(_0x580623(0x65))/0xa+-parseInt(_0x580623(0x6f))/0xb;if(_0x5df858===_0x38fbbb)break;else _0x32c7d5['push'](_0x32c7d5['shift']());}catch(_0x38f7c0){_0x32c7d5['push'](_0x32c7d5['shift']());}}}(a57_0xb36d,0x84b35));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),a57_0x421f1f(0x7d));function a57_0xcf7e(_0x386f71,_0x474189){_0x386f71=_0x386f71-0x65;const _0xb36d14=a57_0xb36d();let _0xcf7e44=_0xb36d14[_0x386f71];return _0xcf7e44;}export function extractTitleFromComment(_0x5210a1){const _0x176eff=a57_0x421f1f;try{const _0x29108a=readFileSync(_0x5210a1,_0x176eff(0x7e)),_0x39c758=_0x29108a[_0x176eff(0x7b)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x39c758&&_0x39c758[0x1]){const _0x532e11=_0x39c758[0x1],_0x4f91a1=_0x532e11[_0x176eff(0x7b)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x4f91a1&&_0x4f91a1[0x1])return _0x4f91a1[0x1]['trim']();}let _0x5854f2=null;const _0x193da7=_0x29108a[_0x176eff(0x7b)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x193da7&&_0x193da7[0x1]&&(_0x5854f2=_0x193da7[0x1]);if(!_0x5854f2){const _0x3125d2=_0x29108a[_0x176eff(0x7b)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x3125d2&&_0x3125d2[0x1]&&(_0x5854f2=_0x3125d2[0x1]);}if(_0x5854f2){const _0x3f4e1f=new RegExp('\x5cb'+_0x5854f2+_0x176eff(0x76)),_0x434801=_0x29108a[_0x176eff(0x7b)](_0x3f4e1f);if(_0x434801&&_0x434801[0x1])return _0x434801[0x1];return _0x5854f2;}return null;}catch(_0x39c10c){return null;}}function a57_0xb36d(){const _0x251c49=['match','159FZTpju','src/pages','utf-8','6120690ZKmNoR','.tsx','endsWith','6OGqEDB','split','forEach','concat','63ygDdeD','1845555zNKbzm','79412LuqGyO','3750329lkfXxQ','slice','342640yoSxTx','isDirectory','4RSAxrb','join','replaceAll','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','3651795kTjHwW','67007cgBsVf','push','replace'];a57_0xb36d=function(){return _0x251c49;};return a57_0xb36d();}export function getLocalPages(_0x22b6e4=pagesDir,_0x40b630=pagesDir){const _0x38f6cf=a57_0x421f1f;let _0x3177b9=[];const _0x211b44=readdirSync(_0x22b6e4);return _0x211b44[_0x38f6cf(0x6a)](_0x53c243=>{const _0x7da743=_0x38f6cf,_0x1f608c=join(_0x22b6e4,_0x53c243),_0x589cb4=statSync(_0x1f608c);if(_0x589cb4&&_0x589cb4[_0x7da743(0x72)]())_0x3177b9=_0x3177b9[_0x7da743(0x6b)](getLocalPages(_0x1f608c,_0x40b630));else{if(_0x53c243[_0x7da743(0x67)](_0x7da743(0x66))){let _0x20afbb=relative(_0x40b630,_0x1f608c);_0x20afbb[_0x7da743(0x67)]('index.tsx')?_0x20afbb=_0x20afbb[_0x7da743(0x7a)](/index\.tsx$/,''):_0x20afbb=_0x20afbb[_0x7da743(0x7a)](/\.tsx$/,'');_0x20afbb[_0x7da743(0x67)](sep)&&(_0x20afbb=_0x20afbb[_0x7da743(0x70)](0x0,-0x1));const _0x2911b2=_0x20afbb[_0x7da743(0x69)](sep)[_0x7da743(0x74)]('/'),_0xa6f51f=extractTitleFromComment(_0x1f608c),_0xa618c5=_0xa6f51f||_0x2911b2;_0x3177b9[_0x7da743(0x79)]({'path':_0x2911b2[_0x7da743(0x75)]('$',':'),'label':_0xa618c5});}}}),_0x3177b9['filter'](_0x341f42=>_0x341f42['path']!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x505e96,_0x119d51){const _0x395977=a58_0x2b8f,_0x49dd40=_0x505e96();while(!![]){try{const _0x4435df=parseInt(_0x395977(0x170))/0x1+-parseInt(_0x395977(0x188))/0x2*(parseInt(_0x395977(0x174))/0x3)+-parseInt(_0x395977(0x177))/0x4+parseInt(_0x395977(0x16d))/0x5*(parseInt(_0x395977(0x171))/0x6)+parseInt(_0x395977(0x17c))/0x7*(parseInt(_0x395977(0x178))/0x8)+-parseInt(_0x395977(0x16e))/0x9+-parseInt(_0x395977(0x17d))/0xa*(parseInt(_0x395977(0x175))/0xb);if(_0x4435df===_0x119d51)break;else _0x49dd40['push'](_0x49dd40['shift']());}catch(_0xa63762){_0x49dd40['push'](_0x49dd40['shift']());}}}(a58_0x49bd,0x740c8));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x11db8d){const _0xd10e66=a58_0x2b8f,_0x35f9a2=[];return!isValidJsHttpsUrl(_0x11db8d)&&_0x35f9a2[_0xd10e66(0x176)](_0xd10e66(0x16f)),{'ok':_0x35f9a2[_0xd10e66(0x182)]===0x0,'errors':_0x35f9a2};}export function validateCssUrl(_0x1b2395){const _0x388a7e=a58_0x2b8f,_0x215c91=[];return!isValidCssHttpsUrl(_0x1b2395)&&_0x215c91['push'](_0x388a7e(0x172)),{'ok':_0x215c91[_0x388a7e(0x182)]===0x0,'errors':_0x215c91};}export async function validateJsUrlReachable(_0x3e50f7){const _0x256e62=a58_0x2b8f,_0x392fa7=validateJsUrl(_0x3e50f7);if(!_0x392fa7['ok'])return _0x392fa7;const _0x1ee90d=await isUrlReachable(_0x3e50f7);if(!_0x1ee90d)_0x392fa7[_0x256e62(0x181)]['push']('JS\x20URL\x20is\x20unreachable');return{'ok':_0x392fa7[_0x256e62(0x181)][_0x256e62(0x182)]===0x0,'errors':_0x392fa7[_0x256e62(0x181)]};}export async function validateCssUrlReachable(_0x216a42){const _0x4f9400=a58_0x2b8f,_0x1ffc0b=validateCssUrl(_0x216a42);if(!_0x1ffc0b['ok'])return _0x1ffc0b;const _0x38ce7a=await isUrlReachable(_0x216a42);if(!_0x38ce7a)_0x1ffc0b[_0x4f9400(0x181)][_0x4f9400(0x176)](_0x4f9400(0x185));return{'ok':_0x1ffc0b['errors'][_0x4f9400(0x182)]===0x0,'errors':_0x1ffc0b[_0x4f9400(0x181)]};}export function buildCompareRows(_0x50b076,_0x39181d){const _0xbb09f4=a58_0x2b8f;return _0x50b076['map'](_0x89ca87=>({'label':_0x89ca87['label'],'path':_0x89ca87[_0xbb09f4(0x17e)],'local':!![],'online':_0x39181d[_0xbb09f4(0x187)](_0x89ca87[_0xbb09f4(0x17e)])}));}function a58_0x2b8f(_0x2c544d,_0x405a0a){_0x2c544d=_0x2c544d-0x16d;const _0x49bdda=a58_0x49bd();let _0x2b8f11=_0x49bdda[_0x2c544d];return _0x2b8f11;}export function filterNewPages(_0x32905b,_0xcc7f44,_0xe7b4b4){const _0x45c46d=a58_0x2b8f;if(_0xe7b4b4&&_0xe7b4b4[_0x45c46d(0x182)]>0x0){const _0x1e8124=new Set(_0xe7b4b4['map'](_0x366b4d=>_0x366b4d[_0x45c46d(0x17a)]())),_0x2a9d8e=_0x32905b[_0x45c46d(0x17b)](_0x5fe5d8=>_0x1e8124['has'](_0x5fe5d8[_0x45c46d(0x180)]));if(_0x2a9d8e[_0x45c46d(0x182)]===0x0)throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x1e8124]['join'](',\x20'));return _0x2a9d8e;}return _0x32905b[_0x45c46d(0x17b)](_0x22ff23=>!_0xcc7f44['has'](_0x22ff23['path']));}export function filterPagesByLabels(_0x9255c2,_0x3b9176){const _0x3caf25=a58_0x2b8f,_0x59f7c7=[],_0x2134bc=[];for(const _0xc18d30 of _0x3b9176){const _0x55f311=_0xc18d30[_0x3caf25(0x17a)](),_0xcbec80=_0x9255c2[_0x3caf25(0x173)](_0x4c3e9b=>_0x4c3e9b['label']===_0x55f311);if(_0xcbec80)_0x59f7c7['push'](_0xcbec80);else _0x2134bc['push'](_0xc18d30);}return{'matched':_0x59f7c7,'unmatched':_0x2134bc};}export async function doCreateMenus(_0x526b5a,_0x1e7c87,_0x183661,_0x4026da){const _0x48ec4d=a58_0x2b8f;return await createMenus(_0x526b5a,_0x1e7c87,_0x183661,_0x4026da),{'created':_0x183661['length'],'failed':0x0,'labels':_0x183661[_0x48ec4d(0x179)](_0x51c46e=>_0x51c46e['label'])};}function a58_0x49bd(){const _0xb595c7=['618OEiJab','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','find','9411gkwwKU','2497KRHScq','push','2550944sHMmym','8UZkCus','map','trim','filter','4979870ipYywO','14770LrQTDP','path','status','label','errors','length','resources','allSettled','CSS\x20URL\x20is\x20unreachable','rejected','has','40aSMKKo','36995VOslft','7315263zRgLtf','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','850391eoHdbM'];a58_0x49bd=function(){return _0xb595c7;};return a58_0x49bd();}export function filterMenusWithResources(_0x2f93a9){const _0x3f1bb8=a58_0x2b8f;return _0x2f93a9[_0x3f1bb8(0x17b)](_0x58748e=>_0x58748e['resources']['length']>0x0);}export async function doUpdateCdnUrls(_0x56ce4c,_0x1aea84,_0x336578,_0x2e4dc2){const _0x2abad5=a58_0x2b8f,_0xa157b1=_0x336578[_0x2abad5(0x17b)](_0x32e6d2=>_0x32e6d2[_0x2abad5(0x183)][_0x2abad5(0x182)]>0x0),_0x2f37ac=await Promise[_0x2abad5(0x184)](_0xa157b1[_0x2abad5(0x179)](_0x3ed786=>updateMenuCdnUrl(_0x56ce4c,_0x1aea84,{'id':_0x3ed786['id'],'label':_0x3ed786[_0x2abad5(0x180)],'path':_0x3ed786[_0x2abad5(0x17e)],'resources':_0x2e4dc2}))),_0xcd82e4=_0x2f37ac[_0x2abad5(0x17b)](_0x1330c6=>_0x1330c6[_0x2abad5(0x17f)]===_0x2abad5(0x186))[_0x2abad5(0x182)];return{'updated':_0xa157b1[_0x2abad5(0x182)]-_0xcd82e4,'failed':_0xcd82e4};}export async function fetchMenuData(_0xbc5f97,_0x104a45){const _0xacf035=a58_0x2b8f,_0x331e50=getLocalPages(),_0x2e6a41=await getOnlineMenuList(_0xbc5f97,_0x104a45),_0x2c8115=new Set(_0x2e6a41['map'](_0x550f5c=>_0x550f5c[_0xacf035(0x17e)]));return{'localPages':_0x331e50,'onlineMenuList':_0x2e6a41,'onlinePaths':_0x2c8115};}export async function fetchOnlineMenuList(_0x435ec,_0x4f429e){return getOnlineMenuList(_0x435ec,_0x4f429e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f4bf6,_0x518aaa){const _0x3d8353=a59_0x7ffb,_0xfe9f2d=_0x5f4bf6();while(!![]){try{const _0x2ff6c3=-parseInt(_0x3d8353(0x18e))/0x1*(parseInt(_0x3d8353(0x18d))/0x2)+parseInt(_0x3d8353(0x198))/0x3*(parseInt(_0x3d8353(0x188))/0x4)+-parseInt(_0x3d8353(0x190))/0x5*(parseInt(_0x3d8353(0x181))/0x6)+-parseInt(_0x3d8353(0x17a))/0x7+parseInt(_0x3d8353(0x183))/0x8+parseInt(_0x3d8353(0x171))/0x9+parseInt(_0x3d8353(0x175))/0xa;if(_0x2ff6c3===_0x518aaa)break;else _0xfe9f2d['push'](_0xfe9f2d['shift']());}catch(_0x444732){_0xfe9f2d['push'](_0xfe9f2d['shift']());}}}(a59_0x398d,0x5ebd1));import{getApiDomain}from'../../../constant/domain.js';import{getEnv}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x292e5f,_0x2f948f){const _0x2e9bfb=a59_0x7ffb,_0x3629ca=getEnv();logger[_0x2e9bfb(0x195)]('get-online-menu-list',_0x3629ca==='online'?_0x2e9bfb(0x185)+_0x292e5f+')':_0x2e9bfb(0x197)+_0x292e5f+')');const _0xcdcbf3=await platformFetch(getApiDomain()+_0x2e9bfb(0x174)+_0x292e5f,{'cookie':_0x2f948f,'label':'Fetch\x20menu\x20list'});if(!_0xcdcbf3)return logger[_0x2e9bfb(0x195)](_0x2e9bfb(0x170),'Server\x20returned\x20empty\x20menu\x20list'),[];return logger['info'](_0x2e9bfb(0x170),'Fetched\x20'+_0xcdcbf3[_0x2e9bfb(0x178)]+_0x2e9bfb(0x18a)),_0xcdcbf3[_0x2e9bfb(0x179)](flattenMenuItem)[_0x2e9bfb(0x17b)]();}function a59_0x7ffb(_0x4a69b8,_0x157420){_0x4a69b8=_0x4a69b8-0x170;const _0x398db2=a59_0x398d();let _0x7ffbaf=_0x398db2[_0x4a69b8];return _0x7ffbaf;}function flattenMenuItem(_0x4e04fe){const _0x2f3261=a59_0x7ffb;let _0xdf33db=[];try{if(_0x4e04fe['extend']?.[_0x2f3261(0x193)]){const _0x7f720=JSON[_0x2f3261(0x194)](_0x4e04fe[_0x2f3261(0x182)][_0x2f3261(0x193)]);if(Array[_0x2f3261(0x18c)](_0x7f720))_0xdf33db=_0x7f720;}}catch{}const _0xffc1a7=[{'id':_0x4e04fe['id'],'path':_0x4e04fe[_0x2f3261(0x184)],'label':_0x4e04fe[_0x2f3261(0x177)],'resources':_0xdf33db}];if(_0x4e04fe[_0x2f3261(0x17e)]&&_0x4e04fe[_0x2f3261(0x17e)]['length']>0x0)for(const _0x2b3d73 of _0x4e04fe[_0x2f3261(0x17e)]){_0xffc1a7['push'](...flattenMenuItem(_0x2b3d73));}return _0xffc1a7;}export async function createMenu(_0x23add3,_0x79f673,_0xc47c6c){const _0xbefadf=a59_0x7ffb;logger[_0xbefadf(0x195)](_0xbefadf(0x17d),_0xbefadf(0x172)+_0xc47c6c[_0xbefadf(0x177)]+'\x20('+_0xc47c6c[_0xbefadf(0x184)]+')');const _0x22ffe4={'appCode':_0x23add3,'type':_0xbefadf(0x186),'sort':0x0,'extend':{'loadScriptMode':_0xbefadf(0x187),'resources':_0xc47c6c[_0xbefadf(0x193)]?JSON[_0xbefadf(0x18f)](_0xc47c6c['resources']):undefined},..._0xc47c6c};await platformFetch(getApiDomain()+_0xbefadf(0x199),{'method':_0xbefadf(0x180),'body':_0x22ffe4,'cookie':_0x79f673,'label':_0xbefadf(0x17c)+_0xc47c6c[_0xbefadf(0x177)]+'\x22'}),logger['info'](_0xbefadf(0x17d),_0xbefadf(0x192)+_0xc47c6c['label']);}async function createSingleMenu(_0x2a35f8,_0x2f7041,_0x24b486,_0x50d39f){const _0x2e04d1=a59_0x7ffb,_0x2d2ab9={'appCode':_0x2a35f8,'type':_0x2e04d1(0x186),'sort':0x0,'extend':{'loadScriptMode':_0x2e04d1(0x187),'resources':_0x50d39f?JSON[_0x2e04d1(0x18f)](_0x50d39f):undefined},'label':_0x24b486['label'],'path':_0x24b486[_0x2e04d1(0x184)]};await platformFetch(getApiDomain()+_0x2e04d1(0x199),{'method':_0x2e04d1(0x180),'body':_0x2d2ab9,'cookie':_0x2f7041,'label':_0x2e04d1(0x17c)+_0x24b486[_0x2e04d1(0x177)]+'\x22'}),logger[_0x2e04d1(0x195)](_0x2e04d1(0x17d),_0x2e04d1(0x192)+_0x24b486[_0x2e04d1(0x177)]);}export async function createMenus(_0x532bf9,_0xcd650f,_0x303e38,_0x450d79){const _0x1899ce=a59_0x7ffb;logger[_0x1899ce(0x195)]('create-menus',_0x1899ce(0x18b)+_0x303e38[_0x1899ce(0x178)]),await Promise[_0x1899ce(0x196)](_0x303e38[_0x1899ce(0x179)](_0x3aa1cf=>createSingleMenu(_0x532bf9,_0xcd650f,_0x3aa1cf,_0x450d79))),logger[_0x1899ce(0x195)](_0x1899ce(0x191),_0x1899ce(0x17f)+_0x303e38['length']);}function a59_0x398d(){const _0x3d20a9=['stringify','40viiRtw','create-menus','Menu\x20created\x20successfully:\x20','resources','parse','info','all','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','50793hOsLGW','/smartapi/menu/create','get-online-menu-list','505161TTjAVY','Creating\x20menu:\x20','update-menu-cdn-url','/smartapi/menu/find?appCode=','9732890bvgmfM','Update\x20menu\x20assets\x20\x22','label','length','map','4256434YIotML','flat','Create\x20menu\x20\x22','create-menu','children','Batch\x20menu\x20creation\x20completed,\x20total\x20','POST','364860ceTOlA','extend','3854672xWIzqo','path','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','procode','import','80DrQowM','Updating\x20menu\x20asset\x20links:\x20','\x20online\x20menus\x20successfully','Start\x20batch\x20menu\x20creation,\x20total\x20','isArray','12042Lytbfq','61xOWwUN'];a59_0x398d=function(){return _0x3d20a9;};return a59_0x398d();}export async function updateMenuCdnUrl(_0x4dffa8,_0x427b10,_0xc298de){const _0x10e457=a59_0x7ffb;logger[_0x10e457(0x195)]('update-menu-cdn-url',_0x10e457(0x189)+_0xc298de[_0x10e457(0x177)]+'\x20('+_0xc298de[_0x10e457(0x184)]+')');const _0x333239={'id':_0xc298de['id'],'appCode':_0x4dffa8,'extend':{'loadScriptMode':'import','resources':_0xc298de[_0x10e457(0x193)]?JSON[_0x10e457(0x18f)](_0xc298de['resources']):undefined}};await platformFetch(getApiDomain()+'/smartapi/menu/update',{'method':_0x10e457(0x180),'body':_0x333239,'cookie':_0x427b10,'label':_0x10e457(0x176)+_0xc298de[_0x10e457(0x177)]+'\x22'}),logger[_0x10e457(0x195)](_0x10e457(0x173),'Menu\x20assets\x20synced:\x20'+_0xc298de[_0x10e457(0x177)],undefined);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x259ac4,_0x393fc3){const _0x26d5ce=a60_0x1b3a,_0x209038=_0x259ac4();while(!![]){try{const _0xabe911=parseInt(_0x26d5ce(0x1ad))/0x1+-parseInt(_0x26d5ce(0x1bd))/0x2*(-parseInt(_0x26d5ce(0x1a9))/0x3)+-parseInt(_0x26d5ce(0x1c1))/0x4*(parseInt(_0x26d5ce(0x1b2))/0x5)+parseInt(_0x26d5ce(0x199))/0x6*(-parseInt(_0x26d5ce(0x1b7))/0x7)+-parseInt(_0x26d5ce(0x1ba))/0x8*(-parseInt(_0x26d5ce(0x197))/0x9)+parseInt(_0x26d5ce(0x1a0))/0xa+parseInt(_0x26d5ce(0x1b9))/0xb*(-parseInt(_0x26d5ce(0x19a))/0xc);if(_0xabe911===_0x393fc3)break;else _0x209038['push'](_0x209038['shift']());}catch(_0x2f2c17){_0x209038['push'](_0x209038['shift']());}}}(a60_0x446c,0xe8d99));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_0x1b3a(_0x35a982,_0x50c071){_0x35a982=_0x35a982-0x197;const _0x446c6a=a60_0x446c();let _0x1b3ae6=_0x446c6a[_0x35a982];return _0x1b3ae6;}import{logger}from'../../../utils/logger.js';function a60_0x446c(){const _0x408ffa=['length','4955aRiPNG','pages','path','utf8','\x0a\x20\x20Available\x20local\x20pages:\x20','7xmfhFb','message','32821657hUHsvK','2258552DSESHw','field','map','879042gTXpkG','trim','string','menu-sync','280LBnOzD','object','45JPJUPd','selectedLabels','10438998zXoTGS','12WcbgUV','Invalid\x20--params:\x20','data','end','toString','No\x20local\x20pages\x20matched\x20labels:\x20','7748240zCjkOG','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','info','filter','readableEnded','startsWith','JS\x20URL\x20is\x20unreachable:\x20','label','push','12PCKRFk','cssUrl','stdin','jsUrl','1802240mahThc','CSS\x20URL\x20is\x20unreachable:\x20','isArray','join'];a60_0x446c=function(){return _0x408ffa;};return a60_0x446c();}function validateParams(_0x3c7d05){const _0x2dd7b3=a60_0x1b3a,_0x53d46a=[];return _0x3c7d05[_0x2dd7b3(0x1ac)]&&!isValidJsHttpsUrl(_0x3c7d05[_0x2dd7b3(0x1ac)])&&_0x53d46a[_0x2dd7b3(0x1a8)]({'field':_0x2dd7b3(0x1ac),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x3c7d05[_0x2dd7b3(0x1aa)]&&!isValidCssHttpsUrl(_0x3c7d05['cssUrl'])&&_0x53d46a[_0x2dd7b3(0x1a8)]({'field':_0x2dd7b3(0x1aa),'message':_0x2dd7b3(0x1a1)}),_0x53d46a;}export async function runMenuSyncCore(_0x35b5da,_0x579bd1,_0x2ee59d=[],_0x488f49){const _0x532eed=a60_0x1b3a,_0x2858a8=parseParamsFlag(_0x488f49),_0x3a747e=_0x2ee59d[_0x532eed(0x1b1)]>0x0?_0x2ee59d:_0x2858a8[_0x532eed(0x198)],_0x1fa418=_0x2858a8['jsUrl'],_0x558f4a=_0x2858a8[_0x532eed(0x1aa)],_0x309d71=[];if(_0x1fa418)_0x309d71[_0x532eed(0x1a8)](_0x1fa418);if(_0x558f4a)_0x309d71['push'](_0x558f4a);const _0x1eee7e=validateParams(_0x2858a8);if(_0x1eee7e[_0x532eed(0x1b1)]>0x0){const _0x355aef=_0x1eee7e[_0x532eed(0x1bc)](_0x3d5de2=>'--params.'+_0x3d5de2[_0x532eed(0x1bb)]+':\x20'+_0x3d5de2[_0x532eed(0x1b8)])[_0x532eed(0x1b0)](';\x20');throw new Error(_0x532eed(0x19b)+_0x355aef);}logger['setLogPath'](process['cwd']()),logger[_0x532eed(0x1a2)](_0x532eed(0x1c0),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x35b5da,'selectedCount':_0x3a747e?.['length'],'jsUrl':_0x1fa418,'cssUrl':_0x558f4a});if(_0x1fa418){const _0x2201b9=await isUrlReachable(_0x1fa418);if(!_0x2201b9)throw new Error(_0x532eed(0x1a6)+_0x1fa418);}if(_0x558f4a){const _0x75785f=await isUrlReachable(_0x558f4a);if(!_0x75785f)throw new Error(_0x532eed(0x1ae)+_0x558f4a);}const _0x1cbe6b=getLocalPages();if(_0x1cbe6b[_0x532eed(0x1b1)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x51b393=await getOnlineMenuList(_0x35b5da,_0x579bd1),_0x12b7e7=new Set(_0x51b393[_0x532eed(0x1bc)](_0x2b5d81=>_0x2b5d81[_0x532eed(0x1b4)]));let _0x43f807;if(_0x3a747e&&_0x3a747e['length']>0x0){const _0x181b37=new Set(_0x3a747e[_0x532eed(0x1bc)](_0x4a1248=>_0x4a1248[_0x532eed(0x1be)]()));_0x43f807=_0x1cbe6b['filter'](_0xdea515=>_0x181b37['has'](_0xdea515[_0x532eed(0x1a7)]));if(_0x43f807['length']===0x0){const _0x338c5d=_0x1cbe6b['map'](_0x1da059=>_0x1da059[_0x532eed(0x1a7)])[_0x532eed(0x1b0)](',\x20');throw new Error(_0x532eed(0x19f)+[..._0x181b37][_0x532eed(0x1b0)](',\x20')+_0x532eed(0x1b6)+_0x338c5d);}}else _0x43f807=_0x1cbe6b[_0x532eed(0x1a3)](_0x4c759e=>!_0x12b7e7['has'](_0x4c759e['path']));if(_0x43f807[_0x532eed(0x1b1)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x35b5da,_0x579bd1,_0x43f807,_0x309d71[_0x532eed(0x1b1)]>0x0?_0x309d71:undefined),logger[_0x532eed(0x1a2)](_0x532eed(0x1c0),'Menu\x20sync\x20completed',{'count':_0x43f807[_0x532eed(0x1b1)],'resources':_0x309d71}),{'created':_0x43f807[_0x532eed(0x1b1)],'skipped':![],'targetPages':_0x43f807};}export async function readPageLabelsFromStdin(){const _0x23cbec=a60_0x1b3a;if(!process[_0x23cbec(0x1ab)]['isTTY']&&!process[_0x23cbec(0x1ab)][_0x23cbec(0x1a4)])return new Promise(_0x2d72ae=>{const _0x178f1f=_0x23cbec,_0xe11e11=[];process[_0x178f1f(0x1ab)]['on'](_0x178f1f(0x19c),_0x767ea1=>_0xe11e11[_0x178f1f(0x1a8)](_0x767ea1)),process[_0x178f1f(0x1ab)]['on'](_0x178f1f(0x19d),()=>{const _0x413e7d=_0x178f1f,_0x4a62ac=Buffer['concat'](_0xe11e11)[_0x413e7d(0x19e)](_0x413e7d(0x1b5)),_0x1a87d7=_0x4a62ac['split']('\x0a')[_0x413e7d(0x1bc)](_0x2840aa=>_0x2840aa[_0x413e7d(0x1be)]())[_0x413e7d(0x1a3)](_0x55af3b=>_0x55af3b['length']>0x0&&!_0x55af3b[_0x413e7d(0x1a5)]('#'));_0x2d72ae(_0x1a87d7);}),setTimeout(()=>_0x2d72ae([]),0x1f4);});return[];}function parseParamsFlag(_0x1ff804){const _0x4732d1=a60_0x1b3a;if(!_0x1ff804||typeof _0x1ff804!==_0x4732d1(0x1bf))return{};try{const _0xed14d6=JSON['parse'](_0x1ff804);if(typeof _0xed14d6!==_0x4732d1(0x1c2)||_0xed14d6===null||Array[_0x4732d1(0x1af)](_0xed14d6))return{};return{'selectedLabels':Array['isArray'](_0xed14d6[_0x4732d1(0x1b3)])?_0xed14d6[_0x4732d1(0x1b3)][_0x4732d1(0x1bc)](String):undefined,'jsUrl':typeof _0xed14d6[_0x4732d1(0x1ac)]===_0x4732d1(0x1bf)?_0xed14d6[_0x4732d1(0x1ac)][_0x4732d1(0x1be)]():undefined,'cssUrl':typeof _0xed14d6[_0x4732d1(0x1aa)]===_0x4732d1(0x1bf)?_0xed14d6[_0x4732d1(0x1aa)][_0x4732d1(0x1be)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5eb5a9,_0x203a4a){const _0x5691cc=a62_0x1719,_0x2d1dba=_0x5eb5a9();while(!![]){try{const _0x1d7023=-parseInt(_0x5691cc(0x77))/0x1+-parseInt(_0x5691cc(0x80))/0x2+-parseInt(_0x5691cc(0x7f))/0x3*(parseInt(_0x5691cc(0x7c))/0x4)+parseInt(_0x5691cc(0x70))/0x5+-parseInt(_0x5691cc(0x7d))/0x6*(parseInt(_0x5691cc(0x79))/0x7)+-parseInt(_0x5691cc(0x7b))/0x8+parseInt(_0x5691cc(0x82))/0x9;if(_0x1d7023===_0x203a4a)break;else _0x2d1dba['push'](_0x2d1dba['shift']());}catch(_0x6a5775){_0x2d1dba['push'](_0x2d1dba['shift']());}}}(a62_0x12d7,0x44027));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a62_0x12d7(){const _0x566e26=['JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','allSettled','Menu\x20update\x20completed','parse','path','trim','JS\x20URL\x20is\x20unreachable:\x20','rejected','filter','Invalid\x20--params:\x20','2651960cMpJEX','Start\x20non-interactive\x20menu\x20update','length','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','message','info','string','367852bfGxhs','jsUrl','944174nvkjym','isArray','61272YRYmlu','2012lSUTcD','18QoCEZM','setLogPath','1179nppdoA','368450qcpklb','join','8192124qJzUDa','status','cssUrl','map','push'];a62_0x12d7=function(){return _0x566e26;};return a62_0x12d7();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a62_0x1719(_0x39fec5,_0xe29c14){_0x39fec5=_0x39fec5-0x70;const _0x12d7bf=a62_0x12d7();let _0x17194b=_0x12d7bf[_0x39fec5];return _0x17194b;}import{logger}from'../../../utils/logger.js';function validateParams(_0x14be02){const _0x1786ab=a62_0x1719,_0x4d9b08=[];return _0x14be02[_0x1786ab(0x78)]&&!isValidJsHttpsUrl(_0x14be02[_0x1786ab(0x78)])&&_0x4d9b08[_0x1786ab(0x86)]({'field':_0x1786ab(0x78),'message':_0x1786ab(0x87)}),_0x14be02[_0x1786ab(0x84)]&&!isValidCssHttpsUrl(_0x14be02[_0x1786ab(0x84)])&&_0x4d9b08[_0x1786ab(0x86)]({'field':'cssUrl','message':_0x1786ab(0x73)}),_0x4d9b08;}export async function runMenuUpdateCore(_0x56bf34,_0xf7be86,_0x1470d9){const _0x4df0ac=a62_0x1719,_0x10ea6d=parseUpdateParamsFlag(_0x1470d9),_0x3cef20=[];if(_0x10ea6d[_0x4df0ac(0x78)])_0x3cef20[_0x4df0ac(0x86)](_0x10ea6d['jsUrl']);if(_0x10ea6d[_0x4df0ac(0x84)])_0x3cef20[_0x4df0ac(0x86)](_0x10ea6d[_0x4df0ac(0x84)]);const _0x2b8345=validateParams(_0x10ea6d);if(_0x2b8345[_0x4df0ac(0x72)]>0x0){const _0x17cc22=_0x2b8345[_0x4df0ac(0x85)](_0xe86f6d=>'--params.'+_0xe86f6d['field']+':\x20'+_0xe86f6d[_0x4df0ac(0x74)])[_0x4df0ac(0x81)](';\x20');throw new Error(_0x4df0ac(0x90)+_0x17cc22);}logger[_0x4df0ac(0x7e)](process['cwd']()),logger[_0x4df0ac(0x75)]('menu-update',_0x4df0ac(0x71),{'appCode':_0x56bf34,'jsUrl':_0x10ea6d[_0x4df0ac(0x78)],'cssUrl':_0x10ea6d['cssUrl']});if(_0x10ea6d[_0x4df0ac(0x78)]){const _0x532c19=await isUrlReachable(_0x10ea6d[_0x4df0ac(0x78)]);if(!_0x532c19)throw new Error(_0x4df0ac(0x8d)+_0x10ea6d[_0x4df0ac(0x78)]);}if(_0x10ea6d[_0x4df0ac(0x84)]){const _0x41b5dd=await isUrlReachable(_0x10ea6d[_0x4df0ac(0x84)]);if(!_0x41b5dd)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x10ea6d['cssUrl']);}const _0x40b8e2=await getOnlineMenuList(_0x56bf34,_0xf7be86),_0x366385=_0x40b8e2[_0x4df0ac(0x8f)](_0x53ecf0=>_0x53ecf0['resources'][_0x4df0ac(0x72)]>0x0);if(_0x366385[_0x4df0ac(0x72)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x1a269d=await Promise[_0x4df0ac(0x88)](_0x366385[_0x4df0ac(0x85)](_0x348cf4=>updateMenuCdnUrl(_0x56bf34,_0xf7be86,{'id':_0x348cf4['id'],'label':_0x348cf4['label'],'path':_0x348cf4[_0x4df0ac(0x8b)],'resources':_0x3cef20}))),_0x410c0d=_0x1a269d['filter'](_0x1c5305=>_0x1c5305[_0x4df0ac(0x83)]===_0x4df0ac(0x8e))['length'];return logger[_0x4df0ac(0x75)]('menu-update',_0x4df0ac(0x89),{'count':_0x366385[_0x4df0ac(0x72)],'resources':_0x3cef20}),{'updated':_0x366385['length']-_0x410c0d,'failed':_0x410c0d,'skipped':![]};}function parseUpdateParamsFlag(_0xf850ad){const _0x28f8e8=a62_0x1719;if(!_0xf850ad||typeof _0xf850ad!==_0x28f8e8(0x76))return{};try{const _0x57e04b=JSON[_0x28f8e8(0x8a)](_0xf850ad);if(typeof _0x57e04b!=='object'||_0x57e04b===null||Array[_0x28f8e8(0x7a)](_0x57e04b))return{};return{'jsUrl':typeof _0x57e04b[_0x28f8e8(0x78)]===_0x28f8e8(0x76)?_0x57e04b['jsUrl'][_0x28f8e8(0x8c)]():undefined,'cssUrl':typeof _0x57e04b[_0x28f8e8(0x84)]==='string'?_0x57e04b[_0x28f8e8(0x84)][_0x28f8e8(0x8c)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a63_0x2930(_0xb3fc27,_0x5ea2ec){_0xb3fc27=_0xb3fc27-0x95;const _0x32a7ce=a63_0x32a7();let _0x29307a=_0x32a7ce[_0xb3fc27];return _0x29307a;}function a63_0x32a7(){const _0x462f4f=['1744PkhTwb','661881mwwpyw','1692cOOzpp','trim','332VWNBut','26430GHINwQ','25752RhUBmB','188jRUlwC','558210nEiTZB','5689446DKrTnx','5740280wlrMUf','test'];a63_0x32a7=function(){return _0x462f4f;};return a63_0x32a7();}(function(_0x1d32c7,_0x1ebc3d){const _0x23abdf=a63_0x2930,_0x4da87a=_0x1d32c7();while(!![]){try{const _0xcfdfcc=-parseInt(_0x23abdf(0x99))/0x1*(parseInt(_0x23abdf(0x9d))/0x2)+parseInt(_0x23abdf(0x9a))/0x3+-parseInt(_0x23abdf(0xa0))/0x4*(parseInt(_0x23abdf(0x9e))/0x5)+-parseInt(_0x23abdf(0x95))/0x6+parseInt(_0x23abdf(0x96))/0x7+-parseInt(_0x23abdf(0x9f))/0x8*(-parseInt(_0x23abdf(0x9b))/0x9)+-parseInt(_0x23abdf(0x97))/0xa;if(_0xcfdfcc===_0x1ebc3d)break;else _0x4da87a['push'](_0x4da87a['shift']());}catch(_0x1d6bec){_0x4da87a['push'](_0x4da87a['shift']());}}}(a63_0x32a7,0x69da0));export function isValidJsHttpsUrl(_0x525721){const _0x2cfbf4=a63_0x2930;return/^https:\/\/.+\.js(\?.*)?$/[_0x2cfbf4(0x98)](_0x525721['trim']());}export function isValidCssHttpsUrl(_0x38710b){const _0xf00dd1=a63_0x2930;return/^https:\/\/.+\.css(\?.*)?$/[_0xf00dd1(0x98)](_0x38710b[_0xf00dd1(0x9c)]());}export async function isUrlReachable(_0x15359f){try{const _0x189396=await fetch(_0x15359f,{'method':'HEAD'});return _0x189396['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x2cf7ca=a64_0x3bfd;(function(_0x35f2f8,_0xc88d15){const _0x40b15f=a64_0x3bfd,_0x3061d9=_0x35f2f8();while(!![]){try{const _0x349102=-parseInt(_0x40b15f(0x78))/0x1*(-parseInt(_0x40b15f(0x72))/0x2)+-parseInt(_0x40b15f(0x6d))/0x3+-parseInt(_0x40b15f(0x6e))/0x4*(parseInt(_0x40b15f(0x76))/0x5)+-parseInt(_0x40b15f(0x8f))/0x6*(-parseInt(_0x40b15f(0xa6))/0x7)+-parseInt(_0x40b15f(0x73))/0x8*(-parseInt(_0x40b15f(0x83))/0x9)+-parseInt(_0x40b15f(0x7f))/0xa+parseInt(_0x40b15f(0x82))/0xb*(-parseInt(_0x40b15f(0x6c))/0xc);if(_0x349102===_0xc88d15)break;else _0x3061d9['push'](_0x3061d9['shift']());}catch(_0x225a81){_0x3061d9['push'](_0x3061d9['shift']());}}}(a64_0x4e5e,0x81b79));import a64_0x1361c3 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';import{CliErrors}from'../../errors.js';function a64_0x3bfd(_0x595ca4,_0x1e61ad){_0x595ca4=_0x595ca4-0x6a;const _0x4e5e0a=a64_0x4e5e();let _0x3bfdbc=_0x4e5e0a[_0x595ca4];return _0x3bfdbc;}import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';function a64_0x4e5e(){const _0x100bf9=['21SkqOvX','Created\x20','trim','failed','\x20\x20Cancelled.','\x20and\x20CSS:\x20','355944zcAHHH','2490948urFkZs','1148268lGlEzH','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','onlineMenuList','flag','160306fQItMr','832AgjRsd','cssUrl','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','5nXqQym','cookie','12IUApUg','object','map','pages','write','yes','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','4370360KSuMoP','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','size','99nDkwHA','61326yLsqql','onlinePaths','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','Online\x20menu\x20list\x20fetched','created','isArray','Sync\x20local\x20pages\x20as\x20platform\x20menus','log','length','Creating\x20','gray','jsUrl','1364412kkYwaQ','yellow','Fetching\x20online\x20menu\x20list...','menu','string','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','\x20menu(s)\x20with\x20JS:\x20','sync','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20failed.','\x20page(s)','localPages','boolean','Menu\x20creation\x20failed','params','message','\x20menu(s)','skipped','validation','Menu\x20sync\x20completed:\x20','appCode','✓\x20Menu\x20sync\x20completed:\x20','\x20menu(s)...'];a64_0x4e5e=function(){return _0x100bf9;};return a64_0x4e5e();}import{getLocalPages}from'../../commands/menu/shared/local-pages.js';export const menuSync={'service':a64_0x2cf7ca(0x92),'command':a64_0x2cf7ca(0x96),'description':a64_0x2cf7ca(0x89),'risk':a64_0x2cf7ca(0x7c),'flags':[{'name':a64_0x2cf7ca(0x9d),'type':a64_0x2cf7ca(0x93),'description':a64_0x2cf7ca(0x94)+a64_0x2cf7ca(0x6f)},{'name':a64_0x2cf7ca(0x7d),'type':a64_0x2cf7ca(0x9b),'description':a64_0x2cf7ca(0x85)}],async 'execute'(_0x511d60){const _0x1f6d4f=a64_0x2cf7ca,_0x5e4357=_0x511d60[_0x1f6d4f(0x71)](_0x1f6d4f(0x7d)),_0x34bd64=_0x511d60['str']('params'),_0x4a0191=parseParams(_0x34bd64),_0x199d11=!!(_0x4a0191[_0x1f6d4f(0x8e)]||_0x4a0191['cssUrl']||_0x4a0191[_0x1f6d4f(0x7b)]&&_0x4a0191[_0x1f6d4f(0x7b)][_0x1f6d4f(0x8b)]>0x0);if(_0x5e4357||_0x199d11){let _0x4cfe3f=[];!isInteractive()&&!_0x4a0191[_0x1f6d4f(0x7b)]?.[_0x1f6d4f(0x8b)]&&(_0x4cfe3f=await readPageLabelsFromStdin());const _0x15806d=await runMenuSyncCore(_0x511d60[_0x1f6d4f(0xa3)],_0x511d60[_0x1f6d4f(0x77)],_0x4cfe3f['length']>0x0?_0x4cfe3f:_0x4a0191[_0x1f6d4f(0x7b)]??[],_0x34bd64);if(_0x15806d[_0x1f6d4f(0xa0)]){const _0x3344b4=getLocalPages();_0x3344b4['length']===0x0?console[_0x1f6d4f(0x8a)](_0x1f6d4f(0x75)):console[_0x1f6d4f(0x8a)](_0x1f6d4f(0x80));}else console['log'](_0x1f6d4f(0xa4)+_0x15806d[_0x1f6d4f(0x87)]+'\x20menu(s)\x20created');return{'ok':!![]};}requireInteractive();const _0x20359d=startSpinner(_0x1f6d4f(0x91));let _0x44f757,_0x46bcfe,_0x437bc4;try{const _0x302d0b=await fetchMenuData(_0x511d60['appCode'],_0x511d60[_0x1f6d4f(0x77)]);_0x44f757=_0x302d0b[_0x1f6d4f(0x9a)],_0x46bcfe=_0x302d0b[_0x1f6d4f(0x84)],_0x437bc4=_0x302d0b[_0x1f6d4f(0x70)],stopSpinner(_0x20359d,_0x1f6d4f(0x86),!![]);}catch(_0x25835c){stopSpinner(_0x20359d,_0x1f6d4f(0x97),![]);throw CliErrors[_0x1f6d4f(0xa1)](_0x25835c instanceof Error?_0x25835c[_0x1f6d4f(0x9e)]:_0x1f6d4f(0x97));}if(_0x44f757['length']===0x0)return console[_0x1f6d4f(0x8a)](a64_0x1361c3[_0x1f6d4f(0x90)](_0x1f6d4f(0x7e))),{'ok':!![]};const _0x3016be=buildCompareRows(_0x44f757,_0x46bcfe);console['log'](renderCompareTable(_0x3016be)),console[_0x1f6d4f(0x8a)]();const _0x8c4735=_0x4a0191[_0x1f6d4f(0x7b)],_0x73c27f=await selectPages(_0x44f757,_0x46bcfe,_0x8c4735);console[_0x1f6d4f(0x8a)](),console[_0x1f6d4f(0x8a)](a64_0x1361c3['cyan']('\x20\x20✓\x20Selected:\x20'+_0x73c27f[_0x1f6d4f(0x8b)]+_0x1f6d4f(0x99)));const _0x18d4a5=_0x4a0191['jsUrl']&&_0x4a0191['cssUrl'];if(!_0x18d4a5){console[_0x1f6d4f(0x8a)](renderSyncSummary(_0x73c27f,_0x46bcfe[_0x1f6d4f(0x81)]>0x0));const _0x501076=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x501076)return console[_0x1f6d4f(0x8a)](a64_0x1361c3['gray']('\x20\x20Cancelled.')),{'ok':!![]};}let _0x2099b3=_0x4a0191[_0x1f6d4f(0x8e)],_0x504fb5=_0x4a0191[_0x1f6d4f(0x74)];!_0x2099b3&&(_0x2099b3=await askJsUrl());!_0x504fb5&&(_0x504fb5=await askCssUrl());const _0x23af25=await askConfirm('\x20\x20Create\x20'+_0x73c27f['length']+_0x1f6d4f(0x95)+_0x2099b3+_0x1f6d4f(0x6b)+_0x504fb5+'?');if(!_0x23af25)return console[_0x1f6d4f(0x8a)](a64_0x1361c3[_0x1f6d4f(0x8d)](_0x1f6d4f(0x6a))),{'ok':!![]};const _0x47010b=[_0x2099b3,_0x504fb5],_0x312e68=startSpinner(_0x1f6d4f(0x8c)+_0x73c27f[_0x1f6d4f(0x8b)]+_0x1f6d4f(0xa5));try{const _0x284912=await doCreateMenus(_0x511d60[_0x1f6d4f(0xa3)],_0x511d60[_0x1f6d4f(0x77)],_0x73c27f,_0x47010b);return stopSpinner(_0x312e68,_0x1f6d4f(0xa7)+_0x284912[_0x1f6d4f(0x87)]+_0x1f6d4f(0x9f),!![]),{'ok':!![],'data':_0x284912,'message':_0x1f6d4f(0xa2)+_0x284912[_0x1f6d4f(0x87)]+'\x20created,\x20'+_0x284912[_0x1f6d4f(0xa9)]+_0x1f6d4f(0x98)};}catch(_0x1ea9da){stopSpinner(_0x312e68,_0x1f6d4f(0x9c),![]);throw CliErrors[_0x1f6d4f(0xa1)](_0x1ea9da instanceof Error?_0x1ea9da[_0x1f6d4f(0x9e)]:_0x1f6d4f(0x9c));}}};function parseParams(_0x5d117d){const _0x341169=a64_0x2cf7ca;if(!_0x5d117d)return{};try{const _0x7e425a=JSON['parse'](_0x5d117d);if(typeof _0x7e425a!==_0x341169(0x79)||_0x7e425a===null||Array['isArray'](_0x7e425a))return{};return{'jsUrl':typeof _0x7e425a['jsUrl']===_0x341169(0x93)?_0x7e425a[_0x341169(0x8e)][_0x341169(0xa8)]():undefined,'cssUrl':typeof _0x7e425a[_0x341169(0x74)]===_0x341169(0x93)?_0x7e425a[_0x341169(0x74)]['trim']():undefined,'pages':Array[_0x341169(0x88)](_0x7e425a['pages'])?_0x7e425a[_0x341169(0x7b)][_0x341169(0x7a)](String):undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a65_0x21d1(){const _0x3fac02=['failed','108KTBCQO','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','yes','3970kaoLld','528082KupGPm','jsUrl','message','length','write','\x20menu(s)\x20with\x20JS:\x20','gray','6eYOlFN','updated','str','string','menu','cookie','validation','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation','Failed\x20to\x20fetch\x20online\x20menu\x20list','Menu\x20update\x20completed:\x20','label','log','update','Menu\x20update\x20failed','isArray','skipped','params','boolean','22048sXjRBk','386080tWaIzl','16181OcGqGW','\x20\x20Update\x20','2256737OfxsXF','\x20menu(s)...','\x20menu(s)\x20updated','574908TBSpPw','\x20\x20Found\x20','\x20failed.','object','cyan','cssUrl','96505oIPohL','parse','\x20updated.','appCode','Updated\x20','Online\x20menu\x20list\x20fetched','174LgHWNV','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','\x20updated,\x20','trim','\x20menu(s)\x20failed','Fetching\x20online\x20menu\x20list...'];a65_0x21d1=function(){return _0x3fac02;};return a65_0x21d1();}const a65_0x382cdd=a65_0x33d6;(function(_0x43c816,_0x57205a){const _0x5998eb=a65_0x33d6,_0x57a1fb=_0x43c816();while(!![]){try{const _0xc98618=parseInt(_0x5998eb(0x1ed))/0x1+parseInt(_0x5998eb(0x204))/0x2*(-parseInt(_0x5998eb(0x20b))/0x3)+parseInt(_0x5998eb(0x21f))/0x4+-parseInt(_0x5998eb(0x1f3))/0x5*(-parseInt(_0x5998eb(0x1f9))/0x6)+parseInt(_0x5998eb(0x222))/0x7+parseInt(_0x5998eb(0x21e))/0x8*(-parseInt(_0x5998eb(0x200))/0x9)+parseInt(_0x5998eb(0x203))/0xa*(-parseInt(_0x5998eb(0x220))/0xb);if(_0xc98618===_0x57205a)break;else _0x57a1fb['push'](_0x57a1fb['shift']());}catch(_0xce1803){_0x57a1fb['push'](_0x57a1fb['shift']());}}}(a65_0x21d1,0x63b57));import a65_0x113c8f 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_0x382cdd(0x20f),'command':a65_0x382cdd(0x218),'description':a65_0x382cdd(0x212),'risk':a65_0x382cdd(0x208),'flags':[{'name':a65_0x382cdd(0x21c),'type':a65_0x382cdd(0x20e),'description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a65_0x382cdd(0x202),'type':a65_0x382cdd(0x21d),'description':a65_0x382cdd(0x213)}],async 'execute'(_0x4fe47c){const _0x450afd=a65_0x382cdd,_0x11c577=_0x4fe47c['flag'](_0x450afd(0x202)),_0x5a2b10=_0x4fe47c[_0x450afd(0x20d)]('params'),_0xd78497=parseParams(_0x5a2b10),_0x2adec4=!!(_0xd78497[_0x450afd(0x205)]||_0xd78497['cssUrl']);if(_0x11c577||_0x2adec4&&!isInteractive()){const _0x30a573=await runMenuUpdateCore(_0x4fe47c[_0x450afd(0x1f6)],_0x4fe47c[_0x450afd(0x210)],_0x5a2b10);return _0x30a573[_0x450afd(0x21b)]?console[_0x450afd(0x217)](_0x450afd(0x1fa)):(console[_0x450afd(0x217)]('✓\x20Menu\x20update\x20completed:\x20'+_0x30a573['updated']+_0x450afd(0x1ec)),_0x30a573[_0x450afd(0x1ff)]>0x0&&console['error']('!\x20'+_0x30a573[_0x450afd(0x1ff)]+_0x450afd(0x1fd))),{'ok':_0x30a573[_0x450afd(0x1ff)]===0x0};}requireInteractive();const _0x4eb7f5=startSpinner(_0x450afd(0x1fe));let _0x2710ba;try{_0x2710ba=await fetchOnlineMenuList(_0x4fe47c[_0x450afd(0x1f6)],_0x4fe47c['cookie']),stopSpinner(_0x4eb7f5,_0x450afd(0x1f8),!![]);}catch(_0x5d1524){stopSpinner(_0x4eb7f5,_0x450afd(0x214),![]);throw CliErrors[_0x450afd(0x211)](_0x5d1524 instanceof Error?_0x5d1524['message']:_0x450afd(0x214));}const _0x257fab=filterMenusWithResources(_0x2710ba);if(_0x257fab[_0x450afd(0x207)]===0x0)return console[_0x450afd(0x217)](a65_0x113c8f['yellow'](_0x450afd(0x201))),{'ok':!![]};console['log'](),console[_0x450afd(0x217)](a65_0x113c8f[_0x450afd(0x1f1)](_0x450afd(0x1ee)+_0x257fab['length']+'\x20menu(s)\x20with\x20existing\x20resources')),console[_0x450afd(0x217)](renderUpdateSummary(_0x257fab['map'](_0x368d61=>_0x368d61[_0x450afd(0x216)]),[_0xd78497['jsUrl'],_0xd78497['cssUrl']])),console[_0x450afd(0x217)]();let _0x385cbe=_0xd78497[_0x450afd(0x205)],_0xce98d5=_0xd78497[_0x450afd(0x1f2)];!_0x385cbe&&(_0x385cbe=await askJsUrl());!_0xce98d5&&(_0xce98d5=await askCssUrl());const _0x3c5a6a=await askConfirm(_0x450afd(0x221)+_0x257fab[_0x450afd(0x207)]+_0x450afd(0x209)+_0x385cbe+'\x20and\x20CSS:\x20'+_0xce98d5+'?');if(!_0x3c5a6a)return console[_0x450afd(0x217)](a65_0x113c8f[_0x450afd(0x20a)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x16fe56=[_0x385cbe,_0xce98d5],_0x4770fe=startSpinner('Updating\x20'+_0x257fab[_0x450afd(0x207)]+_0x450afd(0x1eb));try{const _0x54988b=await doUpdateCdnUrls(_0x4fe47c[_0x450afd(0x1f6)],_0x4fe47c[_0x450afd(0x210)],_0x257fab,_0x16fe56);return stopSpinner(_0x4770fe,_0x450afd(0x1f7)+_0x54988b['updated']+'\x20menu(s)',_0x54988b[_0x450afd(0x1ff)]===0x0),{'ok':_0x54988b['failed']===0x0,'data':_0x54988b,'message':_0x54988b[_0x450afd(0x1ff)]>0x0?_0x450afd(0x215)+_0x54988b['updated']+_0x450afd(0x1fb)+_0x54988b['failed']+_0x450afd(0x1ef):_0x450afd(0x215)+_0x54988b[_0x450afd(0x20c)]+_0x450afd(0x1f5)};}catch(_0x34c220){stopSpinner(_0x4770fe,'Menu\x20update\x20failed',![]);throw CliErrors[_0x450afd(0x211)](_0x34c220 instanceof Error?_0x34c220[_0x450afd(0x206)]:_0x450afd(0x219));}}};function a65_0x33d6(_0x358156,_0xb036ef){_0x358156=_0x358156-0x1eb;const _0x21d1e3=a65_0x21d1();let _0x33d67d=_0x21d1e3[_0x358156];return _0x33d67d;}function parseParams(_0x14e925){const _0x45b07c=a65_0x382cdd;if(!_0x14e925)return{};try{const _0x254c1c=JSON[_0x45b07c(0x1f4)](_0x14e925);if(typeof _0x254c1c!==_0x45b07c(0x1f0)||_0x254c1c===null||Array[_0x45b07c(0x21a)](_0x254c1c))return{};return{'jsUrl':typeof _0x254c1c[_0x45b07c(0x205)]===_0x45b07c(0x20e)?_0x254c1c['jsUrl']['trim']():undefined,'cssUrl':typeof _0x254c1c[_0x45b07c(0x1f2)]===_0x45b07c(0x20e)?_0x254c1c[_0x45b07c(0x1f2)][_0x45b07c(0x1fc)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1386f2,_0x290f2e){const _0x40606e=a66_0x17bf,_0x236213=_0x1386f2();while(!![]){try{const _0x24d013=-parseInt(_0x40606e(0x197))/0x1*(-parseInt(_0x40606e(0x18f))/0x2)+-parseInt(_0x40606e(0x1a3))/0x3+-parseInt(_0x40606e(0x1a6))/0x4+-parseInt(_0x40606e(0x1a8))/0x5+-parseInt(_0x40606e(0x191))/0x6+parseInt(_0x40606e(0x190))/0x7+-parseInt(_0x40606e(0x1aa))/0x8*(-parseInt(_0x40606e(0x1a5))/0x9);if(_0x24d013===_0x290f2e)break;else _0x236213['push'](_0x236213['shift']());}catch(_0x248951){_0x236213['push'](_0x236213['shift']());}}}(a66_0x4381,0x89554));import{existsSync}from'node:fs';import a66_0x3b9b9a from'node:path';import a66_0x9ca3b5 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_0x17bf(_0x2d9129,_0x4fc664){_0x2d9129=_0x2d9129-0x18f;const _0x438109=a66_0x4381();let _0x17bf57=_0x438109[_0x2d9129];return _0x17bf57;}import{readConfig}from'../../../utils/config.js';function a66_0x4381(){const _0x32693c=['\x22\x20already\x20exists','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','env','Login\x20failed','Project\x20name\x20cannot\x20exceed\x2050\x20characters','string','1219212ehzkgl','√\x20Login\x20status:\x20','68535tTyEcb','3326908xHXApq','cyan','3632280jVsvJE','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','2272dfVexN','52584noxpVD','4471845YppoKZ','5905656JvNExY','green','Not\x20set','log','my-app','Project\x20name:','27oopvYX','length','√\x20Project\x20Name:\x20','production','cwd','Logged\x20in'];a66_0x4381=function(){return _0x32693c;};return a66_0x4381();}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0xd06d9b,_0x194d1d,_0x3993b5){const _0x558b0f=a66_0x17bf,_0x7c8915=_0x558b0f(0x195),_0x258b13=readConfig(),_0x4aebc5=typeof _0x258b13[_0x558b0f(0x19f)]===_0x558b0f(0x1a2)?_0x258b13[_0x558b0f(0x19f)]:undefined,_0xc34d68=await input({'message':_0x558b0f(0x196),'default':_0x7c8915,'validate':_0x440f1d=>{const _0x2a728e=_0x558b0f,_0x1421f1=_0x440f1d['trim']()||_0x7c8915;if(_0x1421f1[_0x2a728e(0x198)]>0x32)return _0x2a728e(0x1a1);const _0xbf900b=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x1421f1&&!_0xbf900b['test'](_0x1421f1))return _0x2a728e(0x1a9);const _0x3e4092=a66_0x3b9b9a['resolve'](process[_0x2a728e(0x19b)](),_0x1421f1);if(existsSync(_0x3e4092))return'Directory\x20\x22'+_0x1421f1+_0x2a728e(0x19d);return!![];}});console['log'](a66_0x9ca3b5[_0x558b0f(0x192)](_0x558b0f(0x199)+a66_0x9ca3b5['cyan'](_0xc34d68)));const _0x4802a9=await selectSingleAppcode(_0x3993b5);console[_0x558b0f(0x194)](a66_0x9ca3b5[_0x558b0f(0x192)]('√\x20App\x20Code:\x20'+a66_0x9ca3b5[_0x558b0f(0x1a7)](_0x4802a9||_0x558b0f(0x193))));if(_0x4802a9){const _0x261336=await getIsSessionValid();if(!_0x261336){const _0x622bf5=await confirm({'message':_0x558b0f(0x19e),'default':!![]});if(_0x622bf5){const _0x2c9680=await authServer({'silent':!![]});console['log'](a66_0x9ca3b5[_0x558b0f(0x192)](_0x558b0f(0x1a4)+a66_0x9ca3b5[_0x558b0f(0x1a7)](_0x2c9680?_0x558b0f(0x19c):_0x558b0f(0x1a0))));}else console[_0x558b0f(0x194)](a66_0x9ca3b5[_0x558b0f(0x192)]('√\x20Login\x20status:\x20'+a66_0x9ca3b5[_0x558b0f(0x1a7)]('Skipped')));}await _0xd06d9b({'projectName':_0xc34d68,'appCode':_0x4802a9,'env':_0x194d1d||_0x4aebc5||_0x558b0f(0x19a)});}else await _0xd06d9b({'projectName':_0xc34d68,'env':_0x194d1d||_0x4aebc5||_0x558b0f(0x19a)});}
|