@lovrabet/rabetbase-cli 2.1.12 → 2.1.13
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(_0xfbb3c8,_0x5a1f6c){const _0x537ceb=a83_0x1a09,_0x33d780=_0xfbb3c8();while(!![]){try{const _0x270c93=-parseInt(_0x537ceb(0x12b))/0x1+-parseInt(_0x537ceb(0x12c))/0x2*(parseInt(_0x537ceb(0x13e))/0x3)+-parseInt(_0x537ceb(0x13f))/0x4*(-parseInt(_0x537ceb(0x126))/0x5)+-parseInt(_0x537ceb(0x140))/0x6*(parseInt(_0x537ceb(0x129))/0x7)+-parseInt(_0x537ceb(0x121))/0x8*(-parseInt(_0x537ceb(0x139))/0x9)+-parseInt(_0x537ceb(0x123))/0xa*(-parseInt(_0x537ceb(0x13d))/0xb)+parseInt(_0x537ceb(0x12d))/0xc*(-parseInt(_0x537ceb(0x138))/0xd);if(_0x270c93===_0x5a1f6c)break;else _0x33d780['push'](_0x33d780['shift']());}catch(_0x3125ea){_0x33d780['push'](_0x33d780['shift']());}}}(a83_0x4ff6,0x89530));function a83_0x1a09(_0x4a5573,_0x475f05){_0x4a5573=_0x4a5573-0x121;const _0x4ff66d=a83_0x4ff6();let _0x1a09ed=_0x4ff66d[_0x4a5573];return _0x1a09ed;}function strWidth(_0x6872bb){const _0x427e98=a83_0x1a09;let _0x395b86=0x0;for(const _0x1ae04f of _0x6872bb){_0x395b86+=/[\u4e00-\u9fa5]/[_0x427e98(0x134)](_0x1ae04f)?0x2:0x1;}return _0x395b86;}function padRight(_0x25ddea,_0x329214){const _0x428606=a83_0x1a09,_0x3b9080=strWidth(_0x25ddea);return _0x25ddea+'\x20'['repeat'](Math[_0x428606(0x125)](0x0,_0x329214-_0x3b9080));}function a83_0x4ff6(){const _0x373e2b=['2397284yGSBYQ','342GFvnqY','push','8rlLKxS','(unchanged)','10MkjYoo','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','max','5zYyBrs','\x20\x20No\x20pages\x20to\x20sync.','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','131929SpFRxc','\x20\x20Affected\x20menus:\x20','625344lqAplP','2zNqcOo','27804Wgoevf','\x20\x20\x20\x20CSS:\x20','path','join','\x20\x20\x20\x20JS:\x20\x20','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','Local','test','length','label','map','650WDYGyP','8696493Ctulru','showOnline','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','repeat','10983874lyEipk','558537NrWafj'];a83_0x4ff6=function(){return _0x373e2b;};return a83_0x4ff6();}export function renderCompareTable(_0x5b00d5,_0xf741ae={}){const _0x5df636=a83_0x1a09;if(_0x5b00d5[_0x5df636(0x135)]===0x0)return'';const _0x3c87d0=_0xf741ae[_0x5df636(0x13a)]??!![],_0x365a0c=Math['max'](0x1e,..._0x5b00d5[_0x5df636(0x137)](_0x885113=>strWidth(_0x885113['label']))),_0x5ef645=0x4,_0x21b939=[],_0x2ec646='\x20\x20'+padRight('Menu\x20Name',_0x365a0c),_0x217b6f=padRight(_0x5df636(0x133),_0x5ef645),_0x1297ca=_0x3c87d0?'\x20\x20'+padRight('Platform',_0x5ef645):'';_0x21b939[_0x5df636(0x141)](_0x2ec646+'\x20\x20'+_0x217b6f+(_0x3c87d0?_0x1297ca:'')),_0x21b939[_0x5df636(0x141)]('\x20\x20'+'─'[_0x5df636(0x13c)](_0x365a0c)+'\x20\x20'+'─'[_0x5df636(0x13c)](_0x5ef645)+(_0x3c87d0?'\x20\x20'+'─'[_0x5df636(0x13c)](_0x5ef645):''));for(const _0x296ac9 of _0x5b00d5){const _0x5b182d=padRight(_0x296ac9[_0x5df636(0x136)],_0x365a0c),_0x20a176=_0x296ac9['local']?'✓':'✗',_0x1d0fd7=padRight(_0x20a176,_0x5ef645);let _0x542d99='\x20\x20'+_0x5b182d+'\x20\x20'+_0x1d0fd7;if(_0x3c87d0){const _0xc5b026=_0x296ac9['online']?'✓':'✗';_0x542d99+='\x20\x20'+padRight(_0xc5b026,_0x5ef645);}_0x21b939[_0x5df636(0x141)](_0x542d99);}return _0x21b939[_0x5df636(0x130)]('\x0a');}export function renderSyncSummary(_0x3a0820,_0x41517b){const _0x55a158=a83_0x1a09;if(_0x3a0820[_0x55a158(0x135)]===0x0)return _0x41517b?_0x55a158(0x128):_0x55a158(0x127);const _0x32ede9=['\x20\x20'+_0x3a0820[_0x55a158(0x135)]+_0x55a158(0x132)];for(const _0x44413f of _0x3a0820){_0x32ede9[_0x55a158(0x141)]('\x20\x20\x20\x20•\x20'+_0x44413f['label']+'\x20('+_0x44413f[_0x55a158(0x12f)]+')');}return _0x32ede9[_0x55a158(0x130)]('\x0a');}export function renderUpdateSummary(_0x4eb04b,_0x2f7d6b){const _0x49225f=a83_0x1a09;if(_0x4eb04b[_0x49225f(0x135)]===0x0)return _0x49225f(0x13b);const _0xcac021=['\x20\x20'+_0x4eb04b[_0x49225f(0x135)]+_0x49225f(0x124),_0x49225f(0x131)+(_0x2f7d6b[0x0]??_0x49225f(0x122)),_0x49225f(0x12e)+(_0x2f7d6b[0x1]??_0x49225f(0x122)),'',_0x49225f(0x12a)+_0x4eb04b['join'](',\x20')];return _0xcac021[_0x49225f(0x130)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d511c,_0x2e0980){var _0xbb6664=a84_0x3014,_0x48d683=_0x3d511c();while(!![]){try{var _0x482beb=-parseInt(_0xbb6664(0x184))/0x1+-parseInt(_0xbb6664(0x180))/0x2*(-parseInt(_0xbb6664(0x17f))/0x3)+-parseInt(_0xbb6664(0x181))/0x4+parseInt(_0xbb6664(0x186))/0x5+-parseInt(_0xbb6664(0x185))/0x6+-parseInt(_0xbb6664(0x182))/0x7+parseInt(_0xbb6664(0x183))/0x8;if(_0x482beb===_0x2e0980)break;else _0x48d683['push'](_0x48d683['shift']());}catch(_0x27f350){_0x48d683['push'](_0x48d683['shift']());}}}(a84_0x2388,0xea8b2));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';function a84_0x2388(){var _0x5bd3a2=['10549854cCecqo','25311616hhUCjx','918010nsxlax','4934370Ghuart','8687745bWunfn','2594292FQKTrL','2WKxMlW','6232192nkTIhM'];a84_0x2388=function(){return _0x5bd3a2;};return a84_0x2388();}export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';function a84_0x3014(_0x5db4ef,_0x564bc3){_0x5db4ef=_0x5db4ef-0x17f;var _0x2388bc=a84_0x2388();var _0x301470=_0x2388bc[_0x5db4ef];return _0x301470;}export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fff04,_0x5d191e){const _0x467c72=a85_0x1be8,_0x3a38d7=_0x3fff04();while(!![]){try{const _0x4ed9a5=parseInt(_0x467c72(0x18d))/0x1*(-parseInt(_0x467c72(0x183))/0x2)+-parseInt(_0x467c72(0x18a))/0x3*(-parseInt(_0x467c72(0x172))/0x4)+-parseInt(_0x467c72(0x18b))/0x5*(parseInt(_0x467c72(0x187))/0x6)+-parseInt(_0x467c72(0x17a))/0x7+parseInt(_0x467c72(0x175))/0x8*(parseInt(_0x467c72(0x191))/0x9)+-parseInt(_0x467c72(0x18c))/0xa+parseInt(_0x467c72(0x171))/0xb;if(_0x4ed9a5===_0x5d191e)break;else _0x3a38d7['push'](_0x3a38d7['shift']());}catch(_0x4be3e4){_0x3a38d7['push'](_0x3a38d7['shift']());}}}(a85_0x25c8,0xb9ae5));import a85_0x17f9d9 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a85_0x44cbc1 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';function a85_0x25c8(){const _0x27098d=['4772691iZpLQM','455888DeVsMj','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','test','8FLArma','has','label','JS\x20URL\x20checked','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','6929279WVnAWk','cancelled','cyan','ExitPromptError','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','red','stdin','isTTY','5236fkcQQH','map','name','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','6NEoXXb','gray','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','15dgQYuW','1478505euSPCS','389090bnNhNj','92amXZMw','Cancelled.','No\x20local\x20pages\x20found.','JS\x20URL\x20check\x20failed','11899539iPVTpT','path','[already\x20on\x20platform]','length','CSS\x20URL\x20checked','trim','filter','green','includes','\x20\x20CSS\x20URL:','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','error'];a85_0x25c8=function(){return _0x27098d;};return a85_0x25c8();}import{CliErrors}from'../../../errors.js';function onCancel(_0x496afd){return _0x496afd['catch'](_0x1e23c1=>{const _0x2f5b44=a85_0x1be8;if(_0x1e23c1?.[_0x2f5b44(0x185)]===_0x2f5b44(0x17d))throw CliErrors[_0x2f5b44(0x17b)]('Cancelled.');throw _0x1e23c1;});}export function startSpinner(_0x390730){const _0x3dfc66=a85_0x1be8;return a85_0x44cbc1({'text':_0x390730,'color':_0x3dfc66(0x17c)})['start']();}export function stopSpinner(_0x2b3299,_0x1557f5,_0x56d678){_0x56d678?_0x2b3299['succeed'](_0x1557f5):_0x2b3299['fail'](_0x1557f5);}export async function askConfirm(_0x1d3fc4){return onCancel(confirm({'message':_0x1d3fc4,'theme':{'prefix':''}}));}export async function askJsUrl(_0x1774d4){const _0x3790fe=a85_0x1be8;while(!![]){const _0x5ee2ce=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x1774d4,'theme':{'prefix':''}}));if(_0x5ee2ce[_0x3790fe(0x196)]()==='')throw CliErrors[_0x3790fe(0x17b)]('Cancelled.');if(!/^https:\/\/.+\.js(\?.*)?$/[_0x3790fe(0x174)](_0x5ee2ce[_0x3790fe(0x196)]())){console[_0x3790fe(0x19c)](a85_0x17f9d9[_0x3790fe(0x180)](_0x3790fe(0x17f)));continue;}const _0x3de82c=startSpinner('\x20\x20Checking\x20JS\x20URL\x20reachability...');try{const _0x1b45d0=await isUrlReachable(_0x5ee2ce['trim']());stopSpinner(_0x3de82c,_0x3790fe(0x178),_0x1b45d0);if(!_0x1b45d0){console[_0x3790fe(0x19c)](a85_0x17f9d9[_0x3790fe(0x180)](_0x3790fe(0x186)));continue;}return _0x5ee2ce['trim']();}catch(_0x470049){stopSpinner(_0x3de82c,_0x3790fe(0x190),![]);throw _0x470049;}}}export async function askCssUrl(_0x2ec8da){const _0x4125a0=a85_0x1be8;while(!![]){const _0x4c8905=await onCancel(input({'message':_0x4125a0(0x19a),'default':_0x2ec8da,'theme':{'prefix':''}}));if(_0x4c8905[_0x4125a0(0x196)]()==='')throw CliErrors[_0x4125a0(0x17b)](_0x4125a0(0x18e));if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x4c8905['trim']())){console[_0x4125a0(0x19c)](a85_0x17f9d9[_0x4125a0(0x180)](_0x4125a0(0x179)));continue;}const _0x1fe283=startSpinner('\x20\x20Checking\x20CSS\x20URL\x20reachability...');try{const _0x49c92f=await isUrlReachable(_0x4c8905[_0x4125a0(0x196)]());stopSpinner(_0x1fe283,_0x4125a0(0x195),_0x49c92f);if(!_0x49c92f){console[_0x4125a0(0x19c)](a85_0x17f9d9[_0x4125a0(0x180)](_0x4125a0(0x19b)));continue;}return _0x4c8905[_0x4125a0(0x196)]();}catch(_0x4a60c7){stopSpinner(_0x1fe283,'CSS\x20URL\x20check\x20failed',![]);throw _0x4a60c7;}}}export async function selectPages(_0x3328c4,_0x3500e4,_0x56d22a){const _0x3395b5=a85_0x1be8,_0x1376e4=_0x3328c4[_0x3395b5(0x184)](_0x14d6b9=>({'name':_0x14d6b9['label']+'\x20\x20'+(_0x3500e4[_0x3395b5(0x176)](_0x14d6b9['path'])?a85_0x17f9d9[_0x3395b5(0x188)](_0x3395b5(0x193)):a85_0x17f9d9[_0x3395b5(0x198)]('[new]')),'value':_0x14d6b9[_0x3395b5(0x177)],'checked':_0x56d22a?_0x56d22a[_0x3395b5(0x199)](_0x14d6b9[_0x3395b5(0x177)]):!_0x3500e4[_0x3395b5(0x176)](_0x14d6b9[_0x3395b5(0x192)])}));if(_0x1376e4[_0x3395b5(0x194)]===0x0)throw new Error(_0x3395b5(0x18f));const _0x11f2c9=await onCancel(checkbox({'message':_0x3395b5(0x189),'choices':_0x1376e4,'loop':![],'theme':{'prefix':''}}));if(_0x11f2c9[_0x3395b5(0x194)]===0x0)throw new Error('No\x20menus\x20selected.');return _0x3328c4[_0x3395b5(0x197)](_0x375d8d=>_0x11f2c9['includes'](_0x375d8d['label']));}export function isInteractive(){const _0x18502c=a85_0x1be8;return process[_0x18502c(0x181)][_0x18502c(0x182)]===!![];}function a85_0x1be8(_0x4af9d0,_0x325679){_0x4af9d0=_0x4af9d0-0x171;const _0x25c845=a85_0x25c8();let _0x1be8a1=_0x25c845[_0x4af9d0];return _0x1be8a1;}export function requireInteractive(){const _0x3873e1=a85_0x1be8;if(!isInteractive())throw new Error(_0x3873e1(0x173)+_0x3873e1(0x17e));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x18bce5=a86_0x1712;(function(_0x5913e2,_0x7e9feb){const _0x13d429=a86_0x1712,_0x42ce67=_0x5913e2();while(!![]){try{const _0x1f324c=-parseInt(_0x13d429(0x1ae))/0x1*(parseInt(_0x13d429(0x19e))/0x2)+-parseInt(_0x13d429(0x196))/0x3*(parseInt(_0x13d429(0x1a0))/0x4)+parseInt(_0x13d429(0x19b))/0x5+-parseInt(_0x13d429(0x1ab))/0x6*(parseInt(_0x13d429(0x1b3))/0x7)+-parseInt(_0x13d429(0x19f))/0x8+parseInt(_0x13d429(0x1af))/0x9*(-parseInt(_0x13d429(0x197))/0xa)+parseInt(_0x13d429(0x1ac))/0xb*(parseInt(_0x13d429(0x19c))/0xc);if(_0x1f324c===_0x7e9feb)break;else _0x42ce67['push'](_0x42ce67['shift']());}catch(_0x280436){_0x42ce67['push'](_0x42ce67['shift']());}}}(a86_0xb0b3,0x5d08a));function a86_0xb0b3(){const _0x3e29c6=['concat','cwd','path','1534750okWVty','408jqdVwM','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','75124NaknnA','2869424shWNXM','68MYXgMf','utf-8','split','push','filter','index.tsx','trim','endsWith','.tsx','forEach','match','1306710qTplur','339449LzYZCL','join','4riKbuw','198gZrZUE','slice','isDirectory','replace','7nMxMxY','30123CXtATy','35310dzKpaO'];a86_0xb0b3=function(){return _0x3e29c6;};return a86_0xb0b3();}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a86_0x18bce5(0x199)](),'src/pages');export function extractTitleFromComment(_0xf24b03){const _0x2d82a6=a86_0x18bce5;try{const _0x57810a=readFileSync(_0xf24b03,_0x2d82a6(0x1a1)),_0x2ace00=_0x57810a[_0x2d82a6(0x1aa)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x2ace00&&_0x2ace00[0x1]){const _0x554dc1=_0x2ace00[0x1],_0x56e4cc=_0x554dc1[_0x2d82a6(0x1aa)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x56e4cc&&_0x56e4cc[0x1])return _0x56e4cc[0x1][_0x2d82a6(0x1a6)]();}let _0x273e2f=null;const _0x5c2e6d=_0x57810a[_0x2d82a6(0x1aa)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x5c2e6d&&_0x5c2e6d[0x1]&&(_0x273e2f=_0x5c2e6d[0x1]);if(!_0x273e2f){const _0x3f5dc8=_0x57810a[_0x2d82a6(0x1aa)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x3f5dc8&&_0x3f5dc8[0x1]&&(_0x273e2f=_0x3f5dc8[0x1]);}if(_0x273e2f){const _0x2fd761=new RegExp('\x5cb'+_0x273e2f+_0x2d82a6(0x19d)),_0x246944=_0x57810a[_0x2d82a6(0x1aa)](_0x2fd761);if(_0x246944&&_0x246944[0x1])return _0x246944[0x1];return _0x273e2f;}return null;}catch(_0x552ca4){return null;}}function a86_0x1712(_0x37a4d1,_0x3bb340){_0x37a4d1=_0x37a4d1-0x196;const _0xb0b3fc=a86_0xb0b3();let _0x171252=_0xb0b3fc[_0x37a4d1];return _0x171252;}export function getLocalPages(_0x33c686=pagesDir,_0x45dbe9=pagesDir){const _0x3f91ef=a86_0x18bce5;let _0x1ed034=[];const _0x30d58e=readdirSync(_0x33c686);return _0x30d58e[_0x3f91ef(0x1a9)](_0x2064b3=>{const _0x1ceb27=_0x3f91ef,_0x279e4d=join(_0x33c686,_0x2064b3),_0x570e33=statSync(_0x279e4d);if(_0x570e33&&_0x570e33[_0x1ceb27(0x1b1)]())_0x1ed034=_0x1ed034[_0x1ceb27(0x198)](getLocalPages(_0x279e4d,_0x45dbe9));else{if(_0x2064b3[_0x1ceb27(0x1a7)](_0x1ceb27(0x1a8))){let _0x5c4d06=relative(_0x45dbe9,_0x279e4d);_0x5c4d06[_0x1ceb27(0x1a7)](_0x1ceb27(0x1a5))?_0x5c4d06=_0x5c4d06[_0x1ceb27(0x1b2)](/index\.tsx$/,''):_0x5c4d06=_0x5c4d06[_0x1ceb27(0x1b2)](/\.tsx$/,'');_0x5c4d06[_0x1ceb27(0x1a7)](sep)&&(_0x5c4d06=_0x5c4d06[_0x1ceb27(0x1b0)](0x0,-0x1));const _0xd9af6b=_0x5c4d06[_0x1ceb27(0x1a2)](sep)[_0x1ceb27(0x1ad)]('/'),_0xdc399f=extractTitleFromComment(_0x279e4d),_0x1cd800=_0xdc399f||_0xd9af6b;_0x1ed034[_0x1ceb27(0x1a3)]({'path':_0xd9af6b['replaceAll']('$',':'),'label':_0x1cd800});}}}),_0x1ed034[_0x3f91ef(0x1a4)](_0x401982=>_0x401982[_0x3f91ef(0x19a)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a87_0x385a(_0x2b82e5,_0x3cec69){_0x2b82e5=_0x2b82e5-0x174;const _0x385662=a87_0x3856();let _0x385aab=_0x385662[_0x2b82e5];return _0x385aab;}(function(_0x46d5de,_0x387651){const _0x4175bd=a87_0x385a,_0x4a22=_0x46d5de();while(!![]){try{const _0x2aac03=parseInt(_0x4175bd(0x187))/0x1+parseInt(_0x4175bd(0x181))/0x2*(parseInt(_0x4175bd(0x190))/0x3)+parseInt(_0x4175bd(0x17f))/0x4*(-parseInt(_0x4175bd(0x185))/0x5)+-parseInt(_0x4175bd(0x17a))/0x6*(parseInt(_0x4175bd(0x179))/0x7)+parseInt(_0x4175bd(0x180))/0x8+-parseInt(_0x4175bd(0x175))/0x9*(parseInt(_0x4175bd(0x188))/0xa)+-parseInt(_0x4175bd(0x18b))/0xb;if(_0x2aac03===_0x387651)break;else _0x4a22['push'](_0x4a22['shift']());}catch(_0xcd05ba){_0x4a22['push'](_0x4a22['shift']());}}}(a87_0x3856,0x2216d));function a87_0x3856(){const _0x52158d=['241519TFRWdm','2025890wsHxko','has','fulfilled','678337JGNJts','No\x20local\x20pages\x20matched\x20labels:\x20','status','trim','push','453wzmUVP','allSettled','resources','extend','9Rmllly','length','errors','filter','287TsCmdL','5874bveQFN','value','join','label','CSS\x20URL\x20is\x20unreachable','172lCVbDr','1588832RXqVPa','2016JPIodT','find','map','rejected','17245fMqbts','path'];a87_0x3856=function(){return _0x52158d;};return a87_0x3856();}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(_0x24ee0a){const _0xbe6b41=a87_0x385a,_0x22a3fc=[];return!isValidJsHttpsUrl(_0x24ee0a)&&_0x22a3fc[_0xbe6b41(0x18f)]('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x22a3fc['length']===0x0,'errors':_0x22a3fc};}export function validateCssUrl(_0x5db52e){const _0x54c231=[];return!isValidCssHttpsUrl(_0x5db52e)&&_0x54c231['push']('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x54c231['length']===0x0,'errors':_0x54c231};}export async function validateJsUrlReachable(_0x1242a0){const _0x222f1b=a87_0x385a,_0x28492a=validateJsUrl(_0x1242a0);if(!_0x28492a['ok'])return _0x28492a;const _0x5967d0=await isUrlReachable(_0x1242a0);if(!_0x5967d0)_0x28492a[_0x222f1b(0x177)][_0x222f1b(0x18f)]('JS\x20URL\x20is\x20unreachable');return{'ok':_0x28492a[_0x222f1b(0x177)][_0x222f1b(0x176)]===0x0,'errors':_0x28492a[_0x222f1b(0x177)]};}export async function validateCssUrlReachable(_0x3235ec){const _0x8c3cec=a87_0x385a,_0x244e85=validateCssUrl(_0x3235ec);if(!_0x244e85['ok'])return _0x244e85;const _0x5c4322=await isUrlReachable(_0x3235ec);if(!_0x5c4322)_0x244e85[_0x8c3cec(0x177)]['push'](_0x8c3cec(0x17e));return{'ok':_0x244e85['errors'][_0x8c3cec(0x176)]===0x0,'errors':_0x244e85[_0x8c3cec(0x177)]};}export function buildCompareRows(_0x4ab6bc,_0xaed961){const _0x5d1786=a87_0x385a;return _0x4ab6bc[_0x5d1786(0x183)](_0x1322ea=>({'label':_0x1322ea[_0x5d1786(0x17d)],'path':_0x1322ea['path'],'local':!![],'online':_0xaed961[_0x5d1786(0x189)](_0x1322ea[_0x5d1786(0x186)])}));}export function filterNewPages(_0x13fdf3,_0x4dbd3c,_0x2b5436){const _0x2ab82b=a87_0x385a;if(_0x2b5436&&_0x2b5436[_0x2ab82b(0x176)]>0x0){const _0x418b3d=new Set(_0x2b5436[_0x2ab82b(0x183)](_0x3f2ea0=>_0x3f2ea0['trim']())),_0x19e732=_0x13fdf3[_0x2ab82b(0x178)](_0x1a0a80=>_0x418b3d[_0x2ab82b(0x189)](_0x1a0a80[_0x2ab82b(0x17d)]));if(_0x19e732[_0x2ab82b(0x176)]===0x0)throw new Error(_0x2ab82b(0x18c)+[..._0x418b3d][_0x2ab82b(0x17c)](',\x20'));return _0x19e732;}return _0x13fdf3['filter'](_0x12694e=>!_0x4dbd3c['has'](_0x12694e[_0x2ab82b(0x186)]));}export function filterPagesByLabels(_0x36d542,_0x5e24ab){const _0x2fdc0d=a87_0x385a,_0x3a8abc=[],_0x3f9d61=[];for(const _0x1b0709 of _0x5e24ab){const _0x256c7b=_0x1b0709[_0x2fdc0d(0x18e)](),_0xe06237=_0x36d542[_0x2fdc0d(0x182)](_0x2c1e2c=>_0x2c1e2c['label']===_0x256c7b);if(_0xe06237)_0x3a8abc[_0x2fdc0d(0x18f)](_0xe06237);else _0x3f9d61[_0x2fdc0d(0x18f)](_0x1b0709);}return{'matched':_0x3a8abc,'unmatched':_0x3f9d61};}export async function doCreateMenus(_0x588c4a,_0x66e50c,_0x1f0e7d,_0x586acf){const _0x138aa5=a87_0x385a,_0x3ef169=await createMenus(_0x588c4a,_0x66e50c,_0x1f0e7d,_0x586acf);return{'created':_0x3ef169[_0x138aa5(0x176)],'failed':0x0,'labels':_0x1f0e7d[_0x138aa5(0x183)](_0x4de142=>_0x4de142[_0x138aa5(0x17d)]),'menus':_0x3ef169};}export function filterMenusWithResources(_0x2aef92){const _0x1c178b=a87_0x385a;return _0x2aef92[_0x1c178b(0x178)](_0x3115a4=>_0x3115a4[_0x1c178b(0x192)][_0x1c178b(0x176)]>0x0);}export async function doUpdateCdnUrls(_0x52a1a6,_0x477ee3,_0x1be937,_0x3d3f18){const _0x26f7ea=a87_0x385a,_0x50aa81=_0x1be937['filter'](_0x29de96=>_0x29de96[_0x26f7ea(0x192)]['length']>0x0),_0x13e13f=await Promise[_0x26f7ea(0x191)](_0x50aa81[_0x26f7ea(0x183)](_0x3f5dc4=>updateMenuCdnUrl(_0x52a1a6,_0x477ee3,{'id':_0x3f5dc4['id'],'label':_0x3f5dc4[_0x26f7ea(0x17d)],'path':_0x3f5dc4[_0x26f7ea(0x186)],'resources':_0x3d3f18,'extend':_0x3f5dc4[_0x26f7ea(0x174)]??null}))),_0x1931fc=_0x13e13f['filter'](_0x1f119f=>_0x1f119f[_0x26f7ea(0x18d)]===_0x26f7ea(0x18a))['map'](_0x4b14fd=>_0x4b14fd[_0x26f7ea(0x17b)]),_0x33519a=_0x13e13f[_0x26f7ea(0x178)](_0x15dd6e=>_0x15dd6e[_0x26f7ea(0x18d)]===_0x26f7ea(0x184))['length'];return{'updated':_0x1931fc[_0x26f7ea(0x176)],'failed':_0x33519a,'menus':_0x1931fc};}export async function fetchMenuData(_0x43e1d4,_0x338355){const _0x11014b=a87_0x385a,_0x36536e=getLocalPages(),_0x157542=await getOnlineMenuList(_0x43e1d4,_0x338355),_0xbdaf89=new Set(_0x157542[_0x11014b(0x183)](_0xf18b6d=>_0xf18b6d[_0x11014b(0x186)]));return{'localPages':_0x36536e,'onlineMenuList':_0x157542,'onlinePaths':_0xbdaf89};}export async function fetchOnlineMenuList(_0x2dc53e,_0x80486a){return getOnlineMenuList(_0x2dc53e,_0x80486a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x8a3c13,_0x4033bc){const _0x534799=a88_0x25e2,_0x32ff42=_0x8a3c13();while(!![]){try{const _0xbfd7cc=parseInt(_0x534799(0x1e1))/0x1*(-parseInt(_0x534799(0x1e3))/0x2)+-parseInt(_0x534799(0x1f0))/0x3*(parseInt(_0x534799(0x1ee))/0x4)+-parseInt(_0x534799(0x1e7))/0x5+-parseInt(_0x534799(0x1e2))/0x6+-parseInt(_0x534799(0x208))/0x7*(parseInt(_0x534799(0x1f2))/0x8)+-parseInt(_0x534799(0x204))/0x9*(-parseInt(_0x534799(0x1f3))/0xa)+parseInt(_0x534799(0x1fe))/0xb;if(_0xbfd7cc===_0x4033bc)break;else _0x32ff42['push'](_0x32ff42['shift']());}catch(_0x325797){_0x32ff42['push'](_0x32ff42['shift']());}}}(a88_0x23cc,0x66ec4));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';function a88_0x25e2(_0x25eb25,_0x49a2b6){_0x25eb25=_0x25eb25-0x1db;const _0x23cc87=a88_0x23cc();let _0x25e218=_0x23cc87[_0x25eb25];return _0x25e218;}import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x40f846,_0x23283){const _0x5f1942=a88_0x25e2,_0x2c3394=getEnv();logger[_0x5f1942(0x1dc)](_0x5f1942(0x206),isProduction(_0x2c3394)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x40f846+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x40f846+')');const _0x1d4622=await platformFetch(getApiDomain()+_0x5f1942(0x1ff)+_0x40f846,{'cookie':_0x23283,'label':_0x5f1942(0x1fd)});if(!_0x1d4622)return logger['info'](_0x5f1942(0x206),_0x5f1942(0x1ef)),[];return logger[_0x5f1942(0x1dc)](_0x5f1942(0x206),_0x5f1942(0x207)+_0x1d4622['length']+_0x5f1942(0x1fa)),_0x1d4622[_0x5f1942(0x1e6)](flattenMenuItem)[_0x5f1942(0x1fc)]();}function flattenMenuItem(_0x201442){const _0x2229af=a88_0x25e2;let _0x37bf76=[];try{const _0x92348c=_0x201442[_0x2229af(0x1ec)]?.[_0x2229af(0x1fb)];if(typeof _0x92348c==='string'){const _0x11f726=JSON[_0x2229af(0x1f7)](_0x92348c);if(Array[_0x2229af(0x1de)](_0x11f726))_0x37bf76=_0x11f726[_0x2229af(0x1e6)](String);}else Array[_0x2229af(0x1de)](_0x92348c)&&(_0x37bf76=_0x92348c[_0x2229af(0x1e6)](String));}catch{}const _0x173124=[{'id':_0x201442['id'],'path':_0x201442['path'],'label':_0x201442[_0x2229af(0x205)],'resources':_0x37bf76,'extend':_0x201442[_0x2229af(0x1ec)]??null}];if(_0x201442[_0x2229af(0x1e0)]&&_0x201442['children']['length']>0x0)for(const _0x1e064e of _0x201442[_0x2229af(0x1e0)]){_0x173124[_0x2229af(0x202)](...flattenMenuItem(_0x1e064e));}return _0x173124;}function a88_0x23cc(){const _0x13f74a=['Create\x20menu\x20\x22','\x20online\x20menus\x20successfully','resources','flat','Fetch\x20menu\x20list','15435695TEFwFq','/smartapi/menu/find?appCode=','/smartapi/menu/create','create-menu','push','Creating\x20menu:\x20','504tpbSbN','label','get-online-menu-list','Fetched\x20','28JGNIum','path','info','Updating\x20menu\x20asset\x20links:\x20','isArray','all','children','7599UTEUTa','1728738MQNHZB','120uHNllA','update-menu-cdn-url','create-menus','map','3190010LfUdab','Menu\x20created\x20successfully:\x20','procode','Start\x20batch\x20menu\x20creation,\x20total\x20','length','extend','stringify','4PXIiws','Server\x20returned\x20empty\x20menu\x20list','1064544hflPKx','import','175792nwuTtp','150560OUMuaY','POST','Menu\x20assets\x20synced:\x20','/smartapi/menu/update','parse','Update\x20menu\x20assets\x20\x22'];a88_0x23cc=function(){return _0x13f74a;};return a88_0x23cc();}export async function createMenu(_0x5b1634,_0x562efb,_0x5641df){const _0x18f39c=a88_0x25e2;logger[_0x18f39c(0x1dc)]('create-menu',_0x18f39c(0x203)+_0x5641df[_0x18f39c(0x205)]+'\x20('+_0x5641df['path']+')');const _0x8a671a={'appCode':_0x5b1634,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x18f39c(0x1f1),'resources':_0x5641df[_0x18f39c(0x1fb)]?JSON[_0x18f39c(0x1ed)](_0x5641df['resources']):undefined},..._0x5641df},_0x2a2a40=await platformFetch(getApiDomain()+_0x18f39c(0x200),{'method':_0x18f39c(0x1f4),'body':_0x8a671a,'cookie':_0x562efb,'label':'Create\x20menu\x20\x22'+_0x5641df['label']+'\x22'});return logger[_0x18f39c(0x1dc)](_0x18f39c(0x201),_0x18f39c(0x1e8)+_0x5641df[_0x18f39c(0x205)]),_0x2a2a40;}async function createSingleMenu(_0x34b809,_0x4f8055,_0x3fd277,_0x11c8d7){const _0x158267=a88_0x25e2,_0x225958={'appCode':_0x34b809,'type':_0x158267(0x1e9),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x11c8d7?JSON[_0x158267(0x1ed)](_0x11c8d7):undefined},'label':_0x3fd277[_0x158267(0x205)],'path':_0x3fd277[_0x158267(0x1db)]},_0x3cad9c=await platformFetch(getApiDomain()+_0x158267(0x200),{'method':_0x158267(0x1f4),'body':_0x225958,'cookie':_0x4f8055,'label':_0x158267(0x1f9)+_0x3fd277[_0x158267(0x205)]+'\x22'});return logger[_0x158267(0x1dc)](_0x158267(0x201),_0x158267(0x1e8)+_0x3fd277[_0x158267(0x205)]),_0x3cad9c;}export async function createMenus(_0xe10d8,_0x4c079e,_0x5968ec,_0x19721e){const _0x281534=a88_0x25e2;logger['info'](_0x281534(0x1e5),_0x281534(0x1ea)+_0x5968ec[_0x281534(0x1eb)]);const _0x20ca9a=await Promise[_0x281534(0x1df)](_0x5968ec[_0x281534(0x1e6)](_0x5535df=>createSingleMenu(_0xe10d8,_0x4c079e,_0x5535df,_0x19721e)));return logger['info'](_0x281534(0x1e5),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x5968ec[_0x281534(0x1eb)]),_0x20ca9a;}export async function updateMenuCdnUrl(_0x14baa6,_0x403e6c,_0x20cb28){const _0x35ca61=a88_0x25e2;logger[_0x35ca61(0x1dc)]('update-menu-cdn-url',_0x35ca61(0x1dd)+_0x20cb28['label']+'\x20('+_0x20cb28[_0x35ca61(0x1db)]+')');const _0x4886a5={'id':_0x20cb28['id'],'appCode':_0x14baa6,'extend':{..._0x20cb28[_0x35ca61(0x1ec)]??{},'loadScriptMode':_0x35ca61(0x1f1),'resources':_0x20cb28['resources']?JSON[_0x35ca61(0x1ed)](_0x20cb28['resources']):undefined}},_0x7e357d=await platformFetch(getApiDomain()+_0x35ca61(0x1f6),{'method':'POST','body':_0x4886a5,'cookie':_0x403e6c,'label':_0x35ca61(0x1f8)+_0x20cb28['label']+'\x22'});return logger[_0x35ca61(0x1dc)](_0x35ca61(0x1e4),_0x35ca61(0x1f5)+_0x20cb28[_0x35ca61(0x205)],undefined),_0x7e357d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52f87e,_0x3ac51e){const _0x5b1bc8=a89_0x4d8d,_0x380a6f=_0x52f87e();while(!![]){try{const _0x17cede=-parseInt(_0x5b1bc8(0xfb))/0x1*(parseInt(_0x5b1bc8(0xf5))/0x2)+parseInt(_0x5b1bc8(0xf2))/0x3*(parseInt(_0x5b1bc8(0xe4))/0x4)+-parseInt(_0x5b1bc8(0xd9))/0x5*(parseInt(_0x5b1bc8(0xfc))/0x6)+-parseInt(_0x5b1bc8(0xe1))/0x7*(parseInt(_0x5b1bc8(0xee))/0x8)+-parseInt(_0x5b1bc8(0xe2))/0x9*(-parseInt(_0x5b1bc8(0xf6))/0xa)+parseInt(_0x5b1bc8(0xdd))/0xb+parseInt(_0x5b1bc8(0xed))/0xc;if(_0x17cede===_0x3ac51e)break;else _0x380a6f['push'](_0x380a6f['shift']());}catch(_0x57dd67){_0x380a6f['push'](_0x380a6f['shift']());}}}(a89_0x3d51,0x21603));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x20ea73){const _0x2e6020=a89_0x4d8d,_0x2cda89=[];return _0x20ea73[_0x2e6020(0xec)]&&!isValidJsHttpsUrl(_0x20ea73[_0x2e6020(0xec)])&&_0x2cda89[_0x2e6020(0xf8)]({'field':_0x2e6020(0xec),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x20ea73[_0x2e6020(0xf4)]&&!isValidCssHttpsUrl(_0x20ea73[_0x2e6020(0xf4)])&&_0x2cda89[_0x2e6020(0xf8)]({'field':_0x2e6020(0xf4),'message':_0x2e6020(0xd2)}),_0x2cda89;}export async function runMenuSyncCore(_0x4b9fe1,_0x566b1f,_0x21d2ac=[],_0x4e6aab){const _0x84a569=a89_0x4d8d,_0x4aedb1=parseParamsFlag(_0x4e6aab),_0x276d0c=_0x21d2ac[_0x84a569(0xf1)]>0x0?_0x21d2ac:_0x4aedb1[_0x84a569(0xd4)],_0x2440ee=_0x4aedb1[_0x84a569(0xec)],_0x768c7d=_0x4aedb1[_0x84a569(0xf4)],_0x308352=[];if(_0x2440ee)_0x308352[_0x84a569(0xf8)](_0x2440ee);if(_0x768c7d)_0x308352[_0x84a569(0xf8)](_0x768c7d);const _0x2f9830=validateParams(_0x4aedb1);if(_0x2f9830[_0x84a569(0xf1)]>0x0){const _0x430cb5=_0x2f9830[_0x84a569(0xdc)](_0x4c533d=>'--params.'+_0x4c533d[_0x84a569(0xd7)]+':\x20'+_0x4c533d[_0x84a569(0xf7)])['join'](';\x20');throw new Error(_0x84a569(0xfd)+_0x430cb5);}logger[_0x84a569(0xf9)](process['cwd']()),logger['info'](_0x84a569(0xe5),_0x84a569(0xf0),{'appCode':_0x4b9fe1,'selectedCount':_0x276d0c?.[_0x84a569(0xf1)],'jsUrl':_0x2440ee,'cssUrl':_0x768c7d});if(_0x2440ee){const _0xafac75=await isUrlReachable(_0x2440ee);if(!_0xafac75)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x2440ee);}if(_0x768c7d){const _0x444603=await isUrlReachable(_0x768c7d);if(!_0x444603)throw new Error(_0x84a569(0xe9)+_0x768c7d);}const _0x52b9f8=getLocalPages();if(_0x52b9f8[_0x84a569(0xf1)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x44d2ba=await getOnlineMenuList(_0x4b9fe1,_0x566b1f),_0x50e466=new Set(_0x44d2ba[_0x84a569(0xdc)](_0x43b6fb=>_0x43b6fb[_0x84a569(0xdb)]));let _0x388e3;if(_0x276d0c&&_0x276d0c[_0x84a569(0xf1)]>0x0){const _0x51b224=new Set(_0x276d0c[_0x84a569(0xdc)](_0x3092b7=>_0x3092b7[_0x84a569(0xe7)]()));_0x388e3=_0x52b9f8[_0x84a569(0xd5)](_0x508d2e=>_0x51b224[_0x84a569(0xe0)](_0x508d2e['label']));if(_0x388e3[_0x84a569(0xf1)]===0x0){const _0x56011f=_0x52b9f8[_0x84a569(0xdc)](_0x1ee4cf=>_0x1ee4cf[_0x84a569(0xf3)])[_0x84a569(0xea)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x51b224][_0x84a569(0xea)](',\x20')+_0x84a569(0xef)+_0x56011f);}}else _0x388e3=_0x52b9f8[_0x84a569(0xd5)](_0x3ec38e=>!_0x50e466[_0x84a569(0xe0)](_0x3ec38e[_0x84a569(0xdb)]));if(_0x388e3[_0x84a569(0xf1)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x7f44a4=await createMenus(_0x4b9fe1,_0x566b1f,_0x388e3,_0x308352[_0x84a569(0xf1)]>0x0?_0x308352:undefined);return logger['info'](_0x84a569(0xe5),_0x84a569(0xd3),{'count':_0x388e3[_0x84a569(0xf1)],'resources':_0x308352}),{'created':_0x7f44a4[_0x84a569(0xf1)],'skipped':![],'targetPages':_0x388e3,'menus':_0x7f44a4};}export async function readPageLabelsFromStdin(){const _0x75ea5f=a89_0x4d8d;if(!process[_0x75ea5f(0xeb)]['isTTY']&&!process[_0x75ea5f(0xeb)][_0x75ea5f(0xfa)])return new Promise(_0x45319f=>{const _0x59871a=_0x75ea5f,_0x92a995=[];process[_0x59871a(0xeb)]['on'](_0x59871a(0xdf),_0x110e50=>_0x92a995['push'](_0x110e50)),process['stdin']['on'](_0x59871a(0xe3),()=>{const _0x550fc3=_0x59871a,_0x18040d=Buffer['concat'](_0x92a995)[_0x550fc3(0xde)]('utf8'),_0x44153b=_0x18040d[_0x550fc3(0xd6)]('\x0a')['map'](_0x44fc5a=>_0x44fc5a[_0x550fc3(0xe7)]())[_0x550fc3(0xd5)](_0x26f44a=>_0x26f44a[_0x550fc3(0xf1)]>0x0&&!_0x26f44a[_0x550fc3(0xda)]('#'));_0x45319f(_0x44153b);}),setTimeout(()=>_0x45319f([]),0x1f4);});return[];}function a89_0x4d8d(_0x57d2ac,_0x3211b3){_0x57d2ac=_0x57d2ac-0xd2;const _0x3d515b=a89_0x3d51();let _0x4d8d62=_0x3d515b[_0x57d2ac];return _0x4d8d62;}function parseParamsFlag(_0x2adf52){const _0x560ade=a89_0x4d8d;if(!_0x2adf52||typeof _0x2adf52!=='string')return{};try{const _0x5bf222=JSON['parse'](_0x2adf52);if(typeof _0x5bf222!==_0x560ade(0xd8)||_0x5bf222===null||Array['isArray'](_0x5bf222))return{};return{'selectedLabels':Array[_0x560ade(0xe6)](_0x5bf222[_0x560ade(0xe8)])?_0x5bf222['pages'][_0x560ade(0xdc)](String):undefined,'jsUrl':typeof _0x5bf222[_0x560ade(0xec)]===_0x560ade(0xfe)?_0x5bf222[_0x560ade(0xec)]['trim']():undefined,'cssUrl':typeof _0x5bf222[_0x560ade(0xf4)]==='string'?_0x5bf222['cssUrl'][_0x560ade(0xe7)]():undefined};}catch{return{};}}function a89_0x3d51(){const _0x1aba56=['Menu\x20sync\x20completed','selectedLabels','filter','split','field','object','955lmYflM','startsWith','path','map','1821655vwmomC','toString','data','has','7KlzzRw','45JJOFKg','end','1744KdgGdO','menu-sync','isArray','trim','pages','CSS\x20URL\x20is\x20unreachable:\x20','join','stdin','jsUrl','1783068WnJNJa','1766248mDYsqF','\x0a\x20\x20Available\x20local\x20pages:\x20','Start\x20non-interactive\x20menu\x20sync','length','543cdZqQl','label','cssUrl','13882Ouinuv','265070CTmRon','message','push','setLogPath','readableEnded','10Votqze','3102YxKdsU','Invalid\x20--params:\x20','string','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'];a89_0x3d51=function(){return _0x1aba56;};return a89_0x3d51();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a91_0x1080(_0x41157e,_0x473e0c){_0x41157e=_0x41157e-0x67;const _0x3ddf0e=a91_0x3ddf();let _0x108049=_0x3ddf0e[_0x41157e];return _0x108049;}(function(_0x137672,_0xafead5){const _0x1f01d8=a91_0x1080,_0xc9b577=_0x137672();while(!![]){try{const _0x4a773e=parseInt(_0x1f01d8(0x6b))/0x1+-parseInt(_0x1f01d8(0x6a))/0x2*(-parseInt(_0x1f01d8(0x92))/0x3)+parseInt(_0x1f01d8(0x86))/0x4*(-parseInt(_0x1f01d8(0x83))/0x5)+parseInt(_0x1f01d8(0x7d))/0x6+parseInt(_0x1f01d8(0x72))/0x7*(parseInt(_0x1f01d8(0x7c))/0x8)+-parseInt(_0x1f01d8(0x8e))/0x9+-parseInt(_0x1f01d8(0x9d))/0xa;if(_0x4a773e===_0xafead5)break;else _0xc9b577['push'](_0xc9b577['shift']());}catch(_0x4e14dc){_0xc9b577['push'](_0xc9b577['shift']());}}}(a91_0x3ddf,0xde262));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a91_0x3ddf(){const _0x10cc72=['fulfilled','some','status','\x22\x20(','extend','456SvaAUu','6684210XwNdCX','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','menu-update','string','join','force','5EhoPNZ','label','jsUrl','4638388IsMVjN','info','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','map','field','--params.','value','6991731lZcHIn','allSettled','push','split','1515TSQSoq','patch','mode','unshift','rejected','filter','parse','Invalid\x20--params:\x20','isArray','path','length','3257390dYLiWG','Start\x20non-interactive\x20menu\x20update','setLogPath','dryRun','message','Invalid\x20--mode:\x20','cwd','replace','endsWith','512fghdgZ','1500447XvSBAJ','cssUrl','toLowerCase','.js',').\x20','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','trim','52605Ojykya','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','object','resources'];a91_0x3ddf=function(){return _0x10cc72;};return a91_0x3ddf();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x19ecc3){const _0x184c3c=a91_0x1080,_0x4a9e22=[];return _0x19ecc3[_0x184c3c(0x85)]&&!isValidJsHttpsUrl(_0x19ecc3['jsUrl'])&&_0x4a9e22[_0x184c3c(0x90)]({'field':_0x184c3c(0x85),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x19ecc3[_0x184c3c(0x6c)]&&!isValidCssHttpsUrl(_0x19ecc3[_0x184c3c(0x6c)])&&_0x4a9e22['push']({'field':_0x184c3c(0x6c),'message':_0x184c3c(0x7e)}),_0x4a9e22;}export async function runMenuUpdateCore(_0x379536,_0x499b03,_0x1356c8,_0x1273d4={}){const _0x3b6701=a91_0x1080,_0x1be7f7=parseUpdateParamsFlag(_0x1356c8),_0x8cfa87=normalizeMode(_0x1273d4[_0x3b6701(0x94)]),_0x203580=[];if(_0x1be7f7[_0x3b6701(0x85)])_0x203580[_0x3b6701(0x90)](_0x1be7f7[_0x3b6701(0x85)]);if(_0x1be7f7[_0x3b6701(0x6c)])_0x203580[_0x3b6701(0x90)](_0x1be7f7[_0x3b6701(0x6c)]);const _0x1ba2bd=validateParams(_0x1be7f7);if(_0x1ba2bd[_0x3b6701(0x9c)]>0x0){const _0x4415bf=_0x1ba2bd['map'](_0xdf5a4f=>_0x3b6701(0x8c)+_0xdf5a4f[_0x3b6701(0x8b)]+':\x20'+_0xdf5a4f[_0x3b6701(0xa1)])[_0x3b6701(0x81)](';\x20');throw new Error(_0x3b6701(0x99)+_0x4415bf);}if(_0x203580[_0x3b6701(0x9c)]===0x0)throw new Error(_0x3b6701(0x70)+_0x3b6701(0x73));logger[_0x3b6701(0x9f)](process[_0x3b6701(0x67)]()),logger[_0x3b6701(0x87)]('menu-update',_0x3b6701(0x9e),{'appCode':_0x379536,'jsUrl':_0x1be7f7[_0x3b6701(0x85)],'cssUrl':_0x1be7f7[_0x3b6701(0x6c)],'mode':_0x8cfa87,'dryRun':_0x1273d4[_0x3b6701(0xa0)]===!![]});if(_0x1be7f7[_0x3b6701(0x85)]){const _0x19165a=await isUrlReachable(_0x1be7f7['jsUrl']);if(!_0x19165a)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x1be7f7[_0x3b6701(0x85)]);}if(_0x1be7f7['cssUrl']){const _0x54f439=await isUrlReachable(_0x1be7f7[_0x3b6701(0x6c)]);if(!_0x54f439)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x1be7f7[_0x3b6701(0x6c)]);}const _0x194cf4=await getOnlineMenuList(_0x379536,_0x499b03),_0x1a8f2c=_0x194cf4[_0x3b6701(0x97)](_0x1be095=>_0x1be095[_0x3b6701(0x76)]['length']>0x0);if(_0x1a8f2c['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1273d4[_0x3b6701(0xa0)]===!![]};const _0xa46e47=_0x1a8f2c[_0x3b6701(0x8a)](_0xa9d73d=>buildMenuUpdateDiff(_0xa9d73d,_0x1be7f7,_0x8cfa87,_0x1273d4[_0x3b6701(0x82)]===!![]));if(_0x1273d4[_0x3b6701(0xa0)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0xa46e47};const _0x26eeac=await Promise[_0x3b6701(0x8f)](_0x1a8f2c[_0x3b6701(0x8a)]((_0x17ae7a,_0x39740f)=>updateMenuCdnUrl(_0x379536,_0x499b03,{'id':_0x17ae7a['id'],'label':_0x17ae7a['label'],'path':_0x17ae7a['path'],'resources':_0xa46e47[_0x39740f]['after'][_0x3b6701(0x76)],'extend':_0x17ae7a[_0x3b6701(0x7b)]??null}))),_0x8b9e7d=_0x26eeac[_0x3b6701(0x97)](_0x360f40=>_0x360f40[_0x3b6701(0x79)]===_0x3b6701(0x77))['map'](_0x15ec20=>_0x15ec20[_0x3b6701(0x8d)]),_0x4f3935=_0x26eeac[_0x3b6701(0x97)](_0x3341d5=>_0x3341d5[_0x3b6701(0x79)]===_0x3b6701(0x96))['length'];return logger[_0x3b6701(0x87)](_0x3b6701(0x7f),'Menu\x20update\x20completed',{'count':_0x1a8f2c[_0x3b6701(0x9c)],'resources':_0x203580}),{'updated':_0x8b9e7d[_0x3b6701(0x9c)],'failed':_0x4f3935,'skipped':![],'menus':_0x8b9e7d};}function normalizeMode(_0x12e5c1){const _0x23c35b=a91_0x1080;if(!_0x12e5c1)return _0x23c35b(0x68);if(_0x12e5c1==='replace'||_0x12e5c1===_0x23c35b(0x93))return _0x12e5c1;throw new Error(_0x23c35b(0xa2)+_0x12e5c1+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x4aa225,_0x298778,_0x39e52e,_0x31deb8){const _0x3000c7=a91_0x1080,_0x1d3c4a=[..._0x4aa225[_0x3000c7(0x76)]],_0x30fb11=_0x39e52e===_0x3000c7(0x93)?patchResources(_0x1d3c4a,_0x298778):replaceResources(_0x298778),_0x57ac37=[],_0x2f3b4c=_0x1d3c4a[_0x3000c7(0x78)](isJsResource),_0x3bf5b3=_0x30fb11[_0x3000c7(0x78)](isJsResource);if(_0x2f3b4c&&!_0x3bf5b3){const _0x53bd07=_0x3000c7(0x89)+_0x4aa225['label']+_0x3000c7(0x7a)+_0x4aa225[_0x3000c7(0x9b)]+_0x3000c7(0x6f)+_0x3000c7(0x88);if(!_0x31deb8)throw new Error(_0x53bd07);_0x57ac37['push'](_0x53bd07);}const _0x35d019=_0x1d3c4a[_0x3000c7(0x78)](isCssResource),_0x359856=_0x30fb11[_0x3000c7(0x78)](isCssResource);return _0x35d019&&!_0x359856&&_0x57ac37[_0x3000c7(0x90)](_0x3000c7(0x74)+_0x4aa225['label']+_0x3000c7(0x7a)+_0x4aa225['path']+').'),{'id':_0x4aa225['id'],'label':_0x4aa225[_0x3000c7(0x84)],'path':_0x4aa225[_0x3000c7(0x9b)],'mode':_0x39e52e,'before':{'resources':_0x1d3c4a},'after':{'resources':_0x30fb11},'warnings':_0x57ac37};}function replaceResources(_0x4c6a86){const _0x22f689=a91_0x1080;return[_0x4c6a86[_0x22f689(0x85)],_0x4c6a86[_0x22f689(0x6c)]][_0x22f689(0x97)](_0x2c567c=>!!_0x2c567c);}function patchResources(_0x24a9bd,_0x1ebf91){const _0x47f63a=a91_0x1080;let _0x48956a=![],_0x5ee81b=![];const _0x3ac062=[];for(const _0x44df9a of _0x24a9bd){if(isJsResource(_0x44df9a)){if(_0x1ebf91[_0x47f63a(0x85)]&&!_0x48956a)_0x3ac062['push'](_0x1ebf91[_0x47f63a(0x85)]),_0x48956a=!![];else!_0x1ebf91['jsUrl']&&_0x3ac062[_0x47f63a(0x90)](_0x44df9a);continue;}if(isCssResource(_0x44df9a)){if(_0x1ebf91[_0x47f63a(0x6c)]&&!_0x5ee81b)_0x3ac062[_0x47f63a(0x90)](_0x1ebf91[_0x47f63a(0x6c)]),_0x5ee81b=!![];else!_0x1ebf91['cssUrl']&&_0x3ac062['push'](_0x44df9a);continue;}_0x3ac062[_0x47f63a(0x90)](_0x44df9a);}return _0x1ebf91[_0x47f63a(0x85)]&&!_0x48956a&&_0x3ac062[_0x47f63a(0x95)](_0x1ebf91[_0x47f63a(0x85)]),_0x1ebf91[_0x47f63a(0x6c)]&&!_0x5ee81b&&_0x3ac062[_0x47f63a(0x90)](_0x1ebf91['cssUrl']),_0x3ac062;}function isJsResource(_0x569448){const _0x425b4d=a91_0x1080;return stripQuery(_0x569448)['toLowerCase']()[_0x425b4d(0x69)](_0x425b4d(0x6e));}function isCssResource(_0x2ad238){const _0xf2cfed=a91_0x1080;return stripQuery(_0x2ad238)[_0xf2cfed(0x6d)]()[_0xf2cfed(0x69)]('.css');}function stripQuery(_0x5aa391){const _0x4ad4a4=a91_0x1080;return _0x5aa391[_0x4ad4a4(0x91)]('?')[0x0]??_0x5aa391;}function parseUpdateParamsFlag(_0xdf57c4){const _0x4c2994=a91_0x1080;if(!_0xdf57c4||typeof _0xdf57c4!==_0x4c2994(0x80))return{};try{const _0x205f49=JSON[_0x4c2994(0x98)](_0xdf57c4);if(typeof _0x205f49!==_0x4c2994(0x75)||_0x205f49===null||Array[_0x4c2994(0x9a)](_0x205f49))return{};return{'jsUrl':typeof _0x205f49[_0x4c2994(0x85)]===_0x4c2994(0x80)?_0x205f49[_0x4c2994(0x85)][_0x4c2994(0x71)]():undefined,'cssUrl':typeof _0x205f49[_0x4c2994(0x6c)]===_0x4c2994(0x80)?_0x205f49['cssUrl'][_0x4c2994(0x71)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a92_0x4fcc(){const _0x481f92=['4385115WEfENg','2670DgOOvO','40GMxDUh','7UfRxtw','1629568DPJQZF','20326McegUL','1078924xMQUbp','test','536640DAsWzM','91cpoBuM','HEAD','2946339hoLRki','5276ydEYwT'];a92_0x4fcc=function(){return _0x481f92;};return a92_0x4fcc();}function a92_0x2f86(_0x4eb3dd,_0x1a74f7){_0x4eb3dd=_0x4eb3dd-0x17b;const _0x4fcc9d=a92_0x4fcc();let _0x2f867b=_0x4fcc9d[_0x4eb3dd];return _0x2f867b;}(function(_0x544657,_0x3354c7){const _0x23c8ca=a92_0x2f86,_0x1e5ce3=_0x544657();while(!![]){try{const _0x34aa8e=parseInt(_0x23c8ca(0x17e))/0x1*(parseInt(_0x23c8ca(0x180))/0x2)+parseInt(_0x23c8ca(0x17c))/0x3*(parseInt(_0x23c8ca(0x187))/0x4)+-parseInt(_0x23c8ca(0x17b))/0x5+-parseInt(_0x23c8ca(0x183))/0x6*(-parseInt(_0x23c8ca(0x184))/0x7)+-parseInt(_0x23c8ca(0x17f))/0x8+-parseInt(_0x23c8ca(0x186))/0x9+-parseInt(_0x23c8ca(0x17d))/0xa*(parseInt(_0x23c8ca(0x181))/0xb);if(_0x34aa8e===_0x3354c7)break;else _0x1e5ce3['push'](_0x1e5ce3['shift']());}catch(_0x497191){_0x1e5ce3['push'](_0x1e5ce3['shift']());}}}(a92_0x4fcc,0x94471));export function isValidJsHttpsUrl(_0x4edb3c){const _0x239987=a92_0x2f86;return/^https:\/\/.+\.js(\?.*)?$/[_0x239987(0x182)](_0x4edb3c['trim']());}export function isValidCssHttpsUrl(_0x309fcc){const _0x92e81a=a92_0x2f86;return/^https:\/\/.+\.css(\?.*)?$/[_0x92e81a(0x182)](_0x309fcc['trim']());}export async function isUrlReachable(_0x2b8cb8){const _0x35cecc=a92_0x2f86;try{const _0x3c8692=await fetch(_0x2b8cb8,{'method':_0x35cecc(0x185)});return _0x3c8692['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x258bc4=a93_0x17cc;(function(_0x2978f7,_0x4f820e){const _0x52df27=a93_0x17cc,_0x20faa8=_0x2978f7();while(!![]){try{const _0x56cd66=parseInt(_0x52df27(0x71))/0x1*(parseInt(_0x52df27(0xaa))/0x2)+-parseInt(_0x52df27(0xaf))/0x3*(parseInt(_0x52df27(0x80))/0x4)+-parseInt(_0x52df27(0x82))/0x5*(parseInt(_0x52df27(0x83))/0x6)+parseInt(_0x52df27(0xad))/0x7*(parseInt(_0x52df27(0xab))/0x8)+parseInt(_0x52df27(0x9d))/0x9+-parseInt(_0x52df27(0x91))/0xa*(-parseInt(_0x52df27(0xa2))/0xb)+-parseInt(_0x52df27(0x8c))/0xc*(parseInt(_0x52df27(0x97))/0xd);if(_0x56cd66===_0x4f820e)break;else _0x20faa8['push'](_0x20faa8['shift']());}catch(_0x4de346){_0x20faa8['push'](_0x20faa8['shift']());}}}(a93_0x2677,0xb6a75));import a93_0xa5f603 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a93_0x2677(){const _0x323af8=['cookie','\x20page(s)','4mFHSXH','Menu\x20sync\x20completed:\x20','10bPJcPh','135156uzBtta','string','\x20created.','appCode','failed','\x20menu(s)','boolean','write','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','1028556EjQxGZ','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Fetching\x20online\x20menu\x20list...','onlinePaths','length','790lqRDPh','cssUrl','created','\x20\x20✓\x20Selected:\x20','yellow','pages','221AaVdIZ','\x20failed.','\x20menu(s)\x20with\x20JS:\x20','jsUrl','isArray','\x20and\x20CSS:\x20','10217214JzHPcs','message','validation','Sync\x20local\x20pages\x20as\x20platform\x20menus','str','25212nfBccM','yes','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','gray','flag','selectedAppName','\x20\x20Create\x20','localPages','416514BcNOfk','992MSXVIi','\x20menu(s)\x20created','67109wVdOCg','menu','2638653bftVGl','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Created\x20','params','\x20\x20Cancelled.','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','3ImVHva','map','Failed\x20to\x20fetch\x20online\x20menu\x20list','appcode','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','Menu\x20creation\x20failed','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','✓\x20Menu\x20sync\x20completed:\x20','onlineMenuList','rawFlags','\x20created,\x20','size','Creating\x20'];a93_0x2677=function(){return _0x323af8;};return a93_0x2677();}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';function a93_0x17cc(_0x184b21,_0x508300){_0x184b21=_0x184b21-0x71;const _0x2677a4=a93_0x2677();let _0x17ccd3=_0x2677a4[_0x184b21];return _0x17ccd3;}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':a93_0x258bc4(0xae),'command':'sync','description':a93_0x258bc4(0xa0),'risk':a93_0x258bc4(0x8a),'flags':[{'name':a93_0x258bc4(0xb2),'type':'string','description':a93_0x258bc4(0x8b)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}'},{'name':a93_0x258bc4(0xa3),'type':a93_0x258bc4(0x89),'description':a93_0x258bc4(0x75)}],async 'execute'(_0x12c61e){const _0x37fdf1=a93_0x258bc4,_0x598653=_0x12c61e[_0x37fdf1(0x7a)]['appcode']?String(_0x12c61e[_0x37fdf1(0x7a)][_0x37fdf1(0x74)])['trim']():'';if(!isInProject()&&!_0x12c61e[_0x37fdf1(0xa7)]&&!_0x598653)throw CliErrors[_0x37fdf1(0x9f)](_0x37fdf1(0xb0)+_0x37fdf1(0xa4));const _0x574859=_0x12c61e[_0x37fdf1(0xa6)](_0x37fdf1(0xa3)),_0x38cf87=_0x12c61e[_0x37fdf1(0xa1)](_0x37fdf1(0xb2)),_0x52584a=parseParams(_0x38cf87),_0x35d94e=!!(_0x52584a['jsUrl']||_0x52584a['cssUrl']||_0x52584a[_0x37fdf1(0x96)]&&_0x52584a[_0x37fdf1(0x96)][_0x37fdf1(0x90)]>0x0);if(_0x574859||_0x35d94e){let _0x441c36=[];!isInteractive()&&!_0x52584a['pages']?.['length']&&(_0x441c36=await readPageLabelsFromStdin());const _0xfa1414=await runMenuSyncCore(_0x12c61e[_0x37fdf1(0x86)],_0x12c61e[_0x37fdf1(0x7e)],_0x441c36[_0x37fdf1(0x90)]>0x0?_0x441c36:_0x52584a[_0x37fdf1(0x96)]??[],_0x38cf87);if(_0xfa1414['skipped']){const _0x10c6a2=getLocalPages();_0x10c6a2[_0x37fdf1(0x90)]===0x0?writeCliSideChannelLine(_0x37fdf1(0x77)):writeCliSideChannelLine(_0x37fdf1(0x8d));}else writeCliSideChannelLine(_0x37fdf1(0x78)+_0xfa1414['created']+_0x37fdf1(0xac));return{'ok':!![],'data':_0xfa1414,'message':_0xfa1414['skipped']?'Menu\x20sync\x20skipped':_0x37fdf1(0x81)+_0xfa1414['created']+_0x37fdf1(0x85)};}requireInteractive();const _0x128057=startSpinner(_0x37fdf1(0x8e));let _0x3062b8,_0x16e72e,_0x25b231;try{const _0x5daccb=await fetchMenuData(_0x12c61e[_0x37fdf1(0x86)],_0x12c61e[_0x37fdf1(0x7e)]);_0x3062b8=_0x5daccb[_0x37fdf1(0xa9)],_0x16e72e=_0x5daccb[_0x37fdf1(0x8f)],_0x25b231=_0x5daccb[_0x37fdf1(0x79)],stopSpinner(_0x128057,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x37a26b){stopSpinner(_0x128057,_0x37fdf1(0x73),![]);throw CliErrors[_0x37fdf1(0x9f)](_0x37a26b instanceof Error?_0x37a26b['message']:_0x37fdf1(0x73));}if(_0x3062b8[_0x37fdf1(0x90)]===0x0)return writeCliSideChannelLine(a93_0xa5f603[_0x37fdf1(0x95)](_0x37fdf1(0xb4))),{'ok':!![]};const _0x2ff0be=buildCompareRows(_0x3062b8,_0x16e72e);writeCliSideChannelLine(renderCompareTable(_0x2ff0be)),writeCliSideChannelLine('');const _0x1b9e9f=_0x52584a['pages'],_0x4360b2=await selectPages(_0x3062b8,_0x16e72e,_0x1b9e9f);writeCliSideChannelLine(''),writeCliSideChannelLine(a93_0xa5f603['cyan'](_0x37fdf1(0x94)+_0x4360b2['length']+_0x37fdf1(0x7f)));const _0x37de6e=_0x52584a['jsUrl']&&_0x52584a[_0x37fdf1(0x92)];if(!_0x37de6e){writeCliSideChannelLine(renderSyncSummary(_0x4360b2,_0x16e72e[_0x37fdf1(0x7c)]>0x0));const _0x28ad13=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x28ad13)return writeCliSideChannelLine(a93_0xa5f603['gray'](_0x37fdf1(0xb3))),{'ok':!![]};}let _0x27d835=_0x52584a[_0x37fdf1(0x9a)],_0x11833e=_0x52584a[_0x37fdf1(0x92)];!_0x27d835&&(_0x27d835=await askJsUrl());!_0x11833e&&(_0x11833e=await askCssUrl());const _0x1e3d42=await askConfirm(_0x37fdf1(0xa8)+_0x4360b2[_0x37fdf1(0x90)]+_0x37fdf1(0x99)+_0x27d835+_0x37fdf1(0x9c)+_0x11833e+'?');if(!_0x1e3d42)return writeCliSideChannelLine(a93_0xa5f603[_0x37fdf1(0xa5)](_0x37fdf1(0xb3))),{'ok':!![]};const _0x74303d=[_0x27d835,_0x11833e],_0x38d1ce=startSpinner(_0x37fdf1(0x7d)+_0x4360b2[_0x37fdf1(0x90)]+'\x20menu(s)...');try{const _0x46f73d=await doCreateMenus(_0x12c61e[_0x37fdf1(0x86)],_0x12c61e['cookie'],_0x4360b2,_0x74303d);return stopSpinner(_0x38d1ce,_0x37fdf1(0xb1)+_0x46f73d['created']+_0x37fdf1(0x88),!![]),{'ok':!![],'data':_0x46f73d,'message':'Menu\x20sync\x20completed:\x20'+_0x46f73d[_0x37fdf1(0x93)]+_0x37fdf1(0x7b)+_0x46f73d[_0x37fdf1(0x87)]+_0x37fdf1(0x98)};}catch(_0x4b56eb){stopSpinner(_0x38d1ce,_0x37fdf1(0x76),![]);throw CliErrors[_0x37fdf1(0x9f)](_0x4b56eb instanceof Error?_0x4b56eb[_0x37fdf1(0x9e)]:_0x37fdf1(0x76));}}};function parseParams(_0x255aad){const _0x55cadb=a93_0x258bc4;if(!_0x255aad)return{};try{const _0x96fa78=JSON['parse'](_0x255aad);if(typeof _0x96fa78!=='object'||_0x96fa78===null||Array[_0x55cadb(0x9b)](_0x96fa78))return{};return{'jsUrl':typeof _0x96fa78[_0x55cadb(0x9a)]===_0x55cadb(0x84)?_0x96fa78['jsUrl']['trim']():undefined,'cssUrl':typeof _0x96fa78[_0x55cadb(0x92)]===_0x55cadb(0x84)?_0x96fa78[_0x55cadb(0x92)]['trim']():undefined,'pages':Array['isArray'](_0x96fa78[_0x55cadb(0x96)])?_0x96fa78['pages'][_0x55cadb(0x72)](String):undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x432ba1=a94_0x4f44;(function(_0x40f2cc,_0x2df380){const _0x21db5f=a94_0x4f44,_0x102bf8=_0x40f2cc();while(!![]){try{const _0x5ca3f0=-parseInt(_0x21db5f(0xc3))/0x1*(-parseInt(_0x21db5f(0x101))/0x2)+-parseInt(_0x21db5f(0xc9))/0x3*(parseInt(_0x21db5f(0xe3))/0x4)+parseInt(_0x21db5f(0xfa))/0x5+-parseInt(_0x21db5f(0xf9))/0x6+-parseInt(_0x21db5f(0xca))/0x7+parseInt(_0x21db5f(0xc1))/0x8*(parseInt(_0x21db5f(0xd6))/0x9)+-parseInt(_0x21db5f(0xc4))/0xa*(-parseInt(_0x21db5f(0xf7))/0xb);if(_0x5ca3f0===_0x2df380)break;else _0x102bf8['push'](_0x102bf8['shift']());}catch(_0x4010b2){_0x102bf8['push'](_0x102bf8['shift']());}}}(a94_0x4350,0x5bf36));import a94_0x10f681 from'chalk';function a94_0x4350(){const _0x5a7394=['POST','map','string','27mddUzm','patch','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','jsUrl','cookie','\x20menu(s)\x20failed','high-risk-write','failed','isArray','52488pSNSoy','gray','object','force','Would\x20update\x20','Menu\x20update\x20completed:\x20','appCode','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','\x20menu\x20resource\x20set(s).','appcode','label','rawFlags','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','params','length','\x20menu(s)','Menu\x20update\x20skipped','cyan','Online\x20menu\x20list\x20fetched','updated','89111PqMYaH','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','3012600qOOlMV','1098650EfFkdR','\x20\x20Cancelled.','\x20\x20Update\x20','message','\x20menu(s)\x20with\x20existing\x20resources','yes','Updating\x20','2QNHLHi','Failed\x20to\x20fetch\x20online\x20menu\x20list','cssUrl','\x20menu(s)...','validation','Menu\x20update\x20failed','trim','parse','Updated\x20','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params','boolean','\x20menu(s)\x20with\x20JS:\x20','1772144TwzneF','skipped','616207VBTIsf','170tTaXBT','mode','\x20updated.','flag','/smartapi/menu/update','141QUzcNk','999208BrOELZ','\x20and\x20CSS:\x20','str','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Fetching\x20online\x20menu\x20list...','menu','\x20failed.','bool','replace'];a94_0x4350=function(){return _0x5a7394;};return a94_0x4350();}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':a94_0x432ba1(0xcf),'command':'update','description':a94_0x432ba1(0xd9),'risk':a94_0x432ba1(0xe0),'flags':[{'name':a94_0x432ba1(0xf0),'type':a94_0x432ba1(0xd5),'description':a94_0x432ba1(0xea)+a94_0x432ba1(0xf8)},{'name':a94_0x432ba1(0xff),'type':a94_0x432ba1(0x10b),'description':a94_0x432ba1(0x10a)},{'name':a94_0x432ba1(0xc5),'type':a94_0x432ba1(0xd5),'description':a94_0x432ba1(0xdb),'enum':['replace',a94_0x432ba1(0xd7)],'default':'replace'},{'name':'force','type':a94_0x432ba1(0x10b),'description':a94_0x432ba1(0xdc)}],async 'dryRun'(_0x39ee9a){const _0x2a5ef1=a94_0x432ba1;ensureRunnableContext(_0x39ee9a[_0x2a5ef1(0xee)],_0x39ee9a['selectedAppName']);const _0x51076f=await runMenuUpdateCore(_0x39ee9a[_0x2a5ef1(0xe9)],_0x39ee9a[_0x2a5ef1(0xde)],_0x39ee9a[_0x2a5ef1(0xcc)]('params'),{'mode':parseMode(_0x39ee9a[_0x2a5ef1(0xcc)](_0x2a5ef1(0xc5))),'dryRun':!![],'force':_0x39ee9a[_0x2a5ef1(0xd1)](_0x2a5ef1(0xe6))});return{'method':_0x2a5ef1(0xd3),'url':_0x2a5ef1(0xc8),'body':_0x51076f,'description':_0x51076f[_0x2a5ef1(0xc2)]?_0x2a5ef1(0xda):_0x2a5ef1(0xe7)+(_0x51076f['diffs']?.['length']??0x0)+_0x2a5ef1(0xeb)};},async 'execute'(_0x54d9e3){const _0x4f08c0=a94_0x432ba1;ensureRunnableContext(_0x54d9e3['rawFlags'],_0x54d9e3['selectedAppName']);const _0x546cf4=_0x54d9e3[_0x4f08c0(0xc7)](_0x4f08c0(0xff)),_0x5d3585=_0x54d9e3[_0x4f08c0(0xcc)](_0x4f08c0(0xf0)),_0x4c040d=parseMode(_0x54d9e3[_0x4f08c0(0xcc)]('mode')),_0x1fff62=_0x54d9e3[_0x4f08c0(0xd1)]('force'),_0xfdc19a=parseParams(_0x5d3585),_0x4dcdaf=!!(_0xfdc19a['jsUrl']||_0xfdc19a[_0x4f08c0(0x103)]);if(_0x546cf4||_0x4dcdaf&&!isInteractive()){const _0x4b78cb=await runMenuUpdateCore(_0x54d9e3[_0x4f08c0(0xe9)],_0x54d9e3[_0x4f08c0(0xde)],_0x5d3585,{'mode':_0x4c040d,'force':_0x1fff62});return _0x4b78cb['skipped']?writeCliSideChannelLine(_0x4f08c0(0xd8)):(writeCliSideChannelLine('✓\x20Menu\x20update\x20completed:\x20'+_0x4b78cb['updated']+'\x20menu(s)\x20updated'),_0x4b78cb[_0x4f08c0(0xe1)]>0x0&&writeCliSideChannelLine('!\x20'+_0x4b78cb['failed']+_0x4f08c0(0xdf))),{'ok':_0x4b78cb[_0x4f08c0(0xe1)]===0x0,'data':_0x4b78cb,'message':_0x4b78cb[_0x4f08c0(0xc2)]?_0x4f08c0(0xf3):'Menu\x20update\x20completed:\x20'+_0x4b78cb['updated']+'\x20updated,\x20'+_0x4b78cb['failed']+_0x4f08c0(0xd0)};}requireInteractive();const _0xbf5933=startSpinner(_0x4f08c0(0xce));let _0x469684;try{_0x469684=await fetchOnlineMenuList(_0x54d9e3[_0x4f08c0(0xe9)],_0x54d9e3[_0x4f08c0(0xde)]),stopSpinner(_0xbf5933,_0x4f08c0(0xf5),!![]);}catch(_0x2c4998){stopSpinner(_0xbf5933,_0x4f08c0(0x102),![]);throw CliErrors[_0x4f08c0(0x105)](_0x2c4998 instanceof Error?_0x2c4998[_0x4f08c0(0xfd)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}const _0x30721c=filterMenusWithResources(_0x469684);if(_0x30721c[_0x4f08c0(0xf1)]===0x0)return writeCliSideChannelLine(a94_0x10f681['yellow']('\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found')),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a94_0x10f681[_0x4f08c0(0xf4)]('\x20\x20Found\x20'+_0x30721c[_0x4f08c0(0xf1)]+_0x4f08c0(0xfe))),writeCliSideChannelLine(renderUpdateSummary(_0x30721c[_0x4f08c0(0xd4)](_0x578edd=>_0x578edd[_0x4f08c0(0xed)]),[_0xfdc19a['jsUrl'],_0xfdc19a[_0x4f08c0(0x103)]])),writeCliSideChannelLine('');let _0x2b1bae=_0xfdc19a[_0x4f08c0(0xdd)],_0x5de733=_0xfdc19a[_0x4f08c0(0x103)];!_0x2b1bae&&(_0x2b1bae=await askJsUrl());!_0x5de733&&(_0x5de733=await askCssUrl());const _0x51979f=await askConfirm(_0x4f08c0(0xfc)+_0x30721c[_0x4f08c0(0xf1)]+_0x4f08c0(0x10c)+_0x2b1bae+_0x4f08c0(0xcb)+_0x5de733+'?');if(!_0x51979f)return writeCliSideChannelLine(a94_0x10f681[_0x4f08c0(0xe4)](_0x4f08c0(0xfb))),{'ok':!![]};const _0x1669d4=[_0x2b1bae,_0x5de733],_0x48e04f=startSpinner(_0x4f08c0(0x100)+_0x30721c[_0x4f08c0(0xf1)]+_0x4f08c0(0x104));try{const _0x25c85e=await doUpdateCdnUrls(_0x54d9e3[_0x4f08c0(0xe9)],_0x54d9e3[_0x4f08c0(0xde)],_0x30721c,_0x1669d4);return stopSpinner(_0x48e04f,_0x4f08c0(0x109)+_0x25c85e['updated']+_0x4f08c0(0xf2),_0x25c85e[_0x4f08c0(0xe1)]===0x0),{'ok':_0x25c85e[_0x4f08c0(0xe1)]===0x0,'data':_0x25c85e,'message':_0x25c85e[_0x4f08c0(0xe1)]>0x0?_0x4f08c0(0xe8)+_0x25c85e[_0x4f08c0(0xf6)]+'\x20updated,\x20'+_0x25c85e[_0x4f08c0(0xe1)]+_0x4f08c0(0xd0):_0x4f08c0(0xe8)+_0x25c85e[_0x4f08c0(0xf6)]+_0x4f08c0(0xc6)};}catch(_0xf4a8b){stopSpinner(_0x48e04f,_0x4f08c0(0x106),![]);throw CliErrors[_0x4f08c0(0x105)](_0xf4a8b instanceof Error?_0xf4a8b[_0x4f08c0(0xfd)]:_0x4f08c0(0x106));}}};function a94_0x4f44(_0x21c150,_0x3e0718){_0x21c150=_0x21c150-0xc1;const _0x4350ee=a94_0x4350();let _0x4f447d=_0x4350ee[_0x21c150];return _0x4f447d;}function ensureRunnableContext(_0x4c64af,_0x746fe2){const _0x23cdd7=a94_0x432ba1,_0x1c2798=_0x4c64af[_0x23cdd7(0xec)]?String(_0x4c64af[_0x23cdd7(0xec)])[_0x23cdd7(0x107)]():'';if(!isInProject()&&!_0x746fe2&&!_0x1c2798)throw CliErrors[_0x23cdd7(0x105)]('menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x23cdd7(0xcd));}function parseMode(_0x5247be){const _0x37a595=a94_0x432ba1;if(!_0x5247be)return _0x37a595(0xd2);if(_0x5247be===_0x37a595(0xd2)||_0x5247be==='patch')return _0x5247be;throw CliErrors[_0x37a595(0x105)](_0x37a595(0xef));}function parseParams(_0x582e5e){const _0x30430a=a94_0x432ba1;if(!_0x582e5e)return{};try{const _0x3e471b=JSON[_0x30430a(0x108)](_0x582e5e);if(typeof _0x3e471b!==_0x30430a(0xe5)||_0x3e471b===null||Array[_0x30430a(0xe2)](_0x3e471b))return{};return{'jsUrl':typeof _0x3e471b['jsUrl']===_0x30430a(0xd5)?_0x3e471b[_0x30430a(0xdd)][_0x30430a(0x107)]():undefined,'cssUrl':typeof _0x3e471b[_0x30430a(0x103)]===_0x30430a(0xd5)?_0x3e471b[_0x30430a(0x103)][_0x30430a(0x107)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x393413=a95_0x55fd;function a95_0x55fd(_0x5edfbb,_0x2757f0){_0x5edfbb=_0x5edfbb-0x1e0;const _0x536027=a95_0x5360();let _0x55fd38=_0x536027[_0x5edfbb];return _0x55fd38;}(function(_0x2eea3d,_0x57e564){const _0x8a0baf=a95_0x55fd,_0x59b8ef=_0x2eea3d();while(!![]){try{const _0xb0d2c2=-parseInt(_0x8a0baf(0x1e5))/0x1*(parseInt(_0x8a0baf(0x1f0))/0x2)+-parseInt(_0x8a0baf(0x1f8))/0x3*(parseInt(_0x8a0baf(0x1f9))/0x4)+-parseInt(_0x8a0baf(0x1e3))/0x5+-parseInt(_0x8a0baf(0x1ee))/0x6*(-parseInt(_0x8a0baf(0x1fd))/0x7)+-parseInt(_0x8a0baf(0x1f1))/0x8+-parseInt(_0x8a0baf(0x1f5))/0x9*(parseInt(_0x8a0baf(0x204))/0xa)+parseInt(_0x8a0baf(0x1f3))/0xb;if(_0xb0d2c2===_0x57e564)break;else _0x59b8ef['push'](_0x59b8ef['shift']());}catch(_0x561237){_0x59b8ef['push'](_0x59b8ef['shift']());}}}(a95_0x5360,0xac4bd));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';function a95_0x5360(){const _0x587721=['string','fieldCount','/smartapi/lovrabet/dataset/','write','SUCCESS','228KdbXBn','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','560958zFTDpn','7390136aSkuIw','generate-start','50043543MKZJjz','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','9rstMdx','reused','dataset','786vFBagW','10408rZROQZ','Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','PARTIAL_SUCCESS','precheck','40453ybeeWI','message','related-pages-fallback','manualResolutionRequired','nextAction','bool','name','5796730MwXxAB','apply','progressRate','clientOperationId','appCode','operationId','standardPageStatus','status','compress','code','5183445BshSwo','currentStep','3MfhARh','boolean','/generate-standard-pages/start','复用已有生成任务'];a95_0x5360=function(){return _0x587721;};return a95_0x5360();}import{startGenerateStandardPages}from'../../core/api-client.js';export const pageGenerateStart={'service':'page','command':a95_0x393413(0x1f2),'description':a95_0x393413(0x1fa),'risk':a95_0x393413(0x1ec),'defaultOutputFormat':a95_0x393413(0x1e1),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a95_0x393413(0x1e9),'description':a95_0x393413(0x1ef)},{'name':'apply','type':a95_0x393413(0x1e6),'description':a95_0x393413(0x1f4)}],async 'validate'(_0x2f65dc){validateDatasetSelector(_0x2f65dc);},async 'dryRun'(_0x49f13d){const _0x2f35d8=a95_0x393413,_0x4775c8=await prepare(_0x49f13d);return{'method':'POST','url':_0x2f35d8(0x1eb)+_0x4775c8['dataset'][_0x2f35d8(0x1e2)]+_0x2f35d8(0x1e7),'body':{'appCode':_0x49f13d[_0x2f35d8(0x208)],'clientOperationId':_0x4775c8['clientOperationId']},'description':serializeDryRunDescription({'dataset':{'id':_0x4775c8[_0x2f35d8(0x1f7)]['id'],'code':_0x4775c8[_0x2f35d8(0x1f7)][_0x2f35d8(0x1e2)],'name':_0x4775c8[_0x2f35d8(0x1f7)][_0x2f35d8(0x203)],'fieldCount':_0x4775c8[_0x2f35d8(0x1f7)][_0x2f35d8(0x1ea)]},'precheckSource':_0x4775c8[_0x2f35d8(0x20a)]?.['source']??_0x2f35d8(0x1ff),'action':_0x2f35d8(0x1f2),'clientOperationId':_0x4775c8[_0x2f35d8(0x207)],'plannedStatus':_0x4775c8[_0x2f35d8(0x1fc)][_0x2f35d8(0x1e0)],'reason':_0x4775c8[_0x2f35d8(0x1fc)]['message']})};},async 'execute'(_0x3c67ec){const _0x1ef6ea=a95_0x393413;if(!_0x3c67ec[_0x1ef6ea(0x202)](_0x1ef6ea(0x205))){const _0x558854=await pageGenerateStart['dryRun'](_0x3c67ec);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x558854};}const _0x31c68=await prepare(_0x3c67ec);if(!_0x31c68[_0x1ef6ea(0x1fc)]['allowGenerate'])return{'ok':![],'message':_0x31c68['precheck'][_0x1ef6ea(0x1fe)],'data':{'datasetCode':_0x31c68[_0x1ef6ea(0x1f7)]['code'],'clientOperationId':_0x31c68[_0x1ef6ea(0x207)],'precheckSource':_0x31c68['standardPageStatus']?.['source']??'related-pages-fallback','status':_0x31c68[_0x1ef6ea(0x1fc)][_0x1ef6ea(0x1e0)],'manualResolutionRequired':_0x31c68[_0x1ef6ea(0x1fc)][_0x1ef6ea(0x200)],'nextAction':_0x31c68['precheck'][_0x1ef6ea(0x201)],'query':{'command':buildStandardPageStatusQueryCommand(_0x31c68[_0x1ef6ea(0x1f7)][_0x1ef6ea(0x1e2)],_0x3c67ec[_0x1ef6ea(0x208)])},'standardPageStatus':_0x31c68[_0x1ef6ea(0x20a)]}};const _0x380526=await startGenerateStandardPages(_0x3c67ec[_0x1ef6ea(0x208)],_0x31c68['dataset'][_0x1ef6ea(0x1e2)],{'clientOperationId':_0x31c68[_0x1ef6ea(0x207)]}),_0x35c4c9=_0x380526[_0x1ef6ea(0x1e0)]===_0x1ef6ea(0x1ed)||_0x380526[_0x1ef6ea(0x1e0)]===_0x1ef6ea(0x1fb)?await loadStandardPageStatusForGenerate(_0x3c67ec,_0x31c68['dataset']['code']):null,_0x375f61=assessGenerateOperationState(_0x31c68[_0x1ef6ea(0x1f7)][_0x1ef6ea(0x1e2)],_0x380526[_0x1ef6ea(0x1e0)],_0x35c4c9);return{'ok':!![],'message':_0x380526['reused']?_0x1ef6ea(0x1e8):'已提交生成任务','data':{'datasetCode':_0x31c68[_0x1ef6ea(0x1f7)]['code'],'appCode':_0x3c67ec[_0x1ef6ea(0x208)],'operationId':_0x380526[_0x1ef6ea(0x209)]??null,'clientOperationId':_0x31c68[_0x1ef6ea(0x207)],'jobStatus':_0x380526[_0x1ef6ea(0x1e0)]??null,'progressRate':typeof _0x380526[_0x1ef6ea(0x206)]==='number'?_0x380526[_0x1ef6ea(0x206)]:null,'currentStep':_0x380526[_0x1ef6ea(0x1e4)]??null,'reused':_0x380526[_0x1ef6ea(0x1f6)]===!![],'status':_0x375f61[_0x1ef6ea(0x1e0)],'manualResolutionRequired':_0x375f61[_0x1ef6ea(0x200)],'nextAction':_0x375f61[_0x1ef6ea(0x201)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x31c68['dataset'][_0x1ef6ea(0x1e2)],{'appCode':_0x3c67ec[_0x1ef6ea(0x208)],'operationId':_0x380526[_0x1ef6ea(0x209)],'clientOperationId':_0x31c68[_0x1ef6ea(0x207)]})},'standardPageStatus':_0x35c4c9}};}};async function prepare(_0x4c2159){const _0x5d1d76=a95_0x393413,_0x2cc2be=await loadDatasetDetailForPage(_0x4c2159),_0x17d738=await loadStandardPageStatusForGenerate(_0x4c2159,_0x2cc2be[_0x5d1d76(0x1e2)]),_0x54b8b4=getUndeletedRelatedPages(_0x2cc2be);return{'dataset':_0x2cc2be,'standardPageStatus':_0x17d738,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0x2cc2be[_0x5d1d76(0x1e2)],_0x17d738,{'fallbackUndeletedPages':_0x54b8b4})};}
|