@lovrabet/rabetbase-cli 2.1.6 → 2.1.7-beta.10
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/delete.js +1 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -0
- package/lib/commands/dataset/link-delete.js +1 -0
- package/lib/commands/dataset/link-shared.js +1 -0
- package/lib/commands/dataset/link-update.js +1 -0
- 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 -0
- package/lib/commands/issue/report.js +1 -0
- 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 -0
- 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 -1
- package/templates/projects/sub-app-react-demo/README.md +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a74_0x5544e1=a74_0x157c;(function(_0x4804fd,_0x3507df){const _0x1feea0=a74_0x157c,_0x2f8818=_0x4804fd();while(!![]){try{const _0x20e489=parseInt(_0x1feea0(0x7d))/0x1+-parseInt(_0x1feea0(0xa5))/0x2+-parseInt(_0x1feea0(0x9f))/0x3+parseInt(_0x1feea0(0x89))/0x4+parseInt(_0x1feea0(0xa3))/0x5*(parseInt(_0x1feea0(0x9a))/0x6)+-parseInt(_0x1feea0(0x8e))/0x7+-parseInt(_0x1feea0(0x84))/0x8*(parseInt(_0x1feea0(0x97))/0x9);if(_0x20e489===_0x3507df)break;else _0x2f8818['push'](_0x2f8818['shift']());}catch(_0x415cdc){_0x2f8818['push'](_0x2f8818['shift']());}}}(a74_0x2614,0xe024e));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';function a74_0x2614(){const _0xebf126=['\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','Auto-confirm\x20prompts','bool','27sYHCXF','appCode','boolean','7985166LeHGde','appcode','yes','write','nonInteractive','1457016XcuZQC','production','\x20\x20Default:\x20','global','5PYDwPX','cwd','89554sbTmLL','toLocaleString','\x20\x20Config:\x20','1637197CDSluP','Write\x20to\x20global\x20config\x20instead\x20of\x20project','str','\x20\x20Env:\x20','env','log','message','5992712ulkPYY','some','Usage:\x20','validation','App\x20code\x20to\x20initialize\x20with','5174640Asdnbo','\x20\x20Apps:\x20','custom','Use\x20`','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','3961356lCgeex','run','map','../../commands/project/init.js','project'];a74_0x2614=function(){return _0xebf126;};return a74_0x2614();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a74_0x157c(_0x5ba7d2,_0x5665e7){_0x5ba7d2=_0x5ba7d2-0x7c;const _0x26148b=a74_0x2614();let _0x157c6d=_0x26148b[_0x5ba7d2];return _0x157c6d;}function syntheticApp(_0x587ed4){return{'appCode':_0x587ed4,'appName':_0x587ed4};}function writeInitConfig(_0x55afcc,_0x549a0d,_0x28cd1a){const _0xb76870=a74_0x157c,_0xc437c=resolveWriteConfigPath(_0x55afcc),_0x1f0671=buildCanonicalProjectConfig({},{'appCodes':_0x549a0d[_0xb76870(0x90)](_0xba78d9=>_0xba78d9[_0xb76870(0x98)]),'env':_0x28cd1a,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0xb76870(0xa6)]()}});writeConfigFile(_0xc437c,_0x1f0671);const _0x282554=_0x55afcc===_0xb76870(0xa2)?_0xb76870(0xa2):_0xb76870(0x92);console[_0xb76870(0x82)]('\x0a✓\x20Successfully\x20initialized\x20'+_0x282554+'\x20config'),console[_0xb76870(0x82)](_0xb76870(0x8a)+_0x549a0d[_0xb76870(0x90)](_0x36649e=>_0x36649e[_0xb76870(0x98)])['join'](',\x20')),console[_0xb76870(0x82)](_0xb76870(0xa1)+_0x1f0671['defaultApp']),console[_0xb76870(0x82)](_0xb76870(0x80)+_0x1f0671[_0xb76870(0x81)]),console['log'](_0xb76870(0x7c)+_0xc437c);}async function runSmartInit(_0x4f186e){const _0x559bec=a74_0x157c,_0x58c1ed=process[_0x559bec(0xa4)](),_0x4f7821=_0x4f186e[_0x559bec(0x96)](_0x559bec(0xa2))?_0x559bec(0xa2):_0x559bec(0x92),_0x13f8fe=_0x4f186e[_0x559bec(0x7f)]('env')||_0x559bec(0xa0),_0x4b5010=_0x4f186e[_0x559bec(0x7f)](_0x559bec(0x9b))||undefined,_0x172225=_0x4f186e['bool'](_0x559bec(0x92));if(_0x172225){const {initConfig:_0x5ee918}=await import(_0x559bec(0x91));return _0x5ee918({'appcode':_0x4b5010,'env':_0x13f8fe,'autoYes':_0x4f186e[_0x559bec(0x96)](_0x559bec(0x9c))});}if(_0x4f7821===_0x559bec(0x92)){const _0x58650c=existsSync(resolve(_0x58c1ed,NEW_CONFIG_NAME)),_0xa71f93=LEGACY_CONFIG_NAMES[_0x559bec(0x85)](_0x2a9998=>existsSync(resolve(_0x58c1ed,_0x2a9998)));if(_0xa71f93&&!_0x58650c)return console['log']('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0x4f186e[_0x559bec(0x9e)],{'yes':_0x4f186e[_0x559bec(0x96)]('yes')});if(_0x58650c)throw CliErrors[_0x559bec(0x87)](_0x559bec(0x8d),_0x559bec(0x8c)+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x4b5010){const _0x4795f6=validateAppcode(_0x4b5010);if(!_0x4795f6['valid'])throw CliErrors[_0x559bec(0x87)](_0x4795f6[_0x559bec(0x83)]);writeInitConfig(_0x4f7821,[syntheticApp(_0x4b5010)],_0x13f8fe);return;}if(_0x4f186e[_0x559bec(0x9e)])throw CliErrors['flagMissing']('appcode',_0x559bec(0x86)+CLI_BIN_NAME+_0x559bec(0x93));const _0xfb8bc3=getCookie(),_0x2905b7=await selectMultipleApps(_0xfb8bc3),_0x28bc9e=_0x2905b7===_0x559bec(0x8b)?[syntheticApp(await promptCustomAppcode())]:_0x2905b7;writeInitConfig(_0x4f7821,_0x28bc9e,_0x13f8fe);}const initFlags=[{'name':'global','type':a74_0x5544e1(0x99),'description':a74_0x5544e1(0x7e),'default':![]},{'name':a74_0x5544e1(0x81),'type':'string','description':'Target\x20environment','default':a74_0x5544e1(0xa0),'enum':[...RABETBASE_ENV_VALUES]},{'name':a74_0x5544e1(0x9b),'type':'string','description':a74_0x5544e1(0x88)},{'name':a74_0x5544e1(0x92),'type':a74_0x5544e1(0x99),'description':'Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','default':![]},{'name':a74_0x5544e1(0x9c),'type':'boolean','description':a74_0x5544e1(0x95),'default':![]}];export const initDefinitions=[{'service':'init','command':a74_0x5544e1(0x8f),'description':a74_0x5544e1(0x94),'risk':a74_0x5544e1(0x9d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x265c21){return await runSmartInit(_0x265c21),{'ok':!![]};}}];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x39f480,_0x277f4d){const _0x352a2b=a75_0x5b89,_0xf80619=_0x39f480();while(!![]){try{const _0x44124a=parseInt(_0x352a2b(0x1cb))/0x1*(-parseInt(_0x352a2b(0x1ca))/0x2)+-parseInt(_0x352a2b(0x1c9))/0x3+parseInt(_0x352a2b(0x1cc))/0x4+parseInt(_0x352a2b(0x1c5))/0x5+-parseInt(_0x352a2b(0x1c7))/0x6+-parseInt(_0x352a2b(0x1c8))/0x7*(-parseInt(_0x352a2b(0x1c6))/0x8)+-parseInt(_0x352a2b(0x1c4))/0x9;if(_0x44124a===_0x277f4d)break;else _0xf80619['push'](_0xf80619['shift']());}catch(_0x15bffa){_0xf80619['push'](_0xf80619['shift']());}}}(a75_0x46f0,0xb43d5));function a75_0x5b89(_0x59e3a8,_0x4c52bd){_0x59e3a8=_0x59e3a8-0x1c4;const _0x46f0d0=a75_0x46f0();let _0x5b897d=_0x46f0d0[_0x59e3a8];return _0x5b897d;}function a75_0x46f0(){const _0x4697d6=['5061424sLOIvB','4293270SjBJzg','14ornGAv','3445833zRmstZ','49756vzGYOp','1sJbuVu','3278956rcLLBU','1296207SGzrfS','3431115bHQPbo'];a75_0x46f0=function(){return _0x4697d6;};return a75_0x46f0();}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a76_0x1875be=a76_0x42e8;(function(_0x1538bd,_0x395265){const _0x678cee=a76_0x42e8,_0x35d20d=_0x1538bd();while(!![]){try{const _0xad2462=parseInt(_0x678cee(0x138))/0x1+-parseInt(_0x678cee(0x14f))/0x2+-parseInt(_0x678cee(0x14e))/0x3*(parseInt(_0x678cee(0x137))/0x4)+-parseInt(_0x678cee(0x12f))/0x5+-parseInt(_0x678cee(0x136))/0x6*(parseInt(_0x678cee(0x12a))/0x7)+-parseInt(_0x678cee(0x14a))/0x8+parseInt(_0x678cee(0x145))/0x9;if(_0xad2462===_0x395265)break;else _0x35d20d['push'](_0x35d20d['shift']());}catch(_0x54ba8e){_0x35d20d['push'](_0x35d20d['shift']());}}}(a76_0x243d,0x1a91f));function a76_0x42e8(_0x246dd9,_0x57ae08){_0x246dd9=_0x246dd9-0x127;const _0x243da8=a76_0x243d();let _0x42e804=_0x243da8[_0x246dd9];return _0x42e804;}import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';function a76_0x243d(){const _0x25d1b8=['message','compress','Failed\x20to\x20report\x20platform\x20issue:\x20','7032xQdtNJ','16PjRFAN','136084hdFQRL','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','description','trim','description-file','descriptionFilePath','flagMissing','file','apiError','One-line\x20issue\x20summary','filter','issue','write','3953331NWPWZL','string','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','str','length','376992drlnyQ','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','POST','40515VbdVnL','74858Ctascq','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','title','validation','descriptionFile:\x20','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','report','descriptionSource:\x20','utf8','descriptionSource','Issue\x20description\x20cannot\x20be\x20empty.','910VtqXrD','Platform\x20issue\x20reported','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','issue.title','cwd','877895YhwfuQ','Issue\x20description\x20file\x20is\x20empty:\x20','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','join'];a76_0x243d=function(){return _0x25d1b8;};return a76_0x243d();}const DESCRIPTION_FILE_FLAG=a76_0x1875be(0x13c);export const issueReport={'service':a76_0x1875be(0x143),'command':a76_0x1875be(0x155),'description':a76_0x1875be(0x12c),'risk':a76_0x1875be(0x144),'requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':a76_0x1875be(0x134),'flags':[{'name':a76_0x1875be(0x151),'type':'string','required':!![],'description':a76_0x1875be(0x141)},{'name':a76_0x1875be(0x13a),'type':a76_0x1875be(0x146),'description':a76_0x1875be(0x14b)},{'name':DESCRIPTION_FILE_FLAG,'type':a76_0x1875be(0x146),'description':a76_0x1875be(0x150)}],async 'validate'(_0x4fe764){const _0x5547cf=a76_0x1875be,_0x8cd94a=_0x4fe764['str']('title')[_0x5547cf(0x13b)](),_0x5c4ef1=_0x4fe764[_0x5547cf(0x148)](_0x5547cf(0x13a))[_0x5547cf(0x13b)](),_0x4bbea0=_0x4fe764[_0x5547cf(0x148)](DESCRIPTION_FILE_FLAG)[_0x5547cf(0x13b)]();if(!_0x8cd94a)throw CliErrors[_0x5547cf(0x13e)](_0x5547cf(0x151),_0x5547cf(0x14c));const _0x1646cd=_0x5c4ef1[_0x5547cf(0x149)]>0x0,_0x2c09c4=_0x4bbea0[_0x5547cf(0x149)]>0x0;if(_0x1646cd===_0x2c09c4)throw CliErrors['validation']('Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x2c09c4){const _0x5c4f9b=resolve(process[_0x5547cf(0x12e)](),_0x4bbea0);if(!existsSync(_0x5c4f9b))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x5c4f9b);}},async 'dryRun'(_0x1863aa){const _0x508182=a76_0x1875be,_0xd76e08=await prepareIssueReport(_0x1863aa);return{'method':_0x508182(0x14d),'url':'otel://'+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0xd76e08[_0x508182(0x151)],'issue.description':_0xd76e08[_0x508182(0x13a)]}},'description':[_0x508182(0x131),_0x508182(0x156)+_0xd76e08[_0x508182(0x128)],_0xd76e08[_0x508182(0x13d)]?_0x508182(0x153)+_0xd76e08[_0x508182(0x13d)]:null][_0x508182(0x142)](Boolean)[_0x508182(0x132)]('\x0a')};},async 'execute'(_0x32b78e){const _0x985bcf=a76_0x1875be,_0x2e70db=await prepareIssueReport(_0x32b78e);try{await sendPlatformIssueCollectLog({'title':_0x2e70db[_0x985bcf(0x151)],'description':_0x2e70db[_0x985bcf(0x13a)]});}catch(_0x21ab1e){throw CliErrors[_0x985bcf(0x140)](_0x985bcf(0x135)+(_0x21ab1e instanceof Error?_0x21ab1e[_0x985bcf(0x133)]:String(_0x21ab1e)),_0x985bcf(0x147));}return{'ok':!![],'message':_0x985bcf(0x12b),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x985bcf(0x12d),'issue.description'],'issue':{'title':_0x2e70db[_0x985bcf(0x151)],'descriptionLength':_0x2e70db[_0x985bcf(0x13a)]['length'],'descriptionSource':_0x2e70db[_0x985bcf(0x128)],..._0x2e70db[_0x985bcf(0x13d)]?{'descriptionFile':_0x2e70db[_0x985bcf(0x13d)]}:{}}}};}};async function prepareIssueReport(_0x416f03){const _0x3bccff=a76_0x1875be,_0x5c98ea=_0x416f03[_0x3bccff(0x148)](_0x3bccff(0x151))[_0x3bccff(0x13b)](),_0x54f5f2=_0x416f03[_0x3bccff(0x148)](_0x3bccff(0x13a)),_0x3f5627=_0x416f03[_0x3bccff(0x148)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x3f5627){const _0x37bab3=_0x54f5f2;if(!_0x37bab3[_0x3bccff(0x13b)]())throw CliErrors['validation'](_0x3bccff(0x129),_0x3bccff(0x154));return{'title':_0x5c98ea,'description':_0x37bab3,'descriptionSource':'inline'};}const _0x50d0ab=resolve(process[_0x3bccff(0x12e)](),_0x3f5627),_0x234ec=await readFile(_0x50d0ab,_0x3bccff(0x127));if(!_0x234ec[_0x3bccff(0x13b)]())throw CliErrors[_0x3bccff(0x152)](_0x3bccff(0x130)+_0x50d0ab,_0x3bccff(0x139));return{'title':_0x5c98ea,'description':_0x234ec,'descriptionSource':_0x3bccff(0x13f),'descriptionFilePath':_0x50d0ab};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a77_0x42e78f=a77_0x5325;(function(_0x394831,_0xc2bb08){const _0x4f1b3e=a77_0x5325,_0x2d38c1=_0x394831();while(!![]){try{const _0x387ec4=-parseInt(_0x4f1b3e(0x1d0))/0x1*(parseInt(_0x4f1b3e(0x1c2))/0x2)+-parseInt(_0x4f1b3e(0x1da))/0x3+-parseInt(_0x4f1b3e(0x1c0))/0x4*(parseInt(_0x4f1b3e(0x1be))/0x5)+parseInt(_0x4f1b3e(0x1bc))/0x6+parseInt(_0x4f1b3e(0x1ba))/0x7+parseInt(_0x4f1b3e(0x1d7))/0x8+parseInt(_0x4f1b3e(0x1bd))/0x9*(parseInt(_0x4f1b3e(0x1d8))/0xa);if(_0x387ec4===_0xc2bb08)break;else _0x2d38c1['push'](_0x2d38c1['shift']());}catch(_0x3fd78b){_0x2d38c1['push'](_0x2d38c1['shift']());}}}(a77_0x28a8,0x518b7));function a77_0x28a8(){const _0x2b2afa=['826938pPObnM','945BmGtDW','185VFMKkj','logs','64432IxQuxr','View\x20command\x20history\x20logs','304412pVCmHJ','en-US','message','success','clearLogs','keys','clear','read','write','warn','*\x20Lovrabet\x20CLI\x20logs:\x0a','level','forEach','\x20\x20\x20Time:\x20','2KHmFII','command','\x20\x20\x20Duration:\x20','duration','details','log','length','482848mbODNf','102560qnpCxJ','toLocaleString','813462XxqVDv','error','stringify','\x20\x20\x20Details:\x20','Clear\x20command\x20history\x20logs','1613570VjqIRz','*\x20No\x20logs\x20found'];a77_0x28a8=function(){return _0x2b2afa;};return a77_0x28a8();}import{logger}from'../../utils/logger.js';function a77_0x5325(_0x1248b3,_0x5b51d1){_0x1248b3=_0x1248b3-0x1ba;const _0x28a8f5=a77_0x28a8();let _0x5325a1=_0x28a8f5[_0x1248b3];return _0x5325a1;}function printLogs(_0x1587db){const _0x3e8be2=a77_0x5325;if(_0x1587db[_0x3e8be2(0x1d6)]===0x0){console[_0x3e8be2(0x1d5)](_0x3e8be2(0x1bb));return;}console[_0x3e8be2(0x1d5)](_0x3e8be2(0x1cc)),_0x1587db[_0x3e8be2(0x1ce)]((_0x281f6f,_0x312c9e)=>{const _0x282c67=_0x3e8be2,_0x4cbc85=new Date(_0x281f6f['timestamp'])[_0x282c67(0x1d9)](_0x282c67(0x1c3)),_0x3775e1=_0x281f6f[_0x282c67(0x1cd)]===_0x282c67(0x1c5)?'√':_0x281f6f[_0x282c67(0x1cd)]===_0x282c67(0x1db)?'×':_0x281f6f[_0x282c67(0x1cd)]===_0x282c67(0x1cb)?'!':'i';console[_0x282c67(0x1d5)](_0x312c9e+0x1+'.\x20'+_0x3775e1+'\x20['+_0x281f6f[_0x282c67(0x1d1)]+']\x20'+_0x281f6f[_0x282c67(0x1c4)]),console[_0x282c67(0x1d5)](_0x282c67(0x1cf)+_0x4cbc85),_0x281f6f[_0x282c67(0x1d3)]&&console[_0x282c67(0x1d5)](_0x282c67(0x1d2)+_0x281f6f[_0x282c67(0x1d3)]+'ms'),_0x281f6f['details']&&Object[_0x282c67(0x1c7)](_0x281f6f[_0x282c67(0x1d4)])[_0x282c67(0x1d6)]>0x0&&console['log'](_0x282c67(0x1dd)+JSON[_0x282c67(0x1dc)](_0x281f6f[_0x282c67(0x1d4)],null,0x2)),console[_0x282c67(0x1d5)]('');});}export const logsDefinitions=[{'service':a77_0x42e78f(0x1bf),'command':'show','description':a77_0x42e78f(0x1c1),'risk':a77_0x42e78f(0x1c9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x46e05c){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':a77_0x42e78f(0x1bf),'command':a77_0x42e78f(0x1c8),'description':a77_0x42e78f(0x1de),'risk':a77_0x42e78f(0x1ca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1e4383){const _0x81faa9=a77_0x42e78f;return logger[_0x81faa9(0x1c6)](),console[_0x81faa9(0x1d5)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5328f3,_0x6a7fb2){const _0x5bea11=a78_0x57f5,_0x21417b=_0x5328f3();while(!![]){try{const _0x8b9607=parseInt(_0x5bea11(0x76))/0x1+-parseInt(_0x5bea11(0x73))/0x2+-parseInt(_0x5bea11(0x7a))/0x3+-parseInt(_0x5bea11(0x78))/0x4*(parseInt(_0x5bea11(0x74))/0x5)+-parseInt(_0x5bea11(0x79))/0x6*(-parseInt(_0x5bea11(0x77))/0x7)+-parseInt(_0x5bea11(0x70))/0x8*(-parseInt(_0x5bea11(0x71))/0x9)+parseInt(_0x5bea11(0x75))/0xa*(parseInt(_0x5bea11(0x72))/0xb);if(_0x8b9607===_0x6a7fb2)break;else _0x21417b['push'](_0x21417b['shift']());}catch(_0x147977){_0x21417b['push'](_0x21417b['shift']());}}}(a78_0x43c6,0x20b2c));import{menuSync}from'../../commands/menu/sync.js';function a78_0x57f5(_0x108475,_0x461165){_0x108475=_0x108475-0x70;const _0x43c6b0=a78_0x43c6();let _0x57f57a=_0x43c6b0[_0x108475];return _0x57f57a;}function a78_0x43c6(){const _0x1adab4=['1368ntgIaG','1611dTtbtg','406505lVFRwm','132112mQXRhE','710aRJhum','10nDcjmT','246606akGlfU','330470vzqVCN','4904xlYzBT','24ayOVnV','386790MqjdqN'];a78_0x43c6=function(){return _0x1adab4;};return a78_0x43c6();}import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuSync,menuUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2adc74,_0x4902cd){const _0x587400=a79_0x2f84,_0x3d8bf8=_0x2adc74();while(!![]){try{const _0x28156b=parseInt(_0x587400(0x93))/0x1+-parseInt(_0x587400(0x89))/0x2*(parseInt(_0x587400(0x7b))/0x3)+parseInt(_0x587400(0x81))/0x4*(parseInt(_0x587400(0x83))/0x5)+parseInt(_0x587400(0x84))/0x6*(parseInt(_0x587400(0x7e))/0x7)+parseInt(_0x587400(0x79))/0x8+-parseInt(_0x587400(0x97))/0x9*(parseInt(_0x587400(0x95))/0xa)+-parseInt(_0x587400(0x91))/0xb;if(_0x28156b===_0x4902cd)break;else _0x3d8bf8['push'](_0x3d8bf8['shift']());}catch(_0x13ef00){_0x3d8bf8['push'](_0x3d8bf8['shift']());}}}(a79_0x2fa4,0x3ebab));function strWidth(_0x10ed79){const _0x419421=a79_0x2f84;let _0x521574=0x0;for(const _0x26b43e of _0x10ed79){_0x521574+=/[\u4e00-\u9fa5]/[_0x419421(0x86)](_0x26b43e)?0x2:0x1;}return _0x521574;}function a79_0x2fa4(){const _0x2f844b=['push','join','Local','\x20\x20Affected\x20menus:\x20','\x20\x20\x20\x20CSS:\x20','\x20\x20No\x20pages\x20to\x20sync.','41063jmeTCk','length','164665VytUcH','map','310tucRrz','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','38601ZKsjOI','repeat','(unchanged)','local','2789616QsiYDH','online','11793WUOqVd','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','\x20\x20\x20\x20•\x20','7VSBSFn','Menu\x20Name','Platform','8WiHHCv','label','368670lBaMvo','637446zGxsWH','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','test','\x20\x20\x20\x20JS:\x20\x20','max','190ekYeJF','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];a79_0x2fa4=function(){return _0x2f844b;};return a79_0x2fa4();}function padRight(_0x10bed3,_0x100c4d){const _0x3b6267=a79_0x2f84,_0x1a0feb=strWidth(_0x10bed3);return _0x10bed3+'\x20'[_0x3b6267(0x98)](Math[_0x3b6267(0x88)](0x0,_0x100c4d-_0x1a0feb));}export function renderCompareTable(_0x2dd711,_0x563d20={}){const _0x4d1c12=a79_0x2f84;if(_0x2dd711[_0x4d1c12(0x92)]===0x0)return'';const _0x3b30e8=_0x563d20['showOnline']??!![],_0x313670=Math[_0x4d1c12(0x88)](0x1e,..._0x2dd711[_0x4d1c12(0x94)](_0x1017e8=>strWidth(_0x1017e8[_0x4d1c12(0x82)]))),_0x2a6b3e=0x4,_0x6f0e30=[],_0x4ab919='\x20\x20'+padRight(_0x4d1c12(0x7f),_0x313670),_0x47e27f=padRight(_0x4d1c12(0x8d),_0x2a6b3e),_0x42e649=_0x3b30e8?'\x20\x20'+padRight(_0x4d1c12(0x80),_0x2a6b3e):'';_0x6f0e30[_0x4d1c12(0x8b)](_0x4ab919+'\x20\x20'+_0x47e27f+(_0x3b30e8?_0x42e649:'')),_0x6f0e30[_0x4d1c12(0x8b)]('\x20\x20'+'─'[_0x4d1c12(0x98)](_0x313670)+'\x20\x20'+'─'[_0x4d1c12(0x98)](_0x2a6b3e)+(_0x3b30e8?'\x20\x20'+'─'[_0x4d1c12(0x98)](_0x2a6b3e):''));for(const _0x4d4715 of _0x2dd711){const _0x30b709=padRight(_0x4d4715['label'],_0x313670),_0x2666c4=_0x4d4715[_0x4d1c12(0x78)]?'✓':'✗',_0x25a81b=padRight(_0x2666c4,_0x2a6b3e);let _0xda938b='\x20\x20'+_0x30b709+'\x20\x20'+_0x25a81b;if(_0x3b30e8){const _0x44b3ab=_0x4d4715[_0x4d1c12(0x7a)]?'✓':'✗';_0xda938b+='\x20\x20'+padRight(_0x44b3ab,_0x2a6b3e);}_0x6f0e30[_0x4d1c12(0x8b)](_0xda938b);}return _0x6f0e30[_0x4d1c12(0x8c)]('\x0a');}function a79_0x2f84(_0x1c68c8,_0x4552bd){_0x1c68c8=_0x1c68c8-0x77;const _0x2fa4ba=a79_0x2fa4();let _0x2f84c3=_0x2fa4ba[_0x1c68c8];return _0x2f84c3;}export function renderSyncSummary(_0x2767e3,_0x2b8382){const _0x29209e=a79_0x2f84;if(_0x2767e3[_0x29209e(0x92)]===0x0)return _0x2b8382?_0x29209e(0x85):_0x29209e(0x90);const _0x2999f2=['\x20\x20'+_0x2767e3[_0x29209e(0x92)]+_0x29209e(0x8a)];for(const _0x1f2ac9 of _0x2767e3){_0x2999f2[_0x29209e(0x8b)](_0x29209e(0x7d)+_0x1f2ac9['label']+'\x20('+_0x1f2ac9['path']+')');}return _0x2999f2[_0x29209e(0x8c)]('\x0a');}export function renderUpdateSummary(_0x2ec00b,_0x4171be){const _0x26d8da=a79_0x2f84;if(_0x2ec00b[_0x26d8da(0x92)]===0x0)return _0x26d8da(0x7c);const _0x5d6392=['\x20\x20'+_0x2ec00b['length']+_0x26d8da(0x96),_0x26d8da(0x87)+(_0x4171be[0x0]??_0x26d8da(0x77)),_0x26d8da(0x8f)+(_0x4171be[0x1]??'(unchanged)'),'',_0x26d8da(0x8e)+_0x2ec00b[_0x26d8da(0x8c)](',\x20')];return _0x5d6392[_0x26d8da(0x8c)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a80_0x2551(_0x25e9c4,_0x25854d){_0x25e9c4=_0x25e9c4-0x18e;var _0x48548c=a80_0x4854();var _0x25511f=_0x48548c[_0x25e9c4];return _0x25511f;}(function(_0x7d65ec,_0x2355c8){var _0x487131=a80_0x2551,_0x23b91c=_0x7d65ec();while(!![]){try{var _0x5e2adb=parseInt(_0x487131(0x197))/0x1*(parseInt(_0x487131(0x18e))/0x2)+parseInt(_0x487131(0x199))/0x3*(parseInt(_0x487131(0x193))/0x4)+parseInt(_0x487131(0x192))/0x5+-parseInt(_0x487131(0x18f))/0x6*(parseInt(_0x487131(0x190))/0x7)+-parseInt(_0x487131(0x195))/0x8*(-parseInt(_0x487131(0x196))/0x9)+parseInt(_0x487131(0x19a))/0xa*(-parseInt(_0x487131(0x194))/0xb)+-parseInt(_0x487131(0x191))/0xc*(parseInt(_0x487131(0x198))/0xd);if(_0x5e2adb===_0x2355c8)break;else _0x23b91c['push'](_0x23b91c['shift']());}catch(_0x15aafd){_0x23b91c['push'](_0x23b91c['shift']());}}}(a80_0x4854,0x606c7));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';function a80_0x4854(){var _0x5f2294=['5586435dKmpSc','70150rGYJNz','428506ChxRag','38724DPwAsR','69780OGugDI','2YaJJHO','1475562LWsRWd','21mUOYgG','60PyxWSG','2717975ubaHrg','212kZbmPv','979QiMULj','8pwOamv'];a80_0x4854=function(){return _0x5f2294;};return a80_0x4854();}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';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33d33d,_0x1a5c47){const _0x4cddcd=a81_0x34a0,_0x1af791=_0x33d33d();while(!![]){try{const _0xb418a0=parseInt(_0x4cddcd(0x1fa))/0x1+parseInt(_0x4cddcd(0x1ee))/0x2+-parseInt(_0x4cddcd(0x1f3))/0x3*(-parseInt(_0x4cddcd(0x1f0))/0x4)+-parseInt(_0x4cddcd(0x1e6))/0x5+-parseInt(_0x4cddcd(0x1da))/0x6*(-parseInt(_0x4cddcd(0x1e0))/0x7)+parseInt(_0x4cddcd(0x1d5))/0x8+-parseInt(_0x4cddcd(0x1dd))/0x9*(parseInt(_0x4cddcd(0x1d4))/0xa);if(_0xb418a0===_0x1a5c47)break;else _0x1af791['push'](_0x1af791['shift']());}catch(_0x1c8cc0){_0x1af791['push'](_0x1af791['shift']());}}}(a81_0x4735,0x610e2));import a81_0x2eeadf from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a81_0x6a9471 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x24b747){const _0x52e1d9=a81_0x34a0;return _0x24b747[_0x52e1d9(0x1fb)](_0x4b5706=>{const _0x58224e=_0x52e1d9;if(_0x4b5706?.[_0x58224e(0x1df)]==='ExitPromptError')throw CliErrors['cancelled'](_0x58224e(0x1ec));throw _0x4b5706;});}export function startSpinner(_0x937b01){const _0x2f902c=a81_0x34a0;return a81_0x6a9471({'text':_0x937b01,'color':_0x2f902c(0x1e5)})[_0x2f902c(0x1f2)]();}function a81_0x4735(){const _0x209f6f=['2592438gbCMOR','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','CSS\x20URL\x20check\x20failed','9tjiMDz','label','name','7ceaJGU','[already\x20on\x20platform]','test','\x20\x20Checking\x20CSS\x20URL\x20reachability...','CSS\x20URL\x20checked','cyan','1438050uXUUXW','fail','map','isTTY','red','has','Cancelled.','includes','999568MKRrJM','gray','152DPYtyW','JS\x20URL\x20check\x20failed','start','49353ttkyDh','JS\x20URL\x20checked','filter','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','length','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','538220NspMRD','catch','succeed','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','No\x20local\x20pages\x20found.','cancelled','\x20\x20CSS\x20URL:','No\x20menus\x20selected.','\x20\x20JS\x20URL:','14401770IBRxSK','240880SNSQJH','path','trim','[new]','error'];a81_0x4735=function(){return _0x209f6f;};return a81_0x4735();}export function stopSpinner(_0x4ecb84,_0x52b8ee,_0x5732a6){const _0x2eb9dd=a81_0x34a0;_0x5732a6?_0x4ecb84[_0x2eb9dd(0x1fc)](_0x52b8ee):_0x4ecb84[_0x2eb9dd(0x1e7)](_0x52b8ee);}export async function askConfirm(_0x4928c9){return onCancel(confirm({'message':_0x4928c9,'theme':{'prefix':''}}));}export async function askJsUrl(_0x3dda40){const _0x48cbeb=a81_0x34a0;while(!![]){const _0x21b91a=await onCancel(input({'message':_0x48cbeb(0x1d3),'default':_0x3dda40,'theme':{'prefix':''}}));if(_0x21b91a[_0x48cbeb(0x1d7)]()==='')throw CliErrors[_0x48cbeb(0x200)](_0x48cbeb(0x1ec));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x48cbeb(0x1e2)](_0x21b91a[_0x48cbeb(0x1d7)]())){console[_0x48cbeb(0x1d9)](a81_0x2eeadf[_0x48cbeb(0x1ea)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0xd83ec1=startSpinner('\x20\x20Checking\x20JS\x20URL\x20reachability...');try{const _0x1ba203=await isUrlReachable(_0x21b91a[_0x48cbeb(0x1d7)]());stopSpinner(_0xd83ec1,_0x48cbeb(0x1f4),_0x1ba203);if(!_0x1ba203){console[_0x48cbeb(0x1d9)](a81_0x2eeadf[_0x48cbeb(0x1ea)](_0x48cbeb(0x1db)));continue;}return _0x21b91a[_0x48cbeb(0x1d7)]();}catch(_0x19dc48){stopSpinner(_0xd83ec1,_0x48cbeb(0x1f1),![]);throw _0x19dc48;}}}export async function askCssUrl(_0x3b2118){const _0x55028b=a81_0x34a0;while(!![]){const _0x186b40=await onCancel(input({'message':_0x55028b(0x1d1),'default':_0x3b2118,'theme':{'prefix':''}}));if(_0x186b40[_0x55028b(0x1d7)]()==='')throw CliErrors[_0x55028b(0x200)](_0x55028b(0x1ec));if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x186b40[_0x55028b(0x1d7)]())){console['error'](a81_0x2eeadf[_0x55028b(0x1ea)](_0x55028b(0x1f9)));continue;}const _0x3a0291=startSpinner(_0x55028b(0x1e3));try{const _0x497496=await isUrlReachable(_0x186b40[_0x55028b(0x1d7)]());stopSpinner(_0x3a0291,_0x55028b(0x1e4),_0x497496);if(!_0x497496){console[_0x55028b(0x1d9)](a81_0x2eeadf['red'](_0x55028b(0x1fe)));continue;}return _0x186b40[_0x55028b(0x1d7)]();}catch(_0x826f70){stopSpinner(_0x3a0291,_0x55028b(0x1dc),![]);throw _0x826f70;}}}function a81_0x34a0(_0x4fc777,_0x462faa){_0x4fc777=_0x4fc777-0x1d1;const _0x4735fc=a81_0x4735();let _0x34a051=_0x4735fc[_0x4fc777];return _0x34a051;}export async function selectPages(_0x597235,_0x10494b,_0x2db9dd){const _0xf1ecce=a81_0x34a0,_0x7de814=_0x597235[_0xf1ecce(0x1e8)](_0x49de41=>({'name':_0x49de41[_0xf1ecce(0x1de)]+'\x20\x20'+(_0x10494b[_0xf1ecce(0x1eb)](_0x49de41[_0xf1ecce(0x1d6)])?a81_0x2eeadf[_0xf1ecce(0x1ef)](_0xf1ecce(0x1e1)):a81_0x2eeadf['green'](_0xf1ecce(0x1d8))),'value':_0x49de41[_0xf1ecce(0x1de)],'checked':_0x2db9dd?_0x2db9dd['includes'](_0x49de41[_0xf1ecce(0x1de)]):!_0x10494b[_0xf1ecce(0x1eb)](_0x49de41[_0xf1ecce(0x1d6)])}));if(_0x7de814[_0xf1ecce(0x1f7)]===0x0)throw new Error(_0xf1ecce(0x1ff));const _0x164464=await onCancel(checkbox({'message':_0xf1ecce(0x1f6),'choices':_0x7de814,'loop':![],'theme':{'prefix':''}}));if(_0x164464[_0xf1ecce(0x1f7)]===0x0)throw new Error(_0xf1ecce(0x1d2));return _0x597235[_0xf1ecce(0x1f5)](_0xb01648=>_0x164464[_0xf1ecce(0x1ed)](_0xb01648[_0xf1ecce(0x1de)]));}export function isInteractive(){const _0x1b9d9a=a81_0x34a0;return process['stdin'][_0x1b9d9a(0x1e9)]===!![];}export function requireInteractive(){const _0x3da51e=a81_0x34a0;if(!isInteractive())throw new Error(_0x3da51e(0x1f8)+_0x3da51e(0x1fd));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x494011=a82_0x3e91;(function(_0x50457d,_0x5382c5){const _0x35bdaf=a82_0x3e91,_0x57f621=_0x50457d();while(!![]){try{const _0x210587=-parseInt(_0x35bdaf(0x1e0))/0x1+parseInt(_0x35bdaf(0x1e8))/0x2*(parseInt(_0x35bdaf(0x1d7))/0x3)+-parseInt(_0x35bdaf(0x1f0))/0x4+-parseInt(_0x35bdaf(0x1de))/0x5*(-parseInt(_0x35bdaf(0x1e6))/0x6)+parseInt(_0x35bdaf(0x1e3))/0x7+parseInt(_0x35bdaf(0x1eb))/0x8*(-parseInt(_0x35bdaf(0x1dc))/0x9)+-parseInt(_0x35bdaf(0x1ed))/0xa*(-parseInt(_0x35bdaf(0x1ee))/0xb);if(_0x210587===_0x5382c5)break;else _0x57f621['push'](_0x57f621['shift']());}catch(_0x4a818a){_0x57f621['push'](_0x57f621['shift']());}}}(a82_0x33c9,0x8bd0a));function a82_0x3e91(_0x22d579,_0x4166dc){_0x22d579=_0x22d579-0x1d7;const _0x33c9ee=a82_0x33c9();let _0x3e9198=_0x33c9ee[_0x22d579];return _0x3e9198;}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),a82_0x494011(0x1da));function a82_0x33c9(){const _0xc330cc=['100NtyokW','trim','737899mfjPug','match','split','3039498gjaYbS','slice','replaceAll','75198TCgwMT','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','2062rlolog','endsWith','isDirectory','28360StfSNO','utf-8','10HEmhdA','22039919HBHvru','filter','4521912EsFKYs','path','index.tsx','33cKNNSK','concat','replace','src/pages','.tsx','657ZAlSIa','forEach'];a82_0x33c9=function(){return _0xc330cc;};return a82_0x33c9();}export function extractTitleFromComment(_0x28c408){const _0xe7a96d=a82_0x494011;try{const _0x31f85a=readFileSync(_0x28c408,_0xe7a96d(0x1ec)),_0x58fd5a=_0x31f85a['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x58fd5a&&_0x58fd5a[0x1]){const _0x54a175=_0x58fd5a[0x1],_0x202e0f=_0x54a175['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x202e0f&&_0x202e0f[0x1])return _0x202e0f[0x1][_0xe7a96d(0x1df)]();}let _0x16d9a2=null;const _0x343cbd=_0x31f85a[_0xe7a96d(0x1e1)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x343cbd&&_0x343cbd[0x1]&&(_0x16d9a2=_0x343cbd[0x1]);if(!_0x16d9a2){const _0x449a39=_0x31f85a[_0xe7a96d(0x1e1)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x449a39&&_0x449a39[0x1]&&(_0x16d9a2=_0x449a39[0x1]);}if(_0x16d9a2){const _0x44798f=new RegExp('\x5cb'+_0x16d9a2+_0xe7a96d(0x1e7)),_0x38bacf=_0x31f85a[_0xe7a96d(0x1e1)](_0x44798f);if(_0x38bacf&&_0x38bacf[0x1])return _0x38bacf[0x1];return _0x16d9a2;}return null;}catch(_0x2a23f8){return null;}}export function getLocalPages(_0x23da78=pagesDir,_0x582f37=pagesDir){const _0x70c726=a82_0x494011;let _0x3bf1f1=[];const _0x2e10d0=readdirSync(_0x23da78);return _0x2e10d0[_0x70c726(0x1dd)](_0x6e62c5=>{const _0x46c7f5=_0x70c726,_0x5d506c=join(_0x23da78,_0x6e62c5),_0x4b429b=statSync(_0x5d506c);if(_0x4b429b&&_0x4b429b[_0x46c7f5(0x1ea)]())_0x3bf1f1=_0x3bf1f1[_0x46c7f5(0x1d8)](getLocalPages(_0x5d506c,_0x582f37));else{if(_0x6e62c5[_0x46c7f5(0x1e9)](_0x46c7f5(0x1db))){let _0x587f2c=relative(_0x582f37,_0x5d506c);_0x587f2c[_0x46c7f5(0x1e9)](_0x46c7f5(0x1f2))?_0x587f2c=_0x587f2c[_0x46c7f5(0x1d9)](/index\.tsx$/,''):_0x587f2c=_0x587f2c[_0x46c7f5(0x1d9)](/\.tsx$/,'');_0x587f2c[_0x46c7f5(0x1e9)](sep)&&(_0x587f2c=_0x587f2c[_0x46c7f5(0x1e4)](0x0,-0x1));const _0xfa94a2=_0x587f2c[_0x46c7f5(0x1e2)](sep)['join']('/'),_0x5465a5=extractTitleFromComment(_0x5d506c),_0x11bc72=_0x5465a5||_0xfa94a2;_0x3bf1f1['push']({'path':_0xfa94a2[_0x46c7f5(0x1e5)]('$',':'),'label':_0x11bc72});}}}),_0x3bf1f1[_0x70c726(0x1ef)](_0x3dcd82=>_0x3dcd82[_0x70c726(0x1f1)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a8cb9,_0x48c24c){const _0x4fa10b=a83_0x2eb2,_0x1927a1=_0x3a8cb9();while(!![]){try{const _0xe21298=-parseInt(_0x4fa10b(0x163))/0x1*(-parseInt(_0x4fa10b(0x16d))/0x2)+parseInt(_0x4fa10b(0x16a))/0x3*(parseInt(_0x4fa10b(0x15f))/0x4)+-parseInt(_0x4fa10b(0x16c))/0x5+-parseInt(_0x4fa10b(0x164))/0x6+-parseInt(_0x4fa10b(0x154))/0x7*(parseInt(_0x4fa10b(0x16f))/0x8)+parseInt(_0x4fa10b(0x151))/0x9+parseInt(_0x4fa10b(0x15a))/0xa;if(_0xe21298===_0x48c24c)break;else _0x1927a1['push'](_0x1927a1['shift']());}catch(_0x48bad7){_0x1927a1['push'](_0x1927a1['shift']());}}}(a83_0x21e3,0xaf838));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(_0x26ac9a){const _0x4426fe=a83_0x2eb2,_0x9b7ec8=[];return!isValidJsHttpsUrl(_0x26ac9a)&&_0x9b7ec8[_0x4426fe(0x169)](_0x4426fe(0x159)),{'ok':_0x9b7ec8[_0x4426fe(0x15c)]===0x0,'errors':_0x9b7ec8};}export function validateCssUrl(_0xd5309f){const _0x4ec8a2=a83_0x2eb2,_0x26d2f9=[];return!isValidCssHttpsUrl(_0xd5309f)&&_0x26d2f9[_0x4ec8a2(0x169)](_0x4ec8a2(0x157)),{'ok':_0x26d2f9[_0x4ec8a2(0x15c)]===0x0,'errors':_0x26d2f9};}export async function validateJsUrlReachable(_0x291753){const _0x4c51fe=a83_0x2eb2,_0x51cfee=validateJsUrl(_0x291753);if(!_0x51cfee['ok'])return _0x51cfee;const _0x384ef5=await isUrlReachable(_0x291753);if(!_0x384ef5)_0x51cfee[_0x4c51fe(0x16b)][_0x4c51fe(0x169)](_0x4c51fe(0x15d));return{'ok':_0x51cfee[_0x4c51fe(0x16b)][_0x4c51fe(0x15c)]===0x0,'errors':_0x51cfee[_0x4c51fe(0x16b)]};}export async function validateCssUrlReachable(_0x2be279){const _0x15d88f=a83_0x2eb2,_0x55e781=validateCssUrl(_0x2be279);if(!_0x55e781['ok'])return _0x55e781;const _0x242818=await isUrlReachable(_0x2be279);if(!_0x242818)_0x55e781[_0x15d88f(0x16b)][_0x15d88f(0x169)](_0x15d88f(0x170));return{'ok':_0x55e781[_0x15d88f(0x16b)][_0x15d88f(0x15c)]===0x0,'errors':_0x55e781['errors']};}export function buildCompareRows(_0x4771f6,_0x3d4f87){const _0x1c3d0d=a83_0x2eb2;return _0x4771f6[_0x1c3d0d(0x15b)](_0x58001c=>({'label':_0x58001c[_0x1c3d0d(0x166)],'path':_0x58001c[_0x1c3d0d(0x16e)],'local':!![],'online':_0x3d4f87[_0x1c3d0d(0x15e)](_0x58001c['path'])}));}export function filterNewPages(_0x2695e7,_0xce2d79,_0x5d31ba){const _0x133435=a83_0x2eb2;if(_0x5d31ba&&_0x5d31ba['length']>0x0){const _0x241ca1=new Set(_0x5d31ba[_0x133435(0x15b)](_0x2ca0f2=>_0x2ca0f2[_0x133435(0x165)]())),_0x2c38bc=_0x2695e7[_0x133435(0x160)](_0x2b664d=>_0x241ca1['has'](_0x2b664d[_0x133435(0x166)]));if(_0x2c38bc['length']===0x0)throw new Error(_0x133435(0x161)+[..._0x241ca1][_0x133435(0x156)](',\x20'));return _0x2c38bc;}return _0x2695e7[_0x133435(0x160)](_0x1132f0=>!_0xce2d79['has'](_0x1132f0[_0x133435(0x16e)]));}export function filterPagesByLabels(_0x2cfbbf,_0x389545){const _0x5b9209=a83_0x2eb2,_0x2e9495=[],_0x3d1a70=[];for(const _0x5976bd of _0x389545){const _0x8d1a58=_0x5976bd[_0x5b9209(0x165)](),_0x13e14d=_0x2cfbbf[_0x5b9209(0x168)](_0x3bf204=>_0x3bf204['label']===_0x8d1a58);if(_0x13e14d)_0x2e9495[_0x5b9209(0x169)](_0x13e14d);else _0x3d1a70[_0x5b9209(0x169)](_0x5976bd);}return{'matched':_0x2e9495,'unmatched':_0x3d1a70};}export async function doCreateMenus(_0x428921,_0x22c662,_0x557890,_0x773740){const _0x589741=a83_0x2eb2,_0x766225=await createMenus(_0x428921,_0x22c662,_0x557890,_0x773740);return{'created':_0x766225[_0x589741(0x15c)],'failed':0x0,'labels':_0x557890[_0x589741(0x15b)](_0x353973=>_0x353973[_0x589741(0x166)]),'menus':_0x766225};}export function filterMenusWithResources(_0x22f0d8){const _0x4f6811=a83_0x2eb2;return _0x22f0d8[_0x4f6811(0x160)](_0x117921=>_0x117921[_0x4f6811(0x167)][_0x4f6811(0x15c)]>0x0);}function a83_0x2eb2(_0x3a63e1,_0x14b7c0){_0x3a63e1=_0x3a63e1-0x151;const _0x21e346=a83_0x21e3();let _0x2eb2a5=_0x21e346[_0x3a63e1];return _0x2eb2a5;}export async function doUpdateCdnUrls(_0x3463d4,_0x170cc3,_0xd43b5d,_0x1d51ac){const _0x539df4=a83_0x2eb2,_0x209e10=_0xd43b5d[_0x539df4(0x160)](_0x3c1e11=>_0x3c1e11['resources'][_0x539df4(0x15c)]>0x0),_0x317850=await Promise[_0x539df4(0x152)](_0x209e10[_0x539df4(0x15b)](_0x4027f8=>updateMenuCdnUrl(_0x3463d4,_0x170cc3,{'id':_0x4027f8['id'],'label':_0x4027f8['label'],'path':_0x4027f8[_0x539df4(0x16e)],'resources':_0x1d51ac}))),_0x2a9839=_0x317850['filter'](_0x29b183=>_0x29b183[_0x539df4(0x153)]===_0x539df4(0x162))[_0x539df4(0x15b)](_0x2e164c=>_0x2e164c[_0x539df4(0x158)]),_0x187f0c=_0x317850[_0x539df4(0x160)](_0x1c6e1c=>_0x1c6e1c[_0x539df4(0x153)]===_0x539df4(0x155))[_0x539df4(0x15c)];return{'updated':_0x2a9839['length'],'failed':_0x187f0c,'menus':_0x2a9839};}function a83_0x21e3(){const _0x1203b5=['70zEPRDp','6665226NMjZXw','trim','label','resources','find','push','154743DOYqYW','errors','3923535cRiEUH','29340SNannR','path','8KmSHPY','CSS\x20URL\x20is\x20unreachable','2582073DGFwYC','allSettled','status','6556207TDFAJA','rejected','join','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','value','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','9477610yOWStr','map','length','JS\x20URL\x20is\x20unreachable','has','100eBUUib','filter','No\x20local\x20pages\x20matched\x20labels:\x20','fulfilled'];a83_0x21e3=function(){return _0x1203b5;};return a83_0x21e3();}export async function fetchMenuData(_0x3f0a98,_0x5f2256){const _0x168c63=a83_0x2eb2,_0x3988f5=getLocalPages(),_0x37f774=await getOnlineMenuList(_0x3f0a98,_0x5f2256),_0x6ed5de=new Set(_0x37f774[_0x168c63(0x15b)](_0x1796b0=>_0x1796b0[_0x168c63(0x16e)]));return{'localPages':_0x3988f5,'onlineMenuList':_0x37f774,'onlinePaths':_0x6ed5de};}export async function fetchOnlineMenuList(_0x43b771,_0x53aeaf){return getOnlineMenuList(_0x43b771,_0x53aeaf);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4cbe14,_0xd8b5e4){const _0x397f86=a84_0x180c,_0x46a78f=_0x4cbe14();while(!![]){try{const _0x5687c7=parseInt(_0x397f86(0xcc))/0x1+parseInt(_0x397f86(0xd1))/0x2+parseInt(_0x397f86(0xd7))/0x3+parseInt(_0x397f86(0xe5))/0x4+parseInt(_0x397f86(0xca))/0x5*(parseInt(_0x397f86(0xd8))/0x6)+parseInt(_0x397f86(0xf0))/0x7*(parseInt(_0x397f86(0xe0))/0x8)+-parseInt(_0x397f86(0xce))/0x9;if(_0x5687c7===_0xd8b5e4)break;else _0x46a78f['push'](_0x46a78f['shift']());}catch(_0x232457){_0x46a78f['push'](_0x46a78f['shift']());}}}(a84_0x4d84,0x8d185));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x47c805,_0x433082){const _0x10330e=a84_0x180c,_0x4d8c23=getEnv();logger[_0x10330e(0xdf)](_0x10330e(0xd5),isProduction(_0x4d8c23)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x47c805+')':_0x10330e(0xdc)+_0x47c805+')');const _0x114b05=await platformFetch(getApiDomain()+_0x10330e(0xd2)+_0x47c805,{'cookie':_0x433082,'label':_0x10330e(0xdd)});if(!_0x114b05)return logger[_0x10330e(0xdf)](_0x10330e(0xd5),_0x10330e(0xef)),[];return logger[_0x10330e(0xdf)](_0x10330e(0xd5),_0x10330e(0xda)+_0x114b05[_0x10330e(0xea)]+_0x10330e(0xcd)),_0x114b05[_0x10330e(0xe1)](flattenMenuItem)['flat']();}function a84_0x4d84(){const _0x41c83e=['Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Fetch\x20menu\x20list','create-menus','info','472pnvMjd','map','stringify','Menu\x20assets\x20synced:\x20','POST','2832732RxTADV','Menu\x20created\x20successfully:\x20','create-menu','Batch\x20menu\x20creation\x20completed,\x20total\x20','update-menu-cdn-url','length','Start\x20batch\x20menu\x20creation,\x20total\x20','Create\x20menu\x20\x22','path','/smartapi/menu/create','Server\x20returned\x20empty\x20menu\x20list','77651Wldcdu','push','Updating\x20menu\x20asset\x20links:\x20','isArray','import','73285ZxCvRx','children','246016ImDETB','\x20online\x20menus\x20successfully','15345936uVriqB','resources','parse','401402IWXPNi','/smartapi/menu/find?appCode=','Creating\x20menu:\x20','label','get-online-menu-list','Update\x20menu\x20assets\x20\x22','1376955bWXqYe','6eFMFIP','procode','Fetched\x20','extend'];a84_0x4d84=function(){return _0x41c83e;};return a84_0x4d84();}function flattenMenuItem(_0x5b447b){const _0x2716d1=a84_0x180c;let _0x19a1bc=[];try{if(_0x5b447b[_0x2716d1(0xdb)]?.[_0x2716d1(0xcf)]){const _0x508793=JSON[_0x2716d1(0xd0)](_0x5b447b['extend'][_0x2716d1(0xcf)]);if(Array[_0x2716d1(0xf3)](_0x508793))_0x19a1bc=_0x508793;}}catch{}const _0x827055=[{'id':_0x5b447b['id'],'path':_0x5b447b[_0x2716d1(0xed)],'label':_0x5b447b[_0x2716d1(0xd4)],'resources':_0x19a1bc}];if(_0x5b447b[_0x2716d1(0xcb)]&&_0x5b447b[_0x2716d1(0xcb)]['length']>0x0)for(const _0x468354 of _0x5b447b[_0x2716d1(0xcb)]){_0x827055[_0x2716d1(0xf1)](...flattenMenuItem(_0x468354));}return _0x827055;}function a84_0x180c(_0x199c21,_0xa30ea5){_0x199c21=_0x199c21-0xc9;const _0x4d8433=a84_0x4d84();let _0x180c8c=_0x4d8433[_0x199c21];return _0x180c8c;}export async function createMenu(_0x111879,_0x2f4b5d,_0x9732e3){const _0x4b2c40=a84_0x180c;logger[_0x4b2c40(0xdf)](_0x4b2c40(0xe7),_0x4b2c40(0xd3)+_0x9732e3[_0x4b2c40(0xd4)]+'\x20('+_0x9732e3[_0x4b2c40(0xed)]+')');const _0x23aa5e={'appCode':_0x111879,'type':_0x4b2c40(0xd9),'sort':0x0,'extend':{'loadScriptMode':_0x4b2c40(0xc9),'resources':_0x9732e3['resources']?JSON[_0x4b2c40(0xe2)](_0x9732e3[_0x4b2c40(0xcf)]):undefined},..._0x9732e3},_0x5a6d3c=await platformFetch(getApiDomain()+_0x4b2c40(0xee),{'method':_0x4b2c40(0xe4),'body':_0x23aa5e,'cookie':_0x2f4b5d,'label':_0x4b2c40(0xec)+_0x9732e3['label']+'\x22'});return logger[_0x4b2c40(0xdf)](_0x4b2c40(0xe7),'Menu\x20created\x20successfully:\x20'+_0x9732e3[_0x4b2c40(0xd4)]),_0x5a6d3c;}async function createSingleMenu(_0x12e06d,_0x98e6fb,_0x1deab8,_0x1a71c4){const _0x13f1df=a84_0x180c,_0x5adc86={'appCode':_0x12e06d,'type':_0x13f1df(0xd9),'sort':0x0,'extend':{'loadScriptMode':_0x13f1df(0xc9),'resources':_0x1a71c4?JSON[_0x13f1df(0xe2)](_0x1a71c4):undefined},'label':_0x1deab8[_0x13f1df(0xd4)],'path':_0x1deab8[_0x13f1df(0xed)]},_0x4167e4=await platformFetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x13f1df(0xe4),'body':_0x5adc86,'cookie':_0x98e6fb,'label':_0x13f1df(0xec)+_0x1deab8['label']+'\x22'});return logger[_0x13f1df(0xdf)](_0x13f1df(0xe7),_0x13f1df(0xe6)+_0x1deab8['label']),_0x4167e4;}export async function createMenus(_0x4c4c35,_0x124040,_0x372799,_0x449e86){const _0x2e8818=a84_0x180c;logger[_0x2e8818(0xdf)]('create-menus',_0x2e8818(0xeb)+_0x372799[_0x2e8818(0xea)]);const _0xfecb69=await Promise['all'](_0x372799[_0x2e8818(0xe1)](_0x358794=>createSingleMenu(_0x4c4c35,_0x124040,_0x358794,_0x449e86)));return logger['info'](_0x2e8818(0xde),_0x2e8818(0xe8)+_0x372799['length']),_0xfecb69;}export async function updateMenuCdnUrl(_0x2f364d,_0x47efa5,_0x5909f0){const _0x386d4b=a84_0x180c;logger[_0x386d4b(0xdf)](_0x386d4b(0xe9),_0x386d4b(0xf2)+_0x5909f0[_0x386d4b(0xd4)]+'\x20('+_0x5909f0[_0x386d4b(0xed)]+')');const _0x23bbc9={'id':_0x5909f0['id'],'appCode':_0x2f364d,'extend':{'loadScriptMode':_0x386d4b(0xc9),'resources':_0x5909f0['resources']?JSON[_0x386d4b(0xe2)](_0x5909f0[_0x386d4b(0xcf)]):undefined}},_0x230e8d=await platformFetch(getApiDomain()+'/smartapi/menu/update',{'method':_0x386d4b(0xe4),'body':_0x23bbc9,'cookie':_0x47efa5,'label':_0x386d4b(0xd6)+_0x5909f0[_0x386d4b(0xd4)]+'\x22'});return logger['info'](_0x386d4b(0xe9),_0x386d4b(0xe3)+_0x5909f0[_0x386d4b(0xd4)],undefined),_0x230e8d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x338532,_0x2ac03){const _0x525b48=a85_0x13db,_0x291c9a=_0x338532();while(!![]){try{const _0x2179ca=-parseInt(_0x525b48(0x113))/0x1*(parseInt(_0x525b48(0x10b))/0x2)+-parseInt(_0x525b48(0x106))/0x3*(-parseInt(_0x525b48(0x108))/0x4)+-parseInt(_0x525b48(0x11d))/0x5*(-parseInt(_0x525b48(0x116))/0x6)+-parseInt(_0x525b48(0x111))/0x7*(-parseInt(_0x525b48(0x11e))/0x8)+-parseInt(_0x525b48(0xfc))/0x9+parseInt(_0x525b48(0x107))/0xa*(parseInt(_0x525b48(0x102))/0xb)+-parseInt(_0x525b48(0xfe))/0xc;if(_0x2179ca===_0x2ac03)break;else _0x291c9a['push'](_0x291c9a['shift']());}catch(_0x3fc463){_0x291c9a['push'](_0x291c9a['shift']());}}}(a85_0x29c7,0x9f810));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 a85_0x29c7(){const _0x40d2b4=['trim','24opGUKA','readableEnded','object','info','startsWith','cssUrl','setLogPath','1435535ikPdRg','4824088ATyDQd','map','filter','\x0a\x20\x20Available\x20local\x20pages:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','data','Start\x20non-interactive\x20menu\x20sync','path','CSS\x20URL\x20is\x20unreachable:\x20','label','isArray','--params.','8608401tQpglh','join','12085284ANxvuk','stdin','message','string','2216324gDxBUl','length','has','Invalid\x20--params:\x20','779583vqotvQ','50cEmmMe','8nTfmSk','toString','JS\x20URL\x20is\x20unreachable:\x20','34GuvKWK','No\x20local\x20pages\x20matched\x20labels:\x20','concat','isTTY','end','push','7CEqBDd','jsUrl','38921Bhuwrd','pages'];a85_0x29c7=function(){return _0x40d2b4;};return a85_0x29c7();}function validateParams(_0x15aa71){const _0x1cd89b=a85_0x13db,_0x5885fc=[];return _0x15aa71['jsUrl']&&!isValidJsHttpsUrl(_0x15aa71[_0x1cd89b(0x112)])&&_0x5885fc['push']({'field':'jsUrl','message':_0x1cd89b(0xf4)}),_0x15aa71[_0x1cd89b(0x11b)]&&!isValidCssHttpsUrl(_0x15aa71['cssUrl'])&&_0x5885fc[_0x1cd89b(0x110)]({'field':_0x1cd89b(0x11b),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x5885fc;}export async function runMenuSyncCore(_0xbc7391,_0xad87c9,_0x55ad3d=[],_0x160d1e){const _0x5aed47=a85_0x13db,_0x3d6bbb=parseParamsFlag(_0x160d1e),_0x4aa1a5=_0x55ad3d['length']>0x0?_0x55ad3d:_0x3d6bbb['selectedLabels'],_0x2979f5=_0x3d6bbb[_0x5aed47(0x112)],_0x3bd90b=_0x3d6bbb[_0x5aed47(0x11b)],_0x24c624=[];if(_0x2979f5)_0x24c624[_0x5aed47(0x110)](_0x2979f5);if(_0x3bd90b)_0x24c624['push'](_0x3bd90b);const _0x4d67e7=validateParams(_0x3d6bbb);if(_0x4d67e7[_0x5aed47(0x103)]>0x0){const _0x5b9bd8=_0x4d67e7[_0x5aed47(0x11f)](_0x2ac87b=>_0x5aed47(0xfb)+_0x2ac87b['field']+':\x20'+_0x2ac87b[_0x5aed47(0x100)])[_0x5aed47(0xfd)](';\x20');throw new Error(_0x5aed47(0x105)+_0x5b9bd8);}logger[_0x5aed47(0x11c)](process['cwd']()),logger[_0x5aed47(0x119)]('menu-sync',_0x5aed47(0xf6),{'appCode':_0xbc7391,'selectedCount':_0x4aa1a5?.[_0x5aed47(0x103)],'jsUrl':_0x2979f5,'cssUrl':_0x3bd90b});if(_0x2979f5){const _0x1d9918=await isUrlReachable(_0x2979f5);if(!_0x1d9918)throw new Error(_0x5aed47(0x10a)+_0x2979f5);}if(_0x3bd90b){const _0x177d51=await isUrlReachable(_0x3bd90b);if(!_0x177d51)throw new Error(_0x5aed47(0xf8)+_0x3bd90b);}const _0x4a0ae4=getLocalPages();if(_0x4a0ae4[_0x5aed47(0x103)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x20ba4f=await getOnlineMenuList(_0xbc7391,_0xad87c9),_0x2240c4=new Set(_0x20ba4f[_0x5aed47(0x11f)](_0x27b245=>_0x27b245['path']));let _0x14e4ef;if(_0x4aa1a5&&_0x4aa1a5[_0x5aed47(0x103)]>0x0){const _0x3ff525=new Set(_0x4aa1a5[_0x5aed47(0x11f)](_0x3aa1e4=>_0x3aa1e4[_0x5aed47(0x115)]()));_0x14e4ef=_0x4a0ae4[_0x5aed47(0x120)](_0x2223e2=>_0x3ff525[_0x5aed47(0x104)](_0x2223e2[_0x5aed47(0xf9)]));if(_0x14e4ef[_0x5aed47(0x103)]===0x0){const _0x51be10=_0x4a0ae4[_0x5aed47(0x11f)](_0x3ad720=>_0x3ad720['label'])[_0x5aed47(0xfd)](',\x20');throw new Error(_0x5aed47(0x10c)+[..._0x3ff525][_0x5aed47(0xfd)](',\x20')+_0x5aed47(0x121)+_0x51be10);}}else _0x14e4ef=_0x4a0ae4[_0x5aed47(0x120)](_0x35b57c=>!_0x2240c4[_0x5aed47(0x104)](_0x35b57c[_0x5aed47(0xf7)]));if(_0x14e4ef[_0x5aed47(0x103)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x52bb8c=await createMenus(_0xbc7391,_0xad87c9,_0x14e4ef,_0x24c624['length']>0x0?_0x24c624:undefined);return logger['info']('menu-sync','Menu\x20sync\x20completed',{'count':_0x14e4ef['length'],'resources':_0x24c624}),{'created':_0x52bb8c[_0x5aed47(0x103)],'skipped':![],'targetPages':_0x14e4ef,'menus':_0x52bb8c};}function a85_0x13db(_0x11009d,_0x50d57b){_0x11009d=_0x11009d-0xf4;const _0x29c7a2=a85_0x29c7();let _0x13db90=_0x29c7a2[_0x11009d];return _0x13db90;}export async function readPageLabelsFromStdin(){const _0x3de229=a85_0x13db;if(!process[_0x3de229(0xff)][_0x3de229(0x10e)]&&!process[_0x3de229(0xff)][_0x3de229(0x117)])return new Promise(_0x569f42=>{const _0x34ada0=_0x3de229,_0x5a547c=[];process[_0x34ada0(0xff)]['on'](_0x34ada0(0xf5),_0x2f4974=>_0x5a547c[_0x34ada0(0x110)](_0x2f4974)),process[_0x34ada0(0xff)]['on'](_0x34ada0(0x10f),()=>{const _0x230673=_0x34ada0,_0x4d7402=Buffer[_0x230673(0x10d)](_0x5a547c)[_0x230673(0x109)]('utf8'),_0x2d7a90=_0x4d7402['split']('\x0a')['map'](_0x459ef0=>_0x459ef0[_0x230673(0x115)]())[_0x230673(0x120)](_0x56592e=>_0x56592e[_0x230673(0x103)]>0x0&&!_0x56592e[_0x230673(0x11a)]('#'));_0x569f42(_0x2d7a90);}),setTimeout(()=>_0x569f42([]),0x1f4);});return[];}function parseParamsFlag(_0x1f2bbd){const _0x1c8a67=a85_0x13db;if(!_0x1f2bbd||typeof _0x1f2bbd!=='string')return{};try{const _0x34e3db=JSON['parse'](_0x1f2bbd);if(typeof _0x34e3db!==_0x1c8a67(0x118)||_0x34e3db===null||Array[_0x1c8a67(0xfa)](_0x34e3db))return{};return{'selectedLabels':Array['isArray'](_0x34e3db['pages'])?_0x34e3db[_0x1c8a67(0x114)][_0x1c8a67(0x11f)](String):undefined,'jsUrl':typeof _0x34e3db[_0x1c8a67(0x112)]==='string'?_0x34e3db[_0x1c8a67(0x112)][_0x1c8a67(0x115)]():undefined,'cssUrl':typeof _0x34e3db['cssUrl']===_0x1c8a67(0x101)?_0x34e3db[_0x1c8a67(0x11b)]['trim']():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41eaab,_0x292527){const _0x51ea48=a87_0x82c5,_0x2d17e0=_0x41eaab();while(!![]){try{const _0x2ead4b=parseInt(_0x51ea48(0x104))/0x1+-parseInt(_0x51ea48(0xe8))/0x2+parseInt(_0x51ea48(0xf2))/0x3*(-parseInt(_0x51ea48(0xea))/0x4)+parseInt(_0x51ea48(0xfc))/0x5*(parseInt(_0x51ea48(0xf3))/0x6)+-parseInt(_0x51ea48(0xeb))/0x7*(-parseInt(_0x51ea48(0xf7))/0x8)+parseInt(_0x51ea48(0xe5))/0x9+-parseInt(_0x51ea48(0x100))/0xa;if(_0x2ead4b===_0x292527)break;else _0x2d17e0['push'](_0x2d17e0['shift']());}catch(_0x231985){_0x2d17e0['push'](_0x2d17e0['shift']());}}}(a87_0x53b1,0x4f925));function a87_0x82c5(_0x148a9a,_0x1fc147){_0x148a9a=_0x148a9a-0xe2;const _0x53b1a1=a87_0x53b1();let _0x82c5fc=_0x53b1a1[_0x148a9a];return _0x82c5fc;}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(_0x5b697f){const _0x5dd030=a87_0x82c5,_0x5a0fb0=[];return _0x5b697f[_0x5dd030(0xf8)]&&!isValidJsHttpsUrl(_0x5b697f[_0x5dd030(0xf8)])&&_0x5a0fb0[_0x5dd030(0xe7)]({'field':_0x5dd030(0xf8),'message':_0x5dd030(0x107)}),_0x5b697f[_0x5dd030(0xf9)]&&!isValidCssHttpsUrl(_0x5b697f[_0x5dd030(0xf9)])&&_0x5a0fb0[_0x5dd030(0xe7)]({'field':_0x5dd030(0xf9),'message':_0x5dd030(0xfa)}),_0x5a0fb0;}function a87_0x53b1(){const _0x13a623=['jsUrl','cssUrl','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','JS\x20URL\x20is\x20unreachable:\x20','20bDfDGz','path','--params.','value','1521970nXtwFI','message','allSettled','parse','443790LoHdEl','status','map','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Start\x20non-interactive\x20menu\x20update','object','field','186552SDfavH','rejected','push','1188954WqJYQs','filter','295636woqhLF','1130598oTnJOy','string','menu-update','label','Menu\x20update\x20completed','trim','resources','3dfoWZr','296172wMtgsK','fulfilled','length','isArray','24MsVwSZ'];a87_0x53b1=function(){return _0x13a623;};return a87_0x53b1();}export async function runMenuUpdateCore(_0x922b34,_0x2adc41,_0x5a2ac3){const _0x587b4e=a87_0x82c5,_0x17663a=parseUpdateParamsFlag(_0x5a2ac3),_0x2ae6ec=[];if(_0x17663a[_0x587b4e(0xf8)])_0x2ae6ec[_0x587b4e(0xe7)](_0x17663a['jsUrl']);if(_0x17663a['cssUrl'])_0x2ae6ec[_0x587b4e(0xe7)](_0x17663a[_0x587b4e(0xf9)]);const _0x14472e=validateParams(_0x17663a);if(_0x14472e['length']>0x0){const _0x34fc91=_0x14472e[_0x587b4e(0x106)](_0x3898ac=>_0x587b4e(0xfe)+_0x3898ac[_0x587b4e(0xe4)]+':\x20'+_0x3898ac[_0x587b4e(0x101)])['join'](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x34fc91);}logger['setLogPath'](process['cwd']()),logger['info'](_0x587b4e(0xed),_0x587b4e(0xe2),{'appCode':_0x922b34,'jsUrl':_0x17663a['jsUrl'],'cssUrl':_0x17663a[_0x587b4e(0xf9)]});if(_0x17663a[_0x587b4e(0xf8)]){const _0xd183ac=await isUrlReachable(_0x17663a[_0x587b4e(0xf8)]);if(!_0xd183ac)throw new Error(_0x587b4e(0xfb)+_0x17663a['jsUrl']);}if(_0x17663a[_0x587b4e(0xf9)]){const _0x1d7147=await isUrlReachable(_0x17663a[_0x587b4e(0xf9)]);if(!_0x1d7147)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x17663a[_0x587b4e(0xf9)]);}const _0xe33ef6=await getOnlineMenuList(_0x922b34,_0x2adc41),_0x110093=_0xe33ef6[_0x587b4e(0xe9)](_0xa306cc=>_0xa306cc[_0x587b4e(0xf1)][_0x587b4e(0xf5)]>0x0);if(_0x110093[_0x587b4e(0xf5)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x3bb0f8=await Promise[_0x587b4e(0x102)](_0x110093[_0x587b4e(0x106)](_0x388593=>updateMenuCdnUrl(_0x922b34,_0x2adc41,{'id':_0x388593['id'],'label':_0x388593[_0x587b4e(0xee)],'path':_0x388593[_0x587b4e(0xfd)],'resources':_0x2ae6ec}))),_0x107d63=_0x3bb0f8[_0x587b4e(0xe9)](_0x3d60bd=>_0x3d60bd[_0x587b4e(0x105)]===_0x587b4e(0xf4))['map'](_0x44049a=>_0x44049a[_0x587b4e(0xff)]),_0x1fb518=_0x3bb0f8[_0x587b4e(0xe9)](_0xc2a1f4=>_0xc2a1f4[_0x587b4e(0x105)]===_0x587b4e(0xe6))[_0x587b4e(0xf5)];return logger['info']('menu-update',_0x587b4e(0xef),{'count':_0x110093[_0x587b4e(0xf5)],'resources':_0x2ae6ec}),{'updated':_0x107d63[_0x587b4e(0xf5)],'failed':_0x1fb518,'skipped':![],'menus':_0x107d63};}function parseUpdateParamsFlag(_0x2efb3b){const _0x417f77=a87_0x82c5;if(!_0x2efb3b||typeof _0x2efb3b!==_0x417f77(0xec))return{};try{const _0x3e6e1b=JSON[_0x417f77(0x103)](_0x2efb3b);if(typeof _0x3e6e1b!==_0x417f77(0xe3)||_0x3e6e1b===null||Array[_0x417f77(0xf6)](_0x3e6e1b))return{};return{'jsUrl':typeof _0x3e6e1b['jsUrl']===_0x417f77(0xec)?_0x3e6e1b[_0x417f77(0xf8)]['trim']():undefined,'cssUrl':typeof _0x3e6e1b[_0x417f77(0xf9)]==='string'?_0x3e6e1b[_0x417f77(0xf9)][_0x417f77(0xf0)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a88_0x490f(_0x11aec6,_0x55d60){_0x11aec6=_0x11aec6-0x1b5;const _0x752927=a88_0x7529();let _0x490f2c=_0x752927[_0x11aec6];return _0x490f2c;}(function(_0x21548f,_0xc006ac){const _0x43dcdc=a88_0x490f,_0x160ba2=_0x21548f();while(!![]){try{const _0x5c6fc1=-parseInt(_0x43dcdc(0x1c2))/0x1+parseInt(_0x43dcdc(0x1bf))/0x2+parseInt(_0x43dcdc(0x1bc))/0x3+-parseInt(_0x43dcdc(0x1b8))/0x4*(parseInt(_0x43dcdc(0x1c0))/0x5)+-parseInt(_0x43dcdc(0x1b7))/0x6*(parseInt(_0x43dcdc(0x1c1))/0x7)+-parseInt(_0x43dcdc(0x1ba))/0x8*(parseInt(_0x43dcdc(0x1bb))/0x9)+-parseInt(_0x43dcdc(0x1b9))/0xa*(-parseInt(_0x43dcdc(0x1be))/0xb);if(_0x5c6fc1===_0xc006ac)break;else _0x160ba2['push'](_0x160ba2['shift']());}catch(_0x2fef1b){_0x160ba2['push'](_0x160ba2['shift']());}}}(a88_0x7529,0xd5247));export function isValidJsHttpsUrl(_0x5241b8){const _0x13b96d=a88_0x490f;return/^https:\/\/.+\.js(\?.*)?$/[_0x13b96d(0x1b6)](_0x5241b8['trim']());}function a88_0x7529(){const _0x3190e8=['255238rpUagr','13135TsdawH','245BgPahH','935645WxXTWO','trim','test','158022EsKrZf','108hRFADT','1830CTminY','8jrMQXp','14390802KpcpPe','4481163xSrphB','HEAD','167046AMirDD'];a88_0x7529=function(){return _0x3190e8;};return a88_0x7529();}export function isValidCssHttpsUrl(_0x42b877){const _0x3f67d1=a88_0x490f;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x42b877[_0x3f67d1(0x1b5)]());}export async function isUrlReachable(_0x636349){const _0x4ee1da=a88_0x490f;try{const _0x437486=await fetch(_0x636349,{'method':_0x4ee1da(0x1bd)});return _0x437486['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x5b3b89=a89_0x44ca;(function(_0x5e9329,_0x13e30e){const _0x2c8316=a89_0x44ca,_0x55294a=_0x5e9329();while(!![]){try{const _0x515ec9=-parseInt(_0x2c8316(0xa9))/0x1+-parseInt(_0x2c8316(0xbd))/0x2*(parseInt(_0x2c8316(0xd9))/0x3)+parseInt(_0x2c8316(0xa8))/0x4+-parseInt(_0x2c8316(0xc4))/0x5*(-parseInt(_0x2c8316(0xd5))/0x6)+-parseInt(_0x2c8316(0xb0))/0x7+parseInt(_0x2c8316(0xe5))/0x8+parseInt(_0x2c8316(0xe4))/0x9;if(_0x515ec9===_0x13e30e)break;else _0x55294a['push'](_0x55294a['shift']());}catch(_0x3a3599){_0x55294a['push'](_0x55294a['shift']());}}}(a89_0x2110,0x57e4b));import a89_0x3ac341 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a89_0x44ca(_0x5d7933,_0x136973){_0x5d7933=_0x5d7933-0xa8;const _0x2110fb=a89_0x2110();let _0x44ca7f=_0x2110fb[_0x5d7933];return _0x44ca7f;}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a89_0x2110(){const _0x12457c=['str','validation','Creating\x20','cookie','\x20created,\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','length','size','parse','\x20failed.','map','150472SCthZf','trim','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','appCode','\x20and\x20CSS:\x20','Created\x20','message','25rrjOGB','Menu\x20sync\x20completed:\x20','object','pages','Menu\x20creation\x20failed','\x20\x20Continue\x20with\x20creation?','\x20menu(s)','string','\x20menu(s)...','Sync\x20local\x20pages\x20as\x20platform\x20menus','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','jsUrl','failed','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','Menu\x20sync\x20skipped','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','\x20menu(s)\x20with\x20JS:\x20','412914RrLOlQ','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','localPages','params','24zNYjiF','skipped','write','boolean','\x20\x20Cancelled.','Failed\x20to\x20fetch\x20online\x20menu\x20list','cssUrl','\x20\x20Create\x20','✓\x20Menu\x20sync\x20completed:\x20','Online\x20menu\x20list\x20fetched','isArray','1240029AlNHGw','4145480imEIoN','1739392kAuCKP','250676CVeijT','\x20menu(s)\x20created','\x20\x20✓\x20Selected:\x20','flag','gray','created','yes','1556338lTdfcq','yellow'];a89_0x2110=function(){return _0x12457c;};return a89_0x2110();}import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';export const menuSync={'service':'menu','command':'sync','description':a89_0x5b3b89(0xcd),'risk':a89_0x5b3b89(0xdb),'flags':[{'name':a89_0x5b3b89(0xd8),'type':a89_0x5b3b89(0xcb),'description':a89_0x5b3b89(0xce)+a89_0x5b3b89(0xbf)},{'name':a89_0x5b3b89(0xaf),'type':a89_0x5b3b89(0xdc),'description':a89_0x5b3b89(0xd3)}],async 'execute'(_0xab5d2f){const _0x5c0482=a89_0x5b3b89,_0x1567aa=_0xab5d2f[_0x5c0482(0xac)](_0x5c0482(0xaf)),_0x202f21=_0xab5d2f[_0x5c0482(0xb2)](_0x5c0482(0xd8)),_0x392f74=parseParams(_0x202f21),_0x1b3f46=!!(_0x392f74[_0x5c0482(0xcf)]||_0x392f74['cssUrl']||_0x392f74[_0x5c0482(0xc7)]&&_0x392f74['pages'][_0x5c0482(0xb8)]>0x0);if(_0x1567aa||_0x1b3f46){let _0x5e7269=[];!isInteractive()&&!_0x392f74[_0x5c0482(0xc7)]?.[_0x5c0482(0xb8)]&&(_0x5e7269=await readPageLabelsFromStdin());const _0x263de5=await runMenuSyncCore(_0xab5d2f['appCode'],_0xab5d2f[_0x5c0482(0xb5)],_0x5e7269[_0x5c0482(0xb8)]>0x0?_0x5e7269:_0x392f74['pages']??[],_0x202f21);if(_0x263de5['skipped']){const _0x457dc9=getLocalPages();_0x457dc9['length']===0x0?writeCliSideChannelLine(_0x5c0482(0xd1)):writeCliSideChannelLine(_0x5c0482(0xb7));}else writeCliSideChannelLine(_0x5c0482(0xe1)+_0x263de5[_0x5c0482(0xae)]+_0x5c0482(0xaa));return{'ok':!![],'data':_0x263de5,'message':_0x263de5[_0x5c0482(0xda)]?_0x5c0482(0xd2):_0x5c0482(0xc5)+_0x263de5[_0x5c0482(0xae)]+'\x20created.'};}requireInteractive();const _0x5a0a1e=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x4d8e90,_0xbab73e,_0x37bc00;try{const _0x2a1500=await fetchMenuData(_0xab5d2f[_0x5c0482(0xc0)],_0xab5d2f[_0x5c0482(0xb5)]);_0x4d8e90=_0x2a1500[_0x5c0482(0xd7)],_0xbab73e=_0x2a1500['onlinePaths'],_0x37bc00=_0x2a1500['onlineMenuList'],stopSpinner(_0x5a0a1e,_0x5c0482(0xe2),!![]);}catch(_0x447bc0){stopSpinner(_0x5a0a1e,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x5c0482(0xb3)](_0x447bc0 instanceof Error?_0x447bc0[_0x5c0482(0xc3)]:_0x5c0482(0xde));}if(_0x4d8e90[_0x5c0482(0xb8)]===0x0)return writeCliSideChannelLine(a89_0x3ac341[_0x5c0482(0xb1)](_0x5c0482(0xd6))),{'ok':!![]};const _0xc49542=buildCompareRows(_0x4d8e90,_0xbab73e);writeCliSideChannelLine(renderCompareTable(_0xc49542)),writeCliSideChannelLine('');const _0x2b7feb=_0x392f74['pages'],_0x4df730=await selectPages(_0x4d8e90,_0xbab73e,_0x2b7feb);writeCliSideChannelLine(''),writeCliSideChannelLine(a89_0x3ac341['cyan'](_0x5c0482(0xab)+_0x4df730[_0x5c0482(0xb8)]+'\x20page(s)'));const _0x168696=_0x392f74[_0x5c0482(0xcf)]&&_0x392f74[_0x5c0482(0xdf)];if(!_0x168696){writeCliSideChannelLine(renderSyncSummary(_0x4df730,_0xbab73e[_0x5c0482(0xb9)]>0x0));const _0x44775a=await askConfirm(_0x5c0482(0xc9));if(!_0x44775a)return writeCliSideChannelLine(a89_0x3ac341[_0x5c0482(0xad)](_0x5c0482(0xdd))),{'ok':!![]};}let _0x1dfc52=_0x392f74['jsUrl'],_0x4cbf66=_0x392f74[_0x5c0482(0xdf)];!_0x1dfc52&&(_0x1dfc52=await askJsUrl());!_0x4cbf66&&(_0x4cbf66=await askCssUrl());const _0x5f5b70=await askConfirm(_0x5c0482(0xe0)+_0x4df730['length']+_0x5c0482(0xd4)+_0x1dfc52+_0x5c0482(0xc1)+_0x4cbf66+'?');if(!_0x5f5b70)return writeCliSideChannelLine(a89_0x3ac341[_0x5c0482(0xad)](_0x5c0482(0xdd))),{'ok':!![]};const _0x271f0a=[_0x1dfc52,_0x4cbf66],_0x56956e=startSpinner(_0x5c0482(0xb4)+_0x4df730[_0x5c0482(0xb8)]+_0x5c0482(0xcc));try{const _0x4e8d61=await doCreateMenus(_0xab5d2f[_0x5c0482(0xc0)],_0xab5d2f[_0x5c0482(0xb5)],_0x4df730,_0x271f0a);return stopSpinner(_0x56956e,_0x5c0482(0xc2)+_0x4e8d61['created']+_0x5c0482(0xca),!![]),{'ok':!![],'data':_0x4e8d61,'message':'Menu\x20sync\x20completed:\x20'+_0x4e8d61['created']+_0x5c0482(0xb6)+_0x4e8d61[_0x5c0482(0xd0)]+_0x5c0482(0xbb)};}catch(_0x4602b5){stopSpinner(_0x56956e,_0x5c0482(0xc8),![]);throw CliErrors[_0x5c0482(0xb3)](_0x4602b5 instanceof Error?_0x4602b5['message']:_0x5c0482(0xc8));}}};function parseParams(_0x32263a){const _0x1f863a=a89_0x5b3b89;if(!_0x32263a)return{};try{const _0x5deeb7=JSON[_0x1f863a(0xba)](_0x32263a);if(typeof _0x5deeb7!==_0x1f863a(0xc6)||_0x5deeb7===null||Array[_0x1f863a(0xe3)](_0x5deeb7))return{};return{'jsUrl':typeof _0x5deeb7[_0x1f863a(0xcf)]===_0x1f863a(0xcb)?_0x5deeb7[_0x1f863a(0xcf)][_0x1f863a(0xbe)]():undefined,'cssUrl':typeof _0x5deeb7[_0x1f863a(0xdf)]===_0x1f863a(0xcb)?_0x5deeb7['cssUrl'][_0x1f863a(0xbe)]():undefined,'pages':Array[_0x1f863a(0xe3)](_0x5deeb7[_0x1f863a(0xc7)])?_0x5deeb7[_0x1f863a(0xc7)][_0x1f863a(0xbc)](String):undefined};}catch{return{};}}
|