@lovrabet/rabetbase-cli 2.1.12 → 2.1.14-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.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/dataset/rename.js +1 -0
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/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/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x4b92bb=a82_0x28ea;(function(_0x255029,_0x5e76ef){const _0x2678b5=a82_0x28ea,_0x17062c=_0x255029();while(!![]){try{const _0x5409e7=parseInt(_0x2678b5(0x13d))/0x1*(-parseInt(_0x2678b5(0x13c))/0x2)+parseInt(_0x2678b5(0x156))/0x3+parseInt(_0x2678b5(0x155))/0x4*(parseInt(_0x2678b5(0x144))/0x5)+parseInt(_0x2678b5(0x149))/0x6+parseInt(_0x2678b5(0x14e))/0x7+-parseInt(_0x2678b5(0x142))/0x8+parseInt(_0x2678b5(0x148))/0x9;if(_0x5409e7===_0x5e76ef)break;else _0x17062c['push'](_0x17062c['shift']());}catch(_0x11ac08){_0x17062c['push'](_0x17062c['shift']());}}}(a82_0x1328,0xc44f1));function a82_0x28ea(_0x24c6d4,_0x5bff64){_0x24c6d4=_0x24c6d4-0x139;const _0x132837=a82_0x1328();let _0x28ea39=_0x132837[_0x24c6d4];return _0x28ea39;}import{logger}from'../../utils/logger.js';function printLogs(_0x50f4b7){const _0x174581=a82_0x28ea;if(_0x50f4b7[_0x174581(0x143)]===0x0){console[_0x174581(0x150)](_0x174581(0x13b));return;}console['log'](_0x174581(0x146)),_0x50f4b7['forEach']((_0x4848ef,_0x23bf86)=>{const _0x4b05dd=_0x174581,_0x53f816=new Date(_0x4848ef[_0x4b05dd(0x147)])['toLocaleString'](_0x4b05dd(0x151)),_0x59cac7=_0x4848ef[_0x4b05dd(0x152)]==='success'?'√':_0x4848ef[_0x4b05dd(0x152)]===_0x4b05dd(0x14a)?'×':_0x4848ef[_0x4b05dd(0x152)]===_0x4b05dd(0x13e)?'!':'i';console[_0x4b05dd(0x150)](_0x23bf86+0x1+'.\x20'+_0x59cac7+'\x20['+_0x4848ef[_0x4b05dd(0x145)]+']\x20'+_0x4848ef['message']),console[_0x4b05dd(0x150)](_0x4b05dd(0x139)+_0x53f816),_0x4848ef['duration']&&console[_0x4b05dd(0x150)](_0x4b05dd(0x13a)+_0x4848ef[_0x4b05dd(0x14b)]+'ms'),_0x4848ef[_0x4b05dd(0x14c)]&&Object['keys'](_0x4848ef[_0x4b05dd(0x14c)])['length']>0x0&&console['log']('\x20\x20\x20Details:\x20'+JSON[_0x4b05dd(0x14d)](_0x4848ef[_0x4b05dd(0x14c)],null,0x2)),console[_0x4b05dd(0x150)]('');});}export const logsDefinitions=[{'service':a82_0x4b92bb(0x140),'command':'show','description':'View\x20command\x20history\x20logs','risk':a82_0x4b92bb(0x154),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x385e65){const _0x80df1d=a82_0x4b92bb;return printLogs(logger[_0x80df1d(0x141)]()),{'ok':!![]};}},{'service':a82_0x4b92bb(0x140),'command':'clear','description':a82_0x4b92bb(0x13f),'risk':a82_0x4b92bb(0x153),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3eb468){const _0x299fb3=a82_0x4b92bb;return logger[_0x299fb3(0x14f)](),console[_0x299fb3(0x150)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];function a82_0x1328(){const _0x18da9f=['\x20\x20\x20Time:\x20','\x20\x20\x20Duration:\x20','*\x20No\x20logs\x20found','42nQsKTC','62857PTQCWW','warn','Clear\x20command\x20history\x20logs','logs','readLogs','11116352hEmhFd','length','31665aqkDMy','command','*\x20Lovrabet\x20CLI\x20logs:\x0a','timestamp','11897847zjhiEu','3206994LNQPKB','error','duration','details','stringify','6016066EihJof','clearLogs','log','en-US','level','write','read','24pqVSDi','2279112BnZzfw'];a82_0x1328=function(){return _0x18da9f;};return a82_0x1328();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c16f1,_0x5f19fa){const _0x35dc9e=a83_0x40d5,_0x2f59d8=_0x4c16f1();while(!![]){try{const _0x3f681a=parseInt(_0x35dc9e(0x97))/0x1+parseInt(_0x35dc9e(0x93))/0x2*(-parseInt(_0x35dc9e(0x95))/0x3)+parseInt(_0x35dc9e(0x9c))/0x4*(-parseInt(_0x35dc9e(0x9b))/0x5)+-parseInt(_0x35dc9e(0x9a))/0x6+-parseInt(_0x35dc9e(0x96))/0x7*(parseInt(_0x35dc9e(0x98))/0x8)+parseInt(_0x35dc9e(0x99))/0x9*(parseInt(_0x35dc9e(0x94))/0xa)+parseInt(_0x35dc9e(0x92))/0xb;if(_0x3f681a===_0x5f19fa)break;else _0x2f59d8['push'](_0x2f59d8['shift']());}catch(_0x13dbec){_0x2f59d8['push'](_0x2f59d8['shift']());}}}(a83_0x2d72,0x96b5b));import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';function a83_0x40d5(_0x441a36,_0x2cfe7a){_0x441a36=_0x441a36-0x92;const _0x2d728c=a83_0x2d72();let _0x40d5a7=_0x2d728c[_0x441a36];return _0x40d5a7;}function a83_0x2d72(){const _0x8e2c03=['854193tywfzQ','734192eywnJb','144UsDXfR','6210738evOOmN','205OJujdh','106676WBfAHl','29169591gVXuFi','26XmguBL','3950XMuTdE','155691grkVpf','7DiTPfW'];a83_0x2d72=function(){return _0x8e2c03;};return a83_0x2d72();}export const menuDefinitions=[menuSync,menuUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a84_0x2d2a(){const _0x4c74a2=['4240GUUAGL','showOnline','\x20\x20No\x20pages\x20to\x20sync.','join','push','online','label','13031208jeYKJW','map','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','\x20\x20\x20\x20CSS:\x20','length','20MFlAGv','2580626rUQnIJ','\x20\x20\x20\x20JS:\x20\x20','7167255kHnIZw','repeat','541263CJIAXZ','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','\x20\x20Affected\x20menus:\x20','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','1SEHUBG','\x20\x20\x20\x20•\x20','Platform','max','(unchanged)','165177dTlNEB','6832722ODYaHj','3320695UltpAM'];a84_0x2d2a=function(){return _0x4c74a2;};return a84_0x2d2a();}function a84_0x540e(_0x3e2daa,_0x4018f9){_0x3e2daa=_0x3e2daa-0x78;const _0x2d2a73=a84_0x2d2a();let _0x540e90=_0x2d2a73[_0x3e2daa];return _0x540e90;}(function(_0x522fbe,_0x1d678b){const _0x3e5af2=a84_0x540e,_0x59ec87=_0x522fbe();while(!![]){try{const _0x17c640=-parseInt(_0x3e5af2(0x79))/0x1*(parseInt(_0x3e5af2(0x8e))/0x2)+-parseInt(_0x3e5af2(0x92))/0x3*(parseInt(_0x3e5af2(0x8d))/0x4)+-parseInt(_0x3e5af2(0x90))/0x5+-parseInt(_0x3e5af2(0x7f))/0x6+-parseInt(_0x3e5af2(0x80))/0x7+-parseInt(_0x3e5af2(0x88))/0x8+-parseInt(_0x3e5af2(0x7e))/0x9*(-parseInt(_0x3e5af2(0x81))/0xa);if(_0x17c640===_0x1d678b)break;else _0x59ec87['push'](_0x59ec87['shift']());}catch(_0x3e5068){_0x59ec87['push'](_0x59ec87['shift']());}}}(a84_0x2d2a,0xdf142));function strWidth(_0x3359ca){let _0x58032c=0x0;for(const _0x26ba4f of _0x3359ca){_0x58032c+=/[\u4e00-\u9fa5]/['test'](_0x26ba4f)?0x2:0x1;}return _0x58032c;}function padRight(_0x111fb9,_0x357a7a){const _0x1a0ebb=a84_0x540e,_0x5a78bd=strWidth(_0x111fb9);return _0x111fb9+'\x20'[_0x1a0ebb(0x91)](Math[_0x1a0ebb(0x7c)](0x0,_0x357a7a-_0x5a78bd));}export function renderCompareTable(_0x3cb011,_0x5eaefb={}){const _0x7ecf94=a84_0x540e;if(_0x3cb011[_0x7ecf94(0x8c)]===0x0)return'';const _0x1d6641=_0x5eaefb[_0x7ecf94(0x82)]??!![],_0x3f8ea8=Math[_0x7ecf94(0x7c)](0x1e,..._0x3cb011[_0x7ecf94(0x89)](_0x4da598=>strWidth(_0x4da598['label']))),_0x3cb24e=0x4,_0x284588=[],_0xdd71d4='\x20\x20'+padRight('Menu\x20Name',_0x3f8ea8),_0x375f60=padRight('Local',_0x3cb24e),_0x827115=_0x1d6641?'\x20\x20'+padRight(_0x7ecf94(0x7b),_0x3cb24e):'';_0x284588[_0x7ecf94(0x85)](_0xdd71d4+'\x20\x20'+_0x375f60+(_0x1d6641?_0x827115:'')),_0x284588[_0x7ecf94(0x85)]('\x20\x20'+'─'[_0x7ecf94(0x91)](_0x3f8ea8)+'\x20\x20'+'─'['repeat'](_0x3cb24e)+(_0x1d6641?'\x20\x20'+'─'[_0x7ecf94(0x91)](_0x3cb24e):''));for(const _0x3a109e of _0x3cb011){const _0x2e6fde=padRight(_0x3a109e[_0x7ecf94(0x87)],_0x3f8ea8),_0x1d25c0=_0x3a109e['local']?'✓':'✗',_0x14b181=padRight(_0x1d25c0,_0x3cb24e);let _0x2e36ee='\x20\x20'+_0x2e6fde+'\x20\x20'+_0x14b181;if(_0x1d6641){const _0x5a1098=_0x3a109e[_0x7ecf94(0x86)]?'✓':'✗';_0x2e36ee+='\x20\x20'+padRight(_0x5a1098,_0x3cb24e);}_0x284588[_0x7ecf94(0x85)](_0x2e36ee);}return _0x284588[_0x7ecf94(0x84)]('\x0a');}export function renderSyncSummary(_0x12e4cc,_0x186b00){const _0x2e993d=a84_0x540e;if(_0x12e4cc[_0x2e993d(0x8c)]===0x0)return _0x186b00?_0x2e993d(0x8a):_0x2e993d(0x83);const _0x27ff5e=['\x20\x20'+_0x12e4cc[_0x2e993d(0x8c)]+_0x2e993d(0x93)];for(const _0x37e6c8 of _0x12e4cc){_0x27ff5e['push'](_0x2e993d(0x7a)+_0x37e6c8[_0x2e993d(0x87)]+'\x20('+_0x37e6c8['path']+')');}return _0x27ff5e[_0x2e993d(0x84)]('\x0a');}export function renderUpdateSummary(_0x244886,_0x49ef5b){const _0x547cc1=a84_0x540e;if(_0x244886[_0x547cc1(0x8c)]===0x0)return'\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.';const _0x46c2bb=['\x20\x20'+_0x244886[_0x547cc1(0x8c)]+_0x547cc1(0x78),_0x547cc1(0x8f)+(_0x49ef5b[0x0]??'(unchanged)'),_0x547cc1(0x8b)+(_0x49ef5b[0x1]??_0x547cc1(0x7d)),'',_0x547cc1(0x94)+_0x244886[_0x547cc1(0x84)](',\x20')];return _0x46c2bb[_0x547cc1(0x84)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x42d7a2,_0x289ced){var _0x257e7f=a85_0x35e0,_0x3f8c37=_0x42d7a2();while(!![]){try{var _0x763e2e=-parseInt(_0x257e7f(0x168))/0x1*(parseInt(_0x257e7f(0x160))/0x2)+-parseInt(_0x257e7f(0x162))/0x3*(-parseInt(_0x257e7f(0x16a))/0x4)+parseInt(_0x257e7f(0x167))/0x5*(parseInt(_0x257e7f(0x169))/0x6)+parseInt(_0x257e7f(0x166))/0x7+parseInt(_0x257e7f(0x164))/0x8*(parseInt(_0x257e7f(0x161))/0x9)+parseInt(_0x257e7f(0x163))/0xa+parseInt(_0x257e7f(0x15f))/0xb*(-parseInt(_0x257e7f(0x165))/0xc);if(_0x763e2e===_0x289ced)break;else _0x3f8c37['push'](_0x3f8c37['shift']());}catch(_0x7dfa41){_0x3f8c37['push'](_0x3f8c37['shift']());}}}(a85_0x30da,0xd75b3));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';function a85_0x30da(){var _0xa33865=['30110gFkUVF','9221BUOOsB','522hDjBlA','148UlPbat','39618106RHhHPO','14NyHnoS','9ZrxQMt','58977OuKpRx','7862620IoXIcw','12061592qGUTKX','12sqHwIu','7021238rRGPFa'];a85_0x30da=function(){return _0xa33865;};return a85_0x30da();}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';function a85_0x35e0(_0x309aa0,_0x4a179a){_0x309aa0=_0x309aa0-0x15f;var _0x30dafa=a85_0x30da();var _0x35e074=_0x30dafa[_0x309aa0];return _0x35e074;}export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x569f88,_0x5d794c){const _0xb85128=a86_0x1fb7,_0x3a4783=_0x569f88();while(!![]){try{const _0x4b255f=-parseInt(_0xb85128(0x1e9))/0x1+parseInt(_0xb85128(0x1f3))/0x2+-parseInt(_0xb85128(0x1e8))/0x3+-parseInt(_0xb85128(0x1d6))/0x4+-parseInt(_0xb85128(0x1ee))/0x5*(-parseInt(_0xb85128(0x1fc))/0x6)+-parseInt(_0xb85128(0x1d7))/0x7+parseInt(_0xb85128(0x1f1))/0x8;if(_0x4b255f===_0x5d794c)break;else _0x3a4783['push'](_0x3a4783['shift']());}catch(_0x3711a0){_0x3a4783['push'](_0x3a4783['shift']());}}}(a86_0x2136,0x22bdb));import a86_0x4ec0a8 from'chalk';function a86_0x2136(){const _0x16ffce=['fail','has','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','No\x20menus\x20selected.','JS\x20URL\x20checked','696900MteNtr','10050gUALxl','cancelled','cyan','label','test','3915hmDWEO','[already\x20on\x20platform]','\x20\x20Checking\x20CSS\x20URL\x20reachability...','1269592OfFlud','\x20\x20CSS\x20URL:','249976pgbkpn','includes','CSS\x20URL\x20check\x20failed','\x20\x20Checking\x20JS\x20URL\x20reachability...','JS\x20URL\x20check\x20failed','CSS\x20URL\x20checked','ExitPromptError','map','gray','1506JfZxpG','stdin','isTTY','trim','name','path','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','330196xNGNHj','91154NrRiMj','length','Cancelled.','start','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','error','\x20\x20JS\x20URL:','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','No\x20local\x20pages\x20found.','red','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'];a86_0x2136=function(){return _0x16ffce;};return a86_0x2136();}import{checkbox,input,confirm}from'@inquirer/prompts';import a86_0x1259e3 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x5dee07){return _0x5dee07['catch'](_0x15cbc5=>{const _0x33d8d6=a86_0x1fb7;if(_0x15cbc5?.[_0x33d8d6(0x1d2)]===_0x33d8d6(0x1f9))throw CliErrors[_0x33d8d6(0x1ea)]('Cancelled.');throw _0x15cbc5;});}export function startSpinner(_0x5d567f){const _0x35d7b3=a86_0x1fb7;return a86_0x1259e3({'text':_0x5d567f,'color':_0x35d7b3(0x1eb)})[_0x35d7b3(0x1da)]();}export function stopSpinner(_0x5ed214,_0x1e2949,_0xb0054c){const _0x74f96e=a86_0x1fb7;_0xb0054c?_0x5ed214['succeed'](_0x1e2949):_0x5ed214[_0x74f96e(0x1e3)](_0x1e2949);}export async function askConfirm(_0x2fddc0){return onCancel(confirm({'message':_0x2fddc0,'theme':{'prefix':''}}));}export async function askJsUrl(_0x568d66){const _0x1fc940=a86_0x1fb7;while(!![]){const _0x2707e4=await onCancel(input({'message':_0x1fc940(0x1dd),'default':_0x568d66,'theme':{'prefix':''}}));if(_0x2707e4[_0x1fc940(0x1ff)]()==='')throw CliErrors['cancelled'](_0x1fc940(0x1d9));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x1fc940(0x1ed)](_0x2707e4[_0x1fc940(0x1ff)]())){console['error'](a86_0x4ec0a8['red'](_0x1fc940(0x1d4)));continue;}const _0x3dbb90=startSpinner(_0x1fc940(0x1f6));try{const _0x43941d=await isUrlReachable(_0x2707e4[_0x1fc940(0x1ff)]());stopSpinner(_0x3dbb90,_0x1fc940(0x1e7),_0x43941d);if(!_0x43941d){console['error'](a86_0x4ec0a8[_0x1fc940(0x1e0)](_0x1fc940(0x1d5)));continue;}return _0x2707e4['trim']();}catch(_0x4d053f){stopSpinner(_0x3dbb90,_0x1fc940(0x1f7),![]);throw _0x4d053f;}}}export async function askCssUrl(_0x56be32){const _0x2718e3=a86_0x1fb7;while(!![]){const _0x854779=await onCancel(input({'message':_0x2718e3(0x1f2),'default':_0x56be32,'theme':{'prefix':''}}));if(_0x854779[_0x2718e3(0x1ff)]()==='')throw CliErrors[_0x2718e3(0x1ea)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/[_0x2718e3(0x1ed)](_0x854779['trim']())){console[_0x2718e3(0x1dc)](a86_0x4ec0a8[_0x2718e3(0x1e0)](_0x2718e3(0x1e2)));continue;}const _0x29ab95=startSpinner(_0x2718e3(0x1f0));try{const _0x35fee7=await isUrlReachable(_0x854779[_0x2718e3(0x1ff)]());stopSpinner(_0x29ab95,_0x2718e3(0x1f8),_0x35fee7);if(!_0x35fee7){console['error'](a86_0x4ec0a8[_0x2718e3(0x1e0)](_0x2718e3(0x1db)));continue;}return _0x854779['trim']();}catch(_0x3e7f44){stopSpinner(_0x29ab95,_0x2718e3(0x1f5),![]);throw _0x3e7f44;}}}export async function selectPages(_0x3e26d9,_0x293231,_0x123ae7){const _0x2e80cb=a86_0x1fb7,_0x3d6d70=_0x3e26d9[_0x2e80cb(0x1fa)](_0x38e046=>({'name':_0x38e046[_0x2e80cb(0x1ec)]+'\x20\x20'+(_0x293231[_0x2e80cb(0x1e4)](_0x38e046['path'])?a86_0x4ec0a8[_0x2e80cb(0x1fb)](_0x2e80cb(0x1ef)):a86_0x4ec0a8['green']('[new]')),'value':_0x38e046[_0x2e80cb(0x1ec)],'checked':_0x123ae7?_0x123ae7[_0x2e80cb(0x1f4)](_0x38e046[_0x2e80cb(0x1ec)]):!_0x293231['has'](_0x38e046[_0x2e80cb(0x1d3)])}));if(_0x3d6d70[_0x2e80cb(0x1d8)]===0x0)throw new Error(_0x2e80cb(0x1df));const _0x3f1353=await onCancel(checkbox({'message':_0x2e80cb(0x1de),'choices':_0x3d6d70,'loop':![],'theme':{'prefix':''}}));if(_0x3f1353[_0x2e80cb(0x1d8)]===0x0)throw new Error(_0x2e80cb(0x1e6));return _0x3e26d9['filter'](_0x1be501=>_0x3f1353[_0x2e80cb(0x1f4)](_0x1be501['label']));}function a86_0x1fb7(_0x3c7108,_0x59fc2d){_0x3c7108=_0x3c7108-0x1d2;const _0x213606=a86_0x2136();let _0x1fb78c=_0x213606[_0x3c7108];return _0x1fb78c;}export function isInteractive(){const _0x169f9c=a86_0x1fb7;return process[_0x169f9c(0x1fd)][_0x169f9c(0x1fe)]===!![];}export function requireInteractive(){const _0x6492b2=a86_0x1fb7;if(!isInteractive())throw new Error(_0x6492b2(0x1e5)+_0x6492b2(0x1e1));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0xc97ef7=a87_0x4bd4;(function(_0x24ac4b,_0x3a28a9){const _0x4f3f8e=a87_0x4bd4,_0x54d380=_0x24ac4b();while(!![]){try{const _0x30d6ad=-parseInt(_0x4f3f8e(0x10f))/0x1+parseInt(_0x4f3f8e(0x10c))/0x2*(-parseInt(_0x4f3f8e(0x115))/0x3)+parseInt(_0x4f3f8e(0x111))/0x4+parseInt(_0x4f3f8e(0x10e))/0x5+parseInt(_0x4f3f8e(0x120))/0x6+parseInt(_0x4f3f8e(0x106))/0x7*(parseInt(_0x4f3f8e(0x116))/0x8)+parseInt(_0x4f3f8e(0x11a))/0x9*(-parseInt(_0x4f3f8e(0x118))/0xa);if(_0x30d6ad===_0x3a28a9)break;else _0x54d380['push'](_0x54d380['shift']());}catch(_0x2891ab){_0x54d380['push'](_0x54d380['shift']());}}}(a87_0x27ab,0x46714));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';function a87_0x27ab(){const _0x35cd7f=['.tsx','src/pages','forEach','2wruvtt','match','2827180CclXmI','387609HYCsrR','filter','298052BJfYfb','utf-8','split','join','1523427Qbmhyy','184hHZnMS','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','10bwMItS','replace','1313523RpDkec','path','cwd','endsWith','index.tsx','push','738402riBJLv','172529auiLab','isDirectory','trim'];a87_0x27ab=function(){return _0x35cd7f;};return a87_0x27ab();}const pagesDir=resolve(process[a87_0xc97ef7(0x11c)](),a87_0xc97ef7(0x10a));function a87_0x4bd4(_0x2d8412,_0x507146){_0x2d8412=_0x2d8412-0x106;const _0x27ab10=a87_0x27ab();let _0x4bd4f6=_0x27ab10[_0x2d8412];return _0x4bd4f6;}export function extractTitleFromComment(_0x5a858a){const _0x381d17=a87_0xc97ef7;try{const _0x5f1375=readFileSync(_0x5a858a,_0x381d17(0x112)),_0x11c188=_0x5f1375[_0x381d17(0x10d)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x11c188&&_0x11c188[0x1]){const _0x21d012=_0x11c188[0x1],_0x47e0d3=_0x21d012[_0x381d17(0x10d)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x47e0d3&&_0x47e0d3[0x1])return _0x47e0d3[0x1][_0x381d17(0x108)]();}let _0x3efd24=null;const _0x338b78=_0x5f1375[_0x381d17(0x10d)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x338b78&&_0x338b78[0x1]&&(_0x3efd24=_0x338b78[0x1]);if(!_0x3efd24){const _0x32d3d1=_0x5f1375[_0x381d17(0x10d)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x32d3d1&&_0x32d3d1[0x1]&&(_0x3efd24=_0x32d3d1[0x1]);}if(_0x3efd24){const _0x2a2c61=new RegExp('\x5cb'+_0x3efd24+_0x381d17(0x117)),_0x43bb3e=_0x5f1375[_0x381d17(0x10d)](_0x2a2c61);if(_0x43bb3e&&_0x43bb3e[0x1])return _0x43bb3e[0x1];return _0x3efd24;}return null;}catch(_0x2696ee){return null;}}export function getLocalPages(_0x492df9=pagesDir,_0x39646d=pagesDir){const _0x47e3e4=a87_0xc97ef7;let _0x417e0b=[];const _0x1abb59=readdirSync(_0x492df9);return _0x1abb59[_0x47e3e4(0x10b)](_0x147152=>{const _0x357e02=_0x47e3e4,_0x5cfe29=join(_0x492df9,_0x147152),_0x13bbb1=statSync(_0x5cfe29);if(_0x13bbb1&&_0x13bbb1[_0x357e02(0x107)]())_0x417e0b=_0x417e0b['concat'](getLocalPages(_0x5cfe29,_0x39646d));else{if(_0x147152['endsWith'](_0x357e02(0x109))){let _0x11ea52=relative(_0x39646d,_0x5cfe29);_0x11ea52[_0x357e02(0x11d)](_0x357e02(0x11e))?_0x11ea52=_0x11ea52[_0x357e02(0x119)](/index\.tsx$/,''):_0x11ea52=_0x11ea52[_0x357e02(0x119)](/\.tsx$/,'');_0x11ea52[_0x357e02(0x11d)](sep)&&(_0x11ea52=_0x11ea52['slice'](0x0,-0x1));const _0x8f5d63=_0x11ea52[_0x357e02(0x113)](sep)[_0x357e02(0x114)]('/'),_0x713c1d=extractTitleFromComment(_0x5cfe29),_0x1272c0=_0x713c1d||_0x8f5d63;_0x417e0b[_0x357e02(0x11f)]({'path':_0x8f5d63['replaceAll']('$',':'),'label':_0x1272c0});}}}),_0x417e0b[_0x47e3e4(0x110)](_0x4000ab=>_0x4000ab[_0x47e3e4(0x11b)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5427ac,_0x4e6c80){const _0x305472=a88_0x5459,_0x5a341a=_0x5427ac();while(!![]){try{const _0x4ea6fe=-parseInt(_0x305472(0x10b))/0x1*(parseInt(_0x305472(0x11a))/0x2)+parseInt(_0x305472(0x117))/0x3+-parseInt(_0x305472(0x11e))/0x4+-parseInt(_0x305472(0x10a))/0x5+parseInt(_0x305472(0x10e))/0x6+-parseInt(_0x305472(0x10c))/0x7+parseInt(_0x305472(0x109))/0x8;if(_0x4ea6fe===_0x4e6c80)break;else _0x5a341a['push'](_0x5a341a['shift']());}catch(_0x24c15c){_0x5a341a['push'](_0x5a341a['shift']());}}}(a88_0x2581,0xd2cca));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';function a88_0x5459(_0x44e7cd,_0x5eb7d2){_0x44e7cd=_0x44e7cd-0x103;const _0x2581b4=a88_0x2581();let _0x5459ad=_0x2581b4[_0x44e7cd];return _0x5459ad;}export function validateJsUrl(_0x2e6fbf){const _0xc36312=a88_0x5459,_0xa68fd3=[];return!isValidJsHttpsUrl(_0x2e6fbf)&&_0xa68fd3[_0xc36312(0x103)]('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0xa68fd3[_0xc36312(0x118)]===0x0,'errors':_0xa68fd3};}export function validateCssUrl(_0x16e1fb){const _0x32350e=a88_0x5459,_0x5defc7=[];return!isValidCssHttpsUrl(_0x16e1fb)&&_0x5defc7[_0x32350e(0x103)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x5defc7['length']===0x0,'errors':_0x5defc7};}export async function validateJsUrlReachable(_0x29bd96){const _0x2e2962=a88_0x5459,_0x1e261d=validateJsUrl(_0x29bd96);if(!_0x1e261d['ok'])return _0x1e261d;const _0x3d993a=await isUrlReachable(_0x29bd96);if(!_0x3d993a)_0x1e261d[_0x2e2962(0x106)][_0x2e2962(0x103)](_0x2e2962(0x111));return{'ok':_0x1e261d[_0x2e2962(0x106)][_0x2e2962(0x118)]===0x0,'errors':_0x1e261d[_0x2e2962(0x106)]};}export async function validateCssUrlReachable(_0x1294a9){const _0x25c0c9=a88_0x5459,_0x1c5e49=validateCssUrl(_0x1294a9);if(!_0x1c5e49['ok'])return _0x1c5e49;const _0x2b97f0=await isUrlReachable(_0x1294a9);if(!_0x2b97f0)_0x1c5e49[_0x25c0c9(0x106)][_0x25c0c9(0x103)](_0x25c0c9(0x114));return{'ok':_0x1c5e49[_0x25c0c9(0x106)][_0x25c0c9(0x118)]===0x0,'errors':_0x1c5e49['errors']};}export function buildCompareRows(_0x418a45,_0x23fe30){const _0x5d219c=a88_0x5459;return _0x418a45[_0x5d219c(0x119)](_0x1e0230=>({'label':_0x1e0230[_0x5d219c(0x116)],'path':_0x1e0230[_0x5d219c(0x10d)],'local':!![],'online':_0x23fe30[_0x5d219c(0x112)](_0x1e0230['path'])}));}function a88_0x2581(){const _0xa581da=['status','rejected','16503920yYgRyR','3545010RbzaOM','163867IdnuQL','5643519PRgXvp','path','70488CtAqyE','fulfilled','find','JS\x20URL\x20is\x20unreachable','has','resources','CSS\x20URL\x20is\x20unreachable','No\x20local\x20pages\x20matched\x20labels:\x20','label','5113032ikaYuC','length','map','2RXYpTQ','join','value','extend','4946248ILcqKU','push','trim','filter','errors'];a88_0x2581=function(){return _0xa581da;};return a88_0x2581();}export function filterNewPages(_0x154a86,_0x54bd43,_0x5a53b6){const _0x58ba9b=a88_0x5459;if(_0x5a53b6&&_0x5a53b6[_0x58ba9b(0x118)]>0x0){const _0x1029b7=new Set(_0x5a53b6[_0x58ba9b(0x119)](_0x2a77f8=>_0x2a77f8[_0x58ba9b(0x104)]())),_0xf1962b=_0x154a86[_0x58ba9b(0x105)](_0x4f36fd=>_0x1029b7[_0x58ba9b(0x112)](_0x4f36fd['label']));if(_0xf1962b[_0x58ba9b(0x118)]===0x0)throw new Error(_0x58ba9b(0x115)+[..._0x1029b7][_0x58ba9b(0x11b)](',\x20'));return _0xf1962b;}return _0x154a86[_0x58ba9b(0x105)](_0x470f6d=>!_0x54bd43[_0x58ba9b(0x112)](_0x470f6d[_0x58ba9b(0x10d)]));}export function filterPagesByLabels(_0x297aee,_0x2514d4){const _0x61f80a=a88_0x5459,_0x1de89b=[],_0x375ff2=[];for(const _0x3f17b6 of _0x2514d4){const _0x5813b6=_0x3f17b6[_0x61f80a(0x104)](),_0x1d2ea4=_0x297aee[_0x61f80a(0x110)](_0x5d3fab=>_0x5d3fab[_0x61f80a(0x116)]===_0x5813b6);if(_0x1d2ea4)_0x1de89b[_0x61f80a(0x103)](_0x1d2ea4);else _0x375ff2['push'](_0x3f17b6);}return{'matched':_0x1de89b,'unmatched':_0x375ff2};}export async function doCreateMenus(_0x35295d,_0x46ec2c,_0x58e79e,_0x196ae9){const _0x11bad4=a88_0x5459,_0x34a8fa=await createMenus(_0x35295d,_0x46ec2c,_0x58e79e,_0x196ae9);return{'created':_0x34a8fa[_0x11bad4(0x118)],'failed':0x0,'labels':_0x58e79e[_0x11bad4(0x119)](_0x352340=>_0x352340[_0x11bad4(0x116)]),'menus':_0x34a8fa};}export function filterMenusWithResources(_0x42dcd6){const _0x3d2639=a88_0x5459;return _0x42dcd6[_0x3d2639(0x105)](_0x367ad1=>_0x367ad1[_0x3d2639(0x113)][_0x3d2639(0x118)]>0x0);}export async function doUpdateCdnUrls(_0x53c630,_0x58e39e,_0x2b7368,_0x2c1da2){const _0x1f3060=a88_0x5459,_0x33e344=_0x2b7368[_0x1f3060(0x105)](_0x2f6dc8=>_0x2f6dc8[_0x1f3060(0x113)][_0x1f3060(0x118)]>0x0),_0x2e453b=await Promise['allSettled'](_0x33e344[_0x1f3060(0x119)](_0x56c010=>updateMenuCdnUrl(_0x53c630,_0x58e39e,{'id':_0x56c010['id'],'label':_0x56c010[_0x1f3060(0x116)],'path':_0x56c010[_0x1f3060(0x10d)],'resources':_0x2c1da2,'extend':_0x56c010[_0x1f3060(0x11d)]??null}))),_0x126411=_0x2e453b[_0x1f3060(0x105)](_0x5ded38=>_0x5ded38[_0x1f3060(0x107)]===_0x1f3060(0x10f))[_0x1f3060(0x119)](_0x364ea0=>_0x364ea0[_0x1f3060(0x11c)]),_0x57905b=_0x2e453b[_0x1f3060(0x105)](_0x54449c=>_0x54449c[_0x1f3060(0x107)]===_0x1f3060(0x108))[_0x1f3060(0x118)];return{'updated':_0x126411[_0x1f3060(0x118)],'failed':_0x57905b,'menus':_0x126411};}export async function fetchMenuData(_0x2967c6,_0x55cfa8){const _0x3c6b9d=a88_0x5459,_0x27e5e7=getLocalPages(),_0x388743=await getOnlineMenuList(_0x2967c6,_0x55cfa8),_0x25155d=new Set(_0x388743[_0x3c6b9d(0x119)](_0x45ff67=>_0x45ff67['path']));return{'localPages':_0x27e5e7,'onlineMenuList':_0x388743,'onlinePaths':_0x25155d};}export async function fetchOnlineMenuList(_0x1a23b4,_0xffeb73){return getOnlineMenuList(_0x1a23b4,_0xffeb73);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d49a7,_0x358093){const _0x5b4726=a89_0x98da,_0x5b4549=_0x3d49a7();while(!![]){try{const _0x14fde2=-parseInt(_0x5b4726(0x1a2))/0x1+parseInt(_0x5b4726(0x1ab))/0x2*(parseInt(_0x5b4726(0x1c4))/0x3)+-parseInt(_0x5b4726(0x1aa))/0x4*(parseInt(_0x5b4726(0x1be))/0x5)+parseInt(_0x5b4726(0x1cb))/0x6+-parseInt(_0x5b4726(0x1c6))/0x7+-parseInt(_0x5b4726(0x1c7))/0x8+parseInt(_0x5b4726(0x1af))/0x9*(parseInt(_0x5b4726(0x1b3))/0xa);if(_0x14fde2===_0x358093)break;else _0x5b4549['push'](_0x5b4549['shift']());}catch(_0x3c7ef1){_0x5b4549['push'](_0x5b4549['shift']());}}}(a89_0x4f00,0xbb31a));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x58eaa8,_0x1a5fa0){const _0x2954b2=a89_0x98da,_0x542cb9=getEnv();logger[_0x2954b2(0x1a7)](_0x2954b2(0x1ba),isProduction(_0x542cb9)?_0x2954b2(0x1a9)+_0x58eaa8+')':_0x2954b2(0x1b9)+_0x58eaa8+')');const _0x2c8522=await platformFetch(getApiDomain()+_0x2954b2(0x1b1)+_0x58eaa8,{'cookie':_0x1a5fa0,'label':_0x2954b2(0x1ad)});if(!_0x2c8522)return logger['info'](_0x2954b2(0x1ba),_0x2954b2(0x1a3)),[];return logger[_0x2954b2(0x1a7)](_0x2954b2(0x1ba),'Fetched\x20'+_0x2c8522[_0x2954b2(0x1ca)]+_0x2954b2(0x1a1)),_0x2c8522[_0x2954b2(0x1b4)](flattenMenuItem)[_0x2954b2(0x1a8)]();}function a89_0x4f00(){const _0x2b941a=['Batch\x20menu\x20creation\x20completed,\x20total\x20','children','/smartapi/menu/update','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','get-online-menu-list','create-menu','label','Menu\x20assets\x20synced:\x20','7665tWWICE','Start\x20batch\x20menu\x20creation,\x20total\x20','Menu\x20created\x20successfully:\x20','path','Creating\x20menu:\x20','procode','165YcIEDE','update-menu-cdn-url','4706464DEyGtd','477144VRuyaa','stringify','Update\x20menu\x20assets\x20\x22','length','5480976TEitxh','/smartapi/menu/create','resources','\x20online\x20menus\x20successfully','190576FAFHfB','Server\x20returned\x20empty\x20menu\x20list','all','string','create-menus','info','flat','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','76CYzJEv','1924bGIsPM','POST','Fetch\x20menu\x20list','Create\x20menu\x20\x22','966906XrxGNW','extend','/smartapi/menu/find?appCode=','import','70qqtfOx','map','isArray'];a89_0x4f00=function(){return _0x2b941a;};return a89_0x4f00();}function a89_0x98da(_0xbdee6f,_0x568c4b){_0xbdee6f=_0xbdee6f-0x1a1;const _0x4f004a=a89_0x4f00();let _0x98dafc=_0x4f004a[_0xbdee6f];return _0x98dafc;}function flattenMenuItem(_0x135c29){const _0x1b0cfb=a89_0x98da;let _0x14b9a4=[];try{const _0x5f4347=_0x135c29[_0x1b0cfb(0x1b0)]?.[_0x1b0cfb(0x1cd)];if(typeof _0x5f4347===_0x1b0cfb(0x1a5)){const _0x21ccad=JSON['parse'](_0x5f4347);if(Array[_0x1b0cfb(0x1b5)](_0x21ccad))_0x14b9a4=_0x21ccad[_0x1b0cfb(0x1b4)](String);}else Array[_0x1b0cfb(0x1b5)](_0x5f4347)&&(_0x14b9a4=_0x5f4347[_0x1b0cfb(0x1b4)](String));}catch{}const _0x503602=[{'id':_0x135c29['id'],'path':_0x135c29[_0x1b0cfb(0x1c1)],'label':_0x135c29['label'],'resources':_0x14b9a4,'extend':_0x135c29[_0x1b0cfb(0x1b0)]??null}];if(_0x135c29[_0x1b0cfb(0x1b7)]&&_0x135c29[_0x1b0cfb(0x1b7)][_0x1b0cfb(0x1ca)]>0x0)for(const _0x31ff0b of _0x135c29['children']){_0x503602['push'](...flattenMenuItem(_0x31ff0b));}return _0x503602;}export async function createMenu(_0xf5d76c,_0xc0ed3a,_0x1a7fc8){const _0x207307=a89_0x98da;logger['info'](_0x207307(0x1bb),_0x207307(0x1c2)+_0x1a7fc8[_0x207307(0x1bc)]+'\x20('+_0x1a7fc8[_0x207307(0x1c1)]+')');const _0x5762c8={'appCode':_0xf5d76c,'type':_0x207307(0x1c3),'sort':0x0,'extend':{'loadScriptMode':_0x207307(0x1b2),'resources':_0x1a7fc8['resources']?JSON[_0x207307(0x1c8)](_0x1a7fc8['resources']):undefined},..._0x1a7fc8},_0x2f0912=await platformFetch(getApiDomain()+_0x207307(0x1cc),{'method':_0x207307(0x1ac),'body':_0x5762c8,'cookie':_0xc0ed3a,'label':_0x207307(0x1ae)+_0x1a7fc8[_0x207307(0x1bc)]+'\x22'});return logger[_0x207307(0x1a7)](_0x207307(0x1bb),_0x207307(0x1c0)+_0x1a7fc8[_0x207307(0x1bc)]),_0x2f0912;}async function createSingleMenu(_0x49029c,_0x959790,_0x10b805,_0x519ef4){const _0x437631=a89_0x98da,_0x228c0b={'appCode':_0x49029c,'type':_0x437631(0x1c3),'sort':0x0,'extend':{'loadScriptMode':_0x437631(0x1b2),'resources':_0x519ef4?JSON[_0x437631(0x1c8)](_0x519ef4):undefined},'label':_0x10b805[_0x437631(0x1bc)],'path':_0x10b805[_0x437631(0x1c1)]},_0x25d0c4=await platformFetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x437631(0x1ac),'body':_0x228c0b,'cookie':_0x959790,'label':'Create\x20menu\x20\x22'+_0x10b805[_0x437631(0x1bc)]+'\x22'});return logger[_0x437631(0x1a7)](_0x437631(0x1bb),_0x437631(0x1c0)+_0x10b805[_0x437631(0x1bc)]),_0x25d0c4;}export async function createMenus(_0x35b8fa,_0x7cedc5,_0x3772f5,_0x79cb43){const _0x34de52=a89_0x98da;logger[_0x34de52(0x1a7)](_0x34de52(0x1a6),_0x34de52(0x1bf)+_0x3772f5[_0x34de52(0x1ca)]);const _0x51613d=await Promise[_0x34de52(0x1a4)](_0x3772f5[_0x34de52(0x1b4)](_0x3abb7d=>createSingleMenu(_0x35b8fa,_0x7cedc5,_0x3abb7d,_0x79cb43)));return logger[_0x34de52(0x1a7)](_0x34de52(0x1a6),_0x34de52(0x1b6)+_0x3772f5[_0x34de52(0x1ca)]),_0x51613d;}export async function updateMenuCdnUrl(_0x2c2b6c,_0x395221,_0x10eef8){const _0x9dcfe0=a89_0x98da;logger[_0x9dcfe0(0x1a7)](_0x9dcfe0(0x1c5),'Updating\x20menu\x20asset\x20links:\x20'+_0x10eef8['label']+'\x20('+_0x10eef8[_0x9dcfe0(0x1c1)]+')');const _0x42fb63={'id':_0x10eef8['id'],'appCode':_0x2c2b6c,'extend':{..._0x10eef8[_0x9dcfe0(0x1b0)]??{},'loadScriptMode':'import','resources':_0x10eef8[_0x9dcfe0(0x1cd)]?JSON[_0x9dcfe0(0x1c8)](_0x10eef8[_0x9dcfe0(0x1cd)]):undefined}},_0x376de4=await platformFetch(getApiDomain()+_0x9dcfe0(0x1b8),{'method':'POST','body':_0x42fb63,'cookie':_0x395221,'label':_0x9dcfe0(0x1c9)+_0x10eef8[_0x9dcfe0(0x1bc)]+'\x22'});return logger[_0x9dcfe0(0x1a7)](_0x9dcfe0(0x1c5),_0x9dcfe0(0x1bd)+_0x10eef8[_0x9dcfe0(0x1bc)],undefined),_0x376de4;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a050d,_0x58fca9){const _0x1a4d76=a90_0x50f3,_0x437974=_0x4a050d();while(!![]){try{const _0x44248d=parseInt(_0x1a4d76(0x8f))/0x1+-parseInt(_0x1a4d76(0xa7))/0x2+parseInt(_0x1a4d76(0x9a))/0x3*(parseInt(_0x1a4d76(0x88))/0x4)+-parseInt(_0x1a4d76(0xb0))/0x5*(parseInt(_0x1a4d76(0xa5))/0x6)+parseInt(_0x1a4d76(0x8a))/0x7*(-parseInt(_0x1a4d76(0xac))/0x8)+-parseInt(_0x1a4d76(0x89))/0x9*(parseInt(_0x1a4d76(0xae))/0xa)+parseInt(_0x1a4d76(0x97))/0xb;if(_0x44248d===_0x58fca9)break;else _0x437974['push'](_0x437974['shift']());}catch(_0x4444c4){_0x437974['push'](_0x437974['shift']());}}}(a90_0x172a,0x38111));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a90_0x172a(){const _0xccbd5a=['8DfGnVQ','pages','620450rQRhtd','Menu\x20sync\x20completed','475YUsBbb','cwd','selectedLabels','object','utf8','map','string','7556xmZBVK','36xkOvWy','485037IJHOOY','end','push','parse','split','49442JqkRNu','length','CSS\x20URL\x20is\x20unreachable:\x20','label','startsWith','has','concat','isArray','5367890ggzBeM','No\x20local\x20pages\x20matched\x20labels:\x20','cssUrl','444yFrrRh','stdin','path','filter','readableEnded','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','setLogPath','trim','message','data','join','16746HVeoyq','menu-sync','9478EGByVA','jsUrl','Invalid\x20--params:\x20','info','isTTY'];a90_0x172a=function(){return _0xccbd5a;};return a90_0x172a();}function validateParams(_0x22005a){const _0x9d6faa=a90_0x50f3,_0x853eb1=[];return _0x22005a[_0x9d6faa(0xa8)]&&!isValidJsHttpsUrl(_0x22005a[_0x9d6faa(0xa8)])&&_0x853eb1[_0x9d6faa(0x8c)]({'field':_0x9d6faa(0xa8),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x22005a[_0x9d6faa(0x99)]&&!isValidCssHttpsUrl(_0x22005a[_0x9d6faa(0x99)])&&_0x853eb1[_0x9d6faa(0x8c)]({'field':_0x9d6faa(0x99),'message':_0x9d6faa(0x9f)}),_0x853eb1;}function a90_0x50f3(_0x5892b6,_0x323884){_0x5892b6=_0x5892b6-0x84;const _0x172ab8=a90_0x172a();let _0x50f31e=_0x172ab8[_0x5892b6];return _0x50f31e;}export async function runMenuSyncCore(_0x56943a,_0x4805c,_0x236d5f=[],_0x4330f4){const _0x34c743=a90_0x50f3,_0x56c9d9=parseParamsFlag(_0x4330f4),_0xbec9e5=_0x236d5f[_0x34c743(0x90)]>0x0?_0x236d5f:_0x56c9d9[_0x34c743(0xb2)],_0xc0101d=_0x56c9d9['jsUrl'],_0x2916d5=_0x56c9d9['cssUrl'],_0x3d25eb=[];if(_0xc0101d)_0x3d25eb[_0x34c743(0x8c)](_0xc0101d);if(_0x2916d5)_0x3d25eb[_0x34c743(0x8c)](_0x2916d5);const _0x3e7c01=validateParams(_0x56c9d9);if(_0x3e7c01[_0x34c743(0x90)]>0x0){const _0x303ddf=_0x3e7c01['map'](_0x30a438=>'--params.'+_0x30a438['field']+':\x20'+_0x30a438[_0x34c743(0xa2)])[_0x34c743(0xa4)](';\x20');throw new Error(_0x34c743(0xa9)+_0x303ddf);}logger[_0x34c743(0xa0)](process[_0x34c743(0xb1)]()),logger['info'](_0x34c743(0xa6),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x56943a,'selectedCount':_0xbec9e5?.[_0x34c743(0x90)],'jsUrl':_0xc0101d,'cssUrl':_0x2916d5});if(_0xc0101d){const _0x5309b8=await isUrlReachable(_0xc0101d);if(!_0x5309b8)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0xc0101d);}if(_0x2916d5){const _0x5341fa=await isUrlReachable(_0x2916d5);if(!_0x5341fa)throw new Error(_0x34c743(0x91)+_0x2916d5);}const _0x284c68=getLocalPages();if(_0x284c68[_0x34c743(0x90)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x1c5a95=await getOnlineMenuList(_0x56943a,_0x4805c),_0x551f2f=new Set(_0x1c5a95[_0x34c743(0x86)](_0x2e3cbc=>_0x2e3cbc['path']));let _0x3c2a4b;if(_0xbec9e5&&_0xbec9e5['length']>0x0){const _0x261d8a=new Set(_0xbec9e5[_0x34c743(0x86)](_0x678f55=>_0x678f55[_0x34c743(0xa1)]()));_0x3c2a4b=_0x284c68[_0x34c743(0x9d)](_0xb49ead=>_0x261d8a[_0x34c743(0x94)](_0xb49ead[_0x34c743(0x92)]));if(_0x3c2a4b[_0x34c743(0x90)]===0x0){const _0x138fe7=_0x284c68[_0x34c743(0x86)](_0x1f8c2c=>_0x1f8c2c[_0x34c743(0x92)])[_0x34c743(0xa4)](',\x20');throw new Error(_0x34c743(0x98)+[..._0x261d8a][_0x34c743(0xa4)](',\x20')+'\x0a\x20\x20Available\x20local\x20pages:\x20'+_0x138fe7);}}else _0x3c2a4b=_0x284c68[_0x34c743(0x9d)](_0x545888=>!_0x551f2f['has'](_0x545888[_0x34c743(0x9c)]));if(_0x3c2a4b['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x1d9863=await createMenus(_0x56943a,_0x4805c,_0x3c2a4b,_0x3d25eb[_0x34c743(0x90)]>0x0?_0x3d25eb:undefined);return logger[_0x34c743(0xaa)]('menu-sync',_0x34c743(0xaf),{'count':_0x3c2a4b[_0x34c743(0x90)],'resources':_0x3d25eb}),{'created':_0x1d9863['length'],'skipped':![],'targetPages':_0x3c2a4b,'menus':_0x1d9863};}export async function readPageLabelsFromStdin(){const _0x200d5a=a90_0x50f3;if(!process[_0x200d5a(0x9b)][_0x200d5a(0xab)]&&!process['stdin'][_0x200d5a(0x9e)])return new Promise(_0x1bf91a=>{const _0xe779b9=_0x200d5a,_0x206c90=[];process[_0xe779b9(0x9b)]['on'](_0xe779b9(0xa3),_0x10c860=>_0x206c90[_0xe779b9(0x8c)](_0x10c860)),process[_0xe779b9(0x9b)]['on'](_0xe779b9(0x8b),()=>{const _0x1d40f9=_0xe779b9,_0x2ef076=Buffer[_0x1d40f9(0x95)](_0x206c90)['toString'](_0x1d40f9(0x85)),_0x5a3ef0=_0x2ef076[_0x1d40f9(0x8e)]('\x0a')[_0x1d40f9(0x86)](_0x5385c6=>_0x5385c6[_0x1d40f9(0xa1)]())[_0x1d40f9(0x9d)](_0x527186=>_0x527186[_0x1d40f9(0x90)]>0x0&&!_0x527186[_0x1d40f9(0x93)]('#'));_0x1bf91a(_0x5a3ef0);}),setTimeout(()=>_0x1bf91a([]),0x1f4);});return[];}function parseParamsFlag(_0x5b695f){const _0x4f3b47=a90_0x50f3;if(!_0x5b695f||typeof _0x5b695f!=='string')return{};try{const _0x590bdc=JSON[_0x4f3b47(0x8d)](_0x5b695f);if(typeof _0x590bdc!==_0x4f3b47(0x84)||_0x590bdc===null||Array[_0x4f3b47(0x96)](_0x590bdc))return{};return{'selectedLabels':Array['isArray'](_0x590bdc[_0x4f3b47(0xad)])?_0x590bdc[_0x4f3b47(0xad)][_0x4f3b47(0x86)](String):undefined,'jsUrl':typeof _0x590bdc[_0x4f3b47(0xa8)]===_0x4f3b47(0x87)?_0x590bdc[_0x4f3b47(0xa8)][_0x4f3b47(0xa1)]():undefined,'cssUrl':typeof _0x590bdc[_0x4f3b47(0x99)]===_0x4f3b47(0x87)?_0x590bdc[_0x4f3b47(0x99)][_0x4f3b47(0xa1)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2aa77a,_0x4f8fba){const _0x3afb77=a92_0x4465,_0x54f7ea=_0x2aa77a();while(!![]){try{const _0x439fcf=parseInt(_0x3afb77(0x1e2))/0x1+parseInt(_0x3afb77(0x1d8))/0x2+-parseInt(_0x3afb77(0x1f2))/0x3+-parseInt(_0x3afb77(0x1db))/0x4*(parseInt(_0x3afb77(0x1ca))/0x5)+-parseInt(_0x3afb77(0x1d3))/0x6+parseInt(_0x3afb77(0x1ea))/0x7*(parseInt(_0x3afb77(0x1d7))/0x8)+-parseInt(_0x3afb77(0x1e0))/0x9;if(_0x439fcf===_0x4f8fba)break;else _0x54f7ea['push'](_0x54f7ea['shift']());}catch(_0x4a667e){_0x54f7ea['push'](_0x54f7ea['shift']());}}}(a92_0x57c4,0xf3f4b));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a92_0x4465(_0x3fdfca,_0x57db01){_0x3fdfca=_0x3fdfca-0x1be;const _0x57c4e2=a92_0x57c4();let _0x446507=_0x57c4e2[_0x3fdfca];return _0x446507;}import{logger}from'../../../utils/logger.js';function validateParams(_0x88858b){const _0x5b40b7=a92_0x4465,_0xadd22d=[];return _0x88858b[_0x5b40b7(0x1e5)]&&!isValidJsHttpsUrl(_0x88858b[_0x5b40b7(0x1e5)])&&_0xadd22d[_0x5b40b7(0x1e7)]({'field':_0x5b40b7(0x1e5),'message':_0x5b40b7(0x1cb)}),_0x88858b[_0x5b40b7(0x1cd)]&&!isValidCssHttpsUrl(_0x88858b['cssUrl'])&&_0xadd22d[_0x5b40b7(0x1e7)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0xadd22d;}export async function runMenuUpdateCore(_0x4b40e3,_0x4aecd0,_0x405b96,_0x32eeb8={}){const _0x5e289d=a92_0x4465,_0x16de84=parseUpdateParamsFlag(_0x405b96),_0x333e06=normalizeMode(_0x32eeb8['mode']),_0x5b8066=[];if(_0x16de84[_0x5e289d(0x1e5)])_0x5b8066[_0x5e289d(0x1e7)](_0x16de84[_0x5e289d(0x1e5)]);if(_0x16de84[_0x5e289d(0x1cd)])_0x5b8066[_0x5e289d(0x1e7)](_0x16de84['cssUrl']);const _0x46d44f=validateParams(_0x16de84);if(_0x46d44f[_0x5e289d(0x1df)]>0x0){const _0x546960=_0x46d44f[_0x5e289d(0x1c2)](_0x470fa1=>_0x5e289d(0x1da)+_0x470fa1[_0x5e289d(0x1ee)]+':\x20'+_0x470fa1[_0x5e289d(0x1c1)])[_0x5e289d(0x1e1)](';\x20');throw new Error(_0x5e289d(0x1d5)+_0x546960);}if(_0x5b8066[_0x5e289d(0x1df)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x5e289d(0x1f3));logger[_0x5e289d(0x1d1)](process[_0x5e289d(0x1e3)]()),logger[_0x5e289d(0x1ce)](_0x5e289d(0x1c8),_0x5e289d(0x1f1),{'appCode':_0x4b40e3,'jsUrl':_0x16de84[_0x5e289d(0x1e5)],'cssUrl':_0x16de84[_0x5e289d(0x1cd)],'mode':_0x333e06,'dryRun':_0x32eeb8[_0x5e289d(0x1c4)]===!![]});if(_0x16de84[_0x5e289d(0x1e5)]){const _0x21bb11=await isUrlReachable(_0x16de84[_0x5e289d(0x1e5)]);if(!_0x21bb11)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x16de84['jsUrl']);}if(_0x16de84['cssUrl']){const _0x40ac2c=await isUrlReachable(_0x16de84[_0x5e289d(0x1cd)]);if(!_0x40ac2c)throw new Error(_0x5e289d(0x1e6)+_0x16de84[_0x5e289d(0x1cd)]);}const _0x2d4e5a=await getOnlineMenuList(_0x4b40e3,_0x4aecd0),_0x2befb8=_0x2d4e5a['filter'](_0x5358b9=>_0x5358b9['resources'][_0x5e289d(0x1df)]>0x0);if(_0x2befb8[_0x5e289d(0x1df)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x32eeb8[_0x5e289d(0x1c4)]===!![]};const _0x5189d6=_0x2befb8[_0x5e289d(0x1c2)](_0x5cdcd1=>buildMenuUpdateDiff(_0x5cdcd1,_0x16de84,_0x333e06,_0x32eeb8['force']===!![]));if(_0x32eeb8[_0x5e289d(0x1c4)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x5189d6};const _0x130c14=await Promise[_0x5e289d(0x1e9)](_0x2befb8['map']((_0x134bc8,_0x58dc01)=>updateMenuCdnUrl(_0x4b40e3,_0x4aecd0,{'id':_0x134bc8['id'],'label':_0x134bc8[_0x5e289d(0x1c7)],'path':_0x134bc8[_0x5e289d(0x1be)],'resources':_0x5189d6[_0x58dc01][_0x5e289d(0x1ef)][_0x5e289d(0x1cc)],'extend':_0x134bc8[_0x5e289d(0x1c0)]??null}))),_0x1e9852=_0x130c14[_0x5e289d(0x1c6)](_0x558cd4=>_0x558cd4[_0x5e289d(0x1c9)]===_0x5e289d(0x1cf))['map'](_0x234f1d=>_0x234f1d[_0x5e289d(0x1dc)]),_0x44ada5=_0x130c14[_0x5e289d(0x1c6)](_0x138816=>_0x138816[_0x5e289d(0x1c9)]==='rejected')[_0x5e289d(0x1df)];return logger[_0x5e289d(0x1ce)]('menu-update','Menu\x20update\x20completed',{'count':_0x2befb8[_0x5e289d(0x1df)],'resources':_0x5b8066}),{'updated':_0x1e9852['length'],'failed':_0x44ada5,'skipped':![],'menus':_0x1e9852};}function normalizeMode(_0xfc2e9e){const _0x5486a4=a92_0x4465;if(!_0xfc2e9e)return _0x5486a4(0x1ec);if(_0xfc2e9e==='replace'||_0xfc2e9e===_0x5486a4(0x1eb))return _0xfc2e9e;throw new Error(_0x5486a4(0x1d6)+_0xfc2e9e+'.\x20Allowed\x20values:\x20replace,\x20patch');}function a92_0x57c4(){const _0x2a4c3=['after','some','Start\x20non-interactive\x20menu\x20update','3818625bDwgmU','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','path','.js','extend','message','map','parse','dryRun','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','filter','label','menu-update','status','4055fGiMxz','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','resources','cssUrl','info','fulfilled','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','setLogPath','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','1396338IbKsGG','toLowerCase','Invalid\x20--params:\x20','Invalid\x20--mode:\x20','13055408umAptk','2598156FHrULJ','.css','--params.','508plewoI','value','\x22\x20(','string','length','7594506WPRmYy','join','520668rzDwGF','cwd','endsWith','jsUrl','CSS\x20URL\x20is\x20unreachable:\x20','push','trim','allSettled','7Dmgcgh','patch','replace','split','field'];a92_0x57c4=function(){return _0x2a4c3;};return a92_0x57c4();}function buildMenuUpdateDiff(_0x299b05,_0x40bfc1,_0x3c5d7d,_0x10a5d2){const _0x577d46=a92_0x4465,_0xa3b782=[..._0x299b05['resources']],_0x44aa8e=_0x3c5d7d===_0x577d46(0x1eb)?patchResources(_0xa3b782,_0x40bfc1):replaceResources(_0x40bfc1),_0x1de304=[],_0x360556=_0xa3b782['some'](isJsResource),_0x31710e=_0x44aa8e['some'](isJsResource);if(_0x360556&&!_0x31710e){const _0x3778f5=_0x577d46(0x1c5)+_0x299b05[_0x577d46(0x1c7)]+_0x577d46(0x1dd)+_0x299b05[_0x577d46(0x1be)]+').\x20'+_0x577d46(0x1d2);if(!_0x10a5d2)throw new Error(_0x3778f5);_0x1de304[_0x577d46(0x1e7)](_0x3778f5);}const _0x588519=_0xa3b782[_0x577d46(0x1f0)](isCssResource),_0x2c7947=_0x44aa8e[_0x577d46(0x1f0)](isCssResource);return _0x588519&&!_0x2c7947&&_0x1de304['push'](_0x577d46(0x1d0)+_0x299b05[_0x577d46(0x1c7)]+_0x577d46(0x1dd)+_0x299b05[_0x577d46(0x1be)]+').'),{'id':_0x299b05['id'],'label':_0x299b05['label'],'path':_0x299b05[_0x577d46(0x1be)],'mode':_0x3c5d7d,'before':{'resources':_0xa3b782},'after':{'resources':_0x44aa8e},'warnings':_0x1de304};}function replaceResources(_0x4de16b){const _0x1509d1=a92_0x4465;return[_0x4de16b[_0x1509d1(0x1e5)],_0x4de16b[_0x1509d1(0x1cd)]][_0x1509d1(0x1c6)](_0x48a4ad=>!!_0x48a4ad);}function patchResources(_0x4b1e12,_0x50c081){const _0xd2f9e5=a92_0x4465;let _0x27d0b2=![],_0x5c8fd9=![];const _0x1fe67c=[];for(const _0x62001e of _0x4b1e12){if(isJsResource(_0x62001e)){if(_0x50c081[_0xd2f9e5(0x1e5)]&&!_0x27d0b2)_0x1fe67c['push'](_0x50c081[_0xd2f9e5(0x1e5)]),_0x27d0b2=!![];else!_0x50c081[_0xd2f9e5(0x1e5)]&&_0x1fe67c['push'](_0x62001e);continue;}if(isCssResource(_0x62001e)){if(_0x50c081[_0xd2f9e5(0x1cd)]&&!_0x5c8fd9)_0x1fe67c[_0xd2f9e5(0x1e7)](_0x50c081['cssUrl']),_0x5c8fd9=!![];else!_0x50c081[_0xd2f9e5(0x1cd)]&&_0x1fe67c[_0xd2f9e5(0x1e7)](_0x62001e);continue;}_0x1fe67c[_0xd2f9e5(0x1e7)](_0x62001e);}return _0x50c081[_0xd2f9e5(0x1e5)]&&!_0x27d0b2&&_0x1fe67c['unshift'](_0x50c081[_0xd2f9e5(0x1e5)]),_0x50c081[_0xd2f9e5(0x1cd)]&&!_0x5c8fd9&&_0x1fe67c['push'](_0x50c081['cssUrl']),_0x1fe67c;}function isJsResource(_0x3bd861){const _0x5f185c=a92_0x4465;return stripQuery(_0x3bd861)[_0x5f185c(0x1d4)]()[_0x5f185c(0x1e4)](_0x5f185c(0x1bf));}function isCssResource(_0x1d1f5d){const _0x3357a9=a92_0x4465;return stripQuery(_0x1d1f5d)[_0x3357a9(0x1d4)]()[_0x3357a9(0x1e4)](_0x3357a9(0x1d9));}function stripQuery(_0x363814){const _0x55327e=a92_0x4465;return _0x363814[_0x55327e(0x1ed)]('?')[0x0]??_0x363814;}function parseUpdateParamsFlag(_0xa50078){const _0x4fd239=a92_0x4465;if(!_0xa50078||typeof _0xa50078!=='string')return{};try{const _0xb41173=JSON[_0x4fd239(0x1c3)](_0xa50078);if(typeof _0xb41173!=='object'||_0xb41173===null||Array['isArray'](_0xb41173))return{};return{'jsUrl':typeof _0xb41173['jsUrl']===_0x4fd239(0x1de)?_0xb41173['jsUrl'][_0x4fd239(0x1e8)]():undefined,'cssUrl':typeof _0xb41173[_0x4fd239(0x1cd)]===_0x4fd239(0x1de)?_0xb41173['cssUrl'][_0x4fd239(0x1e8)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a93_0x58a6(){const _0x4d7616=['test','322rJyRhb','3978714LkBkGN','7afnNPF','HEAD','2731460jYVfWw','1712216xEYbrG','9bqKSOA','17222414tlnsEv','9528xhgVox','772ZNwlRe','trim','4196lpVBWe','3113425QRUPOO'];a93_0x58a6=function(){return _0x4d7616;};return a93_0x58a6();}function a93_0x5312(_0x1d7339,_0x591463){_0x1d7339=_0x1d7339-0x177;const _0x58a643=a93_0x58a6();let _0x531207=_0x58a643[_0x1d7339];return _0x531207;}(function(_0x24751a,_0x108b01){const _0x594e78=a93_0x5312,_0x4809fb=_0x24751a();while(!![]){try{const _0x33bebe=-parseInt(_0x594e78(0x183))/0x1*(parseInt(_0x594e78(0x178))/0x2)+parseInt(_0x594e78(0x180))/0x3*(-parseInt(_0x594e78(0x181))/0x4)+-parseInt(_0x594e78(0x184))/0x5+parseInt(_0x594e78(0x179))/0x6+parseInt(_0x594e78(0x17a))/0x7*(-parseInt(_0x594e78(0x17d))/0x8)+parseInt(_0x594e78(0x17e))/0x9*(parseInt(_0x594e78(0x17c))/0xa)+parseInt(_0x594e78(0x17f))/0xb;if(_0x33bebe===_0x108b01)break;else _0x4809fb['push'](_0x4809fb['shift']());}catch(_0x21a930){_0x4809fb['push'](_0x4809fb['shift']());}}}(a93_0x58a6,0x5bf7f));export function isValidJsHttpsUrl(_0x1c0e3f){const _0x323ef0=a93_0x5312;return/^https:\/\/.+\.js(\?.*)?$/[_0x323ef0(0x177)](_0x1c0e3f[_0x323ef0(0x182)]());}export function isValidCssHttpsUrl(_0x48783e){const _0x194a34=a93_0x5312;return/^https:\/\/.+\.css(\?.*)?$/[_0x194a34(0x177)](_0x48783e[_0x194a34(0x182)]());}export async function isUrlReachable(_0x2216e1){const _0x31f92b=a93_0x5312;try{const _0x431e0b=await fetch(_0x2216e1,{'method':_0x31f92b(0x17b)});return _0x431e0b['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x35340d=a94_0x32e3;(function(_0x4107ad,_0x344842){const _0x57216c=a94_0x32e3,_0x1c32ff=_0x4107ad();while(!![]){try{const _0x4c9fcf=parseInt(_0x57216c(0x191))/0x1+parseInt(_0x57216c(0x1b0))/0x2+-parseInt(_0x57216c(0x1a0))/0x3*(parseInt(_0x57216c(0x181))/0x4)+-parseInt(_0x57216c(0x19a))/0x5+-parseInt(_0x57216c(0x18b))/0x6+parseInt(_0x57216c(0x1a9))/0x7*(-parseInt(_0x57216c(0x19c))/0x8)+parseInt(_0x57216c(0x1ab))/0x9;if(_0x4c9fcf===_0x344842)break;else _0x1c32ff['push'](_0x1c32ff['shift']());}catch(_0x103ae6){_0x1c32ff['push'](_0x1c32ff['shift']());}}}(a94_0x1987,0xab759));function a94_0x32e3(_0x2c0348,_0x2b8f2c){_0x2c0348=_0x2c0348-0x178;const _0x198727=a94_0x1987();let _0x32e309=_0x198727[_0x2c0348];return _0x32e309;}function a94_0x1987(){const _0x1c68bb=['skipped','appCode','361609rsgxhS','Created\x20','\x20created,\x20','\x20failed.','onlineMenuList','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','string','sync','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','5194690HieoQF','selectedAppName','136Xcgokb','onlinePaths','cssUrl','Menu\x20sync\x20completed:\x20','1641YSysjw','Menu\x20creation\x20failed','cookie','validation','rawFlags','parse','message','\x20and\x20CSS:\x20','created','469553JGgQSl','Sync\x20local\x20pages\x20as\x20platform\x20menus','29004858JxgcAE','length','localPages','yes','flag','2073170Mmvycj','isArray','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20created.','size','pages','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','\x20menu(s)','str','object','cyan','Online\x20menu\x20list\x20fetched','\x20\x20Create\x20','\x20\x20✓\x20Selected:\x20','Fetching\x20online\x20menu\x20list...','gray','6668hmUlsw','Menu\x20sync\x20skipped','trim','\x20page(s)','boolean','\x20menu(s)\x20created','params','\x20\x20Cancelled.','jsUrl','Failed\x20to\x20fetch\x20online\x20menu\x20list','4965174JaVAIM','write','yellow','failed'];a94_0x1987=function(){return _0x1c68bb;};return a94_0x1987();}import a94_0xff7bd0 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';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':a94_0x35340d(0x198),'description':a94_0x35340d(0x1aa),'risk':a94_0x35340d(0x18c),'flags':[{'name':a94_0x35340d(0x187),'type':a94_0x35340d(0x197),'description':'Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20'+a94_0x35340d(0x1b6)},{'name':'yes','type':a94_0x35340d(0x185),'description':a94_0x35340d(0x196)}],async 'execute'(_0x540573){const _0x17605b=a94_0x35340d,_0xc0ec5c=_0x540573[_0x17605b(0x1a4)]['appcode']?String(_0x540573[_0x17605b(0x1a4)]['appcode'])[_0x17605b(0x183)]():'';if(!isInProject()&&!_0x540573[_0x17605b(0x19b)]&&!_0xc0ec5c)throw CliErrors['validation']('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x17605b(0x1b2));const _0x593513=_0x540573[_0x17605b(0x1af)](_0x17605b(0x1ae)),_0x418bb4=_0x540573[_0x17605b(0x179)](_0x17605b(0x187)),_0x5b821b=parseParams(_0x418bb4),_0x2e5b4c=!!(_0x5b821b[_0x17605b(0x189)]||_0x5b821b[_0x17605b(0x19e)]||_0x5b821b[_0x17605b(0x1b5)]&&_0x5b821b['pages'][_0x17605b(0x1ac)]>0x0);if(_0x593513||_0x2e5b4c){let _0x119268=[];!isInteractive()&&!_0x5b821b[_0x17605b(0x1b5)]?.['length']&&(_0x119268=await readPageLabelsFromStdin());const _0x2208f6=await runMenuSyncCore(_0x540573[_0x17605b(0x190)],_0x540573[_0x17605b(0x1a2)],_0x119268[_0x17605b(0x1ac)]>0x0?_0x119268:_0x5b821b['pages']??[],_0x418bb4);if(_0x2208f6[_0x17605b(0x18f)]){const _0x116508=getLocalPages();_0x116508['length']===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x2208f6['created']+_0x17605b(0x186));return{'ok':!![],'data':_0x2208f6,'message':_0x2208f6[_0x17605b(0x18f)]?_0x17605b(0x182):_0x17605b(0x19f)+_0x2208f6[_0x17605b(0x1a8)]+_0x17605b(0x1b3)};}requireInteractive();const _0x32af86=startSpinner(_0x17605b(0x17f));let _0x17ddf1,_0x10f96d,_0x1ba445;try{const _0x5d96e4=await fetchMenuData(_0x540573[_0x17605b(0x190)],_0x540573[_0x17605b(0x1a2)]);_0x17ddf1=_0x5d96e4[_0x17605b(0x1ad)],_0x10f96d=_0x5d96e4[_0x17605b(0x19d)],_0x1ba445=_0x5d96e4[_0x17605b(0x195)],stopSpinner(_0x32af86,_0x17605b(0x17c),!![]);}catch(_0x2b1c58){stopSpinner(_0x32af86,_0x17605b(0x18a),![]);throw CliErrors[_0x17605b(0x1a3)](_0x2b1c58 instanceof Error?_0x2b1c58[_0x17605b(0x1a6)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x17ddf1[_0x17605b(0x1ac)]===0x0)return writeCliSideChannelLine(a94_0xff7bd0[_0x17605b(0x18d)](_0x17605b(0x199))),{'ok':!![]};const _0xd6d224=buildCompareRows(_0x17ddf1,_0x10f96d);writeCliSideChannelLine(renderCompareTable(_0xd6d224)),writeCliSideChannelLine('');const _0x3a4cf7=_0x5b821b[_0x17605b(0x1b5)],_0x1a42ac=await selectPages(_0x17ddf1,_0x10f96d,_0x3a4cf7);writeCliSideChannelLine(''),writeCliSideChannelLine(a94_0xff7bd0[_0x17605b(0x17b)](_0x17605b(0x17e)+_0x1a42ac[_0x17605b(0x1ac)]+_0x17605b(0x184)));const _0x2260dc=_0x5b821b[_0x17605b(0x189)]&&_0x5b821b[_0x17605b(0x19e)];if(!_0x2260dc){writeCliSideChannelLine(renderSyncSummary(_0x1a42ac,_0x10f96d[_0x17605b(0x1b4)]>0x0));const _0x3af04a=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x3af04a)return writeCliSideChannelLine(a94_0xff7bd0[_0x17605b(0x180)](_0x17605b(0x188))),{'ok':!![]};}let _0x1ea5f0=_0x5b821b['jsUrl'],_0x1cf2fe=_0x5b821b['cssUrl'];!_0x1ea5f0&&(_0x1ea5f0=await askJsUrl());!_0x1cf2fe&&(_0x1cf2fe=await askCssUrl());const _0x24f961=await askConfirm(_0x17605b(0x17d)+_0x1a42ac[_0x17605b(0x1ac)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x1ea5f0+_0x17605b(0x1a7)+_0x1cf2fe+'?');if(!_0x24f961)return writeCliSideChannelLine(a94_0xff7bd0[_0x17605b(0x180)](_0x17605b(0x188))),{'ok':!![]};const _0x2c0499=[_0x1ea5f0,_0x1cf2fe],_0x5e9a33=startSpinner('Creating\x20'+_0x1a42ac[_0x17605b(0x1ac)]+'\x20menu(s)...');try{const _0x17585b=await doCreateMenus(_0x540573[_0x17605b(0x190)],_0x540573[_0x17605b(0x1a2)],_0x1a42ac,_0x2c0499);return stopSpinner(_0x5e9a33,_0x17605b(0x192)+_0x17585b[_0x17605b(0x1a8)]+_0x17605b(0x178),!![]),{'ok':!![],'data':_0x17585b,'message':_0x17605b(0x19f)+_0x17585b[_0x17605b(0x1a8)]+_0x17605b(0x193)+_0x17585b[_0x17605b(0x18e)]+_0x17605b(0x194)};}catch(_0x5f41c7){stopSpinner(_0x5e9a33,_0x17605b(0x1a1),![]);throw CliErrors[_0x17605b(0x1a3)](_0x5f41c7 instanceof Error?_0x5f41c7['message']:'Menu\x20creation\x20failed');}}};function parseParams(_0x5c87ff){const _0x1ee10f=a94_0x35340d;if(!_0x5c87ff)return{};try{const _0x45b235=JSON[_0x1ee10f(0x1a5)](_0x5c87ff);if(typeof _0x45b235!==_0x1ee10f(0x17a)||_0x45b235===null||Array[_0x1ee10f(0x1b1)](_0x45b235))return{};return{'jsUrl':typeof _0x45b235[_0x1ee10f(0x189)]==='string'?_0x45b235[_0x1ee10f(0x189)][_0x1ee10f(0x183)]():undefined,'cssUrl':typeof _0x45b235['cssUrl']===_0x1ee10f(0x197)?_0x45b235['cssUrl']['trim']():undefined,'pages':Array['isArray'](_0x45b235['pages'])?_0x45b235['pages']['map'](String):undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x2231f3=a95_0x54e6;(function(_0x413f92,_0x30c767){const _0x243267=a95_0x54e6,_0x5cd7f6=_0x413f92();while(!![]){try{const _0xc387c4=-parseInt(_0x243267(0x201))/0x1*(parseInt(_0x243267(0x1cc))/0x2)+-parseInt(_0x243267(0x1fd))/0x3+-parseInt(_0x243267(0x1cf))/0x4+-parseInt(_0x243267(0x1dd))/0x5+-parseInt(_0x243267(0x200))/0x6+parseInt(_0x243267(0x1d2))/0x7+-parseInt(_0x243267(0x1f2))/0x8*(-parseInt(_0x243267(0x1eb))/0x9);if(_0xc387c4===_0x30c767)break;else _0x5cd7f6['push'](_0x5cd7f6['shift']());}catch(_0x2aa674){_0x5cd7f6['push'](_0x5cd7f6['shift']());}}}(a95_0x3d57,0x7edfa));function a95_0x54e6(_0x2c4a06,_0x3f6abf){_0x2c4a06=_0x2c4a06-0x1c6;const _0x3d57ea=a95_0x3d57();let _0x54e610=_0x3d57ea[_0x2c4a06];return _0x54e610;}import a95_0x5e6d91 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{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';export const menuUpdate={'service':'menu','command':a95_0x2231f3(0x1e5),'description':'Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','risk':'high-risk-write','flags':[{'name':a95_0x2231f3(0x1cd),'type':a95_0x2231f3(0x1d7),'description':a95_0x2231f3(0x1db)+a95_0x2231f3(0x1dc)},{'name':a95_0x2231f3(0x1f9),'type':a95_0x2231f3(0x1ca),'description':'Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params'},{'name':'mode','type':'string','description':'Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','enum':[a95_0x2231f3(0x1ed),a95_0x2231f3(0x1e0)],'default':'replace'},{'name':a95_0x2231f3(0x1d6),'type':a95_0x2231f3(0x1ca),'description':a95_0x2231f3(0x1fb)}],async 'dryRun'(_0x3aab3d){const _0x56a936=a95_0x2231f3;ensureRunnableContext(_0x3aab3d[_0x56a936(0x1c9)],_0x3aab3d[_0x56a936(0x1e4)]);const _0x5a1564=await runMenuUpdateCore(_0x3aab3d[_0x56a936(0x1e1)],_0x3aab3d[_0x56a936(0x205)],_0x3aab3d['str'](_0x56a936(0x1cd)),{'mode':parseMode(_0x3aab3d['str'](_0x56a936(0x1cb))),'dryRun':!![],'force':_0x3aab3d[_0x56a936(0x1e7)](_0x56a936(0x1d6))});return{'method':_0x56a936(0x203),'url':'/smartapi/menu/update','body':_0x5a1564,'description':_0x5a1564[_0x56a936(0x1e8)]?_0x56a936(0x1d3):_0x56a936(0x1f5)+(_0x5a1564[_0x56a936(0x1d9)]?.[_0x56a936(0x204)]??0x0)+_0x56a936(0x208)};},async 'execute'(_0x4154b2){const _0x3721ac=a95_0x2231f3;ensureRunnableContext(_0x4154b2[_0x3721ac(0x1c9)],_0x4154b2['selectedAppName']);const _0x386b4a=_0x4154b2[_0x3721ac(0x1c6)](_0x3721ac(0x1f9)),_0xf1b831=_0x4154b2['str']('params'),_0x4b4e6b=parseMode(_0x4154b2[_0x3721ac(0x1f8)](_0x3721ac(0x1cb))),_0x3ecf06=_0x4154b2['bool'](_0x3721ac(0x1d6)),_0x3d96f1=parseParams(_0xf1b831),_0x4edfbd=!!(_0x3d96f1['jsUrl']||_0x3d96f1['cssUrl']);if(_0x386b4a||_0x4edfbd&&!isInteractive()){const _0x3a05b4=await runMenuUpdateCore(_0x4154b2[_0x3721ac(0x1e1)],_0x4154b2['cookie'],_0xf1b831,{'mode':_0x4b4e6b,'force':_0x3ecf06});return _0x3a05b4[_0x3721ac(0x1e8)]?writeCliSideChannelLine(_0x3721ac(0x1d1)):(writeCliSideChannelLine(_0x3721ac(0x1da)+_0x3a05b4[_0x3721ac(0x1e3)]+'\x20menu(s)\x20updated'),_0x3a05b4[_0x3721ac(0x1d8)]>0x0&&writeCliSideChannelLine('!\x20'+_0x3a05b4[_0x3721ac(0x1d8)]+_0x3721ac(0x1ff))),{'ok':_0x3a05b4[_0x3721ac(0x1d8)]===0x0,'data':_0x3a05b4,'message':_0x3a05b4[_0x3721ac(0x1e8)]?'Menu\x20update\x20skipped':_0x3721ac(0x202)+_0x3a05b4['updated']+'\x20updated,\x20'+_0x3a05b4['failed']+'\x20failed.'};}requireInteractive();const _0x32d88b=startSpinner(_0x3721ac(0x1c7));let _0xd024a0;try{_0xd024a0=await fetchOnlineMenuList(_0x4154b2[_0x3721ac(0x1e1)],_0x4154b2['cookie']),stopSpinner(_0x32d88b,_0x3721ac(0x1df),!![]);}catch(_0x2a8f98){stopSpinner(_0x32d88b,_0x3721ac(0x1d5),![]);throw CliErrors[_0x3721ac(0x1ec)](_0x2a8f98 instanceof Error?_0x2a8f98[_0x3721ac(0x1e6)]:_0x3721ac(0x1d5));}const _0x533081=filterMenusWithResources(_0xd024a0);if(_0x533081[_0x3721ac(0x204)]===0x0)return writeCliSideChannelLine(a95_0x5e6d91['yellow'](_0x3721ac(0x1f6))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a95_0x5e6d91[_0x3721ac(0x1ea)]('\x20\x20Found\x20'+_0x533081[_0x3721ac(0x204)]+_0x3721ac(0x1fc))),writeCliSideChannelLine(renderUpdateSummary(_0x533081[_0x3721ac(0x207)](_0xc86210=>_0xc86210[_0x3721ac(0x1d4)]),[_0x3d96f1['jsUrl'],_0x3d96f1['cssUrl']])),writeCliSideChannelLine('');let _0xba60a1=_0x3d96f1[_0x3721ac(0x1f0)],_0x183741=_0x3d96f1[_0x3721ac(0x1f4)];!_0xba60a1&&(_0xba60a1=await askJsUrl());!_0x183741&&(_0x183741=await askCssUrl());const _0x23bcf2=await askConfirm(_0x3721ac(0x1f7)+_0x533081[_0x3721ac(0x204)]+_0x3721ac(0x1ce)+_0xba60a1+_0x3721ac(0x1d0)+_0x183741+'?');if(!_0x23bcf2)return writeCliSideChannelLine(a95_0x5e6d91[_0x3721ac(0x1e2)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x15e9e8=[_0xba60a1,_0x183741],_0x1203bb=startSpinner('Updating\x20'+_0x533081['length']+_0x3721ac(0x206));try{const _0x1f7302=await doUpdateCdnUrls(_0x4154b2['appCode'],_0x4154b2[_0x3721ac(0x205)],_0x533081,_0x15e9e8);return stopSpinner(_0x1203bb,_0x3721ac(0x1de)+_0x1f7302[_0x3721ac(0x1e3)]+'\x20menu(s)',_0x1f7302[_0x3721ac(0x1d8)]===0x0),{'ok':_0x1f7302[_0x3721ac(0x1d8)]===0x0,'data':_0x1f7302,'message':_0x1f7302[_0x3721ac(0x1d8)]>0x0?_0x3721ac(0x202)+_0x1f7302[_0x3721ac(0x1e3)]+_0x3721ac(0x1f3)+_0x1f7302['failed']+'\x20failed.':_0x3721ac(0x202)+_0x1f7302['updated']+_0x3721ac(0x1fe)};}catch(_0x18f21b){stopSpinner(_0x1203bb,_0x3721ac(0x1c8),![]);throw CliErrors[_0x3721ac(0x1ec)](_0x18f21b instanceof Error?_0x18f21b['message']:'Menu\x20update\x20failed');}}};function ensureRunnableContext(_0x1b97b5,_0x4942dd){const _0x430ccb=a95_0x2231f3,_0x2171cb=_0x1b97b5['appcode']?String(_0x1b97b5['appcode'])[_0x430ccb(0x1e9)]():'';if(!isInProject()&&!_0x4942dd&&!_0x2171cb)throw CliErrors[_0x430ccb(0x1ec)](_0x430ccb(0x1f1)+_0x430ccb(0x1ef));}function parseMode(_0x5a7fd8){const _0x406b07=a95_0x2231f3;if(!_0x5a7fd8)return _0x406b07(0x1ed);if(_0x5a7fd8===_0x406b07(0x1ed)||_0x5a7fd8===_0x406b07(0x1e0))return _0x5a7fd8;throw CliErrors['validation']('Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch');}function parseParams(_0x5516eb){const _0x5bdf44=a95_0x2231f3;if(!_0x5516eb)return{};try{const _0x150e32=JSON[_0x5bdf44(0x1ee)](_0x5516eb);if(typeof _0x150e32!=='object'||_0x150e32===null||Array[_0x5bdf44(0x1fa)](_0x150e32))return{};return{'jsUrl':typeof _0x150e32[_0x5bdf44(0x1f0)]===_0x5bdf44(0x1d7)?_0x150e32['jsUrl'][_0x5bdf44(0x1e9)]():undefined,'cssUrl':typeof _0x150e32[_0x5bdf44(0x1f4)]===_0x5bdf44(0x1d7)?_0x150e32['cssUrl']['trim']():undefined};}catch{return{};}}function a95_0x3d57(){const _0x13a16f=['Online\x20menu\x20list\x20fetched','patch','appCode','gray','updated','selectedAppName','update','message','bool','skipped','trim','cyan','954099cSofBG','validation','replace','parse','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','jsUrl','menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','264uDIfhg','\x20updated,\x20','cssUrl','Would\x20update\x20','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','\x20\x20Update\x20','str','yes','isArray','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','\x20menu(s)\x20with\x20existing\x20resources','1873791rKpngC','\x20updated.','\x20menu(s)\x20failed','4005150EEWRvA','47wxkAPa','Menu\x20update\x20completed:\x20','POST','length','cookie','\x20menu(s)...','map','\x20menu\x20resource\x20set(s).','flag','Fetching\x20online\x20menu\x20list...','Menu\x20update\x20failed','rawFlags','boolean','mode','21058kwFFWJ','params','\x20menu(s)\x20with\x20JS:\x20','3631544vHUNyF','\x20and\x20CSS:\x20','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','1498413bkRPkd','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','label','Failed\x20to\x20fetch\x20online\x20menu\x20list','force','string','failed','diffs','✓\x20Menu\x20update\x20completed:\x20','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','2489385kWIIUA','Updated\x20'];a95_0x3d57=function(){return _0x13a16f;};return a95_0x3d57();}
|