@lovrabet/rabetbase-cli 2.3.4-beta.2 → 2.3.4-beta.4
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 -0
- 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 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.js +1 -0
- 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 -0
- package/lib/commands/permit/page-get.js +1 -0
- package/lib/commands/permit/page-set.js +1 -0
- package/lib/commands/permit/role-apis-set.js +1 -0
- package/lib/commands/permit/role-menus-set.js +1 -0
- package/lib/commands/permit/role-menus.js +1 -0
- package/lib/commands/permit/shared.js +1 -0
- 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 -0
- package/lib/commands/role/delete.js +1 -0
- package/lib/commands/role/detail.js +1 -0
- package/lib/commands/role/index.js +1 -0
- package/lib/commands/role/list.js +1 -0
- package/lib/commands/role/shared.js +1 -0
- package/lib/commands/role/update.js +1 -0
- package/lib/commands/role/user-add.js +1 -0
- package/lib/commands/role/user-remove.js +1 -0
- package/lib/commands/role/user-resolve.js +1 -0
- 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 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -0
- 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 +2 -2
- package/lib/commands/app/discover.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x4de999=a93_0x8acc;(function(_0x4d09b1,_0x4af00f){const _0x162f1f=a93_0x8acc,_0x29da74=_0x4d09b1();while(!![]){try{const _0x249635=-parseInt(_0x162f1f(0x1d8))/0x1+-parseInt(_0x162f1f(0x1fc))/0x2+-parseInt(_0x162f1f(0x1dc))/0x3*(-parseInt(_0x162f1f(0x1f8))/0x4)+-parseInt(_0x162f1f(0x1e6))/0x5+parseInt(_0x162f1f(0x1e7))/0x6*(parseInt(_0x162f1f(0x1f7))/0x7)+-parseInt(_0x162f1f(0x1d3))/0x8+parseInt(_0x162f1f(0x1cd))/0x9;if(_0x249635===_0x4af00f)break;else _0x29da74['push'](_0x29da74['shift']());}catch(_0x428fb5){_0x29da74['push'](_0x29da74['shift']());}}}(a93_0x4629,0x2eed4));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';function a93_0x4629(){const _0x32fc73=['apiError','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','37797kvQrnW','validation','Failed\x20to\x20report\x20platform\x20issue:\x20','issue.description_redactions','title','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Platform\x20issue\x20reported','Issue\x20description\x20cannot\x20be\x20empty.','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','sanitize','799710XDPdZv','6xAQWhS','One-line\x20issue\x20summary','description-file','originalBytes','issue.description_original_bytes','write','Platform\x20issue\x20reported\x20(','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','otel://','redactionCount','str','join','redactions:\x20','descriptionFilePath','report','descriptionSource','1362851hXrJrc','68rUzefi','push','File\x20not\x20found:\x20','string','482418RqoMxj','inline','POST','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','cwd','flagMissing','filter','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','redacted\x20','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','\x20secret(s):\x20','trim','\x20bytes','issue.description_truncated','truncated\x20from\x20','4527747oirirI','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','redactionKinds','utf8','file','length','2462616jfQdvM','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','truncated','issue.title','compress','10769aDYxCU','description'];a93_0x4629=function(){return _0x32fc73;};return a93_0x4629();}const DESCRIPTION_FILE_FLAG=a93_0x4de999(0x1e9);function a93_0x8acc(_0x148e75,_0x3aac0a){_0x148e75=_0x148e75-0x1cd;const _0x4629a0=a93_0x4629();let _0x8acc7d=_0x4629a0[_0x148e75];return _0x8acc7d;}export const issueReport={'service':'issue','command':a93_0x4de999(0x1f5),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a93_0x4de999(0x1ec),'requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':a93_0x4de999(0x1d7),'flags':[{'name':a93_0x4de999(0x1e0),'type':'string','required':!![],'description':a93_0x4de999(0x1e8)},{'name':'description','type':a93_0x4de999(0x1fb),'description':a93_0x4de999(0x1d4)},{'name':DESCRIPTION_FILE_FLAG,'type':a93_0x4de999(0x1fb),'description':a93_0x4de999(0x203)}],async 'validate'(_0x142cad){const _0x55f0c6=a93_0x4de999,_0x44392a=_0x142cad['str'](_0x55f0c6(0x1e0))[_0x55f0c6(0x207)](),_0x5b58ee=_0x142cad[_0x55f0c6(0x1f1)]('description')['trim'](),_0x1a1b7f=_0x142cad[_0x55f0c6(0x1f1)](DESCRIPTION_FILE_FLAG)[_0x55f0c6(0x207)]();if(!_0x44392a)throw CliErrors[_0x55f0c6(0x201)](_0x55f0c6(0x1e0),_0x55f0c6(0x1ce));const _0x1726ea=_0x5b58ee[_0x55f0c6(0x1d2)]>0x0,_0x35cb1e=_0x1a1b7f[_0x55f0c6(0x1d2)]>0x0;if(_0x1726ea===_0x35cb1e)throw CliErrors[_0x55f0c6(0x1dd)](_0x55f0c6(0x1e1),_0x55f0c6(0x205));if(_0x35cb1e){const _0x5ce0a2=resolve(process[_0x55f0c6(0x200)](),_0x1a1b7f);if(!existsSync(_0x5ce0a2))throw CliErrors[_0x55f0c6(0x1dd)](_0x55f0c6(0x1fa)+_0x5ce0a2);}},async 'dryRun'(_0x6f8366){const _0x368ab3=a93_0x4de999,_0x135c93=await prepareIssueReport(_0x6f8366);return{'method':_0x368ab3(0x1fe),'url':_0x368ab3(0x1ef)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x135c93[_0x368ab3(0x1e0)],'issue.description':_0x135c93[_0x368ab3(0x1d9)],'issue.description_original_bytes':_0x135c93[_0x368ab3(0x1e5)][_0x368ab3(0x1ea)],'issue.description_truncated':_0x135c93[_0x368ab3(0x1e5)][_0x368ab3(0x1d5)],'issue.description_redactions':_0x135c93[_0x368ab3(0x1e5)][_0x368ab3(0x1f0)],'issue.description_redaction_kinds':_0x135c93[_0x368ab3(0x1e5)][_0x368ab3(0x1cf)]['join'](',')}},'description':[_0x368ab3(0x1e4),'descriptionSource:\x20'+_0x135c93[_0x368ab3(0x1f6)],_0x135c93[_0x368ab3(0x1f4)]?'descriptionFile:\x20'+_0x135c93[_0x368ab3(0x1f4)]:null,_0x135c93[_0x368ab3(0x1e5)]['truncated']?'truncated:\x20original\x20'+_0x135c93['sanitize'][_0x368ab3(0x1ea)]+_0x368ab3(0x208):null,_0x135c93[_0x368ab3(0x1e5)][_0x368ab3(0x1f0)]>0x0?_0x368ab3(0x1f3)+_0x135c93[_0x368ab3(0x1e5)]['redactionCount']+'\x20('+_0x135c93['sanitize'][_0x368ab3(0x1cf)][_0x368ab3(0x1f2)](',\x20')+')':null][_0x368ab3(0x202)](Boolean)[_0x368ab3(0x1f2)]('\x0a')};},async 'execute'(_0x3e4ebd){const _0x5cfb1b=a93_0x4de999,_0x3ea0b6=await prepareIssueReport(_0x3e4ebd);try{await sendPlatformIssueCollectLog({'title':_0x3ea0b6[_0x5cfb1b(0x1e0)],'description':_0x3ea0b6[_0x5cfb1b(0x1d9)],'sanitize':{'originalBytes':_0x3ea0b6[_0x5cfb1b(0x1e5)]['originalBytes'],'truncated':_0x3ea0b6[_0x5cfb1b(0x1e5)][_0x5cfb1b(0x1d5)],'redactionCount':_0x3ea0b6[_0x5cfb1b(0x1e5)][_0x5cfb1b(0x1f0)],'redactionKinds':_0x3ea0b6['sanitize'][_0x5cfb1b(0x1cf)]}});}catch(_0x3de541){throw CliErrors[_0x5cfb1b(0x1da)](_0x5cfb1b(0x1de)+(_0x3de541 instanceof Error?_0x3de541['message']:String(_0x3de541)),_0x5cfb1b(0x1db));}return{'ok':!![],'message':buildResultMessage(_0x3ea0b6['sanitize']),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x5cfb1b(0x1d6),'issue.description',_0x5cfb1b(0x1eb),_0x5cfb1b(0x209),_0x5cfb1b(0x1df),'issue.description_redaction_kinds'],'issue':{'title':_0x3ea0b6[_0x5cfb1b(0x1e0)],'descriptionLength':_0x3ea0b6[_0x5cfb1b(0x1d9)]['length'],'descriptionSource':_0x3ea0b6['descriptionSource'],..._0x3ea0b6[_0x5cfb1b(0x1f4)]?{'descriptionFile':_0x3ea0b6[_0x5cfb1b(0x1f4)]}:{},'sanitize':{'originalBytes':_0x3ea0b6[_0x5cfb1b(0x1e5)][_0x5cfb1b(0x1ea)],'truncated':_0x3ea0b6[_0x5cfb1b(0x1e5)][_0x5cfb1b(0x1d5)],'redactions':_0x3ea0b6[_0x5cfb1b(0x1e5)][_0x5cfb1b(0x1f0)],'redactionKinds':_0x3ea0b6[_0x5cfb1b(0x1e5)][_0x5cfb1b(0x1cf)]}}}};}};function buildResultMessage(_0xd1eaba){const _0x3fe715=a93_0x4de999,_0x122e67=[];return _0xd1eaba['truncated']&&_0x122e67['push'](_0x3fe715(0x20a)+_0xd1eaba[_0x3fe715(0x1ea)]+_0x3fe715(0x208)),_0xd1eaba['redactionCount']>0x0&&_0x122e67[_0x3fe715(0x1f9)](_0x3fe715(0x204)+_0xd1eaba['redactionCount']+_0x3fe715(0x206)+_0xd1eaba[_0x3fe715(0x1cf)][_0x3fe715(0x1f2)](',\x20')),_0x122e67[_0x3fe715(0x1d2)]===0x0?_0x3fe715(0x1e2):_0x3fe715(0x1ed)+_0x122e67['join'](';\x20')+')';}async function prepareIssueReport(_0x570651){const _0x23bd3d=a93_0x4de999,_0x192dbc=_0x570651['str'](_0x23bd3d(0x1e0))[_0x23bd3d(0x207)](),_0x231a00=_0x570651[_0x23bd3d(0x1f1)](_0x23bd3d(0x1d9)),_0x12b900=_0x570651[_0x23bd3d(0x1f1)](DESCRIPTION_FILE_FLAG)[_0x23bd3d(0x207)]();if(!_0x12b900){const _0x174c7f=_0x231a00;if(!_0x174c7f['trim']())throw CliErrors[_0x23bd3d(0x1dd)](_0x23bd3d(0x1e3),_0x23bd3d(0x1ee));const _0x4f238f=sanitizeIssueDescription(_0x174c7f);return{'title':_0x192dbc,'description':_0x4f238f[_0x23bd3d(0x1d9)],'descriptionSource':_0x23bd3d(0x1fd),'sanitize':_0x4f238f};}const _0x265433=resolve(process[_0x23bd3d(0x200)](),_0x12b900),_0x2bffb3=await readFile(_0x265433,_0x23bd3d(0x1d0));if(!_0x2bffb3[_0x23bd3d(0x207)]())throw CliErrors[_0x23bd3d(0x1dd)]('Issue\x20description\x20file\x20is\x20empty:\x20'+_0x265433,_0x23bd3d(0x1ff));const _0x306e2a=sanitizeIssueDescription(_0x2bffb3);return{'title':_0x192dbc,'description':_0x306e2a[_0x23bd3d(0x1d9)],'descriptionSource':_0x23bd3d(0x1d1),'descriptionFilePath':_0x265433,'sanitize':_0x306e2a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x6baf64=a94_0x52a9;(function(_0xa9f169,_0x4a9a9){const _0x436eb0=a94_0x52a9,_0x56535f=_0xa9f169();while(!![]){try{const _0x5663f6=parseInt(_0x436eb0(0xa0))/0x1*(-parseInt(_0x436eb0(0x93))/0x2)+-parseInt(_0x436eb0(0x94))/0x3+parseInt(_0x436eb0(0x92))/0x4*(parseInt(_0x436eb0(0x9d))/0x5)+-parseInt(_0x436eb0(0x95))/0x6+-parseInt(_0x436eb0(0xac))/0x7+parseInt(_0x436eb0(0x9e))/0x8+parseInt(_0x436eb0(0xab))/0x9;if(_0x5663f6===_0x4a9a9)break;else _0x56535f['push'](_0x56535f['shift']());}catch(_0x2e347d){_0x56535f['push'](_0x56535f['shift']());}}}(a94_0x5d01,0x311ff));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a94_0x6baf64(0x9f),REDACTION_RULES=[{'kind':a94_0x6baf64(0x9c),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':'REDACTED:cookie'},{'kind':a94_0x6baf64(0x97),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a94_0x6baf64(0xa9)},{'kind':a94_0x6baf64(0xa8),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a94_0x6baf64(0x99)},{'kind':a94_0x6baf64(0xa6),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a94_0x6baf64(0x90)},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a94_0x6baf64(0x9a)},{'kind':a94_0x6baf64(0xa7),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a94_0x6baf64(0x8f)}];export function sanitizeIssueDescription(_0x20bc58){const _0x28d0c3=a94_0x6baf64,_0x4ac08c=Buffer[_0x28d0c3(0xa4)](_0x20bc58,_0x28d0c3(0xa5)),_0x29418b=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x323eb2=_0x20bc58,_0x5d2245=0x0;const _0x1304a6=[];if(!_0x29418b)for(const _0x59d686 of REDACTION_RULES){let _0x20579f=0x0;_0x323eb2=_0x323eb2[_0x28d0c3(0xa3)](_0x59d686[_0x28d0c3(0xaa)],(_0x4870e6,_0x2ffe05)=>{const _0x1b7ca7=_0x28d0c3;_0x20579f+=0x1;const _0x3d9308=typeof _0x2ffe05===_0x1b7ca7(0x91)?_0x2ffe05:'';return _0x3d9308+'['+_0x59d686[_0x1b7ca7(0x9b)]+']';}),_0x20579f>0x0&&(_0x5d2245+=_0x20579f,!_0x1304a6['includes'](_0x59d686[_0x28d0c3(0xa2)])&&_0x1304a6[_0x28d0c3(0x96)](_0x59d686[_0x28d0c3(0xa2)]));}let _0x36191c=![];if(Buffer[_0x28d0c3(0xa4)](_0x323eb2,_0x28d0c3(0xa5))>ISSUE_DESCRIPTION_MAX_BYTES){_0x36191c=!![];const _0x34994e=Buffer[_0x28d0c3(0xa4)](TRUNCATION_NOTICE,'utf8'),_0x547440=Math[_0x28d0c3(0xa1)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x34994e);_0x323eb2=sliceUtf8Bytes(_0x323eb2,_0x547440)+TRUNCATION_NOTICE;}return{'description':_0x323eb2,'originalBytes':_0x4ac08c,'truncated':_0x36191c,'redactionCount':_0x5d2245,'redactionKinds':_0x1304a6};}function a94_0x5d01(){const _0x2b824b=['cookie','770685bNdGYj','947856MhieBg','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','1xbDFEk','max','kind','replace','byteLength','utf8','access-key','bearer-jwt','private-key','REDACTED:authorization','pattern','5446989iyOtLd','1053164mAArOs','REDACTED:bearer-jwt','REDACTED:access-key','string','4jnTTIe','458618urnksy','119355ZXmrGj','1542474zDTCUB','push','authorization','subarray','REDACTED:private-key','REDACTED:password','label'];a94_0x5d01=function(){return _0x2b824b;};return a94_0x5d01();}function a94_0x52a9(_0x4619d2,_0x2b46fd){_0x4619d2=_0x4619d2-0x8f;const _0x5d0189=a94_0x5d01();let _0x52a9c2=_0x5d0189[_0x4619d2];return _0x52a9c2;}function sliceUtf8Bytes(_0x16d370,_0x2e125b){const _0x263778=a94_0x6baf64;if(_0x2e125b<=0x0)return'';const _0x40000e=Buffer['from'](_0x16d370,_0x263778(0xa5));if(_0x40000e[_0x263778(0xa4)]<=_0x2e125b)return _0x16d370;let _0x86adf9=_0x2e125b;while(_0x86adf9>0x0){const _0x164965=_0x40000e[_0x86adf9];if(_0x164965===undefined||(_0x164965&0xc0)!==0x80)break;_0x86adf9-=0x1;}return _0x40000e[_0x263778(0x98)](0x0,_0x86adf9)['toString'](_0x263778(0xa5));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x18d5f9=a95_0x50b7;(function(_0x18e36a,_0x3889e6){const _0x5125e8=a95_0x50b7,_0x31d28e=_0x18e36a();while(!![]){try{const _0x14a475=parseInt(_0x5125e8(0x1d1))/0x1+parseInt(_0x5125e8(0x1be))/0x2*(parseInt(_0x5125e8(0x1c3))/0x3)+-parseInt(_0x5125e8(0x1b9))/0x4*(-parseInt(_0x5125e8(0x1b7))/0x5)+-parseInt(_0x5125e8(0x1c4))/0x6+parseInt(_0x5125e8(0x1b4))/0x7+parseInt(_0x5125e8(0x1b2))/0x8*(-parseInt(_0x5125e8(0x1bf))/0x9)+-parseInt(_0x5125e8(0x1cf))/0xa;if(_0x14a475===_0x3889e6)break;else _0x31d28e['push'](_0x31d28e['shift']());}catch(_0x5cd571){_0x31d28e['push'](_0x31d28e['shift']());}}}(a95_0x691b,0x32f0e));function a95_0x50b7(_0x33e9c9,_0x564221){_0x33e9c9=_0x33e9c9-0x1b0;const _0x691be3=a95_0x691b();let _0x50b702=_0x691be3[_0x33e9c9];return _0x50b702;}import{logger}from'../../utils/logger.js';function printLogs(_0x3b6016){const _0x2d7d9e=a95_0x50b7;if(_0x3b6016[_0x2d7d9e(0x1c9)]===0x0){console[_0x2d7d9e(0x1d0)]('*\x20No\x20logs\x20found');return;}console[_0x2d7d9e(0x1d0)](_0x2d7d9e(0x1cd)),_0x3b6016['forEach']((_0x34b446,_0x13ecb4)=>{const _0x27c9c9=_0x2d7d9e,_0x488354=new Date(_0x34b446[_0x27c9c9(0x1b8)])[_0x27c9c9(0x1d2)](_0x27c9c9(0x1c2)),_0x3768a9=_0x34b446[_0x27c9c9(0x1ce)]===_0x27c9c9(0x1cc)?'√':_0x34b446[_0x27c9c9(0x1ce)]==='error'?'×':_0x34b446[_0x27c9c9(0x1ce)]===_0x27c9c9(0x1c6)?'!':'i';console[_0x27c9c9(0x1d0)](_0x13ecb4+0x1+'.\x20'+_0x3768a9+'\x20['+_0x34b446[_0x27c9c9(0x1c8)]+']\x20'+_0x34b446['message']),console['log'](_0x27c9c9(0x1bd)+_0x488354),_0x34b446[_0x27c9c9(0x1bb)]&&console[_0x27c9c9(0x1d0)](_0x27c9c9(0x1bc)+_0x34b446[_0x27c9c9(0x1bb)]+'ms'),_0x34b446['details']&&Object[_0x27c9c9(0x1b0)](_0x34b446['details'])[_0x27c9c9(0x1c9)]>0x0&&console[_0x27c9c9(0x1d0)](_0x27c9c9(0x1b3)+JSON[_0x27c9c9(0x1b1)](_0x34b446[_0x27c9c9(0x1c1)],null,0x2)),console[_0x27c9c9(0x1d0)]('');});}function a95_0x691b(){const _0x15626f=['log','133066tXisTN','toLocaleString','keys','stringify','7296RSuGLI','\x20\x20\x20Details:\x20','649670affINN','clearLogs','clear','2075mpAObn','timestamp','20aycOoI','show','duration','\x20\x20\x20Duration:\x20','\x20\x20\x20Time:\x20','2LcVzII','117HiCypl','readLogs','details','en-US','1027401ACfvcA','1325580eFviUi','read','warn','write','command','length','Clear\x20command\x20history\x20logs','logs','success','*\x20Lovrabet\x20CLI\x20logs:\x0a','level','1289780GnrTYK'];a95_0x691b=function(){return _0x15626f;};return a95_0x691b();}export const logsDefinitions=[{'service':a95_0x18d5f9(0x1cb),'command':a95_0x18d5f9(0x1ba),'description':'View\x20command\x20history\x20logs','risk':a95_0x18d5f9(0x1c5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xa1a3c6){const _0x44f163=a95_0x18d5f9;return printLogs(logger[_0x44f163(0x1c0)]()),{'ok':!![]};}},{'service':a95_0x18d5f9(0x1cb),'command':a95_0x18d5f9(0x1b6),'description':a95_0x18d5f9(0x1ca),'risk':a95_0x18d5f9(0x1c7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xf0c1aa){const _0xcae035=a95_0x18d5f9;return logger[_0xcae035(0x1b5)](),console[_0xcae035(0x1d0)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53984d,_0x2cb750){const _0x2369f5=a96_0x264b,_0x1d9e45=_0x53984d();while(!![]){try{const _0x5d4740=-parseInt(_0x2369f5(0xdc))/0x1+-parseInt(_0x2369f5(0xe1))/0x2*(-parseInt(_0x2369f5(0xde))/0x3)+parseInt(_0x2369f5(0xdb))/0x4*(parseInt(_0x2369f5(0xdd))/0x5)+parseInt(_0x2369f5(0xdf))/0x6*(parseInt(_0x2369f5(0xd7))/0x7)+parseInt(_0x2369f5(0xd6))/0x8+-parseInt(_0x2369f5(0xd8))/0x9*(-parseInt(_0x2369f5(0xda))/0xa)+parseInt(_0x2369f5(0xe0))/0xb*(-parseInt(_0x2369f5(0xd9))/0xc);if(_0x5d4740===_0x2cb750)break;else _0x1d9e45['push'](_0x1d9e45['shift']());}catch(_0x18d3b0){_0x1d9e45['push'](_0x1d9e45['shift']());}}}(a96_0xfd50,0xe7d1a));function a96_0x264b(_0x2421e6,_0x302b0f){_0x2421e6=_0x2421e6-0xd6;const _0xfd508f=a96_0xfd50();let _0x264b3b=_0xfd508f[_0x2421e6];return _0x264b3b;}import{menuList}from'../../commands/menu/list.js';import{menuSync}from'../../commands/menu/sync.js';function a96_0xfd50(){const _0x247b09=['370bYvXyr','4COemQj','1324523eKhPuo','7313065bwpIdJ','84528RRfUyk','9713922DcJuGH','362714BWkHRK','2jtnVhF','13386872EaiaWK','7ApPdIy','111546QkVILC','1080njCtzr'];a96_0xfd50=function(){return _0x247b09;};return a96_0xfd50();}import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuList,menuSync,menuUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a97_0x57645f=a97_0xf6d0;(function(_0x350417,_0x3f4ba0){const _0x39e80d=a97_0xf6d0,_0x135832=_0x350417();while(!![]){try{const _0x574c54=parseInt(_0x39e80d(0x97))/0x1+-parseInt(_0x39e80d(0x9f))/0x2+-parseInt(_0x39e80d(0x8c))/0x3*(-parseInt(_0x39e80d(0xa3))/0x4)+parseInt(_0x39e80d(0x8f))/0x5*(parseInt(_0x39e80d(0xad))/0x6)+parseInt(_0x39e80d(0xae))/0x7*(parseInt(_0x39e80d(0xab))/0x8)+parseInt(_0x39e80d(0xa2))/0x9+-parseInt(_0x39e80d(0x9b))/0xa;if(_0x574c54===_0x3f4ba0)break;else _0x135832['push'](_0x135832['shift']());}catch(_0x111ed0){_0x135832['push'](_0x135832['shift']());}}}(a97_0x3bdb,0xd5c07));function a97_0x3bdb(){const _0xc1974b=['parentId','push','verbose','10869TNpeEv','read','menu','20bkPGNX','boolean','string','path','visible','map','sort','item','1620161ShYMre','extend','cookie','label','51409850krjxrV','children','list','length','227710wwoSHr','isArray','index','6782544NLROUz','1852FGGJLa','No\x20menus\x20found.','Found\x20','Return\x20extend\x20field\x20for\x20troubleshooting\x20resource\x20parsing','List\x20online\x20menu\x20facts\x20for\x20the\x20current\x20app','isFinite','resources','depth','4515656NNkEsb','bool','2272026rcrLTn','7zTVUMA'];a97_0x3bdb=function(){return _0xc1974b;};return a97_0x3bdb();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getMenuTree}from'../../core/api-client.js';export const menuList={'service':a97_0x57645f(0x8e),'command':a97_0x57645f(0x9d),'description':a97_0x57645f(0xa7),'risk':a97_0x57645f(0x8d),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'verbose','type':a97_0x57645f(0x90),'description':a97_0x57645f(0xa6)}],async 'execute'(_0x3dd848){const _0x567c9b=a97_0x57645f,_0x21eee2=_0x3dd848[_0x567c9b(0xac)]('verbose'),_0x5d403b=await getMenuTree(_0x3dd848['appCode'],_0x3dd848[_0x567c9b(0x99)]),_0xe385fe=flattenMenuItems(Array[_0x567c9b(0xa0)](_0x5d403b)?_0x5d403b:[],{'verbose':_0x21eee2,'parentId':null,'depth':0x0});return{'ok':!![],'data':{'total':_0xe385fe['length'],'menus':_0xe385fe},'message':_0xe385fe[_0x567c9b(0x9e)]===0x0?_0x567c9b(0xa4):_0x567c9b(0xa5)+_0xe385fe['length']+'\x20menu(s)'};}};function flattenMenuItems(_0x21f974,_0x20b7a3){const _0x508dd1=a97_0x57645f,_0x491728=sortMenuItems(_0x21f974),_0x52dd3e=[];for(const _0x320d31 of _0x491728){_0x52dd3e[_0x508dd1(0x8a)](toMenuListItem(_0x320d31,_0x20b7a3)),Array[_0x508dd1(0xa0)](_0x320d31[_0x508dd1(0x9c)])&&_0x320d31['children']['length']>0x0&&_0x52dd3e[_0x508dd1(0x8a)](...flattenMenuItems(_0x320d31[_0x508dd1(0x9c)],{'verbose':_0x20b7a3[_0x508dd1(0x8b)],'parentId':_0x320d31['id'],'depth':_0x20b7a3['depth']+0x1}));}return _0x52dd3e;}function sortMenuItems(_0x1853c4){const _0x1e3a5d=a97_0x57645f;return _0x1853c4[_0x1e3a5d(0x94)]((_0x5780a9,_0x33ade3)=>({'item':_0x5780a9,'index':_0x33ade3}))[_0x1e3a5d(0x95)]((_0x5e26fe,_0x19aae2)=>{const _0x4548af=_0x1e3a5d,_0x3334a=normalizeSort(_0x5e26fe[_0x4548af(0x96)]['sort']),_0x124410=normalizeSort(_0x19aae2[_0x4548af(0x96)]['sort']);if(_0x3334a!==_0x124410)return _0x3334a-_0x124410;return _0x5e26fe[_0x4548af(0xa1)]-_0x19aae2[_0x4548af(0xa1)];})[_0x1e3a5d(0x94)](({item:_0x99e7ba})=>_0x99e7ba);}function toMenuListItem(_0x403695,_0x19cb13){const _0x56a6f0=a97_0x57645f,_0x1d5ca2={'id':_0x403695['id'],'parentId':_0x19cb13[_0x56a6f0(0x89)],'depth':_0x19cb13[_0x56a6f0(0xaa)],'label':normalizeString(_0x403695[_0x56a6f0(0x9a)]),'path':normalizeString(_0x403695[_0x56a6f0(0x92)]),'type':normalizeString(_0x403695['type']),'visible':typeof _0x403695['visible']===_0x56a6f0(0x90)?_0x403695[_0x56a6f0(0x93)]:null,'sort':typeof _0x403695[_0x56a6f0(0x95)]==='number'&&Number['isFinite'](_0x403695[_0x56a6f0(0x95)])?_0x403695[_0x56a6f0(0x95)]:null,'resources':normalizeResources(_0x403695[_0x56a6f0(0x98)]?.[_0x56a6f0(0xa9)])};return _0x19cb13['verbose']&&(_0x1d5ca2[_0x56a6f0(0x98)]=_0x403695[_0x56a6f0(0x98)]??null),_0x1d5ca2;}function normalizeSort(_0x1bcfd9){const _0x34fec8=a97_0x57645f;return typeof _0x1bcfd9==='number'&&Number[_0x34fec8(0xa8)](_0x1bcfd9)?_0x1bcfd9:Number['POSITIVE_INFINITY'];}function a97_0xf6d0(_0x3a1607,_0x27e569){_0x3a1607=_0x3a1607-0x89;const _0x3bdbc6=a97_0x3bdb();let _0xf6d03f=_0x3bdbc6[_0x3a1607];return _0xf6d03f;}function normalizeString(_0x4e58d9){const _0x3b077b=a97_0x57645f;return typeof _0x4e58d9===_0x3b077b(0x91)?_0x4e58d9:'';}function normalizeResources(_0x200907){const _0x2747bd=a97_0x57645f;if(Array[_0x2747bd(0xa0)](_0x200907))return _0x200907['map'](String);if(typeof _0x200907!==_0x2747bd(0x91))return[];try{const _0x4a1891=JSON['parse'](_0x200907);return Array['isArray'](_0x4a1891)?_0x4a1891[_0x2747bd(0x94)](String):[];}catch{return[];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2617a5,_0x302dd4){const _0x1d05e7=a98_0x14f7,_0x5ec9b9=_0x2617a5();while(!![]){try{const _0x3c1c4a=parseInt(_0x1d05e7(0x1f4))/0x1*(-parseInt(_0x1d05e7(0x1e9))/0x2)+-parseInt(_0x1d05e7(0x1ed))/0x3+parseInt(_0x1d05e7(0x1e6))/0x4*(parseInt(_0x1d05e7(0x1dd))/0x5)+-parseInt(_0x1d05e7(0x1ef))/0x6+-parseInt(_0x1d05e7(0x1ea))/0x7*(parseInt(_0x1d05e7(0x1dc))/0x8)+-parseInt(_0x1d05e7(0x1ec))/0x9+parseInt(_0x1d05e7(0x1f5))/0xa;if(_0x3c1c4a===_0x302dd4)break;else _0x5ec9b9['push'](_0x5ec9b9['shift']());}catch(_0x9df94b){_0x5ec9b9['push'](_0x5ec9b9['shift']());}}}(a98_0x191b,0x3d1cc));function a98_0x191b(){const _0x85367=['max','local','848NJvrFx','25VhJAcP','\x20\x20Affected\x20menus:\x20','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','label','repeat','join','map','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','length','58060WpLLYS','push','showOnline','268196UWbPwy','11123JnUmrN','(unchanged)','3531870RfWXpd','1387722HWMMSP','path','2216484lZGiCd','\x20\x20\x20\x20•\x20','Local','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','1kZKZAP','17046910paZiSe','online'];a98_0x191b=function(){return _0x85367;};return a98_0x191b();}function strWidth(_0x343870){let _0x55a48e=0x0;for(const _0x52bc58 of _0x343870){_0x55a48e+=/[\u4e00-\u9fa5]/['test'](_0x52bc58)?0x2:0x1;}return _0x55a48e;}function padRight(_0x195206,_0x2d0f22){const _0x55af06=a98_0x14f7,_0x27c8cc=strWidth(_0x195206);return _0x195206+'\x20'[_0x55af06(0x1e1)](Math[_0x55af06(0x1da)](0x0,_0x2d0f22-_0x27c8cc));}export function renderCompareTable(_0x483bf,_0x34c628={}){const _0x313dd3=a98_0x14f7;if(_0x483bf['length']===0x0)return'';const _0x1f2863=_0x34c628[_0x313dd3(0x1e8)]??!![],_0x34165b=Math[_0x313dd3(0x1da)](0x1e,..._0x483bf[_0x313dd3(0x1e3)](_0x15a947=>strWidth(_0x15a947[_0x313dd3(0x1e0)]))),_0x46e38a=0x4,_0x13c63c=[],_0x44c779='\x20\x20'+padRight('Menu\x20Name',_0x34165b),_0x5b3ea2=padRight(_0x313dd3(0x1f1),_0x46e38a),_0x4da17d=_0x1f2863?'\x20\x20'+padRight('Platform',_0x46e38a):'';_0x13c63c[_0x313dd3(0x1e7)](_0x44c779+'\x20\x20'+_0x5b3ea2+(_0x1f2863?_0x4da17d:'')),_0x13c63c[_0x313dd3(0x1e7)]('\x20\x20'+'─'[_0x313dd3(0x1e1)](_0x34165b)+'\x20\x20'+'─'[_0x313dd3(0x1e1)](_0x46e38a)+(_0x1f2863?'\x20\x20'+'─'[_0x313dd3(0x1e1)](_0x46e38a):''));for(const _0x52d062 of _0x483bf){const _0x3c7369=padRight(_0x52d062[_0x313dd3(0x1e0)],_0x34165b),_0x460572=_0x52d062[_0x313dd3(0x1db)]?'✓':'✗',_0x5477e6=padRight(_0x460572,_0x46e38a);let _0x2b70cb='\x20\x20'+_0x3c7369+'\x20\x20'+_0x5477e6;if(_0x1f2863){const _0xd2f864=_0x52d062[_0x313dd3(0x1f6)]?'✓':'✗';_0x2b70cb+='\x20\x20'+padRight(_0xd2f864,_0x46e38a);}_0x13c63c[_0x313dd3(0x1e7)](_0x2b70cb);}return _0x13c63c[_0x313dd3(0x1e2)]('\x0a');}export function renderSyncSummary(_0x1a1ff9,_0x2df771){const _0x5c0d08=a98_0x14f7;if(_0x1a1ff9[_0x5c0d08(0x1e5)]===0x0)return _0x2df771?_0x5c0d08(0x1f2):'\x20\x20No\x20pages\x20to\x20sync.';const _0x385f5a=['\x20\x20'+_0x1a1ff9[_0x5c0d08(0x1e5)]+_0x5c0d08(0x1e4)];for(const _0x866b1a of _0x1a1ff9){_0x385f5a['push'](_0x5c0d08(0x1f0)+_0x866b1a[_0x5c0d08(0x1e0)]+'\x20('+_0x866b1a[_0x5c0d08(0x1ee)]+')');}return _0x385f5a[_0x5c0d08(0x1e2)]('\x0a');}function a98_0x14f7(_0x35d670,_0x5f4155){_0x35d670=_0x35d670-0x1da;const _0x191b15=a98_0x191b();let _0x14f787=_0x191b15[_0x35d670];return _0x14f787;}export function renderUpdateSummary(_0x3ac637,_0x3b1495){const _0x353842=a98_0x14f7;if(_0x3ac637[_0x353842(0x1e5)]===0x0)return _0x353842(0x1f3);const _0x164917=['\x20\x20'+_0x3ac637['length']+_0x353842(0x1df),'\x20\x20\x20\x20JS:\x20\x20'+(_0x3b1495[0x0]??_0x353842(0x1eb)),'\x20\x20\x20\x20CSS:\x20'+(_0x3b1495[0x1]??'(unchanged)'),'',_0x353842(0x1de)+_0x3ac637[_0x353842(0x1e2)](',\x20')];return _0x164917[_0x353842(0x1e2)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x551527,_0xdf517){var _0x99ee0a=a99_0x4fcc,_0x131dba=_0x551527();while(!![]){try{var _0x29532a=-parseInt(_0x99ee0a(0x182))/0x1*(parseInt(_0x99ee0a(0x17d))/0x2)+-parseInt(_0x99ee0a(0x17e))/0x3*(-parseInt(_0x99ee0a(0x183))/0x4)+-parseInt(_0x99ee0a(0x186))/0x5*(parseInt(_0x99ee0a(0x181))/0x6)+-parseInt(_0x99ee0a(0x17f))/0x7+parseInt(_0x99ee0a(0x180))/0x8*(parseInt(_0x99ee0a(0x184))/0x9)+parseInt(_0x99ee0a(0x17c))/0xa+parseInt(_0x99ee0a(0x185))/0xb;if(_0x29532a===_0xdf517)break;else _0x131dba['push'](_0x131dba['shift']());}catch(_0x5fe97b){_0x131dba['push'](_0x131dba['shift']());}}}(a99_0x8cea,0x93280));function a99_0x4fcc(_0x6cbea6,_0x23b4b8){_0x6cbea6=_0x6cbea6-0x17c;var _0x8ceae9=a99_0x8cea();var _0x4fcca0=_0x8ceae9[_0x6cbea6];return _0x4fcca0;}export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';function a99_0x8cea(){var _0x299ced=['4923247qTujeU','8clHzwS','354EHLvrK','3327rszPhG','2976588uNIPLt','5376177aDagFP','13500839aekDbu','69595WOniHJ','308790ofCyZN','284feTpEL','3zjIQWM'];a99_0x8cea=function(){return _0x299ced;};return a99_0x8cea();}export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3793cb,_0x4ade5a){const _0x136c47=a100_0x2bda,_0x12a281=_0x3793cb();while(!![]){try{const _0x232323=parseInt(_0x136c47(0x116))/0x1+parseInt(_0x136c47(0x10f))/0x2*(-parseInt(_0x136c47(0x11d))/0x3)+-parseInt(_0x136c47(0x110))/0x4*(parseInt(_0x136c47(0x11a))/0x5)+parseInt(_0x136c47(0x10e))/0x6+-parseInt(_0x136c47(0x11c))/0x7+-parseInt(_0x136c47(0x130))/0x8*(-parseInt(_0x136c47(0x122))/0x9)+-parseInt(_0x136c47(0x118))/0xa*(parseInt(_0x136c47(0x10a))/0xb);if(_0x232323===_0x4ade5a)break;else _0x12a281['push'](_0x12a281['shift']());}catch(_0x43ac79){_0x12a281['push'](_0x12a281['shift']());}}}(a100_0x29ac,0x4f7ae));import a100_0x5010bf from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a100_0x63e86 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x29f1c4){return _0x29f1c4['catch'](_0x535f47=>{const _0x1fbb05=a100_0x2bda;if(_0x535f47?.[_0x1fbb05(0x128)]===_0x1fbb05(0x10c))throw CliErrors[_0x1fbb05(0x129)](_0x1fbb05(0x112));throw _0x535f47;});}function a100_0x2bda(_0x20ee09,_0x492384){_0x20ee09=_0x20ee09-0x107;const _0x29ac19=a100_0x29ac();let _0x2bdaf5=_0x29ac19[_0x20ee09];return _0x2bdaf5;}export function startSpinner(_0x1d0dd1){const _0xd4b701=a100_0x2bda;return a100_0x63e86({'text':_0x1d0dd1,'color':_0xd4b701(0x124)})[_0xd4b701(0x12e)]();}export function stopSpinner(_0x415e90,_0x18c483,_0x14305e){const _0x4e362d=a100_0x2bda;_0x14305e?_0x415e90[_0x4e362d(0x131)](_0x18c483):_0x415e90['fail'](_0x18c483);}export async function askConfirm(_0x4707f9){return onCancel(confirm({'message':_0x4707f9,'theme':{'prefix':''}}));}export async function askJsUrl(_0x219b61){const _0x1350b0=a100_0x2bda;while(!![]){const _0x22c5d5=await onCancel(input({'message':_0x1350b0(0x114),'default':_0x219b61,'theme':{'prefix':''}}));if(_0x22c5d5['trim']()==='')throw CliErrors['cancelled'](_0x1350b0(0x112));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x1350b0(0x125)](_0x22c5d5['trim']())){console[_0x1350b0(0x10b)](a100_0x5010bf[_0x1350b0(0x117)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x12d088=startSpinner(_0x1350b0(0x12f));try{const _0x2d15e5=await isUrlReachable(_0x22c5d5[_0x1350b0(0x123)]());stopSpinner(_0x12d088,_0x1350b0(0x11b),_0x2d15e5);if(!_0x2d15e5){console[_0x1350b0(0x10b)](a100_0x5010bf[_0x1350b0(0x117)]('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x22c5d5[_0x1350b0(0x123)]();}catch(_0x3c57b6){stopSpinner(_0x12d088,_0x1350b0(0x107),![]);throw _0x3c57b6;}}}export async function askCssUrl(_0x127408){const _0x3ef761=a100_0x2bda;while(!![]){const _0x47bdb7=await onCancel(input({'message':'\x20\x20CSS\x20URL:','default':_0x127408,'theme':{'prefix':''}}));if(_0x47bdb7['trim']()==='')throw CliErrors['cancelled'](_0x3ef761(0x112));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x3ef761(0x125)](_0x47bdb7[_0x3ef761(0x123)]())){console[_0x3ef761(0x10b)](a100_0x5010bf[_0x3ef761(0x117)]('\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'));continue;}const _0x3b8c03=startSpinner(_0x3ef761(0x111));try{const _0x52a994=await isUrlReachable(_0x47bdb7[_0x3ef761(0x123)]());stopSpinner(_0x3b8c03,_0x3ef761(0x12c),_0x52a994);if(!_0x52a994){console[_0x3ef761(0x10b)](a100_0x5010bf[_0x3ef761(0x117)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x47bdb7[_0x3ef761(0x123)]();}catch(_0x4fc29a){stopSpinner(_0x3b8c03,'CSS\x20URL\x20check\x20failed',![]);throw _0x4fc29a;}}}export async function selectPages(_0x260605,_0xf8dcf6,_0x27b24f){const _0x97cd10=a100_0x2bda,_0x374c72=_0x260605[_0x97cd10(0x10d)](_0x1b712e=>({'name':_0x1b712e['label']+'\x20\x20'+(_0xf8dcf6['has'](_0x1b712e[_0x97cd10(0x12b)])?a100_0x5010bf[_0x97cd10(0x115)](_0x97cd10(0x121)):a100_0x5010bf['green'](_0x97cd10(0x127))),'value':_0x1b712e['label'],'checked':_0x27b24f?_0x27b24f[_0x97cd10(0x126)](_0x1b712e['label']):!_0xf8dcf6['has'](_0x1b712e[_0x97cd10(0x12b)])}));if(_0x374c72[_0x97cd10(0x119)]===0x0)throw new Error(_0x97cd10(0x108));const _0x4a0cf6=await onCancel(checkbox({'message':_0x97cd10(0x11e),'choices':_0x374c72,'loop':![],'theme':{'prefix':''}}));if(_0x4a0cf6['length']===0x0)throw new Error(_0x97cd10(0x113));return _0x260605[_0x97cd10(0x120)](_0x43a4a4=>_0x4a0cf6[_0x97cd10(0x126)](_0x43a4a4[_0x97cd10(0x12a)]));}export function isInteractive(){const _0x285c13=a100_0x2bda;return process[_0x285c13(0x109)][_0x285c13(0x11f)]===!![];}export function requireInteractive(){const _0x491908=a100_0x2bda;if(!isInteractive())throw new Error(_0x491908(0x12d)+'Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.');}function a100_0x29ac(){const _0x4f0141=['path','CSS\x20URL\x20checked','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','start','\x20\x20Checking\x20JS\x20URL\x20reachability...','1086816JemRhx','succeed','JS\x20URL\x20check\x20failed','No\x20local\x20pages\x20found.','stdin','66BBtOMQ','error','ExitPromptError','map','813048VxaPHC','12086wdXbcq','12eWLvey','\x20\x20Checking\x20CSS\x20URL\x20reachability...','Cancelled.','No\x20menus\x20selected.','\x20\x20JS\x20URL:','gray','334757sbaJye','red','428670jSPbcT','length','414465cOVHvV','JS\x20URL\x20checked','471975KrjUiy','57ByiRQV','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','isTTY','filter','[already\x20on\x20platform]','36kfPaJT','trim','cyan','test','includes','[new]','name','cancelled','label'];a100_0x29ac=function(){return _0x4f0141;};return a100_0x29ac();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x5941e2=a101_0x4949;(function(_0x165481,_0x42ba39){const _0x39789f=a101_0x4949,_0x43c277=_0x165481();while(!![]){try{const _0x5a0636=parseInt(_0x39789f(0xd6))/0x1*(parseInt(_0x39789f(0xda))/0x2)+parseInt(_0x39789f(0xca))/0x3*(parseInt(_0x39789f(0xe0))/0x4)+-parseInt(_0x39789f(0xe1))/0x5+parseInt(_0x39789f(0xdf))/0x6*(parseInt(_0x39789f(0xd9))/0x7)+-parseInt(_0x39789f(0xcc))/0x8*(parseInt(_0x39789f(0xd1))/0x9)+-parseInt(_0x39789f(0xdd))/0xa+parseInt(_0x39789f(0xde))/0xb;if(_0x5a0636===_0x42ba39)break;else _0x43c277['push'](_0x43c277['shift']());}catch(_0x955099){_0x43c277['push'](_0x43c277['shift']());}}}(a101_0x4341,0x84437));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';function a101_0x4341(){const _0x3bf6b6=['6iGPAJF','join','index.tsx','14imwTMq','243604wxtJXl','path','isDirectory','2191050qFPutn','1414985JfVkbr','1592430NrgJuR','1515048FfyWTG','2756105QPJwiu','trim','slice','cwd','.tsx','6pbMoIK','src/pages','848AhxFtd','filter','utf-8','match','split','70956MNmAhu','concat','endsWith','replaceAll','replace'];a101_0x4341=function(){return _0x3bf6b6;};return a101_0x4341();}function a101_0x4949(_0x45f6fe,_0x5e3327){_0x45f6fe=_0x45f6fe-0xc7;const _0x43415a=a101_0x4341();let _0x4949ac=_0x43415a[_0x45f6fe];return _0x4949ac;}const pagesDir=resolve(process[a101_0x5941e2(0xc8)](),a101_0x5941e2(0xcb));export function extractTitleFromComment(_0x422756){const _0x11c783=a101_0x5941e2;try{const _0xb5aa69=readFileSync(_0x422756,_0x11c783(0xce)),_0x4a98a9=_0xb5aa69[_0x11c783(0xcf)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x4a98a9&&_0x4a98a9[0x1]){const _0x17e840=_0x4a98a9[0x1],_0x298ae0=_0x17e840[_0x11c783(0xcf)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x298ae0&&_0x298ae0[0x1])return _0x298ae0[0x1][_0x11c783(0xe2)]();}let _0x96dfb7=null;const _0x1a4587=_0xb5aa69['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x1a4587&&_0x1a4587[0x1]&&(_0x96dfb7=_0x1a4587[0x1]);if(!_0x96dfb7){const _0x31b6d9=_0xb5aa69[_0x11c783(0xcf)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x31b6d9&&_0x31b6d9[0x1]&&(_0x96dfb7=_0x31b6d9[0x1]);}if(_0x96dfb7){const _0x26f40d=new RegExp('\x5cb'+_0x96dfb7+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x3e6e8b=_0xb5aa69[_0x11c783(0xcf)](_0x26f40d);if(_0x3e6e8b&&_0x3e6e8b[0x1])return _0x3e6e8b[0x1];return _0x96dfb7;}return null;}catch(_0x188e2d){return null;}}export function getLocalPages(_0x4232da=pagesDir,_0x1549a8=pagesDir){const _0x1425ee=a101_0x5941e2;let _0x1bae8c=[];const _0xd672f9=readdirSync(_0x4232da);return _0xd672f9['forEach'](_0x3b83bf=>{const _0x2fcfd4=a101_0x4949,_0x3b9f3c=join(_0x4232da,_0x3b83bf),_0x5e1031=statSync(_0x3b9f3c);if(_0x5e1031&&_0x5e1031[_0x2fcfd4(0xdc)]())_0x1bae8c=_0x1bae8c[_0x2fcfd4(0xd2)](getLocalPages(_0x3b9f3c,_0x1549a8));else{if(_0x3b83bf[_0x2fcfd4(0xd3)](_0x2fcfd4(0xc9))){let _0x9d3fbf=relative(_0x1549a8,_0x3b9f3c);_0x9d3fbf['endsWith'](_0x2fcfd4(0xd8))?_0x9d3fbf=_0x9d3fbf[_0x2fcfd4(0xd5)](/index\.tsx$/,''):_0x9d3fbf=_0x9d3fbf['replace'](/\.tsx$/,'');_0x9d3fbf[_0x2fcfd4(0xd3)](sep)&&(_0x9d3fbf=_0x9d3fbf[_0x2fcfd4(0xc7)](0x0,-0x1));const _0x53d6f9=_0x9d3fbf[_0x2fcfd4(0xd0)](sep)[_0x2fcfd4(0xd7)]('/'),_0x19183f=extractTitleFromComment(_0x3b9f3c),_0x1a9a88=_0x19183f||_0x53d6f9;_0x1bae8c['push']({'path':_0x53d6f9[_0x2fcfd4(0xd4)]('$',':'),'label':_0x1a9a88});}}}),_0x1bae8c[_0x1425ee(0xcd)](_0xbad31a=>_0xbad31a[_0x1425ee(0xdb)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1b2ccf,_0x53527c){const _0x54073c=a102_0x112d,_0xd933aa=_0x1b2ccf();while(!![]){try{const _0x4512ff=parseInt(_0x54073c(0x14f))/0x1+-parseInt(_0x54073c(0x167))/0x2+parseInt(_0x54073c(0x157))/0x3+-parseInt(_0x54073c(0x166))/0x4*(-parseInt(_0x54073c(0x15b))/0x5)+-parseInt(_0x54073c(0x15c))/0x6+parseInt(_0x54073c(0x168))/0x7+-parseInt(_0x54073c(0x153))/0x8;if(_0x4512ff===_0x53527c)break;else _0xd933aa['push'](_0xd933aa['shift']());}catch(_0x4cab97){_0xd933aa['push'](_0xd933aa['shift']());}}}(a102_0x1107,0x7cc7c));function a102_0x1107(){const _0x2457a8=['label','map','filter','7053976RJgGFV','length','push','value','1475193WBpQHc','has','find','CSS\x20URL\x20is\x20unreachable','12955QohFWe','804732nxIEWb','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','trim','resources','No\x20local\x20pages\x20matched\x20labels:\x20','errors','fulfilled','rejected','JS\x20URL\x20is\x20unreachable','status','1240EOoQfh','1416950qaxJci','2685004inbTef','path','join','556931PCcgXU'];a102_0x1107=function(){return _0x2457a8;};return a102_0x1107();}import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a102_0x112d(_0x5af62b,_0x2b9498){_0x5af62b=_0x5af62b-0x14d;const _0x1107ee=a102_0x1107();let _0x112dd2=_0x1107ee[_0x5af62b];return _0x112dd2;}import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x3692ae){const _0x12c754=a102_0x112d,_0x332d25=[];return!isValidJsHttpsUrl(_0x3692ae)&&_0x332d25[_0x12c754(0x155)](_0x12c754(0x15d)),{'ok':_0x332d25[_0x12c754(0x154)]===0x0,'errors':_0x332d25};}export function validateCssUrl(_0x1c7edd){const _0x15e2ff=a102_0x112d,_0x1e74f3=[];return!isValidCssHttpsUrl(_0x1c7edd)&&_0x1e74f3[_0x15e2ff(0x155)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x1e74f3[_0x15e2ff(0x154)]===0x0,'errors':_0x1e74f3};}export async function validateJsUrlReachable(_0x407e9f){const _0x4d854b=a102_0x112d,_0x365fc7=validateJsUrl(_0x407e9f);if(!_0x365fc7['ok'])return _0x365fc7;const _0x3b83ca=await isUrlReachable(_0x407e9f);if(!_0x3b83ca)_0x365fc7[_0x4d854b(0x161)]['push'](_0x4d854b(0x164));return{'ok':_0x365fc7[_0x4d854b(0x161)]['length']===0x0,'errors':_0x365fc7['errors']};}export async function validateCssUrlReachable(_0x1d1adb){const _0x699ee5=a102_0x112d,_0x427416=validateCssUrl(_0x1d1adb);if(!_0x427416['ok'])return _0x427416;const _0x1a8d58=await isUrlReachable(_0x1d1adb);if(!_0x1a8d58)_0x427416[_0x699ee5(0x161)][_0x699ee5(0x155)](_0x699ee5(0x15a));return{'ok':_0x427416['errors'][_0x699ee5(0x154)]===0x0,'errors':_0x427416[_0x699ee5(0x161)]};}export function buildCompareRows(_0x467df3,_0x5b9285){const _0x3fd56b=a102_0x112d;return _0x467df3[_0x3fd56b(0x151)](_0x1339fb=>({'label':_0x1339fb[_0x3fd56b(0x150)],'path':_0x1339fb[_0x3fd56b(0x14d)],'local':!![],'online':_0x5b9285[_0x3fd56b(0x158)](_0x1339fb[_0x3fd56b(0x14d)])}));}export function filterNewPages(_0x4bf875,_0x5c08e0,_0xd2e485){const _0xebeb7f=a102_0x112d;if(_0xd2e485&&_0xd2e485[_0xebeb7f(0x154)]>0x0){const _0x39cb1c=new Set(_0xd2e485[_0xebeb7f(0x151)](_0x5e6e76=>_0x5e6e76[_0xebeb7f(0x15e)]())),_0x3952d2=_0x4bf875['filter'](_0x17be0d=>_0x39cb1c[_0xebeb7f(0x158)](_0x17be0d[_0xebeb7f(0x150)]));if(_0x3952d2[_0xebeb7f(0x154)]===0x0)throw new Error(_0xebeb7f(0x160)+[..._0x39cb1c][_0xebeb7f(0x14e)](',\x20'));return _0x3952d2;}return _0x4bf875[_0xebeb7f(0x152)](_0x4d75ed=>!_0x5c08e0[_0xebeb7f(0x158)](_0x4d75ed[_0xebeb7f(0x14d)]));}export function filterPagesByLabels(_0x3c15f7,_0x3d3ad9){const _0xb3023b=a102_0x112d,_0x5c19f6=[],_0x36a73b=[];for(const _0x24e3d5 of _0x3d3ad9){const _0x32d877=_0x24e3d5[_0xb3023b(0x15e)](),_0xf7bd2d=_0x3c15f7[_0xb3023b(0x159)](_0x164650=>_0x164650[_0xb3023b(0x150)]===_0x32d877);if(_0xf7bd2d)_0x5c19f6['push'](_0xf7bd2d);else _0x36a73b[_0xb3023b(0x155)](_0x24e3d5);}return{'matched':_0x5c19f6,'unmatched':_0x36a73b};}export async function doCreateMenus(_0x356985,_0x55e203,_0xb132d9,_0x5d2e2f){const _0x38e71e=a102_0x112d,_0x51de93=await createMenus(_0x356985,_0x55e203,_0xb132d9,_0x5d2e2f);return{'created':_0x51de93[_0x38e71e(0x154)],'failed':0x0,'labels':_0xb132d9[_0x38e71e(0x151)](_0x21860c=>_0x21860c['label']),'menus':_0x51de93};}export function filterMenusWithResources(_0x1d395a){const _0x3d00e0=a102_0x112d;return _0x1d395a[_0x3d00e0(0x152)](_0x372714=>_0x372714[_0x3d00e0(0x15f)][_0x3d00e0(0x154)]>0x0);}export async function doUpdateCdnUrls(_0x3afb31,_0x55df17,_0x4d9194,_0x3ab96c){const _0x55a0d2=a102_0x112d,_0x52859c=_0x4d9194[_0x55a0d2(0x152)](_0xcfab56=>_0xcfab56[_0x55a0d2(0x15f)][_0x55a0d2(0x154)]>0x0),_0xcba26e=await Promise['allSettled'](_0x52859c[_0x55a0d2(0x151)](_0x3fb068=>updateMenuCdnUrl(_0x3afb31,_0x55df17,{'id':_0x3fb068['id'],'label':_0x3fb068[_0x55a0d2(0x150)],'path':_0x3fb068[_0x55a0d2(0x14d)],'resources':_0x3ab96c,'extend':_0x3fb068['extend']??null}))),_0x1b0c2b=_0xcba26e['filter'](_0x20c870=>_0x20c870['status']===_0x55a0d2(0x162))['map'](_0x50f5ac=>_0x50f5ac[_0x55a0d2(0x156)]),_0x269801=_0xcba26e[_0x55a0d2(0x152)](_0x454ced=>_0x454ced[_0x55a0d2(0x165)]===_0x55a0d2(0x163))[_0x55a0d2(0x154)];return{'updated':_0x1b0c2b['length'],'failed':_0x269801,'menus':_0x1b0c2b};}export async function fetchMenuData(_0x15b904,_0x54d156){const _0x1a17c3=a102_0x112d,_0xf19a21=getLocalPages(),_0x28b989=await getOnlineMenuList(_0x15b904,_0x54d156),_0x1a3ddc=new Set(_0x28b989[_0x1a17c3(0x151)](_0x39a809=>_0x39a809[_0x1a17c3(0x14d)]));return{'localPages':_0xf19a21,'onlineMenuList':_0x28b989,'onlinePaths':_0x1a3ddc};}export async function fetchOnlineMenuList(_0x44a2fe,_0x469ba8){return getOnlineMenuList(_0x44a2fe,_0x469ba8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57cfee,_0x6b4a38){const _0x50c1f9=a103_0x54d5,_0x398e2d=_0x57cfee();while(!![]){try{const _0x30ef96=-parseInt(_0x50c1f9(0x94))/0x1*(-parseInt(_0x50c1f9(0xa9))/0x2)+-parseInt(_0x50c1f9(0xb9))/0x3*(-parseInt(_0x50c1f9(0x91))/0x4)+parseInt(_0x50c1f9(0x95))/0x5+-parseInt(_0x50c1f9(0xab))/0x6*(parseInt(_0x50c1f9(0xa3))/0x7)+parseInt(_0x50c1f9(0xa1))/0x8+-parseInt(_0x50c1f9(0xb7))/0x9*(-parseInt(_0x50c1f9(0x9c))/0xa)+-parseInt(_0x50c1f9(0xa8))/0xb;if(_0x30ef96===_0x6b4a38)break;else _0x398e2d['push'](_0x398e2d['shift']());}catch(_0x167313){_0x398e2d['push'](_0x398e2d['shift']());}}}(a103_0x25d9,0xbde27));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{createMenuRecord,getMenuTree,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x261f18,_0x4b91f6){const _0x4617b4=a103_0x54d5,_0xab8952=getEnv();logger['info'](_0x4617b4(0xaa),isProduction(_0xab8952)?_0x4617b4(0xb4)+_0x261f18+')':_0x4617b4(0xa5)+_0x261f18+')');const _0x5db08b=await getMenuTree(_0x261f18,_0x4b91f6);if(!_0x5db08b)return logger[_0x4617b4(0xac)]('get-online-menu-list',_0x4617b4(0xb8)),[];return logger[_0x4617b4(0xac)](_0x4617b4(0xaa),_0x4617b4(0xb6)+_0x5db08b[_0x4617b4(0x9d)]+_0x4617b4(0x96)),_0x5db08b[_0x4617b4(0xa4)](flattenMenuItem)[_0x4617b4(0xb1)]();}function a103_0x25d9(){const _0x3f5f49=['Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Menu\x20created\x20successfully:\x20','push','13601599cSLBKY','4lxQMTc','get-online-menu-list','1907166AAnZoJ','info','Create\x20menu\x20\x22','Start\x20batch\x20menu\x20creation,\x20total\x20','update-menu-cdn-url','parse','flat','Update\x20menu\x20assets\x20\x22','label','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','create-menus','Fetched\x20','62892iJvsjN','Server\x20returned\x20empty\x20menu\x20list','644649MKZuxK','all','28rwRYWh','resources','extend','62421AUhBhp','1070645AnEOHD','\x20online\x20menus\x20successfully','string','import','children','create-menu','Batch\x20menu\x20creation\x20completed,\x20total\x20','570IzIkaI','length','isArray','procode','path','725352roCFDN','stringify','7Zkeyzq','map'];a103_0x25d9=function(){return _0x3f5f49;};return a103_0x25d9();}function flattenMenuItem(_0x290966){const _0x3241b8=a103_0x54d5;let _0x3154a8=[];try{const _0x3cc314=_0x290966[_0x3241b8(0x93)]?.['resources'];if(typeof _0x3cc314===_0x3241b8(0x97)){const _0x39a22b=JSON[_0x3241b8(0xb0)](_0x3cc314);if(Array[_0x3241b8(0x9e)](_0x39a22b))_0x3154a8=_0x39a22b[_0x3241b8(0xa4)](String);}else Array[_0x3241b8(0x9e)](_0x3cc314)&&(_0x3154a8=_0x3cc314['map'](String));}catch{}const _0x539b0e=[{'id':_0x290966['id'],'path':_0x290966[_0x3241b8(0xa0)],'label':_0x290966[_0x3241b8(0xb3)],'resources':_0x3154a8,'extend':_0x290966[_0x3241b8(0x93)]??null}];if(_0x290966['children']&&_0x290966[_0x3241b8(0x99)]['length']>0x0)for(const _0x338d91 of _0x290966['children']){_0x539b0e[_0x3241b8(0xa7)](...flattenMenuItem(_0x338d91));}return _0x539b0e;}export async function createMenu(_0x38ade4,_0x2dc764,_0x94bb94){const _0x174af4=a103_0x54d5;logger['info'](_0x174af4(0x9a),'Creating\x20menu:\x20'+_0x94bb94[_0x174af4(0xb3)]+'\x20('+_0x94bb94[_0x174af4(0xa0)]+')');const _0x2eb23d={'appCode':_0x38ade4,'type':_0x174af4(0x9f),'sort':0x0,'extend':{'loadScriptMode':_0x174af4(0x98),'resources':_0x94bb94['resources']?JSON[_0x174af4(0xa2)](_0x94bb94[_0x174af4(0x92)]):undefined},..._0x94bb94},_0x59c0fd=await createMenuRecord(_0x2eb23d,_0x2dc764,_0x174af4(0xad)+_0x94bb94[_0x174af4(0xb3)]+'\x22');return logger[_0x174af4(0xac)](_0x174af4(0x9a),_0x174af4(0xa6)+_0x94bb94['label']),_0x59c0fd;}function a103_0x54d5(_0x590deb,_0x139f56){_0x590deb=_0x590deb-0x90;const _0x25d913=a103_0x25d9();let _0x54d551=_0x25d913[_0x590deb];return _0x54d551;}async function createSingleMenu(_0x2de02d,_0x14d34d,_0x5a09b9,_0x10c03d){const _0x306e31=a103_0x54d5,_0x3d25b9={'appCode':_0x2de02d,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x306e31(0x98),'resources':_0x10c03d?JSON[_0x306e31(0xa2)](_0x10c03d):undefined},'label':_0x5a09b9['label'],'path':_0x5a09b9[_0x306e31(0xa0)]},_0x33173a=await createMenuRecord(_0x3d25b9,_0x14d34d,_0x306e31(0xad)+_0x5a09b9[_0x306e31(0xb3)]+'\x22');return logger[_0x306e31(0xac)](_0x306e31(0x9a),_0x306e31(0xa6)+_0x5a09b9[_0x306e31(0xb3)]),_0x33173a;}export async function createMenus(_0x1bea79,_0x1f77db,_0x500e23,_0x310309){const _0x45cf5c=a103_0x54d5;logger[_0x45cf5c(0xac)](_0x45cf5c(0xb5),_0x45cf5c(0xae)+_0x500e23[_0x45cf5c(0x9d)]);const _0x1aebef=await Promise[_0x45cf5c(0x90)](_0x500e23[_0x45cf5c(0xa4)](_0x1e8009=>createSingleMenu(_0x1bea79,_0x1f77db,_0x1e8009,_0x310309)));return logger[_0x45cf5c(0xac)](_0x45cf5c(0xb5),_0x45cf5c(0x9b)+_0x500e23['length']),_0x1aebef;}export async function updateMenuCdnUrl(_0x1d44ba,_0x535583,_0x273aa1){const _0x5b2ec9=a103_0x54d5;logger['info']('update-menu-cdn-url','Updating\x20menu\x20asset\x20links:\x20'+_0x273aa1[_0x5b2ec9(0xb3)]+'\x20('+_0x273aa1['path']+')');const _0x5f17ce={'id':_0x273aa1['id'],'appCode':_0x1d44ba,'extend':{..._0x273aa1[_0x5b2ec9(0x93)]??{},'loadScriptMode':_0x5b2ec9(0x98),'resources':_0x273aa1[_0x5b2ec9(0x92)]?JSON[_0x5b2ec9(0xa2)](_0x273aa1['resources']):undefined}},_0x2d44fe=await updateMenuRecord(_0x5f17ce,_0x535583,_0x5b2ec9(0xb2)+_0x273aa1[_0x5b2ec9(0xb3)]+'\x22');return logger[_0x5b2ec9(0xac)](_0x5b2ec9(0xaf),'Menu\x20assets\x20synced:\x20'+_0x273aa1[_0x5b2ec9(0xb3)],undefined),_0x2d44fe;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe2bd23,_0x2f3114){const _0x5f17bb=a104_0x163f,_0x2b5218=_0xe2bd23();while(!![]){try{const _0x190062=-parseInt(_0x5f17bb(0x1c3))/0x1+parseInt(_0x5f17bb(0x19f))/0x2*(parseInt(_0x5f17bb(0x1ab))/0x3)+-parseInt(_0x5f17bb(0x1b1))/0x4+-parseInt(_0x5f17bb(0x1a3))/0x5+-parseInt(_0x5f17bb(0x1aa))/0x6+parseInt(_0x5f17bb(0x1c1))/0x7*(parseInt(_0x5f17bb(0x1c6))/0x8)+-parseInt(_0x5f17bb(0x1b9))/0x9*(-parseInt(_0x5f17bb(0x1af))/0xa);if(_0x190062===_0x2f3114)break;else _0x2b5218['push'](_0x2b5218['shift']());}catch(_0x4d644b){_0x2b5218['push'](_0x2b5218['shift']());}}}(a104_0x23bb,0x5c9f6));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a104_0x163f(_0x408d96,_0x1fe235){_0x408d96=_0x408d96-0x19e;const _0x23bb3c=a104_0x23bb();let _0x163fd3=_0x23bb3c[_0x408d96];return _0x163fd3;}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x5a54d6){const _0x5b2412=a104_0x163f,_0x1c4be3=[];return _0x5a54d6[_0x5b2412(0x1a0)]&&!isValidJsHttpsUrl(_0x5a54d6[_0x5b2412(0x1a0)])&&_0x1c4be3[_0x5b2412(0x1c4)]({'field':_0x5b2412(0x1a0),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x5a54d6[_0x5b2412(0x1ae)]&&!isValidCssHttpsUrl(_0x5a54d6[_0x5b2412(0x1ae)])&&_0x1c4be3['push']({'field':_0x5b2412(0x1ae),'message':_0x5b2412(0x1bb)}),_0x1c4be3;}export async function runMenuSyncCore(_0x591396,_0x10cdaf,_0x3b5fac=[],_0x5d0a3e){const _0x3db909=a104_0x163f,_0x32e165=parseParamsFlag(_0x5d0a3e),_0x5b47bd=_0x3b5fac[_0x3db909(0x1a4)]>0x0?_0x3b5fac:_0x32e165['selectedLabels'],_0x59cdca=_0x32e165[_0x3db909(0x1a0)],_0x267449=_0x32e165[_0x3db909(0x1ae)],_0x47755b=[];if(_0x59cdca)_0x47755b[_0x3db909(0x1c4)](_0x59cdca);if(_0x267449)_0x47755b[_0x3db909(0x1c4)](_0x267449);const _0x4fbb05=validateParams(_0x32e165);if(_0x4fbb05['length']>0x0){const _0x4483de=_0x4fbb05[_0x3db909(0x1a9)](_0x2d81bd=>_0x3db909(0x1be)+_0x2d81bd[_0x3db909(0x1bd)]+':\x20'+_0x2d81bd[_0x3db909(0x1bc)])[_0x3db909(0x1b8)](';\x20');throw new Error(_0x3db909(0x1a1)+_0x4483de);}logger['setLogPath'](process[_0x3db909(0x1b4)]()),logger['info'](_0x3db909(0x1b5),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x591396,'selectedCount':_0x5b47bd?.[_0x3db909(0x1a4)],'jsUrl':_0x59cdca,'cssUrl':_0x267449});if(_0x59cdca){const _0x28557a=await isUrlReachable(_0x59cdca);if(!_0x28557a)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x59cdca);}if(_0x267449){const _0x45758b=await isUrlReachable(_0x267449);if(!_0x45758b)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x267449);}const _0x358f6e=getLocalPages();if(_0x358f6e['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x2afd05=await getOnlineMenuList(_0x591396,_0x10cdaf),_0x3e50b7=new Set(_0x2afd05['map'](_0x43036d=>_0x43036d[_0x3db909(0x1a6)]));let _0x285c9e;if(_0x5b47bd&&_0x5b47bd[_0x3db909(0x1a4)]>0x0){const _0x2b411e=new Set(_0x5b47bd[_0x3db909(0x1a9)](_0x71eb2e=>_0x71eb2e['trim']()));_0x285c9e=_0x358f6e[_0x3db909(0x1b0)](_0x48b6cd=>_0x2b411e[_0x3db909(0x1b3)](_0x48b6cd[_0x3db909(0x1b2)]));if(_0x285c9e['length']===0x0){const _0x47253c=_0x358f6e['map'](_0x25d425=>_0x25d425[_0x3db909(0x1b2)])[_0x3db909(0x1b8)](',\x20');throw new Error(_0x3db909(0x1ba)+[..._0x2b411e]['join'](',\x20')+_0x3db909(0x1c2)+_0x47253c);}}else _0x285c9e=_0x358f6e[_0x3db909(0x1b0)](_0x55ce7a=>!_0x3e50b7[_0x3db909(0x1b3)](_0x55ce7a[_0x3db909(0x1a6)]));if(_0x285c9e['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x375ae6=await createMenus(_0x591396,_0x10cdaf,_0x285c9e,_0x47755b[_0x3db909(0x1a4)]>0x0?_0x47755b:undefined);return logger[_0x3db909(0x1a2)](_0x3db909(0x1b5),'Menu\x20sync\x20completed',{'count':_0x285c9e[_0x3db909(0x1a4)],'resources':_0x47755b}),{'created':_0x375ae6['length'],'skipped':![],'targetPages':_0x285c9e,'menus':_0x375ae6};}export async function readPageLabelsFromStdin(){const _0x4d70b1=a104_0x163f;if(!process[_0x4d70b1(0x1ad)][_0x4d70b1(0x1b7)]&&!process[_0x4d70b1(0x1ad)][_0x4d70b1(0x1a7)])return new Promise(_0x5ab1ed=>{const _0x48e38c=_0x4d70b1,_0x63307d=[];process[_0x48e38c(0x1ad)]['on'](_0x48e38c(0x1a8),_0x5894bb=>_0x63307d['push'](_0x5894bb)),process[_0x48e38c(0x1ad)]['on'](_0x48e38c(0x1c5),()=>{const _0x42f50f=_0x48e38c,_0x194879=Buffer['concat'](_0x63307d)['toString'](_0x42f50f(0x1a5)),_0x2d01a2=_0x194879[_0x42f50f(0x1b6)]('\x0a')[_0x42f50f(0x1a9)](_0x2dbb5c=>_0x2dbb5c[_0x42f50f(0x19e)]())[_0x42f50f(0x1b0)](_0x145a53=>_0x145a53['length']>0x0&&!_0x145a53['startsWith']('#'));_0x5ab1ed(_0x2d01a2);}),setTimeout(()=>_0x5ab1ed([]),0x1f4);});return[];}function parseParamsFlag(_0x523884){const _0x49852a=a104_0x163f;if(!_0x523884||typeof _0x523884!=='string')return{};try{const _0x1fbc73=JSON[_0x49852a(0x1c7)](_0x523884);if(typeof _0x1fbc73!=='object'||_0x1fbc73===null||Array[_0x49852a(0x1ac)](_0x1fbc73))return{};return{'selectedLabels':Array[_0x49852a(0x1ac)](_0x1fbc73[_0x49852a(0x1bf)])?_0x1fbc73[_0x49852a(0x1bf)][_0x49852a(0x1a9)](String):undefined,'jsUrl':typeof _0x1fbc73[_0x49852a(0x1a0)]===_0x49852a(0x1c0)?_0x1fbc73[_0x49852a(0x1a0)][_0x49852a(0x19e)]():undefined,'cssUrl':typeof _0x1fbc73['cssUrl']===_0x49852a(0x1c0)?_0x1fbc73[_0x49852a(0x1ae)][_0x49852a(0x19e)]():undefined};}catch{return{};}}function a104_0x23bb(){const _0x3f92d2=['10gEjWWh','jsUrl','Invalid\x20--params:\x20','info','2979460FWQYGm','length','utf8','path','readableEnded','data','map','1043526vFZwJb','7977DOqKdA','isArray','stdin','cssUrl','230mAechO','filter','1380832EfiyjG','label','has','cwd','menu-sync','split','isTTY','join','458901etyPKt','No\x20local\x20pages\x20matched\x20labels:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','message','field','--params.','pages','string','63532DUNfFq','\x0a\x20\x20Available\x20local\x20pages:\x20','81907SUdimc','push','end','344GTVrUY','parse','trim'];a104_0x23bb=function(){return _0x3f92d2;};return a104_0x23bb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40bdf2,_0x282a0e){const _0x3c93b6=a106_0x45c2,_0x3ca1f4=_0x40bdf2();while(!![]){try{const _0x7cbfb7=-parseInt(_0x3c93b6(0x197))/0x1*(parseInt(_0x3c93b6(0x182))/0x2)+-parseInt(_0x3c93b6(0x16a))/0x3+parseInt(_0x3c93b6(0x196))/0x4+-parseInt(_0x3c93b6(0x172))/0x5*(parseInt(_0x3c93b6(0x181))/0x6)+parseInt(_0x3c93b6(0x199))/0x7+parseInt(_0x3c93b6(0x195))/0x8*(parseInt(_0x3c93b6(0x189))/0x9)+parseInt(_0x3c93b6(0x171))/0xa;if(_0x7cbfb7===_0x282a0e)break;else _0x3ca1f4['push'](_0x3ca1f4['shift']());}catch(_0x112fab){_0x3ca1f4['push'](_0x3ca1f4['shift']());}}}(a106_0x4cc7,0x56060));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 a106_0x4cc7(){const _0x275e59=['menu-update','push','filter','63yGDMor','JS\x20URL\x20is\x20unreachable:\x20','join','info','isArray','Invalid\x20--mode:\x20','object','setLogPath','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','parse','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','\x22\x20(','290072wdcSrI','2569728rQFhhF','523161LDhAbg','Start\x20non-interactive\x20menu\x20update','2573473NMHtan','cwd','.css','allSettled','label','--params.','.js','Invalid\x20--params:\x20','dryRun','854172wFCxpV','message','cssUrl','resources','jsUrl','CSS\x20URL\x20is\x20unreachable:\x20','split','3530790avOpPv','5rndQMe','trim',').\x20','string','field','map','patch','force','replace','path','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','unshift','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','status','endsWith','2740356DdBdOq','2GSCXOd','length','fulfilled','some'];a106_0x4cc7=function(){return _0x275e59;};return a106_0x4cc7();}function a106_0x45c2(_0xd69f9d,_0x1cb67a){_0xd69f9d=_0xd69f9d-0x166;const _0x4cc75e=a106_0x4cc7();let _0x45c2a2=_0x4cc75e[_0xd69f9d];return _0x45c2a2;}function validateParams(_0x29c175){const _0x2c1cd6=a106_0x45c2,_0x36ee9e=[];return _0x29c175[_0x2c1cd6(0x16e)]&&!isValidJsHttpsUrl(_0x29c175['jsUrl'])&&_0x36ee9e[_0x2c1cd6(0x187)]({'field':_0x2c1cd6(0x16e),'message':_0x2c1cd6(0x191)}),_0x29c175[_0x2c1cd6(0x16c)]&&!isValidCssHttpsUrl(_0x29c175['cssUrl'])&&_0x36ee9e[_0x2c1cd6(0x187)]({'field':_0x2c1cd6(0x16c),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x36ee9e;}export async function runMenuUpdateCore(_0x43d436,_0x35a216,_0x205c01,_0x4aeab3={}){const _0x4fe81f=a106_0x45c2,_0x19a5c8=parseUpdateParamsFlag(_0x205c01),_0x41e1ed=normalizeMode(_0x4aeab3['mode']),_0x19d7ff=[];if(_0x19a5c8[_0x4fe81f(0x16e)])_0x19d7ff[_0x4fe81f(0x187)](_0x19a5c8[_0x4fe81f(0x16e)]);if(_0x19a5c8[_0x4fe81f(0x16c)])_0x19d7ff['push'](_0x19a5c8[_0x4fe81f(0x16c)]);const _0x8ba675=validateParams(_0x19a5c8);if(_0x8ba675[_0x4fe81f(0x183)]>0x0){const _0x6844e6=_0x8ba675['map'](_0x1dff14=>_0x4fe81f(0x166)+_0x1dff14[_0x4fe81f(0x176)]+':\x20'+_0x1dff14[_0x4fe81f(0x16b)])[_0x4fe81f(0x18b)](';\x20');throw new Error(_0x4fe81f(0x168)+_0x6844e6);}if(_0x19d7ff[_0x4fe81f(0x183)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x4fe81f(0x17c));logger[_0x4fe81f(0x190)](process[_0x4fe81f(0x19a)]()),logger[_0x4fe81f(0x18c)](_0x4fe81f(0x186),_0x4fe81f(0x198),{'appCode':_0x43d436,'jsUrl':_0x19a5c8[_0x4fe81f(0x16e)],'cssUrl':_0x19a5c8[_0x4fe81f(0x16c)],'mode':_0x41e1ed,'dryRun':_0x4aeab3[_0x4fe81f(0x169)]===!![]});if(_0x19a5c8[_0x4fe81f(0x16e)]){const _0x272c73=await isUrlReachable(_0x19a5c8[_0x4fe81f(0x16e)]);if(!_0x272c73)throw new Error(_0x4fe81f(0x18a)+_0x19a5c8[_0x4fe81f(0x16e)]);}if(_0x19a5c8[_0x4fe81f(0x16c)]){const _0x1889b3=await isUrlReachable(_0x19a5c8[_0x4fe81f(0x16c)]);if(!_0x1889b3)throw new Error(_0x4fe81f(0x16f)+_0x19a5c8[_0x4fe81f(0x16c)]);}const _0x2afc3b=await getOnlineMenuList(_0x43d436,_0x35a216),_0xe2c1b5=_0x2afc3b[_0x4fe81f(0x188)](_0x24bccb=>_0x24bccb[_0x4fe81f(0x16d)][_0x4fe81f(0x183)]>0x0);if(_0xe2c1b5[_0x4fe81f(0x183)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x4aeab3['dryRun']===!![]};const _0x5a9cc2=_0xe2c1b5[_0x4fe81f(0x177)](_0x446927=>buildMenuUpdateDiff(_0x446927,_0x19a5c8,_0x41e1ed,_0x4aeab3[_0x4fe81f(0x179)]===!![]));if(_0x4aeab3[_0x4fe81f(0x169)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x5a9cc2};const _0x39b970=await Promise[_0x4fe81f(0x19c)](_0xe2c1b5['map']((_0x41198a,_0xcd0310)=>updateMenuCdnUrl(_0x43d436,_0x35a216,{'id':_0x41198a['id'],'label':_0x41198a[_0x4fe81f(0x19d)],'path':_0x41198a[_0x4fe81f(0x17b)],'resources':_0x5a9cc2[_0xcd0310]['after']['resources'],'extend':_0x41198a['extend']??null}))),_0x17bc7b=_0x39b970[_0x4fe81f(0x188)](_0xd2e01c=>_0xd2e01c[_0x4fe81f(0x17f)]===_0x4fe81f(0x184))[_0x4fe81f(0x177)](_0x54c0ef=>_0x54c0ef['value']),_0x463864=_0x39b970['filter'](_0x23eab5=>_0x23eab5['status']==='rejected')[_0x4fe81f(0x183)];return logger[_0x4fe81f(0x18c)](_0x4fe81f(0x186),'Menu\x20update\x20completed',{'count':_0xe2c1b5[_0x4fe81f(0x183)],'resources':_0x19d7ff}),{'updated':_0x17bc7b['length'],'failed':_0x463864,'skipped':![],'menus':_0x17bc7b};}function normalizeMode(_0x25882d){const _0x1daad1=a106_0x45c2;if(!_0x25882d)return'replace';if(_0x25882d===_0x1daad1(0x17a)||_0x25882d===_0x1daad1(0x178))return _0x25882d;throw new Error(_0x1daad1(0x18e)+_0x25882d+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x855a6d,_0x10398c,_0xafedff,_0x103b3d){const _0x12105d=a106_0x45c2,_0x47703d=[..._0x855a6d['resources']],_0x3e818d=_0xafedff===_0x12105d(0x178)?patchResources(_0x47703d,_0x10398c):replaceResources(_0x10398c),_0x1c2697=[],_0x335d61=_0x47703d[_0x12105d(0x185)](isJsResource),_0x71e5c1=_0x3e818d[_0x12105d(0x185)](isJsResource);if(_0x335d61&&!_0x71e5c1){const _0x8e817='menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x855a6d[_0x12105d(0x19d)]+_0x12105d(0x194)+_0x855a6d[_0x12105d(0x17b)]+_0x12105d(0x174)+_0x12105d(0x193);if(!_0x103b3d)throw new Error(_0x8e817);_0x1c2697[_0x12105d(0x187)](_0x8e817);}const _0x5e85c3=_0x47703d[_0x12105d(0x185)](isCssResource),_0x39784b=_0x3e818d[_0x12105d(0x185)](isCssResource);return _0x5e85c3&&!_0x39784b&&_0x1c2697[_0x12105d(0x187)](_0x12105d(0x17e)+_0x855a6d[_0x12105d(0x19d)]+_0x12105d(0x194)+_0x855a6d[_0x12105d(0x17b)]+').'),{'id':_0x855a6d['id'],'label':_0x855a6d[_0x12105d(0x19d)],'path':_0x855a6d[_0x12105d(0x17b)],'mode':_0xafedff,'before':{'resources':_0x47703d},'after':{'resources':_0x3e818d},'warnings':_0x1c2697};}function replaceResources(_0x21a201){const _0x2262f3=a106_0x45c2;return[_0x21a201[_0x2262f3(0x16e)],_0x21a201[_0x2262f3(0x16c)]][_0x2262f3(0x188)](_0x233f66=>!!_0x233f66);}function patchResources(_0x4ecd8a,_0x415674){const _0x37f47f=a106_0x45c2;let _0x2317cf=![],_0x143e2b=![];const _0x4c6ac8=[];for(const _0x4e7030 of _0x4ecd8a){if(isJsResource(_0x4e7030)){if(_0x415674[_0x37f47f(0x16e)]&&!_0x2317cf)_0x4c6ac8[_0x37f47f(0x187)](_0x415674[_0x37f47f(0x16e)]),_0x2317cf=!![];else!_0x415674['jsUrl']&&_0x4c6ac8[_0x37f47f(0x187)](_0x4e7030);continue;}if(isCssResource(_0x4e7030)){if(_0x415674[_0x37f47f(0x16c)]&&!_0x143e2b)_0x4c6ac8[_0x37f47f(0x187)](_0x415674['cssUrl']),_0x143e2b=!![];else!_0x415674[_0x37f47f(0x16c)]&&_0x4c6ac8[_0x37f47f(0x187)](_0x4e7030);continue;}_0x4c6ac8[_0x37f47f(0x187)](_0x4e7030);}return _0x415674[_0x37f47f(0x16e)]&&!_0x2317cf&&_0x4c6ac8[_0x37f47f(0x17d)](_0x415674['jsUrl']),_0x415674[_0x37f47f(0x16c)]&&!_0x143e2b&&_0x4c6ac8[_0x37f47f(0x187)](_0x415674['cssUrl']),_0x4c6ac8;}function isJsResource(_0x1435fa){const _0x313eb2=a106_0x45c2;return stripQuery(_0x1435fa)['toLowerCase']()[_0x313eb2(0x180)](_0x313eb2(0x167));}function isCssResource(_0x559f22){const _0x543ff6=a106_0x45c2;return stripQuery(_0x559f22)['toLowerCase']()[_0x543ff6(0x180)](_0x543ff6(0x19b));}function stripQuery(_0x4a828d){const _0x1370ba=a106_0x45c2;return _0x4a828d[_0x1370ba(0x170)]('?')[0x0]??_0x4a828d;}function parseUpdateParamsFlag(_0x5d941a){const _0x2752a1=a106_0x45c2;if(!_0x5d941a||typeof _0x5d941a!=='string')return{};try{const _0x379bfc=JSON[_0x2752a1(0x192)](_0x5d941a);if(typeof _0x379bfc!==_0x2752a1(0x18f)||_0x379bfc===null||Array[_0x2752a1(0x18d)](_0x379bfc))return{};return{'jsUrl':typeof _0x379bfc[_0x2752a1(0x16e)]==='string'?_0x379bfc[_0x2752a1(0x16e)][_0x2752a1(0x173)]():undefined,'cssUrl':typeof _0x379bfc[_0x2752a1(0x16c)]===_0x2752a1(0x175)?_0x379bfc[_0x2752a1(0x16c)][_0x2752a1(0x173)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a107_0x2ba3(){const _0x4fb65d=['trim','13412JLXyvT','14665wLLsBo','100914BPCFWE','9yxDvOr','605Kmaert','24553177fRJXbq','2016jCurKB','11523170vSLqVC','110HXZmEQ','5585379xLdOIK','HEAD','test','5879vyZunE'];a107_0x2ba3=function(){return _0x4fb65d;};return a107_0x2ba3();}(function(_0x17ffb9,_0x5be8d2){const _0x3ccf14=a107_0x5361,_0x1f53da=_0x17ffb9();while(!![]){try{const _0x14882c=-parseInt(_0x3ccf14(0x1a4))/0x1*(-parseInt(_0x3ccf14(0x1ae))/0x2)+parseInt(_0x3ccf14(0x1a1))/0x3+parseInt(_0x3ccf14(0x1a6))/0x4*(parseInt(_0x3ccf14(0x1aa))/0x5)+-parseInt(_0x3ccf14(0x1a8))/0x6+-parseInt(_0x3ccf14(0x1a7))/0x7*(parseInt(_0x3ccf14(0x1ac))/0x8)+parseInt(_0x3ccf14(0x1a9))/0x9*(parseInt(_0x3ccf14(0x1ad))/0xa)+-parseInt(_0x3ccf14(0x1ab))/0xb;if(_0x14882c===_0x5be8d2)break;else _0x1f53da['push'](_0x1f53da['shift']());}catch(_0xf5c589){_0x1f53da['push'](_0x1f53da['shift']());}}}(a107_0x2ba3,0xebe9e));export function isValidJsHttpsUrl(_0x402f32){const _0xc06f8b=a107_0x5361;return/^https:\/\/.+\.js(\?.*)?$/[_0xc06f8b(0x1a3)](_0x402f32['trim']());}function a107_0x5361(_0x1368e1,_0x314653){_0x1368e1=_0x1368e1-0x1a1;const _0x2ba320=a107_0x2ba3();let _0x536189=_0x2ba320[_0x1368e1];return _0x536189;}export function isValidCssHttpsUrl(_0x255faa){const _0x105fd9=a107_0x5361;return/^https:\/\/.+\.css(\?.*)?$/[_0x105fd9(0x1a3)](_0x255faa[_0x105fd9(0x1a5)]());}export async function isUrlReachable(_0x4f6ee9){const _0x415000=a107_0x5361;try{const _0xbb3c5c=await fetch(_0x4f6ee9,{'method':_0x415000(0x1a2)});return _0xbb3c5c['ok'];}catch{return![];}}
|