@lovrabet/rabetbase-cli 2.3.3 → 2.3.4-beta.2
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/README.md +99 -560
- 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-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-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/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/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/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/index.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 +19 -3
- package/lib/commands/app/use.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0xe2fccb=a91_0x43a1;(function(_0x3a47fe,_0x31d8a4){const _0x2510a2=a91_0x43a1,_0x292f10=_0x3a47fe();while(!![]){try{const _0x5dd417=parseInt(_0x2510a2(0x1b4))/0x1*(-parseInt(_0x2510a2(0x17c))/0x2)+-parseInt(_0x2510a2(0x18b))/0x3*(parseInt(_0x2510a2(0x18a))/0x4)+parseInt(_0x2510a2(0x198))/0x5+-parseInt(_0x2510a2(0x19f))/0x6+parseInt(_0x2510a2(0x182))/0x7+parseInt(_0x2510a2(0x184))/0x8+-parseInt(_0x2510a2(0x1a9))/0x9*(parseInt(_0x2510a2(0x1b3))/0xa);if(_0x5dd417===_0x31d8a4)break;else _0x292f10['push'](_0x292f10['shift']());}catch(_0x98777f){_0x292f10['push'](_0x292f10['shift']());}}}(a91_0x4bd5,0x9421c));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a91_0x43a1(_0x4df495,_0x52c840){_0x4df495=_0x4df495-0x174;const _0x4bd51b=a91_0x4bd5();let _0x43a1c9=_0x4bd51b[_0x4df495];return _0x43a1c9;}import{CliErrors}from'../../errors.js';function a91_0x4bd5(){const _0x477672=['trim','\x20secret(s):\x20','10640fJKmho','154MVQCpp','redactions:\x20','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','length','validation','file','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','\x20bytes','originalBytes','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','issue.description_redactions','658GFYKEN','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','redactionKinds','inline','join','description','5812254eobXsc','report','7900616UqfXDJ','compress','filter','descriptionFilePath','Failed\x20to\x20report\x20platform\x20issue:\x20','push','4zYVUtw','2741712EwuNHr','issue','message','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','flagMissing','str','redactionCount','utf8','truncated:\x20original\x20','Platform\x20issue\x20reported','truncated\x20from\x20','cwd','Issue\x20description\x20file\x20is\x20empty:\x20','1224245Wbxgtf','issue.title','otel://','File\x20not\x20found:\x20','descriptionSource:\x20','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','1601556jmdXEU','write','truncated','issue.description_original_bytes','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','issue.description_truncated','issue.description','title','Issue\x20description\x20cannot\x20be\x20empty.','descriptionFile:\x20','1899fOtciQ','issue.description_redaction_kinds','string','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','descriptionSource','sanitize','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','Platform\x20issue\x20reported\x20('];a91_0x4bd5=function(){return _0x477672;};return a91_0x4bd5();}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='description-file';export const issueReport={'service':a91_0xe2fccb(0x18c),'command':a91_0xe2fccb(0x183),'description':a91_0xe2fccb(0x1b6),'risk':a91_0xe2fccb(0x1a0),'requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':a91_0xe2fccb(0x185),'flags':[{'name':'title','type':a91_0xe2fccb(0x1ab),'required':!![],'description':'One-line\x20issue\x20summary'},{'name':'description','type':'string','description':a91_0xe2fccb(0x17d)},{'name':DESCRIPTION_FILE_FLAG,'type':'string','description':a91_0xe2fccb(0x18e)}],async 'validate'(_0x2b5904){const _0x6b382c=a91_0xe2fccb,_0x2311a1=_0x2b5904['str'](_0x6b382c(0x1a6))['trim'](),_0x230a61=_0x2b5904[_0x6b382c(0x190)](_0x6b382c(0x181))[_0x6b382c(0x1b1)](),_0x51cc91=_0x2b5904['str'](DESCRIPTION_FILE_FLAG)[_0x6b382c(0x1b1)]();if(!_0x2311a1)throw CliErrors[_0x6b382c(0x18f)](_0x6b382c(0x1a6),_0x6b382c(0x1a3));const _0xdc669d=_0x230a61[_0x6b382c(0x174)]>0x0,_0x3794e4=_0x51cc91['length']>0x0;if(_0xdc669d===_0x3794e4)throw CliErrors[_0x6b382c(0x175)](_0x6b382c(0x19e),_0x6b382c(0x177));if(_0x3794e4){const _0x4b7bb8=resolve(process[_0x6b382c(0x196)](),_0x51cc91);if(!existsSync(_0x4b7bb8))throw CliErrors['validation'](_0x6b382c(0x19b)+_0x4b7bb8);}},async 'dryRun'(_0x1a6ec1){const _0x56843d=a91_0xe2fccb,_0x433fad=await prepareIssueReport(_0x1a6ec1);return{'method':'POST','url':_0x56843d(0x19a)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x433fad[_0x56843d(0x1a6)],'issue.description':_0x433fad['description'],'issue.description_original_bytes':_0x433fad[_0x56843d(0x1ae)][_0x56843d(0x179)],'issue.description_truncated':_0x433fad['sanitize'][_0x56843d(0x1a1)],'issue.description_redactions':_0x433fad[_0x56843d(0x1ae)][_0x56843d(0x191)],'issue.description_redaction_kinds':_0x433fad['sanitize'][_0x56843d(0x17e)]['join'](',')}},'description':[_0x56843d(0x1af),_0x56843d(0x19c)+_0x433fad[_0x56843d(0x1ad)],_0x433fad[_0x56843d(0x187)]?_0x56843d(0x1a8)+_0x433fad[_0x56843d(0x187)]:null,_0x433fad[_0x56843d(0x1ae)][_0x56843d(0x1a1)]?_0x56843d(0x193)+_0x433fad[_0x56843d(0x1ae)][_0x56843d(0x179)]+'\x20bytes':null,_0x433fad[_0x56843d(0x1ae)][_0x56843d(0x191)]>0x0?_0x56843d(0x1b5)+_0x433fad[_0x56843d(0x1ae)]['redactionCount']+'\x20('+_0x433fad[_0x56843d(0x1ae)][_0x56843d(0x17e)][_0x56843d(0x180)](',\x20')+')':null][_0x56843d(0x186)](Boolean)[_0x56843d(0x180)]('\x0a')};},async 'execute'(_0x2d4d9c){const _0x47f6a0=a91_0xe2fccb,_0x438b2d=await prepareIssueReport(_0x2d4d9c);try{await sendPlatformIssueCollectLog({'title':_0x438b2d[_0x47f6a0(0x1a6)],'description':_0x438b2d[_0x47f6a0(0x181)],'sanitize':{'originalBytes':_0x438b2d[_0x47f6a0(0x1ae)][_0x47f6a0(0x179)],'truncated':_0x438b2d[_0x47f6a0(0x1ae)]['truncated'],'redactionCount':_0x438b2d[_0x47f6a0(0x1ae)][_0x47f6a0(0x191)],'redactionKinds':_0x438b2d[_0x47f6a0(0x1ae)]['redactionKinds']}});}catch(_0x2845ec){throw CliErrors['apiError'](_0x47f6a0(0x188)+(_0x2845ec instanceof Error?_0x2845ec[_0x47f6a0(0x18d)]:String(_0x2845ec)),_0x47f6a0(0x17a));}return{'ok':!![],'message':buildResultMessage(_0x438b2d[_0x47f6a0(0x1ae)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x47f6a0(0x199),_0x47f6a0(0x1a5),_0x47f6a0(0x1a2),_0x47f6a0(0x1a4),_0x47f6a0(0x17b),_0x47f6a0(0x1aa)],'issue':{'title':_0x438b2d[_0x47f6a0(0x1a6)],'descriptionLength':_0x438b2d[_0x47f6a0(0x181)][_0x47f6a0(0x174)],'descriptionSource':_0x438b2d['descriptionSource'],..._0x438b2d['descriptionFilePath']?{'descriptionFile':_0x438b2d[_0x47f6a0(0x187)]}:{},'sanitize':{'originalBytes':_0x438b2d[_0x47f6a0(0x1ae)][_0x47f6a0(0x179)],'truncated':_0x438b2d[_0x47f6a0(0x1ae)][_0x47f6a0(0x1a1)],'redactions':_0x438b2d[_0x47f6a0(0x1ae)][_0x47f6a0(0x191)],'redactionKinds':_0x438b2d[_0x47f6a0(0x1ae)][_0x47f6a0(0x17e)]}}}};}};function buildResultMessage(_0x101d21){const _0x1bebdd=a91_0xe2fccb,_0x245bc7=[];return _0x101d21['truncated']&&_0x245bc7[_0x1bebdd(0x189)](_0x1bebdd(0x195)+_0x101d21[_0x1bebdd(0x179)]+_0x1bebdd(0x178)),_0x101d21[_0x1bebdd(0x191)]>0x0&&_0x245bc7[_0x1bebdd(0x189)]('redacted\x20'+_0x101d21[_0x1bebdd(0x191)]+_0x1bebdd(0x1b2)+_0x101d21[_0x1bebdd(0x17e)]['join'](',\x20')),_0x245bc7[_0x1bebdd(0x174)]===0x0?_0x1bebdd(0x194):_0x1bebdd(0x1b0)+_0x245bc7[_0x1bebdd(0x180)](';\x20')+')';}async function prepareIssueReport(_0xdbca3f){const _0x68c6ba=a91_0xe2fccb,_0x237470=_0xdbca3f[_0x68c6ba(0x190)]('title')[_0x68c6ba(0x1b1)](),_0x2bd449=_0xdbca3f[_0x68c6ba(0x190)](_0x68c6ba(0x181)),_0x349d2a=_0xdbca3f[_0x68c6ba(0x190)](DESCRIPTION_FILE_FLAG)[_0x68c6ba(0x1b1)]();if(!_0x349d2a){const _0x3629c7=_0x2bd449;if(!_0x3629c7[_0x68c6ba(0x1b1)]())throw CliErrors[_0x68c6ba(0x175)](_0x68c6ba(0x1a7),_0x68c6ba(0x1ac));const _0xb12ed4=sanitizeIssueDescription(_0x3629c7);return{'title':_0x237470,'description':_0xb12ed4[_0x68c6ba(0x181)],'descriptionSource':_0x68c6ba(0x17f),'sanitize':_0xb12ed4};}const _0x1bfe23=resolve(process[_0x68c6ba(0x196)](),_0x349d2a),_0x5642c7=await readFile(_0x1bfe23,_0x68c6ba(0x192));if(!_0x5642c7[_0x68c6ba(0x1b1)]())throw CliErrors[_0x68c6ba(0x175)](_0x68c6ba(0x197)+_0x1bfe23,_0x68c6ba(0x19d));const _0x1360f2=sanitizeIssueDescription(_0x5642c7);return{'title':_0x237470,'description':_0x1360f2[_0x68c6ba(0x181)],'descriptionSource':_0x68c6ba(0x176),'descriptionFilePath':_0x1bfe23,'sanitize':_0x1360f2};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x75cb92=a92_0x158d;(function(_0x357713,_0xde3146){const _0x539201=a92_0x158d,_0x42863a=_0x357713();while(!![]){try{const _0x107314=parseInt(_0x539201(0x1a5))/0x1+parseInt(_0x539201(0x1ac))/0x2*(-parseInt(_0x539201(0x1a2))/0x3)+-parseInt(_0x539201(0x1b1))/0x4+parseInt(_0x539201(0x1ae))/0x5*(-parseInt(_0x539201(0x1b0))/0x6)+parseInt(_0x539201(0x1ad))/0x7+parseInt(_0x539201(0x19b))/0x8+parseInt(_0x539201(0x1a3))/0x9;if(_0x107314===_0xde3146)break;else _0x42863a['push'](_0x42863a['shift']());}catch(_0x20ae3a){_0x42863a['push'](_0x42863a['shift']());}}}(a92_0x1e22,0xdb920));function a92_0x1e22(){const _0x46bbd8=['kind','1472880rfhglO','byteLength','authorization','bearer-jwt','utf8','private-key','from','848282TYyCmA','9530458GliNZw','120QpnZXy','replace','286206tTvdEA','1612628iqQBIm','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','3242440MvCXhK','subarray','label','REDACTED:bearer-jwt','REDACTED:private-key','cookie','REDACTED:access-key','6YNwAsG','503496RMrETf'];a92_0x1e22=function(){return _0x46bbd8;};return a92_0x1e22();}export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a92_0x75cb92(0x19a),REDACTION_RULES=[{'kind':a92_0x75cb92(0x1a0),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':'REDACTED:cookie'},{'kind':a92_0x75cb92(0x1a7),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a92_0x75cb92(0x1aa),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a92_0x75cb92(0x19f)},{'kind':'access-key','pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a92_0x75cb92(0x1a1)},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':'REDACTED:password'},{'kind':a92_0x75cb92(0x1a8),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a92_0x75cb92(0x19e)}];export function sanitizeIssueDescription(_0x22bb24){const _0x170f10=a92_0x75cb92,_0x2e3ed1=Buffer[_0x170f10(0x1a6)](_0x22bb24,_0x170f10(0x1a9)),_0x2bc2e8=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x5a805b=_0x22bb24,_0x515658=0x0;const _0x578c69=[];if(!_0x2bc2e8)for(const _0x242b5e of REDACTION_RULES){let _0x560e3f=0x0;_0x5a805b=_0x5a805b[_0x170f10(0x1af)](_0x242b5e['pattern'],(_0x497df5,_0x521742)=>{const _0x50c15d=_0x170f10;_0x560e3f+=0x1;const _0x366f98=typeof _0x521742==='string'?_0x521742:'';return _0x366f98+'['+_0x242b5e[_0x50c15d(0x19d)]+']';}),_0x560e3f>0x0&&(_0x515658+=_0x560e3f,!_0x578c69['includes'](_0x242b5e['kind'])&&_0x578c69['push'](_0x242b5e[_0x170f10(0x1a4)]));}let _0x359ce3=![];if(Buffer[_0x170f10(0x1a6)](_0x5a805b,_0x170f10(0x1a9))>ISSUE_DESCRIPTION_MAX_BYTES){_0x359ce3=!![];const _0x3a7769=Buffer[_0x170f10(0x1a6)](TRUNCATION_NOTICE,_0x170f10(0x1a9)),_0x24bd66=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x3a7769);_0x5a805b=sliceUtf8Bytes(_0x5a805b,_0x24bd66)+TRUNCATION_NOTICE;}return{'description':_0x5a805b,'originalBytes':_0x2e3ed1,'truncated':_0x359ce3,'redactionCount':_0x515658,'redactionKinds':_0x578c69};}function a92_0x158d(_0x33c57e,_0x10e4e6){_0x33c57e=_0x33c57e-0x19a;const _0x1e2260=a92_0x1e22();let _0x158dcc=_0x1e2260[_0x33c57e];return _0x158dcc;}function sliceUtf8Bytes(_0x4ce563,_0x47cc29){const _0x4207a0=a92_0x75cb92;if(_0x47cc29<=0x0)return'';const _0x316934=Buffer[_0x4207a0(0x1ab)](_0x4ce563,_0x4207a0(0x1a9));if(_0x316934[_0x4207a0(0x1a6)]<=_0x47cc29)return _0x4ce563;let _0x45b526=_0x47cc29;while(_0x45b526>0x0){const _0x2102a1=_0x316934[_0x45b526];if(_0x2102a1===undefined||(_0x2102a1&0xc0)!==0x80)break;_0x45b526-=0x1;}return _0x316934[_0x4207a0(0x19c)](0x0,_0x45b526)['toString'](_0x4207a0(0x1a9));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0xc77750=a93_0x2547;(function(_0x181529,_0x11dee0){const _0x4b5784=a93_0x2547,_0x26e66e=_0x181529();while(!![]){try{const _0x5b94d6=-parseInt(_0x4b5784(0x1cf))/0x1+parseInt(_0x4b5784(0x1c8))/0x2*(-parseInt(_0x4b5784(0x1d1))/0x3)+parseInt(_0x4b5784(0x1b4))/0x4*(-parseInt(_0x4b5784(0x1ca))/0x5)+-parseInt(_0x4b5784(0x1b7))/0x6*(parseInt(_0x4b5784(0x1d5))/0x7)+-parseInt(_0x4b5784(0x1c6))/0x8*(-parseInt(_0x4b5784(0x1c3))/0x9)+-parseInt(_0x4b5784(0x1cb))/0xa*(parseInt(_0x4b5784(0x1bf))/0xb)+parseInt(_0x4b5784(0x1cc))/0xc;if(_0x5b94d6===_0x11dee0)break;else _0x26e66e['push'](_0x26e66e['shift']());}catch(_0x458ae4){_0x26e66e['push'](_0x26e66e['shift']());}}}(a93_0x3d57,0x9dd90));function a93_0x2547(_0x5d61e9,_0x30fcdc){_0x5d61e9=_0x5d61e9-0x1b4;const _0x3d57d7=a93_0x3d57();let _0x2547c9=_0x3d57d7[_0x5d61e9];return _0x2547c9;}function a93_0x3d57(){const _0x21a88f=['command','length','details','level','duration','1895377mdyzHu','log','*\x20Logs\x20cleared','\x20\x20\x20Duration:\x20','63DVxHBf','*\x20No\x20logs\x20found','read','1116472oLmsIm','clearLogs','278ijUDfL','en-US','25YDlTTJ','20uaOIrk','23421516ZMuviS','\x20\x20\x20Details:\x20','clear','828228vaOxJx','warn','13179HOIGiR','toLocaleString','success','Clear\x20command\x20history\x20logs','2107VVkIQZ','write','logs','158636DfIvyf','\x20\x20\x20Time:\x20','View\x20command\x20history\x20logs','5988lGnEts','show','forEach'];a93_0x3d57=function(){return _0x21a88f;};return a93_0x3d57();}import{logger}from'../../utils/logger.js';function printLogs(_0x5600fd){const _0x36c008=a93_0x2547;if(_0x5600fd[_0x36c008(0x1bb)]===0x0){console[_0x36c008(0x1c0)](_0x36c008(0x1c4));return;}console['log']('*\x20Lovrabet\x20CLI\x20logs:\x0a'),_0x5600fd[_0x36c008(0x1b9)]((_0x2cc25e,_0x42b97c)=>{const _0x43b32c=_0x36c008,_0x4008ee=new Date(_0x2cc25e['timestamp'])[_0x43b32c(0x1d2)](_0x43b32c(0x1c9)),_0x5db0b8=_0x2cc25e[_0x43b32c(0x1bd)]===_0x43b32c(0x1d3)?'√':_0x2cc25e['level']==='error'?'×':_0x2cc25e['level']===_0x43b32c(0x1d0)?'!':'i';console[_0x43b32c(0x1c0)](_0x42b97c+0x1+'.\x20'+_0x5db0b8+'\x20['+_0x2cc25e[_0x43b32c(0x1ba)]+']\x20'+_0x2cc25e['message']),console['log'](_0x43b32c(0x1b5)+_0x4008ee),_0x2cc25e[_0x43b32c(0x1be)]&&console[_0x43b32c(0x1c0)](_0x43b32c(0x1c2)+_0x2cc25e[_0x43b32c(0x1be)]+'ms'),_0x2cc25e['details']&&Object['keys'](_0x2cc25e[_0x43b32c(0x1bc)])[_0x43b32c(0x1bb)]>0x0&&console[_0x43b32c(0x1c0)](_0x43b32c(0x1cd)+JSON['stringify'](_0x2cc25e[_0x43b32c(0x1bc)],null,0x2)),console[_0x43b32c(0x1c0)]('');});}export const logsDefinitions=[{'service':a93_0xc77750(0x1d7),'command':a93_0xc77750(0x1b8),'description':a93_0xc77750(0x1b6),'risk':a93_0xc77750(0x1c5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x15a381){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':a93_0xc77750(0x1d7),'command':a93_0xc77750(0x1ce),'description':a93_0xc77750(0x1d4),'risk':a93_0xc77750(0x1d6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xcb102){const _0x3a28e9=a93_0xc77750;return logger[_0x3a28e9(0x1c7)](),console[_0x3a28e9(0x1c0)](_0x3a28e9(0x1c1)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x50fc70,_0x503f03){const _0x17203b=a94_0x3afc,_0xd526e0=_0x50fc70();while(!![]){try{const _0x331ca0=parseInt(_0x17203b(0x14d))/0x1*(-parseInt(_0x17203b(0x14b))/0x2)+-parseInt(_0x17203b(0x148))/0x3*(parseInt(_0x17203b(0x14e))/0x4)+-parseInt(_0x17203b(0x14a))/0x5+parseInt(_0x17203b(0x14c))/0x6*(-parseInt(_0x17203b(0x153))/0x7)+parseInt(_0x17203b(0x150))/0x8*(-parseInt(_0x17203b(0x14f))/0x9)+-parseInt(_0x17203b(0x151))/0xa*(-parseInt(_0x17203b(0x149))/0xb)+parseInt(_0x17203b(0x152))/0xc;if(_0x331ca0===_0x503f03)break;else _0xd526e0['push'](_0xd526e0['shift']());}catch(_0x135051){_0xd526e0['push'](_0xd526e0['shift']());}}}(a94_0x35af,0x4b533));function a94_0x35af(){const _0x4d3189=['32hfVGjl','171BalJoQ','99272fwNEYN','16610vKQWFW','24990240iuqVgu','14HCkQGD','138624gKvYsw','66cizfxY','2628545pWIrpk','7894ItGoUQ','1141404viDdgO','69NlOQDv'];a94_0x35af=function(){return _0x4d3189;};return a94_0x35af();}function a94_0x3afc(_0x27cb36,_0x171fa9){_0x27cb36=_0x27cb36-0x148;const _0x35af73=a94_0x35af();let _0x3afc07=_0x35af73[_0x27cb36];return _0x3afc07;}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
|
+
function a95_0x4222(){const _0x1de1cc=['push','extend','children','verbose','boolean','item','parentId','POSITIVE_INFINITY','107259YCwYgW','bool','\x20menu(s)','2806748Kxvshl','No\x20menus\x20found.','path','5404597iXbmGK','depth','type','Found\x20','menu','visible','read','isFinite','string','467078xXDdgF','84980jvZIfY','Fetch\x20menu\x20list','/smartapi/menu/find?appCode=','map','isArray','37064AMUkjk','10HnzvjG','cookie','Return\x20extend\x20field\x20for\x20troubleshooting\x20resource\x20parsing','5lVvvgH','38071296bjGSsj','number','2034dKZUQf','56mJgqzD','list','450szWCDE','parse','sort','length'];a95_0x4222=function(){return _0x1de1cc;};return a95_0x4222();}const a95_0x216908=a95_0x14f4;(function(_0x1db13f,_0x2b35ff){const _0x18528f=a95_0x14f4,_0x1551f1=_0x1db13f();while(!![]){try{const _0x2fc332=-parseInt(_0x18528f(0x10e))/0x1+-parseInt(_0x18528f(0x11c))/0x2*(-parseInt(_0x18528f(0xff))/0x3)+-parseInt(_0x18528f(0x102))/0x4*(parseInt(_0x18528f(0x118))/0x5)+parseInt(_0x18528f(0x11e))/0x6*(-parseInt(_0x18528f(0x10f))/0x7)+parseInt(_0x18528f(0x114))/0x8*(-parseInt(_0x18528f(0x11b))/0x9)+-parseInt(_0x18528f(0x115))/0xa*(parseInt(_0x18528f(0x105))/0xb)+parseInt(_0x18528f(0x119))/0xc;if(_0x2fc332===_0x2b35ff)break;else _0x1551f1['push'](_0x1551f1['shift']());}catch(_0x34e6c0){_0x1551f1['push'](_0x1551f1['shift']());}}}(a95_0x4222,0x87c0a));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':a95_0x216908(0x109),'command':a95_0x216908(0x11d),'description':'List\x20online\x20menu\x20facts\x20for\x20the\x20current\x20app','risk':a95_0x216908(0x10b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'verbose','type':a95_0x216908(0xfb),'description':a95_0x216908(0x117)}],async 'execute'(_0x4b18de){const _0x565c15=a95_0x216908,_0x937687=_0x4b18de[_0x565c15(0x100)](_0x565c15(0xfa)),_0x1f88fd=await platformFetch(getApiDomain()+_0x565c15(0x111)+_0x4b18de['appCode'],{'cookie':_0x4b18de[_0x565c15(0x116)],'label':_0x565c15(0x110)}),_0x1ae777=flattenMenuItems(Array['isArray'](_0x1f88fd)?_0x1f88fd:[],{'verbose':_0x937687,'parentId':null,'depth':0x0});return{'ok':!![],'data':{'total':_0x1ae777[_0x565c15(0xf6)],'menus':_0x1ae777},'message':_0x1ae777['length']===0x0?_0x565c15(0x103):_0x565c15(0x108)+_0x1ae777['length']+_0x565c15(0x101)};}};function flattenMenuItems(_0x45f88b,_0x1f030b){const _0x223653=a95_0x216908,_0x1f3f62=sortMenuItems(_0x45f88b),_0x3ed429=[];for(const _0x4f3517 of _0x1f3f62){_0x3ed429[_0x223653(0xf7)](toMenuListItem(_0x4f3517,_0x1f030b)),Array[_0x223653(0x113)](_0x4f3517[_0x223653(0xf9)])&&_0x4f3517[_0x223653(0xf9)][_0x223653(0xf6)]>0x0&&_0x3ed429[_0x223653(0xf7)](...flattenMenuItems(_0x4f3517[_0x223653(0xf9)],{'verbose':_0x1f030b[_0x223653(0xfa)],'parentId':_0x4f3517['id'],'depth':_0x1f030b['depth']+0x1}));}return _0x3ed429;}function sortMenuItems(_0x493caf){const _0x3a28c5=a95_0x216908;return _0x493caf[_0x3a28c5(0x112)]((_0x36c833,_0x407327)=>({'item':_0x36c833,'index':_0x407327}))[_0x3a28c5(0x120)]((_0x4a3f70,_0x9fa3f7)=>{const _0xd3b117=_0x3a28c5,_0x4482f0=normalizeSort(_0x4a3f70[_0xd3b117(0xfc)][_0xd3b117(0x120)]),_0x6b6ecd=normalizeSort(_0x9fa3f7[_0xd3b117(0xfc)][_0xd3b117(0x120)]);if(_0x4482f0!==_0x6b6ecd)return _0x4482f0-_0x6b6ecd;return _0x4a3f70['index']-_0x9fa3f7['index'];})[_0x3a28c5(0x112)](({item:_0x34b88f})=>_0x34b88f);}function toMenuListItem(_0xedb41d,_0x22fee5){const _0x1bc4cb=a95_0x216908,_0x12a420={'id':_0xedb41d['id'],'parentId':_0x22fee5[_0x1bc4cb(0xfd)],'depth':_0x22fee5[_0x1bc4cb(0x106)],'label':normalizeString(_0xedb41d['label']),'path':normalizeString(_0xedb41d[_0x1bc4cb(0x104)]),'type':normalizeString(_0xedb41d[_0x1bc4cb(0x107)]),'visible':typeof _0xedb41d[_0x1bc4cb(0x10a)]===_0x1bc4cb(0xfb)?_0xedb41d[_0x1bc4cb(0x10a)]:null,'sort':typeof _0xedb41d[_0x1bc4cb(0x120)]===_0x1bc4cb(0x11a)&&Number[_0x1bc4cb(0x10c)](_0xedb41d[_0x1bc4cb(0x120)])?_0xedb41d[_0x1bc4cb(0x120)]:null,'resources':normalizeResources(_0xedb41d['extend']?.['resources'])};return _0x22fee5[_0x1bc4cb(0xfa)]&&(_0x12a420[_0x1bc4cb(0xf8)]=_0xedb41d[_0x1bc4cb(0xf8)]??null),_0x12a420;}function normalizeSort(_0x2f74c4){const _0x64e2bc=a95_0x216908;return typeof _0x2f74c4==='number'&&Number['isFinite'](_0x2f74c4)?_0x2f74c4:Number[_0x64e2bc(0xfe)];}function a95_0x14f4(_0x3af71e,_0x2869b6){_0x3af71e=_0x3af71e-0xf6;const _0x4222de=a95_0x4222();let _0x14f4a3=_0x4222de[_0x3af71e];return _0x14f4a3;}function normalizeString(_0x665e78){const _0x1c47c8=a95_0x216908;return typeof _0x665e78===_0x1c47c8(0x10d)?_0x665e78:'';}function normalizeResources(_0x1b9294){const _0x15f798=a95_0x216908;if(Array[_0x15f798(0x113)](_0x1b9294))return _0x1b9294[_0x15f798(0x112)](String);if(typeof _0x1b9294!==_0x15f798(0x10d))return[];try{const _0x2e6eb3=JSON[_0x15f798(0x11f)](_0x1b9294);return Array['isArray'](_0x2e6eb3)?_0x2e6eb3['map'](String):[];}catch{return[];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2a3c04,_0x282d5a){const _0x8c9298=a96_0x590a,_0x1de8f7=_0x2a3c04();while(!![]){try{const _0x3c948b=parseInt(_0x8c9298(0x1c7))/0x1+parseInt(_0x8c9298(0x1b3))/0x2*(-parseInt(_0x8c9298(0x1b9))/0x3)+-parseInt(_0x8c9298(0x1c9))/0x4+-parseInt(_0x8c9298(0x1b4))/0x5*(parseInt(_0x8c9298(0x1b1))/0x6)+parseInt(_0x8c9298(0x1c3))/0x7*(parseInt(_0x8c9298(0x1ca))/0x8)+parseInt(_0x8c9298(0x1b2))/0x9+-parseInt(_0x8c9298(0x1ae))/0xa*(-parseInt(_0x8c9298(0x1cb))/0xb);if(_0x3c948b===_0x282d5a)break;else _0x1de8f7['push'](_0x1de8f7['shift']());}catch(_0x2f7424){_0x1de8f7['push'](_0x1de8f7['shift']());}}}(a96_0x351b,0x8a7a3));function a96_0x351b(){const _0x1b6a83=['319233kAfWSk','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','push','showOnline','path','\x20\x20\x20\x20JS:\x20\x20','Platform','test','\x20\x20Affected\x20menus:\x20','3901163rvbSag','max','\x20\x20\x20\x20CSS:\x20','map','195502xotAqB','length','264980cwDICi','16crAjiI','11BXYFRO','\x20\x20\x20\x20•\x20','5510060fyMsaY','local','(unchanged)','6VhOAjy','4700655vZQTMS','14mPIwDo','5025480SJZyWf','\x20\x20No\x20pages\x20to\x20sync.','join','label','repeat'];a96_0x351b=function(){return _0x1b6a83;};return a96_0x351b();}function strWidth(_0x4f893d){const _0x2050c5=a96_0x590a;let _0x3dce1b=0x0;for(const _0x4b9ffa of _0x4f893d){_0x3dce1b+=/[\u4e00-\u9fa5]/[_0x2050c5(0x1c1)](_0x4b9ffa)?0x2:0x1;}return _0x3dce1b;}function a96_0x590a(_0x2ff61d,_0xa31a44){_0x2ff61d=_0x2ff61d-0x1ad;const _0x351ba7=a96_0x351b();let _0x590a33=_0x351ba7[_0x2ff61d];return _0x590a33;}function padRight(_0x168940,_0x5b01a6){const _0x241128=a96_0x590a,_0x29d530=strWidth(_0x168940);return _0x168940+'\x20'[_0x241128(0x1b8)](Math[_0x241128(0x1c4)](0x0,_0x5b01a6-_0x29d530));}export function renderCompareTable(_0x58bf59,_0x4a5892={}){const _0x508019=a96_0x590a;if(_0x58bf59[_0x508019(0x1c8)]===0x0)return'';const _0x3e37e0=_0x4a5892[_0x508019(0x1bd)]??!![],_0x5af1ca=Math[_0x508019(0x1c4)](0x1e,..._0x58bf59[_0x508019(0x1c6)](_0x7d934c=>strWidth(_0x7d934c[_0x508019(0x1b7)]))),_0x7c9bca=0x4,_0x50e4c5=[],_0x1873e0='\x20\x20'+padRight('Menu\x20Name',_0x5af1ca),_0x53fe1b=padRight('Local',_0x7c9bca),_0x5bee45=_0x3e37e0?'\x20\x20'+padRight(_0x508019(0x1c0),_0x7c9bca):'';_0x50e4c5[_0x508019(0x1bc)](_0x1873e0+'\x20\x20'+_0x53fe1b+(_0x3e37e0?_0x5bee45:'')),_0x50e4c5[_0x508019(0x1bc)]('\x20\x20'+'─'['repeat'](_0x5af1ca)+'\x20\x20'+'─'[_0x508019(0x1b8)](_0x7c9bca)+(_0x3e37e0?'\x20\x20'+'─'[_0x508019(0x1b8)](_0x7c9bca):''));for(const _0x7d8868 of _0x58bf59){const _0x41924a=padRight(_0x7d8868['label'],_0x5af1ca),_0x2c012d=_0x7d8868[_0x508019(0x1af)]?'✓':'✗',_0x3672fa=padRight(_0x2c012d,_0x7c9bca);let _0x1074db='\x20\x20'+_0x41924a+'\x20\x20'+_0x3672fa;if(_0x3e37e0){const _0x251149=_0x7d8868['online']?'✓':'✗';_0x1074db+='\x20\x20'+padRight(_0x251149,_0x7c9bca);}_0x50e4c5[_0x508019(0x1bc)](_0x1074db);}return _0x50e4c5[_0x508019(0x1b6)]('\x0a');}export function renderSyncSummary(_0x4f3781,_0x120417){const _0x140b0a=a96_0x590a;if(_0x4f3781[_0x140b0a(0x1c8)]===0x0)return _0x120417?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':_0x140b0a(0x1b5);const _0xbc8bda=['\x20\x20'+_0x4f3781[_0x140b0a(0x1c8)]+'\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];for(const _0xedcfa0 of _0x4f3781){_0xbc8bda['push'](_0x140b0a(0x1ad)+_0xedcfa0['label']+'\x20('+_0xedcfa0[_0x140b0a(0x1be)]+')');}return _0xbc8bda[_0x140b0a(0x1b6)]('\x0a');}export function renderUpdateSummary(_0x5259e0,_0x257e6d){const _0x474875=a96_0x590a;if(_0x5259e0['length']===0x0)return _0x474875(0x1ba);const _0x86eb94=['\x20\x20'+_0x5259e0[_0x474875(0x1c8)]+_0x474875(0x1bb),_0x474875(0x1bf)+(_0x257e6d[0x0]??'(unchanged)'),_0x474875(0x1c5)+(_0x257e6d[0x1]??_0x474875(0x1b0)),'',_0x474875(0x1c2)+_0x5259e0[_0x474875(0x1b6)](',\x20')];return _0x86eb94[_0x474875(0x1b6)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x30ee33,_0x23cd96){var _0x1749f7=a97_0x5b41,_0x323d35=_0x30ee33();while(!![]){try{var _0x20266c=-parseInt(_0x1749f7(0x13d))/0x1+parseInt(_0x1749f7(0x13b))/0x2*(-parseInt(_0x1749f7(0x13f))/0x3)+parseInt(_0x1749f7(0x13c))/0x4*(parseInt(_0x1749f7(0x144))/0x5)+-parseInt(_0x1749f7(0x142))/0x6*(parseInt(_0x1749f7(0x141))/0x7)+-parseInt(_0x1749f7(0x146))/0x8+-parseInt(_0x1749f7(0x143))/0x9*(parseInt(_0x1749f7(0x145))/0xa)+-parseInt(_0x1749f7(0x13e))/0xb*(-parseInt(_0x1749f7(0x140))/0xc);if(_0x20266c===_0x23cd96)break;else _0x323d35['push'](_0x323d35['shift']());}catch(_0x2b0804){_0x323d35['push'](_0x323d35['shift']());}}}(a97_0x313e,0x65090));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';function a97_0x5b41(_0x57c394,_0x5c6301){_0x57c394=_0x57c394-0x13b;var _0x313ef3=a97_0x313e();var _0x5b41a1=_0x313ef3[_0x57c394];return _0x5b41a1;}export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';function a97_0x313e(){var _0x5a41f8=['27mkBwqo','410OyEFmP','70820uCIUDy','1126184pGvQmM','2xujcHQ','19544Zcdcap','520234DrKfnv','693SJuYLM','208557LPgVmw','225468nrNxOj','7tENlQn','2512482xVIdMh'];a97_0x313e=function(){return _0x5a41f8;};return a97_0x313e();}export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d092f,_0x8cadb9){const _0x5394de=a98_0x21e5,_0x7c9581=_0x1d092f();while(!![]){try{const _0x301005=-parseInt(_0x5394de(0x10b))/0x1*(parseInt(_0x5394de(0x10d))/0x2)+-parseInt(_0x5394de(0x112))/0x3+parseInt(_0x5394de(0x120))/0x4+-parseInt(_0x5394de(0x12a))/0x5*(-parseInt(_0x5394de(0x12e))/0x6)+parseInt(_0x5394de(0x106))/0x7+parseInt(_0x5394de(0x121))/0x8+parseInt(_0x5394de(0x10e))/0x9*(-parseInt(_0x5394de(0x108))/0xa);if(_0x301005===_0x8cadb9)break;else _0x7c9581['push'](_0x7c9581['shift']());}catch(_0x47bb32){_0x7c9581['push'](_0x7c9581['shift']());}}}(a98_0x46cf,0xb450e));import a98_0x4f2a3e from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';function a98_0x21e5(_0x3b608f,_0x10b637){_0x3b608f=_0x3b608f-0x105;const _0x46cfa0=a98_0x46cf();let _0x21e58f=_0x46cfa0[_0x3b608f];return _0x21e58f;}import a98_0x4464d1 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x94e186){const _0x142ecc=a98_0x21e5;return _0x94e186[_0x142ecc(0x11e)](_0x666eeb=>{const _0x20b72b=_0x142ecc;if(_0x666eeb?.['name']===_0x20b72b(0x10c))throw CliErrors[_0x20b72b(0x113)]('Cancelled.');throw _0x666eeb;});}export function startSpinner(_0x2b40f9){const _0x949e4f=a98_0x21e5;return a98_0x4464d1({'text':_0x2b40f9,'color':_0x949e4f(0x10a)})['start']();}export function stopSpinner(_0x172cf9,_0x500a37,_0xb6b7a3){const _0x5ebddb=a98_0x21e5;_0xb6b7a3?_0x172cf9[_0x5ebddb(0x12d)](_0x500a37):_0x172cf9[_0x5ebddb(0x12b)](_0x500a37);}export async function askConfirm(_0x467f43){return onCancel(confirm({'message':_0x467f43,'theme':{'prefix':''}}));}export async function askJsUrl(_0x36bb36){const _0x425ec=a98_0x21e5;while(!![]){const _0x5a1154=await onCancel(input({'message':_0x425ec(0x105),'default':_0x36bb36,'theme':{'prefix':''}}));if(_0x5a1154[_0x425ec(0x11f)]()==='')throw CliErrors[_0x425ec(0x113)](_0x425ec(0x11a));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x425ec(0x117)](_0x5a1154[_0x425ec(0x11f)]())){console['error'](a98_0x4f2a3e['red']('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x4eafab=startSpinner(_0x425ec(0x12c));try{const _0x3b50e8=await isUrlReachable(_0x5a1154['trim']());stopSpinner(_0x4eafab,'JS\x20URL\x20checked',_0x3b50e8);if(!_0x3b50e8){console[_0x425ec(0x11b)](a98_0x4f2a3e[_0x425ec(0x109)](_0x425ec(0x129)));continue;}return _0x5a1154[_0x425ec(0x11f)]();}catch(_0x5965a6){stopSpinner(_0x4eafab,'JS\x20URL\x20check\x20failed',![]);throw _0x5965a6;}}}export async function askCssUrl(_0x234b59){const _0x2204c2=a98_0x21e5;while(!![]){const _0x51f6f6=await onCancel(input({'message':_0x2204c2(0x123),'default':_0x234b59,'theme':{'prefix':''}}));if(_0x51f6f6['trim']()==='')throw CliErrors[_0x2204c2(0x113)](_0x2204c2(0x11a));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x2204c2(0x117)](_0x51f6f6['trim']())){console[_0x2204c2(0x11b)](a98_0x4f2a3e[_0x2204c2(0x109)](_0x2204c2(0x110)));continue;}const _0x5eb3a3=startSpinner(_0x2204c2(0x10f));try{const _0x37ae0f=await isUrlReachable(_0x51f6f6[_0x2204c2(0x11f)]());stopSpinner(_0x5eb3a3,'CSS\x20URL\x20checked',_0x37ae0f);if(!_0x37ae0f){console[_0x2204c2(0x11b)](a98_0x4f2a3e[_0x2204c2(0x109)](_0x2204c2(0x11d)));continue;}return _0x51f6f6[_0x2204c2(0x11f)]();}catch(_0x1fd232){stopSpinner(_0x5eb3a3,_0x2204c2(0x111),![]);throw _0x1fd232;}}}export async function selectPages(_0x569d7e,_0x281c33,_0x2f47dc){const _0xcc58eb=a98_0x21e5,_0x19eb6a=_0x569d7e[_0xcc58eb(0x122)](_0x554d5a=>({'name':_0x554d5a[_0xcc58eb(0x124)]+'\x20\x20'+(_0x281c33[_0xcc58eb(0x115)](_0x554d5a[_0xcc58eb(0x11c)])?a98_0x4f2a3e['gray'](_0xcc58eb(0x12f)):a98_0x4f2a3e[_0xcc58eb(0x127)]('[new]')),'value':_0x554d5a[_0xcc58eb(0x124)],'checked':_0x2f47dc?_0x2f47dc[_0xcc58eb(0x114)](_0x554d5a[_0xcc58eb(0x124)]):!_0x281c33['has'](_0x554d5a[_0xcc58eb(0x11c)])}));if(_0x19eb6a[_0xcc58eb(0x125)]===0x0)throw new Error(_0xcc58eb(0x119));const _0x23dbb1=await onCancel(checkbox({'message':_0xcc58eb(0x130),'choices':_0x19eb6a,'loop':![],'theme':{'prefix':''}}));if(_0x23dbb1[_0xcc58eb(0x125)]===0x0)throw new Error(_0xcc58eb(0x116));return _0x569d7e[_0xcc58eb(0x107)](_0x584ae2=>_0x23dbb1[_0xcc58eb(0x114)](_0x584ae2[_0xcc58eb(0x124)]));}function a98_0x46cf(){const _0x542985=['succeed','3768snfilT','[already\x20on\x20platform]','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','\x20\x20JS\x20URL:','7692776FKVuFq','filter','656670SFUgZG','red','cyan','1233429MMwcwS','ExitPromptError','2fNxXhF','9mPiUen','\x20\x20Checking\x20CSS\x20URL\x20reachability...','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','CSS\x20URL\x20check\x20failed','3702960UfeLMH','cancelled','includes','has','No\x20menus\x20selected.','test','isTTY','No\x20local\x20pages\x20found.','Cancelled.','error','path','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','catch','trim','1942732FSqVqD','11725240NOkJmy','map','\x20\x20CSS\x20URL:','label','length','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','green','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','1765XztaJh','fail','\x20\x20Checking\x20JS\x20URL\x20reachability...'];a98_0x46cf=function(){return _0x542985;};return a98_0x46cf();}export function isInteractive(){const _0x5435d0=a98_0x21e5;return process['stdin'][_0x5435d0(0x118)]===!![];}export function requireInteractive(){const _0x6777ed=a98_0x21e5;if(!isInteractive())throw new Error(_0x6777ed(0x128)+_0x6777ed(0x126));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x143f3b=a99_0x119a;function a99_0x3a4d(){const _0x404e7f=['index.tsx','isDirectory','slice','.tsx','7947150kshAQo','trim','7dNeqJJ','replace','22yKGfFB','push','890709kpQyZH','20609970DYxMbb','match','3982760bAucaI','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','cwd','397941wPXqYp','concat','utf-8','src/pages','endsWith','filter','8395710qPusbT','replaceAll','9yjCrTt','split','4367696yfPgDy'];a99_0x3a4d=function(){return _0x404e7f;};return a99_0x3a4d();}(function(_0x4500b7,_0x112ad2){const _0x59dce3=a99_0x119a,_0x2f2897=_0x4500b7();while(!![]){try{const _0x17bad2=parseInt(_0x59dce3(0xb9))/0x1+-parseInt(_0x59dce3(0xb7))/0x2*(-parseInt(_0x59dce3(0xbf))/0x3)+parseInt(_0x59dce3(0xbc))/0x4+parseInt(_0x59dce3(0xce))/0x5+parseInt(_0x59dce3(0xc5))/0x6*(-parseInt(_0x59dce3(0xd0))/0x7)+-parseInt(_0x59dce3(0xc9))/0x8+parseInt(_0x59dce3(0xc7))/0x9*(-parseInt(_0x59dce3(0xba))/0xa);if(_0x17bad2===_0x112ad2)break;else _0x2f2897['push'](_0x2f2897['shift']());}catch(_0x23fa08){_0x2f2897['push'](_0x2f2897['shift']());}}}(a99_0x3a4d,0xe2bbe));function a99_0x119a(_0x1612b7,_0x40dede){_0x1612b7=_0x1612b7-0xb6;const _0x3a4d71=a99_0x3a4d();let _0x119ab2=_0x3a4d71[_0x1612b7];return _0x119ab2;}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a99_0x143f3b(0xbe)](),a99_0x143f3b(0xc2));export function extractTitleFromComment(_0x1daa1c){const _0x5d5a68=a99_0x143f3b;try{const _0x2daba0=readFileSync(_0x1daa1c,_0x5d5a68(0xc1)),_0x40bc14=_0x2daba0[_0x5d5a68(0xbb)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x40bc14&&_0x40bc14[0x1]){const _0x1fee2f=_0x40bc14[0x1],_0x569a11=_0x1fee2f[_0x5d5a68(0xbb)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x569a11&&_0x569a11[0x1])return _0x569a11[0x1][_0x5d5a68(0xcf)]();}let _0x3d49a9=null;const _0x58c9d0=_0x2daba0[_0x5d5a68(0xbb)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x58c9d0&&_0x58c9d0[0x1]&&(_0x3d49a9=_0x58c9d0[0x1]);if(!_0x3d49a9){const _0x57eef2=_0x2daba0['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x57eef2&&_0x57eef2[0x1]&&(_0x3d49a9=_0x57eef2[0x1]);}if(_0x3d49a9){const _0x53f777=new RegExp('\x5cb'+_0x3d49a9+_0x5d5a68(0xbd)),_0x27093d=_0x2daba0[_0x5d5a68(0xbb)](_0x53f777);if(_0x27093d&&_0x27093d[0x1])return _0x27093d[0x1];return _0x3d49a9;}return null;}catch(_0x485962){return null;}}export function getLocalPages(_0x5ab105=pagesDir,_0x453440=pagesDir){const _0xfda431=a99_0x143f3b;let _0x2f774a=[];const _0x1374fd=readdirSync(_0x5ab105);return _0x1374fd['forEach'](_0x3dc15b=>{const _0xb032ef=a99_0x119a,_0x336450=join(_0x5ab105,_0x3dc15b),_0x2f8111=statSync(_0x336450);if(_0x2f8111&&_0x2f8111[_0xb032ef(0xcb)]())_0x2f774a=_0x2f774a[_0xb032ef(0xc0)](getLocalPages(_0x336450,_0x453440));else{if(_0x3dc15b[_0xb032ef(0xc3)](_0xb032ef(0xcd))){let _0x50a6dd=relative(_0x453440,_0x336450);_0x50a6dd[_0xb032ef(0xc3)](_0xb032ef(0xca))?_0x50a6dd=_0x50a6dd['replace'](/index\.tsx$/,''):_0x50a6dd=_0x50a6dd[_0xb032ef(0xb6)](/\.tsx$/,'');_0x50a6dd[_0xb032ef(0xc3)](sep)&&(_0x50a6dd=_0x50a6dd[_0xb032ef(0xcc)](0x0,-0x1));const _0x203ceb=_0x50a6dd[_0xb032ef(0xc8)](sep)['join']('/'),_0x3481ab=extractTitleFromComment(_0x336450),_0x48d7f9=_0x3481ab||_0x203ceb;_0x2f774a[_0xb032ef(0xb8)]({'path':_0x203ceb[_0xb032ef(0xc6)]('$',':'),'label':_0x48d7f9});}}}),_0x2f774a[_0xfda431(0xc4)](_0x4e40cf=>_0x4e40cf['path']!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x479c15,_0x53f77f){const _0xad8288=a100_0x1a75,_0x309f3a=_0x479c15();while(!![]){try{const _0x44e0dc=parseInt(_0xad8288(0x1f8))/0x1+-parseInt(_0xad8288(0x203))/0x2*(-parseInt(_0xad8288(0x1f5))/0x3)+parseInt(_0xad8288(0x1ec))/0x4*(-parseInt(_0xad8288(0x1e9))/0x5)+-parseInt(_0xad8288(0x1f3))/0x6*(-parseInt(_0xad8288(0x1ef))/0x7)+parseInt(_0xad8288(0x1ee))/0x8*(parseInt(_0xad8288(0x1e8))/0x9)+-parseInt(_0xad8288(0x1fb))/0xa+-parseInt(_0xad8288(0x1ed))/0xb;if(_0x44e0dc===_0x53f77f)break;else _0x309f3a['push'](_0x309f3a['shift']());}catch(_0x170e53){_0x309f3a['push'](_0x309f3a['shift']());}}}(a100_0xfd9f,0x67d5b));function a100_0x1a75(_0x553c7b,_0x352357){_0x553c7b=_0x553c7b-0x1e7;const _0xfd9f4c=a100_0xfd9f();let _0x1a7536=_0xfd9f4c[_0x553c7b];return _0x1a7536;}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(_0x9511a9){const _0x64dbae=a100_0x1a75,_0x29df98=[];return!isValidJsHttpsUrl(_0x9511a9)&&_0x29df98['push']('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x29df98[_0x64dbae(0x201)]===0x0,'errors':_0x29df98};}export function validateCssUrl(_0x5f5bf1){const _0x5ca747=a100_0x1a75,_0x3b70ef=[];return!isValidCssHttpsUrl(_0x5f5bf1)&&_0x3b70ef[_0x5ca747(0x1eb)](_0x5ca747(0x1ea)),{'ok':_0x3b70ef[_0x5ca747(0x201)]===0x0,'errors':_0x3b70ef};}export async function validateJsUrlReachable(_0x124ff8){const _0x2d8487=a100_0x1a75,_0x529c1f=validateJsUrl(_0x124ff8);if(!_0x529c1f['ok'])return _0x529c1f;const _0x56c8a1=await isUrlReachable(_0x124ff8);if(!_0x56c8a1)_0x529c1f[_0x2d8487(0x1f0)]['push'](_0x2d8487(0x1f9));return{'ok':_0x529c1f[_0x2d8487(0x1f0)][_0x2d8487(0x201)]===0x0,'errors':_0x529c1f[_0x2d8487(0x1f0)]};}export async function validateCssUrlReachable(_0x3a80a6){const _0x5cf5de=a100_0x1a75,_0x21ba2e=validateCssUrl(_0x3a80a6);if(!_0x21ba2e['ok'])return _0x21ba2e;const _0x4f1026=await isUrlReachable(_0x3a80a6);if(!_0x4f1026)_0x21ba2e[_0x5cf5de(0x1f0)][_0x5cf5de(0x1eb)](_0x5cf5de(0x1fe));return{'ok':_0x21ba2e[_0x5cf5de(0x1f0)][_0x5cf5de(0x201)]===0x0,'errors':_0x21ba2e[_0x5cf5de(0x1f0)]};}export function buildCompareRows(_0x10803d,_0xc194da){const _0x435841=a100_0x1a75;return _0x10803d[_0x435841(0x204)](_0x2a3db8=>({'label':_0x2a3db8['label'],'path':_0x2a3db8[_0x435841(0x1fd)],'local':!![],'online':_0xc194da[_0x435841(0x1fa)](_0x2a3db8[_0x435841(0x1fd)])}));}export function filterNewPages(_0x363f5d,_0x24c6c5,_0x5df773){const _0x242e55=a100_0x1a75;if(_0x5df773&&_0x5df773[_0x242e55(0x201)]>0x0){const _0xf8762c=new Set(_0x5df773[_0x242e55(0x204)](_0x445696=>_0x445696[_0x242e55(0x1ff)]())),_0x259f66=_0x363f5d['filter'](_0x35d94d=>_0xf8762c[_0x242e55(0x1fa)](_0x35d94d[_0x242e55(0x1f6)]));if(_0x259f66[_0x242e55(0x201)]===0x0)throw new Error(_0x242e55(0x202)+[..._0xf8762c]['join'](',\x20'));return _0x259f66;}return _0x363f5d['filter'](_0xe7ad21=>!_0x24c6c5['has'](_0xe7ad21[_0x242e55(0x1fd)]));}export function filterPagesByLabels(_0x23aeb8,_0x3a9a14){const _0x2d7737=a100_0x1a75,_0x520b0d=[],_0x3564e7=[];for(const _0x22a3e6 of _0x3a9a14){const _0x5aeef4=_0x22a3e6[_0x2d7737(0x1ff)](),_0x5c82ae=_0x23aeb8['find'](_0x25c582=>_0x25c582[_0x2d7737(0x1f6)]===_0x5aeef4);if(_0x5c82ae)_0x520b0d[_0x2d7737(0x1eb)](_0x5c82ae);else _0x3564e7[_0x2d7737(0x1eb)](_0x22a3e6);}return{'matched':_0x520b0d,'unmatched':_0x3564e7};}export async function doCreateMenus(_0x2d2934,_0x1a7627,_0x1d1e6a,_0x1e1b25){const _0x15b5c2=a100_0x1a75,_0xc84e95=await createMenus(_0x2d2934,_0x1a7627,_0x1d1e6a,_0x1e1b25);return{'created':_0xc84e95[_0x15b5c2(0x201)],'failed':0x0,'labels':_0x1d1e6a[_0x15b5c2(0x204)](_0x26eb68=>_0x26eb68[_0x15b5c2(0x1f6)]),'menus':_0xc84e95};}export function filterMenusWithResources(_0x831ff5){const _0x4dc761=a100_0x1a75;return _0x831ff5[_0x4dc761(0x1f7)](_0x3cb022=>_0x3cb022[_0x4dc761(0x1e7)]['length']>0x0);}function a100_0xfd9f(){const _0xa574f=['18SjxElo','1985ADqGdh','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','push','6316angpXv','7449651KNHYgT','2363464mzZmPB','175546wozIDh','errors','rejected','status','114cCdWKy','extend','9UmdKlh','label','filter','668802eRfZWV','JS\x20URL\x20is\x20unreachable','has','5439280TXmsih','value','path','CSS\x20URL\x20is\x20unreachable','trim','allSettled','length','No\x20local\x20pages\x20matched\x20labels:\x20','358126FlckKz','map','resources'];a100_0xfd9f=function(){return _0xa574f;};return a100_0xfd9f();}export async function doUpdateCdnUrls(_0x853f20,_0x359957,_0x4f5472,_0x1d5054){const _0x1c9137=a100_0x1a75,_0x378ec0=_0x4f5472[_0x1c9137(0x1f7)](_0x1045f7=>_0x1045f7[_0x1c9137(0x1e7)][_0x1c9137(0x201)]>0x0),_0x544c09=await Promise[_0x1c9137(0x200)](_0x378ec0[_0x1c9137(0x204)](_0x2a9b9d=>updateMenuCdnUrl(_0x853f20,_0x359957,{'id':_0x2a9b9d['id'],'label':_0x2a9b9d[_0x1c9137(0x1f6)],'path':_0x2a9b9d[_0x1c9137(0x1fd)],'resources':_0x1d5054,'extend':_0x2a9b9d[_0x1c9137(0x1f4)]??null}))),_0x12d2b3=_0x544c09[_0x1c9137(0x1f7)](_0x20487e=>_0x20487e[_0x1c9137(0x1f2)]==='fulfilled')[_0x1c9137(0x204)](_0x34d4cb=>_0x34d4cb[_0x1c9137(0x1fc)]),_0x138543=_0x544c09[_0x1c9137(0x1f7)](_0x2daa7a=>_0x2daa7a[_0x1c9137(0x1f2)]===_0x1c9137(0x1f1))[_0x1c9137(0x201)];return{'updated':_0x12d2b3['length'],'failed':_0x138543,'menus':_0x12d2b3};}export async function fetchMenuData(_0x10001a,_0x587ac5){const _0x2caf02=a100_0x1a75,_0x461397=getLocalPages(),_0x1f8b71=await getOnlineMenuList(_0x10001a,_0x587ac5),_0x1e5b16=new Set(_0x1f8b71[_0x2caf02(0x204)](_0x5b8a1d=>_0x5b8a1d[_0x2caf02(0x1fd)]));return{'localPages':_0x461397,'onlineMenuList':_0x1f8b71,'onlinePaths':_0x1e5b16};}export async function fetchOnlineMenuList(_0x114a40,_0x273921){return getOnlineMenuList(_0x114a40,_0x273921);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x352c1b,_0x4220aa){const _0x517cf9=a101_0x31a2,_0x20bc13=_0x352c1b();while(!![]){try{const _0x33a55f=parseInt(_0x517cf9(0x1f0))/0x1+parseInt(_0x517cf9(0x1f4))/0x2+parseInt(_0x517cf9(0x1e7))/0x3*(-parseInt(_0x517cf9(0x1f5))/0x4)+-parseInt(_0x517cf9(0x1d9))/0x5+-parseInt(_0x517cf9(0x1ee))/0x6*(-parseInt(_0x517cf9(0x1ec))/0x7)+parseInt(_0x517cf9(0x1ef))/0x8*(parseInt(_0x517cf9(0x1e2))/0x9)+-parseInt(_0x517cf9(0x1e5))/0xa;if(_0x33a55f===_0x4220aa)break;else _0x20bc13['push'](_0x20bc13['shift']());}catch(_0x434c27){_0x20bc13['push'](_0x20bc13['shift']());}}}(a101_0x2d92,0xa32ed));function a101_0x31a2(_0x237de2,_0x2744c2){_0x237de2=_0x237de2-0x1d1;const _0x2d920f=a101_0x2d92();let _0x31a214=_0x2d920f[_0x237de2];return _0x31a214;}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(_0x2dda81,_0x5681d5){const _0x53f835=a101_0x31a2,_0x539c79=getEnv();logger[_0x53f835(0x1de)](_0x53f835(0x1dd),isProduction(_0x539c79)?_0x53f835(0x1f9)+_0x2dda81+')':_0x53f835(0x1e4)+_0x2dda81+')');const _0x43939c=await platformFetch(getApiDomain()+_0x53f835(0x1f2)+_0x2dda81,{'cookie':_0x5681d5,'label':'Fetch\x20menu\x20list'});if(!_0x43939c)return logger['info'](_0x53f835(0x1dd),_0x53f835(0x1fc)),[];return logger[_0x53f835(0x1de)]('get-online-menu-list','Fetched\x20'+_0x43939c[_0x53f835(0x1e8)]+_0x53f835(0x1d6)),_0x43939c[_0x53f835(0x1df)](flattenMenuItem)[_0x53f835(0x1eb)]();}function flattenMenuItem(_0x22d959){const _0x120cb4=a101_0x31a2;let _0x54f928=[];try{const _0x3f5231=_0x22d959['extend']?.[_0x120cb4(0x1ed)];if(typeof _0x3f5231===_0x120cb4(0x1d4)){const _0x2385ad=JSON[_0x120cb4(0x1d2)](_0x3f5231);if(Array[_0x120cb4(0x1e1)](_0x2385ad))_0x54f928=_0x2385ad['map'](String);}else Array[_0x120cb4(0x1e1)](_0x3f5231)&&(_0x54f928=_0x3f5231[_0x120cb4(0x1df)](String));}catch{}const _0x1364f9=[{'id':_0x22d959['id'],'path':_0x22d959[_0x120cb4(0x1d8)],'label':_0x22d959[_0x120cb4(0x1d1)],'resources':_0x54f928,'extend':_0x22d959[_0x120cb4(0x1e6)]??null}];if(_0x22d959['children']&&_0x22d959[_0x120cb4(0x1e0)][_0x120cb4(0x1e8)]>0x0)for(const _0x10ab01 of _0x22d959['children']){_0x1364f9[_0x120cb4(0x1f6)](...flattenMenuItem(_0x10ab01));}return _0x1364f9;}export async function createMenu(_0x362f92,_0x615957,_0x47373f){const _0x917b2d=a101_0x31a2;logger[_0x917b2d(0x1de)](_0x917b2d(0x1dc),_0x917b2d(0x1ea)+_0x47373f[_0x917b2d(0x1d1)]+'\x20('+_0x47373f[_0x917b2d(0x1d8)]+')');const _0x4ecc23={'appCode':_0x362f92,'type':_0x917b2d(0x1d3),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x47373f[_0x917b2d(0x1ed)]?JSON['stringify'](_0x47373f[_0x917b2d(0x1ed)]):undefined},..._0x47373f},_0xcd103c=await platformFetch(getApiDomain()+_0x917b2d(0x1e3),{'method':'POST','body':_0x4ecc23,'cookie':_0x615957,'label':'Create\x20menu\x20\x22'+_0x47373f['label']+'\x22'});return logger['info'](_0x917b2d(0x1dc),_0x917b2d(0x1fb)+_0x47373f[_0x917b2d(0x1d1)]),_0xcd103c;}async function createSingleMenu(_0x6edb07,_0x9579be,_0xac13fc,_0x4a3c1e){const _0x1adec9=a101_0x31a2,_0x56741b={'appCode':_0x6edb07,'type':_0x1adec9(0x1d3),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x4a3c1e?JSON[_0x1adec9(0x1e9)](_0x4a3c1e):undefined},'label':_0xac13fc[_0x1adec9(0x1d1)],'path':_0xac13fc['path']},_0x20b00d=await platformFetch(getApiDomain()+'/smartapi/menu/create',{'method':'POST','body':_0x56741b,'cookie':_0x9579be,'label':_0x1adec9(0x1f1)+_0xac13fc[_0x1adec9(0x1d1)]+'\x22'});return logger[_0x1adec9(0x1de)]('create-menu',_0x1adec9(0x1fb)+_0xac13fc[_0x1adec9(0x1d1)]),_0x20b00d;}export async function createMenus(_0x340eb8,_0x2f7269,_0x36d7a2,_0x8e71e1){const _0xd83026=a101_0x31a2;logger[_0xd83026(0x1de)](_0xd83026(0x1fa),_0xd83026(0x1db)+_0x36d7a2['length']);const _0x59d82a=await Promise[_0xd83026(0x1da)](_0x36d7a2[_0xd83026(0x1df)](_0x56de5b=>createSingleMenu(_0x340eb8,_0x2f7269,_0x56de5b,_0x8e71e1)));return logger[_0xd83026(0x1de)]('create-menus','Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x36d7a2['length']),_0x59d82a;}function a101_0x2d92(){const _0x935e38=['resources','6145386fhQbQK','577816rKPkcZ','1170145GjgRbS','Create\x20menu\x20\x22','/smartapi/menu/find?appCode=','Update\x20menu\x20assets\x20\x22','695070aSCAnM','4BCcuTv','push','Menu\x20assets\x20synced:\x20','/smartapi/menu/update','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','create-menus','Menu\x20created\x20successfully:\x20','Server\x20returned\x20empty\x20menu\x20list','label','parse','procode','string','import','\x20online\x20menus\x20successfully','update-menu-cdn-url','path','894955iiDrOO','all','Start\x20batch\x20menu\x20creation,\x20total\x20','create-menu','get-online-menu-list','info','map','children','isArray','108uPutlg','/smartapi/menu/create','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','24163080AGOevW','extend','434817jKxtOn','length','stringify','Creating\x20menu:\x20','flat','7GnBPeS'];a101_0x2d92=function(){return _0x935e38;};return a101_0x2d92();}export async function updateMenuCdnUrl(_0x2fe7ea,_0x5ca9d7,_0x427fa9){const _0x3a98f8=a101_0x31a2;logger[_0x3a98f8(0x1de)](_0x3a98f8(0x1d7),'Updating\x20menu\x20asset\x20links:\x20'+_0x427fa9['label']+'\x20('+_0x427fa9[_0x3a98f8(0x1d8)]+')');const _0x39a1e7={'id':_0x427fa9['id'],'appCode':_0x2fe7ea,'extend':{..._0x427fa9[_0x3a98f8(0x1e6)]??{},'loadScriptMode':_0x3a98f8(0x1d5),'resources':_0x427fa9['resources']?JSON[_0x3a98f8(0x1e9)](_0x427fa9['resources']):undefined}},_0x11620e=await platformFetch(getApiDomain()+_0x3a98f8(0x1f8),{'method':'POST','body':_0x39a1e7,'cookie':_0x5ca9d7,'label':_0x3a98f8(0x1f3)+_0x427fa9[_0x3a98f8(0x1d1)]+'\x22'});return logger[_0x3a98f8(0x1de)]('update-menu-cdn-url',_0x3a98f8(0x1f7)+_0x427fa9[_0x3a98f8(0x1d1)],undefined),_0x11620e;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b799b,_0x28c53e){const _0x691a93=a102_0x58f3,_0x4d9539=_0x4b799b();while(!![]){try{const _0x6496d0=parseInt(_0x691a93(0x1e9))/0x1+parseInt(_0x691a93(0x203))/0x2+parseInt(_0x691a93(0x1f1))/0x3+-parseInt(_0x691a93(0x202))/0x4+-parseInt(_0x691a93(0x1f2))/0x5+parseInt(_0x691a93(0x20e))/0x6+-parseInt(_0x691a93(0x1f0))/0x7;if(_0x6496d0===_0x28c53e)break;else _0x4d9539['push'](_0x4d9539['shift']());}catch(_0x21eb18){_0x4d9539['push'](_0x4d9539['shift']());}}}(a102_0x5b57,0xe1509));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a102_0x58f3(_0x40ed46,_0x24e860){_0x40ed46=_0x40ed46-0x1e6;const _0x5b5755=a102_0x5b57();let _0x58f372=_0x5b5755[_0x40ed46];return _0x58f372;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x5662de){const _0x4ba90e=a102_0x58f3,_0x9f164=[];return _0x5662de[_0x4ba90e(0x1ea)]&&!isValidJsHttpsUrl(_0x5662de['jsUrl'])&&_0x9f164['push']({'field':_0x4ba90e(0x1ea),'message':_0x4ba90e(0x1eb)}),_0x5662de[_0x4ba90e(0x1f8)]&&!isValidCssHttpsUrl(_0x5662de[_0x4ba90e(0x1f8)])&&_0x9f164['push']({'field':'cssUrl','message':_0x4ba90e(0x1ff)}),_0x9f164;}export async function runMenuSyncCore(_0xb670b0,_0xd26840,_0x463ca3=[],_0x4a67a4){const _0x3f3c0c=a102_0x58f3,_0x309e3f=parseParamsFlag(_0x4a67a4),_0x1416f5=_0x463ca3[_0x3f3c0c(0x1ed)]>0x0?_0x463ca3:_0x309e3f[_0x3f3c0c(0x1f6)],_0x5bc578=_0x309e3f[_0x3f3c0c(0x1ea)],_0x4d0d4a=_0x309e3f['cssUrl'],_0xff8ccb=[];if(_0x5bc578)_0xff8ccb[_0x3f3c0c(0x20b)](_0x5bc578);if(_0x4d0d4a)_0xff8ccb['push'](_0x4d0d4a);const _0x4ede16=validateParams(_0x309e3f);if(_0x4ede16[_0x3f3c0c(0x1ed)]>0x0){const _0x5066ce=_0x4ede16[_0x3f3c0c(0x1f7)](_0x26cf3b=>_0x3f3c0c(0x1f4)+_0x26cf3b[_0x3f3c0c(0x1fe)]+':\x20'+_0x26cf3b[_0x3f3c0c(0x1fd)])[_0x3f3c0c(0x207)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x5066ce);}logger[_0x3f3c0c(0x1fa)](process[_0x3f3c0c(0x1fc)]()),logger[_0x3f3c0c(0x20c)](_0x3f3c0c(0x204),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0xb670b0,'selectedCount':_0x1416f5?.[_0x3f3c0c(0x1ed)],'jsUrl':_0x5bc578,'cssUrl':_0x4d0d4a});if(_0x5bc578){const _0x1f81fd=await isUrlReachable(_0x5bc578);if(!_0x1f81fd)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x5bc578);}if(_0x4d0d4a){const _0x25caf8=await isUrlReachable(_0x4d0d4a);if(!_0x25caf8)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x4d0d4a);}const _0x3293b6=getLocalPages();if(_0x3293b6['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x15b691=await getOnlineMenuList(_0xb670b0,_0xd26840),_0x5b699e=new Set(_0x15b691[_0x3f3c0c(0x1f7)](_0x4a4c23=>_0x4a4c23['path']));let _0x5ef1b1;if(_0x1416f5&&_0x1416f5[_0x3f3c0c(0x1ed)]>0x0){const _0x2d47fb=new Set(_0x1416f5[_0x3f3c0c(0x1f7)](_0x5236cb=>_0x5236cb[_0x3f3c0c(0x1e6)]()));_0x5ef1b1=_0x3293b6['filter'](_0x3afbe6=>_0x2d47fb[_0x3f3c0c(0x20a)](_0x3afbe6[_0x3f3c0c(0x1fb)]));if(_0x5ef1b1[_0x3f3c0c(0x1ed)]===0x0){const _0x5daa97=_0x3293b6[_0x3f3c0c(0x1f7)](_0x54edc3=>_0x54edc3['label'])[_0x3f3c0c(0x207)](',\x20');throw new Error(_0x3f3c0c(0x205)+[..._0x2d47fb][_0x3f3c0c(0x207)](',\x20')+'\x0a\x20\x20Available\x20local\x20pages:\x20'+_0x5daa97);}}else _0x5ef1b1=_0x3293b6[_0x3f3c0c(0x1ec)](_0x2b9ebe=>!_0x5b699e[_0x3f3c0c(0x20a)](_0x2b9ebe[_0x3f3c0c(0x208)]));if(_0x5ef1b1['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x360559=await createMenus(_0xb670b0,_0xd26840,_0x5ef1b1,_0xff8ccb['length']>0x0?_0xff8ccb:undefined);return logger['info']('menu-sync',_0x3f3c0c(0x1ef),{'count':_0x5ef1b1[_0x3f3c0c(0x1ed)],'resources':_0xff8ccb}),{'created':_0x360559[_0x3f3c0c(0x1ed)],'skipped':![],'targetPages':_0x5ef1b1,'menus':_0x360559};}function a102_0x5b57(){const _0xf6cbdd=['trim','startsWith','isArray','1284759wAxoqW','jsUrl','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','filter','length','object','Menu\x20sync\x20completed','2547251VLdavI','1147959bgsoYA','1727510qAxhib','readableEnded','--params.','parse','selectedLabels','map','cssUrl','pages','setLogPath','label','cwd','message','field','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','stdin','string','3407464lTbbbl','415238VYhImM','menu-sync','No\x20local\x20pages\x20matched\x20labels:\x20','concat','join','path','utf8','has','push','info','isTTY','3654714mpcAXW'];a102_0x5b57=function(){return _0xf6cbdd;};return a102_0x5b57();}export async function readPageLabelsFromStdin(){const _0x538bfe=a102_0x58f3;if(!process[_0x538bfe(0x200)][_0x538bfe(0x20d)]&&!process[_0x538bfe(0x200)][_0x538bfe(0x1f3)])return new Promise(_0x5d28fa=>{const _0x4a7184=_0x538bfe,_0x1dac8b=[];process[_0x4a7184(0x200)]['on']('data',_0x2ae989=>_0x1dac8b[_0x4a7184(0x20b)](_0x2ae989)),process[_0x4a7184(0x200)]['on']('end',()=>{const _0x5ace8d=_0x4a7184,_0x46c262=Buffer[_0x5ace8d(0x206)](_0x1dac8b)['toString'](_0x5ace8d(0x209)),_0x15238c=_0x46c262['split']('\x0a')['map'](_0x1e0035=>_0x1e0035[_0x5ace8d(0x1e6)]())['filter'](_0x5a0ae6=>_0x5a0ae6[_0x5ace8d(0x1ed)]>0x0&&!_0x5a0ae6[_0x5ace8d(0x1e7)]('#'));_0x5d28fa(_0x15238c);}),setTimeout(()=>_0x5d28fa([]),0x1f4);});return[];}function parseParamsFlag(_0x52b4d6){const _0x30f49c=a102_0x58f3;if(!_0x52b4d6||typeof _0x52b4d6!=='string')return{};try{const _0x179e0a=JSON[_0x30f49c(0x1f5)](_0x52b4d6);if(typeof _0x179e0a!==_0x30f49c(0x1ee)||_0x179e0a===null||Array['isArray'](_0x179e0a))return{};return{'selectedLabels':Array[_0x30f49c(0x1e8)](_0x179e0a[_0x30f49c(0x1f9)])?_0x179e0a['pages'][_0x30f49c(0x1f7)](String):undefined,'jsUrl':typeof _0x179e0a[_0x30f49c(0x1ea)]===_0x30f49c(0x201)?_0x179e0a[_0x30f49c(0x1ea)]['trim']():undefined,'cssUrl':typeof _0x179e0a[_0x30f49c(0x1f8)]===_0x30f49c(0x201)?_0x179e0a[_0x30f49c(0x1f8)]['trim']():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54f43d,_0x4d9329){const _0x1be555=a104_0x38f1,_0x3b907b=_0x54f43d();while(!![]){try{const _0x4cb71f=-parseInt(_0x1be555(0x1f8))/0x1*(parseInt(_0x1be555(0x1db))/0x2)+-parseInt(_0x1be555(0x1dc))/0x3+-parseInt(_0x1be555(0x203))/0x4+parseInt(_0x1be555(0x1da))/0x5*(-parseInt(_0x1be555(0x20d))/0x6)+-parseInt(_0x1be555(0x1e2))/0x7*(parseInt(_0x1be555(0x1e5))/0x8)+parseInt(_0x1be555(0x1e0))/0x9+parseInt(_0x1be555(0x1fe))/0xa*(parseInt(_0x1be555(0x1fb))/0xb);if(_0x4cb71f===_0x4d9329)break;else _0x3b907b['push'](_0x3b907b['shift']());}catch(_0x3f9e54){_0x3b907b['push'](_0x3b907b['shift']());}}}(a104_0x2700,0x81639));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x3f5ef8){const _0x266980=a104_0x38f1,_0x355fe4=[];return _0x3f5ef8[_0x266980(0x1f1)]&&!isValidJsHttpsUrl(_0x3f5ef8[_0x266980(0x1f1)])&&_0x355fe4[_0x266980(0x212)]({'field':_0x266980(0x1f1),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x3f5ef8[_0x266980(0x1e6)]&&!isValidCssHttpsUrl(_0x3f5ef8[_0x266980(0x1e6)])&&_0x355fe4[_0x266980(0x212)]({'field':_0x266980(0x1e6),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x355fe4;}export async function runMenuUpdateCore(_0x15b52d,_0x316fb5,_0x4951e8,_0x44c392={}){const _0x1d3051=a104_0x38f1,_0x1a2fd8=parseUpdateParamsFlag(_0x4951e8),_0x26902b=normalizeMode(_0x44c392[_0x1d3051(0x1d9)]),_0x5b30e1=[];if(_0x1a2fd8[_0x1d3051(0x1f1)])_0x5b30e1[_0x1d3051(0x212)](_0x1a2fd8['jsUrl']);if(_0x1a2fd8[_0x1d3051(0x1e6)])_0x5b30e1[_0x1d3051(0x212)](_0x1a2fd8['cssUrl']);const _0x4b6ec8=validateParams(_0x1a2fd8);if(_0x4b6ec8[_0x1d3051(0x1e9)]>0x0){const _0x340ffe=_0x4b6ec8[_0x1d3051(0x1e8)](_0x2688bc=>_0x1d3051(0x1f4)+_0x2688bc[_0x1d3051(0x20e)]+':\x20'+_0x2688bc[_0x1d3051(0x1e3)])[_0x1d3051(0x206)](';\x20');throw new Error(_0x1d3051(0x205)+_0x340ffe);}if(_0x5b30e1[_0x1d3051(0x1e9)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x1d3051(0x211));logger[_0x1d3051(0x1fc)](process[_0x1d3051(0x1e1)]()),logger['info'](_0x1d3051(0x208),'Start\x20non-interactive\x20menu\x20update',{'appCode':_0x15b52d,'jsUrl':_0x1a2fd8[_0x1d3051(0x1f1)],'cssUrl':_0x1a2fd8[_0x1d3051(0x1e6)],'mode':_0x26902b,'dryRun':_0x44c392[_0x1d3051(0x1ee)]===!![]});if(_0x1a2fd8[_0x1d3051(0x1f1)]){const _0x1578cf=await isUrlReachable(_0x1a2fd8[_0x1d3051(0x1f1)]);if(!_0x1578cf)throw new Error(_0x1d3051(0x209)+_0x1a2fd8['jsUrl']);}if(_0x1a2fd8[_0x1d3051(0x1e6)]){const _0x1726a6=await isUrlReachable(_0x1a2fd8[_0x1d3051(0x1e6)]);if(!_0x1726a6)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x1a2fd8[_0x1d3051(0x1e6)]);}const _0x3316c0=await getOnlineMenuList(_0x15b52d,_0x316fb5),_0x2a5110=_0x3316c0['filter'](_0x44d35d=>_0x44d35d[_0x1d3051(0x1f3)]['length']>0x0);if(_0x2a5110[_0x1d3051(0x1e9)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x44c392[_0x1d3051(0x1ee)]===!![]};const _0x5cd898=_0x2a5110['map'](_0x34824c=>buildMenuUpdateDiff(_0x34824c,_0x1a2fd8,_0x26902b,_0x44c392['force']===!![]));if(_0x44c392[_0x1d3051(0x1ee)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x5cd898};const _0x2c36bd=await Promise[_0x1d3051(0x1dd)](_0x2a5110[_0x1d3051(0x1e8)]((_0x5458f4,_0x22cb00)=>updateMenuCdnUrl(_0x15b52d,_0x316fb5,{'id':_0x5458f4['id'],'label':_0x5458f4[_0x1d3051(0x1f0)],'path':_0x5458f4[_0x1d3051(0x1eb)],'resources':_0x5cd898[_0x22cb00][_0x1d3051(0x20f)]['resources'],'extend':_0x5458f4['extend']??null}))),_0x40abc7=_0x2c36bd[_0x1d3051(0x1f6)](_0x317e6a=>_0x317e6a[_0x1d3051(0x207)]===_0x1d3051(0x1ed))[_0x1d3051(0x1e8)](_0x54dbfb=>_0x54dbfb[_0x1d3051(0x202)]),_0x2d6bf1=_0x2c36bd[_0x1d3051(0x1f6)](_0x2f3522=>_0x2f3522[_0x1d3051(0x207)]==='rejected')[_0x1d3051(0x1e9)];return logger[_0x1d3051(0x1fa)](_0x1d3051(0x208),_0x1d3051(0x1ef),{'count':_0x2a5110['length'],'resources':_0x5b30e1}),{'updated':_0x40abc7['length'],'failed':_0x2d6bf1,'skipped':![],'menus':_0x40abc7};}function normalizeMode(_0x5d389f){const _0x362523=a104_0x38f1;if(!_0x5d389f)return _0x362523(0x210);if(_0x5d389f==='replace'||_0x5d389f===_0x362523(0x1f5))return _0x5d389f;throw new Error(_0x362523(0x1de)+_0x5d389f+_0x362523(0x20c));}function buildMenuUpdateDiff(_0x3ed8aa,_0x1e4521,_0x338014,_0x1871b5){const _0x562a86=a104_0x38f1,_0x5c10ce=[..._0x3ed8aa['resources']],_0x1318b8=_0x338014===_0x562a86(0x1f5)?patchResources(_0x5c10ce,_0x1e4521):replaceResources(_0x1e4521),_0x589e78=[],_0x3d1408=_0x5c10ce[_0x562a86(0x1df)](isJsResource),_0x120ad5=_0x1318b8[_0x562a86(0x1df)](isJsResource);if(_0x3d1408&&!_0x120ad5){const _0x1a259e=_0x562a86(0x201)+_0x3ed8aa[_0x562a86(0x1f0)]+_0x562a86(0x204)+_0x3ed8aa[_0x562a86(0x1eb)]+_0x562a86(0x1ea)+_0x562a86(0x1e7);if(!_0x1871b5)throw new Error(_0x1a259e);_0x589e78[_0x562a86(0x212)](_0x1a259e);}const _0x4575d4=_0x5c10ce[_0x562a86(0x1df)](isCssResource),_0x2cbfd5=_0x1318b8['some'](isCssResource);return _0x4575d4&&!_0x2cbfd5&&_0x589e78[_0x562a86(0x212)]('menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x3ed8aa[_0x562a86(0x1f0)]+_0x562a86(0x204)+_0x3ed8aa[_0x562a86(0x1eb)]+').'),{'id':_0x3ed8aa['id'],'label':_0x3ed8aa[_0x562a86(0x1f0)],'path':_0x3ed8aa[_0x562a86(0x1eb)],'mode':_0x338014,'before':{'resources':_0x5c10ce},'after':{'resources':_0x1318b8},'warnings':_0x589e78};}function a104_0x38f1(_0x5a75d3,_0x2f1550){_0x5a75d3=_0x5a75d3-0x1d9;const _0x27009d=a104_0x2700();let _0x38f198=_0x27009d[_0x5a75d3];return _0x38f198;}function replaceResources(_0x4baeff){const _0x20b3be=a104_0x38f1;return[_0x4baeff['jsUrl'],_0x4baeff[_0x20b3be(0x1e6)]][_0x20b3be(0x1f6)](_0x40207b=>!!_0x40207b);}function patchResources(_0x29eba,_0x631e31){const _0x5ec56b=a104_0x38f1;let _0x3db498=![],_0x4c4509=![];const _0x3dd591=[];for(const _0x3eb5e4 of _0x29eba){if(isJsResource(_0x3eb5e4)){if(_0x631e31[_0x5ec56b(0x1f1)]&&!_0x3db498)_0x3dd591['push'](_0x631e31[_0x5ec56b(0x1f1)]),_0x3db498=!![];else!_0x631e31['jsUrl']&&_0x3dd591[_0x5ec56b(0x212)](_0x3eb5e4);continue;}if(isCssResource(_0x3eb5e4)){if(_0x631e31[_0x5ec56b(0x1e6)]&&!_0x4c4509)_0x3dd591[_0x5ec56b(0x212)](_0x631e31['cssUrl']),_0x4c4509=!![];else!_0x631e31[_0x5ec56b(0x1e6)]&&_0x3dd591[_0x5ec56b(0x212)](_0x3eb5e4);continue;}_0x3dd591['push'](_0x3eb5e4);}return _0x631e31[_0x5ec56b(0x1f1)]&&!_0x3db498&&_0x3dd591[_0x5ec56b(0x1fd)](_0x631e31[_0x5ec56b(0x1f1)]),_0x631e31['cssUrl']&&!_0x4c4509&&_0x3dd591[_0x5ec56b(0x212)](_0x631e31[_0x5ec56b(0x1e6)]),_0x3dd591;}function isJsResource(_0x34c4e6){const _0x3dd5c2=a104_0x38f1;return stripQuery(_0x34c4e6)[_0x3dd5c2(0x1e4)]()[_0x3dd5c2(0x20a)]('.js');}function isCssResource(_0x5240ed){const _0x35b794=a104_0x38f1;return stripQuery(_0x5240ed)[_0x35b794(0x1e4)]()[_0x35b794(0x20a)](_0x35b794(0x1f7));}function a104_0x2700(){const _0x457880=['path','isArray','fulfilled','dryRun','Menu\x20update\x20completed','label','jsUrl','object','resources','--params.','patch','filter','.css','175094WoBazT','string','info','11gFJcoa','setLogPath','unshift','28421450ggewuN','trim','parse','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','value','2934116xTkzjq','\x22\x20(','Invalid\x20--params:\x20','join','status','menu-update','JS\x20URL\x20is\x20unreachable:\x20','endsWith','split','.\x20Allowed\x20values:\x20replace,\x20patch','1616718aqUxzM','field','after','replace','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','push','mode','5zRErwW','12pTKhmd','302478eysubn','allSettled','Invalid\x20--mode:\x20','some','821124oGEQVm','cwd','217903AnYAAw','message','toLowerCase','64SfVpwm','cssUrl','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','map','length',').\x20'];a104_0x2700=function(){return _0x457880;};return a104_0x2700();}function stripQuery(_0x2b1472){const _0x303f0a=a104_0x38f1;return _0x2b1472[_0x303f0a(0x20b)]('?')[0x0]??_0x2b1472;}function parseUpdateParamsFlag(_0x5537b5){const _0x47ccf8=a104_0x38f1;if(!_0x5537b5||typeof _0x5537b5!==_0x47ccf8(0x1f9))return{};try{const _0x6e7e4d=JSON[_0x47ccf8(0x200)](_0x5537b5);if(typeof _0x6e7e4d!==_0x47ccf8(0x1f2)||_0x6e7e4d===null||Array[_0x47ccf8(0x1ec)](_0x6e7e4d))return{};return{'jsUrl':typeof _0x6e7e4d[_0x47ccf8(0x1f1)]===_0x47ccf8(0x1f9)?_0x6e7e4d[_0x47ccf8(0x1f1)][_0x47ccf8(0x1ff)]():undefined,'cssUrl':typeof _0x6e7e4d['cssUrl']===_0x47ccf8(0x1f9)?_0x6e7e4d[_0x47ccf8(0x1e6)][_0x47ccf8(0x1ff)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a105_0x4b3a(_0x31189f,_0x237042){_0x31189f=_0x31189f-0x16b;const _0x575ba4=a105_0x575b();let _0x4b3ac6=_0x575ba4[_0x31189f];return _0x4b3ac6;}(function(_0x1e0bfa,_0x504865){const _0x541e75=a105_0x4b3a,_0x45a133=_0x1e0bfa();while(!![]){try{const _0x31a83a=parseInt(_0x541e75(0x171))/0x1*(parseInt(_0x541e75(0x178))/0x2)+parseInt(_0x541e75(0x172))/0x3*(parseInt(_0x541e75(0x176))/0x4)+-parseInt(_0x541e75(0x16f))/0x5+parseInt(_0x541e75(0x173))/0x6*(-parseInt(_0x541e75(0x16e))/0x7)+parseInt(_0x541e75(0x16c))/0x8*(-parseInt(_0x541e75(0x16b))/0x9)+parseInt(_0x541e75(0x170))/0xa+parseInt(_0x541e75(0x177))/0xb;if(_0x31a83a===_0x504865)break;else _0x45a133['push'](_0x45a133['shift']());}catch(_0x3f47e6){_0x45a133['push'](_0x45a133['shift']());}}}(a105_0x575b,0x480ee));export function isValidJsHttpsUrl(_0x1035ce){const _0x420280=a105_0x4b3a;return/^https:\/\/.+\.js(\?.*)?$/[_0x420280(0x16d)](_0x1035ce[_0x420280(0x175)]());}export function isValidCssHttpsUrl(_0x5b1442){const _0x346799=a105_0x4b3a;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x5b1442[_0x346799(0x175)]());}function a105_0x575b(){const _0x2246d7=['test','189LLXlWw','2725560BgNPrZ','5683800hvzXNd','171727bQKFAL','48969ieLpee','63486BBYAwZ','HEAD','trim','72FSikkJ','3582623LQcZhY','4fvtCNY','140328iPwBxu','208rCCfrV'];a105_0x575b=function(){return _0x2246d7;};return a105_0x575b();}export async function isUrlReachable(_0x1809a9){const _0x52e292=a105_0x4b3a;try{const _0x20b9d2=await fetch(_0x1809a9,{'method':_0x52e292(0x174)});return _0x20b9d2['ok'];}catch{return![];}}
|