@lovrabet/rabetbase-cli 2.5.1-beta.6 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-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/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.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/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.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-restore.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/dataset/user-deleted-field-list.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-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.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/table-diff-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/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/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/search.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/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.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/domain-routing-sync.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/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/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.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/deployment-sync.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.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/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.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/kb-search-client.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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.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/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/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.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1182ad,_0x25ec2e){const _0x19bc97=a128_0x3c6c,_0x36edf9=_0x1182ad();while(!![]){try{const _0x589034=-parseInt(_0x19bc97(0x115))/0x1*(parseInt(_0x19bc97(0xfb))/0x2)+-parseInt(_0x19bc97(0xfd))/0x3+parseInt(_0x19bc97(0x10d))/0x4+parseInt(_0x19bc97(0xfc))/0x5+parseInt(_0x19bc97(0xef))/0x6*(-parseInt(_0x19bc97(0x102))/0x7)+-parseInt(_0x19bc97(0x103))/0x8*(-parseInt(_0x19bc97(0xfa))/0x9)+-parseInt(_0x19bc97(0xec))/0xa*(-parseInt(_0x19bc97(0x113))/0xb);if(_0x589034===_0x25ec2e)break;else _0x36edf9['push'](_0x36edf9['shift']());}catch(_0x42e788){_0x36edf9['push'](_0x36edf9['shift']());}}}(a128_0x12a5,0xe5c3f));import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';export async function fetchMenuSnapshot(_0x50aed7,_0x6db070,_0x14fc41={}){const _0xe94084=a128_0x3c6c,_0x42625b=await getMenuTree(_0x50aed7,_0x6db070);return buildMenuSnapshot(Array[_0xe94084(0x100)](_0x42625b)?_0x42625b:[],_0x14fc41);}function a128_0x3c6c(_0x264b31,_0x139601){_0x264b31=_0x264b31-0xe8;const _0x12a5bf=a128_0x12a5();let _0x3c6c69=_0x12a5bf[_0x264b31];return _0x3c6c69;}export function buildMenuSnapshot(_0x337519,_0x2fcb26={}){const _0x2521bf=a128_0x3c6c,_0x5d04a3=flattenMenuItems(_0x337519,{'verbose':_0x2fcb26[_0x2521bf(0x10b)]===!![],'parentId':null,'depth':0x0}),_0x490beb=new Map(_0x5d04a3[_0x2521bf(0xf9)](_0x177190=>[_0x177190['id'],_0x177190])),_0x3eb95b=createHash(_0x2521bf(0xea))[_0x2521bf(0x117)](JSON[_0x2521bf(0xee)](_0x5d04a3[_0x2521bf(0xf9)](toHashInput)))[_0x2521bf(0xf4)](_0x2521bf(0xeb));return{'total':_0x5d04a3['length'],'hash':_0x2521bf(0x106)+_0x3eb95b,'menus':_0x5d04a3,'byId':_0x490beb};}export function toProcessedMenuItem(_0x5a54f7){const _0x57cd7b=a128_0x3c6c;return{'id':_0x5a54f7['id'],'path':_0x5a54f7['path'],'label':_0x5a54f7[_0x57cd7b(0xf1)],'resources':[..._0x5a54f7[_0x57cd7b(0xf2)]],'extend':_0x5a54f7['extend']??null};}function a128_0x12a5(){const _0x13ff97=['path','pageType','map','36uDrODw','574ocElhj','1248890YNacAQ','617451zqJShV','datasetCode','pageId','isArray','sort','11525066GInAUK','303328DxHpBy','updateTime','index','sha256:','extend','url','datasetId','parentId','verbose','push','2075384RdrHox','updateUserId','string','modelType','resourcesValid','isFinite','20626045DJianR','updateUserName','7yHqEHm','depth','update','number','type','children','sha256','hex','10ZTZiah','length','stringify','6AdzSJk','valid','label','resources','visible','digest','parse','values'];a128_0x12a5=function(){return _0x13ff97;};return a128_0x12a5();}export function toMenuListItem(_0x3cda2e){const {modelType:_0x1c05e1,datasetId:_0x56db38,datasetCode:_0x1a4f6a,resourcesValid:_0x34cacb,..._0x470313}=_0x3cda2e;return _0x470313;}export function getChildren(_0x253fe0,_0x5caa9f){const _0xf1ff9b=a128_0x3c6c;return _0x253fe0['menus']['filter'](_0x283d22=>_0x283d22[_0xf1ff9b(0x10a)]===_0x5caa9f);}function flattenMenuItems(_0x586d3e,_0x40402a){const _0x19d422=a128_0x3c6c,_0x46df12=sortMenuItems(_0x586d3e),_0x317e99=[];for(const _0x14c2e4 of _0x46df12){const _0x19ec81=sortMenuItems(Array[_0x19d422(0x100)](_0x14c2e4[_0x19d422(0xe9)])?_0x14c2e4[_0x19d422(0xe9)]:[]);_0x317e99['push'](toMenuFact(_0x14c2e4,_0x19ec81,_0x40402a)),_0x19ec81[_0x19d422(0xed)]>0x0&&_0x317e99[_0x19d422(0x10c)](...flattenMenuItems(_0x19ec81,{'verbose':_0x40402a[_0x19d422(0x10b)],'parentId':_0x14c2e4['id'],'depth':_0x40402a[_0x19d422(0x116)]+0x1}));}return _0x317e99;}function sortMenuItems(_0x5c6463){const _0x589d2e=a128_0x3c6c;return _0x5c6463[_0x589d2e(0xf9)]((_0x1a5625,_0x1b293a)=>({'item':_0x1a5625,'index':_0x1b293a}))[_0x589d2e(0x101)]((_0x2708f6,_0x1f63a2)=>{const _0x36a4cb=_0x589d2e,_0x1ff216=normalizeSort(_0x2708f6['item'][_0x36a4cb(0x101)]),_0x3329c7=normalizeSort(_0x1f63a2['item'][_0x36a4cb(0x101)]);if(_0x1ff216!==_0x3329c7)return _0x1ff216-_0x3329c7;return _0x2708f6[_0x36a4cb(0x105)]-_0x1f63a2['index'];})[_0x589d2e(0xf9)](({item:_0x20ae9f})=>_0x20ae9f);}function toMenuFact(_0x43134f,_0x4c5ded,_0x169789){const _0x530673=a128_0x3c6c,_0x1236ce=normalizeResourceValue(_0x43134f[_0x530673(0x107)]?.[_0x530673(0xf2)]),_0x1636f0={'id':_0x43134f['id'],'parentId':_0x169789['parentId'],'depth':_0x169789[_0x530673(0x116)],'label':normalizeString(_0x43134f[_0x530673(0xf1)]),'path':normalizeString(_0x43134f[_0x530673(0xf7)]),'url':normalizeString(_0x43134f[_0x530673(0x108)]),'type':normalizeString(_0x43134f[_0x530673(0xe8)]),'visible':typeof _0x43134f['visible']==='boolean'?_0x43134f[_0x530673(0xf3)]:null,'sort':typeof _0x43134f[_0x530673(0x101)]===_0x530673(0x118)&&Number[_0x530673(0x112)](_0x43134f[_0x530673(0x101)])?_0x43134f[_0x530673(0x101)]:null,'resources':_0x1236ce[_0x530673(0xf6)],'resourcesValid':_0x1236ce[_0x530673(0xf0)],'childrenIds':_0x4c5ded[_0x530673(0xf9)](_0x13b199=>_0x13b199['id']),'childrenCount':_0x4c5ded[_0x530673(0xed)],'pageId':normalizeNullableNumber(_0x43134f['pageId']),'pageType':normalizeString(_0x43134f[_0x530673(0xf8)]),'modelType':normalizeString(_0x43134f[_0x530673(0x110)]),'datasetId':normalizeNullableNumber(_0x43134f[_0x530673(0x109)]),'datasetCode':normalizeString(_0x43134f['datasetCode']),'updateUserId':normalizeNullableString(_0x43134f[_0x530673(0x10e)]),'updateUserName':normalizeNullableString(_0x43134f['updateUserName']),'updateTime':normalizeNullableTimestamp(_0x43134f['updateTime'])};return _0x169789[_0x530673(0x10b)]&&(_0x1636f0[_0x530673(0x107)]=_0x43134f[_0x530673(0x107)]??null),_0x1636f0;}function toHashInput(_0x3a1ba8){const _0x11cc40=a128_0x3c6c;return{'id':_0x3a1ba8['id'],'parentId':_0x3a1ba8[_0x11cc40(0x10a)],'label':_0x3a1ba8[_0x11cc40(0xf1)],'path':_0x3a1ba8[_0x11cc40(0xf7)],'url':_0x3a1ba8[_0x11cc40(0x108)],'type':_0x3a1ba8[_0x11cc40(0xe8)],'visible':_0x3a1ba8[_0x11cc40(0xf3)],'sort':_0x3a1ba8[_0x11cc40(0x101)],'resources':_0x3a1ba8[_0x11cc40(0xf2)],'resourcesValid':_0x3a1ba8[_0x11cc40(0x111)],'childrenIds':_0x3a1ba8['childrenIds'],'pageId':_0x3a1ba8[_0x11cc40(0xff)],'pageType':_0x3a1ba8[_0x11cc40(0xf8)],'modelType':_0x3a1ba8[_0x11cc40(0x110)],'datasetId':_0x3a1ba8['datasetId'],'datasetCode':_0x3a1ba8[_0x11cc40(0xfe)],'updateUserId':_0x3a1ba8[_0x11cc40(0x10e)],'updateUserName':_0x3a1ba8[_0x11cc40(0x114)],'updateTime':_0x3a1ba8[_0x11cc40(0x104)]};}function normalizeSort(_0x2fbd5f){const _0x15f710=a128_0x3c6c;return typeof _0x2fbd5f===_0x15f710(0x118)&&Number[_0x15f710(0x112)](_0x2fbd5f)?_0x2fbd5f:Number['POSITIVE_INFINITY'];}function normalizeString(_0x2b78e9){const _0x3ecc2f=a128_0x3c6c;return typeof _0x2b78e9===_0x3ecc2f(0x10f)?_0x2b78e9:'';}function normalizeNullableNumber(_0x1d6b7c){const _0x559e68=a128_0x3c6c;return typeof _0x1d6b7c===_0x559e68(0x118)&&Number[_0x559e68(0x112)](_0x1d6b7c)?_0x1d6b7c:null;}function normalizeNullableString(_0x125aca){const _0x22d16d=a128_0x3c6c;return typeof _0x125aca==='string'&&_0x125aca[_0x22d16d(0xed)]>0x0?_0x125aca:null;}function normalizeNullableTimestamp(_0x2da09e){const _0x3846e4=a128_0x3c6c;if(typeof _0x2da09e===_0x3846e4(0x10f))return _0x2da09e[_0x3846e4(0xed)]>0x0?_0x2da09e:null;return typeof _0x2da09e===_0x3846e4(0x118)&&Number['isFinite'](_0x2da09e)?_0x2da09e:null;}export function normalizeResources(_0x1a0be7){const _0x39de58=a128_0x3c6c;return normalizeResourceValue(_0x1a0be7)[_0x39de58(0xf6)];}function normalizeResourceValue(_0x17dfec){const _0x288151=a128_0x3c6c;if(_0x17dfec==null)return{'values':[],'valid':!![]};if(Array[_0x288151(0x100)](_0x17dfec))return{'values':_0x17dfec[_0x288151(0xf9)](String),'valid':!![]};if(typeof _0x17dfec!==_0x288151(0x10f))return{'values':[],'valid':![]};try{const _0x47495d=JSON[_0x288151(0xf5)](_0x17dfec);return Array['isArray'](_0x47495d)?{'values':_0x47495d[_0x288151(0xf9)](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b7f24,_0x110997){var _0x1adf3c=a129_0x2515,_0x3a9727=_0x4b7f24();while(!![]){try{var _0x49275d=parseInt(_0x1adf3c(0x193))/0x1*(-parseInt(_0x1adf3c(0x192))/0x2)+parseInt(_0x1adf3c(0x18e))/0x3+parseInt(_0x1adf3c(0x190))/0x4*(parseInt(_0x1adf3c(0x18d))/0x5)+-parseInt(_0x1adf3c(0x18f))/0x6*(-parseInt(_0x1adf3c(0x197))/0x7)+-parseInt(_0x1adf3c(0x191))/0x8+-parseInt(_0x1adf3c(0x194))/0x9*(parseInt(_0x1adf3c(0x195))/0xa)+parseInt(_0x1adf3c(0x196))/0xb;if(_0x49275d===_0x110997)break;else _0x3a9727['push'](_0x3a9727['shift']());}catch(_0x4e613f){_0x3a9727['push'](_0x3a9727['shift']());}}}(a129_0x5aea,0x2b2ab));function a129_0x2515(_0x28b1b9,_0x141740){_0x28b1b9=_0x28b1b9-0x18d;var _0x5aea99=a129_0x5aea();var _0x251548=_0x5aea99[_0x28b1b9];return _0x251548;}export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';function a129_0x5aea(){var _0x1b592d=['1160Hhwwqk','91641LMiSnm','616826qJWFZt','178210aqsTlU','673197texjnG','6TtReyZ','32oKXjZm','2413960hyvJCU','48FXrTlQ','3323RCSlfm','3699yjTDuv'];a129_0x5aea=function(){return _0x1b592d;};return a129_0x5aea();}export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3adb41,_0x2dc894){const _0x144df5=a130_0x2ac1,_0x6f9012=_0x3adb41();while(!![]){try{const _0x3103b3=parseInt(_0x144df5(0x1cd))/0x1*(-parseInt(_0x144df5(0x1e0))/0x2)+-parseInt(_0x144df5(0x1e7))/0x3+-parseInt(_0x144df5(0x1d2))/0x4+parseInt(_0x144df5(0x1d1))/0x5*(parseInt(_0x144df5(0x1c9))/0x6)+-parseInt(_0x144df5(0x1cf))/0x7+parseInt(_0x144df5(0x1e4))/0x8+parseInt(_0x144df5(0x1c5))/0x9;if(_0x3103b3===_0x2dc894)break;else _0x6f9012['push'](_0x6f9012['shift']());}catch(_0x42594a){_0x6f9012['push'](_0x6f9012['shift']());}}}(a130_0x1e0e,0xdcaf2));import a130_0x277fc2 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a130_0x2999fb from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';function a130_0x1e0e(){const _0x4195af=['JS\x20URL\x20checked','5aLNrrW','3817588rqeUAY','stdin','start','has','[already\x20on\x20platform]','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','map','CSS\x20URL\x20checked','trim','\x20\x20JS\x20URL:','red','filter','gray','catch','50CsedBm','path','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','test','12530248pZaZLx','cancelled','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','2217411FGgXks','name','ExitPromptError','label','length','CSS\x20URL\x20check\x20failed','\x20\x20Checking\x20JS\x20URL\x20reachability...','cyan','error','\x20\x20CSS\x20URL:','isTTY','7611399iCFXgf','fail','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','4932804QoZbZP','No\x20local\x20pages\x20found.','green','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','4057FWYySN','Cancelled.','3746715bGzWPV'];a130_0x1e0e=function(){return _0x4195af;};return a130_0x1e0e();}import{CliErrors}from'../../../errors.js';function onCancel(_0x20f510){const _0x2f121c=a130_0x2ac1;return _0x20f510[_0x2f121c(0x1df)](_0x4e81ca=>{const _0x139979=_0x2f121c;if(_0x4e81ca?.[_0x139979(0x1e8)]===_0x139979(0x1e9))throw CliErrors[_0x139979(0x1e5)](_0x139979(0x1ce));throw _0x4e81ca;});}export function startSpinner(_0x1f89a4){const _0x1c9906=a130_0x2ac1;return a130_0x2999fb({'text':_0x1f89a4,'color':_0x1c9906(0x1c1)})[_0x1c9906(0x1d4)]();}export function stopSpinner(_0x5538b1,_0x44d122,_0x20a303){const _0x10456c=a130_0x2ac1;_0x20a303?_0x5538b1['succeed'](_0x44d122):_0x5538b1[_0x10456c(0x1c6)](_0x44d122);}export async function askConfirm(_0x47027d){return onCancel(confirm({'message':_0x47027d,'theme':{'prefix':''}}));}export async function askJsUrl(_0x5e176d){const _0x30b4d2=a130_0x2ac1;while(!![]){const _0x403cfa=await onCancel(input({'message':_0x30b4d2(0x1db),'default':_0x5e176d,'theme':{'prefix':''}}));if(_0x403cfa[_0x30b4d2(0x1da)]()==='')throw CliErrors[_0x30b4d2(0x1e5)](_0x30b4d2(0x1ce));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x30b4d2(0x1e3)](_0x403cfa[_0x30b4d2(0x1da)]())){console[_0x30b4d2(0x1c2)](a130_0x277fc2[_0x30b4d2(0x1dc)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x56addb=startSpinner(_0x30b4d2(0x1c0));try{const _0x1839c0=await isUrlReachable(_0x403cfa[_0x30b4d2(0x1da)]());stopSpinner(_0x56addb,_0x30b4d2(0x1d0),_0x1839c0);if(!_0x1839c0){console[_0x30b4d2(0x1c2)](a130_0x277fc2[_0x30b4d2(0x1dc)](_0x30b4d2(0x1e6)));continue;}return _0x403cfa[_0x30b4d2(0x1da)]();}catch(_0x2e7ac6){stopSpinner(_0x56addb,'JS\x20URL\x20check\x20failed',![]);throw _0x2e7ac6;}}}export async function askCssUrl(_0x24a503){const _0x2d49d8=a130_0x2ac1;while(!![]){const _0x474cea=await onCancel(input({'message':_0x2d49d8(0x1c3),'default':_0x24a503,'theme':{'prefix':''}}));if(_0x474cea[_0x2d49d8(0x1da)]()==='')throw CliErrors[_0x2d49d8(0x1e5)](_0x2d49d8(0x1ce));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x2d49d8(0x1e3)](_0x474cea['trim']())){console[_0x2d49d8(0x1c2)](a130_0x277fc2['red'](_0x2d49d8(0x1c7)));continue;}const _0x492edb=startSpinner('\x20\x20Checking\x20CSS\x20URL\x20reachability...');try{const _0x3a9cff=await isUrlReachable(_0x474cea[_0x2d49d8(0x1da)]());stopSpinner(_0x492edb,_0x2d49d8(0x1d9),_0x3a9cff);if(!_0x3a9cff){console[_0x2d49d8(0x1c2)](a130_0x277fc2[_0x2d49d8(0x1dc)](_0x2d49d8(0x1c8)));continue;}return _0x474cea[_0x2d49d8(0x1da)]();}catch(_0x56c9dd){stopSpinner(_0x492edb,_0x2d49d8(0x1ec),![]);throw _0x56c9dd;}}}function a130_0x2ac1(_0xc9d780,_0x5c1163){_0xc9d780=_0xc9d780-0x1c0;const _0x1e0e71=a130_0x1e0e();let _0x2ac102=_0x1e0e71[_0xc9d780];return _0x2ac102;}export async function selectPages(_0x54fd84,_0x2c1998){const _0x28e0ee=a130_0x2ac1,_0x33e8eb=_0x54fd84[_0x28e0ee(0x1d8)](_0x1c7cb9=>{const _0x34671e=_0x28e0ee,_0x562d11=_0x2c1998[_0x34671e(0x1d5)](_0x1c7cb9[_0x34671e(0x1e1)]);return{'name':_0x1c7cb9[_0x34671e(0x1ea)]+'\x20\x20'+a130_0x277fc2[_0x34671e(0x1de)](_0x1c7cb9[_0x34671e(0x1e1)])+'\x20\x20'+(_0x562d11?a130_0x277fc2['gray'](_0x34671e(0x1d6)):a130_0x277fc2[_0x34671e(0x1cb)]('[new]')),'value':_0x1c7cb9['path'],'checked':!_0x562d11,'disabled':_0x562d11};});if(_0x33e8eb['length']===0x0)throw new Error(_0x28e0ee(0x1ca));const _0x283b76=await onCancel(checkbox({'message':_0x28e0ee(0x1cc),'choices':_0x33e8eb,'loop':![],'theme':{'prefix':''}}));if(_0x283b76[_0x28e0ee(0x1eb)]===0x0)throw new Error('No\x20menus\x20selected.');return _0x54fd84[_0x28e0ee(0x1dd)](_0x2e440f=>_0x283b76['includes'](_0x2e440f['path']));}export function isInteractive(){const _0xa75f90=a130_0x2ac1;return process[_0xa75f90(0x1d3)][_0xa75f90(0x1c4)]===!![];}export function requireInteractive(){const _0x124ba8=a130_0x2ac1;if(!isInteractive())throw new Error(_0x124ba8(0x1d7)+_0x124ba8(0x1e2));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a131_0x4eb28e=a131_0x3e16;(function(_0x2915e5,_0x4c39fd){const _0x36524a=a131_0x3e16,_0x4fba76=_0x2915e5();while(!![]){try{const _0x16072c=parseInt(_0x36524a(0x1b8))/0x1*(-parseInt(_0x36524a(0x1bd))/0x2)+-parseInt(_0x36524a(0x1c6))/0x3+-parseInt(_0x36524a(0x1c9))/0x4*(parseInt(_0x36524a(0x1be))/0x5)+-parseInt(_0x36524a(0x1bf))/0x6+-parseInt(_0x36524a(0x1c0))/0x7*(parseInt(_0x36524a(0x1bc))/0x8)+-parseInt(_0x36524a(0x1c2))/0x9+parseInt(_0x36524a(0x1c7))/0xa;if(_0x16072c===_0x4c39fd)break;else _0x4fba76['push'](_0x4fba76['shift']());}catch(_0x3c0b21){_0x4fba76['push'](_0x4fba76['shift']());}}}(a131_0x2757,0x2bbf0));function a131_0x3e16(_0x20ba2f,_0x41560a){_0x20ba2f=_0x20ba2f-0x1b8;const _0x27578c=a131_0x2757();let _0x3e1605=_0x27578c[_0x20ba2f];return _0x3e1605;}import{readdirSync,statSync,readFileSync}from'fs';function a131_0x2757(){const _0x4f2ac2=['filter','279738rKAeSo','14290960AdAdEq','src/pages','3336NZAMuQ','concat','index.tsx','split','slice','path','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','forEach','4Umszkq','isDirectory','.tsx','match','576kPdqkX','34990bEsEfR','1830JRiPAN','1162140CBYSHV','31157BoGnjG','replace','2405520qfVgWw','push','join'];a131_0x2757=function(){return _0x4f2ac2;};return a131_0x2757();}import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),a131_0x4eb28e(0x1c8));export function extractTitleFromComment(_0xf8c837){const _0x5640aa=a131_0x4eb28e;try{const _0x48869f=readFileSync(_0xf8c837,'utf-8'),_0x2a5e13=_0x48869f[_0x5640aa(0x1bb)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x2a5e13&&_0x2a5e13[0x1]){const _0x4f647a=_0x2a5e13[0x1],_0x41bf6b=_0x4f647a[_0x5640aa(0x1bb)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x41bf6b&&_0x41bf6b[0x1])return _0x41bf6b[0x1]['trim']();}let _0x297f1d=null;const _0x1be08d=_0x48869f[_0x5640aa(0x1bb)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x1be08d&&_0x1be08d[0x1]&&(_0x297f1d=_0x1be08d[0x1]);if(!_0x297f1d){const _0x499640=_0x48869f[_0x5640aa(0x1bb)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x499640&&_0x499640[0x1]&&(_0x297f1d=_0x499640[0x1]);}if(_0x297f1d){const _0x5044ff=new RegExp('\x5cb'+_0x297f1d+_0x5640aa(0x1cf)),_0x5391ef=_0x48869f[_0x5640aa(0x1bb)](_0x5044ff);if(_0x5391ef&&_0x5391ef[0x1])return _0x5391ef[0x1];return _0x297f1d;}return null;}catch(_0x65a4f9){return null;}}export function getLocalPages(_0x4ca96a=pagesDir,_0x2d6746=pagesDir){const _0x12ca7d=a131_0x4eb28e;let _0x271f23=[];const _0x35fd68=readdirSync(_0x4ca96a);return _0x35fd68[_0x12ca7d(0x1d0)](_0x9a908b=>{const _0x22625b=_0x12ca7d,_0x100aac=join(_0x4ca96a,_0x9a908b),_0x2d84d0=statSync(_0x100aac);if(_0x2d84d0&&_0x2d84d0[_0x22625b(0x1b9)]())_0x271f23=_0x271f23[_0x22625b(0x1ca)](getLocalPages(_0x100aac,_0x2d6746));else{if(_0x9a908b['endsWith'](_0x22625b(0x1ba))){let _0x3856ef=relative(_0x2d6746,_0x100aac);_0x3856ef['endsWith'](_0x22625b(0x1cb))?_0x3856ef=_0x3856ef[_0x22625b(0x1c1)](/index\.tsx$/,''):_0x3856ef=_0x3856ef[_0x22625b(0x1c1)](/\.tsx$/,'');_0x3856ef['endsWith'](sep)&&(_0x3856ef=_0x3856ef[_0x22625b(0x1cd)](0x0,-0x1));const _0x413605=_0x3856ef[_0x22625b(0x1cc)](sep)[_0x22625b(0x1c4)]('/'),_0x4678d3=extractTitleFromComment(_0x100aac),_0x1ae498=_0x4678d3||_0x413605;_0x271f23[_0x22625b(0x1c3)]({'path':_0x413605['replaceAll']('$',':'),'label':_0x1ae498});}}}),_0x271f23[_0x12ca7d(0x1c5)](_0x374b76=>_0x374b76[_0x12ca7d(0x1ce)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28208d,_0x320b84){const _0x425740=a132_0x34a7,_0x1cefc9=_0x28208d();while(!![]){try{const _0x599fd8=-parseInt(_0x425740(0xe8))/0x1*(-parseInt(_0x425740(0xeb))/0x2)+-parseInt(_0x425740(0xf0))/0x3+parseInt(_0x425740(0xf4))/0x4+parseInt(_0x425740(0xe6))/0x5*(parseInt(_0x425740(0xf5))/0x6)+parseInt(_0x425740(0xef))/0x7+parseInt(_0x425740(0xed))/0x8+parseInt(_0x425740(0xe4))/0x9*(-parseInt(_0x425740(0xf3))/0xa);if(_0x599fd8===_0x320b84)break;else _0x1cefc9['push'](_0x1cefc9['shift']());}catch(_0x321d9a){_0x1cefc9['push'](_0x1cefc9['shift']());}}}(a132_0x1540,0xcc60b));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(_0x36e3cd){const _0x456eed=a132_0x34a7,_0x1e4ea6=[];return!isValidJsHttpsUrl(_0x36e3cd)&&_0x1e4ea6[_0x456eed(0xe7)]('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x1e4ea6[_0x456eed(0xf7)]===0x0,'errors':_0x1e4ea6};}export function validateCssUrl(_0x27e037){const _0x3b3e4a=a132_0x34a7,_0x1cfc44=[];return!isValidCssHttpsUrl(_0x27e037)&&_0x1cfc44[_0x3b3e4a(0xe7)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x1cfc44['length']===0x0,'errors':_0x1cfc44};}export async function validateJsUrlReachable(_0x5cf432){const _0x65475=a132_0x34a7,_0x2d9efd=validateJsUrl(_0x5cf432);if(!_0x2d9efd['ok'])return _0x2d9efd;const _0x53d5b6=await isUrlReachable(_0x5cf432);if(!_0x53d5b6)_0x2d9efd[_0x65475(0xec)][_0x65475(0xe7)](_0x65475(0xe9));return{'ok':_0x2d9efd['errors'][_0x65475(0xf7)]===0x0,'errors':_0x2d9efd['errors']};}export async function validateCssUrlReachable(_0x3db510){const _0x372bc0=a132_0x34a7,_0x5d7a39=validateCssUrl(_0x3db510);if(!_0x5d7a39['ok'])return _0x5d7a39;const _0x1967d9=await isUrlReachable(_0x3db510);if(!_0x1967d9)_0x5d7a39[_0x372bc0(0xec)][_0x372bc0(0xe7)](_0x372bc0(0xe5));return{'ok':_0x5d7a39[_0x372bc0(0xec)][_0x372bc0(0xf7)]===0x0,'errors':_0x5d7a39['errors']};}function a132_0x34a7(_0x53c875,_0x84516a){_0x53c875=_0x53c875-0xe4;const _0x1540e8=a132_0x1540();let _0x34a7c3=_0x1540e8[_0x53c875];return _0x34a7c3;}export function buildCompareRows(_0x37c836,_0x3b3a09){const _0xedcc11=a132_0x34a7;return _0x37c836[_0xedcc11(0xee)](_0x107775=>({'label':_0x107775[_0xedcc11(0xf6)],'path':_0x107775[_0xedcc11(0xf1)],'local':!![],'online':_0x3b3a09[_0xedcc11(0xea)](_0x107775[_0xedcc11(0xf1)])}));}export async function doCreateMenus(_0x3682c8,_0x38360f,_0x228d4f,_0x89f0b0){const _0x3d6db2=a132_0x34a7,_0x39cf0e=await createMenus(_0x3682c8,_0x38360f,_0x228d4f,_0x89f0b0);return{'created':_0x39cf0e[_0x3d6db2(0xf7)],'failed':0x0,'labels':_0x228d4f[_0x3d6db2(0xee)](_0x29c039=>_0x29c039['label']),'menus':_0x39cf0e};}export function filterMenusWithResources(_0x5047cd){const _0x31b6a2=a132_0x34a7;return _0x5047cd[_0x31b6a2(0xf2)](_0x20d285=>_0x20d285['resources']['length']>0x0);}function a132_0x1540(){const _0x446c12=['1233408zVdpim','65856qqIgVI','label','length','9UAInGL','CSS\x20URL\x20is\x20unreachable','140uWswKC','push','1rmLBhg','JS\x20URL\x20is\x20unreachable','has','1670770RKjbnb','errors','9611384ophNtz','map','11096680gggHGp','2216886VtZIKa','path','filter','26616350leOFnG'];a132_0x1540=function(){return _0x446c12;};return a132_0x1540();}export async function fetchMenuData(_0x47fb3e,_0x1ccee9){const _0x1dffe5=a132_0x34a7,_0x54fa78=getLocalPages(),_0x50f0a9=await getOnlineMenuList(_0x47fb3e,_0x1ccee9),_0x2e5230=new Set(_0x50f0a9[_0x1dffe5(0xee)](_0x24b861=>_0x24b861[_0x1dffe5(0xf1)]));return{'localPages':_0x54fa78,'onlineMenuList':_0x50f0a9,'onlinePaths':_0x2e5230};}export async function fetchOnlineMenuList(_0x186535,_0x55be29){return getOnlineMenuList(_0x186535,_0x55be29);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a133_0x528f(_0x34a7ed,_0x130631){_0x34a7ed=_0x34a7ed-0x6e;const _0x267c45=a133_0x267c();let _0x528f13=_0x267c45[_0x34a7ed];return _0x528f13;}function a133_0x267c(){const _0x3fd6b3=['37478JaSMZX','\x20is\x20type\x20\x22','string','25ztnCRn','flagMissing','dryRun','Reorder\x20sibling\x20menus\x20below\x20','parentId','read\x20online\x20menu\x20facts\x20before\x20','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','5154oDaysn','16552jitIGW','root','\x20menu\x20','cookie','appCode','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','bool','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','api_error','hint','warnings','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','menu_mutation_failed','menu_state_drift','selector','expect-parent-id','isSafeInteger','Online\x20menu\x20state\x20changed\x20before\x20','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','number','Permission\x20denied\x20while\x20attempting\x20to\x20','planFile','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','dry-run','menu_parent_not_folder','Menu\x20','yes','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','succeeded','\x20path\x20changed:\x20expected\x20','parent-id','6983430FzcOkS','unknown','validation','\x22,\x20not\x20folder.','error','after',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','expect-path','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','menu_sort_invalid',',\x20current\x20','filter','menu_confirmation_required','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','cascade','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','hash','822PtyyKP','targets','Exact\x20online\x20menu\x20id','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','Cannot\x20append\x20a\x20','recheck\x20online\x20menu\x20facts\x20before\x20','sort','verification','prototype','call','type','hasOwnProperty','stringify','567VWdDPz','menu_sort_overflow','data','Online\x20menu\x20not\x20found:\x20','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','message','snapshotHash','byId','path','backend','56280ytlDRP','30peUFjF','toLowerCase','code','test','expected-children-count','14473844bAkTPZ','failed','deleteOrder','menu_verification_failed','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','10290303TTRPIs','get','pre-write-recheck','folder','required','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','stage','\x20child\x20count\x20changed:\x20expected\x20','length','trim','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','num','childrenCount','failedRecords','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','\x20parent\x20changed:\x20expected\x20','str','rawFlags'];a133_0x267c=function(){return _0x3fd6b3;};return a133_0x267c();}const a133_0x220145=a133_0x528f;(function(_0x4234d5,_0x496a0c){const _0x29d6fb=a133_0x528f,_0x824152=_0x4234d5();while(!![]){try{const _0x39ab46=parseInt(_0x29d6fb(0xa2))/0x1*(-parseInt(_0x29d6fb(0x9f))/0x2)+parseInt(_0x29d6fb(0xdb))/0x3*(parseInt(_0x29d6fb(0xaa))/0x4)+parseInt(_0x29d6fb(0x83))/0x5*(-parseInt(_0x29d6fb(0xa9))/0x6)+parseInt(_0x29d6fb(0x78))/0x7*(-parseInt(_0x29d6fb(0x82))/0x8)+parseInt(_0x29d6fb(0x8d))/0x9+parseInt(_0x29d6fb(0xca))/0xa+-parseInt(_0x29d6fb(0x88))/0xb;if(_0x39ab46===_0x496a0c)break;else _0x824152['push'](_0x824152['shift']());}catch(_0x4e3593){_0x824152['push'](_0x824152['shift']());}}}(a133_0x267c,0x9673e));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':a133_0x220145(0xbe),'required':!![],'description':a133_0x220145(0xdd)};export const MENU_SORT_FLAG={'name':a133_0x220145(0x71),'type':a133_0x220145(0xbe),'description':'Sibling\x20sort\x20value\x20(non-negative\x20integer)'};export const MENU_PARENT_ID_FLAG={'name':a133_0x220145(0xc9),'type':'string','description':'Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node'};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a133_0x220145(0xb9),'type':a133_0x220145(0xa1),'description':'Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level'};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':'expect-path','type':a133_0x220145(0xa1),'description':a133_0x220145(0xa8)},{'name':'expected-children-count','type':a133_0x220145(0xbe),'description':a133_0x220145(0xbc)}];export function validateExactId(_0x498e71){const _0x33a63b=a133_0x220145,_0xa068ed=_0x498e71[_0x33a63b(0x98)]('id');if(!Number[_0x33a63b(0xba)](_0xa068ed)||_0xa068ed<=0x0)throw CliErrors[_0x33a63b(0xcc)](_0x33a63b(0x8c));return _0xa068ed;}export function validateSort(_0x5604a0,_0x23f28a=a133_0x220145(0x71)){const _0x2dca08=a133_0x220145;if(!hasFlag(_0x5604a0,_0x23f28a))return undefined;const _0x20d04a=_0x5604a0[_0x2dca08(0x98)](_0x23f28a);if(!Number['isSafeInteger'](_0x20d04a)||_0x20d04a<0x0||_0x20d04a>MAX_MENU_SORT)throw menuError(_0x2dca08(0xd3),'--'+_0x23f28a+_0x2dca08(0xd7)+MAX_MENU_SORT+'.',_0x2dca08(0xc6));return _0x20d04a;}export function nextSiblingSort(_0x27519e,_0x5e27b0,_0x2b5544){const _0x204d20=a133_0x220145,_0x1b06a7=getChildren(_0x27519e,_0x5e27b0)['map'](_0x4b8fb6=>_0x4b8fb6[_0x204d20(0x71)])[_0x204d20(0xd5)](_0x151c0b=>typeof _0x151c0b===_0x204d20(0xbe));if(_0x1b06a7[_0x204d20(0x95)]===0x0)return 0x0;const _0x33afcd=Math['max'](..._0x1b06a7);if(_0x33afcd>=MAX_MENU_SORT)throw menuError(_0x204d20(0x79),_0x204d20(0x6f)+_0x2b5544+'\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20'+_0x33afcd+'.',_0x204d20(0xa5)+MAX_MENU_SORT+',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.');return _0x33afcd+0x1;}export function requireExplicitYes(_0x1e7633){const _0x10f31e=a133_0x220145;if(_0x1e7633[_0x10f31e(0xb0)](_0x10f31e(0xc2)))return;if(!_0x1e7633[_0x10f31e(0xb0)](_0x10f31e(0xc5)))throw menuError(_0x10f31e(0xd6),_0x10f31e(0x7c),_0x10f31e(0xb1));}export async function fetchMutationSnapshot(_0x4e3a94,_0x4a87df,_0x4942c0){const _0x4262ba=a133_0x220145;try{return await fetchMenuSnapshot(_0x4e3a94[_0x4262ba(0xae)],_0x4e3a94['cookie']);}catch(_0x4bc9c4){throw mapMenuApiError(_0x4bc9c4,_0x4262ba(0xa7)+_0x4a87df,_0x4942c0);}}export async function recheckMutationSnapshot(_0x4bea3c,_0x58e687,_0x131a00,_0x162330){const _0x4876c7=a133_0x220145;let _0x1dfb77;try{_0x1dfb77=await fetchMenuSnapshot(_0x4bea3c['appCode'],_0x4bea3c[_0x4876c7(0xad)]);}catch(_0x5364a4){const _0x4b5a7e=mapMenuApiError(_0x5364a4,_0x4876c7(0x70)+_0x131a00,_0x162330);throw menuFailure(_0x4b5a7e,_0x58e687,{'stage':_0x4876c7(0x8f),'failed':_0x162330==null?{}:{'id':_0x162330}});}if(_0x1dfb77['hash']!==_0x58e687['snapshotHash']){const _0x34127a=menuError(_0x4876c7(0xb7),_0x4876c7(0xbb)+_0x131a00+_0x4876c7(0xd0),_0x4876c7(0xd9));throw menuFailure(_0x34127a,_0x58e687,{'stage':_0x4876c7(0x8f),'failed':{..._0x162330==null?{}:{'id':_0x162330},'expectedSnapshotHash':_0x58e687[_0x4876c7(0x7e)],'currentSnapshotHash':_0x1dfb77[_0x4876c7(0xda)]}});}return _0x1dfb77;}export function parseParentId(_0x3af69b,_0x5ce2b7,_0x1dd7b2={}){const _0x3aab15=a133_0x220145;if(!hasFlag(_0x3af69b,_0x5ce2b7)){if(_0x1dd7b2[_0x3aab15(0x91)])throw CliErrors[_0x3aab15(0xa3)](_0x5ce2b7);return undefined;}const _0x185690=_0x3af69b['str'](_0x5ce2b7)[_0x3aab15(0x96)]();if(_0x185690[_0x3aab15(0x84)]()==='root')return null;if(!/^\d+$/[_0x3aab15(0x86)](_0x185690))throw CliErrors['validation']('--'+_0x5ce2b7+_0x3aab15(0x92));const _0x5ca1f6=Number(_0x185690);if(!Number[_0x3aab15(0xba)](_0x5ca1f6)||_0x5ca1f6<=0x0)throw CliErrors[_0x3aab15(0xcc)]('--'+_0x5ce2b7+_0x3aab15(0x92));return _0x5ca1f6;}export function requireMenu(_0x37aec6,_0x5aa993){const _0x4cdde9=a133_0x220145,_0x1ca3d9=_0x37aec6[_0x4cdde9(0x7f)][_0x4cdde9(0x8e)](_0x5aa993);if(!_0x1ca3d9)throw menuError('menu_not_found',_0x4cdde9(0x7b)+_0x5aa993,_0x4cdde9(0x9b));return _0x1ca3d9;}export function requireFolder(_0x4ebcfe,_0x39bf4e){const _0x2008d6=a133_0x220145,_0x230456=requireMenu(_0x4ebcfe,_0x39bf4e);if(_0x230456['type']!==_0x2008d6(0x90))throw menuError(_0x2008d6(0xc3),_0x2008d6(0xc4)+_0x39bf4e+_0x2008d6(0xa0)+(_0x230456[_0x2008d6(0x75)]||_0x2008d6(0xcb))+_0x2008d6(0xcd),_0x2008d6(0xbd));return _0x230456;}export function assertExpectedState(_0x2321df,_0x4dc7a4){const _0x1fc2a6=a133_0x220145;if(hasFlag(_0x2321df,_0x1fc2a6(0xb9))){const _0x3b9448=parseParentId(_0x2321df,_0x1fc2a6(0xb9),{'required':!![]});if(_0x4dc7a4[_0x1fc2a6(0xa6)]!==_0x3b9448)throw stateDrift('Menu\x20'+_0x4dc7a4['id']+_0x1fc2a6(0x9c)+formatParent(_0x3b9448)+_0x1fc2a6(0xd4)+formatParent(_0x4dc7a4[_0x1fc2a6(0xa6)])+'.');}if(hasFlag(_0x2321df,_0x1fc2a6(0xd1))){const _0x41cc75=_0x2321df[_0x1fc2a6(0x9d)](_0x1fc2a6(0xd1));if(_0x4dc7a4[_0x1fc2a6(0x80)]!==_0x41cc75)throw stateDrift(_0x1fc2a6(0xc4)+_0x4dc7a4['id']+_0x1fc2a6(0xc8)+JSON[_0x1fc2a6(0x77)](_0x41cc75)+_0x1fc2a6(0xd4)+JSON[_0x1fc2a6(0x77)](_0x4dc7a4[_0x1fc2a6(0x80)])+'.');}if(hasFlag(_0x2321df,_0x1fc2a6(0x87))){const _0x3f0b33=_0x2321df[_0x1fc2a6(0x98)](_0x1fc2a6(0x87));if(!Number[_0x1fc2a6(0xba)](_0x3f0b33)||_0x3f0b33<0x0)throw CliErrors[_0x1fc2a6(0xcc)](_0x1fc2a6(0xc1));if(_0x4dc7a4[_0x1fc2a6(0x99)]!==_0x3f0b33)throw stateDrift('Menu\x20'+_0x4dc7a4['id']+_0x1fc2a6(0x94)+_0x3f0b33+_0x1fc2a6(0xd4)+_0x4dc7a4[_0x1fc2a6(0x99)]+'.');}}export function assertVerified(_0x42cc31,_0x10974c,_0x50ee25=a133_0x220145(0xb5)){const _0x315dc8=a133_0x220145;if(!_0x42cc31)throw menuError(_0x315dc8(0x8b),_0x10974c,_0x50ee25);}export function mutationResult(_0x452b4e){const _0xcbc465=a133_0x220145;return{'operation':_0x452b4e['operation'],'selector':_0x452b4e[_0xcbc465(0xb8)],'before':_0x452b4e['before'],'after':_0x452b4e[_0xcbc465(0xcf)],'dryRun':_0x452b4e[_0xcbc465(0xa4)],'backend':_0x452b4e[_0xcbc465(0x81)],..._0x452b4e['plannedActions']?{'plannedActions':_0x452b4e['plannedActions']}:{},..._0x452b4e[_0xcbc465(0xdc)]?{'targets':_0x452b4e[_0xcbc465(0xdc)]}:{},..._0x452b4e[_0xcbc465(0x8a)]?{'deleteOrder':_0x452b4e[_0xcbc465(0x8a)]}:{},'snapshotHash':_0x452b4e[_0xcbc465(0x7e)],..._0x452b4e[_0xcbc465(0xd8)]?{'cascade':_0x452b4e['cascade']}:{},..._0x452b4e[_0xcbc465(0xc0)]?{'planFile':_0x452b4e[_0xcbc465(0xc0)]}:{},'succeeded':_0x452b4e['succeeded']??[],'failed':_0x452b4e[_0xcbc465(0x89)]??[],'warnings':_0x452b4e[_0xcbc465(0xb4)]??[],'verification':_0x452b4e['verification'],'error':_0x452b4e[_0xcbc465(0xce)]};}export function menuDryRunResult(_0x81b9e0,_0x8ad03b){return{..._0x81b9e0,..._0x8ad03b};}export function menuFailure(_0x1e69cf,_0x5dbc27,_0x5c5080){const _0x552d85=a133_0x220145,_0xc0602a=mutationResult({..._0x5dbc27,'after':_0x5c5080[_0x552d85(0xcf)]===undefined?_0x5dbc27['after']:_0x5c5080[_0x552d85(0xcf)],'backend':_0x5c5080['backend']??_0x5dbc27[_0x552d85(0x81)],'dryRun':![],'succeeded':_0x5c5080[_0x552d85(0xc7)]??[],'failed':_0x5c5080[_0x552d85(0x9a)]??[{..._0x5c5080[_0x552d85(0x89)]??{},'stage':_0x5c5080[_0x552d85(0x93)],'code':_0x1e69cf[_0x552d85(0x85)],'message':_0x1e69cf[_0x552d85(0x7d)]}],'warnings':[..._0x5dbc27[_0x552d85(0xb4)],..._0x5c5080[_0x552d85(0xb4)]??[]],'verification':_0x5c5080[_0x552d85(0x72)],'error':{'code':_0x1e69cf['code'],'message':_0x1e69cf[_0x552d85(0x7d)],..._0x1e69cf[_0x552d85(0xb3)]?{'hint':_0x1e69cf[_0x552d85(0xb3)]}:{}}});return Object['defineProperty'](_0x1e69cf,_0x552d85(0x7a),{'value':_0xc0602a,'enumerable':!![],'configurable':!![]}),_0x1e69cf;}export function asVerificationError(_0x470e3d,_0x44379c){const _0x1deb22=a133_0x220145;if(_0x470e3d instanceof CliError&&_0x470e3d['code']===_0x1deb22(0x8b))return _0x470e3d;const _0x3a4406=_0x470e3d instanceof Error?_0x470e3d[_0x1deb22(0x7d)]:String(_0x470e3d);return menuError(_0x1deb22(0x8b),''+_0x44379c+(_0x3a4406?':\x20'+_0x3a4406:''),_0x1deb22(0xaf));}export function describeMenuErrorCause(_0x21a43f,_0x3022a7,_0x28d4c5){const _0x3436b8=a133_0x220145,_0x3fa5b4=mapMenuApiError(_0x21a43f,_0x3022a7,_0x28d4c5);return{'causeCode':_0x3fa5b4[_0x3436b8(0x85)],'causeMessage':_0x3fa5b4[_0x3436b8(0x7d)]};}export function hasFlag(_0x4151e4,_0x7ac43e){const _0x20713a=a133_0x220145;return Object[_0x20713a(0x73)][_0x20713a(0x76)][_0x20713a(0x74)](_0x4151e4[_0x20713a(0x9e)],_0x7ac43e)&&_0x4151e4[_0x20713a(0x9e)][_0x7ac43e]!==undefined;}export function toApiParentId(_0x5841b8){return _0x5841b8??0x0;}export function formatParent(_0x116df5){const _0x12f8de=a133_0x220145;return _0x116df5==null?_0x12f8de(0xab):String(_0x116df5);}export function menuError(_0x3f850a,_0x5b0bca,_0x2a5119){return new CliError(_0x3f850a,0x1,_0x5b0bca,_0x2a5119);}export function mapMenuApiError(_0x410318,_0xa9bb58,_0x415729){const _0x239924=a133_0x220145;if(_0x410318 instanceof CliError&&_0x410318[_0x239924(0x85)]!==_0x239924(0xb2))return _0x410318;const _0x2a4be5=_0x410318 instanceof Error?_0x410318[_0x239924(0x7d)]:String(_0x410318);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x239924(0x86)](_0x2a4be5))return menuError('menu_permission_denied',_0x239924(0xbf)+_0xa9bb58+(_0x415729?'\x20menu\x20'+_0x415729:'')+'.',_0x239924(0xd2));return menuError(_0x239924(0xb6),'Failed\x20to\x20'+_0xa9bb58+(_0x415729?_0x239924(0xac)+_0x415729:'')+':\x20'+_0x2a4be5,_0x239924(0x97));}export function isMenuResponseLoss(_0x2c5808){const _0x363caf=a133_0x220145,_0x499023=_0x2c5808 instanceof Error?_0x2c5808[_0x363caf(0x7d)]:String(_0x2c5808);if(_0x2c5808 instanceof CliError)return _0x2c5808[_0x363caf(0x85)]===_0x363caf(0xb2)&&/^Request (?:failed|timeout):/i[_0x363caf(0x86)](_0x499023);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x363caf(0x86)](_0x499023);}function stateDrift(_0x54bacf){const _0x466667=a133_0x220145;return menuError(_0x466667(0xb7),_0x54bacf,_0x466667(0x6e));}
|
|
1
|
+
const a133_0x4aa3b6=a133_0x529b;(function(_0x32139d,_0x367861){const _0x30fa79=a133_0x529b,_0x553372=_0x32139d();while(!![]){try{const _0x4f07f1=parseInt(_0x30fa79(0x156))/0x1+-parseInt(_0x30fa79(0x1b1))/0x2*(parseInt(_0x30fa79(0x1a1))/0x3)+parseInt(_0x30fa79(0x1a6))/0x4+-parseInt(_0x30fa79(0x1a8))/0x5+parseInt(_0x30fa79(0x194))/0x6+parseInt(_0x30fa79(0x1a7))/0x7*(parseInt(_0x30fa79(0x195))/0x8)+-parseInt(_0x30fa79(0x197))/0x9;if(_0x4f07f1===_0x367861)break;else _0x553372['push'](_0x553372['shift']());}catch(_0x147d57){_0x553372['push'](_0x553372['shift']());}}}(a133_0xe64a,0x71d3f));function a133_0xe64a(){const _0x2cfa6c=['expect-parent-id','2068848hZhOPS','1150296TBqdJL','4129380aXuoWp','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','Failed\x20to\x20',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','Sibling\x20sort\x20value\x20(non-negative\x20integer)','byId','menu_not_found','stage','recheck\x20online\x20menu\x20facts\x20before\x20','2RpDDEw','sort','Online\x20menu\x20not\x20found:\x20','test','trim','string','menu_sort_invalid','menu_parent_not_folder','validation','Cannot\x20append\x20a\x20','required','isSafeInteger','901074cCYlnm','\x20menu\x20','filter','num','rawFlags','stringify','code','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','read\x20online\x20menu\x20facts\x20before\x20','hint','appCode','deleteOrder','\x20parent\x20changed:\x20expected\x20','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','childrenCount','number','toLowerCase','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','Menu\x20','hasOwnProperty','hash','menu_mutation_failed','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','parent-id','warnings','data','error','message','planFile','type','cookie','snapshotHash','call','backend',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','path','str','\x20path\x20changed:\x20expected\x20','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','cascade','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','parentId','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','menu_permission_denied','Reorder\x20sibling\x20menus\x20below\x20','succeeded','map','menu_verification_failed','verification','menu_confirmation_required','plannedActions','failedRecords','expected-children-count','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','expect-path','unknown','menu_state_drift','5098158hqdwxL','8fIIMxM','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','4920525aqshXI','Online\x20menu\x20state\x20changed\x20before\x20',',\x20current\x20','operation','targets','failed','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','root','flagMissing','1780401EEXiET','after','defineProperty','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.'];a133_0xe64a=function(){return _0x2cfa6c;};return a133_0xe64a();}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':a133_0x4aa3b6(0x168),'required':!![],'description':'Exact\x20online\x20menu\x20id'};export const MENU_SORT_FLAG={'name':a133_0x4aa3b6(0x14b),'type':a133_0x4aa3b6(0x168),'description':a133_0x4aa3b6(0x1ac)};export const MENU_PARENT_ID_FLAG={'name':a133_0x4aa3b6(0x170),'type':a133_0x4aa3b6(0x14f),'description':a133_0x4aa3b6(0x181)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':'expect-parent-id','type':a133_0x4aa3b6(0x14f),'description':a133_0x4aa3b6(0x15d)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a133_0x4aa3b6(0x191),'type':a133_0x4aa3b6(0x14f),'description':a133_0x4aa3b6(0x196)},{'name':a133_0x4aa3b6(0x18f),'type':a133_0x4aa3b6(0x168),'description':a133_0x4aa3b6(0x183)}];export function validateExactId(_0x26b09c){const _0x5b342f=a133_0x4aa3b6,_0x5a1ab1=_0x26b09c[_0x5b342f(0x159)]('id');if(!Number[_0x5b342f(0x155)](_0x5a1ab1)||_0x5a1ab1<=0x0)throw CliErrors['validation'](_0x5b342f(0x190));return _0x5a1ab1;}export function validateSort(_0x451e62,_0x36cbc8='sort'){const _0x324976=a133_0x4aa3b6;if(!hasFlag(_0x451e62,_0x36cbc8))return undefined;const _0x2175d=_0x451e62[_0x324976(0x159)](_0x36cbc8);if(!Number['isSafeInteger'](_0x2175d)||_0x2175d<0x0||_0x2175d>MAX_MENU_SORT)throw menuError(_0x324976(0x150),'--'+_0x36cbc8+_0x324976(0x16f)+MAX_MENU_SORT+'.',_0x324976(0x16a));return _0x2175d;}export function nextSiblingSort(_0x88b29,_0x5c7391,_0x5a6f1c){const _0x23fc67=a133_0x4aa3b6,_0x459541=getChildren(_0x88b29,_0x5c7391)[_0x23fc67(0x189)](_0x4b2dc0=>_0x4b2dc0[_0x23fc67(0x14b)])[_0x23fc67(0x158)](_0x2b3d13=>typeof _0x2b3d13===_0x23fc67(0x168));if(_0x459541['length']===0x0)return 0x0;const _0x21a2c0=Math['max'](..._0x459541);if(_0x21a2c0>=MAX_MENU_SORT)throw menuError('menu_sort_overflow',_0x23fc67(0x153)+_0x5a6f1c+_0x23fc67(0x19e)+_0x21a2c0+'.',_0x23fc67(0x187)+MAX_MENU_SORT+_0x23fc67(0x17b));return _0x21a2c0+0x1;}export function requireExplicitYes(_0x42c567){const _0x297e1b=a133_0x4aa3b6;if(_0x42c567['bool']('dry-run'))return;if(!_0x42c567['bool']('yes'))throw menuError(_0x297e1b(0x18c),_0x297e1b(0x19d),_0x297e1b(0x17f));}export async function fetchMutationSnapshot(_0x393563,_0x449b5a,_0x295f41){const _0x242138=a133_0x4aa3b6;try{return await fetchMenuSnapshot(_0x393563[_0x242138(0x160)],_0x393563['cookie']);}catch(_0x3a16c2){throw mapMenuApiError(_0x3a16c2,_0x242138(0x15e)+_0x449b5a,_0x295f41);}}export async function recheckMutationSnapshot(_0x18c297,_0x5ce92f,_0x2cd9f6,_0x49d130){const _0x5689ac=a133_0x4aa3b6;let _0x355191;try{_0x355191=await fetchMenuSnapshot(_0x18c297[_0x5689ac(0x160)],_0x18c297[_0x5689ac(0x177)]);}catch(_0x4765e5){const _0x1f4fa8=mapMenuApiError(_0x4765e5,_0x5689ac(0x1b0)+_0x2cd9f6,_0x49d130);throw menuFailure(_0x1f4fa8,_0x5ce92f,{'stage':'pre-write-recheck','failed':_0x49d130==null?{}:{'id':_0x49d130}});}if(_0x355191['hash']!==_0x5ce92f['snapshotHash']){const _0x487406=menuError(_0x5689ac(0x193),_0x5689ac(0x198)+_0x2cd9f6+_0x5689ac(0x1ab),_0x5689ac(0x1a4));throw menuFailure(_0x487406,_0x5ce92f,{'stage':'pre-write-recheck','failed':{..._0x49d130==null?{}:{'id':_0x49d130},'expectedSnapshotHash':_0x5ce92f[_0x5689ac(0x178)],'currentSnapshotHash':_0x355191[_0x5689ac(0x16d)]}});}return _0x355191;}export function parseParentId(_0x4f87d6,_0x522261,_0x2acabf={}){const _0x1c45ee=a133_0x4aa3b6;if(!hasFlag(_0x4f87d6,_0x522261)){if(_0x2acabf[_0x1c45ee(0x154)])throw CliErrors[_0x1c45ee(0x1a0)](_0x522261);return undefined;}const _0x4a653a=_0x4f87d6[_0x1c45ee(0x17d)](_0x522261)[_0x1c45ee(0x14e)]();if(_0x4a653a[_0x1c45ee(0x169)]()===_0x1c45ee(0x19f))return null;if(!/^\d+$/['test'](_0x4a653a))throw CliErrors['validation']('--'+_0x522261+_0x1c45ee(0x163));const _0x5b187c=Number(_0x4a653a);if(!Number[_0x1c45ee(0x155)](_0x5b187c)||_0x5b187c<=0x0)throw CliErrors['validation']('--'+_0x522261+'\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.');return _0x5b187c;}export function requireMenu(_0x57a39d,_0x2009fc){const _0x5b9465=a133_0x4aa3b6,_0x209df6=_0x57a39d[_0x5b9465(0x1ad)]['get'](_0x2009fc);if(!_0x209df6)throw menuError(_0x5b9465(0x1ae),_0x5b9465(0x14c)+_0x2009fc,_0x5b9465(0x164));return _0x209df6;}export function requireFolder(_0x487974,_0x3f6f96){const _0x3285f9=a133_0x4aa3b6,_0x51a4f1=requireMenu(_0x487974,_0x3f6f96);if(_0x51a4f1[_0x3285f9(0x176)]!=='folder')throw menuError(_0x3285f9(0x151),_0x3285f9(0x16b)+_0x3f6f96+'\x20is\x20type\x20\x22'+(_0x51a4f1['type']||_0x3285f9(0x192))+'\x22,\x20not\x20folder.','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.');return _0x51a4f1;}export function assertExpectedState(_0x1da7ef,_0x5bdd1e){const _0x5f4a4d=a133_0x4aa3b6;if(hasFlag(_0x1da7ef,'expect-parent-id')){const _0x46622a=parseParentId(_0x1da7ef,_0x5f4a4d(0x1a5),{'required':!![]});if(_0x5bdd1e['parentId']!==_0x46622a)throw stateDrift(_0x5f4a4d(0x16b)+_0x5bdd1e['id']+_0x5f4a4d(0x162)+formatParent(_0x46622a)+_0x5f4a4d(0x199)+formatParent(_0x5bdd1e[_0x5f4a4d(0x184)])+'.');}if(hasFlag(_0x1da7ef,_0x5f4a4d(0x191))){const _0x10b688=_0x1da7ef[_0x5f4a4d(0x17d)](_0x5f4a4d(0x191));if(_0x5bdd1e[_0x5f4a4d(0x17c)]!==_0x10b688)throw stateDrift(_0x5f4a4d(0x16b)+_0x5bdd1e['id']+_0x5f4a4d(0x17e)+JSON[_0x5f4a4d(0x15b)](_0x10b688)+_0x5f4a4d(0x199)+JSON[_0x5f4a4d(0x15b)](_0x5bdd1e[_0x5f4a4d(0x17c)])+'.');}if(hasFlag(_0x1da7ef,_0x5f4a4d(0x18f))){const _0x5d2459=_0x1da7ef[_0x5f4a4d(0x159)]('expected-children-count');if(!Number[_0x5f4a4d(0x155)](_0x5d2459)||_0x5d2459<0x0)throw CliErrors[_0x5f4a4d(0x152)]('--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x5bdd1e[_0x5f4a4d(0x167)]!==_0x5d2459)throw stateDrift(_0x5f4a4d(0x16b)+_0x5bdd1e['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x5d2459+_0x5f4a4d(0x199)+_0x5bdd1e[_0x5f4a4d(0x167)]+'.');}}export function assertVerified(_0x9ed5b5,_0x4e2a76,_0x58aaef=a133_0x4aa3b6(0x182)){const _0x196aad=a133_0x4aa3b6;if(!_0x9ed5b5)throw menuError(_0x196aad(0x18a),_0x4e2a76,_0x58aaef);}export function mutationResult(_0x1e7905){const _0x348f3a=a133_0x4aa3b6;return{'operation':_0x1e7905[_0x348f3a(0x19a)],'selector':_0x1e7905['selector'],'before':_0x1e7905['before'],'after':_0x1e7905[_0x348f3a(0x1a2)],'dryRun':_0x1e7905['dryRun'],'backend':_0x1e7905[_0x348f3a(0x17a)],..._0x1e7905[_0x348f3a(0x18d)]?{'plannedActions':_0x1e7905['plannedActions']}:{},..._0x1e7905[_0x348f3a(0x19b)]?{'targets':_0x1e7905['targets']}:{},..._0x1e7905[_0x348f3a(0x161)]?{'deleteOrder':_0x1e7905[_0x348f3a(0x161)]}:{},'snapshotHash':_0x1e7905['snapshotHash'],..._0x1e7905[_0x348f3a(0x180)]?{'cascade':_0x1e7905[_0x348f3a(0x180)]}:{},..._0x1e7905[_0x348f3a(0x175)]?{'planFile':_0x1e7905[_0x348f3a(0x175)]}:{},'succeeded':_0x1e7905[_0x348f3a(0x188)]??[],'failed':_0x1e7905[_0x348f3a(0x19c)]??[],'warnings':_0x1e7905[_0x348f3a(0x171)]??[],'verification':_0x1e7905[_0x348f3a(0x18b)],'error':_0x1e7905[_0x348f3a(0x173)]};}export function menuDryRunResult(_0x160898,_0x237bf0){return{..._0x160898,..._0x237bf0};}export function menuFailure(_0x23aa8f,_0xde3d6f,_0x3bd7ce){const _0x1519c9=a133_0x4aa3b6,_0x399adf=mutationResult({..._0xde3d6f,'after':_0x3bd7ce[_0x1519c9(0x1a2)]===undefined?_0xde3d6f['after']:_0x3bd7ce['after'],'backend':_0x3bd7ce['backend']??_0xde3d6f[_0x1519c9(0x17a)],'dryRun':![],'succeeded':_0x3bd7ce[_0x1519c9(0x188)]??[],'failed':_0x3bd7ce[_0x1519c9(0x18e)]??[{..._0x3bd7ce[_0x1519c9(0x19c)]??{},'stage':_0x3bd7ce[_0x1519c9(0x1af)],'code':_0x23aa8f['code'],'message':_0x23aa8f['message']}],'warnings':[..._0xde3d6f[_0x1519c9(0x171)],..._0x3bd7ce[_0x1519c9(0x171)]??[]],'verification':_0x3bd7ce[_0x1519c9(0x18b)],'error':{'code':_0x23aa8f[_0x1519c9(0x15c)],'message':_0x23aa8f['message'],..._0x23aa8f[_0x1519c9(0x15f)]?{'hint':_0x23aa8f[_0x1519c9(0x15f)]}:{}}});return Object[_0x1519c9(0x1a3)](_0x23aa8f,_0x1519c9(0x172),{'value':_0x399adf,'enumerable':!![],'configurable':!![]}),_0x23aa8f;}export function asVerificationError(_0x5192b9,_0x564578){const _0x58f281=a133_0x4aa3b6;if(_0x5192b9 instanceof CliError&&_0x5192b9['code']===_0x58f281(0x18a))return _0x5192b9;const _0x573dfd=_0x5192b9 instanceof Error?_0x5192b9[_0x58f281(0x174)]:String(_0x5192b9);return menuError(_0x58f281(0x18a),''+_0x564578+(_0x573dfd?':\x20'+_0x573dfd:''),_0x58f281(0x165));}export function describeMenuErrorCause(_0x1929cf,_0x1ad61b,_0x1d98ac){const _0x48333a=a133_0x4aa3b6,_0x13ef45=mapMenuApiError(_0x1929cf,_0x1ad61b,_0x1d98ac);return{'causeCode':_0x13ef45[_0x48333a(0x15c)],'causeMessage':_0x13ef45[_0x48333a(0x174)]};}export function hasFlag(_0x32c113,_0x5b21cf){const _0x1383d0=a133_0x4aa3b6;return Object['prototype'][_0x1383d0(0x16c)][_0x1383d0(0x179)](_0x32c113[_0x1383d0(0x15a)],_0x5b21cf)&&_0x32c113[_0x1383d0(0x15a)][_0x5b21cf]!==undefined;}export function toApiParentId(_0x95827e){return _0x95827e??0x0;}export function formatParent(_0x1da68d){const _0x2e71eb=a133_0x4aa3b6;return _0x1da68d==null?_0x2e71eb(0x19f):String(_0x1da68d);}export function menuError(_0x371ba0,_0x16b9f5,_0x13485b){return new CliError(_0x371ba0,0x1,_0x16b9f5,_0x13485b);}export function mapMenuApiError(_0x412a3f,_0x3db4bd,_0x5d8a36){const _0x1f1ff7=a133_0x4aa3b6;if(_0x412a3f instanceof CliError&&_0x412a3f['code']!=='api_error')return _0x412a3f;const _0x5c93a4=_0x412a3f instanceof Error?_0x412a3f[_0x1f1ff7(0x174)]:String(_0x412a3f);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x1f1ff7(0x14d)](_0x5c93a4))return menuError(_0x1f1ff7(0x186),'Permission\x20denied\x20while\x20attempting\x20to\x20'+_0x3db4bd+(_0x5d8a36?_0x1f1ff7(0x157)+_0x5d8a36:'')+'.',_0x1f1ff7(0x185));return menuError(_0x1f1ff7(0x16e),_0x1f1ff7(0x1aa)+_0x3db4bd+(_0x5d8a36?_0x1f1ff7(0x157)+_0x5d8a36:'')+':\x20'+_0x5c93a4,_0x1f1ff7(0x166));}function a133_0x529b(_0x29a366,_0xe521a2){_0x29a366=_0x29a366-0x14b;const _0xe64a92=a133_0xe64a();let _0x529b9f=_0xe64a92[_0x29a366];return _0x529b9f;}export function isMenuResponseLoss(_0x5395c){const _0x45aa24=a133_0x4aa3b6,_0x320f91=_0x5395c instanceof Error?_0x5395c[_0x45aa24(0x174)]:String(_0x5395c);if(_0x5395c instanceof CliError)return _0x5395c[_0x45aa24(0x15c)]==='api_error'&&/^Request (?:failed|timeout):/i[_0x45aa24(0x14d)](_0x320f91);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x45aa24(0x14d)](_0x320f91);}function stateDrift(_0x2e2a64){const _0x2a13c7=a133_0x4aa3b6;return menuError(_0x2a13c7(0x193),_0x2e2a64,_0x2a13c7(0x1a9));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ca4cb,_0x4a176d){const _0x270109=a134_0x4587,_0x388b9a=_0x4ca4cb();while(!![]){try{const _0x33d2e6=parseInt(_0x270109(0x1a1))/0x1+-parseInt(_0x270109(0x18f))/0x2*(-parseInt(_0x270109(0x189))/0x3)+parseInt(_0x270109(0x197))/0x4*(-parseInt(_0x270109(0x1a5))/0x5)+-parseInt(_0x270109(0x194))/0x6+parseInt(_0x270109(0x195))/0x7*(-parseInt(_0x270109(0x198))/0x8)+-parseInt(_0x270109(0x1a0))/0x9*(-parseInt(_0x270109(0x19f))/0xa)+parseInt(_0x270109(0x18a))/0xb;if(_0x33d2e6===_0x4a176d)break;else _0x388b9a['push'](_0x388b9a['shift']());}catch(_0x2398b0){_0x388b9a['push'](_0x388b9a['shift']());}}}(a134_0x5042,0x3048f));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 a134_0x5ea92f,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0xfcec26,_0x1a890b){const _0x44b8e7=a134_0x4587,_0x1c8b5b=getEnv();logger['info'](_0x44b8e7(0x19c),isProduction(_0x1c8b5b)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0xfcec26+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0xfcec26+')');const _0x4e0afb=await fetchMenuSnapshot(_0xfcec26,_0x1a890b,{'verbose':!![]});return logger[_0x44b8e7(0x18d)]('get-online-menu-list',_0x44b8e7(0x19e)+_0x4e0afb[_0x44b8e7(0x193)]+'\x20online\x20menus\x20successfully'),_0x4e0afb[_0x44b8e7(0x1a3)][_0x44b8e7(0x18e)](toProcessedMenuItem);}function a134_0x5042(){const _0x51a2e4=['Create\x20menu\x20\x22','Fetched\x20','107030NTyvoE','9VruveO','290955JPVeHr','Updating\x20menu\x20asset\x20links:\x20','menus','\x20menu','5ZkpWyl','\x20menu\x20group(s)','path','create-menu','resources','create-menus','length','Menu\x20assets\x20synced:\x20','351IgvxsX','273922hbpymP','Update\x20menu\x20','menuGroups','info','map','3342hpIwII','Regroup\x20','stringify','Batch\x20menu\x20creation\x20completed,\x20total\x20','total','22212EqGGal','236411tAYFAy','update-menu-cdn-url','1147268SlHnxp','8DlwBHR','label','Menu\x20created\x20successfully:\x20','loadScriptMode','get-online-menu-list'];a134_0x5042=function(){return _0x51a2e4;};return a134_0x5042();}export async function createMenu(_0x46cf5e,_0xb8467e,_0x4cc569){const _0x2d64d5=a134_0x4587;logger[_0x2d64d5(0x18d)](_0x2d64d5(0x1a8),'Creating\x20menu:\x20'+_0x4cc569[_0x2d64d5(0x199)]+'\x20('+_0x4cc569[_0x2d64d5(0x1a7)]+')');const _0xe1e6f2={'appCode':_0x46cf5e,'type':'procode','sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x4cc569[_0x2d64d5(0x185)]?JSON[_0x2d64d5(0x191)](_0x4cc569[_0x2d64d5(0x185)]):undefined},..._0x4cc569},_0x43ca65=await createMenuRecord(_0xe1e6f2,_0xb8467e,'Create\x20menu\x20\x22'+_0x4cc569[_0x2d64d5(0x199)]+'\x22');return logger[_0x2d64d5(0x18d)](_0x2d64d5(0x1a8),_0x2d64d5(0x19a)+_0x4cc569['label']),_0x43ca65;}async function createSingleMenu(_0x3d4835,_0x288de1,_0x1397bb,_0x513091){const _0x2dbbf1=a134_0x4587,_0x44c891={'appCode':_0x3d4835,'type':'procode','sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x513091?JSON['stringify'](_0x513091):undefined},'label':_0x1397bb[_0x2dbbf1(0x199)],'path':_0x1397bb[_0x2dbbf1(0x1a7)]},_0x45cb40=await createMenuRecord(_0x44c891,_0x288de1,_0x2dbbf1(0x19d)+_0x1397bb[_0x2dbbf1(0x199)]+'\x22');return logger[_0x2dbbf1(0x18d)](_0x2dbbf1(0x1a8),_0x2dbbf1(0x19a)+_0x1397bb['label']),_0x45cb40;}export async function createMenus(_0x532427,_0x37b393,_0x566e2f,_0x298024){const _0x5b3c94=a134_0x4587;logger[_0x5b3c94(0x18d)](_0x5b3c94(0x186),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x566e2f[_0x5b3c94(0x187)]);const _0x396b19=await Promise['all'](_0x566e2f[_0x5b3c94(0x18e)](_0x4998bf=>createSingleMenu(_0x532427,_0x37b393,_0x4998bf,_0x298024)));return logger[_0x5b3c94(0x18d)](_0x5b3c94(0x186),_0x5b3c94(0x192)+_0x566e2f['length']),_0x396b19;}export async function updateMenuCdnUrl(_0xae1f21,_0x5db1cb,_0x1f3627){const _0x18fcfa=a134_0x4587;logger[_0x18fcfa(0x18d)](_0x18fcfa(0x196),_0x18fcfa(0x1a2)+_0x1f3627['label']+'\x20('+_0x1f3627[_0x18fcfa(0x1a7)]+')');const _0x5cab35={'id':_0x1f3627['id'],'appCode':_0xae1f21,'extend':{..._0x1f3627['extend']??{},..._0x1f3627[_0x18fcfa(0x19b)]?{'loadScriptMode':_0x1f3627[_0x18fcfa(0x19b)]}:{},'resources':_0x1f3627[_0x18fcfa(0x185)]?JSON[_0x18fcfa(0x191)](_0x1f3627['resources']):undefined}},_0x1789fb=await updateMenuRecord(_0x5cab35,_0x5db1cb,'Update\x20menu\x20assets\x20\x22'+_0x1f3627[_0x18fcfa(0x199)]+'\x22');return logger[_0x18fcfa(0x18d)](_0x18fcfa(0x196),_0x18fcfa(0x188)+_0x1f3627[_0x18fcfa(0x199)],undefined),_0x1789fb;}export async function createMenuEntity(_0x278c4b,_0x5c0e90,_0x47fe17){const _0x72924a=a134_0x4587;return createMenuRecord({'appCode':_0x278c4b,..._0x47fe17},_0x5c0e90,_0x72924a(0x19d)+_0x47fe17[_0x72924a(0x199)]+'\x22');}export async function updateMenuEntity(_0x1a02b2,_0x12e6d0,_0x42dcda){const _0x23da31=a134_0x4587;return updateMenuRecord({'appCode':_0x1a02b2,..._0x42dcda},_0x12e6d0,_0x23da31(0x18b)+_0x42dcda['id']);}function a134_0x4587(_0x4c8b68,_0x326167){_0x4c8b68=_0x4c8b68-0x185;const _0x50424d=a134_0x5042();let _0x45871b=_0x50424d[_0x4c8b68];return _0x45871b;}export async function batchDeleteMenuEntities(_0x2ca87e,_0x5d06bf){const _0x21bae8=a134_0x4587;return batchDeleteMenuRecords(_0x5d06bf,_0x2ca87e,'Delete\x20'+_0x5d06bf[_0x21bae8(0x187)]+_0x21bae8(0x1a4)+(_0x5d06bf[_0x21bae8(0x187)]===0x1?'':'s'));}export async function startMenuRegroup(_0x216ed0,_0x197c00){const _0x4f29f7=a134_0x4587;return a134_0x5ea92f(_0x197c00,_0x216ed0,_0x4f29f7(0x190)+_0x197c00[_0x4f29f7(0x18c)][_0x4f29f7(0x187)]+_0x4f29f7(0x1a6));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a135_0x35d5e5=a135_0x5072;(function(_0x4cd90e,_0x5e14df){const _0x260e00=a135_0x5072,_0x21e558=_0x4cd90e();while(!![]){try{const _0x10704c=-parseInt(_0x260e00(0x115))/0x1*(-parseInt(_0x260e00(0x10b))/0x2)+-parseInt(_0x260e00(0x111))/0x3*(parseInt(_0x260e00(0x12f))/0x4)+-parseInt(_0x260e00(0x123))/0x5+parseInt(_0x260e00(0x117))/0x6*(-parseInt(_0x260e00(0x125))/0x7)+parseInt(_0x260e00(0x114))/0x8+parseInt(_0x260e00(0x11b))/0x9+parseInt(_0x260e00(0x108))/0xa;if(_0x10704c===_0x5e14df)break;else _0x21e558['push'](_0x21e558['shift']());}catch(_0x1ec982){_0x21e558['push'](_0x21e558['shift']());}}}(a135_0x316c,0xd5de4));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a135_0x5072(_0x456ec0,_0x56e86b){_0x456ec0=_0x456ec0-0x106;const _0x316c79=a135_0x316c();let _0x507213=_0x316c79[_0x456ec0];return _0x507213;}import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a135_0x35d5e5(0x116),a135_0x35d5e5(0x12d)]);function validateParams(_0x54fa94){const _0x22cda3=a135_0x35d5e5,_0x5a01ae=[];return _0x54fa94[_0x22cda3(0x116)]&&!isValidJsHttpsUrl(_0x54fa94[_0x22cda3(0x116)])&&_0x5a01ae['push']({'field':'jsUrl','message':_0x22cda3(0x128)}),_0x54fa94[_0x22cda3(0x12d)]&&!isValidCssHttpsUrl(_0x54fa94['cssUrl'])&&_0x5a01ae[_0x22cda3(0x12a)]({'field':_0x22cda3(0x12d),'message':_0x22cda3(0x112)}),_0x5a01ae;}export async function runMenuSyncCore(_0x337e,_0x3a2a4b,_0x464c68=[],_0x1c7af2,_0xf7d4a5={}){const _0x502521=a135_0x35d5e5,_0x35b6db=parseMenuSyncParams(_0x1c7af2),_0x45a08c=[...new Set(_0x464c68[_0x502521(0x12b)](_0x2c4e26=>_0x2c4e26[_0x502521(0x10f)]())[_0x502521(0x124)](Boolean))],_0x2e906=_0x35b6db[_0x502521(0x116)],_0x46e26c=_0x35b6db[_0x502521(0x12d)],_0x367b66=[];if(_0x2e906)_0x367b66['push'](_0x2e906);if(_0x46e26c)_0x367b66[_0x502521(0x12a)](_0x46e26c);const _0x204b6e=validateParams(_0x35b6db);if(_0x204b6e[_0x502521(0x10a)]>0x0){const _0x8b03c2=_0x204b6e['map'](_0x3d2af7=>_0x502521(0x109)+_0x3d2af7['field']+':\x20'+_0x3d2af7['message'])[_0x502521(0x121)](';\x20');throw new Error(_0x502521(0x120)+_0x8b03c2);}logger[_0x502521(0x107)](process[_0x502521(0x113)]()),logger['info'](_0x502521(0x12c),_0x502521(0x119),{'appCode':_0x337e,'selectedCount':_0x45a08c['length'],'jsUrl':_0x2e906,'cssUrl':_0x46e26c});if(_0x2e906){const _0x3bbe20=await isUrlReachable(_0x2e906);if(!_0x3bbe20)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x2e906);}if(_0x46e26c){const _0x1fcf1d=await isUrlReachable(_0x46e26c);if(!_0x1fcf1d)throw new Error(_0x502521(0x12e)+_0x46e26c);}const _0x254d81=getLocalPages();if(_0x254d81[_0x502521(0x10a)]===0x0){if(_0x45a08c[_0x502521(0x10a)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x45a08c[_0x502521(0x121)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0xf7d4a5[_0x502521(0x106)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x1ec02e=await getOnlineMenuList(_0x337e,_0x3a2a4b),_0x1a0d70=new Set(_0x1ec02e[_0x502521(0x12b)](_0x53abce=>_0x53abce[_0x502521(0x129)]));let _0x3ec77b;if(_0x45a08c[_0x502521(0x10a)]>0x0){const _0xb8d2b6=new Map(_0x254d81[_0x502521(0x12b)](_0xe8b673=>[_0xe8b673[_0x502521(0x129)],_0xe8b673])),_0xd1704c=_0x45a08c[_0x502521(0x124)](_0x53732f=>!_0xb8d2b6[_0x502521(0x127)](_0x53732f));if(_0xd1704c['length']>0x0){const _0x505b03=_0x254d81['map'](_0x52512d=>_0x52512d[_0x502521(0x129)])[_0x502521(0x121)](',\x20');throw new Error(_0x502521(0x11c)+_0xd1704c[_0x502521(0x121)](',\x20')+_0x502521(0x10e)+_0x505b03);}const _0x1bd241=_0x45a08c[_0x502521(0x124)](_0x1d0c35=>_0x1a0d70[_0x502521(0x127)](_0x1d0c35));if(_0x1bd241[_0x502521(0x10a)]>0x0)throw new Error(_0x502521(0x11f)+_0x1bd241[_0x502521(0x121)](',\x20'));_0x3ec77b=_0x45a08c[_0x502521(0x12b)](_0x31b168=>_0xb8d2b6[_0x502521(0x110)](_0x31b168));}else _0x3ec77b=_0x254d81[_0x502521(0x124)](_0x511931=>!_0x1a0d70[_0x502521(0x127)](_0x511931['path']));if(_0x3ec77b['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0xf7d4a5[_0x502521(0x106)]===!![],'targetPages':[],'plannedMenus':[]};const _0x3bb353=_0x3ec77b['map'](_0x303ff4=>({'type':'procode','path':_0x303ff4['path'],'label':_0x303ff4[_0x502521(0x130)],'loadScriptMode':_0x502521(0x126),'resources':[..._0x367b66]}));if(_0xf7d4a5['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x3ec77b,'plannedMenus':_0x3bb353};const _0x227383=await createMenus(_0x337e,_0x3a2a4b,_0x3ec77b,_0x367b66[_0x502521(0x10a)]>0x0?_0x367b66:undefined);return logger[_0x502521(0x122)](_0x502521(0x12c),_0x502521(0x10c),{'count':_0x3ec77b['length'],'resources':_0x367b66}),{'created':_0x227383[_0x502521(0x10a)],'skipped':![],'dryRun':![],'targetPages':_0x3ec77b,'plannedMenus':_0x3bb353,'menus':_0x227383};}export function parseMenuSyncParams(_0x25b933){const _0xa0b5f1=a135_0x35d5e5;if(!_0x25b933||typeof _0x25b933!=='string')return{};let _0x2222f9;try{_0x2222f9=JSON['parse'](_0x25b933);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x2222f9!=='object'||_0x2222f9===null||Array['isArray'](_0x2222f9))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x54e23e=_0x2222f9;if(Object[_0xa0b5f1(0x10d)](_0x54e23e,_0xa0b5f1(0x11a)))throw new Error(_0xa0b5f1(0x11e));const _0x4cd319=Object[_0xa0b5f1(0x131)](_0x54e23e)['filter'](_0x5615b1=>!MENU_SYNC_PARAM_KEYS[_0xa0b5f1(0x127)](_0x5615b1));if(_0x4cd319[_0xa0b5f1(0x10a)]>0x0)throw new Error(_0xa0b5f1(0x118)+_0x4cd319[_0xa0b5f1(0x121)](',\x20')+'.');for(const _0x1b9b38 of MENU_SYNC_PARAM_KEYS){const _0x426102=_0x54e23e[_0x1b9b38];if(_0x426102!==undefined&&(typeof _0x426102!=='string'||_0x426102[_0xa0b5f1(0x10f)]()===''))throw new Error('Invalid\x20--params.'+_0x1b9b38+':\x20expected\x20a\x20non-empty\x20string.');}return{'jsUrl':typeof _0x54e23e[_0xa0b5f1(0x116)]===_0xa0b5f1(0x11d)?_0x54e23e[_0xa0b5f1(0x116)][_0xa0b5f1(0x10f)]():undefined,'cssUrl':typeof _0x54e23e['cssUrl']===_0xa0b5f1(0x11d)?_0x54e23e['cssUrl']['trim']():undefined};}function a135_0x316c(){const _0x312d6a=['16650250wFBqdG','--params.','length','2gZZjZj','Menu\x20sync\x20completed','hasOwn','\x0a\x20\x20Available\x20local\x20paths:\x20','trim','get','3LBHogz','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','cwd','4702424kleXzU','421066EwVPCA','jsUrl','54kqjHOR','Invalid\x20--params\x20fields:\x20','Start\x20non-interactive\x20menu\x20sync','pages','3950100iPvrTu','No\x20local\x20pages\x20matched\x20paths:\x20','string','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','Invalid\x20--params:\x20','join','info','1315860apwkGA','filter','238651URBwoG','import','has','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','path','push','map','menu-sync','cssUrl','CSS\x20URL\x20is\x20unreachable:\x20','6667124mshZpP','label','keys','dryRun','setLogPath'];a135_0x316c=function(){return _0x312d6a;};return a135_0x316c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5ebd4f,_0x4f072f){const _0x3210b1=a137_0x537f,_0xf241de=_0x5ebd4f();while(!![]){try{const _0x1c0746=parseInt(_0x3210b1(0x134))/0x1+parseInt(_0x3210b1(0x10f))/0x2+-parseInt(_0x3210b1(0x118))/0x3*(parseInt(_0x3210b1(0x120))/0x4)+parseInt(_0x3210b1(0x117))/0x5+-parseInt(_0x3210b1(0x137))/0x6+parseInt(_0x3210b1(0x140))/0x7+-parseInt(_0x3210b1(0x14f))/0x8*(parseInt(_0x3210b1(0x11d))/0x9);if(_0x1c0746===_0x4f072f)break;else _0xf241de['push'](_0xf241de['shift']());}catch(_0xc02a42){_0xf241de['push'](_0xf241de['shift']());}}}(a137_0x57ab,0x7fbe9));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 a137_0x537f(_0x1b1d60,_0x3bf2d8){_0x1b1d60=_0x1b1d60-0x10f;const _0x57ab0b=a137_0x57ab();let _0x537f4b=_0x57ab0b[_0x1b1d60];return _0x537f4b;}function validateParams(_0x370393){const _0x156d82=a137_0x537f,_0x3b53ca=[];return _0x370393['jsUrl']&&!isValidJsHttpsUrl(_0x370393[_0x156d82(0x151)])&&_0x3b53ca[_0x156d82(0x132)]({'field':'jsUrl','message':_0x156d82(0x142)}),_0x370393[_0x156d82(0x12a)]&&!isValidCssHttpsUrl(_0x370393[_0x156d82(0x12a)])&&_0x3b53ca['push']({'field':_0x156d82(0x12a),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x3b53ca;}export async function runMenuUpdateCore(_0x5702d9,_0x5de001,_0x1e67b1,_0x2ee7cf={}){const _0x2d11d7=a137_0x537f,_0x261087=parseUpdateParamsFlag(_0x1e67b1),_0x43e99b=normalizeMode(_0x2ee7cf[_0x2d11d7(0x11f)]);validateSelection(_0x2ee7cf[_0x2d11d7(0x141)]);const _0x3fa1c5=[];if(_0x261087[_0x2d11d7(0x151)])_0x3fa1c5[_0x2d11d7(0x132)](_0x261087[_0x2d11d7(0x151)]);if(_0x261087[_0x2d11d7(0x12a)])_0x3fa1c5[_0x2d11d7(0x132)](_0x261087['cssUrl']);const _0x1a7425=validateParams(_0x261087);if(_0x1a7425[_0x2d11d7(0x125)]>0x0){const _0x1b342f=_0x1a7425[_0x2d11d7(0x11c)](_0x532c4d=>_0x2d11d7(0x133)+_0x532c4d[_0x2d11d7(0x12b)]+':\x20'+_0x532c4d['message'])[_0x2d11d7(0x14a)](';\x20');throw new Error(_0x2d11d7(0x126)+_0x1b342f);}if(_0x3fa1c5['length']===0x0)throw new Error(_0x2d11d7(0x135)+_0x2d11d7(0x124));logger[_0x2d11d7(0x139)](process[_0x2d11d7(0x136)]()),logger['info'](_0x2d11d7(0x13d),_0x2d11d7(0x12e),{'appCode':_0x5702d9,'jsUrl':_0x261087['jsUrl'],'cssUrl':_0x261087['cssUrl'],'mode':_0x43e99b,'dryRun':_0x2ee7cf[_0x2d11d7(0x149)]===!![]});if(_0x261087[_0x2d11d7(0x151)]){const _0x3e78cd=await isUrlReachable(_0x261087[_0x2d11d7(0x151)]);if(!_0x3e78cd)throw new Error(_0x2d11d7(0x122)+_0x261087[_0x2d11d7(0x151)]);}if(_0x261087[_0x2d11d7(0x12a)]){const _0x1a6bdb=await isUrlReachable(_0x261087[_0x2d11d7(0x12a)]);if(!_0x1a6bdb)throw new Error(_0x2d11d7(0x13a)+_0x261087[_0x2d11d7(0x12a)]);}const _0x166561=await getOnlineMenuList(_0x5702d9,_0x5de001),_0x380d5e=_0x166561[_0x2d11d7(0x145)](_0x3a90f2=>_0x3a90f2[_0x2d11d7(0x114)]['length']>0x0),_0x1ce281=selectMenusForUpdate(_0x380d5e,_0x2ee7cf[_0x2d11d7(0x141)]);if(_0x1ce281[_0x2d11d7(0x125)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x2ee7cf[_0x2d11d7(0x149)]===!![]};const _0x130427=_0x1ce281[_0x2d11d7(0x11c)](_0x548d12=>buildMenuUpdateDiff(_0x548d12,_0x261087,_0x43e99b,_0x2ee7cf[_0x2d11d7(0x143)]===!![],_0x2ee7cf[_0x2d11d7(0x14e)]));if(_0x2ee7cf[_0x2d11d7(0x149)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x130427};const _0x27e7f6=await Promise['allSettled'](_0x1ce281[_0x2d11d7(0x11c)]((_0x13b450,_0x37db11)=>updateMenuCdnUrl(_0x5702d9,_0x5de001,{'id':_0x13b450['id'],'label':_0x13b450['label'],'path':_0x13b450[_0x2d11d7(0x111)],'resources':_0x130427[_0x37db11]['after'][_0x2d11d7(0x114)],'extend':_0x13b450[_0x2d11d7(0x13e)]??null,'loadScriptMode':_0x2ee7cf[_0x2d11d7(0x14e)]}))),_0x34ab4d=_0x27e7f6[_0x2d11d7(0x145)](_0x31db16=>_0x31db16[_0x2d11d7(0x131)]===_0x2d11d7(0x138))[_0x2d11d7(0x11c)](_0x3af10b=>_0x3af10b[_0x2d11d7(0x112)]),_0x3e4ff7=_0x27e7f6[_0x2d11d7(0x145)](_0x494c98=>_0x494c98[_0x2d11d7(0x131)]==='rejected')[_0x2d11d7(0x125)];return logger[_0x2d11d7(0x14c)]('menu-asset-update',_0x2d11d7(0x115),{'count':_0x1ce281['length'],'resources':_0x3fa1c5}),{'updated':_0x34ab4d['length'],'failed':_0x3e4ff7,'skipped':![],'menus':_0x34ab4d};}function validateSelection(_0x3c4110){const _0x46ca80=a137_0x537f;if(!_0x3c4110)throw new Error(_0x46ca80(0x13b));if(_0x3c4110[_0x46ca80(0x123)]&&(_0x3c4110['menuIds']['length']>0x0||_0x3c4110['paths']['length']>0x0))throw new Error(_0x46ca80(0x129));if(!_0x3c4110[_0x46ca80(0x123)]&&_0x3c4110[_0x46ca80(0x147)]['length']===0x0&&_0x3c4110[_0x46ca80(0x130)]['length']===0x0)throw new Error(_0x46ca80(0x13b));}export function selectMenusForUpdate(_0x4059d5,_0x9c3a20){const _0x1eb4fd=a137_0x537f;validateSelection(_0x9c3a20);if(_0x9c3a20['all'])return _0x4059d5;const _0x5203d3=new Set(_0x4059d5[_0x1eb4fd(0x11c)](_0x413a70=>_0x413a70['id'])),_0x13b0e4=new Set(_0x4059d5[_0x1eb4fd(0x11c)](_0x1703bb=>_0x1703bb[_0x1eb4fd(0x111)])),_0x3c5a69=_0x9c3a20[_0x1eb4fd(0x147)]['filter'](_0x4777b7=>!_0x5203d3[_0x1eb4fd(0x12f)](_0x4777b7)),_0xc749c3=_0x9c3a20[_0x1eb4fd(0x130)][_0x1eb4fd(0x145)](_0x13b01c=>!_0x13b0e4[_0x1eb4fd(0x12f)](_0x13b01c));if(_0x3c5a69[_0x1eb4fd(0x125)]>0x0||_0xc749c3['length']>0x0){const _0xc0990=[..._0x3c5a69[_0x1eb4fd(0x11c)](_0x43f1b3=>String(_0x43f1b3)),..._0xc749c3][_0x1eb4fd(0x14a)](',\x20');throw new Error(_0x1eb4fd(0x144)+_0xc0990);}const _0x5d2018=new Set(_0x9c3a20[_0x1eb4fd(0x147)]),_0x44cce9=new Set(_0x9c3a20[_0x1eb4fd(0x130)]);return _0x4059d5['filter'](_0xfec6b6=>_0x5d2018['has'](_0xfec6b6['id'])||_0x44cce9[_0x1eb4fd(0x12f)](_0xfec6b6[_0x1eb4fd(0x111)]));}function normalizeMode(_0xd2ba58){const _0x2ae947=a137_0x537f;if(!_0xd2ba58)return _0x2ae947(0x116);if(_0xd2ba58==='replace'||_0xd2ba58===_0x2ae947(0x116))return _0xd2ba58;throw new Error(_0x2ae947(0x127)+_0xd2ba58+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x5ea1c5,_0x4bffbf,_0x62cdce,_0x5c5d6f,_0x108847){const _0x335dd5=a137_0x537f,_0x353561=[..._0x5ea1c5[_0x335dd5(0x114)]];_0x62cdce===_0x335dd5(0x116)&&assertUnambiguousPatchResources(_0x5ea1c5,_0x353561,_0x4bffbf);const _0x497f9e=_0x62cdce==='patch'?patchResources(_0x353561,_0x4bffbf):replaceResources(_0x4bffbf),_0x54d24d=[],_0x9304d3=_0x353561['some'](isJsResource),_0x45c8a4=_0x497f9e[_0x335dd5(0x152)](isJsResource);if(_0x9304d3&&!_0x45c8a4){const _0x5b192a=_0x335dd5(0x13f)+_0x5ea1c5[_0x335dd5(0x11e)]+'\x22\x20('+_0x5ea1c5[_0x335dd5(0x111)]+_0x335dd5(0x121)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x5c5d6f)throw new Error(_0x5b192a);_0x54d24d[_0x335dd5(0x132)](_0x5b192a);}const _0x3bd14c=_0x353561['some'](isCssResource),_0x3633a4=_0x497f9e['some'](isCssResource);_0x3bd14c&&!_0x3633a4&&_0x54d24d['push'](_0x335dd5(0x146)+_0x5ea1c5[_0x335dd5(0x11e)]+_0x335dd5(0x13c)+_0x5ea1c5[_0x335dd5(0x111)]+').');const _0x158c73=typeof _0x5ea1c5['extend']?.[_0x335dd5(0x14e)]===_0x335dd5(0x128)?_0x5ea1c5[_0x335dd5(0x13e)]['loadScriptMode']:null,_0x56f651=_0x108847?{'loadScriptMode':_0x158c73}:{},_0x2d1f8b=_0x108847?{'loadScriptMode':_0x108847}:{};return{'id':_0x5ea1c5['id'],'label':_0x5ea1c5[_0x335dd5(0x11e)],'path':_0x5ea1c5[_0x335dd5(0x111)],'mode':_0x62cdce,'before':{'resources':_0x353561,..._0x56f651},'after':{'resources':_0x497f9e,..._0x2d1f8b},'warnings':_0x54d24d};}function replaceResources(_0x4c31c1){const _0x41a367=a137_0x537f;return[_0x4c31c1[_0x41a367(0x151)],_0x4c31c1['cssUrl']][_0x41a367(0x145)](_0x2da3b7=>!!_0x2da3b7);}function assertUnambiguousPatchResources(_0x3756d1,_0x20ffe7,_0x4e0ca2){const _0x192e68=a137_0x537f,_0x592043=_0x20ffe7[_0x192e68(0x145)](isJsResource)['length'];if(_0x4e0ca2['jsUrl']&&_0x592043>0x1)throw new Error(_0x192e68(0x150)+_0x592043+_0x192e68(0x113)+_0x3756d1['label']+'\x22\x20('+_0x3756d1['path']+')\x20'+_0x192e68(0x148));const _0x502750=_0x20ffe7[_0x192e68(0x145)](isCssResource)['length'];if(_0x4e0ca2[_0x192e68(0x12a)]&&_0x502750>0x1)throw new Error(_0x192e68(0x150)+_0x502750+_0x192e68(0x119)+_0x3756d1[_0x192e68(0x11e)]+'\x22\x20('+_0x3756d1[_0x192e68(0x111)]+')\x20'+_0x192e68(0x110));}function patchResources(_0xc9aa10,_0x14f407){const _0x1e0ea5=a137_0x537f;let _0x3153c3=![],_0x6a2baa=![];const _0x231e1d=[];for(const _0x238170 of _0xc9aa10){if(isJsResource(_0x238170)){if(_0x14f407[_0x1e0ea5(0x151)]&&!_0x3153c3)_0x231e1d[_0x1e0ea5(0x132)](_0x14f407[_0x1e0ea5(0x151)]),_0x3153c3=!![];else!_0x14f407[_0x1e0ea5(0x151)]&&_0x231e1d[_0x1e0ea5(0x132)](_0x238170);continue;}if(isCssResource(_0x238170)){if(_0x14f407[_0x1e0ea5(0x12a)]&&!_0x6a2baa)_0x231e1d['push'](_0x14f407[_0x1e0ea5(0x12a)]),_0x6a2baa=!![];else!_0x14f407[_0x1e0ea5(0x12a)]&&_0x231e1d[_0x1e0ea5(0x132)](_0x238170);continue;}_0x231e1d[_0x1e0ea5(0x132)](_0x238170);}return _0x14f407[_0x1e0ea5(0x151)]&&!_0x3153c3&&_0x231e1d[_0x1e0ea5(0x11b)](_0x14f407[_0x1e0ea5(0x151)]),_0x14f407[_0x1e0ea5(0x12a)]&&!_0x6a2baa&&_0x231e1d[_0x1e0ea5(0x132)](_0x14f407[_0x1e0ea5(0x12a)]),_0x231e1d;}function isJsResource(_0xf8e8de){const _0x393736=a137_0x537f;return stripQuery(_0xf8e8de)[_0x393736(0x12d)]()[_0x393736(0x14d)](_0x393736(0x14b));}function a137_0x57ab(){const _0x455e94=['1212224eBnrtn','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','path','value','\x20existing\x20JS\x20resources\x20for\x20\x22','resources','Menu\x20asset\x20update\x20completed','patch','4612760NWRwCO','2660622WFNhbD','\x20existing\x20CSS\x20resources\x20for\x20\x22','split','unshift','map','3069cxhTWL','label','mode','4AeeweD',').\x20','JS\x20URL\x20is\x20unreachable:\x20','all','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','length','Invalid\x20--params:\x20','Invalid\x20--mode:\x20','string','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','cssUrl','field','object','toLowerCase','Start\x20non-interactive\x20menu\x20asset\x20update','has','paths','status','push','--params.','779585MAdKNR','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','cwd','1322052guTjkH','fulfilled','setLogPath','CSS\x20URL\x20is\x20unreachable:\x20','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','\x22\x20(','menu-asset-update','extend','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','7090202RWAVhx','selection','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','force','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','filter','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menuIds','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','dryRun','join','.js','info','endsWith','loadScriptMode','39664KpEUUj','menu\x20asset-update\x20cannot\x20patch\x20','jsUrl','some'];a137_0x57ab=function(){return _0x455e94;};return a137_0x57ab();}function isCssResource(_0x24d47a){const _0x23a654=a137_0x537f;return stripQuery(_0x24d47a)[_0x23a654(0x12d)]()[_0x23a654(0x14d)]('.css');}function stripQuery(_0x14434f){const _0x4f63df=a137_0x537f;return _0x14434f[_0x4f63df(0x11a)]('?')[0x0]??_0x14434f;}function parseUpdateParamsFlag(_0xcf51b8){const _0x51b076=a137_0x537f;if(!_0xcf51b8||typeof _0xcf51b8!==_0x51b076(0x128))return{};try{const _0x2f6991=JSON['parse'](_0xcf51b8);if(typeof _0x2f6991!==_0x51b076(0x12c)||_0x2f6991===null||Array['isArray'](_0x2f6991))return{};return{'jsUrl':typeof _0x2f6991['jsUrl']==='string'?_0x2f6991[_0x51b076(0x151)]['trim']():undefined,'cssUrl':typeof _0x2f6991['cssUrl']==='string'?_0x2f6991[_0x51b076(0x12a)]['trim']():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x4f6136,_0x36a7ea){const _0x558eed=a137_0x44c3,_0x2dd250=_0x4f6136();while(!![]){try{const _0x5a2777=parseInt(_0x558eed(0x203))/0x1+-parseInt(_0x558eed(0x213))/0x2+-parseInt(_0x558eed(0x229))/0x3*(parseInt(_0x558eed(0x200))/0x4)+-parseInt(_0x558eed(0x205))/0x5+-parseInt(_0x558eed(0x22f))/0x6*(-parseInt(_0x558eed(0x227))/0x7)+parseInt(_0x558eed(0x20c))/0x8*(parseInt(_0x558eed(0x230))/0x9)+parseInt(_0x558eed(0x1fb))/0xa;if(_0x5a2777===_0x36a7ea)break;else _0x2dd250['push'](_0x2dd250['shift']());}catch(_0x37f99b){_0x2dd250['push'](_0x2dd250['shift']());}}}(a137_0x437b,0xe5355));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(_0x53ede8){const _0x1f8cf4=a137_0x44c3,_0x513f1c=[];return _0x53ede8[_0x1f8cf4(0x1f1)]&&!isValidJsHttpsUrl(_0x53ede8['jsUrl'])&&_0x513f1c[_0x1f8cf4(0x1f2)]({'field':'jsUrl','message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x53ede8[_0x1f8cf4(0x233)]&&!isValidCssHttpsUrl(_0x53ede8[_0x1f8cf4(0x233)])&&_0x513f1c[_0x1f8cf4(0x1f2)]({'field':_0x1f8cf4(0x233),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x513f1c;}export async function runMenuUpdateCore(_0x5300c7,_0x1e40df,_0x20942b,_0x143a27={}){const _0x4d64f4=a137_0x44c3,_0x4c9b60=parseUpdateParamsFlag(_0x20942b),_0x4a4f9a=normalizeMode(_0x143a27[_0x4d64f4(0x1f3)]);validateSelection(_0x143a27[_0x4d64f4(0x225)]);const _0x1df203=[];if(_0x4c9b60[_0x4d64f4(0x1f1)])_0x1df203['push'](_0x4c9b60['jsUrl']);if(_0x4c9b60['cssUrl'])_0x1df203[_0x4d64f4(0x1f2)](_0x4c9b60[_0x4d64f4(0x233)]);const _0x50e827=validateParams(_0x4c9b60);if(_0x50e827['length']>0x0){const _0xe6579b=_0x50e827['map'](_0x3ac154=>_0x4d64f4(0x215)+_0x3ac154[_0x4d64f4(0x220)]+':\x20'+_0x3ac154[_0x4d64f4(0x224)])['join'](';\x20');throw new Error(_0x4d64f4(0x231)+_0xe6579b);}if(_0x1df203[_0x4d64f4(0x228)]===0x0)throw new Error(_0x4d64f4(0x211)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x4d64f4(0x1fe)](process[_0x4d64f4(0x21e)]()),logger[_0x4d64f4(0x210)](_0x4d64f4(0x212),_0x4d64f4(0x209),{'appCode':_0x5300c7,'jsUrl':_0x4c9b60[_0x4d64f4(0x1f1)],'cssUrl':_0x4c9b60[_0x4d64f4(0x233)],'mode':_0x4a4f9a,'dryRun':_0x143a27[_0x4d64f4(0x219)]===!![]});if(_0x4c9b60[_0x4d64f4(0x1f1)]){const _0x25b276=await isUrlReachable(_0x4c9b60['jsUrl']);if(!_0x25b276)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x4c9b60[_0x4d64f4(0x1f1)]);}if(_0x4c9b60[_0x4d64f4(0x233)]){const _0x3cfd23=await isUrlReachable(_0x4c9b60[_0x4d64f4(0x233)]);if(!_0x3cfd23)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x4c9b60[_0x4d64f4(0x233)]);}const _0x5ed30f=await getOnlineMenuList(_0x5300c7,_0x1e40df),_0x4d44b2=_0x5ed30f['filter'](_0x1f057d=>_0x1f057d[_0x4d64f4(0x206)][_0x4d64f4(0x228)]>0x0),_0x2dfec5=selectMenusForUpdate(_0x4d44b2,_0x143a27[_0x4d64f4(0x225)]);if(_0x2dfec5[_0x4d64f4(0x228)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x143a27[_0x4d64f4(0x219)]===!![]};const _0x5ab47d=_0x2dfec5['map'](_0x23f953=>buildMenuUpdateDiff(_0x23f953,_0x4c9b60,_0x4a4f9a,_0x143a27['force']===!![],_0x143a27[_0x4d64f4(0x217)]));if(_0x143a27[_0x4d64f4(0x219)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x5ab47d};const _0x53c84c=await Promise[_0x4d64f4(0x20f)](_0x2dfec5[_0x4d64f4(0x214)]((_0x455bbf,_0x235bc5)=>updateMenuCdnUrl(_0x5300c7,_0x1e40df,{'id':_0x455bbf['id'],'label':_0x455bbf[_0x4d64f4(0x208)],'path':_0x455bbf['path'],'resources':_0x5ab47d[_0x235bc5][_0x4d64f4(0x21f)]['resources'],'extend':_0x455bbf['extend']??null,'loadScriptMode':_0x143a27['loadScriptMode']}))),_0x517ce2=_0x53c84c['filter'](_0x23159d=>_0x23159d['status']===_0x4d64f4(0x216))[_0x4d64f4(0x214)](_0x1fe736=>_0x1fe736[_0x4d64f4(0x204)]),_0x1759a1=_0x53c84c[_0x4d64f4(0x202)](_0x1a45a3=>_0x1a45a3[_0x4d64f4(0x22c)]===_0x4d64f4(0x1f5))['length'];return logger[_0x4d64f4(0x210)](_0x4d64f4(0x212),_0x4d64f4(0x20d),{'count':_0x2dfec5[_0x4d64f4(0x228)],'resources':_0x1df203}),{'updated':_0x517ce2[_0x4d64f4(0x228)],'failed':_0x1759a1,'skipped':![],'menus':_0x517ce2};}function validateSelection(_0x1a65c7){const _0x5af172=a137_0x44c3;if(!_0x1a65c7)throw new Error(_0x5af172(0x20b));if(_0x1a65c7['all']&&(_0x1a65c7[_0x5af172(0x207)][_0x5af172(0x228)]>0x0||_0x1a65c7['paths'][_0x5af172(0x228)]>0x0))throw new Error(_0x5af172(0x1f9));if(!_0x1a65c7[_0x5af172(0x21a)]&&_0x1a65c7[_0x5af172(0x207)][_0x5af172(0x228)]===0x0&&_0x1a65c7[_0x5af172(0x226)][_0x5af172(0x228)]===0x0)throw new Error(_0x5af172(0x20b));}export function selectMenusForUpdate(_0x184bf7,_0x5bee9c){const _0x2c3fd6=a137_0x44c3;validateSelection(_0x5bee9c);if(_0x5bee9c[_0x2c3fd6(0x21a)])return _0x184bf7;const _0x43fdbb=new Set(_0x184bf7[_0x2c3fd6(0x214)](_0x3b96f1=>_0x3b96f1['id'])),_0x279f37=new Set(_0x184bf7[_0x2c3fd6(0x214)](_0xdd8e32=>_0xdd8e32[_0x2c3fd6(0x20a)])),_0x5da672=_0x5bee9c['menuIds'][_0x2c3fd6(0x202)](_0x1bcad0=>!_0x43fdbb['has'](_0x1bcad0)),_0x365f47=_0x5bee9c[_0x2c3fd6(0x226)][_0x2c3fd6(0x202)](_0x45eadb=>!_0x279f37[_0x2c3fd6(0x22b)](_0x45eadb));if(_0x5da672['length']>0x0||_0x365f47['length']>0x0){const _0x14580c=[..._0x5da672[_0x2c3fd6(0x214)](_0x20720c=>String(_0x20720c)),..._0x365f47]['join'](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x14580c);}const _0x2e428b=new Set(_0x5bee9c[_0x2c3fd6(0x207)]),_0x4448e9=new Set(_0x5bee9c[_0x2c3fd6(0x226)]);return _0x184bf7[_0x2c3fd6(0x202)](_0x2a3ce6=>_0x2e428b[_0x2c3fd6(0x22b)](_0x2a3ce6['id'])||_0x4448e9['has'](_0x2a3ce6['path']));}function normalizeMode(_0x1d27de){const _0x457909=a137_0x44c3;if(!_0x1d27de)return _0x457909(0x22e);if(_0x1d27de==='replace'||_0x1d27de===_0x457909(0x22e))return _0x1d27de;throw new Error(_0x457909(0x1fa)+_0x1d27de+_0x457909(0x221));}function buildMenuUpdateDiff(_0xd87573,_0x4fcaa9,_0x346f36,_0x1ac196,_0x1c3aea){const _0x4dcfa5=a137_0x44c3,_0x4ba4d6=[..._0xd87573[_0x4dcfa5(0x206)]];_0x346f36===_0x4dcfa5(0x22e)&&assertUnambiguousPatchResources(_0xd87573,_0x4ba4d6,_0x4fcaa9);const _0x11a630=_0x346f36===_0x4dcfa5(0x22e)?patchResources(_0x4ba4d6,_0x4fcaa9):replaceResources(_0x4fcaa9),_0x53de7d=[],_0x16bf22=_0x4ba4d6['some'](isJsResource),_0x423b2f=_0x11a630[_0x4dcfa5(0x223)](isJsResource);if(_0x16bf22&&!_0x423b2f){const _0x16864e=_0x4dcfa5(0x20e)+_0xd87573[_0x4dcfa5(0x208)]+'\x22\x20('+_0xd87573[_0x4dcfa5(0x20a)]+_0x4dcfa5(0x218)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x1ac196)throw new Error(_0x16864e);_0x53de7d[_0x4dcfa5(0x1f2)](_0x16864e);}const _0x27d092=_0x4ba4d6['some'](isCssResource),_0x9398ad=_0x11a630['some'](isCssResource);_0x27d092&&!_0x9398ad&&_0x53de7d['push'](_0x4dcfa5(0x1f4)+_0xd87573[_0x4dcfa5(0x208)]+_0x4dcfa5(0x22d)+_0xd87573[_0x4dcfa5(0x20a)]+').');const _0x22b03c=typeof _0xd87573[_0x4dcfa5(0x1f8)]?.['loadScriptMode']===_0x4dcfa5(0x1f6)?_0xd87573[_0x4dcfa5(0x1f8)][_0x4dcfa5(0x217)]:null,_0x112304=_0x1c3aea?{'loadScriptMode':_0x22b03c}:{},_0x39a6a5=_0x1c3aea?{'loadScriptMode':_0x1c3aea}:{};return{'id':_0xd87573['id'],'label':_0xd87573[_0x4dcfa5(0x208)],'path':_0xd87573['path'],'mode':_0x346f36,'before':{'resources':_0x4ba4d6,..._0x112304},'after':{'resources':_0x11a630,..._0x39a6a5},'warnings':_0x53de7d};}function replaceResources(_0x35cfa6){const _0x2b1188=a137_0x44c3;return[_0x35cfa6[_0x2b1188(0x1f1)],_0x35cfa6[_0x2b1188(0x233)]][_0x2b1188(0x202)](_0x557041=>!!_0x557041);}function assertUnambiguousPatchResources(_0x2f5c35,_0x44bef2,_0x47182d){const _0x538229=a137_0x44c3,_0x1c013d=_0x44bef2[_0x538229(0x202)](isJsResource)[_0x538229(0x228)];if(_0x47182d[_0x538229(0x1f1)]&&_0x1c013d>0x1)throw new Error(_0x538229(0x234)+_0x1c013d+_0x538229(0x21b)+_0x2f5c35[_0x538229(0x208)]+_0x538229(0x22d)+_0x2f5c35['path']+')\x20'+_0x538229(0x1fd));const _0x497822=_0x44bef2[_0x538229(0x202)](isCssResource)['length'];if(_0x47182d[_0x538229(0x233)]&&_0x497822>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x497822+_0x538229(0x201)+_0x2f5c35[_0x538229(0x208)]+_0x538229(0x22d)+_0x2f5c35[_0x538229(0x20a)]+')\x20'+'with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');}function patchResources(_0x2eeaa5,_0x92a0e){const _0x4644f3=a137_0x44c3;let _0x4068e4=![],_0x281b12=![];const _0x1e43b8=[];for(const _0x378806 of _0x2eeaa5){if(isJsResource(_0x378806)){if(_0x92a0e[_0x4644f3(0x1f1)]&&!_0x4068e4)_0x1e43b8[_0x4644f3(0x1f2)](_0x92a0e[_0x4644f3(0x1f1)]),_0x4068e4=!![];else!_0x92a0e[_0x4644f3(0x1f1)]&&_0x1e43b8['push'](_0x378806);continue;}if(isCssResource(_0x378806)){if(_0x92a0e[_0x4644f3(0x233)]&&!_0x281b12)_0x1e43b8[_0x4644f3(0x1f2)](_0x92a0e[_0x4644f3(0x233)]),_0x281b12=!![];else!_0x92a0e[_0x4644f3(0x233)]&&_0x1e43b8[_0x4644f3(0x1f2)](_0x378806);continue;}_0x1e43b8[_0x4644f3(0x1f2)](_0x378806);}return _0x92a0e[_0x4644f3(0x1f1)]&&!_0x4068e4&&_0x1e43b8['unshift'](_0x92a0e[_0x4644f3(0x1f1)]),_0x92a0e[_0x4644f3(0x233)]&&!_0x281b12&&_0x1e43b8[_0x4644f3(0x1f2)](_0x92a0e[_0x4644f3(0x233)]),_0x1e43b8;}function isJsResource(_0x160011){const _0x1b680c=a137_0x44c3;return stripQuery(_0x160011)[_0x1b680c(0x21d)]()[_0x1b680c(0x1ff)](_0x1b680c(0x22a));}function a137_0x44c3(_0x1adc48,_0x4cd63d){_0x1adc48=_0x1adc48-0x1f1;const _0x437b80=a137_0x437b();let _0x44c3ad=_0x437b80[_0x1adc48];return _0x44c3ad;}function a137_0x437b(){const _0x3327aa=['extend','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','Invalid\x20--mode:\x20','9433390OyWMRR','.css','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','setLogPath','endsWith','1517204zsNhPq','\x20existing\x20CSS\x20resources\x20for\x20\x22','filter','1526406SUqaZA','value','8116315KuwJBQ','resources','menuIds','label','Start\x20non-interactive\x20menu\x20asset\x20update','path','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','8qxmDCx','Menu\x20asset\x20update\x20completed','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','allSettled','info','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','menu-asset-update','2524350paspsx','map','--params.','fulfilled','loadScriptMode',').\x20','dryRun','all','\x20existing\x20JS\x20resources\x20for\x20\x22','trim','toLowerCase','cwd','after','field','.\x20Allowed\x20values:\x20replace,\x20patch','object','some','message','selection','paths','3985471kkOdXS','length','6qLzYOO','.js','has','status','\x22\x20(','patch','18SnwJyt','3645657WkKqqX','Invalid\x20--params:\x20','parse','cssUrl','menu\x20asset-update\x20cannot\x20patch\x20','jsUrl','push','mode','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','rejected','string','split'];a137_0x437b=function(){return _0x3327aa;};return a137_0x437b();}function isCssResource(_0x2763f2){const _0x189c93=a137_0x44c3;return stripQuery(_0x2763f2)[_0x189c93(0x21d)]()[_0x189c93(0x1ff)](_0x189c93(0x1fc));}function stripQuery(_0x2b50d5){const _0x39da4e=a137_0x44c3;return _0x2b50d5[_0x39da4e(0x1f7)]('?')[0x0]??_0x2b50d5;}function parseUpdateParamsFlag(_0x3e95ee){const _0x3b0190=a137_0x44c3;if(!_0x3e95ee||typeof _0x3e95ee!==_0x3b0190(0x1f6))return{};try{const _0xf464af=JSON[_0x3b0190(0x232)](_0x3e95ee);if(typeof _0xf464af!==_0x3b0190(0x222)||_0xf464af===null||Array['isArray'](_0xf464af))return{};return{'jsUrl':typeof _0xf464af[_0x3b0190(0x1f1)]===_0x3b0190(0x1f6)?_0xf464af['jsUrl'][_0x3b0190(0x21c)]():undefined,'cssUrl':typeof _0xf464af[_0x3b0190(0x233)]===_0x3b0190(0x1f6)?_0xf464af[_0x3b0190(0x233)][_0x3b0190(0x21c)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21f6ed,_0x56aff5){const _0x430be6=a138_0x30d0,_0x33fe28=_0x21f6ed();while(!![]){try{const _0x5c5cd4=parseInt(_0x430be6(0x1b5))/0x1*(-parseInt(_0x430be6(0x1bb))/0x2)+-parseInt(_0x430be6(0x1bf))/0x3*(-parseInt(_0x430be6(0x1ba))/0x4)+-parseInt(_0x430be6(0x1b9))/0x5+parseInt(_0x430be6(0x1be))/0x6*(parseInt(_0x430be6(0x1bd))/0x7)+-parseInt(_0x430be6(0x1bc))/0x8+parseInt(_0x430be6(0x1b4))/0x9+parseInt(_0x430be6(0x1b7))/0xa;if(_0x5c5cd4===_0x56aff5)break;else _0x33fe28['push'](_0x33fe28['shift']());}catch(_0x6ecf28){_0x33fe28['push'](_0x33fe28['shift']());}}}(a138_0x4932,0x86d51));export function isValidJsHttpsUrl(_0x1e7087){const _0x40fa89=a138_0x30d0;return/^https:\/\/.+\.js(\?.*)?$/[_0x40fa89(0x1b3)](_0x1e7087['trim']());}function a138_0x4932(){const _0x51db2b=['trim','869180dtGBjE','52fNGCYI','1519606dYQScY','5224264EgVCgs','146307bMzisw','54pBUNZh','185376GGPBGO','test','8472528iXySGR','1NzmqQs','HEAD','2061480MMDOlS'];a138_0x4932=function(){return _0x51db2b;};return a138_0x4932();}function a138_0x30d0(_0x4d4324,_0x41c1ee){_0x4d4324=_0x4d4324-0x1b3;const _0x493261=a138_0x4932();let _0x30d0a1=_0x493261[_0x4d4324];return _0x30d0a1;}export function isValidCssHttpsUrl(_0x3caeef){const _0x597a6e=a138_0x30d0;return/^https:\/\/.+\.css(\?.*)?$/[_0x597a6e(0x1b3)](_0x3caeef[_0x597a6e(0x1b8)]());}export async function isUrlReachable(_0x1472f1){const _0x3977e8=a138_0x30d0;try{const _0x6c24f7=await fetch(_0x1472f1,{'method':_0x3977e8(0x1b6)});return _0x6c24f7['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a139_0x5a9648=a139_0x563d;(function(_0x3dfeff,_0xfe25a6){const _0x2f59f0=a139_0x563d,_0x150012=_0x3dfeff();while(!![]){try{const _0x8d3a1e=parseInt(_0x2f59f0(0x100))/0x1*(parseInt(_0x2f59f0(0x105))/0x2)+parseInt(_0x2f59f0(0xfb))/0x3+parseInt(_0x2f59f0(0x118))/0x4*(parseInt(_0x2f59f0(0x11d))/0x5)+-parseInt(_0x2f59f0(0x101))/0x6*(parseInt(_0x2f59f0(0x108))/0x7)+-parseInt(_0x2f59f0(0xdd))/0x8*(parseInt(_0x2f59f0(0xf8))/0x9)+parseInt(_0x2f59f0(0xfc))/0xa*(parseInt(_0x2f59f0(0x119))/0xb)+parseInt(_0x2f59f0(0xe1))/0xc*(-parseInt(_0x2f59f0(0xf5))/0xd);if(_0x8d3a1e===_0xfe25a6)break;else _0x150012['push'](_0x150012['shift']());}catch(_0x5af06c){_0x150012['push'](_0x150012['shift']());}}}(a139_0x3685,0x4b944));import a139_0x52ac66 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';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';function a139_0x563d(_0x3db7aa,_0x2376da){_0x3db7aa=_0x3db7aa-0xd7;const _0x368530=a139_0x3685();let _0x563d63=_0x368530[_0x3db7aa];return _0x563d63;}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';function a139_0x3685(){const _0x1145b5=['3528591zUCOrd','string','str','onlineMenuList','970140XbYNUe','yes','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','rawFlags','\x20menu(s)\x20with\x20JS:\x20','cyan','sync','4568KlqoEY','flag','jsUrl','Would\x20create\x20','382776kwsekt','Menu\x20sync\x20completed:\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','appCode','Fetching\x20online\x20menu\x20list...','localPages','Menu\x20creation\x20failed','validation','onlinePaths','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','failed','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','params','split','created','targetPages','Failed\x20to\x20fetch\x20online\x20menu\x20list','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','gray','cssUrl','286GUSBSl','message','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','8433gxzuFM','Sync\x20local\x20pages\x20as\x20platform\x20menus','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','1512534opAxcS','10RHQFRZ','\x20\x20Cancelled.','appcode','boolean','1wPvGZJ','264VHFdSS','paths','Pre-fill\x20JS/CSS\x20URLs.\x20','write','910264aGIOFU','skipped','\x20menu(s)','19376SPGZQz','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20\x20✓\x20Selected:\x20','\x20\x20Continue\x20with\x20creation?','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','selectedAppName','yellow','trim','Menu\x20sync\x20skipped','Created\x20','\x20menu(s)\x20created','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','length','✓\x20Menu\x20sync\x20completed:\x20','cookie','\x20and\x20CSS:\x20','8cSIzGl'];a139_0x3685=function(){return _0x1145b5;};return a139_0x3685();}export const menuSync={'service':'menu','command':a139_0x5a9648(0xdc),'description':a139_0x5a9648(0xf9),'risk':a139_0x5a9648(0x104),'flags':[{'name':'params','type':a139_0x5a9648(0x11a),'description':a139_0x5a9648(0x103)+a139_0x5a9648(0x113)},{'name':'paths','type':a139_0x5a9648(0x11a),'description':a139_0x5a9648(0xfa)},{'name':'yes','type':a139_0x5a9648(0xff),'description':a139_0x5a9648(0xea)}],async 'dryRun'(_0x2d0ef9){const _0x3d0094=a139_0x5a9648;ensureRunnableContext(_0x2d0ef9[_0x3d0094(0xd9)],_0x2d0ef9[_0x3d0094(0x10d)]);const _0x1fd4fc=await runMenuSyncCore(_0x2d0ef9[_0x3d0094(0xe4)],_0x2d0ef9[_0x3d0094(0x116)],parsePaths(_0x2d0ef9[_0x3d0094(0x11b)](_0x3d0094(0x102))),_0x2d0ef9[_0x3d0094(0x11b)]('params'),{'dryRun':!![]});return{'method':'POST','url':'/smartapi/menu/create','body':_0x1fd4fc,'description':_0x1fd4fc[_0x3d0094(0x106)]?_0x3d0094(0xd8):_0x3d0094(0xe0)+_0x1fd4fc[_0x3d0094(0xf0)][_0x3d0094(0x114)]+'\x20local\x20microfrontend\x20menu(s).'};},async 'execute'(_0x185e2e){const _0x31280c=a139_0x5a9648;ensureRunnableContext(_0x185e2e[_0x31280c(0xd9)],_0x185e2e[_0x31280c(0x10d)]);const _0x480484=_0x185e2e[_0x31280c(0xde)](_0x31280c(0xd7)),_0x528cc1=_0x185e2e[_0x31280c(0x11b)](_0x31280c(0xed)),_0x4d5175=parsePaths(_0x185e2e['str'](_0x31280c(0x102))),_0x11c360=parseMenuSyncParams(_0x528cc1);if(_0x480484){const _0x5c4b3c=await runMenuSyncCore(_0x185e2e[_0x31280c(0xe4)],_0x185e2e['cookie'],_0x4d5175,_0x528cc1);if(_0x5c4b3c[_0x31280c(0x106)]){const _0x23956a=getLocalPages();_0x23956a[_0x31280c(0x114)]===0x0?writeCliSideChannelLine(_0x31280c(0xec)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x31280c(0x115)+_0x5c4b3c[_0x31280c(0xef)]+_0x31280c(0x112));return{'ok':!![],'data':_0x5c4b3c,'message':_0x5c4b3c[_0x31280c(0x106)]?_0x31280c(0x110):'Menu\x20sync\x20completed:\x20'+_0x5c4b3c[_0x31280c(0xef)]+'\x20created.'};}if(_0x4d5175[_0x31280c(0x114)]>0x0)throw CliErrors['validation'](_0x31280c(0xf7),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x528cc1)throw CliErrors['validation']('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x31280c(0xe3));requireInteractive();const _0x288479=startSpinner(_0x31280c(0xe5));let _0x2dbf96,_0x49c62a,_0x55319a;try{const _0xdc5b71=await fetchMenuData(_0x185e2e[_0x31280c(0xe4)],_0x185e2e['cookie']);_0x2dbf96=_0xdc5b71[_0x31280c(0xe6)],_0x49c62a=_0xdc5b71[_0x31280c(0xe9)],_0x55319a=_0xdc5b71[_0x31280c(0x11c)],stopSpinner(_0x288479,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x4b1a3f){stopSpinner(_0x288479,_0x31280c(0xf1),![]);throw CliErrors[_0x31280c(0xe8)](_0x4b1a3f instanceof Error?_0x4b1a3f[_0x31280c(0xf6)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x2dbf96[_0x31280c(0x114)]===0x0)return writeCliSideChannelLine(a139_0x52ac66[_0x31280c(0x10e)](_0x31280c(0x109))),{'ok':!![]};const _0x1b0bf3=buildCompareRows(_0x2dbf96,_0x49c62a);writeCliSideChannelLine(renderCompareTable(_0x1b0bf3)),writeCliSideChannelLine('');const _0x500afd=await selectPages(_0x2dbf96,_0x49c62a);writeCliSideChannelLine(''),writeCliSideChannelLine(a139_0x52ac66[_0x31280c(0xdb)](_0x31280c(0x10a)+_0x500afd[_0x31280c(0x114)]+'\x20page(s)'));const _0x47ab15=_0x11c360['jsUrl']&&_0x11c360[_0x31280c(0xf4)];if(!_0x47ab15){writeCliSideChannelLine(renderSyncSummary(_0x500afd,_0x49c62a['size']>0x0));const _0x5d7b83=await askConfirm(_0x31280c(0x10b));if(!_0x5d7b83)return writeCliSideChannelLine(a139_0x52ac66[_0x31280c(0xf3)](_0x31280c(0xfd))),{'ok':!![]};}let _0xac1550=_0x11c360[_0x31280c(0xdf)],_0x37c6f2=_0x11c360[_0x31280c(0xf4)];!_0xac1550&&(_0xac1550=await askJsUrl());!_0x37c6f2&&(_0x37c6f2=await askCssUrl());const _0x18bf40=await askConfirm('\x20\x20Create\x20'+_0x500afd['length']+_0x31280c(0xda)+_0xac1550+_0x31280c(0x117)+_0x37c6f2+'?');if(!_0x18bf40)return writeCliSideChannelLine(a139_0x52ac66[_0x31280c(0xf3)](_0x31280c(0xfd))),{'ok':!![]};const _0x19698c=[_0xac1550,_0x37c6f2],_0x533589=startSpinner('Creating\x20'+_0x500afd['length']+'\x20menu(s)...');try{const _0x107119=await doCreateMenus(_0x185e2e[_0x31280c(0xe4)],_0x185e2e['cookie'],_0x500afd,_0x19698c);return stopSpinner(_0x533589,_0x31280c(0x111)+_0x107119[_0x31280c(0xef)]+_0x31280c(0x107),!![]),{'ok':!![],'data':_0x107119,'message':_0x31280c(0xe2)+_0x107119[_0x31280c(0xef)]+'\x20created,\x20'+_0x107119[_0x31280c(0xeb)]+'\x20failed.'};}catch(_0x1fdc1b){stopSpinner(_0x533589,_0x31280c(0xe7),![]);throw CliErrors[_0x31280c(0xe8)](_0x1fdc1b instanceof Error?_0x1fdc1b[_0x31280c(0xf6)]:_0x31280c(0xe7));}}};function ensureRunnableContext(_0x506e70,_0x1c8608){const _0x19663b=a139_0x5a9648,_0xcbcbd=_0x506e70[_0x19663b(0xfe)]?String(_0x506e70[_0x19663b(0xfe)])[_0x19663b(0x10f)]():'';if(!isInProject()&&!_0x1c8608&&!_0xcbcbd)throw CliErrors[_0x19663b(0xe8)](_0x19663b(0x10c)+_0x19663b(0xf2));}function parsePaths(_0x1cf8ef){const _0x5b4c87=a139_0x5a9648;return[...new Set(_0x1cf8ef[_0x5b4c87(0xee)](',')['map'](_0x21d720=>_0x21d720[_0x5b4c87(0x10f)]())['filter'](Boolean))];}
|