@lovrabet/rabetbase-cli 2.1.12-beta.4 → 2.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/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 +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ad3d1,_0x19728e){const _0x14c9b3=a83_0x1bc2,_0x251bbe=_0x2ad3d1();while(!![]){try{const _0x9b5d96=-parseInt(_0x14c9b3(0x1cf))/0x1+parseInt(_0x14c9b3(0x1c9))/0x2*(-parseInt(_0x14c9b3(0x1be))/0x3)+-parseInt(_0x14c9b3(0x1c6))/0x4+-parseInt(_0x14c9b3(0x1d7))/0x5*(-parseInt(_0x14c9b3(0x1d6))/0x6)+parseInt(_0x14c9b3(0x1d0))/0x7+-parseInt(_0x14c9b3(0x1bf))/0x8*(-parseInt(_0x14c9b3(0x1ce))/0x9)+parseInt(_0x14c9b3(0x1ca))/0xa;if(_0x9b5d96===_0x19728e)break;else _0x251bbe['push'](_0x251bbe['shift']());}catch(_0x28b03a){_0x251bbe['push'](_0x251bbe['shift']());}}}(a83_0x3187,0x4ebc4));function strWidth(_0x688f1b){const _0x20e66a=a83_0x1bc2;let _0x2cf7a9=0x0;for(const _0x568f17 of _0x688f1b){_0x2cf7a9+=/[\u4e00-\u9fa5]/[_0x20e66a(0x1cb)](_0x568f17)?0x2:0x1;}return _0x2cf7a9;}function padRight(_0x1f2c26,_0xf6ea66){const _0x299e3c=a83_0x1bc2,_0x383166=strWidth(_0x1f2c26);return _0x1f2c26+'\x20'['repeat'](Math[_0x299e3c(0x1c8)](0x0,_0xf6ea66-_0x383166));}function a83_0x3187(){const _0x61adc2=['push','(unchanged)','\x20\x20\x20\x20CSS:\x20','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','5142YFVfiE','1010PGrEjs','12YAczaB','1288qSfSnK','showOnline','length','Menu\x20Name','join','\x20\x20\x20\x20JS:\x20\x20','repeat','2550692fPNsbu','\x20\x20Affected\x20menus:\x20','max','73930ryqDJM','4207320jXimJS','test','\x20\x20No\x20pages\x20to\x20sync.','\x20\x20\x20\x20•\x20','25749zlUcPO','501174isRkpF','3883180TlreCZ','label'];a83_0x3187=function(){return _0x61adc2;};return a83_0x3187();}function a83_0x1bc2(_0x2814a7,_0x2f4df3){_0x2814a7=_0x2814a7-0x1be;const _0x3187fe=a83_0x3187();let _0x1bc2a4=_0x3187fe[_0x2814a7];return _0x1bc2a4;}export function renderCompareTable(_0xfafa67,_0x97ae0d={}){const _0x3358cd=a83_0x1bc2;if(_0xfafa67[_0x3358cd(0x1c1)]===0x0)return'';const _0x296807=_0x97ae0d[_0x3358cd(0x1c0)]??!![],_0x13ebec=Math[_0x3358cd(0x1c8)](0x1e,..._0xfafa67['map'](_0x58f8aa=>strWidth(_0x58f8aa[_0x3358cd(0x1d1)]))),_0x31939b=0x4,_0x1dbccf=[],_0x292a07='\x20\x20'+padRight(_0x3358cd(0x1c2),_0x13ebec),_0x1457fd=padRight('Local',_0x31939b),_0x54ece3=_0x296807?'\x20\x20'+padRight('Platform',_0x31939b):'';_0x1dbccf['push'](_0x292a07+'\x20\x20'+_0x1457fd+(_0x296807?_0x54ece3:'')),_0x1dbccf[_0x3358cd(0x1d2)]('\x20\x20'+'─'[_0x3358cd(0x1c5)](_0x13ebec)+'\x20\x20'+'─'[_0x3358cd(0x1c5)](_0x31939b)+(_0x296807?'\x20\x20'+'─'[_0x3358cd(0x1c5)](_0x31939b):''));for(const _0x4a3f89 of _0xfafa67){const _0x458968=padRight(_0x4a3f89[_0x3358cd(0x1d1)],_0x13ebec),_0x3e2bb9=_0x4a3f89['local']?'✓':'✗',_0x3748b0=padRight(_0x3e2bb9,_0x31939b);let _0x8dccc8='\x20\x20'+_0x458968+'\x20\x20'+_0x3748b0;if(_0x296807){const _0x55e0d5=_0x4a3f89['online']?'✓':'✗';_0x8dccc8+='\x20\x20'+padRight(_0x55e0d5,_0x31939b);}_0x1dbccf[_0x3358cd(0x1d2)](_0x8dccc8);}return _0x1dbccf[_0x3358cd(0x1c3)]('\x0a');}export function renderSyncSummary(_0x237c48,_0x22da35){const _0x1ddfa6=a83_0x1bc2;if(_0x237c48[_0x1ddfa6(0x1c1)]===0x0)return _0x22da35?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':_0x1ddfa6(0x1cc);const _0x172d9b=['\x20\x20'+_0x237c48[_0x1ddfa6(0x1c1)]+'\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];for(const _0x2eb530 of _0x237c48){_0x172d9b[_0x1ddfa6(0x1d2)](_0x1ddfa6(0x1cd)+_0x2eb530[_0x1ddfa6(0x1d1)]+'\x20('+_0x2eb530['path']+')');}return _0x172d9b[_0x1ddfa6(0x1c3)]('\x0a');}export function renderUpdateSummary(_0xcd7f1a,_0x3fd55c){const _0x5cd240=a83_0x1bc2;if(_0xcd7f1a[_0x5cd240(0x1c1)]===0x0)return'\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.';const _0x1bac41=['\x20\x20'+_0xcd7f1a['length']+_0x5cd240(0x1d5),_0x5cd240(0x1c4)+(_0x3fd55c[0x0]??_0x5cd240(0x1d3)),_0x5cd240(0x1d4)+(_0x3fd55c[0x1]??_0x5cd240(0x1d3)),'',_0x5cd240(0x1c7)+_0xcd7f1a[_0x5cd240(0x1c3)](',\x20')];return _0x1bac41[_0x5cd240(0x1c3)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d6b6a,_0x3d9a11){var _0xe82ade=a84_0x7a2b,_0x4bf7cb=_0x2d6b6a();while(!![]){try{var _0x2e0d2c=parseInt(_0xe82ade(0x161))/0x1*(parseInt(_0xe82ade(0x16a))/0x2)+parseInt(_0xe82ade(0x163))/0x3+-parseInt(_0xe82ade(0x168))/0x4+parseInt(_0xe82ade(0x165))/0x5*(-parseInt(_0xe82ade(0x166))/0x6)+-parseInt(_0xe82ade(0x167))/0x7*(parseInt(_0xe82ade(0x16b))/0x8)+-parseInt(_0xe82ade(0x162))/0x9+-parseInt(_0xe82ade(0x164))/0xa*(-parseInt(_0xe82ade(0x169))/0xb);if(_0x2e0d2c===_0x3d9a11)break;else _0x4bf7cb['push'](_0x4bf7cb['shift']());}catch(_0xdbc5ef){_0x4bf7cb['push'](_0x4bf7cb['shift']());}}}(a84_0xa4ee,0xd5c92));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';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_0x7a2b(_0x2aa5ea,_0x550adf){_0x2aa5ea=_0x2aa5ea-0x161;var _0xa4eec5=a84_0xa4ee();var _0x7a2b8=_0xa4eec5[_0x2aa5ea];return _0x7a2b8;}export*from'../../../commands/menu/shared/sync-core.js';function a84_0xa4ee(){var _0x2e771b=['3863416DomDcH','295079yUGmKJ','9729963EcJjSU','4517199xfBZhw','3301610Ubwzcc','5PiQaKe','3610212LZPPmx','7VlOKcM','1500532ItnMtC','44OIsvJa','4PFwswr'];a84_0xa4ee=function(){return _0x2e771b;};return a84_0xa4ee();}export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x359f8d,_0x352db3){const _0x488889=a85_0x4f8d,_0x33345d=_0x359f8d();while(!![]){try{const _0x6a731c=parseInt(_0x488889(0x1d0))/0x1+-parseInt(_0x488889(0x1cc))/0x2+-parseInt(_0x488889(0x1d6))/0x3+parseInt(_0x488889(0x1db))/0x4+parseInt(_0x488889(0x1e9))/0x5*(parseInt(_0x488889(0x1dc))/0x6)+-parseInt(_0x488889(0x1e7))/0x7+-parseInt(_0x488889(0x1ee))/0x8*(-parseInt(_0x488889(0x1d3))/0x9);if(_0x6a731c===_0x352db3)break;else _0x33345d['push'](_0x33345d['shift']());}catch(_0x36f180){_0x33345d['push'](_0x33345d['shift']());}}}(a85_0x4627,0x1d7b3));import a85_0x124d58 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';function a85_0x4627(){const _0x489a3f=['CSS\x20URL\x20checked','221968gjhSig','49608bRXGkS','\x20\x20Checking\x20JS\x20URL\x20reachability...','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','fail','label','\x20\x20Checking\x20CSS\x20URL\x20reachability...','cyan','has','red','cancelled','error','807674LTOZLm','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','35COJpoa','catch','includes','name','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','72ptpfxY','start','isTTY','map','trim','\x20\x20JS\x20URL:','gray','CSS\x20URL\x20check\x20failed','Cancelled.','succeed','JS\x20URL\x20check\x20failed','279822rKLJhR','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','path','JS\x20URL\x20checked','85110aMYrJd','length','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','208989KGXQLb','stdin','\x20\x20CSS\x20URL:','94257qWenkF','ExitPromptError','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','[new]'];a85_0x4627=function(){return _0x489a3f;};return a85_0x4627();}import a85_0x57954d from'ora';function a85_0x4f8d(_0x3c5d55,_0x2b5fb4){_0x3c5d55=_0x3c5d55-0x1cb;const _0x462764=a85_0x4627();let _0x4f8d48=_0x462764[_0x3c5d55];return _0x4f8d48;}import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x2c5813){const _0x1ecf4d=a85_0x4f8d;return _0x2c5813[_0x1ecf4d(0x1ea)](_0x384282=>{const _0x14ead7=_0x1ecf4d;if(_0x384282?.[_0x14ead7(0x1ec)]===_0x14ead7(0x1d7))throw CliErrors[_0x14ead7(0x1e5)](_0x14ead7(0x1f6));throw _0x384282;});}export function startSpinner(_0x400bf2){const _0x3c733f=a85_0x4f8d;return a85_0x57954d({'text':_0x400bf2,'color':_0x3c733f(0x1e2)})[_0x3c733f(0x1ef)]();}export function stopSpinner(_0x16bb4e,_0xae853f,_0x3ff5de){const _0x37edb3=a85_0x4f8d;_0x3ff5de?_0x16bb4e[_0x37edb3(0x1f7)](_0xae853f):_0x16bb4e[_0x37edb3(0x1df)](_0xae853f);}export async function askConfirm(_0x58c633){return onCancel(confirm({'message':_0x58c633,'theme':{'prefix':''}}));}export async function askJsUrl(_0x2b9f8a){const _0x1ac417=a85_0x4f8d;while(!![]){const _0x3f20b8=await onCancel(input({'message':_0x1ac417(0x1f3),'default':_0x2b9f8a,'theme':{'prefix':''}}));if(_0x3f20b8[_0x1ac417(0x1f2)]()==='')throw CliErrors[_0x1ac417(0x1e5)]('Cancelled.');if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x3f20b8[_0x1ac417(0x1f2)]())){console[_0x1ac417(0x1e6)](a85_0x124d58[_0x1ac417(0x1e4)](_0x1ac417(0x1e8)));continue;}const _0x4130a0=startSpinner(_0x1ac417(0x1dd));try{const _0x4aac32=await isUrlReachable(_0x3f20b8[_0x1ac417(0x1f2)]());stopSpinner(_0x4130a0,_0x1ac417(0x1cf),_0x4aac32);if(!_0x4aac32){console[_0x1ac417(0x1e6)](a85_0x124d58[_0x1ac417(0x1e4)](_0x1ac417(0x1de)));continue;}return _0x3f20b8[_0x1ac417(0x1f2)]();}catch(_0x564ede){stopSpinner(_0x4130a0,_0x1ac417(0x1cb),![]);throw _0x564ede;}}}export async function askCssUrl(_0x11d0e6){const _0x48734e=a85_0x4f8d;while(!![]){const _0x55cbb3=await onCancel(input({'message':_0x48734e(0x1d5),'default':_0x11d0e6,'theme':{'prefix':''}}));if(_0x55cbb3['trim']()==='')throw CliErrors[_0x48734e(0x1e5)](_0x48734e(0x1f6));if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x55cbb3[_0x48734e(0x1f2)]())){console[_0x48734e(0x1e6)](a85_0x124d58[_0x48734e(0x1e4)](_0x48734e(0x1d2)));continue;}const _0x576b50=startSpinner(_0x48734e(0x1e1));try{const _0x26dca9=await isUrlReachable(_0x55cbb3['trim']());stopSpinner(_0x576b50,_0x48734e(0x1da),_0x26dca9);if(!_0x26dca9){console[_0x48734e(0x1e6)](a85_0x124d58[_0x48734e(0x1e4)](_0x48734e(0x1d8)));continue;}return _0x55cbb3['trim']();}catch(_0x6bfaca){stopSpinner(_0x576b50,_0x48734e(0x1f5),![]);throw _0x6bfaca;}}}export async function selectPages(_0x304a23,_0x4e202e,_0x17c5a3){const _0x28a1b3=a85_0x4f8d,_0xd13fce=_0x304a23[_0x28a1b3(0x1f1)](_0x3d6f5f=>({'name':_0x3d6f5f[_0x28a1b3(0x1e0)]+'\x20\x20'+(_0x4e202e[_0x28a1b3(0x1e3)](_0x3d6f5f[_0x28a1b3(0x1ce)])?a85_0x124d58[_0x28a1b3(0x1f4)]('[already\x20on\x20platform]'):a85_0x124d58['green'](_0x28a1b3(0x1d9))),'value':_0x3d6f5f[_0x28a1b3(0x1e0)],'checked':_0x17c5a3?_0x17c5a3[_0x28a1b3(0x1eb)](_0x3d6f5f['label']):!_0x4e202e['has'](_0x3d6f5f[_0x28a1b3(0x1ce)])}));if(_0xd13fce[_0x28a1b3(0x1d1)]===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x35b718=await onCancel(checkbox({'message':_0x28a1b3(0x1cd),'choices':_0xd13fce,'loop':![],'theme':{'prefix':''}}));if(_0x35b718['length']===0x0)throw new Error('No\x20menus\x20selected.');return _0x304a23['filter'](_0x1b1641=>_0x35b718[_0x28a1b3(0x1eb)](_0x1b1641[_0x28a1b3(0x1e0)]));}export function isInteractive(){const _0x3b2235=a85_0x4f8d;return process[_0x3b2235(0x1d4)][_0x3b2235(0x1f0)]===!![];}export function requireInteractive(){const _0x52e627=a85_0x4f8d;if(!isInteractive())throw new Error('This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20'+_0x52e627(0x1ed));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x591b06=a86_0x543d;(function(_0x5aaa89,_0x221448){const _0x963831=a86_0x543d,_0x838f1a=_0x5aaa89();while(!![]){try{const _0x58b59d=-parseInt(_0x963831(0x129))/0x1+-parseInt(_0x963831(0x12a))/0x2*(parseInt(_0x963831(0x121))/0x3)+-parseInt(_0x963831(0x110))/0x4*(-parseInt(_0x963831(0x127))/0x5)+parseInt(_0x963831(0x128))/0x6*(parseInt(_0x963831(0x124))/0x7)+parseInt(_0x963831(0x114))/0x8+-parseInt(_0x963831(0x111))/0x9*(parseInt(_0x963831(0x120))/0xa)+parseInt(_0x963831(0x112))/0xb*(-parseInt(_0x963831(0x11e))/0xc);if(_0x58b59d===_0x221448)break;else _0x838f1a['push'](_0x838f1a['shift']());}catch(_0x328cc0){_0x838f1a['push'](_0x838f1a['shift']());}}}(a86_0x28a9,0xc811e));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';function a86_0x28a9(){const _0x16697e=['409022xKMxyk','382ajQOzD','replace','match','577024zSMYCb','951813rkNBzA','3349412gEhVuZ','utf-8','11755096zfCFwW','forEach','cwd','trim','src/pages','endsWith','path','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','isDirectory','concat','12FuepMl','index.tsx','80YUrqvC','13029opqvNX','split','filter','1134eawyil','slice','.tsx','50OmEBWc','10986LZJuWP'];a86_0x28a9=function(){return _0x16697e;};return a86_0x28a9();}const pagesDir=resolve(process[a86_0x591b06(0x116)](),a86_0x591b06(0x118));function a86_0x543d(_0x179e96,_0x536f44){_0x179e96=_0x179e96-0x10f;const _0x28a919=a86_0x28a9();let _0x543ddf=_0x28a919[_0x179e96];return _0x543ddf;}export function extractTitleFromComment(_0x32afb3){const _0x118209=a86_0x591b06;try{const _0x5cc531=readFileSync(_0x32afb3,_0x118209(0x113)),_0x33e39f=_0x5cc531[_0x118209(0x10f)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x33e39f&&_0x33e39f[0x1]){const _0x579cf4=_0x33e39f[0x1],_0x55f3c0=_0x579cf4[_0x118209(0x10f)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x55f3c0&&_0x55f3c0[0x1])return _0x55f3c0[0x1][_0x118209(0x117)]();}let _0x52c01d=null;const _0x5e61cd=_0x5cc531[_0x118209(0x10f)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x5e61cd&&_0x5e61cd[0x1]&&(_0x52c01d=_0x5e61cd[0x1]);if(!_0x52c01d){const _0x498db9=_0x5cc531[_0x118209(0x10f)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x498db9&&_0x498db9[0x1]&&(_0x52c01d=_0x498db9[0x1]);}if(_0x52c01d){const _0x51eb2f=new RegExp('\x5cb'+_0x52c01d+_0x118209(0x11b)),_0x75d286=_0x5cc531[_0x118209(0x10f)](_0x51eb2f);if(_0x75d286&&_0x75d286[0x1])return _0x75d286[0x1];return _0x52c01d;}return null;}catch(_0xf605b6){return null;}}export function getLocalPages(_0x24354b=pagesDir,_0x277eda=pagesDir){const _0x367f56=a86_0x591b06;let _0x1550ef=[];const _0x268f10=readdirSync(_0x24354b);return _0x268f10[_0x367f56(0x115)](_0x7a92ea=>{const _0x4c5827=_0x367f56,_0x1acf41=join(_0x24354b,_0x7a92ea),_0x26e8ce=statSync(_0x1acf41);if(_0x26e8ce&&_0x26e8ce[_0x4c5827(0x11c)]())_0x1550ef=_0x1550ef[_0x4c5827(0x11d)](getLocalPages(_0x1acf41,_0x277eda));else{if(_0x7a92ea[_0x4c5827(0x119)](_0x4c5827(0x126))){let _0x7c7a9a=relative(_0x277eda,_0x1acf41);_0x7c7a9a['endsWith'](_0x4c5827(0x11f))?_0x7c7a9a=_0x7c7a9a[_0x4c5827(0x12b)](/index\.tsx$/,''):_0x7c7a9a=_0x7c7a9a['replace'](/\.tsx$/,'');_0x7c7a9a['endsWith'](sep)&&(_0x7c7a9a=_0x7c7a9a[_0x4c5827(0x125)](0x0,-0x1));const _0xd2732e=_0x7c7a9a[_0x4c5827(0x122)](sep)['join']('/'),_0x8c425a=extractTitleFromComment(_0x1acf41),_0x367d60=_0x8c425a||_0xd2732e;_0x1550ef['push']({'path':_0xd2732e['replaceAll']('$',':'),'label':_0x367d60});}}}),_0x1550ef[_0x367f56(0x123)](_0x307b46=>_0x307b46[_0x367f56(0x11a)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x565333,_0x3d95a5){const _0xe6a5e3=a87_0x166d,_0x23cf81=_0x565333();while(!![]){try{const _0x5ec103=parseInt(_0xe6a5e3(0x1d4))/0x1+-parseInt(_0xe6a5e3(0x1f1))/0x2+-parseInt(_0xe6a5e3(0x1da))/0x3*(parseInt(_0xe6a5e3(0x1e3))/0x4)+parseInt(_0xe6a5e3(0x1e2))/0x5+-parseInt(_0xe6a5e3(0x1f0))/0x6*(-parseInt(_0xe6a5e3(0x1d3))/0x7)+parseInt(_0xe6a5e3(0x1ee))/0x8*(-parseInt(_0xe6a5e3(0x1d9))/0x9)+parseInt(_0xe6a5e3(0x1e4))/0xa*(-parseInt(_0xe6a5e3(0x1e1))/0xb);if(_0x5ec103===_0x3d95a5)break;else _0x23cf81['push'](_0x23cf81['shift']());}catch(_0x1e2ca2){_0x23cf81['push'](_0x23cf81['shift']());}}}(a87_0x305d,0xa0e37));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(_0xfffe8d){const _0x338f73=a87_0x166d,_0x21d21c=[];return!isValidJsHttpsUrl(_0xfffe8d)&&_0x21d21c[_0x338f73(0x1dd)](_0x338f73(0x1ef)),{'ok':_0x21d21c[_0x338f73(0x1ea)]===0x0,'errors':_0x21d21c};}export function validateCssUrl(_0x4827e4){const _0x86e988=a87_0x166d,_0x34aee4=[];return!isValidCssHttpsUrl(_0x4827e4)&&_0x34aee4['push'](_0x86e988(0x1e5)),{'ok':_0x34aee4[_0x86e988(0x1ea)]===0x0,'errors':_0x34aee4};}export async function validateJsUrlReachable(_0x39b5ee){const _0x5e7450=a87_0x166d,_0x1338f4=validateJsUrl(_0x39b5ee);if(!_0x1338f4['ok'])return _0x1338f4;const _0x37bbad=await isUrlReachable(_0x39b5ee);if(!_0x37bbad)_0x1338f4['errors'][_0x5e7450(0x1dd)](_0x5e7450(0x1e9));return{'ok':_0x1338f4[_0x5e7450(0x1df)]['length']===0x0,'errors':_0x1338f4[_0x5e7450(0x1df)]};}export async function validateCssUrlReachable(_0x32e2b8){const _0x2b782b=a87_0x166d,_0x49265e=validateCssUrl(_0x32e2b8);if(!_0x49265e['ok'])return _0x49265e;const _0x484456=await isUrlReachable(_0x32e2b8);if(!_0x484456)_0x49265e[_0x2b782b(0x1df)]['push']('CSS\x20URL\x20is\x20unreachable');return{'ok':_0x49265e[_0x2b782b(0x1df)][_0x2b782b(0x1ea)]===0x0,'errors':_0x49265e[_0x2b782b(0x1df)]};}export function buildCompareRows(_0x189e0a,_0x1247d0){const _0x57863d=a87_0x166d;return _0x189e0a[_0x57863d(0x1ec)](_0x12987f=>({'label':_0x12987f[_0x57863d(0x1d6)],'path':_0x12987f[_0x57863d(0x1d7)],'local':!![],'online':_0x1247d0['has'](_0x12987f[_0x57863d(0x1d7)])}));}function a87_0x305d(){const _0x16b7d4=['6533826nDOSnY','1095100HseEBf','fulfilled','7msfJgt','1084675fglysT','extend','label','path','filter','36GBVzQA','810tfYRCS','trim','join','push','allSettled','errors','has','165PMoekF','342370XNONWu','1064wfBDlZ','336370vZClsl','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','No\x20local\x20pages\x20matched\x20labels:\x20','value','find','JS\x20URL\x20is\x20unreachable','length','status','map','resources','918392uBPYFk','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'];a87_0x305d=function(){return _0x16b7d4;};return a87_0x305d();}export function filterNewPages(_0xb5e86a,_0x1acfbd,_0x149a6e){const _0x4b5c92=a87_0x166d;if(_0x149a6e&&_0x149a6e[_0x4b5c92(0x1ea)]>0x0){const _0x144f3d=new Set(_0x149a6e[_0x4b5c92(0x1ec)](_0xd4ca98=>_0xd4ca98[_0x4b5c92(0x1db)]())),_0x12cdfe=_0xb5e86a[_0x4b5c92(0x1d8)](_0x1b701f=>_0x144f3d[_0x4b5c92(0x1e0)](_0x1b701f['label']));if(_0x12cdfe[_0x4b5c92(0x1ea)]===0x0)throw new Error(_0x4b5c92(0x1e6)+[..._0x144f3d][_0x4b5c92(0x1dc)](',\x20'));return _0x12cdfe;}return _0xb5e86a[_0x4b5c92(0x1d8)](_0x56c1b8=>!_0x1acfbd[_0x4b5c92(0x1e0)](_0x56c1b8[_0x4b5c92(0x1d7)]));}export function filterPagesByLabels(_0x5b770a,_0x2b91ca){const _0x4ea997=a87_0x166d,_0x2d1af3=[],_0x43e825=[];for(const _0x50e577 of _0x2b91ca){const _0x12840e=_0x50e577[_0x4ea997(0x1db)](),_0x33d724=_0x5b770a[_0x4ea997(0x1e8)](_0x483d03=>_0x483d03[_0x4ea997(0x1d6)]===_0x12840e);if(_0x33d724)_0x2d1af3['push'](_0x33d724);else _0x43e825['push'](_0x50e577);}return{'matched':_0x2d1af3,'unmatched':_0x43e825};}export async function doCreateMenus(_0x162682,_0x2de39d,_0x4cf62c,_0x52aa00){const _0x419935=a87_0x166d,_0x5cb940=await createMenus(_0x162682,_0x2de39d,_0x4cf62c,_0x52aa00);return{'created':_0x5cb940[_0x419935(0x1ea)],'failed':0x0,'labels':_0x4cf62c[_0x419935(0x1ec)](_0x12e912=>_0x12e912[_0x419935(0x1d6)]),'menus':_0x5cb940};}export function filterMenusWithResources(_0x511f2d){const _0x5a26b4=a87_0x166d;return _0x511f2d['filter'](_0x5b7fae=>_0x5b7fae[_0x5a26b4(0x1ed)][_0x5a26b4(0x1ea)]>0x0);}function a87_0x166d(_0x22317b,_0x58a5cd){_0x22317b=_0x22317b-0x1d3;const _0x305d51=a87_0x305d();let _0x166d1b=_0x305d51[_0x22317b];return _0x166d1b;}export async function doUpdateCdnUrls(_0x3c214e,_0x43a43b,_0x558881,_0x5a3db7){const _0x2bd4bd=a87_0x166d,_0x51a0b5=_0x558881['filter'](_0x2217a5=>_0x2217a5[_0x2bd4bd(0x1ed)]['length']>0x0),_0x234d76=await Promise[_0x2bd4bd(0x1de)](_0x51a0b5[_0x2bd4bd(0x1ec)](_0x418b23=>updateMenuCdnUrl(_0x3c214e,_0x43a43b,{'id':_0x418b23['id'],'label':_0x418b23[_0x2bd4bd(0x1d6)],'path':_0x418b23[_0x2bd4bd(0x1d7)],'resources':_0x5a3db7,'extend':_0x418b23[_0x2bd4bd(0x1d5)]??null}))),_0xce455d=_0x234d76['filter'](_0xddd28d=>_0xddd28d[_0x2bd4bd(0x1eb)]===_0x2bd4bd(0x1f2))[_0x2bd4bd(0x1ec)](_0x3cb00b=>_0x3cb00b[_0x2bd4bd(0x1e7)]),_0x5a1eac=_0x234d76[_0x2bd4bd(0x1d8)](_0x50ca5e=>_0x50ca5e[_0x2bd4bd(0x1eb)]==='rejected')[_0x2bd4bd(0x1ea)];return{'updated':_0xce455d[_0x2bd4bd(0x1ea)],'failed':_0x5a1eac,'menus':_0xce455d};}export async function fetchMenuData(_0x290264,_0x177944){const _0x2c3527=a87_0x166d,_0x349c3a=getLocalPages(),_0x534f01=await getOnlineMenuList(_0x290264,_0x177944),_0x1bf209=new Set(_0x534f01[_0x2c3527(0x1ec)](_0xecd2fe=>_0xecd2fe[_0x2c3527(0x1d7)]));return{'localPages':_0x349c3a,'onlineMenuList':_0x534f01,'onlinePaths':_0x1bf209};}export async function fetchOnlineMenuList(_0x2c05aa,_0x1f90b7){return getOnlineMenuList(_0x2c05aa,_0x1f90b7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25f7eb,_0x52f649){const _0x4159b4=a88_0x1dd4,_0x180cae=_0x25f7eb();while(!![]){try{const _0x439248=-parseInt(_0x4159b4(0x1b0))/0x1*(-parseInt(_0x4159b4(0x1ac))/0x2)+-parseInt(_0x4159b4(0x19a))/0x3*(parseInt(_0x4159b4(0x1b1))/0x4)+-parseInt(_0x4159b4(0x1b3))/0x5+-parseInt(_0x4159b4(0x1af))/0x6+-parseInt(_0x4159b4(0x1b2))/0x7+parseInt(_0x4159b4(0x195))/0x8+parseInt(_0x4159b4(0x1b5))/0x9;if(_0x439248===_0x52f649)break;else _0x180cae['push'](_0x180cae['shift']());}catch(_0x4cdec2){_0x180cae['push'](_0x180cae['shift']());}}}(a88_0x50b7,0xa3988));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';function a88_0x50b7(){const _0x3c69c5=['7708498gpKhvO','2378700WhentW','\x20online\x20menus\x20successfully','20916216qGZwIH','/smartapi/menu/create','info','stringify','length','Menu\x20assets\x20synced:\x20','Batch\x20menu\x20creation\x20completed,\x20total\x20','create-menus','7556592fLwdkT','/smartapi/menu/find?appCode=','children','Create\x20menu\x20\x22','procode','15255iACWRm','Start\x20batch\x20menu\x20creation,\x20total\x20','get-online-menu-list','Updating\x20menu\x20asset\x20links:\x20','Server\x20returned\x20empty\x20menu\x20list','update-menu-cdn-url','path','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Fetched\x20','resources','extend','label','flat','Menu\x20created\x20successfully:\x20','Update\x20menu\x20assets\x20\x22','import','POST','parse','844094qJthOv','create-menu','map','637488NQolnW','1XcDuhe','1052WpCcQC'];a88_0x50b7=function(){return _0x3c69c5;};return a88_0x50b7();}function a88_0x1dd4(_0x388951,_0x1f8ce4){_0x388951=_0x388951-0x18e;const _0x50b79c=a88_0x50b7();let _0x1dd400=_0x50b79c[_0x388951];return _0x1dd400;}import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x5b428c,_0x2a0e95){const _0x1968bb=a88_0x1dd4,_0x2de5fb=getEnv();logger[_0x1968bb(0x18f)](_0x1968bb(0x19c),isProduction(_0x2de5fb)?_0x1968bb(0x1a1)+_0x5b428c+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x5b428c+')');const _0x562d59=await platformFetch(getApiDomain()+_0x1968bb(0x196)+_0x5b428c,{'cookie':_0x2a0e95,'label':'Fetch\x20menu\x20list'});if(!_0x562d59)return logger['info'](_0x1968bb(0x19c),_0x1968bb(0x19e)),[];return logger['info']('get-online-menu-list',_0x1968bb(0x1a2)+_0x562d59[_0x1968bb(0x191)]+_0x1968bb(0x1b4)),_0x562d59[_0x1968bb(0x1ae)](flattenMenuItem)[_0x1968bb(0x1a6)]();}function flattenMenuItem(_0x1a55c0){const _0x5593b5=a88_0x1dd4;let _0x6c951f=[];try{const _0xa9e669=_0x1a55c0[_0x5593b5(0x1a4)]?.[_0x5593b5(0x1a3)];if(typeof _0xa9e669==='string'){const _0x529192=JSON[_0x5593b5(0x1ab)](_0xa9e669);if(Array['isArray'](_0x529192))_0x6c951f=_0x529192[_0x5593b5(0x1ae)](String);}else Array['isArray'](_0xa9e669)&&(_0x6c951f=_0xa9e669[_0x5593b5(0x1ae)](String));}catch{}const _0x4dbb38=[{'id':_0x1a55c0['id'],'path':_0x1a55c0['path'],'label':_0x1a55c0[_0x5593b5(0x1a5)],'resources':_0x6c951f,'extend':_0x1a55c0[_0x5593b5(0x1a4)]??null}];if(_0x1a55c0[_0x5593b5(0x197)]&&_0x1a55c0['children'][_0x5593b5(0x191)]>0x0)for(const _0x4e84a5 of _0x1a55c0[_0x5593b5(0x197)]){_0x4dbb38['push'](...flattenMenuItem(_0x4e84a5));}return _0x4dbb38;}export async function createMenu(_0x3156fc,_0x308bc8,_0x44baf6){const _0x495eb1=a88_0x1dd4;logger[_0x495eb1(0x18f)](_0x495eb1(0x1ad),'Creating\x20menu:\x20'+_0x44baf6[_0x495eb1(0x1a5)]+'\x20('+_0x44baf6[_0x495eb1(0x1a0)]+')');const _0x1d5a97={'appCode':_0x3156fc,'type':_0x495eb1(0x199),'sort':0x0,'extend':{'loadScriptMode':_0x495eb1(0x1a9),'resources':_0x44baf6[_0x495eb1(0x1a3)]?JSON[_0x495eb1(0x190)](_0x44baf6[_0x495eb1(0x1a3)]):undefined},..._0x44baf6},_0x19d61a=await platformFetch(getApiDomain()+_0x495eb1(0x18e),{'method':_0x495eb1(0x1aa),'body':_0x1d5a97,'cookie':_0x308bc8,'label':_0x495eb1(0x198)+_0x44baf6['label']+'\x22'});return logger[_0x495eb1(0x18f)]('create-menu',_0x495eb1(0x1a7)+_0x44baf6[_0x495eb1(0x1a5)]),_0x19d61a;}async function createSingleMenu(_0x24c0e1,_0x8dd332,_0x5cb6fb,_0x127b90){const _0x19147e=a88_0x1dd4,_0x46deaf={'appCode':_0x24c0e1,'type':_0x19147e(0x199),'sort':0x0,'extend':{'loadScriptMode':_0x19147e(0x1a9),'resources':_0x127b90?JSON['stringify'](_0x127b90):undefined},'label':_0x5cb6fb[_0x19147e(0x1a5)],'path':_0x5cb6fb['path']},_0x5d1201=await platformFetch(getApiDomain()+_0x19147e(0x18e),{'method':'POST','body':_0x46deaf,'cookie':_0x8dd332,'label':_0x19147e(0x198)+_0x5cb6fb[_0x19147e(0x1a5)]+'\x22'});return logger[_0x19147e(0x18f)](_0x19147e(0x1ad),_0x19147e(0x1a7)+_0x5cb6fb['label']),_0x5d1201;}export async function createMenus(_0x399020,_0x84de6a,_0x2e2442,_0x3d0f75){const _0x2dba9a=a88_0x1dd4;logger[_0x2dba9a(0x18f)]('create-menus',_0x2dba9a(0x19b)+_0x2e2442['length']);const _0x3ed1a0=await Promise['all'](_0x2e2442[_0x2dba9a(0x1ae)](_0x48d482=>createSingleMenu(_0x399020,_0x84de6a,_0x48d482,_0x3d0f75)));return logger[_0x2dba9a(0x18f)](_0x2dba9a(0x194),_0x2dba9a(0x193)+_0x2e2442[_0x2dba9a(0x191)]),_0x3ed1a0;}export async function updateMenuCdnUrl(_0x1047a2,_0x5befcf,_0x29c83e){const _0x4de1a6=a88_0x1dd4;logger[_0x4de1a6(0x18f)](_0x4de1a6(0x19f),_0x4de1a6(0x19d)+_0x29c83e[_0x4de1a6(0x1a5)]+'\x20('+_0x29c83e['path']+')');const _0x4d32c6={'id':_0x29c83e['id'],'appCode':_0x1047a2,'extend':{..._0x29c83e[_0x4de1a6(0x1a4)]??{},'loadScriptMode':'import','resources':_0x29c83e[_0x4de1a6(0x1a3)]?JSON[_0x4de1a6(0x190)](_0x29c83e['resources']):undefined}},_0x1e6528=await platformFetch(getApiDomain()+'/smartapi/menu/update',{'method':'POST','body':_0x4d32c6,'cookie':_0x5befcf,'label':_0x4de1a6(0x1a8)+_0x29c83e['label']+'\x22'});return logger[_0x4de1a6(0x18f)](_0x4de1a6(0x19f),_0x4de1a6(0x192)+_0x29c83e['label'],undefined),_0x1e6528;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xdbbd09,_0x1224fd){const _0x5d1a68=a89_0x493a,_0x3e7b7d=_0xdbbd09();while(!![]){try{const _0x417df3=parseInt(_0x5d1a68(0xcd))/0x1+-parseInt(_0x5d1a68(0xf5))/0x2+parseInt(_0x5d1a68(0xea))/0x3+-parseInt(_0x5d1a68(0xd5))/0x4+-parseInt(_0x5d1a68(0xcc))/0x5*(-parseInt(_0x5d1a68(0xdc))/0x6)+-parseInt(_0x5d1a68(0xed))/0x7+parseInt(_0x5d1a68(0xdf))/0x8*(parseInt(_0x5d1a68(0xf2))/0x9);if(_0x417df3===_0x1224fd)break;else _0x3e7b7d['push'](_0x3e7b7d['shift']());}catch(_0xb9e56){_0x3e7b7d['push'](_0x3e7b7d['shift']());}}}(a89_0x5d8b,0xa5ce6));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 a89_0x493a(_0x12ea1a,_0x375588){_0x12ea1a=_0x12ea1a-0xcb;const _0x5d8b80=a89_0x5d8b();let _0x493a5f=_0x5d8b80[_0x12ea1a];return _0x493a5f;}function a89_0x5d8b(){const _0x57a235=['filter','2251764mghNVR','--params.','Start\x20non-interactive\x20menu\x20sync','1371632AZEDUp','isArray','\x0a\x20\x20Available\x20local\x20pages:\x20','Invalid\x20--params:\x20','message','10xaXYMG','85681aUdRPP','has','trim','utf8','string','label','JS\x20URL\x20is\x20unreachable:\x20','jsUrl','5196384PNZJYl','end','pages','length','cwd','readableEnded','path','602322hTuotf','startsWith','field','48zAIzFE','CSS\x20URL\x20is\x20unreachable:\x20','stdin','info','data','split','toString','concat','push','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','join','3521631XbkeSM','selectedLabels','map','2082178PgXsvx','parse','setLogPath','cssUrl'];a89_0x5d8b=function(){return _0x57a235;};return a89_0x5d8b();}function validateParams(_0x66bdf6){const _0x141e69=a89_0x493a,_0x3bfd20=[];return _0x66bdf6['jsUrl']&&!isValidJsHttpsUrl(_0x66bdf6[_0x141e69(0xd4)])&&_0x3bfd20[_0x141e69(0xe7)]({'field':_0x141e69(0xd4),'message':_0x141e69(0xe8)}),_0x66bdf6[_0x141e69(0xf0)]&&!isValidCssHttpsUrl(_0x66bdf6[_0x141e69(0xf0)])&&_0x3bfd20[_0x141e69(0xe7)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x3bfd20;}export async function runMenuSyncCore(_0x4b81b4,_0x68aac,_0x37798a=[],_0x46edff){const _0x5c9a73=a89_0x493a,_0x4df3ca=parseParamsFlag(_0x46edff),_0x51583c=_0x37798a[_0x5c9a73(0xd8)]>0x0?_0x37798a:_0x4df3ca[_0x5c9a73(0xeb)],_0x442454=_0x4df3ca[_0x5c9a73(0xd4)],_0x46654a=_0x4df3ca[_0x5c9a73(0xf0)],_0x1f1eaf=[];if(_0x442454)_0x1f1eaf[_0x5c9a73(0xe7)](_0x442454);if(_0x46654a)_0x1f1eaf[_0x5c9a73(0xe7)](_0x46654a);const _0x511514=validateParams(_0x4df3ca);if(_0x511514[_0x5c9a73(0xd8)]>0x0){const _0x24f135=_0x511514[_0x5c9a73(0xec)](_0x30e068=>_0x5c9a73(0xf3)+_0x30e068[_0x5c9a73(0xde)]+':\x20'+_0x30e068[_0x5c9a73(0xcb)])[_0x5c9a73(0xe9)](';\x20');throw new Error(_0x5c9a73(0xf8)+_0x24f135);}logger[_0x5c9a73(0xef)](process[_0x5c9a73(0xd9)]()),logger[_0x5c9a73(0xe2)]('menu-sync',_0x5c9a73(0xf4),{'appCode':_0x4b81b4,'selectedCount':_0x51583c?.[_0x5c9a73(0xd8)],'jsUrl':_0x442454,'cssUrl':_0x46654a});if(_0x442454){const _0xe184bd=await isUrlReachable(_0x442454);if(!_0xe184bd)throw new Error(_0x5c9a73(0xd3)+_0x442454);}if(_0x46654a){const _0x5a20a7=await isUrlReachable(_0x46654a);if(!_0x5a20a7)throw new Error(_0x5c9a73(0xe0)+_0x46654a);}const _0x3701a5=getLocalPages();if(_0x3701a5[_0x5c9a73(0xd8)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x50c7c3=await getOnlineMenuList(_0x4b81b4,_0x68aac),_0x2fde9a=new Set(_0x50c7c3[_0x5c9a73(0xec)](_0x45fa9e=>_0x45fa9e[_0x5c9a73(0xdb)]));let _0x58face;if(_0x51583c&&_0x51583c[_0x5c9a73(0xd8)]>0x0){const _0x2bf398=new Set(_0x51583c[_0x5c9a73(0xec)](_0x2b8e09=>_0x2b8e09[_0x5c9a73(0xcf)]()));_0x58face=_0x3701a5[_0x5c9a73(0xf1)](_0x282f26=>_0x2bf398[_0x5c9a73(0xce)](_0x282f26['label']));if(_0x58face[_0x5c9a73(0xd8)]===0x0){const _0x317e96=_0x3701a5['map'](_0x4737f1=>_0x4737f1[_0x5c9a73(0xd2)])[_0x5c9a73(0xe9)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x2bf398][_0x5c9a73(0xe9)](',\x20')+_0x5c9a73(0xf7)+_0x317e96);}}else _0x58face=_0x3701a5[_0x5c9a73(0xf1)](_0x411464=>!_0x2fde9a[_0x5c9a73(0xce)](_0x411464[_0x5c9a73(0xdb)]));if(_0x58face['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x326d40=await createMenus(_0x4b81b4,_0x68aac,_0x58face,_0x1f1eaf['length']>0x0?_0x1f1eaf:undefined);return logger[_0x5c9a73(0xe2)]('menu-sync','Menu\x20sync\x20completed',{'count':_0x58face[_0x5c9a73(0xd8)],'resources':_0x1f1eaf}),{'created':_0x326d40['length'],'skipped':![],'targetPages':_0x58face,'menus':_0x326d40};}export async function readPageLabelsFromStdin(){const _0x305b7d=a89_0x493a;if(!process[_0x305b7d(0xe1)]['isTTY']&&!process[_0x305b7d(0xe1)][_0x305b7d(0xda)])return new Promise(_0x525c5b=>{const _0x38b914=_0x305b7d,_0x173302=[];process['stdin']['on'](_0x38b914(0xe3),_0x4f8f4c=>_0x173302[_0x38b914(0xe7)](_0x4f8f4c)),process['stdin']['on'](_0x38b914(0xd6),()=>{const _0x5900ca=_0x38b914,_0x27fe9d=Buffer[_0x5900ca(0xe6)](_0x173302)[_0x5900ca(0xe5)](_0x5900ca(0xd0)),_0x4f0354=_0x27fe9d[_0x5900ca(0xe4)]('\x0a')[_0x5900ca(0xec)](_0x8c4ec8=>_0x8c4ec8['trim']())['filter'](_0x1cd3ad=>_0x1cd3ad['length']>0x0&&!_0x1cd3ad[_0x5900ca(0xdd)]('#'));_0x525c5b(_0x4f0354);}),setTimeout(()=>_0x525c5b([]),0x1f4);});return[];}function parseParamsFlag(_0x1bb904){const _0x30940f=a89_0x493a;if(!_0x1bb904||typeof _0x1bb904!=='string')return{};try{const _0x206e68=JSON[_0x30940f(0xee)](_0x1bb904);if(typeof _0x206e68!=='object'||_0x206e68===null||Array[_0x30940f(0xf6)](_0x206e68))return{};return{'selectedLabels':Array[_0x30940f(0xf6)](_0x206e68[_0x30940f(0xd7)])?_0x206e68[_0x30940f(0xd7)]['map'](String):undefined,'jsUrl':typeof _0x206e68[_0x30940f(0xd4)]===_0x30940f(0xd1)?_0x206e68['jsUrl'][_0x30940f(0xcf)]():undefined,'cssUrl':typeof _0x206e68[_0x30940f(0xf0)]==='string'?_0x206e68['cssUrl']['trim']():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xd7454a,_0x3f4e22){const _0x25d8c1=a91_0x5661,_0x30a8dd=_0xd7454a();while(!![]){try{const _0x257d0e=parseInt(_0x25d8c1(0x183))/0x1+parseInt(_0x25d8c1(0x178))/0x2+-parseInt(_0x25d8c1(0x16e))/0x3*(parseInt(_0x25d8c1(0x182))/0x4)+parseInt(_0x25d8c1(0x163))/0x5*(parseInt(_0x25d8c1(0x159))/0x6)+-parseInt(_0x25d8c1(0x170))/0x7*(-parseInt(_0x25d8c1(0x158))/0x8)+parseInt(_0x25d8c1(0x15f))/0x9+-parseInt(_0x25d8c1(0x17e))/0xa*(parseInt(_0x25d8c1(0x160))/0xb);if(_0x257d0e===_0x3f4e22)break;else _0x30a8dd['push'](_0x30a8dd['shift']());}catch(_0x2659e5){_0x30a8dd['push'](_0x30a8dd['shift']());}}}(a91_0x2b21,0xd503a));function a91_0x5661(_0x347bd0,_0x4e6f95){_0x347bd0=_0x347bd0-0x151;const _0x2b2171=a91_0x2b21();let _0x5661bf=_0x2b2171[_0x347bd0];return _0x5661bf;}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(_0x216431){const _0x4a33c3=a91_0x5661,_0x50ecce=[];return _0x216431[_0x4a33c3(0x186)]&&!isValidJsHttpsUrl(_0x216431[_0x4a33c3(0x186)])&&_0x50ecce[_0x4a33c3(0x157)]({'field':_0x4a33c3(0x186),'message':_0x4a33c3(0x161)}),_0x216431[_0x4a33c3(0x169)]&&!isValidCssHttpsUrl(_0x216431[_0x4a33c3(0x169)])&&_0x50ecce[_0x4a33c3(0x157)]({'field':_0x4a33c3(0x169),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x50ecce;}export async function runMenuUpdateCore(_0x33e9d1,_0x223170,_0x3f1175,_0x1971cd={}){const _0x1f2138=a91_0x5661,_0x2fdfbd=parseUpdateParamsFlag(_0x3f1175),_0x1fdd99=normalizeMode(_0x1971cd[_0x1f2138(0x16a)]),_0x2f876b=[];if(_0x2fdfbd[_0x1f2138(0x186)])_0x2f876b[_0x1f2138(0x157)](_0x2fdfbd['jsUrl']);if(_0x2fdfbd[_0x1f2138(0x169)])_0x2f876b[_0x1f2138(0x157)](_0x2fdfbd[_0x1f2138(0x169)]);const _0x5e8e04=validateParams(_0x2fdfbd);if(_0x5e8e04['length']>0x0){const _0x182642=_0x5e8e04[_0x1f2138(0x15c)](_0x3a5293=>_0x1f2138(0x17d)+_0x3a5293[_0x1f2138(0x154)]+':\x20'+_0x3a5293[_0x1f2138(0x17c)])[_0x1f2138(0x17a)](';\x20');throw new Error(_0x1f2138(0x151)+_0x182642);}if(_0x2f876b[_0x1f2138(0x16d)]===0x0)throw new Error(_0x1f2138(0x175)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger['setLogPath'](process[_0x1f2138(0x167)]()),logger['info'](_0x1f2138(0x16f),_0x1f2138(0x15a),{'appCode':_0x33e9d1,'jsUrl':_0x2fdfbd['jsUrl'],'cssUrl':_0x2fdfbd[_0x1f2138(0x169)],'mode':_0x1fdd99,'dryRun':_0x1971cd[_0x1f2138(0x179)]===!![]});if(_0x2fdfbd['jsUrl']){const _0x1165fa=await isUrlReachable(_0x2fdfbd[_0x1f2138(0x186)]);if(!_0x1165fa)throw new Error(_0x1f2138(0x180)+_0x2fdfbd[_0x1f2138(0x186)]);}if(_0x2fdfbd['cssUrl']){const _0x5c78e7=await isUrlReachable(_0x2fdfbd[_0x1f2138(0x169)]);if(!_0x5c78e7)throw new Error(_0x1f2138(0x176)+_0x2fdfbd[_0x1f2138(0x169)]);}const _0x4899fb=await getOnlineMenuList(_0x33e9d1,_0x223170),_0x5bfdbc=_0x4899fb[_0x1f2138(0x168)](_0x4c4d7d=>_0x4c4d7d[_0x1f2138(0x15d)][_0x1f2138(0x16d)]>0x0);if(_0x5bfdbc['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1971cd['dryRun']===!![]};const _0x4a8653=_0x5bfdbc[_0x1f2138(0x15c)](_0x364cf7=>buildMenuUpdateDiff(_0x364cf7,_0x2fdfbd,_0x1fdd99,_0x1971cd[_0x1f2138(0x171)]===!![]));if(_0x1971cd[_0x1f2138(0x179)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4a8653};const _0x3b63a1=await Promise[_0x1f2138(0x189)](_0x5bfdbc[_0x1f2138(0x15c)]((_0x28d198,_0x545cbe)=>updateMenuCdnUrl(_0x33e9d1,_0x223170,{'id':_0x28d198['id'],'label':_0x28d198[_0x1f2138(0x177)],'path':_0x28d198[_0x1f2138(0x164)],'resources':_0x4a8653[_0x545cbe][_0x1f2138(0x172)]['resources'],'extend':_0x28d198[_0x1f2138(0x155)]??null}))),_0x5a7c9b=_0x3b63a1['filter'](_0x4aadb1=>_0x4aadb1[_0x1f2138(0x16c)]===_0x1f2138(0x15b))[_0x1f2138(0x15c)](_0xe9cea8=>_0xe9cea8[_0x1f2138(0x166)]),_0xf8e936=_0x3b63a1[_0x1f2138(0x168)](_0x1120d2=>_0x1120d2[_0x1f2138(0x16c)]===_0x1f2138(0x174))[_0x1f2138(0x16d)];return logger[_0x1f2138(0x153)](_0x1f2138(0x16f),'Menu\x20update\x20completed',{'count':_0x5bfdbc[_0x1f2138(0x16d)],'resources':_0x2f876b}),{'updated':_0x5a7c9b[_0x1f2138(0x16d)],'failed':_0xf8e936,'skipped':![],'menus':_0x5a7c9b};}function normalizeMode(_0x6a638b){const _0x230719=a91_0x5661;if(!_0x6a638b)return _0x230719(0x187);if(_0x6a638b===_0x230719(0x187)||_0x6a638b===_0x230719(0x18a))return _0x6a638b;throw new Error(_0x230719(0x152)+_0x6a638b+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x5c6f26,_0x5b2de9,_0x44b93b,_0xfd7b67){const _0x415fec=a91_0x5661,_0x47237d=[..._0x5c6f26[_0x415fec(0x15d)]],_0x24bbe3=_0x44b93b===_0x415fec(0x18a)?patchResources(_0x47237d,_0x5b2de9):replaceResources(_0x5b2de9),_0x3eeead=[],_0x525cef=_0x47237d[_0x415fec(0x165)](isJsResource),_0x1f3a39=_0x24bbe3[_0x415fec(0x165)](isJsResource);if(_0x525cef&&!_0x1f3a39){const _0x58e7b2=_0x415fec(0x15e)+_0x5c6f26['label']+_0x415fec(0x17b)+_0x5c6f26[_0x415fec(0x164)]+_0x415fec(0x162)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0xfd7b67)throw new Error(_0x58e7b2);_0x3eeead[_0x415fec(0x157)](_0x58e7b2);}const _0x101fa8=_0x47237d[_0x415fec(0x165)](isCssResource),_0x67a7f4=_0x24bbe3[_0x415fec(0x165)](isCssResource);return _0x101fa8&&!_0x67a7f4&&_0x3eeead[_0x415fec(0x157)]('menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x5c6f26[_0x415fec(0x177)]+_0x415fec(0x17b)+_0x5c6f26[_0x415fec(0x164)]+').'),{'id':_0x5c6f26['id'],'label':_0x5c6f26[_0x415fec(0x177)],'path':_0x5c6f26[_0x415fec(0x164)],'mode':_0x44b93b,'before':{'resources':_0x47237d},'after':{'resources':_0x24bbe3},'warnings':_0x3eeead};}function replaceResources(_0x45b1c4){const _0x45a500=a91_0x5661;return[_0x45b1c4['jsUrl'],_0x45b1c4[_0x45a500(0x169)]][_0x45a500(0x168)](_0x4ab576=>!!_0x4ab576);}function patchResources(_0x55c7de,_0x4686d2){const _0x498368=a91_0x5661;let _0x52aa1d=![],_0x125237=![];const _0x4bb9e1=[];for(const _0x5a2c9a of _0x55c7de){if(isJsResource(_0x5a2c9a)){if(_0x4686d2[_0x498368(0x186)]&&!_0x52aa1d)_0x4bb9e1['push'](_0x4686d2[_0x498368(0x186)]),_0x52aa1d=!![];else!_0x4686d2['jsUrl']&&_0x4bb9e1[_0x498368(0x157)](_0x5a2c9a);continue;}if(isCssResource(_0x5a2c9a)){if(_0x4686d2[_0x498368(0x169)]&&!_0x125237)_0x4bb9e1[_0x498368(0x157)](_0x4686d2[_0x498368(0x169)]),_0x125237=!![];else!_0x4686d2[_0x498368(0x169)]&&_0x4bb9e1[_0x498368(0x157)](_0x5a2c9a);continue;}_0x4bb9e1[_0x498368(0x157)](_0x5a2c9a);}return _0x4686d2[_0x498368(0x186)]&&!_0x52aa1d&&_0x4bb9e1['unshift'](_0x4686d2[_0x498368(0x186)]),_0x4686d2[_0x498368(0x169)]&&!_0x125237&&_0x4bb9e1['push'](_0x4686d2[_0x498368(0x169)]),_0x4bb9e1;}function isJsResource(_0x230303){const _0x436e71=a91_0x5661;return stripQuery(_0x230303)[_0x436e71(0x156)]()['endsWith'](_0x436e71(0x184));}function a91_0x2b21(){const _0x33fa1a=['10fSfzOS','object','JS\x20URL\x20is\x20unreachable:\x20','trim','4PePgRV','949281XCkaUi','.js','endsWith','jsUrl','replace','split','allSettled','patch','Invalid\x20--params:\x20','Invalid\x20--mode:\x20','info','field','extend','toLowerCase','push','301736nAZznY','6JMFygw','Start\x20non-interactive\x20menu\x20update','fulfilled','map','resources','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','14009598UKYrTe','51061175DTwPKd','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL',').\x20','4879790HtymOy','path','some','value','cwd','filter','cssUrl','mode','string','status','length','101538ERwZzP','menu-update','182CKPeOL','force','after','parse','rejected','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','CSS\x20URL\x20is\x20unreachable:\x20','label','2171548abaASE','dryRun','join','\x22\x20(','message','--params.'];a91_0x2b21=function(){return _0x33fa1a;};return a91_0x2b21();}function isCssResource(_0xfa7c46){const _0x22131b=a91_0x5661;return stripQuery(_0xfa7c46)[_0x22131b(0x156)]()[_0x22131b(0x185)]('.css');}function stripQuery(_0x121b00){const _0x1f1c29=a91_0x5661;return _0x121b00[_0x1f1c29(0x188)]('?')[0x0]??_0x121b00;}function parseUpdateParamsFlag(_0x57185e){const _0x128c26=a91_0x5661;if(!_0x57185e||typeof _0x57185e!==_0x128c26(0x16b))return{};try{const _0xbd0bd2=JSON[_0x128c26(0x173)](_0x57185e);if(typeof _0xbd0bd2!==_0x128c26(0x17f)||_0xbd0bd2===null||Array['isArray'](_0xbd0bd2))return{};return{'jsUrl':typeof _0xbd0bd2[_0x128c26(0x186)]===_0x128c26(0x16b)?_0xbd0bd2[_0x128c26(0x186)]['trim']():undefined,'cssUrl':typeof _0xbd0bd2[_0x128c26(0x169)]===_0x128c26(0x16b)?_0xbd0bd2[_0x128c26(0x169)][_0x128c26(0x181)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5348c4,_0x24a904){const _0x3ccb12=a92_0x221d,_0x3b4446=_0x5348c4();while(!![]){try{const _0x17f9ae=-parseInt(_0x3ccb12(0xeb))/0x1+-parseInt(_0x3ccb12(0xe9))/0x2+parseInt(_0x3ccb12(0xe3))/0x3+-parseInt(_0x3ccb12(0xe6))/0x4*(parseInt(_0x3ccb12(0xe5))/0x5)+parseInt(_0x3ccb12(0xe4))/0x6+-parseInt(_0x3ccb12(0xe2))/0x7+parseInt(_0x3ccb12(0xe8))/0x8;if(_0x17f9ae===_0x24a904)break;else _0x3b4446['push'](_0x3b4446['shift']());}catch(_0x40e896){_0x3b4446['push'](_0x3b4446['shift']());}}}(a92_0x55f0,0xea9f2));function a92_0x55f0(){const _0x4889d0=['test','18821160pOgiyS','1513394cAibcv','trim','1520489HnUeFz','HEAD','11773559uTjhGK','3567846vbCegM','8402892zNkETF','20fFJTXM','22276qtzbwQ'];a92_0x55f0=function(){return _0x4889d0;};return a92_0x55f0();}function a92_0x221d(_0x1db148,_0x177c32){_0x1db148=_0x1db148-0xe2;const _0x55f067=a92_0x55f0();let _0x221de0=_0x55f067[_0x1db148];return _0x221de0;}export function isValidJsHttpsUrl(_0x5879f3){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x5879f3['trim']());}export function isValidCssHttpsUrl(_0x278c54){const _0x8b344a=a92_0x221d;return/^https:\/\/.+\.css(\?.*)?$/[_0x8b344a(0xe7)](_0x278c54[_0x8b344a(0xea)]());}export async function isUrlReachable(_0x2bbea8){const _0x5049ae=a92_0x221d;try{const _0x4aa7d4=await fetch(_0x2bbea8,{'method':_0x5049ae(0xec)});return _0x4aa7d4['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x268113=a93_0x3602;(function(_0x564137,_0x4dba1f){const _0x5cf96a=a93_0x3602,_0x5dad87=_0x564137();while(!![]){try{const _0x20baad=parseInt(_0x5cf96a(0x175))/0x1*(-parseInt(_0x5cf96a(0x192))/0x2)+-parseInt(_0x5cf96a(0x18c))/0x3+-parseInt(_0x5cf96a(0x18d))/0x4+-parseInt(_0x5cf96a(0x188))/0x5+parseInt(_0x5cf96a(0x186))/0x6+parseInt(_0x5cf96a(0x174))/0x7+parseInt(_0x5cf96a(0x17f))/0x8*(parseInt(_0x5cf96a(0x189))/0x9);if(_0x20baad===_0x4dba1f)break;else _0x5dad87['push'](_0x5dad87['shift']());}catch(_0x451a05){_0x5dad87['push'](_0x5dad87['shift']());}}}(a93_0xfa8b,0x513f8));import a93_0x1c3812 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';function a93_0xfa8b(){const _0x597b80=['map','cyan','Menu\x20creation\x20failed','4451755vConzl','4339ziFwqU','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','length','selectedAppName','\x20menu(s)\x20with\x20JS:\x20','parse','pages','\x20failed.','sync','localPages','8HMSrRV','yellow','created','\x20menu(s)','Sync\x20local\x20pages\x20as\x20platform\x20menus','gray','onlinePaths','1412898kqYgwf','Creating\x20','1734445XxEQsc','3991275FtIQBB','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','✓\x20Menu\x20sync\x20completed:\x20','778176vfxttk','305836HKGXLU','Fetching\x20online\x20menu\x20list...','\x20\x20Create\x20','\x20\x20Cancelled.','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','138ILzIZc','failed','string','appcode','trim','isArray','Failed\x20to\x20fetch\x20online\x20menu\x20list','Created\x20','cookie','menu','size','\x20menu(s)\x20created','validation','message','rawFlags','yes','\x20page(s)','\x20created.','skipped','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','cssUrl','jsUrl','Menu\x20sync\x20completed:\x20','boolean','onlineMenuList','Menu\x20sync\x20skipped','write','\x20menu(s)...','params'];a93_0xfa8b=function(){return _0x597b80;};return a93_0xfa8b();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a93_0x3602(_0x40d836,_0x180cd4){_0x40d836=_0x40d836-0x160;const _0xfa8b4e=a93_0xfa8b();let _0x36028d=_0xfa8b4e[_0x40d836];return _0x36028d;}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_0x268113(0x19b),'command':a93_0x268113(0x17d),'description':a93_0x268113(0x183),'risk':a93_0x268113(0x16e),'flags':[{'name':a93_0x268113(0x170),'type':'string','description':a93_0x268113(0x176)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}'},{'name':a93_0x268113(0x163),'type':a93_0x268113(0x16b),'description':a93_0x268113(0x191)}],async 'execute'(_0x526a5c){const _0x57c77e=a93_0x268113,_0x2dfa46=_0x526a5c[_0x57c77e(0x162)]['appcode']?String(_0x526a5c['rawFlags'][_0x57c77e(0x195)])[_0x57c77e(0x196)]():'';if(!isInProject()&&!_0x526a5c[_0x57c77e(0x178)]&&!_0x2dfa46)throw CliErrors[_0x57c77e(0x160)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x57c77e(0x167));const _0x1579ce=_0x526a5c['flag']('yes'),_0x5d78e7=_0x526a5c['str']('params'),_0x1d9eda=parseParams(_0x5d78e7),_0x3ffada=!!(_0x1d9eda['jsUrl']||_0x1d9eda[_0x57c77e(0x168)]||_0x1d9eda['pages']&&_0x1d9eda['pages'][_0x57c77e(0x177)]>0x0);if(_0x1579ce||_0x3ffada){let _0x15fd61=[];!isInteractive()&&!_0x1d9eda[_0x57c77e(0x17b)]?.[_0x57c77e(0x177)]&&(_0x15fd61=await readPageLabelsFromStdin());const _0x55669e=await runMenuSyncCore(_0x526a5c['appCode'],_0x526a5c[_0x57c77e(0x19a)],_0x15fd61[_0x57c77e(0x177)]>0x0?_0x15fd61:_0x1d9eda[_0x57c77e(0x17b)]??[],_0x5d78e7);if(_0x55669e['skipped']){const _0x2f9038=getLocalPages();_0x2f9038[_0x57c77e(0x177)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x57c77e(0x18b)+_0x55669e[_0x57c77e(0x181)]+_0x57c77e(0x19d));return{'ok':!![],'data':_0x55669e,'message':_0x55669e[_0x57c77e(0x166)]?_0x57c77e(0x16d):_0x57c77e(0x16a)+_0x55669e['created']+_0x57c77e(0x165)};}requireInteractive();const _0xbd569e=startSpinner(_0x57c77e(0x18e));let _0x2931fa,_0x3d8eda,_0x1e6233;try{const _0x11f5e5=await fetchMenuData(_0x526a5c['appCode'],_0x526a5c[_0x57c77e(0x19a)]);_0x2931fa=_0x11f5e5[_0x57c77e(0x17e)],_0x3d8eda=_0x11f5e5[_0x57c77e(0x185)],_0x1e6233=_0x11f5e5[_0x57c77e(0x16c)],stopSpinner(_0xbd569e,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x2554c4){stopSpinner(_0xbd569e,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x57c77e(0x160)](_0x2554c4 instanceof Error?_0x2554c4[_0x57c77e(0x161)]:_0x57c77e(0x198));}if(_0x2931fa[_0x57c77e(0x177)]===0x0)return writeCliSideChannelLine(a93_0x1c3812[_0x57c77e(0x180)](_0x57c77e(0x18a))),{'ok':!![]};const _0x376848=buildCompareRows(_0x2931fa,_0x3d8eda);writeCliSideChannelLine(renderCompareTable(_0x376848)),writeCliSideChannelLine('');const _0x311fa8=_0x1d9eda[_0x57c77e(0x17b)],_0x674cbf=await selectPages(_0x2931fa,_0x3d8eda,_0x311fa8);writeCliSideChannelLine(''),writeCliSideChannelLine(a93_0x1c3812[_0x57c77e(0x172)]('\x20\x20✓\x20Selected:\x20'+_0x674cbf[_0x57c77e(0x177)]+_0x57c77e(0x164)));const _0x407622=_0x1d9eda['jsUrl']&&_0x1d9eda[_0x57c77e(0x168)];if(!_0x407622){writeCliSideChannelLine(renderSyncSummary(_0x674cbf,_0x3d8eda[_0x57c77e(0x19c)]>0x0));const _0x122925=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x122925)return writeCliSideChannelLine(a93_0x1c3812[_0x57c77e(0x184)](_0x57c77e(0x190))),{'ok':!![]};}let _0x5c7fbb=_0x1d9eda[_0x57c77e(0x169)],_0x509229=_0x1d9eda[_0x57c77e(0x168)];!_0x5c7fbb&&(_0x5c7fbb=await askJsUrl());!_0x509229&&(_0x509229=await askCssUrl());const _0x47322a=await askConfirm(_0x57c77e(0x18f)+_0x674cbf[_0x57c77e(0x177)]+_0x57c77e(0x179)+_0x5c7fbb+'\x20and\x20CSS:\x20'+_0x509229+'?');if(!_0x47322a)return writeCliSideChannelLine(a93_0x1c3812[_0x57c77e(0x184)](_0x57c77e(0x190))),{'ok':!![]};const _0x159e17=[_0x5c7fbb,_0x509229],_0x30f46b=startSpinner(_0x57c77e(0x187)+_0x674cbf[_0x57c77e(0x177)]+_0x57c77e(0x16f));try{const _0x1c0d63=await doCreateMenus(_0x526a5c['appCode'],_0x526a5c['cookie'],_0x674cbf,_0x159e17);return stopSpinner(_0x30f46b,_0x57c77e(0x199)+_0x1c0d63['created']+_0x57c77e(0x182),!![]),{'ok':!![],'data':_0x1c0d63,'message':'Menu\x20sync\x20completed:\x20'+_0x1c0d63[_0x57c77e(0x181)]+'\x20created,\x20'+_0x1c0d63[_0x57c77e(0x193)]+_0x57c77e(0x17c)};}catch(_0x2fd58e){stopSpinner(_0x30f46b,_0x57c77e(0x173),![]);throw CliErrors[_0x57c77e(0x160)](_0x2fd58e instanceof Error?_0x2fd58e['message']:_0x57c77e(0x173));}}};function parseParams(_0x4ec76b){const _0x290923=a93_0x268113;if(!_0x4ec76b)return{};try{const _0x17b7cb=JSON[_0x290923(0x17a)](_0x4ec76b);if(typeof _0x17b7cb!=='object'||_0x17b7cb===null||Array[_0x290923(0x197)](_0x17b7cb))return{};return{'jsUrl':typeof _0x17b7cb[_0x290923(0x169)]===_0x290923(0x194)?_0x17b7cb[_0x290923(0x169)][_0x290923(0x196)]():undefined,'cssUrl':typeof _0x17b7cb[_0x290923(0x168)]==='string'?_0x17b7cb[_0x290923(0x168)][_0x290923(0x196)]():undefined,'pages':Array[_0x290923(0x197)](_0x17b7cb[_0x290923(0x17b)])?_0x17b7cb[_0x290923(0x17b)][_0x290923(0x171)](String):undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x2e3a92=a94_0x50c0;(function(_0x971fe6,_0x181977){const _0x278c57=a94_0x50c0,_0x4242dc=_0x971fe6();while(!![]){try{const _0x4ca315=parseInt(_0x278c57(0x1f4))/0x1*(-parseInt(_0x278c57(0x1ee))/0x2)+parseInt(_0x278c57(0x203))/0x3*(-parseInt(_0x278c57(0x1d6))/0x4)+parseInt(_0x278c57(0x210))/0x5*(-parseInt(_0x278c57(0x1f0))/0x6)+parseInt(_0x278c57(0x1fe))/0x7+parseInt(_0x278c57(0x1df))/0x8+-parseInt(_0x278c57(0x1db))/0x9+-parseInt(_0x278c57(0x1ec))/0xa*(-parseInt(_0x278c57(0x208))/0xb);if(_0x4ca315===_0x181977)break;else _0x4242dc['push'](_0x4242dc['shift']());}catch(_0x9f5d60){_0x4242dc['push'](_0x4242dc['shift']());}}}(a94_0x3e32,0x521e1));import a94_0xd9f709 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';export const menuUpdate={'service':'menu','command':'update','description':a94_0x2e3a92(0x1ef),'risk':'high-risk-write','flags':[{'name':a94_0x2e3a92(0x1fc),'type':a94_0x2e3a92(0x1d9),'description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+a94_0x2e3a92(0x1f8)},{'name':a94_0x2e3a92(0x1d4),'type':a94_0x2e3a92(0x1e7),'description':a94_0x2e3a92(0x1de)},{'name':a94_0x2e3a92(0x1d2),'type':a94_0x2e3a92(0x1d9),'description':'Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','enum':[a94_0x2e3a92(0x1d5),a94_0x2e3a92(0x1e3)],'default':a94_0x2e3a92(0x1d5)},{'name':a94_0x2e3a92(0x1e9),'type':a94_0x2e3a92(0x1e7),'description':a94_0x2e3a92(0x200)}],async 'dryRun'(_0x284d7b){const _0x5f3022=a94_0x2e3a92;ensureRunnableContext(_0x284d7b[_0x5f3022(0x1ff)],_0x284d7b[_0x5f3022(0x1f9)]);const _0x33d129=await runMenuUpdateCore(_0x284d7b[_0x5f3022(0x1e6)],_0x284d7b[_0x5f3022(0x209)],_0x284d7b['str'](_0x5f3022(0x1fc)),{'mode':parseMode(_0x284d7b[_0x5f3022(0x1da)](_0x5f3022(0x1d2))),'dryRun':!![],'force':_0x284d7b[_0x5f3022(0x1f7)](_0x5f3022(0x1e9))});return{'method':_0x5f3022(0x1f3),'url':'/smartapi/menu/update','body':_0x33d129,'description':_0x33d129[_0x5f3022(0x1e4)]?'No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.':_0x5f3022(0x206)+(_0x33d129[_0x5f3022(0x202)]?.[_0x5f3022(0x20b)]??0x0)+_0x5f3022(0x20c)};},async 'execute'(_0x22f7e0){const _0xefc7e4=a94_0x2e3a92;ensureRunnableContext(_0x22f7e0[_0xefc7e4(0x1ff)],_0x22f7e0['selectedAppName']);const _0xa70e3e=_0x22f7e0['flag'](_0xefc7e4(0x1d4)),_0x1c8f0f=_0x22f7e0['str']('params'),_0x5de589=parseMode(_0x22f7e0[_0xefc7e4(0x1da)]('mode')),_0x57c63d=_0x22f7e0['bool']('force'),_0x2df0d6=parseParams(_0x1c8f0f),_0x47dca4=!!(_0x2df0d6['jsUrl']||_0x2df0d6[_0xefc7e4(0x1fd)]);if(_0xa70e3e||_0x47dca4&&!isInteractive()){const _0x318823=await runMenuUpdateCore(_0x22f7e0[_0xefc7e4(0x1e6)],_0x22f7e0[_0xefc7e4(0x209)],_0x1c8f0f,{'mode':_0x5de589,'force':_0x57c63d});return _0x318823[_0xefc7e4(0x1e4)]?writeCliSideChannelLine('!\x20No\x20menus\x20with\x20existing\x20resources\x20found'):(writeCliSideChannelLine(_0xefc7e4(0x1cd)+_0x318823[_0xefc7e4(0x1d1)]+_0xefc7e4(0x20d)),_0x318823[_0xefc7e4(0x1ea)]>0x0&&writeCliSideChannelLine('!\x20'+_0x318823[_0xefc7e4(0x1ea)]+_0xefc7e4(0x20f))),{'ok':_0x318823[_0xefc7e4(0x1ea)]===0x0,'data':_0x318823,'message':_0x318823['skipped']?_0xefc7e4(0x1d3):_0xefc7e4(0x1e0)+_0x318823[_0xefc7e4(0x1d1)]+_0xefc7e4(0x201)+_0x318823[_0xefc7e4(0x1ea)]+'\x20failed.'};}requireInteractive();const _0x552862=startSpinner(_0xefc7e4(0x1f2));let _0x29559e;try{_0x29559e=await fetchOnlineMenuList(_0x22f7e0[_0xefc7e4(0x1e6)],_0x22f7e0['cookie']),stopSpinner(_0x552862,_0xefc7e4(0x1e2),!![]);}catch(_0x24236c){stopSpinner(_0x552862,_0xefc7e4(0x1ed),![]);throw CliErrors[_0xefc7e4(0x1dd)](_0x24236c instanceof Error?_0x24236c[_0xefc7e4(0x1dc)]:_0xefc7e4(0x1ed));}const _0x5df321=filterMenusWithResources(_0x29559e);if(_0x5df321[_0xefc7e4(0x20b)]===0x0)return writeCliSideChannelLine(a94_0xd9f709[_0xefc7e4(0x1f1)](_0xefc7e4(0x1cf))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a94_0xd9f709[_0xefc7e4(0x20e)]('\x20\x20Found\x20'+_0x5df321[_0xefc7e4(0x20b)]+_0xefc7e4(0x1e8))),writeCliSideChannelLine(renderUpdateSummary(_0x5df321['map'](_0x3c6179=>_0x3c6179[_0xefc7e4(0x1d0)]),[_0x2df0d6[_0xefc7e4(0x1d8)],_0x2df0d6['cssUrl']])),writeCliSideChannelLine('');let _0x3da73b=_0x2df0d6[_0xefc7e4(0x1d8)],_0x2466e5=_0x2df0d6[_0xefc7e4(0x1fd)];!_0x3da73b&&(_0x3da73b=await askJsUrl());!_0x2466e5&&(_0x2466e5=await askCssUrl());const _0x5497c4=await askConfirm(_0xefc7e4(0x1f6)+_0x5df321[_0xefc7e4(0x20b)]+_0xefc7e4(0x20a)+_0x3da73b+_0xefc7e4(0x204)+_0x2466e5+'?');if(!_0x5497c4)return writeCliSideChannelLine(a94_0xd9f709['gray']('\x20\x20Cancelled.')),{'ok':!![]};const _0x168894=[_0x3da73b,_0x2466e5],_0x182025=startSpinner('Updating\x20'+_0x5df321[_0xefc7e4(0x20b)]+_0xefc7e4(0x1e1));try{const _0x1a6008=await doUpdateCdnUrls(_0x22f7e0['appCode'],_0x22f7e0[_0xefc7e4(0x209)],_0x5df321,_0x168894);return stopSpinner(_0x182025,_0xefc7e4(0x1fa)+_0x1a6008['updated']+'\x20menu(s)',_0x1a6008[_0xefc7e4(0x1ea)]===0x0),{'ok':_0x1a6008['failed']===0x0,'data':_0x1a6008,'message':_0x1a6008[_0xefc7e4(0x1ea)]>0x0?'Menu\x20update\x20completed:\x20'+_0x1a6008[_0xefc7e4(0x1d1)]+_0xefc7e4(0x201)+_0x1a6008[_0xefc7e4(0x1ea)]+_0xefc7e4(0x1ce):_0xefc7e4(0x1e0)+_0x1a6008['updated']+_0xefc7e4(0x1d7)};}catch(_0x3e0391){stopSpinner(_0x182025,'Menu\x20update\x20failed',![]);throw CliErrors[_0xefc7e4(0x1dd)](_0x3e0391 instanceof Error?_0x3e0391[_0xefc7e4(0x1dc)]:'Menu\x20update\x20failed');}}};function a94_0x50c0(_0x568fcb,_0x389140){_0x568fcb=_0x568fcb-0x1cd;const _0x3e321b=a94_0x3e32();let _0x50c02e=_0x3e321b[_0x568fcb];return _0x50c02e;}function ensureRunnableContext(_0x587702,_0x20587f){const _0x418eb7=a94_0x2e3a92,_0x132afa=_0x587702[_0x418eb7(0x1fb)]?String(_0x587702[_0x418eb7(0x1fb)])[_0x418eb7(0x1e5)]():'';if(!isInProject()&&!_0x20587f&&!_0x132afa)throw CliErrors[_0x418eb7(0x1dd)](_0x418eb7(0x207)+_0x418eb7(0x205));}function a94_0x3e32(){const _0x5e14d0=['\x20and\x20CSS:\x20','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Would\x20update\x20','menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','11tixWsp','cookie','\x20menu(s)\x20with\x20JS:\x20','length','\x20menu\x20resource\x20set(s).','\x20menu(s)\x20updated','cyan','\x20menu(s)\x20failed','7225xRJHYZ','✓\x20Menu\x20update\x20completed:\x20','\x20failed.','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','label','updated','mode','Menu\x20update\x20skipped','yes','replace','5164PgATUa','\x20updated.','jsUrl','string','str','1445049ukcYiD','message','validation','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params','148768hjoWHG','Menu\x20update\x20completed:\x20','\x20menu(s)...','Online\x20menu\x20list\x20fetched','patch','skipped','trim','appCode','boolean','\x20menu(s)\x20with\x20existing\x20resources','force','failed','isArray','4657810AfQFfB','Failed\x20to\x20fetch\x20online\x20menu\x20list','380414iGRGXL','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','54sSbOqw','yellow','Fetching\x20online\x20menu\x20list...','POST','1KmDQIb','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','\x20\x20Update\x20','bool','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','selectedAppName','Updated\x20','appcode','params','cssUrl','1591576eyLQgg','rawFlags','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','\x20updated,\x20','diffs','27gtEvdv'];a94_0x3e32=function(){return _0x5e14d0;};return a94_0x3e32();}function parseMode(_0x50fbdc){const _0x548b5e=a94_0x2e3a92;if(!_0x50fbdc)return'replace';if(_0x50fbdc===_0x548b5e(0x1d5)||_0x50fbdc===_0x548b5e(0x1e3))return _0x50fbdc;throw CliErrors[_0x548b5e(0x1dd)](_0x548b5e(0x1f5));}function parseParams(_0x854519){const _0x822979=a94_0x2e3a92;if(!_0x854519)return{};try{const _0x7be4f5=JSON['parse'](_0x854519);if(typeof _0x7be4f5!=='object'||_0x7be4f5===null||Array[_0x822979(0x1eb)](_0x7be4f5))return{};return{'jsUrl':typeof _0x7be4f5[_0x822979(0x1d8)]===_0x822979(0x1d9)?_0x7be4f5[_0x822979(0x1d8)][_0x822979(0x1e5)]():undefined,'cssUrl':typeof _0x7be4f5[_0x822979(0x1fd)]===_0x822979(0x1d9)?_0x7be4f5[_0x822979(0x1fd)][_0x822979(0x1e5)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x9dec7b=a95_0x7a12;(function(_0xfa3e36,_0x2fa28a){const _0xc6c27f=a95_0x7a12,_0x2a87e9=_0xfa3e36();while(!![]){try{const _0x331ee9=parseInt(_0xc6c27f(0xd9))/0x1+parseInt(_0xc6c27f(0xc3))/0x2*(parseInt(_0xc6c27f(0xbd))/0x3)+parseInt(_0xc6c27f(0xe1))/0x4*(parseInt(_0xc6c27f(0xd4))/0x5)+-parseInt(_0xc6c27f(0xdb))/0x6*(parseInt(_0xc6c27f(0xce))/0x7)+-parseInt(_0xc6c27f(0xc0))/0x8+parseInt(_0xc6c27f(0xcf))/0x9+parseInt(_0xc6c27f(0xdf))/0xa;if(_0x331ee9===_0x2fa28a)break;else _0x2a87e9['push'](_0x2a87e9['shift']());}catch(_0x2e7baf){_0x2a87e9['push'](_0x2a87e9['shift']());}}}(a95_0x1341,0xf01b9));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_0x7a12(_0x34b613,_0x33226c){_0x34b613=_0x34b613-0xb8;const _0x13412c=a95_0x1341();let _0x7a12df=_0x13412c[_0x34b613];return _0x7a12df;}import{startGenerateStandardPages}from'../../core/api-client.js';function a95_0x1341(){const _0x5985d4=['operationId','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','6SqiwEd','source','nextAction','14664592aIucbN','POST','bool','353506vYHOzq','related-pages-fallback','SUCCESS','status','dataset','code','standardPageStatus','write','page','compress','manualResolutionRequired','77245prVJgD','7516260WvmDXt','/smartapi/lovrabet/dataset/','复用已有生成任务','currentStep','apply','10bgWkpX','message','clientOperationId','PARTIAL_SUCCESS','string','199398NpyGfC','precheck','432dLLZLx','reused','progressRate','generate-start','5913250HXOccJ','number','3263412ciexLM','appCode','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','dryRun'];a95_0x1341=function(){return _0x5985d4;};return a95_0x1341();}export const pageGenerateStart={'service':a95_0x9dec7b(0xcb),'command':a95_0x9dec7b(0xde),'description':'Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':a95_0x9dec7b(0xca),'defaultOutputFormat':a95_0x9dec7b(0xcc),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a95_0x9dec7b(0xd8),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a95_0x9dec7b(0xd3),'type':'boolean','description':a95_0x9dec7b(0xbc)}],async 'validate'(_0x3de3af){validateDatasetSelector(_0x3de3af);},async 'dryRun'(_0x58ac70){const _0x91fbf9=a95_0x9dec7b,_0x19fb28=await prepare(_0x58ac70);return{'method':_0x91fbf9(0xc1),'url':_0x91fbf9(0xd0)+_0x19fb28[_0x91fbf9(0xc7)][_0x91fbf9(0xc8)]+'/generate-standard-pages/start','body':{'appCode':_0x58ac70[_0x91fbf9(0xb8)],'clientOperationId':_0x19fb28[_0x91fbf9(0xd6)]},'description':serializeDryRunDescription({'dataset':{'id':_0x19fb28[_0x91fbf9(0xc7)]['id'],'code':_0x19fb28[_0x91fbf9(0xc7)][_0x91fbf9(0xc8)],'name':_0x19fb28['dataset']['name'],'fieldCount':_0x19fb28[_0x91fbf9(0xc7)]['fieldCount']},'precheckSource':_0x19fb28[_0x91fbf9(0xc9)]?.[_0x91fbf9(0xbe)]??_0x91fbf9(0xc4),'action':_0x91fbf9(0xde),'clientOperationId':_0x19fb28[_0x91fbf9(0xd6)],'plannedStatus':_0x19fb28[_0x91fbf9(0xda)][_0x91fbf9(0xc6)],'reason':_0x19fb28[_0x91fbf9(0xda)][_0x91fbf9(0xd5)]})};},async 'execute'(_0x17c489){const _0x463f9d=a95_0x9dec7b;if(!_0x17c489[_0x463f9d(0xc2)](_0x463f9d(0xd3))){const _0x1039e3=await pageGenerateStart[_0x463f9d(0xba)](_0x17c489);return{'ok':!![],'message':_0x463f9d(0xb9),'data':_0x1039e3};}const _0x169b0b=await prepare(_0x17c489);if(!_0x169b0b[_0x463f9d(0xda)]['allowGenerate'])return{'ok':![],'message':_0x169b0b['precheck']['message'],'data':{'datasetCode':_0x169b0b[_0x463f9d(0xc7)][_0x463f9d(0xc8)],'clientOperationId':_0x169b0b['clientOperationId'],'precheckSource':_0x169b0b[_0x463f9d(0xc9)]?.[_0x463f9d(0xbe)]??_0x463f9d(0xc4),'status':_0x169b0b[_0x463f9d(0xda)][_0x463f9d(0xc6)],'manualResolutionRequired':_0x169b0b[_0x463f9d(0xda)][_0x463f9d(0xcd)],'nextAction':_0x169b0b[_0x463f9d(0xda)]['nextAction'],'query':{'command':buildStandardPageStatusQueryCommand(_0x169b0b[_0x463f9d(0xc7)][_0x463f9d(0xc8)],_0x17c489['appCode'])},'standardPageStatus':_0x169b0b[_0x463f9d(0xc9)]}};const _0x3032d0=await startGenerateStandardPages(_0x17c489['appCode'],_0x169b0b[_0x463f9d(0xc7)][_0x463f9d(0xc8)],{'clientOperationId':_0x169b0b[_0x463f9d(0xd6)]}),_0x1db0c3=_0x3032d0[_0x463f9d(0xc6)]===_0x463f9d(0xc5)||_0x3032d0['status']===_0x463f9d(0xd7)?await loadStandardPageStatusForGenerate(_0x17c489,_0x169b0b['dataset']['code']):null,_0x1d7857=assessGenerateOperationState(_0x169b0b[_0x463f9d(0xc7)]['code'],_0x3032d0[_0x463f9d(0xc6)],_0x1db0c3);return{'ok':!![],'message':_0x3032d0[_0x463f9d(0xdc)]?_0x463f9d(0xd1):'已提交生成任务','data':{'datasetCode':_0x169b0b[_0x463f9d(0xc7)][_0x463f9d(0xc8)],'appCode':_0x17c489['appCode'],'operationId':_0x3032d0[_0x463f9d(0xbb)]??null,'clientOperationId':_0x169b0b[_0x463f9d(0xd6)],'jobStatus':_0x3032d0[_0x463f9d(0xc6)]??null,'progressRate':typeof _0x3032d0['progressRate']===_0x463f9d(0xe0)?_0x3032d0[_0x463f9d(0xdd)]:null,'currentStep':_0x3032d0[_0x463f9d(0xd2)]??null,'reused':_0x3032d0[_0x463f9d(0xdc)]===!![],'status':_0x1d7857[_0x463f9d(0xc6)],'manualResolutionRequired':_0x1d7857[_0x463f9d(0xcd)],'nextAction':_0x1d7857[_0x463f9d(0xbf)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x169b0b['dataset']['code'],{'appCode':_0x17c489[_0x463f9d(0xb8)],'operationId':_0x3032d0['operationId'],'clientOperationId':_0x169b0b[_0x463f9d(0xd6)]})},'standardPageStatus':_0x1db0c3}};}};async function prepare(_0x4e2f06){const _0x16f60a=a95_0x9dec7b,_0x50e6bc=await loadDatasetDetailForPage(_0x4e2f06),_0x18bd73=await loadStandardPageStatusForGenerate(_0x4e2f06,_0x50e6bc[_0x16f60a(0xc8)]),_0x384408=getUndeletedRelatedPages(_0x50e6bc);return{'dataset':_0x50e6bc,'standardPageStatus':_0x18bd73,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0x50e6bc['code'],_0x18bd73,{'fallbackUndeletedPages':_0x384408})};}
|