@lovrabet/rabetbase-cli 2.3.16-beta.1 → 2.3.16-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/react/create.js +1 -0
- package/lib/commands/page/react/detail.js +1 -0
- package/lib/commands/page/react/list.js +1 -0
- package/lib/commands/page/react/publish.js +1 -0
- package/lib/commands/page/react/shared.js +1 -0
- package/lib/commands/page/react/syntax.js +1 -0
- package/lib/commands/page/react/template.js +1 -0
- package/lib/commands/page/react/update.js +1 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -0
- package/lib/commands/tenant/members-list.js +1 -0
- package/lib/commands/tenant/shared.js +1 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/templates/projects/sub-app-react-demo/CHANGELOG.md +1 -1
- package/templates/projects/sub-app-react-demo/README.md +1 -1
- package/templates/projects/sub-app-react-demo/docs/quick-start.md +1 -1
- package/templates/projects/sub-app-react-demo/src/pages/index.tsx +1 -1
- package/lib/commands/app/add.js +0 -1
- package/lib/commands/app/remove.js +0 -1
- package/lib/commands/project/init.js +0 -1
- package/lib/commands/sql/save.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x565e8c,_0x3e1d6d){const _0x5b35f1=a122_0x545c,_0x40849f=_0x565e8c();while(!![]){try{const _0x1ccb89=-parseInt(_0x5b35f1(0x17e))/0x1+-parseInt(_0x5b35f1(0x165))/0x2*(parseInt(_0x5b35f1(0x15b))/0x3)+parseInt(_0x5b35f1(0x16d))/0x4+-parseInt(_0x5b35f1(0x158))/0x5*(parseInt(_0x5b35f1(0x157))/0x6)+-parseInt(_0x5b35f1(0x179))/0x7+-parseInt(_0x5b35f1(0x17f))/0x8*(parseInt(_0x5b35f1(0x159))/0x9)+parseInt(_0x5b35f1(0x163))/0xa;if(_0x1ccb89===_0x3e1d6d)break;else _0x40849f['push'](_0x40849f['shift']());}catch(_0x3bbbd4){_0x40849f['push'](_0x40849f['shift']());}}}(a122_0x32b9,0x9f4ab));import a122_0x3920e5 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a122_0x36426f from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x40e338){const _0x5c9a3b=a122_0x545c;return _0x40e338[_0x5c9a3b(0x166)](_0xb2b965=>{const _0x294173=_0x5c9a3b;if(_0xb2b965?.['name']===_0x294173(0x173))throw CliErrors[_0x294173(0x176)](_0x294173(0x17b));throw _0xb2b965;});}export function startSpinner(_0x3ec752){const _0x9602e3=a122_0x545c;return a122_0x36426f({'text':_0x3ec752,'color':_0x9602e3(0x171)})[_0x9602e3(0x162)]();}export function stopSpinner(_0x8b5be8,_0x4924dc,_0x1fe718){const _0x5e696b=a122_0x545c;_0x1fe718?_0x8b5be8[_0x5e696b(0x168)](_0x4924dc):_0x8b5be8['fail'](_0x4924dc);}export async function askConfirm(_0x8c39f7){return onCancel(confirm({'message':_0x8c39f7,'theme':{'prefix':''}}));}export async function askJsUrl(_0x137c0f){const _0x593475=a122_0x545c;while(!![]){const _0x237bb4=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x137c0f,'theme':{'prefix':''}}));if(_0x237bb4[_0x593475(0x167)]()==='')throw CliErrors['cancelled']('Cancelled.');if(!/^https:\/\/.+\.js(\?.*)?$/[_0x593475(0x15a)](_0x237bb4[_0x593475(0x167)]())){console[_0x593475(0x16b)](a122_0x3920e5['red'](_0x593475(0x177)));continue;}const _0x455833=startSpinner('\x20\x20Checking\x20JS\x20URL\x20reachability...');try{const _0x292e7b=await isUrlReachable(_0x237bb4[_0x593475(0x167)]());stopSpinner(_0x455833,_0x593475(0x161),_0x292e7b);if(!_0x292e7b){console[_0x593475(0x16b)](a122_0x3920e5['red']('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x237bb4[_0x593475(0x167)]();}catch(_0x22bfd7){stopSpinner(_0x455833,_0x593475(0x16c),![]);throw _0x22bfd7;}}}function a122_0x32b9(){const _0x16b680=['28807000kAKPUl','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','2WANNRH','catch','trim','succeed','red','map','error','JS\x20URL\x20check\x20failed','3674212ONkgPj','stdin','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','isTTY','cyan','filter','ExitPromptError','green','CSS\x20URL\x20checked','cancelled','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','length','8264382rtDjhY','No\x20menus\x20selected.','Cancelled.','has','path','139254dVMKQl','552SRWKBl','gray','2748NjOLVU','10550WzADkd','71451dwXzKD','test','938229iNueop','\x20\x20Checking\x20CSS\x20URL\x20reachability...','[new]','label','CSS\x20URL\x20check\x20failed','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','JS\x20URL\x20checked','start'];a122_0x32b9=function(){return _0x16b680;};return a122_0x32b9();}export async function askCssUrl(_0xcb68a1){const _0x456dbc=a122_0x545c;while(!![]){const _0x584681=await onCancel(input({'message':'\x20\x20CSS\x20URL:','default':_0xcb68a1,'theme':{'prefix':''}}));if(_0x584681[_0x456dbc(0x167)]()==='')throw CliErrors[_0x456dbc(0x176)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x584681[_0x456dbc(0x167)]())){console[_0x456dbc(0x16b)](a122_0x3920e5['red'](_0x456dbc(0x164)));continue;}const _0x45ea6c=startSpinner(_0x456dbc(0x15c));try{const _0x51237d=await isUrlReachable(_0x584681[_0x456dbc(0x167)]());stopSpinner(_0x45ea6c,_0x456dbc(0x175),_0x51237d);if(!_0x51237d){console[_0x456dbc(0x16b)](a122_0x3920e5[_0x456dbc(0x169)](_0x456dbc(0x160)));continue;}return _0x584681[_0x456dbc(0x167)]();}catch(_0x454b3b){stopSpinner(_0x45ea6c,_0x456dbc(0x15f),![]);throw _0x454b3b;}}}function a122_0x545c(_0x588a2a,_0x5f5b87){_0x588a2a=_0x588a2a-0x157;const _0x32b9fc=a122_0x32b9();let _0x545c44=_0x32b9fc[_0x588a2a];return _0x545c44;}export async function selectPages(_0x3bb05d,_0x5598a0){const _0x530a6f=a122_0x545c,_0x595add=_0x3bb05d[_0x530a6f(0x16a)](_0x194b52=>{const _0x5aa7d0=_0x530a6f,_0x4aeb21=_0x5598a0[_0x5aa7d0(0x17c)](_0x194b52[_0x5aa7d0(0x17d)]);return{'name':_0x194b52[_0x5aa7d0(0x15e)]+'\x20\x20'+a122_0x3920e5['gray'](_0x194b52[_0x5aa7d0(0x17d)])+'\x20\x20'+(_0x4aeb21?a122_0x3920e5[_0x5aa7d0(0x180)]('[already\x20on\x20platform]'):a122_0x3920e5[_0x5aa7d0(0x174)](_0x5aa7d0(0x15d))),'value':_0x194b52[_0x5aa7d0(0x17d)],'checked':!_0x4aeb21,'disabled':_0x4aeb21};});if(_0x595add[_0x530a6f(0x178)]===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x80c4b5=await onCancel(checkbox({'message':_0x530a6f(0x16f),'choices':_0x595add,'loop':![],'theme':{'prefix':''}}));if(_0x80c4b5[_0x530a6f(0x178)]===0x0)throw new Error(_0x530a6f(0x17a));return _0x3bb05d[_0x530a6f(0x172)](_0x206620=>_0x80c4b5['includes'](_0x206620[_0x530a6f(0x17d)]));}export function isInteractive(){const _0x361334=a122_0x545c;return process[_0x361334(0x16e)][_0x361334(0x170)]===!![];}export function requireInteractive(){if(!isInteractive())throw new Error('This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20'+'Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a123_0x281dd3=a123_0x502c;(function(_0x4195fd,_0x10c465){const _0x256df8=a123_0x502c,_0x1f5bdf=_0x4195fd();while(!![]){try{const _0x472397=parseInt(_0x256df8(0x1bb))/0x1*(-parseInt(_0x256df8(0x1cb))/0x2)+-parseInt(_0x256df8(0x1c3))/0x3+parseInt(_0x256df8(0x1c8))/0x4*(-parseInt(_0x256df8(0x1ba))/0x5)+-parseInt(_0x256df8(0x1b9))/0x6*(-parseInt(_0x256df8(0x1bc))/0x7)+parseInt(_0x256df8(0x1b8))/0x8*(-parseInt(_0x256df8(0x1cf))/0x9)+parseInt(_0x256df8(0x1c6))/0xa+parseInt(_0x256df8(0x1bf))/0xb;if(_0x472397===_0x10c465)break;else _0x1f5bdf['push'](_0x1f5bdf['shift']());}catch(_0x56f31a){_0x1f5bdf['push'](_0x1f5bdf['shift']());}}}(a123_0x2e14,0x91d38));function a123_0x502c(_0x422935,_0x155712){_0x422935=_0x422935-0x1b5;const _0x2e14d6=a123_0x2e14();let _0x502ce3=_0x2e14d6[_0x422935];return _0x502ce3;}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';function a123_0x2e14(){const _0x584272=['trim','6540810gCCbKn','split','4OCqZKJ','index.tsx','replace','6446OTsBug','filter','match','join','99kOjzAc','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','src/pages','replaceAll','446776YAAtCT','2274YZqJZF','1509395ieafKa','10arTBUB','7217hYWqSr','endsWith','cwd','12220395UJPtgj','forEach','slice','.tsx','1830135xugjNu','concat'];a123_0x2e14=function(){return _0x584272;};return a123_0x2e14();}const pagesDir=resolve(process[a123_0x281dd3(0x1be)](),a123_0x281dd3(0x1b6));export function extractTitleFromComment(_0x5b6557){const _0x237848=a123_0x281dd3;try{const _0x2c1e2a=readFileSync(_0x5b6557,'utf-8'),_0x1cb739=_0x2c1e2a[_0x237848(0x1cd)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x1cb739&&_0x1cb739[0x1]){const _0x5351d0=_0x1cb739[0x1],_0x5ef697=_0x5351d0[_0x237848(0x1cd)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x5ef697&&_0x5ef697[0x1])return _0x5ef697[0x1][_0x237848(0x1c5)]();}let _0x39820c=null;const _0x3556e8=_0x2c1e2a['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x3556e8&&_0x3556e8[0x1]&&(_0x39820c=_0x3556e8[0x1]);if(!_0x39820c){const _0x7a66e2=_0x2c1e2a['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x7a66e2&&_0x7a66e2[0x1]&&(_0x39820c=_0x7a66e2[0x1]);}if(_0x39820c){const _0x571e29=new RegExp('\x5cb'+_0x39820c+_0x237848(0x1b5)),_0x558ad9=_0x2c1e2a['match'](_0x571e29);if(_0x558ad9&&_0x558ad9[0x1])return _0x558ad9[0x1];return _0x39820c;}return null;}catch(_0x57a0b2){return null;}}export function getLocalPages(_0x5ccf7e=pagesDir,_0x47eb96=pagesDir){const _0x14ca2d=a123_0x281dd3;let _0x2a0a66=[];const _0x56d33e=readdirSync(_0x5ccf7e);return _0x56d33e[_0x14ca2d(0x1c0)](_0x36eb01=>{const _0x426995=_0x14ca2d,_0x31db3c=join(_0x5ccf7e,_0x36eb01),_0x5e55a0=statSync(_0x31db3c);if(_0x5e55a0&&_0x5e55a0['isDirectory']())_0x2a0a66=_0x2a0a66[_0x426995(0x1c4)](getLocalPages(_0x31db3c,_0x47eb96));else{if(_0x36eb01[_0x426995(0x1bd)](_0x426995(0x1c2))){let _0xeb64b3=relative(_0x47eb96,_0x31db3c);_0xeb64b3[_0x426995(0x1bd)](_0x426995(0x1c9))?_0xeb64b3=_0xeb64b3[_0x426995(0x1ca)](/index\.tsx$/,''):_0xeb64b3=_0xeb64b3['replace'](/\.tsx$/,'');_0xeb64b3['endsWith'](sep)&&(_0xeb64b3=_0xeb64b3[_0x426995(0x1c1)](0x0,-0x1));const _0x492e93=_0xeb64b3[_0x426995(0x1c7)](sep)[_0x426995(0x1ce)]('/'),_0x496f91=extractTitleFromComment(_0x31db3c),_0x2c1829=_0x496f91||_0x492e93;_0x2a0a66['push']({'path':_0x492e93[_0x426995(0x1b7)]('$',':'),'label':_0x2c1829});}}}),_0x2a0a66[_0x14ca2d(0x1cc)](_0x596dec=>_0x596dec['path']!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39e8c4,_0x4c9d38){const _0x15ec17=a124_0x6ce6,_0x41b1d9=_0x39e8c4();while(!![]){try{const _0x2758c8=-parseInt(_0x15ec17(0x9c))/0x1*(-parseInt(_0x15ec17(0x93))/0x2)+-parseInt(_0x15ec17(0x98))/0x3*(-parseInt(_0x15ec17(0x8d))/0x4)+parseInt(_0x15ec17(0xa0))/0x5+parseInt(_0x15ec17(0x9d))/0x6*(-parseInt(_0x15ec17(0x95))/0x7)+parseInt(_0x15ec17(0x97))/0x8*(-parseInt(_0x15ec17(0x96))/0x9)+-parseInt(_0x15ec17(0x9f))/0xa*(parseInt(_0x15ec17(0x8c))/0xb)+parseInt(_0x15ec17(0xa1))/0xc;if(_0x2758c8===_0x4c9d38)break;else _0x41b1d9['push'](_0x41b1d9['shift']());}catch(_0x225460){_0x41b1d9['push'](_0x41b1d9['shift']());}}}(a124_0x1ec3,0xc99f2));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a124_0x6ce6(_0x3498e5,_0xcaf58e){_0x3498e5=_0x3498e5-0x8c;const _0x1ec3c2=a124_0x1ec3();let _0x6ce684=_0x1ec3c2[_0x3498e5];return _0x6ce684;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x32756d){const _0x1eeb00=a124_0x6ce6,_0x2236ef=[];return!isValidJsHttpsUrl(_0x32756d)&&_0x2236ef[_0x1eeb00(0x94)](_0x1eeb00(0x9e)),{'ok':_0x2236ef[_0x1eeb00(0x9a)]===0x0,'errors':_0x2236ef};}export function validateCssUrl(_0x10bdb3){const _0x3f6163=a124_0x6ce6,_0x37c0db=[];return!isValidCssHttpsUrl(_0x10bdb3)&&_0x37c0db[_0x3f6163(0x94)](_0x3f6163(0x92)),{'ok':_0x37c0db[_0x3f6163(0x9a)]===0x0,'errors':_0x37c0db};}export async function validateJsUrlReachable(_0x384f9b){const _0x32d302=a124_0x6ce6,_0x38121d=validateJsUrl(_0x384f9b);if(!_0x38121d['ok'])return _0x38121d;const _0x3ed858=await isUrlReachable(_0x384f9b);if(!_0x3ed858)_0x38121d[_0x32d302(0x90)]['push'](_0x32d302(0x9b));return{'ok':_0x38121d[_0x32d302(0x90)][_0x32d302(0x9a)]===0x0,'errors':_0x38121d[_0x32d302(0x90)]};}export async function validateCssUrlReachable(_0xdfab1a){const _0x366cea=a124_0x6ce6,_0x124c6=validateCssUrl(_0xdfab1a);if(!_0x124c6['ok'])return _0x124c6;const _0x1ebc51=await isUrlReachable(_0xdfab1a);if(!_0x1ebc51)_0x124c6[_0x366cea(0x90)][_0x366cea(0x94)]('CSS\x20URL\x20is\x20unreachable');return{'ok':_0x124c6[_0x366cea(0x90)]['length']===0x0,'errors':_0x124c6[_0x366cea(0x90)]};}export function buildCompareRows(_0x58772e,_0x30f938){const _0x54e245=a124_0x6ce6;return _0x58772e['map'](_0xe0f013=>({'label':_0xe0f013[_0x54e245(0x8f)],'path':_0xe0f013[_0x54e245(0x91)],'local':!![],'online':_0x30f938['has'](_0xe0f013[_0x54e245(0x91)])}));}export async function doCreateMenus(_0x2a4e73,_0x52eab8,_0x3cebdf,_0x283f48){const _0x3cdfac=a124_0x6ce6,_0x30ac9e=await createMenus(_0x2a4e73,_0x52eab8,_0x3cebdf,_0x283f48);return{'created':_0x30ac9e[_0x3cdfac(0x9a)],'failed':0x0,'labels':_0x3cebdf[_0x3cdfac(0x8e)](_0x663d1f=>_0x663d1f[_0x3cdfac(0x8f)]),'menus':_0x30ac9e};}export function filterMenusWithResources(_0x486d54){const _0x4183cc=a124_0x6ce6;return _0x486d54['filter'](_0x555d83=>_0x555d83[_0x4183cc(0x99)][_0x4183cc(0x9a)]>0x0);}function a124_0x1ec3(){const _0x53022d=['155993hvrjJP','42GlycBv','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','10ZYIzAY','4680535YLSnDQ','14515044mQqQfV','14699839oaznPD','4WmuTKY','map','label','errors','path','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','6wQnwBS','push','1250907DethAj','274707ELKWhf','56tXFtcX','3039258yLyyCj','resources','length','JS\x20URL\x20is\x20unreachable'];a124_0x1ec3=function(){return _0x53022d;};return a124_0x1ec3();}export async function fetchMenuData(_0x479af8,_0x56c68a){const _0x4b7516=a124_0x6ce6,_0x992de7=getLocalPages(),_0x2c2a80=await getOnlineMenuList(_0x479af8,_0x56c68a),_0x34585f=new Set(_0x2c2a80[_0x4b7516(0x8e)](_0x7f6c08=>_0x7f6c08['path']));return{'localPages':_0x992de7,'onlineMenuList':_0x2c2a80,'onlinePaths':_0x34585f};}export async function fetchOnlineMenuList(_0x5557f2,_0xbcd727){return getOnlineMenuList(_0x5557f2,_0xbcd727);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a126_0xc1b8eb=a126_0x4ae9;function a126_0x1acc(){const _0x1f89b9=['parent-id','childrenCount','selector','warnings','rawFlags','number','map','message','4IApXtN','expected-children-count','hint','failed','cascade','cookie','stringify','\x20parent\x20changed:\x20expected\x20','Failed\x20to\x20','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','expect-path','call','length','menu_confirmation_required','menu_permission_denied','str','succeeded','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','isSafeInteger','Sibling\x20sort\x20value\x20(non-negative\x20integer)','num','Menu\x20','appCode','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','code','menu_verification_failed',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','planFile','flagMissing','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','read\x20online\x20menu\x20facts\x20before\x20','bool','\x20child\x20count\x20changed:\x20expected\x20','verification','toLowerCase','dryRun','3768950OeqpOZ','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','string','4306947CreWLN','sort','expect-parent-id','type','hasOwnProperty','menu_state_drift','Cannot\x20append\x20a\x20','9NEfyYj','snapshotHash','menu_mutation_failed','menu_not_found','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','904fMrVuW','after','folder','menu_sort_overflow','recheck\x20online\x20menu\x20facts\x20before\x20','134235ZPZBTC','menu_sort_invalid','6zCpsTx','get','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','path','Online\x20menu\x20state\x20changed\x20before\x20','deleteOrder','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','dry-run','68565GCvaHn','filter','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.',',\x20current\x20','data','required','14586242YhswBR','pre-write-recheck','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','root','894682JrmdvQ','parentId','api_error','validation','plannedActions','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20path\x20changed:\x20expected\x20','hash','162530uWJvUg','\x20menu\x20','targets','\x20is\x20type\x20\x22','error','max','backend','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','Online\x20menu\x20not\x20found:\x20','test'];a126_0x1acc=function(){return _0x1f89b9;};return a126_0x1acc();}(function(_0x4d1885,_0x49f06b){const _0x1d5100=a126_0x4ae9,_0x31b544=_0x4d1885();while(!![]){try{const _0x37d1c0=-parseInt(_0x1d5100(0x10e))/0x1+-parseInt(_0x1d5100(0xba))/0x2+-parseInt(_0x1d5100(0xfc))/0x3*(-parseInt(_0x1d5100(0xd5))/0x4)+-parseInt(_0x1d5100(0xc3))/0x5*(-parseInt(_0x1d5100(0x110))/0x6)+-parseInt(_0x1d5100(0x11a))/0x7*(parseInt(_0x1d5100(0x109))/0x8)+-parseInt(_0x1d5100(0x103))/0x9*(parseInt(_0x1d5100(0xf9))/0xa)+parseInt(_0x1d5100(0xb6))/0xb;if(_0x37d1c0===_0x49f06b)break;else _0x31b544['push'](_0x31b544['shift']());}catch(_0x5c079f){_0x31b544['push'](_0x31b544['shift']());}}}(a126_0x1acc,0xb1f27));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':a126_0xc1b8eb(0xd2),'required':!![],'description':'Exact\x20online\x20menu\x20id'};export const MENU_SORT_FLAG={'name':a126_0xc1b8eb(0xfd),'type':a126_0xc1b8eb(0xd2),'description':a126_0xc1b8eb(0xe8)};export const MENU_PARENT_ID_FLAG={'name':a126_0xc1b8eb(0xcd),'type':a126_0xc1b8eb(0xfb),'description':a126_0xc1b8eb(0xe6)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':'expect-parent-id','type':'string','description':a126_0xc1b8eb(0x107)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a126_0xc1b8eb(0xdf),'type':a126_0xc1b8eb(0xfb),'description':a126_0xc1b8eb(0x112)},{'name':a126_0xc1b8eb(0xd6),'type':a126_0xc1b8eb(0xd2),'description':'Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches'}];export function validateExactId(_0x4174c5){const _0x293e16=a126_0xc1b8eb,_0x59d0da=_0x4174c5[_0x293e16(0xe9)]('id');if(!Number[_0x293e16(0xe7)](_0x59d0da)||_0x59d0da<=0x0)throw CliErrors['validation'](_0x293e16(0xbf));return _0x59d0da;}export function validateSort(_0x4893f0,_0x3f6c8a=a126_0xc1b8eb(0xfd)){const _0x4bafa5=a126_0xc1b8eb;if(!hasFlag(_0x4893f0,_0x3f6c8a))return undefined;const _0x32eeff=_0x4893f0[_0x4bafa5(0xe9)](_0x3f6c8a);if(!Number[_0x4bafa5(0xe7)](_0x32eeff)||_0x32eeff<0x0||_0x32eeff>MAX_MENU_SORT)throw menuError(_0x4bafa5(0x10f),'--'+_0x3f6c8a+'\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20'+MAX_MENU_SORT+'.',_0x4bafa5(0x118));return _0x32eeff;}export function nextSiblingSort(_0x592f98,_0x20a10f,_0x136492){const _0xc67db=a126_0xc1b8eb,_0x4539e2=getChildren(_0x592f98,_0x20a10f)[_0xc67db(0xd3)](_0xc22aef=>_0xc22aef['sort'])[_0xc67db(0x11b)](_0x2f0d63=>typeof _0x2f0d63==='number');if(_0x4539e2[_0xc67db(0xe1)]===0x0)return 0x0;const _0x4f6797=Math[_0xc67db(0xc8)](..._0x4539e2);if(_0x4f6797>=MAX_MENU_SORT)throw menuError(_0xc67db(0x10c),_0xc67db(0x102)+_0x136492+_0xc67db(0x116)+_0x4f6797+'.','Reorder\x20sibling\x20menus\x20below\x20'+MAX_MENU_SORT+_0xc67db(0xef));return _0x4f6797+0x1;}export function requireExplicitYes(_0x32715b){const _0x3938b3=a126_0xc1b8eb;if(_0x32715b[_0x3938b3(0xf4)](_0x3938b3(0x119)))return;if(!_0x32715b[_0x3938b3(0xf4)]('yes'))throw menuError(_0x3938b3(0xe2),_0x3938b3(0x117),_0x3938b3(0xf2));}export async function fetchMutationSnapshot(_0x2226c5,_0x5279fe,_0x5c5138){const _0x2226a5=a126_0xc1b8eb;try{return await fetchMenuSnapshot(_0x2226c5['appCode'],_0x2226c5[_0x2226a5(0xda)]);}catch(_0x15aadb){throw mapMenuApiError(_0x15aadb,_0x2226a5(0xf3)+_0x5279fe,_0x5c5138);}}export async function recheckMutationSnapshot(_0x32bcc7,_0x79f051,_0x51f878,_0x50fb28){const _0x1dd70d=a126_0xc1b8eb;let _0xe2c10f;try{_0xe2c10f=await fetchMenuSnapshot(_0x32bcc7[_0x1dd70d(0xeb)],_0x32bcc7[_0x1dd70d(0xda)]);}catch(_0x1fce94){const _0x1f5242=mapMenuApiError(_0x1fce94,_0x1dd70d(0x10d)+_0x51f878,_0x50fb28);throw menuFailure(_0x1f5242,_0x79f051,{'stage':'pre-write-recheck','failed':_0x50fb28==null?{}:{'id':_0x50fb28}});}if(_0xe2c10f[_0x1dd70d(0xc2)]!==_0x79f051[_0x1dd70d(0x104)]){const _0x295b84=menuError(_0x1dd70d(0x101),_0x1dd70d(0x114)+_0x51f878+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.',_0x1dd70d(0x11c));throw menuFailure(_0x295b84,_0x79f051,{'stage':_0x1dd70d(0xb7),'failed':{..._0x50fb28==null?{}:{'id':_0x50fb28},'expectedSnapshotHash':_0x79f051[_0x1dd70d(0x104)],'currentSnapshotHash':_0xe2c10f['hash']}});}return _0xe2c10f;}export function parseParentId(_0x46417f,_0x109a83,_0x24170c={}){const _0x49c6c7=a126_0xc1b8eb;if(!hasFlag(_0x46417f,_0x109a83)){if(_0x24170c[_0x49c6c7(0xb5)])throw CliErrors[_0x49c6c7(0xf1)](_0x109a83);return undefined;}const _0x5405d4=_0x46417f['str'](_0x109a83)['trim']();if(_0x5405d4[_0x49c6c7(0xf7)]()===_0x49c6c7(0xb9))return null;if(!/^\d+$/[_0x49c6c7(0xcc)](_0x5405d4))throw CliErrors['validation']('--'+_0x109a83+_0x49c6c7(0xb8));const _0x59f25c=Number(_0x5405d4);if(!Number['isSafeInteger'](_0x59f25c)||_0x59f25c<=0x0)throw CliErrors[_0x49c6c7(0xbd)]('--'+_0x109a83+_0x49c6c7(0xb8));return _0x59f25c;}export function requireMenu(_0x3f7993,_0x4feaeb){const _0x2481b7=a126_0xc1b8eb,_0x5d4cfb=_0x3f7993['byId'][_0x2481b7(0x111)](_0x4feaeb);if(!_0x5d4cfb)throw menuError(_0x2481b7(0x106),_0x2481b7(0xcb)+_0x4feaeb,_0x2481b7(0x108));return _0x5d4cfb;}export function requireFolder(_0xc8443d,_0xf40d9e){const _0x1f9a4a=a126_0xc1b8eb,_0x3311e0=requireMenu(_0xc8443d,_0xf40d9e);if(_0x3311e0[_0x1f9a4a(0xff)]!==_0x1f9a4a(0x10b))throw menuError('menu_parent_not_folder',_0x1f9a4a(0xea)+_0xf40d9e+_0x1f9a4a(0xc6)+(_0x3311e0[_0x1f9a4a(0xff)]||'unknown')+'\x22,\x20not\x20folder.',_0x1f9a4a(0xfa));return _0x3311e0;}export function assertExpectedState(_0x472d23,_0x3c3df2){const _0x1f180b=a126_0xc1b8eb;if(hasFlag(_0x472d23,_0x1f180b(0xfe))){const _0x16db60=parseParentId(_0x472d23,_0x1f180b(0xfe),{'required':!![]});if(_0x3c3df2[_0x1f180b(0xbb)]!==_0x16db60)throw stateDrift(_0x1f180b(0xea)+_0x3c3df2['id']+_0x1f180b(0xdc)+formatParent(_0x16db60)+',\x20current\x20'+formatParent(_0x3c3df2[_0x1f180b(0xbb)])+'.');}if(hasFlag(_0x472d23,_0x1f180b(0xdf))){const _0x32e2fd=_0x472d23[_0x1f180b(0xe4)](_0x1f180b(0xdf));if(_0x3c3df2[_0x1f180b(0x113)]!==_0x32e2fd)throw stateDrift(_0x1f180b(0xea)+_0x3c3df2['id']+_0x1f180b(0xc1)+JSON[_0x1f180b(0xdb)](_0x32e2fd)+_0x1f180b(0xb3)+JSON[_0x1f180b(0xdb)](_0x3c3df2[_0x1f180b(0x113)])+'.');}if(hasFlag(_0x472d23,_0x1f180b(0xd6))){const _0x269d8d=_0x472d23['num'](_0x1f180b(0xd6));if(!Number[_0x1f180b(0xe7)](_0x269d8d)||_0x269d8d<0x0)throw CliErrors['validation'](_0x1f180b(0xc0));if(_0x3c3df2[_0x1f180b(0xce)]!==_0x269d8d)throw stateDrift(_0x1f180b(0xea)+_0x3c3df2['id']+_0x1f180b(0xf5)+_0x269d8d+',\x20current\x20'+_0x3c3df2['childrenCount']+'.');}}export function assertVerified(_0x3ceacb,_0x42425f,_0x404929=a126_0xc1b8eb(0xca)){const _0x292c27=a126_0xc1b8eb;if(!_0x3ceacb)throw menuError(_0x292c27(0xee),_0x42425f,_0x404929);}export function mutationResult(_0x58c5d2){const _0x215d92=a126_0xc1b8eb;return{'operation':_0x58c5d2['operation'],'selector':_0x58c5d2[_0x215d92(0xcf)],'before':_0x58c5d2['before'],'after':_0x58c5d2['after'],'dryRun':_0x58c5d2[_0x215d92(0xf8)],'backend':_0x58c5d2[_0x215d92(0xc9)],..._0x58c5d2[_0x215d92(0xbe)]?{'plannedActions':_0x58c5d2[_0x215d92(0xbe)]}:{},..._0x58c5d2[_0x215d92(0xc5)]?{'targets':_0x58c5d2[_0x215d92(0xc5)]}:{},..._0x58c5d2[_0x215d92(0x115)]?{'deleteOrder':_0x58c5d2[_0x215d92(0x115)]}:{},'snapshotHash':_0x58c5d2[_0x215d92(0x104)],..._0x58c5d2[_0x215d92(0xd9)]?{'cascade':_0x58c5d2[_0x215d92(0xd9)]}:{},..._0x58c5d2['planFile']?{'planFile':_0x58c5d2[_0x215d92(0xf0)]}:{},'succeeded':_0x58c5d2[_0x215d92(0xe5)]??[],'failed':_0x58c5d2[_0x215d92(0xd8)]??[],'warnings':_0x58c5d2[_0x215d92(0xd0)]??[],'verification':_0x58c5d2[_0x215d92(0xf6)],'error':_0x58c5d2[_0x215d92(0xc7)]};}export function menuDryRunResult(_0x453e66,_0x5854c9){return{..._0x453e66,..._0x5854c9};}export function menuFailure(_0x5502fd,_0x19aee4,_0x4869ab){const _0x9fff3=a126_0xc1b8eb,_0x551855=mutationResult({..._0x19aee4,'after':_0x4869ab[_0x9fff3(0x10a)]===undefined?_0x19aee4[_0x9fff3(0x10a)]:_0x4869ab[_0x9fff3(0x10a)],'backend':_0x4869ab['backend']??_0x19aee4[_0x9fff3(0xc9)],'dryRun':![],'succeeded':_0x4869ab[_0x9fff3(0xe5)]??[],'failed':[{..._0x4869ab['failed']??{},'stage':_0x4869ab['stage'],'code':_0x5502fd[_0x9fff3(0xed)],'message':_0x5502fd[_0x9fff3(0xd4)]}],'warnings':[..._0x19aee4[_0x9fff3(0xd0)],..._0x4869ab[_0x9fff3(0xd0)]??[]],'verification':_0x4869ab[_0x9fff3(0xf6)],'error':{'code':_0x5502fd[_0x9fff3(0xed)],'message':_0x5502fd['message'],..._0x5502fd[_0x9fff3(0xd7)]?{'hint':_0x5502fd[_0x9fff3(0xd7)]}:{}}});return Object['defineProperty'](_0x5502fd,_0x9fff3(0xb4),{'value':_0x551855,'enumerable':!![],'configurable':!![]}),_0x5502fd;}export function asVerificationError(_0xd42bf1,_0x4481be){const _0x534d5f=a126_0xc1b8eb;if(_0xd42bf1 instanceof CliError&&_0xd42bf1['code']===_0x534d5f(0xee))return _0xd42bf1;const _0x3e9e27=_0xd42bf1 instanceof Error?_0xd42bf1[_0x534d5f(0xd4)]:String(_0xd42bf1);return menuError('menu_verification_failed',''+_0x4481be+(_0x3e9e27?':\x20'+_0x3e9e27:''),_0x534d5f(0xec));}export function describeMenuErrorCause(_0x45c8a9,_0x4d06c9,_0xfbcab){const _0x753e81=a126_0xc1b8eb,_0x557d98=mapMenuApiError(_0x45c8a9,_0x4d06c9,_0xfbcab);return{'causeCode':_0x557d98[_0x753e81(0xed)],'causeMessage':_0x557d98[_0x753e81(0xd4)]};}export function hasFlag(_0x114803,_0x37f2d8){const _0x4f8003=a126_0xc1b8eb;return Object['prototype'][_0x4f8003(0x100)][_0x4f8003(0xe0)](_0x114803[_0x4f8003(0xd1)],_0x37f2d8)&&_0x114803[_0x4f8003(0xd1)][_0x37f2d8]!==undefined;}export function toApiParentId(_0xa6bc7d){return _0xa6bc7d??0x0;}export function formatParent(_0x51d2e3){const _0x4b2b11=a126_0xc1b8eb;return _0x51d2e3==null?_0x4b2b11(0xb9):String(_0x51d2e3);}function a126_0x4ae9(_0x3be091,_0x358d15){_0x3be091=_0x3be091-0xb3;const _0x1acc47=a126_0x1acc();let _0x4ae998=_0x1acc47[_0x3be091];return _0x4ae998;}export function menuError(_0x5bff77,_0x20f9c8,_0x44126a){return new CliError(_0x5bff77,0x1,_0x20f9c8,_0x44126a);}export function mapMenuApiError(_0x3c5158,_0x12f329,_0x33335a){const _0x29e49a=a126_0xc1b8eb;if(_0x3c5158 instanceof CliError&&_0x3c5158[_0x29e49a(0xed)]!==_0x29e49a(0xbc))return _0x3c5158;const _0x370058=_0x3c5158 instanceof Error?_0x3c5158['message']:String(_0x3c5158);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x29e49a(0xcc)](_0x370058))return menuError(_0x29e49a(0xe3),'Permission\x20denied\x20while\x20attempting\x20to\x20'+_0x12f329+(_0x33335a?'\x20menu\x20'+_0x33335a:'')+'.','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.');return menuError(_0x29e49a(0x105),_0x29e49a(0xdd)+_0x12f329+(_0x33335a?_0x29e49a(0xc4)+_0x33335a:'')+':\x20'+_0x370058,'Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.');}export function isMenuResponseLoss(_0x367f0d){const _0x557cfd=a126_0xc1b8eb,_0x4b0688=_0x367f0d instanceof Error?_0x367f0d['message']:String(_0x367f0d);if(_0x367f0d instanceof CliError)return _0x367f0d[_0x557cfd(0xed)]===_0x557cfd(0xbc)&&/^Request (?:failed|timeout):/i[_0x557cfd(0xcc)](_0x4b0688);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i['test'](_0x4b0688);}function stateDrift(_0x4c9e2c){const _0x3f74b4=a126_0xc1b8eb;return menuError('menu_state_drift',_0x4c9e2c,_0x3f74b4(0xde));}
|
|
1
|
+
const a125_0x85e8f3=a125_0x407a;(function(_0x1c9716,_0x3cfda2){const _0x2c6f7d=a125_0x407a,_0xf78daf=_0x1c9716();while(!![]){try{const _0x353d3c=-parseInt(_0x2c6f7d(0x1d9))/0x1+parseInt(_0x2c6f7d(0x1a4))/0x2+parseInt(_0x2c6f7d(0x1de))/0x3+parseInt(_0x2c6f7d(0x1ae))/0x4+-parseInt(_0x2c6f7d(0x1e2))/0x5*(-parseInt(_0x2c6f7d(0x19a))/0x6)+parseInt(_0x2c6f7d(0x1ec))/0x7+-parseInt(_0x2c6f7d(0x1c4))/0x8;if(_0x353d3c===_0x3cfda2)break;else _0xf78daf['push'](_0xf78daf['shift']());}catch(_0x4cd855){_0xf78daf['push'](_0xf78daf['shift']());}}}(a125_0x16e6,0x8521c));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Exact\x20online\x20menu\x20id'};export const MENU_SORT_FLAG={'name':a125_0x85e8f3(0x1df),'type':'number','description':a125_0x85e8f3(0x1d5)};export const MENU_PARENT_ID_FLAG={'name':a125_0x85e8f3(0x1ed),'type':'string','description':a125_0x85e8f3(0x19b)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a125_0x85e8f3(0x1be),'type':'string','description':'Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level'};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a125_0x85e8f3(0x1c8),'type':a125_0x85e8f3(0x1d4),'description':a125_0x85e8f3(0x195)},{'name':a125_0x85e8f3(0x199),'type':a125_0x85e8f3(0x192),'description':a125_0x85e8f3(0x1b3)}];export function validateExactId(_0x1982fe){const _0x1d9d26=a125_0x85e8f3,_0x16893e=_0x1982fe['num']('id');if(!Number[_0x1d9d26(0x1d0)](_0x16893e)||_0x16893e<=0x0)throw CliErrors['validation'](_0x1d9d26(0x1b0));return _0x16893e;}export function validateSort(_0x570dd3,_0x59e902=a125_0x85e8f3(0x1df)){const _0x29b0cb=a125_0x85e8f3;if(!hasFlag(_0x570dd3,_0x59e902))return undefined;const _0x243e48=_0x570dd3[_0x29b0cb(0x1c1)](_0x59e902);if(!Number['isSafeInteger'](_0x243e48)||_0x243e48<0x0||_0x243e48>MAX_MENU_SORT)throw menuError(_0x29b0cb(0x1b4),'--'+_0x59e902+_0x29b0cb(0x1a9)+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x243e48;}export function nextSiblingSort(_0x5e403d,_0x29766a,_0x54ad8c){const _0x59de85=a125_0x85e8f3,_0x1b0645=getChildren(_0x5e403d,_0x29766a)[_0x59de85(0x1b1)](_0x421d21=>_0x421d21['sort'])[_0x59de85(0x198)](_0x5ccac0=>typeof _0x5ccac0==='number');if(_0x1b0645[_0x59de85(0x1c3)]===0x0)return 0x0;const _0x178721=Math['max'](..._0x1b0645);if(_0x178721>=MAX_MENU_SORT)throw menuError('menu_sort_overflow',_0x59de85(0x1e8)+_0x54ad8c+_0x59de85(0x1af)+_0x178721+'.',_0x59de85(0x1db)+MAX_MENU_SORT+_0x59de85(0x1d8));return _0x178721+0x1;}export function requireExplicitYes(_0x2f71bf){const _0x984dec=a125_0x85e8f3;if(_0x2f71bf[_0x984dec(0x19e)](_0x984dec(0x1b9)))return;if(!_0x2f71bf[_0x984dec(0x19e)](_0x984dec(0x1bb)))throw menuError('menu_confirmation_required',_0x984dec(0x1a6),_0x984dec(0x1a2));}export async function fetchMutationSnapshot(_0x3d300e,_0x39c2c2,_0x394b4f){const _0x5230a6=a125_0x85e8f3;try{return await fetchMenuSnapshot(_0x3d300e[_0x5230a6(0x1b8)],_0x3d300e[_0x5230a6(0x1a5)]);}catch(_0x3b2268){throw mapMenuApiError(_0x3b2268,_0x5230a6(0x196)+_0x39c2c2,_0x394b4f);}}export async function recheckMutationSnapshot(_0x4f7549,_0xbda3be,_0x2e0db8,_0x2b88a6){const _0x2d52af=a125_0x85e8f3;let _0x380c89;try{_0x380c89=await fetchMenuSnapshot(_0x4f7549[_0x2d52af(0x1b8)],_0x4f7549[_0x2d52af(0x1a5)]);}catch(_0x5856fe){const _0x4d02c1=mapMenuApiError(_0x5856fe,_0x2d52af(0x1a8)+_0x2e0db8,_0x2b88a6);throw menuFailure(_0x4d02c1,_0xbda3be,{'stage':'pre-write-recheck','failed':_0x2b88a6==null?{}:{'id':_0x2b88a6}});}if(_0x380c89[_0x2d52af(0x1cf)]!==_0xbda3be[_0x2d52af(0x1ad)]){const _0x553cb8=menuError(_0x2d52af(0x1e5),_0x2d52af(0x1dd)+_0x2e0db8+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.');throw menuFailure(_0x553cb8,_0xbda3be,{'stage':_0x2d52af(0x1e7),'failed':{..._0x2b88a6==null?{}:{'id':_0x2b88a6},'expectedSnapshotHash':_0xbda3be[_0x2d52af(0x1ad)],'currentSnapshotHash':_0x380c89[_0x2d52af(0x1cf)]}});}return _0x380c89;}export function parseParentId(_0x8065e0,_0x19a204,_0x229768={}){const _0x98fe8b=a125_0x85e8f3;if(!hasFlag(_0x8065e0,_0x19a204)){if(_0x229768[_0x98fe8b(0x18d)])throw CliErrors[_0x98fe8b(0x1bd)](_0x19a204);return undefined;}const _0x4ff1e7=_0x8065e0[_0x98fe8b(0x1cb)](_0x19a204)[_0x98fe8b(0x19f)]();if(_0x4ff1e7[_0x98fe8b(0x1d1)]()==='root')return null;if(!/^\d+$/['test'](_0x4ff1e7))throw CliErrors[_0x98fe8b(0x1c5)]('--'+_0x19a204+'\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.');const _0xc4d88e=Number(_0x4ff1e7);if(!Number[_0x98fe8b(0x1d0)](_0xc4d88e)||_0xc4d88e<=0x0)throw CliErrors['validation']('--'+_0x19a204+_0x98fe8b(0x1bc));return _0xc4d88e;}export function requireMenu(_0x1dc9c9,_0x32e6d3){const _0x917ad1=a125_0x85e8f3,_0x2d0e49=_0x1dc9c9['byId']['get'](_0x32e6d3);if(!_0x2d0e49)throw menuError('menu_not_found','Online\x20menu\x20not\x20found:\x20'+_0x32e6d3,_0x917ad1(0x190));return _0x2d0e49;}export function requireFolder(_0x59fdf7,_0x501bbc){const _0x5a830e=a125_0x85e8f3,_0x7a6d58=requireMenu(_0x59fdf7,_0x501bbc);if(_0x7a6d58[_0x5a830e(0x1eb)]!==_0x5a830e(0x1ce))throw menuError(_0x5a830e(0x1cd),_0x5a830e(0x18c)+_0x501bbc+'\x20is\x20type\x20\x22'+(_0x7a6d58['type']||_0x5a830e(0x1ac))+_0x5a830e(0x1ab),_0x5a830e(0x1c9));return _0x7a6d58;}export function assertExpectedState(_0x3b279e,_0x322220){const _0x47293e=a125_0x85e8f3;if(hasFlag(_0x3b279e,_0x47293e(0x1be))){const _0x314d4b=parseParentId(_0x3b279e,_0x47293e(0x1be),{'required':!![]});if(_0x322220[_0x47293e(0x1ba)]!==_0x314d4b)throw stateDrift('Menu\x20'+_0x322220['id']+_0x47293e(0x1ca)+formatParent(_0x314d4b)+_0x47293e(0x1b2)+formatParent(_0x322220[_0x47293e(0x1ba)])+'.');}if(hasFlag(_0x3b279e,_0x47293e(0x1c8))){const _0x1f0df5=_0x3b279e[_0x47293e(0x1cb)](_0x47293e(0x1c8));if(_0x322220[_0x47293e(0x1da)]!==_0x1f0df5)throw stateDrift(_0x47293e(0x18c)+_0x322220['id']+_0x47293e(0x18e)+JSON[_0x47293e(0x1e6)](_0x1f0df5)+_0x47293e(0x1b2)+JSON['stringify'](_0x322220[_0x47293e(0x1da)])+'.');}if(hasFlag(_0x3b279e,_0x47293e(0x199))){const _0x219eac=_0x3b279e[_0x47293e(0x1c1)](_0x47293e(0x199));if(!Number[_0x47293e(0x1d0)](_0x219eac)||_0x219eac<0x0)throw CliErrors[_0x47293e(0x1c5)](_0x47293e(0x1b5));if(_0x322220[_0x47293e(0x1a0)]!==_0x219eac)throw stateDrift('Menu\x20'+_0x322220['id']+_0x47293e(0x19d)+_0x219eac+_0x47293e(0x1b2)+_0x322220[_0x47293e(0x1a0)]+'.');}}export function assertVerified(_0x36834e,_0xf212c2,_0x5e418c='Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.'){const _0x2df18f=a125_0x85e8f3;if(!_0x36834e)throw menuError(_0x2df18f(0x1c6),_0xf212c2,_0x5e418c);}export function mutationResult(_0x2dd2e7){const _0x3de1cf=a125_0x85e8f3;return{'operation':_0x2dd2e7[_0x3de1cf(0x1d7)],'selector':_0x2dd2e7[_0x3de1cf(0x1b7)],'before':_0x2dd2e7['before'],'after':_0x2dd2e7['after'],'dryRun':_0x2dd2e7[_0x3de1cf(0x1c2)],'backend':_0x2dd2e7['backend'],..._0x2dd2e7[_0x3de1cf(0x1b6)]?{'plannedActions':_0x2dd2e7[_0x3de1cf(0x1b6)]}:{},..._0x2dd2e7['targets']?{'targets':_0x2dd2e7[_0x3de1cf(0x1c0)]}:{},..._0x2dd2e7[_0x3de1cf(0x1c7)]?{'deleteOrder':_0x2dd2e7[_0x3de1cf(0x1c7)]}:{},'snapshotHash':_0x2dd2e7[_0x3de1cf(0x1ad)],..._0x2dd2e7[_0x3de1cf(0x1dc)]?{'cascade':_0x2dd2e7[_0x3de1cf(0x1dc)]}:{},..._0x2dd2e7['planFile']?{'planFile':_0x2dd2e7['planFile']}:{},'succeeded':_0x2dd2e7['succeeded']??[],'failed':_0x2dd2e7[_0x3de1cf(0x1cc)]??[],'warnings':_0x2dd2e7[_0x3de1cf(0x18f)]??[],'verification':_0x2dd2e7[_0x3de1cf(0x19c)],'error':_0x2dd2e7[_0x3de1cf(0x18b)]};}export function menuDryRunResult(_0x24d555,_0x4a78dc){return{..._0x24d555,..._0x4a78dc};}export function menuFailure(_0xf6e028,_0x51703c,_0x72e067){const _0x2f685d=a125_0x85e8f3,_0x37c226=mutationResult({..._0x51703c,'after':_0x72e067[_0x2f685d(0x1a1)]===undefined?_0x51703c['after']:_0x72e067[_0x2f685d(0x1a1)],'backend':_0x72e067['backend']??_0x51703c[_0x2f685d(0x1ea)],'dryRun':![],'succeeded':_0x72e067[_0x2f685d(0x191)]??[],'failed':[{..._0x72e067[_0x2f685d(0x1cc)]??{},'stage':_0x72e067[_0x2f685d(0x194)],'code':_0xf6e028[_0x2f685d(0x1e0)],'message':_0xf6e028['message']}],'warnings':[..._0x51703c[_0x2f685d(0x18f)],..._0x72e067['warnings']??[]],'verification':_0x72e067[_0x2f685d(0x19c)],'error':{'code':_0xf6e028[_0x2f685d(0x1e0)],'message':_0xf6e028[_0x2f685d(0x18a)],..._0xf6e028['hint']?{'hint':_0xf6e028[_0x2f685d(0x1aa)]}:{}}});return Object[_0x2f685d(0x193)](_0xf6e028,_0x2f685d(0x1d2),{'value':_0x37c226,'enumerable':!![],'configurable':!![]}),_0xf6e028;}export function asVerificationError(_0x171d04,_0x3aa956){const _0x4e663a=a125_0x85e8f3;if(_0x171d04 instanceof CliError&&_0x171d04[_0x4e663a(0x1e0)]===_0x4e663a(0x1c6))return _0x171d04;const _0x311c30=_0x171d04 instanceof Error?_0x171d04[_0x4e663a(0x18a)]:String(_0x171d04);return menuError('menu_verification_failed',''+_0x3aa956+(_0x311c30?':\x20'+_0x311c30:''),'The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.');}export function describeMenuErrorCause(_0x3cad11,_0x275256,_0x3d5975){const _0x5db0a6=a125_0x85e8f3,_0x5b4629=mapMenuApiError(_0x3cad11,_0x275256,_0x3d5975);return{'causeCode':_0x5b4629[_0x5db0a6(0x1e0)],'causeMessage':_0x5b4629[_0x5db0a6(0x18a)]};}function a125_0x407a(_0x26ca97,_0x560b9e){_0x26ca97=_0x26ca97-0x18a;const _0x16e6fb=a125_0x16e6();let _0x407a1b=_0x16e6fb[_0x26ca97];return _0x407a1b;}export function hasFlag(_0x463480,_0x1bf4b9){const _0x40a3fa=a125_0x85e8f3;return Object[_0x40a3fa(0x1a3)][_0x40a3fa(0x1d6)][_0x40a3fa(0x1e1)](_0x463480[_0x40a3fa(0x1a7)],_0x1bf4b9)&&_0x463480[_0x40a3fa(0x1a7)][_0x1bf4b9]!==undefined;}export function toApiParentId(_0x318072){return _0x318072??0x0;}export function formatParent(_0xe1aa4){return _0xe1aa4==null?'root':String(_0xe1aa4);}export function menuError(_0x3a2f86,_0x19c738,_0x19d47d){return new CliError(_0x3a2f86,0x1,_0x19c738,_0x19d47d);}export function mapMenuApiError(_0x816a76,_0x596c27,_0x416b0f){const _0x1a878e=a125_0x85e8f3;if(_0x816a76 instanceof CliError&&_0x816a76[_0x1a878e(0x1e0)]!=='api_error')return _0x816a76;const _0x195677=_0x816a76 instanceof Error?_0x816a76[_0x1a878e(0x18a)]:String(_0x816a76);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x1a878e(0x1e9)](_0x195677))return menuError(_0x1a878e(0x1d3),'Permission\x20denied\x20while\x20attempting\x20to\x20'+_0x596c27+(_0x416b0f?_0x1a878e(0x1e3)+_0x416b0f:'')+'.',_0x1a878e(0x1e4));return menuError('menu_mutation_failed',_0x1a878e(0x197)+_0x596c27+(_0x416b0f?_0x1a878e(0x1e3)+_0x416b0f:'')+':\x20'+_0x195677,'Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.');}export function isMenuResponseLoss(_0x49acbb){const _0x13ffd6=a125_0x85e8f3,_0x40f972=_0x49acbb instanceof Error?_0x49acbb[_0x13ffd6(0x18a)]:String(_0x49acbb);if(_0x49acbb instanceof CliError)return _0x49acbb[_0x13ffd6(0x1e0)]===_0x13ffd6(0x1bf)&&/^Request (?:failed|timeout):/i['test'](_0x40f972);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i['test'](_0x40f972);}function stateDrift(_0x2099c6){const _0x232d83=a125_0x85e8f3;return menuError(_0x232d83(0x1e5),_0x2099c6,'Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.');}function a125_0x16e6(){const _0x18c214=['\x20path\x20changed:\x20expected\x20','warnings','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','succeeded','number','defineProperty','stage','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','read\x20online\x20menu\x20facts\x20before\x20','Failed\x20to\x20','filter','expected-children-count','4197306cmPpzM','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','verification','\x20child\x20count\x20changed:\x20expected\x20','bool','trim','childrenCount','after','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','prototype','1548380wiKGWA','cookie','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','rawFlags','recheck\x20online\x20menu\x20facts\x20before\x20','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','hint','\x22,\x20not\x20folder.','unknown','snapshotHash','672900hiUtHk','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','map',',\x20current\x20','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','menu_sort_invalid','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','plannedActions','selector','appCode','dry-run','parentId','yes','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','flagMissing','expect-parent-id','api_error','targets','num','dryRun','length','5201968SCpiDQ','validation','menu_verification_failed','deleteOrder','expect-path','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','\x20parent\x20changed:\x20expected\x20','str','failed','menu_parent_not_folder','folder','hash','isSafeInteger','toLowerCase','data','menu_permission_denied','string','Sibling\x20sort\x20value\x20(non-negative\x20integer)','hasOwnProperty','operation',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','983351CZxueB','path','Reorder\x20sibling\x20menus\x20below\x20','cascade','Online\x20menu\x20state\x20changed\x20before\x20','236358EGCypT','sort','code','call','5mLsbYS','\x20menu\x20','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','menu_state_drift','stringify','pre-write-recheck','Cannot\x20append\x20a\x20','test','backend','type','3207071ijkxfR','parent-id','message','error','Menu\x20','required'];a125_0x16e6=function(){return _0x18c214;};return a125_0x16e6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc4d7e4,_0x2adf2c){const _0x48004b=a126_0x2c82,_0x11ad96=_0xc4d7e4();while(!![]){try{const _0x18c0f0=-parseInt(_0x48004b(0x109))/0x1*(-parseInt(_0x48004b(0x107))/0x2)+parseInt(_0x48004b(0x110))/0x3+parseInt(_0x48004b(0x11a))/0x4*(-parseInt(_0x48004b(0x126))/0x5)+parseInt(_0x48004b(0x10a))/0x6+-parseInt(_0x48004b(0x10b))/0x7*(-parseInt(_0x48004b(0x129))/0x8)+parseInt(_0x48004b(0x12f))/0x9*(-parseInt(_0x48004b(0x12a))/0xa)+-parseInt(_0x48004b(0x124))/0xb*(parseInt(_0x48004b(0x120))/0xc);if(_0x18c0f0===_0x2adf2c)break;else _0x11ad96['push'](_0x11ad96['shift']());}catch(_0x1a8863){_0x11ad96['push'](_0x11ad96['shift']());}}}(a126_0x2c91,0xbe757));function a126_0x2c82(_0x711ac1,_0x40056e){_0x711ac1=_0x711ac1-0x107;const _0x2c9107=a126_0x2c91();let _0x2c8264=_0x2c9107[_0x711ac1];return _0x2c8264;}function a126_0x2c91(){const _0x60ce1e=['info','3605lghmVt','7946934xNPvhE','14uitIMH','path','Fetched\x20','Start\x20batch\x20menu\x20creation,\x20total\x20','stringify','1525821LCvFNY','map','update-menu-cdn-url','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Batch\x20menu\x20creation\x20completed,\x20total\x20','loadScriptMode','Create\x20menu\x20\x22','total','Update\x20menu\x20','create-menu','568iTzrRw','import','get-online-menu-list','length','Update\x20menu\x20assets\x20\x22','Updating\x20menu\x20asset\x20links:\x20','55332YZTtpV','resources','\x20menu\x20group(s)','Creating\x20menu:\x20','2332CRHUCr','menuGroups','30055aFTlOo','Menu\x20created\x20successfully:\x20','\x20menu','4304504HwsWbr','4752570vVndLh','menus','create-menus','label','procode','18QkwYim','362SsTZQY'];a126_0x2c91=function(){return _0x60ce1e;};return a126_0x2c91();}import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a126_0x1ec342,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x113e2b,_0x762a34){const _0xbb1886=a126_0x2c82,_0x3e405e=getEnv();logger[_0xbb1886(0x108)](_0xbb1886(0x11c),isProduction(_0x3e405e)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x113e2b+')':_0xbb1886(0x113)+_0x113e2b+')');const _0x3606d4=await fetchMenuSnapshot(_0x113e2b,_0x762a34,{'verbose':!![]});return logger['info'](_0xbb1886(0x11c),_0xbb1886(0x10d)+_0x3606d4[_0xbb1886(0x117)]+'\x20online\x20menus\x20successfully'),_0x3606d4[_0xbb1886(0x12b)][_0xbb1886(0x111)](toProcessedMenuItem);}export async function createMenu(_0x5e649c,_0x19877d,_0x74f16e){const _0x1f15b4=a126_0x2c82;logger['info'](_0x1f15b4(0x119),_0x1f15b4(0x123)+_0x74f16e[_0x1f15b4(0x12d)]+'\x20('+_0x74f16e[_0x1f15b4(0x10c)]+')');const _0xbb34c0={'appCode':_0x5e649c,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x1f15b4(0x11b),'resources':_0x74f16e['resources']?JSON[_0x1f15b4(0x10f)](_0x74f16e['resources']):undefined},..._0x74f16e},_0x3a3b48=await createMenuRecord(_0xbb34c0,_0x19877d,_0x1f15b4(0x116)+_0x74f16e[_0x1f15b4(0x12d)]+'\x22');return logger['info']('create-menu','Menu\x20created\x20successfully:\x20'+_0x74f16e[_0x1f15b4(0x12d)]),_0x3a3b48;}async function createSingleMenu(_0x3ad161,_0x45cde2,_0x398d35,_0x144ab1){const _0x2d736d=a126_0x2c82,_0x47dfd3={'appCode':_0x3ad161,'type':_0x2d736d(0x12e),'sort':0x0,'extend':{'loadScriptMode':_0x2d736d(0x11b),'resources':_0x144ab1?JSON[_0x2d736d(0x10f)](_0x144ab1):undefined},'label':_0x398d35[_0x2d736d(0x12d)],'path':_0x398d35[_0x2d736d(0x10c)]},_0x2118c7=await createMenuRecord(_0x47dfd3,_0x45cde2,_0x2d736d(0x116)+_0x398d35['label']+'\x22');return logger['info'](_0x2d736d(0x119),_0x2d736d(0x127)+_0x398d35[_0x2d736d(0x12d)]),_0x2118c7;}export async function createMenus(_0x30da79,_0x506ba3,_0x43e71a,_0x23d225){const _0x49c390=a126_0x2c82;logger['info'](_0x49c390(0x12c),_0x49c390(0x10e)+_0x43e71a['length']);const _0xb766e1=await Promise['all'](_0x43e71a[_0x49c390(0x111)](_0x54cd35=>createSingleMenu(_0x30da79,_0x506ba3,_0x54cd35,_0x23d225)));return logger[_0x49c390(0x108)]('create-menus',_0x49c390(0x114)+_0x43e71a[_0x49c390(0x11d)]),_0xb766e1;}export async function updateMenuCdnUrl(_0x1360f8,_0x419980,_0x5b61b8){const _0x10282f=a126_0x2c82;logger[_0x10282f(0x108)](_0x10282f(0x112),_0x10282f(0x11f)+_0x5b61b8['label']+'\x20('+_0x5b61b8[_0x10282f(0x10c)]+')');const _0x2f4b3f={'id':_0x5b61b8['id'],'appCode':_0x1360f8,'extend':{..._0x5b61b8['extend']??{},..._0x5b61b8[_0x10282f(0x115)]?{'loadScriptMode':_0x5b61b8[_0x10282f(0x115)]}:{},'resources':_0x5b61b8[_0x10282f(0x121)]?JSON[_0x10282f(0x10f)](_0x5b61b8['resources']):undefined}},_0x5c6542=await updateMenuRecord(_0x2f4b3f,_0x419980,_0x10282f(0x11e)+_0x5b61b8['label']+'\x22');return logger['info'](_0x10282f(0x112),'Menu\x20assets\x20synced:\x20'+_0x5b61b8[_0x10282f(0x12d)],undefined),_0x5c6542;}export async function createMenuEntity(_0x576e6c,_0x218d74,_0x2f7e58){const _0x4663d3=a126_0x2c82;return createMenuRecord({'appCode':_0x576e6c,..._0x2f7e58},_0x218d74,_0x4663d3(0x116)+_0x2f7e58[_0x4663d3(0x12d)]+'\x22');}export async function updateMenuEntity(_0x3531fb,_0x230c70,_0x48f8e6){const _0x2e344e=a126_0x2c82;return updateMenuRecord({'appCode':_0x3531fb,..._0x48f8e6},_0x230c70,_0x2e344e(0x118)+_0x48f8e6['id']);}export async function batchDeleteMenuEntities(_0x55fbad,_0x381b9f){const _0x53f572=a126_0x2c82;return batchDeleteMenuRecords(_0x381b9f,_0x55fbad,'Delete\x20'+_0x381b9f[_0x53f572(0x11d)]+_0x53f572(0x128)+(_0x381b9f[_0x53f572(0x11d)]===0x1?'':'s'));}export async function startMenuRegroup(_0x5b27b0,_0x19cf95){const _0x5ad736=a126_0x2c82;return a126_0x1ec342(_0x19cf95,_0x5b27b0,'Regroup\x20'+_0x19cf95[_0x5ad736(0x125)][_0x5ad736(0x11d)]+_0x5ad736(0x122));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a127_0x2def76=a127_0x2509;function a127_0x2509(_0x43f2fd,_0x12a918){_0x43f2fd=_0x43f2fd-0x1eb;const _0x5bfac5=a127_0x5bfa();let _0x250986=_0x5bfac5[_0x43f2fd];return _0x250986;}(function(_0x16ebff,_0x37f3d1){const _0x2d533b=a127_0x2509,_0xdb6369=_0x16ebff();while(!![]){try{const _0x1cecca=-parseInt(_0x2d533b(0x1eb))/0x1+-parseInt(_0x2d533b(0x217))/0x2*(parseInt(_0x2d533b(0x213))/0x3)+-parseInt(_0x2d533b(0x212))/0x4*(parseInt(_0x2d533b(0x211))/0x5)+parseInt(_0x2d533b(0x208))/0x6*(-parseInt(_0x2d533b(0x1f2))/0x7)+-parseInt(_0x2d533b(0x214))/0x8*(-parseInt(_0x2d533b(0x202))/0x9)+parseInt(_0x2d533b(0x1f1))/0xa*(-parseInt(_0x2d533b(0x21b))/0xb)+parseInt(_0x2d533b(0x21c))/0xc*(parseInt(_0x2d533b(0x1ff))/0xd);if(_0x1cecca===_0x37f3d1)break;else _0xdb6369['push'](_0xdb6369['shift']());}catch(_0xf4dd76){_0xdb6369['push'](_0xdb6369['shift']());}}}(a127_0x5bfa,0x76688));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';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set(['jsUrl',a127_0x2def76(0x1fb)]);function validateParams(_0x463a78){const _0x2e7580=a127_0x2def76,_0x41be13=[];return _0x463a78[_0x2e7580(0x203)]&&!isValidJsHttpsUrl(_0x463a78['jsUrl'])&&_0x41be13[_0x2e7580(0x1f8)]({'field':'jsUrl','message':_0x2e7580(0x207)}),_0x463a78[_0x2e7580(0x1fb)]&&!isValidCssHttpsUrl(_0x463a78[_0x2e7580(0x1fb)])&&_0x41be13[_0x2e7580(0x1f8)]({'field':_0x2e7580(0x1fb),'message':_0x2e7580(0x201)}),_0x41be13;}function a127_0x5bfa(){const _0x398399=['JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','1223958xMfJuq','No\x20local\x20pages\x20matched\x20paths:\x20','info','join','import','CSS\x20URL\x20is\x20unreachable:\x20','JS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params\x20fields:\x20','isArray','26020KGLeXp','252QnTxuk','1227uZOUzp','2240dmuYkM','path','has','3746isFMPO','menu-sync','Menu\x20sync\x20completed','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','484qCfGAQ','36Mhobvy','get','364691fKaawl','keys','pages','map','hasOwn','dryRun','47290FcoqDb','7Xphcnh','setLogPath',':\x20expected\x20a\x20non-empty\x20string.','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','trim','Start\x20non-interactive\x20menu\x20sync','push','Invalid\x20--params.','filter','cssUrl','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','length','label','10073219GjMtsM','\x0a\x20\x20Available\x20local\x20paths:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','999MUbFFz','jsUrl','Invalid\x20--params\x20JSON.','message','string'];a127_0x5bfa=function(){return _0x398399;};return a127_0x5bfa();}export async function runMenuSyncCore(_0x5835a2,_0xf78cf0,_0x5f40e3=[],_0x3a63dc,_0x4626fe={}){const _0x35090d=a127_0x2def76,_0x7e3da9=parseMenuSyncParams(_0x3a63dc),_0x7850d4=[...new Set(_0x5f40e3[_0x35090d(0x1ee)](_0x55a7a8=>_0x55a7a8[_0x35090d(0x1f6)]())[_0x35090d(0x1fa)](Boolean))],_0x43c3f6=_0x7e3da9['jsUrl'],_0x3b615f=_0x7e3da9[_0x35090d(0x1fb)],_0x33e8fe=[];if(_0x43c3f6)_0x33e8fe['push'](_0x43c3f6);if(_0x3b615f)_0x33e8fe[_0x35090d(0x1f8)](_0x3b615f);const _0x2afaa7=validateParams(_0x7e3da9);if(_0x2afaa7[_0x35090d(0x1fd)]>0x0){const _0x508d36=_0x2afaa7[_0x35090d(0x1ee)](_0x4d0252=>'--params.'+_0x4d0252['field']+':\x20'+_0x4d0252[_0x35090d(0x205)])[_0x35090d(0x20b)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x508d36);}logger[_0x35090d(0x1f3)](process['cwd']()),logger['info'](_0x35090d(0x218),_0x35090d(0x1f7),{'appCode':_0x5835a2,'selectedCount':_0x7850d4[_0x35090d(0x1fd)],'jsUrl':_0x43c3f6,'cssUrl':_0x3b615f});if(_0x43c3f6){const _0x3f13fb=await isUrlReachable(_0x43c3f6);if(!_0x3f13fb)throw new Error(_0x35090d(0x20e)+_0x43c3f6);}if(_0x3b615f){const _0x5cda10=await isUrlReachable(_0x3b615f);if(!_0x5cda10)throw new Error(_0x35090d(0x20d)+_0x3b615f);}const _0x26df8a=getLocalPages();if(_0x26df8a['length']===0x0){if(_0x7850d4[_0x35090d(0x1fd)]>0x0)throw new Error(_0x35090d(0x209)+_0x7850d4[_0x35090d(0x20b)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x4626fe[_0x35090d(0x1f0)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x134845=await getOnlineMenuList(_0x5835a2,_0xf78cf0),_0x5466d5=new Set(_0x134845[_0x35090d(0x1ee)](_0x26df8b=>_0x26df8b['path']));let _0xe386f2;if(_0x7850d4['length']>0x0){const _0x22b39a=new Map(_0x26df8a['map'](_0x23f7b0=>[_0x23f7b0[_0x35090d(0x215)],_0x23f7b0])),_0x44c697=_0x7850d4['filter'](_0x5e63f1=>!_0x22b39a[_0x35090d(0x216)](_0x5e63f1));if(_0x44c697[_0x35090d(0x1fd)]>0x0){const _0x2bf514=_0x26df8a[_0x35090d(0x1ee)](_0x5bc4bc=>_0x5bc4bc[_0x35090d(0x215)])['join'](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x44c697['join'](',\x20')+_0x35090d(0x200)+_0x2bf514);}const _0x1dc9b6=_0x7850d4[_0x35090d(0x1fa)](_0xfbb241=>_0x5466d5[_0x35090d(0x216)](_0xfbb241));if(_0x1dc9b6[_0x35090d(0x1fd)]>0x0)throw new Error(_0x35090d(0x1f5)+_0x1dc9b6['join'](',\x20'));_0xe386f2=_0x7850d4[_0x35090d(0x1ee)](_0x38c1b4=>_0x22b39a[_0x35090d(0x21d)](_0x38c1b4));}else _0xe386f2=_0x26df8a[_0x35090d(0x1fa)](_0x5613c0=>!_0x5466d5['has'](_0x5613c0[_0x35090d(0x215)]));if(_0xe386f2[_0x35090d(0x1fd)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x4626fe[_0x35090d(0x1f0)]===!![],'targetPages':[],'plannedMenus':[]};const _0x411652=_0xe386f2['map'](_0x1cc254=>({'type':'procode','path':_0x1cc254['path'],'label':_0x1cc254[_0x35090d(0x1fe)],'loadScriptMode':_0x35090d(0x20c),'resources':[..._0x33e8fe]}));if(_0x4626fe[_0x35090d(0x1f0)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0xe386f2,'plannedMenus':_0x411652};const _0x858bc5=await createMenus(_0x5835a2,_0xf78cf0,_0xe386f2,_0x33e8fe[_0x35090d(0x1fd)]>0x0?_0x33e8fe:undefined);return logger[_0x35090d(0x20a)]('menu-sync',_0x35090d(0x219),{'count':_0xe386f2[_0x35090d(0x1fd)],'resources':_0x33e8fe}),{'created':_0x858bc5[_0x35090d(0x1fd)],'skipped':![],'dryRun':![],'targetPages':_0xe386f2,'plannedMenus':_0x411652,'menus':_0x858bc5};}export function parseMenuSyncParams(_0x27e032){const _0xd597fa=a127_0x2def76;if(!_0x27e032||typeof _0x27e032!==_0xd597fa(0x206))return{};let _0x2b7b27;try{_0x2b7b27=JSON['parse'](_0x27e032);}catch{throw new Error(_0xd597fa(0x204));}if(typeof _0x2b7b27!=='object'||_0x2b7b27===null||Array[_0xd597fa(0x210)](_0x2b7b27))throw new Error(_0xd597fa(0x21a));const _0x4f0a65=_0x2b7b27;if(Object[_0xd597fa(0x1ef)](_0x4f0a65,_0xd597fa(0x1ed)))throw new Error(_0xd597fa(0x1fc));const _0x24515a=Object[_0xd597fa(0x1ec)](_0x4f0a65)[_0xd597fa(0x1fa)](_0x51afca=>!MENU_SYNC_PARAM_KEYS[_0xd597fa(0x216)](_0x51afca));if(_0x24515a[_0xd597fa(0x1fd)]>0x0)throw new Error(_0xd597fa(0x20f)+_0x24515a[_0xd597fa(0x20b)](',\x20')+'.');for(const _0x16ea08 of MENU_SYNC_PARAM_KEYS){const _0x23c163=_0x4f0a65[_0x16ea08];if(_0x23c163!==undefined&&(typeof _0x23c163!==_0xd597fa(0x206)||_0x23c163[_0xd597fa(0x1f6)]()===''))throw new Error(_0xd597fa(0x1f9)+_0x16ea08+_0xd597fa(0x1f4));}return{'jsUrl':typeof _0x4f0a65[_0xd597fa(0x203)]===_0xd597fa(0x206)?_0x4f0a65[_0xd597fa(0x203)][_0xd597fa(0x1f6)]():undefined,'cssUrl':typeof _0x4f0a65[_0xd597fa(0x1fb)]==='string'?_0x4f0a65[_0xd597fa(0x1fb)][_0xd597fa(0x1f6)]():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x24027b,_0x480690){const _0x492b80=a130_0x4aca,_0x1cd927=_0x24027b();while(!![]){try{const _0x5e763e=-parseInt(_0x492b80(0x1ca))/0x1+parseInt(_0x492b80(0x1ad))/0x2*(parseInt(_0x492b80(0x1ae))/0x3)+parseInt(_0x492b80(0x1cd))/0x4*(parseInt(_0x492b80(0x1c9))/0x5)+parseInt(_0x492b80(0x1c0))/0x6+-parseInt(_0x492b80(0x1e6))/0x7+-parseInt(_0x492b80(0x1b2))/0x8+parseInt(_0x492b80(0x1d7))/0x9*(-parseInt(_0x492b80(0x1be))/0xa);if(_0x5e763e===_0x480690)break;else _0x1cd927['push'](_0x1cd927['shift']());}catch(_0x1b33d7){_0x1cd927['push'](_0x1cd927['shift']());}}}(a130_0x3a4f,0x5e47a));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(_0x158ead){const _0x4b07de=a130_0x4aca,_0x36ec23=[];return _0x158ead['jsUrl']&&!isValidJsHttpsUrl(_0x158ead['jsUrl'])&&_0x36ec23['push']({'field':_0x4b07de(0x1c2),'message':_0x4b07de(0x1af)}),_0x158ead[_0x4b07de(0x1de)]&&!isValidCssHttpsUrl(_0x158ead[_0x4b07de(0x1de)])&&_0x36ec23[_0x4b07de(0x1e4)]({'field':_0x4b07de(0x1de),'message':_0x4b07de(0x1ab)}),_0x36ec23;}export async function runMenuUpdateCore(_0x3cad0f,_0x2595d5,_0x5c0e2e,_0x47c470={}){const _0x4cefc2=a130_0x4aca,_0x1f34d9=parseUpdateParamsFlag(_0x5c0e2e),_0x563543=normalizeMode(_0x47c470[_0x4cefc2(0x1d0)]);validateSelection(_0x47c470[_0x4cefc2(0x1c8)]);const _0x47ddb3=[];if(_0x1f34d9[_0x4cefc2(0x1c2)])_0x47ddb3[_0x4cefc2(0x1e4)](_0x1f34d9[_0x4cefc2(0x1c2)]);if(_0x1f34d9['cssUrl'])_0x47ddb3[_0x4cefc2(0x1e4)](_0x1f34d9[_0x4cefc2(0x1de)]);const _0x2d3a55=validateParams(_0x1f34d9);if(_0x2d3a55[_0x4cefc2(0x1bd)]>0x0){const _0x221728=_0x2d3a55[_0x4cefc2(0x1e0)](_0x728536=>_0x4cefc2(0x1ec)+_0x728536[_0x4cefc2(0x1ea)]+':\x20'+_0x728536[_0x4cefc2(0x1e1)])[_0x4cefc2(0x1d2)](';\x20');throw new Error(_0x4cefc2(0x1bf)+_0x221728);}if(_0x47ddb3[_0x4cefc2(0x1bd)]===0x0)throw new Error(_0x4cefc2(0x1c7)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x4cefc2(0x1c5)](process['cwd']()),logger[_0x4cefc2(0x1bb)](_0x4cefc2(0x1b8),_0x4cefc2(0x1d1),{'appCode':_0x3cad0f,'jsUrl':_0x1f34d9[_0x4cefc2(0x1c2)],'cssUrl':_0x1f34d9[_0x4cefc2(0x1de)],'mode':_0x563543,'dryRun':_0x47c470[_0x4cefc2(0x1ac)]===!![]});if(_0x1f34d9[_0x4cefc2(0x1c2)]){const _0x5b10c8=await isUrlReachable(_0x1f34d9['jsUrl']);if(!_0x5b10c8)throw new Error(_0x4cefc2(0x1e9)+_0x1f34d9[_0x4cefc2(0x1c2)]);}if(_0x1f34d9[_0x4cefc2(0x1de)]){const _0x2f259b=await isUrlReachable(_0x1f34d9['cssUrl']);if(!_0x2f259b)throw new Error(_0x4cefc2(0x1b6)+_0x1f34d9[_0x4cefc2(0x1de)]);}const _0x4c6020=await getOnlineMenuList(_0x3cad0f,_0x2595d5),_0x3b24a7=_0x4c6020[_0x4cefc2(0x1df)](_0x2b6c61=>_0x2b6c61['resources'][_0x4cefc2(0x1bd)]>0x0),_0x5595c9=selectMenusForUpdate(_0x3b24a7,_0x47c470['selection']);if(_0x5595c9['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x47c470[_0x4cefc2(0x1ac)]===!![]};const _0x49bf1e=_0x5595c9[_0x4cefc2(0x1e0)](_0x506dfa=>buildMenuUpdateDiff(_0x506dfa,_0x1f34d9,_0x563543,_0x47c470['force']===!![],_0x47c470[_0x4cefc2(0x1e7)]));if(_0x47c470[_0x4cefc2(0x1ac)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x49bf1e};const _0x4bd1cd=await Promise[_0x4cefc2(0x1e5)](_0x5595c9[_0x4cefc2(0x1e0)]((_0x2b3dd1,_0x43311a)=>updateMenuCdnUrl(_0x3cad0f,_0x2595d5,{'id':_0x2b3dd1['id'],'label':_0x2b3dd1[_0x4cefc2(0x1bc)],'path':_0x2b3dd1[_0x4cefc2(0x1cb)],'resources':_0x49bf1e[_0x43311a][_0x4cefc2(0x1e2)][_0x4cefc2(0x1e3)],'extend':_0x2b3dd1[_0x4cefc2(0x1d6)]??null,'loadScriptMode':_0x47c470[_0x4cefc2(0x1e7)]}))),_0x5767d0=_0x4bd1cd[_0x4cefc2(0x1df)](_0x3cb9af=>_0x3cb9af[_0x4cefc2(0x1b4)]==='fulfilled')['map'](_0x241356=>_0x241356[_0x4cefc2(0x1d3)]),_0x5bd396=_0x4bd1cd[_0x4cefc2(0x1df)](_0x1ef235=>_0x1ef235['status']===_0x4cefc2(0x1b1))[_0x4cefc2(0x1bd)];return logger['info'](_0x4cefc2(0x1b8),_0x4cefc2(0x1b9),{'count':_0x5595c9[_0x4cefc2(0x1bd)],'resources':_0x47ddb3}),{'updated':_0x5767d0[_0x4cefc2(0x1bd)],'failed':_0x5bd396,'skipped':![],'menus':_0x5767d0};}function validateSelection(_0x2a04c3){const _0x305688=a130_0x4aca;if(!_0x2a04c3)throw new Error(_0x305688(0x1eb));if(_0x2a04c3[_0x305688(0x1a9)]&&(_0x2a04c3[_0x305688(0x1da)]['length']>0x0||_0x2a04c3[_0x305688(0x1b3)][_0x305688(0x1bd)]>0x0))throw new Error(_0x305688(0x1ee));if(!_0x2a04c3[_0x305688(0x1a9)]&&_0x2a04c3[_0x305688(0x1da)][_0x305688(0x1bd)]===0x0&&_0x2a04c3[_0x305688(0x1b3)]['length']===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0x3c2fa8,_0x1fd8b4){const _0x2bb921=a130_0x4aca;validateSelection(_0x1fd8b4);if(_0x1fd8b4[_0x2bb921(0x1a9)])return _0x3c2fa8;const _0x40c5cc=new Set(_0x3c2fa8['map'](_0x34893a=>_0x34893a['id'])),_0x3ab46b=new Set(_0x3c2fa8[_0x2bb921(0x1e0)](_0x56fe09=>_0x56fe09[_0x2bb921(0x1cb)])),_0x34813c=_0x1fd8b4[_0x2bb921(0x1da)]['filter'](_0x286708=>!_0x40c5cc[_0x2bb921(0x1ba)](_0x286708)),_0x4aafda=_0x1fd8b4['paths']['filter'](_0x385f05=>!_0x3ab46b['has'](_0x385f05));if(_0x34813c['length']>0x0||_0x4aafda[_0x2bb921(0x1bd)]>0x0){const _0x29cf12=[..._0x34813c['map'](_0x86510e=>String(_0x86510e)),..._0x4aafda][_0x2bb921(0x1d2)](',\x20');throw new Error(_0x2bb921(0x1c3)+_0x29cf12);}const _0x4033bf=new Set(_0x1fd8b4[_0x2bb921(0x1da)]),_0x4cb5bb=new Set(_0x1fd8b4[_0x2bb921(0x1b3)]);return _0x3c2fa8[_0x2bb921(0x1df)](_0x45dcdc=>_0x4033bf['has'](_0x45dcdc['id'])||_0x4cb5bb[_0x2bb921(0x1ba)](_0x45dcdc[_0x2bb921(0x1cb)]));}function normalizeMode(_0x18b3a8){const _0x45c927=a130_0x4aca;if(!_0x18b3a8)return'patch';if(_0x18b3a8==='replace'||_0x18b3a8==='patch')return _0x18b3a8;throw new Error(_0x45c927(0x1dd)+_0x18b3a8+_0x45c927(0x1ed));}function a130_0x3a4f(){const _0x481ee2=['menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','--params.','.\x20Allowed\x20values:\x20replace,\x20patch','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','all','.css','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','dryRun','430pNvkRT','10065PFCoNG','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','rejected','2159568TOyVfp','paths','status','endsWith','CSS\x20URL\x20is\x20unreachable:\x20','\x22\x20(','menu-asset-update','Menu\x20asset\x20update\x20completed','has','info','label','length','25450SeJECL','Invalid\x20--params:\x20','4437558lMsqoo','trim','jsUrl','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','string','setLogPath','isArray','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','selection','129625bFVvww','400632ppoczl','path','unshift','108FpKPMW','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menu\x20asset-update\x20cannot\x20patch\x20','mode','Start\x20non-interactive\x20menu\x20asset\x20update','join','value','object','some','extend','2655EHMjVB','patch',').\x20','menuIds','toLowerCase','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','Invalid\x20--mode:\x20','cssUrl','filter','map','message','after','resources','push','allSettled','2473590BfzGfo','loadScriptMode','parse','JS\x20URL\x20is\x20unreachable:\x20','field'];a130_0x3a4f=function(){return _0x481ee2;};return a130_0x3a4f();}function buildMenuUpdateDiff(_0x5f4363,_0x124ee4,_0x483dab,_0x4ee218,_0x4da864){const _0x1ae940=a130_0x4aca,_0x4d8c89=[..._0x5f4363[_0x1ae940(0x1e3)]];_0x483dab===_0x1ae940(0x1d8)&&assertUnambiguousPatchResources(_0x5f4363,_0x4d8c89,_0x124ee4);const _0x399993=_0x483dab===_0x1ae940(0x1d8)?patchResources(_0x4d8c89,_0x124ee4):replaceResources(_0x124ee4),_0x36871d=[],_0x13ac8b=_0x4d8c89[_0x1ae940(0x1d5)](isJsResource),_0x20145d=_0x399993[_0x1ae940(0x1d5)](isJsResource);if(_0x13ac8b&&!_0x20145d){const _0x5c3745='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x5f4363[_0x1ae940(0x1bc)]+_0x1ae940(0x1b7)+_0x5f4363[_0x1ae940(0x1cb)]+_0x1ae940(0x1d9)+_0x1ae940(0x1dc);if(!_0x4ee218)throw new Error(_0x5c3745);_0x36871d[_0x1ae940(0x1e4)](_0x5c3745);}const _0x4def0f=_0x4d8c89[_0x1ae940(0x1d5)](isCssResource),_0x29207e=_0x399993[_0x1ae940(0x1d5)](isCssResource);_0x4def0f&&!_0x29207e&&_0x36871d[_0x1ae940(0x1e4)](_0x1ae940(0x1ce)+_0x5f4363['label']+'\x22\x20('+_0x5f4363[_0x1ae940(0x1cb)]+').');const _0x242f68=typeof _0x5f4363[_0x1ae940(0x1d6)]?.[_0x1ae940(0x1e7)]===_0x1ae940(0x1c4)?_0x5f4363['extend'][_0x1ae940(0x1e7)]:null,_0x58daa6=_0x4da864?{'loadScriptMode':_0x242f68}:{},_0xe0420f=_0x4da864?{'loadScriptMode':_0x4da864}:{};return{'id':_0x5f4363['id'],'label':_0x5f4363[_0x1ae940(0x1bc)],'path':_0x5f4363[_0x1ae940(0x1cb)],'mode':_0x483dab,'before':{'resources':_0x4d8c89,..._0x58daa6},'after':{'resources':_0x399993,..._0xe0420f},'warnings':_0x36871d};}function replaceResources(_0x4c8c16){const _0x309d57=a130_0x4aca;return[_0x4c8c16[_0x309d57(0x1c2)],_0x4c8c16[_0x309d57(0x1de)]]['filter'](_0x134d03=>!!_0x134d03);}function assertUnambiguousPatchResources(_0x535cdd,_0xe4fbc6,_0xb9eea8){const _0x3cfe0e=a130_0x4aca,_0x156eed=_0xe4fbc6[_0x3cfe0e(0x1df)](isJsResource)[_0x3cfe0e(0x1bd)];if(_0xb9eea8[_0x3cfe0e(0x1c2)]&&_0x156eed>0x1)throw new Error(_0x3cfe0e(0x1cf)+_0x156eed+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x535cdd[_0x3cfe0e(0x1bc)]+_0x3cfe0e(0x1b7)+_0x535cdd[_0x3cfe0e(0x1cb)]+')\x20'+'with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');const _0x56b9dc=_0xe4fbc6['filter'](isCssResource)[_0x3cfe0e(0x1bd)];if(_0xb9eea8[_0x3cfe0e(0x1de)]&&_0x56b9dc>0x1)throw new Error(_0x3cfe0e(0x1cf)+_0x56b9dc+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x535cdd[_0x3cfe0e(0x1bc)]+_0x3cfe0e(0x1b7)+_0x535cdd[_0x3cfe0e(0x1cb)]+')\x20'+_0x3cfe0e(0x1b0));}function patchResources(_0x51180e,_0x42883d){const _0x40c268=a130_0x4aca;let _0x58e120=![],_0x211ee4=![];const _0x1d066d=[];for(const _0x59f0f1 of _0x51180e){if(isJsResource(_0x59f0f1)){if(_0x42883d[_0x40c268(0x1c2)]&&!_0x58e120)_0x1d066d['push'](_0x42883d[_0x40c268(0x1c2)]),_0x58e120=!![];else!_0x42883d[_0x40c268(0x1c2)]&&_0x1d066d[_0x40c268(0x1e4)](_0x59f0f1);continue;}if(isCssResource(_0x59f0f1)){if(_0x42883d[_0x40c268(0x1de)]&&!_0x211ee4)_0x1d066d['push'](_0x42883d['cssUrl']),_0x211ee4=!![];else!_0x42883d[_0x40c268(0x1de)]&&_0x1d066d[_0x40c268(0x1e4)](_0x59f0f1);continue;}_0x1d066d[_0x40c268(0x1e4)](_0x59f0f1);}return _0x42883d['jsUrl']&&!_0x58e120&&_0x1d066d[_0x40c268(0x1cc)](_0x42883d[_0x40c268(0x1c2)]),_0x42883d[_0x40c268(0x1de)]&&!_0x211ee4&&_0x1d066d[_0x40c268(0x1e4)](_0x42883d[_0x40c268(0x1de)]),_0x1d066d;}function a130_0x4aca(_0x1a8c27,_0x35b1d9){_0x1a8c27=_0x1a8c27-0x1a9;const _0x3a4f55=a130_0x3a4f();let _0x4aca41=_0x3a4f55[_0x1a8c27];return _0x4aca41;}function isJsResource(_0x381ef9){const _0x223f2d=a130_0x4aca;return stripQuery(_0x381ef9)[_0x223f2d(0x1db)]()[_0x223f2d(0x1b5)]('.js');}function isCssResource(_0x4918da){const _0x220c5c=a130_0x4aca;return stripQuery(_0x4918da)['toLowerCase']()[_0x220c5c(0x1b5)](_0x220c5c(0x1aa));}function stripQuery(_0x5a138e){return _0x5a138e['split']('?')[0x0]??_0x5a138e;}function parseUpdateParamsFlag(_0x1e31cf){const _0x47c40d=a130_0x4aca;if(!_0x1e31cf||typeof _0x1e31cf!==_0x47c40d(0x1c4))return{};try{const _0x536ed8=JSON[_0x47c40d(0x1e8)](_0x1e31cf);if(typeof _0x536ed8!==_0x47c40d(0x1d4)||_0x536ed8===null||Array[_0x47c40d(0x1c6)](_0x536ed8))return{};return{'jsUrl':typeof _0x536ed8['jsUrl']===_0x47c40d(0x1c4)?_0x536ed8[_0x47c40d(0x1c2)]['trim']():undefined,'cssUrl':typeof _0x536ed8[_0x47c40d(0x1de)]==='string'?_0x536ed8[_0x47c40d(0x1de)][_0x47c40d(0x1c1)]():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x278db7,_0xf771c9){const _0xd93c45=a129_0x55f4,_0x4385c1=_0x278db7();while(!![]){try{const _0x23ce58=-parseInt(_0xd93c45(0x106))/0x1*(parseInt(_0xd93c45(0x105))/0x2)+parseInt(_0xd93c45(0xf3))/0x3+parseInt(_0xd93c45(0x11b))/0x4*(parseInt(_0xd93c45(0xe7))/0x5)+-parseInt(_0xd93c45(0xfa))/0x6+parseInt(_0xd93c45(0xf1))/0x7+-parseInt(_0xd93c45(0x102))/0x8*(parseInt(_0xd93c45(0xed))/0x9)+parseInt(_0xd93c45(0xfe))/0xa*(parseInt(_0xd93c45(0x115))/0xb);if(_0x23ce58===_0xf771c9)break;else _0x4385c1['push'](_0x4385c1['shift']());}catch(_0x79f51a){_0x4385c1['push'](_0x4385c1['shift']());}}}(a129_0x379c,0x5c552));function a129_0x379c(){const _0xeec41b=['length','1621611MRImmn','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','resources','.\x20Allowed\x20values:\x20replace,\x20patch','4118821ihbDFI','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','1055382wzlvsS','force','allSettled','Start\x20non-interactive\x20menu\x20asset\x20update','dryRun','filter','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','2203518yaJCuy','Invalid\x20--params:\x20','rejected','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','582040mlXwzC','mode','endsWith','toLowerCase','8yytTzx','field','string','774ttyRpW','1721lLpmlq','path','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','loadScriptMode','\x22\x20(','menu-asset-update','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','menu\x20asset-update\x20cannot\x20patch\x20','paths','CSS\x20URL\x20is\x20unreachable:\x20','replace','extend','label','push','selection','22wJklfy','cwd','value','patch','parse','jsUrl','1070096sdLZAu','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','info','setLogPath','has','menuIds','object','split','\x20existing\x20CSS\x20resources\x20for\x20\x22','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','cssUrl','status','map','unshift','some','all','isArray','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','trim','10OrEbDa','fulfilled','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','join',').\x20'];a129_0x379c=function(){return _0xeec41b;};return a129_0x379c();}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(_0x30550d){const _0x20dd71=a129_0x55f4,_0xf3a13=[];return _0x30550d[_0x20dd71(0x11a)]&&!isValidJsHttpsUrl(_0x30550d['jsUrl'])&&_0xf3a13[_0x20dd71(0x113)]({'field':_0x20dd71(0x11a),'message':_0x20dd71(0x108)}),_0x30550d['cssUrl']&&!isValidCssHttpsUrl(_0x30550d[_0x20dd71(0x125)])&&_0xf3a13[_0x20dd71(0x113)]({'field':_0x20dd71(0x125),'message':_0x20dd71(0x10c)}),_0xf3a13;}export async function runMenuUpdateCore(_0x2f598a,_0x4d775b,_0x3e6377,_0x50e496={}){const _0x4c86be=a129_0x55f4,_0x11868d=parseUpdateParamsFlag(_0x3e6377),_0x5f0913=normalizeMode(_0x50e496[_0x4c86be(0xff)]);validateSelection(_0x50e496['selection']);const _0x59aeb8=[];if(_0x11868d[_0x4c86be(0x11a)])_0x59aeb8['push'](_0x11868d['jsUrl']);if(_0x11868d[_0x4c86be(0x125)])_0x59aeb8[_0x4c86be(0x113)](_0x11868d[_0x4c86be(0x125)]);const _0x38e921=validateParams(_0x11868d);if(_0x38e921[_0x4c86be(0xec)]>0x0){const _0x478d18=_0x38e921[_0x4c86be(0x127)](_0xd59c9e=>'--params.'+_0xd59c9e[_0x4c86be(0x103)]+':\x20'+_0xd59c9e['message'])[_0x4c86be(0xea)](';\x20');throw new Error(_0x4c86be(0xfb)+_0x478d18);}if(_0x59aeb8[_0x4c86be(0xec)]===0x0)throw new Error(_0x4c86be(0xe9)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x4c86be(0x11e)](process[_0x4c86be(0x116)]()),logger[_0x4c86be(0x11d)](_0x4c86be(0x10b),_0x4c86be(0xf6),{'appCode':_0x2f598a,'jsUrl':_0x11868d[_0x4c86be(0x11a)],'cssUrl':_0x11868d[_0x4c86be(0x125)],'mode':_0x5f0913,'dryRun':_0x50e496['dryRun']===!![]});if(_0x11868d['jsUrl']){const _0xf78706=await isUrlReachable(_0x11868d['jsUrl']);if(!_0xf78706)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x11868d[_0x4c86be(0x11a)]);}if(_0x11868d[_0x4c86be(0x125)]){const _0x4389ed=await isUrlReachable(_0x11868d[_0x4c86be(0x125)]);if(!_0x4389ed)throw new Error(_0x4c86be(0x10f)+_0x11868d[_0x4c86be(0x125)]);}const _0x323529=await getOnlineMenuList(_0x2f598a,_0x4d775b),_0x4985b8=_0x323529[_0x4c86be(0xf8)](_0x2837e1=>_0x2837e1['resources']['length']>0x0),_0x3fdbbd=selectMenusForUpdate(_0x4985b8,_0x50e496[_0x4c86be(0x114)]);if(_0x3fdbbd['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x50e496[_0x4c86be(0xf7)]===!![]};const _0x2ce8bf=_0x3fdbbd[_0x4c86be(0x127)](_0x10d510=>buildMenuUpdateDiff(_0x10d510,_0x11868d,_0x5f0913,_0x50e496[_0x4c86be(0xf4)]===!![],_0x50e496[_0x4c86be(0x109)]));if(_0x50e496[_0x4c86be(0xf7)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x2ce8bf};const _0x621b3a=await Promise[_0x4c86be(0xf5)](_0x3fdbbd[_0x4c86be(0x127)]((_0x5b4583,_0x2b59fe)=>updateMenuCdnUrl(_0x2f598a,_0x4d775b,{'id':_0x5b4583['id'],'label':_0x5b4583[_0x4c86be(0x112)],'path':_0x5b4583['path'],'resources':_0x2ce8bf[_0x2b59fe]['after'][_0x4c86be(0xef)],'extend':_0x5b4583['extend']??null,'loadScriptMode':_0x50e496['loadScriptMode']}))),_0x381c0e=_0x621b3a['filter'](_0x391e14=>_0x391e14[_0x4c86be(0x126)]===_0x4c86be(0xe8))[_0x4c86be(0x127)](_0xa64af9=>_0xa64af9[_0x4c86be(0x117)]),_0x3cab6f=_0x621b3a[_0x4c86be(0xf8)](_0x4c52a9=>_0x4c52a9['status']===_0x4c86be(0xfc))[_0x4c86be(0xec)];return logger['info'](_0x4c86be(0x10b),'Menu\x20asset\x20update\x20completed',{'count':_0x3fdbbd['length'],'resources':_0x59aeb8}),{'updated':_0x381c0e[_0x4c86be(0xec)],'failed':_0x3cab6f,'skipped':![],'menus':_0x381c0e};}function validateSelection(_0x190e76){const _0x15d971=a129_0x55f4;if(!_0x190e76)throw new Error(_0x15d971(0x11c));if(_0x190e76[_0x15d971(0xe3)]&&(_0x190e76[_0x15d971(0x120)][_0x15d971(0xec)]>0x0||_0x190e76[_0x15d971(0x10e)]['length']>0x0))throw new Error(_0x15d971(0xf9));if(!_0x190e76['all']&&_0x190e76[_0x15d971(0x120)]['length']===0x0&&_0x190e76[_0x15d971(0x10e)][_0x15d971(0xec)]===0x0)throw new Error(_0x15d971(0x11c));}export function selectMenusForUpdate(_0x26c6ee,_0x334569){const _0x32e72e=a129_0x55f4;validateSelection(_0x334569);if(_0x334569[_0x32e72e(0xe3)])return _0x26c6ee;const _0x1e8e66=new Set(_0x26c6ee[_0x32e72e(0x127)](_0x497ec0=>_0x497ec0['id'])),_0x11d9c7=new Set(_0x26c6ee[_0x32e72e(0x127)](_0xd2564b=>_0xd2564b[_0x32e72e(0x107)])),_0x3de1b5=_0x334569['menuIds']['filter'](_0xd6ab6e=>!_0x1e8e66[_0x32e72e(0x11f)](_0xd6ab6e)),_0x1abc07=_0x334569[_0x32e72e(0x10e)][_0x32e72e(0xf8)](_0x47d2ee=>!_0x11d9c7[_0x32e72e(0x11f)](_0x47d2ee));if(_0x3de1b5[_0x32e72e(0xec)]>0x0||_0x1abc07[_0x32e72e(0xec)]>0x0){const _0x162c34=[..._0x3de1b5[_0x32e72e(0x127)](_0x32d481=>String(_0x32d481)),..._0x1abc07][_0x32e72e(0xea)](',\x20');throw new Error(_0x32e72e(0xee)+_0x162c34);}const _0x384235=new Set(_0x334569[_0x32e72e(0x120)]),_0x131ce4=new Set(_0x334569[_0x32e72e(0x10e)]);return _0x26c6ee[_0x32e72e(0xf8)](_0x191029=>_0x384235[_0x32e72e(0x11f)](_0x191029['id'])||_0x131ce4['has'](_0x191029[_0x32e72e(0x107)]));}function normalizeMode(_0xb447a0){const _0x581ea5=a129_0x55f4;if(!_0xb447a0)return _0x581ea5(0x118);if(_0xb447a0===_0x581ea5(0x110)||_0xb447a0===_0x581ea5(0x118))return _0xb447a0;throw new Error('Invalid\x20--mode:\x20'+_0xb447a0+_0x581ea5(0xf0));}function a129_0x55f4(_0x1dec26,_0x1a89df){_0x1dec26=_0x1dec26-0xe3;const _0x379cf7=a129_0x379c();let _0x55f48d=_0x379cf7[_0x1dec26];return _0x55f48d;}function buildMenuUpdateDiff(_0x1316d6,_0x29cc2b,_0x26c022,_0x3aeac7,_0x288c6b){const _0x1f67c0=a129_0x55f4,_0x22604f=[..._0x1316d6['resources']];_0x26c022===_0x1f67c0(0x118)&&assertUnambiguousPatchResources(_0x1316d6,_0x22604f,_0x29cc2b);const _0xe8ebaa=_0x26c022===_0x1f67c0(0x118)?patchResources(_0x22604f,_0x29cc2b):replaceResources(_0x29cc2b),_0x122612=[],_0x2a5658=_0x22604f['some'](isJsResource),_0x5b8557=_0xe8ebaa[_0x1f67c0(0x129)](isJsResource);if(_0x2a5658&&!_0x5b8557){const _0x40b230=_0x1f67c0(0xf2)+_0x1316d6[_0x1f67c0(0x112)]+_0x1f67c0(0x10a)+_0x1316d6['path']+_0x1f67c0(0xeb)+_0x1f67c0(0x124);if(!_0x3aeac7)throw new Error(_0x40b230);_0x122612[_0x1f67c0(0x113)](_0x40b230);}const _0x10bccc=_0x22604f[_0x1f67c0(0x129)](isCssResource),_0x3efece=_0xe8ebaa['some'](isCssResource);_0x10bccc&&!_0x3efece&&_0x122612[_0x1f67c0(0x113)](_0x1f67c0(0xe5)+_0x1316d6['label']+'\x22\x20('+_0x1316d6[_0x1f67c0(0x107)]+').');const _0x33a62b=typeof _0x1316d6[_0x1f67c0(0x111)]?.[_0x1f67c0(0x109)]===_0x1f67c0(0x104)?_0x1316d6[_0x1f67c0(0x111)][_0x1f67c0(0x109)]:null,_0x3e6ad0=_0x288c6b?{'loadScriptMode':_0x33a62b}:{},_0x377882=_0x288c6b?{'loadScriptMode':_0x288c6b}:{};return{'id':_0x1316d6['id'],'label':_0x1316d6['label'],'path':_0x1316d6[_0x1f67c0(0x107)],'mode':_0x26c022,'before':{'resources':_0x22604f,..._0x3e6ad0},'after':{'resources':_0xe8ebaa,..._0x377882},'warnings':_0x122612};}function replaceResources(_0x4949ea){const _0x46a2d9=a129_0x55f4;return[_0x4949ea[_0x46a2d9(0x11a)],_0x4949ea[_0x46a2d9(0x125)]][_0x46a2d9(0xf8)](_0x1bb754=>!!_0x1bb754);}function assertUnambiguousPatchResources(_0x3d657f,_0x2ed3ae,_0x14a566){const _0x24b6bb=a129_0x55f4,_0x48987b=_0x2ed3ae[_0x24b6bb(0xf8)](isJsResource)[_0x24b6bb(0xec)];if(_0x14a566['jsUrl']&&_0x48987b>0x1)throw new Error(_0x24b6bb(0x10d)+_0x48987b+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x3d657f[_0x24b6bb(0x112)]+_0x24b6bb(0x10a)+_0x3d657f[_0x24b6bb(0x107)]+')\x20'+'with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');const _0x421ed8=_0x2ed3ae[_0x24b6bb(0xf8)](isCssResource)['length'];if(_0x14a566[_0x24b6bb(0x125)]&&_0x421ed8>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x421ed8+_0x24b6bb(0x123)+_0x3d657f['label']+_0x24b6bb(0x10a)+_0x3d657f[_0x24b6bb(0x107)]+')\x20'+_0x24b6bb(0xfd));}function patchResources(_0x878321,_0x574dd1){const _0x594e4d=a129_0x55f4;let _0x5dbe39=![],_0x2a6a2e=![];const _0x4ccc80=[];for(const _0x257b47 of _0x878321){if(isJsResource(_0x257b47)){if(_0x574dd1[_0x594e4d(0x11a)]&&!_0x5dbe39)_0x4ccc80['push'](_0x574dd1[_0x594e4d(0x11a)]),_0x5dbe39=!![];else!_0x574dd1[_0x594e4d(0x11a)]&&_0x4ccc80['push'](_0x257b47);continue;}if(isCssResource(_0x257b47)){if(_0x574dd1[_0x594e4d(0x125)]&&!_0x2a6a2e)_0x4ccc80[_0x594e4d(0x113)](_0x574dd1[_0x594e4d(0x125)]),_0x2a6a2e=!![];else!_0x574dd1[_0x594e4d(0x125)]&&_0x4ccc80[_0x594e4d(0x113)](_0x257b47);continue;}_0x4ccc80[_0x594e4d(0x113)](_0x257b47);}return _0x574dd1[_0x594e4d(0x11a)]&&!_0x5dbe39&&_0x4ccc80[_0x594e4d(0x128)](_0x574dd1['jsUrl']),_0x574dd1['cssUrl']&&!_0x2a6a2e&&_0x4ccc80[_0x594e4d(0x113)](_0x574dd1[_0x594e4d(0x125)]),_0x4ccc80;}function isJsResource(_0x17a34c){const _0x411ee1=a129_0x55f4;return stripQuery(_0x17a34c)[_0x411ee1(0x101)]()[_0x411ee1(0x100)]('.js');}function isCssResource(_0x217a41){const _0x1e1ea3=a129_0x55f4;return stripQuery(_0x217a41)['toLowerCase']()[_0x1e1ea3(0x100)]('.css');}function stripQuery(_0x639ca9){const _0x138450=a129_0x55f4;return _0x639ca9[_0x138450(0x122)]('?')[0x0]??_0x639ca9;}function parseUpdateParamsFlag(_0x37c215){const _0x36e66a=a129_0x55f4;if(!_0x37c215||typeof _0x37c215!==_0x36e66a(0x104))return{};try{const _0x7b9d2f=JSON[_0x36e66a(0x119)](_0x37c215);if(typeof _0x7b9d2f!==_0x36e66a(0x121)||_0x7b9d2f===null||Array[_0x36e66a(0xe4)](_0x7b9d2f))return{};return{'jsUrl':typeof _0x7b9d2f['jsUrl']===_0x36e66a(0x104)?_0x7b9d2f['jsUrl'][_0x36e66a(0xe6)]():undefined,'cssUrl':typeof _0x7b9d2f[_0x36e66a(0x125)]===_0x36e66a(0x104)?_0x7b9d2f['cssUrl'][_0x36e66a(0xe6)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a130_0x53e4(_0x356195,_0xab0baf){_0x356195=_0x356195-0x1af;const _0x4a6d66=a130_0x4a6d();let _0x53e4d1=_0x4a6d66[_0x356195];return _0x53e4d1;}(function(_0x59ec7d,_0x3451a0){const _0x2b14a3=a130_0x53e4,_0x4e10a2=_0x59ec7d();while(!![]){try{const _0x2d579a=parseInt(_0x2b14a3(0x1b2))/0x1*(parseInt(_0x2b14a3(0x1b0))/0x2)+parseInt(_0x2b14a3(0x1b4))/0x3+-parseInt(_0x2b14a3(0x1b3))/0x4+-parseInt(_0x2b14a3(0x1b7))/0x5+parseInt(_0x2b14a3(0x1b5))/0x6*(parseInt(_0x2b14a3(0x1af))/0x7)+-parseInt(_0x2b14a3(0x1b6))/0x8+-parseInt(_0x2b14a3(0x1ba))/0x9;if(_0x2d579a===_0x3451a0)break;else _0x4e10a2['push'](_0x4e10a2['shift']());}catch(_0x5ed878){_0x4e10a2['push'](_0x4e10a2['shift']());}}}(a130_0x4a6d,0x82f66));export function isValidJsHttpsUrl(_0xe3cf03){const _0x4c9dce=a130_0x53e4;return/^https:\/\/.+\.js(\?.*)?$/[_0x4c9dce(0x1b8)](_0xe3cf03[_0x4c9dce(0x1b9)]());}function a130_0x4a6d(){const _0x180921=['138fwmARt','2567360ojIqBA','1427370euHwXI','test','trim','3152088dwcXhz','318381jHAQgx','716670vsHvni','HEAD','2QePFJY','3125864ZJmhJn','1535205AXWmyK'];a130_0x4a6d=function(){return _0x180921;};return a130_0x4a6d();}export function isValidCssHttpsUrl(_0x34a9dd){const _0x21e0d8=a130_0x53e4;return/^https:\/\/.+\.css(\?.*)?$/[_0x21e0d8(0x1b8)](_0x34a9dd['trim']());}export async function isUrlReachable(_0x599468){const _0x5ce046=a130_0x53e4;try{const _0x25d606=await fetch(_0x599468,{'method':_0x5ce046(0x1b1)});return _0x25d606['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a131_0x1a3a06=a131_0x25ec;function a131_0x25ec(_0x5c5533,_0x5a3425){_0x5c5533=_0x5c5533-0x1ee;const _0x4e4f9c=a131_0x4e4f();let _0x25eca9=_0x4e4f9c[_0x5c5533];return _0x25eca9;}(function(_0x366a97,_0x2374fb){const _0x48221a=a131_0x25ec,_0x878e8c=_0x366a97();while(!![]){try{const _0x226018=parseInt(_0x48221a(0x1ff))/0x1*(-parseInt(_0x48221a(0x22b))/0x2)+parseInt(_0x48221a(0x21f))/0x3*(-parseInt(_0x48221a(0x231))/0x4)+parseInt(_0x48221a(0x213))/0x5*(-parseInt(_0x48221a(0x1f7))/0x6)+parseInt(_0x48221a(0x230))/0x7*(parseInt(_0x48221a(0x205))/0x8)+parseInt(_0x48221a(0x227))/0x9+parseInt(_0x48221a(0x22c))/0xa*(-parseInt(_0x48221a(0x1f9))/0xb)+-parseInt(_0x48221a(0x207))/0xc*(-parseInt(_0x48221a(0x212))/0xd);if(_0x226018===_0x2374fb)break;else _0x878e8c['push'](_0x878e8c['shift']());}catch(_0x3d1a88){_0x878e8c['push'](_0x878e8c['shift']());}}}(a131_0x4e4f,0x83c90));import a131_0x474074 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';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 a131_0x4e4f(){const _0x692cb=['appCode','\x20menu(s)...','Menu\x20sync\x20completed:\x20','\x20failed.','1770AyGDFJ','Sync\x20local\x20pages\x20as\x20platform\x20menus','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','string','trim','onlinePaths','cookie','message','4923873BnFOUT','✓\x20Menu\x20sync\x20completed:\x20','\x20\x20Create\x20','\x20\x20Cancelled.','859666ncbNaS','112660lZenJC','Would\x20create\x20','Menu\x20creation\x20failed','yellow','6790BJNDwx','2616owDMfE','split','Failed\x20to\x20fetch\x20online\x20menu\x20list','filter','paths','\x20menu(s)\x20created','Pre-fill\x20JS/CSS\x20URLs.\x20','boolean','failed','str','created','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','cyan','\x20page(s)','targetPages','localPages','240798ffnXvR','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','66pLcXMj','size','POST','Menu\x20sync\x20skipped','\x20and\x20CSS:\x20','sync','1ObPtEB','Fetching\x20online\x20menu\x20list...','cssUrl','skipped','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','1768lGNazM','length','1572FFQgnl','write','\x20created.','\x20\x20✓\x20Selected:\x20','selectedAppName','validation','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20menu(s)','gray','rawFlags','93535CvXtnB','35nNlCYo','\x20created,\x20','appcode','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','jsUrl','yes','Online\x20menu\x20list\x20fetched','Non-interactive\x20menu\x20sync\x20requires\x20--yes.'];a131_0x4e4f=function(){return _0x692cb;};return a131_0x4e4f();}export const menuSync={'service':'menu','command':a131_0x1a3a06(0x1fe),'description':a131_0x1a3a06(0x220),'risk':a131_0x1a3a06(0x208),'flags':[{'name':'params','type':a131_0x1a3a06(0x222),'description':a131_0x1a3a06(0x237)+a131_0x1a3a06(0x204)},{'name':a131_0x1a3a06(0x235),'type':a131_0x1a3a06(0x222),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a131_0x1a3a06(0x218),'type':a131_0x1a3a06(0x1ee),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x23ac20){const _0x26f986=a131_0x1a3a06;ensureRunnableContext(_0x23ac20['rawFlags'],_0x23ac20[_0x26f986(0x20b)]);const _0x216ec4=await runMenuSyncCore(_0x23ac20['appCode'],_0x23ac20['cookie'],parsePaths(_0x23ac20[_0x26f986(0x1f0)]('paths')),_0x23ac20[_0x26f986(0x1f0)]('params'),{'dryRun':!![]});return{'method':_0x26f986(0x1fb),'url':'/smartapi/menu/create','body':_0x216ec4,'description':_0x216ec4['skipped']?_0x26f986(0x1f8):_0x26f986(0x22d)+_0x216ec4[_0x26f986(0x1f5)][_0x26f986(0x206)]+'\x20local\x20microfrontend\x20menu(s).'};},async 'execute'(_0x361062){const _0x587db6=a131_0x1a3a06;ensureRunnableContext(_0x361062[_0x587db6(0x211)],_0x361062['selectedAppName']);const _0x4b305b=_0x361062['flag']('yes'),_0x2b8dc2=_0x361062[_0x587db6(0x1f0)]('params'),_0x37f021=parsePaths(_0x361062[_0x587db6(0x1f0)](_0x587db6(0x235))),_0x77642d=parseMenuSyncParams(_0x2b8dc2);if(_0x4b305b){const _0x11a31a=await runMenuSyncCore(_0x361062[_0x587db6(0x21b)],_0x361062[_0x587db6(0x225)],_0x37f021,_0x2b8dc2);if(_0x11a31a[_0x587db6(0x202)]){const _0x22bc2a=getLocalPages();_0x22bc2a[_0x587db6(0x206)]===0x0?writeCliSideChannelLine(_0x587db6(0x221)):writeCliSideChannelLine(_0x587db6(0x1f2));}else writeCliSideChannelLine(_0x587db6(0x228)+_0x11a31a[_0x587db6(0x1f1)]+_0x587db6(0x236));return{'ok':!![],'data':_0x11a31a,'message':_0x11a31a[_0x587db6(0x202)]?_0x587db6(0x1fc):'Menu\x20sync\x20completed:\x20'+_0x11a31a[_0x587db6(0x1f1)]+_0x587db6(0x209)};}if(_0x37f021[_0x587db6(0x206)]>0x0)throw CliErrors[_0x587db6(0x20c)](_0x587db6(0x216),_0x587db6(0x20d));if(!isInteractive()&&_0x2b8dc2)throw CliErrors[_0x587db6(0x20c)](_0x587db6(0x21a),_0x587db6(0x20d));requireInteractive();const _0x4ae102=startSpinner(_0x587db6(0x200));let _0x26720a,_0x4e5d37,_0xd274de;try{const _0x1f0c45=await fetchMenuData(_0x361062[_0x587db6(0x21b)],_0x361062[_0x587db6(0x225)]);_0x26720a=_0x1f0c45[_0x587db6(0x1f6)],_0x4e5d37=_0x1f0c45[_0x587db6(0x224)],_0xd274de=_0x1f0c45['onlineMenuList'],stopSpinner(_0x4ae102,_0x587db6(0x219),!![]);}catch(_0x8094a6){stopSpinner(_0x4ae102,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x587db6(0x20c)](_0x8094a6 instanceof Error?_0x8094a6[_0x587db6(0x226)]:_0x587db6(0x233));}if(_0x26720a['length']===0x0)return writeCliSideChannelLine(a131_0x474074[_0x587db6(0x22f)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x1e3b4f=buildCompareRows(_0x26720a,_0x4e5d37);writeCliSideChannelLine(renderCompareTable(_0x1e3b4f)),writeCliSideChannelLine('');const _0x575495=await selectPages(_0x26720a,_0x4e5d37);writeCliSideChannelLine(''),writeCliSideChannelLine(a131_0x474074[_0x587db6(0x1f3)](_0x587db6(0x20a)+_0x575495[_0x587db6(0x206)]+_0x587db6(0x1f4)));const _0x59af8f=_0x77642d['jsUrl']&&_0x77642d[_0x587db6(0x201)];if(!_0x59af8f){writeCliSideChannelLine(renderSyncSummary(_0x575495,_0x4e5d37[_0x587db6(0x1fa)]>0x0));const _0xb1c236=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0xb1c236)return writeCliSideChannelLine(a131_0x474074['gray'](_0x587db6(0x22a))),{'ok':!![]};}let _0x340a7a=_0x77642d[_0x587db6(0x217)],_0x2816a1=_0x77642d[_0x587db6(0x201)];!_0x340a7a&&(_0x340a7a=await askJsUrl());!_0x2816a1&&(_0x2816a1=await askCssUrl());const _0x53e450=await askConfirm(_0x587db6(0x229)+_0x575495[_0x587db6(0x206)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x340a7a+_0x587db6(0x1fd)+_0x2816a1+'?');if(!_0x53e450)return writeCliSideChannelLine(a131_0x474074[_0x587db6(0x210)](_0x587db6(0x22a))),{'ok':!![]};const _0x3c70f1=[_0x340a7a,_0x2816a1],_0x355714=startSpinner('Creating\x20'+_0x575495[_0x587db6(0x206)]+_0x587db6(0x21c));try{const _0x55be68=await doCreateMenus(_0x361062[_0x587db6(0x21b)],_0x361062[_0x587db6(0x225)],_0x575495,_0x3c70f1);return stopSpinner(_0x355714,'Created\x20'+_0x55be68[_0x587db6(0x1f1)]+_0x587db6(0x20f),!![]),{'ok':!![],'data':_0x55be68,'message':_0x587db6(0x21d)+_0x55be68[_0x587db6(0x1f1)]+_0x587db6(0x214)+_0x55be68[_0x587db6(0x1ef)]+_0x587db6(0x21e)};}catch(_0x41c7ca){stopSpinner(_0x355714,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x587db6(0x20c)](_0x41c7ca instanceof Error?_0x41c7ca[_0x587db6(0x226)]:_0x587db6(0x22e));}}};function ensureRunnableContext(_0x5e4501,_0x4e8a71){const _0x371a2c=a131_0x1a3a06,_0x131ae6=_0x5e4501[_0x371a2c(0x215)]?String(_0x5e4501[_0x371a2c(0x215)])['trim']():'';if(!isInProject()&&!_0x4e8a71&&!_0x131ae6)throw CliErrors[_0x371a2c(0x20c)](_0x371a2c(0x203)+_0x371a2c(0x20e));}function parsePaths(_0x1e0173){const _0x22a4b2=a131_0x1a3a06;return[...new Set(_0x1e0173[_0x22a4b2(0x232)](',')['map'](_0x2d7243=>_0x2d7243[_0x22a4b2(0x223)]())[_0x22a4b2(0x234)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a132_0x2c41bd=a132_0xef08;(function(_0x4b3a28,_0xf27258){const _0x13ba31=a132_0xef08,_0x109550=_0x4b3a28();while(!![]){try{const _0x34f56f=-parseInt(_0x13ba31(0x77))/0x1*(parseInt(_0x13ba31(0x92))/0x2)+parseInt(_0x13ba31(0x74))/0x3*(-parseInt(_0x13ba31(0x96))/0x4)+parseInt(_0x13ba31(0x8d))/0x5*(-parseInt(_0x13ba31(0x82))/0x6)+parseInt(_0x13ba31(0x7f))/0x7+-parseInt(_0x13ba31(0x8c))/0x8+parseInt(_0x13ba31(0x87))/0x9+parseInt(_0x13ba31(0x76))/0xa;if(_0x34f56f===_0xf27258)break;else _0x109550['push'](_0x109550['shift']());}catch(_0x2e576a){_0x109550['push'](_0x109550['shift']());}}}(a132_0x264c,0x761ef));function a132_0xef08(_0x36d9a6,_0x4ca248){_0x36d9a6=_0x36d9a6-0x74;const _0x264c23=a132_0x264c();let _0xef08b3=_0x264c23[_0x36d9a6];return _0xef08b3;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const NOTIFICATION_CHANNEL_TYPES=[a132_0x2c41bd(0x99),a132_0x2c41bd(0x79),'DINGTALK',a132_0x2c41bd(0x9a),a132_0x2c41bd(0x8f)];export const notificationConfigList={'service':a132_0x2c41bd(0x85),'command':a132_0x2c41bd(0x83),'description':a132_0x2c41bd(0x88),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a132_0x2c41bd(0x86),'type':a132_0x2c41bd(0x81),'description':a132_0x2c41bd(0x7c),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a132_0x2c41bd(0x99)}],async 'validate'(_0x58b515){readChannelType(_0x58b515);},async 'execute'(_0x59cf90){const _0x67eafb=a132_0x2c41bd,_0x41238d=readChannelType(_0x59cf90),_0x58563a=await listNotificationChannelConfigs(_0x59cf90['appCode'],_0x41238d),_0x155ba1=_0x58563a['map'](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x59cf90[_0x67eafb(0x80)],'channelType':_0x41238d,'count':_0x155ba1[_0x67eafb(0x9b)],'configs':_0x155ba1},'message':_0x67eafb(0x7a)+_0x155ba1[_0x67eafb(0x9b)]+'\x20'+_0x41238d+_0x67eafb(0x8a)};}};function readChannelType(_0x1665f7){const _0x199328=a132_0x2c41bd,_0x5cc3d3=_0x1665f7[_0x199328(0x7b)](_0x199328(0x86))[_0x199328(0x95)]()||'EMAIL';if(!NOTIFICATION_CHANNEL_TYPES[_0x199328(0x7e)](_0x5cc3d3))throw CliErrors[_0x199328(0x97)](_0x199328(0x89)+_0x5cc3d3,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x199328(0x78)](',\x20')+'.');return _0x5cc3d3;}function a132_0x264c(){const _0x5ed5a4=['number','5943110mfbADA','983PNJhOE','join','FEISHU','Found\x20','str','Notification\x20channel\x20type','apiError','includes','4860730dNzjFi','appCode','string','4356eXBcmC','config-list','updateTime','notification','type','5870403PJFYNg','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','Invalid\x20--type:\x20','\x20notification\x20config(s)','configCode','2549320Cogwge','1690TPFBiV','configName','WEBHOOK','Item\x20','\x20is\x20missing\x20required\x20field\x20\x22','32XsQPRK','Invalid\x20notification\x20config\x20response.','description','trim','3368aFNKkC','validation','channelType','EMAIL','WECOM','length','3126JdxdQo'];a132_0x264c=function(){return _0x5ed5a4;};return a132_0x264c();}function projectNotificationConfig(_0x4252a6,_0x160b05){const _0x260d22=a132_0x2c41bd;return{'id':typeof _0x4252a6['id']===_0x260d22(0x75)?_0x4252a6['id']:null,'configCode':requireConfigString(_0x4252a6,_0x260d22(0x8b),_0x160b05),'configName':requireConfigString(_0x4252a6,_0x260d22(0x8e),_0x160b05),'channelType':requireConfigString(_0x4252a6,_0x260d22(0x98),_0x160b05),'description':normalizeNullableString(_0x4252a6[_0x260d22(0x94)]),'createTime':normalizeNullableString(_0x4252a6['createTime']),'updateTime':normalizeNullableString(_0x4252a6[_0x260d22(0x84)])};}function requireConfigString(_0x448cb5,_0xe21396,_0x264114){const _0x14fe45=a132_0x2c41bd,_0x4079d0=_0x448cb5[_0xe21396];if(typeof _0x4079d0!==_0x14fe45(0x81)||_0x4079d0[_0x14fe45(0x95)]()==='')throw CliErrors[_0x14fe45(0x7d)](_0x14fe45(0x93),_0x14fe45(0x90)+(_0x264114+0x1)+_0x14fe45(0x91)+_0xe21396+'\x22.');return _0x4079d0[_0x14fe45(0x95)]();}function normalizeNullableString(_0x35a30d){return typeof _0x35a30d==='string'?_0x35a30d:null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a133_0x4a8c(_0x5969ce,_0x345b78){_0x5969ce=_0x5969ce-0x15c;const _0x1ea6a3=a133_0x1ea6();let _0x4a8ce4=_0x1ea6a3[_0x5969ce];return _0x4a8ce4;}(function(_0x3ce869,_0x526da5){const _0x2884f0=a133_0x4a8c,_0x15b73f=_0x3ce869();while(!![]){try{const _0x2b4177=-parseInt(_0x2884f0(0x162))/0x1+-parseInt(_0x2884f0(0x15c))/0x2*(parseInt(_0x2884f0(0x15d))/0x3)+-parseInt(_0x2884f0(0x160))/0x4*(parseInt(_0x2884f0(0x15e))/0x5)+-parseInt(_0x2884f0(0x163))/0x6+parseInt(_0x2884f0(0x164))/0x7*(-parseInt(_0x2884f0(0x166))/0x8)+-parseInt(_0x2884f0(0x15f))/0x9*(parseInt(_0x2884f0(0x165))/0xa)+parseInt(_0x2884f0(0x161))/0xb;if(_0x2b4177===_0x526da5)break;else _0x15b73f['push'](_0x15b73f['shift']());}catch(_0x329888){_0x15b73f['push'](_0x15b73f['shift']());}}}(a133_0x1ea6,0x4c2a2));import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];function a133_0x1ea6(){const _0x4b3675=['3725532oWJemf','42pWekli','33350rhWqVm','475792yqBVar','101982CXnbXR','30rBPnyH','90gcDRKy','657erGlhY','4628FfOorA','22925771BaZhAV','20234ggCodA'];a133_0x1ea6=function(){return _0x4b3675;};return a133_0x1ea6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a134_0x2eb8aa=a134_0x30c7;(function(_0x716061,_0x5437bf){const _0x20dc4c=a134_0x30c7,_0x2c9042=_0x716061();while(!![]){try{const _0x14ffb4=-parseInt(_0x20dc4c(0xf8))/0x1*(parseInt(_0x20dc4c(0xde))/0x2)+parseInt(_0x20dc4c(0xfe))/0x3+parseInt(_0x20dc4c(0xe9))/0x4+-parseInt(_0x20dc4c(0xf1))/0x5*(parseInt(_0x20dc4c(0xdb))/0x6)+-parseInt(_0x20dc4c(0xed))/0x7*(-parseInt(_0x20dc4c(0x10b))/0x8)+parseInt(_0x20dc4c(0xfa))/0x9*(-parseInt(_0x20dc4c(0xe5))/0xa)+-parseInt(_0x20dc4c(0xf0))/0xb;if(_0x14ffb4===_0x5437bf)break;else _0x2c9042['push'](_0x2c9042['shift']());}catch(_0x17e0b4){_0x2c9042['push'](_0x2c9042['shift']());}}}(a134_0x2533,0xe2dce));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a134_0x30c7(_0x29a591,_0x1417da){_0x29a591=_0x29a591-0xd7;const _0x253332=a134_0x2533();let _0x30c72d=_0x253332[_0x29a591];return _0x30c72d;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a134_0x2eb8aa(0xeb),a134_0x2eb8aa(0x108),'form','idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a134_0x2eb8aa(0x103),'general':a134_0x2eb8aa(0xe4),'form':a134_0x2eb8aa(0xec),'idCard':a134_0x2eb8aa(0xf7)},SCENE_FLAG={'name':a134_0x2eb8aa(0xd8),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a134_0x2eb8aa(0x10d)},IMAGE_FILE_FLAG={'name':a134_0x2eb8aa(0xfb),'type':a134_0x2eb8aa(0xdd),'description':a134_0x2eb8aa(0x100)},IMAGE_URL_FLAG={'name':a134_0x2eb8aa(0x102),'type':a134_0x2eb8aa(0xdd),'description':a134_0x2eb8aa(0x10a)};function normalizeScene(_0x51f696){const _0x342943=a134_0x2eb8aa,_0x1a0b99=_0x51f696['trim']()[_0x342943(0xf5)]();if(_0x1a0b99===_0x342943(0xe2))return _0x342943(0x107);if(_0x1a0b99===_0x342943(0xeb)||_0x1a0b99===_0x342943(0x108)||_0x1a0b99===_0x342943(0xd7))return _0x1a0b99;throw CliErrors[_0x342943(0xfd)](_0x342943(0xe8)+_0x51f696+_0x342943(0xf9)+SUPPORTED_SCENES[_0x342943(0xee)](',\x20'));}function selectedInputs(_0x170456){const _0x3d707d=a134_0x2eb8aa,_0x3df315=_0x170456[_0x3d707d(0xfc)](_0x3d707d(0xfb))[_0x3d707d(0xd9)](),_0x312f9a=_0x170456[_0x3d707d(0xfc)](_0x3d707d(0x102))[_0x3d707d(0xd9)]();return{'imageFile':_0x3df315,'imageUrl':_0x312f9a,'count':[_0x3df315,_0x312f9a][_0x3d707d(0xff)](Boolean)[_0x3d707d(0xe3)]};}function validateInputSelection(_0x464487){const _0xb19b29=a134_0x2eb8aa,_0x4bc78c=selectedInputs(_0x464487);if(_0x4bc78c[_0xb19b29(0xe0)]!==0x1)throw CliErrors[_0xb19b29(0xfd)](_0xb19b29(0xf3));return _0x4bc78c;}function withScene(_0x28c4e2,_0xafb2e0,_0xc830a9){const _0x48b1d0=a134_0x2eb8aa;return{..._0x28c4e2,'scene':_0xafb2e0,..._0xc830a9?{'sourceFile':{'fileName':_0xc830a9[_0x48b1d0(0xdc)],'filePath':_0xc830a9[_0x48b1d0(0xe6)]}}:{}};}const ocrRecognize={'service':a134_0x2eb8aa(0x106),'command':'recognize','description':a134_0x2eb8aa(0x101),'risk':a134_0x2eb8aa(0x104),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x55a259){const _0x1cf0d0=a134_0x2eb8aa,_0x88d72f=normalizeScene(_0x55a259[_0x1cf0d0(0xfc)](_0x1cf0d0(0xd8))),_0x2e1630=SCENE_TO_LEGACY_TYPE[_0x88d72f],_0x38e1d7=validateInputSelection(_0x55a259);if(_0x38e1d7[_0x1cf0d0(0xef)]){const _0x169128=new URLSearchParams({'url':_0x38e1d7[_0x1cf0d0(0xef)],'type':_0x2e1630,'appCode':_0x55a259[_0x1cf0d0(0xe1)]});return{'method':'GET','url':'/smartapi/ocr/recognize-text?'+_0x169128[_0x1cf0d0(0xf4)](),'description':'Preview:\x20recognize\x20'+_0x88d72f+'\x20OCR\x20from\x20URL'};}const _0x596103=requireDevelopmentUploadFile(_0x38e1d7['imageFile'],_0x1cf0d0(0xfb));return{'method':'POST','url':_0x1cf0d0(0xf2),'body':{'steps':[{'method':_0x1cf0d0(0xf6),'url':_0x1cf0d0(0xf2),'body':{'appCode':_0x55a259[_0x1cf0d0(0xe1)],'multipart':{'file':_0x596103}}},{'method':_0x1cf0d0(0xf6),'url':'/smartapi/common/queryFileUrl','body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x1cf0d0(0xda),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x55a259['appCode'],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x2e1630}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x88d72f+_0x1cf0d0(0x109)};},async 'execute'(_0x4d1b29){const _0x3752e3=a134_0x2eb8aa,_0x52632a=normalizeScene(_0x4d1b29[_0x3752e3(0xfc)](_0x3752e3(0xd8))),_0x3d6fe2=SCENE_TO_LEGACY_TYPE[_0x52632a],_0x4f002a=validateInputSelection(_0x4d1b29);if(_0x4f002a[_0x3752e3(0xef)]){const _0x416f1c=await recognizeDevelopmentOcr(_0x4d1b29['appCode'],{'url':_0x4f002a['imageUrl'],'type':_0x3d6fe2});return{'ok':!![],'data':withScene(_0x416f1c,_0x52632a)};}const _0x118b76=requireDevelopmentUploadFile(_0x4f002a[_0x3752e3(0x10c)],_0x3752e3(0xfb)),_0x42d6d8=await uploadDevelopmentFile(_0x4d1b29[_0x3752e3(0xe1)],_0x118b76['path']);if(!_0x42d6d8['filePath'])throw CliErrors[_0x3752e3(0xe7)](_0x3752e3(0xea));const _0x522e6a=await queryDevelopmentFileUrl(_0x42d6d8[_0x3752e3(0xe6)],{'download':![]});if(!_0x522e6a[_0x3752e3(0x105)])throw CliErrors[_0x3752e3(0xe7)](_0x3752e3(0xdf));const _0x5811cf=await recognizeDevelopmentOcr(_0x4d1b29[_0x3752e3(0xe1)],{'url':_0x522e6a[_0x3752e3(0x105)],'type':_0x3d6fe2});return{'ok':!![],'data':withScene(_0x5811cf,_0x52632a,_0x42d6d8)};}};export const ocrDefinitions=[ocrRecognize];function a134_0x2533(){const _0x52c1e2=['POST','IdCard','268111zdBjUH','.\x20Supported\x20scenes:\x20','3042GyQrVX','image-file','str','validation','1836567whxtah','filter','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','image-url','Invoice','read','fileUrl','ocr','idCard','general','\x20OCR','Publicly\x20accessible\x20image\x20or\x20file\x20URL','376pyHKnI','imageFile','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','form','scene','trim','GET','6054DIujfN','fileName','string','12LYhVlu','File\x20URL\x20response\x20missing\x20fileUrl.','count','appCode','idcard','length','General','28780WzhMPf','filePath','apiError','Unsupported\x20OCR\x20scene:\x20','6661244SHOyBT','File\x20upload\x20response\x20missing\x20filePath.','invoice','Table','263298EIoJgz','join','imageUrl','5792886nKgPKX','40EthlyF','/smartapi/common/uploadFile','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','toString','toLowerCase'];a134_0x2533=function(){return _0x52c1e2;};return a134_0x2533();}
|