@lovrabet/rabetbase-cli 2.1.12-beta.2 → 2.1.12-beta.4
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/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
|
-
(function(
|
|
1
|
+
(function(_0x4e092a,_0x1a42c2){const _0x22e56d=a83_0x2846,_0x5740c1=_0x4e092a();while(!![]){try{const _0x11a493=parseInt(_0x22e56d(0x106))/0x1+-parseInt(_0x22e56d(0xfd))/0x2+-parseInt(_0x22e56d(0xf1))/0x3+parseInt(_0x22e56d(0x101))/0x4*(-parseInt(_0x22e56d(0xfc))/0x5)+-parseInt(_0x22e56d(0x105))/0x6+parseInt(_0x22e56d(0xfa))/0x7*(parseInt(_0x22e56d(0xf3))/0x8)+parseInt(_0x22e56d(0x108))/0x9*(parseInt(_0x22e56d(0x104))/0xa);if(_0x11a493===_0x1a42c2)break;else _0x5740c1['push'](_0x5740c1['shift']());}catch(_0x1245f1){_0x5740c1['push'](_0x5740c1['shift']());}}}(a83_0x18fd,0x4225e));function a83_0x2846(_0x2f828a,_0x331c5f){_0x2f828a=_0x2f828a-0xf0;const _0x18fd5c=a83_0x18fd();let _0x2846ca=_0x18fd5c[_0x2f828a];return _0x2846ca;}function strWidth(_0x40a2d1){const _0x3065f3=a83_0x2846;let _0x3ab6f0=0x0;for(const _0x2b61c8 of _0x40a2d1){_0x3ab6f0+=/[\u4e00-\u9fa5]/[_0x3065f3(0x109)](_0x2b61c8)?0x2:0x1;}return _0x3ab6f0;}function padRight(_0x64f017,_0x11077e){const _0x1fc203=a83_0x2846,_0x503de6=strWidth(_0x64f017);return _0x64f017+'\x20'[_0x1fc203(0x10a)](Math['max'](0x0,_0x11077e-_0x503de6));}export function renderCompareTable(_0x376ffa,_0x2b1c35={}){const _0x190da6=a83_0x2846;if(_0x376ffa['length']===0x0)return'';const _0x3fc484=_0x2b1c35['showOnline']??!![],_0x9303f9=Math['max'](0x1e,..._0x376ffa[_0x190da6(0xf6)](_0x4685de=>strWidth(_0x4685de[_0x190da6(0x102)]))),_0x28c271=0x4,_0x3e96b8=[],_0x2c2f76='\x20\x20'+padRight('Menu\x20Name',_0x9303f9),_0x57690a=padRight(_0x190da6(0x107),_0x28c271),_0x2a6af0=_0x3fc484?'\x20\x20'+padRight(_0x190da6(0x100),_0x28c271):'';_0x3e96b8[_0x190da6(0x10c)](_0x2c2f76+'\x20\x20'+_0x57690a+(_0x3fc484?_0x2a6af0:'')),_0x3e96b8[_0x190da6(0x10c)]('\x20\x20'+'─'['repeat'](_0x9303f9)+'\x20\x20'+'─'[_0x190da6(0x10a)](_0x28c271)+(_0x3fc484?'\x20\x20'+'─'[_0x190da6(0x10a)](_0x28c271):''));for(const _0x4baf29 of _0x376ffa){const _0x38457c=padRight(_0x4baf29[_0x190da6(0x102)],_0x9303f9),_0x31da98=_0x4baf29[_0x190da6(0x10b)]?'✓':'✗',_0x170282=padRight(_0x31da98,_0x28c271);let _0x201799='\x20\x20'+_0x38457c+'\x20\x20'+_0x170282;if(_0x3fc484){const _0x394789=_0x4baf29[_0x190da6(0xfe)]?'✓':'✗';_0x201799+='\x20\x20'+padRight(_0x394789,_0x28c271);}_0x3e96b8[_0x190da6(0x10c)](_0x201799);}return _0x3e96b8['join']('\x0a');}function a83_0x18fd(){const _0x587e20=['610886tNSlrZ','online','path','Platform','12ODlNff','label','length','10026530UHycBM','943770RKMrMq','168884sUzOuO','Local','9UKewrb','test','repeat','local','push','join','918819mLaGRL','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','40mTGBTq','\x20\x20\x20\x20JS:\x20\x20','(unchanged)','map','\x20\x20\x20\x20CSS:\x20','\x20\x20Affected\x20menus:\x20','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','275023LbqXLc','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','546715eEZcwC'];a83_0x18fd=function(){return _0x587e20;};return a83_0x18fd();}export function renderSyncSummary(_0x32fca0,_0x4704e8){const _0x37bf5f=a83_0x2846;if(_0x32fca0[_0x37bf5f(0x103)]===0x0)return _0x4704e8?_0x37bf5f(0xf9):'\x20\x20No\x20pages\x20to\x20sync.';const _0x49600b=['\x20\x20'+_0x32fca0[_0x37bf5f(0x103)]+'\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];for(const _0x960d8 of _0x32fca0){_0x49600b['push']('\x20\x20\x20\x20•\x20'+_0x960d8['label']+'\x20('+_0x960d8[_0x37bf5f(0xff)]+')');}return _0x49600b[_0x37bf5f(0xf0)]('\x0a');}export function renderUpdateSummary(_0xf2f5fc,_0x5373db){const _0x31819f=a83_0x2846;if(_0xf2f5fc[_0x31819f(0x103)]===0x0)return _0x31819f(0xf2);const _0x9b9ab6=['\x20\x20'+_0xf2f5fc[_0x31819f(0x103)]+_0x31819f(0xfb),_0x31819f(0xf4)+(_0x5373db[0x0]??'(unchanged)'),_0x31819f(0xf7)+(_0x5373db[0x1]??_0x31819f(0xf5)),'',_0x31819f(0xf8)+_0xf2f5fc[_0x31819f(0xf0)](',\x20')];return _0x9b9ab6[_0x31819f(0xf0)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x573030,_0x34e700){var _0x55c105=a84_0x2d05,_0xf833b2=_0x573030();while(!![]){try{var _0x23c3e9=parseInt(_0x55c105(0xa8))/0x1*(parseInt(_0x55c105(0xac))/0x2)+parseInt(_0x55c105(0xa9))/0x3*(-parseInt(_0x55c105(0xa5))/0x4)+-parseInt(_0x55c105(0xa4))/0x5+parseInt(_0x55c105(0xa6))/0x6*(parseInt(_0x55c105(0xab))/0x7)+-parseInt(_0x55c105(0xad))/0x8+parseInt(_0x55c105(0xaa))/0x9+-parseInt(_0x55c105(0xa7))/0xa;if(_0x23c3e9===_0x34e700)break;else _0xf833b2['push'](_0xf833b2['shift']());}catch(_0x3de5f0){_0xf833b2['push'](_0xf833b2['shift']());}}}(a84_0x3ef5,0xf1648));export*from'../../../commands/menu/shared/types.js';function a84_0x3ef5(){var _0x2ebdb8=['16pESyMS','6skzTDt','1551660dMNEOX','489fcaqVf','24843xyCJed','5382270SQtYdj','10398066idezNZ','1462Pmmkwn','5142552NBBfom','3105370pQXkrU'];a84_0x3ef5=function(){return _0x2ebdb8;};return a84_0x3ef5();}export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';function a84_0x2d05(_0x4b8c2f,_0x240410){_0x4b8c2f=_0x4b8c2f-0xa4;var _0x3ef535=a84_0x3ef5();var _0x2d0519=_0x3ef535[_0x4b8c2f];return _0x2d0519;}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
|
-
|
|
1
|
+
(function(_0xccb3,_0x376dbf){const _0x3bf610=a85_0x4fc5,_0x36a7ef=_0xccb3();while(!![]){try{const _0x11af35=parseInt(_0x3bf610(0x18e))/0x1+-parseInt(_0x3bf610(0x190))/0x2*(-parseInt(_0x3bf610(0x181))/0x3)+parseInt(_0x3bf610(0x177))/0x4+-parseInt(_0x3bf610(0x19b))/0x5*(-parseInt(_0x3bf610(0x18a))/0x6)+parseInt(_0x3bf610(0x195))/0x7*(-parseInt(_0x3bf610(0x17f))/0x8)+parseInt(_0x3bf610(0x18c))/0x9*(parseInt(_0x3bf610(0x196))/0xa)+-parseInt(_0x3bf610(0x185))/0xb;if(_0x11af35===_0x376dbf)break;else _0x36a7ef['push'](_0x36a7ef['shift']());}catch(_0x294402){_0x36a7ef['push'](_0x36a7ef['shift']());}}}(a85_0x45f1,0xe8de0));import a85_0x29111b from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';function a85_0x4fc5(_0x1d7171,_0x4d256d){_0x1d7171=_0x1d7171-0x174;const _0x45f1f4=a85_0x45f1();let _0x4fc561=_0x45f1f4[_0x1d7171];return _0x4fc561;}import a85_0x2d5397 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x26f1f2){const _0x3c20e9=a85_0x4fc5;return _0x26f1f2[_0x3c20e9(0x17b)](_0x147a10=>{const _0x74563a=_0x3c20e9;if(_0x147a10?.['name']==='ExitPromptError')throw CliErrors['cancelled'](_0x74563a(0x186));throw _0x147a10;});}export function startSpinner(_0x1007ad){const _0x16c5da=a85_0x4fc5;return a85_0x2d5397({'text':_0x1007ad,'color':_0x16c5da(0x1a0)})[_0x16c5da(0x194)]();}export function stopSpinner(_0x972f30,_0x2776f1,_0x3049a2){const _0x23b170=a85_0x4fc5;_0x3049a2?_0x972f30[_0x23b170(0x198)](_0x2776f1):_0x972f30[_0x23b170(0x189)](_0x2776f1);}export async function askConfirm(_0x146285){return onCancel(confirm({'message':_0x146285,'theme':{'prefix':''}}));}export async function askJsUrl(_0x5ed23c){const _0x4f494d=a85_0x4fc5;while(!![]){const _0x4db1a8=await onCancel(input({'message':_0x4f494d(0x19d),'default':_0x5ed23c,'theme':{'prefix':''}}));if(_0x4db1a8[_0x4f494d(0x188)]()==='')throw CliErrors[_0x4f494d(0x174)](_0x4f494d(0x186));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x4f494d(0x18d)](_0x4db1a8[_0x4f494d(0x188)]())){console[_0x4f494d(0x193)](a85_0x29111b['red'](_0x4f494d(0x182)));continue;}const _0x287ece=startSpinner(_0x4f494d(0x17a));try{const _0x6fadfd=await isUrlReachable(_0x4db1a8[_0x4f494d(0x188)]());stopSpinner(_0x287ece,_0x4f494d(0x187),_0x6fadfd);if(!_0x6fadfd){console[_0x4f494d(0x193)](a85_0x29111b['red'](_0x4f494d(0x17c)));continue;}return _0x4db1a8[_0x4f494d(0x188)]();}catch(_0x3d183f){stopSpinner(_0x287ece,'JS\x20URL\x20check\x20failed',![]);throw _0x3d183f;}}}export async function askCssUrl(_0x27f020){const _0x53def9=a85_0x4fc5;while(!![]){const _0x5808ce=await onCancel(input({'message':_0x53def9(0x191),'default':_0x27f020,'theme':{'prefix':''}}));if(_0x5808ce[_0x53def9(0x188)]()==='')throw CliErrors['cancelled'](_0x53def9(0x186));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x53def9(0x18d)](_0x5808ce[_0x53def9(0x188)]())){console[_0x53def9(0x193)](a85_0x29111b[_0x53def9(0x19e)](_0x53def9(0x17e)));continue;}const _0x19c5be=startSpinner(_0x53def9(0x192));try{const _0x4c2f3e=await isUrlReachable(_0x5808ce[_0x53def9(0x188)]());stopSpinner(_0x19c5be,'CSS\x20URL\x20checked',_0x4c2f3e);if(!_0x4c2f3e){console['error'](a85_0x29111b['red'](_0x53def9(0x19a)));continue;}return _0x5808ce[_0x53def9(0x188)]();}catch(_0x5ba980){stopSpinner(_0x19c5be,'CSS\x20URL\x20check\x20failed',![]);throw _0x5ba980;}}}function a85_0x45f1(){const _0x9a6090=['\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','5115296zMYIFO','filter','222DFOmmj','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','map','17236582hxBNva','Cancelled.','JS\x20URL\x20checked','trim','fail','18ypXLIq','gray','5803722cOdcxS','test','856872TsseoS','[already\x20on\x20platform]','20080kSvsld','\x20\x20CSS\x20URL:','\x20\x20Checking\x20CSS\x20URL\x20reachability...','error','start','7RvHVsI','10LPFtwq','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','succeed','label','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','1259145IEKTfY','path','\x20\x20JS\x20URL:','red','[new]','cyan','No\x20menus\x20selected.','stdin','length','cancelled','No\x20local\x20pages\x20found.','isTTY','640084yfNSKv','includes','green','\x20\x20Checking\x20JS\x20URL\x20reachability...','catch','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','has'];a85_0x45f1=function(){return _0x9a6090;};return a85_0x45f1();}export async function selectPages(_0x28dbcb,_0x5c4985,_0x540476){const _0x552e8a=a85_0x4fc5,_0x22ef2c=_0x28dbcb[_0x552e8a(0x184)](_0x2c9bd9=>({'name':_0x2c9bd9[_0x552e8a(0x199)]+'\x20\x20'+(_0x5c4985['has'](_0x2c9bd9[_0x552e8a(0x19c)])?a85_0x29111b[_0x552e8a(0x18b)](_0x552e8a(0x18f)):a85_0x29111b[_0x552e8a(0x179)](_0x552e8a(0x19f))),'value':_0x2c9bd9[_0x552e8a(0x199)],'checked':_0x540476?_0x540476[_0x552e8a(0x178)](_0x2c9bd9[_0x552e8a(0x199)]):!_0x5c4985[_0x552e8a(0x17d)](_0x2c9bd9[_0x552e8a(0x19c)])}));if(_0x22ef2c[_0x552e8a(0x1a3)]===0x0)throw new Error(_0x552e8a(0x175));const _0x5d868a=await onCancel(checkbox({'message':_0x552e8a(0x183),'choices':_0x22ef2c,'loop':![],'theme':{'prefix':''}}));if(_0x5d868a[_0x552e8a(0x1a3)]===0x0)throw new Error(_0x552e8a(0x1a1));return _0x28dbcb[_0x552e8a(0x180)](_0x55d939=>_0x5d868a[_0x552e8a(0x178)](_0x55d939[_0x552e8a(0x199)]));}export function isInteractive(){const _0x5cad50=a85_0x4fc5;return process[_0x5cad50(0x1a2)][_0x5cad50(0x176)]===!![];}export function requireInteractive(){const _0x51de48=a85_0x4fc5;if(!isInteractive())throw new Error(_0x51de48(0x197)+'Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a86_0x44f13e=a86_0x29d9;(function(_0x2e3c28,_0x220e85){const _0x41cc3c=a86_0x29d9,_0x43b714=_0x2e3c28();while(!![]){try{const _0x69501b=parseInt(_0x41cc3c(0x109))/0x1+-parseInt(_0x41cc3c(0xf8))/0x2+-parseInt(_0x41cc3c(0x107))/0x3*(parseInt(_0x41cc3c(0xf2))/0x4)+-parseInt(_0x41cc3c(0xf0))/0x5*(-parseInt(_0x41cc3c(0xfd))/0x6)+parseInt(_0x41cc3c(0xef))/0x7+-parseInt(_0x41cc3c(0xfb))/0x8*(-parseInt(_0x41cc3c(0xfa))/0x9)+-parseInt(_0x41cc3c(0xfc))/0xa;if(_0x69501b===_0x220e85)break;else _0x43b714['push'](_0x43b714['shift']());}catch(_0x27549c){_0x43b714['push'](_0x43b714['shift']());}}}(a86_0x3329,0xca0e1));function a86_0x29d9(_0x208277,_0x1a9044){_0x208277=_0x208277-0xef;const _0x33298c=a86_0x3329();let _0x29d92f=_0x33298c[_0x208277];return _0x29d92f;}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';function a86_0x3329(){const _0x3b2126=['9684045DpKebc','60mbbvwC','match','4ErpUqB','forEach','replace','concat','isDirectory','push','739416pcmkkI','src/pages','18OSdCka','5617544uqxtgp','32043010hliqCI','392880pEZaIo','join','slice','.tsx','filter','endsWith','index.tsx','split','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','utf-8','1549194cPZzhG','path','1344443mkThJy'];a86_0x3329=function(){return _0x3b2126;};return a86_0x3329();}const pagesDir=resolve(process['cwd'](),a86_0x44f13e(0xf9));export function extractTitleFromComment(_0x58e453){const _0x17336b=a86_0x44f13e;try{const _0x453f5f=readFileSync(_0x58e453,_0x17336b(0x106)),_0x465d60=_0x453f5f['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x465d60&&_0x465d60[0x1]){const _0x5161f1=_0x465d60[0x1],_0x2d59c4=_0x5161f1[_0x17336b(0xf1)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x2d59c4&&_0x2d59c4[0x1])return _0x2d59c4[0x1]['trim']();}let _0x3d5eab=null;const _0x308e19=_0x453f5f[_0x17336b(0xf1)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x308e19&&_0x308e19[0x1]&&(_0x3d5eab=_0x308e19[0x1]);if(!_0x3d5eab){const _0x21ca2d=_0x453f5f['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x21ca2d&&_0x21ca2d[0x1]&&(_0x3d5eab=_0x21ca2d[0x1]);}if(_0x3d5eab){const _0x3f04e0=new RegExp('\x5cb'+_0x3d5eab+_0x17336b(0x105)),_0x256064=_0x453f5f[_0x17336b(0xf1)](_0x3f04e0);if(_0x256064&&_0x256064[0x1])return _0x256064[0x1];return _0x3d5eab;}return null;}catch(_0x1a28fa){return null;}}export function getLocalPages(_0x262daf=pagesDir,_0x3236ed=pagesDir){const _0x4be864=a86_0x44f13e;let _0x55ab71=[];const _0x340943=readdirSync(_0x262daf);return _0x340943[_0x4be864(0xf3)](_0x2fe77f=>{const _0x59a9f8=_0x4be864,_0x1446b=join(_0x262daf,_0x2fe77f),_0x382a2b=statSync(_0x1446b);if(_0x382a2b&&_0x382a2b[_0x59a9f8(0xf6)]())_0x55ab71=_0x55ab71[_0x59a9f8(0xf5)](getLocalPages(_0x1446b,_0x3236ed));else{if(_0x2fe77f[_0x59a9f8(0x102)](_0x59a9f8(0x100))){let _0x21d7e6=relative(_0x3236ed,_0x1446b);_0x21d7e6[_0x59a9f8(0x102)](_0x59a9f8(0x103))?_0x21d7e6=_0x21d7e6[_0x59a9f8(0xf4)](/index\.tsx$/,''):_0x21d7e6=_0x21d7e6['replace'](/\.tsx$/,'');_0x21d7e6[_0x59a9f8(0x102)](sep)&&(_0x21d7e6=_0x21d7e6[_0x59a9f8(0xff)](0x0,-0x1));const _0x12a084=_0x21d7e6[_0x59a9f8(0x104)](sep)[_0x59a9f8(0xfe)]('/'),_0x3f2277=extractTitleFromComment(_0x1446b),_0x1cd650=_0x3f2277||_0x12a084;_0x55ab71[_0x59a9f8(0xf7)]({'path':_0x12a084['replaceAll']('$',':'),'label':_0x1cd650});}}}),_0x55ab71[_0x4be864(0x101)](_0x320cde=>_0x320cde[_0x4be864(0x108)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x196692,_0x248cf7){const _0x555b41=a87_0xc601,_0x233add=_0x196692();while(!![]){try{const _0x2d955b=parseInt(_0x555b41(0x18e))/0x1+-parseInt(_0x555b41(0x189))/0x2+parseInt(_0x555b41(0x19d))/0x3+parseInt(_0x555b41(0x182))/0x4*(parseInt(_0x555b41(0x196))/0x5)+-parseInt(_0x555b41(0x191))/0x6*(-parseInt(_0x555b41(0x185))/0x7)+parseInt(_0x555b41(0x188))/0x8*(parseInt(_0x555b41(0x197))/0x9)+-parseInt(_0x555b41(0x198))/0xa;if(_0x2d955b===_0x248cf7)break;else _0x233add['push'](_0x233add['shift']());}catch(_0x487bc3){_0x233add['push'](_0x233add['shift']());}}}(a87_0x5679,0x4ca18));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(_0x52e2d6){const _0x552ac8=a87_0xc601,_0x20ae50=[];return!isValidJsHttpsUrl(_0x52e2d6)&&_0x20ae50[_0x552ac8(0x190)]('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x20ae50[_0x552ac8(0x183)]===0x0,'errors':_0x20ae50};}export function validateCssUrl(_0x331449){const _0x31d108=a87_0xc601,_0x2802a9=[];return!isValidCssHttpsUrl(_0x331449)&&_0x2802a9[_0x31d108(0x190)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x2802a9[_0x31d108(0x183)]===0x0,'errors':_0x2802a9};}function a87_0xc601(_0x10e76e,_0xd0f591){_0x10e76e=_0x10e76e-0x182;const _0x5679ab=a87_0x5679();let _0xc60105=_0x5679ab[_0x10e76e];return _0xc60105;}export async function validateJsUrlReachable(_0x5b68f3){const _0x86a4ef=a87_0xc601,_0xda13e5=validateJsUrl(_0x5b68f3);if(!_0xda13e5['ok'])return _0xda13e5;const _0xad3ec3=await isUrlReachable(_0x5b68f3);if(!_0xad3ec3)_0xda13e5[_0x86a4ef(0x194)][_0x86a4ef(0x190)](_0x86a4ef(0x192));return{'ok':_0xda13e5[_0x86a4ef(0x194)][_0x86a4ef(0x183)]===0x0,'errors':_0xda13e5[_0x86a4ef(0x194)]};}export async function validateCssUrlReachable(_0x394385){const _0x2a2a87=a87_0xc601,_0x3f2415=validateCssUrl(_0x394385);if(!_0x3f2415['ok'])return _0x3f2415;const _0x4336c0=await isUrlReachable(_0x394385);if(!_0x4336c0)_0x3f2415[_0x2a2a87(0x194)][_0x2a2a87(0x190)](_0x2a2a87(0x18b));return{'ok':_0x3f2415[_0x2a2a87(0x194)][_0x2a2a87(0x183)]===0x0,'errors':_0x3f2415[_0x2a2a87(0x194)]};}export function buildCompareRows(_0x39e315,_0x19ad9b){const _0x32f985=a87_0xc601;return _0x39e315[_0x32f985(0x18f)](_0x209118=>({'label':_0x209118['label'],'path':_0x209118[_0x32f985(0x19e)],'local':!![],'online':_0x19ad9b[_0x32f985(0x19b)](_0x209118['path'])}));}export function filterNewPages(_0x32f94a,_0x5e256d,_0x1b63b0){const _0x310d6c=a87_0xc601;if(_0x1b63b0&&_0x1b63b0[_0x310d6c(0x183)]>0x0){const _0xddd49=new Set(_0x1b63b0[_0x310d6c(0x18f)](_0x288ebe=>_0x288ebe[_0x310d6c(0x187)]())),_0x2c4544=_0x32f94a[_0x310d6c(0x186)](_0x10f20a=>_0xddd49[_0x310d6c(0x19b)](_0x10f20a['label']));if(_0x2c4544[_0x310d6c(0x183)]===0x0)throw new Error(_0x310d6c(0x19c)+[..._0xddd49][_0x310d6c(0x18d)](',\x20'));return _0x2c4544;}return _0x32f94a[_0x310d6c(0x186)](_0x392610=>!_0x5e256d[_0x310d6c(0x19b)](_0x392610['path']));}export function filterPagesByLabels(_0x370927,_0x513411){const _0x19927a=a87_0xc601,_0x2fd1d3=[],_0x52e725=[];for(const _0x2ec071 of _0x513411){const _0x12d29b=_0x2ec071[_0x19927a(0x187)](),_0x54e2ec=_0x370927[_0x19927a(0x195)](_0x32350d=>_0x32350d[_0x19927a(0x18a)]===_0x12d29b);if(_0x54e2ec)_0x2fd1d3[_0x19927a(0x190)](_0x54e2ec);else _0x52e725[_0x19927a(0x190)](_0x2ec071);}return{'matched':_0x2fd1d3,'unmatched':_0x52e725};}export async function doCreateMenus(_0x5d08e6,_0x3b4a3c,_0x3a0f4f,_0xf0cbbe){const _0x1d90e4=await createMenus(_0x5d08e6,_0x3b4a3c,_0x3a0f4f,_0xf0cbbe);return{'created':_0x1d90e4['length'],'failed':0x0,'labels':_0x3a0f4f['map'](_0x564b70=>_0x564b70['label']),'menus':_0x1d90e4};}export function filterMenusWithResources(_0x4f2180){const _0x919fe5=a87_0xc601;return _0x4f2180[_0x919fe5(0x186)](_0x53c3c8=>_0x53c3c8[_0x919fe5(0x199)][_0x919fe5(0x183)]>0x0);}export async function doUpdateCdnUrls(_0x1a0d54,_0x20254e,_0x3c7831,_0x57dcd4){const _0x1599ae=a87_0xc601,_0x16a79f=_0x3c7831['filter'](_0x276eb3=>_0x276eb3[_0x1599ae(0x199)][_0x1599ae(0x183)]>0x0),_0x338dbe=await Promise[_0x1599ae(0x18c)](_0x16a79f[_0x1599ae(0x18f)](_0x475ffe=>updateMenuCdnUrl(_0x1a0d54,_0x20254e,{'id':_0x475ffe['id'],'label':_0x475ffe[_0x1599ae(0x18a)],'path':_0x475ffe['path'],'resources':_0x57dcd4,'extend':_0x475ffe[_0x1599ae(0x184)]??null}))),_0x381020=_0x338dbe[_0x1599ae(0x186)](_0x308f64=>_0x308f64[_0x1599ae(0x193)]===_0x1599ae(0x19a))[_0x1599ae(0x18f)](_0x16df81=>_0x16df81['value']),_0x13866b=_0x338dbe[_0x1599ae(0x186)](_0xd6fda0=>_0xd6fda0['status']==='rejected')[_0x1599ae(0x183)];return{'updated':_0x381020[_0x1599ae(0x183)],'failed':_0x13866b,'menus':_0x381020};}export async function fetchMenuData(_0x5a0d50,_0x40d776){const _0x534b4e=a87_0xc601,_0xf049d8=getLocalPages(),_0x232abd=await getOnlineMenuList(_0x5a0d50,_0x40d776),_0x2a994b=new Set(_0x232abd[_0x534b4e(0x18f)](_0x436fa9=>_0x436fa9[_0x534b4e(0x19e)]));return{'localPages':_0xf049d8,'onlineMenuList':_0x232abd,'onlinePaths':_0x2a994b};}function a87_0x5679(){const _0x1b05dc=['932464kydxWQ','label','CSS\x20URL\x20is\x20unreachable','allSettled','join','151139phElPF','map','push','54yfZfNp','JS\x20URL\x20is\x20unreachable','status','errors','find','252085tJtUyg','333QZBfxh','6292290gGVKnR','resources','fulfilled','has','No\x20local\x20pages\x20matched\x20labels:\x20','1293336awWLVi','path','48QMdDaR','length','extend','92127bqLsjX','filter','trim','22408fHctwh'];a87_0x5679=function(){return _0x1b05dc;};return a87_0x5679();}export async function fetchOnlineMenuList(_0x39d06c,_0x314911){return getOnlineMenuList(_0x39d06c,_0x314911);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4627d4,_0x17f14a){const _0x3991b5=a88_0x4c7c,_0x5bcf72=_0x4627d4();while(!![]){try{const _0x57f683=-parseInt(_0x3991b5(0x12a))/0x1*(parseInt(_0x3991b5(0x107))/0x2)+-parseInt(_0x3991b5(0x121))/0x3*(-parseInt(_0x3991b5(0x10b))/0x4)+-parseInt(_0x3991b5(0x120))/0x5+-parseInt(_0x3991b5(0x129))/0x6+parseInt(_0x3991b5(0x10a))/0x7*(parseInt(_0x3991b5(0x11a))/0x8)+-parseInt(_0x3991b5(0x105))/0x9*(-parseInt(_0x3991b5(0x114))/0xa)+parseInt(_0x3991b5(0x11b))/0xb;if(_0x57f683===_0x17f14a)break;else _0x5bcf72['push'](_0x5bcf72['shift']());}catch(_0x341fa5){_0x5bcf72['push'](_0x5bcf72['shift']());}}}(a88_0x5913,0xe792a));function a88_0x5913(){const _0x144479=['5199180AiwUtX','2643159ySbTZA','create-menus','string','get-online-menu-list','Update\x20menu\x20assets\x20\x22','stringify','Fetch\x20menu\x20list','Creating\x20menu:\x20','6506652rwdjhY','49gflxgK','\x20online\x20menus\x20successfully','label','import','length','procode','POST','8038179GqAevG','path','28066PNQLNx','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Fetched\x20','53319FlgoCu','4DteUcC','map','create-menu','children','flat','extend','Create\x20menu\x20\x22','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Menu\x20created\x20successfully:\x20','10SGJnRr','isArray','Start\x20batch\x20menu\x20creation,\x20total\x20','info','update-menu-cdn-url','resources','1488hIlZRs','6264181mepLRF','/smartapi/menu/create','all','/smartapi/menu/find?appCode=','Server\x20returned\x20empty\x20menu\x20list'];a88_0x5913=function(){return _0x144479;};return a88_0x5913();}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';function a88_0x4c7c(_0x5df2b3,_0x4b085d){_0x5df2b3=_0x5df2b3-0x101;const _0x591372=a88_0x5913();let _0x4c7c69=_0x591372[_0x5df2b3];return _0x4c7c69;}export async function getOnlineMenuList(_0x53c575,_0x26a49f){const _0x311d7c=a88_0x4c7c,_0x2e459b=getEnv();logger[_0x311d7c(0x117)]('get-online-menu-list',isProduction(_0x2e459b)?_0x311d7c(0x108)+_0x53c575+')':_0x311d7c(0x112)+_0x53c575+')');const _0x1da501=await platformFetch(getApiDomain()+_0x311d7c(0x11e)+_0x53c575,{'cookie':_0x26a49f,'label':_0x311d7c(0x127)});if(!_0x1da501)return logger[_0x311d7c(0x117)](_0x311d7c(0x124),_0x311d7c(0x11f)),[];return logger[_0x311d7c(0x117)](_0x311d7c(0x124),_0x311d7c(0x109)+_0x1da501[_0x311d7c(0x102)]+_0x311d7c(0x12b)),_0x1da501[_0x311d7c(0x10c)](flattenMenuItem)[_0x311d7c(0x10f)]();}function flattenMenuItem(_0x3c33f1){const _0x26619f=a88_0x4c7c;let _0x4da86c=[];try{const _0x2eb13e=_0x3c33f1[_0x26619f(0x110)]?.['resources'];if(typeof _0x2eb13e===_0x26619f(0x123)){const _0x4fe503=JSON['parse'](_0x2eb13e);if(Array[_0x26619f(0x115)](_0x4fe503))_0x4da86c=_0x4fe503[_0x26619f(0x10c)](String);}else Array['isArray'](_0x2eb13e)&&(_0x4da86c=_0x2eb13e[_0x26619f(0x10c)](String));}catch{}const _0x224314=[{'id':_0x3c33f1['id'],'path':_0x3c33f1[_0x26619f(0x106)],'label':_0x3c33f1[_0x26619f(0x12c)],'resources':_0x4da86c,'extend':_0x3c33f1[_0x26619f(0x110)]??null}];if(_0x3c33f1[_0x26619f(0x10e)]&&_0x3c33f1[_0x26619f(0x10e)]['length']>0x0)for(const _0x1727d1 of _0x3c33f1['children']){_0x224314['push'](...flattenMenuItem(_0x1727d1));}return _0x224314;}export async function createMenu(_0x6bb824,_0x5c7254,_0x5267d3){const _0x3131cf=a88_0x4c7c;logger[_0x3131cf(0x117)](_0x3131cf(0x10d),_0x3131cf(0x128)+_0x5267d3[_0x3131cf(0x12c)]+'\x20('+_0x5267d3['path']+')');const _0x4b8848={'appCode':_0x6bb824,'type':_0x3131cf(0x103),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x5267d3[_0x3131cf(0x119)]?JSON[_0x3131cf(0x126)](_0x5267d3[_0x3131cf(0x119)]):undefined},..._0x5267d3},_0x414dab=await platformFetch(getApiDomain()+_0x3131cf(0x11c),{'method':_0x3131cf(0x104),'body':_0x4b8848,'cookie':_0x5c7254,'label':_0x3131cf(0x111)+_0x5267d3[_0x3131cf(0x12c)]+'\x22'});return logger[_0x3131cf(0x117)]('create-menu',_0x3131cf(0x113)+_0x5267d3[_0x3131cf(0x12c)]),_0x414dab;}async function createSingleMenu(_0x44adbb,_0x573931,_0x488a28,_0x1dd852){const _0x24a888=a88_0x4c7c,_0x38d760={'appCode':_0x44adbb,'type':_0x24a888(0x103),'sort':0x0,'extend':{'loadScriptMode':_0x24a888(0x101),'resources':_0x1dd852?JSON[_0x24a888(0x126)](_0x1dd852):undefined},'label':_0x488a28['label'],'path':_0x488a28[_0x24a888(0x106)]},_0x56c20d=await platformFetch(getApiDomain()+_0x24a888(0x11c),{'method':'POST','body':_0x38d760,'cookie':_0x573931,'label':_0x24a888(0x111)+_0x488a28[_0x24a888(0x12c)]+'\x22'});return logger[_0x24a888(0x117)]('create-menu',_0x24a888(0x113)+_0x488a28[_0x24a888(0x12c)]),_0x56c20d;}export async function createMenus(_0x2e71d6,_0x5f2d49,_0x5ccc05,_0x191f09){const _0x29ccf6=a88_0x4c7c;logger['info']('create-menus',_0x29ccf6(0x116)+_0x5ccc05['length']);const _0x26858e=await Promise[_0x29ccf6(0x11d)](_0x5ccc05[_0x29ccf6(0x10c)](_0x40585a=>createSingleMenu(_0x2e71d6,_0x5f2d49,_0x40585a,_0x191f09)));return logger[_0x29ccf6(0x117)](_0x29ccf6(0x122),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x5ccc05['length']),_0x26858e;}export async function updateMenuCdnUrl(_0x2e906f,_0x20d461,_0x19ceba){const _0x9a2a67=a88_0x4c7c;logger[_0x9a2a67(0x117)](_0x9a2a67(0x118),'Updating\x20menu\x20asset\x20links:\x20'+_0x19ceba[_0x9a2a67(0x12c)]+'\x20('+_0x19ceba['path']+')');const _0x4fedb1={'id':_0x19ceba['id'],'appCode':_0x2e906f,'extend':{..._0x19ceba['extend']??{},'loadScriptMode':_0x9a2a67(0x101),'resources':_0x19ceba[_0x9a2a67(0x119)]?JSON['stringify'](_0x19ceba[_0x9a2a67(0x119)]):undefined}},_0x4be7c8=await platformFetch(getApiDomain()+'/smartapi/menu/update',{'method':_0x9a2a67(0x104),'body':_0x4fedb1,'cookie':_0x20d461,'label':_0x9a2a67(0x125)+_0x19ceba[_0x9a2a67(0x12c)]+'\x22'});return logger[_0x9a2a67(0x117)](_0x9a2a67(0x118),'Menu\x20assets\x20synced:\x20'+_0x19ceba[_0x9a2a67(0x12c)],undefined),_0x4be7c8;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47da38,_0x5a43c8){const _0x29ae52=a89_0x5c33,_0x78f87c=_0x47da38();while(!![]){try{const _0xcc9cab=-parseInt(_0x29ae52(0x1ab))/0x1+-parseInt(_0x29ae52(0x1a8))/0x2+parseInt(_0x29ae52(0x1a9))/0x3*(parseInt(_0x29ae52(0x1aa))/0x4)+-parseInt(_0x29ae52(0x196))/0x5*(-parseInt(_0x29ae52(0x194))/0x6)+parseInt(_0x29ae52(0x18c))/0x7*(-parseInt(_0x29ae52(0x189))/0x8)+parseInt(_0x29ae52(0x1a6))/0x9+parseInt(_0x29ae52(0x18a))/0xa*(parseInt(_0x29ae52(0x18d))/0xb);if(_0xcc9cab===_0x5a43c8)break;else _0x78f87c['push'](_0x78f87c['shift']());}catch(_0x3deb18){_0x78f87c['push'](_0x78f87c['shift']());}}}(a89_0x38a7,0x90868));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a89_0x38a7(){const _0x2d4bd9=['940070DZBnES','jsUrl','7548919UDhibR','319dhVjFF','utf8','join','push','has','length','startsWith','729258fKnfau','stdin','15jkvrJh','Start\x20non-interactive\x20menu\x20sync','Invalid\x20--params:\x20','setLogPath','pages','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','isTTY','cwd','trim','readableEnded','label','--params.','info','Menu\x20sync\x20completed','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','isArray','4033296eahGSV','map','2351932llAniY','11187ZFgiZs','160FxwZbi','841777UerOit','split','string','cssUrl','\x0a\x20\x20Available\x20local\x20pages:\x20','JS\x20URL\x20is\x20unreachable:\x20','parse','field','filter','menu-sync','data','CSS\x20URL\x20is\x20unreachable:\x20','message','concat','8xOLBex'];a89_0x38a7=function(){return _0x2d4bd9;};return a89_0x38a7();}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a89_0x5c33(_0x5cdf49,_0x385d8d){_0x5cdf49=_0x5cdf49-0x187;const _0x38a729=a89_0x38a7();let _0x5c3351=_0x38a729[_0x5cdf49];return _0x5c3351;}import{logger}from'../../../utils/logger.js';function validateParams(_0x415ea0){const _0x9cc5b0=a89_0x5c33,_0xcdebc6=[];return _0x415ea0[_0x9cc5b0(0x18b)]&&!isValidJsHttpsUrl(_0x415ea0[_0x9cc5b0(0x18b)])&&_0xcdebc6[_0x9cc5b0(0x190)]({'field':_0x9cc5b0(0x18b),'message':_0x9cc5b0(0x19b)}),_0x415ea0['cssUrl']&&!isValidCssHttpsUrl(_0x415ea0['cssUrl'])&&_0xcdebc6['push']({'field':_0x9cc5b0(0x1ae),'message':_0x9cc5b0(0x1a4)}),_0xcdebc6;}export async function runMenuSyncCore(_0x50adc6,_0x14ec36,_0x2f3702=[],_0x3f2771){const _0x3db6d1=a89_0x5c33,_0x4bd2c7=parseParamsFlag(_0x3f2771),_0x14a251=_0x2f3702[_0x3db6d1(0x192)]>0x0?_0x2f3702:_0x4bd2c7['selectedLabels'],_0x424381=_0x4bd2c7['jsUrl'],_0x481894=_0x4bd2c7[_0x3db6d1(0x1ae)],_0x4f4e70=[];if(_0x424381)_0x4f4e70['push'](_0x424381);if(_0x481894)_0x4f4e70[_0x3db6d1(0x190)](_0x481894);const _0x352c88=validateParams(_0x4bd2c7);if(_0x352c88[_0x3db6d1(0x192)]>0x0){const _0x3825e3=_0x352c88[_0x3db6d1(0x1a7)](_0x144a63=>_0x3db6d1(0x1a1)+_0x144a63[_0x3db6d1(0x1b2)]+':\x20'+_0x144a63[_0x3db6d1(0x187)])[_0x3db6d1(0x18f)](';\x20');throw new Error(_0x3db6d1(0x198)+_0x3825e3);}logger[_0x3db6d1(0x199)](process[_0x3db6d1(0x19d)]()),logger[_0x3db6d1(0x1a2)]('menu-sync',_0x3db6d1(0x197),{'appCode':_0x50adc6,'selectedCount':_0x14a251?.[_0x3db6d1(0x192)],'jsUrl':_0x424381,'cssUrl':_0x481894});if(_0x424381){const _0x208e5a=await isUrlReachable(_0x424381);if(!_0x208e5a)throw new Error(_0x3db6d1(0x1b0)+_0x424381);}if(_0x481894){const _0x2cd6a0=await isUrlReachable(_0x481894);if(!_0x2cd6a0)throw new Error(_0x3db6d1(0x1b6)+_0x481894);}const _0x4a5792=getLocalPages();if(_0x4a5792[_0x3db6d1(0x192)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x2f5af0=await getOnlineMenuList(_0x50adc6,_0x14ec36),_0x5846af=new Set(_0x2f5af0['map'](_0x1e1f80=>_0x1e1f80['path']));let _0x1fcf3d;if(_0x14a251&&_0x14a251[_0x3db6d1(0x192)]>0x0){const _0xc99097=new Set(_0x14a251[_0x3db6d1(0x1a7)](_0x517af9=>_0x517af9['trim']()));_0x1fcf3d=_0x4a5792[_0x3db6d1(0x1b3)](_0x4c53df=>_0xc99097[_0x3db6d1(0x191)](_0x4c53df[_0x3db6d1(0x1a0)]));if(_0x1fcf3d[_0x3db6d1(0x192)]===0x0){const _0x33b335=_0x4a5792[_0x3db6d1(0x1a7)](_0x272313=>_0x272313[_0x3db6d1(0x1a0)])[_0x3db6d1(0x18f)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0xc99097][_0x3db6d1(0x18f)](',\x20')+_0x3db6d1(0x1af)+_0x33b335);}}else _0x1fcf3d=_0x4a5792['filter'](_0x41f780=>!_0x5846af[_0x3db6d1(0x191)](_0x41f780['path']));if(_0x1fcf3d[_0x3db6d1(0x192)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x2bdea9=await createMenus(_0x50adc6,_0x14ec36,_0x1fcf3d,_0x4f4e70['length']>0x0?_0x4f4e70:undefined);return logger['info'](_0x3db6d1(0x1b4),_0x3db6d1(0x1a3),{'count':_0x1fcf3d[_0x3db6d1(0x192)],'resources':_0x4f4e70}),{'created':_0x2bdea9[_0x3db6d1(0x192)],'skipped':![],'targetPages':_0x1fcf3d,'menus':_0x2bdea9};}export async function readPageLabelsFromStdin(){const _0x1938ce=a89_0x5c33;if(!process['stdin'][_0x1938ce(0x19c)]&&!process['stdin'][_0x1938ce(0x19f)])return new Promise(_0x43a739=>{const _0x7e59ac=_0x1938ce,_0xfa427c=[];process[_0x7e59ac(0x195)]['on'](_0x7e59ac(0x1b5),_0x4022a4=>_0xfa427c['push'](_0x4022a4)),process[_0x7e59ac(0x195)]['on']('end',()=>{const _0x5b00e1=_0x7e59ac,_0x5dcae7=Buffer[_0x5b00e1(0x188)](_0xfa427c)['toString'](_0x5b00e1(0x18e)),_0x28bf50=_0x5dcae7[_0x5b00e1(0x1ac)]('\x0a')['map'](_0x1d6897=>_0x1d6897[_0x5b00e1(0x19e)]())['filter'](_0xc7954=>_0xc7954[_0x5b00e1(0x192)]>0x0&&!_0xc7954[_0x5b00e1(0x193)]('#'));_0x43a739(_0x28bf50);}),setTimeout(()=>_0x43a739([]),0x1f4);});return[];}function parseParamsFlag(_0x34feb3){const _0x4163a0=a89_0x5c33;if(!_0x34feb3||typeof _0x34feb3!=='string')return{};try{const _0xcd44c8=JSON[_0x4163a0(0x1b1)](_0x34feb3);if(typeof _0xcd44c8!=='object'||_0xcd44c8===null||Array[_0x4163a0(0x1a5)](_0xcd44c8))return{};return{'selectedLabels':Array[_0x4163a0(0x1a5)](_0xcd44c8[_0x4163a0(0x19a)])?_0xcd44c8[_0x4163a0(0x19a)][_0x4163a0(0x1a7)](String):undefined,'jsUrl':typeof _0xcd44c8[_0x4163a0(0x18b)]===_0x4163a0(0x1ad)?_0xcd44c8[_0x4163a0(0x18b)]['trim']():undefined,'cssUrl':typeof _0xcd44c8[_0x4163a0(0x1ae)]===_0x4163a0(0x1ad)?_0xcd44c8[_0x4163a0(0x1ae)][_0x4163a0(0x19e)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a91_0x4e8d(){const _0x19132f=['extend','path','resources','dryRun','filter','Invalid\x20--params:\x20','force','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','trim','Start\x20non-interactive\x20menu\x20update','value','.js','push','length','label','menu-update','cwd','split','Menu\x20update\x20completed','endsWith','string','unshift','isArray','patch','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','56qukZFp','8AfRDAQ','--params.','mode','161133UJuDXX','field','16996unmKWP','fulfilled','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','info','4419600PcbJOj','allSettled','\x22\x20(','1068255DgdIed','11vSrGBM','jsUrl','status','map','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','some','setLogPath','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','object','.\x20Allowed\x20values:\x20replace,\x20patch','199034pKJKDV','11777630hWlXpO',').\x20','1882560SELwGP','3804sWRFlQ','toLowerCase','rejected','cssUrl'];a91_0x4e8d=function(){return _0x19132f;};return a91_0x4e8d();}(function(_0x2986c9,_0x37604c){const _0x10cd09=a91_0x114e,_0x7c9e42=_0x2986c9();while(!![]){try{const _0x585c6e=parseInt(_0x10cd09(0xa3))/0x1+parseInt(_0x10cd09(0xc4))/0x2*(parseInt(_0x10cd09(0xc8))/0x3)+-parseInt(_0x10cd09(0xa6))/0x4+-parseInt(_0x10cd09(0xce))/0x5+parseInt(_0x10cd09(0xa7))/0x6*(parseInt(_0x10cd09(0xca))/0x7)+parseInt(_0x10cd09(0xc5))/0x8*(parseInt(_0x10cd09(0xd1))/0x9)+parseInt(_0x10cd09(0xa4))/0xa*(-parseInt(_0x10cd09(0x99))/0xb);if(_0x585c6e===_0x37604c)break;else _0x7c9e42['push'](_0x7c9e42['shift']());}catch(_0x51e53f){_0x7c9e42['push'](_0x7c9e42['shift']());}}}(a91_0x4e8d,0xca4fa));function a91_0x114e(_0x1947e3,_0x36ad92){_0x1947e3=_0x1947e3-0x99;const _0x4e8d27=a91_0x4e8d();let _0x114e5e=_0x4e8d27[_0x1947e3];return _0x114e5e;}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x59997c){const _0x48d005=a91_0x114e,_0x167668=[];return _0x59997c[_0x48d005(0x9a)]&&!isValidJsHttpsUrl(_0x59997c[_0x48d005(0x9a)])&&_0x167668['push']({'field':_0x48d005(0x9a),'message':_0x48d005(0xc3)}),_0x59997c[_0x48d005(0xaa)]&&!isValidCssHttpsUrl(_0x59997c[_0x48d005(0xaa)])&&_0x167668['push']({'field':_0x48d005(0xaa),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x167668;}export async function runMenuUpdateCore(_0x1dd4bf,_0x2c2506,_0x1aba76,_0x534780={}){const _0x1c1537=a91_0x114e,_0x38a75a=parseUpdateParamsFlag(_0x1aba76),_0x4b0cd8=normalizeMode(_0x534780[_0x1c1537(0xc7)]),_0x424453=[];if(_0x38a75a[_0x1c1537(0x9a)])_0x424453[_0x1c1537(0xb7)](_0x38a75a[_0x1c1537(0x9a)]);if(_0x38a75a[_0x1c1537(0xaa)])_0x424453['push'](_0x38a75a[_0x1c1537(0xaa)]);const _0x36a130=validateParams(_0x38a75a);if(_0x36a130[_0x1c1537(0xb8)]>0x0){const _0x16cc43=_0x36a130[_0x1c1537(0x9c)](_0x3d1036=>_0x1c1537(0xc6)+_0x3d1036[_0x1c1537(0xc9)]+':\x20'+_0x3d1036['message'])['join'](';\x20');throw new Error(_0x1c1537(0xb0)+_0x16cc43);}if(_0x424453[_0x1c1537(0xb8)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x1c1537(0xa0));logger[_0x1c1537(0x9f)](process[_0x1c1537(0xbb)]()),logger[_0x1c1537(0xcd)](_0x1c1537(0xba),_0x1c1537(0xb4),{'appCode':_0x1dd4bf,'jsUrl':_0x38a75a['jsUrl'],'cssUrl':_0x38a75a['cssUrl'],'mode':_0x4b0cd8,'dryRun':_0x534780[_0x1c1537(0xae)]===!![]});if(_0x38a75a[_0x1c1537(0x9a)]){const _0x1a4df1=await isUrlReachable(_0x38a75a[_0x1c1537(0x9a)]);if(!_0x1a4df1)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x38a75a[_0x1c1537(0x9a)]);}if(_0x38a75a[_0x1c1537(0xaa)]){const _0x172129=await isUrlReachable(_0x38a75a[_0x1c1537(0xaa)]);if(!_0x172129)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x38a75a[_0x1c1537(0xaa)]);}const _0xaa071=await getOnlineMenuList(_0x1dd4bf,_0x2c2506),_0x3f8174=_0xaa071[_0x1c1537(0xaf)](_0x4225c2=>_0x4225c2['resources'][_0x1c1537(0xb8)]>0x0);if(_0x3f8174[_0x1c1537(0xb8)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x534780[_0x1c1537(0xae)]===!![]};const _0x2079d7=_0x3f8174[_0x1c1537(0x9c)](_0x41ec06=>buildMenuUpdateDiff(_0x41ec06,_0x38a75a,_0x4b0cd8,_0x534780[_0x1c1537(0xb1)]===!![]));if(_0x534780[_0x1c1537(0xae)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x2079d7};const _0x25f35d=await Promise[_0x1c1537(0xcf)](_0x3f8174['map']((_0x1ab929,_0x1e86b4)=>updateMenuCdnUrl(_0x1dd4bf,_0x2c2506,{'id':_0x1ab929['id'],'label':_0x1ab929[_0x1c1537(0xb9)],'path':_0x1ab929['path'],'resources':_0x2079d7[_0x1e86b4]['after'][_0x1c1537(0xad)],'extend':_0x1ab929[_0x1c1537(0xab)]??null}))),_0x1a3205=_0x25f35d[_0x1c1537(0xaf)](_0x5285e1=>_0x5285e1[_0x1c1537(0x9b)]===_0x1c1537(0xcb))[_0x1c1537(0x9c)](_0x551dd2=>_0x551dd2[_0x1c1537(0xb5)]),_0x5a1a25=_0x25f35d[_0x1c1537(0xaf)](_0x4f5778=>_0x4f5778[_0x1c1537(0x9b)]===_0x1c1537(0xa9))[_0x1c1537(0xb8)];return logger[_0x1c1537(0xcd)](_0x1c1537(0xba),_0x1c1537(0xbd),{'count':_0x3f8174[_0x1c1537(0xb8)],'resources':_0x424453}),{'updated':_0x1a3205['length'],'failed':_0x5a1a25,'skipped':![],'menus':_0x1a3205};}function normalizeMode(_0x509d7c){const _0x70f673=a91_0x114e;if(!_0x509d7c)return'replace';if(_0x509d7c==='replace'||_0x509d7c==='patch')return _0x509d7c;throw new Error('Invalid\x20--mode:\x20'+_0x509d7c+_0x70f673(0xa2));}function buildMenuUpdateDiff(_0x11ee5d,_0x21b7b8,_0x4bb451,_0x1402cf){const _0x543383=a91_0x114e,_0x2af3c=[..._0x11ee5d['resources']],_0x1fe417=_0x4bb451===_0x543383(0xc2)?patchResources(_0x2af3c,_0x21b7b8):replaceResources(_0x21b7b8),_0xcac4a=[],_0x40452f=_0x2af3c[_0x543383(0x9e)](isJsResource),_0xd5742c=_0x1fe417['some'](isJsResource);if(_0x40452f&&!_0xd5742c){const _0x15f25f=_0x543383(0xcc)+_0x11ee5d[_0x543383(0xb9)]+'\x22\x20('+_0x11ee5d[_0x543383(0xac)]+_0x543383(0xa5)+_0x543383(0x9d);if(!_0x1402cf)throw new Error(_0x15f25f);_0xcac4a[_0x543383(0xb7)](_0x15f25f);}const _0x114ead=_0x2af3c[_0x543383(0x9e)](isCssResource),_0x3e655d=_0x1fe417[_0x543383(0x9e)](isCssResource);return _0x114ead&&!_0x3e655d&&_0xcac4a['push'](_0x543383(0xb2)+_0x11ee5d[_0x543383(0xb9)]+_0x543383(0xd0)+_0x11ee5d[_0x543383(0xac)]+').'),{'id':_0x11ee5d['id'],'label':_0x11ee5d[_0x543383(0xb9)],'path':_0x11ee5d['path'],'mode':_0x4bb451,'before':{'resources':_0x2af3c},'after':{'resources':_0x1fe417},'warnings':_0xcac4a};}function replaceResources(_0x50d262){const _0xf0b7d5=a91_0x114e;return[_0x50d262['jsUrl'],_0x50d262[_0xf0b7d5(0xaa)]][_0xf0b7d5(0xaf)](_0x408385=>!!_0x408385);}function patchResources(_0x352afd,_0x50a096){const _0x3af761=a91_0x114e;let _0x40eb74=![],_0x37d111=![];const _0x9ee65d=[];for(const _0x41f6a1 of _0x352afd){if(isJsResource(_0x41f6a1)){if(_0x50a096[_0x3af761(0x9a)]&&!_0x40eb74)_0x9ee65d[_0x3af761(0xb7)](_0x50a096[_0x3af761(0x9a)]),_0x40eb74=!![];else!_0x50a096[_0x3af761(0x9a)]&&_0x9ee65d['push'](_0x41f6a1);continue;}if(isCssResource(_0x41f6a1)){if(_0x50a096[_0x3af761(0xaa)]&&!_0x37d111)_0x9ee65d[_0x3af761(0xb7)](_0x50a096[_0x3af761(0xaa)]),_0x37d111=!![];else!_0x50a096[_0x3af761(0xaa)]&&_0x9ee65d[_0x3af761(0xb7)](_0x41f6a1);continue;}_0x9ee65d['push'](_0x41f6a1);}return _0x50a096[_0x3af761(0x9a)]&&!_0x40eb74&&_0x9ee65d[_0x3af761(0xc0)](_0x50a096['jsUrl']),_0x50a096[_0x3af761(0xaa)]&&!_0x37d111&&_0x9ee65d[_0x3af761(0xb7)](_0x50a096[_0x3af761(0xaa)]),_0x9ee65d;}function isJsResource(_0x4d799b){const _0x20b089=a91_0x114e;return stripQuery(_0x4d799b)[_0x20b089(0xa8)]()[_0x20b089(0xbe)](_0x20b089(0xb6));}function isCssResource(_0x5841e8){const _0x38d0c3=a91_0x114e;return stripQuery(_0x5841e8)[_0x38d0c3(0xa8)]()[_0x38d0c3(0xbe)]('.css');}function stripQuery(_0x1655dd){const _0x155480=a91_0x114e;return _0x1655dd[_0x155480(0xbc)]('?')[0x0]??_0x1655dd;}function parseUpdateParamsFlag(_0x1b5bed){const _0x5de190=a91_0x114e;if(!_0x1b5bed||typeof _0x1b5bed!==_0x5de190(0xbf))return{};try{const _0x620dd5=JSON['parse'](_0x1b5bed);if(typeof _0x620dd5!==_0x5de190(0xa1)||_0x620dd5===null||Array[_0x5de190(0xc1)](_0x620dd5))return{};return{'jsUrl':typeof _0x620dd5[_0x5de190(0x9a)]===_0x5de190(0xbf)?_0x620dd5[_0x5de190(0x9a)][_0x5de190(0xb3)]():undefined,'cssUrl':typeof _0x620dd5['cssUrl']==='string'?_0x620dd5[_0x5de190(0xaa)][_0x5de190(0xb3)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ec0a0,_0x19634e){const _0xad57de=a92_0x1e9c,_0x12a321=_0x4ec0a0();while(!![]){try{const _0x5753e1=parseInt(_0xad57de(0x71))/0x1+-parseInt(_0xad57de(0x67))/0x2*(-parseInt(_0xad57de(0x6a))/0x3)+parseInt(_0xad57de(0x6f))/0x4*(parseInt(_0xad57de(0x6e))/0x5)+-parseInt(_0xad57de(0x6c))/0x6*(-parseInt(_0xad57de(0x68))/0x7)+parseInt(_0xad57de(0x70))/0x8+parseInt(_0xad57de(0x6b))/0x9*(parseInt(_0xad57de(0x69))/0xa)+-parseInt(_0xad57de(0x72))/0xb*(parseInt(_0xad57de(0x66))/0xc);if(_0x5753e1===_0x19634e)break;else _0x12a321['push'](_0x12a321['shift']());}catch(_0x11143c){_0x12a321['push'](_0x12a321['shift']());}}}(a92_0x47cd,0xc5b12));export function isValidJsHttpsUrl(_0xc4c74a){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0xc4c74a['trim']());}function a92_0x1e9c(_0x3c1262,_0x507c42){_0x3c1262=_0x3c1262-0x65;const _0x47cd64=a92_0x47cd();let _0x1e9c85=_0x47cd64[_0x3c1262];return _0x1e9c85;}export function isValidCssHttpsUrl(_0x1b2b68){const _0x5076d6=a92_0x1e9c;return/^https:\/\/.+\.css(\?.*)?$/[_0x5076d6(0x6d)](_0x1b2b68['trim']());}function a92_0x47cd(){const _0x5daf40=['5GwuhQL','5045340vKZNSZ','832888bqmLrB','320001GQravT','52470EJXjpc','HEAD','8292bJsReo','946jKGvgM','28qOYcJn','5140VzdIbo','5385sakudw','19863wsJdOL','655404NDoZeQ','test'];a92_0x47cd=function(){return _0x5daf40;};return a92_0x47cd();}export async function isUrlReachable(_0x13cba1){const _0x585754=a92_0x1e9c;try{const _0x2a0064=await fetch(_0x13cba1,{'method':_0x585754(0x65)});return _0x2a0064['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a93_0x556828=a93_0x5182;(function(_0x4f6ea7,_0x567c71){const _0x3414bc=a93_0x5182,_0x5aecb2=_0x4f6ea7();while(!![]){try{const _0x48a24f=parseInt(_0x3414bc(0xfc))/0x1+parseInt(_0x3414bc(0xf8))/0x2*(-parseInt(_0x3414bc(0xe7))/0x3)+-parseInt(_0x3414bc(0xed))/0x4*(parseInt(_0x3414bc(0x10d))/0x5)+parseInt(_0x3414bc(0x10b))/0x6+parseInt(_0x3414bc(0xd6))/0x7*(parseInt(_0x3414bc(0x10e))/0x8)+parseInt(_0x3414bc(0xeb))/0x9+parseInt(_0x3414bc(0x108))/0xa*(-parseInt(_0x3414bc(0xe8))/0xb);if(_0x48a24f===_0x567c71)break;else _0x5aecb2['push'](_0x5aecb2['shift']());}catch(_0x119633){_0x5aecb2['push'](_0x5aecb2['shift']());}}}(a93_0x2e91,0xb5ca2));import a93_0x3b0f94 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a93_0x2e91(){const _0x54d28f=['\x20\x20Cancelled.','cyan','13384800kVsbTO','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','1393388TUmiDE','length','Creating\x20','validation','cookie','pages','\x20menu(s)...','write','cssUrl','Fetching\x20online\x20menu\x20list...','skipped','1030xcBdvb','failed','gray','map','891997CZlPNN','Created\x20','\x20menu(s)\x20created','Failed\x20to\x20fetch\x20online\x20menu\x20list','menu','boolean','size','str','trim','yellow','isArray','appcode','344990AHyfpJ','created','yes','3468708ZxUWqZ','jsUrl','20vLafuW','54144IngpeT','rawFlags','\x20page(s)','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','appCode','Menu\x20sync\x20completed:\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','object','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20created.','1064DNBFbP','string','selectedAppName','sync','\x20failed.','\x20\x20✓\x20Selected:\x20','Menu\x20sync\x20skipped','\x20and\x20CSS:\x20','onlineMenuList','\x20\x20Create\x20','\x20created,\x20','parse','flag','Sync\x20local\x20pages\x20as\x20platform\x20menus','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','\x20menu(s)\x20with\x20JS:\x20','onlinePaths','1320GkYLho','517vZokxY'];a93_0x2e91=function(){return _0x54d28f;};return a93_0x2e91();}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';function a93_0x5182(_0x4d8841,_0x26a14e){_0x4d8841=_0x4d8841-0xce;const _0x2e91ff=a93_0x2e91();let _0x5182a7=_0x2e91ff[_0x4d8841];return _0x5182a7;}export const menuSync={'service':a93_0x556828(0x100),'command':a93_0x556828(0xd9),'description':a93_0x556828(0xe3),'risk':a93_0x556828(0xf4),'flags':[{'name':'params','type':a93_0x556828(0xd7),'description':a93_0x556828(0xcf)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}'},{'name':a93_0x556828(0x10a),'type':a93_0x556828(0x101),'description':a93_0x556828(0xe4)}],async 'execute'(_0x5c0382){const _0x5f5ee9=a93_0x556828,_0x174e26=_0x5c0382[_0x5f5ee9(0x10f)][_0x5f5ee9(0x107)]?String(_0x5c0382[_0x5f5ee9(0x10f)][_0x5f5ee9(0x107)])[_0x5f5ee9(0x104)]():'';if(!isInProject()&&!_0x5c0382[_0x5f5ee9(0xd8)]&&!_0x174e26)throw CliErrors[_0x5f5ee9(0xf0)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x5f5ee9(0xec));const _0x4949c1=_0x5c0382[_0x5f5ee9(0xe2)](_0x5f5ee9(0x10a)),_0xe5db3a=_0x5c0382[_0x5f5ee9(0x103)]('params'),_0x3446c5=parseParams(_0xe5db3a),_0x324078=!!(_0x3446c5['jsUrl']||_0x3446c5[_0x5f5ee9(0xf5)]||_0x3446c5[_0x5f5ee9(0xf2)]&&_0x3446c5[_0x5f5ee9(0xf2)]['length']>0x0);if(_0x4949c1||_0x324078){let _0x13d66d=[];!isInteractive()&&!_0x3446c5['pages']?.[_0x5f5ee9(0xee)]&&(_0x13d66d=await readPageLabelsFromStdin());const _0x35241e=await runMenuSyncCore(_0x5c0382[_0x5f5ee9(0xd0)],_0x5c0382[_0x5f5ee9(0xf1)],_0x13d66d['length']>0x0?_0x13d66d:_0x3446c5[_0x5f5ee9(0xf2)]??[],_0xe5db3a);if(_0x35241e[_0x5f5ee9(0xf7)]){const _0x49cde8=getLocalPages();_0x49cde8[_0x5f5ee9(0xee)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x5f5ee9(0xd2));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x35241e[_0x5f5ee9(0x109)]+_0x5f5ee9(0xfe));return{'ok':!![],'data':_0x35241e,'message':_0x35241e[_0x5f5ee9(0xf7)]?_0x5f5ee9(0xdc):_0x5f5ee9(0xd1)+_0x35241e['created']+_0x5f5ee9(0xd5)};}requireInteractive();const _0x421917=startSpinner(_0x5f5ee9(0xf6));let _0x447fa3,_0x9df85e,_0x393b2e;try{const _0x51cec1=await fetchMenuData(_0x5c0382['appCode'],_0x5c0382[_0x5f5ee9(0xf1)]);_0x447fa3=_0x51cec1['localPages'],_0x9df85e=_0x51cec1[_0x5f5ee9(0xe6)],_0x393b2e=_0x51cec1[_0x5f5ee9(0xde)],stopSpinner(_0x421917,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x2f9463){stopSpinner(_0x421917,_0x5f5ee9(0xff),![]);throw CliErrors[_0x5f5ee9(0xf0)](_0x2f9463 instanceof Error?_0x2f9463['message']:_0x5f5ee9(0xff));}if(_0x447fa3[_0x5f5ee9(0xee)]===0x0)return writeCliSideChannelLine(a93_0x3b0f94[_0x5f5ee9(0x105)](_0x5f5ee9(0xd4))),{'ok':!![]};const _0x33d56a=buildCompareRows(_0x447fa3,_0x9df85e);writeCliSideChannelLine(renderCompareTable(_0x33d56a)),writeCliSideChannelLine('');const _0x455409=_0x3446c5[_0x5f5ee9(0xf2)],_0x125cb3=await selectPages(_0x447fa3,_0x9df85e,_0x455409);writeCliSideChannelLine(''),writeCliSideChannelLine(a93_0x3b0f94[_0x5f5ee9(0xea)](_0x5f5ee9(0xdb)+_0x125cb3[_0x5f5ee9(0xee)]+_0x5f5ee9(0xce)));const _0x23c01d=_0x3446c5[_0x5f5ee9(0x10c)]&&_0x3446c5[_0x5f5ee9(0xf5)];if(!_0x23c01d){writeCliSideChannelLine(renderSyncSummary(_0x125cb3,_0x9df85e[_0x5f5ee9(0x102)]>0x0));const _0x3ef790=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x3ef790)return writeCliSideChannelLine(a93_0x3b0f94[_0x5f5ee9(0xfa)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x16c3ae=_0x3446c5[_0x5f5ee9(0x10c)],_0x2f4169=_0x3446c5[_0x5f5ee9(0xf5)];!_0x16c3ae&&(_0x16c3ae=await askJsUrl());!_0x2f4169&&(_0x2f4169=await askCssUrl());const _0x36a218=await askConfirm(_0x5f5ee9(0xdf)+_0x125cb3['length']+_0x5f5ee9(0xe5)+_0x16c3ae+_0x5f5ee9(0xdd)+_0x2f4169+'?');if(!_0x36a218)return writeCliSideChannelLine(a93_0x3b0f94[_0x5f5ee9(0xfa)](_0x5f5ee9(0xe9))),{'ok':!![]};const _0x120dc6=[_0x16c3ae,_0x2f4169],_0x52f391=startSpinner(_0x5f5ee9(0xef)+_0x125cb3[_0x5f5ee9(0xee)]+_0x5f5ee9(0xf3));try{const _0x5487e9=await doCreateMenus(_0x5c0382[_0x5f5ee9(0xd0)],_0x5c0382[_0x5f5ee9(0xf1)],_0x125cb3,_0x120dc6);return stopSpinner(_0x52f391,_0x5f5ee9(0xfd)+_0x5487e9['created']+'\x20menu(s)',!![]),{'ok':!![],'data':_0x5487e9,'message':'Menu\x20sync\x20completed:\x20'+_0x5487e9[_0x5f5ee9(0x109)]+_0x5f5ee9(0xe0)+_0x5487e9[_0x5f5ee9(0xf9)]+_0x5f5ee9(0xda)};}catch(_0x11cd69){stopSpinner(_0x52f391,'Menu\x20creation\x20failed',![]);throw CliErrors['validation'](_0x11cd69 instanceof Error?_0x11cd69['message']:'Menu\x20creation\x20failed');}}};function parseParams(_0x17a1c1){const _0xb6959d=a93_0x556828;if(!_0x17a1c1)return{};try{const _0x302088=JSON[_0xb6959d(0xe1)](_0x17a1c1);if(typeof _0x302088!==_0xb6959d(0xd3)||_0x302088===null||Array['isArray'](_0x302088))return{};return{'jsUrl':typeof _0x302088[_0xb6959d(0x10c)]===_0xb6959d(0xd7)?_0x302088[_0xb6959d(0x10c)][_0xb6959d(0x104)]():undefined,'cssUrl':typeof _0x302088[_0xb6959d(0xf5)]===_0xb6959d(0xd7)?_0x302088[_0xb6959d(0xf5)][_0xb6959d(0x104)]():undefined,'pages':Array[_0xb6959d(0x106)](_0x302088[_0xb6959d(0xf2)])?_0x302088[_0xb6959d(0xf2)][_0xb6959d(0xfb)](String):undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x238943=a94_0x3dd4;(function(_0x16a9a3,_0x21b048){const _0x139842=a94_0x3dd4,_0x1d52df=_0x16a9a3();while(!![]){try{const _0x482ae8=parseInt(_0x139842(0x185))/0x1*(parseInt(_0x139842(0x17c))/0x2)+parseInt(_0x139842(0x1a6))/0x3+parseInt(_0x139842(0x1a7))/0x4+-parseInt(_0x139842(0x198))/0x5*(-parseInt(_0x139842(0x17e))/0x6)+-parseInt(_0x139842(0x17f))/0x7+parseInt(_0x139842(0x188))/0x8+parseInt(_0x139842(0x1af))/0x9*(parseInt(_0x139842(0x1b0))/0xa);if(_0x482ae8===_0x21b048)break;else _0x1d52df['push'](_0x1d52df['shift']());}catch(_0x7b1674){_0x1d52df['push'](_0x1d52df['shift']());}}}(a94_0x4767,0x796af));import a94_0x582ef4 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';function a94_0x3dd4(_0xfb7f0e,_0x1c3f20){_0xfb7f0e=_0xfb7f0e-0x169;const _0x4767a2=a94_0x4767();let _0x3dd4be=_0x4767a2[_0xfb7f0e];return _0x3dd4be;}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a94_0x4767(){const _0x1f8cdd=['/smartapi/menu/update','replace','message','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','\x20menu(s)\x20failed','61884steajL','rawFlags','label','356992XQuIbT','object','trim','✓\x20Menu\x20update\x20completed:\x20','isArray','Menu\x20update\x20completed:\x20','cssUrl','appcode','update','Menu\x20update\x20failed','menu','appCode','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','validation','string','mode','30RIIdbl','\x20menu(s)','yes','cyan','\x20failed.','force','parse','updated','Updating\x20','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','Menu\x20update\x20skipped','\x20updated.','skipped','str','428436cBQWPr','1063260DIKjAg','Online\x20menu\x20list\x20fetched','flag','\x20menu(s)\x20with\x20existing\x20resources','Failed\x20to\x20fetch\x20online\x20menu\x20list','cookie','jsUrl','Updated\x20','815679dMPzYD','20rwaeLP','\x20menu(s)...','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','\x20menu\x20resource\x20set(s).','failed','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params','Would\x20update\x20','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','patch','diffs','selectedAppName','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','length','boolean','\x20\x20Cancelled.','\x20and\x20CSS:\x20','bool','\x20updated,\x20','\x20menu(s)\x20with\x20JS:\x20','params','\x20\x20Update\x20','10XYofld','yellow','190566lnKgDN','4460204GnvkWl'];a94_0x4767=function(){return _0x1f8cdd;};return a94_0x4767();}import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';export const menuUpdate={'service':a94_0x238943(0x192),'command':a94_0x238943(0x190),'description':a94_0x238943(0x194),'risk':'high-risk-write','flags':[{'name':'params','type':'string','description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a94_0x238943(0x19a),'type':a94_0x238943(0x174),'description':a94_0x238943(0x16c)},{'name':a94_0x238943(0x197),'type':'string','description':a94_0x238943(0x16b),'enum':[a94_0x238943(0x181),a94_0x238943(0x16f)],'default':a94_0x238943(0x181)},{'name':a94_0x238943(0x19d),'type':a94_0x238943(0x174),'description':a94_0x238943(0x1b2)}],async 'dryRun'(_0x1bf121){const _0xabd421=a94_0x238943;ensureRunnableContext(_0x1bf121[_0xabd421(0x186)],_0x1bf121['selectedAppName']);const _0x26a787=await runMenuUpdateCore(_0x1bf121['appCode'],_0x1bf121['cookie'],_0x1bf121['str'](_0xabd421(0x17a)),{'mode':parseMode(_0x1bf121[_0xabd421(0x1a5)](_0xabd421(0x197))),'dryRun':!![],'force':_0x1bf121[_0xabd421(0x177)](_0xabd421(0x19d))});return{'method':'POST','url':_0xabd421(0x180),'body':_0x26a787,'description':_0x26a787['skipped']?_0xabd421(0x16e):_0xabd421(0x16d)+(_0x26a787[_0xabd421(0x170)]?.[_0xabd421(0x173)]??0x0)+_0xabd421(0x1b3)};},async 'execute'(_0x1dfa78){const _0x50c4fc=a94_0x238943;ensureRunnableContext(_0x1dfa78['rawFlags'],_0x1dfa78[_0x50c4fc(0x171)]);const _0x1eb03f=_0x1dfa78[_0x50c4fc(0x1a9)](_0x50c4fc(0x19a)),_0xf40abe=_0x1dfa78[_0x50c4fc(0x1a5)](_0x50c4fc(0x17a)),_0x537e8a=parseMode(_0x1dfa78[_0x50c4fc(0x1a5)](_0x50c4fc(0x197))),_0x2c6d5e=_0x1dfa78[_0x50c4fc(0x177)](_0x50c4fc(0x19d)),_0x45393d=parseParams(_0xf40abe),_0x2cc5ee=!!(_0x45393d[_0x50c4fc(0x1ad)]||_0x45393d[_0x50c4fc(0x18e)]);if(_0x1eb03f||_0x2cc5ee&&!isInteractive()){const _0xb481c9=await runMenuUpdateCore(_0x1dfa78['appCode'],_0x1dfa78[_0x50c4fc(0x1ac)],_0xf40abe,{'mode':_0x537e8a,'force':_0x2c6d5e});return _0xb481c9[_0x50c4fc(0x1a4)]?writeCliSideChannelLine(_0x50c4fc(0x183)):(writeCliSideChannelLine(_0x50c4fc(0x18b)+_0xb481c9[_0x50c4fc(0x19f)]+'\x20menu(s)\x20updated'),_0xb481c9[_0x50c4fc(0x1b4)]>0x0&&writeCliSideChannelLine('!\x20'+_0xb481c9[_0x50c4fc(0x1b4)]+_0x50c4fc(0x184))),{'ok':_0xb481c9['failed']===0x0,'data':_0xb481c9,'message':_0xb481c9['skipped']?_0x50c4fc(0x1a2):_0x50c4fc(0x18d)+_0xb481c9[_0x50c4fc(0x19f)]+_0x50c4fc(0x178)+_0xb481c9[_0x50c4fc(0x1b4)]+_0x50c4fc(0x19c)};}requireInteractive();const _0x2a726e=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x3dbf21;try{_0x3dbf21=await fetchOnlineMenuList(_0x1dfa78[_0x50c4fc(0x193)],_0x1dfa78[_0x50c4fc(0x1ac)]),stopSpinner(_0x2a726e,_0x50c4fc(0x1a8),!![]);}catch(_0x4ff78b){stopSpinner(_0x2a726e,_0x50c4fc(0x1ab),![]);throw CliErrors[_0x50c4fc(0x195)](_0x4ff78b instanceof Error?_0x4ff78b[_0x50c4fc(0x182)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}const _0x45c2b7=filterMenusWithResources(_0x3dbf21);if(_0x45c2b7[_0x50c4fc(0x173)]===0x0)return writeCliSideChannelLine(a94_0x582ef4[_0x50c4fc(0x17d)](_0x50c4fc(0x169))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a94_0x582ef4[_0x50c4fc(0x19b)]('\x20\x20Found\x20'+_0x45c2b7[_0x50c4fc(0x173)]+_0x50c4fc(0x1aa))),writeCliSideChannelLine(renderUpdateSummary(_0x45c2b7['map'](_0x4d382d=>_0x4d382d[_0x50c4fc(0x187)]),[_0x45393d['jsUrl'],_0x45393d[_0x50c4fc(0x18e)]])),writeCliSideChannelLine('');let _0x1d20b9=_0x45393d[_0x50c4fc(0x1ad)],_0x847981=_0x45393d[_0x50c4fc(0x18e)];!_0x1d20b9&&(_0x1d20b9=await askJsUrl());!_0x847981&&(_0x847981=await askCssUrl());const _0x4e7b61=await askConfirm(_0x50c4fc(0x17b)+_0x45c2b7['length']+_0x50c4fc(0x179)+_0x1d20b9+_0x50c4fc(0x176)+_0x847981+'?');if(!_0x4e7b61)return writeCliSideChannelLine(a94_0x582ef4['gray'](_0x50c4fc(0x175))),{'ok':!![]};const _0xb7bb24=[_0x1d20b9,_0x847981],_0xebd44f=startSpinner(_0x50c4fc(0x1a0)+_0x45c2b7['length']+_0x50c4fc(0x1b1));try{const _0x28d54a=await doUpdateCdnUrls(_0x1dfa78[_0x50c4fc(0x193)],_0x1dfa78[_0x50c4fc(0x1ac)],_0x45c2b7,_0xb7bb24);return stopSpinner(_0xebd44f,_0x50c4fc(0x1ae)+_0x28d54a['updated']+_0x50c4fc(0x199),_0x28d54a['failed']===0x0),{'ok':_0x28d54a[_0x50c4fc(0x1b4)]===0x0,'data':_0x28d54a,'message':_0x28d54a[_0x50c4fc(0x1b4)]>0x0?_0x50c4fc(0x18d)+_0x28d54a[_0x50c4fc(0x19f)]+'\x20updated,\x20'+_0x28d54a[_0x50c4fc(0x1b4)]+_0x50c4fc(0x19c):_0x50c4fc(0x18d)+_0x28d54a['updated']+_0x50c4fc(0x1a3)};}catch(_0x2a00f6){stopSpinner(_0xebd44f,_0x50c4fc(0x191),![]);throw CliErrors[_0x50c4fc(0x195)](_0x2a00f6 instanceof Error?_0x2a00f6[_0x50c4fc(0x182)]:'Menu\x20update\x20failed');}}};function ensureRunnableContext(_0x1f98e8,_0x853f8c){const _0x568f12=a94_0x238943,_0x2cd037=_0x1f98e8[_0x568f12(0x18f)]?String(_0x1f98e8[_0x568f12(0x18f)])[_0x568f12(0x18a)]():'';if(!isInProject()&&!_0x853f8c&&!_0x2cd037)throw CliErrors[_0x568f12(0x195)](_0x568f12(0x16a)+_0x568f12(0x172));}function parseMode(_0x2ec996){const _0x3aec48=a94_0x238943;if(!_0x2ec996)return _0x3aec48(0x181);if(_0x2ec996===_0x3aec48(0x181)||_0x2ec996===_0x3aec48(0x16f))return _0x2ec996;throw CliErrors[_0x3aec48(0x195)](_0x3aec48(0x1a1));}function parseParams(_0x5488d6){const _0x1b6eb4=a94_0x238943;if(!_0x5488d6)return{};try{const _0x5b80ef=JSON[_0x1b6eb4(0x19e)](_0x5488d6);if(typeof _0x5b80ef!==_0x1b6eb4(0x189)||_0x5b80ef===null||Array[_0x1b6eb4(0x18c)](_0x5b80ef))return{};return{'jsUrl':typeof _0x5b80ef[_0x1b6eb4(0x1ad)]===_0x1b6eb4(0x196)?_0x5b80ef['jsUrl'][_0x1b6eb4(0x18a)]():undefined,'cssUrl':typeof _0x5b80ef[_0x1b6eb4(0x18e)]===_0x1b6eb4(0x196)?_0x5b80ef[_0x1b6eb4(0x18e)][_0x1b6eb4(0x18a)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a95_0x513191=a95_0xf3d5;(function(_0x212d12,_0x4982f3){const _0x1b5350=a95_0xf3d5,_0x133325=_0x212d12();while(!![]){try{const _0x4bc724=-parseInt(_0x1b5350(0x13a))/0x1*(-parseInt(_0x1b5350(0x131))/0x2)+-parseInt(_0x1b5350(0x147))/0x3*(-parseInt(_0x1b5350(0x127))/0x4)+-parseInt(_0x1b5350(0x13f))/0x5*(parseInt(_0x1b5350(0x145))/0x6)+-parseInt(_0x1b5350(0x129))/0x7+-parseInt(_0x1b5350(0x122))/0x8*(parseInt(_0x1b5350(0x143))/0x9)+-parseInt(_0x1b5350(0x142))/0xa+parseInt(_0x1b5350(0x141))/0xb;if(_0x4bc724===_0x4982f3)break;else _0x133325['push'](_0x133325['shift']());}catch(_0x2fa5fc){_0x133325['push'](_0x133325['shift']());}}}(a95_0x48b8,0x96260));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessStandardPageState,buildPageGenerateOperationStatusQueryCommand,buildStandardPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateStandardPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a95_0x513191(0x130),'command':'generate-start','description':a95_0x513191(0x134),'risk':a95_0x513191(0x12a),'defaultOutputFormat':a95_0x513191(0x12e),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a95_0x513191(0x14b),'type':a95_0x513191(0x121),'description':a95_0x513191(0x11e)},{'name':a95_0x513191(0x12f),'type':a95_0x513191(0x13b),'description':a95_0x513191(0x11f)}],async 'validate'(_0x510a31){validateDatasetSelector(_0x510a31);},async 'dryRun'(_0x14ba2a){const _0x3bea57=a95_0x513191,_0x33046d=await prepare(_0x14ba2a);return{'method':'POST','url':_0x3bea57(0x132)+_0x33046d[_0x3bea57(0x123)][_0x3bea57(0x12b)]+'/generate-standard-pages/start','body':{'appCode':_0x14ba2a[_0x3bea57(0x137)],'clientOperationId':_0x33046d[_0x3bea57(0x11c)]},'description':serializeDryRunDescription({'dataset':{'id':_0x33046d[_0x3bea57(0x123)]['id'],'code':_0x33046d[_0x3bea57(0x123)][_0x3bea57(0x12b)],'name':_0x33046d['dataset'][_0x3bea57(0x12c)],'fieldCount':_0x33046d[_0x3bea57(0x123)][_0x3bea57(0x138)]},'precheckSource':_0x33046d['standardPageStatus']?.[_0x3bea57(0x13d)]??_0x3bea57(0x12d),'action':_0x3bea57(0x13e),'clientOperationId':_0x33046d[_0x3bea57(0x11c)],'plannedStatus':_0x33046d[_0x3bea57(0x148)][_0x3bea57(0x146)],'reason':_0x33046d[_0x3bea57(0x148)]['message']})};},async 'execute'(_0x49bc20){const _0x266c37=a95_0x513191;if(!_0x49bc20[_0x266c37(0x120)](_0x266c37(0x12f))){const _0x205f02=await pageGenerateStart[_0x266c37(0x144)](_0x49bc20);return{'ok':!![],'message':_0x266c37(0x13c),'data':_0x205f02};}const _0x2b2921=await prepare(_0x49bc20);if(!_0x2b2921[_0x266c37(0x148)][_0x266c37(0x135)])return{'ok':![],'message':_0x2b2921[_0x266c37(0x148)][_0x266c37(0x11b)],'data':{'datasetCode':_0x2b2921[_0x266c37(0x123)]['code'],'clientOperationId':_0x2b2921['clientOperationId'],'precheckSource':_0x2b2921[_0x266c37(0x140)]?.[_0x266c37(0x13d)]??'related-pages-fallback','status':_0x2b2921['precheck'][_0x266c37(0x146)],'manualResolutionRequired':_0x2b2921[_0x266c37(0x148)][_0x266c37(0x149)],'nextAction':_0x2b2921[_0x266c37(0x148)][_0x266c37(0x133)],'query':{'command':buildStandardPageStatusQueryCommand(_0x2b2921['dataset'][_0x266c37(0x12b)],_0x49bc20[_0x266c37(0x137)])},'standardPageStatus':_0x2b2921[_0x266c37(0x140)]}};const _0x51c187=await startGenerateStandardPages(_0x49bc20[_0x266c37(0x137)],_0x2b2921[_0x266c37(0x123)][_0x266c37(0x12b)],{'clientOperationId':_0x2b2921['clientOperationId']}),_0xa4cffb=_0x51c187['status']===_0x266c37(0x128)||_0x51c187[_0x266c37(0x146)]===_0x266c37(0x14a)?await loadStandardPageStatusForGenerate(_0x49bc20,_0x2b2921['dataset'][_0x266c37(0x12b)]):null,_0xd0a26=assessGenerateOperationState(_0x2b2921[_0x266c37(0x123)][_0x266c37(0x12b)],_0x51c187[_0x266c37(0x146)],_0xa4cffb);return{'ok':!![],'message':_0x51c187[_0x266c37(0x11d)]?'复用已有生成任务':_0x266c37(0x125),'data':{'datasetCode':_0x2b2921[_0x266c37(0x123)]['code'],'appCode':_0x49bc20[_0x266c37(0x137)],'operationId':_0x51c187[_0x266c37(0x126)]??null,'clientOperationId':_0x2b2921[_0x266c37(0x11c)],'jobStatus':_0x51c187[_0x266c37(0x146)]??null,'progressRate':typeof _0x51c187[_0x266c37(0x136)]===_0x266c37(0x139)?_0x51c187[_0x266c37(0x136)]:null,'currentStep':_0x51c187[_0x266c37(0x124)]??null,'reused':_0x51c187[_0x266c37(0x11d)]===!![],'status':_0xd0a26[_0x266c37(0x146)],'manualResolutionRequired':_0xd0a26[_0x266c37(0x149)],'nextAction':_0xd0a26[_0x266c37(0x133)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x2b2921[_0x266c37(0x123)][_0x266c37(0x12b)],{'appCode':_0x49bc20[_0x266c37(0x137)],'operationId':_0x51c187[_0x266c37(0x126)],'clientOperationId':_0x2b2921[_0x266c37(0x11c)]})},'standardPageStatus':_0xa4cffb}};}};function a95_0xf3d5(_0x4ddaa5,_0x2f47d9){_0x4ddaa5=_0x4ddaa5-0x11b;const _0x48b804=a95_0x48b8();let _0xf3d56a=_0x48b804[_0x4ddaa5];return _0xf3d56a;}async function prepare(_0x4f9c41){const _0x1d77f1=a95_0x513191,_0x599a36=await loadDatasetDetailForPage(_0x4f9c41),_0x131c92=await loadStandardPageStatusForGenerate(_0x4f9c41,_0x599a36[_0x1d77f1(0x12b)]),_0x3df61f=getUndeletedRelatedPages(_0x599a36);return{'dataset':_0x599a36,'standardPageStatus':_0x131c92,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0x599a36[_0x1d77f1(0x12b)],_0x131c92,{'fallbackUndeletedPages':_0x3df61f})};}function a95_0x48b8(){const _0x5a9d26=['compress','apply','page','1918886zUQZyA','/smartapi/lovrabet/dataset/','nextAction','Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','allowGenerate','progressRate','appCode','fieldCount','number','1VelCck','boolean','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','source','generate-start','24590zkvgMk','standardPageStatus','7296850lBzowK','1992840VAesHU','323613JJISDi','dryRun','708TVcFxx','status','3nNaXUg','precheck','manualResolutionRequired','PARTIAL_SUCCESS','alias','message','clientOperationId','reused','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','bool','string','40FogOda','dataset','currentStep','已提交生成任务','operationId','4481500WDvvRt','SUCCESS','8181369TShDtv','write','code','name','related-pages-fallback'];a95_0x48b8=function(){return _0x5a9d26;};return a95_0x48b8();}
|