@lovrabet/rabetbase-cli 2.2.2-beta.1 → 2.2.3-beta.1
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/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.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/list.js +1 -0
- 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/relation-audit.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/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a78_0x5dc901=a78_0x378e;(function(_0x1e3050,_0x1e6308){const _0x535d72=a78_0x378e,_0x4aa87a=_0x1e3050();while(!![]){try{const _0x4a8bbb=-parseInt(_0x535d72(0xbd))/0x1*(-parseInt(_0x535d72(0xb8))/0x2)+parseInt(_0x535d72(0xbe))/0x3+-parseInt(_0x535d72(0xc9))/0x4*(-parseInt(_0x535d72(0xc4))/0x5)+-parseInt(_0x535d72(0xba))/0x6*(parseInt(_0x535d72(0xca))/0x7)+-parseInt(_0x535d72(0xd6))/0x8*(-parseInt(_0x535d72(0xb5))/0x9)+parseInt(_0x535d72(0xc3))/0xa*(parseInt(_0x535d72(0xc0))/0xb)+-parseInt(_0x535d72(0xae))/0xc*(parseInt(_0x535d72(0xd0))/0xd);if(_0x4a8bbb===_0x1e6308)break;else _0x4aa87a['push'](_0x4aa87a['shift']());}catch(_0x125d94){_0x4aa87a['push'](_0x4aa87a['shift']());}}}(a78_0x4417,0x4c731));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';function a78_0x4417(){const _0x28117a=['bool','appCode','8yrwiwV','message','custom','project','production','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','420HRjLdG','cwd','str','valid','appcode','some','env','711783jOOZDE','join','Target\x20environment','58412jzuPjx','Auto-confirm\x20prompts','282rOYjVG','Write\x20to\x20global\x20config\x20instead\x20of\x20project','map','2wDwJJL','871368lipgEo','global','11jsfSjs','boolean','flagMissing','1239050nZxTPR','5955RdfUeT','run','nonInteractive','\x20\x20Env:\x20','yes','1832ImCgmo','29946wDsMqj','log','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','string','App\x20code\x20to\x20initialize\x20with','216593BfLsNl','validation','write','\x20\x20Default:\x20'];a78_0x4417=function(){return _0x28117a;};return a78_0x4417();}import{CliErrors}from'../../errors.js';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';function a78_0x378e(_0x4f4881,_0xa45e59){_0x4f4881=_0x4f4881-0xaa;const _0x44175b=a78_0x4417();let _0x378ef8=_0x44175b[_0x4f4881];return _0x378ef8;}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 syntheticApp(_0x155938){return{'appCode':_0x155938,'appName':_0x155938};}function writeInitConfig(_0x43665f,_0x3b7163,_0x5ba9a3){const _0x1b5db9=a78_0x378e,_0x420bf5=resolveWriteConfigPath(_0x43665f),_0x1d7122=buildCanonicalProjectConfig({},{'appCodes':_0x3b7163[_0x1b5db9(0xbc)](_0x1cd6ed=>_0x1cd6ed[_0x1b5db9(0xd5)]),'env':_0x5ba9a3,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x420bf5,_0x1d7122);const _0x3e1306=_0x43665f===_0x1b5db9(0xbf)?_0x1b5db9(0xbf):_0x1b5db9(0xab);console[_0x1b5db9(0xcb)]('\x0a✓\x20Successfully\x20initialized\x20'+_0x3e1306+'\x20config'),console['log']('\x20\x20Apps:\x20'+_0x3b7163['map'](_0xd2e5ed=>_0xd2e5ed['appCode'])[_0x1b5db9(0xb6)](',\x20')),console[_0x1b5db9(0xcb)](_0x1b5db9(0xd3)+_0x1d7122['defaultApp']),console['log'](_0x1b5db9(0xc7)+_0x1d7122[_0x1b5db9(0xb4)]),console[_0x1b5db9(0xcb)]('\x20\x20Config:\x20'+_0x420bf5);}async function runSmartInit(_0x3c1bb5){const _0x3cf5f8=a78_0x378e,_0x2ef6d2=process[_0x3cf5f8(0xaf)](),_0x396d23=_0x3c1bb5[_0x3cf5f8(0xd4)](_0x3cf5f8(0xbf))?_0x3cf5f8(0xbf):_0x3cf5f8(0xab),_0x43f587=_0x3c1bb5[_0x3cf5f8(0xb0)](_0x3cf5f8(0xb4))||_0x3cf5f8(0xac),_0x3075f8=_0x3c1bb5[_0x3cf5f8(0xb0)](_0x3cf5f8(0xb2))||undefined,_0x488f75=_0x3c1bb5[_0x3cf5f8(0xd4)](_0x3cf5f8(0xab));if(_0x488f75){const {initConfig:_0x630470}=await import('../../commands/project/init.js');return _0x630470({'appcode':_0x3075f8,'env':_0x43f587,'autoYes':_0x3c1bb5[_0x3cf5f8(0xd4)](_0x3cf5f8(0xc8))});}if(_0x396d23===_0x3cf5f8(0xab)){const _0x16f8d7=existsSync(resolve(_0x2ef6d2,NEW_CONFIG_NAME)),_0x57cf13=LEGACY_CONFIG_NAMES[_0x3cf5f8(0xb3)](_0x144197=>existsSync(resolve(_0x2ef6d2,_0x144197)));if(_0x57cf13&&!_0x16f8d7)return console['log']('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0x3c1bb5[_0x3cf5f8(0xc6)],{'yes':_0x3c1bb5[_0x3cf5f8(0xd4)](_0x3cf5f8(0xc8))});if(_0x16f8d7)throw CliErrors[_0x3cf5f8(0xd1)](_0x3cf5f8(0xad),'Use\x20`'+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x3075f8){const _0x3a321c=validateAppcode(_0x3075f8);if(!_0x3a321c[_0x3cf5f8(0xb1)])throw CliErrors[_0x3cf5f8(0xd1)](_0x3a321c[_0x3cf5f8(0xd7)]);writeInitConfig(_0x396d23,[syntheticApp(_0x3075f8)],_0x43f587);return;}if(_0x3c1bb5[_0x3cf5f8(0xc6)])throw CliErrors[_0x3cf5f8(0xc2)](_0x3cf5f8(0xb2),'Usage:\x20'+CLI_BIN_NAME+_0x3cf5f8(0xcd));const _0x2788f1=getCookie(),_0xe36eb5=await selectMultipleApps(_0x2788f1),_0x4ebb6b=_0xe36eb5===_0x3cf5f8(0xaa)?[syntheticApp(await promptCustomAppcode())]:_0xe36eb5;writeInitConfig(_0x396d23,_0x4ebb6b,_0x43f587);}const initFlags=[{'name':'global','type':a78_0x5dc901(0xc1),'description':a78_0x5dc901(0xbb),'default':![]},{'name':a78_0x5dc901(0xb4),'type':a78_0x5dc901(0xce),'description':a78_0x5dc901(0xb7),'default':a78_0x5dc901(0xac),'enum':[...RABETBASE_ENV_VALUES]},{'name':'appcode','type':a78_0x5dc901(0xce),'description':a78_0x5dc901(0xcf)},{'name':a78_0x5dc901(0xab),'type':a78_0x5dc901(0xc1),'description':'Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','default':![]},{'name':a78_0x5dc901(0xc8),'type':a78_0x5dc901(0xc1),'description':a78_0x5dc901(0xb9),'default':![]}];export const initDefinitions=[{'service':'init','command':a78_0x5dc901(0xc5),'description':a78_0x5dc901(0xcc),'risk':a78_0x5dc901(0xd2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x323e21){return await runSmartInit(_0x323e21),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5aef2e,_0x618738){const _0x436eab=a79_0xb778,_0x3fcc42=_0x5aef2e();while(!![]){try{const _0x5b957d=-parseInt(_0x436eab(0xc9))/0x1+parseInt(_0x436eab(0xc8))/0x2*(-parseInt(_0x436eab(0xcb))/0x3)+-parseInt(_0x436eab(0xc7))/0x4*(-parseInt(_0x436eab(0xca))/0x5)+-parseInt(_0x436eab(0xcc))/0x6+-parseInt(_0x436eab(0xcd))/0x7+parseInt(_0x436eab(0xc5))/0x8*(-parseInt(_0x436eab(0xc3))/0x9)+-parseInt(_0x436eab(0xc6))/0xa*(-parseInt(_0x436eab(0xc4))/0xb);if(_0x5b957d===_0x618738)break;else _0x3fcc42['push'](_0x3fcc42['shift']());}catch(_0x73d125){_0x3fcc42['push'](_0x3fcc42['shift']());}}}(a79_0x1e0e,0x56dc2));function a79_0x1e0e(){const _0x392b8e=['1969oHgGIU','91528yrkWwu','61920icRrAp','1180864XDWoMe','1098666VqBRxN','44977fafrJz','5Odkzpo','3zeXfJy','1631796oGnFLw','1110536WIRoWF','18qpZcno'];a79_0x1e0e=function(){return _0x392b8e;};return a79_0x1e0e();}function a79_0xb778(_0x24c8f5,_0x516863){_0x24c8f5=_0x24c8f5-0xc3;const _0x1e0e9f=a79_0x1e0e();let _0xb778d7=_0x1e0e9f[_0x24c8f5];return _0xb778d7;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a80_0x1d1cbc=a80_0xf23e;(function(_0x2776d4,_0x2ad468){const _0x3c6a08=a80_0xf23e,_0x2f6558=_0x2776d4();while(!![]){try{const _0x3f2e37=parseInt(_0x3c6a08(0x11e))/0x1+parseInt(_0x3c6a08(0x12f))/0x2*(parseInt(_0x3c6a08(0x11a))/0x3)+parseInt(_0x3c6a08(0x128))/0x4*(-parseInt(_0x3c6a08(0x131))/0x5)+-parseInt(_0x3c6a08(0x124))/0x6*(-parseInt(_0x3c6a08(0x12a))/0x7)+parseInt(_0x3c6a08(0x127))/0x8+parseInt(_0x3c6a08(0x12e))/0x9+-parseInt(_0x3c6a08(0x12c))/0xa;if(_0x3f2e37===_0x2ad468)break;else _0x2f6558['push'](_0x2f6558['shift']());}catch(_0x10d914){_0x2f6558['push'](_0x2f6558['shift']());}}}(a80_0x27d6,0x40d4f));import{CliError}from'../../errors.js';function a80_0xf23e(_0x2d272f,_0x526a23){_0x2d272f=_0x2d272f-0x113;const _0x27d627=a80_0x27d6();let _0xf23e9=_0x27d627[_0x2d272f];return _0xf23e9;}import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV='RABETBASE_DISABLE_ISSUE_NUDGE';function a80_0x27d6(){const _0x363754=['validation_error','4042224GKOzsZ','120180tziMgp','\x20issue\x20report\x20\x5c','7vWUAku','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','10774110BmCVKq','replace','3706389kORNHz','293534EqwxvY','join','5yGVfCW','report','\x20\x20\x20\x20--title\x20\x22','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','network_error','unknown_command','write','command','service','\x20bug?\x20Help\x20us\x20fix\x20it:','6fQoGdL','=1\x20to\x20silence\x20this\x20hint.','cancelled','auth_required','25287ZYdGmB','not_in_project','has','trim','flag_missing','\x22\x20\x5c','822522eQTWpO','message'];a80_0x27d6=function(){return _0x363754;};return a80_0x27d6();}const NUDGE_SUPPRESSED_CODES=new Set([a80_0x1d1cbc(0x11c),a80_0x1d1cbc(0x11d),'config_missing',a80_0x1d1cbc(0x11f),a80_0x1d1cbc(0x115),a80_0x1d1cbc(0x122),a80_0x1d1cbc(0x126),a80_0x1d1cbc(0x114)]),defaultWriter=_0x16310d=>{const _0x1d4012=a80_0x1d1cbc;process['stderr'][_0x1d4012(0x116)](_0x16310d);};export function shouldNudgeForError(_0x491818,_0x2bbdd0){const _0x51f8ea=a80_0x1d1cbc;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x2bbdd0[_0x51f8ea(0x118)]==='issue'&&_0x2bbdd0[_0x51f8ea(0x117)]===_0x51f8ea(0x132))return![];if(_0x491818 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x51f8ea(0x120)](_0x491818['code']);return!![];}export function printIssueReportNudgeForError(_0x19c191,_0x4f510b,_0x581712=defaultWriter){if(!shouldNudgeForError(_0x19c191,_0x4f510b))return;const _0x5c5b9f=buildSuggestedTitle(_0x19c191,_0x4f510b);_0x581712(formatNudge(_0x5c5b9f));}function buildSuggestedTitle(_0x45dc2a,_0x275d8c){const _0x4c7ec2=a80_0x1d1cbc,_0x2b0634=_0x45dc2a instanceof Error?_0x45dc2a[_0x4c7ec2(0x125)]:String(_0x45dc2a),_0x4906ea=_0x2b0634[_0x4c7ec2(0x12d)](/[\r\n]+/g,'\x20')[_0x4c7ec2(0x12d)](/\s+/g,'\x20')[_0x4c7ec2(0x121)]()['slice'](0x0,0x78)[_0x4c7ec2(0x12d)](/"/g,'\x5c\x22'),_0x52279f=CLI_BIN_NAME+'\x20'+_0x275d8c[_0x4c7ec2(0x118)]+'\x20'+_0x275d8c['command'];return _0x4906ea['length']>0x0?_0x52279f+':\x20'+_0x4906ea:_0x52279f;}function formatNudge(_0x9166ef){const _0x4cbaac=a80_0x1d1cbc;return['','Hit\x20a\x20'+CLI_BIN_NAME+_0x4cbaac(0x119),'\x20\x20'+CLI_BIN_NAME+_0x4cbaac(0x129),_0x4cbaac(0x133)+_0x9166ef+_0x4cbaac(0x123),_0x4cbaac(0x12b),_0x4cbaac(0x113),'\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+_0x4cbaac(0x11b),''][_0x4cbaac(0x130)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x102740=a81_0x5842;(function(_0x2f57e3,_0x36a9ad){const _0x349ec0=a81_0x5842,_0x26a2b1=_0x2f57e3();while(!![]){try{const _0x2f49fa=parseInt(_0x349ec0(0x165))/0x1+parseInt(_0x349ec0(0x168))/0x2*(-parseInt(_0x349ec0(0x18a))/0x3)+parseInt(_0x349ec0(0x178))/0x4+-parseInt(_0x349ec0(0x19d))/0x5+parseInt(_0x349ec0(0x186))/0x6*(parseInt(_0x349ec0(0x174))/0x7)+parseInt(_0x349ec0(0x190))/0x8+-parseInt(_0x349ec0(0x198))/0x9;if(_0x2f49fa===_0x36a9ad)break;else _0x26a2b1['push'](_0x26a2b1['shift']());}catch(_0x28c729){_0x26a2b1['push'](_0x26a2b1['shift']());}}}(a81_0x265e,0xbe1d1));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';function a81_0x265e(){const _0x170efd=['description','2459220paDERp','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','One-line\x20issue\x20summary','flagMissing','descriptionFilePath','utf8','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','issue.description','filter','issue.description_redaction_kinds','cwd','str','descriptionSource','34764lQPvcR','truncated:\x20original\x20','File\x20not\x20found:\x20','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','319623qewUyq','push','string','issue.description_truncated','length','issue.title','5951456oOcMMi','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','\x20bytes','trim','originalBytes','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','truncated','truncated\x20from\x20','6136992Yhlehb','apiError','descriptionFile:\x20','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','title','1766800rYOgTA','\x20secret(s):\x20','sanitize','redactions:\x20','190255xLXJYA','redacted\x20','redactionKinds','22rApKgI','redactionCount','join','otel://','Issue\x20description\x20file\x20is\x20empty:\x20','Platform\x20issue\x20reported','issue.description_original_bytes','Failed\x20to\x20report\x20platform\x20issue:\x20','compress','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','Issue\x20description\x20cannot\x20be\x20empty.','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','1736sbjkCd','validation','issue.description_redactions'];a81_0x265e=function(){return _0x170efd;};return a81_0x265e();}import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';function a81_0x5842(_0x323840,_0x2bbb06){_0x323840=_0x323840-0x165;const _0x265e7c=a81_0x265e();let _0x58424f=_0x265e7c[_0x323840];return _0x58424f;}const DESCRIPTION_FILE_FLAG='description-file';export const issueReport={'service':'issue','command':'report','description':a81_0x102740(0x17a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':a81_0x102740(0x170),'flags':[{'name':a81_0x102740(0x19c),'type':'string','required':!![],'description':a81_0x102740(0x17b)},{'name':a81_0x102740(0x177),'type':'string','description':'Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)'},{'name':DESCRIPTION_FILE_FLAG,'type':a81_0x102740(0x18c),'description':a81_0x102740(0x173)}],async 'validate'(_0x394b9b){const _0x47e65e=a81_0x102740,_0x1229ee=_0x394b9b[_0x47e65e(0x184)](_0x47e65e(0x19c))['trim'](),_0xc2f329=_0x394b9b[_0x47e65e(0x184)](_0x47e65e(0x177))[_0x47e65e(0x193)](),_0x118c2e=_0x394b9b['str'](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x1229ee)throw CliErrors[_0x47e65e(0x17c)](_0x47e65e(0x19c),_0x47e65e(0x179));const _0x4cc325=_0xc2f329['length']>0x0,_0xd769f=_0x118c2e[_0x47e65e(0x18e)]>0x0;if(_0x4cc325===_0xd769f)throw CliErrors[_0x47e65e(0x175)](_0x47e65e(0x17f),_0x47e65e(0x19b));if(_0xd769f){const _0x86d657=resolve(process[_0x47e65e(0x183)](),_0x118c2e);if(!existsSync(_0x86d657))throw CliErrors[_0x47e65e(0x175)](_0x47e65e(0x188)+_0x86d657);}},async 'dryRun'(_0xd41a6f){const _0x5481c7=a81_0x102740,_0x135e5f=await prepareIssueReport(_0xd41a6f);return{'method':'POST','url':_0x5481c7(0x16b)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x135e5f['title'],'issue.description':_0x135e5f['description'],'issue.description_original_bytes':_0x135e5f[_0x5481c7(0x19f)][_0x5481c7(0x194)],'issue.description_truncated':_0x135e5f[_0x5481c7(0x19f)][_0x5481c7(0x196)],'issue.description_redactions':_0x135e5f[_0x5481c7(0x19f)][_0x5481c7(0x169)],'issue.description_redaction_kinds':_0x135e5f[_0x5481c7(0x19f)]['redactionKinds'][_0x5481c7(0x16a)](',')}},'description':[_0x5481c7(0x189),'descriptionSource:\x20'+_0x135e5f[_0x5481c7(0x185)],_0x135e5f[_0x5481c7(0x17d)]?_0x5481c7(0x19a)+_0x135e5f[_0x5481c7(0x17d)]:null,_0x135e5f[_0x5481c7(0x19f)][_0x5481c7(0x196)]?_0x5481c7(0x187)+_0x135e5f[_0x5481c7(0x19f)]['originalBytes']+'\x20bytes':null,_0x135e5f[_0x5481c7(0x19f)]['redactionCount']>0x0?_0x5481c7(0x1a0)+_0x135e5f[_0x5481c7(0x19f)][_0x5481c7(0x169)]+'\x20('+_0x135e5f[_0x5481c7(0x19f)]['redactionKinds'][_0x5481c7(0x16a)](',\x20')+')':null][_0x5481c7(0x181)](Boolean)[_0x5481c7(0x16a)]('\x0a')};},async 'execute'(_0x59580c){const _0x100802=a81_0x102740,_0x586cdd=await prepareIssueReport(_0x59580c);try{await sendPlatformIssueCollectLog({'title':_0x586cdd[_0x100802(0x19c)],'description':_0x586cdd[_0x100802(0x177)],'sanitize':{'originalBytes':_0x586cdd[_0x100802(0x19f)][_0x100802(0x194)],'truncated':_0x586cdd[_0x100802(0x19f)][_0x100802(0x196)],'redactionCount':_0x586cdd[_0x100802(0x19f)][_0x100802(0x169)],'redactionKinds':_0x586cdd['sanitize'][_0x100802(0x167)]}});}catch(_0x56fae4){throw CliErrors[_0x100802(0x199)](_0x100802(0x16f)+(_0x56fae4 instanceof Error?_0x56fae4['message']:String(_0x56fae4)),_0x100802(0x191));}return{'ok':!![],'message':buildResultMessage(_0x586cdd[_0x100802(0x19f)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x100802(0x18f),_0x100802(0x180),_0x100802(0x16e),_0x100802(0x18d),_0x100802(0x176),_0x100802(0x182)],'issue':{'title':_0x586cdd[_0x100802(0x19c)],'descriptionLength':_0x586cdd['description'][_0x100802(0x18e)],'descriptionSource':_0x586cdd[_0x100802(0x185)],..._0x586cdd[_0x100802(0x17d)]?{'descriptionFile':_0x586cdd[_0x100802(0x17d)]}:{},'sanitize':{'originalBytes':_0x586cdd[_0x100802(0x19f)][_0x100802(0x194)],'truncated':_0x586cdd[_0x100802(0x19f)]['truncated'],'redactions':_0x586cdd[_0x100802(0x19f)]['redactionCount'],'redactionKinds':_0x586cdd[_0x100802(0x19f)][_0x100802(0x167)]}}}};}};function buildResultMessage(_0x34110d){const _0x3ca6f7=a81_0x102740,_0x278ece=[];return _0x34110d['truncated']&&_0x278ece['push'](_0x3ca6f7(0x197)+_0x34110d['originalBytes']+_0x3ca6f7(0x192)),_0x34110d['redactionCount']>0x0&&_0x278ece[_0x3ca6f7(0x18b)](_0x3ca6f7(0x166)+_0x34110d['redactionCount']+_0x3ca6f7(0x19e)+_0x34110d['redactionKinds'][_0x3ca6f7(0x16a)](',\x20')),_0x278ece[_0x3ca6f7(0x18e)]===0x0?_0x3ca6f7(0x16d):'Platform\x20issue\x20reported\x20('+_0x278ece[_0x3ca6f7(0x16a)](';\x20')+')';}async function prepareIssueReport(_0x1966b2){const _0x188c5e=a81_0x102740,_0x25e854=_0x1966b2['str'](_0x188c5e(0x19c))[_0x188c5e(0x193)](),_0x4f4fd7=_0x1966b2[_0x188c5e(0x184)](_0x188c5e(0x177)),_0x5e42e7=_0x1966b2['str'](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x5e42e7){const _0x227d13=_0x4f4fd7;if(!_0x227d13[_0x188c5e(0x193)]())throw CliErrors[_0x188c5e(0x175)](_0x188c5e(0x172),_0x188c5e(0x195));const _0x5b1372=sanitizeIssueDescription(_0x227d13);return{'title':_0x25e854,'description':_0x5b1372[_0x188c5e(0x177)],'descriptionSource':'inline','sanitize':_0x5b1372};}const _0x34697e=resolve(process['cwd'](),_0x5e42e7),_0x18d99b=await readFile(_0x34697e,_0x188c5e(0x17e));if(!_0x18d99b[_0x188c5e(0x193)]())throw CliErrors[_0x188c5e(0x175)](_0x188c5e(0x16c)+_0x34697e,_0x188c5e(0x171));const _0x367891=sanitizeIssueDescription(_0x18d99b);return{'title':_0x25e854,'description':_0x367891[_0x188c5e(0x177)],'descriptionSource':'file','descriptionFilePath':_0x34697e,'sanitize':_0x367891};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a82_0x2680(_0x2cd47c,_0x4ca5ff){_0x2cd47c=_0x2cd47c-0x1d9;const _0x1fa1b=a82_0x1fa1();let _0x2680bb=_0x1fa1b[_0x2cd47c];return _0x2680bb;}const a82_0x4bee1b=a82_0x2680;(function(_0x3e0ad0,_0xe20188){const _0x19e83d=a82_0x2680,_0xfe78c1=_0x3e0ad0();while(!![]){try{const _0x5cc1a1=parseInt(_0x19e83d(0x1d9))/0x1+-parseInt(_0x19e83d(0x1de))/0x2*(parseInt(_0x19e83d(0x1e6))/0x3)+parseInt(_0x19e83d(0x1e1))/0x4+parseInt(_0x19e83d(0x1f1))/0x5*(parseInt(_0x19e83d(0x1e4))/0x6)+parseInt(_0x19e83d(0x1dc))/0x7+-parseInt(_0x19e83d(0x1db))/0x8*(-parseInt(_0x19e83d(0x1e5))/0x9)+-parseInt(_0x19e83d(0x1e7))/0xa;if(_0x5cc1a1===_0xe20188)break;else _0xfe78c1['push'](_0xfe78c1['shift']());}catch(_0xfaa48e){_0xfe78c1['push'](_0xfe78c1['shift']());}}}(a82_0x1fa1,0xb592a));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a82_0x4bee1b(0x1da),REDACTION_RULES=[{'kind':a82_0x4bee1b(0x1dd),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a82_0x4bee1b(0x1e0)},{'kind':'authorization','pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a82_0x4bee1b(0x1f2)},{'kind':'private-key','pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a82_0x4bee1b(0x1ed)},{'kind':'access-key','pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a82_0x4bee1b(0x1e9)},{'kind':a82_0x4bee1b(0x1ea),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a82_0x4bee1b(0x1e2)},{'kind':a82_0x4bee1b(0x1ee),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a82_0x4bee1b(0x1df)}];function a82_0x1fa1(){const _0x2df6c4=['1340196DkhGhg','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','12232vLCvln','8669808EUvmEc','cookie','2ELICRd','REDACTED:bearer-jwt','REDACTED:cookie','378332EshlDw','REDACTED:password','byteLength','8195412tcDxIa','4527srxvyU','1707747FJTJsl','34953410hcpBtV','push','REDACTED:access-key','password','toString','pattern','REDACTED:private-key','bearer-jwt','max','utf8','5QPmPjU','REDACTED:authorization'];a82_0x1fa1=function(){return _0x2df6c4;};return a82_0x1fa1();}export function sanitizeIssueDescription(_0x497f86){const _0x28db36=a82_0x4bee1b,_0x54c13d=Buffer[_0x28db36(0x1e3)](_0x497f86,'utf8'),_0x53d8ff=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x5e0241=_0x497f86,_0x39c199=0x0;const _0x4c37cd=[];if(!_0x53d8ff)for(const _0x23a5ae of REDACTION_RULES){let _0x1513fc=0x0;_0x5e0241=_0x5e0241['replace'](_0x23a5ae[_0x28db36(0x1ec)],(_0x4285f1,_0x589695)=>{_0x1513fc+=0x1;const _0x35d472=typeof _0x589695==='string'?_0x589695:'';return _0x35d472+'['+_0x23a5ae['label']+']';}),_0x1513fc>0x0&&(_0x39c199+=_0x1513fc,!_0x4c37cd['includes'](_0x23a5ae['kind'])&&_0x4c37cd[_0x28db36(0x1e8)](_0x23a5ae['kind']));}let _0x5bb354=![];if(Buffer[_0x28db36(0x1e3)](_0x5e0241,_0x28db36(0x1f0))>ISSUE_DESCRIPTION_MAX_BYTES){_0x5bb354=!![];const _0x5e727d=Buffer[_0x28db36(0x1e3)](TRUNCATION_NOTICE,_0x28db36(0x1f0)),_0x374d3c=Math[_0x28db36(0x1ef)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x5e727d);_0x5e0241=sliceUtf8Bytes(_0x5e0241,_0x374d3c)+TRUNCATION_NOTICE;}return{'description':_0x5e0241,'originalBytes':_0x54c13d,'truncated':_0x5bb354,'redactionCount':_0x39c199,'redactionKinds':_0x4c37cd};}function sliceUtf8Bytes(_0x59091f,_0x3f186a){const _0x4335d8=a82_0x4bee1b;if(_0x3f186a<=0x0)return'';const _0x57f411=Buffer['from'](_0x59091f,_0x4335d8(0x1f0));if(_0x57f411[_0x4335d8(0x1e3)]<=_0x3f186a)return _0x59091f;let _0x44c2ab=_0x3f186a;while(_0x44c2ab>0x0){const _0x55236c=_0x57f411[_0x44c2ab];if(_0x55236c===undefined||(_0x55236c&0xc0)!==0x80)break;_0x44c2ab-=0x1;}return _0x57f411['subarray'](0x0,_0x44c2ab)[_0x4335d8(0x1eb)]('utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a83_0x4b488e=a83_0x470f;function a83_0x2c36(){const _0x4438d9=['2067COTzxs','1019144uHOPrU','View\x20command\x20history\x20logs','en-US','*\x20No\x20logs\x20found','1101017DyBZAr','duration','level','timestamp','read','forEach','3662NtDvlB','stringify','4143796krGGRR','warn','clear','command','error','log','details','23586783ZzcGri','message','toLocaleString','\x20\x20\x20Details:\x20','length','logs','*\x20Logs\x20cleared','728230EsDCzK','show','keys','9HPpamR','readLogs','10345860JNAraJ','30LRherj','success','20UzySEG'];a83_0x2c36=function(){return _0x4438d9;};return a83_0x2c36();}(function(_0x1ee08c,_0x4a6167){const _0x1cdf45=a83_0x470f,_0x388551=_0x1ee08c();while(!![]){try{const _0x49c242=parseInt(_0x1cdf45(0xfd))/0x1+parseInt(_0x1cdf45(0x103))/0x2*(-parseInt(_0x1cdf45(0xf8))/0x3)+-parseInt(_0x1cdf45(0x105))/0x4+-parseInt(_0x1cdf45(0x113))/0x5*(parseInt(_0x1cdf45(0xf5))/0x6)+-parseInt(_0x1cdf45(0xf4))/0x7+-parseInt(_0x1cdf45(0xf9))/0x8*(parseInt(_0x1cdf45(0xf2))/0x9)+-parseInt(_0x1cdf45(0xf7))/0xa*(-parseInt(_0x1cdf45(0x10c))/0xb);if(_0x49c242===_0x4a6167)break;else _0x388551['push'](_0x388551['shift']());}catch(_0x19d428){_0x388551['push'](_0x388551['shift']());}}}(a83_0x2c36,0xb928c));import{logger}from'../../utils/logger.js';function printLogs(_0x446515){const _0x4f9dae=a83_0x470f;if(_0x446515[_0x4f9dae(0x110)]===0x0){console[_0x4f9dae(0x10a)](_0x4f9dae(0xfc));return;}console[_0x4f9dae(0x10a)]('*\x20Lovrabet\x20CLI\x20logs:\x0a'),_0x446515[_0x4f9dae(0x102)]((_0x59b1b7,_0x570d69)=>{const _0x1ca06c=_0x4f9dae,_0x8c55fd=new Date(_0x59b1b7[_0x1ca06c(0x100)])[_0x1ca06c(0x10e)](_0x1ca06c(0xfb)),_0x466d3d=_0x59b1b7[_0x1ca06c(0xff)]===_0x1ca06c(0xf6)?'√':_0x59b1b7[_0x1ca06c(0xff)]===_0x1ca06c(0x109)?'×':_0x59b1b7['level']===_0x1ca06c(0x106)?'!':'i';console[_0x1ca06c(0x10a)](_0x570d69+0x1+'.\x20'+_0x466d3d+'\x20['+_0x59b1b7[_0x1ca06c(0x108)]+']\x20'+_0x59b1b7[_0x1ca06c(0x10d)]),console[_0x1ca06c(0x10a)]('\x20\x20\x20Time:\x20'+_0x8c55fd),_0x59b1b7[_0x1ca06c(0xfe)]&&console[_0x1ca06c(0x10a)]('\x20\x20\x20Duration:\x20'+_0x59b1b7[_0x1ca06c(0xfe)]+'ms'),_0x59b1b7[_0x1ca06c(0x10b)]&&Object[_0x1ca06c(0xf1)](_0x59b1b7[_0x1ca06c(0x10b)])['length']>0x0&&console[_0x1ca06c(0x10a)](_0x1ca06c(0x10f)+JSON[_0x1ca06c(0x104)](_0x59b1b7[_0x1ca06c(0x10b)],null,0x2)),console[_0x1ca06c(0x10a)]('');});}function a83_0x470f(_0x360eeb,_0xeefdac){_0x360eeb=_0x360eeb-0xf0;const _0x2c368d=a83_0x2c36();let _0x470fec=_0x2c368d[_0x360eeb];return _0x470fec;}export const logsDefinitions=[{'service':a83_0x4b488e(0x111),'command':a83_0x4b488e(0xf0),'description':a83_0x4b488e(0xfa),'risk':a83_0x4b488e(0x101),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1eb989){const _0x63b73f=a83_0x4b488e;return printLogs(logger[_0x63b73f(0xf3)]()),{'ok':!![]};}},{'service':'logs','command':a83_0x4b488e(0x107),'description':'Clear\x20command\x20history\x20logs','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x59e7dd){const _0x3af3bd=a83_0x4b488e;return logger['clearLogs'](),console[_0x3af3bd(0x10a)](_0x3af3bd(0x112)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5311aa,_0x452180){const _0x423551=a84_0x43a1,_0x2ece75=_0x5311aa();while(!![]){try{const _0x31a41e=-parseInt(_0x423551(0xb3))/0x1*(-parseInt(_0x423551(0xbc))/0x2)+parseInt(_0x423551(0xb9))/0x3+parseInt(_0x423551(0xb1))/0x4*(parseInt(_0x423551(0xb8))/0x5)+parseInt(_0x423551(0xb6))/0x6*(parseInt(_0x423551(0xb4))/0x7)+-parseInt(_0x423551(0xbb))/0x8*(-parseInt(_0x423551(0xb5))/0x9)+-parseInt(_0x423551(0xb2))/0xa*(parseInt(_0x423551(0xb7))/0xb)+-parseInt(_0x423551(0xba))/0xc;if(_0x31a41e===_0x452180)break;else _0x2ece75['push'](_0x2ece75['shift']());}catch(_0x10087a){_0x2ece75['push'](_0x2ece75['shift']());}}}(a84_0x105d,0x70493));import{menuList}from'../../commands/menu/list.js';function a84_0x43a1(_0x1dc0c3,_0x205090){_0x1dc0c3=_0x1dc0c3-0xb1;const _0x105d16=a84_0x105d();let _0x43a1b2=_0x105d16[_0x1dc0c3];return _0x43a1b2;}import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuList,menuSync,menuUpdate];function a84_0x105d(){const _0x574d48=['21410652pteCbA','8cRIHoa','28OjiqEf','16gsjaek','608710HdytAn','52021BevVwq','23709DjYebB','1899603JrPiPY','1524EjYpDi','11DpAcBk','80195xbbxOT','1323600JIDOOE'];a84_0x105d=function(){return _0x574d48;};return a84_0x105d();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a85_0x5d41(){const _0x10dfe1=['sort','/smartapi/menu/find?appCode=','visible','No\x20menus\x20found.','children','4471036xiQSgA','\x20menu(s)','resources','boolean','type','parentId','25921MqIxwF','550565DMJiwB','depth','menu','244741scHWER','486pHCvgo','length','300546dAwnEs','1396683brAAdy','index','10aqlfGq','72tbJbFg','string','verbose','extend','list','25524110cBvaTD','isArray','parse','bool','Fetch\x20menu\x20list','item','isFinite','number','push'];a85_0x5d41=function(){return _0x10dfe1;};return a85_0x5d41();}const a85_0x569dd5=a85_0x564c;(function(_0x56a086,_0x53d575){const _0x51dd02=a85_0x564c,_0x3a304d=_0x56a086();while(!![]){try{const _0x5a54c3=parseInt(_0x51dd02(0x87))/0x1*(-parseInt(_0x51dd02(0x8d))/0x2)+parseInt(_0x51dd02(0x8a))/0x3+parseInt(_0x51dd02(0x7d))/0x4+-parseInt(_0x51dd02(0x84))/0x5+parseInt(_0x51dd02(0x88))/0x6*(-parseInt(_0x51dd02(0x83))/0x7)+-parseInt(_0x51dd02(0x8e))/0x8*(parseInt(_0x51dd02(0x8b))/0x9)+parseInt(_0x51dd02(0x93))/0xa;if(_0x5a54c3===_0x53d575)break;else _0x3a304d['push'](_0x3a304d['shift']());}catch(_0x2d8a09){_0x3a304d['push'](_0x3a304d['shift']());}}}(a85_0x5d41,0xb4a44));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getApiDomain}from'../../constant/domain.js';import{platformFetch}from'../../core/api-client.js';export const menuList={'service':a85_0x569dd5(0x86),'command':a85_0x569dd5(0x92),'description':'List\x20online\x20menu\x20facts\x20for\x20the\x20current\x20app','risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a85_0x569dd5(0x90),'type':'boolean','description':'Return\x20extend\x20field\x20for\x20troubleshooting\x20resource\x20parsing'}],async 'execute'(_0x5d5755){const _0x4fc265=a85_0x569dd5,_0x1db738=_0x5d5755[_0x4fc265(0x72)]('verbose'),_0x5b3e75=await platformFetch(getApiDomain()+_0x4fc265(0x79)+_0x5d5755['appCode'],{'cookie':_0x5d5755['cookie'],'label':_0x4fc265(0x73)}),_0x1b3884=flattenMenuItems(Array[_0x4fc265(0x70)](_0x5b3e75)?_0x5b3e75:[],{'verbose':_0x1db738,'parentId':null,'depth':0x0});return{'ok':!![],'data':{'total':_0x1b3884[_0x4fc265(0x89)],'menus':_0x1b3884},'message':_0x1b3884[_0x4fc265(0x89)]===0x0?_0x4fc265(0x7b):'Found\x20'+_0x1b3884[_0x4fc265(0x89)]+_0x4fc265(0x7e)};}};function flattenMenuItems(_0x16a9f3,_0x23cdc4){const _0x3a564c=a85_0x569dd5,_0x2e6528=sortMenuItems(_0x16a9f3),_0x1e1445=[];for(const _0x713adf of _0x2e6528){_0x1e1445[_0x3a564c(0x77)](toMenuListItem(_0x713adf,_0x23cdc4)),Array['isArray'](_0x713adf[_0x3a564c(0x7c)])&&_0x713adf[_0x3a564c(0x7c)]['length']>0x0&&_0x1e1445[_0x3a564c(0x77)](...flattenMenuItems(_0x713adf[_0x3a564c(0x7c)],{'verbose':_0x23cdc4[_0x3a564c(0x90)],'parentId':_0x713adf['id'],'depth':_0x23cdc4[_0x3a564c(0x85)]+0x1}));}return _0x1e1445;}function sortMenuItems(_0x416205){const _0x1300c6=a85_0x569dd5;return _0x416205['map']((_0x34cab7,_0x1ce237)=>({'item':_0x34cab7,'index':_0x1ce237}))[_0x1300c6(0x78)]((_0xcd1d98,_0x221a33)=>{const _0x2dd043=_0x1300c6,_0x7d3cc3=normalizeSort(_0xcd1d98[_0x2dd043(0x74)]['sort']),_0x30f810=normalizeSort(_0x221a33[_0x2dd043(0x74)][_0x2dd043(0x78)]);if(_0x7d3cc3!==_0x30f810)return _0x7d3cc3-_0x30f810;return _0xcd1d98[_0x2dd043(0x8c)]-_0x221a33[_0x2dd043(0x8c)];})['map'](({item:_0x53e2f1})=>_0x53e2f1);}function toMenuListItem(_0x36b049,_0x209232){const _0x78c4c5=a85_0x569dd5,_0x4cfcb8={'id':_0x36b049['id'],'parentId':_0x209232[_0x78c4c5(0x82)],'depth':_0x209232[_0x78c4c5(0x85)],'label':normalizeString(_0x36b049['label']),'path':normalizeString(_0x36b049['path']),'type':normalizeString(_0x36b049[_0x78c4c5(0x81)]),'visible':typeof _0x36b049[_0x78c4c5(0x7a)]===_0x78c4c5(0x80)?_0x36b049[_0x78c4c5(0x7a)]:null,'sort':typeof _0x36b049['sort']===_0x78c4c5(0x76)&&Number['isFinite'](_0x36b049['sort'])?_0x36b049[_0x78c4c5(0x78)]:null,'resources':normalizeResources(_0x36b049[_0x78c4c5(0x91)]?.[_0x78c4c5(0x7f)])};return _0x209232['verbose']&&(_0x4cfcb8['extend']=_0x36b049['extend']??null),_0x4cfcb8;}function normalizeSort(_0x53cd7e){const _0x50fd9a=a85_0x569dd5;return typeof _0x53cd7e==='number'&&Number[_0x50fd9a(0x75)](_0x53cd7e)?_0x53cd7e:Number['POSITIVE_INFINITY'];}function normalizeString(_0x3e5964){return typeof _0x3e5964==='string'?_0x3e5964:'';}function a85_0x564c(_0x35a5a0,_0x2a0107){_0x35a5a0=_0x35a5a0-0x70;const _0x5d416c=a85_0x5d41();let _0x564c27=_0x5d416c[_0x35a5a0];return _0x564c27;}function normalizeResources(_0x10246b){const _0xb7c88a=a85_0x569dd5;if(Array[_0xb7c88a(0x70)](_0x10246b))return _0x10246b['map'](String);if(typeof _0x10246b!==_0xb7c88a(0x8f))return[];try{const _0x567bbe=JSON[_0xb7c88a(0x71)](_0x10246b);return Array[_0xb7c88a(0x70)](_0x567bbe)?_0x567bbe['map'](String):[];}catch{return[];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57996b,_0x27a814){const _0x5e1219=a86_0x4f6d,_0x3a7685=_0x57996b();while(!![]){try{const _0x5e7c83=parseInt(_0x5e1219(0x1fa))/0x1+-parseInt(_0x5e1219(0x1fe))/0x2+-parseInt(_0x5e1219(0x206))/0x3*(-parseInt(_0x5e1219(0x204))/0x4)+-parseInt(_0x5e1219(0x1f9))/0x5*(-parseInt(_0x5e1219(0x1f8))/0x6)+-parseInt(_0x5e1219(0x201))/0x7+-parseInt(_0x5e1219(0x208))/0x8*(parseInt(_0x5e1219(0x20a))/0x9)+parseInt(_0x5e1219(0x1fb))/0xa;if(_0x5e7c83===_0x27a814)break;else _0x3a7685['push'](_0x3a7685['shift']());}catch(_0x230b5d){_0x3a7685['push'](_0x3a7685['shift']());}}}(a86_0x4a30,0x9dcd5));function a86_0x4f6d(_0x5337bd,_0x4e7278){_0x5337bd=_0x5337bd-0x1ed;const _0x4a30e5=a86_0x4a30();let _0x4f6d4c=_0x4a30e5[_0x5337bd];return _0x4f6d4c;}function strWidth(_0x145b1b){const _0x1cb1b4=a86_0x4f6d;let _0x500a89=0x0;for(const _0x20a401 of _0x145b1b){_0x500a89+=/[\u4e00-\u9fa5]/[_0x1cb1b4(0x205)](_0x20a401)?0x2:0x1;}return _0x500a89;}function a86_0x4a30(){const _0x4a9443=['1461200VMyZvg','\x20\x20Affected\x20menus:\x20','local','204564JWVfrD','online','Platform','5652745xaabpD','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','Local','4ehdnsc','test','1681917wUOhkb','join','2105864RSKIEM','Menu\x20Name','18VYXDjo','\x20\x20\x20\x20JS:\x20\x20','\x20\x20\x20\x20CSS:\x20','max','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','path','push','showOnline','\x20\x20\x20\x20•\x20','label','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','length','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','repeat','(unchanged)','6BbRrpD','2209815vFcpSr','933918oCBjrX'];a86_0x4a30=function(){return _0x4a9443;};return a86_0x4a30();}function padRight(_0x18a232,_0x22ccf6){const _0x26b8ec=a86_0x4f6d,_0x10386b=strWidth(_0x18a232);return _0x18a232+'\x20'[_0x26b8ec(0x1f6)](Math[_0x26b8ec(0x20d)](0x0,_0x22ccf6-_0x10386b));}export function renderCompareTable(_0x214091,_0x50cccf={}){const _0x350223=a86_0x4f6d;if(_0x214091[_0x350223(0x1f4)]===0x0)return'';const _0x3063da=_0x50cccf[_0x350223(0x1f0)]??!![],_0x2db0dd=Math[_0x350223(0x20d)](0x1e,..._0x214091['map'](_0x36a0d7=>strWidth(_0x36a0d7[_0x350223(0x1f2)]))),_0x4f0bae=0x4,_0x2477c0=[],_0x1acb8a='\x20\x20'+padRight(_0x350223(0x209),_0x2db0dd),_0xd01677=padRight(_0x350223(0x203),_0x4f0bae),_0x40a1ab=_0x3063da?'\x20\x20'+padRight(_0x350223(0x200),_0x4f0bae):'';_0x2477c0[_0x350223(0x1ef)](_0x1acb8a+'\x20\x20'+_0xd01677+(_0x3063da?_0x40a1ab:'')),_0x2477c0[_0x350223(0x1ef)]('\x20\x20'+'─'[_0x350223(0x1f6)](_0x2db0dd)+'\x20\x20'+'─'[_0x350223(0x1f6)](_0x4f0bae)+(_0x3063da?'\x20\x20'+'─'[_0x350223(0x1f6)](_0x4f0bae):''));for(const _0x291e8b of _0x214091){const _0xe687ab=padRight(_0x291e8b[_0x350223(0x1f2)],_0x2db0dd),_0x354294=_0x291e8b[_0x350223(0x1fd)]?'✓':'✗',_0x1b7750=padRight(_0x354294,_0x4f0bae);let _0x3b787d='\x20\x20'+_0xe687ab+'\x20\x20'+_0x1b7750;if(_0x3063da){const _0x3c2d36=_0x291e8b[_0x350223(0x1ff)]?'✓':'✗';_0x3b787d+='\x20\x20'+padRight(_0x3c2d36,_0x4f0bae);}_0x2477c0['push'](_0x3b787d);}return _0x2477c0[_0x350223(0x207)]('\x0a');}export function renderSyncSummary(_0x3572d1,_0x59f71f){const _0x43f992=a86_0x4f6d;if(_0x3572d1[_0x43f992(0x1f4)]===0x0)return _0x59f71f?_0x43f992(0x1ed):'\x20\x20No\x20pages\x20to\x20sync.';const _0x2c4425=['\x20\x20'+_0x3572d1['length']+_0x43f992(0x1f5)];for(const _0x1b4760 of _0x3572d1){_0x2c4425[_0x43f992(0x1ef)](_0x43f992(0x1f1)+_0x1b4760[_0x43f992(0x1f2)]+'\x20('+_0x1b4760[_0x43f992(0x1ee)]+')');}return _0x2c4425[_0x43f992(0x207)]('\x0a');}export function renderUpdateSummary(_0x4b2b4a,_0x46c45){const _0x189db5=a86_0x4f6d;if(_0x4b2b4a['length']===0x0)return _0x189db5(0x1f3);const _0x5dc169=['\x20\x20'+_0x4b2b4a['length']+_0x189db5(0x202),_0x189db5(0x20b)+(_0x46c45[0x0]??_0x189db5(0x1f7)),_0x189db5(0x20c)+(_0x46c45[0x1]??_0x189db5(0x1f7)),'',_0x189db5(0x1fc)+_0x4b2b4a[_0x189db5(0x207)](',\x20')];return _0x5dc169[_0x189db5(0x207)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4aa21e,_0x2c68d7){var _0x1c361e=a87_0x1ca2,_0x85f2b5=_0x4aa21e();while(!![]){try{var _0x5395a0=-parseInt(_0x1c361e(0xeb))/0x1*(-parseInt(_0x1c361e(0xea))/0x2)+parseInt(_0x1c361e(0xe3))/0x3*(parseInt(_0x1c361e(0xe4))/0x4)+-parseInt(_0x1c361e(0xe5))/0x5+-parseInt(_0x1c361e(0xe8))/0x6+parseInt(_0x1c361e(0xe7))/0x7*(-parseInt(_0x1c361e(0xe6))/0x8)+parseInt(_0x1c361e(0xe2))/0x9+-parseInt(_0x1c361e(0xe1))/0xa*(-parseInt(_0x1c361e(0xe9))/0xb);if(_0x5395a0===_0x2c68d7)break;else _0x85f2b5['push'](_0x85f2b5['shift']());}catch(_0xf91685){_0x85f2b5['push'](_0x85f2b5['shift']());}}}(a87_0x3bdd,0x80564));function a87_0x3bdd(){var _0x3e1b97=['836875HyFzVV','62072tJuKCI','812RTwLLj','1314222OxSfWf','473YOkwcH','4wpUFNS','370322GztLgV','33780kOejOn','8320464upJZFl','6uynTpJ','3460mweLWq'];a87_0x3bdd=function(){return _0x3e1b97;};return a87_0x3bdd();}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';export*from'../../../commands/menu/shared/sync-core.js';function a87_0x1ca2(_0x466f8d,_0xc8ffed){_0x466f8d=_0x466f8d-0xe1;var _0x3bdd6e=a87_0x3bdd();var _0x1ca200=_0x3bdd6e[_0x466f8d];return _0x1ca200;}export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21c600,_0x4c3eef){const _0x514d21=a88_0x51fc,_0x5336ab=_0x21c600();while(!![]){try{const _0x6750f=parseInt(_0x514d21(0x160))/0x1*(parseInt(_0x514d21(0x151))/0x2)+-parseInt(_0x514d21(0x14b))/0x3+parseInt(_0x514d21(0x15a))/0x4*(-parseInt(_0x514d21(0x14a))/0x5)+-parseInt(_0x514d21(0x141))/0x6*(-parseInt(_0x514d21(0x14c))/0x7)+-parseInt(_0x514d21(0x161))/0x8+-parseInt(_0x514d21(0x155))/0x9*(-parseInt(_0x514d21(0x154))/0xa)+parseInt(_0x514d21(0x15d))/0xb;if(_0x6750f===_0x4c3eef)break;else _0x5336ab['push'](_0x5336ab['shift']());}catch(_0x16c2e4){_0x5336ab['push'](_0x5336ab['shift']());}}}(a88_0x49cb,0x8bdfc));import a88_0x294ca5 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a88_0x5e226f from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';function a88_0x51fc(_0x3106a2,_0x18a4b3){_0x3106a2=_0x3106a2-0x13c;const _0x49cbf4=a88_0x49cb();let _0x51fce6=_0x49cbf4[_0x3106a2];return _0x51fce6;}import{CliErrors}from'../../../errors.js';function onCancel(_0x241191){const _0x332266=a88_0x51fc;return _0x241191[_0x332266(0x156)](_0x36e514=>{const _0x472f82=_0x332266;if(_0x36e514?.['name']===_0x472f82(0x157))throw CliErrors['cancelled'](_0x472f82(0x162));throw _0x36e514;});}export function startSpinner(_0x7223b0){const _0x3524f7=a88_0x51fc;return a88_0x5e226f({'text':_0x7223b0,'color':'cyan'})[_0x3524f7(0x148)]();}export function stopSpinner(_0x10b7f3,_0x46f6aa,_0x249727){const _0x1666a6=a88_0x51fc;_0x249727?_0x10b7f3[_0x1666a6(0x152)](_0x46f6aa):_0x10b7f3[_0x1666a6(0x15c)](_0x46f6aa);}export async function askConfirm(_0x53c74d){return onCancel(confirm({'message':_0x53c74d,'theme':{'prefix':''}}));}export async function askJsUrl(_0x2fc92a){const _0x4071fb=a88_0x51fc;while(!![]){const _0x2a0cb4=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x2fc92a,'theme':{'prefix':''}}));if(_0x2a0cb4[_0x4071fb(0x13c)]()==='')throw CliErrors['cancelled']('Cancelled.');if(!/^https:\/\/.+\.js(\?.*)?$/[_0x4071fb(0x150)](_0x2a0cb4['trim']())){console[_0x4071fb(0x15f)](a88_0x294ca5[_0x4071fb(0x163)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x3c86da=startSpinner('\x20\x20Checking\x20JS\x20URL\x20reachability...');try{const _0x4ef460=await isUrlReachable(_0x2a0cb4['trim']());stopSpinner(_0x3c86da,'JS\x20URL\x20checked',_0x4ef460);if(!_0x4ef460){console[_0x4071fb(0x15f)](a88_0x294ca5['red']('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x2a0cb4[_0x4071fb(0x13c)]();}catch(_0x25d308){stopSpinner(_0x3c86da,'JS\x20URL\x20check\x20failed',![]);throw _0x25d308;}}}export async function askCssUrl(_0x5b3b8d){const _0x2c0c74=a88_0x51fc;while(!![]){const _0x43c654=await onCancel(input({'message':_0x2c0c74(0x153),'default':_0x5b3b8d,'theme':{'prefix':''}}));if(_0x43c654[_0x2c0c74(0x13c)]()==='')throw CliErrors[_0x2c0c74(0x143)](_0x2c0c74(0x162));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x2c0c74(0x150)](_0x43c654[_0x2c0c74(0x13c)]())){console[_0x2c0c74(0x15f)](a88_0x294ca5['red'](_0x2c0c74(0x13f)));continue;}const _0x1073ab=startSpinner(_0x2c0c74(0x146));try{const _0x5baf37=await isUrlReachable(_0x43c654[_0x2c0c74(0x13c)]());stopSpinner(_0x1073ab,_0x2c0c74(0x158),_0x5baf37);if(!_0x5baf37){console['error'](a88_0x294ca5[_0x2c0c74(0x163)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x43c654[_0x2c0c74(0x13c)]();}catch(_0x3a5a6d){stopSpinner(_0x1073ab,_0x2c0c74(0x15e),![]);throw _0x3a5a6d;}}}export async function selectPages(_0x4000bb,_0x13bf60,_0x6c8429){const _0x18aeac=a88_0x51fc,_0x32463e=_0x4000bb[_0x18aeac(0x144)](_0x22c2aa=>({'name':_0x22c2aa[_0x18aeac(0x149)]+'\x20\x20'+(_0x13bf60[_0x18aeac(0x142)](_0x22c2aa['path'])?a88_0x294ca5[_0x18aeac(0x13e)](_0x18aeac(0x140)):a88_0x294ca5[_0x18aeac(0x159)]('[new]')),'value':_0x22c2aa['label'],'checked':_0x6c8429?_0x6c8429['includes'](_0x22c2aa[_0x18aeac(0x149)]):!_0x13bf60[_0x18aeac(0x142)](_0x22c2aa[_0x18aeac(0x13d)])}));if(_0x32463e[_0x18aeac(0x15b)]===0x0)throw new Error(_0x18aeac(0x14f));const _0x33e27f=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x32463e,'loop':![],'theme':{'prefix':''}}));if(_0x33e27f['length']===0x0)throw new Error(_0x18aeac(0x145));return _0x4000bb['filter'](_0x34e820=>_0x33e27f[_0x18aeac(0x14e)](_0x34e820['label']));}export function isInteractive(){const _0x28c84f=a88_0x51fc;return process['stdin'][_0x28c84f(0x147)]===!![];}export function requireInteractive(){const _0x4b7615=a88_0x51fc;if(!isInteractive())throw new Error('This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20'+_0x4b7615(0x14d));}function a88_0x49cb(){const _0x2fa8e6=['length','fail','20527045jiKJRu','CSS\x20URL\x20check\x20failed','error','1PDfBRY','8327384zaWPYM','Cancelled.','red','trim','path','gray','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','[already\x20on\x20platform]','18xVbAXa','has','cancelled','map','No\x20menus\x20selected.','\x20\x20Checking\x20CSS\x20URL\x20reachability...','isTTY','start','label','5lWqqMF','1781430RTUxsO','1735167gCIreg','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','includes','No\x20local\x20pages\x20found.','test','701864VOLEac','succeed','\x20\x20CSS\x20URL:','589820wdChpW','27vHFtTj','catch','ExitPromptError','CSS\x20URL\x20checked','green','3719836hEUYVf'];a88_0x49cb=function(){return _0x2fa8e6;};return a88_0x49cb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x5ca507=a89_0x3d41;(function(_0x14e0af,_0x5d13b7){const _0x393a59=a89_0x3d41,_0x1d0ea0=_0x14e0af();while(!![]){try{const _0x52a8e6=-parseInt(_0x393a59(0x1bb))/0x1+-parseInt(_0x393a59(0x1af))/0x2+parseInt(_0x393a59(0x1b9))/0x3+parseInt(_0x393a59(0x1bd))/0x4*(parseInt(_0x393a59(0x1b0))/0x5)+-parseInt(_0x393a59(0x1b1))/0x6+parseInt(_0x393a59(0x1bc))/0x7+-parseInt(_0x393a59(0x1c5))/0x8*(parseInt(_0x393a59(0x1b3))/0x9);if(_0x52a8e6===_0x5d13b7)break;else _0x1d0ea0['push'](_0x1d0ea0['shift']());}catch(_0x1e41a6){_0x1d0ea0['push'](_0x1d0ea0['shift']());}}}(a89_0x6f9b,0x5545d));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a89_0x5ca507(0x1b5)](),a89_0x5ca507(0x1be));export function extractTitleFromComment(_0x4852af){const _0x4b66a8=a89_0x5ca507;try{const _0x2785e5=readFileSync(_0x4852af,_0x4b66a8(0x1b4)),_0x46c13c=_0x2785e5[_0x4b66a8(0x1ba)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x46c13c&&_0x46c13c[0x1]){const _0x4dcdec=_0x46c13c[0x1],_0xfd043d=_0x4dcdec['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0xfd043d&&_0xfd043d[0x1])return _0xfd043d[0x1][_0x4b66a8(0x1b7)]();}let _0x4e98ad=null;const _0x335b2a=_0x2785e5[_0x4b66a8(0x1ba)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x335b2a&&_0x335b2a[0x1]&&(_0x4e98ad=_0x335b2a[0x1]);if(!_0x4e98ad){const _0x20398e=_0x2785e5[_0x4b66a8(0x1ba)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x20398e&&_0x20398e[0x1]&&(_0x4e98ad=_0x20398e[0x1]);}if(_0x4e98ad){const _0x2da694=new RegExp('\x5cb'+_0x4e98ad+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x32f95a=_0x2785e5[_0x4b66a8(0x1ba)](_0x2da694);if(_0x32f95a&&_0x32f95a[0x1])return _0x32f95a[0x1];return _0x4e98ad;}return null;}catch(_0x213a01){return null;}}export function getLocalPages(_0x306f68=pagesDir,_0x4d04f8=pagesDir){const _0x2e0a0d=a89_0x5ca507;let _0x17a30e=[];const _0x47a86e=readdirSync(_0x306f68);return _0x47a86e['forEach'](_0x28ccf7=>{const _0x104535=a89_0x3d41,_0x11813e=join(_0x306f68,_0x28ccf7),_0xe5e5f7=statSync(_0x11813e);if(_0xe5e5f7&&_0xe5e5f7['isDirectory']())_0x17a30e=_0x17a30e[_0x104535(0x1c0)](getLocalPages(_0x11813e,_0x4d04f8));else{if(_0x28ccf7[_0x104535(0x1c3)](_0x104535(0x1bf))){let _0x278cb0=relative(_0x4d04f8,_0x11813e);_0x278cb0[_0x104535(0x1c3)](_0x104535(0x1b6))?_0x278cb0=_0x278cb0[_0x104535(0x1b2)](/index\.tsx$/,''):_0x278cb0=_0x278cb0['replace'](/\.tsx$/,'');_0x278cb0[_0x104535(0x1c3)](sep)&&(_0x278cb0=_0x278cb0[_0x104535(0x1ae)](0x0,-0x1));const _0x4ab0e9=_0x278cb0[_0x104535(0x1c1)](sep)[_0x104535(0x1b8)]('/'),_0x4b8008=extractTitleFromComment(_0x11813e),_0x56dae0=_0x4b8008||_0x4ab0e9;_0x17a30e[_0x104535(0x1c2)]({'path':_0x4ab0e9[_0x104535(0x1ad)]('$',':'),'label':_0x56dae0});}}}),_0x17a30e[_0x2e0a0d(0x1c4)](_0x3a9af7=>_0x3a9af7[_0x2e0a0d(0x1c6)]!=='');}function a89_0x3d41(_0x114ecb,_0xbe8d13){_0x114ecb=_0x114ecb-0x1ad;const _0x6f9b98=a89_0x6f9b();let _0x3d41d2=_0x6f9b98[_0x114ecb];return _0x3d41d2;}function a89_0x6f9b(){const _0x42fb7b=['692526DFdLmB','match','43999RiTrOx','4590950TlNUfU','1248812XqivUZ','src/pages','.tsx','concat','split','push','endsWith','filter','8CbyAuL','path','replaceAll','slice','505972xofFUs','5mGKTSb','2473242blDbWM','replace','1263834QfQoIC','utf-8','cwd','index.tsx','trim','join'];a89_0x6f9b=function(){return _0x42fb7b;};return a89_0x6f9b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1038bd,_0x58109a){const _0x53ef21=a90_0x388e,_0x560d3d=_0x1038bd();while(!![]){try{const _0x271254=parseInt(_0x53ef21(0x139))/0x1+parseInt(_0x53ef21(0x13a))/0x2+parseInt(_0x53ef21(0x128))/0x3*(-parseInt(_0x53ef21(0x126))/0x4)+-parseInt(_0x53ef21(0x138))/0x5+parseInt(_0x53ef21(0x136))/0x6*(-parseInt(_0x53ef21(0x129))/0x7)+-parseInt(_0x53ef21(0x12b))/0x8+parseInt(_0x53ef21(0x12f))/0x9;if(_0x271254===_0x58109a)break;else _0x560d3d['push'](_0x560d3d['shift']());}catch(_0x2f8847){_0x560d3d['push'](_0x560d3d['shift']());}}}(a90_0x2b26,0x41f73));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';function a90_0x2b26(){const _0x5acf90=['CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','191720ykXYOu','errors','33UbjHEy','1793183rwmJhP','No\x20local\x20pages\x20matched\x20labels:\x20','3911304LfUVXR','JS\x20URL\x20is\x20unreachable','trim','CSS\x20URL\x20is\x20unreachable','14661450GEsnhP','value','has','status','label','resources','rejected','6ckfECO','path','2126500kmPKBd','208900nKNZtA','259714bNXWPW','filter','length','allSettled','join','push','extend','map'];a90_0x2b26=function(){return _0x5acf90;};return a90_0x2b26();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x15b3d9){const _0x31365a=a90_0x388e,_0xb351e4=[];return!isValidJsHttpsUrl(_0x15b3d9)&&_0xb351e4[_0x31365a(0x122)]('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0xb351e4['length']===0x0,'errors':_0xb351e4};}export function validateCssUrl(_0x15b5c5){const _0x27b61a=a90_0x388e,_0x322285=[];return!isValidCssHttpsUrl(_0x15b5c5)&&_0x322285['push'](_0x27b61a(0x125)),{'ok':_0x322285[_0x27b61a(0x11f)]===0x0,'errors':_0x322285};}function a90_0x388e(_0x264d26,_0x22a812){_0x264d26=_0x264d26-0x11e;const _0x2b2632=a90_0x2b26();let _0x388ed2=_0x2b2632[_0x264d26];return _0x388ed2;}export async function validateJsUrlReachable(_0x3ddb08){const _0xdb0624=a90_0x388e,_0x3779a8=validateJsUrl(_0x3ddb08);if(!_0x3779a8['ok'])return _0x3779a8;const _0x29b1f1=await isUrlReachable(_0x3ddb08);if(!_0x29b1f1)_0x3779a8[_0xdb0624(0x127)][_0xdb0624(0x122)](_0xdb0624(0x12c));return{'ok':_0x3779a8[_0xdb0624(0x127)][_0xdb0624(0x11f)]===0x0,'errors':_0x3779a8[_0xdb0624(0x127)]};}export async function validateCssUrlReachable(_0x583b41){const _0x273d47=a90_0x388e,_0x105057=validateCssUrl(_0x583b41);if(!_0x105057['ok'])return _0x105057;const _0x97f653=await isUrlReachable(_0x583b41);if(!_0x97f653)_0x105057['errors']['push'](_0x273d47(0x12e));return{'ok':_0x105057[_0x273d47(0x127)][_0x273d47(0x11f)]===0x0,'errors':_0x105057[_0x273d47(0x127)]};}export function buildCompareRows(_0x23bbf3,_0x3469c5){const _0x237aca=a90_0x388e;return _0x23bbf3[_0x237aca(0x124)](_0x524900=>({'label':_0x524900[_0x237aca(0x133)],'path':_0x524900[_0x237aca(0x137)],'local':!![],'online':_0x3469c5[_0x237aca(0x131)](_0x524900[_0x237aca(0x137)])}));}export function filterNewPages(_0xfcef57,_0x2ee623,_0x2389f2){const _0x19be11=a90_0x388e;if(_0x2389f2&&_0x2389f2[_0x19be11(0x11f)]>0x0){const _0x55e127=new Set(_0x2389f2[_0x19be11(0x124)](_0xdf7e9a=>_0xdf7e9a[_0x19be11(0x12d)]())),_0x8b98fb=_0xfcef57[_0x19be11(0x11e)](_0x4d192f=>_0x55e127[_0x19be11(0x131)](_0x4d192f[_0x19be11(0x133)]));if(_0x8b98fb[_0x19be11(0x11f)]===0x0)throw new Error(_0x19be11(0x12a)+[..._0x55e127][_0x19be11(0x121)](',\x20'));return _0x8b98fb;}return _0xfcef57['filter'](_0xe6b45e=>!_0x2ee623[_0x19be11(0x131)](_0xe6b45e[_0x19be11(0x137)]));}export function filterPagesByLabels(_0x372a48,_0x10514f){const _0x291321=a90_0x388e,_0x2f1c5b=[],_0x5a4322=[];for(const _0x1d1f4c of _0x10514f){const _0x198586=_0x1d1f4c[_0x291321(0x12d)](),_0x55fc3b=_0x372a48['find'](_0x207ff9=>_0x207ff9[_0x291321(0x133)]===_0x198586);if(_0x55fc3b)_0x2f1c5b[_0x291321(0x122)](_0x55fc3b);else _0x5a4322[_0x291321(0x122)](_0x1d1f4c);}return{'matched':_0x2f1c5b,'unmatched':_0x5a4322};}export async function doCreateMenus(_0x5ec4b3,_0x33f604,_0x380995,_0x57a770){const _0x513f6d=a90_0x388e,_0x1ed10e=await createMenus(_0x5ec4b3,_0x33f604,_0x380995,_0x57a770);return{'created':_0x1ed10e['length'],'failed':0x0,'labels':_0x380995[_0x513f6d(0x124)](_0x2dfd23=>_0x2dfd23['label']),'menus':_0x1ed10e};}export function filterMenusWithResources(_0x1b08e1){const _0x305bfd=a90_0x388e;return _0x1b08e1[_0x305bfd(0x11e)](_0x9afdfd=>_0x9afdfd['resources'][_0x305bfd(0x11f)]>0x0);}export async function doUpdateCdnUrls(_0x2a7e61,_0xa614b8,_0x10fb63,_0x4e7f52){const _0x4e104f=a90_0x388e,_0x2906f5=_0x10fb63[_0x4e104f(0x11e)](_0x4f4b3f=>_0x4f4b3f[_0x4e104f(0x134)][_0x4e104f(0x11f)]>0x0),_0x521055=await Promise[_0x4e104f(0x120)](_0x2906f5[_0x4e104f(0x124)](_0x3a039f=>updateMenuCdnUrl(_0x2a7e61,_0xa614b8,{'id':_0x3a039f['id'],'label':_0x3a039f[_0x4e104f(0x133)],'path':_0x3a039f[_0x4e104f(0x137)],'resources':_0x4e7f52,'extend':_0x3a039f[_0x4e104f(0x123)]??null}))),_0x2ec94a=_0x521055['filter'](_0x83048a=>_0x83048a[_0x4e104f(0x132)]==='fulfilled')[_0x4e104f(0x124)](_0x3071fc=>_0x3071fc[_0x4e104f(0x130)]),_0xc569f1=_0x521055[_0x4e104f(0x11e)](_0x360ece=>_0x360ece[_0x4e104f(0x132)]===_0x4e104f(0x135))[_0x4e104f(0x11f)];return{'updated':_0x2ec94a['length'],'failed':_0xc569f1,'menus':_0x2ec94a};}export async function fetchMenuData(_0x4ec39d,_0x540b09){const _0x49cfbb=a90_0x388e,_0x29f6b3=getLocalPages(),_0x18c7f3=await getOnlineMenuList(_0x4ec39d,_0x540b09),_0x592109=new Set(_0x18c7f3[_0x49cfbb(0x124)](_0x35bb55=>_0x35bb55[_0x49cfbb(0x137)]));return{'localPages':_0x29f6b3,'onlineMenuList':_0x18c7f3,'onlinePaths':_0x592109};}export async function fetchOnlineMenuList(_0x1eebb1,_0x148da0){return getOnlineMenuList(_0x1eebb1,_0x148da0);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2eb205,_0x5854a8){const _0x576a75=a91_0x3570,_0x17c438=_0x2eb205();while(!![]){try{const _0x57726a=parseInt(_0x576a75(0xac))/0x1*(parseInt(_0x576a75(0x9f))/0x2)+parseInt(_0x576a75(0x9e))/0x3*(-parseInt(_0x576a75(0xb4))/0x4)+-parseInt(_0x576a75(0x9a))/0x5*(parseInt(_0x576a75(0xb7))/0x6)+parseInt(_0x576a75(0xb3))/0x7+-parseInt(_0x576a75(0x9d))/0x8*(parseInt(_0x576a75(0xa4))/0x9)+parseInt(_0x576a75(0x97))/0xa+-parseInt(_0x576a75(0x9b))/0xb*(parseInt(_0x576a75(0x99))/0xc);if(_0x57726a===_0x5854a8)break;else _0x17c438['push'](_0x17c438['shift']());}catch(_0x5f03e0){_0x17c438['push'](_0x17c438['shift']());}}}(a91_0x194a,0xcb4a0));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(_0x28b693,_0x2697da){const _0x1d2d0f=a91_0x3570,_0x1a6bd2=getEnv();logger[_0x1d2d0f(0xae)](_0x1d2d0f(0xaa),isProduction(_0x1a6bd2)?_0x1d2d0f(0x8e)+_0x28b693+')':_0x1d2d0f(0xb9)+_0x28b693+')');const _0x422802=await platformFetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x28b693,{'cookie':_0x2697da,'label':'Fetch\x20menu\x20list'});if(!_0x422802)return logger[_0x1d2d0f(0xae)]('get-online-menu-list','Server\x20returned\x20empty\x20menu\x20list'),[];return logger['info'](_0x1d2d0f(0xaa),_0x1d2d0f(0x94)+_0x422802[_0x1d2d0f(0xa0)]+_0x1d2d0f(0x9c)),_0x422802['map'](flattenMenuItem)[_0x1d2d0f(0xb6)]();}function flattenMenuItem(_0x365de3){const _0x519e94=a91_0x3570;let _0x467184=[];try{const _0x59728e=_0x365de3[_0x519e94(0x96)]?.['resources'];if(typeof _0x59728e===_0x519e94(0x95)){const _0x3cd78b=JSON[_0x519e94(0xa1)](_0x59728e);if(Array['isArray'](_0x3cd78b))_0x467184=_0x3cd78b[_0x519e94(0xaf)](String);}else Array[_0x519e94(0xad)](_0x59728e)&&(_0x467184=_0x59728e[_0x519e94(0xaf)](String));}catch{}const _0x14ed98=[{'id':_0x365de3['id'],'path':_0x365de3['path'],'label':_0x365de3[_0x519e94(0xb2)],'resources':_0x467184,'extend':_0x365de3['extend']??null}];if(_0x365de3[_0x519e94(0xa5)]&&_0x365de3['children'][_0x519e94(0xa0)]>0x0)for(const _0x1bf257 of _0x365de3[_0x519e94(0xa5)]){_0x14ed98[_0x519e94(0xa6)](...flattenMenuItem(_0x1bf257));}return _0x14ed98;}export async function createMenu(_0x406a4a,_0x4e134a,_0x1099fa){const _0x39b842=a91_0x3570;logger[_0x39b842(0xae)](_0x39b842(0xa3),_0x39b842(0x91)+_0x1099fa[_0x39b842(0xb2)]+'\x20('+_0x1099fa['path']+')');const _0x571cf5={'appCode':_0x406a4a,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x39b842(0xa8),'resources':_0x1099fa['resources']?JSON[_0x39b842(0xa2)](_0x1099fa[_0x39b842(0x8f)]):undefined},..._0x1099fa},_0x23bcf5=await platformFetch(getApiDomain()+_0x39b842(0xba),{'method':_0x39b842(0xb1),'body':_0x571cf5,'cookie':_0x4e134a,'label':_0x39b842(0x92)+_0x1099fa[_0x39b842(0xb2)]+'\x22'});return logger[_0x39b842(0xae)]('create-menu','Menu\x20created\x20successfully:\x20'+_0x1099fa[_0x39b842(0xb2)]),_0x23bcf5;}async function createSingleMenu(_0x30871f,_0x4a20cc,_0x3b832c,_0x508f67){const _0x462d94=a91_0x3570,_0x1c367e={'appCode':_0x30871f,'type':'procode','sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x508f67?JSON[_0x462d94(0xa2)](_0x508f67):undefined},'label':_0x3b832c[_0x462d94(0xb2)],'path':_0x3b832c[_0x462d94(0xb0)]},_0x27f281=await platformFetch(getApiDomain()+_0x462d94(0xba),{'method':_0x462d94(0xb1),'body':_0x1c367e,'cookie':_0x4a20cc,'label':_0x462d94(0x92)+_0x3b832c[_0x462d94(0xb2)]+'\x22'});return logger['info']('create-menu',_0x462d94(0xa7)+_0x3b832c[_0x462d94(0xb2)]),_0x27f281;}export async function createMenus(_0xfa7a10,_0x4f4661,_0x110fc3,_0x187ab0){const _0x4249fa=a91_0x3570;logger[_0x4249fa(0xae)]('create-menus',_0x4249fa(0x98)+_0x110fc3[_0x4249fa(0xa0)]);const _0x537798=await Promise['all'](_0x110fc3['map'](_0x297cba=>createSingleMenu(_0xfa7a10,_0x4f4661,_0x297cba,_0x187ab0)));return logger[_0x4249fa(0xae)](_0x4249fa(0x93),_0x4249fa(0xb5)+_0x110fc3[_0x4249fa(0xa0)]),_0x537798;}function a91_0x194a(){const _0x371690=['/smartapi/menu/create','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','resources','update-menu-cdn-url','Creating\x20menu:\x20','Create\x20menu\x20\x22','create-menus','Fetched\x20','string','extend','14113560XGLFye','Start\x20batch\x20menu\x20creation,\x20total\x20','2487540QjpAYl','48870CHjFqb','77rYknoG','\x20online\x20menus\x20successfully','64RQAWfX','177aleVMi','939028UVTLPR','length','parse','stringify','create-menu','958428LVWDrd','children','push','Menu\x20created\x20successfully:\x20','import','/smartapi/menu/update','get-online-menu-list','Update\x20menu\x20assets\x20\x22','3prJEiK','isArray','info','map','path','POST','label','10028354Ayqckz','69092hxBPhN','Batch\x20menu\x20creation\x20completed,\x20total\x20','flat','60MqmcaF','Updating\x20menu\x20asset\x20links:\x20','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'];a91_0x194a=function(){return _0x371690;};return a91_0x194a();}function a91_0x3570(_0x42f9e4,_0xfcc7b4){_0x42f9e4=_0x42f9e4-0x8e;const _0x194a3b=a91_0x194a();let _0x3570d0=_0x194a3b[_0x42f9e4];return _0x3570d0;}export async function updateMenuCdnUrl(_0x232657,_0x29fbaf,_0x27d2fc){const _0x4258b2=a91_0x3570;logger[_0x4258b2(0xae)]('update-menu-cdn-url',_0x4258b2(0xb8)+_0x27d2fc[_0x4258b2(0xb2)]+'\x20('+_0x27d2fc['path']+')');const _0x1b77ab={'id':_0x27d2fc['id'],'appCode':_0x232657,'extend':{..._0x27d2fc[_0x4258b2(0x96)]??{},'loadScriptMode':_0x4258b2(0xa8),'resources':_0x27d2fc['resources']?JSON[_0x4258b2(0xa2)](_0x27d2fc[_0x4258b2(0x8f)]):undefined}},_0x19441f=await platformFetch(getApiDomain()+_0x4258b2(0xa9),{'method':_0x4258b2(0xb1),'body':_0x1b77ab,'cookie':_0x29fbaf,'label':_0x4258b2(0xab)+_0x27d2fc[_0x4258b2(0xb2)]+'\x22'});return logger[_0x4258b2(0xae)](_0x4258b2(0x90),'Menu\x20assets\x20synced:\x20'+_0x27d2fc['label'],undefined),_0x19441f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d724b,_0x4a0188){const _0x102759=a92_0x1673,_0x1932b1=_0x5d724b();while(!![]){try{const _0x38a41f=parseInt(_0x102759(0x18f))/0x1+-parseInt(_0x102759(0x19c))/0x2+parseInt(_0x102759(0x196))/0x3+parseInt(_0x102759(0x19a))/0x4*(parseInt(_0x102759(0x1a8))/0x5)+-parseInt(_0x102759(0x19b))/0x6+-parseInt(_0x102759(0x1a5))/0x7+parseInt(_0x102759(0x191))/0x8;if(_0x38a41f===_0x4a0188)break;else _0x1932b1['push'](_0x1932b1['shift']());}catch(_0x1b7cd3){_0x1932b1['push'](_0x1932b1['shift']());}}}(a92_0x3e60,0x422eb));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';function a92_0x1673(_0x596651,_0x161785){_0x596651=_0x596651-0x183;const _0x3e6074=a92_0x3e60();let _0x167312=_0x3e6074[_0x596651];return _0x167312;}import{logger}from'../../../utils/logger.js';function validateParams(_0x406f11){const _0xc520cf=a92_0x1673,_0x2f8663=[];return _0x406f11[_0xc520cf(0x1a7)]&&!isValidJsHttpsUrl(_0x406f11[_0xc520cf(0x1a7)])&&_0x2f8663[_0xc520cf(0x1a1)]({'field':'jsUrl','message':_0xc520cf(0x193)}),_0x406f11[_0xc520cf(0x19f)]&&!isValidCssHttpsUrl(_0x406f11['cssUrl'])&&_0x2f8663['push']({'field':_0xc520cf(0x19f),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x2f8663;}export async function runMenuSyncCore(_0x41bdfc,_0x53d486,_0x4b872b=[],_0x17bca8){const _0x501b4a=a92_0x1673,_0x5505b7=parseParamsFlag(_0x17bca8),_0x5168ae=_0x4b872b[_0x501b4a(0x18e)]>0x0?_0x4b872b:_0x5505b7[_0x501b4a(0x194)],_0x5080f5=_0x5505b7[_0x501b4a(0x1a7)],_0x6c6a47=_0x5505b7[_0x501b4a(0x19f)],_0x53cc8a=[];if(_0x5080f5)_0x53cc8a[_0x501b4a(0x1a1)](_0x5080f5);if(_0x6c6a47)_0x53cc8a[_0x501b4a(0x1a1)](_0x6c6a47);const _0x584e03=validateParams(_0x5505b7);if(_0x584e03[_0x501b4a(0x18e)]>0x0){const _0x5fc9e1=_0x584e03[_0x501b4a(0x192)](_0x429953=>_0x501b4a(0x18a)+_0x429953['field']+':\x20'+_0x429953['message'])[_0x501b4a(0x1a9)](';\x20');throw new Error(_0x501b4a(0x1a3)+_0x5fc9e1);}logger['setLogPath'](process['cwd']()),logger[_0x501b4a(0x184)](_0x501b4a(0x183),_0x501b4a(0x199),{'appCode':_0x41bdfc,'selectedCount':_0x5168ae?.['length'],'jsUrl':_0x5080f5,'cssUrl':_0x6c6a47});if(_0x5080f5){const _0x3aa344=await isUrlReachable(_0x5080f5);if(!_0x3aa344)throw new Error(_0x501b4a(0x19d)+_0x5080f5);}if(_0x6c6a47){const _0xae9217=await isUrlReachable(_0x6c6a47);if(!_0xae9217)throw new Error(_0x501b4a(0x1a2)+_0x6c6a47);}const _0x239183=getLocalPages();if(_0x239183['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x5b0b10=await getOnlineMenuList(_0x41bdfc,_0x53d486),_0x16c1a0=new Set(_0x5b0b10[_0x501b4a(0x192)](_0xd61986=>_0xd61986['path']));let _0x1a35ef;if(_0x5168ae&&_0x5168ae[_0x501b4a(0x18e)]>0x0){const _0x34228e=new Set(_0x5168ae[_0x501b4a(0x192)](_0x3e630a=>_0x3e630a['trim']()));_0x1a35ef=_0x239183['filter'](_0xabe593=>_0x34228e[_0x501b4a(0x198)](_0xabe593[_0x501b4a(0x189)]));if(_0x1a35ef['length']===0x0){const _0x2ac6d4=_0x239183['map'](_0x41b413=>_0x41b413[_0x501b4a(0x189)])[_0x501b4a(0x1a9)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x34228e][_0x501b4a(0x1a9)](',\x20')+_0x501b4a(0x197)+_0x2ac6d4);}}else _0x1a35ef=_0x239183['filter'](_0x45e396=>!_0x16c1a0[_0x501b4a(0x198)](_0x45e396[_0x501b4a(0x1a4)]));if(_0x1a35ef['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x146d1c=await createMenus(_0x41bdfc,_0x53d486,_0x1a35ef,_0x53cc8a['length']>0x0?_0x53cc8a:undefined);return logger[_0x501b4a(0x184)](_0x501b4a(0x183),'Menu\x20sync\x20completed',{'count':_0x1a35ef[_0x501b4a(0x18e)],'resources':_0x53cc8a}),{'created':_0x146d1c['length'],'skipped':![],'targetPages':_0x1a35ef,'menus':_0x146d1c};}export async function readPageLabelsFromStdin(){const _0x2d4701=a92_0x1673;if(!process['stdin'][_0x2d4701(0x195)]&&!process['stdin'][_0x2d4701(0x187)])return new Promise(_0x2201f6=>{const _0x5e991a=_0x2d4701,_0x2e7458=[];process['stdin']['on'](_0x5e991a(0x190),_0x51aa42=>_0x2e7458[_0x5e991a(0x1a1)](_0x51aa42)),process[_0x5e991a(0x188)]['on'](_0x5e991a(0x1ab),()=>{const _0x4b345a=_0x5e991a,_0x2670d2=Buffer[_0x4b345a(0x185)](_0x2e7458)[_0x4b345a(0x19e)](_0x4b345a(0x18c)),_0xa7558d=_0x2670d2[_0x4b345a(0x18d)]('\x0a')[_0x4b345a(0x192)](_0x49e9a1=>_0x49e9a1[_0x4b345a(0x1ac)]())[_0x4b345a(0x18b)](_0x4e5c86=>_0x4e5c86['length']>0x0&&!_0x4e5c86[_0x4b345a(0x1a6)]('#'));_0x2201f6(_0xa7558d);}),setTimeout(()=>_0x2201f6([]),0x1f4);});return[];}function parseParamsFlag(_0x591f1e){const _0x2e9c8b=a92_0x1673;if(!_0x591f1e||typeof _0x591f1e!=='string')return{};try{const _0x43cea0=JSON['parse'](_0x591f1e);if(typeof _0x43cea0!=='object'||_0x43cea0===null||Array[_0x2e9c8b(0x1aa)](_0x43cea0))return{};return{'selectedLabels':Array[_0x2e9c8b(0x1aa)](_0x43cea0[_0x2e9c8b(0x186)])?_0x43cea0[_0x2e9c8b(0x186)]['map'](String):undefined,'jsUrl':typeof _0x43cea0[_0x2e9c8b(0x1a7)]===_0x2e9c8b(0x1a0)?_0x43cea0[_0x2e9c8b(0x1a7)][_0x2e9c8b(0x1ac)]():undefined,'cssUrl':typeof _0x43cea0['cssUrl']===_0x2e9c8b(0x1a0)?_0x43cea0[_0x2e9c8b(0x19f)]['trim']():undefined};}catch{return{};}}function a92_0x3e60(){const _0x2d7036=['17644xnYKTG','3085752sDUkNT','833640IKLbee','JS\x20URL\x20is\x20unreachable:\x20','toString','cssUrl','string','push','CSS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params:\x20','path','2013452gcaoWN','startsWith','jsUrl','365rCrHkt','join','isArray','end','trim','menu-sync','info','concat','pages','readableEnded','stdin','label','--params.','filter','utf8','split','length','108867IYAdEd','data','8221088mItyun','map','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','selectedLabels','isTTY','93975lYPNxU','\x0a\x20\x20Available\x20local\x20pages:\x20','has','Start\x20non-interactive\x20menu\x20sync'];a92_0x3e60=function(){return _0x2d7036;};return a92_0x3e60();}
|