@lovrabet/rabetbase-cli 2.4.1-beta.1 → 2.4.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/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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.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/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.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/file/index.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.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/mutations.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.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/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.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/error-output.js +1 -1
- package/lib/framework/explicit-yes.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.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x111f40,_0x4db28f){const _0x4e9b5e=a120_0xcc10,_0x19bbe3=_0x111f40();while(!![]){try{const _0x368ea6=-parseInt(_0x4e9b5e(0x208))/0x1+parseInt(_0x4e9b5e(0x1ed))/0x2+-parseInt(_0x4e9b5e(0x1e7))/0x3*(parseInt(_0x4e9b5e(0x1e9))/0x4)+-parseInt(_0x4e9b5e(0x20e))/0x5*(parseInt(_0x4e9b5e(0x1e2))/0x6)+parseInt(_0x4e9b5e(0x1fb))/0x7*(-parseInt(_0x4e9b5e(0x209))/0x8)+-parseInt(_0x4e9b5e(0x1f0))/0x9*(-parseInt(_0x4e9b5e(0x200))/0xa)+parseInt(_0x4e9b5e(0x201))/0xb;if(_0x368ea6===_0x4db28f)break;else _0x19bbe3['push'](_0x19bbe3['shift']());}catch(_0x4e76de){_0x19bbe3['push'](_0x19bbe3['shift']());}}}(a120_0x4bdd,0x698a5));function a120_0x4bdd(){const _0x4ecb11=['sort','children','url','sha256','menus','pageType','item','string','datasetCode','visible','133DmNqjf','parse','modelType','type','pageId','2430CWDbjq','13713238dqnWSY','path','hex','verbose','sha256:','POSITIVE_INFINITY','filter','277901VSQwwA','329408ozjjHP','updateUserName','depth','digest','index','1190170AJQXgW','parentId','childrenIds','boolean','12LsmYBy','update','resources','isArray','isFinite','3mSNLRX','extend','2150804tdsljt','number','length','map','1545354oBGspO','values','label','18036VBAyLa'];a120_0x4bdd=function(){return _0x4ecb11;};return a120_0x4bdd();}import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';function a120_0xcc10(_0x508aae,_0x1c4a94){_0x508aae=_0x508aae-0x1df;const _0x4bdd75=a120_0x4bdd();let _0xcc10de=_0x4bdd75[_0x508aae];return _0xcc10de;}export async function fetchMenuSnapshot(_0x4dc417,_0x195c62,_0x4f33b9={}){const _0x12af7e=await getMenuTree(_0x4dc417,_0x195c62);return buildMenuSnapshot(Array['isArray'](_0x12af7e)?_0x12af7e:[],_0x4f33b9);}export function buildMenuSnapshot(_0xcc59f3,_0x3135bd={}){const _0x28d4be=a120_0xcc10,_0x1f3e2=flattenMenuItems(_0xcc59f3,{'verbose':_0x3135bd[_0x28d4be(0x204)]===!![],'parentId':null,'depth':0x0}),_0x36a880=new Map(_0x1f3e2[_0x28d4be(0x1ec)](_0x167732=>[_0x167732['id'],_0x167732])),_0x3c8243=createHash(_0x28d4be(0x1f4))[_0x28d4be(0x1e3)](JSON['stringify'](_0x1f3e2['map'](toHashInput)))[_0x28d4be(0x20c)](_0x28d4be(0x203));return{'total':_0x1f3e2[_0x28d4be(0x1eb)],'hash':_0x28d4be(0x205)+_0x3c8243,'menus':_0x1f3e2,'byId':_0x36a880};}export function toProcessedMenuItem(_0x360562){const _0x55b1bc=a120_0xcc10;return{'id':_0x360562['id'],'path':_0x360562[_0x55b1bc(0x202)],'label':_0x360562[_0x55b1bc(0x1ef)],'resources':[..._0x360562[_0x55b1bc(0x1e4)]],'extend':_0x360562[_0x55b1bc(0x1e8)]??null};}export function toMenuListItem(_0x462d64){const {modelType:_0x575b8e,datasetId:_0x596129,datasetCode:_0x5bfbb9,resourcesValid:_0x23d3cd,..._0x8dedc5}=_0x462d64;return _0x8dedc5;}export function getChildren(_0x17f0d9,_0x3ba257){const _0x5c6c20=a120_0xcc10;return _0x17f0d9[_0x5c6c20(0x1f5)][_0x5c6c20(0x207)](_0x5b8afd=>_0x5b8afd[_0x5c6c20(0x1df)]===_0x3ba257);}function flattenMenuItems(_0x41319e,_0x53667e){const _0x4e9c60=a120_0xcc10,_0x2bad4c=sortMenuItems(_0x41319e),_0x5710c2=[];for(const _0x4dc1fb of _0x2bad4c){const _0xbcdb0a=sortMenuItems(Array[_0x4e9c60(0x1e5)](_0x4dc1fb['children'])?_0x4dc1fb[_0x4e9c60(0x1f2)]:[]);_0x5710c2['push'](toMenuFact(_0x4dc1fb,_0xbcdb0a,_0x53667e)),_0xbcdb0a[_0x4e9c60(0x1eb)]>0x0&&_0x5710c2['push'](...flattenMenuItems(_0xbcdb0a,{'verbose':_0x53667e['verbose'],'parentId':_0x4dc1fb['id'],'depth':_0x53667e[_0x4e9c60(0x20b)]+0x1}));}return _0x5710c2;}function sortMenuItems(_0x250b34){const _0x213f1b=a120_0xcc10;return _0x250b34[_0x213f1b(0x1ec)]((_0x51a241,_0x457ef8)=>({'item':_0x51a241,'index':_0x457ef8}))[_0x213f1b(0x1f1)]((_0x24c51a,_0x5d00ff)=>{const _0x18701b=_0x213f1b,_0x54bbcb=normalizeSort(_0x24c51a[_0x18701b(0x1f7)][_0x18701b(0x1f1)]),_0x4a5dba=normalizeSort(_0x5d00ff['item'][_0x18701b(0x1f1)]);if(_0x54bbcb!==_0x4a5dba)return _0x54bbcb-_0x4a5dba;return _0x24c51a[_0x18701b(0x20d)]-_0x5d00ff[_0x18701b(0x20d)];})[_0x213f1b(0x1ec)](({item:_0xf6ae89})=>_0xf6ae89);}function toMenuFact(_0x578886,_0xd32f3f,_0x1d34c9){const _0x349bb7=a120_0xcc10,_0x118f39=normalizeResourceValue(_0x578886[_0x349bb7(0x1e8)]?.['resources']),_0x331322={'id':_0x578886['id'],'parentId':_0x1d34c9[_0x349bb7(0x1df)],'depth':_0x1d34c9['depth'],'label':normalizeString(_0x578886[_0x349bb7(0x1ef)]),'path':normalizeString(_0x578886['path']),'url':normalizeString(_0x578886[_0x349bb7(0x1f3)]),'type':normalizeString(_0x578886[_0x349bb7(0x1fe)]),'visible':typeof _0x578886[_0x349bb7(0x1fa)]===_0x349bb7(0x1e1)?_0x578886[_0x349bb7(0x1fa)]:null,'sort':typeof _0x578886[_0x349bb7(0x1f1)]===_0x349bb7(0x1ea)&&Number[_0x349bb7(0x1e6)](_0x578886[_0x349bb7(0x1f1)])?_0x578886[_0x349bb7(0x1f1)]:null,'resources':_0x118f39['values'],'resourcesValid':_0x118f39['valid'],'childrenIds':_0xd32f3f[_0x349bb7(0x1ec)](_0x190427=>_0x190427['id']),'childrenCount':_0xd32f3f[_0x349bb7(0x1eb)],'pageId':normalizeNullableNumber(_0x578886[_0x349bb7(0x1ff)]),'pageType':normalizeString(_0x578886[_0x349bb7(0x1f6)]),'modelType':normalizeString(_0x578886[_0x349bb7(0x1fd)]),'datasetId':normalizeNullableNumber(_0x578886['datasetId']),'datasetCode':normalizeString(_0x578886['datasetCode']),'updateUserId':normalizeNullableString(_0x578886['updateUserId']),'updateUserName':normalizeNullableString(_0x578886[_0x349bb7(0x20a)]),'updateTime':normalizeNullableTimestamp(_0x578886['updateTime'])};return _0x1d34c9['verbose']&&(_0x331322['extend']=_0x578886[_0x349bb7(0x1e8)]??null),_0x331322;}function toHashInput(_0x22c064){const _0x3c1ac6=a120_0xcc10;return{'id':_0x22c064['id'],'parentId':_0x22c064[_0x3c1ac6(0x1df)],'label':_0x22c064['label'],'path':_0x22c064[_0x3c1ac6(0x202)],'url':_0x22c064[_0x3c1ac6(0x1f3)],'type':_0x22c064['type'],'visible':_0x22c064['visible'],'sort':_0x22c064[_0x3c1ac6(0x1f1)],'resources':_0x22c064['resources'],'resourcesValid':_0x22c064['resourcesValid'],'childrenIds':_0x22c064[_0x3c1ac6(0x1e0)],'pageId':_0x22c064[_0x3c1ac6(0x1ff)],'pageType':_0x22c064[_0x3c1ac6(0x1f6)],'modelType':_0x22c064[_0x3c1ac6(0x1fd)],'datasetId':_0x22c064['datasetId'],'datasetCode':_0x22c064[_0x3c1ac6(0x1f9)],'updateUserId':_0x22c064['updateUserId'],'updateUserName':_0x22c064['updateUserName'],'updateTime':_0x22c064['updateTime']};}function normalizeSort(_0x3ddfd5){const _0xe637bb=a120_0xcc10;return typeof _0x3ddfd5===_0xe637bb(0x1ea)&&Number[_0xe637bb(0x1e6)](_0x3ddfd5)?_0x3ddfd5:Number[_0xe637bb(0x206)];}function normalizeString(_0x3bd075){const _0x3efbfe=a120_0xcc10;return typeof _0x3bd075===_0x3efbfe(0x1f8)?_0x3bd075:'';}function normalizeNullableNumber(_0x1f09f7){const _0x29db42=a120_0xcc10;return typeof _0x1f09f7===_0x29db42(0x1ea)&&Number[_0x29db42(0x1e6)](_0x1f09f7)?_0x1f09f7:null;}function normalizeNullableString(_0x2f85c7){const _0x25ae3c=a120_0xcc10;return typeof _0x2f85c7===_0x25ae3c(0x1f8)&&_0x2f85c7[_0x25ae3c(0x1eb)]>0x0?_0x2f85c7:null;}function normalizeNullableTimestamp(_0xa578fb){const _0x285789=a120_0xcc10;if(typeof _0xa578fb===_0x285789(0x1f8))return _0xa578fb[_0x285789(0x1eb)]>0x0?_0xa578fb:null;return typeof _0xa578fb==='number'&&Number[_0x285789(0x1e6)](_0xa578fb)?_0xa578fb:null;}export function normalizeResources(_0xe54862){const _0x47b3ee=a120_0xcc10;return normalizeResourceValue(_0xe54862)[_0x47b3ee(0x1ee)];}function normalizeResourceValue(_0x4d7029){const _0x18ccf3=a120_0xcc10;if(_0x4d7029==null)return{'values':[],'valid':!![]};if(Array[_0x18ccf3(0x1e5)](_0x4d7029))return{'values':_0x4d7029[_0x18ccf3(0x1ec)](String),'valid':!![]};if(typeof _0x4d7029!==_0x18ccf3(0x1f8))return{'values':[],'valid':![]};try{const _0x414492=JSON[_0x18ccf3(0x1fc)](_0x4d7029);return Array['isArray'](_0x414492)?{'values':_0x414492[_0x18ccf3(0x1ec)](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d07e3,_0x47940c){var _0xf059bd=a121_0x5760,_0x3968f9=_0x3d07e3();while(!![]){try{var _0x49779e=-parseInt(_0xf059bd(0x1c5))/0x1+-parseInt(_0xf059bd(0x1c0))/0x2+parseInt(_0xf059bd(0x1c3))/0x3*(parseInt(_0xf059bd(0x1bf))/0x4)+parseInt(_0xf059bd(0x1c6))/0x5*(-parseInt(_0xf059bd(0x1c1))/0x6)+-parseInt(_0xf059bd(0x1c2))/0x7+-parseInt(_0xf059bd(0x1c7))/0x8+parseInt(_0xf059bd(0x1c4))/0x9*(parseInt(_0xf059bd(0x1c8))/0xa);if(_0x49779e===_0x47940c)break;else _0x3968f9['push'](_0x3968f9['shift']());}catch(_0x159306){_0x3968f9['push'](_0x3968f9['shift']());}}}(a121_0x1583,0xce4b7));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';function a121_0x5760(_0x10d1cc,_0x470574){_0x10d1cc=_0x10d1cc-0x1bf;var _0x158306=a121_0x1583();var _0x576097=_0x158306[_0x10d1cc];return _0x576097;}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';function a121_0x1583(){var _0x4f18d3=['2941510eiujGI','990498JdrGaT','8703548lztTby','1850517ndGqNb','621xqyOWH','148437qWwVFF','45AALHGy','2062648wrymKA','700620WRrVqy','4duSTxy'];a121_0x1583=function(){return _0x4f18d3;};return a121_0x1583();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x148315,_0x26f7fa){const _0x557bc2=a122_0x53be,_0x3b6f86=_0x148315();while(!![]){try{const _0xe40374=-parseInt(_0x557bc2(0xf1))/0x1*(-parseInt(_0x557bc2(0xdd))/0x2)+-parseInt(_0x557bc2(0xd3))/0x3*(-parseInt(_0x557bc2(0xe0))/0x4)+-parseInt(_0x557bc2(0xed))/0x5*(parseInt(_0x557bc2(0xd5))/0x6)+-parseInt(_0x557bc2(0xe3))/0x7+parseInt(_0x557bc2(0xec))/0x8*(-parseInt(_0x557bc2(0xf0))/0x9)+-parseInt(_0x557bc2(0xe5))/0xa+parseInt(_0x557bc2(0xd9))/0xb*(parseInt(_0x557bc2(0xfa))/0xc);if(_0xe40374===_0x26f7fa)break;else _0x3b6f86['push'](_0x3b6f86['shift']());}catch(_0x54be89){_0x3b6f86['push'](_0x3b6f86['shift']());}}}(a122_0x1b1a,0xc5da8));import a122_0x2df6bf from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a122_0x21fa30 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';function a122_0x1b1a(){const _0xecc990=['10qoseEF','start','isTTY','9yeNRKO','916TgkjXA','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','catch','path','Cancelled.','length','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','\x20\x20JS\x20URL:','26594868REwrne','red','label','No\x20menus\x20selected.','test','fail','has','2514423wjoKmj','cancelled','2106204KriSXn','\x20\x20Checking\x20JS\x20URL\x20reachability...','succeed','CSS\x20URL\x20check\x20failed','11KBKNHN','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','stdin','No\x20local\x20pages\x20found.','1156sPgRJW','\x20\x20Checking\x20CSS\x20URL\x20reachability...','JS\x20URL\x20check\x20failed','4LtlURa','filter','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','3181094wQicLz','CSS\x20URL\x20checked','11975010PLqoVz','includes','\x20\x20CSS\x20URL:','trim','ExitPromptError','name','error','3355272bwEVlR'];a122_0x1b1a=function(){return _0xecc990;};return a122_0x1b1a();}import{CliErrors}from'../../../errors.js';function onCancel(_0x39af20){const _0x1a616d=a122_0x53be;return _0x39af20[_0x1a616d(0xf3)](_0x25b491=>{const _0x31adb0=_0x1a616d;if(_0x25b491?.[_0x31adb0(0xea)]===_0x31adb0(0xe9))throw CliErrors[_0x31adb0(0xd4)]('Cancelled.');throw _0x25b491;});}export function startSpinner(_0x3ed878){const _0x5b537d=a122_0x53be;return a122_0x21fa30({'text':_0x3ed878,'color':'cyan'})[_0x5b537d(0xee)]();}export function stopSpinner(_0x5689db,_0x35e0e1,_0x3bdf5a){const _0x288b9d=a122_0x53be;_0x3bdf5a?_0x5689db[_0x288b9d(0xd7)](_0x35e0e1):_0x5689db[_0x288b9d(0xff)](_0x35e0e1);}export async function askConfirm(_0x38ab05){return onCancel(confirm({'message':_0x38ab05,'theme':{'prefix':''}}));}export async function askJsUrl(_0x475156){const _0xdbe314=a122_0x53be;while(!![]){const _0xaad2c0=await onCancel(input({'message':_0xdbe314(0xf9),'default':_0x475156,'theme':{'prefix':''}}));if(_0xaad2c0[_0xdbe314(0xe8)]()==='')throw CliErrors[_0xdbe314(0xd4)](_0xdbe314(0xf5));if(!/^https:\/\/.+\.js(\?.*)?$/[_0xdbe314(0xfe)](_0xaad2c0[_0xdbe314(0xe8)]())){console['error'](a122_0x2df6bf[_0xdbe314(0xfb)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x285caa=startSpinner(_0xdbe314(0xd6));try{const _0x488fdc=await isUrlReachable(_0xaad2c0['trim']());stopSpinner(_0x285caa,'JS\x20URL\x20checked',_0x488fdc);if(!_0x488fdc){console[_0xdbe314(0xeb)](a122_0x2df6bf[_0xdbe314(0xfb)](_0xdbe314(0xf2)));continue;}return _0xaad2c0['trim']();}catch(_0x51311c){stopSpinner(_0x285caa,_0xdbe314(0xdf),![]);throw _0x51311c;}}}export async function askCssUrl(_0x3d0846){const _0x5ba7b5=a122_0x53be;while(!![]){const _0x2dd594=await onCancel(input({'message':_0x5ba7b5(0xe7),'default':_0x3d0846,'theme':{'prefix':''}}));if(_0x2dd594['trim']()==='')throw CliErrors[_0x5ba7b5(0xd4)](_0x5ba7b5(0xf5));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x5ba7b5(0xfe)](_0x2dd594[_0x5ba7b5(0xe8)]())){console[_0x5ba7b5(0xeb)](a122_0x2df6bf[_0x5ba7b5(0xfb)]('\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'));continue;}const _0xe9b46b=startSpinner(_0x5ba7b5(0xde));try{const _0x2592c9=await isUrlReachable(_0x2dd594[_0x5ba7b5(0xe8)]());stopSpinner(_0xe9b46b,_0x5ba7b5(0xe4),_0x2592c9);if(!_0x2592c9){console[_0x5ba7b5(0xeb)](a122_0x2df6bf['red'](_0x5ba7b5(0xf7)));continue;}return _0x2dd594[_0x5ba7b5(0xe8)]();}catch(_0x53c6e8){stopSpinner(_0xe9b46b,_0x5ba7b5(0xd8),![]);throw _0x53c6e8;}}}export async function selectPages(_0x42a5a8,_0x41f25a){const _0x98fa71=a122_0x53be,_0x467f03=_0x42a5a8['map'](_0x1b5d9b=>{const _0x3f64d5=a122_0x53be,_0x5359d8=_0x41f25a[_0x3f64d5(0xd2)](_0x1b5d9b[_0x3f64d5(0xf4)]);return{'name':_0x1b5d9b[_0x3f64d5(0xfc)]+'\x20\x20'+a122_0x2df6bf['gray'](_0x1b5d9b['path'])+'\x20\x20'+(_0x5359d8?a122_0x2df6bf['gray']('[already\x20on\x20platform]'):a122_0x2df6bf['green']('[new]')),'value':_0x1b5d9b[_0x3f64d5(0xf4)],'checked':!_0x5359d8,'disabled':_0x5359d8};});if(_0x467f03[_0x98fa71(0xf6)]===0x0)throw new Error(_0x98fa71(0xdc));const _0x4547b6=await onCancel(checkbox({'message':_0x98fa71(0xf8),'choices':_0x467f03,'loop':![],'theme':{'prefix':''}}));if(_0x4547b6['length']===0x0)throw new Error(_0x98fa71(0xfd));return _0x42a5a8[_0x98fa71(0xe1)](_0x200969=>_0x4547b6[_0x98fa71(0xe6)](_0x200969[_0x98fa71(0xf4)]));}export function isInteractive(){const _0x3d7d6c=a122_0x53be;return process[_0x3d7d6c(0xdb)][_0x3d7d6c(0xef)]===!![];}function a122_0x53be(_0x1d3698,_0xff3d44){_0x1d3698=_0x1d3698-0xd2;const _0x1b1ac3=a122_0x1b1a();let _0x53bed7=_0x1b1ac3[_0x1d3698];return _0x53bed7;}export function requireInteractive(){const _0x261a37=a122_0x53be;if(!isInteractive())throw new Error(_0x261a37(0xda)+_0x261a37(0xe2));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a123_0x2d07d2=a123_0x3b8b;(function(_0x377fb5,_0x31041f){const _0x29eb25=a123_0x3b8b,_0x5e93d0=_0x377fb5();while(!![]){try{const _0x332ca1=-parseInt(_0x29eb25(0x6e))/0x1+-parseInt(_0x29eb25(0x66))/0x2*(parseInt(_0x29eb25(0x79))/0x3)+parseInt(_0x29eb25(0x77))/0x4*(-parseInt(_0x29eb25(0x65))/0x5)+-parseInt(_0x29eb25(0x69))/0x6+parseInt(_0x29eb25(0x7a))/0x7*(parseInt(_0x29eb25(0x70))/0x8)+-parseInt(_0x29eb25(0x7d))/0x9*(parseInt(_0x29eb25(0x7c))/0xa)+parseInt(_0x29eb25(0x6f))/0xb;if(_0x332ca1===_0x31041f)break;else _0x5e93d0['push'](_0x5e93d0['shift']());}catch(_0x95388){_0x5e93d0['push'](_0x5e93d0['shift']());}}}(a123_0x3280,0x69e03));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';function a123_0x3b8b(_0x569e52,_0xf75294){_0x569e52=_0x569e52-0x64;const _0x32802d=a123_0x3280();let _0x3b8bfd=_0x32802d[_0x569e52];return _0x3b8bfd;}const pagesDir=resolve(process[a123_0x2d07d2(0x7f)](),'src/pages');function a123_0x3280(){const _0x38eab3=['503684GfmFZG','endsWith','2181GnxEty','5663hGpLvV','path','19280jPpADJ','1485cmCUeF','join','cwd','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','30lTCRBE','1278FNJIrK','replace','forEach','836406uUGnAf','split','utf-8','match','trim','394354NyYdzj','19187872cZwepv','7528JFcIKE','index.tsx','concat','filter','push','replaceAll','isDirectory'];a123_0x3280=function(){return _0x38eab3;};return a123_0x3280();}export function extractTitleFromComment(_0x479537){const _0x6e5740=a123_0x2d07d2;try{const _0x1db77d=readFileSync(_0x479537,_0x6e5740(0x6b)),_0x16e2df=_0x1db77d['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x16e2df&&_0x16e2df[0x1]){const _0x1c2161=_0x16e2df[0x1],_0x78d5fd=_0x1c2161[_0x6e5740(0x6c)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x78d5fd&&_0x78d5fd[0x1])return _0x78d5fd[0x1][_0x6e5740(0x6d)]();}let _0x17b7ae=null;const _0x3c5738=_0x1db77d[_0x6e5740(0x6c)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x3c5738&&_0x3c5738[0x1]&&(_0x17b7ae=_0x3c5738[0x1]);if(!_0x17b7ae){const _0x131e75=_0x1db77d[_0x6e5740(0x6c)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x131e75&&_0x131e75[0x1]&&(_0x17b7ae=_0x131e75[0x1]);}if(_0x17b7ae){const _0x3b255f=new RegExp('\x5cb'+_0x17b7ae+_0x6e5740(0x64)),_0x4e1f55=_0x1db77d[_0x6e5740(0x6c)](_0x3b255f);if(_0x4e1f55&&_0x4e1f55[0x1])return _0x4e1f55[0x1];return _0x17b7ae;}return null;}catch(_0x150969){return null;}}export function getLocalPages(_0x4cb3ac=pagesDir,_0x4164a3=pagesDir){const _0x2532d0=a123_0x2d07d2;let _0x558af1=[];const _0x25ce26=readdirSync(_0x4cb3ac);return _0x25ce26[_0x2532d0(0x68)](_0x45e891=>{const _0x50897b=_0x2532d0,_0xc7307b=join(_0x4cb3ac,_0x45e891),_0x17f033=statSync(_0xc7307b);if(_0x17f033&&_0x17f033[_0x50897b(0x76)]())_0x558af1=_0x558af1[_0x50897b(0x72)](getLocalPages(_0xc7307b,_0x4164a3));else{if(_0x45e891[_0x50897b(0x78)]('.tsx')){let _0x771507=relative(_0x4164a3,_0xc7307b);_0x771507[_0x50897b(0x78)](_0x50897b(0x71))?_0x771507=_0x771507[_0x50897b(0x67)](/index\.tsx$/,''):_0x771507=_0x771507[_0x50897b(0x67)](/\.tsx$/,'');_0x771507[_0x50897b(0x78)](sep)&&(_0x771507=_0x771507['slice'](0x0,-0x1));const _0x10d9d6=_0x771507[_0x50897b(0x6a)](sep)[_0x50897b(0x7e)]('/'),_0x397d9f=extractTitleFromComment(_0xc7307b),_0x1a8069=_0x397d9f||_0x10d9d6;_0x558af1[_0x50897b(0x74)]({'path':_0x10d9d6[_0x50897b(0x75)]('$',':'),'label':_0x1a8069});}}}),_0x558af1[_0x2532d0(0x73)](_0x44800c=>_0x44800c[_0x2532d0(0x7b)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ad0d5,_0x4da9c6){const _0x4acdc4=a124_0x3fcf,_0x355ec0=_0x1ad0d5();while(!![]){try{const _0x23bb16=parseInt(_0x4acdc4(0xff))/0x1+parseInt(_0x4acdc4(0xef))/0x2+-parseInt(_0x4acdc4(0xf1))/0x3*(parseInt(_0x4acdc4(0xf7))/0x4)+-parseInt(_0x4acdc4(0xfa))/0x5*(-parseInt(_0x4acdc4(0xf4))/0x6)+parseInt(_0x4acdc4(0xf8))/0x7*(-parseInt(_0x4acdc4(0xfe))/0x8)+-parseInt(_0x4acdc4(0xf6))/0x9+-parseInt(_0x4acdc4(0xf2))/0xa;if(_0x23bb16===_0x4da9c6)break;else _0x355ec0['push'](_0x355ec0['shift']());}catch(_0xbfdfe1){_0x355ec0['push'](_0x355ec0['shift']());}}}(a124_0x5c3a,0x23518));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x26c814){const _0x321918=a124_0x3fcf,_0x3f9e3a=[];return!isValidJsHttpsUrl(_0x26c814)&&_0x3f9e3a[_0x321918(0xf3)]('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x3f9e3a['length']===0x0,'errors':_0x3f9e3a};}function a124_0x3fcf(_0x433e5c,_0x200d12){_0x433e5c=_0x433e5c-0xef;const _0x5c3aa9=a124_0x5c3a();let _0x3fcf6e=_0x5c3aa9[_0x433e5c];return _0x3fcf6e;}export function validateCssUrl(_0xdc3d33){const _0x56b696=a124_0x3fcf,_0x340de7=[];return!isValidCssHttpsUrl(_0xdc3d33)&&_0x340de7[_0x56b696(0xf3)](_0x56b696(0x103)),{'ok':_0x340de7[_0x56b696(0xfb)]===0x0,'errors':_0x340de7};}export async function validateJsUrlReachable(_0x23ad9c){const _0x3a7bab=a124_0x3fcf,_0x567b16=validateJsUrl(_0x23ad9c);if(!_0x567b16['ok'])return _0x567b16;const _0x5ca9de=await isUrlReachable(_0x23ad9c);if(!_0x5ca9de)_0x567b16[_0x3a7bab(0x102)]['push'](_0x3a7bab(0xf0));return{'ok':_0x567b16[_0x3a7bab(0x102)][_0x3a7bab(0xfb)]===0x0,'errors':_0x567b16['errors']};}export async function validateCssUrlReachable(_0x1d4f4c){const _0x24506c=a124_0x3fcf,_0x14c681=validateCssUrl(_0x1d4f4c);if(!_0x14c681['ok'])return _0x14c681;const _0x2fc5ea=await isUrlReachable(_0x1d4f4c);if(!_0x2fc5ea)_0x14c681[_0x24506c(0x102)]['push'](_0x24506c(0xf9));return{'ok':_0x14c681[_0x24506c(0x102)][_0x24506c(0xfb)]===0x0,'errors':_0x14c681[_0x24506c(0x102)]};}function a124_0x5c3a(){const _0x24105b=['27328tAEtcl','CSS\x20URL\x20is\x20unreachable','2750FyHgYI','length','resources','map','192MQrXnD','243513xQkCGn','path','has','errors','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','568832WBTzvb','JS\x20URL\x20is\x20unreachable','3OsWzoP','1333950QWeZPJ','push','1362cXclct','label','2510127lFmdAc','8484YtHRtc'];a124_0x5c3a=function(){return _0x24105b;};return a124_0x5c3a();}export function buildCompareRows(_0x43e131,_0x389200){const _0x3cee0c=a124_0x3fcf;return _0x43e131[_0x3cee0c(0xfd)](_0x468bb9=>({'label':_0x468bb9[_0x3cee0c(0xf5)],'path':_0x468bb9[_0x3cee0c(0x100)],'local':!![],'online':_0x389200[_0x3cee0c(0x101)](_0x468bb9[_0x3cee0c(0x100)])}));}export async function doCreateMenus(_0xfe282a,_0xca6e8f,_0x1b78f7,_0x42e950){const _0x4c563c=a124_0x3fcf,_0x218e5b=await createMenus(_0xfe282a,_0xca6e8f,_0x1b78f7,_0x42e950);return{'created':_0x218e5b['length'],'failed':0x0,'labels':_0x1b78f7[_0x4c563c(0xfd)](_0x1ac166=>_0x1ac166[_0x4c563c(0xf5)]),'menus':_0x218e5b};}export function filterMenusWithResources(_0x36232d){const _0x1df699=a124_0x3fcf;return _0x36232d['filter'](_0x310f89=>_0x310f89[_0x1df699(0xfc)][_0x1df699(0xfb)]>0x0);}export async function fetchMenuData(_0x441843,_0x4358ae){const _0xa7e7b1=a124_0x3fcf,_0x1caa59=getLocalPages(),_0xb1e4e0=await getOnlineMenuList(_0x441843,_0x4358ae),_0x25e5ff=new Set(_0xb1e4e0[_0xa7e7b1(0xfd)](_0x5a9537=>_0x5a9537[_0xa7e7b1(0x100)]));return{'localPages':_0x1caa59,'onlineMenuList':_0xb1e4e0,'onlinePaths':_0x25e5ff};}export async function fetchOnlineMenuList(_0x201045,_0x45ec0f){return getOnlineMenuList(_0x201045,_0x45ec0f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a125_0x37e02c=a125_0x1e5c;function a125_0x1e5c(_0x31124b,_0x314b29){_0x31124b=_0x31124b-0xcf;const _0x3b93d4=a125_0x3b93();let _0x1e5c44=_0x3b93d4[_0x31124b];return _0x1e5c44;}(function(_0x53396f,_0x2126df){const _0x4479c7=a125_0x1e5c,_0x2c57ce=_0x53396f();while(!![]){try{const _0x92dc9e=parseInt(_0x4479c7(0x101))/0x1+parseInt(_0x4479c7(0x115))/0x2*(parseInt(_0x4479c7(0x13d))/0x3)+-parseInt(_0x4479c7(0xd4))/0x4*(-parseInt(_0x4479c7(0x10f))/0x5)+-parseInt(_0x4479c7(0xf3))/0x6*(-parseInt(_0x4479c7(0xd9))/0x7)+-parseInt(_0x4479c7(0xdc))/0x8*(parseInt(_0x4479c7(0xda))/0x9)+parseInt(_0x4479c7(0xdb))/0xa*(-parseInt(_0x4479c7(0xe1))/0xb)+parseInt(_0x4479c7(0x110))/0xc;if(_0x92dc9e===_0x2126df)break;else _0x2c57ce['push'](_0x2c57ce['shift']());}catch(_0x179a2c){_0x2c57ce['push'](_0x2c57ce['shift']());}}}(a125_0x3b93,0xbd4e3));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':'number','required':!![],'description':a125_0x37e02c(0x129)};export const MENU_SORT_FLAG={'name':a125_0x37e02c(0x10c),'type':a125_0x37e02c(0x10b),'description':a125_0x37e02c(0x122)};export const MENU_PARENT_ID_FLAG={'name':a125_0x37e02c(0xff),'type':a125_0x37e02c(0x12f),'description':a125_0x37e02c(0xdd)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a125_0x37e02c(0x13b),'type':a125_0x37e02c(0x12f),'description':a125_0x37e02c(0x124)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':'expect-path','type':'string','description':a125_0x37e02c(0x114)},{'name':a125_0x37e02c(0x136),'type':a125_0x37e02c(0x10b),'description':a125_0x37e02c(0xfe)}];export function validateExactId(_0x5da5a1){const _0x5e27af=a125_0x37e02c,_0x1d41d6=_0x5da5a1[_0x5e27af(0xcf)]('id');if(!Number['isSafeInteger'](_0x1d41d6)||_0x1d41d6<=0x0)throw CliErrors[_0x5e27af(0x106)](_0x5e27af(0xd3));return _0x1d41d6;}export function validateSort(_0x2aa659,_0x8a1d10=a125_0x37e02c(0x10c)){const _0xf05ad5=a125_0x37e02c;if(!hasFlag(_0x2aa659,_0x8a1d10))return undefined;const _0x5b3ee6=_0x2aa659['num'](_0x8a1d10);if(!Number['isSafeInteger'](_0x5b3ee6)||_0x5b3ee6<0x0||_0x5b3ee6>MAX_MENU_SORT)throw menuError(_0xf05ad5(0xfd),'--'+_0x8a1d10+_0xf05ad5(0x11f)+MAX_MENU_SORT+'.',_0xf05ad5(0xe2));return _0x5b3ee6;}export function nextSiblingSort(_0x4ceecc,_0x33a45d,_0x4e8d3a){const _0x534ab1=a125_0x37e02c,_0x4a0f3b=getChildren(_0x4ceecc,_0x33a45d)[_0x534ab1(0x138)](_0x2a93d8=>_0x2a93d8[_0x534ab1(0x10c)])[_0x534ab1(0xfa)](_0x1042d1=>typeof _0x1042d1===_0x534ab1(0x10b));if(_0x4a0f3b[_0x534ab1(0x11d)]===0x0)return 0x0;const _0x9e1cb=Math[_0x534ab1(0x13c)](..._0x4a0f3b);if(_0x9e1cb>=MAX_MENU_SORT)throw menuError(_0x534ab1(0x117),_0x534ab1(0xf6)+_0x4e8d3a+_0x534ab1(0x118)+_0x9e1cb+'.',_0x534ab1(0x123)+MAX_MENU_SORT+_0x534ab1(0xe7));return _0x9e1cb+0x1;}export function requireExplicitYes(_0x17e491){const _0xe96b49=a125_0x37e02c;if(_0x17e491[_0xe96b49(0xf7)](_0xe96b49(0xe6)))return;if(!_0x17e491['bool']('yes'))throw menuError(_0xe96b49(0x104),'This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.',_0xe96b49(0x121));}export async function fetchMutationSnapshot(_0x4bff2c,_0x266e59,_0x40af5c){const _0x549af5=a125_0x37e02c;try{return await fetchMenuSnapshot(_0x4bff2c[_0x549af5(0x130)],_0x4bff2c[_0x549af5(0xd1)]);}catch(_0x2bf3fa){throw mapMenuApiError(_0x2bf3fa,'read\x20online\x20menu\x20facts\x20before\x20'+_0x266e59,_0x40af5c);}}export async function recheckMutationSnapshot(_0x2afd94,_0x5e7579,_0x3dd876,_0x21b256){const _0x4f6e0c=a125_0x37e02c;let _0x4da318;try{_0x4da318=await fetchMenuSnapshot(_0x2afd94[_0x4f6e0c(0x130)],_0x2afd94[_0x4f6e0c(0xd1)]);}catch(_0x573f1a){const _0x13261b=mapMenuApiError(_0x573f1a,_0x4f6e0c(0xf4)+_0x3dd876,_0x21b256);throw menuFailure(_0x13261b,_0x5e7579,{'stage':'pre-write-recheck','failed':_0x21b256==null?{}:{'id':_0x21b256}});}if(_0x4da318[_0x4f6e0c(0x126)]!==_0x5e7579['snapshotHash']){const _0x2655ae=menuError(_0x4f6e0c(0x128),_0x4f6e0c(0xf0)+_0x3dd876+_0x4f6e0c(0xe5),_0x4f6e0c(0x103));throw menuFailure(_0x2655ae,_0x5e7579,{'stage':'pre-write-recheck','failed':{..._0x21b256==null?{}:{'id':_0x21b256},'expectedSnapshotHash':_0x5e7579[_0x4f6e0c(0xf8)],'currentSnapshotHash':_0x4da318['hash']}});}return _0x4da318;}export function parseParentId(_0x204755,_0x5121b3,_0xcecb05={}){const _0x2eb0fa=a125_0x37e02c;if(!hasFlag(_0x204755,_0x5121b3)){if(_0xcecb05['required'])throw CliErrors[_0x2eb0fa(0xd8)](_0x5121b3);return undefined;}const _0x5dee52=_0x204755[_0x2eb0fa(0xe8)](_0x5121b3)[_0x2eb0fa(0x13a)]();if(_0x5dee52[_0x2eb0fa(0xea)]()===_0x2eb0fa(0x109))return null;if(!/^\d+$/[_0x2eb0fa(0x137)](_0x5dee52))throw CliErrors['validation']('--'+_0x5121b3+_0x2eb0fa(0x11a));const _0x5a57c3=Number(_0x5dee52);if(!Number[_0x2eb0fa(0xfb)](_0x5a57c3)||_0x5a57c3<=0x0)throw CliErrors[_0x2eb0fa(0x106)]('--'+_0x5121b3+_0x2eb0fa(0x11a));return _0x5a57c3;}export function requireMenu(_0x1e34b1,_0x47ac0){const _0x2104ab=a125_0x37e02c,_0x17fed9=_0x1e34b1[_0x2104ab(0xd7)][_0x2104ab(0x102)](_0x47ac0);if(!_0x17fed9)throw menuError(_0x2104ab(0x12c),_0x2104ab(0xe0)+_0x47ac0,_0x2104ab(0x105));return _0x17fed9;}export function requireFolder(_0x355914,_0x2ac339){const _0x4ab4bc=a125_0x37e02c,_0x11ddd2=requireMenu(_0x355914,_0x2ac339);if(_0x11ddd2[_0x4ab4bc(0x111)]!==_0x4ab4bc(0xd6))throw menuError(_0x4ab4bc(0xd2),'Menu\x20'+_0x2ac339+'\x20is\x20type\x20\x22'+(_0x11ddd2[_0x4ab4bc(0x111)]||_0x4ab4bc(0x127))+'\x22,\x20not\x20folder.',_0x4ab4bc(0xec));return _0x11ddd2;}export function assertExpectedState(_0x435936,_0xb8599a){const _0x2adc1f=a125_0x37e02c;if(hasFlag(_0x435936,_0x2adc1f(0x13b))){const _0x38be8f=parseParentId(_0x435936,_0x2adc1f(0x13b),{'required':!![]});if(_0xb8599a[_0x2adc1f(0xf2)]!==_0x38be8f)throw stateDrift(_0x2adc1f(0x133)+_0xb8599a['id']+_0x2adc1f(0x100)+formatParent(_0x38be8f)+',\x20current\x20'+formatParent(_0xb8599a[_0x2adc1f(0xf2)])+'.');}if(hasFlag(_0x435936,_0x2adc1f(0x120))){const _0x3a0788=_0x435936[_0x2adc1f(0xe8)](_0x2adc1f(0x120));if(_0xb8599a['path']!==_0x3a0788)throw stateDrift(_0x2adc1f(0x133)+_0xb8599a['id']+'\x20path\x20changed:\x20expected\x20'+JSON[_0x2adc1f(0xf1)](_0x3a0788)+_0x2adc1f(0xeb)+JSON[_0x2adc1f(0xf1)](_0xb8599a[_0x2adc1f(0x132)])+'.');}if(hasFlag(_0x435936,'expected-children-count')){const _0xcd3111=_0x435936['num']('expected-children-count');if(!Number[_0x2adc1f(0xfb)](_0xcd3111)||_0xcd3111<0x0)throw CliErrors[_0x2adc1f(0x106)](_0x2adc1f(0x107));if(_0xb8599a[_0x2adc1f(0x116)]!==_0xcd3111)throw stateDrift('Menu\x20'+_0xb8599a['id']+_0x2adc1f(0xe3)+_0xcd3111+_0x2adc1f(0xeb)+_0xb8599a['childrenCount']+'.');}}export function assertVerified(_0x51f567,_0x7c6257,_0x1879a1='Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.'){const _0x5c6589=a125_0x37e02c;if(!_0x51f567)throw menuError(_0x5c6589(0x119),_0x7c6257,_0x1879a1);}export function mutationResult(_0x136381){const _0x568660=a125_0x37e02c;return{'operation':_0x136381[_0x568660(0x10d)],'selector':_0x136381['selector'],'before':_0x136381['before'],'after':_0x136381[_0x568660(0x12b)],'dryRun':_0x136381[_0x568660(0xf5)],'backend':_0x136381['backend'],..._0x136381[_0x568660(0x125)]?{'plannedActions':_0x136381[_0x568660(0x125)]}:{},..._0x136381[_0x568660(0x113)]?{'targets':_0x136381[_0x568660(0x113)]}:{},..._0x136381[_0x568660(0xfc)]?{'deleteOrder':_0x136381[_0x568660(0xfc)]}:{},'snapshotHash':_0x136381[_0x568660(0xf8)],..._0x136381[_0x568660(0xd0)]?{'cascade':_0x136381[_0x568660(0xd0)]}:{},..._0x136381[_0x568660(0xe4)]?{'planFile':_0x136381[_0x568660(0xe4)]}:{},'succeeded':_0x136381['succeeded']??[],'failed':_0x136381[_0x568660(0x134)]??[],'warnings':_0x136381['warnings']??[],'verification':_0x136381[_0x568660(0x12d)],'error':_0x136381[_0x568660(0xe9)]};}export function menuDryRunResult(_0x19ae37,_0x5d47a7){return{..._0x19ae37,..._0x5d47a7};}export function menuFailure(_0x374895,_0x12b4c0,_0x336afd){const _0x4f8bab=a125_0x37e02c,_0x438b79=mutationResult({..._0x12b4c0,'after':_0x336afd[_0x4f8bab(0x12b)]===undefined?_0x12b4c0['after']:_0x336afd['after'],'backend':_0x336afd[_0x4f8bab(0x10e)]??_0x12b4c0[_0x4f8bab(0x10e)],'dryRun':![],'succeeded':_0x336afd[_0x4f8bab(0x108)]??[],'failed':[{..._0x336afd[_0x4f8bab(0x134)]??{},'stage':_0x336afd[_0x4f8bab(0x11c)],'code':_0x374895[_0x4f8bab(0xef)],'message':_0x374895[_0x4f8bab(0xde)]}],'warnings':[..._0x12b4c0[_0x4f8bab(0xdf)],..._0x336afd[_0x4f8bab(0xdf)]??[]],'verification':_0x336afd['verification'],'error':{'code':_0x374895[_0x4f8bab(0xef)],'message':_0x374895[_0x4f8bab(0xde)],..._0x374895[_0x4f8bab(0x12a)]?{'hint':_0x374895['hint']}:{}}});return Object['defineProperty'](_0x374895,_0x4f8bab(0x131),{'value':_0x438b79,'enumerable':!![],'configurable':!![]}),_0x374895;}function a125_0x3b93(){const _0x12832e=['Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','message','warnings','Online\x20menu\x20not\x20found:\x20','13969318nyeOFO','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','\x20child\x20count\x20changed:\x20expected\x20','planFile',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','dry-run',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','str','error','toLowerCase',',\x20current\x20','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','code','Online\x20menu\x20state\x20changed\x20before\x20','stringify','parentId','12SYDEyS','recheck\x20online\x20menu\x20facts\x20before\x20','dryRun','Cannot\x20append\x20a\x20','bool','snapshotHash','Permission\x20denied\x20while\x20attempting\x20to\x20','filter','isSafeInteger','deleteOrder','menu_sort_invalid','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','parent-id','\x20parent\x20changed:\x20expected\x20','145286lnVJrM','get','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','menu_confirmation_required','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','validation','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','succeeded','root','\x20menu\x20','number','sort','operation','backend','2092595nSrTSZ','4614972ExBfTn','type','api_error','targets','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','2BdoxdE','childrenCount','menu_sort_overflow','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','menu_verification_failed','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','hasOwnProperty','stage','length','prototype','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','expect-path','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Sibling\x20sort\x20value\x20(non-negative\x20integer)','Reorder\x20sibling\x20menus\x20below\x20','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','plannedActions','hash','unknown','menu_state_drift','Exact\x20online\x20menu\x20id','hint','after','menu_not_found','verification','menu_mutation_failed','string','appCode','data','path','Menu\x20','failed','rawFlags','expected-children-count','test','map','Failed\x20to\x20','trim','expect-parent-id','max','1822332HmSLHo','num','cascade','cookie','menu_parent_not_folder','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','8sIBJzR','menu_permission_denied','folder','byId','flagMissing','3360021CCxuWT','75483kRltTn','10tvgMVz','848YihlvE'];a125_0x3b93=function(){return _0x12832e;};return a125_0x3b93();}export function asVerificationError(_0x5d2174,_0x4b6a6a){const _0xf8a60=a125_0x37e02c;if(_0x5d2174 instanceof CliError&&_0x5d2174[_0xf8a60(0xef)]===_0xf8a60(0x119))return _0x5d2174;const _0x57d4a9=_0x5d2174 instanceof Error?_0x5d2174['message']:String(_0x5d2174);return menuError(_0xf8a60(0x119),''+_0x4b6a6a+(_0x57d4a9?':\x20'+_0x57d4a9:''),_0xf8a60(0xee));}export function describeMenuErrorCause(_0x5b7a4f,_0x1580d2,_0x33ee70){const _0x41ca54=a125_0x37e02c,_0x441811=mapMenuApiError(_0x5b7a4f,_0x1580d2,_0x33ee70);return{'causeCode':_0x441811[_0x41ca54(0xef)],'causeMessage':_0x441811[_0x41ca54(0xde)]};}export function hasFlag(_0x2095c7,_0x554e2c){const _0x170d19=a125_0x37e02c;return Object[_0x170d19(0x11e)][_0x170d19(0x11b)]['call'](_0x2095c7[_0x170d19(0x135)],_0x554e2c)&&_0x2095c7[_0x170d19(0x135)][_0x554e2c]!==undefined;}export function toApiParentId(_0xca511e){return _0xca511e??0x0;}export function formatParent(_0x257466){const _0x30d055=a125_0x37e02c;return _0x257466==null?_0x30d055(0x109):String(_0x257466);}export function menuError(_0x69a189,_0x574d75,_0x4607f3){return new CliError(_0x69a189,0x1,_0x574d75,_0x4607f3);}export function mapMenuApiError(_0x1b3354,_0x4f3a27,_0x4c8e19){const _0x191059=a125_0x37e02c;if(_0x1b3354 instanceof CliError&&_0x1b3354['code']!=='api_error')return _0x1b3354;const _0x10ba7e=_0x1b3354 instanceof Error?_0x1b3354[_0x191059(0xde)]:String(_0x1b3354);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i['test'](_0x10ba7e))return menuError(_0x191059(0xd5),_0x191059(0xf9)+_0x4f3a27+(_0x4c8e19?_0x191059(0x10a)+_0x4c8e19:'')+'.','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.');return menuError(_0x191059(0x12e),_0x191059(0x139)+_0x4f3a27+(_0x4c8e19?_0x191059(0x10a)+_0x4c8e19:'')+':\x20'+_0x10ba7e,_0x191059(0xed));}export function isMenuResponseLoss(_0x1fe15d){const _0x5b88da=a125_0x37e02c,_0x1f2d72=_0x1fe15d instanceof Error?_0x1fe15d['message']:String(_0x1fe15d);if(_0x1fe15d instanceof CliError)return _0x1fe15d[_0x5b88da(0xef)]===_0x5b88da(0x112)&&/^Request (?:failed|timeout):/i[_0x5b88da(0x137)](_0x1f2d72);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x5b88da(0x137)](_0x1f2d72);}function stateDrift(_0x45b9c1){const _0x5758ea=a125_0x37e02c;return menuError(_0x5758ea(0x128),_0x45b9c1,'Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.');}
|
|
1
|
+
const a125_0x1ae1ee=a125_0x168b;(function(_0x2f6bb0,_0x5aa727){const _0x1d3aed=a125_0x168b,_0x538660=_0x2f6bb0();while(!![]){try{const _0x3f0bb0=-parseInt(_0x1d3aed(0xc5))/0x1*(parseInt(_0x1d3aed(0xfd))/0x2)+parseInt(_0x1d3aed(0xa8))/0x3*(parseInt(_0x1d3aed(0xb5))/0x4)+parseInt(_0x1d3aed(0xeb))/0x5*(-parseInt(_0x1d3aed(0xe0))/0x6)+-parseInt(_0x1d3aed(0xaf))/0x7*(-parseInt(_0x1d3aed(0xb0))/0x8)+parseInt(_0x1d3aed(0xa3))/0x9+-parseInt(_0x1d3aed(0xfa))/0xa*(-parseInt(_0x1d3aed(0xe5))/0xb)+parseInt(_0x1d3aed(0xb3))/0xc*(-parseInt(_0x1d3aed(0x103))/0xd);if(_0x3f0bb0===_0x5aa727)break;else _0x538660['push'](_0x538660['shift']());}catch(_0x6f5c34){_0x538660['push'](_0x538660['shift']());}}}(a125_0x3258,0x1f087));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':a125_0x1ae1ee(0xf4),'required':!![],'description':a125_0x1ae1ee(0xdb)};export const MENU_SORT_FLAG={'name':'sort','type':a125_0x1ae1ee(0xf4),'description':a125_0x1ae1ee(0xe9)};export const MENU_PARENT_ID_FLAG={'name':a125_0x1ae1ee(0xda),'type':'string','description':a125_0x1ae1ee(0xb6)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a125_0x1ae1ee(0xf9),'type':'string','description':a125_0x1ae1ee(0xf2)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':'expect-path','type':'string','description':a125_0x1ae1ee(0x10c)},{'name':a125_0x1ae1ee(0x10d),'type':'number','description':a125_0x1ae1ee(0x109)}];export function validateExactId(_0x4ce99f){const _0x26de26=a125_0x1ae1ee,_0x2cbc9d=_0x4ce99f[_0x26de26(0xd1)]('id');if(!Number[_0x26de26(0xd6)](_0x2cbc9d)||_0x2cbc9d<=0x0)throw CliErrors[_0x26de26(0x10b)](_0x26de26(0xf8));return _0x2cbc9d;}export function validateSort(_0x3840f3,_0x414f81=a125_0x1ae1ee(0xe2)){const _0x49a847=a125_0x1ae1ee;if(!hasFlag(_0x3840f3,_0x414f81))return undefined;const _0x157eb7=_0x3840f3[_0x49a847(0xd1)](_0x414f81);if(!Number[_0x49a847(0xd6)](_0x157eb7)||_0x157eb7<0x0||_0x157eb7>MAX_MENU_SORT)throw menuError(_0x49a847(0xef),'--'+_0x414f81+_0x49a847(0xed)+MAX_MENU_SORT+'.',_0x49a847(0xc2));return _0x157eb7;}export function nextSiblingSort(_0x52bed6,_0x53fd5c,_0x2b74b5){const _0x3933bb=a125_0x1ae1ee,_0x55027a=getChildren(_0x52bed6,_0x53fd5c)['map'](_0xfe8579=>_0xfe8579[_0x3933bb(0xe2)])[_0x3933bb(0x104)](_0x1443af=>typeof _0x1443af===_0x3933bb(0xf4));if(_0x55027a[_0x3933bb(0xa2)]===0x0)return 0x0;const _0x416c3c=Math[_0x3933bb(0xf1)](..._0x55027a);if(_0x416c3c>=MAX_MENU_SORT)throw menuError(_0x3933bb(0x106),'Cannot\x20append\x20a\x20'+_0x2b74b5+_0x3933bb(0xba)+_0x416c3c+'.','Reorder\x20sibling\x20menus\x20below\x20'+MAX_MENU_SORT+_0x3933bb(0xdc));return _0x416c3c+0x1;}export function requireExplicitYes(_0xf30812){const _0xc27577=a125_0x1ae1ee;if(_0xf30812[_0xc27577(0xe1)](_0xc27577(0xbc)))return;if(!_0xf30812[_0xc27577(0xe1)]('yes'))throw menuError(_0xc27577(0x108),_0xc27577(0xa4),_0xc27577(0xb8));}export async function fetchMutationSnapshot(_0x59abc0,_0x2eecb9,_0x1c6285){const _0x462c40=a125_0x1ae1ee;try{return await fetchMenuSnapshot(_0x59abc0[_0x462c40(0x10e)],_0x59abc0[_0x462c40(0xb7)]);}catch(_0x8e45d3){throw mapMenuApiError(_0x8e45d3,_0x462c40(0xd2)+_0x2eecb9,_0x1c6285);}}export async function recheckMutationSnapshot(_0x1d2fda,_0x4261c5,_0xb4e2f2,_0x56565d){const _0x36fc8f=a125_0x1ae1ee;let _0x269460;try{_0x269460=await fetchMenuSnapshot(_0x1d2fda['appCode'],_0x1d2fda['cookie']);}catch(_0x48bab9){const _0x1f7976=mapMenuApiError(_0x48bab9,_0x36fc8f(0xe3)+_0xb4e2f2,_0x56565d);throw menuFailure(_0x1f7976,_0x4261c5,{'stage':_0x36fc8f(0xcf),'failed':_0x56565d==null?{}:{'id':_0x56565d}});}if(_0x269460[_0x36fc8f(0xcc)]!==_0x4261c5[_0x36fc8f(0xd8)]){const _0xf492d3=menuError(_0x36fc8f(0xad),_0x36fc8f(0xca)+_0xb4e2f2+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.',_0x36fc8f(0xa5));throw menuFailure(_0xf492d3,_0x4261c5,{'stage':_0x36fc8f(0xcf),'failed':{..._0x56565d==null?{}:{'id':_0x56565d},'expectedSnapshotHash':_0x4261c5['snapshotHash'],'currentSnapshotHash':_0x269460['hash']}});}return _0x269460;}export function parseParentId(_0xbe5745,_0x3c5b5c,_0x52a1f3={}){const _0xe39652=a125_0x1ae1ee;if(!hasFlag(_0xbe5745,_0x3c5b5c)){if(_0x52a1f3['required'])throw CliErrors[_0xe39652(0xce)](_0x3c5b5c);return undefined;}const _0x4efd46=_0xbe5745['str'](_0x3c5b5c)['trim']();if(_0x4efd46[_0xe39652(0xdf)]()===_0xe39652(0xd7))return null;if(!/^\d+$/[_0xe39652(0xa1)](_0x4efd46))throw CliErrors[_0xe39652(0x10b)]('--'+_0x3c5b5c+_0xe39652(0xd5));const _0x5cb732=Number(_0x4efd46);if(!Number['isSafeInteger'](_0x5cb732)||_0x5cb732<=0x0)throw CliErrors[_0xe39652(0x10b)]('--'+_0x3c5b5c+'\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.');return _0x5cb732;}export function requireMenu(_0x365252,_0x56d677){const _0x426a58=a125_0x1ae1ee,_0x141ee0=_0x365252[_0x426a58(0xc8)][_0x426a58(0xcb)](_0x56d677);if(!_0x141ee0)throw menuError(_0x426a58(0xe8),'Online\x20menu\x20not\x20found:\x20'+_0x56d677,_0x426a58(0xde));return _0x141ee0;}export function requireFolder(_0x2861c6,_0x3e3abe){const _0x448a4d=a125_0x1ae1ee,_0x508611=requireMenu(_0x2861c6,_0x3e3abe);if(_0x508611[_0x448a4d(0xe7)]!==_0x448a4d(0x10a))throw menuError('menu_parent_not_folder',_0x448a4d(0xf3)+_0x3e3abe+_0x448a4d(0xea)+(_0x508611[_0x448a4d(0xe7)]||_0x448a4d(0xc0))+_0x448a4d(0xbb),'Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.');return _0x508611;}export function assertExpectedState(_0xdd1dc3,_0x30aad7){const _0x3b4683=a125_0x1ae1ee;if(hasFlag(_0xdd1dc3,'expect-parent-id')){const _0x1a8b95=parseParentId(_0xdd1dc3,'expect-parent-id',{'required':!![]});if(_0x30aad7[_0x3b4683(0xb1)]!==_0x1a8b95)throw stateDrift(_0x3b4683(0xf3)+_0x30aad7['id']+_0x3b4683(0xd0)+formatParent(_0x1a8b95)+_0x3b4683(0xd9)+formatParent(_0x30aad7['parentId'])+'.');}if(hasFlag(_0xdd1dc3,_0x3b4683(0xfc))){const _0x52f797=_0xdd1dc3[_0x3b4683(0xfe)]('expect-path');if(_0x30aad7['path']!==_0x52f797)throw stateDrift(_0x3b4683(0xf3)+_0x30aad7['id']+_0x3b4683(0xf0)+JSON[_0x3b4683(0xf5)](_0x52f797)+',\x20current\x20'+JSON[_0x3b4683(0xf5)](_0x30aad7['path'])+'.');}if(hasFlag(_0xdd1dc3,_0x3b4683(0x10d))){const _0x2bd769=_0xdd1dc3[_0x3b4683(0xd1)]('expected-children-count');if(!Number[_0x3b4683(0xd6)](_0x2bd769)||_0x2bd769<0x0)throw CliErrors[_0x3b4683(0x10b)](_0x3b4683(0xe4));if(_0x30aad7[_0x3b4683(0xec)]!==_0x2bd769)throw stateDrift('Menu\x20'+_0x30aad7['id']+_0x3b4683(0xd3)+_0x2bd769+_0x3b4683(0xd9)+_0x30aad7[_0x3b4683(0xec)]+'.');}}export function assertVerified(_0x26071a,_0x447b0a,_0x2eef4d=a125_0x1ae1ee(0xb2)){if(!_0x26071a)throw menuError('menu_verification_failed',_0x447b0a,_0x2eef4d);}export function mutationResult(_0x1f97a5){const _0x5a7828=a125_0x1ae1ee;return{'operation':_0x1f97a5['operation'],'selector':_0x1f97a5[_0x5a7828(0xa6)],'before':_0x1f97a5[_0x5a7828(0xab)],'after':_0x1f97a5[_0x5a7828(0xc7)],'dryRun':_0x1f97a5[_0x5a7828(0xa9)],'backend':_0x1f97a5['backend'],..._0x1f97a5[_0x5a7828(0xbf)]?{'plannedActions':_0x1f97a5['plannedActions']}:{},..._0x1f97a5[_0x5a7828(0xee)]?{'targets':_0x1f97a5[_0x5a7828(0xee)]}:{},..._0x1f97a5[_0x5a7828(0xc1)]?{'deleteOrder':_0x1f97a5[_0x5a7828(0xc1)]}:{},'snapshotHash':_0x1f97a5[_0x5a7828(0xd8)],..._0x1f97a5[_0x5a7828(0xc3)]?{'cascade':_0x1f97a5[_0x5a7828(0xc3)]}:{},..._0x1f97a5['planFile']?{'planFile':_0x1f97a5[_0x5a7828(0xf6)]}:{},'succeeded':_0x1f97a5[_0x5a7828(0xe6)]??[],'failed':_0x1f97a5['failed']??[],'warnings':_0x1f97a5['warnings']??[],'verification':_0x1f97a5['verification'],'error':_0x1f97a5[_0x5a7828(0xcd)]};}export function menuDryRunResult(_0x5b4ca5,_0x35de61){return{..._0x5b4ca5,..._0x35de61};}export function menuFailure(_0x59fc5b,_0x2bde72,_0x4367e5){const _0x192556=a125_0x1ae1ee,_0x271db1=mutationResult({..._0x2bde72,'after':_0x4367e5[_0x192556(0xc7)]===undefined?_0x2bde72[_0x192556(0xc7)]:_0x4367e5['after'],'backend':_0x4367e5[_0x192556(0xdd)]??_0x2bde72['backend'],'dryRun':![],'succeeded':_0x4367e5[_0x192556(0xe6)]??[],'failed':[{..._0x4367e5[_0x192556(0xae)]??{},'stage':_0x4367e5[_0x192556(0xb9)],'code':_0x59fc5b[_0x192556(0xbd)],'message':_0x59fc5b[_0x192556(0xc4)]}],'warnings':[..._0x2bde72[_0x192556(0x102)],..._0x4367e5['warnings']??[]],'verification':_0x4367e5['verification'],'error':{'code':_0x59fc5b[_0x192556(0xbd)],'message':_0x59fc5b['message'],..._0x59fc5b[_0x192556(0xb4)]?{'hint':_0x59fc5b[_0x192556(0xb4)]}:{}}});return Object[_0x192556(0xac)](_0x59fc5b,_0x192556(0xc9),{'value':_0x271db1,'enumerable':!![],'configurable':!![]}),_0x59fc5b;}export function asVerificationError(_0x229869,_0x37b593){const _0xd8bc82=a125_0x1ae1ee;if(_0x229869 instanceof CliError&&_0x229869['code']===_0xd8bc82(0xff))return _0x229869;const _0x8f7bc9=_0x229869 instanceof Error?_0x229869[_0xd8bc82(0xc4)]:String(_0x229869);return menuError('menu_verification_failed',''+_0x37b593+(_0x8f7bc9?':\x20'+_0x8f7bc9:''),_0xd8bc82(0x107));}export function describeMenuErrorCause(_0x1c6e4c,_0x14c477,_0x2ee49e){const _0x5ee102=a125_0x1ae1ee,_0x52e76b=mapMenuApiError(_0x1c6e4c,_0x14c477,_0x2ee49e);return{'causeCode':_0x52e76b[_0x5ee102(0xbd)],'causeMessage':_0x52e76b[_0x5ee102(0xc4)]};}function a125_0x3258(){const _0x209791=['\x20parent\x20changed:\x20expected\x20','num','read\x20online\x20menu\x20facts\x20before\x20','\x20child\x20count\x20changed:\x20expected\x20','rawFlags','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','isSafeInteger','root','snapshotHash',',\x20current\x20','parent-id','Exact\x20online\x20menu\x20id',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','backend','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','toLowerCase','112692OOUrKE','bool','sort','recheck\x20online\x20menu\x20facts\x20before\x20','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','475453MBPDqv','succeeded','type','menu_not_found','Sibling\x20sort\x20value\x20(non-negative\x20integer)','\x20is\x20type\x20\x22','55VhrLPk','childrenCount','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','targets','menu_sort_invalid','\x20path\x20changed:\x20expected\x20','max','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','Menu\x20','number','stringify','planFile','menu_mutation_failed','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','expect-parent-id','20aQDSRn','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','expect-path','36566QvFqVb','str','menu_verification_failed','api_error','menu_permission_denied','warnings','5135IkbRWS','filter','hasOwnProperty','menu_sort_overflow','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','menu_confirmation_required','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','folder','validation','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','expected-children-count','appCode','test','length','2070891WbFPgE','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','selector','Failed\x20to\x20','5844TsxxDu','dryRun','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','before','defineProperty','menu_state_drift','failed','1575175psENyz','8ZpRytv','parentId','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','9228IeQJFj','hint','272bRaIxp','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','cookie','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','stage','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','\x22,\x20not\x20folder.','dry-run','code','call','plannedActions','unknown','deleteOrder','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','cascade','message','2Tbsrvr','Permission\x20denied\x20while\x20attempting\x20to\x20','after','byId','data','Online\x20menu\x20state\x20changed\x20before\x20','get','hash','error','flagMissing','pre-write-recheck'];a125_0x3258=function(){return _0x209791;};return a125_0x3258();}export function hasFlag(_0x48fcd4,_0xea71c){const _0xd689ae=a125_0x1ae1ee;return Object['prototype'][_0xd689ae(0x105)][_0xd689ae(0xbe)](_0x48fcd4[_0xd689ae(0xd4)],_0xea71c)&&_0x48fcd4[_0xd689ae(0xd4)][_0xea71c]!==undefined;}export function toApiParentId(_0x595a0d){return _0x595a0d??0x0;}function a125_0x168b(_0x98b7c9,_0x4934bb){_0x98b7c9=_0x98b7c9-0xa1;const _0x325866=a125_0x3258();let _0x168bed=_0x325866[_0x98b7c9];return _0x168bed;}export function formatParent(_0x12030c){const _0xc01da5=a125_0x1ae1ee;return _0x12030c==null?_0xc01da5(0xd7):String(_0x12030c);}export function menuError(_0x2d47da,_0x55192c,_0x37168f){return new CliError(_0x2d47da,0x1,_0x55192c,_0x37168f);}export function mapMenuApiError(_0x708d11,_0x8d7ed1,_0x454a27){const _0x178b09=a125_0x1ae1ee;if(_0x708d11 instanceof CliError&&_0x708d11[_0x178b09(0xbd)]!==_0x178b09(0x100))return _0x708d11;const _0x141e17=_0x708d11 instanceof Error?_0x708d11[_0x178b09(0xc4)]:String(_0x708d11);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x178b09(0xa1)](_0x141e17))return menuError(_0x178b09(0x101),_0x178b09(0xc6)+_0x8d7ed1+(_0x454a27?'\x20menu\x20'+_0x454a27:'')+'.',_0x178b09(0xfb));return menuError(_0x178b09(0xf7),_0x178b09(0xa7)+_0x8d7ed1+(_0x454a27?'\x20menu\x20'+_0x454a27:'')+':\x20'+_0x141e17,_0x178b09(0xaa));}export function isMenuResponseLoss(_0x5908a2){const _0x4a92e0=a125_0x1ae1ee,_0x3f9abb=_0x5908a2 instanceof Error?_0x5908a2[_0x4a92e0(0xc4)]:String(_0x5908a2);if(_0x5908a2 instanceof CliError)return _0x5908a2['code']===_0x4a92e0(0x100)&&/^Request (?:failed|timeout):/i[_0x4a92e0(0xa1)](_0x3f9abb);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x4a92e0(0xa1)](_0x3f9abb);}function stateDrift(_0x4d4602){const _0x4da115=a125_0x1ae1ee;return menuError(_0x4da115(0xad),_0x4d4602,'Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x57193a,_0x476e8b){const _0x205797=a126_0x4b7e,_0x361e07=_0x57193a();while(!![]){try{const _0x28ff98=-parseInt(_0x205797(0xce))/0x1*(-parseInt(_0x205797(0xd2))/0x2)+parseInt(_0x205797(0xd5))/0x3*(-parseInt(_0x205797(0xe3))/0x4)+parseInt(_0x205797(0xe0))/0x5*(parseInt(_0x205797(0xc7))/0x6)+-parseInt(_0x205797(0xe9))/0x7+-parseInt(_0x205797(0xeb))/0x8+-parseInt(_0x205797(0xe1))/0x9+parseInt(_0x205797(0xea))/0xa*(parseInt(_0x205797(0xe4))/0xb);if(_0x28ff98===_0x476e8b)break;else _0x361e07['push'](_0x361e07['shift']());}catch(_0x599f88){_0x361e07['push'](_0x361e07['shift']());}}}(a126_0x3b3a,0x85b1d));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a126_0x32a040,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x140acd,_0xf11276){const _0x429f0e=a126_0x4b7e,_0x55367a=getEnv();logger[_0x429f0e(0xd6)](_0x429f0e(0xe2),isProduction(_0x55367a)?_0x429f0e(0xc9)+_0x140acd+')':_0x429f0e(0xec)+_0x140acd+')');const _0x5250b6=await fetchMenuSnapshot(_0x140acd,_0xf11276,{'verbose':!![]});return logger[_0x429f0e(0xd6)]('get-online-menu-list','Fetched\x20'+_0x5250b6[_0x429f0e(0xca)]+_0x429f0e(0xd1)),_0x5250b6[_0x429f0e(0xd7)][_0x429f0e(0xee)](toProcessedMenuItem);}export async function createMenu(_0x50daa3,_0x5f3ed4,_0x1f8e5c){const _0x5d6e40=a126_0x4b7e;logger[_0x5d6e40(0xd6)](_0x5d6e40(0xe8),'Creating\x20menu:\x20'+_0x1f8e5c[_0x5d6e40(0xdf)]+'\x20('+_0x1f8e5c[_0x5d6e40(0xcc)]+')');const _0x2f43f9={'appCode':_0x50daa3,'type':_0x5d6e40(0xda),'sort':0x0,'extend':{'loadScriptMode':_0x5d6e40(0xd9),'resources':_0x1f8e5c[_0x5d6e40(0xc8)]?JSON[_0x5d6e40(0xc4)](_0x1f8e5c[_0x5d6e40(0xc8)]):undefined},..._0x1f8e5c},_0x45cbdc=await createMenuRecord(_0x2f43f9,_0x5f3ed4,'Create\x20menu\x20\x22'+_0x1f8e5c[_0x5d6e40(0xdf)]+'\x22');return logger[_0x5d6e40(0xd6)](_0x5d6e40(0xe8),_0x5d6e40(0xed)+_0x1f8e5c['label']),_0x45cbdc;}function a126_0x4b7e(_0x487fa2,_0x323f0a){_0x487fa2=_0x487fa2-0xc4;const _0x3b3a37=a126_0x3b3a();let _0x4b7ec4=_0x3b3a37[_0x487fa2];return _0x4b7ec4;}async function createSingleMenu(_0x4270bf,_0x1e4d5f,_0x145d62,_0x2f96b9){const _0x2f9081=a126_0x4b7e,_0x3bff7f={'appCode':_0x4270bf,'type':_0x2f9081(0xda),'sort':0x0,'extend':{'loadScriptMode':_0x2f9081(0xd9),'resources':_0x2f96b9?JSON['stringify'](_0x2f96b9):undefined},'label':_0x145d62['label'],'path':_0x145d62[_0x2f9081(0xcc)]},_0x126092=await createMenuRecord(_0x3bff7f,_0x1e4d5f,_0x2f9081(0xcb)+_0x145d62['label']+'\x22');return logger['info']('create-menu',_0x2f9081(0xed)+_0x145d62[_0x2f9081(0xdf)]),_0x126092;}export async function createMenus(_0x154fa5,_0x25a2ff,_0x350f1a,_0x3c814f){const _0x5522de=a126_0x4b7e;logger[_0x5522de(0xd6)](_0x5522de(0xd4),_0x5522de(0xe5)+_0x350f1a[_0x5522de(0xcf)]);const _0x2b8738=await Promise['all'](_0x350f1a[_0x5522de(0xee)](_0x1e2356=>createSingleMenu(_0x154fa5,_0x25a2ff,_0x1e2356,_0x3c814f)));return logger[_0x5522de(0xd6)]('create-menus',_0x5522de(0xd3)+_0x350f1a[_0x5522de(0xcf)]),_0x2b8738;}export async function updateMenuCdnUrl(_0xa7c179,_0x38b648,_0x40907f){const _0x57592f=a126_0x4b7e;logger[_0x57592f(0xd6)](_0x57592f(0xdc),_0x57592f(0xde)+_0x40907f[_0x57592f(0xdf)]+'\x20('+_0x40907f[_0x57592f(0xcc)]+')');const _0x57b69c={'id':_0x40907f['id'],'appCode':_0xa7c179,'extend':{..._0x40907f[_0x57592f(0xe7)]??{},..._0x40907f[_0x57592f(0xd8)]?{'loadScriptMode':_0x40907f[_0x57592f(0xd8)]}:{},'resources':_0x40907f[_0x57592f(0xc8)]?JSON['stringify'](_0x40907f['resources']):undefined}},_0x282bcf=await updateMenuRecord(_0x57b69c,_0x38b648,_0x57592f(0xdd)+_0x40907f['label']+'\x22');return logger[_0x57592f(0xd6)](_0x57592f(0xdc),_0x57592f(0xc6)+_0x40907f[_0x57592f(0xdf)],undefined),_0x282bcf;}function a126_0x3b3a(){const _0x1f1acc=['label','9285xUeYxL','5952654UWldNx','get-online-menu-list','64TVwCKJ','34609256uKIXzO','Start\x20batch\x20menu\x20creation,\x20total\x20','\x20menu','extend','create-menu','7110656BgwaXQ','10zZFPPb','4904232uxpkaV','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Menu\x20created\x20successfully:\x20','map','stringify','menuGroups','Menu\x20assets\x20synced:\x20','1668srFUQT','resources','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','total','Create\x20menu\x20\x22','path','Regroup\x20','1pRNbvc','length','Delete\x20','\x20online\x20menus\x20successfully','101700WtnZpG','Batch\x20menu\x20creation\x20completed,\x20total\x20','create-menus','164163zqECwo','info','menus','loadScriptMode','import','procode','\x20menu\x20group(s)','update-menu-cdn-url','Update\x20menu\x20assets\x20\x22','Updating\x20menu\x20asset\x20links:\x20'];a126_0x3b3a=function(){return _0x1f1acc;};return a126_0x3b3a();}export async function createMenuEntity(_0x3fd3c3,_0x4ff4af,_0x3bfa14){const _0x1355c7=a126_0x4b7e;return createMenuRecord({'appCode':_0x3fd3c3,..._0x3bfa14},_0x4ff4af,_0x1355c7(0xcb)+_0x3bfa14['label']+'\x22');}export async function updateMenuEntity(_0x56933d,_0x574642,_0x4b5eb8){return updateMenuRecord({'appCode':_0x56933d,..._0x4b5eb8},_0x574642,'Update\x20menu\x20'+_0x4b5eb8['id']);}export async function batchDeleteMenuEntities(_0xcb07d3,_0x4c3512){const _0x2d269b=a126_0x4b7e;return batchDeleteMenuRecords(_0x4c3512,_0xcb07d3,_0x2d269b(0xd0)+_0x4c3512[_0x2d269b(0xcf)]+_0x2d269b(0xe6)+(_0x4c3512['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x57e91d,_0x985d6){const _0x4c9308=a126_0x4b7e;return a126_0x32a040(_0x985d6,_0x57e91d,_0x4c9308(0xcd)+_0x985d6[_0x4c9308(0xc5)][_0x4c9308(0xcf)]+_0x4c9308(0xdb));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a127_0x53fa68=a127_0x3b4e;(function(_0x579d2f,_0x401ac0){const _0x46769e=a127_0x3b4e,_0x501b69=_0x579d2f();while(!![]){try{const _0x1702ae=parseInt(_0x46769e(0x126))/0x1+parseInt(_0x46769e(0x133))/0x2+-parseInt(_0x46769e(0x130))/0x3*(parseInt(_0x46769e(0x129))/0x4)+-parseInt(_0x46769e(0x120))/0x5*(parseInt(_0x46769e(0x134))/0x6)+-parseInt(_0x46769e(0x10b))/0x7+-parseInt(_0x46769e(0x125))/0x8+parseInt(_0x46769e(0x12d))/0x9*(parseInt(_0x46769e(0x10e))/0xa);if(_0x1702ae===_0x401ac0)break;else _0x501b69['push'](_0x501b69['shift']());}catch(_0x2a7055){_0x501b69['push'](_0x501b69['shift']());}}}(a127_0x2861,0xaa4da));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a127_0x2861(){const _0x42c86f=['--params.','has','29015mtDsxv','keys','No\x20local\x20pages\x20matched\x20paths:\x20','trim','procode','2028648tCBsdj','198879BuCyiD','string','message','15524YYLcvh','path','label','setLogPath','9380673OdIGpA','hasOwn','map','807mWTgSJ','menu-sync','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','2471886arwwTE','252vxqJGk','get','\x0a\x20\x20Available\x20local\x20paths:\x20','length','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','jsUrl','CSS\x20URL\x20is\x20unreachable:\x20','JS\x20URL\x20is\x20unreachable:\x20','1667827zSzLxr','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','Invalid\x20--params\x20fields:\x20','10KHPswH','Start\x20non-interactive\x20menu\x20sync','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','push','filter','join','import','field','object','Menu\x20sync\x20completed','dryRun','info','pages','Invalid\x20--params:\x20','parse','cssUrl'];a127_0x2861=function(){return _0x42c86f;};return a127_0x2861();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a127_0x3b4e(_0x4f2d7f,_0x1cb605){_0x4f2d7f=_0x4f2d7f-0x10a;const _0x286153=a127_0x2861();let _0x3b4e44=_0x286153[_0x4f2d7f];return _0x3b4e44;}import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a127_0x53fa68(0x139),a127_0x53fa68(0x11d)]);function validateParams(_0x5c86e7){const _0x40b60a=a127_0x53fa68,_0x433165=[];return _0x5c86e7[_0x40b60a(0x139)]&&!isValidJsHttpsUrl(_0x5c86e7[_0x40b60a(0x139)])&&_0x433165[_0x40b60a(0x111)]({'field':_0x40b60a(0x139),'message':_0x40b60a(0x138)}),_0x5c86e7[_0x40b60a(0x11d)]&&!isValidCssHttpsUrl(_0x5c86e7['cssUrl'])&&_0x433165[_0x40b60a(0x111)]({'field':_0x40b60a(0x11d),'message':_0x40b60a(0x110)}),_0x433165;}export async function runMenuSyncCore(_0x25ca8d,_0x3bc994,_0xc539be=[],_0x3624f4,_0xae6cbb={}){const _0x49c62e=a127_0x53fa68,_0x251bbe=parseMenuSyncParams(_0x3624f4),_0x483760=[...new Set(_0xc539be[_0x49c62e(0x12f)](_0x3dcdbb=>_0x3dcdbb[_0x49c62e(0x123)]())[_0x49c62e(0x112)](Boolean))],_0x132329=_0x251bbe[_0x49c62e(0x139)],_0x411aac=_0x251bbe[_0x49c62e(0x11d)],_0x47ab3f=[];if(_0x132329)_0x47ab3f['push'](_0x132329);if(_0x411aac)_0x47ab3f[_0x49c62e(0x111)](_0x411aac);const _0x376ca8=validateParams(_0x251bbe);if(_0x376ca8[_0x49c62e(0x137)]>0x0){const _0x3958ce=_0x376ca8['map'](_0x1311b7=>_0x49c62e(0x11e)+_0x1311b7[_0x49c62e(0x115)]+':\x20'+_0x1311b7[_0x49c62e(0x128)])[_0x49c62e(0x113)](';\x20');throw new Error(_0x49c62e(0x11b)+_0x3958ce);}logger[_0x49c62e(0x12c)](process['cwd']()),logger['info'](_0x49c62e(0x131),_0x49c62e(0x10f),{'appCode':_0x25ca8d,'selectedCount':_0x483760[_0x49c62e(0x137)],'jsUrl':_0x132329,'cssUrl':_0x411aac});if(_0x132329){const _0x29d908=await isUrlReachable(_0x132329);if(!_0x29d908)throw new Error(_0x49c62e(0x10a)+_0x132329);}if(_0x411aac){const _0x54ee2c=await isUrlReachable(_0x411aac);if(!_0x54ee2c)throw new Error(_0x49c62e(0x13a)+_0x411aac);}const _0x1d6a38=getLocalPages();if(_0x1d6a38['length']===0x0){if(_0x483760['length']>0x0)throw new Error(_0x49c62e(0x122)+_0x483760[_0x49c62e(0x113)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0xae6cbb[_0x49c62e(0x118)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x38dda3=await getOnlineMenuList(_0x25ca8d,_0x3bc994),_0x26784c=new Set(_0x38dda3[_0x49c62e(0x12f)](_0x1f7495=>_0x1f7495[_0x49c62e(0x12a)]));let _0x48ee4b;if(_0x483760[_0x49c62e(0x137)]>0x0){const _0x319586=new Map(_0x1d6a38['map'](_0x8cb776=>[_0x8cb776[_0x49c62e(0x12a)],_0x8cb776])),_0x4e449=_0x483760[_0x49c62e(0x112)](_0x5230d6=>!_0x319586[_0x49c62e(0x11f)](_0x5230d6));if(_0x4e449['length']>0x0){const _0x46e834=_0x1d6a38[_0x49c62e(0x12f)](_0x4ac299=>_0x4ac299[_0x49c62e(0x12a)])[_0x49c62e(0x113)](',\x20');throw new Error(_0x49c62e(0x122)+_0x4e449[_0x49c62e(0x113)](',\x20')+_0x49c62e(0x136)+_0x46e834);}const _0x5bd9e3=_0x483760[_0x49c62e(0x112)](_0x533eec=>_0x26784c[_0x49c62e(0x11f)](_0x533eec));if(_0x5bd9e3[_0x49c62e(0x137)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x5bd9e3[_0x49c62e(0x113)](',\x20'));_0x48ee4b=_0x483760['map'](_0x5e6a7d=>_0x319586[_0x49c62e(0x135)](_0x5e6a7d));}else _0x48ee4b=_0x1d6a38['filter'](_0x5c7747=>!_0x26784c[_0x49c62e(0x11f)](_0x5c7747[_0x49c62e(0x12a)]));if(_0x48ee4b[_0x49c62e(0x137)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0xae6cbb[_0x49c62e(0x118)]===!![],'targetPages':[],'plannedMenus':[]};const _0x10b85d=_0x48ee4b[_0x49c62e(0x12f)](_0x8cdf16=>({'type':_0x49c62e(0x124),'path':_0x8cdf16[_0x49c62e(0x12a)],'label':_0x8cdf16[_0x49c62e(0x12b)],'loadScriptMode':_0x49c62e(0x114),'resources':[..._0x47ab3f]}));if(_0xae6cbb[_0x49c62e(0x118)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x48ee4b,'plannedMenus':_0x10b85d};const _0x357518=await createMenus(_0x25ca8d,_0x3bc994,_0x48ee4b,_0x47ab3f['length']>0x0?_0x47ab3f:undefined);return logger[_0x49c62e(0x119)]('menu-sync',_0x49c62e(0x117),{'count':_0x48ee4b[_0x49c62e(0x137)],'resources':_0x47ab3f}),{'created':_0x357518[_0x49c62e(0x137)],'skipped':![],'dryRun':![],'targetPages':_0x48ee4b,'plannedMenus':_0x10b85d,'menus':_0x357518};}export function parseMenuSyncParams(_0x416613){const _0x11756c=a127_0x53fa68;if(!_0x416613||typeof _0x416613!=='string')return{};let _0x17d9e0;try{_0x17d9e0=JSON[_0x11756c(0x11c)](_0x416613);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x17d9e0!==_0x11756c(0x116)||_0x17d9e0===null||Array['isArray'](_0x17d9e0))throw new Error(_0x11756c(0x10c));const _0x508df3=_0x17d9e0;if(Object[_0x11756c(0x12e)](_0x508df3,_0x11756c(0x11a)))throw new Error(_0x11756c(0x132));const _0x39ac67=Object[_0x11756c(0x121)](_0x508df3)['filter'](_0x17aab3=>!MENU_SYNC_PARAM_KEYS[_0x11756c(0x11f)](_0x17aab3));if(_0x39ac67[_0x11756c(0x137)]>0x0)throw new Error(_0x11756c(0x10d)+_0x39ac67[_0x11756c(0x113)](',\x20')+'.');for(const _0x16bd10 of MENU_SYNC_PARAM_KEYS){const _0x3b3a1a=_0x508df3[_0x16bd10];if(_0x3b3a1a!==undefined&&(typeof _0x3b3a1a!==_0x11756c(0x127)||_0x3b3a1a['trim']()===''))throw new Error('Invalid\x20--params.'+_0x16bd10+':\x20expected\x20a\x20non-empty\x20string.');}return{'jsUrl':typeof _0x508df3[_0x11756c(0x139)]===_0x11756c(0x127)?_0x508df3['jsUrl'][_0x11756c(0x123)]():undefined,'cssUrl':typeof _0x508df3[_0x11756c(0x11d)]==='string'?_0x508df3[_0x11756c(0x11d)]['trim']():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x153f60,_0x5ded08){const _0x46a9f3=a129_0x1b69,_0x19fa25=_0x153f60();while(!![]){try{const _0x3db1a0=parseInt(_0x46a9f3(0x201))/0x1*(-parseInt(_0x46a9f3(0x1ea))/0x2)+-parseInt(_0x46a9f3(0x21b))/0x3*(-parseInt(_0x46a9f3(0x1e7))/0x4)+parseInt(_0x46a9f3(0x216))/0x5*(parseInt(_0x46a9f3(0x1eb))/0x6)+parseInt(_0x46a9f3(0x214))/0x7*(parseInt(_0x46a9f3(0x1e2))/0x8)+parseInt(_0x46a9f3(0x212))/0x9*(-parseInt(_0x46a9f3(0x20b))/0xa)+parseInt(_0x46a9f3(0x203))/0xb+-parseInt(_0x46a9f3(0x211))/0xc;if(_0x3db1a0===_0x5ded08)break;else _0x19fa25['push'](_0x19fa25['shift']());}catch(_0x23259f){_0x19fa25['push'](_0x19fa25['shift']());}}}(a129_0x2fda,0xb7b45));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(_0x19605c){const _0x5b564e=a129_0x1b69,_0x2f4207=[];return _0x19605c['jsUrl']&&!isValidJsHttpsUrl(_0x19605c[_0x5b564e(0x228)])&&_0x2f4207[_0x5b564e(0x20d)]({'field':'jsUrl','message':_0x5b564e(0x220)}),_0x19605c['cssUrl']&&!isValidCssHttpsUrl(_0x19605c[_0x5b564e(0x20e)])&&_0x2f4207[_0x5b564e(0x20d)]({'field':'cssUrl','message':_0x5b564e(0x1ec)}),_0x2f4207;}export async function runMenuUpdateCore(_0x316867,_0x3820e1,_0x1ef8d3,_0x1bf7c3={}){const _0x4d81a0=a129_0x1b69,_0x29c2af=parseUpdateParamsFlag(_0x1ef8d3),_0x3701d1=normalizeMode(_0x1bf7c3[_0x4d81a0(0x1e4)]);validateSelection(_0x1bf7c3[_0x4d81a0(0x222)]);const _0x5befc8=[];if(_0x29c2af[_0x4d81a0(0x228)])_0x5befc8[_0x4d81a0(0x20d)](_0x29c2af[_0x4d81a0(0x228)]);if(_0x29c2af[_0x4d81a0(0x20e)])_0x5befc8[_0x4d81a0(0x20d)](_0x29c2af[_0x4d81a0(0x20e)]);const _0x20ee1b=validateParams(_0x29c2af);if(_0x20ee1b[_0x4d81a0(0x1f6)]>0x0){const _0x3dafb2=_0x20ee1b[_0x4d81a0(0x1f5)](_0x5f04e3=>_0x4d81a0(0x21e)+_0x5f04e3[_0x4d81a0(0x226)]+':\x20'+_0x5f04e3[_0x4d81a0(0x209)])['join'](';\x20');throw new Error(_0x4d81a0(0x21a)+_0x3dafb2);}if(_0x5befc8['length']===0x0)throw new Error(_0x4d81a0(0x227)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x4d81a0(0x217)](process[_0x4d81a0(0x1f9)]()),logger['info'](_0x4d81a0(0x1e6),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x316867,'jsUrl':_0x29c2af['jsUrl'],'cssUrl':_0x29c2af[_0x4d81a0(0x20e)],'mode':_0x3701d1,'dryRun':_0x1bf7c3[_0x4d81a0(0x206)]===!![]});if(_0x29c2af[_0x4d81a0(0x228)]){const _0x482e39=await isUrlReachable(_0x29c2af[_0x4d81a0(0x228)]);if(!_0x482e39)throw new Error(_0x4d81a0(0x1e3)+_0x29c2af[_0x4d81a0(0x228)]);}if(_0x29c2af[_0x4d81a0(0x20e)]){const _0x545be4=await isUrlReachable(_0x29c2af[_0x4d81a0(0x20e)]);if(!_0x545be4)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x29c2af[_0x4d81a0(0x20e)]);}const _0xc98e24=await getOnlineMenuList(_0x316867,_0x3820e1),_0x3e604e=_0xc98e24[_0x4d81a0(0x1f3)](_0x28d35e=>_0x28d35e['resources'][_0x4d81a0(0x1f6)]>0x0),_0x34ff2c=selectMenusForUpdate(_0x3e604e,_0x1bf7c3[_0x4d81a0(0x222)]);if(_0x34ff2c[_0x4d81a0(0x1f6)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1bf7c3[_0x4d81a0(0x206)]===!![]};const _0x3bbf8b=_0x34ff2c[_0x4d81a0(0x1f5)](_0x7d1167=>buildMenuUpdateDiff(_0x7d1167,_0x29c2af,_0x3701d1,_0x1bf7c3[_0x4d81a0(0x207)]===!![],_0x1bf7c3[_0x4d81a0(0x218)]));if(_0x1bf7c3[_0x4d81a0(0x206)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x3bbf8b};const _0x5e38cd=await Promise[_0x4d81a0(0x1f4)](_0x34ff2c[_0x4d81a0(0x1f5)]((_0x182567,_0x1e5aba)=>updateMenuCdnUrl(_0x316867,_0x3820e1,{'id':_0x182567['id'],'label':_0x182567['label'],'path':_0x182567[_0x4d81a0(0x215)],'resources':_0x3bbf8b[_0x1e5aba][_0x4d81a0(0x202)][_0x4d81a0(0x221)],'extend':_0x182567[_0x4d81a0(0x204)]??null,'loadScriptMode':_0x1bf7c3[_0x4d81a0(0x218)]}))),_0x833cb3=_0x5e38cd[_0x4d81a0(0x1f3)](_0x59afd1=>_0x59afd1[_0x4d81a0(0x200)]===_0x4d81a0(0x1f8))[_0x4d81a0(0x1f5)](_0x1862c3=>_0x1862c3[_0x4d81a0(0x1fe)]),_0x57a61b=_0x5e38cd[_0x4d81a0(0x1f3)](_0xac2060=>_0xac2060[_0x4d81a0(0x200)]===_0x4d81a0(0x213))[_0x4d81a0(0x1f6)];return logger[_0x4d81a0(0x210)]('menu-asset-update',_0x4d81a0(0x1e5),{'count':_0x34ff2c[_0x4d81a0(0x1f6)],'resources':_0x5befc8}),{'updated':_0x833cb3['length'],'failed':_0x57a61b,'skipped':![],'menus':_0x833cb3};}function validateSelection(_0x2abacd){const _0x25e1cf=a129_0x1b69;if(!_0x2abacd)throw new Error(_0x25e1cf(0x1f2));if(_0x2abacd['all']&&(_0x2abacd[_0x25e1cf(0x225)]['length']>0x0||_0x2abacd[_0x25e1cf(0x21d)][_0x25e1cf(0x1f6)]>0x0))throw new Error(_0x25e1cf(0x1ef));if(!_0x2abacd[_0x25e1cf(0x223)]&&_0x2abacd[_0x25e1cf(0x225)][_0x25e1cf(0x1f6)]===0x0&&_0x2abacd[_0x25e1cf(0x21d)][_0x25e1cf(0x1f6)]===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}function a129_0x1b69(_0x234f04,_0x3a6f69){_0x234f04=_0x234f04-0x1e2;const _0x2fda16=a129_0x2fda();let _0x1b69d5=_0x2fda16[_0x234f04];return _0x1b69d5;}export function selectMenusForUpdate(_0x1f1ac8,_0x1121c6){const _0x482aaa=a129_0x1b69;validateSelection(_0x1121c6);if(_0x1121c6[_0x482aaa(0x223)])return _0x1f1ac8;const _0x7335f0=new Set(_0x1f1ac8[_0x482aaa(0x1f5)](_0x5cfceb=>_0x5cfceb['id'])),_0x2ddbad=new Set(_0x1f1ac8[_0x482aaa(0x1f5)](_0x2e364a=>_0x2e364a[_0x482aaa(0x215)])),_0x18267c=_0x1121c6[_0x482aaa(0x225)]['filter'](_0x3bed33=>!_0x7335f0['has'](_0x3bed33)),_0x87d715=_0x1121c6[_0x482aaa(0x21d)][_0x482aaa(0x1f3)](_0x3b45ca=>!_0x2ddbad['has'](_0x3b45ca));if(_0x18267c[_0x482aaa(0x1f6)]>0x0||_0x87d715[_0x482aaa(0x1f6)]>0x0){const _0x445158=[..._0x18267c['map'](_0xdb835d=>String(_0xdb835d)),..._0x87d715][_0x482aaa(0x205)](',\x20');throw new Error(_0x482aaa(0x1ee)+_0x445158);}const _0x52e798=new Set(_0x1121c6[_0x482aaa(0x225)]),_0x31ef9b=new Set(_0x1121c6[_0x482aaa(0x21d)]);return _0x1f1ac8['filter'](_0x1abee7=>_0x52e798[_0x482aaa(0x21f)](_0x1abee7['id'])||_0x31ef9b[_0x482aaa(0x21f)](_0x1abee7[_0x482aaa(0x215)]));}function normalizeMode(_0x50a26a){const _0x305f41=a129_0x1b69;if(!_0x50a26a)return _0x305f41(0x1e8);if(_0x50a26a===_0x305f41(0x1ed)||_0x50a26a===_0x305f41(0x1e8))return _0x50a26a;throw new Error('Invalid\x20--mode:\x20'+_0x50a26a+_0x305f41(0x229));}function buildMenuUpdateDiff(_0x2daf6b,_0x2d0fca,_0x27c836,_0x2ee427,_0x551ff5){const _0x287d3e=a129_0x1b69,_0x56401b=[..._0x2daf6b['resources']];_0x27c836==='patch'&&assertUnambiguousPatchResources(_0x2daf6b,_0x56401b,_0x2d0fca);const _0x4cd0e7=_0x27c836==='patch'?patchResources(_0x56401b,_0x2d0fca):replaceResources(_0x2d0fca),_0x199a67=[],_0x1aeeb9=_0x56401b[_0x287d3e(0x1fa)](isJsResource),_0x38db3b=_0x4cd0e7[_0x287d3e(0x1fa)](isJsResource);if(_0x1aeeb9&&!_0x38db3b){const _0x199b32=_0x287d3e(0x20a)+_0x2daf6b['label']+'\x22\x20('+_0x2daf6b[_0x287d3e(0x215)]+_0x287d3e(0x1f7)+_0x287d3e(0x224);if(!_0x2ee427)throw new Error(_0x199b32);_0x199a67['push'](_0x199b32);}const _0x5c9605=_0x56401b[_0x287d3e(0x1fa)](isCssResource),_0x267315=_0x4cd0e7[_0x287d3e(0x1fa)](isCssResource);_0x5c9605&&!_0x267315&&_0x199a67[_0x287d3e(0x20d)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x2daf6b[_0x287d3e(0x1ff)]+_0x287d3e(0x1fc)+_0x2daf6b[_0x287d3e(0x215)]+').');const _0xc50e31=typeof _0x2daf6b[_0x287d3e(0x204)]?.[_0x287d3e(0x218)]==='string'?_0x2daf6b['extend'][_0x287d3e(0x218)]:null,_0x51a42e=_0x551ff5?{'loadScriptMode':_0xc50e31}:{},_0x4faa47=_0x551ff5?{'loadScriptMode':_0x551ff5}:{};return{'id':_0x2daf6b['id'],'label':_0x2daf6b[_0x287d3e(0x1ff)],'path':_0x2daf6b['path'],'mode':_0x27c836,'before':{'resources':_0x56401b,..._0x51a42e},'after':{'resources':_0x4cd0e7,..._0x4faa47},'warnings':_0x199a67};}function replaceResources(_0x55283e){const _0x228559=a129_0x1b69;return[_0x55283e[_0x228559(0x228)],_0x55283e['cssUrl']][_0x228559(0x1f3)](_0x1b73f6=>!!_0x1b73f6);}function assertUnambiguousPatchResources(_0x16eef1,_0x59166c,_0x1b7864){const _0x260388=a129_0x1b69,_0x45083f=_0x59166c['filter'](isJsResource)['length'];if(_0x1b7864[_0x260388(0x228)]&&_0x45083f>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x45083f+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x16eef1[_0x260388(0x1ff)]+_0x260388(0x1fc)+_0x16eef1[_0x260388(0x215)]+')\x20'+_0x260388(0x1f0));const _0x1ba4ab=_0x59166c[_0x260388(0x1f3)](isCssResource)[_0x260388(0x1f6)];if(_0x1b7864[_0x260388(0x20e)]&&_0x1ba4ab>0x1)throw new Error(_0x260388(0x21c)+_0x1ba4ab+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x16eef1[_0x260388(0x1ff)]+_0x260388(0x1fc)+_0x16eef1['path']+')\x20'+'with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');}function a129_0x2fda(){const _0x24c30f=['all','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','menuIds','field','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','jsUrl','.\x20Allowed\x20values:\x20replace,\x20patch','1248faeMJL','JS\x20URL\x20is\x20unreachable:\x20','mode','Menu\x20asset\x20update\x20completed','menu-asset-update','4vKFMzj','patch','.css','1826456GhqBFs','7122xROcjR','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','replace','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','trim','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','filter','allSettled','map','length',').\x20','fulfilled','cwd','some','toLowerCase','\x22\x20(','isArray','value','label','status','1jaGcSY','after','12168332HDgpdp','extend','join','dryRun','force','unshift','message','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','15700yIPAim','endsWith','push','cssUrl','parse','info','8399736DpxuXo','1062LlCZvK','rejected','50281sgolHK','path','515dyjmGa','setLogPath','loadScriptMode','string','Invalid\x20--params:\x20','605694UKIOCx','menu\x20asset-update\x20cannot\x20patch\x20','paths','--params.','has','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','resources','selection'];a129_0x2fda=function(){return _0x24c30f;};return a129_0x2fda();}function patchResources(_0x1a80b6,_0x34fd71){const _0x250095=a129_0x1b69;let _0x165aec=![],_0x137007=![];const _0xe51f46=[];for(const _0x2686f3 of _0x1a80b6){if(isJsResource(_0x2686f3)){if(_0x34fd71['jsUrl']&&!_0x165aec)_0xe51f46[_0x250095(0x20d)](_0x34fd71[_0x250095(0x228)]),_0x165aec=!![];else!_0x34fd71[_0x250095(0x228)]&&_0xe51f46[_0x250095(0x20d)](_0x2686f3);continue;}if(isCssResource(_0x2686f3)){if(_0x34fd71[_0x250095(0x20e)]&&!_0x137007)_0xe51f46[_0x250095(0x20d)](_0x34fd71[_0x250095(0x20e)]),_0x137007=!![];else!_0x34fd71[_0x250095(0x20e)]&&_0xe51f46[_0x250095(0x20d)](_0x2686f3);continue;}_0xe51f46['push'](_0x2686f3);}return _0x34fd71['jsUrl']&&!_0x165aec&&_0xe51f46[_0x250095(0x208)](_0x34fd71['jsUrl']),_0x34fd71[_0x250095(0x20e)]&&!_0x137007&&_0xe51f46[_0x250095(0x20d)](_0x34fd71[_0x250095(0x20e)]),_0xe51f46;}function isJsResource(_0x129e9b){const _0x23b080=a129_0x1b69;return stripQuery(_0x129e9b)['toLowerCase']()[_0x23b080(0x20c)]('.js');}function isCssResource(_0x2a36c7){const _0x2eda92=a129_0x1b69;return stripQuery(_0x2a36c7)[_0x2eda92(0x1fb)]()['endsWith'](_0x2eda92(0x1e9));}function stripQuery(_0xb60ff9){return _0xb60ff9['split']('?')[0x0]??_0xb60ff9;}function parseUpdateParamsFlag(_0x11a795){const _0x27e6df=a129_0x1b69;if(!_0x11a795||typeof _0x11a795!=='string')return{};try{const _0x1ee087=JSON[_0x27e6df(0x20f)](_0x11a795);if(typeof _0x1ee087!=='object'||_0x1ee087===null||Array[_0x27e6df(0x1fd)](_0x1ee087))return{};return{'jsUrl':typeof _0x1ee087[_0x27e6df(0x228)]===_0x27e6df(0x219)?_0x1ee087['jsUrl'][_0x27e6df(0x1f1)]():undefined,'cssUrl':typeof _0x1ee087[_0x27e6df(0x20e)]===_0x27e6df(0x219)?_0x1ee087[_0x27e6df(0x20e)][_0x27e6df(0x1f1)]():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x3dd5c9,_0x3afe9b){const _0x1baa3d=a129_0x581b,_0x1fcab7=_0x3dd5c9();while(!![]){try{const _0x970b31=parseInt(_0x1baa3d(0x146))/0x1+-parseInt(_0x1baa3d(0x12a))/0x2+-parseInt(_0x1baa3d(0x125))/0x3+parseInt(_0x1baa3d(0x11e))/0x4+-parseInt(_0x1baa3d(0x145))/0x5+-parseInt(_0x1baa3d(0x118))/0x6+parseInt(_0x1baa3d(0x11f))/0x7;if(_0x970b31===_0x3afe9b)break;else _0x1fcab7['push'](_0x1fcab7['shift']());}catch(_0x33fc69){_0x1fcab7['push'](_0x1fcab7['shift']());}}}(a129_0x3f60,0xee33e));function a129_0x3f60(){const _0x489eb8=['force','path','setLogPath','Start\x20non-interactive\x20menu\x20asset\x20update','object','push','paths','some','cwd','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','has','extend','unshift','status','join','\x20existing\x20CSS\x20resources\x20for\x20\x22','Invalid\x20--mode:\x20','dryRun','3586554lVkMyJ','map','filter','replace','isArray','toLowerCase','7000236pbIAjg','8590302krgzkZ','field','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','menu-asset-update','cssUrl','\x22\x20(','5518380QbfyFV','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','resources','trim','value','1239280vmutZW','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','JS\x20URL\x20is\x20unreachable:\x20','loadScriptMode','all','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','rejected','.css','selection','fulfilled','patch','CSS\x20URL\x20is\x20unreachable:\x20','label','--params.','endsWith','menu\x20asset-update\x20cannot\x20patch\x20','Menu\x20asset\x20update\x20completed','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','mode','after','menuIds','info','string','length','.\x20Allowed\x20values:\x20replace,\x20patch','message','jsUrl','4467390erltzB','1948770pNPtST',').\x20'];a129_0x3f60=function(){return _0x489eb8;};return a129_0x3f60();}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a129_0x581b(_0x19b6d9,_0x5d57b3){_0x19b6d9=_0x19b6d9-0x107;const _0x3f60cd=a129_0x3f60();let _0x581b91=_0x3f60cd[_0x19b6d9];return _0x581b91;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x547955){const _0x2be7d6=a129_0x581b,_0x140c75=[];return _0x547955['jsUrl']&&!isValidJsHttpsUrl(_0x547955[_0x2be7d6(0x144)])&&_0x140c75['push']({'field':_0x2be7d6(0x144),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x547955[_0x2be7d6(0x123)]&&!isValidCssHttpsUrl(_0x547955[_0x2be7d6(0x123)])&&_0x140c75[_0x2be7d6(0x10a)]({'field':_0x2be7d6(0x123),'message':_0x2be7d6(0x10f)}),_0x140c75;}export async function runMenuUpdateCore(_0x1369ab,_0x1bf47d,_0x34ef14,_0x3a20d5={}){const _0x3f00a6=a129_0x581b,_0x21a8d2=parseUpdateParamsFlag(_0x34ef14),_0x2f2617=normalizeMode(_0x3a20d5[_0x3f00a6(0x13c)]);validateSelection(_0x3a20d5[_0x3f00a6(0x132)]);const _0x1e117f=[];if(_0x21a8d2[_0x3f00a6(0x144)])_0x1e117f[_0x3f00a6(0x10a)](_0x21a8d2[_0x3f00a6(0x144)]);if(_0x21a8d2[_0x3f00a6(0x123)])_0x1e117f[_0x3f00a6(0x10a)](_0x21a8d2[_0x3f00a6(0x123)]);const _0x224ea5=validateParams(_0x21a8d2);if(_0x224ea5['length']>0x0){const _0x56ef67=_0x224ea5[_0x3f00a6(0x119)](_0x2f6854=>_0x3f00a6(0x137)+_0x2f6854[_0x3f00a6(0x120)]+':\x20'+_0x2f6854[_0x3f00a6(0x143)])['join'](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x56ef67);}if(_0x1e117f[_0x3f00a6(0x141)]===0x0)throw new Error(_0x3f00a6(0x12b)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x3f00a6(0x107)](process[_0x3f00a6(0x10d)]()),logger[_0x3f00a6(0x13f)]('menu-asset-update',_0x3f00a6(0x108),{'appCode':_0x1369ab,'jsUrl':_0x21a8d2[_0x3f00a6(0x144)],'cssUrl':_0x21a8d2[_0x3f00a6(0x123)],'mode':_0x2f2617,'dryRun':_0x3a20d5['dryRun']===!![]});if(_0x21a8d2['jsUrl']){const _0x3341fe=await isUrlReachable(_0x21a8d2[_0x3f00a6(0x144)]);if(!_0x3341fe)throw new Error(_0x3f00a6(0x12c)+_0x21a8d2[_0x3f00a6(0x144)]);}if(_0x21a8d2[_0x3f00a6(0x123)]){const _0xc23dce=await isUrlReachable(_0x21a8d2[_0x3f00a6(0x123)]);if(!_0xc23dce)throw new Error(_0x3f00a6(0x135)+_0x21a8d2['cssUrl']);}const _0x3678ea=await getOnlineMenuList(_0x1369ab,_0x1bf47d),_0x385b0d=_0x3678ea[_0x3f00a6(0x11a)](_0x403841=>_0x403841[_0x3f00a6(0x127)][_0x3f00a6(0x141)]>0x0),_0x56cb06=selectMenusForUpdate(_0x385b0d,_0x3a20d5[_0x3f00a6(0x132)]);if(_0x56cb06[_0x3f00a6(0x141)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x3a20d5[_0x3f00a6(0x117)]===!![]};const _0x41c225=_0x56cb06[_0x3f00a6(0x119)](_0x3c736c=>buildMenuUpdateDiff(_0x3c736c,_0x21a8d2,_0x2f2617,_0x3a20d5[_0x3f00a6(0x148)]===!![],_0x3a20d5['loadScriptMode']));if(_0x3a20d5[_0x3f00a6(0x117)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x41c225};const _0x5cc603=await Promise['allSettled'](_0x56cb06[_0x3f00a6(0x119)]((_0x3064d0,_0x498f83)=>updateMenuCdnUrl(_0x1369ab,_0x1bf47d,{'id':_0x3064d0['id'],'label':_0x3064d0['label'],'path':_0x3064d0[_0x3f00a6(0x149)],'resources':_0x41c225[_0x498f83][_0x3f00a6(0x13d)][_0x3f00a6(0x127)],'extend':_0x3064d0[_0x3f00a6(0x111)]??null,'loadScriptMode':_0x3a20d5[_0x3f00a6(0x12d)]}))),_0x2699e4=_0x5cc603[_0x3f00a6(0x11a)](_0x36eb21=>_0x36eb21[_0x3f00a6(0x113)]===_0x3f00a6(0x133))['map'](_0xef2128=>_0xef2128[_0x3f00a6(0x129)]),_0x25c447=_0x5cc603[_0x3f00a6(0x11a)](_0x1c272a=>_0x1c272a[_0x3f00a6(0x113)]===_0x3f00a6(0x130))[_0x3f00a6(0x141)];return logger[_0x3f00a6(0x13f)](_0x3f00a6(0x122),_0x3f00a6(0x13a),{'count':_0x56cb06[_0x3f00a6(0x141)],'resources':_0x1e117f}),{'updated':_0x2699e4['length'],'failed':_0x25c447,'skipped':![],'menus':_0x2699e4};}function validateSelection(_0x5149a3){const _0xb2b804=a129_0x581b;if(!_0x5149a3)throw new Error(_0xb2b804(0x10e));if(_0x5149a3[_0xb2b804(0x12e)]&&(_0x5149a3[_0xb2b804(0x13e)][_0xb2b804(0x141)]>0x0||_0x5149a3[_0xb2b804(0x10b)]['length']>0x0))throw new Error(_0xb2b804(0x121));if(!_0x5149a3[_0xb2b804(0x12e)]&&_0x5149a3['menuIds'][_0xb2b804(0x141)]===0x0&&_0x5149a3[_0xb2b804(0x10b)][_0xb2b804(0x141)]===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0x35c235,_0x5ea278){const _0x35b2c8=a129_0x581b;validateSelection(_0x5ea278);if(_0x5ea278[_0x35b2c8(0x12e)])return _0x35c235;const _0x33ac48=new Set(_0x35c235[_0x35b2c8(0x119)](_0x5eba04=>_0x5eba04['id'])),_0x2e0d57=new Set(_0x35c235[_0x35b2c8(0x119)](_0x8adebc=>_0x8adebc[_0x35b2c8(0x149)])),_0x35d10c=_0x5ea278[_0x35b2c8(0x13e)][_0x35b2c8(0x11a)](_0x51f4b2=>!_0x33ac48[_0x35b2c8(0x110)](_0x51f4b2)),_0x1cac55=_0x5ea278[_0x35b2c8(0x10b)][_0x35b2c8(0x11a)](_0x261706=>!_0x2e0d57[_0x35b2c8(0x110)](_0x261706));if(_0x35d10c[_0x35b2c8(0x141)]>0x0||_0x1cac55[_0x35b2c8(0x141)]>0x0){const _0x35f9d3=[..._0x35d10c[_0x35b2c8(0x119)](_0xdc99d=>String(_0xdc99d)),..._0x1cac55][_0x35b2c8(0x114)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x35f9d3);}const _0x4ffe92=new Set(_0x5ea278[_0x35b2c8(0x13e)]),_0x57c81b=new Set(_0x5ea278['paths']);return _0x35c235[_0x35b2c8(0x11a)](_0x598194=>_0x4ffe92[_0x35b2c8(0x110)](_0x598194['id'])||_0x57c81b[_0x35b2c8(0x110)](_0x598194[_0x35b2c8(0x149)]));}function normalizeMode(_0x5c178f){const _0x107fe4=a129_0x581b;if(!_0x5c178f)return _0x107fe4(0x134);if(_0x5c178f===_0x107fe4(0x11b)||_0x5c178f===_0x107fe4(0x134))return _0x5c178f;throw new Error(_0x107fe4(0x116)+_0x5c178f+_0x107fe4(0x142));}function buildMenuUpdateDiff(_0x5c068d,_0x96a5f8,_0x48576d,_0x47ceba,_0x38dbac){const _0x2d50ec=a129_0x581b,_0x38f9e8=[..._0x5c068d[_0x2d50ec(0x127)]];_0x48576d===_0x2d50ec(0x134)&&assertUnambiguousPatchResources(_0x5c068d,_0x38f9e8,_0x96a5f8);const _0x4f014b=_0x48576d===_0x2d50ec(0x134)?patchResources(_0x38f9e8,_0x96a5f8):replaceResources(_0x96a5f8),_0x5ed6a2=[],_0xb51ea2=_0x38f9e8['some'](isJsResource),_0x1b16f8=_0x4f014b['some'](isJsResource);if(_0xb51ea2&&!_0x1b16f8){const _0x528e25='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x5c068d[_0x2d50ec(0x136)]+_0x2d50ec(0x124)+_0x5c068d[_0x2d50ec(0x149)]+_0x2d50ec(0x147)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x47ceba)throw new Error(_0x528e25);_0x5ed6a2[_0x2d50ec(0x10a)](_0x528e25);}const _0x3cc1f1=_0x38f9e8[_0x2d50ec(0x10c)](isCssResource),_0x226ee1=_0x4f014b[_0x2d50ec(0x10c)](isCssResource);_0x3cc1f1&&!_0x226ee1&&_0x5ed6a2['push'](_0x2d50ec(0x126)+_0x5c068d[_0x2d50ec(0x136)]+_0x2d50ec(0x124)+_0x5c068d[_0x2d50ec(0x149)]+').');const _0x5550b8=typeof _0x5c068d['extend']?.[_0x2d50ec(0x12d)]===_0x2d50ec(0x140)?_0x5c068d[_0x2d50ec(0x111)][_0x2d50ec(0x12d)]:null,_0x1fc74e=_0x38dbac?{'loadScriptMode':_0x5550b8}:{},_0x436704=_0x38dbac?{'loadScriptMode':_0x38dbac}:{};return{'id':_0x5c068d['id'],'label':_0x5c068d['label'],'path':_0x5c068d[_0x2d50ec(0x149)],'mode':_0x48576d,'before':{'resources':_0x38f9e8,..._0x1fc74e},'after':{'resources':_0x4f014b,..._0x436704},'warnings':_0x5ed6a2};}function replaceResources(_0xca84d6){const _0x225ad9=a129_0x581b;return[_0xca84d6[_0x225ad9(0x144)],_0xca84d6[_0x225ad9(0x123)]][_0x225ad9(0x11a)](_0x249d01=>!!_0x249d01);}function assertUnambiguousPatchResources(_0x37c4bd,_0x5b6e65,_0x2773b5){const _0x4516fc=a129_0x581b,_0x5b42d3=_0x5b6e65[_0x4516fc(0x11a)](isJsResource)[_0x4516fc(0x141)];if(_0x2773b5['jsUrl']&&_0x5b42d3>0x1)throw new Error(_0x4516fc(0x139)+_0x5b42d3+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x37c4bd[_0x4516fc(0x136)]+_0x4516fc(0x124)+_0x37c4bd[_0x4516fc(0x149)]+')\x20'+_0x4516fc(0x13b));const _0x2e1762=_0x5b6e65[_0x4516fc(0x11a)](isCssResource)[_0x4516fc(0x141)];if(_0x2773b5[_0x4516fc(0x123)]&&_0x2e1762>0x1)throw new Error(_0x4516fc(0x139)+_0x2e1762+_0x4516fc(0x115)+_0x37c4bd[_0x4516fc(0x136)]+_0x4516fc(0x124)+_0x37c4bd['path']+')\x20'+_0x4516fc(0x12f));}function patchResources(_0x53e3f3,_0x3fdff8){const _0xb63a33=a129_0x581b;let _0x7947f4=![],_0x54e9b4=![];const _0x23c3b0=[];for(const _0x578429 of _0x53e3f3){if(isJsResource(_0x578429)){if(_0x3fdff8[_0xb63a33(0x144)]&&!_0x7947f4)_0x23c3b0[_0xb63a33(0x10a)](_0x3fdff8[_0xb63a33(0x144)]),_0x7947f4=!![];else!_0x3fdff8[_0xb63a33(0x144)]&&_0x23c3b0[_0xb63a33(0x10a)](_0x578429);continue;}if(isCssResource(_0x578429)){if(_0x3fdff8[_0xb63a33(0x123)]&&!_0x54e9b4)_0x23c3b0[_0xb63a33(0x10a)](_0x3fdff8['cssUrl']),_0x54e9b4=!![];else!_0x3fdff8[_0xb63a33(0x123)]&&_0x23c3b0['push'](_0x578429);continue;}_0x23c3b0[_0xb63a33(0x10a)](_0x578429);}return _0x3fdff8[_0xb63a33(0x144)]&&!_0x7947f4&&_0x23c3b0[_0xb63a33(0x112)](_0x3fdff8[_0xb63a33(0x144)]),_0x3fdff8['cssUrl']&&!_0x54e9b4&&_0x23c3b0['push'](_0x3fdff8['cssUrl']),_0x23c3b0;}function isJsResource(_0x144101){const _0x4cebb7=a129_0x581b;return stripQuery(_0x144101)['toLowerCase']()[_0x4cebb7(0x138)]('.js');}function isCssResource(_0x13c178){const _0x5110a6=a129_0x581b;return stripQuery(_0x13c178)[_0x5110a6(0x11d)]()[_0x5110a6(0x138)](_0x5110a6(0x131));}function stripQuery(_0x381bff){return _0x381bff['split']('?')[0x0]??_0x381bff;}function parseUpdateParamsFlag(_0x38a2ed){const _0x1f1e56=a129_0x581b;if(!_0x38a2ed||typeof _0x38a2ed!==_0x1f1e56(0x140))return{};try{const _0x11a370=JSON['parse'](_0x38a2ed);if(typeof _0x11a370!==_0x1f1e56(0x109)||_0x11a370===null||Array[_0x1f1e56(0x11c)](_0x11a370))return{};return{'jsUrl':typeof _0x11a370[_0x1f1e56(0x144)]==='string'?_0x11a370[_0x1f1e56(0x144)][_0x1f1e56(0x128)]():undefined,'cssUrl':typeof _0x11a370[_0x1f1e56(0x123)]===_0x1f1e56(0x140)?_0x11a370['cssUrl'][_0x1f1e56(0x128)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2581f9,_0x5efbab){const _0x1733d2=a130_0x2b97,_0x4fd1a2=_0x2581f9();while(!![]){try{const _0x1eec45=-parseInt(_0x1733d2(0x15d))/0x1*(-parseInt(_0x1733d2(0x158))/0x2)+parseInt(_0x1733d2(0x15a))/0x3*(parseInt(_0x1733d2(0x156))/0x4)+-parseInt(_0x1733d2(0x150))/0x5*(parseInt(_0x1733d2(0x159))/0x6)+parseInt(_0x1733d2(0x154))/0x7+parseInt(_0x1733d2(0x157))/0x8*(-parseInt(_0x1733d2(0x151))/0x9)+-parseInt(_0x1733d2(0x155))/0xa+parseInt(_0x1733d2(0x15b))/0xb*(parseInt(_0x1733d2(0x15c))/0xc);if(_0x1eec45===_0x5efbab)break;else _0x4fd1a2['push'](_0x4fd1a2['shift']());}catch(_0x2d2509){_0x4fd1a2['push'](_0x4fd1a2['shift']());}}}(a130_0x3fdb,0x85b8d));export function isValidJsHttpsUrl(_0x216991){const _0x3513f0=a130_0x2b97;return/^https:\/\/.+\.js(\?.*)?$/[_0x3513f0(0x153)](_0x216991['trim']());}function a130_0x2b97(_0x454988,_0xcd893c){_0x454988=_0x454988-0x150;const _0x3fdb85=a130_0x3fdb();let _0x2b9795=_0x3fdb85[_0x454988];return _0x2b9795;}function a130_0x3fdb(){const _0x127beb=['trim','test','2067702kOlPpG','1512290tJOaFJ','3855992AzrOyo','8iHdKNW','184780SvBcqO','6zFLHUO','3QxgZRC','242jAMrkG','524304bbEESN','1WxxIUM','5205915MZfwgL','5155749OFLEja'];a130_0x3fdb=function(){return _0x127beb;};return a130_0x3fdb();}export function isValidCssHttpsUrl(_0x8ff4a3){const _0x28ceba=a130_0x2b97;return/^https:\/\/.+\.css(\?.*)?$/[_0x28ceba(0x153)](_0x8ff4a3[_0x28ceba(0x152)]());}export async function isUrlReachable(_0x512a66){try{const _0xc832cf=await fetch(_0x512a66,{'method':'HEAD'});return _0xc832cf['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a131_0x5c5e4b=a131_0x30a9;(function(_0x56ca28,_0x110bd0){const _0x437ecf=a131_0x30a9,_0x1d05eb=_0x56ca28();while(!![]){try{const _0x4b5762=-parseInt(_0x437ecf(0x1aa))/0x1+parseInt(_0x437ecf(0x1ae))/0x2+parseInt(_0x437ecf(0x1ce))/0x3+-parseInt(_0x437ecf(0x1b6))/0x4*(parseInt(_0x437ecf(0x1ab))/0x5)+parseInt(_0x437ecf(0x1a7))/0x6*(parseInt(_0x437ecf(0x1bd))/0x7)+parseInt(_0x437ecf(0x1d3))/0x8*(-parseInt(_0x437ecf(0x1db))/0x9)+-parseInt(_0x437ecf(0x1cc))/0xa*(parseInt(_0x437ecf(0x1b5))/0xb);if(_0x4b5762===_0x110bd0)break;else _0x1d05eb['push'](_0x1d05eb['shift']());}catch(_0x43bcc0){_0x1d05eb['push'](_0x1d05eb['shift']());}}}(a131_0x3085,0x4c369));function a131_0x30a9(_0x4a1051,_0x2d79f0){_0x4a1051=_0x4a1051-0x1a2;const _0x3085dd=a131_0x3085();let _0x30a994=_0x3085dd[_0x4a1051];return _0x30a994;}import a131_0x597777 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a131_0x3085(){const _0x9858e7=['targetPages','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','appcode','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20\x20Continue\x20with\x20creation?','length','params','localPages','created','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','Online\x20menu\x20list\x20fetched','POST','jsUrl','\x20menu(s)','222acqsRY','\x20and\x20CSS:\x20','validation','316480tErzpG','882465QIMEaa','rawFlags','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','1008382RwigIA','yellow','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','str','\x20failed.','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','message','121iIEfhu','4kVdwva','\x20created,\x20','onlineMenuList','skipped','paths','Pre-fill\x20JS/CSS\x20URLs.\x20','\x20\x20Cancelled.','102739gPtQwr','flag','cssUrl','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Menu\x20sync\x20completed:\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','\x20\x20✓\x20Selected:\x20','Created\x20','Menu\x20creation\x20failed','sync','cookie','boolean','write','\x20created.','675790CACOLX','Would\x20create\x20','1857426NhfBNo','appCode','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','split','yes','8faIcZL','size','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Sync\x20local\x20pages\x20as\x20platform\x20menus','trim','\x20menu(s)\x20with\x20JS:\x20','failed','string','1060839zIYpYW','Fetching\x20online\x20menu\x20list...','Creating\x20','selectedAppName','menu','filter'];a131_0x3085=function(){return _0x9858e7;};return a131_0x3085();}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a131_0x5c5e4b(0x1df),'command':a131_0x5c5e4b(0x1c7),'description':a131_0x5c5e4b(0x1d6),'risk':a131_0x5c5e4b(0x1ca),'flags':[{'name':'params','type':'string','description':a131_0x5c5e4b(0x1bb)+a131_0x5c5e4b(0x1ad)},{'name':'paths','type':a131_0x5c5e4b(0x1da),'description':a131_0x5c5e4b(0x1c0)},{'name':a131_0x5c5e4b(0x1d2),'type':a131_0x5c5e4b(0x1c9),'description':a131_0x5c5e4b(0x1c3)}],async 'dryRun'(_0xa72c0e){const _0x315202=a131_0x5c5e4b;ensureRunnableContext(_0xa72c0e[_0x315202(0x1ac)],_0xa72c0e[_0x315202(0x1de)]);const _0x3359a3=await runMenuSyncCore(_0xa72c0e[_0x315202(0x1cf)],_0xa72c0e['cookie'],parsePaths(_0xa72c0e[_0x315202(0x1b1)](_0x315202(0x1ba))),_0xa72c0e['str'](_0x315202(0x1e7)),{'dryRun':!![]});return{'method':_0x315202(0x1a4),'url':'/smartapi/menu/create','body':_0x3359a3,'description':_0x3359a3[_0x315202(0x1b9)]?_0x315202(0x1e2):_0x315202(0x1cd)+_0x3359a3[_0x315202(0x1e1)]['length']+'\x20local\x20microfrontend\x20menu(s).'};},async 'execute'(_0x561747){const _0x5edeef=a131_0x5c5e4b;ensureRunnableContext(_0x561747[_0x5edeef(0x1ac)],_0x561747['selectedAppName']);const _0x5005c2=_0x561747[_0x5edeef(0x1be)](_0x5edeef(0x1d2)),_0x136a33=_0x561747[_0x5edeef(0x1b1)]('params'),_0xdf3ed1=parsePaths(_0x561747[_0x5edeef(0x1b1)](_0x5edeef(0x1ba))),_0x2ff32d=parseMenuSyncParams(_0x136a33);if(_0x5005c2){const _0x22994c=await runMenuSyncCore(_0x561747[_0x5edeef(0x1cf)],_0x561747[_0x5edeef(0x1c8)],_0xdf3ed1,_0x136a33);if(_0x22994c['skipped']){const _0x131c49=getLocalPages();_0x131c49['length']===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x5edeef(0x1e4));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x22994c[_0x5edeef(0x1e9)]+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x22994c,'message':_0x22994c[_0x5edeef(0x1b9)]?'Menu\x20sync\x20skipped':'Menu\x20sync\x20completed:\x20'+_0x22994c[_0x5edeef(0x1e9)]+_0x5edeef(0x1cb)};}if(_0xdf3ed1[_0x5edeef(0x1e6)]>0x0)throw CliErrors['validation']('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0x5edeef(0x1a2));if(!isInteractive()&&_0x136a33)throw CliErrors[_0x5edeef(0x1a9)](_0x5edeef(0x1d5),_0x5edeef(0x1a2));requireInteractive();const _0x596285=startSpinner(_0x5edeef(0x1dc));let _0x1c332e,_0x242b6e,_0x40130e;try{const _0x8eda37=await fetchMenuData(_0x561747['appCode'],_0x561747[_0x5edeef(0x1c8)]);_0x1c332e=_0x8eda37[_0x5edeef(0x1e8)],_0x242b6e=_0x8eda37['onlinePaths'],_0x40130e=_0x8eda37[_0x5edeef(0x1b8)],stopSpinner(_0x596285,_0x5edeef(0x1a3),!![]);}catch(_0x2aa11f){stopSpinner(_0x596285,_0x5edeef(0x1c2),![]);throw CliErrors['validation'](_0x2aa11f instanceof Error?_0x2aa11f[_0x5edeef(0x1b4)]:_0x5edeef(0x1c2));}if(_0x1c332e[_0x5edeef(0x1e6)]===0x0)return writeCliSideChannelLine(a131_0x597777[_0x5edeef(0x1af)](_0x5edeef(0x1b3))),{'ok':!![]};const _0x5c73d7=buildCompareRows(_0x1c332e,_0x242b6e);writeCliSideChannelLine(renderCompareTable(_0x5c73d7)),writeCliSideChannelLine('');const _0xa83552=await selectPages(_0x1c332e,_0x242b6e);writeCliSideChannelLine(''),writeCliSideChannelLine(a131_0x597777['cyan'](_0x5edeef(0x1c4)+_0xa83552['length']+'\x20page(s)'));const _0x2bc0e8=_0x2ff32d[_0x5edeef(0x1a5)]&&_0x2ff32d[_0x5edeef(0x1bf)];if(!_0x2bc0e8){writeCliSideChannelLine(renderSyncSummary(_0xa83552,_0x242b6e[_0x5edeef(0x1d4)]>0x0));const _0x42b9cb=await askConfirm(_0x5edeef(0x1e5));if(!_0x42b9cb)return writeCliSideChannelLine(a131_0x597777['gray'](_0x5edeef(0x1bc))),{'ok':!![]};}let _0x395a0a=_0x2ff32d[_0x5edeef(0x1a5)],_0x42fbe5=_0x2ff32d['cssUrl'];!_0x395a0a&&(_0x395a0a=await askJsUrl());!_0x42fbe5&&(_0x42fbe5=await askCssUrl());const _0x1eeb58=await askConfirm('\x20\x20Create\x20'+_0xa83552[_0x5edeef(0x1e6)]+_0x5edeef(0x1d8)+_0x395a0a+_0x5edeef(0x1a8)+_0x42fbe5+'?');if(!_0x1eeb58)return writeCliSideChannelLine(a131_0x597777['gray'](_0x5edeef(0x1bc))),{'ok':!![]};const _0x5b7a97=[_0x395a0a,_0x42fbe5],_0x560ae3=startSpinner(_0x5edeef(0x1dd)+_0xa83552[_0x5edeef(0x1e6)]+'\x20menu(s)...');try{const _0x19a896=await doCreateMenus(_0x561747[_0x5edeef(0x1cf)],_0x561747[_0x5edeef(0x1c8)],_0xa83552,_0x5b7a97);return stopSpinner(_0x560ae3,_0x5edeef(0x1c5)+_0x19a896[_0x5edeef(0x1e9)]+_0x5edeef(0x1a6),!![]),{'ok':!![],'data':_0x19a896,'message':_0x5edeef(0x1c1)+_0x19a896['created']+_0x5edeef(0x1b7)+_0x19a896[_0x5edeef(0x1d9)]+_0x5edeef(0x1b2)};}catch(_0x4038c7){stopSpinner(_0x560ae3,_0x5edeef(0x1c6),![]);throw CliErrors['validation'](_0x4038c7 instanceof Error?_0x4038c7[_0x5edeef(0x1b4)]:_0x5edeef(0x1c6));}}};function ensureRunnableContext(_0x4e4616,_0x164815){const _0x55c43e=a131_0x5c5e4b,_0x48ed01=_0x4e4616[_0x55c43e(0x1e3)]?String(_0x4e4616[_0x55c43e(0x1e3)])[_0x55c43e(0x1d7)]():'';if(!isInProject()&&!_0x164815&&!_0x48ed01)throw CliErrors[_0x55c43e(0x1a9)](_0x55c43e(0x1b0)+_0x55c43e(0x1d0));}function parsePaths(_0x2fe571){const _0xd5b296=a131_0x5c5e4b;return[...new Set(_0x2fe571[_0xd5b296(0x1d1)](',')['map'](_0x2f126e=>_0x2f126e['trim']())[_0xd5b296(0x1e0)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a132_0x29b0d4=a132_0x4270;(function(_0x1b1ef3,_0x5e9b0e){const _0x248667=a132_0x4270,_0x2cb681=_0x1b1ef3();while(!![]){try{const _0x3508c0=parseInt(_0x248667(0xce))/0x1+-parseInt(_0x248667(0xcf))/0x2*(-parseInt(_0x248667(0xe8))/0x3)+-parseInt(_0x248667(0xc3))/0x4*(-parseInt(_0x248667(0xcc))/0x5)+parseInt(_0x248667(0xcd))/0x6*(parseInt(_0x248667(0xde))/0x7)+-parseInt(_0x248667(0xdb))/0x8*(parseInt(_0x248667(0xc4))/0x9)+-parseInt(_0x248667(0xc8))/0xa+-parseInt(_0x248667(0xe6))/0xb*(-parseInt(_0x248667(0xd7))/0xc);if(_0x3508c0===_0x5e9b0e)break;else _0x2cb681['push'](_0x2cb681['shift']());}catch(_0x4a1577){_0x2cb681['push'](_0x2cb681['shift']());}}}(a132_0x54ac,0x5a6e2));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const NOTIFICATION_CHANNEL_TYPES=[a132_0x29b0d4(0xd2),a132_0x29b0d4(0xc2),a132_0x29b0d4(0xd0),a132_0x29b0d4(0xd5),a132_0x29b0d4(0xc1)];export const notificationConfigList={'service':'notification','command':a132_0x29b0d4(0xd3),'description':a132_0x29b0d4(0xca),'risk':a132_0x29b0d4(0xc5),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a132_0x29b0d4(0xcb),'type':a132_0x29b0d4(0xdf),'description':a132_0x29b0d4(0xd1),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a132_0x29b0d4(0xd2)}],async 'validate'(_0xc767d1){readChannelType(_0xc767d1);},async 'execute'(_0x865d8f){const _0x116b01=a132_0x29b0d4,_0x4eea47=readChannelType(_0x865d8f),_0x470032=await listNotificationChannelConfigs(_0x865d8f[_0x116b01(0xd9)],_0x4eea47),_0x1ea2aa=_0x470032[_0x116b01(0xc9)](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x865d8f[_0x116b01(0xd9)],'channelType':_0x4eea47,'count':_0x1ea2aa[_0x116b01(0xc6)],'configs':_0x1ea2aa},'message':_0x116b01(0xd4)+_0x1ea2aa[_0x116b01(0xc6)]+'\x20'+_0x4eea47+'\x20notification\x20config(s)'};}};function readChannelType(_0x4037c4){const _0x12c7db=a132_0x29b0d4,_0x9b8aa1=_0x4037c4[_0x12c7db(0xe5)](_0x12c7db(0xcb))[_0x12c7db(0xe1)]()||_0x12c7db(0xd2);if(!NOTIFICATION_CHANNEL_TYPES[_0x12c7db(0xe9)](_0x9b8aa1))throw CliErrors[_0x12c7db(0xdd)](_0x12c7db(0xda)+_0x9b8aa1,_0x12c7db(0xdc)+NOTIFICATION_CHANNEL_TYPES[_0x12c7db(0xe3)](',\x20')+'.');return _0x9b8aa1;}function a132_0x54ac(){const _0x1da56e=['configName','7160960ipLXZY','map','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','type','10rmNelU','72yfMVFI','610020noJZSr','834uEHnAA','DINGTALK','Notification\x20channel\x20type','EMAIL','config-list','Found\x20','WECOM','\x20is\x20missing\x20required\x20field\x20\x22','720UvubEq','channelType','appCode','Invalid\x20--type:\x20','32FhQLiZ','Allowed\x20values:\x20','validation','10969zPNrWo','string','apiError','trim','configCode','join','updateTime','str','11902tJuvCt','Item\x20','498jOLLve','includes','Invalid\x20notification\x20config\x20response.','WEBHOOK','FEISHU','1440800Qtlqzq','892953kvSbSo','read','length'];a132_0x54ac=function(){return _0x1da56e;};return a132_0x54ac();}function a132_0x4270(_0x93e671,_0xda1b11){_0x93e671=_0x93e671-0xc1;const _0x54acef=a132_0x54ac();let _0x42704c=_0x54acef[_0x93e671];return _0x42704c;}function projectNotificationConfig(_0x385bbc,_0x57bc00){const _0x4eca51=a132_0x29b0d4;return{'id':typeof _0x385bbc['id']==='number'?_0x385bbc['id']:null,'configCode':requireConfigString(_0x385bbc,_0x4eca51(0xe2),_0x57bc00),'configName':requireConfigString(_0x385bbc,_0x4eca51(0xc7),_0x57bc00),'channelType':requireConfigString(_0x385bbc,_0x4eca51(0xd8),_0x57bc00),'description':normalizeNullableString(_0x385bbc['description']),'createTime':normalizeNullableString(_0x385bbc['createTime']),'updateTime':normalizeNullableString(_0x385bbc[_0x4eca51(0xe4)])};}function requireConfigString(_0x731520,_0x4d4d5e,_0x1d82c5){const _0x5a332c=a132_0x29b0d4,_0x2ca7f6=_0x731520[_0x4d4d5e];if(typeof _0x2ca7f6!=='string'||_0x2ca7f6[_0x5a332c(0xe1)]()==='')throw CliErrors[_0x5a332c(0xe0)](_0x5a332c(0xea),_0x5a332c(0xe7)+(_0x1d82c5+0x1)+_0x5a332c(0xd6)+_0x4d4d5e+'\x22.');return _0x2ca7f6[_0x5a332c(0xe1)]();}function normalizeNullableString(_0x501d9a){const _0x323b57=a132_0x29b0d4;return typeof _0x501d9a===_0x323b57(0xdf)?_0x501d9a:null;}
|