@lovrabet/rabetbase-cli 2.3.5 → 2.3.6
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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.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-skill/index.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-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.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/business-group-update.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/generate.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-audit.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/dataset/restore.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 -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/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/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.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/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.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/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.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
|
-
const
|
|
1
|
+
const a90_0x2ff161=a90_0x5842;(function(_0x39e4ee,_0x5c2be){const _0x1f96fe=a90_0x5842,_0x414409=_0x39e4ee();while(!![]){try{const _0x4ce3d2=-parseInt(_0x1f96fe(0x6e))/0x1*(-parseInt(_0x1f96fe(0x74))/0x2)+parseInt(_0x1f96fe(0x82))/0x3+parseInt(_0x1f96fe(0x91))/0x4*(parseInt(_0x1f96fe(0x81))/0x5)+-parseInt(_0x1f96fe(0x87))/0x6+-parseInt(_0x1f96fe(0x7e))/0x7+-parseInt(_0x1f96fe(0x72))/0x8*(parseInt(_0x1f96fe(0x9a))/0x9)+-parseInt(_0x1f96fe(0x83))/0xa;if(_0x4ce3d2===_0x5c2be)break;else _0x414409['push'](_0x414409['shift']());}catch(_0x36ea9b){_0x414409['push'](_0x414409['shift']());}}}(a90_0x1bec,0xa3f73));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 a90_0x5842(_0x309c49,_0x1d32ef){_0x309c49=_0x309c49-0x6e;const _0x1bec5d=a90_0x1bec();let _0x58422a=_0x1bec5d[_0x309c49];return _0x58422a;}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';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(_0x30878f){return{'appCode':_0x30878f,'appName':_0x30878f};}function a90_0x1bec(){const _0x209e9f=['Auto-confirm\x20prompts','748824ENKXoY','env','../../commands/project/init.js','检测到旧配置文件,正在自动升级...\x0a','appCode','Usage:\x20','Write\x20to\x20global\x20config\x20instead\x20of\x20project','global','\x20\x20Apps:\x20','custom','28DeMJdh','flagMissing','\x20\x20Default:\x20','boolean','validation','defaultApp','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','bool','cwd','18SvJSIZ','\x20config','733423AlvBmj','run','appcode','join','1085752wzDPDl','log','2UYFlyr','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','yes','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','\x0a✓\x20Successfully\x20initialized\x20','map','valid','project','message','Target\x20environment','6496966NrNxSi','str','production','559095mbKHKg','1532460ScTgwB','309930tgSnzF','\x20\x20Env:\x20','some'];a90_0x1bec=function(){return _0x209e9f;};return a90_0x1bec();}function writeInitConfig(_0xe050ec,_0x5ab151,_0xc66ede){const _0x4ca2da=a90_0x5842,_0x5295f3=resolveWriteConfigPath(_0xe050ec),_0x4ed7b3=buildCanonicalProjectConfig({},{'appCodes':_0x5ab151[_0x4ca2da(0x79)](_0x1f9b9a=>_0x1f9b9a[_0x4ca2da(0x8b)]),'env':_0xc66ede,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x5295f3,_0x4ed7b3);const _0x5cf6f1=_0xe050ec===_0x4ca2da(0x8e)?_0x4ca2da(0x8e):'project';console['log'](_0x4ca2da(0x78)+_0x5cf6f1+_0x4ca2da(0x9b)),console[_0x4ca2da(0x73)](_0x4ca2da(0x8f)+_0x5ab151[_0x4ca2da(0x79)](_0x5b916d=>_0x5b916d['appCode'])[_0x4ca2da(0x71)](',\x20')),console[_0x4ca2da(0x73)](_0x4ca2da(0x93)+_0x4ed7b3[_0x4ca2da(0x96)]),console[_0x4ca2da(0x73)](_0x4ca2da(0x84)+_0x4ed7b3[_0x4ca2da(0x88)]),console[_0x4ca2da(0x73)]('\x20\x20Config:\x20'+_0x5295f3);}async function runSmartInit(_0xdb88fc){const _0x964206=a90_0x5842,_0x2bbb5f=process[_0x964206(0x99)](),_0x1a4e26=_0xdb88fc[_0x964206(0x98)](_0x964206(0x8e))?_0x964206(0x8e):_0x964206(0x7b),_0x2c92ba=_0xdb88fc[_0x964206(0x7f)](_0x964206(0x88))||_0x964206(0x80),_0x32d7b7=_0xdb88fc['str'](_0x964206(0x70))||undefined,_0x1c60c3=_0xdb88fc[_0x964206(0x98)](_0x964206(0x7b));if(_0x1c60c3){const {initConfig:_0x28cec1}=await import(_0x964206(0x89));return _0x28cec1({'appcode':_0x32d7b7,'env':_0x2c92ba,'autoYes':_0xdb88fc[_0x964206(0x98)](_0x964206(0x76))});}if(_0x1a4e26===_0x964206(0x7b)){const _0x22df05=existsSync(resolve(_0x2bbb5f,NEW_CONFIG_NAME)),_0x5a2faf=LEGACY_CONFIG_NAMES[_0x964206(0x85)](_0x152261=>existsSync(resolve(_0x2bbb5f,_0x152261)));if(_0x5a2faf&&!_0x22df05)return console['log'](_0x964206(0x8a)),upgradeApp(_0xdb88fc['nonInteractive'],{'yes':_0xdb88fc[_0x964206(0x98)](_0x964206(0x76))});if(_0x22df05)throw CliErrors[_0x964206(0x95)](_0x964206(0x75),'Use\x20`'+CLI_BIN_NAME+_0x964206(0x97));}if(_0x32d7b7){const _0x8f0936=validateAppcode(_0x32d7b7);if(!_0x8f0936[_0x964206(0x7a)])throw CliErrors[_0x964206(0x95)](_0x8f0936[_0x964206(0x7c)]);writeInitConfig(_0x1a4e26,[syntheticApp(_0x32d7b7)],_0x2c92ba);return;}if(_0xdb88fc['nonInteractive'])throw CliErrors[_0x964206(0x92)]('appcode',_0x964206(0x8c)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]');const _0x254d8f=getCookie(),_0x35c800=await selectMultipleApps(_0x254d8f),_0x4b2480=_0x35c800===_0x964206(0x90)?[syntheticApp(await promptCustomAppcode())]:_0x35c800;writeInitConfig(_0x1a4e26,_0x4b2480,_0x2c92ba);}const initFlags=[{'name':a90_0x2ff161(0x8e),'type':a90_0x2ff161(0x94),'description':a90_0x2ff161(0x8d),'default':![]},{'name':a90_0x2ff161(0x88),'type':'string','description':a90_0x2ff161(0x7d),'default':'production','enum':[...RABETBASE_ENV_VALUES]},{'name':a90_0x2ff161(0x70),'type':'string','description':'App\x20code\x20to\x20initialize\x20with'},{'name':a90_0x2ff161(0x7b),'type':a90_0x2ff161(0x94),'description':'Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','default':![]},{'name':a90_0x2ff161(0x76),'type':a90_0x2ff161(0x94),'description':a90_0x2ff161(0x86),'default':![]}];export const initDefinitions=[{'service':'init','command':a90_0x2ff161(0x6f),'description':a90_0x2ff161(0x77),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x216ab3){return await runSmartInit(_0x216ab3),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e31ad,_0x3e74e9){const _0x6e7ccd=a91_0xdb67,_0x196e3d=_0x1e31ad();while(!![]){try{const _0x4dffed=-parseInt(_0x6e7ccd(0xf3))/0x1*(-parseInt(_0x6e7ccd(0xf9))/0x2)+-parseInt(_0x6e7ccd(0xf1))/0x3+-parseInt(_0x6e7ccd(0xf7))/0x4*(parseInt(_0x6e7ccd(0xf8))/0x5)+parseInt(_0x6e7ccd(0xf4))/0x6+-parseInt(_0x6e7ccd(0xf6))/0x7+parseInt(_0x6e7ccd(0xf5))/0x8+parseInt(_0x6e7ccd(0xf2))/0x9;if(_0x4dffed===_0x3e74e9)break;else _0x196e3d['push'](_0x196e3d['shift']());}catch(_0x2af6fe){_0x196e3d['push'](_0x196e3d['shift']());}}}(a91_0x3ef6,0x396d8));function a91_0x3ef6(){const _0x1f504c=['5294502FkwwbE','18281CdyWfJ','1311534vaTaOq','1147272bwgxht','1352876BJUKbD','1842460pDyJFG','5xDMYyv','26npsidX','896466ZlFPnA'];a91_0x3ef6=function(){return _0x1f504c;};return a91_0x3ef6();}function a91_0xdb67(_0x27abb9,_0x225718){_0x27abb9=_0x27abb9-0xf1;const _0x3ef65b=a91_0x3ef6();let _0xdb6799=_0x3ef65b[_0x27abb9];return _0xdb6799;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a92_0x2fe8(){const _0x158a0b=['join','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','issue','not_in_project','6SgtDZb','message','6385860CkSIuJ','has','4135jmRDMu','validation_error','349246YTnlqx','RABETBASE_DISABLE_ISSUE_NUDGE','length','stderr','\x20issue\x20report\x20\x5c','slice','report','1512tFOxbp','14850eAVmnt','\x20\x20Set\x20','1500801bnZJOu','\x20\x20\x20\x20--title\x20\x22','command','2071900kMiIsM','2lbtvrz','22qqDVZF','replace','1720QWUNDv','flag_missing','=1\x20to\x20silence\x20this\x20hint.','code','unknown_command','service','2682428naDUxm'];a92_0x2fe8=function(){return _0x158a0b;};return a92_0x2fe8();}const a92_0x27f95f=a92_0x3a6b;(function(_0x44d884,_0x540c57){const _0x5a202e=a92_0x3a6b,_0x5748f6=_0x44d884();while(!![]){try{const _0x4535c0=parseInt(_0x5a202e(0x10c))/0x1+-parseInt(_0x5a202e(0x11a))/0x2*(parseInt(_0x5a202e(0x116))/0x3)+-parseInt(_0x5a202e(0x113))/0x4*(-parseInt(_0x5a202e(0x10a))/0x5)+-parseInt(_0x5a202e(0x106))/0x6*(-parseInt(_0x5a202e(0x123))/0x7)+-parseInt(_0x5a202e(0x11d))/0x8*(parseInt(_0x5a202e(0x114))/0x9)+parseInt(_0x5a202e(0x119))/0xa*(-parseInt(_0x5a202e(0x11b))/0xb)+parseInt(_0x5a202e(0x108))/0xc;if(_0x4535c0===_0x540c57)break;else _0x5748f6['push'](_0x5748f6['shift']());}catch(_0x5b50ce){_0x5748f6['push'](_0x5748f6['shift']());}}}(a92_0x2fe8,0x4b266));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a92_0x27f95f(0x10d);const NUDGE_SUPPRESSED_CODES=new Set(['cancelled','auth_required','config_missing',a92_0x27f95f(0x105),a92_0x27f95f(0x121),a92_0x27f95f(0x11e),a92_0x27f95f(0x10b),'network_error']),defaultWriter=_0x224618=>{const _0x7fad1=a92_0x27f95f;process[_0x7fad1(0x10f)]['write'](_0x224618);};export function shouldNudgeForError(_0x228000,_0x14e4cf){const _0x11c72b=a92_0x27f95f;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x14e4cf['service']===_0x11c72b(0x104)&&_0x14e4cf[_0x11c72b(0x118)]===_0x11c72b(0x112))return![];if(_0x228000 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x11c72b(0x109)](_0x228000[_0x11c72b(0x120)]);return!![];}function a92_0x3a6b(_0x2e575f,_0x5ad327){_0x2e575f=_0x2e575f-0x104;const _0x2fe845=a92_0x2fe8();let _0x3a6b96=_0x2fe845[_0x2e575f];return _0x3a6b96;}export function printIssueReportNudgeForError(_0x4c5532,_0x57d753,_0x4e7ced=defaultWriter){if(!shouldNudgeForError(_0x4c5532,_0x57d753))return;const _0x3b2642=buildSuggestedTitle(_0x4c5532,_0x57d753);_0x4e7ced(formatNudge(_0x3b2642));}function buildSuggestedTitle(_0x383b71,_0xedcf14){const _0x26d331=a92_0x27f95f,_0xc1f24d=_0x383b71 instanceof Error?_0x383b71[_0x26d331(0x107)]:String(_0x383b71),_0x48c9b9=_0xc1f24d[_0x26d331(0x11c)](/[\r\n]+/g,'\x20')[_0x26d331(0x11c)](/\s+/g,'\x20')['trim']()[_0x26d331(0x111)](0x0,0x78)[_0x26d331(0x11c)](/"/g,'\x5c\x22'),_0x555fc9=CLI_BIN_NAME+'\x20'+_0xedcf14[_0x26d331(0x122)]+'\x20'+_0xedcf14[_0x26d331(0x118)];return _0x48c9b9[_0x26d331(0x10e)]>0x0?_0x555fc9+':\x20'+_0x48c9b9:_0x555fc9;}function formatNudge(_0x33fb10){const _0x3a000e=a92_0x27f95f;return['','Hit\x20a\x20'+CLI_BIN_NAME+'\x20bug?\x20Help\x20us\x20fix\x20it:','\x20\x20'+CLI_BIN_NAME+_0x3a000e(0x110),_0x3a000e(0x117)+_0x33fb10+'\x22\x20\x5c',_0x3a000e(0x125),'\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)',_0x3a000e(0x115)+NUDGE_OPT_OUT_ENV+_0x3a000e(0x11f),''][_0x3a000e(0x124)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x1870d4=a93_0x48a6;(function(_0xb4996a,_0x1a72b0){const _0x4d1620=a93_0x48a6,_0x2a02be=_0xb4996a();while(!![]){try{const _0x19eac1=parseInt(_0x4d1620(0x210))/0x1+-parseInt(_0x4d1620(0x1f1))/0x2*(-parseInt(_0x4d1620(0x200))/0x3)+-parseInt(_0x4d1620(0x1f3))/0x4*(parseInt(_0x4d1620(0x1e7))/0x5)+-parseInt(_0x4d1620(0x1e9))/0x6*(parseInt(_0x4d1620(0x20b))/0x7)+parseInt(_0x4d1620(0x1fd))/0x8+parseInt(_0x4d1620(0x1fb))/0x9+parseInt(_0x4d1620(0x1ff))/0xa;if(_0x19eac1===_0x1a72b0)break;else _0x2a02be['push'](_0x2a02be['shift']());}catch(_0xff136d){_0x2a02be['push'](_0x2a02be['shift']());}}}(a93_0xe8f2,0x24353));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a93_0xe8f2(){const _0x3a0e77=['utf8','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','write','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','sanitize','\x20bytes','73765dIfuWC','report','1314084yCzPuN','One-line\x20issue\x20summary','inline','originalBytes','descriptionFilePath','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','issue.description_original_bytes','truncated','29828UwkWes','POST','64lBKQUJ','issue.description_redaction_kinds','issue.description','truncated\x20from\x20','Platform\x20issue\x20reported','Issue\x20description\x20cannot\x20be\x20empty.','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','filter','1013481DcADTp','Issue\x20description\x20file\x20is\x20empty:\x20','1545584VeiJuv','Platform\x20issue\x20reported\x20(','627810HVvOWY','3OnsHfQ','title','otel://','apiError','issue.description_truncated','issue','join','redactionCount','issue.title','truncated:\x20original\x20','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','7mehzXk','cwd','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','validation','descriptionFile:\x20','219867yzmubu','File\x20not\x20found:\x20','description','\x20secret(s):\x20','str','redactionKinds','length','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Failed\x20to\x20report\x20platform\x20issue:\x20','flagMissing','description-file','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','descriptionSource','string','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','push','message','trim'];a93_0xe8f2=function(){return _0x3a0e77;};return a93_0xe8f2();}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';const DESCRIPTION_FILE_FLAG=a93_0x1870d4(0x21a);function a93_0x48a6(_0x33cbbd,_0x208136){_0x33cbbd=_0x33cbbd-0x1e7;const _0xe8f234=a93_0xe8f2();let _0x48a6f1=_0xe8f234[_0x33cbbd];return _0x48a6f1;}export const issueReport={'service':a93_0x1870d4(0x205),'command':a93_0x1870d4(0x1e8),'description':a93_0x1870d4(0x225),'risk':a93_0x1870d4(0x224),'requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':'compress','flags':[{'name':a93_0x1870d4(0x201),'type':a93_0x1870d4(0x21d),'required':!![],'description':a93_0x1870d4(0x1ea)},{'name':a93_0x1870d4(0x212),'type':'string','description':a93_0x1870d4(0x20a)},{'name':DESCRIPTION_FILE_FLAG,'type':a93_0x1870d4(0x21d),'description':a93_0x1870d4(0x1ee)}],async 'validate'(_0x2f9378){const _0x48c3b1=a93_0x1870d4,_0x41eee7=_0x2f9378['str'](_0x48c3b1(0x201))[_0x48c3b1(0x221)](),_0x59b6cd=_0x2f9378[_0x48c3b1(0x214)](_0x48c3b1(0x212))[_0x48c3b1(0x221)](),_0x437088=_0x2f9378[_0x48c3b1(0x214)](DESCRIPTION_FILE_FLAG)[_0x48c3b1(0x221)]();if(!_0x41eee7)throw CliErrors[_0x48c3b1(0x219)]('title',_0x48c3b1(0x20d));const _0x29b49a=_0x59b6cd['length']>0x0,_0xa5b156=_0x437088[_0x48c3b1(0x216)]>0x0;if(_0x29b49a===_0xa5b156)throw CliErrors['validation'](_0x48c3b1(0x217),_0x48c3b1(0x223));if(_0xa5b156){const _0x3c10b7=resolve(process[_0x48c3b1(0x20c)](),_0x437088);if(!existsSync(_0x3c10b7))throw CliErrors[_0x48c3b1(0x20e)](_0x48c3b1(0x211)+_0x3c10b7);}},async 'dryRun'(_0x2e25bc){const _0xaf782b=a93_0x1870d4,_0x1a17af=await prepareIssueReport(_0x2e25bc);return{'method':_0xaf782b(0x1f2),'url':_0xaf782b(0x202)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x1a17af['title'],'issue.description':_0x1a17af[_0xaf782b(0x212)],'issue.description_original_bytes':_0x1a17af[_0xaf782b(0x226)]['originalBytes'],'issue.description_truncated':_0x1a17af[_0xaf782b(0x226)][_0xaf782b(0x1f0)],'issue.description_redactions':_0x1a17af[_0xaf782b(0x226)][_0xaf782b(0x207)],'issue.description_redaction_kinds':_0x1a17af[_0xaf782b(0x226)][_0xaf782b(0x215)][_0xaf782b(0x206)](',')}},'description':[_0xaf782b(0x1f9),'descriptionSource:\x20'+_0x1a17af[_0xaf782b(0x21c)],_0x1a17af[_0xaf782b(0x1ed)]?_0xaf782b(0x20f)+_0x1a17af[_0xaf782b(0x1ed)]:null,_0x1a17af['sanitize'][_0xaf782b(0x1f0)]?_0xaf782b(0x209)+_0x1a17af[_0xaf782b(0x226)][_0xaf782b(0x1ec)]+_0xaf782b(0x227):null,_0x1a17af[_0xaf782b(0x226)]['redactionCount']>0x0?'redactions:\x20'+_0x1a17af[_0xaf782b(0x226)]['redactionCount']+'\x20('+_0x1a17af['sanitize'][_0xaf782b(0x215)][_0xaf782b(0x206)](',\x20')+')':null][_0xaf782b(0x1fa)](Boolean)[_0xaf782b(0x206)]('\x0a')};},async 'execute'(_0x1cac90){const _0x6d45d8=a93_0x1870d4,_0x27ef31=await prepareIssueReport(_0x1cac90);try{await sendPlatformIssueCollectLog({'title':_0x27ef31[_0x6d45d8(0x201)],'description':_0x27ef31['description'],'sanitize':{'originalBytes':_0x27ef31[_0x6d45d8(0x226)][_0x6d45d8(0x1ec)],'truncated':_0x27ef31[_0x6d45d8(0x226)][_0x6d45d8(0x1f0)],'redactionCount':_0x27ef31['sanitize'][_0x6d45d8(0x207)],'redactionKinds':_0x27ef31[_0x6d45d8(0x226)][_0x6d45d8(0x215)]}});}catch(_0x1b9830){throw CliErrors[_0x6d45d8(0x203)](_0x6d45d8(0x218)+(_0x1b9830 instanceof Error?_0x1b9830[_0x6d45d8(0x220)]:String(_0x1b9830)),_0x6d45d8(0x21e));}return{'ok':!![],'message':buildResultMessage(_0x27ef31['sanitize']),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x6d45d8(0x208),_0x6d45d8(0x1f5),_0x6d45d8(0x1ef),_0x6d45d8(0x204),'issue.description_redactions',_0x6d45d8(0x1f4)],'issue':{'title':_0x27ef31[_0x6d45d8(0x201)],'descriptionLength':_0x27ef31[_0x6d45d8(0x212)][_0x6d45d8(0x216)],'descriptionSource':_0x27ef31[_0x6d45d8(0x21c)],..._0x27ef31['descriptionFilePath']?{'descriptionFile':_0x27ef31[_0x6d45d8(0x1ed)]}:{},'sanitize':{'originalBytes':_0x27ef31[_0x6d45d8(0x226)]['originalBytes'],'truncated':_0x27ef31['sanitize']['truncated'],'redactions':_0x27ef31[_0x6d45d8(0x226)][_0x6d45d8(0x207)],'redactionKinds':_0x27ef31['sanitize'][_0x6d45d8(0x215)]}}}};}};function buildResultMessage(_0x3736d4){const _0x4cebf9=a93_0x1870d4,_0x96b230=[];return _0x3736d4[_0x4cebf9(0x1f0)]&&_0x96b230[_0x4cebf9(0x21f)](_0x4cebf9(0x1f6)+_0x3736d4[_0x4cebf9(0x1ec)]+_0x4cebf9(0x227)),_0x3736d4['redactionCount']>0x0&&_0x96b230[_0x4cebf9(0x21f)]('redacted\x20'+_0x3736d4[_0x4cebf9(0x207)]+_0x4cebf9(0x213)+_0x3736d4[_0x4cebf9(0x215)][_0x4cebf9(0x206)](',\x20')),_0x96b230[_0x4cebf9(0x216)]===0x0?_0x4cebf9(0x1f7):_0x4cebf9(0x1fe)+_0x96b230[_0x4cebf9(0x206)](';\x20')+')';}async function prepareIssueReport(_0x35ecaf){const _0x418c17=a93_0x1870d4,_0xde6236=_0x35ecaf[_0x418c17(0x214)](_0x418c17(0x201))[_0x418c17(0x221)](),_0x4172af=_0x35ecaf[_0x418c17(0x214)](_0x418c17(0x212)),_0x3f402a=_0x35ecaf['str'](DESCRIPTION_FILE_FLAG)[_0x418c17(0x221)]();if(!_0x3f402a){const _0xe7082c=_0x4172af;if(!_0xe7082c[_0x418c17(0x221)]())throw CliErrors[_0x418c17(0x20e)](_0x418c17(0x1f8),_0x418c17(0x21b));const _0xe989c2=sanitizeIssueDescription(_0xe7082c);return{'title':_0xde6236,'description':_0xe989c2['description'],'descriptionSource':_0x418c17(0x1eb),'sanitize':_0xe989c2};}const _0xd7ce23=resolve(process[_0x418c17(0x20c)](),_0x3f402a),_0x32aae2=await readFile(_0xd7ce23,_0x418c17(0x222));if(!_0x32aae2[_0x418c17(0x221)]())throw CliErrors['validation'](_0x418c17(0x1fc)+_0xd7ce23,'Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.');const _0x3534df=sanitizeIssueDescription(_0x32aae2);return{'title':_0xde6236,'description':_0x3534df[_0x418c17(0x212)],'descriptionSource':'file','descriptionFilePath':_0xd7ce23,'sanitize':_0x3534df};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a94_0x4893(_0x4bc74a,_0x3e2958){_0x4bc74a=_0x4bc74a-0xef;const _0x1b2366=a94_0x1b23();let _0x48933f=_0x1b2366[_0x4bc74a];return _0x48933f;}const a94_0x963f84=a94_0x4893;function a94_0x1b23(){const _0x1808fc=['push','3241701tqmLaN','byteLength','pattern','kind','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','REDACTED:password','replace','6570glItoF','REDACTED:bearer-jwt','includes','REDACTED:private-key','cookie','138clcRMs','369588pbzGNC','1657806tOGjjX','string','REDACTED:authorization','password','4165832vHDhtB','4626710kSGlcg','REDACTED:cookie','private-key','subarray','21ySsIXw','authorization','toString','bearer-jwt','1026495yeuBNu','utf8','label','access-key','18CXrwLJ','REDACTED:access-key'];a94_0x1b23=function(){return _0x1808fc;};return a94_0x1b23();}(function(_0x445666,_0x1fbf1c){const _0x2534f3=a94_0x4893,_0x3b087a=_0x445666();while(!![]){try{const _0x3bc656=parseInt(_0x2534f3(0xfe))/0x1*(parseInt(_0x2534f3(0x103))/0x2)+parseInt(_0x2534f3(0xf7))/0x3+parseInt(_0x2534f3(0x104))/0x4+-parseInt(_0x2534f3(0xf0))/0x5+-parseInt(_0x2534f3(0x105))/0x6*(-parseInt(_0x2534f3(0x10e))/0x7)+-parseInt(_0x2534f3(0x109))/0x8+-parseInt(_0x2534f3(0xf4))/0x9*(parseInt(_0x2534f3(0x10a))/0xa);if(_0x3bc656===_0x1fbf1c)break;else _0x3b087a['push'](_0x3b087a['shift']());}catch(_0x44dc72){_0x3b087a['push'](_0x3b087a['shift']());}}}(a94_0x1b23,0xc43f3));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a94_0x963f84(0xfb),REDACTION_RULES=[{'kind':a94_0x963f84(0x102),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a94_0x963f84(0x10b)},{'kind':a94_0x963f84(0x10f),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a94_0x963f84(0x107)},{'kind':a94_0x963f84(0x10c),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a94_0x963f84(0x101)},{'kind':a94_0x963f84(0xf3),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a94_0x963f84(0xf5)},{'kind':a94_0x963f84(0x108),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a94_0x963f84(0xfc)},{'kind':a94_0x963f84(0xef),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a94_0x963f84(0xff)}];export function sanitizeIssueDescription(_0x1d062f){const _0x31520e=a94_0x963f84,_0x44e8fc=Buffer[_0x31520e(0xf8)](_0x1d062f,'utf8'),_0x167d26=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x5cec76=_0x1d062f,_0x29e9f6=0x0;const _0x475854=[];if(!_0x167d26)for(const _0x56a6f of REDACTION_RULES){let _0x3b7ad6=0x0;_0x5cec76=_0x5cec76[_0x31520e(0xfd)](_0x56a6f[_0x31520e(0xf9)],(_0x113b50,_0x599f19)=>{const _0x227f13=_0x31520e;_0x3b7ad6+=0x1;const _0x520306=typeof _0x599f19===_0x227f13(0x106)?_0x599f19:'';return _0x520306+'['+_0x56a6f[_0x227f13(0xf2)]+']';}),_0x3b7ad6>0x0&&(_0x29e9f6+=_0x3b7ad6,!_0x475854[_0x31520e(0x100)](_0x56a6f[_0x31520e(0xfa)])&&_0x475854[_0x31520e(0xf6)](_0x56a6f[_0x31520e(0xfa)]));}let _0x193f00=![];if(Buffer['byteLength'](_0x5cec76,'utf8')>ISSUE_DESCRIPTION_MAX_BYTES){_0x193f00=!![];const _0x48c668=Buffer[_0x31520e(0xf8)](TRUNCATION_NOTICE,_0x31520e(0xf1)),_0x7bcfa=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x48c668);_0x5cec76=sliceUtf8Bytes(_0x5cec76,_0x7bcfa)+TRUNCATION_NOTICE;}return{'description':_0x5cec76,'originalBytes':_0x44e8fc,'truncated':_0x193f00,'redactionCount':_0x29e9f6,'redactionKinds':_0x475854};}function sliceUtf8Bytes(_0x203785,_0x434cfa){const _0x22061c=a94_0x963f84;if(_0x434cfa<=0x0)return'';const _0x1cb7a7=Buffer['from'](_0x203785,'utf8');if(_0x1cb7a7[_0x22061c(0xf8)]<=_0x434cfa)return _0x203785;let _0xdf487e=_0x434cfa;while(_0xdf487e>0x0){const _0x3d5ead=_0x1cb7a7[_0xdf487e];if(_0x3d5ead===undefined||(_0x3d5ead&0xc0)!==0x80)break;_0xdf487e-=0x1;}return _0x1cb7a7[_0x22061c(0x10d)](0x0,_0xdf487e)[_0x22061c(0x110)](_0x22061c(0xf1));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a95_0x36fb(){const _0x107b37=['message','details','logs','stringify','log','read','clearLogs','toLocaleString','error','success','206799UoxBVf','Clear\x20command\x20history\x20logs','length','clear','*\x20No\x20logs\x20found','level','forEach','show','readLogs','1353IYvbKh','7626636ELqBYa','\x20\x20\x20Details:\x20','39522KpVFym','7ZJwxgb','47930LXOAjo','duration','\x20\x20\x20Time:\x20','View\x20command\x20history\x20logs','429192rpVumn','*\x20Lovrabet\x20CLI\x20logs:\x0a','write','650dfYpoM','\x20\x20\x20Duration:\x20','331244GPtlfg','16kbaFsk','7517538ZGoPcO'];a95_0x36fb=function(){return _0x107b37;};return a95_0x36fb();}const a95_0x35b2da=a95_0x4f85;function a95_0x4f85(_0x3aa1bc,_0x1aa917){_0x3aa1bc=_0x3aa1bc-0x176;const _0x36fb0a=a95_0x36fb();let _0x4f8510=_0x36fb0a[_0x3aa1bc];return _0x4f8510;}(function(_0x4feef3,_0xaaf07e){const _0x6b1e6a=a95_0x4f85,_0x28f7eb=_0x4feef3();while(!![]){try{const _0x396d6e=-parseInt(_0x6b1e6a(0x177))/0x1*(parseInt(_0x6b1e6a(0x181))/0x2)+-parseInt(_0x6b1e6a(0x18e))/0x3*(parseInt(_0x6b1e6a(0x182))/0x4)+parseInt(_0x6b1e6a(0x17f))/0x5*(parseInt(_0x6b1e6a(0x176))/0x6)+parseInt(_0x6b1e6a(0x183))/0x7+-parseInt(_0x6b1e6a(0x17c))/0x8+parseInt(_0x6b1e6a(0x198))/0x9+parseInt(_0x6b1e6a(0x178))/0xa*(-parseInt(_0x6b1e6a(0x197))/0xb);if(_0x396d6e===_0xaaf07e)break;else _0x28f7eb['push'](_0x28f7eb['shift']());}catch(_0x5e7fe3){_0x28f7eb['push'](_0x28f7eb['shift']());}}}(a95_0x36fb,0xaabee));import{logger}from'../../utils/logger.js';function printLogs(_0x2907a2){const _0x19f3ec=a95_0x4f85;if(_0x2907a2['length']===0x0){console[_0x19f3ec(0x188)](_0x19f3ec(0x192));return;}console[_0x19f3ec(0x188)](_0x19f3ec(0x17d)),_0x2907a2[_0x19f3ec(0x194)]((_0x4435fb,_0x3a7d0d)=>{const _0x45dbdd=_0x19f3ec,_0x9bad71=new Date(_0x4435fb['timestamp'])[_0x45dbdd(0x18b)]('en-US'),_0x27dceb=_0x4435fb[_0x45dbdd(0x193)]===_0x45dbdd(0x18d)?'√':_0x4435fb[_0x45dbdd(0x193)]===_0x45dbdd(0x18c)?'×':_0x4435fb[_0x45dbdd(0x193)]==='warn'?'!':'i';console[_0x45dbdd(0x188)](_0x3a7d0d+0x1+'.\x20'+_0x27dceb+'\x20['+_0x4435fb['command']+']\x20'+_0x4435fb[_0x45dbdd(0x184)]),console[_0x45dbdd(0x188)](_0x45dbdd(0x17a)+_0x9bad71),_0x4435fb['duration']&&console[_0x45dbdd(0x188)](_0x45dbdd(0x180)+_0x4435fb[_0x45dbdd(0x179)]+'ms'),_0x4435fb['details']&&Object['keys'](_0x4435fb[_0x45dbdd(0x185)])[_0x45dbdd(0x190)]>0x0&&console[_0x45dbdd(0x188)](_0x45dbdd(0x199)+JSON[_0x45dbdd(0x187)](_0x4435fb[_0x45dbdd(0x185)],null,0x2)),console[_0x45dbdd(0x188)]('');});}export const logsDefinitions=[{'service':a95_0x35b2da(0x186),'command':a95_0x35b2da(0x195),'description':a95_0x35b2da(0x17b),'risk':a95_0x35b2da(0x189),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x466f2a){const _0x3daffc=a95_0x35b2da;return printLogs(logger[_0x3daffc(0x196)]()),{'ok':!![]};}},{'service':a95_0x35b2da(0x186),'command':a95_0x35b2da(0x191),'description':a95_0x35b2da(0x18f),'risk':a95_0x35b2da(0x17e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2bfbff){const _0x241920=a95_0x35b2da;return logger[_0x241920(0x18a)](),console[_0x241920(0x188)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a96_0x1d26(){const _0x31ef53=['2611zQGMCz','10PnJzRb','4NuiLru','121IuUWQC','1722738svdgNh','12lljdyM','4313148NQIzhI','551253nzVCrI','226685AKyuSc','27080qCJmia','7266393OuHScP','2096932WaFeaz'];a96_0x1d26=function(){return _0x31ef53;};return a96_0x1d26();}(function(_0xa25910,_0x532227){const _0x13e0e8=a96_0x1569,_0x4ec3fe=_0xa25910();while(!![]){try{const _0x5c2a09=parseInt(_0x13e0e8(0xfd))/0x1*(-parseInt(_0x13e0e8(0x104))/0x2)+parseInt(_0x13e0e8(0x106))/0x3+-parseInt(_0x13e0e8(0x101))/0x4+parseInt(_0x13e0e8(0xfe))/0x5*(-parseInt(_0x13e0e8(0x107))/0x6)+parseInt(_0x13e0e8(0x102))/0x7*(-parseInt(_0x13e0e8(0xff))/0x8)+parseInt(_0x13e0e8(0x100))/0x9*(-parseInt(_0x13e0e8(0x103))/0xa)+parseInt(_0x13e0e8(0x105))/0xb*(parseInt(_0x13e0e8(0xfc))/0xc);if(_0x5c2a09===_0x532227)break;else _0x4ec3fe['push'](_0x4ec3fe['shift']());}catch(_0x62830d){_0x4ec3fe['push'](_0x4ec3fe['shift']());}}}(a96_0x1d26,0xb4cda));function a96_0x1569(_0x12e5e9,_0x3845bd){_0x12e5e9=_0x12e5e9-0xfc;const _0x1d2637=a96_0x1d26();let _0x15697e=_0x1d2637[_0x12e5e9];return _0x15697e;}import{menuList}from'../../commands/menu/list.js';import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuList,menuSync,menuUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x29463b=a97_0x1e7c;(function(_0x2a7c47,_0x266764){const _0x1a9cde=a97_0x1e7c,_0x4618af=_0x2a7c47();while(!![]){try{const _0x225640=parseInt(_0x1a9cde(0x8a))/0x1+parseInt(_0x1a9cde(0x99))/0x2*(parseInt(_0x1a9cde(0x8f))/0x3)+-parseInt(_0x1a9cde(0x75))/0x4+parseInt(_0x1a9cde(0x76))/0x5+parseInt(_0x1a9cde(0x86))/0x6+parseInt(_0x1a9cde(0x91))/0x7*(-parseInt(_0x1a9cde(0x94))/0x8)+-parseInt(_0x1a9cde(0x8e))/0x9*(parseInt(_0x1a9cde(0x8b))/0xa);if(_0x225640===_0x266764)break;else _0x4618af['push'](_0x4618af['shift']());}catch(_0xe34d09){_0x4618af['push'](_0x4618af['shift']());}}}(a97_0x49ef,0xb81ca));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a97_0x49ef(){const _0x42e2db=['push','visible','4443942hyFzuG','index','POSITIVE_INFINITY','children','1487190VUZejH','45420kTZWjU','cookie','label','2691bBNrxN','13428QopzMC','menu','3345559dcXjQK','item','Found\x20','8RiNfyI','read','length','extend','sort','224mzOXhQ','string','1785072zIMNvd','1536130Vmhvli','number','depth','parentId','path','isFinite','boolean','parse','verbose','appCode','isArray','List\x20online\x20menu\x20facts\x20for\x20the\x20current\x20app','map','No\x20menus\x20found.'];a97_0x49ef=function(){return _0x42e2db;};return a97_0x49ef();}import{getMenuTree}from'../../core/api-client.js';export const menuList={'service':a97_0x29463b(0x90),'command':'list','description':a97_0x29463b(0x81),'risk':a97_0x29463b(0x95),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a97_0x29463b(0x7e),'type':a97_0x29463b(0x7c),'description':'Return\x20extend\x20field\x20for\x20troubleshooting\x20resource\x20parsing'}],async 'execute'(_0x1e90ca){const _0x3cd14d=a97_0x29463b,_0x550827=_0x1e90ca['bool'](_0x3cd14d(0x7e)),_0x1e5bb4=await getMenuTree(_0x1e90ca[_0x3cd14d(0x7f)],_0x1e90ca[_0x3cd14d(0x8c)]),_0x16e6e9=flattenMenuItems(Array[_0x3cd14d(0x80)](_0x1e5bb4)?_0x1e5bb4:[],{'verbose':_0x550827,'parentId':null,'depth':0x0});return{'ok':!![],'data':{'total':_0x16e6e9[_0x3cd14d(0x96)],'menus':_0x16e6e9},'message':_0x16e6e9[_0x3cd14d(0x96)]===0x0?_0x3cd14d(0x83):_0x3cd14d(0x93)+_0x16e6e9[_0x3cd14d(0x96)]+'\x20menu(s)'};}};function a97_0x1e7c(_0x487502,_0x5d2f95){_0x487502=_0x487502-0x74;const _0x49ef80=a97_0x49ef();let _0x1e7c11=_0x49ef80[_0x487502];return _0x1e7c11;}function flattenMenuItems(_0x123d62,_0x4f4050){const _0x17f418=a97_0x29463b,_0xdec529=sortMenuItems(_0x123d62),_0x560aa5=[];for(const _0x2064f4 of _0xdec529){_0x560aa5['push'](toMenuListItem(_0x2064f4,_0x4f4050)),Array[_0x17f418(0x80)](_0x2064f4[_0x17f418(0x89)])&&_0x2064f4[_0x17f418(0x89)]['length']>0x0&&_0x560aa5[_0x17f418(0x84)](...flattenMenuItems(_0x2064f4[_0x17f418(0x89)],{'verbose':_0x4f4050[_0x17f418(0x7e)],'parentId':_0x2064f4['id'],'depth':_0x4f4050[_0x17f418(0x78)]+0x1}));}return _0x560aa5;}function sortMenuItems(_0x22836b){const _0x21ebb3=a97_0x29463b;return _0x22836b[_0x21ebb3(0x82)]((_0x19795a,_0x3066ef)=>({'item':_0x19795a,'index':_0x3066ef}))['sort']((_0x2ce9e8,_0x3a828c)=>{const _0x29b0cd=_0x21ebb3,_0x55f2c7=normalizeSort(_0x2ce9e8[_0x29b0cd(0x92)][_0x29b0cd(0x98)]),_0x806134=normalizeSort(_0x3a828c[_0x29b0cd(0x92)][_0x29b0cd(0x98)]);if(_0x55f2c7!==_0x806134)return _0x55f2c7-_0x806134;return _0x2ce9e8[_0x29b0cd(0x87)]-_0x3a828c[_0x29b0cd(0x87)];})[_0x21ebb3(0x82)](({item:_0x515879})=>_0x515879);}function toMenuListItem(_0x1da8c5,_0x129ef1){const _0x5eea7e=a97_0x29463b,_0x1e22a9={'id':_0x1da8c5['id'],'parentId':_0x129ef1[_0x5eea7e(0x79)],'depth':_0x129ef1[_0x5eea7e(0x78)],'label':normalizeString(_0x1da8c5[_0x5eea7e(0x8d)]),'path':normalizeString(_0x1da8c5[_0x5eea7e(0x7a)]),'type':normalizeString(_0x1da8c5['type']),'visible':typeof _0x1da8c5[_0x5eea7e(0x85)]===_0x5eea7e(0x7c)?_0x1da8c5[_0x5eea7e(0x85)]:null,'sort':typeof _0x1da8c5['sort']===_0x5eea7e(0x77)&&Number[_0x5eea7e(0x7b)](_0x1da8c5[_0x5eea7e(0x98)])?_0x1da8c5[_0x5eea7e(0x98)]:null,'resources':normalizeResources(_0x1da8c5[_0x5eea7e(0x97)]?.['resources'])};return _0x129ef1[_0x5eea7e(0x7e)]&&(_0x1e22a9[_0x5eea7e(0x97)]=_0x1da8c5['extend']??null),_0x1e22a9;}function normalizeSort(_0x235ec1){const _0x2b1e33=a97_0x29463b;return typeof _0x235ec1===_0x2b1e33(0x77)&&Number['isFinite'](_0x235ec1)?_0x235ec1:Number[_0x2b1e33(0x88)];}function normalizeString(_0x462ac3){const _0x302eb2=a97_0x29463b;return typeof _0x462ac3===_0x302eb2(0x74)?_0x462ac3:'';}function normalizeResources(_0x52db7d){const _0x110da7=a97_0x29463b;if(Array[_0x110da7(0x80)](_0x52db7d))return _0x52db7d['map'](String);if(typeof _0x52db7d!==_0x110da7(0x74))return[];try{const _0x5dc580=JSON[_0x110da7(0x7d)](_0x52db7d);return Array['isArray'](_0x5dc580)?_0x5dc580[_0x110da7(0x82)](String):[];}catch{return[];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a98_0x7f4b(_0x5a2cda,_0x3f4711){_0x5a2cda=_0x5a2cda-0x179;const _0x549960=a98_0x5499();let _0x7f4bf5=_0x549960[_0x5a2cda];return _0x7f4bf5;}(function(_0x1127ef,_0x1bce82){const _0x30522=a98_0x7f4b,_0x14f09b=_0x1127ef();while(!![]){try{const _0x4679a3=-parseInt(_0x30522(0x18f))/0x1+-parseInt(_0x30522(0x194))/0x2*(parseInt(_0x30522(0x185))/0x3)+parseInt(_0x30522(0x18d))/0x4*(-parseInt(_0x30522(0x182))/0x5)+-parseInt(_0x30522(0x192))/0x6+parseInt(_0x30522(0x17d))/0x7+parseInt(_0x30522(0x186))/0x8*(parseInt(_0x30522(0x17f))/0x9)+parseInt(_0x30522(0x17b))/0xa;if(_0x4679a3===_0x1bce82)break;else _0x14f09b['push'](_0x14f09b['shift']());}catch(_0x2179fd){_0x14f09b['push'](_0x14f09b['shift']());}}}(a98_0x5499,0xeb726));function strWidth(_0x1a5aee){const _0x529364=a98_0x7f4b;let _0x781557=0x0;for(const _0x4e83f0 of _0x1a5aee){_0x781557+=/[\u4e00-\u9fa5]/[_0x529364(0x189)](_0x4e83f0)?0x2:0x1;}return _0x781557;}function a98_0x5499(){const _0x2bd38e=['164nUItJT','map','609798mMmTii','online','push','6322980tLdHWK','label','2ElgMsN','join','length','max','(unchanged)','25357210KrdvZd','showOnline','12646123WvyRAl','repeat','18uZRqSn','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','\x20\x20\x20\x20CSS:\x20','221035rVzsXD','\x20\x20No\x20pages\x20to\x20sync.','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','641211kHKOPg','1247728QMLtjz','Local','Platform','test','\x20\x20Affected\x20menus:\x20','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];a98_0x5499=function(){return _0x2bd38e;};return a98_0x5499();}function padRight(_0x444a80,_0x131ade){const _0x40d73a=a98_0x7f4b,_0xd1390a=strWidth(_0x444a80);return _0x444a80+'\x20'[_0x40d73a(0x17e)](Math[_0x40d73a(0x179)](0x0,_0x131ade-_0xd1390a));}export function renderCompareTable(_0x7cd47f,_0x2b89d6={}){const _0x238163=a98_0x7f4b;if(_0x7cd47f[_0x238163(0x196)]===0x0)return'';const _0x3049d1=_0x2b89d6[_0x238163(0x17c)]??!![],_0x33790c=Math[_0x238163(0x179)](0x1e,..._0x7cd47f[_0x238163(0x18e)](_0x39bc32=>strWidth(_0x39bc32[_0x238163(0x193)]))),_0x20b19e=0x4,_0x17aaad=[],_0x5d8c95='\x20\x20'+padRight('Menu\x20Name',_0x33790c),_0x2b4ed9=padRight(_0x238163(0x187),_0x20b19e),_0x2b69d1=_0x3049d1?'\x20\x20'+padRight(_0x238163(0x188),_0x20b19e):'';_0x17aaad['push'](_0x5d8c95+'\x20\x20'+_0x2b4ed9+(_0x3049d1?_0x2b69d1:'')),_0x17aaad['push']('\x20\x20'+'─'[_0x238163(0x17e)](_0x33790c)+'\x20\x20'+'─'[_0x238163(0x17e)](_0x20b19e)+(_0x3049d1?'\x20\x20'+'─'[_0x238163(0x17e)](_0x20b19e):''));for(const _0x43677c of _0x7cd47f){const _0x3d47ab=padRight(_0x43677c[_0x238163(0x193)],_0x33790c),_0x51767d=_0x43677c['local']?'✓':'✗',_0x1553cf=padRight(_0x51767d,_0x20b19e);let _0x32d9c3='\x20\x20'+_0x3d47ab+'\x20\x20'+_0x1553cf;if(_0x3049d1){const _0x199653=_0x43677c[_0x238163(0x190)]?'✓':'✗';_0x32d9c3+='\x20\x20'+padRight(_0x199653,_0x20b19e);}_0x17aaad[_0x238163(0x191)](_0x32d9c3);}return _0x17aaad[_0x238163(0x195)]('\x0a');}export function renderSyncSummary(_0x4080d9,_0x2d8869){const _0x157d45=a98_0x7f4b;if(_0x4080d9['length']===0x0)return _0x2d8869?_0x157d45(0x18b):_0x157d45(0x183);const _0x1d6c56=['\x20\x20'+_0x4080d9[_0x157d45(0x196)]+_0x157d45(0x18c)];for(const _0x290af2 of _0x4080d9){_0x1d6c56['push']('\x20\x20\x20\x20•\x20'+_0x290af2[_0x157d45(0x193)]+'\x20('+_0x290af2['path']+')');}return _0x1d6c56[_0x157d45(0x195)]('\x0a');}export function renderUpdateSummary(_0x2701e8,_0x4d9586){const _0xf71e69=a98_0x7f4b;if(_0x2701e8[_0xf71e69(0x196)]===0x0)return _0xf71e69(0x184);const _0x3e90a7=['\x20\x20'+_0x2701e8[_0xf71e69(0x196)]+_0xf71e69(0x180),'\x20\x20\x20\x20JS:\x20\x20'+(_0x4d9586[0x0]??_0xf71e69(0x17a)),_0xf71e69(0x181)+(_0x4d9586[0x1]??_0xf71e69(0x17a)),'',_0xf71e69(0x18a)+_0x2701e8[_0xf71e69(0x195)](',\x20')];return _0x3e90a7[_0xf71e69(0x195)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a522c,_0x1d7d8c){var _0x3aaa6f=a99_0x48b2,_0x24394f=_0x5a522c();while(!![]){try{var _0x1722ac=-parseInt(_0x3aaa6f(0xbf))/0x1+-parseInt(_0x3aaa6f(0xbc))/0x2+-parseInt(_0x3aaa6f(0xba))/0x3*(parseInt(_0x3aaa6f(0xb8))/0x4)+parseInt(_0x3aaa6f(0xb9))/0x5*(parseInt(_0x3aaa6f(0xc0))/0x6)+-parseInt(_0x3aaa6f(0xc1))/0x7+parseInt(_0x3aaa6f(0xbe))/0x8*(-parseInt(_0x3aaa6f(0xbd))/0x9)+parseInt(_0x3aaa6f(0xc2))/0xa*(parseInt(_0x3aaa6f(0xbb))/0xb);if(_0x1722ac===_0x1d7d8c)break;else _0x24394f['push'](_0x24394f['shift']());}catch(_0x510825){_0x24394f['push'](_0x24394f['shift']());}}}(a99_0x3b1b,0x812af));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';function a99_0x3b1b(){var _0x145ada=['308WNZhie','4190iOAxVu','36741HziQZQ','43664313uKuBqT','1354654NRAhNO','18CWoFbU','2999624VqPHGT','636519nUXbXb','1710Bciwao','4707297LpoMab','10HzSdJz'];a99_0x3b1b=function(){return _0x145ada;};return a99_0x3b1b();}function a99_0x48b2(_0x62661b,_0x55a45d){_0x62661b=_0x62661b-0xb8;var _0x3b1be7=a99_0x3b1b();var _0x48b28d=_0x3b1be7[_0x62661b];return _0x48b28d;}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(_0x116b65,_0x21ba9e){const _0x3a03c4=a100_0x187d,_0x4e8477=_0x116b65();while(!![]){try{const _0x3ee2bb=parseInt(_0x3a03c4(0x1a7))/0x1*(-parseInt(_0x3a03c4(0x1c3))/0x2)+-parseInt(_0x3a03c4(0x1b7))/0x3+-parseInt(_0x3a03c4(0x1b9))/0x4*(parseInt(_0x3a03c4(0x1a2))/0x5)+parseInt(_0x3a03c4(0x1a1))/0x6*(parseInt(_0x3a03c4(0x1a9))/0x7)+parseInt(_0x3a03c4(0x1b1))/0x8*(parseInt(_0x3a03c4(0x1b8))/0x9)+parseInt(_0x3a03c4(0x1bf))/0xa*(-parseInt(_0x3a03c4(0x1c9))/0xb)+parseInt(_0x3a03c4(0x1c5))/0xc;if(_0x3ee2bb===_0x21ba9e)break;else _0x4e8477['push'](_0x4e8477['shift']());}catch(_0x2f08dc){_0x4e8477['push'](_0x4e8477['shift']());}}}(a100_0x59c4,0x4f7d4));function a100_0x187d(_0x110b45,_0x495558){_0x110b45=_0x110b45-0x19e;const _0x59c4d7=a100_0x59c4();let _0x187dd5=_0x59c4d7[_0x110b45];return _0x187dd5;}import a100_0x512bae from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a100_0x42892c from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';function a100_0x59c4(){const _0x5aa573=['gray','30zJiXKy','isTTY','path','No\x20menus\x20selected.','1732xfplLW','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','10590948bYKVXq','No\x20local\x20pages\x20found.','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','\x20\x20Checking\x20CSS\x20URL\x20reachability...','2226422okALbd','stdin','label','test','4428mamEam','30ICgaFd','cancelled','\x20\x20JS\x20URL:','green','map','1CmxrZU','Cancelled.','147ECnXQH','\x20\x20Checking\x20JS\x20URL\x20reachability...','JS\x20URL\x20checked','has','name','filter','succeed','ExitPromptError','437464hXdRlf','length','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','trim','error','catch','161598QbpMvV','45fQGjKi','122644ugzEDs','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','JS\x20URL\x20check\x20failed','red','includes'];a100_0x59c4=function(){return _0x5aa573;};return a100_0x59c4();}import{CliErrors}from'../../../errors.js';function onCancel(_0x4b1891){const _0x1ed176=a100_0x187d;return _0x4b1891[_0x1ed176(0x1b6)](_0x47fbc0=>{const _0x57f941=_0x1ed176;if(_0x47fbc0?.[_0x57f941(0x1ad)]===_0x57f941(0x1b0))throw CliErrors[_0x57f941(0x1a3)](_0x57f941(0x1a8));throw _0x47fbc0;});}export function startSpinner(_0x457e12){return a100_0x42892c({'text':_0x457e12,'color':'cyan'})['start']();}export function stopSpinner(_0x59cee4,_0x59c2ae,_0x4ff98b){const _0x4cfe20=a100_0x187d;_0x4ff98b?_0x59cee4[_0x4cfe20(0x1af)](_0x59c2ae):_0x59cee4['fail'](_0x59c2ae);}export async function askConfirm(_0x488959){return onCancel(confirm({'message':_0x488959,'theme':{'prefix':''}}));}export async function askJsUrl(_0x2446ed){const _0x16a80d=a100_0x187d;while(!![]){const _0x3270bc=await onCancel(input({'message':_0x16a80d(0x1a4),'default':_0x2446ed,'theme':{'prefix':''}}));if(_0x3270bc[_0x16a80d(0x1b4)]()==='')throw CliErrors[_0x16a80d(0x1a3)](_0x16a80d(0x1a8));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x16a80d(0x1a0)](_0x3270bc[_0x16a80d(0x1b4)]())){console[_0x16a80d(0x1b5)](a100_0x512bae['red']('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x4c3f08=startSpinner(_0x16a80d(0x1aa));try{const _0x3726e8=await isUrlReachable(_0x3270bc['trim']());stopSpinner(_0x4c3f08,_0x16a80d(0x1ab),_0x3726e8);if(!_0x3726e8){console[_0x16a80d(0x1b5)](a100_0x512bae[_0x16a80d(0x1bc)](_0x16a80d(0x1c4)));continue;}return _0x3270bc['trim']();}catch(_0x3d37b5){stopSpinner(_0x4c3f08,_0x16a80d(0x1bb),![]);throw _0x3d37b5;}}}export async function askCssUrl(_0x547ef8){const _0x4f64d0=a100_0x187d;while(!![]){const _0x2d83a7=await onCancel(input({'message':'\x20\x20CSS\x20URL:','default':_0x547ef8,'theme':{'prefix':''}}));if(_0x2d83a7[_0x4f64d0(0x1b4)]()==='')throw CliErrors[_0x4f64d0(0x1a3)](_0x4f64d0(0x1a8));if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x2d83a7[_0x4f64d0(0x1b4)]())){console['error'](a100_0x512bae[_0x4f64d0(0x1bc)]('\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'));continue;}const _0xe1381b=startSpinner(_0x4f64d0(0x1c8));try{const _0x2c9757=await isUrlReachable(_0x2d83a7[_0x4f64d0(0x1b4)]());stopSpinner(_0xe1381b,'CSS\x20URL\x20checked',_0x2c9757);if(!_0x2c9757){console['error'](a100_0x512bae[_0x4f64d0(0x1bc)](_0x4f64d0(0x1ba)));continue;}return _0x2d83a7['trim']();}catch(_0x51aebc){stopSpinner(_0xe1381b,'CSS\x20URL\x20check\x20failed',![]);throw _0x51aebc;}}}export async function selectPages(_0xdff93b,_0x262479,_0x1a6870){const _0x3bf5cf=a100_0x187d,_0x3a73c6=_0xdff93b[_0x3bf5cf(0x1a6)](_0x2c8463=>({'name':_0x2c8463[_0x3bf5cf(0x19f)]+'\x20\x20'+(_0x262479['has'](_0x2c8463[_0x3bf5cf(0x1c1)])?a100_0x512bae[_0x3bf5cf(0x1be)]('[already\x20on\x20platform]'):a100_0x512bae[_0x3bf5cf(0x1a5)]('[new]')),'value':_0x2c8463[_0x3bf5cf(0x19f)],'checked':_0x1a6870?_0x1a6870['includes'](_0x2c8463[_0x3bf5cf(0x19f)]):!_0x262479[_0x3bf5cf(0x1ac)](_0x2c8463['path'])}));if(_0x3a73c6[_0x3bf5cf(0x1b2)]===0x0)throw new Error(_0x3bf5cf(0x1c6));const _0x5b31a7=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x3a73c6,'loop':![],'theme':{'prefix':''}}));if(_0x5b31a7[_0x3bf5cf(0x1b2)]===0x0)throw new Error(_0x3bf5cf(0x1c2));return _0xdff93b[_0x3bf5cf(0x1ae)](_0x44f571=>_0x5b31a7[_0x3bf5cf(0x1bd)](_0x44f571[_0x3bf5cf(0x19f)]));}export function isInteractive(){const _0x566874=a100_0x187d;return process[_0x566874(0x19e)][_0x566874(0x1c0)]===!![];}export function requireInteractive(){const _0x202a2c=a100_0x187d;if(!isInteractive())throw new Error(_0x202a2c(0x1c7)+_0x202a2c(0x1b3));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x4ec978=a101_0xa8af;(function(_0x593d91,_0x21b316){const _0x2a5742=a101_0xa8af,_0x33d329=_0x593d91();while(!![]){try{const _0x339325=parseInt(_0x2a5742(0x15f))/0x1+parseInt(_0x2a5742(0x154))/0x2+parseInt(_0x2a5742(0x14e))/0x3*(-parseInt(_0x2a5742(0x15c))/0x4)+-parseInt(_0x2a5742(0x14b))/0x5*(-parseInt(_0x2a5742(0x150))/0x6)+-parseInt(_0x2a5742(0x15b))/0x7*(parseInt(_0x2a5742(0x15e))/0x8)+-parseInt(_0x2a5742(0x162))/0x9+parseInt(_0x2a5742(0x14d))/0xa*(-parseInt(_0x2a5742(0x15a))/0xb);if(_0x339325===_0x21b316)break;else _0x33d329['push'](_0x33d329['shift']());}catch(_0x10119c){_0x33d329['push'](_0x33d329['shift']());}}}(a101_0xd16b,0xcc29f));function a101_0xa8af(_0x166b44,_0x1e6580){_0x166b44=_0x166b44-0x14a;const _0xd16b4c=a101_0xd16b();let _0xa8af88=_0xd16b4c[_0x166b44];return _0xa8af88;}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a101_0x4ec978(0x15d)](),'src/pages');export function extractTitleFromComment(_0x52384e){const _0x3e5299=a101_0x4ec978;try{const _0x53ada7=readFileSync(_0x52384e,_0x3e5299(0x157)),_0x564cf9=_0x53ada7['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x564cf9&&_0x564cf9[0x1]){const _0xce8796=_0x564cf9[0x1],_0x1d6101=_0xce8796['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x1d6101&&_0x1d6101[0x1])return _0x1d6101[0x1][_0x3e5299(0x158)]();}let _0x5b3322=null;const _0x3342a9=_0x53ada7['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x3342a9&&_0x3342a9[0x1]&&(_0x5b3322=_0x3342a9[0x1]);if(!_0x5b3322){const _0x3432e6=_0x53ada7[_0x3e5299(0x152)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x3432e6&&_0x3432e6[0x1]&&(_0x5b3322=_0x3432e6[0x1]);}if(_0x5b3322){const _0x2a7fef=new RegExp('\x5cb'+_0x5b3322+_0x3e5299(0x14f)),_0x3fc481=_0x53ada7[_0x3e5299(0x152)](_0x2a7fef);if(_0x3fc481&&_0x3fc481[0x1])return _0x3fc481[0x1];return _0x5b3322;}return null;}catch(_0x4d36a8){return null;}}function a101_0xd16b(){const _0x26e4e6=['1893LgKDJe','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','18NlkHxY','join','match','concat','1524430rSkWJC','endsWith','split','utf-8','trim','forEach','1624997WWubtR','7bRXpjH','5420iqGWYU','cwd','72184hVsoET','771384nRIdcC','isDirectory','replace','11139723oWbWfr','push','2586930IZXLku','slice','10BSUmQm'];a101_0xd16b=function(){return _0x26e4e6;};return a101_0xd16b();}export function getLocalPages(_0x1c068c=pagesDir,_0xcb4c31=pagesDir){const _0x526ba3=a101_0x4ec978;let _0x54e22a=[];const _0x1d9304=readdirSync(_0x1c068c);return _0x1d9304[_0x526ba3(0x159)](_0x473db2=>{const _0x547a38=_0x526ba3,_0x39bf3a=join(_0x1c068c,_0x473db2),_0x15d617=statSync(_0x39bf3a);if(_0x15d617&&_0x15d617[_0x547a38(0x160)]())_0x54e22a=_0x54e22a[_0x547a38(0x153)](getLocalPages(_0x39bf3a,_0xcb4c31));else{if(_0x473db2['endsWith']('.tsx')){let _0xf42f61=relative(_0xcb4c31,_0x39bf3a);_0xf42f61['endsWith']('index.tsx')?_0xf42f61=_0xf42f61[_0x547a38(0x161)](/index\.tsx$/,''):_0xf42f61=_0xf42f61[_0x547a38(0x161)](/\.tsx$/,'');_0xf42f61[_0x547a38(0x155)](sep)&&(_0xf42f61=_0xf42f61[_0x547a38(0x14c)](0x0,-0x1));const _0x4c0921=_0xf42f61[_0x547a38(0x156)](sep)[_0x547a38(0x151)]('/'),_0x20825a=extractTitleFromComment(_0x39bf3a),_0x5ca507=_0x20825a||_0x4c0921;_0x54e22a[_0x547a38(0x14a)]({'path':_0x4c0921['replaceAll']('$',':'),'label':_0x5ca507});}}}),_0x54e22a['filter'](_0x1ce811=>_0x1ce811['path']!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46c194,_0x2abef0){const _0x165b7a=a102_0x4d45,_0x4c2609=_0x46c194();while(!![]){try{const _0x12ad03=-parseInt(_0x165b7a(0x189))/0x1+-parseInt(_0x165b7a(0x188))/0x2+parseInt(_0x165b7a(0x18d))/0x3*(-parseInt(_0x165b7a(0x1a7))/0x4)+parseInt(_0x165b7a(0x195))/0x5+parseInt(_0x165b7a(0x196))/0x6*(parseInt(_0x165b7a(0x192))/0x7)+parseInt(_0x165b7a(0x194))/0x8*(parseInt(_0x165b7a(0x18f))/0x9)+-parseInt(_0x165b7a(0x19f))/0xa;if(_0x12ad03===_0x2abef0)break;else _0x4c2609['push'](_0x4c2609['shift']());}catch(_0x2ec14d){_0x4c2609['push'](_0x4c2609['shift']());}}}(a102_0x5035,0x45966));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(_0x462ea7){const _0x5829c9=a102_0x4d45,_0x2c62d0=[];return!isValidJsHttpsUrl(_0x462ea7)&&_0x2c62d0['push'](_0x5829c9(0x1a5)),{'ok':_0x2c62d0[_0x5829c9(0x191)]===0x0,'errors':_0x2c62d0};}export function validateCssUrl(_0x59445c){const _0x574819=a102_0x4d45,_0x1c2117=[];return!isValidCssHttpsUrl(_0x59445c)&&_0x1c2117[_0x574819(0x197)](_0x574819(0x18a)),{'ok':_0x1c2117[_0x574819(0x191)]===0x0,'errors':_0x1c2117};}export async function validateJsUrlReachable(_0x4e280e){const _0x46b678=a102_0x4d45,_0x41fd17=validateJsUrl(_0x4e280e);if(!_0x41fd17['ok'])return _0x41fd17;const _0x125488=await isUrlReachable(_0x4e280e);if(!_0x125488)_0x41fd17['errors'][_0x46b678(0x197)](_0x46b678(0x199));return{'ok':_0x41fd17[_0x46b678(0x1a2)][_0x46b678(0x191)]===0x0,'errors':_0x41fd17['errors']};}export async function validateCssUrlReachable(_0x4c8e62){const _0x546386=a102_0x4d45,_0x576d54=validateCssUrl(_0x4c8e62);if(!_0x576d54['ok'])return _0x576d54;const _0x1d4b4c=await isUrlReachable(_0x4c8e62);if(!_0x1d4b4c)_0x576d54[_0x546386(0x1a2)][_0x546386(0x197)](_0x546386(0x19a));return{'ok':_0x576d54['errors']['length']===0x0,'errors':_0x576d54[_0x546386(0x1a2)]};}export function buildCompareRows(_0x70b28f,_0x3c8c50){const _0x2656c9=a102_0x4d45;return _0x70b28f[_0x2656c9(0x19b)](_0xa4f301=>({'label':_0xa4f301[_0x2656c9(0x18b)],'path':_0xa4f301['path'],'local':!![],'online':_0x3c8c50[_0x2656c9(0x1a0)](_0xa4f301[_0x2656c9(0x198)])}));}export function filterNewPages(_0x33e0b8,_0x41ff43,_0x29ab1b){const _0x3b247b=a102_0x4d45;if(_0x29ab1b&&_0x29ab1b[_0x3b247b(0x191)]>0x0){const _0x1d84db=new Set(_0x29ab1b[_0x3b247b(0x19b)](_0x131546=>_0x131546[_0x3b247b(0x1a6)]())),_0x45693d=_0x33e0b8['filter'](_0x5b1c14=>_0x1d84db[_0x3b247b(0x1a0)](_0x5b1c14[_0x3b247b(0x18b)]));if(_0x45693d['length']===0x0)throw new Error(_0x3b247b(0x1a4)+[..._0x1d84db][_0x3b247b(0x19e)](',\x20'));return _0x45693d;}return _0x33e0b8[_0x3b247b(0x193)](_0x5dc34d=>!_0x41ff43[_0x3b247b(0x1a0)](_0x5dc34d[_0x3b247b(0x198)]));}export function filterPagesByLabels(_0x225ed1,_0x5c59ae){const _0x3ae49f=a102_0x4d45,_0x2fedc8=[],_0xf70641=[];for(const _0xf2f3ac of _0x5c59ae){const _0x17f98f=_0xf2f3ac['trim'](),_0xf3244=_0x225ed1['find'](_0x5bc06e=>_0x5bc06e['label']===_0x17f98f);if(_0xf3244)_0x2fedc8[_0x3ae49f(0x197)](_0xf3244);else _0xf70641[_0x3ae49f(0x197)](_0xf2f3ac);}return{'matched':_0x2fedc8,'unmatched':_0xf70641};}export async function doCreateMenus(_0x3a81af,_0x234bdd,_0x5d9d18,_0x4db5d8){const _0x218212=a102_0x4d45,_0x13d4b6=await createMenus(_0x3a81af,_0x234bdd,_0x5d9d18,_0x4db5d8);return{'created':_0x13d4b6[_0x218212(0x191)],'failed':0x0,'labels':_0x5d9d18[_0x218212(0x19b)](_0x40f0f7=>_0x40f0f7[_0x218212(0x18b)]),'menus':_0x13d4b6};}export function filterMenusWithResources(_0xa74fb7){const _0x288465=a102_0x4d45;return _0xa74fb7['filter'](_0x4843d8=>_0x4843d8[_0x288465(0x19d)][_0x288465(0x191)]>0x0);}function a102_0x5035(){const _0x47ab2f=['2649765yOfkza','18zSoHBA','push','path','JS\x20URL\x20is\x20unreachable','CSS\x20URL\x20is\x20unreachable','map','rejected','resources','join','503890EAUMSo','has','fulfilled','errors','value','No\x20local\x20pages\x20matched\x20labels:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','trim','184eLDUDZ','421486rRxHQa','537432pcrEno','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','label','allSettled','17517qDrrXr','extend','431739hbJsNV','status','length','1135022pyjBSR','filter','56wmTVZv'];a102_0x5035=function(){return _0x47ab2f;};return a102_0x5035();}export async function doUpdateCdnUrls(_0x5dc663,_0x2d4657,_0x29412c,_0x1ca1c2){const _0x395042=a102_0x4d45,_0x1c964b=_0x29412c[_0x395042(0x193)](_0x345959=>_0x345959[_0x395042(0x19d)][_0x395042(0x191)]>0x0),_0x39c5c0=await Promise[_0x395042(0x18c)](_0x1c964b['map'](_0x518ed0=>updateMenuCdnUrl(_0x5dc663,_0x2d4657,{'id':_0x518ed0['id'],'label':_0x518ed0[_0x395042(0x18b)],'path':_0x518ed0[_0x395042(0x198)],'resources':_0x1ca1c2,'extend':_0x518ed0[_0x395042(0x18e)]??null}))),_0x3887cd=_0x39c5c0[_0x395042(0x193)](_0x4c500a=>_0x4c500a[_0x395042(0x190)]===_0x395042(0x1a1))[_0x395042(0x19b)](_0x1844ec=>_0x1844ec[_0x395042(0x1a3)]),_0x11a340=_0x39c5c0[_0x395042(0x193)](_0x5d0d25=>_0x5d0d25['status']===_0x395042(0x19c))['length'];return{'updated':_0x3887cd[_0x395042(0x191)],'failed':_0x11a340,'menus':_0x3887cd};}export async function fetchMenuData(_0xb15002,_0x4253e5){const _0x5a6971=a102_0x4d45,_0x55c5c5=getLocalPages(),_0x36757e=await getOnlineMenuList(_0xb15002,_0x4253e5),_0x3dd9bc=new Set(_0x36757e[_0x5a6971(0x19b)](_0x3e3412=>_0x3e3412[_0x5a6971(0x198)]));return{'localPages':_0x55c5c5,'onlineMenuList':_0x36757e,'onlinePaths':_0x3dd9bc};}function a102_0x4d45(_0x4f44eb,_0x3154b0){_0x4f44eb=_0x4f44eb-0x188;const _0x50357b=a102_0x5035();let _0x4d45b6=_0x50357b[_0x4f44eb];return _0x4d45b6;}export async function fetchOnlineMenuList(_0x4d5454,_0x20bc45){return getOnlineMenuList(_0x4d5454,_0x20bc45);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a103_0x273c(){const _0x465a06=['path','589368ISeGHL','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Create\x20menu\x20\x22','update-menu-cdn-url','stringify','3413501tsokqV','string','resources','procode','flat','children','extend','119CWxpXG','Start\x20batch\x20menu\x20creation,\x20total\x20','info','28OWCEhl','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Updating\x20menu\x20asset\x20links:\x20','isArray','23924850rwBkBZ','create-menus','import','get-online-menu-list','create-menu','3684LqGkiL','parse','map','2538006XkQLWe','Creating\x20menu:\x20','Server\x20returned\x20empty\x20menu\x20list','229776KyOrFj','162oJfJtF','label','Fetched\x20','Menu\x20assets\x20synced:\x20','Update\x20menu\x20assets\x20\x22','Batch\x20menu\x20creation\x20completed,\x20total\x20','652265XjVWaA','length'];a103_0x273c=function(){return _0x465a06;};return a103_0x273c();}(function(_0x53e5b6,_0x341dea){const _0x13c6f5=a103_0x3927,_0xe21bc4=_0x53e5b6();while(!![]){try{const _0x599438=-parseInt(_0x13c6f5(0x1bf))/0x1*(-parseInt(_0x13c6f5(0x1cb))/0x2)+parseInt(_0x13c6f5(0x1ce))/0x3+-parseInt(_0x13c6f5(0x1c2))/0x4*(-parseInt(_0x13c6f5(0x1b0))/0x5)+-parseInt(_0x13c6f5(0x1b3))/0x6+parseInt(_0x13c6f5(0x1b8))/0x7+parseInt(_0x13c6f5(0x1d1))/0x8*(parseInt(_0x13c6f5(0x1d2))/0x9)+-parseInt(_0x13c6f5(0x1c6))/0xa;if(_0x599438===_0x341dea)break;else _0xe21bc4['push'](_0xe21bc4['shift']());}catch(_0x1e9360){_0xe21bc4['push'](_0xe21bc4['shift']());}}}(a103_0x273c,0x78309));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';function a103_0x3927(_0x1aefa6,_0x5b2ae5){_0x1aefa6=_0x1aefa6-0x1b0;const _0x273cc6=a103_0x273c();let _0x3927d0=_0x273cc6[_0x1aefa6];return _0x3927d0;}import{createMenuRecord,getMenuTree,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x31b768,_0x136ece){const _0x43773c=a103_0x3927,_0x360526=getEnv();logger[_0x43773c(0x1c1)](_0x43773c(0x1c9),isProduction(_0x360526)?_0x43773c(0x1b4)+_0x31b768+')':_0x43773c(0x1c3)+_0x31b768+')');const _0x4cdf01=await getMenuTree(_0x31b768,_0x136ece);if(!_0x4cdf01)return logger[_0x43773c(0x1c1)](_0x43773c(0x1c9),_0x43773c(0x1d0)),[];return logger[_0x43773c(0x1c1)]('get-online-menu-list',_0x43773c(0x1d4)+_0x4cdf01[_0x43773c(0x1b1)]+'\x20online\x20menus\x20successfully'),_0x4cdf01[_0x43773c(0x1cd)](flattenMenuItem)[_0x43773c(0x1bc)]();}function flattenMenuItem(_0xf7943d){const _0x1b88e3=a103_0x3927;let _0x540c29=[];try{const _0x10ffab=_0xf7943d[_0x1b88e3(0x1be)]?.[_0x1b88e3(0x1ba)];if(typeof _0x10ffab===_0x1b88e3(0x1b9)){const _0x32c8dd=JSON[_0x1b88e3(0x1cc)](_0x10ffab);if(Array[_0x1b88e3(0x1c5)](_0x32c8dd))_0x540c29=_0x32c8dd[_0x1b88e3(0x1cd)](String);}else Array[_0x1b88e3(0x1c5)](_0x10ffab)&&(_0x540c29=_0x10ffab['map'](String));}catch{}const _0x3ea222=[{'id':_0xf7943d['id'],'path':_0xf7943d[_0x1b88e3(0x1b2)],'label':_0xf7943d[_0x1b88e3(0x1d3)],'resources':_0x540c29,'extend':_0xf7943d['extend']??null}];if(_0xf7943d[_0x1b88e3(0x1bd)]&&_0xf7943d['children']['length']>0x0)for(const _0x50fc72 of _0xf7943d[_0x1b88e3(0x1bd)]){_0x3ea222['push'](...flattenMenuItem(_0x50fc72));}return _0x3ea222;}export async function createMenu(_0x3067b3,_0x1606d8,_0x40ab28){const _0x7619cc=a103_0x3927;logger[_0x7619cc(0x1c1)]('create-menu',_0x7619cc(0x1cf)+_0x40ab28['label']+'\x20('+_0x40ab28[_0x7619cc(0x1b2)]+')');const _0x23496e={'appCode':_0x3067b3,'type':_0x7619cc(0x1bb),'sort':0x0,'extend':{'loadScriptMode':_0x7619cc(0x1c8),'resources':_0x40ab28['resources']?JSON['stringify'](_0x40ab28[_0x7619cc(0x1ba)]):undefined},..._0x40ab28},_0x13ef22=await createMenuRecord(_0x23496e,_0x1606d8,_0x7619cc(0x1b5)+_0x40ab28[_0x7619cc(0x1d3)]+'\x22');return logger[_0x7619cc(0x1c1)](_0x7619cc(0x1ca),'Menu\x20created\x20successfully:\x20'+_0x40ab28[_0x7619cc(0x1d3)]),_0x13ef22;}async function createSingleMenu(_0x3db080,_0x3b8671,_0x2226ef,_0x5bf774){const _0x10ef97=a103_0x3927,_0x3dce93={'appCode':_0x3db080,'type':_0x10ef97(0x1bb),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x5bf774?JSON[_0x10ef97(0x1b7)](_0x5bf774):undefined},'label':_0x2226ef[_0x10ef97(0x1d3)],'path':_0x2226ef[_0x10ef97(0x1b2)]},_0x442b60=await createMenuRecord(_0x3dce93,_0x3b8671,_0x10ef97(0x1b5)+_0x2226ef[_0x10ef97(0x1d3)]+'\x22');return logger[_0x10ef97(0x1c1)]('create-menu','Menu\x20created\x20successfully:\x20'+_0x2226ef[_0x10ef97(0x1d3)]),_0x442b60;}export async function createMenus(_0x4b1b62,_0x10b45c,_0x461616,_0x749ca3){const _0x2f516c=a103_0x3927;logger[_0x2f516c(0x1c1)]('create-menus',_0x2f516c(0x1c0)+_0x461616[_0x2f516c(0x1b1)]);const _0x4205ef=await Promise['all'](_0x461616['map'](_0x3fd710=>createSingleMenu(_0x4b1b62,_0x10b45c,_0x3fd710,_0x749ca3)));return logger[_0x2f516c(0x1c1)](_0x2f516c(0x1c7),_0x2f516c(0x1d7)+_0x461616[_0x2f516c(0x1b1)]),_0x4205ef;}export async function updateMenuCdnUrl(_0x4cb4e5,_0x476eb4,_0x4f32e3){const _0x18827b=a103_0x3927;logger['info']('update-menu-cdn-url',_0x18827b(0x1c4)+_0x4f32e3[_0x18827b(0x1d3)]+'\x20('+_0x4f32e3[_0x18827b(0x1b2)]+')');const _0xe5edc5={'id':_0x4f32e3['id'],'appCode':_0x4cb4e5,'extend':{..._0x4f32e3[_0x18827b(0x1be)]??{},'loadScriptMode':_0x18827b(0x1c8),'resources':_0x4f32e3[_0x18827b(0x1ba)]?JSON[_0x18827b(0x1b7)](_0x4f32e3[_0x18827b(0x1ba)]):undefined}},_0x2c1057=await updateMenuRecord(_0xe5edc5,_0x476eb4,_0x18827b(0x1d6)+_0x4f32e3['label']+'\x22');return logger[_0x18827b(0x1c1)](_0x18827b(0x1b6),_0x18827b(0x1d5)+_0x4f32e3[_0x18827b(0x1d3)],undefined),_0x2c1057;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x920625,_0x5c7af9){const _0x173f7f=a104_0x124a,_0x1129e9=_0x920625();while(!![]){try{const _0x5e2c23=-parseInt(_0x173f7f(0x1bd))/0x1*(-parseInt(_0x173f7f(0x1b5))/0x2)+-parseInt(_0x173f7f(0x1e1))/0x3+parseInt(_0x173f7f(0x1de))/0x4+parseInt(_0x173f7f(0x1d5))/0x5*(parseInt(_0x173f7f(0x1c1))/0x6)+-parseInt(_0x173f7f(0x1cc))/0x7*(parseInt(_0x173f7f(0x1d6))/0x8)+-parseInt(_0x173f7f(0x1d3))/0x9+parseInt(_0x173f7f(0x1dd))/0xa;if(_0x5e2c23===_0x5c7af9)break;else _0x1129e9['push'](_0x1129e9['shift']());}catch(_0x3cc74d){_0x1129e9['push'](_0x1129e9['shift']());}}}(a104_0x386f,0x1c17c));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a104_0x124a(_0x5121fb,_0x98ba48){_0x5121fb=_0x5121fb-0x1b5;const _0x386f32=a104_0x386f();let _0x124aa5=_0x386f32[_0x5121fb];return _0x124aa5;}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a104_0x386f(){const _0x300176=['42105upJDIQ','end','map','label','setLogPath','pages','cwd','1916928ewHhzE','jsUrl','5AtDZRH','104eKasPT','length','JS\x20URL\x20is\x20unreachable:\x20','data','utf8','join','cssUrl','1081570iXrpxj','910652QcGcMi','filter','message','417093WahcyU','25010ntArNa','split','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','readableEnded','object','stdin','menu-sync','Invalid\x20--params:\x20','7XQktJe','push','CSS\x20URL\x20is\x20unreachable:\x20','info','731586cvXBtP','toString','path','string','field','isArray','parse','startsWith','No\x20local\x20pages\x20matched\x20labels:\x20','trim','Menu\x20sync\x20completed'];a104_0x386f=function(){return _0x300176;};return a104_0x386f();}import{logger}from'../../../utils/logger.js';function validateParams(_0x1e3ac6){const _0xf89e76=a104_0x124a,_0x27532f=[];return _0x1e3ac6[_0xf89e76(0x1d4)]&&!isValidJsHttpsUrl(_0x1e3ac6[_0xf89e76(0x1d4)])&&_0x27532f[_0xf89e76(0x1be)]({'field':'jsUrl','message':_0xf89e76(0x1b7)}),_0x1e3ac6[_0xf89e76(0x1dc)]&&!isValidCssHttpsUrl(_0x1e3ac6['cssUrl'])&&_0x27532f['push']({'field':_0xf89e76(0x1dc),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x27532f;}export async function runMenuSyncCore(_0x2afa2c,_0x479c29,_0x8d07d=[],_0x2fae9d){const _0x4c8d00=a104_0x124a,_0x13afe8=parseParamsFlag(_0x2fae9d),_0x193a37=_0x8d07d[_0x4c8d00(0x1d7)]>0x0?_0x8d07d:_0x13afe8['selectedLabels'],_0x10e631=_0x13afe8[_0x4c8d00(0x1d4)],_0x3492ed=_0x13afe8[_0x4c8d00(0x1dc)],_0x1e577b=[];if(_0x10e631)_0x1e577b[_0x4c8d00(0x1be)](_0x10e631);if(_0x3492ed)_0x1e577b[_0x4c8d00(0x1be)](_0x3492ed);const _0x580a10=validateParams(_0x13afe8);if(_0x580a10[_0x4c8d00(0x1d7)]>0x0){const _0x5877f4=_0x580a10[_0x4c8d00(0x1ce)](_0x557dc8=>'--params.'+_0x557dc8[_0x4c8d00(0x1c5)]+':\x20'+_0x557dc8[_0x4c8d00(0x1e0)])['join'](';\x20');throw new Error(_0x4c8d00(0x1bc)+_0x5877f4);}logger[_0x4c8d00(0x1d0)](process[_0x4c8d00(0x1d2)]()),logger[_0x4c8d00(0x1c0)](_0x4c8d00(0x1bb),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x2afa2c,'selectedCount':_0x193a37?.[_0x4c8d00(0x1d7)],'jsUrl':_0x10e631,'cssUrl':_0x3492ed});if(_0x10e631){const _0x34f9e6=await isUrlReachable(_0x10e631);if(!_0x34f9e6)throw new Error(_0x4c8d00(0x1d8)+_0x10e631);}if(_0x3492ed){const _0x42d1cf=await isUrlReachable(_0x3492ed);if(!_0x42d1cf)throw new Error(_0x4c8d00(0x1bf)+_0x3492ed);}const _0x1efc6f=getLocalPages();if(_0x1efc6f['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x276562=await getOnlineMenuList(_0x2afa2c,_0x479c29),_0x531687=new Set(_0x276562[_0x4c8d00(0x1ce)](_0x4c333f=>_0x4c333f[_0x4c8d00(0x1c3)]));let _0x21e094;if(_0x193a37&&_0x193a37[_0x4c8d00(0x1d7)]>0x0){const _0xbb9ec4=new Set(_0x193a37[_0x4c8d00(0x1ce)](_0x1a1133=>_0x1a1133[_0x4c8d00(0x1ca)]()));_0x21e094=_0x1efc6f['filter'](_0x25f1a9=>_0xbb9ec4['has'](_0x25f1a9['label']));if(_0x21e094[_0x4c8d00(0x1d7)]===0x0){const _0x3be665=_0x1efc6f[_0x4c8d00(0x1ce)](_0x3c1c9e=>_0x3c1c9e[_0x4c8d00(0x1cf)])[_0x4c8d00(0x1db)](',\x20');throw new Error(_0x4c8d00(0x1c9)+[..._0xbb9ec4][_0x4c8d00(0x1db)](',\x20')+'\x0a\x20\x20Available\x20local\x20pages:\x20'+_0x3be665);}}else _0x21e094=_0x1efc6f['filter'](_0x46124a=>!_0x531687['has'](_0x46124a['path']));if(_0x21e094[_0x4c8d00(0x1d7)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x88ec59=await createMenus(_0x2afa2c,_0x479c29,_0x21e094,_0x1e577b['length']>0x0?_0x1e577b:undefined);return logger[_0x4c8d00(0x1c0)](_0x4c8d00(0x1bb),_0x4c8d00(0x1cb),{'count':_0x21e094[_0x4c8d00(0x1d7)],'resources':_0x1e577b}),{'created':_0x88ec59['length'],'skipped':![],'targetPages':_0x21e094,'menus':_0x88ec59};}export async function readPageLabelsFromStdin(){const _0x229cf6=a104_0x124a;if(!process['stdin']['isTTY']&&!process[_0x229cf6(0x1ba)][_0x229cf6(0x1b8)])return new Promise(_0x544927=>{const _0x31a823=_0x229cf6,_0x4a6faa=[];process[_0x31a823(0x1ba)]['on'](_0x31a823(0x1d9),_0x5a1c25=>_0x4a6faa[_0x31a823(0x1be)](_0x5a1c25)),process[_0x31a823(0x1ba)]['on'](_0x31a823(0x1cd),()=>{const _0xc8747f=_0x31a823,_0x52875b=Buffer['concat'](_0x4a6faa)[_0xc8747f(0x1c2)](_0xc8747f(0x1da)),_0x49416e=_0x52875b[_0xc8747f(0x1b6)]('\x0a')[_0xc8747f(0x1ce)](_0x4f5e61=>_0x4f5e61[_0xc8747f(0x1ca)]())[_0xc8747f(0x1df)](_0x442c67=>_0x442c67[_0xc8747f(0x1d7)]>0x0&&!_0x442c67[_0xc8747f(0x1c8)]('#'));_0x544927(_0x49416e);}),setTimeout(()=>_0x544927([]),0x1f4);});return[];}function parseParamsFlag(_0x38d62d){const _0x199136=a104_0x124a;if(!_0x38d62d||typeof _0x38d62d!==_0x199136(0x1c4))return{};try{const _0x4b6ce4=JSON[_0x199136(0x1c7)](_0x38d62d);if(typeof _0x4b6ce4!==_0x199136(0x1b9)||_0x4b6ce4===null||Array[_0x199136(0x1c6)](_0x4b6ce4))return{};return{'selectedLabels':Array['isArray'](_0x4b6ce4[_0x199136(0x1d1)])?_0x4b6ce4[_0x199136(0x1d1)][_0x199136(0x1ce)](String):undefined,'jsUrl':typeof _0x4b6ce4[_0x199136(0x1d4)]===_0x199136(0x1c4)?_0x4b6ce4[_0x199136(0x1d4)][_0x199136(0x1ca)]():undefined,'cssUrl':typeof _0x4b6ce4[_0x199136(0x1dc)]===_0x199136(0x1c4)?_0x4b6ce4[_0x199136(0x1dc)][_0x199136(0x1ca)]():undefined};}catch{return{};}}
|