@lovrabet/rabetbase-cli 2.3.16-beta.2 → 2.3.16-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/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 +1 -1
- 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/project/init.js +0 -1
- package/lib/commands/sql/save.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17cfa3,_0x5a72da){const _0x38c7e0=a122_0x24bb,_0x5c061d=_0x17cfa3();while(!![]){try{const _0x550158=-parseInt(_0x38c7e0(0xf4))/0x1*(parseInt(_0x38c7e0(0xf9))/0x2)+-parseInt(_0x38c7e0(0xdc))/0x3*(-parseInt(_0x38c7e0(0xdb))/0x4)+parseInt(_0x38c7e0(0x104))/0x5+-parseInt(_0x38c7e0(0xf8))/0x6*(-parseInt(_0x38c7e0(0xf7))/0x7)+-parseInt(_0x38c7e0(0xdf))/0x8*(-parseInt(_0x38c7e0(0xfb))/0x9)+-parseInt(_0x38c7e0(0xe5))/0xa+parseInt(_0x38c7e0(0xe0))/0xb;if(_0x550158===_0x5a72da)break;else _0x5c061d['push'](_0x5c061d['shift']());}catch(_0x16ce41){_0x5c061d['push'](_0x5c061d['shift']());}}}(a122_0x215c,0x7b296));import a122_0xe2b90e from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a122_0x19d811 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function a122_0x215c(){const _0xe8a4d3=['\x20\x20CSS\x20URL:','190420OCAJiH','map','has','name','trim','4cgbnMx','1447233CQOFHp','cancelled','No\x20local\x20pages\x20found.','8rjAvSz','1297285HLVvHZ','\x20\x20Checking\x20CSS\x20URL\x20reachability...','start','filter','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','5405440ZFFPxW','JS\x20URL\x20checked','test','cyan','stdin','length','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','Cancelled.','No\x20menus\x20selected.','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','error','red','[new]','green','includes','548339SEKQrj','label','CSS\x20URL\x20checked','7wJJeRY','3409092CuNtpy','2xxFEKr','isTTY','3480669eOJplK','JS\x20URL\x20check\x20failed','\x20\x20Checking\x20JS\x20URL\x20reachability...','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','gray','\x20\x20JS\x20URL:','path','ExitPromptError'];a122_0x215c=function(){return _0xe8a4d3;};return a122_0x215c();}function onCancel(_0x3460a0){return _0x3460a0['catch'](_0x2378a2=>{const _0x3af477=a122_0x24bb;if(_0x2378a2?.[_0x3af477(0x107)]===_0x3af477(0x102))throw CliErrors['cancelled']('Cancelled.');throw _0x2378a2;});}export function startSpinner(_0x48175c){const _0x1e1393=a122_0x24bb;return a122_0x19d811({'text':_0x48175c,'color':_0x1e1393(0xe8)})[_0x1e1393(0xe2)]();}export function stopSpinner(_0x4cf7a5,_0x49d56c,_0x392039){_0x392039?_0x4cf7a5['succeed'](_0x49d56c):_0x4cf7a5['fail'](_0x49d56c);}export async function askConfirm(_0x262bd3){return onCancel(confirm({'message':_0x262bd3,'theme':{'prefix':''}}));}export async function askJsUrl(_0x5ece94){const _0x1c5e90=a122_0x24bb;while(!![]){const _0x214790=await onCancel(input({'message':_0x1c5e90(0x100),'default':_0x5ece94,'theme':{'prefix':''}}));if(_0x214790[_0x1c5e90(0xda)]()==='')throw CliErrors[_0x1c5e90(0xdd)](_0x1c5e90(0xec));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x1c5e90(0xe7)](_0x214790[_0x1c5e90(0xda)]())){console['error'](a122_0xe2b90e[_0x1c5e90(0xf0)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x2836d4=startSpinner(_0x1c5e90(0xfd));try{const _0x6da4eb=await isUrlReachable(_0x214790[_0x1c5e90(0xda)]());stopSpinner(_0x2836d4,_0x1c5e90(0xe6),_0x6da4eb);if(!_0x6da4eb){console[_0x1c5e90(0xef)](a122_0xe2b90e['red']('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x214790[_0x1c5e90(0xda)]();}catch(_0x284a11){stopSpinner(_0x2836d4,_0x1c5e90(0xfc),![]);throw _0x284a11;}}}export async function askCssUrl(_0x3ad0b8){const _0x346556=a122_0x24bb;while(!![]){const _0x4b5dcd=await onCancel(input({'message':_0x346556(0x103),'default':_0x3ad0b8,'theme':{'prefix':''}}));if(_0x4b5dcd[_0x346556(0xda)]()==='')throw CliErrors[_0x346556(0xdd)](_0x346556(0xec));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x346556(0xe7)](_0x4b5dcd['trim']())){console['error'](a122_0xe2b90e[_0x346556(0xf0)](_0x346556(0xee)));continue;}const _0x18b91c=startSpinner(_0x346556(0xe1));try{const _0x29f4f8=await isUrlReachable(_0x4b5dcd['trim']());stopSpinner(_0x18b91c,_0x346556(0xf6),_0x29f4f8);if(!_0x29f4f8){console['error'](a122_0xe2b90e[_0x346556(0xf0)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x4b5dcd['trim']();}catch(_0x3654cc){stopSpinner(_0x18b91c,'CSS\x20URL\x20check\x20failed',![]);throw _0x3654cc;}}}export async function selectPages(_0xdf238f,_0x3b1173){const _0x4080f0=a122_0x24bb,_0x20685e=_0xdf238f[_0x4080f0(0x105)](_0x23ce1f=>{const _0x45d585=_0x4080f0,_0x1708ba=_0x3b1173[_0x45d585(0x106)](_0x23ce1f[_0x45d585(0x101)]);return{'name':_0x23ce1f[_0x45d585(0xf5)]+'\x20\x20'+a122_0xe2b90e[_0x45d585(0xff)](_0x23ce1f[_0x45d585(0x101)])+'\x20\x20'+(_0x1708ba?a122_0xe2b90e[_0x45d585(0xff)]('[already\x20on\x20platform]'):a122_0xe2b90e[_0x45d585(0xf2)](_0x45d585(0xf1))),'value':_0x23ce1f[_0x45d585(0x101)],'checked':!_0x1708ba,'disabled':_0x1708ba};});if(_0x20685e[_0x4080f0(0xea)]===0x0)throw new Error(_0x4080f0(0xde));const _0xfb95a4=await onCancel(checkbox({'message':_0x4080f0(0xe4),'choices':_0x20685e,'loop':![],'theme':{'prefix':''}}));if(_0xfb95a4['length']===0x0)throw new Error(_0x4080f0(0xed));return _0xdf238f[_0x4080f0(0xe3)](_0x454047=>_0xfb95a4[_0x4080f0(0xf3)](_0x454047[_0x4080f0(0x101)]));}export function isInteractive(){const _0x40065e=a122_0x24bb;return process[_0x40065e(0xe9)][_0x40065e(0xfa)]===!![];}function a122_0x24bb(_0x58f42b,_0x1e1907){_0x58f42b=_0x58f42b-0xda;const _0x215c06=a122_0x215c();let _0x24bb5d=_0x215c06[_0x58f42b];return _0x24bb5d;}export function requireInteractive(){const _0x3dcf2d=a122_0x24bb;if(!isInteractive())throw new Error(_0x3dcf2d(0xfe)+_0x3dcf2d(0xeb));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a123_0x2bc7(_0x449035,_0x5c00f3){_0x449035=_0x449035-0xfb;const _0x437fbb=a123_0x437f();let _0x2bc765=_0x437fbb[_0x449035];return _0x2bc765;}const a123_0x23823c=a123_0x2bc7;function a123_0x437f(){const _0x2a1cf9=['match','replace','replaceAll','1856286uBZMmh','trim','3728326kMSibP','index.tsx','forEach','split','slice','isDirectory','join','push','183UgDdZS','24286UDxHoF','filter','cwd','484188PmZzuE','3240044ALLyVt','236770anWFLc','endsWith','12265728PDmvXp'];a123_0x437f=function(){return _0x2a1cf9;};return a123_0x437f();}(function(_0x2ec140,_0x2cf371){const _0x24b291=a123_0x2bc7,_0x47fa22=_0x2ec140();while(!![]){try{const _0x1b2ff2=-parseInt(_0x24b291(0xff))/0x1+parseInt(_0x24b291(0xfc))/0x2*(parseInt(_0x24b291(0xfb))/0x3)+parseInt(_0x24b291(0x100))/0x4+parseInt(_0x24b291(0x101))/0x5+parseInt(_0x24b291(0x107))/0x6+parseInt(_0x24b291(0x109))/0x7+-parseInt(_0x24b291(0x103))/0x8;if(_0x1b2ff2===_0x2cf371)break;else _0x47fa22['push'](_0x47fa22['shift']());}catch(_0x20ebc2){_0x47fa22['push'](_0x47fa22['shift']());}}}(a123_0x437f,0x6731b));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a123_0x23823c(0xfe)](),'src/pages');export function extractTitleFromComment(_0x372248){const _0x2b5d09=a123_0x23823c;try{const _0x2a71d3=readFileSync(_0x372248,'utf-8'),_0x2ebfc6=_0x2a71d3['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x2ebfc6&&_0x2ebfc6[0x1]){const _0x1d986a=_0x2ebfc6[0x1],_0x13cd29=_0x1d986a[_0x2b5d09(0x104)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x13cd29&&_0x13cd29[0x1])return _0x13cd29[0x1][_0x2b5d09(0x108)]();}let _0x5edc62=null;const _0x2931fe=_0x2a71d3[_0x2b5d09(0x104)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x2931fe&&_0x2931fe[0x1]&&(_0x5edc62=_0x2931fe[0x1]);if(!_0x5edc62){const _0x44df68=_0x2a71d3[_0x2b5d09(0x104)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x44df68&&_0x44df68[0x1]&&(_0x5edc62=_0x44df68[0x1]);}if(_0x5edc62){const _0x2c6646=new RegExp('\x5cb'+_0x5edc62+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x14c946=_0x2a71d3['match'](_0x2c6646);if(_0x14c946&&_0x14c946[0x1])return _0x14c946[0x1];return _0x5edc62;}return null;}catch(_0x55d235){return null;}}export function getLocalPages(_0x3c28f3=pagesDir,_0x2ee366=pagesDir){const _0x4d5dbe=a123_0x23823c;let _0x547e8f=[];const _0x5d1c9e=readdirSync(_0x3c28f3);return _0x5d1c9e[_0x4d5dbe(0x10b)](_0xc4eded=>{const _0x473424=_0x4d5dbe,_0x13e768=join(_0x3c28f3,_0xc4eded),_0x315de7=statSync(_0x13e768);if(_0x315de7&&_0x315de7[_0x473424(0x10e)]())_0x547e8f=_0x547e8f['concat'](getLocalPages(_0x13e768,_0x2ee366));else{if(_0xc4eded[_0x473424(0x102)]('.tsx')){let _0x47318e=relative(_0x2ee366,_0x13e768);_0x47318e['endsWith'](_0x473424(0x10a))?_0x47318e=_0x47318e[_0x473424(0x105)](/index\.tsx$/,''):_0x47318e=_0x47318e[_0x473424(0x105)](/\.tsx$/,'');_0x47318e[_0x473424(0x102)](sep)&&(_0x47318e=_0x47318e[_0x473424(0x10d)](0x0,-0x1));const _0x165845=_0x47318e[_0x473424(0x10c)](sep)[_0x473424(0x10f)]('/'),_0x4afdb8=extractTitleFromComment(_0x13e768),_0x217e77=_0x4afdb8||_0x165845;_0x547e8f[_0x473424(0x110)]({'path':_0x165845[_0x473424(0x106)]('$',':'),'label':_0x217e77});}}}),_0x547e8f[_0x4d5dbe(0xfd)](_0x4ef83f=>_0x4ef83f['path']!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7a0146,_0x19d03b){const _0x1d75c9=a124_0x5bea,_0x35256c=_0x7a0146();while(!![]){try{const _0x231da8=parseInt(_0x1d75c9(0x180))/0x1+parseInt(_0x1d75c9(0x18d))/0x2+-parseInt(_0x1d75c9(0x18a))/0x3+parseInt(_0x1d75c9(0x184))/0x4+parseInt(_0x1d75c9(0x18c))/0x5+-parseInt(_0x1d75c9(0x187))/0x6+parseInt(_0x1d75c9(0x17d))/0x7*(parseInt(_0x1d75c9(0x182))/0x8);if(_0x231da8===_0x19d03b)break;else _0x35256c['push'](_0x35256c['shift']());}catch(_0x3934e2){_0x35256c['push'](_0x35256c['shift']());}}}(a124_0x2672,0xd8dac));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x148ae3){const _0x5df44d=a124_0x5bea,_0x4646df=[];return!isValidJsHttpsUrl(_0x148ae3)&&_0x4646df[_0x5df44d(0x189)]('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x4646df['length']===0x0,'errors':_0x4646df};}export function validateCssUrl(_0x31c61e){const _0x2a50ea=a124_0x5bea,_0x14ebdc=[];return!isValidCssHttpsUrl(_0x31c61e)&&_0x14ebdc[_0x2a50ea(0x189)](_0x2a50ea(0x18b)),{'ok':_0x14ebdc[_0x2a50ea(0x188)]===0x0,'errors':_0x14ebdc};}function a124_0x5bea(_0x592c09,_0x3677d4){_0x592c09=_0x592c09-0x17c;const _0x26724b=a124_0x2672();let _0x5beaea=_0x26724b[_0x592c09];return _0x5beaea;}export async function validateJsUrlReachable(_0x4f6985){const _0x1b182d=a124_0x5bea,_0x1de0c0=validateJsUrl(_0x4f6985);if(!_0x1de0c0['ok'])return _0x1de0c0;const _0x57132d=await isUrlReachable(_0x4f6985);if(!_0x57132d)_0x1de0c0['errors'][_0x1b182d(0x189)](_0x1b182d(0x17c));return{'ok':_0x1de0c0[_0x1b182d(0x181)][_0x1b182d(0x188)]===0x0,'errors':_0x1de0c0[_0x1b182d(0x181)]};}export async function validateCssUrlReachable(_0x56e70b){const _0x2f0a6e=a124_0x5bea,_0x448b4f=validateCssUrl(_0x56e70b);if(!_0x448b4f['ok'])return _0x448b4f;const _0x422ea1=await isUrlReachable(_0x56e70b);if(!_0x422ea1)_0x448b4f[_0x2f0a6e(0x181)][_0x2f0a6e(0x189)]('CSS\x20URL\x20is\x20unreachable');return{'ok':_0x448b4f[_0x2f0a6e(0x181)]['length']===0x0,'errors':_0x448b4f[_0x2f0a6e(0x181)]};}export function buildCompareRows(_0x3f404e,_0x4579a3){const _0x153b51=a124_0x5bea;return _0x3f404e[_0x153b51(0x183)](_0x3a0ba0=>({'label':_0x3a0ba0[_0x153b51(0x186)],'path':_0x3a0ba0[_0x153b51(0x185)],'local':!![],'online':_0x4579a3[_0x153b51(0x17e)](_0x3a0ba0['path'])}));}function a124_0x2672(){const _0x2872c9=['1322193lGqcpk','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','2347570blFckF','499570pmwNyF','JS\x20URL\x20is\x20unreachable','256235FpQSTL','has','resources','1075753YYZlMg','errors','120HBDHNj','map','297708JKgniL','path','label','6537522LkDZiY','length','push'];a124_0x2672=function(){return _0x2872c9;};return a124_0x2672();}export async function doCreateMenus(_0x2219ac,_0x4b9b46,_0x409165,_0x33757f){const _0x59c09c=a124_0x5bea,_0x374e7a=await createMenus(_0x2219ac,_0x4b9b46,_0x409165,_0x33757f);return{'created':_0x374e7a[_0x59c09c(0x188)],'failed':0x0,'labels':_0x409165[_0x59c09c(0x183)](_0x49d415=>_0x49d415['label']),'menus':_0x374e7a};}export function filterMenusWithResources(_0x3f6140){const _0x4d5f80=a124_0x5bea;return _0x3f6140['filter'](_0x32cb7d=>_0x32cb7d[_0x4d5f80(0x17f)][_0x4d5f80(0x188)]>0x0);}export async function fetchMenuData(_0x453250,_0x469309){const _0x587d39=a124_0x5bea,_0xf3c0cd=getLocalPages(),_0x660861=await getOnlineMenuList(_0x453250,_0x469309),_0x31f15a=new Set(_0x660861[_0x587d39(0x183)](_0x331b03=>_0x331b03['path']));return{'localPages':_0xf3c0cd,'onlineMenuList':_0x660861,'onlinePaths':_0x31f15a};}export async function fetchOnlineMenuList(_0x38869f,_0x3967aa){return getOnlineMenuList(_0x38869f,_0x3967aa);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a125_0x120514=a125_0xd3ff;(function(_0x4c2137,_0xd6584d){const _0x101553=a125_0xd3ff,_0x63b5da=_0x4c2137();while(!![]){try{const _0x319a4e=-parseInt(_0x101553(0x163))/0x1*(-parseInt(_0x101553(0x154))/0x2)+-parseInt(_0x101553(0x115))/0x3+-parseInt(_0x101553(0x135))/0x4*(-parseInt(_0x101553(0x120))/0x5)+parseInt(_0x101553(0x14d))/0x6*(parseInt(_0x101553(0x157))/0x7)+-parseInt(_0x101553(0x10d))/0x8*(parseInt(_0x101553(0x141))/0x9)+-parseInt(_0x101553(0x11e))/0xa*(parseInt(_0x101553(0x11f))/0xb)+-parseInt(_0x101553(0x177))/0xc*(-parseInt(_0x101553(0x156))/0xd);if(_0x319a4e===_0xd6584d)break;else _0x63b5da['push'](_0x63b5da['shift']());}catch(_0xf7879a){_0x63b5da['push'](_0x63b5da['shift']());}}}(a125_0x2032,0x940d3));import{CliError,CliErrors}from'../../../errors.js';function a125_0xd3ff(_0x159a99,_0x18ac00){_0x159a99=_0x159a99-0x10d;const _0x203288=a125_0x2032();let _0xd3ff7f=_0x203288[_0x159a99];return _0xd3ff7f;}import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':a125_0x120514(0x147),'required':!![],'description':a125_0x120514(0x119)};export const MENU_SORT_FLAG={'name':a125_0x120514(0x171),'type':a125_0x120514(0x147),'description':a125_0x120514(0x142)};export const MENU_PARENT_ID_FLAG={'name':a125_0x120514(0x167),'type':a125_0x120514(0x126),'description':a125_0x120514(0x16c)};function a125_0x2032(){const _0x280244=['call','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','succeeded','menu_permission_denied','map','expect-parent-id','Reorder\x20sibling\x20menus\x20below\x20','1285188aJYsAM','api_error','defineProperty','expect-path','Exact\x20online\x20menu\x20id','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','message','menu_confirmation_required','menu_parent_not_folder','390JEkkPH','205161MFKRaW','5qnEhSa','warnings','error','code','selector','get','string','failed','pre-write-recheck','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','bool','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','rawFlags','\x20is\x20type\x20\x22','hash','snapshotHash','\x20menu\x20','after','type','Online\x20menu\x20state\x20changed\x20before\x20','unknown','2131964lLpWgi','menu_not_found','folder','stringify','num','trim','str','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','read\x20online\x20menu\x20facts\x20before\x20','test','validation','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','1273059TPTNjw','Sibling\x20sort\x20value\x20(non-negative\x20integer)','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','stage','byId','targets','number','recheck\x20online\x20menu\x20facts\x20before\x20','prototype','yes','path','cascade','6QrkTJe','Cannot\x20append\x20a\x20','plannedActions','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','\x22,\x20not\x20folder.','deleteOrder','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','708LiRVcF','dryRun','123019dJoACK','7329602vFHlNp','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','menu_state_drift','max','expected-children-count','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','operation','menu_verification_failed','hint',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','before','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','1OLYmNr','data','Menu\x20','childrenCount','parent-id','\x20path\x20changed:\x20expected\x20','\x20child\x20count\x20changed:\x20expected\x20','verification','\x20parent\x20changed:\x20expected\x20','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','length',',\x20current\x20','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','appCode','sort','required','root','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','flagMissing','hasOwnProperty','948CAtyud','planFile','Permission\x20denied\x20while\x20attempting\x20to\x20','backend','isSafeInteger','Online\x20menu\x20not\x20found:\x20','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','32QccBnE'];a125_0x2032=function(){return _0x280244;};return a125_0x2032();}export const MENU_EXPECT_PARENT_ID_FLAG={'name':'expect-parent-id','type':a125_0x120514(0x126),'description':a125_0x120514(0x158)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a125_0x120514(0x118),'type':a125_0x120514(0x126),'description':a125_0x120514(0x174)},{'name':a125_0x120514(0x15b),'type':a125_0x120514(0x147),'description':a125_0x120514(0x13c)}];export function validateExactId(_0x222f78){const _0x163223=a125_0x120514,_0x1b3a09=_0x222f78[_0x163223(0x139)]('id');if(!Number[_0x163223(0x17b)](_0x1b3a09)||_0x1b3a09<=0x0)throw CliErrors[_0x163223(0x13f)](_0x163223(0x150));return _0x1b3a09;}export function validateSort(_0x2f15a3,_0xa14306=a125_0x120514(0x171)){const _0x137263=a125_0x120514;if(!hasFlag(_0x2f15a3,_0xa14306))return undefined;const _0x5b5363=_0x2f15a3[_0x137263(0x139)](_0xa14306);if(!Number[_0x137263(0x17b)](_0x5b5363)||_0x5b5363<0x0||_0x5b5363>MAX_MENU_SORT)throw menuError('menu_sort_invalid','--'+_0xa14306+'\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20'+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x5b5363;}export function nextSiblingSort(_0x1924ad,_0x52c167,_0x2272c8){const _0x7ae685=a125_0x120514,_0x469ba0=getChildren(_0x1924ad,_0x52c167)[_0x7ae685(0x112)](_0x517b14=>_0x517b14[_0x7ae685(0x171)])['filter'](_0x5f2107=>typeof _0x5f2107===_0x7ae685(0x147));if(_0x469ba0[_0x7ae685(0x16d)]===0x0)return 0x0;const _0x2d4d76=Math[_0x7ae685(0x15a)](..._0x469ba0);if(_0x2d4d76>=MAX_MENU_SORT)throw menuError('menu_sort_overflow',_0x7ae685(0x14e)+_0x2272c8+_0x7ae685(0x16f)+_0x2d4d76+'.',_0x7ae685(0x114)+MAX_MENU_SORT+',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.');return _0x2d4d76+0x1;}export function requireExplicitYes(_0xfab9a0){const _0x3f09cb=a125_0x120514;if(_0xfab9a0[_0x3f09cb(0x12a)]('dry-run'))return;if(!_0xfab9a0[_0x3f09cb(0x12a)](_0x3f09cb(0x14a)))throw menuError(_0x3f09cb(0x11c),'This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.',_0x3f09cb(0x143));}export async function fetchMutationSnapshot(_0x3162f2,_0x4eb4e3,_0x4a217e){const _0x530bf5=a125_0x120514;try{return await fetchMenuSnapshot(_0x3162f2[_0x530bf5(0x170)],_0x3162f2['cookie']);}catch(_0x45dfe7){throw mapMenuApiError(_0x45dfe7,_0x530bf5(0x13d)+_0x4eb4e3,_0x4a217e);}}export async function recheckMutationSnapshot(_0xcb1506,_0x95e5fb,_0x11b5d6,_0x653166){const _0xf69499=a125_0x120514;let _0x32f080;try{_0x32f080=await fetchMenuSnapshot(_0xcb1506[_0xf69499(0x170)],_0xcb1506['cookie']);}catch(_0x3786fa){const _0x42aea2=mapMenuApiError(_0x3786fa,_0xf69499(0x148)+_0x11b5d6,_0x653166);throw menuFailure(_0x42aea2,_0x95e5fb,{'stage':_0xf69499(0x128),'failed':_0x653166==null?{}:{'id':_0x653166}});}if(_0x32f080[_0xf69499(0x12e)]!==_0x95e5fb[_0xf69499(0x12f)]){const _0x3a73d9=menuError(_0xf69499(0x159),_0xf69499(0x133)+_0x11b5d6+_0xf69499(0x160),_0xf69499(0x162));throw menuFailure(_0x3a73d9,_0x95e5fb,{'stage':_0xf69499(0x128),'failed':{..._0x653166==null?{}:{'id':_0x653166},'expectedSnapshotHash':_0x95e5fb['snapshotHash'],'currentSnapshotHash':_0x32f080[_0xf69499(0x12e)]}});}return _0x32f080;}export function parseParentId(_0x8d292a,_0xf50856,_0x37fd3d={}){const _0x2c79af=a125_0x120514;if(!hasFlag(_0x8d292a,_0xf50856)){if(_0x37fd3d[_0x2c79af(0x172)])throw CliErrors[_0x2c79af(0x175)](_0xf50856);return undefined;}const _0xc86be1=_0x8d292a[_0x2c79af(0x13b)](_0xf50856)[_0x2c79af(0x13a)]();if(_0xc86be1['toLowerCase']()==='root')return null;if(!/^\d+$/[_0x2c79af(0x13e)](_0xc86be1))throw CliErrors['validation']('--'+_0xf50856+_0x2c79af(0x11a));const _0x13158b=Number(_0xc86be1);if(!Number[_0x2c79af(0x17b)](_0x13158b)||_0x13158b<=0x0)throw CliErrors['validation']('--'+_0xf50856+_0x2c79af(0x11a));return _0x13158b;}export function requireMenu(_0x4a60a3,_0x418ee8){const _0x2d6df1=a125_0x120514,_0x32ebdc=_0x4a60a3[_0x2d6df1(0x145)][_0x2d6df1(0x125)](_0x418ee8);if(!_0x32ebdc)throw menuError(_0x2d6df1(0x136),_0x2d6df1(0x17c)+_0x418ee8,_0x2d6df1(0x10f));return _0x32ebdc;}export function requireFolder(_0x2b8939,_0x4d6236){const _0x238541=a125_0x120514,_0x477662=requireMenu(_0x2b8939,_0x4d6236);if(_0x477662['type']!==_0x238541(0x137))throw menuError(_0x238541(0x11d),_0x238541(0x165)+_0x4d6236+_0x238541(0x12d)+(_0x477662[_0x238541(0x132)]||_0x238541(0x134))+_0x238541(0x151),_0x238541(0x129));return _0x477662;}export function assertExpectedState(_0x6b18,_0x518b19){const _0x168bc9=a125_0x120514;if(hasFlag(_0x6b18,_0x168bc9(0x113))){const _0x59065a=parseParentId(_0x6b18,'expect-parent-id',{'required':!![]});if(_0x518b19['parentId']!==_0x59065a)throw stateDrift(_0x168bc9(0x165)+_0x518b19['id']+_0x168bc9(0x16b)+formatParent(_0x59065a)+',\x20current\x20'+formatParent(_0x518b19['parentId'])+'.');}if(hasFlag(_0x6b18,_0x168bc9(0x118))){const _0x109d62=_0x6b18['str']('expect-path');if(_0x518b19['path']!==_0x109d62)throw stateDrift(_0x168bc9(0x165)+_0x518b19['id']+_0x168bc9(0x168)+JSON['stringify'](_0x109d62)+_0x168bc9(0x16e)+JSON[_0x168bc9(0x138)](_0x518b19[_0x168bc9(0x14b)])+'.');}if(hasFlag(_0x6b18,_0x168bc9(0x15b))){const _0x20095f=_0x6b18[_0x168bc9(0x139)]('expected-children-count');if(!Number[_0x168bc9(0x17b)](_0x20095f)||_0x20095f<0x0)throw CliErrors[_0x168bc9(0x13f)](_0x168bc9(0x12b));if(_0x518b19[_0x168bc9(0x166)]!==_0x20095f)throw stateDrift(_0x168bc9(0x165)+_0x518b19['id']+_0x168bc9(0x169)+_0x20095f+_0x168bc9(0x16e)+_0x518b19['childrenCount']+'.');}}export function assertVerified(_0x19a99c,_0x190d4e,_0x172698=a125_0x120514(0x153)){const _0x19a9d7=a125_0x120514;if(!_0x19a99c)throw menuError(_0x19a9d7(0x15e),_0x190d4e,_0x172698);}export function mutationResult(_0x43a183){const _0x4412b4=a125_0x120514;return{'operation':_0x43a183[_0x4412b4(0x15d)],'selector':_0x43a183[_0x4412b4(0x124)],'before':_0x43a183[_0x4412b4(0x161)],'after':_0x43a183['after'],'dryRun':_0x43a183[_0x4412b4(0x155)],'backend':_0x43a183['backend'],..._0x43a183[_0x4412b4(0x14f)]?{'plannedActions':_0x43a183[_0x4412b4(0x14f)]}:{},..._0x43a183[_0x4412b4(0x146)]?{'targets':_0x43a183[_0x4412b4(0x146)]}:{},..._0x43a183[_0x4412b4(0x152)]?{'deleteOrder':_0x43a183[_0x4412b4(0x152)]}:{},'snapshotHash':_0x43a183['snapshotHash'],..._0x43a183['cascade']?{'cascade':_0x43a183[_0x4412b4(0x14c)]}:{},..._0x43a183[_0x4412b4(0x178)]?{'planFile':_0x43a183[_0x4412b4(0x178)]}:{},'succeeded':_0x43a183['succeeded']??[],'failed':_0x43a183[_0x4412b4(0x127)]??[],'warnings':_0x43a183['warnings']??[],'verification':_0x43a183[_0x4412b4(0x16a)],'error':_0x43a183[_0x4412b4(0x122)]};}export function menuDryRunResult(_0x288cef,_0x3198f1){return{..._0x288cef,..._0x3198f1};}export function menuFailure(_0x361cc3,_0x2ffca0,_0x55fa91){const _0x3b4afd=a125_0x120514,_0x92ec4=mutationResult({..._0x2ffca0,'after':_0x55fa91[_0x3b4afd(0x131)]===undefined?_0x2ffca0['after']:_0x55fa91[_0x3b4afd(0x131)],'backend':_0x55fa91['backend']??_0x2ffca0[_0x3b4afd(0x17a)],'dryRun':![],'succeeded':_0x55fa91[_0x3b4afd(0x110)]??[],'failed':[{..._0x55fa91[_0x3b4afd(0x127)]??{},'stage':_0x55fa91[_0x3b4afd(0x144)],'code':_0x361cc3['code'],'message':_0x361cc3[_0x3b4afd(0x11b)]}],'warnings':[..._0x2ffca0[_0x3b4afd(0x121)],..._0x55fa91[_0x3b4afd(0x121)]??[]],'verification':_0x55fa91[_0x3b4afd(0x16a)],'error':{'code':_0x361cc3[_0x3b4afd(0x123)],'message':_0x361cc3['message'],..._0x361cc3[_0x3b4afd(0x15f)]?{'hint':_0x361cc3[_0x3b4afd(0x15f)]}:{}}});return Object[_0x3b4afd(0x117)](_0x361cc3,_0x3b4afd(0x164),{'value':_0x92ec4,'enumerable':!![],'configurable':!![]}),_0x361cc3;}export function asVerificationError(_0x2806fa,_0x5bc3b9){const _0x51aafe=a125_0x120514;if(_0x2806fa instanceof CliError&&_0x2806fa['code']===_0x51aafe(0x15e))return _0x2806fa;const _0x46c9fe=_0x2806fa instanceof Error?_0x2806fa[_0x51aafe(0x11b)]:String(_0x2806fa);return menuError(_0x51aafe(0x15e),''+_0x5bc3b9+(_0x46c9fe?':\x20'+_0x46c9fe:''),_0x51aafe(0x15c));}export function describeMenuErrorCause(_0x3e0840,_0x22a4aa,_0x4d05a7){const _0x4825af=a125_0x120514,_0x2ce94a=mapMenuApiError(_0x3e0840,_0x22a4aa,_0x4d05a7);return{'causeCode':_0x2ce94a[_0x4825af(0x123)],'causeMessage':_0x2ce94a[_0x4825af(0x11b)]};}export function hasFlag(_0x333416,_0x5e9850){const _0x2d6e80=a125_0x120514;return Object[_0x2d6e80(0x149)][_0x2d6e80(0x176)][_0x2d6e80(0x10e)](_0x333416[_0x2d6e80(0x12c)],_0x5e9850)&&_0x333416[_0x2d6e80(0x12c)][_0x5e9850]!==undefined;}export function toApiParentId(_0x3048fa){return _0x3048fa??0x0;}export function formatParent(_0x46dad0){const _0x2c4d2e=a125_0x120514;return _0x46dad0==null?_0x2c4d2e(0x173):String(_0x46dad0);}export function menuError(_0x11dbb2,_0x54fd9c,_0x738434){return new CliError(_0x11dbb2,0x1,_0x54fd9c,_0x738434);}export function mapMenuApiError(_0x5cb6e1,_0x5f597c,_0x4395c0){const _0xad2bfb=a125_0x120514;if(_0x5cb6e1 instanceof CliError&&_0x5cb6e1['code']!==_0xad2bfb(0x116))return _0x5cb6e1;const _0x10f35a=_0x5cb6e1 instanceof Error?_0x5cb6e1[_0xad2bfb(0x11b)]:String(_0x5cb6e1);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0xad2bfb(0x13e)](_0x10f35a))return menuError(_0xad2bfb(0x111),_0xad2bfb(0x179)+_0x5f597c+(_0x4395c0?_0xad2bfb(0x130)+_0x4395c0:'')+'.',_0xad2bfb(0x17d));return menuError('menu_mutation_failed','Failed\x20to\x20'+_0x5f597c+(_0x4395c0?_0xad2bfb(0x130)+_0x4395c0:'')+':\x20'+_0x10f35a,'Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.');}export function isMenuResponseLoss(_0x410fef){const _0x3c4c22=a125_0x120514,_0x4c150=_0x410fef instanceof Error?_0x410fef['message']:String(_0x410fef);if(_0x410fef instanceof CliError)return _0x410fef[_0x3c4c22(0x123)]===_0x3c4c22(0x116)&&/^Request (?:failed|timeout):/i[_0x3c4c22(0x13e)](_0x4c150);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x3c4c22(0x13e)](_0x4c150);}function stateDrift(_0x4e0488){const _0x1740bc=a125_0x120514;return menuError(_0x1740bc(0x159),_0x4e0488,_0x1740bc(0x140));}
|
|
1
|
+
const a125_0x1190ac=a125_0x3959;(function(_0x1b8a9a,_0xb8dc60){const _0x52a809=a125_0x3959,_0x251a9d=_0x1b8a9a();while(!![]){try{const _0x195357=-parseInt(_0x52a809(0x1e2))/0x1*(parseInt(_0x52a809(0x1e1))/0x2)+-parseInt(_0x52a809(0x1f9))/0x3+-parseInt(_0x52a809(0x204))/0x4+parseInt(_0x52a809(0x1df))/0x5*(parseInt(_0x52a809(0x1c0))/0x6)+-parseInt(_0x52a809(0x1e0))/0x7+-parseInt(_0x52a809(0x1d5))/0x8+parseInt(_0x52a809(0x1cf))/0x9*(parseInt(_0x52a809(0x1c7))/0xa);if(_0x195357===_0xb8dc60)break;else _0x251a9d['push'](_0x251a9d['shift']());}catch(_0x3c2c00){_0x251a9d['push'](_0x251a9d['shift']());}}}(a125_0x2e1d,0x3b219));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':a125_0x1190ac(0x20b),'required':!![],'description':a125_0x1190ac(0x1b4)};export const MENU_SORT_FLAG={'name':'sort','type':a125_0x1190ac(0x20b),'description':'Sibling\x20sort\x20value\x20(non-negative\x20integer)'};export const MENU_PARENT_ID_FLAG={'name':a125_0x1190ac(0x1cc),'type':'string','description':a125_0x1190ac(0x203)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a125_0x1190ac(0x1d1),'type':'string','description':a125_0x1190ac(0x1c3)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a125_0x1190ac(0x1fe),'type':'string','description':'Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches'},{'name':a125_0x1190ac(0x1ea),'type':a125_0x1190ac(0x20b),'description':a125_0x1190ac(0x1fd)}];export function validateExactId(_0x321f74){const _0x3c17a7=a125_0x1190ac,_0x598f57=_0x321f74[_0x3c17a7(0x1ba)]('id');if(!Number[_0x3c17a7(0x1d4)](_0x598f57)||_0x598f57<=0x0)throw CliErrors['validation'](_0x3c17a7(0x207));return _0x598f57;}export function validateSort(_0x300eb6,_0x4ae067=a125_0x1190ac(0x1f7)){const _0x4830ee=a125_0x1190ac;if(!hasFlag(_0x300eb6,_0x4ae067))return undefined;const _0x50e65b=_0x300eb6[_0x4830ee(0x1ba)](_0x4ae067);if(!Number[_0x4830ee(0x1d4)](_0x50e65b)||_0x50e65b<0x0||_0x50e65b>MAX_MENU_SORT)throw menuError('menu_sort_invalid','--'+_0x4ae067+_0x4830ee(0x1eb)+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x50e65b;}export function nextSiblingSort(_0x5ac0c0,_0x135832,_0x57e354){const _0xf69bb5=a125_0x1190ac,_0x15b5f3=getChildren(_0x5ac0c0,_0x135832)['map'](_0x12764a=>_0x12764a[_0xf69bb5(0x1f7)])[_0xf69bb5(0x1cd)](_0x4a8eb4=>typeof _0x4a8eb4===_0xf69bb5(0x20b));if(_0x15b5f3[_0xf69bb5(0x1f0)]===0x0)return 0x0;const _0x37d9a0=Math['max'](..._0x15b5f3);if(_0x37d9a0>=MAX_MENU_SORT)throw menuError(_0xf69bb5(0x1b7),_0xf69bb5(0x1b6)+_0x57e354+_0xf69bb5(0x1a7)+_0x37d9a0+'.',_0xf69bb5(0x1c6)+MAX_MENU_SORT+',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.');return _0x37d9a0+0x1;}export function requireExplicitYes(_0x13f0a1){const _0x17f399=a125_0x1190ac;if(_0x13f0a1[_0x17f399(0x1e5)](_0x17f399(0x1c8)))return;if(!_0x13f0a1[_0x17f399(0x1e5)](_0x17f399(0x20c)))throw menuError('menu_confirmation_required',_0x17f399(0x1f3),_0x17f399(0x205));}export async function fetchMutationSnapshot(_0x335838,_0x539c90,_0x3c5d2e){const _0x15ce98=a125_0x1190ac;try{return await fetchMenuSnapshot(_0x335838[_0x15ce98(0x1ab)],_0x335838[_0x15ce98(0x1e4)]);}catch(_0x2e08ff){throw mapMenuApiError(_0x2e08ff,'read\x20online\x20menu\x20facts\x20before\x20'+_0x539c90,_0x3c5d2e);}}export async function recheckMutationSnapshot(_0x37ece2,_0x5d88e9,_0x2b5c9b,_0x39f6e5){const _0x491df5=a125_0x1190ac;let _0x158330;try{_0x158330=await fetchMenuSnapshot(_0x37ece2[_0x491df5(0x1ab)],_0x37ece2[_0x491df5(0x1e4)]);}catch(_0x83e3eb){const _0x2af62a=mapMenuApiError(_0x83e3eb,_0x491df5(0x1ed)+_0x2b5c9b,_0x39f6e5);throw menuFailure(_0x2af62a,_0x5d88e9,{'stage':_0x491df5(0x20d),'failed':_0x39f6e5==null?{}:{'id':_0x39f6e5}});}if(_0x158330[_0x491df5(0x1be)]!==_0x5d88e9[_0x491df5(0x1ef)]){const _0x3a72af=menuError(_0x491df5(0x1c5),_0x491df5(0x209)+_0x2b5c9b+_0x491df5(0x1fa),_0x491df5(0x1b0));throw menuFailure(_0x3a72af,_0x5d88e9,{'stage':_0x491df5(0x20d),'failed':{..._0x39f6e5==null?{}:{'id':_0x39f6e5},'expectedSnapshotHash':_0x5d88e9[_0x491df5(0x1ef)],'currentSnapshotHash':_0x158330['hash']}});}return _0x158330;}export function parseParentId(_0xc397a7,_0x46c6a4,_0x52d18e={}){const _0x18edef=a125_0x1190ac;if(!hasFlag(_0xc397a7,_0x46c6a4)){if(_0x52d18e[_0x18edef(0x1dc)])throw CliErrors[_0x18edef(0x1ee)](_0x46c6a4);return undefined;}const _0x3bbfb5=_0xc397a7[_0x18edef(0x1c4)](_0x46c6a4)[_0x18edef(0x1e6)]();if(_0x3bbfb5[_0x18edef(0x1d6)]()===_0x18edef(0x1c9))return null;if(!/^\d+$/[_0x18edef(0x1a8)](_0x3bbfb5))throw CliErrors[_0x18edef(0x200)]('--'+_0x46c6a4+_0x18edef(0x1b9));const _0x1497c4=Number(_0x3bbfb5);if(!Number['isSafeInteger'](_0x1497c4)||_0x1497c4<=0x0)throw CliErrors[_0x18edef(0x200)]('--'+_0x46c6a4+_0x18edef(0x1b9));return _0x1497c4;}export function requireMenu(_0x3e3016,_0x49a17d){const _0x12dead=a125_0x1190ac,_0x46f863=_0x3e3016['byId'][_0x12dead(0x1d8)](_0x49a17d);if(!_0x46f863)throw menuError(_0x12dead(0x1bf),_0x12dead(0x1f5)+_0x49a17d,'Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.');return _0x46f863;}export function requireFolder(_0x2dbe54,_0x109abc){const _0x445f98=a125_0x1190ac,_0x596eb0=requireMenu(_0x2dbe54,_0x109abc);if(_0x596eb0[_0x445f98(0x1db)]!==_0x445f98(0x1bd))throw menuError(_0x445f98(0x1f8),_0x445f98(0x1b1)+_0x109abc+_0x445f98(0x1b2)+(_0x596eb0[_0x445f98(0x1db)]||_0x445f98(0x201))+_0x445f98(0x1da),_0x445f98(0x1ce));return _0x596eb0;}export function assertExpectedState(_0xb472ff,_0x12a649){const _0x4baebc=a125_0x1190ac;if(hasFlag(_0xb472ff,_0x4baebc(0x1d1))){const _0x41e1c8=parseParentId(_0xb472ff,_0x4baebc(0x1d1),{'required':!![]});if(_0x12a649['parentId']!==_0x41e1c8)throw stateDrift(_0x4baebc(0x1b1)+_0x12a649['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x41e1c8)+_0x4baebc(0x1ec)+formatParent(_0x12a649[_0x4baebc(0x1b3)])+'.');}if(hasFlag(_0xb472ff,'expect-path')){const _0x2d0267=_0xb472ff[_0x4baebc(0x1c4)](_0x4baebc(0x1fe));if(_0x12a649[_0x4baebc(0x1aa)]!==_0x2d0267)throw stateDrift(_0x4baebc(0x1b1)+_0x12a649['id']+_0x4baebc(0x1e3)+JSON[_0x4baebc(0x1f1)](_0x2d0267)+',\x20current\x20'+JSON[_0x4baebc(0x1f1)](_0x12a649[_0x4baebc(0x1aa)])+'.');}if(hasFlag(_0xb472ff,_0x4baebc(0x1ea))){const _0x2ab3bf=_0xb472ff[_0x4baebc(0x1ba)](_0x4baebc(0x1ea));if(!Number[_0x4baebc(0x1d4)](_0x2ab3bf)||_0x2ab3bf<0x0)throw CliErrors['validation'](_0x4baebc(0x1b8));if(_0x12a649[_0x4baebc(0x1b5)]!==_0x2ab3bf)throw stateDrift(_0x4baebc(0x1b1)+_0x12a649['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x2ab3bf+',\x20current\x20'+_0x12a649[_0x4baebc(0x1b5)]+'.');}}export function assertVerified(_0x5c5787,_0x42ee3d,_0x57d1fd=a125_0x1190ac(0x1fc)){if(!_0x5c5787)throw menuError('menu_verification_failed',_0x42ee3d,_0x57d1fd);}export function mutationResult(_0x3a60a2){const _0xd29a24=a125_0x1190ac;return{'operation':_0x3a60a2[_0xd29a24(0x1c1)],'selector':_0x3a60a2[_0xd29a24(0x1f6)],'before':_0x3a60a2[_0xd29a24(0x1f2)],'after':_0x3a60a2['after'],'dryRun':_0x3a60a2[_0xd29a24(0x1e7)],'backend':_0x3a60a2['backend'],..._0x3a60a2[_0xd29a24(0x20a)]?{'plannedActions':_0x3a60a2[_0xd29a24(0x20a)]}:{},..._0x3a60a2[_0xd29a24(0x1d0)]?{'targets':_0x3a60a2['targets']}:{},..._0x3a60a2['deleteOrder']?{'deleteOrder':_0x3a60a2[_0xd29a24(0x1c2)]}:{},'snapshotHash':_0x3a60a2['snapshotHash'],..._0x3a60a2['cascade']?{'cascade':_0x3a60a2[_0xd29a24(0x1d2)]}:{},..._0x3a60a2[_0xd29a24(0x1de)]?{'planFile':_0x3a60a2['planFile']}:{},'succeeded':_0x3a60a2[_0xd29a24(0x1d9)]??[],'failed':_0x3a60a2[_0xd29a24(0x206)]??[],'warnings':_0x3a60a2[_0xd29a24(0x1cb)]??[],'verification':_0x3a60a2[_0xd29a24(0x1bb)],'error':_0x3a60a2[_0xd29a24(0x208)]};}export function menuDryRunResult(_0x1ed696,_0x2cedba){return{..._0x1ed696,..._0x2cedba};}export function menuFailure(_0x29e46a,_0x1aa2a7,_0x56ba2c){const _0x903141=a125_0x1190ac,_0x215260=mutationResult({..._0x1aa2a7,'after':_0x56ba2c['after']===undefined?_0x1aa2a7[_0x903141(0x1ad)]:_0x56ba2c[_0x903141(0x1ad)],'backend':_0x56ba2c[_0x903141(0x1f4)]??_0x1aa2a7[_0x903141(0x1f4)],'dryRun':![],'succeeded':_0x56ba2c[_0x903141(0x1d9)]??[],'failed':[{..._0x56ba2c[_0x903141(0x206)]??{},'stage':_0x56ba2c[_0x903141(0x1fb)],'code':_0x29e46a[_0x903141(0x1a5)],'message':_0x29e46a[_0x903141(0x1ff)]}],'warnings':[..._0x1aa2a7['warnings'],..._0x56ba2c[_0x903141(0x1cb)]??[]],'verification':_0x56ba2c[_0x903141(0x1bb)],'error':{'code':_0x29e46a[_0x903141(0x1a5)],'message':_0x29e46a[_0x903141(0x1ff)],..._0x29e46a[_0x903141(0x1a9)]?{'hint':_0x29e46a['hint']}:{}}});return Object[_0x903141(0x1af)](_0x29e46a,_0x903141(0x1d3),{'value':_0x215260,'enumerable':!![],'configurable':!![]}),_0x29e46a;}export function asVerificationError(_0x12b710,_0x407750){const _0x5812cb=a125_0x1190ac;if(_0x12b710 instanceof CliError&&_0x12b710[_0x5812cb(0x1a5)]===_0x5812cb(0x1dd))return _0x12b710;const _0x404a02=_0x12b710 instanceof Error?_0x12b710['message']:String(_0x12b710);return menuError('menu_verification_failed',''+_0x407750+(_0x404a02?':\x20'+_0x404a02:''),'The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.');}function a125_0x3959(_0x1cb9aa,_0x302c1a){_0x1cb9aa=_0x1cb9aa-0x1a5;const _0x2e1dc0=a125_0x2e1d();let _0x395945=_0x2e1dc0[_0x1cb9aa];return _0x395945;}export function describeMenuErrorCause(_0x50bf48,_0x29c6a2,_0x1df138){const _0x53b4b8=a125_0x1190ac,_0xbc7e68=mapMenuApiError(_0x50bf48,_0x29c6a2,_0x1df138);return{'causeCode':_0xbc7e68[_0x53b4b8(0x1a5)],'causeMessage':_0xbc7e68[_0x53b4b8(0x1ff)]};}export function hasFlag(_0x378a16,_0x530621){const _0x5327c0=a125_0x1190ac;return Object[_0x5327c0(0x1d7)]['hasOwnProperty']['call'](_0x378a16[_0x5327c0(0x1ca)],_0x530621)&&_0x378a16[_0x5327c0(0x1ca)][_0x530621]!==undefined;}export function toApiParentId(_0xcc030c){return _0xcc030c??0x0;}export function formatParent(_0x1d9e4b){return _0x1d9e4b==null?'root':String(_0x1d9e4b);}export function menuError(_0x41c4fd,_0x421ad8,_0x488a5c){return new CliError(_0x41c4fd,0x1,_0x421ad8,_0x488a5c);}export function mapMenuApiError(_0x28db69,_0x62a031,_0x3b4588){const _0xcf29a5=a125_0x1190ac;if(_0x28db69 instanceof CliError&&_0x28db69[_0xcf29a5(0x1a5)]!==_0xcf29a5(0x1e9))return _0x28db69;const _0x1ebec4=_0x28db69 instanceof Error?_0x28db69[_0xcf29a5(0x1ff)]:String(_0x28db69);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0xcf29a5(0x1a8)](_0x1ebec4))return menuError(_0xcf29a5(0x1e8),'Permission\x20denied\x20while\x20attempting\x20to\x20'+_0x62a031+(_0x3b4588?_0xcf29a5(0x1ae)+_0x3b4588:'')+'.',_0xcf29a5(0x1a6));return menuError(_0xcf29a5(0x1ac),'Failed\x20to\x20'+_0x62a031+(_0x3b4588?_0xcf29a5(0x1ae)+_0x3b4588:'')+':\x20'+_0x1ebec4,_0xcf29a5(0x202));}export function isMenuResponseLoss(_0x21f581){const _0xb95a3=a125_0x1190ac,_0x16b429=_0x21f581 instanceof Error?_0x21f581[_0xb95a3(0x1ff)]:String(_0x21f581);if(_0x21f581 instanceof CliError)return _0x21f581[_0xb95a3(0x1a5)]===_0xb95a3(0x1e9)&&/^Request (?:failed|timeout):/i['test'](_0x16b429);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'](_0x16b429);}function stateDrift(_0x37a5ff){const _0x418a01=a125_0x1190ac;return menuError(_0x418a01(0x1c5),_0x37a5ff,_0x418a01(0x1bc));}function a125_0x2e1d(){const _0x100a95=['num','verification','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','folder','hash','menu_not_found','246Pzycfs','operation','deleteOrder','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','str','menu_state_drift','Reorder\x20sibling\x20menus\x20below\x20','40BOwAsW','dry-run','root','rawFlags','warnings','parent-id','filter','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','3243582zRKmAD','targets','expect-parent-id','cascade','data','isSafeInteger','538144zCFjwJ','toLowerCase','prototype','get','succeeded','\x22,\x20not\x20folder.','type','required','menu_verification_failed','planFile','23235LaKBxK','2163497UhxabE','10HjjmyL','89447ocYCGK','\x20path\x20changed:\x20expected\x20','cookie','bool','trim','dryRun','menu_permission_denied','api_error','expected-children-count','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20',',\x20current\x20','recheck\x20online\x20menu\x20facts\x20before\x20','flagMissing','snapshotHash','length','stringify','before','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','backend','Online\x20menu\x20not\x20found:\x20','selector','sort','menu_parent_not_folder','392064yZMMXQ',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','stage','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','expect-path','message','validation','unknown','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','1742624UTjgmD','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','failed','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','error','Online\x20menu\x20state\x20changed\x20before\x20','plannedActions','number','yes','pre-write-recheck','code','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','test','hint','path','appCode','menu_mutation_failed','after','\x20menu\x20','defineProperty','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','Menu\x20','\x20is\x20type\x20\x22','parentId','Exact\x20online\x20menu\x20id','childrenCount','Cannot\x20append\x20a\x20','menu_sort_overflow','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.'];a125_0x2e1d=function(){return _0x100a95;};return a125_0x2e1d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x555745,_0x5a5531){const _0x44f037=a126_0x551e,_0x379bab=_0x555745();while(!![]){try{const _0x424e21=parseInt(_0x44f037(0x182))/0x1*(parseInt(_0x44f037(0x179))/0x2)+parseInt(_0x44f037(0x171))/0x3+-parseInt(_0x44f037(0x183))/0x4*(-parseInt(_0x44f037(0x192))/0x5)+parseInt(_0x44f037(0x16f))/0x6*(-parseInt(_0x44f037(0x190))/0x7)+parseInt(_0x44f037(0x17b))/0x8+parseInt(_0x44f037(0x18a))/0x9*(parseInt(_0x44f037(0x175))/0xa)+-parseInt(_0x44f037(0x174))/0xb;if(_0x424e21===_0x5a5531)break;else _0x379bab['push'](_0x379bab['shift']());}catch(_0x2aced3){_0x379bab['push'](_0x379bab['shift']());}}}(a126_0x10c3,0x9000b));function a126_0x10c3(){const _0xd712d9=['\x20menu','558957LVLOSJ','stringify','total','25933270GMFIVm','5114590psCEPJ','Regroup\x20','create-menus','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','22926xXQofk','info','6478936SNDDtC','length','\x20online\x20menus\x20successfully','update-menu-cdn-url','resources','Creating\x20menu:\x20','\x20menu\x20group(s)','86Hsbqbt','996PyMLaX','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Create\x20menu\x20\x22','Updating\x20menu\x20asset\x20links:\x20','menuGroups','Fetched\x20','get-online-menu-list','9CeKRHt','Update\x20menu\x20','path','Batch\x20menu\x20creation\x20completed,\x20total\x20','label','all','1479191DVAEUT','Delete\x20','21845Tnqpyg','import','Menu\x20created\x20successfully:\x20','loadScriptMode','Menu\x20assets\x20synced:\x20','map','Start\x20batch\x20menu\x20creation,\x20total\x20','create-menu','18zLRMZp'];a126_0x10c3=function(){return _0xd712d9;};return a126_0x10c3();}import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';function a126_0x551e(_0x268a50,_0x35b0fb){_0x268a50=_0x268a50-0x16c;const _0x10c317=a126_0x10c3();let _0x551ec1=_0x10c317[_0x268a50];return _0x551ec1;}import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a126_0x167d0a,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x3f99aa,_0xb9f58c){const _0x3584e4=a126_0x551e,_0x2854c4=getEnv();logger[_0x3584e4(0x17a)](_0x3584e4(0x189),isProduction(_0x2854c4)?_0x3584e4(0x184)+_0x3f99aa+')':_0x3584e4(0x178)+_0x3f99aa+')');const _0x3faeb5=await fetchMenuSnapshot(_0x3f99aa,_0xb9f58c,{'verbose':!![]});return logger[_0x3584e4(0x17a)]('get-online-menu-list',_0x3584e4(0x188)+_0x3faeb5[_0x3584e4(0x173)]+_0x3584e4(0x17d)),_0x3faeb5['menus'][_0x3584e4(0x16c)](toProcessedMenuItem);}export async function createMenu(_0x9e68b5,_0x3ea5a6,_0x4e4b47){const _0x450e20=a126_0x551e;logger[_0x450e20(0x17a)](_0x450e20(0x16e),_0x450e20(0x180)+_0x4e4b47['label']+'\x20('+_0x4e4b47[_0x450e20(0x18c)]+')');const _0x53ba91={'appCode':_0x9e68b5,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x450e20(0x193),'resources':_0x4e4b47['resources']?JSON['stringify'](_0x4e4b47[_0x450e20(0x17f)]):undefined},..._0x4e4b47},_0x2e5712=await createMenuRecord(_0x53ba91,_0x3ea5a6,_0x450e20(0x185)+_0x4e4b47[_0x450e20(0x18e)]+'\x22');return logger[_0x450e20(0x17a)](_0x450e20(0x16e),_0x450e20(0x194)+_0x4e4b47[_0x450e20(0x18e)]),_0x2e5712;}async function createSingleMenu(_0x8870dd,_0x340a53,_0x4cfdff,_0x563723){const _0x358c2b=a126_0x551e,_0xd88a2={'appCode':_0x8870dd,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x358c2b(0x193),'resources':_0x563723?JSON['stringify'](_0x563723):undefined},'label':_0x4cfdff[_0x358c2b(0x18e)],'path':_0x4cfdff[_0x358c2b(0x18c)]},_0x504467=await createMenuRecord(_0xd88a2,_0x340a53,_0x358c2b(0x185)+_0x4cfdff[_0x358c2b(0x18e)]+'\x22');return logger[_0x358c2b(0x17a)](_0x358c2b(0x16e),_0x358c2b(0x194)+_0x4cfdff['label']),_0x504467;}export async function createMenus(_0x3bd932,_0x6cd0d8,_0x1a72b9,_0x3c3ae9){const _0x7162f2=a126_0x551e;logger['info'](_0x7162f2(0x177),_0x7162f2(0x16d)+_0x1a72b9[_0x7162f2(0x17c)]);const _0x284e5a=await Promise[_0x7162f2(0x18f)](_0x1a72b9[_0x7162f2(0x16c)](_0xc9357b=>createSingleMenu(_0x3bd932,_0x6cd0d8,_0xc9357b,_0x3c3ae9)));return logger[_0x7162f2(0x17a)](_0x7162f2(0x177),_0x7162f2(0x18d)+_0x1a72b9['length']),_0x284e5a;}export async function updateMenuCdnUrl(_0x5d9107,_0xf05ac,_0x2c6a02){const _0x2ab24c=a126_0x551e;logger[_0x2ab24c(0x17a)](_0x2ab24c(0x17e),_0x2ab24c(0x186)+_0x2c6a02[_0x2ab24c(0x18e)]+'\x20('+_0x2c6a02[_0x2ab24c(0x18c)]+')');const _0x4fdd83={'id':_0x2c6a02['id'],'appCode':_0x5d9107,'extend':{..._0x2c6a02['extend']??{},..._0x2c6a02[_0x2ab24c(0x195)]?{'loadScriptMode':_0x2c6a02['loadScriptMode']}:{},'resources':_0x2c6a02['resources']?JSON[_0x2ab24c(0x172)](_0x2c6a02[_0x2ab24c(0x17f)]):undefined}},_0x5ac8b7=await updateMenuRecord(_0x4fdd83,_0xf05ac,'Update\x20menu\x20assets\x20\x22'+_0x2c6a02[_0x2ab24c(0x18e)]+'\x22');return logger[_0x2ab24c(0x17a)]('update-menu-cdn-url',_0x2ab24c(0x196)+_0x2c6a02[_0x2ab24c(0x18e)],undefined),_0x5ac8b7;}export async function createMenuEntity(_0x1c3476,_0x5cbf09,_0x300d05){const _0x1e263c=a126_0x551e;return createMenuRecord({'appCode':_0x1c3476,..._0x300d05},_0x5cbf09,_0x1e263c(0x185)+_0x300d05[_0x1e263c(0x18e)]+'\x22');}export async function updateMenuEntity(_0x4a5fbc,_0x4212b7,_0x74272b){const _0x216003=a126_0x551e;return updateMenuRecord({'appCode':_0x4a5fbc,..._0x74272b},_0x4212b7,_0x216003(0x18b)+_0x74272b['id']);}export async function batchDeleteMenuEntities(_0x40ca58,_0x18f533){const _0x3a5245=a126_0x551e;return batchDeleteMenuRecords(_0x18f533,_0x40ca58,_0x3a5245(0x191)+_0x18f533[_0x3a5245(0x17c)]+_0x3a5245(0x170)+(_0x18f533[_0x3a5245(0x17c)]===0x1?'':'s'));}export async function startMenuRegroup(_0x170f79,_0x214cfc){const _0x35a5ad=a126_0x551e;return a126_0x167d0a(_0x214cfc,_0x170f79,_0x35a5ad(0x176)+_0x214cfc[_0x35a5ad(0x187)][_0x35a5ad(0x17c)]+_0x35a5ad(0x181));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a127_0x42b82d=a127_0x486d;(function(_0x41c24c,_0x4fc403){const _0x396e2f=a127_0x486d,_0x25f4cb=_0x41c24c();while(!![]){try{const _0x1e3b20=parseInt(_0x396e2f(0x93))/0x1+parseInt(_0x396e2f(0xb4))/0x2+-parseInt(_0x396e2f(0x9d))/0x3*(-parseInt(_0x396e2f(0x8a))/0x4)+-parseInt(_0x396e2f(0x92))/0x5*(-parseInt(_0x396e2f(0xa3))/0x6)+-parseInt(_0x396e2f(0xb3))/0x7*(-parseInt(_0x396e2f(0x9c))/0x8)+parseInt(_0x396e2f(0xb6))/0x9+parseInt(_0x396e2f(0x9e))/0xa*(-parseInt(_0x396e2f(0x96))/0xb);if(_0x1e3b20===_0x4fc403)break;else _0x25f4cb['push'](_0x25f4cb['shift']());}catch(_0x1a074a){_0x25f4cb['push'](_0x25f4cb['shift']());}}}(a127_0x36f1,0xb495f));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a127_0x486d(_0x5d6fc8,_0x11b23b){_0x5d6fc8=_0x5d6fc8-0x87;const _0x36f142=a127_0x36f1();let _0x486d4e=_0x36f142[_0x5d6fc8];return _0x486d4e;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a127_0x36f1(){const _0x1debe8=['import','menu-sync','info','21EkJXZg','186824fDlwxn','get','3851766Ikhqbi','pages','jsUrl','Invalid\x20--params\x20fields:\x20','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','dryRun','160CviaNP','string','Start\x20non-interactive\x20menu\x20sync','has','label','join','push','object','50bSDEdi','671394WEoqvF','filter','cssUrl','14893087wGmKds','path','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','cwd',':\x20expected\x20a\x20non-empty\x20string.','trim','61448paZNej','79845pZZLtN','20RfjZzS','keys','Invalid\x20--params:\x20','No\x20local\x20pages\x20matched\x20paths:\x20','--params.','700254lMixUf','CSS\x20URL\x20is\x20unreachable:\x20','setLogPath','map','Menu\x20sync\x20completed','Invalid\x20--params\x20JSON.','\x0a\x20\x20Available\x20local\x20paths:\x20','Invalid\x20--params.','field','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','length','JS\x20URL\x20is\x20unreachable:\x20','parse'];a127_0x36f1=function(){return _0x1debe8;};return a127_0x36f1();}import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a127_0x42b82d(0xb8),'cssUrl']);function validateParams(_0x5875c1){const _0x54c9fc=a127_0x42b82d,_0x211355=[];return _0x5875c1['jsUrl']&&!isValidJsHttpsUrl(_0x5875c1['jsUrl'])&&_0x211355['push']({'field':_0x54c9fc(0xb8),'message':_0x54c9fc(0xac)}),_0x5875c1[_0x54c9fc(0x95)]&&!isValidCssHttpsUrl(_0x5875c1[_0x54c9fc(0x95)])&&_0x211355[_0x54c9fc(0x90)]({'field':_0x54c9fc(0x95),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x211355;}export async function runMenuSyncCore(_0x1aff0e,_0x26c97a,_0xced2ee=[],_0x3addfd,_0x337294={}){const _0x318abc=a127_0x42b82d,_0x428bc7=parseMenuSyncParams(_0x3addfd),_0x4e7c91=[...new Set(_0xced2ee[_0x318abc(0xa6)](_0x489079=>_0x489079[_0x318abc(0x9b)]())[_0x318abc(0x94)](Boolean))],_0xb3258=_0x428bc7[_0x318abc(0xb8)],_0x13c1fc=_0x428bc7['cssUrl'],_0x2a566d=[];if(_0xb3258)_0x2a566d[_0x318abc(0x90)](_0xb3258);if(_0x13c1fc)_0x2a566d[_0x318abc(0x90)](_0x13c1fc);const _0x5d9e60=validateParams(_0x428bc7);if(_0x5d9e60['length']>0x0){const _0x342b21=_0x5d9e60[_0x318abc(0xa6)](_0x199124=>_0x318abc(0xa2)+_0x199124[_0x318abc(0xab)]+':\x20'+_0x199124['message'])['join'](';\x20');throw new Error(_0x318abc(0xa0)+_0x342b21);}logger[_0x318abc(0xa5)](process[_0x318abc(0x99)]()),logger[_0x318abc(0xb2)](_0x318abc(0xb1),_0x318abc(0x8c),{'appCode':_0x1aff0e,'selectedCount':_0x4e7c91[_0x318abc(0xad)],'jsUrl':_0xb3258,'cssUrl':_0x13c1fc});if(_0xb3258){const _0x4a6155=await isUrlReachable(_0xb3258);if(!_0x4a6155)throw new Error(_0x318abc(0xae)+_0xb3258);}if(_0x13c1fc){const _0x275c55=await isUrlReachable(_0x13c1fc);if(!_0x275c55)throw new Error(_0x318abc(0xa4)+_0x13c1fc);}const _0x161bb1=getLocalPages();if(_0x161bb1[_0x318abc(0xad)]===0x0){if(_0x4e7c91[_0x318abc(0xad)]>0x0)throw new Error(_0x318abc(0xa1)+_0x4e7c91[_0x318abc(0x8f)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x337294[_0x318abc(0x89)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x2aef96=await getOnlineMenuList(_0x1aff0e,_0x26c97a),_0x502b26=new Set(_0x2aef96[_0x318abc(0xa6)](_0x46bc1f=>_0x46bc1f['path']));let _0x54a121;if(_0x4e7c91[_0x318abc(0xad)]>0x0){const _0x3c9840=new Map(_0x161bb1[_0x318abc(0xa6)](_0x575049=>[_0x575049['path'],_0x575049])),_0x2b19b5=_0x4e7c91['filter'](_0x6d4e58=>!_0x3c9840[_0x318abc(0x8d)](_0x6d4e58));if(_0x2b19b5[_0x318abc(0xad)]>0x0){const _0x565018=_0x161bb1['map'](_0x23eae5=>_0x23eae5[_0x318abc(0x97)])['join'](',\x20');throw new Error(_0x318abc(0xa1)+_0x2b19b5['join'](',\x20')+_0x318abc(0xa9)+_0x565018);}const _0x3d98a9=_0x4e7c91[_0x318abc(0x94)](_0x2efd69=>_0x502b26[_0x318abc(0x8d)](_0x2efd69));if(_0x3d98a9[_0x318abc(0xad)]>0x0)throw new Error(_0x318abc(0x98)+_0x3d98a9[_0x318abc(0x8f)](',\x20'));_0x54a121=_0x4e7c91[_0x318abc(0xa6)](_0x57b398=>_0x3c9840[_0x318abc(0xb5)](_0x57b398));}else _0x54a121=_0x161bb1[_0x318abc(0x94)](_0x3dd474=>!_0x502b26[_0x318abc(0x8d)](_0x3dd474['path']));if(_0x54a121['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x337294[_0x318abc(0x89)]===!![],'targetPages':[],'plannedMenus':[]};const _0x626fa=_0x54a121[_0x318abc(0xa6)](_0x5d9e41=>({'type':'procode','path':_0x5d9e41['path'],'label':_0x5d9e41[_0x318abc(0x8e)],'loadScriptMode':_0x318abc(0xb0),'resources':[..._0x2a566d]}));if(_0x337294[_0x318abc(0x89)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x54a121,'plannedMenus':_0x626fa};const _0x4fe1f4=await createMenus(_0x1aff0e,_0x26c97a,_0x54a121,_0x2a566d[_0x318abc(0xad)]>0x0?_0x2a566d:undefined);return logger[_0x318abc(0xb2)]('menu-sync',_0x318abc(0xa7),{'count':_0x54a121[_0x318abc(0xad)],'resources':_0x2a566d}),{'created':_0x4fe1f4[_0x318abc(0xad)],'skipped':![],'dryRun':![],'targetPages':_0x54a121,'plannedMenus':_0x626fa,'menus':_0x4fe1f4};}export function parseMenuSyncParams(_0x4fd2ed){const _0x2c9da1=a127_0x42b82d;if(!_0x4fd2ed||typeof _0x4fd2ed!==_0x2c9da1(0x8b))return{};let _0x3b4242;try{_0x3b4242=JSON[_0x2c9da1(0xaf)](_0x4fd2ed);}catch{throw new Error(_0x2c9da1(0xa8));}if(typeof _0x3b4242!==_0x2c9da1(0x91)||_0x3b4242===null||Array['isArray'](_0x3b4242))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x3e732e=_0x3b4242;if(Object['hasOwn'](_0x3e732e,_0x2c9da1(0xb7)))throw new Error(_0x2c9da1(0x88));const _0x13586d=Object[_0x2c9da1(0x9f)](_0x3e732e)['filter'](_0x59d82b=>!MENU_SYNC_PARAM_KEYS['has'](_0x59d82b));if(_0x13586d[_0x2c9da1(0xad)]>0x0)throw new Error(_0x2c9da1(0x87)+_0x13586d[_0x2c9da1(0x8f)](',\x20')+'.');for(const _0x2e6968 of MENU_SYNC_PARAM_KEYS){const _0x299676=_0x3e732e[_0x2e6968];if(_0x299676!==undefined&&(typeof _0x299676!=='string'||_0x299676[_0x2c9da1(0x9b)]()===''))throw new Error(_0x2c9da1(0xaa)+_0x2e6968+_0x2c9da1(0x9a));}return{'jsUrl':typeof _0x3e732e[_0x2c9da1(0xb8)]===_0x2c9da1(0x8b)?_0x3e732e[_0x2c9da1(0xb8)][_0x2c9da1(0x9b)]():undefined,'cssUrl':typeof _0x3e732e[_0x2c9da1(0x95)]===_0x2c9da1(0x8b)?_0x3e732e[_0x2c9da1(0x95)][_0x2c9da1(0x9b)]():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x7a5403,_0x285af2){const _0x8226c7=a129_0x2cbd,_0x3ca143=_0x7a5403();while(!![]){try{const _0x36a48c=parseInt(_0x8226c7(0xb7))/0x1+parseInt(_0x8226c7(0xcd))/0x2+-parseInt(_0x8226c7(0xc1))/0x3+-parseInt(_0x8226c7(0xb3))/0x4+parseInt(_0x8226c7(0xd7))/0x5+-parseInt(_0x8226c7(0xc6))/0x6+parseInt(_0x8226c7(0xc4))/0x7;if(_0x36a48c===_0x285af2)break;else _0x3ca143['push'](_0x3ca143['shift']());}catch(_0x1a490d){_0x3ca143['push'](_0x3ca143['shift']());}}}(a129_0x1245,0xac562));function a129_0x2cbd(_0x34d5ec,_0x5d217e){_0x34d5ec=_0x34d5ec-0xa0;const _0x1245bb=a129_0x1245();let _0x2cbd46=_0x1245bb[_0x34d5ec];return _0x2cbd46;}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(_0x4f18d4){const _0x2816f0=a129_0x2cbd,_0x60044e=[];return _0x4f18d4[_0x2816f0(0xc2)]&&!isValidJsHttpsUrl(_0x4f18d4[_0x2816f0(0xc2)])&&_0x60044e[_0x2816f0(0xc5)]({'field':_0x2816f0(0xc2),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x4f18d4[_0x2816f0(0xc3)]&&!isValidCssHttpsUrl(_0x4f18d4[_0x2816f0(0xc3)])&&_0x60044e['push']({'field':'cssUrl','message':_0x2816f0(0xbe)}),_0x60044e;}export async function runMenuUpdateCore(_0x1329ec,_0x351bef,_0x5a8ba7,_0x3d3f06={}){const _0x29c00f=a129_0x2cbd,_0x168775=parseUpdateParamsFlag(_0x5a8ba7),_0x13de15=normalizeMode(_0x3d3f06[_0x29c00f(0xb5)]);validateSelection(_0x3d3f06[_0x29c00f(0xaf)]);const _0x1257b8=[];if(_0x168775[_0x29c00f(0xc2)])_0x1257b8[_0x29c00f(0xc5)](_0x168775[_0x29c00f(0xc2)]);if(_0x168775[_0x29c00f(0xc3)])_0x1257b8[_0x29c00f(0xc5)](_0x168775['cssUrl']);const _0x54c896=validateParams(_0x168775);if(_0x54c896[_0x29c00f(0xa5)]>0x0){const _0x15b091=_0x54c896[_0x29c00f(0xb0)](_0x3ffe3e=>_0x29c00f(0xdc)+_0x3ffe3e[_0x29c00f(0xcf)]+':\x20'+_0x3ffe3e['message'])['join'](';\x20');throw new Error(_0x29c00f(0xa1)+_0x15b091);}if(_0x1257b8[_0x29c00f(0xa5)]===0x0)throw new Error(_0x29c00f(0xa7)+_0x29c00f(0xc8));logger['setLogPath'](process[_0x29c00f(0xae)]()),logger['info'](_0x29c00f(0xa9),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x1329ec,'jsUrl':_0x168775[_0x29c00f(0xc2)],'cssUrl':_0x168775['cssUrl'],'mode':_0x13de15,'dryRun':_0x3d3f06['dryRun']===!![]});if(_0x168775[_0x29c00f(0xc2)]){const _0x26301c=await isUrlReachable(_0x168775[_0x29c00f(0xc2)]);if(!_0x26301c)throw new Error(_0x29c00f(0xc7)+_0x168775[_0x29c00f(0xc2)]);}if(_0x168775[_0x29c00f(0xc3)]){const _0x5a9cba=await isUrlReachable(_0x168775['cssUrl']);if(!_0x5a9cba)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x168775[_0x29c00f(0xc3)]);}const _0x10a07c=await getOnlineMenuList(_0x1329ec,_0x351bef),_0x1d54cf=_0x10a07c[_0x29c00f(0xb4)](_0x178295=>_0x178295[_0x29c00f(0xcb)][_0x29c00f(0xa5)]>0x0),_0x5ac3ac=selectMenusForUpdate(_0x1d54cf,_0x3d3f06[_0x29c00f(0xaf)]);if(_0x5ac3ac[_0x29c00f(0xa5)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x3d3f06[_0x29c00f(0xbc)]===!![]};const _0x460280=_0x5ac3ac[_0x29c00f(0xb0)](_0x4b693a=>buildMenuUpdateDiff(_0x4b693a,_0x168775,_0x13de15,_0x3d3f06[_0x29c00f(0xb6)]===!![],_0x3d3f06[_0x29c00f(0xc9)]));if(_0x3d3f06[_0x29c00f(0xbc)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x460280};const _0x3017ba=await Promise[_0x29c00f(0xa6)](_0x5ac3ac[_0x29c00f(0xb0)]((_0x42fcc0,_0x5707c2)=>updateMenuCdnUrl(_0x1329ec,_0x351bef,{'id':_0x42fcc0['id'],'label':_0x42fcc0[_0x29c00f(0xd8)],'path':_0x42fcc0[_0x29c00f(0xb2)],'resources':_0x460280[_0x5707c2][_0x29c00f(0xd5)][_0x29c00f(0xcb)],'extend':_0x42fcc0['extend']??null,'loadScriptMode':_0x3d3f06['loadScriptMode']}))),_0x31ad3f=_0x3017ba[_0x29c00f(0xb4)](_0xc1f7f4=>_0xc1f7f4['status']===_0x29c00f(0xb1))['map'](_0x5e42d0=>_0x5e42d0['value']),_0x30e655=_0x3017ba[_0x29c00f(0xb4)](_0xe65441=>_0xe65441[_0x29c00f(0xbd)]==='rejected')['length'];return logger[_0x29c00f(0xd6)](_0x29c00f(0xa9),'Menu\x20asset\x20update\x20completed',{'count':_0x5ac3ac[_0x29c00f(0xa5)],'resources':_0x1257b8}),{'updated':_0x31ad3f[_0x29c00f(0xa5)],'failed':_0x30e655,'skipped':![],'menus':_0x31ad3f};}function validateSelection(_0xb4f31){const _0x55e703=a129_0x2cbd;if(!_0xb4f31)throw new Error(_0x55e703(0xdd));if(_0xb4f31[_0x55e703(0xce)]&&(_0xb4f31[_0x55e703(0xd2)][_0x55e703(0xa5)]>0x0||_0xb4f31[_0x55e703(0xca)][_0x55e703(0xa5)]>0x0))throw new Error(_0x55e703(0xac));if(!_0xb4f31[_0x55e703(0xce)]&&_0xb4f31[_0x55e703(0xd2)]['length']===0x0&&_0xb4f31['paths']['length']===0x0)throw new Error(_0x55e703(0xdd));}export function selectMenusForUpdate(_0x4036ef,_0x59f092){const _0x4a9992=a129_0x2cbd;validateSelection(_0x59f092);if(_0x59f092[_0x4a9992(0xce)])return _0x4036ef;const _0x3c94ac=new Set(_0x4036ef[_0x4a9992(0xb0)](_0x149124=>_0x149124['id'])),_0x39e213=new Set(_0x4036ef[_0x4a9992(0xb0)](_0x43402e=>_0x43402e[_0x4a9992(0xb2)])),_0x513e42=_0x59f092[_0x4a9992(0xd2)][_0x4a9992(0xb4)](_0x2c1dd3=>!_0x3c94ac[_0x4a9992(0xd0)](_0x2c1dd3)),_0x602b70=_0x59f092['paths']['filter'](_0x946946=>!_0x39e213[_0x4a9992(0xd0)](_0x946946));if(_0x513e42['length']>0x0||_0x602b70[_0x4a9992(0xa5)]>0x0){const _0x312d48=[..._0x513e42[_0x4a9992(0xb0)](_0x2033b1=>String(_0x2033b1)),..._0x602b70][_0x4a9992(0xba)](',\x20');throw new Error(_0x4a9992(0xc0)+_0x312d48);}const _0x41b271=new Set(_0x59f092[_0x4a9992(0xd2)]),_0xed19b6=new Set(_0x59f092[_0x4a9992(0xca)]);return _0x4036ef[_0x4a9992(0xb4)](_0x3b8f58=>_0x41b271[_0x4a9992(0xd0)](_0x3b8f58['id'])||_0xed19b6[_0x4a9992(0xd0)](_0x3b8f58[_0x4a9992(0xb2)]));}function normalizeMode(_0x24adca){const _0x51e75b=a129_0x2cbd;if(!_0x24adca)return _0x51e75b(0xbf);if(_0x24adca==='replace'||_0x24adca===_0x51e75b(0xbf))return _0x24adca;throw new Error('Invalid\x20--mode:\x20'+_0x24adca+_0x51e75b(0xda));}function buildMenuUpdateDiff(_0x373e3d,_0x5b132d,_0x1801ab,_0x5bf3e5,_0x3b0179){const _0x1986c3=a129_0x2cbd,_0x30b0af=[..._0x373e3d['resources']];_0x1801ab===_0x1986c3(0xbf)&&assertUnambiguousPatchResources(_0x373e3d,_0x30b0af,_0x5b132d);const _0x47376b=_0x1801ab==='patch'?patchResources(_0x30b0af,_0x5b132d):replaceResources(_0x5b132d),_0x2e66ce=[],_0x4b302a=_0x30b0af[_0x1986c3(0xa4)](isJsResource),_0x339ce9=_0x47376b['some'](isJsResource);if(_0x4b302a&&!_0x339ce9){const _0x1f763f=_0x1986c3(0xcc)+_0x373e3d[_0x1986c3(0xd8)]+_0x1986c3(0xb8)+_0x373e3d[_0x1986c3(0xb2)]+').\x20'+_0x1986c3(0xa8);if(!_0x5bf3e5)throw new Error(_0x1f763f);_0x2e66ce['push'](_0x1f763f);}const _0x4b9a30=_0x30b0af[_0x1986c3(0xa4)](isCssResource),_0xca2084=_0x47376b['some'](isCssResource);_0x4b9a30&&!_0xca2084&&_0x2e66ce[_0x1986c3(0xc5)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x373e3d['label']+_0x1986c3(0xb8)+_0x373e3d[_0x1986c3(0xb2)]+').');const _0x2d43a5=typeof _0x373e3d[_0x1986c3(0xdb)]?.[_0x1986c3(0xc9)]===_0x1986c3(0xd1)?_0x373e3d[_0x1986c3(0xdb)][_0x1986c3(0xc9)]:null,_0x419453=_0x3b0179?{'loadScriptMode':_0x2d43a5}:{},_0x8115ba=_0x3b0179?{'loadScriptMode':_0x3b0179}:{};return{'id':_0x373e3d['id'],'label':_0x373e3d[_0x1986c3(0xd8)],'path':_0x373e3d[_0x1986c3(0xb2)],'mode':_0x1801ab,'before':{'resources':_0x30b0af,..._0x419453},'after':{'resources':_0x47376b,..._0x8115ba},'warnings':_0x2e66ce};}function replaceResources(_0x3adbca){const _0x4fb21c=a129_0x2cbd;return[_0x3adbca[_0x4fb21c(0xc2)],_0x3adbca['cssUrl']]['filter'](_0x1f2c05=>!!_0x1f2c05);}function assertUnambiguousPatchResources(_0x3f48c3,_0x5d10a5,_0xdcb262){const _0xe57798=a129_0x2cbd,_0x550f18=_0x5d10a5[_0xe57798(0xb4)](isJsResource)[_0xe57798(0xa5)];if(_0xdcb262[_0xe57798(0xc2)]&&_0x550f18>0x1)throw new Error(_0xe57798(0xaa)+_0x550f18+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x3f48c3[_0xe57798(0xd8)]+'\x22\x20('+_0x3f48c3[_0xe57798(0xb2)]+')\x20'+_0xe57798(0xa0));const _0x427585=_0x5d10a5[_0xe57798(0xb4)](isCssResource)[_0xe57798(0xa5)];if(_0xdcb262['cssUrl']&&_0x427585>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x427585+_0xe57798(0xd9)+_0x3f48c3['label']+_0xe57798(0xb8)+_0x3f48c3[_0xe57798(0xb2)]+')\x20'+_0xe57798(0xad));}function patchResources(_0x6badb,_0x4e348a){const _0x349fa5=a129_0x2cbd;let _0x7b0db1=![],_0x2ab0b6=![];const _0x21b795=[];for(const _0x405311 of _0x6badb){if(isJsResource(_0x405311)){if(_0x4e348a[_0x349fa5(0xc2)]&&!_0x7b0db1)_0x21b795[_0x349fa5(0xc5)](_0x4e348a[_0x349fa5(0xc2)]),_0x7b0db1=!![];else!_0x4e348a['jsUrl']&&_0x21b795['push'](_0x405311);continue;}if(isCssResource(_0x405311)){if(_0x4e348a[_0x349fa5(0xc3)]&&!_0x2ab0b6)_0x21b795[_0x349fa5(0xc5)](_0x4e348a[_0x349fa5(0xc3)]),_0x2ab0b6=!![];else!_0x4e348a[_0x349fa5(0xc3)]&&_0x21b795[_0x349fa5(0xc5)](_0x405311);continue;}_0x21b795[_0x349fa5(0xc5)](_0x405311);}return _0x4e348a[_0x349fa5(0xc2)]&&!_0x7b0db1&&_0x21b795[_0x349fa5(0xde)](_0x4e348a[_0x349fa5(0xc2)]),_0x4e348a['cssUrl']&&!_0x2ab0b6&&_0x21b795[_0x349fa5(0xc5)](_0x4e348a['cssUrl']),_0x21b795;}function isJsResource(_0x3ecfcf){const _0x2ee210=a129_0x2cbd;return stripQuery(_0x3ecfcf)[_0x2ee210(0xd4)]()[_0x2ee210(0xbb)]('.js');}function isCssResource(_0x2b5580){const _0x5c056f=a129_0x2cbd;return stripQuery(_0x2b5580)[_0x5c056f(0xd4)]()[_0x5c056f(0xbb)]('.css');}function a129_0x1245(){const _0x3cdb0d=['has','string','menuIds','split','toLowerCase','after','info','953290rOrJDT','label','\x20existing\x20CSS\x20resources\x20for\x20\x22','.\x20Allowed\x20values:\x20replace,\x20patch','extend','--params.','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','unshift','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','Invalid\x20--params:\x20','trim','object','some','length','allSettled','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','menu-asset-update','menu\x20asset-update\x20cannot\x20patch\x20','isArray','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','cwd','selection','map','fulfilled','path','1190336ToPbDE','filter','mode','force','704526cwdTne','\x22\x20(','parse','join','endsWith','dryRun','status','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','patch','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','2365152NzGNLp','jsUrl','cssUrl','11236687hdVMoa','push','7405032ONmPuG','JS\x20URL\x20is\x20unreachable:\x20','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','loadScriptMode','paths','resources','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','1051210xYEQxb','all','field'];a129_0x1245=function(){return _0x3cdb0d;};return a129_0x1245();}function stripQuery(_0x496fd7){const _0x5605c8=a129_0x2cbd;return _0x496fd7[_0x5605c8(0xd3)]('?')[0x0]??_0x496fd7;}function parseUpdateParamsFlag(_0xf2a068){const _0x469379=a129_0x2cbd;if(!_0xf2a068||typeof _0xf2a068!==_0x469379(0xd1))return{};try{const _0x186e28=JSON[_0x469379(0xb9)](_0xf2a068);if(typeof _0x186e28!==_0x469379(0xa3)||_0x186e28===null||Array[_0x469379(0xab)](_0x186e28))return{};return{'jsUrl':typeof _0x186e28['jsUrl']===_0x469379(0xd1)?_0x186e28['jsUrl']['trim']():undefined,'cssUrl':typeof _0x186e28[_0x469379(0xc3)]===_0x469379(0xd1)?_0x186e28[_0x469379(0xc3)][_0x469379(0xa2)]():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x1f7f73,_0x505878){const _0x10bf08=a129_0x20c4,_0x9788cd=_0x1f7f73();while(!![]){try{const _0x2e4be4=-parseInt(_0x10bf08(0xb8))/0x1+parseInt(_0x10bf08(0xde))/0x2*(-parseInt(_0x10bf08(0xd7))/0x3)+parseInt(_0x10bf08(0xea))/0x4+-parseInt(_0x10bf08(0xc4))/0x5+-parseInt(_0x10bf08(0xff))/0x6*(parseInt(_0x10bf08(0xe1))/0x7)+-parseInt(_0x10bf08(0xc0))/0x8+-parseInt(_0x10bf08(0xbe))/0x9*(-parseInt(_0x10bf08(0xbd))/0xa);if(_0x2e4be4===_0x505878)break;else _0x9788cd['push'](_0x9788cd['shift']());}catch(_0x53ba0f){_0x9788cd['push'](_0x9788cd['shift']());}}}(a129_0x5a03,0xaff3d));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(_0x2bff56){const _0x1ba21a=a129_0x20c4,_0x32fdb7=[];return _0x2bff56['jsUrl']&&!isValidJsHttpsUrl(_0x2bff56[_0x1ba21a(0xfe)])&&_0x32fdb7['push']({'field':_0x1ba21a(0xfe),'message':_0x1ba21a(0x100)}),_0x2bff56[_0x1ba21a(0xed)]&&!isValidCssHttpsUrl(_0x2bff56[_0x1ba21a(0xed)])&&_0x32fdb7[_0x1ba21a(0xd9)]({'field':'cssUrl','message':_0x1ba21a(0xcb)}),_0x32fdb7;}export async function runMenuUpdateCore(_0x5359c7,_0x412afa,_0x533652,_0x41f39d={}){const _0x529b99=a129_0x20c4,_0x203366=parseUpdateParamsFlag(_0x533652),_0x165aca=normalizeMode(_0x41f39d[_0x529b99(0xf9)]);validateSelection(_0x41f39d[_0x529b99(0xd5)]);const _0x2dfc5a=[];if(_0x203366[_0x529b99(0xfe)])_0x2dfc5a[_0x529b99(0xd9)](_0x203366[_0x529b99(0xfe)]);if(_0x203366[_0x529b99(0xed)])_0x2dfc5a[_0x529b99(0xd9)](_0x203366['cssUrl']);const _0x4b2e55=validateParams(_0x203366);if(_0x4b2e55['length']>0x0){const _0x4c37c4=_0x4b2e55[_0x529b99(0xc9)](_0x214d6d=>_0x529b99(0xeb)+_0x214d6d[_0x529b99(0xef)]+':\x20'+_0x214d6d[_0x529b99(0xce)])[_0x529b99(0xbb)](';\x20');throw new Error(_0x529b99(0xca)+_0x4c37c4);}if(_0x2dfc5a[_0x529b99(0xc3)]===0x0)throw new Error(_0x529b99(0xe9)+_0x529b99(0x101));logger[_0x529b99(0xd0)](process[_0x529b99(0xf6)]()),logger['info'](_0x529b99(0xf5),_0x529b99(0xe8),{'appCode':_0x5359c7,'jsUrl':_0x203366[_0x529b99(0xfe)],'cssUrl':_0x203366['cssUrl'],'mode':_0x165aca,'dryRun':_0x41f39d[_0x529b99(0xfc)]===!![]});if(_0x203366['jsUrl']){const _0x1a4372=await isUrlReachable(_0x203366[_0x529b99(0xfe)]);if(!_0x1a4372)throw new Error(_0x529b99(0xe4)+_0x203366[_0x529b99(0xfe)]);}if(_0x203366[_0x529b99(0xed)]){const _0x1536ae=await isUrlReachable(_0x203366[_0x529b99(0xed)]);if(!_0x1536ae)throw new Error(_0x529b99(0xc2)+_0x203366[_0x529b99(0xed)]);}const _0x3a7e7e=await getOnlineMenuList(_0x5359c7,_0x412afa),_0x43f706=_0x3a7e7e[_0x529b99(0xf8)](_0x447aa4=>_0x447aa4[_0x529b99(0xe5)]['length']>0x0),_0x59a0fd=selectMenusForUpdate(_0x43f706,_0x41f39d['selection']);if(_0x59a0fd[_0x529b99(0xc3)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x41f39d['dryRun']===!![]};const _0xf8569=_0x59a0fd['map'](_0x42acaa=>buildMenuUpdateDiff(_0x42acaa,_0x203366,_0x165aca,_0x41f39d[_0x529b99(0xd3)]===!![],_0x41f39d[_0x529b99(0xd4)]));if(_0x41f39d[_0x529b99(0xfc)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0xf8569};const _0x29af55=await Promise['allSettled'](_0x59a0fd['map']((_0x2540b2,_0x2c2ed3)=>updateMenuCdnUrl(_0x5359c7,_0x412afa,{'id':_0x2540b2['id'],'label':_0x2540b2['label'],'path':_0x2540b2[_0x529b99(0xc7)],'resources':_0xf8569[_0x2c2ed3][_0x529b99(0xbc)][_0x529b99(0xe5)],'extend':_0x2540b2[_0x529b99(0xe6)]??null,'loadScriptMode':_0x41f39d['loadScriptMode']}))),_0x44770c=_0x29af55[_0x529b99(0xf8)](_0x7b7d2a=>_0x7b7d2a[_0x529b99(0xcf)]===_0x529b99(0xb9))[_0x529b99(0xc9)](_0x2ef8e9=>_0x2ef8e9[_0x529b99(0xe3)]),_0x1c42f2=_0x29af55['filter'](_0x8e37c7=>_0x8e37c7[_0x529b99(0xcf)]===_0x529b99(0xf4))[_0x529b99(0xc3)];return logger['info'](_0x529b99(0xf5),_0x529b99(0xfa),{'count':_0x59a0fd['length'],'resources':_0x2dfc5a}),{'updated':_0x44770c['length'],'failed':_0x1c42f2,'skipped':![],'menus':_0x44770c};}function validateSelection(_0x345b30){const _0x53c21d=a129_0x20c4;if(!_0x345b30)throw new Error(_0x53c21d(0xf0));if(_0x345b30[_0x53c21d(0xcc)]&&(_0x345b30[_0x53c21d(0xfd)][_0x53c21d(0xc3)]>0x0||_0x345b30[_0x53c21d(0xd1)]['length']>0x0))throw new Error(_0x53c21d(0xc1));if(!_0x345b30['all']&&_0x345b30[_0x53c21d(0xfd)][_0x53c21d(0xc3)]===0x0&&_0x345b30[_0x53c21d(0xd1)][_0x53c21d(0xc3)]===0x0)throw new Error(_0x53c21d(0xf0));}export function selectMenusForUpdate(_0x4d8c98,_0x54c708){const _0x295c80=a129_0x20c4;validateSelection(_0x54c708);if(_0x54c708[_0x295c80(0xcc)])return _0x4d8c98;const _0xc73bc2=new Set(_0x4d8c98['map'](_0x2bf954=>_0x2bf954['id'])),_0x30f38e=new Set(_0x4d8c98['map'](_0xd6ea28=>_0xd6ea28[_0x295c80(0xc7)])),_0x8c4132=_0x54c708[_0x295c80(0xfd)][_0x295c80(0xf8)](_0x400e7a=>!_0xc73bc2[_0x295c80(0xd6)](_0x400e7a)),_0x6ee057=_0x54c708['paths'][_0x295c80(0xf8)](_0x271847=>!_0x30f38e['has'](_0x271847));if(_0x8c4132[_0x295c80(0xc3)]>0x0||_0x6ee057['length']>0x0){const _0x1f6da1=[..._0x8c4132[_0x295c80(0xc9)](_0x4c75be=>String(_0x4c75be)),..._0x6ee057][_0x295c80(0xbb)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x1f6da1);}const _0x3269dd=new Set(_0x54c708[_0x295c80(0xfd)]),_0x1fe081=new Set(_0x54c708['paths']);return _0x4d8c98[_0x295c80(0xf8)](_0x584efb=>_0x3269dd['has'](_0x584efb['id'])||_0x1fe081[_0x295c80(0xd6)](_0x584efb[_0x295c80(0xc7)]));}function normalizeMode(_0xdf5e70){const _0x23c6ce=a129_0x20c4;if(!_0xdf5e70)return _0x23c6ce(0xba);if(_0xdf5e70===_0x23c6ce(0xbf)||_0xdf5e70===_0x23c6ce(0xba))return _0xdf5e70;throw new Error(_0x23c6ce(0xf2)+_0xdf5e70+_0x23c6ce(0xcd));}function a129_0x5a03(){const _0x175d1f=['some','value','JS\x20URL\x20is\x20unreachable:\x20','resources','extend','unshift','Start\x20non-interactive\x20menu\x20asset\x20update','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','1111476OlUrQz','--params.','string','cssUrl','trim','field','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','\x22\x20(','Invalid\x20--mode:\x20','label','rejected','menu-asset-update','cwd','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','filter','mode','Menu\x20asset\x20update\x20completed','isArray','dryRun','menuIds','jsUrl','18eFYLNR','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','286700bEGQjc','fulfilled','patch','join','after','169180XgkNvz','1872aNvFPX','replace','4819152MOazeV','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','CSS\x20URL\x20is\x20unreachable:\x20','length','4039315PYluEF','toLowerCase','\x20existing\x20CSS\x20resources\x20for\x20\x22','path','object','map','Invalid\x20--params:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','all','.\x20Allowed\x20values:\x20replace,\x20patch','message','status','setLogPath','paths',').\x20','force','loadScriptMode','selection','has','686121HKLYKE','menu\x20asset-update\x20cannot\x20patch\x20','push','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','endsWith','.css','.js','4iBdYTb','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','parse','2150729QHfvCr'];a129_0x5a03=function(){return _0x175d1f;};return a129_0x5a03();}function buildMenuUpdateDiff(_0x4d2709,_0x4d00e4,_0xccc0f7,_0xb8976b,_0x1fcf7d){const _0x29804c=a129_0x20c4,_0x1709d5=[..._0x4d2709[_0x29804c(0xe5)]];_0xccc0f7===_0x29804c(0xba)&&assertUnambiguousPatchResources(_0x4d2709,_0x1709d5,_0x4d00e4);const _0x588cae=_0xccc0f7===_0x29804c(0xba)?patchResources(_0x1709d5,_0x4d00e4):replaceResources(_0x4d00e4),_0x195cbe=[],_0x2fc4f3=_0x1709d5[_0x29804c(0xe2)](isJsResource),_0x4a68bd=_0x588cae[_0x29804c(0xe2)](isJsResource);if(_0x2fc4f3&&!_0x4a68bd){const _0x59ae88='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x4d2709[_0x29804c(0xf3)]+_0x29804c(0xf1)+_0x4d2709[_0x29804c(0xc7)]+_0x29804c(0xd2)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0xb8976b)throw new Error(_0x59ae88);_0x195cbe['push'](_0x59ae88);}const _0x1685c9=_0x1709d5[_0x29804c(0xe2)](isCssResource),_0x40c644=_0x588cae[_0x29804c(0xe2)](isCssResource);_0x1685c9&&!_0x40c644&&_0x195cbe[_0x29804c(0xd9)](_0x29804c(0xdf)+_0x4d2709['label']+_0x29804c(0xf1)+_0x4d2709[_0x29804c(0xc7)]+').');const _0x48e58d=typeof _0x4d2709['extend']?.['loadScriptMode']===_0x29804c(0xec)?_0x4d2709['extend'][_0x29804c(0xd4)]:null,_0x47b8d0=_0x1fcf7d?{'loadScriptMode':_0x48e58d}:{},_0x547959=_0x1fcf7d?{'loadScriptMode':_0x1fcf7d}:{};return{'id':_0x4d2709['id'],'label':_0x4d2709[_0x29804c(0xf3)],'path':_0x4d2709[_0x29804c(0xc7)],'mode':_0xccc0f7,'before':{'resources':_0x1709d5,..._0x47b8d0},'after':{'resources':_0x588cae,..._0x547959},'warnings':_0x195cbe};}function replaceResources(_0x2e7b33){const _0x4cfa67=a129_0x20c4;return[_0x2e7b33['jsUrl'],_0x2e7b33[_0x4cfa67(0xed)]]['filter'](_0x5e896c=>!!_0x5e896c);}function assertUnambiguousPatchResources(_0x2574ea,_0x7eb089,_0x508b06){const _0x3a49df=a129_0x20c4,_0x43bb53=_0x7eb089[_0x3a49df(0xf8)](isJsResource)[_0x3a49df(0xc3)];if(_0x508b06['jsUrl']&&_0x43bb53>0x1)throw new Error(_0x3a49df(0xd8)+_0x43bb53+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x2574ea['label']+_0x3a49df(0xf1)+_0x2574ea[_0x3a49df(0xc7)]+')\x20'+_0x3a49df(0xda));const _0x3d7b1a=_0x7eb089[_0x3a49df(0xf8)](isCssResource)[_0x3a49df(0xc3)];if(_0x508b06[_0x3a49df(0xed)]&&_0x3d7b1a>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x3d7b1a+_0x3a49df(0xc6)+_0x2574ea[_0x3a49df(0xf3)]+_0x3a49df(0xf1)+_0x2574ea[_0x3a49df(0xc7)]+')\x20'+_0x3a49df(0xf7));}function patchResources(_0x1e2718,_0x1bf472){const _0x13fde2=a129_0x20c4;let _0xbabecc=![],_0x6ecfb9=![];const _0x4a9c34=[];for(const _0x1fa3d2 of _0x1e2718){if(isJsResource(_0x1fa3d2)){if(_0x1bf472[_0x13fde2(0xfe)]&&!_0xbabecc)_0x4a9c34[_0x13fde2(0xd9)](_0x1bf472[_0x13fde2(0xfe)]),_0xbabecc=!![];else!_0x1bf472['jsUrl']&&_0x4a9c34[_0x13fde2(0xd9)](_0x1fa3d2);continue;}if(isCssResource(_0x1fa3d2)){if(_0x1bf472[_0x13fde2(0xed)]&&!_0x6ecfb9)_0x4a9c34[_0x13fde2(0xd9)](_0x1bf472[_0x13fde2(0xed)]),_0x6ecfb9=!![];else!_0x1bf472['cssUrl']&&_0x4a9c34[_0x13fde2(0xd9)](_0x1fa3d2);continue;}_0x4a9c34[_0x13fde2(0xd9)](_0x1fa3d2);}return _0x1bf472['jsUrl']&&!_0xbabecc&&_0x4a9c34[_0x13fde2(0xe7)](_0x1bf472[_0x13fde2(0xfe)]),_0x1bf472[_0x13fde2(0xed)]&&!_0x6ecfb9&&_0x4a9c34[_0x13fde2(0xd9)](_0x1bf472[_0x13fde2(0xed)]),_0x4a9c34;}function a129_0x20c4(_0x44ff4b,_0x82aea0){_0x44ff4b=_0x44ff4b-0xb8;const _0x5a032b=a129_0x5a03();let _0x20c4ec=_0x5a032b[_0x44ff4b];return _0x20c4ec;}function isJsResource(_0x2cd7bc){const _0x3f3962=a129_0x20c4;return stripQuery(_0x2cd7bc)[_0x3f3962(0xc5)]()[_0x3f3962(0xdb)](_0x3f3962(0xdd));}function isCssResource(_0x5ccff5){const _0x2ffb63=a129_0x20c4;return stripQuery(_0x5ccff5)[_0x2ffb63(0xc5)]()[_0x2ffb63(0xdb)](_0x2ffb63(0xdc));}function stripQuery(_0x5e745f){return _0x5e745f['split']('?')[0x0]??_0x5e745f;}function parseUpdateParamsFlag(_0xad0e79){const _0x424c62=a129_0x20c4;if(!_0xad0e79||typeof _0xad0e79!==_0x424c62(0xec))return{};try{const _0x37895b=JSON[_0x424c62(0xe0)](_0xad0e79);if(typeof _0x37895b!==_0x424c62(0xc8)||_0x37895b===null||Array[_0x424c62(0xfb)](_0x37895b))return{};return{'jsUrl':typeof _0x37895b['jsUrl']==='string'?_0x37895b[_0x424c62(0xfe)][_0x424c62(0xee)]():undefined,'cssUrl':typeof _0x37895b[_0x424c62(0xed)]===_0x424c62(0xec)?_0x37895b[_0x424c62(0xed)]['trim']():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a130_0x5224(){const _0x23b7b3=['trim','12994itPShA','1996974XXHypx','8942292SfauAl','843hctdpV','3910zjeiiA','7046296SKZUTp','test','11845470XgTqsp','4220kaNZhm','606406ocdOIs'];a130_0x5224=function(){return _0x23b7b3;};return a130_0x5224();}function a130_0x1500(_0x18248b,_0x4028f8){_0x18248b=_0x18248b-0x129;const _0x5224ad=a130_0x5224();let _0x1500f1=_0x5224ad[_0x18248b];return _0x1500f1;}(function(_0x3dcd3d,_0x919b2b){const _0x229e26=a130_0x1500,_0x45d84a=_0x3dcd3d();while(!![]){try{const _0x1fce25=-parseInt(_0x229e26(0x132))/0x1+-parseInt(_0x229e26(0x129))/0x2*(parseInt(_0x229e26(0x12c))/0x3)+parseInt(_0x229e26(0x131))/0x4*(parseInt(_0x229e26(0x12d))/0x5)+parseInt(_0x229e26(0x12b))/0x6+parseInt(_0x229e26(0x130))/0x7+-parseInt(_0x229e26(0x12e))/0x8+parseInt(_0x229e26(0x12a))/0x9;if(_0x1fce25===_0x919b2b)break;else _0x45d84a['push'](_0x45d84a['shift']());}catch(_0x1cc5b3){_0x45d84a['push'](_0x45d84a['shift']());}}}(a130_0x5224,0xdfc9e));export function isValidJsHttpsUrl(_0x80d6e){const _0xbd59a=a130_0x1500;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x80d6e[_0xbd59a(0x133)]());}export function isValidCssHttpsUrl(_0x5cf379){const _0x601e7=a130_0x1500;return/^https:\/\/.+\.css(\?.*)?$/[_0x601e7(0x12f)](_0x5cf379[_0x601e7(0x133)]());}export async function isUrlReachable(_0x483318){try{const _0x49ea82=await fetch(_0x483318,{'method':'HEAD'});return _0x49ea82['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a131_0x16b4(_0x14cc6a,_0x546afa){_0x14cc6a=_0x14cc6a-0x14a;const _0x56cd6f=a131_0x56cd();let _0x16b40d=_0x56cd6f[_0x14cc6a];return _0x16b40d;}const a131_0x946bbd=a131_0x16b4;(function(_0x44c4da,_0x28d493){const _0x462d14=a131_0x16b4,_0x16868b=_0x44c4da();while(!![]){try{const _0x2b63cd=-parseInt(_0x462d14(0x16b))/0x1+parseInt(_0x462d14(0x189))/0x2*(parseInt(_0x462d14(0x18b))/0x3)+parseInt(_0x462d14(0x14b))/0x4*(parseInt(_0x462d14(0x157))/0x5)+parseInt(_0x462d14(0x158))/0x6*(-parseInt(_0x462d14(0x15d))/0x7)+-parseInt(_0x462d14(0x15e))/0x8+-parseInt(_0x462d14(0x155))/0x9*(parseInt(_0x462d14(0x16d))/0xa)+-parseInt(_0x462d14(0x14e))/0xb*(-parseInt(_0x462d14(0x183))/0xc);if(_0x2b63cd===_0x28d493)break;else _0x16868b['push'](_0x16868b['shift']());}catch(_0x4742c3){_0x16868b['push'](_0x16868b['shift']());}}}(a131_0x56cd,0x808fb));import a131_0x160f6e 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';function a131_0x56cd(){const _0x1df684=['\x20\x20Cancelled.','failed','created','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','string','238276YvvJrl','\x20menu(s)\x20created','127850LlKXBE','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','✓\x20Menu\x20sync\x20completed:\x20','params','Menu\x20sync\x20skipped','gray','yes','cssUrl','cyan','onlineMenuList','trim','localPages','Pre-fill\x20JS/CSS\x20URLs.\x20','\x20created.','rawFlags','split','filter','Online\x20menu\x20list\x20fetched','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20menu(s)\x20with\x20JS:\x20','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','7116gvCJox','\x20\x20Continue\x20with\x20creation?','targetPages','str','write','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','516658QcRRsv','jsUrl','6YtMWaG','Menu\x20creation\x20failed','boolean','cookie','POST','appCode','\x20local\x20microfrontend\x20menu(s).','skipped','\x20menu(s)','26020UpMKcz','yellow','onlinePaths','15389OBKtnf','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Menu\x20sync\x20completed:\x20','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','selectedAppName','\x20and\x20CSS:\x20','length','207SGTaEG','appcode','345WVMfWJ','14766KMokDp','Would\x20create\x20','Fetching\x20online\x20menu\x20list...','/smartapi/menu/create','validation','448upkGam','4629504ZhYJhr','message','paths','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20\x20✓\x20Selected:\x20','\x20\x20Create\x20','\x20page(s)'];a131_0x56cd=function(){return _0x1df684;};return a131_0x56cd();}import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':'sync','description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a131_0x946bbd(0x187),'flags':[{'name':'params','type':a131_0x946bbd(0x16a),'description':a131_0x946bbd(0x179)+a131_0x946bbd(0x17f)},{'name':'paths','type':a131_0x946bbd(0x16a),'description':a131_0x946bbd(0x181)},{'name':'yes','type':a131_0x946bbd(0x18d),'description':a131_0x946bbd(0x182)}],async 'dryRun'(_0x3764cb){const _0x4e4045=a131_0x946bbd;ensureRunnableContext(_0x3764cb[_0x4e4045(0x17b)],_0x3764cb[_0x4e4045(0x152)]);const _0x237626=await runMenuSyncCore(_0x3764cb[_0x4e4045(0x190)],_0x3764cb['cookie'],parsePaths(_0x3764cb[_0x4e4045(0x186)](_0x4e4045(0x160))),_0x3764cb[_0x4e4045(0x186)]('params'),{'dryRun':!![]});return{'method':_0x4e4045(0x18f),'url':_0x4e4045(0x15b),'body':_0x237626,'description':_0x237626[_0x4e4045(0x192)]?_0x4e4045(0x16e):_0x4e4045(0x159)+_0x237626[_0x4e4045(0x185)]['length']+_0x4e4045(0x191)};},async 'execute'(_0x9a61b8){const _0x14eb11=a131_0x946bbd;ensureRunnableContext(_0x9a61b8[_0x14eb11(0x17b)],_0x9a61b8[_0x14eb11(0x152)]);const _0x699462=_0x9a61b8['flag'](_0x14eb11(0x173)),_0x200c99=_0x9a61b8['str'](_0x14eb11(0x170)),_0x41146b=parsePaths(_0x9a61b8[_0x14eb11(0x186)](_0x14eb11(0x160))),_0xdf666=parseMenuSyncParams(_0x200c99);if(_0x699462){const _0x351384=await runMenuSyncCore(_0x9a61b8[_0x14eb11(0x190)],_0x9a61b8[_0x14eb11(0x18e)],_0x41146b,_0x200c99);if(_0x351384[_0x14eb11(0x192)]){const _0x442609=getLocalPages();_0x442609['length']===0x0?writeCliSideChannelLine(_0x14eb11(0x188)):writeCliSideChannelLine(_0x14eb11(0x14f));}else writeCliSideChannelLine(_0x14eb11(0x16f)+_0x351384[_0x14eb11(0x167)]+_0x14eb11(0x16c));return{'ok':!![],'data':_0x351384,'message':_0x351384['skipped']?_0x14eb11(0x171):_0x14eb11(0x150)+_0x351384[_0x14eb11(0x167)]+_0x14eb11(0x17a)};}if(_0x41146b[_0x14eb11(0x154)]>0x0)throw CliErrors[_0x14eb11(0x15c)](_0x14eb11(0x169),_0x14eb11(0x161));if(!isInteractive()&&_0x200c99)throw CliErrors[_0x14eb11(0x15c)](_0x14eb11(0x168),_0x14eb11(0x161));requireInteractive();const _0x58f4e0=startSpinner(_0x14eb11(0x15a));let _0x7a6a1b,_0x1a7203,_0xd2384d;try{const _0x2df237=await fetchMenuData(_0x9a61b8[_0x14eb11(0x190)],_0x9a61b8['cookie']);_0x7a6a1b=_0x2df237[_0x14eb11(0x178)],_0x1a7203=_0x2df237[_0x14eb11(0x14d)],_0xd2384d=_0x2df237[_0x14eb11(0x176)],stopSpinner(_0x58f4e0,_0x14eb11(0x17e),!![]);}catch(_0x36cb06){stopSpinner(_0x58f4e0,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x14eb11(0x15c)](_0x36cb06 instanceof Error?_0x36cb06[_0x14eb11(0x15f)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x7a6a1b[_0x14eb11(0x154)]===0x0)return writeCliSideChannelLine(a131_0x160f6e[_0x14eb11(0x14c)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x57b761=buildCompareRows(_0x7a6a1b,_0x1a7203);writeCliSideChannelLine(renderCompareTable(_0x57b761)),writeCliSideChannelLine('');const _0x2956d1=await selectPages(_0x7a6a1b,_0x1a7203);writeCliSideChannelLine(''),writeCliSideChannelLine(a131_0x160f6e[_0x14eb11(0x175)](_0x14eb11(0x162)+_0x2956d1[_0x14eb11(0x154)]+_0x14eb11(0x164)));const _0x1cfe05=_0xdf666[_0x14eb11(0x18a)]&&_0xdf666[_0x14eb11(0x174)];if(!_0x1cfe05){writeCliSideChannelLine(renderSyncSummary(_0x2956d1,_0x1a7203['size']>0x0));const _0x5c87e8=await askConfirm(_0x14eb11(0x184));if(!_0x5c87e8)return writeCliSideChannelLine(a131_0x160f6e[_0x14eb11(0x172)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x816f53=_0xdf666['jsUrl'],_0x4060c1=_0xdf666[_0x14eb11(0x174)];!_0x816f53&&(_0x816f53=await askJsUrl());!_0x4060c1&&(_0x4060c1=await askCssUrl());const _0x3b2b3c=await askConfirm(_0x14eb11(0x163)+_0x2956d1[_0x14eb11(0x154)]+_0x14eb11(0x180)+_0x816f53+_0x14eb11(0x153)+_0x4060c1+'?');if(!_0x3b2b3c)return writeCliSideChannelLine(a131_0x160f6e[_0x14eb11(0x172)](_0x14eb11(0x165))),{'ok':!![]};const _0x3907c7=[_0x816f53,_0x4060c1],_0x101a4c=startSpinner('Creating\x20'+_0x2956d1[_0x14eb11(0x154)]+'\x20menu(s)...');try{const _0x5e5449=await doCreateMenus(_0x9a61b8[_0x14eb11(0x190)],_0x9a61b8[_0x14eb11(0x18e)],_0x2956d1,_0x3907c7);return stopSpinner(_0x101a4c,'Created\x20'+_0x5e5449[_0x14eb11(0x167)]+_0x14eb11(0x14a),!![]),{'ok':!![],'data':_0x5e5449,'message':_0x14eb11(0x150)+_0x5e5449[_0x14eb11(0x167)]+'\x20created,\x20'+_0x5e5449[_0x14eb11(0x166)]+'\x20failed.'};}catch(_0xf97425){stopSpinner(_0x101a4c,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x14eb11(0x15c)](_0xf97425 instanceof Error?_0xf97425[_0x14eb11(0x15f)]:_0x14eb11(0x18c));}}};function ensureRunnableContext(_0x243332,_0x5936cd){const _0x1ced37=a131_0x946bbd,_0x59bdbd=_0x243332[_0x1ced37(0x156)]?String(_0x243332['appcode'])[_0x1ced37(0x177)]():'';if(!isInProject()&&!_0x5936cd&&!_0x59bdbd)throw CliErrors[_0x1ced37(0x15c)](_0x1ced37(0x151)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x2f167d){const _0x4b7fa8=a131_0x946bbd;return[...new Set(_0x2f167d[_0x4b7fa8(0x17c)](',')['map'](_0x10d8da=>_0x10d8da[_0x4b7fa8(0x177)]())[_0x4b7fa8(0x17d)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a132_0x41f8bc=a132_0x1360;(function(_0x485846,_0x4f9359){const _0x4ede64=a132_0x1360,_0x36e78f=_0x485846();while(!![]){try{const _0x1a1401=-parseInt(_0x4ede64(0x122))/0x1*(-parseInt(_0x4ede64(0x12e))/0x2)+-parseInt(_0x4ede64(0x127))/0x3+parseInt(_0x4ede64(0x120))/0x4*(parseInt(_0x4ede64(0x135))/0x5)+parseInt(_0x4ede64(0x134))/0x6+parseInt(_0x4ede64(0x121))/0x7+parseInt(_0x4ede64(0x132))/0x8+parseInt(_0x4ede64(0x11e))/0x9*(-parseInt(_0x4ede64(0x12c))/0xa);if(_0x1a1401===_0x4f9359)break;else _0x36e78f['push'](_0x36e78f['shift']());}catch(_0x4efad6){_0x36e78f['push'](_0x36e78f['shift']());}}}(a132_0x1977,0xcd7cc));function a132_0x1360(_0x5a2577,_0x4dd51b){_0x5a2577=_0x5a2577-0x11a;const _0x197789=a132_0x1977();let _0x1360ea=_0x197789[_0x5a2577];return _0x1360ea;}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_0x41f8bc(0x131),a132_0x41f8bc(0x12f),'DINGTALK',a132_0x41f8bc(0x133),a132_0x41f8bc(0x124)];export const notificationConfigList={'service':'notification','command':a132_0x41f8bc(0x128),'description':a132_0x41f8bc(0x11c),'risk':a132_0x41f8bc(0x13f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a132_0x41f8bc(0x13d),'description':a132_0x41f8bc(0x137),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a132_0x41f8bc(0x131)}],async 'validate'(_0x261681){readChannelType(_0x261681);},async 'execute'(_0x655d9d){const _0x2530ad=a132_0x41f8bc,_0x14af0d=readChannelType(_0x655d9d),_0x1fb92d=await listNotificationChannelConfigs(_0x655d9d['appCode'],_0x14af0d),_0x6d0d27=_0x1fb92d[_0x2530ad(0x13b)](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x655d9d[_0x2530ad(0x13a)],'channelType':_0x14af0d,'count':_0x6d0d27[_0x2530ad(0x11a)],'configs':_0x6d0d27},'message':'Found\x20'+_0x6d0d27['length']+'\x20'+_0x14af0d+_0x2530ad(0x12b)};}};function readChannelType(_0x19d818){const _0x28bbc6=a132_0x41f8bc,_0x5b669a=_0x19d818['str'](_0x28bbc6(0x140))[_0x28bbc6(0x13e)]()||_0x28bbc6(0x131);if(!NOTIFICATION_CHANNEL_TYPES[_0x28bbc6(0x11b)](_0x5b669a))throw CliErrors['validation'](_0x28bbc6(0x138)+_0x5b669a,_0x28bbc6(0x130)+NOTIFICATION_CHANNEL_TYPES[_0x28bbc6(0x12a)](',\x20')+'.');return _0x5b669a;}function projectNotificationConfig(_0x7a19e,_0x322ec7){const _0x4c358d=a132_0x41f8bc;return{'id':typeof _0x7a19e['id']===_0x4c358d(0x139)?_0x7a19e['id']:null,'configCode':requireConfigString(_0x7a19e,_0x4c358d(0x136),_0x322ec7),'configName':requireConfigString(_0x7a19e,_0x4c358d(0x11d),_0x322ec7),'channelType':requireConfigString(_0x7a19e,_0x4c358d(0x129),_0x322ec7),'description':normalizeNullableString(_0x7a19e[_0x4c358d(0x123)]),'createTime':normalizeNullableString(_0x7a19e[_0x4c358d(0x12d)]),'updateTime':normalizeNullableString(_0x7a19e[_0x4c358d(0x13c)])};}function a132_0x1977(){const _0x2ef7f4=['Allowed\x20values:\x20','EMAIL','11538872LLsvtc','WECOM','1088232QrOFUD','480fjIHMq','configCode','Notification\x20channel\x20type','Invalid\x20--type:\x20','number','appCode','map','updateTime','string','trim','read','type','length','includes','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','configName','15240303yDpPSj','Invalid\x20notification\x20config\x20response.','66892wdQQzP','4202310uupzxg','115CetpMa','description','WEBHOOK','apiError','Item\x20','624432xrlexT','config-list','channelType','join','\x20notification\x20config(s)','20dWsEmI','createTime','10558vmzimF','FEISHU'];a132_0x1977=function(){return _0x2ef7f4;};return a132_0x1977();}function requireConfigString(_0x488718,_0x66d497,_0x53f0af){const _0xc88452=a132_0x41f8bc,_0x665904=_0x488718[_0x66d497];if(typeof _0x665904!==_0xc88452(0x13d)||_0x665904[_0xc88452(0x13e)]()==='')throw CliErrors[_0xc88452(0x125)](_0xc88452(0x11f),_0xc88452(0x126)+(_0x53f0af+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x66d497+'\x22.');return _0x665904[_0xc88452(0x13e)]();}function normalizeNullableString(_0x379514){const _0x14d53e=a132_0x41f8bc;return typeof _0x379514===_0x14d53e(0x13d)?_0x379514:null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x560f6d,_0x26f6c6){const _0x49468f=a133_0x569e,_0x513450=_0x560f6d();while(!![]){try{const _0x31d3f9=parseInt(_0x49468f(0x11c))/0x1*(-parseInt(_0x49468f(0x119))/0x2)+-parseInt(_0x49468f(0x118))/0x3*(-parseInt(_0x49468f(0x11f))/0x4)+-parseInt(_0x49468f(0x11e))/0x5+parseInt(_0x49468f(0x121))/0x6+parseInt(_0x49468f(0x11a))/0x7*(-parseInt(_0x49468f(0x11d))/0x8)+-parseInt(_0x49468f(0x11b))/0x9+parseInt(_0x49468f(0x120))/0xa;if(_0x31d3f9===_0x26f6c6)break;else _0x513450['push'](_0x513450['shift']());}catch(_0x184e3b){_0x513450['push'](_0x513450['shift']());}}}(a133_0x2a67,0x6afd7));function a133_0x569e(_0x2c407d,_0x59fa2a){_0x2c407d=_0x2c407d-0x118;const _0x2a6792=a133_0x2a67();let _0x569eaa=_0x2a6792[_0x2c407d];return _0x569eaa;}function a133_0x2a67(){const _0x3fae84=['9mKxWcY','754gONYxs','397915tSurNv','7140663ijjyHT','467NQQbXc','120pRBGYG','1826610qKHXfw','193792uBQPtk','23085260HxbvkQ','1030944cqUNGM'];a133_0x2a67=function(){return _0x3fae84;};return a133_0x2a67();}import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a134_0x21f53f=a134_0x167e;(function(_0x1ad04f,_0x4ed422){const _0x5dd353=a134_0x167e,_0x3cb3cd=_0x1ad04f();while(!![]){try{const _0xb7b7af=-parseInt(_0x5dd353(0x152))/0x1*(parseInt(_0x5dd353(0x167))/0x2)+parseInt(_0x5dd353(0x15b))/0x3*(parseInt(_0x5dd353(0x142))/0x4)+parseInt(_0x5dd353(0x14c))/0x5+parseInt(_0x5dd353(0x156))/0x6+parseInt(_0x5dd353(0x158))/0x7*(parseInt(_0x5dd353(0x168))/0x8)+-parseInt(_0x5dd353(0x15c))/0x9*(parseInt(_0x5dd353(0x164))/0xa)+-parseInt(_0x5dd353(0x16a))/0xb;if(_0xb7b7af===_0x4ed422)break;else _0x3cb3cd['push'](_0x3cb3cd['shift']());}catch(_0x3a42a3){_0x3cb3cd['push'](_0x3cb3cd['shift']());}}}(a134_0x184d,0x532a8));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a134_0x21f53f(0x166),a134_0x21f53f(0x13e),'form','idCard'],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a134_0x21f53f(0x14f),'form':a134_0x21f53f(0x13d),'idCard':a134_0x21f53f(0x155)},SCENE_FLAG={'name':a134_0x21f53f(0x163),'type':a134_0x21f53f(0x145),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a134_0x21f53f(0x147)},IMAGE_FILE_FLAG={'name':'image-file','type':a134_0x21f53f(0x145),'description':a134_0x21f53f(0x159)},IMAGE_URL_FLAG={'name':a134_0x21f53f(0x149),'type':a134_0x21f53f(0x145),'description':a134_0x21f53f(0x146)};function normalizeScene(_0x281073){const _0x2dbb9e=a134_0x21f53f,_0x3c40f6=_0x281073[_0x2dbb9e(0x150)]()[_0x2dbb9e(0x13a)]();if(_0x3c40f6==='idcard')return _0x2dbb9e(0x140);if(_0x3c40f6===_0x2dbb9e(0x166)||_0x3c40f6===_0x2dbb9e(0x13e)||_0x3c40f6==='form')return _0x3c40f6;throw CliErrors[_0x2dbb9e(0x16c)](_0x2dbb9e(0x13c)+_0x281073+_0x2dbb9e(0x157)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x53a6e1){const _0x28786e=a134_0x21f53f,_0x45d326=_0x53a6e1[_0x28786e(0x144)](_0x28786e(0x16e))['trim'](),_0x3142d7=_0x53a6e1[_0x28786e(0x144)]('image-url')[_0x28786e(0x150)]();return{'imageFile':_0x45d326,'imageUrl':_0x3142d7,'count':[_0x45d326,_0x3142d7]['filter'](Boolean)[_0x28786e(0x154)]};}function validateInputSelection(_0x57e373){const _0x11f59e=a134_0x21f53f,_0x4b9ad8=selectedInputs(_0x57e373);if(_0x4b9ad8[_0x11f59e(0x14a)]!==0x1)throw CliErrors[_0x11f59e(0x16c)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x4b9ad8;}function a134_0x167e(_0x233ce4,_0x8fb2b7){_0x233ce4=_0x233ce4-0x139;const _0x184d9e=a134_0x184d();let _0x167edf=_0x184d9e[_0x233ce4];return _0x167edf;}function withScene(_0x548980,_0x2655f0,_0x5b1abb){const _0x2c70b1=a134_0x21f53f;return{..._0x548980,'scene':_0x2655f0,..._0x5b1abb?{'sourceFile':{'fileName':_0x5b1abb['fileName'],'filePath':_0x5b1abb[_0x2c70b1(0x14b)]}}:{}};}const ocrRecognize={'service':a134_0x21f53f(0x15f),'command':a134_0x21f53f(0x153),'description':a134_0x21f53f(0x139),'risk':a134_0x21f53f(0x169),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3b822f){const _0x437c7e=a134_0x21f53f,_0x4ce4b4=normalizeScene(_0x3b822f[_0x437c7e(0x144)](_0x437c7e(0x163))),_0x4eef25=SCENE_TO_LEGACY_TYPE[_0x4ce4b4],_0x3ff1f0=validateInputSelection(_0x3b822f);if(_0x3ff1f0[_0x437c7e(0x148)]){const _0x55821a=new URLSearchParams({'url':_0x3ff1f0[_0x437c7e(0x148)],'type':_0x4eef25,'appCode':_0x3b822f[_0x437c7e(0x14d)]});return{'method':_0x437c7e(0x16d),'url':'/smartapi/ocr/recognize-text?'+_0x55821a[_0x437c7e(0x161)](),'description':'Preview:\x20recognize\x20'+_0x4ce4b4+_0x437c7e(0x16b)};}const _0x2a9b0f=requireDevelopmentUploadFile(_0x3ff1f0[_0x437c7e(0x13b)],_0x437c7e(0x16e));return{'method':_0x437c7e(0x141),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x437c7e(0x141),'url':_0x437c7e(0x151),'body':{'appCode':_0x3b822f[_0x437c7e(0x14d)],'multipart':{'file':_0x2a9b0f}}},{'method':_0x437c7e(0x141),'url':_0x437c7e(0x165),'body':{'filePath':_0x437c7e(0x15d),'downloadFlag':![]}},{'method':'GET','url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x3b822f['appCode'],'url':_0x437c7e(0x143),'type':_0x4eef25}}]},'description':_0x437c7e(0x15e)+_0x4ce4b4+_0x437c7e(0x162)};},async 'execute'(_0x10f80f){const _0x5e0ad2=a134_0x21f53f,_0x10cff9=normalizeScene(_0x10f80f[_0x5e0ad2(0x144)](_0x5e0ad2(0x163))),_0x714faf=SCENE_TO_LEGACY_TYPE[_0x10cff9],_0x58a3b7=validateInputSelection(_0x10f80f);if(_0x58a3b7['imageUrl']){const _0x394ec6=await recognizeDevelopmentOcr(_0x10f80f['appCode'],{'url':_0x58a3b7[_0x5e0ad2(0x148)],'type':_0x714faf});return{'ok':!![],'data':withScene(_0x394ec6,_0x10cff9)};}const _0x56d3d6=requireDevelopmentUploadFile(_0x58a3b7['imageFile'],_0x5e0ad2(0x16e)),_0x2f53b5=await uploadDevelopmentFile(_0x10f80f[_0x5e0ad2(0x14d)],_0x56d3d6[_0x5e0ad2(0x13f)]);if(!_0x2f53b5[_0x5e0ad2(0x14b)])throw CliErrors[_0x5e0ad2(0x14e)]('File\x20upload\x20response\x20missing\x20filePath.');const _0xd8e7ee=await queryDevelopmentFileUrl(_0x2f53b5['filePath'],{'download':![]});if(!_0xd8e7ee[_0x5e0ad2(0x160)])throw CliErrors[_0x5e0ad2(0x14e)](_0x5e0ad2(0x15a));const _0x3019bb=await recognizeDevelopmentOcr(_0x10f80f[_0x5e0ad2(0x14d)],{'url':_0xd8e7ee['fileUrl'],'type':_0x714faf});return{'ok':!![],'data':withScene(_0x3019bb,_0x10cff9,_0x2f53b5)};}};function a134_0x184d(){const _0x2c6bdb=['toLowerCase','imageFile','Unsupported\x20OCR\x20scene:\x20','Table','general','path','idCard','POST','84kHvNjg','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','str','string','Publicly\x20accessible\x20image\x20or\x20file\x20URL','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','imageUrl','image-url','count','filePath','1610455aVrBJT','appCode','apiError','General','trim','/smartapi/common/uploadFile','121609rTujxE','recognize','length','IdCard','801282TuWEMz','.\x20Supported\x20scenes:\x20','981127lPSave','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','File\x20URL\x20response\x20missing\x20fileUrl.','30045pRXqSQ','9IFuKxS','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','ocr','fileUrl','toString','\x20OCR','scene','2343910zUjxuP','/smartapi/common/queryFileUrl','invoice','8cZjpYt','24gUYSpV','read','274571uhLlNp','\x20OCR\x20from\x20URL','validation','GET','image-file','使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字'];a134_0x184d=function(){return _0x2c6bdb;};return a134_0x184d();}export const ocrDefinitions=[ocrRecognize];
|