@lovrabet/rabetbase-cli 2.3.13-beta.3 → 2.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -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/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/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/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -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/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -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/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.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/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/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a93_0x10fe(){const _0x2366b6=['slice','red','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','gray','11512kJjXpc','repeat','✓\x20Valid\x20JSON','\x20\x20Merged\x20Config','37815eyzPpG','yellow','Global','format','platform','raw','4574255wCfddR','message','Project','defaultApp','\x20doctor','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20explicitAppName:\x20','\x20\x20Apps','\x20(default)','(none)','verbose','4214470TnEiQv','2493kJuLzJ','accessKey','status','missing','1062874ahTZHq','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','explicitAppName','36562840fWDUsQ','env','(default)','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','empty','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','unknown','green','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','keys','doctor','locale','\x20\x20─','source','apps','1181780LPiCZj','riskLevel','\x20\x20API\x20Endpoints','padEnd','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','pageSize','(missing)','appCode','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','268SFoarQ','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20←\x20current','✗\x20Invalid\x20JSON','apiDir','cookie','length','log','read','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','6aJmUZi','✗\x20Not\x20logged\x20in','version','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','(default:\x20','bold','✗\x20Expired','(not\x20found)','value','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a93_0x10fe=function(){return _0x2366b6;};return a93_0x10fe();}const a93_0x16114e=a93_0xea4f;(function(_0x1594c9,_0x30a9a7){const _0x142ed9=a93_0xea4f,_0xcca15a=_0x1594c9();while(!![]){try{const _0x4a27c3=-parseInt(_0x142ed9(0x10c))/0x1+-parseInt(_0x142ed9(0x11f))/0x2+parseInt(_0x142ed9(0x14a))/0x3*(-parseInt(_0x142ed9(0x12a))/0x4)+-parseInt(_0x142ed9(0x107))/0x5+-parseInt(_0x142ed9(0x138))/0x6*(-parseInt(_0x142ed9(0x150))/0x7)+parseInt(_0x142ed9(0x146))/0x8*(-parseInt(_0x142ed9(0x108))/0x9)+parseInt(_0x142ed9(0x10f))/0xa;if(_0x4a27c3===_0x30a9a7)break;else _0xcca15a['push'](_0xcca15a['shift']());}catch(_0x56100f){_0xcca15a['push'](_0xcca15a['shift']());}}}(a93_0x10fe,0x8b261));function a93_0xea4f(_0x17c9b6,_0x1fea33){_0x17c9b6=_0x17c9b6-0x102;const _0x10fe35=a93_0x10fe();let _0xea4f33=_0x10fe35[_0x17c9b6];return _0xea4f33;}import a93_0x3842be from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x20c2dc){const _0x508329=a93_0xea4f,_0xb6acd=GIT_COMMIT!==_0x508329(0x116)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x508329(0x142)](0x0,0xa)+')':VERSION,_0x421792=buildConfigFromFlags({}),_0x5c348c=getCookie();console['log'](),console['log'](a93_0x3842be[_0x508329(0x13d)](CLI_BIN_NAME+_0x508329(0x154))),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x145)]('─'['repeat'](0x32))),console['log'](_0x508329(0x136)+_0xb6acd),console[_0x508329(0x133)](_0x508329(0x155)+process[_0x508329(0x13a)]),console[_0x508329(0x133)](_0x508329(0x12b)+process[_0x508329(0x14e)]+'\x20'+process['arch']),console[_0x508329(0x133)](),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x13d)]('\x20\x20Config\x20Files')),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x145)](_0x508329(0x11c)[_0x508329(0x147)](0x1e)));const _0x214178=getGlobalConfigPath(),_0x4bb57d=getProjectConfigPath();console['log'](_0x508329(0x115)+(_0x214178||a93_0x3842be[_0x508329(0x145)]('(not\x20found)'))),console[_0x508329(0x133)](_0x508329(0x129)+(_0x4bb57d||a93_0x3842be[_0x508329(0x145)](_0x508329(0x13f)))),console[_0x508329(0x133)](),console['log'](a93_0x3842be[_0x508329(0x13d)](_0x508329(0x156))),console['log'](a93_0x3842be[_0x508329(0x145)](_0x508329(0x11c)[_0x508329(0x147)](0x1e)));const _0x9b995e=(_0x2e389f,_0x345780)=>{const _0x1b500d=_0x508329;if(!_0x345780){console['log']('\x20\x20'+_0x2e389f[_0x1b500d(0x122)](0x11)+'\x20'+a93_0x3842be[_0x1b500d(0x145)]('(no\x20file)'));return;}const _0x29f11b=inspectCliConfigJsonFile(_0x345780);if(_0x29f11b[_0x1b500d(0x10a)]==='ok')console[_0x1b500d(0x133)]('\x20\x20'+_0x2e389f[_0x1b500d(0x122)](0x11)+'\x20'+a93_0x3842be[_0x1b500d(0x117)](_0x1b500d(0x148)));else{if(_0x29f11b[_0x1b500d(0x10a)]===_0x1b500d(0x114))console[_0x1b500d(0x133)]('\x20\x20'+_0x2e389f['padEnd'](0x11)+'\x20'+a93_0x3842be[_0x1b500d(0x14b)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x29f11b[_0x1b500d(0x10a)]===_0x1b500d(0x10b)?console[_0x1b500d(0x133)]('\x20\x20'+_0x2e389f['padEnd'](0x11)+'\x20'+a93_0x3842be['gray'](_0x1b500d(0x126))):(console[_0x1b500d(0x133)]('\x20\x20'+_0x2e389f[_0x1b500d(0x122)](0x11)+'\x20'+a93_0x3842be[_0x1b500d(0x143)](_0x1b500d(0x12f))),console[_0x1b500d(0x133)]('\x20\x20'+''[_0x1b500d(0x122)](0x11)+'\x20'+a93_0x3842be[_0x1b500d(0x143)](_0x29f11b[_0x1b500d(0x151)])));}};_0x9b995e(_0x508329(0x14c),_0x214178),_0x9b995e(_0x508329(0x152),_0x4bb57d),console['log'](),console['log'](a93_0x3842be[_0x508329(0x13d)](_0x508329(0x149))),console[_0x508329(0x133)](a93_0x3842be['gray'](_0x508329(0x11c)[_0x508329(0x147)](0x1e))),console[_0x508329(0x133)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x421792[_0x508329(0x127)]||a93_0x3842be['red']('(not\x20set)'))),console[_0x508329(0x133)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x421792[_0x508329(0x110)]),console[_0x508329(0x133)](_0x508329(0x141)+_0x421792[_0x508329(0x11b)]),console['log']('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x421792[_0x508329(0x130)]),console[_0x508329(0x133)](_0x508329(0x113)+(_0x421792['defaultApp']||a93_0x3842be[_0x508329(0x145)](_0x508329(0x105)))),console[_0x508329(0x133)](_0x508329(0x124)+(_0x421792['currentApp']||a93_0x3842be[_0x508329(0x145)]('(none)'))),console[_0x508329(0x133)](_0x508329(0x102)+(_0x421792[_0x508329(0x10e)]||a93_0x3842be[_0x508329(0x145)](_0x508329(0x105)))),console[_0x508329(0x133)](_0x508329(0x10d)+(_0x421792[_0x508329(0x14d)]||a93_0x3842be['gray'](_0x508329(0x13c)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x508329(0x133)](_0x508329(0x157)+(_0x421792[_0x508329(0x125)]??a93_0x3842be['gray'](_0x508329(0x111)))),console[_0x508329(0x133)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x421792[_0x508329(0x120)]),console[_0x508329(0x133)](_0x508329(0x112)+_0x421792[_0x508329(0x106)]),console[_0x508329(0x133)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x421792[_0x508329(0x131)]?a93_0x3842be[_0x508329(0x117)]('(set,\x20length='+_0x421792[_0x508329(0x131)][_0x508329(0x132)]+')'):_0x5c348c?a93_0x3842be['green']('(set\x20via\x20file,\x20length='+_0x5c348c[_0x508329(0x132)]+')'):a93_0x3842be['gray']('(none)')));const _0x34151a=Object[_0x508329(0x119)](_0x421792[_0x508329(0x11e)]);if(_0x34151a[_0x508329(0x132)]>0x0){console[_0x508329(0x133)](),console[_0x508329(0x133)](a93_0x3842be['bold'](_0x508329(0x103))),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x145)](_0x508329(0x11c)[_0x508329(0x147)](0x1e)));for(const _0xb21f36 of _0x34151a){const _0x199a43=_0x421792[_0x508329(0x11e)][_0xb21f36],_0x193d3e=_0xb21f36===_0x421792[_0x508329(0x153)],_0x38843d=_0xb21f36===_0x421792['currentApp'],_0x596111=_0x38843d?a93_0x3842be[_0x508329(0x117)](_0x508329(0x12e)):'',_0x215b75=_0x193d3e?_0x508329(0x104):'';console['log']('\x20\x20'+_0xb21f36+_0x215b75+_0x596111),console[_0x508329(0x133)](_0x508329(0x13b)+_0x199a43['appcode']);const _0x304540=buildAppDoctorFields(_0x199a43,{'env':_0x421792[_0x508329(0x110)],'apiDir':_0x421792[_0x508329(0x14f)][_0x508329(0x130)]||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x421792[_0x508329(0x131)]||_0x5c348c||undefined,'accessKey':_0x421792['accessKey']});console[_0x508329(0x133)](_0x508329(0x135)+_0x304540[_0x508329(0x110)]['value']+'\x20\x20'+a93_0x3842be[_0x508329(0x145)]('('+_0x304540[_0x508329(0x110)][_0x508329(0x11d)]+')')),console[_0x508329(0x133)](_0x508329(0x12d)+_0x304540['apiDir'][_0x508329(0x140)]+'\x20\x20'+a93_0x3842be[_0x508329(0x145)]('('+_0x304540[_0x508329(0x130)][_0x508329(0x11d)]+')'));const _0x500cfc=_0x304540[_0x508329(0x131)][_0x508329(0x140)]?a93_0x3842be[_0x508329(0x117)](_0x508329(0x12c)+_0x304540[_0x508329(0x131)][_0x508329(0x140)]['length']+')'):a93_0x3842be['gray']('(none)');console[_0x508329(0x133)](_0x508329(0x118)+_0x500cfc+'\x20\x20'+a93_0x3842be[_0x508329(0x145)]('('+_0x304540[_0x508329(0x131)][_0x508329(0x11d)]+')'));const _0x548e5f=_0x304540['accessKey']['value']?a93_0x3842be[_0x508329(0x117)](_0x508329(0x12c)+_0x304540[_0x508329(0x109)][_0x508329(0x140)][_0x508329(0x132)]+')'):a93_0x3842be[_0x508329(0x145)]('(none)');console[_0x508329(0x133)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x548e5f+'\x20\x20'+a93_0x3842be['gray']('('+_0x304540[_0x508329(0x109)][_0x508329(0x11d)]+')'));}}console[_0x508329(0x133)](),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x13d)](_0x508329(0x121))),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x145)](_0x508329(0x11c)[_0x508329(0x147)](0x1e))),console['log'](_0x508329(0x144)+getApiDomain()),console[_0x508329(0x133)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x508329(0x133)](_0x508329(0x123)+getRuntimeDomain()),console[_0x508329(0x133)](),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x13d)]('\x20\x20Auth')),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x145)](_0x508329(0x11c)[_0x508329(0x147)](0x1e)));if(_0x5c348c){const _0x12d0e1=await getIsSessionValid();console[_0x508329(0x133)](_0x508329(0x137)+(_0x12d0e1?a93_0x3842be[_0x508329(0x117)]('✓\x20Valid'):a93_0x3842be[_0x508329(0x143)](_0x508329(0x13e))));}else console[_0x508329(0x133)](_0x508329(0x137)+a93_0x3842be[_0x508329(0x143)](_0x508329(0x139)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a93_0x16114e(0x11a),'command':'check','description':a93_0x16114e(0x128),'risk':a93_0x16114e(0x134),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a93_0x5ac26c=a93_0x1977;function a93_0x2da4(){const _0x57a08e=['\x20\x20API\x20Endpoints','Project','slice','format','value','\x20\x20─','57610hUUsxF','keys','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','\x20\x20Auth','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','2awDxIV','(set\x20via\x20file,\x20length=','status','cookie','188391UiSuLu','\x20(default)','empty','log','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','79344KPaUZr','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','Global','pageSize','6993736FEKWXd','missing','2477556PKXyLd','(none)','arch','gray','(not\x20set)','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','(not\x20found)','apiDir','appcode','270VDqDJW','length','unknown','\x20\x20\x20\x20accessKey:\x20\x20','32366510BmXTOS','(set,\x20length=','env','padEnd','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','accessKey','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','(missing)','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','riskLevel','locale','\x20\x20Apps','✓\x20Valid\x20JSON','yellow','repeat','264nPbBJP','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','1406316aPVIJI','red','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','green','read','(no\x20file)','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','source','explicitAppName','1719yzKEzU','\x20doctor','bold','appCode','raw','✗\x20Expired','currentApp'];a93_0x2da4=function(){return _0x57a08e;};return a93_0x2da4();}(function(_0x12cfed,_0xc94be1){const _0x30b57e=a93_0x1977,_0x28ee49=_0x12cfed();while(!![]){try{const _0x3470a6=-parseInt(_0x30b57e(0xa9))/0x1*(-parseInt(_0x30b57e(0xc7))/0x2)+parseInt(_0x30b57e(0xd8))/0x3+-parseInt(_0x30b57e(0xd2))/0x4*(parseInt(_0x30b57e(0xe1))/0x5)+parseInt(_0x30b57e(0xa1))/0x6*(-parseInt(_0x30b57e(0xcb))/0x7)+-parseInt(_0x30b57e(0xd6))/0x8+parseInt(_0x30b57e(0xb2))/0x9*(-parseInt(_0x30b57e(0xbf))/0xa)+parseInt(_0x30b57e(0x90))/0xb;if(_0x3470a6===_0xc94be1)break;else _0x28ee49['push'](_0x28ee49['shift']());}catch(_0x55f8d9){_0x28ee49['push'](_0x28ee49['shift']());}}}(a93_0x2da4,0xe6a36));function a93_0x1977(_0xde1a9c,_0x4e219c){_0xde1a9c=_0xde1a9c-0x8f;const _0x2da41c=a93_0x2da4();let _0x1977c3=_0x2da41c[_0xde1a9c];return _0x1977c3;}import a93_0x25a758 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x5c63c5){const _0x277749=a93_0x1977,_0x556401=GIT_COMMIT!==_0x277749(0xe3)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x277749(0xbb)](0x0,0xa)+')':VERSION,_0x19ccfa=buildConfigFromFlags({}),_0x310423=getCookie();console[_0x277749(0xce)](),console['log'](a93_0x25a758[_0x277749(0xb4)](CLI_BIN_NAME+_0x277749(0xb3))),console[_0x277749(0xce)](a93_0x25a758[_0x277749(0xdb)]('─'[_0x277749(0xa0)](0x32))),console[_0x277749(0xce)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x556401),console[_0x277749(0xce)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console[_0x277749(0xce)](_0x277749(0xab)+process['platform']+'\x20'+process[_0x277749(0xda)]),console['log'](),console[_0x277749(0xce)](a93_0x25a758[_0x277749(0xb4)](_0x277749(0xa8))),console[_0x277749(0xce)](a93_0x25a758[_0x277749(0xdb)](_0x277749(0xbe)[_0x277749(0xa0)](0x1e)));const _0xea3389=getGlobalConfigPath(),_0x2259a4=getProjectConfigPath();console[_0x277749(0xce)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xea3389||a93_0x25a758[_0x277749(0xdb)](_0x277749(0xde)))),console[_0x277749(0xce)](_0x277749(0x94)+(_0x2259a4||a93_0x25a758[_0x277749(0xdb)](_0x277749(0xde)))),console['log'](),console[_0x277749(0xce)](a93_0x25a758[_0x277749(0xb4)]('\x20\x20Config\x20JSON')),console[_0x277749(0xce)](a93_0x25a758['gray']('\x20\x20─'[_0x277749(0xa0)](0x1e)));const _0x13a37e=(_0x27d96c,_0x558d0c)=>{const _0x4535ae=_0x277749;if(!_0x558d0c){console['log']('\x20\x20'+_0x27d96c['padEnd'](0x11)+'\x20'+a93_0x25a758[_0x4535ae(0xdb)](_0x4535ae(0xae)));return;}const _0x25aa8d=inspectCliConfigJsonFile(_0x558d0c);if(_0x25aa8d['status']==='ok')console[_0x4535ae(0xce)]('\x20\x20'+_0x27d96c[_0x4535ae(0x93)](0x11)+'\x20'+a93_0x25a758['green'](_0x4535ae(0x9e)));else{if(_0x25aa8d[_0x4535ae(0xc9)]===_0x4535ae(0xcd))console[_0x4535ae(0xce)]('\x20\x20'+_0x27d96c[_0x4535ae(0x93)](0x11)+'\x20'+a93_0x25a758[_0x4535ae(0x9f)](_0x4535ae(0xd0)));else _0x25aa8d['status']===_0x4535ae(0xd7)?console[_0x4535ae(0xce)]('\x20\x20'+_0x27d96c[_0x4535ae(0x93)](0x11)+'\x20'+a93_0x25a758[_0x4535ae(0xdb)](_0x4535ae(0x98))):(console['log']('\x20\x20'+_0x27d96c[_0x4535ae(0x93)](0x11)+'\x20'+a93_0x25a758[_0x4535ae(0xaa)]('✗\x20Invalid\x20JSON')),console['log']('\x20\x20'+''[_0x4535ae(0x93)](0x11)+'\x20'+a93_0x25a758[_0x4535ae(0xaa)](_0x25aa8d['message'])));}};_0x13a37e(_0x277749(0xd4),_0xea3389),_0x13a37e(_0x277749(0xba),_0x2259a4),console[_0x277749(0xce)](),console['log'](a93_0x25a758[_0x277749(0xb4)](_0x277749(0xc6))),console[_0x277749(0xce)](a93_0x25a758[_0x277749(0xdb)](_0x277749(0xbe)[_0x277749(0xa0)](0x1e))),console[_0x277749(0xce)](_0x277749(0xc1)+(_0x19ccfa[_0x277749(0xb5)]||a93_0x25a758[_0x277749(0xaa)](_0x277749(0xdc)))),console[_0x277749(0xce)](_0x277749(0xa6)+_0x19ccfa[_0x277749(0x92)]),console[_0x277749(0xce)](_0x277749(0x99)+_0x19ccfa[_0x277749(0x9c)]),console[_0x277749(0xce)](_0x277749(0xcf)+_0x19ccfa[_0x277749(0xdf)]),console[_0x277749(0xce)](_0x277749(0xd3)+(_0x19ccfa[_0x277749(0x9a)]||a93_0x25a758[_0x277749(0xdb)]('(none)'))),console[_0x277749(0xce)](_0x277749(0xd1)+(_0x19ccfa['currentApp']||a93_0x25a758[_0x277749(0xdb)](_0x277749(0xd9)))),console[_0x277749(0xce)]('\x20\x20explicitAppName:\x20'+(_0x19ccfa[_0x277749(0xb1)]||a93_0x25a758[_0x277749(0xdb)]('(none)'))),console[_0x277749(0xce)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x19ccfa['format']||a93_0x25a758[_0x277749(0xdb)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x277749(0xbc)]+')'))),console[_0x277749(0xce)](_0x277749(0xa3)+(_0x19ccfa[_0x277749(0xd5)]??a93_0x25a758['gray']('(default)'))),console['log'](_0x277749(0xa5)+_0x19ccfa[_0x277749(0x9b)]),console[_0x277749(0xce)](_0x277749(0xc2)+_0x19ccfa['verbose']),console[_0x277749(0xce)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x19ccfa[_0x277749(0xca)]?a93_0x25a758[_0x277749(0xac)](_0x277749(0x91)+_0x19ccfa[_0x277749(0xca)][_0x277749(0xe2)]+')'):_0x310423?a93_0x25a758[_0x277749(0xac)](_0x277749(0xc8)+_0x310423[_0x277749(0xe2)]+')'):a93_0x25a758[_0x277749(0xdb)](_0x277749(0xd9))));const _0x3334a8=Object[_0x277749(0xc0)](_0x19ccfa['apps']);if(_0x3334a8[_0x277749(0xe2)]>0x0){console[_0x277749(0xce)](),console[_0x277749(0xce)](a93_0x25a758[_0x277749(0xb4)](_0x277749(0x9d))),console[_0x277749(0xce)](a93_0x25a758['gray']('\x20\x20─'['repeat'](0x1e)));for(const _0x2b15de of _0x3334a8){const _0x32baf6=_0x19ccfa['apps'][_0x2b15de],_0x10e39c=_0x2b15de===_0x19ccfa['defaultApp'],_0x22712b=_0x2b15de===_0x19ccfa[_0x277749(0xb8)],_0x223b7d=_0x22712b?a93_0x25a758['green']('\x20←\x20current'):'',_0xcfe123=_0x10e39c?_0x277749(0xcc):'';console[_0x277749(0xce)]('\x20\x20'+_0x2b15de+_0xcfe123+_0x223b7d),console[_0x277749(0xce)](_0x277749(0x97)+_0x32baf6[_0x277749(0xe0)]);const _0x2f6d92=buildAppDoctorFields(_0x32baf6,{'env':_0x19ccfa['env'],'apiDir':_0x19ccfa[_0x277749(0xb6)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x277749(0xdf)],'cookie':_0x19ccfa[_0x277749(0xca)]||_0x310423||undefined,'accessKey':_0x19ccfa[_0x277749(0x96)]});console['log']('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2f6d92[_0x277749(0x92)]['value']+'\x20\x20'+a93_0x25a758[_0x277749(0xdb)]('('+_0x2f6d92['env'][_0x277749(0xb0)]+')')),console[_0x277749(0xce)]('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x2f6d92[_0x277749(0xdf)]['value']+'\x20\x20'+a93_0x25a758[_0x277749(0xdb)]('('+_0x2f6d92[_0x277749(0xdf)][_0x277749(0xb0)]+')'));const _0x5c5460=_0x2f6d92['cookie'][_0x277749(0xbd)]?a93_0x25a758['green'](_0x277749(0x91)+_0x2f6d92[_0x277749(0xca)][_0x277749(0xbd)]['length']+')'):a93_0x25a758[_0x277749(0xdb)](_0x277749(0xd9));console['log'](_0x277749(0xa2)+_0x5c5460+'\x20\x20'+a93_0x25a758['gray']('('+_0x2f6d92['cookie'][_0x277749(0xb0)]+')'));const _0x324fa9=_0x2f6d92[_0x277749(0x96)][_0x277749(0xbd)]?a93_0x25a758[_0x277749(0xac)](_0x277749(0x91)+_0x2f6d92[_0x277749(0x96)][_0x277749(0xbd)]['length']+')'):a93_0x25a758[_0x277749(0xdb)](_0x277749(0xd9));console[_0x277749(0xce)](_0x277749(0x8f)+_0x324fa9+'\x20\x20'+a93_0x25a758[_0x277749(0xdb)]('('+_0x2f6d92['accessKey'][_0x277749(0xb0)]+')'));}}console[_0x277749(0xce)](),console[_0x277749(0xce)](a93_0x25a758[_0x277749(0xb4)](_0x277749(0xb9))),console['log'](a93_0x25a758['gray'](_0x277749(0xbe)[_0x277749(0xa0)](0x1e))),console[_0x277749(0xce)](_0x277749(0xaf)+getApiDomain()),console[_0x277749(0xce)](_0x277749(0xa7)+getUserDomain()),console[_0x277749(0xce)](_0x277749(0x95)+getRuntimeDomain()),console[_0x277749(0xce)](),console[_0x277749(0xce)](a93_0x25a758[_0x277749(0xb4)](_0x277749(0xc4))),console[_0x277749(0xce)](a93_0x25a758[_0x277749(0xdb)](_0x277749(0xbe)[_0x277749(0xa0)](0x1e)));if(_0x310423){const _0x47acf4=await getIsSessionValid();console['log'](_0x277749(0xc5)+(_0x47acf4?a93_0x25a758['green'](_0x277749(0xa4)):a93_0x25a758[_0x277749(0xaa)](_0x277749(0xb7))));}else console[_0x277749(0xce)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a93_0x25a758[_0x277749(0xaa)](_0x277749(0xc3)));return console[_0x277749(0xce)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':'check','description':a93_0x5ac26c(0xdd),'risk':a93_0x5ac26c(0xad),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x3321d6=a94_0x2c75;(function(_0x833693,_0x3cffbf){const _0x324002=a94_0x2c75,_0x247210=_0x833693();while(!![]){try{const _0x5e3257=parseInt(_0x324002(0x20e))/0x1*(-parseInt(_0x324002(0x1fc))/0x2)+parseInt(_0x324002(0x218))/0x3*(-parseInt(_0x324002(0x216))/0x4)+parseInt(_0x324002(0x1f7))/0x5+-parseInt(_0x324002(0x204))/0x6+parseInt(_0x324002(0x212))/0x7*(parseInt(_0x324002(0x209))/0x8)+parseInt(_0x324002(0x1f3))/0x9*(-parseInt(_0x324002(0x1f5))/0xa)+-parseInt(_0x324002(0x213))/0xb*(-parseInt(_0x324002(0x20a))/0xc);if(_0x5e3257===_0x3cffbf)break;else _0x247210['push'](_0x247210['shift']());}catch(_0x1761e2){_0x247210['push'](_0x247210['shift']());}}}(a94_0x3c7e,0xbaf76));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';function a94_0x2c75(_0x2da82c,_0x4f7240){_0x2da82c=_0x2da82c-0x1f0;const _0x3c7eec=a94_0x3c7e();let _0x2c75cc=_0x3c7eec[_0x2da82c];return _0x2c75cc;}import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':'file','type':'string','required':!![],'description':a94_0x3321d6(0x20c)},FILEPATH_FLAG={'name':'filepath','type':a94_0x3321d6(0x211),'required':!![],'description':a94_0x3321d6(0x208)},DOWNLOAD_FLAG={'name':a94_0x3321d6(0x20d),'type':'boolean','description':a94_0x3321d6(0x1fb)},LONG_TERM_FLAG={'name':a94_0x3321d6(0x217),'type':a94_0x3321d6(0x215),'description':a94_0x3321d6(0x201)};function requireFilePath(_0x306fd8){const _0x24e3f=a94_0x3321d6,_0x5af6fb=_0x306fd8['trim']();if(!_0x5af6fb)throw CliErrors[_0x24e3f(0x206)](_0x24e3f(0x1f6));return _0x5af6fb;}function a94_0x3c7e(){const _0x1521ae=['Path\x20to\x20the\x20local\x20file\x20to\x20upload','download','2sCGYfe','bool','file','string','156961NBQygO','122364LdfAlX','read','boolean','4CkaOUG','long-term','3020847BoefLF','/smartapi/common/uploadFile','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','filePath','\x20to\x20development\x20app\x20','968427aQnQbf','File','90bxgpyq','filePath\x20is\x20required.','6867850RVBgps','filepath','query-url','write','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','1308298tMDVFV','path','POST','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','appCode','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','str','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','3445290UQranU','Uploaded\x20file:\x20','validation','Preview:\x20upload\x20','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','88ehoHmd','3240evJYYD','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'];a94_0x3c7e=function(){return _0x1521ae;};return a94_0x3c7e();}const fileUpload={'service':a94_0x3321d6(0x210),'command':'upload','description':a94_0x3321d6(0x1ff),'risk':a94_0x3321d6(0x1fa),'flags':[FILE_FLAG],async 'dryRun'(_0x27993b){const _0x499d24=a94_0x3321d6,_0x442906=requireDevelopmentUploadFile(_0x27993b[_0x499d24(0x202)](_0x499d24(0x210)),_0x499d24(0x1f4));return{'method':_0x499d24(0x1fe),'url':_0x499d24(0x219),'body':{'appCode':_0x27993b[_0x499d24(0x200)],'multipart':{'file':_0x442906}},'description':_0x499d24(0x207)+_0x442906[_0x499d24(0x1fd)]+_0x499d24(0x1f2)+_0x27993b['appCode']};},async 'execute'(_0x141071){const _0x166434=a94_0x3321d6,_0x53e493=requireDevelopmentUploadFile(_0x141071['str'](_0x166434(0x210)),_0x166434(0x1f4)),_0x14abae=await uploadDevelopmentFile(_0x141071[_0x166434(0x200)],_0x53e493[_0x166434(0x1fd)]);return{'ok':!![],'data':_0x14abae,'message':_0x14abae[_0x166434(0x1f1)]?_0x166434(0x205)+_0x14abae[_0x166434(0x1f1)]+_0x166434(0x1f0):_0x166434(0x20b)};}},fileQueryUrl={'service':'file','command':a94_0x3321d6(0x1f9),'description':a94_0x3321d6(0x203),'risk':a94_0x3321d6(0x214),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x1041b4){const _0x58a6ba=a94_0x3321d6,_0x3fcdb5=requireFilePath(_0x1041b4[_0x58a6ba(0x202)](_0x58a6ba(0x1f8))),_0x4d9c8d=await queryDevelopmentFileUrl(_0x3fcdb5,{'download':_0x1041b4[_0x58a6ba(0x20f)]('download'),'longTerm':_0x1041b4['bool']('long-term')});return{'ok':!![],'data':_0x4d9c8d};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x38a785=a95_0x4dfb;(function(_0xb805db,_0x400abc){const _0x18ffc2=a95_0x4dfb,_0x34fb97=_0xb805db();while(!![]){try{const _0x1e62cd=-parseInt(_0x18ffc2(0x125))/0x1+-parseInt(_0x18ffc2(0x131))/0x2+-parseInt(_0x18ffc2(0x124))/0x3*(parseInt(_0x18ffc2(0x12e))/0x4)+-parseInt(_0x18ffc2(0x134))/0x5+parseInt(_0x18ffc2(0x136))/0x6*(-parseInt(_0x18ffc2(0x11a))/0x7)+-parseInt(_0x18ffc2(0x130))/0x8*(parseInt(_0x18ffc2(0x117))/0x9)+parseInt(_0x18ffc2(0x12f))/0xa;if(_0x1e62cd===_0x400abc)break;else _0x34fb97['push'](_0x34fb97['shift']());}catch(_0x1b931a){_0x34fb97['push'](_0x34fb97['shift']());}}}(a95_0x489a,0x4cb4e));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';function a95_0x4dfb(_0x4db24d,_0x1cbdbf){_0x4db24d=_0x4db24d-0x10e;const _0x489abe=a95_0x489a();let _0x4dfbba=_0x489abe[_0x4db24d];return _0x4dfbba;}import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a95_0x489a(){const _0x1feb94=['init','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','App\x20code\x20to\x20initialize\x20with','\x20config','map','flagMissing','some','global','665967xFxUDT','221023ldkzlS','log','validation','env','Use\x20`','valid','yes','write','bool','8crKtzw','22493440iFLDGn','4232nuyVzQ','595668eafpPM','str','toLocaleString','2344555vAHldL','检测到旧配置文件,正在自动升级...\x0a','6VAoIbB','boolean','cwd','custom','\x0a✓\x20Successfully\x20initialized\x20','appcode','../../commands/project/init.js','string','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','defaultApp','\x20\x20Env:\x20','Target\x20environment','appCode','7407UAGOKZ','\x20\x20Config:\x20','\x20\x20Apps:\x20','476287IqmrhP','project'];a95_0x489a=function(){return _0x1feb94;};return a95_0x489a();}function syntheticApp(_0x574f5d){return{'appCode':_0x574f5d,'appName':_0x574f5d};}function writeInitConfig(_0x352300,_0xf307bc,_0x3550b5){const _0x38b56c=a95_0x4dfb,_0x458ee0=resolveWriteConfigPath(_0x352300),_0x42bfb3=buildCanonicalProjectConfig({},{'appCodes':_0xf307bc['map'](_0x213046=>_0x213046['appCode']),'env':_0x3550b5,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x38b56c(0x133)]()}});writeConfigFile(_0x458ee0,_0x42bfb3);const _0x578f3f=_0x352300==='global'?_0x38b56c(0x123):'project';console[_0x38b56c(0x126)](_0x38b56c(0x10e)+_0x578f3f+_0x38b56c(0x11f)),console['log'](_0x38b56c(0x119)+_0xf307bc[_0x38b56c(0x120)](_0x1fa206=>_0x1fa206[_0x38b56c(0x116)])['join'](',\x20')),console[_0x38b56c(0x126)]('\x20\x20Default:\x20'+_0x42bfb3[_0x38b56c(0x113)]),console['log'](_0x38b56c(0x114)+_0x42bfb3['env']),console[_0x38b56c(0x126)](_0x38b56c(0x118)+_0x458ee0);}async function runSmartInit(_0x5ab575){const _0x336af9=a95_0x4dfb,_0x234d81=process[_0x336af9(0x138)](),_0x2375ec=_0x5ab575[_0x336af9(0x12d)](_0x336af9(0x123))?_0x336af9(0x123):_0x336af9(0x11b),_0xee01f4=_0x5ab575['str'](_0x336af9(0x128))||'production',_0x5e28d5=_0x5ab575[_0x336af9(0x132)](_0x336af9(0x10f))||undefined,_0x333143=_0x5ab575[_0x336af9(0x12d)](_0x336af9(0x11b));if(_0x333143){const {initConfig:_0xda5f8d}=await import(_0x336af9(0x110));return _0xda5f8d({'appcode':_0x5e28d5,'env':_0xee01f4,'autoYes':_0x5ab575['bool'](_0x336af9(0x12b))});}if(_0x2375ec==='project'){const _0x1963ec=existsSync(resolve(_0x234d81,NEW_CONFIG_NAME)),_0xa594da=LEGACY_CONFIG_NAMES[_0x336af9(0x122)](_0x5ec2bb=>existsSync(resolve(_0x234d81,_0x5ec2bb)));if(_0xa594da&&!_0x1963ec)return console[_0x336af9(0x126)](_0x336af9(0x135)),upgradeApp(_0x5ab575['nonInteractive'],{'yes':_0x5ab575['bool'](_0x336af9(0x12b))});if(_0x1963ec)throw CliErrors['validation'](_0x336af9(0x11d),_0x336af9(0x129)+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x5e28d5){const _0x4710e4=validateAppcode(_0x5e28d5);if(!_0x4710e4[_0x336af9(0x12a)])throw CliErrors[_0x336af9(0x127)](_0x4710e4['message']);writeInitConfig(_0x2375ec,[syntheticApp(_0x5e28d5)],_0xee01f4);return;}if(_0x5ab575['nonInteractive'])throw CliErrors[_0x336af9(0x121)](_0x336af9(0x10f),'Usage:\x20'+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]');const _0x3d92d1=getCookie(),_0x205d54=await selectMultipleApps(_0x3d92d1),_0x6e26a7=_0x205d54===_0x336af9(0x139)?[syntheticApp(await promptCustomAppcode())]:_0x205d54;writeInitConfig(_0x2375ec,_0x6e26a7,_0xee01f4);}const initFlags=[{'name':a95_0x38a785(0x123),'type':a95_0x38a785(0x137),'description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':a95_0x38a785(0x128),'type':a95_0x38a785(0x111),'description':a95_0x38a785(0x115),'default':'production','enum':[...RABETBASE_ENV_VALUES]},{'name':a95_0x38a785(0x10f),'type':a95_0x38a785(0x111),'description':a95_0x38a785(0x11e)},{'name':a95_0x38a785(0x11b),'type':a95_0x38a785(0x137),'description':'Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','default':![]},{'name':a95_0x38a785(0x12b),'type':'boolean','description':'Auto-confirm\x20prompts','default':![]}];export const initDefinitions=[{'service':a95_0x38a785(0x11c),'command':'run','description':a95_0x38a785(0x112),'risk':a95_0x38a785(0x12c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x37b664){return await runSmartInit(_0x37b664),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a96_0x4f95(){const _0x24bc43=['1935SKibgC','7mLogSZ','8MSIZxt','20627343OiVwro','4648528wNkUCd','6ceJjIV','1429424bDxTpn','5101122RJLAXI','22820vFUhIR','2621235pRtiyA','1290306WTMiYR'];a96_0x4f95=function(){return _0x24bc43;};return a96_0x4f95();}(function(_0x6edb08,_0x18dc5a){const _0x52afb3=a96_0x1944,_0x39f1a4=_0x6edb08();while(!![]){try{const _0xc876c4=-parseInt(_0x52afb3(0x1a8))/0x1+parseInt(_0x52afb3(0x1af))/0x2*(-parseInt(_0x52afb3(0x1ae))/0x3)+parseInt(_0x52afb3(0x1ab))/0x4*(parseInt(_0x52afb3(0x1b2))/0x5)+parseInt(_0x52afb3(0x1b0))/0x6+-parseInt(_0x52afb3(0x1aa))/0x7*(parseInt(_0x52afb3(0x1ad))/0x8)+parseInt(_0x52afb3(0x1a9))/0x9*(parseInt(_0x52afb3(0x1b1))/0xa)+parseInt(_0x52afb3(0x1ac))/0xb;if(_0xc876c4===_0x18dc5a)break;else _0x39f1a4['push'](_0x39f1a4['shift']());}catch(_0x470b6e){_0x39f1a4['push'](_0x39f1a4['shift']());}}}(a96_0x4f95,0xeb490));function a96_0x1944(_0xe6efdb,_0x3758cc){_0xe6efdb=_0xe6efdb-0x1a8;const _0x4f95e1=a96_0x4f95();let _0x19443f=_0x4f95e1[_0xe6efdb];return _0x19443f;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x592a74=a97_0x418f;(function(_0x47268a,_0x2764d8){const _0x493889=a97_0x418f,_0x3dfcfd=_0x47268a();while(!![]){try{const _0x1238e2=parseInt(_0x493889(0x13d))/0x1*(-parseInt(_0x493889(0x137))/0x2)+parseInt(_0x493889(0x142))/0x3+parseInt(_0x493889(0x149))/0x4+parseInt(_0x493889(0x141))/0x5+parseInt(_0x493889(0x12f))/0x6*(-parseInt(_0x493889(0x143))/0x7)+-parseInt(_0x493889(0x136))/0x8+parseInt(_0x493889(0x12c))/0x9;if(_0x1238e2===_0x2764d8)break;else _0x3dfcfd['push'](_0x3dfcfd['shift']());}catch(_0x194f0c){_0x3dfcfd['push'](_0x3dfcfd['shift']());}}}(a97_0x4620,0x367a9));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a97_0x592a74(0x133);function a97_0x4620(){const _0x5bc2cf=['join','\x20\x20\x20\x20--title\x20\x22','1414912jNdsDO','872VzEBMZ','\x20bug?\x20Help\x20us\x20fix\x20it:','trim','auth_required','flag_missing','slice','359AgtIoF','message','stderr','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','629140vRumCe','1012593TqcdZw','609ljCslm','report','\x20\x20Set\x20','service','not_in_project','\x22\x20\x5c','1483420BqTDTP','replace','=1\x20to\x20silence\x20this\x20hint.','write','code','unknown_command','issue','1119114uokWwc','Hit\x20a\x20','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','27726XCIfwH','config_missing','command','network_error','RABETBASE_DISABLE_ISSUE_NUDGE'];a97_0x4620=function(){return _0x5bc2cf;};return a97_0x4620();}const NUDGE_SUPPRESSED_CODES=new Set(['cancelled',a97_0x592a74(0x13a),a97_0x592a74(0x130),a97_0x592a74(0x147),a97_0x592a74(0x12a),a97_0x592a74(0x13b),'validation_error',a97_0x592a74(0x132)]),defaultWriter=_0x165147=>{const _0x512b5e=a97_0x592a74;process[_0x512b5e(0x13f)][_0x512b5e(0x128)](_0x165147);};export function shouldNudgeForError(_0x311ef6,_0x596f46){const _0x9bebdf=a97_0x592a74;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x596f46['service']===_0x9bebdf(0x12b)&&_0x596f46[_0x9bebdf(0x131)]===_0x9bebdf(0x144))return![];if(_0x311ef6 instanceof CliError)return!NUDGE_SUPPRESSED_CODES['has'](_0x311ef6[_0x9bebdf(0x129)]);return!![];}export function printIssueReportNudgeForError(_0xe85214,_0x1b3e3a,_0x373d3d=defaultWriter){if(!shouldNudgeForError(_0xe85214,_0x1b3e3a))return;const _0x503148=buildSuggestedTitle(_0xe85214,_0x1b3e3a);_0x373d3d(formatNudge(_0x503148));}function buildSuggestedTitle(_0x57e757,_0xdeb5be){const _0x47e398=a97_0x592a74,_0x5c2141=_0x57e757 instanceof Error?_0x57e757[_0x47e398(0x13e)]:String(_0x57e757),_0x3670ed=_0x5c2141[_0x47e398(0x14a)](/[\r\n]+/g,'\x20')[_0x47e398(0x14a)](/\s+/g,'\x20')[_0x47e398(0x139)]()[_0x47e398(0x13c)](0x0,0x78)[_0x47e398(0x14a)](/"/g,'\x5c\x22'),_0x3ea7a5=CLI_BIN_NAME+'\x20'+_0xdeb5be[_0x47e398(0x146)]+'\x20'+_0xdeb5be['command'];return _0x3670ed['length']>0x0?_0x3ea7a5+':\x20'+_0x3670ed:_0x3ea7a5;}function a97_0x418f(_0x322bb1,_0x568b1e){_0x322bb1=_0x322bb1-0x127;const _0x462036=a97_0x4620();let _0x418fb7=_0x462036[_0x322bb1];return _0x418fb7;}function formatNudge(_0x4de67c){const _0x15083b=a97_0x592a74;return['',_0x15083b(0x12d)+CLI_BIN_NAME+_0x15083b(0x138),'\x20\x20'+CLI_BIN_NAME+'\x20issue\x20report\x20\x5c',_0x15083b(0x135)+_0x4de67c+_0x15083b(0x148),_0x15083b(0x12e),_0x15083b(0x140),_0x15083b(0x145)+NUDGE_OPT_OUT_ENV+_0x15083b(0x127),''][_0x15083b(0x134)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x3a0177=a98_0x1e5e;function a98_0xde7c(){const _0x4a7534=['cwd','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','\x20bytes','validation','descriptionFile:\x20','issue.description_redaction_kinds','issue','Issue\x20description\x20cannot\x20be\x20empty.','POST','2483586fUKiJd','issue.description_redactions','redactionCount','6106870DaDkcv','redactions:\x20','\x20secret(s):\x20','string','str','8313711jAFnoA','compress','write','descriptionFilePath','originalBytes','issue.description_original_bytes','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','Platform\x20issue\x20reported','apiError','description','join','6150396FaYbtN','issue.description','9rztBJy','534533aoPjFM','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','3572360tOOpma','truncated\x20from\x20','title','redactionKinds','issue.description_truncated','descriptionSource','inline','truncated','filter','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','report','length','utf8','sanitize','trim','issue.title','descriptionSource:\x20','flagMissing','2mGkiGs','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','redacted\x20','otel://','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','File\x20not\x20found:\x20','3899792kYgOgM','Platform\x20issue\x20reported\x20(','push'];a98_0xde7c=function(){return _0x4a7534;};return a98_0xde7c();}(function(_0x3a04af,_0x46dc3b){const _0x5e14e6=a98_0x1e5e,_0x5f70ea=_0x3a04af();while(!![]){try{const _0x35acaf=parseInt(_0x5e14e6(0x1e0))/0x1*(-parseInt(_0x5e14e6(0x1f5))/0x2)+parseInt(_0x5e14e6(0x1ca))/0x3+-parseInt(_0x5e14e6(0x1fb))/0x4+-parseInt(_0x5e14e6(0x1cd))/0x5+parseInt(_0x5e14e6(0x1dd))/0x6+parseInt(_0x5e14e6(0x1d2))/0x7+-parseInt(_0x5e14e6(0x1e2))/0x8*(-parseInt(_0x5e14e6(0x1df))/0x9);if(_0x35acaf===_0x46dc3b)break;else _0x5f70ea['push'](_0x5f70ea['shift']());}catch(_0x444eaf){_0x5f70ea['push'](_0x5f70ea['shift']());}}}(a98_0xde7c,0xb8a43));import{existsSync}from'node:fs';function a98_0x1e5e(_0x11a4db,_0xb9e0c3){_0x11a4db=_0x11a4db-0x1c9;const _0xde7c=a98_0xde7c();let _0x1e5e06=_0xde7c[_0x11a4db];return _0x1e5e06;}import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG='description-file';export const issueReport={'service':a98_0x3a0177(0x204),'command':a98_0x3a0177(0x1ed),'description':a98_0x3a0177(0x1e1),'risk':a98_0x3a0177(0x1d4),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x3a0177(0x1d3),'flags':[{'name':'title','type':a98_0x3a0177(0x1d0),'required':!![],'description':'One-line\x20issue\x20summary'},{'name':a98_0x3a0177(0x1db),'type':'string','description':a98_0x3a0177(0x1eb)},{'name':DESCRIPTION_FILE_FLAG,'type':'string','description':a98_0x3a0177(0x1f6)}],async 'validate'(_0xf0f6f1){const _0x1350a3=a98_0x3a0177,_0x559483=_0xf0f6f1['str'](_0x1350a3(0x1e4))[_0x1350a3(0x1f1)](),_0x3cc70e=_0xf0f6f1['str'](_0x1350a3(0x1db))['trim'](),_0x252303=_0xf0f6f1['str'](DESCRIPTION_FILE_FLAG)[_0x1350a3(0x1f1)]();if(!_0x559483)throw CliErrors[_0x1350a3(0x1f4)]('title','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0x331422=_0x3cc70e[_0x1350a3(0x1ee)]>0x0,_0x2cfc8c=_0x252303[_0x1350a3(0x1ee)]>0x0;if(_0x331422===_0x2cfc8c)throw CliErrors[_0x1350a3(0x201)](_0x1350a3(0x1ff),_0x1350a3(0x1d8));if(_0x2cfc8c){const _0x23a1af=resolve(process['cwd'](),_0x252303);if(!existsSync(_0x23a1af))throw CliErrors['validation'](_0x1350a3(0x1fa)+_0x23a1af);}},async 'dryRun'(_0x273e4d){const _0x59878f=a98_0x3a0177,_0x2bc969=await prepareIssueReport(_0x273e4d);return{'method':_0x59878f(0x1c9),'url':_0x59878f(0x1f8)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x2bc969['title'],'issue.description':_0x2bc969[_0x59878f(0x1db)],'issue.description_original_bytes':_0x2bc969[_0x59878f(0x1f0)][_0x59878f(0x1d6)],'issue.description_truncated':_0x2bc969[_0x59878f(0x1f0)][_0x59878f(0x1e9)],'issue.description_redactions':_0x2bc969['sanitize']['redactionCount'],'issue.description_redaction_kinds':_0x2bc969[_0x59878f(0x1f0)][_0x59878f(0x1e5)][_0x59878f(0x1dc)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter',_0x59878f(0x1f3)+_0x2bc969[_0x59878f(0x1e7)],_0x2bc969[_0x59878f(0x1d5)]?_0x59878f(0x202)+_0x2bc969['descriptionFilePath']:null,_0x2bc969['sanitize']['truncated']?'truncated:\x20original\x20'+_0x2bc969[_0x59878f(0x1f0)][_0x59878f(0x1d6)]+_0x59878f(0x200):null,_0x2bc969[_0x59878f(0x1f0)][_0x59878f(0x1cc)]>0x0?_0x59878f(0x1ce)+_0x2bc969[_0x59878f(0x1f0)][_0x59878f(0x1cc)]+'\x20('+_0x2bc969[_0x59878f(0x1f0)][_0x59878f(0x1e5)][_0x59878f(0x1dc)](',\x20')+')':null][_0x59878f(0x1ea)](Boolean)[_0x59878f(0x1dc)]('\x0a')};},async 'execute'(_0x1190da){const _0x3d8901=a98_0x3a0177,_0x500a55=await prepareIssueReport(_0x1190da);try{await sendPlatformIssueCollectLog({'title':_0x500a55[_0x3d8901(0x1e4)],'description':_0x500a55['description'],'sanitize':{'originalBytes':_0x500a55[_0x3d8901(0x1f0)][_0x3d8901(0x1d6)],'truncated':_0x500a55[_0x3d8901(0x1f0)][_0x3d8901(0x1e9)],'redactionCount':_0x500a55[_0x3d8901(0x1f0)][_0x3d8901(0x1cc)],'redactionKinds':_0x500a55[_0x3d8901(0x1f0)][_0x3d8901(0x1e5)]}});}catch(_0x82548a){throw CliErrors[_0x3d8901(0x1da)]('Failed\x20to\x20report\x20platform\x20issue:\x20'+(_0x82548a instanceof Error?_0x82548a['message']:String(_0x82548a)),_0x3d8901(0x1f9));}return{'ok':!![],'message':buildResultMessage(_0x500a55[_0x3d8901(0x1f0)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x3d8901(0x1f2),_0x3d8901(0x1de),_0x3d8901(0x1d7),_0x3d8901(0x1e6),_0x3d8901(0x1cb),_0x3d8901(0x203)],'issue':{'title':_0x500a55[_0x3d8901(0x1e4)],'descriptionLength':_0x500a55['description']['length'],'descriptionSource':_0x500a55[_0x3d8901(0x1e7)],..._0x500a55[_0x3d8901(0x1d5)]?{'descriptionFile':_0x500a55[_0x3d8901(0x1d5)]}:{},'sanitize':{'originalBytes':_0x500a55[_0x3d8901(0x1f0)]['originalBytes'],'truncated':_0x500a55['sanitize']['truncated'],'redactions':_0x500a55[_0x3d8901(0x1f0)][_0x3d8901(0x1cc)],'redactionKinds':_0x500a55[_0x3d8901(0x1f0)][_0x3d8901(0x1e5)]}}}};}};function buildResultMessage(_0x1d163f){const _0x53c4fc=a98_0x3a0177,_0x4cde81=[];return _0x1d163f[_0x53c4fc(0x1e9)]&&_0x4cde81[_0x53c4fc(0x1fd)](_0x53c4fc(0x1e3)+_0x1d163f[_0x53c4fc(0x1d6)]+'\x20bytes'),_0x1d163f[_0x53c4fc(0x1cc)]>0x0&&_0x4cde81[_0x53c4fc(0x1fd)](_0x53c4fc(0x1f7)+_0x1d163f[_0x53c4fc(0x1cc)]+_0x53c4fc(0x1cf)+_0x1d163f['redactionKinds'][_0x53c4fc(0x1dc)](',\x20')),_0x4cde81['length']===0x0?_0x53c4fc(0x1d9):_0x53c4fc(0x1fc)+_0x4cde81[_0x53c4fc(0x1dc)](';\x20')+')';}async function prepareIssueReport(_0x43f6a0){const _0x2ace03=a98_0x3a0177,_0x2230a6=_0x43f6a0[_0x2ace03(0x1d1)](_0x2ace03(0x1e4))[_0x2ace03(0x1f1)](),_0x30562a=_0x43f6a0['str'](_0x2ace03(0x1db)),_0x5272d5=_0x43f6a0[_0x2ace03(0x1d1)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x5272d5){const _0x5ced3a=_0x30562a;if(!_0x5ced3a[_0x2ace03(0x1f1)]())throw CliErrors[_0x2ace03(0x201)](_0x2ace03(0x205),_0x2ace03(0x1ec));const _0x598b89=sanitizeIssueDescription(_0x5ced3a);return{'title':_0x2230a6,'description':_0x598b89['description'],'descriptionSource':_0x2ace03(0x1e8),'sanitize':_0x598b89};}const _0x327bb1=resolve(process[_0x2ace03(0x1fe)](),_0x5272d5),_0x4c4fc7=await readFile(_0x327bb1,_0x2ace03(0x1ef));if(!_0x4c4fc7[_0x2ace03(0x1f1)]())throw CliErrors[_0x2ace03(0x201)]('Issue\x20description\x20file\x20is\x20empty:\x20'+_0x327bb1,'Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.');const _0x2a8df0=sanitizeIssueDescription(_0x4c4fc7);return{'title':_0x2230a6,'description':_0x2a8df0['description'],'descriptionSource':'file','descriptionFilePath':_0x327bb1,'sanitize':_0x2a8df0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x2f7dcd=a99_0x4f01;(function(_0x5dff01,_0x586ad6){const _0x5c657b=a99_0x4f01,_0x4f8670=_0x5dff01();while(!![]){try{const _0x1ef560=parseInt(_0x5c657b(0x104))/0x1*(parseInt(_0x5c657b(0xfd))/0x2)+-parseInt(_0x5c657b(0x112))/0x3*(parseInt(_0x5c657b(0x10e))/0x4)+-parseInt(_0x5c657b(0x107))/0x5+-parseInt(_0x5c657b(0xf4))/0x6+-parseInt(_0x5c657b(0x108))/0x7+-parseInt(_0x5c657b(0xfa))/0x8+parseInt(_0x5c657b(0x10d))/0x9;if(_0x1ef560===_0x586ad6)break;else _0x4f8670['push'](_0x4f8670['shift']());}catch(_0x4bb7ee){_0x4f8670['push'](_0x4f8670['shift']());}}}(a99_0x147c,0xd8637));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE='\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]',REDACTION_RULES=[{'kind':a99_0x2f7dcd(0x110),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a99_0x2f7dcd(0xff)},{'kind':'authorization','pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a99_0x2f7dcd(0xf3),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a99_0x2f7dcd(0x103)},{'kind':a99_0x2f7dcd(0xfe),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':a99_0x2f7dcd(0xfc),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a99_0x2f7dcd(0x106)},{'kind':a99_0x2f7dcd(0x102),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a99_0x2f7dcd(0xf8)}];function a99_0x147c(){const _0x188664=['6810450tqgFBh','5670462VTQIpQ','pattern','toString','utf8','length','40802220AhOuKp','136668ZXzMnD','restore','cookie','label','75llyqSA','byteLength','private-key','3003654WovkSo','includes','slice','push','REDACTED:bearer-jwt','kind','4075952QzHCBJ','subarray','password','34ocKwJo','access-key','REDACTED:cookie','replace','max','bearer-jwt','REDACTED:private-key','22893RjhiiP','string','REDACTED:password'];a99_0x147c=function(){return _0x188664;};return a99_0x147c();}export function sanitizeIssueDescription(_0x3ba4e0){const _0x2215f7=a99_0x2f7dcd,_0xd6e821=Buffer['byteLength'](_0x3ba4e0,_0x2215f7(0x10b)),_0x25dc97=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x1ba2ad=_0x3ba4e0,_0xd53b7c=0x0;const _0x12c4ed=[];if(!_0x25dc97){const _0x56991e=protectOssAccessKeyIds(_0x1ba2ad);_0x1ba2ad=_0x56991e['description'];for(const _0x5eaf03 of REDACTION_RULES){let _0x2df008=0x0;_0x1ba2ad=_0x1ba2ad['replace'](_0x5eaf03[_0x2215f7(0x109)],(_0x5aa8c2,_0x1f175f)=>{const _0x29bc8d=_0x2215f7;_0x2df008+=0x1;const _0x138a60=typeof _0x1f175f===_0x29bc8d(0x105)?_0x1f175f:'';return _0x138a60+'['+_0x5eaf03[_0x29bc8d(0x111)]+']';}),_0x2df008>0x0&&(_0xd53b7c+=_0x2df008,!_0x12c4ed[_0x2215f7(0xf5)](_0x5eaf03[_0x2215f7(0xf9)])&&_0x12c4ed['push'](_0x5eaf03[_0x2215f7(0xf9)]));}_0x1ba2ad=_0x56991e[_0x2215f7(0x10f)](_0x1ba2ad);}let _0x12be78=![];if(Buffer[_0x2215f7(0xf2)](_0x1ba2ad,'utf8')>ISSUE_DESCRIPTION_MAX_BYTES){_0x12be78=!![];const _0x33c2b6=Buffer['byteLength'](TRUNCATION_NOTICE,_0x2215f7(0x10b)),_0x1e0f77=Math[_0x2215f7(0x101)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x33c2b6);_0x1ba2ad=sliceUtf8Bytes(_0x1ba2ad,_0x1e0f77)+TRUNCATION_NOTICE;}return{'description':_0x1ba2ad,'originalBytes':_0xd6e821,'truncated':_0x12be78,'redactionCount':_0xd53b7c,'redactionKinds':_0x12c4ed};}function a99_0x4f01(_0x208e7e,_0x5b09d2){_0x208e7e=_0x208e7e-0xf2;const _0x147ccc=a99_0x147c();let _0x4f01f0=_0x147ccc[_0x208e7e];return _0x4f01f0;}function protectOssAccessKeyIds(_0x1525db){const _0xe2c5a7=a99_0x2f7dcd,_0x25e6a5=[],_0x1734a9=_0x1525db['replace'](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x4b5d26,_0x3f9b27)=>{const _0x2b97ef=a99_0x4f01,_0x59fa2c=_0x25e6a5[_0x2b97ef(0xf7)](_0x4b5d26[_0x2b97ef(0xf6)](_0x3f9b27[_0x2b97ef(0x10c)]))-0x1;return _0x3f9b27+'__RB_OSS_ID_'+_0x59fa2c+'__';});return{'description':_0x1734a9,'restore':_0x15ddd0=>_0x15ddd0[_0xe2c5a7(0x100)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x5257be,_0x164baf,_0x223628)=>{const _0x52a4cb=_0x25e6a5[Number(_0x223628)];return _0x52a4cb===undefined?_0x5257be:''+_0x164baf+_0x52a4cb;})};}function sliceUtf8Bytes(_0x30b6d6,_0x8bf8af){const _0x32aad4=a99_0x2f7dcd;if(_0x8bf8af<=0x0)return'';const _0x591454=Buffer['from'](_0x30b6d6,_0x32aad4(0x10b));if(_0x591454[_0x32aad4(0xf2)]<=_0x8bf8af)return _0x30b6d6;let _0x3ac1c7=_0x8bf8af;while(_0x3ac1c7>0x0){const _0x53c988=_0x591454[_0x3ac1c7];if(_0x53c988===undefined||(_0x53c988&0xc0)!==0x80)break;_0x3ac1c7-=0x1;}return _0x591454[_0x32aad4(0xfb)](0x0,_0x3ac1c7)[_0x32aad4(0x10a)](_0x32aad4(0x10b));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x33458b=a100_0x396e;(function(_0x42f269,_0x2678c4){const _0x4511c8=a100_0x396e,_0x4ea1c0=_0x42f269();while(!![]){try{const _0x1353f3=parseInt(_0x4511c8(0x192))/0x1*(parseInt(_0x4511c8(0x1b3))/0x2)+-parseInt(_0x4511c8(0x19f))/0x3*(-parseInt(_0x4511c8(0x1a1))/0x4)+-parseInt(_0x4511c8(0x1a6))/0x5*(parseInt(_0x4511c8(0x1af))/0x6)+-parseInt(_0x4511c8(0x1a5))/0x7*(parseInt(_0x4511c8(0x193))/0x8)+parseInt(_0x4511c8(0x1a2))/0x9+parseInt(_0x4511c8(0x1ac))/0xa+-parseInt(_0x4511c8(0x1ad))/0xb*(parseInt(_0x4511c8(0x1b0))/0xc);if(_0x1353f3===_0x2678c4)break;else _0x4ea1c0['push'](_0x4ea1c0['shift']());}catch(_0x10fb27){_0x4ea1c0['push'](_0x4ea1c0['shift']());}}}(a100_0x45ab,0x78f40));import{logger}from'../../utils/logger.js';function printLogs(_0x39ee0f){const _0x97dcf2=a100_0x396e;if(_0x39ee0f[_0x97dcf2(0x1a7)]===0x0){console[_0x97dcf2(0x191)]('*\x20No\x20logs\x20found');return;}console[_0x97dcf2(0x191)](_0x97dcf2(0x1b4)),_0x39ee0f[_0x97dcf2(0x19a)]((_0x35a6e1,_0x1f749b)=>{const _0x75bf2a=_0x97dcf2,_0x381b56=new Date(_0x35a6e1[_0x75bf2a(0x199)])[_0x75bf2a(0x197)](_0x75bf2a(0x198)),_0x51b3a4=_0x35a6e1[_0x75bf2a(0x195)]==='success'?'√':_0x35a6e1[_0x75bf2a(0x195)]===_0x75bf2a(0x1b7)?'×':_0x35a6e1[_0x75bf2a(0x195)]===_0x75bf2a(0x1a0)?'!':'i';console[_0x75bf2a(0x191)](_0x1f749b+0x1+'.\x20'+_0x51b3a4+'\x20['+_0x35a6e1[_0x75bf2a(0x19e)]+']\x20'+_0x35a6e1[_0x75bf2a(0x19b)]),console['log']('\x20\x20\x20Time:\x20'+_0x381b56),_0x35a6e1[_0x75bf2a(0x194)]&&console[_0x75bf2a(0x191)](_0x75bf2a(0x1aa)+_0x35a6e1[_0x75bf2a(0x194)]+'ms'),_0x35a6e1[_0x75bf2a(0x1b6)]&&Object[_0x75bf2a(0x19c)](_0x35a6e1[_0x75bf2a(0x1b6)])[_0x75bf2a(0x1a7)]>0x0&&console[_0x75bf2a(0x191)](_0x75bf2a(0x1b5)+JSON[_0x75bf2a(0x1a8)](_0x35a6e1[_0x75bf2a(0x1b6)],null,0x2)),console[_0x75bf2a(0x191)]('');});}function a100_0x396e(_0x15b6ab,_0x5ca530){_0x15b6ab=_0x15b6ab-0x191;const _0x45ab98=a100_0x45ab();let _0x396eb2=_0x45ab98[_0x15b6ab];return _0x396eb2;}export const logsDefinitions=[{'service':'logs','command':a100_0x33458b(0x19d),'description':a100_0x33458b(0x1a9),'risk':a100_0x33458b(0x1b2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3bb434){const _0x18d4d8=a100_0x33458b;return printLogs(logger[_0x18d4d8(0x196)]()),{'ok':!![]};}},{'service':a100_0x33458b(0x1b1),'command':a100_0x33458b(0x1ab),'description':a100_0x33458b(0x1ae),'risk':a100_0x33458b(0x1a4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x16098c){const _0x30d8d7=a100_0x33458b;return logger[_0x30d8d7(0x1a3)](),console[_0x30d8d7(0x191)](_0x30d8d7(0x1b8)),{'ok':!![]};}}];function a100_0x45ab(){const _0x26bcdc=['error','*\x20Logs\x20cleared','log','1THZQkM','12728PpBweI','duration','level','readLogs','toLocaleString','en-US','timestamp','forEach','message','keys','show','command','93mNMkIB','warn','127396XanYYT','8202042bQUcdO','clearLogs','write','532lBhVSx','3533005QhOjRg','length','stringify','View\x20command\x20history\x20logs','\x20\x20\x20Duration:\x20','clear','5682170zyNxfH','8734PeUWnO','Clear\x20command\x20history\x20logs','6Kzmgru','31380ClOyuc','logs','read','1864754NQNXAX','*\x20Lovrabet\x20CLI\x20logs:\x0a','\x20\x20\x20Details:\x20','details'];a100_0x45ab=function(){return _0x26bcdc;};return a100_0x45ab();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a101_0x39c2f1=a101_0x264d;(function(_0x300c8d,_0x2f0c5d){const _0xbfae89=a101_0x264d,_0x6977ef=_0x300c8d();while(!![]){try{const _0xf75f61=-parseInt(_0xbfae89(0xd1))/0x1*(parseInt(_0xbfae89(0xda))/0x2)+parseInt(_0xbfae89(0xe2))/0x3*(-parseInt(_0xbfae89(0xe9))/0x4)+parseInt(_0xbfae89(0x10a))/0x5*(-parseInt(_0xbfae89(0xe1))/0x6)+parseInt(_0xbfae89(0xde))/0x7*(-parseInt(_0xbfae89(0xfb))/0x8)+-parseInt(_0xbfae89(0x126))/0x9+-parseInt(_0xbfae89(0xf7))/0xa+parseInt(_0xbfae89(0xfd))/0xb;if(_0xf75f61===_0x2f0c5d)break;else _0x6977ef['push'](_0x6977ef['shift']());}catch(_0x51bf00){_0x6977ef['push'](_0x6977ef['shift']());}}}(a101_0x314a,0x3bf19));import a101_0xa87ba6 from'chalk';import{filterMenusWithResources,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{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{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{selectMenusForUpdate}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';function a101_0x264d(_0x13124f,_0x1dd4da){_0x13124f=_0x13124f-0xce;const _0x314aec=a101_0x314a();let _0x264d01=_0x314aec[_0x13124f];return _0x264d01;}export const menuAssetUpdate={'service':a101_0x39c2f1(0x11c),'command':a101_0x39c2f1(0x122),'description':a101_0x39c2f1(0xf5),'risk':a101_0x39c2f1(0x105),'flags':[{'name':a101_0x39c2f1(0x115),'type':a101_0x39c2f1(0x102),'description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+a101_0x39c2f1(0xe3)},{'name':a101_0x39c2f1(0xdd),'type':a101_0x39c2f1(0x102),'description':a101_0x39c2f1(0xf0)+a101_0x39c2f1(0xeb),'enum':['replace',a101_0x39c2f1(0x11e)],'default':a101_0x39c2f1(0x11e)},{'name':a101_0x39c2f1(0x107),'type':a101_0x39c2f1(0x125),'description':a101_0x39c2f1(0xd3)},{'name':a101_0x39c2f1(0xf1),'type':a101_0x39c2f1(0x102),'description':a101_0x39c2f1(0x123)},{'name':'paths','type':a101_0x39c2f1(0x102),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a101_0x39c2f1(0x11f),'type':'boolean','description':a101_0x39c2f1(0xd7)},{'name':a101_0x39c2f1(0xd8),'type':a101_0x39c2f1(0x102),'enum':[a101_0x39c2f1(0xfc),'script',a101_0x39c2f1(0xe4)],'description':a101_0x39c2f1(0xd9)}],async 'dryRun'(_0xf6c621){const _0x2283c1=a101_0x39c2f1;ensureRunnableContext(_0xf6c621[_0x2283c1(0x10f)],_0xf6c621[_0x2283c1(0xfe)]);const _0x32a16d=await runMenuUpdateCore(_0xf6c621[_0x2283c1(0x114)],_0xf6c621['cookie'],_0xf6c621[_0x2283c1(0x103)](_0x2283c1(0x115)),{'mode':parseMode(_0xf6c621['str']('mode')),'dryRun':!![],'force':_0xf6c621[_0x2283c1(0x109)]('force'),'selection':parseSelection(_0xf6c621),'loadScriptMode':parseLoadScriptMode(_0xf6c621[_0x2283c1(0x103)]('load-mode'))});return{'method':_0x2283c1(0xf8),'url':_0x2283c1(0x124),'body':_0x32a16d,'description':_0x32a16d[_0x2283c1(0x10d)]?_0x2283c1(0x120):_0x2283c1(0x118)+(_0x32a16d['diffs']?.[_0x2283c1(0xe5)]??0x0)+'\x20menu\x20resource\x20set(s).'};},async 'execute'(_0x30a9cd){const _0x4dc292=a101_0x39c2f1;ensureRunnableContext(_0x30a9cd[_0x4dc292(0x10f)],_0x30a9cd[_0x4dc292(0xfe)]);const _0xce7747=_0x30a9cd[_0x4dc292(0x119)]('yes'),_0x241423=_0x30a9cd[_0x4dc292(0x103)](_0x4dc292(0x115)),_0x20d452=parseMode(_0x30a9cd[_0x4dc292(0x103)]('mode')),_0xf319d6=_0x30a9cd[_0x4dc292(0x109)](_0x4dc292(0x107)),_0x24b496=parseLoadScriptMode(_0x30a9cd[_0x4dc292(0x103)](_0x4dc292(0xd8))),_0x5d1d28=parseParams(_0x241423),_0x386dc3=!!(_0x5d1d28[_0x4dc292(0x117)]||_0x5d1d28[_0x4dc292(0x11d)]);if(_0xce7747||_0x386dc3&&!isInteractive()){const _0x298226=await runMenuUpdateCore(_0x30a9cd[_0x4dc292(0x114)],_0x30a9cd[_0x4dc292(0xff)],_0x241423,{'mode':_0x20d452,'force':_0xf319d6,'selection':parseSelection(_0x30a9cd),'loadScriptMode':_0x24b496});return _0x298226[_0x4dc292(0x10d)]?writeCliSideChannelLine(_0x4dc292(0xec)):(writeCliSideChannelLine('✓\x20Menu\x20asset\x20update\x20completed:\x20'+_0x298226[_0x4dc292(0x116)]+_0x4dc292(0xd0)),_0x298226[_0x4dc292(0x10c)]>0x0&&writeCliSideChannelLine('!\x20'+_0x298226[_0x4dc292(0x10c)]+_0x4dc292(0xd2))),{'ok':_0x298226['failed']===0x0,'data':_0x298226,'message':_0x298226[_0x4dc292(0x10d)]?_0x4dc292(0xf4):_0x4dc292(0x121)+_0x298226[_0x4dc292(0x116)]+_0x4dc292(0x111)+_0x298226[_0x4dc292(0x10c)]+'\x20failed.'};}requireInteractive();const _0x1735b0=startSpinner(_0x4dc292(0x11b));let _0x65deba;try{_0x65deba=await fetchOnlineMenuList(_0x30a9cd[_0x4dc292(0x114)],_0x30a9cd[_0x4dc292(0xff)]),stopSpinner(_0x1735b0,_0x4dc292(0x100),!![]);}catch(_0x16d1d3){stopSpinner(_0x1735b0,_0x4dc292(0xf3),![]);throw CliErrors['validation'](_0x16d1d3 instanceof Error?_0x16d1d3['message']:_0x4dc292(0xf3));}const _0x2d7066=filterMenusWithResources(_0x65deba),_0x39a853=parseSelection(_0x30a9cd,![]),_0x28f676=_0x39a853?selectMenusForUpdate(_0x2d7066,_0x39a853):_0x2d7066;if(_0x28f676[_0x4dc292(0xe5)]===0x0)return writeCliSideChannelLine(a101_0xa87ba6[_0x4dc292(0xdc)](_0x4dc292(0x110))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a101_0xa87ba6[_0x4dc292(0xef)](_0x4dc292(0xd6)+_0x28f676[_0x4dc292(0xe5)]+'\x20menu(s)\x20with\x20existing\x20resources')),writeCliSideChannelLine(renderUpdateSummary(_0x28f676[_0x4dc292(0xee)](_0x43439e=>_0x43439e[_0x4dc292(0xcf)]),[_0x5d1d28[_0x4dc292(0x117)],_0x5d1d28[_0x4dc292(0x11d)]])),writeCliSideChannelLine('');let _0x285799=_0x5d1d28[_0x4dc292(0x117)],_0x4613ec=_0x5d1d28[_0x4dc292(0x11d)];!_0x285799&&(_0x285799=await askJsUrl());!_0x4613ec&&(_0x4613ec=await askCssUrl());const _0x5565d4=await askConfirm(_0x4dc292(0xd4)+_0x28f676['length']+_0x4dc292(0xf9)+_0x285799+'\x20and\x20CSS:\x20'+_0x4613ec+'?');if(!_0x5565d4)return writeCliSideChannelLine(a101_0xa87ba6[_0x4dc292(0xed)](_0x4dc292(0xe7))),{'ok':!![]};const _0x104f5a=startSpinner(_0x4dc292(0x106)+_0x28f676[_0x4dc292(0xe5)]+'\x20menu(s)...');try{const _0x50bbfa=await runMenuUpdateCore(_0x30a9cd[_0x4dc292(0x114)],_0x30a9cd[_0x4dc292(0xff)],JSON[_0x4dc292(0x101)]({'jsUrl':_0x285799,'cssUrl':_0x4613ec}),{'mode':_0x20d452,'force':_0xf319d6,'selection':{'all':![],'menuIds':_0x28f676[_0x4dc292(0xee)](_0x474354=>_0x474354['id']),'paths':[]},'loadScriptMode':_0x24b496});return stopSpinner(_0x104f5a,_0x4dc292(0x11a)+_0x50bbfa[_0x4dc292(0x116)]+_0x4dc292(0x113),_0x50bbfa['failed']===0x0),{'ok':_0x50bbfa[_0x4dc292(0x10c)]===0x0,'data':_0x50bbfa,'message':_0x50bbfa['failed']>0x0?_0x4dc292(0x121)+_0x50bbfa['updated']+'\x20updated,\x20'+_0x50bbfa[_0x4dc292(0x10c)]+_0x4dc292(0xe8):_0x4dc292(0x121)+_0x50bbfa['updated']+_0x4dc292(0xd5)};}catch(_0x33d143){stopSpinner(_0x104f5a,'Menu\x20asset\x20update\x20failed',![]);throw CliErrors[_0x4dc292(0xf6)](_0x33d143 instanceof Error?_0x33d143[_0x4dc292(0x104)]:'Menu\x20asset\x20update\x20failed');}}};function ensureRunnableContext(_0x25a03c,_0x526a48){const _0x56261e=a101_0x39c2f1,_0x5d80a7=_0x25a03c[_0x56261e(0x10b)]?String(_0x25a03c[_0x56261e(0x10b)])[_0x56261e(0xe0)]():'';if(!isInProject()&&!_0x526a48&&!_0x5d80a7)throw CliErrors[_0x56261e(0xf6)](_0x56261e(0xdb)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parseMode(_0x1d88fe){const _0x24376a=a101_0x39c2f1;if(!_0x1d88fe)return _0x24376a(0x11e);if(_0x1d88fe===_0x24376a(0xe6)||_0x1d88fe===_0x24376a(0x11e))return _0x1d88fe;throw CliErrors['validation'](_0x24376a(0x10e));}function parseSelection(_0x4f4870,_0xabe8b2=!![]){const _0x4af086=a101_0x39c2f1,_0x701963=_0x4f4870[_0x4af086(0x109)](_0x4af086(0x11f)),_0x29c177=parseMenuIds(_0x4f4870[_0x4af086(0x103)]('menu-ids')),_0x18b39b=parseCsv(_0x4f4870['str']('paths')),_0x39ae8d=_0x29c177[_0x4af086(0xe5)]>0x0||_0x18b39b[_0x4af086(0xe5)]>0x0;if(_0x701963&&_0x39ae8d)throw CliErrors[_0x4af086(0xf6)](_0x4af086(0x112));if(!_0x701963&&!_0x39ae8d){if(!_0xabe8b2)return undefined;throw CliErrors['validation'](_0x4af086(0xea));}return{'all':_0x701963,'menuIds':_0x29c177,'paths':_0x18b39b};}function a101_0x314a(){const _0x901495=['validation','1232620xmMllN','POST','\x20menu(s)\x20with\x20JS:\x20','script','112HiLYnJ','import','10757593CeRZqW','selectedAppName','cookie','Online\x20menu\x20list\x20fetched','stringify','string','str','message','high-risk-write','Updating\x20','force','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','bool','5JtIZYd','appcode','failed','skipped','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','rawFlags','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','\x20updated,\x20','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','\x20menu(s)','appCode','params','updated','jsUrl','Would\x20update\x20','flag','Updated\x20','Fetching\x20online\x20menu\x20list...','menu','cssUrl','patch','all','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','Menu\x20asset\x20update\x20completed:\x20','asset-update','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','/smartapi/menu/update','boolean','1156509Aqbbzc','parse','label','\x20menu(s)\x20updated','23irDOsl','\x20menu(s)\x20failed','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','\x20\x20Update\x20','\x20updated.','\x20\x20Found\x20','Explicitly\x20update\x20every\x20menu\x20that\x20has\x20resources','load-mode','Explicitly\x20change\x20the\x20microfrontend\x20resource\x20loading\x20mode','3702QKUHyz','menu\x20asset-update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','yellow','mode','7805btdhuh','isArray','trim','860802GMkvZB','51XjCeSU','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','fetch','length','replace','\x20\x20Cancelled.','\x20failed.','65652JUcJid','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','patch\x20replaces\x20a\x20supplied\x20type\x20only\x20when\x20the\x20existing\x20target\x20is\x20unambiguous','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','gray','map','cyan','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20','menu-ids','isSafeInteger','Failed\x20to\x20fetch\x20online\x20menu\x20list','Menu\x20asset\x20update\x20skipped','Update\x20CDN\x20asset\x20URLs\x20for\x20selected\x20online\x20menus\x20with\x20existing\x20resources'];a101_0x314a=function(){return _0x901495;};return a101_0x314a();}function parseMenuIds(_0x13fbb1){const _0x5e49bc=a101_0x39c2f1,_0xf6609b=parseCsv(_0x13fbb1),_0x5349ec=_0xf6609b[_0x5e49bc(0xee)](Number);if(_0x5349ec['some'](_0x4be87e=>!Number[_0x5e49bc(0xf2)](_0x4be87e)||_0x4be87e<=0x0))throw CliErrors[_0x5e49bc(0xf6)](_0x5e49bc(0x108));return[...new Set(_0x5349ec)];}function parseCsv(_0x572ae6){const _0x5b7e1d=a101_0x39c2f1;return[...new Set(_0x572ae6['split'](',')[_0x5b7e1d(0xee)](_0xe22a63=>_0xe22a63[_0x5b7e1d(0xe0)]())['filter'](Boolean))];}function parseLoadScriptMode(_0x10423b){const _0x21ba04=a101_0x39c2f1;if(!_0x10423b)return undefined;if(_0x10423b===_0x21ba04(0xfc)||_0x10423b===_0x21ba04(0xfa)||_0x10423b==='fetch')return _0x10423b;throw CliErrors['validation']('Invalid\x20--load-mode.\x20Allowed\x20values:\x20import,\x20script,\x20fetch');}function parseParams(_0x35cdd7){const _0x121b3c=a101_0x39c2f1;if(!_0x35cdd7)return{};try{const _0x586f3c=JSON[_0x121b3c(0xce)](_0x35cdd7);if(typeof _0x586f3c!=='object'||_0x586f3c===null||Array[_0x121b3c(0xdf)](_0x586f3c))return{};return{'jsUrl':typeof _0x586f3c[_0x121b3c(0x117)]===_0x121b3c(0x102)?_0x586f3c[_0x121b3c(0x117)][_0x121b3c(0xe0)]():undefined,'cssUrl':typeof _0x586f3c[_0x121b3c(0x11d)]===_0x121b3c(0x102)?_0x586f3c[_0x121b3c(0x11d)][_0x121b3c(0xe0)]():undefined};}catch{return{};}}
|
|
1
|
+
const a101_0xc40232=a101_0x294a;(function(_0x5463ca,_0x48ad5f){const _0x53e2cd=a101_0x294a,_0x42f0f6=_0x5463ca();while(!![]){try{const _0x30d31b=parseInt(_0x53e2cd(0x16a))/0x1+-parseInt(_0x53e2cd(0x15d))/0x2+-parseInt(_0x53e2cd(0x141))/0x3+-parseInt(_0x53e2cd(0x138))/0x4*(-parseInt(_0x53e2cd(0x17e))/0x5)+parseInt(_0x53e2cd(0x154))/0x6+parseInt(_0x53e2cd(0x165))/0x7*(parseInt(_0x53e2cd(0x137))/0x8)+-parseInt(_0x53e2cd(0x172))/0x9;if(_0x30d31b===_0x48ad5f)break;else _0x42f0f6['push'](_0x42f0f6['shift']());}catch(_0x581633){_0x42f0f6['push'](_0x42f0f6['shift']());}}}(a101_0x515e,0x4473a));function a101_0x294a(_0x50ba55,_0xb2b0df){_0x50ba55=_0x50ba55-0x135;const _0x515eae=a101_0x515e();let _0x294ab9=_0x515eae[_0x50ba55];return _0x294ab9;}import a101_0x235da1 from'chalk';import{filterMenusWithResources,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{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{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';function a101_0x515e(){const _0x8908cc=['isSafeInteger','7tNURqM','\x20\x20Cancelled.','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','appcode','Updating\x20','417638iNZCkk','\x20menu(s)\x20updated','force','Would\x20update\x20','params','replace','✓\x20Menu\x20asset\x20update\x20completed:\x20','map','1282824nJbZHu','rawFlags','jsUrl','POST','diffs','some','\x20updated,\x20','filter','script','gray','Menu\x20asset\x20update\x20completed:\x20','mode','736745fQsnIf','validation','Explicitly\x20update\x20every\x20menu\x20that\x20has\x20resources','bool','cssUrl','menu\x20asset-update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','\x20and\x20CSS:\x20','high-risk-write','skipped','failed','Updated\x20','Explicitly\x20change\x20the\x20microfrontend\x20resource\x20loading\x20mode','Menu\x20asset\x20update\x20failed','3093208EfsvmU','4hBjTPk','updated','isArray','all','paths','Menu\x20asset\x20update\x20skipped','yellow','fetch','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','1630326TklSJP','trim','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','appCode','length','selectedAppName','str','\x20failed.','Invalid\x20--load-mode.\x20Allowed\x20values:\x20import,\x20script,\x20fetch','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','message','menu-ids','/smartapi/menu/update','split','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20','patch\x20replaces\x20a\x20supplied\x20type\x20only\x20when\x20the\x20existing\x20target\x20is\x20unambiguous','menu','string','object','2337804ZJUPkA','\x20\x20Update\x20','import','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','parse','cookie','stringify','patch','\x20menu(s)\x20with\x20JS:\x20','749832dDCifG','\x20updated.','boolean','Failed\x20to\x20fetch\x20online\x20menu\x20list','asset-update','Update\x20CDN\x20asset\x20URLs\x20for\x20selected\x20online\x20menus\x20with\x20existing\x20resources','\x20menu\x20resource\x20set(s).'];a101_0x515e=function(){return _0x8908cc;};return a101_0x515e();}import{selectMenusForUpdate}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';export const menuAssetUpdate={'service':a101_0xc40232(0x151),'command':a101_0xc40232(0x161),'description':a101_0xc40232(0x162),'risk':a101_0xc40232(0x185),'flags':[{'name':a101_0xc40232(0x16e),'type':a101_0xc40232(0x152),'description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a101_0xc40232(0x17d),'type':a101_0xc40232(0x152),'description':a101_0xc40232(0x14f)+a101_0xc40232(0x150),'enum':[a101_0xc40232(0x16f),a101_0xc40232(0x15b)],'default':'patch'},{'name':a101_0xc40232(0x16c),'type':a101_0xc40232(0x15f),'description':a101_0xc40232(0x140)},{'name':a101_0xc40232(0x14c),'type':a101_0xc40232(0x152),'description':a101_0xc40232(0x143)},{'name':a101_0xc40232(0x13c),'type':a101_0xc40232(0x152),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':'all','type':a101_0xc40232(0x15f),'description':a101_0xc40232(0x180)},{'name':'load-mode','type':'string','enum':[a101_0xc40232(0x156),a101_0xc40232(0x17a),'fetch'],'description':a101_0xc40232(0x135)}],async 'dryRun'(_0x16e621){const _0x17aaa7=a101_0xc40232;ensureRunnableContext(_0x16e621[_0x17aaa7(0x173)],_0x16e621[_0x17aaa7(0x146)]);const _0x54d12a=await runMenuUpdateCore(_0x16e621[_0x17aaa7(0x144)],_0x16e621[_0x17aaa7(0x159)],_0x16e621[_0x17aaa7(0x147)]('params'),{'mode':parseMode(_0x16e621[_0x17aaa7(0x147)](_0x17aaa7(0x17d))),'dryRun':!![],'force':_0x16e621['bool'](_0x17aaa7(0x16c)),'selection':parseSelection(_0x16e621),'loadScriptMode':parseLoadScriptMode(_0x16e621[_0x17aaa7(0x147)]('load-mode'))});return{'method':_0x17aaa7(0x175),'url':_0x17aaa7(0x14d),'body':_0x54d12a,'description':_0x54d12a[_0x17aaa7(0x186)]?_0x17aaa7(0x167):_0x17aaa7(0x16d)+(_0x54d12a[_0x17aaa7(0x176)]?.[_0x17aaa7(0x145)]??0x0)+_0x17aaa7(0x163)};},async 'execute'(_0x1081a6){const _0x2751a5=a101_0xc40232;ensureRunnableContext(_0x1081a6[_0x2751a5(0x173)],_0x1081a6[_0x2751a5(0x146)]);const _0x59b9a0=_0x1081a6['flag']('yes'),_0x1b9049=_0x1081a6[_0x2751a5(0x147)](_0x2751a5(0x16e)),_0x1fc053=parseMode(_0x1081a6[_0x2751a5(0x147)](_0x2751a5(0x17d))),_0x581894=_0x1081a6['bool']('force'),_0x43dfb2=parseLoadScriptMode(_0x1081a6[_0x2751a5(0x147)]('load-mode')),_0x203bac=parseParams(_0x1b9049),_0x9f31cc=!!(_0x203bac[_0x2751a5(0x174)]||_0x203bac[_0x2751a5(0x182)]);if(_0x59b9a0||_0x9f31cc&&!isInteractive()){const _0x542f76=await runMenuUpdateCore(_0x1081a6[_0x2751a5(0x144)],_0x1081a6[_0x2751a5(0x159)],_0x1b9049,{'mode':_0x1fc053,'force':_0x581894,'selection':parseSelection(_0x1081a6),'loadScriptMode':_0x43dfb2});return _0x542f76['skipped']?writeCliSideChannelLine('!\x20No\x20menus\x20with\x20existing\x20resources\x20found'):(writeCliSideChannelLine(_0x2751a5(0x170)+_0x542f76[_0x2751a5(0x139)]+_0x2751a5(0x16b)),_0x542f76[_0x2751a5(0x187)]>0x0&&writeCliSideChannelLine('!\x20'+_0x542f76[_0x2751a5(0x187)]+'\x20menu(s)\x20failed')),{'ok':_0x542f76[_0x2751a5(0x187)]===0x0,'data':_0x542f76,'message':_0x542f76[_0x2751a5(0x186)]?_0x2751a5(0x13d):_0x2751a5(0x17c)+_0x542f76[_0x2751a5(0x139)]+_0x2751a5(0x178)+_0x542f76['failed']+_0x2751a5(0x148)};}requireInteractive();const _0x1f453f=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x55aed7;try{_0x55aed7=await fetchOnlineMenuList(_0x1081a6[_0x2751a5(0x144)],_0x1081a6[_0x2751a5(0x159)]),stopSpinner(_0x1f453f,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x4c606b){stopSpinner(_0x1f453f,_0x2751a5(0x160),![]);throw CliErrors['validation'](_0x4c606b instanceof Error?_0x4c606b[_0x2751a5(0x14b)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}const _0xd238c5=filterMenusWithResources(_0x55aed7),_0x1856d9=parseSelection(_0x1081a6,![]),_0x4968cd=_0x1856d9?selectMenusForUpdate(_0xd238c5,_0x1856d9):_0xd238c5;if(_0x4968cd[_0x2751a5(0x145)]===0x0)return writeCliSideChannelLine(a101_0x235da1[_0x2751a5(0x13e)]('\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found')),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a101_0x235da1['cyan']('\x20\x20Found\x20'+_0x4968cd[_0x2751a5(0x145)]+'\x20menu(s)\x20with\x20existing\x20resources')),writeCliSideChannelLine(renderUpdateSummary(_0x4968cd['map'](_0x49670d=>_0x49670d['label']),[_0x203bac['jsUrl'],_0x203bac['cssUrl']])),writeCliSideChannelLine('');let _0x27a42d=_0x203bac[_0x2751a5(0x174)],_0x424748=_0x203bac[_0x2751a5(0x182)];!_0x27a42d&&(_0x27a42d=await askJsUrl());!_0x424748&&(_0x424748=await askCssUrl());const _0x1b4e78=await askConfirm(_0x2751a5(0x155)+_0x4968cd[_0x2751a5(0x145)]+_0x2751a5(0x15c)+_0x27a42d+_0x2751a5(0x184)+_0x424748+'?');if(!_0x1b4e78)return writeCliSideChannelLine(a101_0x235da1[_0x2751a5(0x17b)](_0x2751a5(0x166))),{'ok':!![]};const _0x307a6f=startSpinner(_0x2751a5(0x169)+_0x4968cd['length']+'\x20menu(s)...');try{const _0x20a2ed=await runMenuUpdateCore(_0x1081a6[_0x2751a5(0x144)],_0x1081a6[_0x2751a5(0x159)],JSON[_0x2751a5(0x15a)]({'jsUrl':_0x27a42d,'cssUrl':_0x424748}),{'mode':_0x1fc053,'force':_0x581894,'selection':{'all':![],'menuIds':_0x4968cd[_0x2751a5(0x171)](_0x2e8ef3=>_0x2e8ef3['id']),'paths':[]},'loadScriptMode':_0x43dfb2});return stopSpinner(_0x307a6f,_0x2751a5(0x188)+_0x20a2ed[_0x2751a5(0x139)]+'\x20menu(s)',_0x20a2ed[_0x2751a5(0x187)]===0x0),{'ok':_0x20a2ed[_0x2751a5(0x187)]===0x0,'data':_0x20a2ed,'message':_0x20a2ed[_0x2751a5(0x187)]>0x0?_0x2751a5(0x17c)+_0x20a2ed['updated']+'\x20updated,\x20'+_0x20a2ed['failed']+'\x20failed.':_0x2751a5(0x17c)+_0x20a2ed['updated']+_0x2751a5(0x15e)};}catch(_0x1f2d3b){stopSpinner(_0x307a6f,_0x2751a5(0x136),![]);throw CliErrors[_0x2751a5(0x17f)](_0x1f2d3b instanceof Error?_0x1f2d3b['message']:_0x2751a5(0x136));}}};function ensureRunnableContext(_0x7a820f,_0x4d5e4c){const _0x66f16=a101_0xc40232,_0x3b922f=_0x7a820f[_0x66f16(0x168)]?String(_0x7a820f[_0x66f16(0x168)])[_0x66f16(0x142)]():'';if(!isInProject()&&!_0x4d5e4c&&!_0x3b922f)throw CliErrors['validation'](_0x66f16(0x183)+_0x66f16(0x14a));}function parseMode(_0x275da9){const _0x277ac7=a101_0xc40232;if(!_0x275da9)return'patch';if(_0x275da9===_0x277ac7(0x16f)||_0x275da9==='patch')return _0x275da9;throw CliErrors[_0x277ac7(0x17f)](_0x277ac7(0x157));}function parseSelection(_0x5c475e,_0x51f533=!![]){const _0x5e81f6=a101_0xc40232,_0x572c2b=_0x5c475e[_0x5e81f6(0x181)](_0x5e81f6(0x13b)),_0x11760f=parseMenuIds(_0x5c475e['str']('menu-ids')),_0x3fda8c=parseCsv(_0x5c475e[_0x5e81f6(0x147)](_0x5e81f6(0x13c))),_0xef0490=_0x11760f[_0x5e81f6(0x145)]>0x0||_0x3fda8c[_0x5e81f6(0x145)]>0x0;if(_0x572c2b&&_0xef0490)throw CliErrors[_0x5e81f6(0x17f)]('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x572c2b&&!_0xef0490){if(!_0x51f533)return undefined;throw CliErrors[_0x5e81f6(0x17f)]('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}return{'all':_0x572c2b,'menuIds':_0x11760f,'paths':_0x3fda8c};}function parseMenuIds(_0x4446b2){const _0xf797c7=a101_0xc40232,_0x5eda09=parseCsv(_0x4446b2),_0x3fdd60=_0x5eda09[_0xf797c7(0x171)](Number);if(_0x3fdd60[_0xf797c7(0x177)](_0x61871d=>!Number[_0xf797c7(0x164)](_0x61871d)||_0x61871d<=0x0))throw CliErrors[_0xf797c7(0x17f)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x3fdd60)];}function parseCsv(_0x3aee4f){const _0x23133d=a101_0xc40232;return[...new Set(_0x3aee4f[_0x23133d(0x14e)](',')[_0x23133d(0x171)](_0x43dc36=>_0x43dc36[_0x23133d(0x142)]())[_0x23133d(0x179)](Boolean))];}function parseLoadScriptMode(_0x248374){const _0x27ba29=a101_0xc40232;if(!_0x248374)return undefined;if(_0x248374===_0x27ba29(0x156)||_0x248374===_0x27ba29(0x17a)||_0x248374===_0x27ba29(0x13f))return _0x248374;throw CliErrors[_0x27ba29(0x17f)](_0x27ba29(0x149));}function parseParams(_0x91103f){const _0x1617a9=a101_0xc40232;if(!_0x91103f)return{};try{const _0x53ac40=JSON[_0x1617a9(0x158)](_0x91103f);if(typeof _0x53ac40!==_0x1617a9(0x153)||_0x53ac40===null||Array[_0x1617a9(0x13a)](_0x53ac40))return{};return{'jsUrl':typeof _0x53ac40[_0x1617a9(0x174)]===_0x1617a9(0x152)?_0x53ac40[_0x1617a9(0x174)][_0x1617a9(0x142)]():undefined,'cssUrl':typeof _0x53ac40[_0x1617a9(0x182)]===_0x1617a9(0x152)?_0x53ac40['cssUrl']['trim']():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a102_0x45adbd=a102_0x2a24;(function(_0x3f8016,_0x50ffc2){const _0x56ed37=a102_0x2a24,_0x4eb955=_0x3f8016();while(!![]){try{const _0x54a30c=-parseInt(_0x56ed37(0x1a7))/0x1*(-parseInt(_0x56ed37(0x14a))/0x2)+parseInt(_0x56ed37(0x199))/0x3+parseInt(_0x56ed37(0x196))/0x4+parseInt(_0x56ed37(0x184))/0x5+-parseInt(_0x56ed37(0x180))/0x6+-parseInt(_0x56ed37(0x168))/0x7*(-parseInt(_0x56ed37(0x149))/0x8)+-parseInt(_0x56ed37(0x1a5))/0x9;if(_0x54a30c===_0x50ffc2)break;else _0x4eb955['push'](_0x4eb955['shift']());}catch(_0x27a58c){_0x4eb955['push'](_0x4eb955['shift']());}}}(a102_0x157d,0x80a7d));function a102_0x157d(){const _0x57bdcf=['plan','path','bool','selector','The\x20backend\x20acknowledged\x20the\x20batch\x20request,\x20but\x20final\x20menu\x20facts\x20did\x20not\x20confirm\x20every\x20deletion.','add','dry-run','8833329CmctxX','unconfirmed','35JInsus',';\x20execution\x20must\x20consume\x20','message','\x22;\x20--recursive\x20requires\x20a\x20folder\x20root.','\x20is\x20type\x20\x22','Page\x20bindings\x20are\x20referenced\x20by\x20menus\x20outside\x20the\x20delete\x20plan:\x20','Menu\x20delete\x20execution\x20consumes\x20only\x20--plan;\x20remove\x20','boolean','plan-validation','length','read\x20menu\x20state\x20after\x20batch\x20delete\x20count\x20mismatch','filter','rabetbase\x20menu\x20list\x20--format\x20json','stringify','appCode','Remove\x20or\x20verify\x20the\x20resource\x20bindings\x20in\x20the\x20platform\x20before\x20deleting\x20the\x20folder.','has','resources','byId','batch-delete-menu','delete','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20do\x20not\x20remove\x20or\x20reorder\x20targets.','menu_batch_delete_count_mismatch','\x20and\x20cannot\x20be\x20deleted\x20safely.','folder','8XqXakf','25086sQGAmE','menu_plan_invalid','Inspect\x20the\x20latest\x20menu\x20facts\x20and\x20generate\x20a\x20new\x20delete\x20plan;\x20do\x20not\x20retry\x20this\x20plan.','push','causeMessage','deleteOrder','type','Menu\x20tree\x20contains\x20a\x20cycle\x20at\x20menu\x20','menu\x20list','Deleted\x20','absentIds','unknown','\x20has\x20','resourcesValid','plan-out','validation','POST','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20absence','target','Required\x20for\x20execution;\x20consume\x20an\x20unexpired\x20plan\x20created\x20by\x20--plan-out','verification','str','Deleting\x20page-bound\x20menus\x20invokes\x20the\x20platform\x27s\x20existing\x20page\x20and\x20PageSchema\x20cascade;\x20listed\x20page\x20ids\x20are\x20direct\x20menu\x20bindings.','Folder\x20','childrenIds','--plan-out\x20is\x20required\x20for\x20menu\x20delete\x20dry-run\x20so\x20execution\x20can\x20consume\x20the\x20reviewed\x20plan.','\x20is\x20not\x20a\x20folder.','batch\x20delete','menu_folder_has_resources','snapshotHash','2770971EYDLjX','menu','read\x20menu\x20state\x20after\x20batch\x20delete\x20failure','map','Exact\x20menu\x20id\x20(required\x20with\x20--dry-run)','remainingIds','menu_tree_invalid','menu_delete_page_bound','pre-write-plan-validation','Keep\x20every\x20shared\x20page\x20reference\x20outside\x20this\x20operation,\x20or\x20choose\x20a\x20folder\x20whose\x20complete\x20subtree\x20contains\x20all\x20references.','Include\x20every\x20descendant\x20of\x20the\x20exact\x20folder\x20id,\x20deleting\x20leaves\x20first','string','size','createdAt','Menu\x20','failed','Delete\x20an\x20exact\x20menu\x20or\x20a\x20folder\x20subtree\x20from\x20a\x20reviewed\x20plan','Inspect\x20the\x20folder\x20in\x20the\x20platform\x20before\x20deleting\x20it.','Would\x20batch\x20delete\x20','\x20direct\x20child\x20menu(s)\x20and\x20cannot\x20be\x20deleted.','pageId','The\x20batch\x20delete\x20request\x20was\x20accepted,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.','Handle\x20child\x20ids\x20in\x20the\x20platform\x20first:\x20','toLowerCase','5937228ZcqulY','The\x20batch\x20response\x20count\x20did\x20not\x20match\x20the\x20reviewed\x20target\x20count;\x20do\x20not\x20retry\x20the\x20same\x20plan.','expect-path','trim','2676090vXnzxC','flagMissing','indexOf','Menu\x20delete\x20plan\x20does\x20not\x20contain\x20the\x20complete\x20current\x20subtree\x20in\x20leaf-first\x20order.','cookie','Required\x20with\x20--dry-run;\x20write\x20the\x20reviewed\x20plan\x20to\x20a\x20new\x20local\x20JSON\x20file','cascade','):\x20','join','batch-delete','expiresAt','childrenCount','/smartapi/menu/batchDelete','Post-failure\x20menu\x20readback\x20failed\x20(','menu_verification_failed','recursive','\x20deleted\x20menus;\x20expected\x20','\x20references\x20missing\x20child\x20','2830536XIhxrd','Post-mismatch\x20menu\x20readback\x20failed\x20(','plan\x20delete','1260846RVLRmE','causeCode','One\x20or\x20more\x20planned\x20menus\x20are\x20still\x20present\x20after\x20the\x20batch\x20delete\x20request:\x20','verify\x20batch\x20delete','forEach'];a102_0x157d=function(){return _0x57bdcf;};return a102_0x157d();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertMenuDeletePlanCurrent,assertMenuDeletePlanExecutable,createMenuDeletePlanFile,mutationPlanFromDeleteFile,readMenuDeletePlan,writeMenuDeletePlan}from'../../commands/menu/shared/delete-plan.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{MENU_EXPECT_FLAGS,MENU_ID_FLAG,asVerificationError,assertExpectedState,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,requireExplicitYes,requireMenu,validateExactId}from'../../commands/menu/shared/mutations.js';import{batchDeleteMenuEntities}from'../../commands/menu/shared/service.js';import{CliError,CliErrors}from'../../errors.js';function a102_0x2a24(_0x9f7c96,_0xebe4b6){_0x9f7c96=_0x9f7c96-0x138;const _0x157ded=a102_0x157d();let _0x2a24df=_0x157ded[_0x9f7c96];return _0x2a24df;}const BACKEND=[{'method':a102_0x45adbd(0x15a),'path':a102_0x45adbd(0x190)}],MENU_DELETE_ID_FLAG={...MENU_ID_FLAG,'required':![],'description':a102_0x45adbd(0x16c)},MENU_DELETE_RECURSIVE_FLAG={'name':a102_0x45adbd(0x193),'type':a102_0x45adbd(0x1ae),'description':a102_0x45adbd(0x172)},MENU_DELETE_PLAN_OUT_FLAG={'name':a102_0x45adbd(0x158),'type':a102_0x45adbd(0x173),'description':a102_0x45adbd(0x189)},MENU_DELETE_PLAN_FLAG={'name':a102_0x45adbd(0x19e),'type':a102_0x45adbd(0x173),'description':a102_0x45adbd(0x15d)};export const menuDelete={'service':a102_0x45adbd(0x169),'command':a102_0x45adbd(0x144),'description':a102_0x45adbd(0x178),'risk':'high-risk-write','structuredErrors':!![],'flags':[MENU_DELETE_ID_FLAG,MENU_DELETE_RECURSIVE_FLAG,MENU_DELETE_PLAN_OUT_FLAG,MENU_DELETE_PLAN_FLAG,...MENU_EXPECT_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x17b4c4){const _0x1b593b=a102_0x45adbd;_0x17b4c4[_0x1b593b(0x1a0)](_0x1b593b(0x1a4))?validateDeleteDryRunInput(_0x17b4c4):validateDeleteExecuteInput(_0x17b4c4),requireExplicitYes(_0x17b4c4);},async 'dryRun'(_0xe89c8a){const _0x224bc2=a102_0x45adbd;validateDeleteDryRunInput(_0xe89c8a);const _0x1cf7c4=await buildDeletePlan(_0xe89c8a),_0x229d20=createMenuDeletePlanFile(_0xe89c8a[_0x224bc2(0x13e)],_0x1cf7c4),_0x186038=await writeMenuDeletePlan(_0xe89c8a[_0x224bc2(0x15f)](_0x224bc2(0x158)),_0x229d20),_0x55b448=mutationResult({..._0x1cf7c4,'planFile':{'path':_0x186038,'createdAt':_0x229d20[_0x224bc2(0x175)],'expiresAt':_0x229d20[_0x224bc2(0x18e)]}});return menuDryRunResult(_0x55b448,{'method':_0x224bc2(0x15a),'url':_0x224bc2(0x190),'body':{'idList':_0x55b448[_0x224bc2(0x14f)]},'description':_0x224bc2(0x17a)+(_0x55b448[_0x224bc2(0x14f)]?.[_0x224bc2(0x139)]??0x1)+'\x20menu(s)\x20under\x20exact\x20id\x20'+_0x55b448[_0x224bc2(0x1a1)]['id']+_0x224bc2(0x1a8)+_0x186038+'.'});},async 'execute'(_0x1fe02e){const _0x3963f5=a102_0x45adbd;requireExplicitYes(_0x1fe02e),validateDeleteExecuteInput(_0x1fe02e);const _0x55299d=await readMenuDeletePlan(_0x1fe02e[_0x3963f5(0x15f)]('plan')),_0x4ff36f=mutationPlanFromDeleteFile(_0x55299d[_0x3963f5(0x19e)],_0x55299d[_0x3963f5(0x19f)]),_0x478be3=_0x55299d[_0x3963f5(0x19e)][_0x3963f5(0x15c)]['id'];try{assertMenuDeletePlanExecutable(_0x55299d[_0x3963f5(0x19e)],_0x1fe02e[_0x3963f5(0x13e)]);}catch(_0x5763e8){throw menuFailure(asMenuError(_0x5763e8),_0x4ff36f,{'stage':_0x3963f5(0x138),'failed':{'id':_0x478be3}});}let _0x2f1e02,_0x406d1f;try{_0x2f1e02=await fetchMutationSnapshot(_0x1fe02e,'execute\x20reviewed\x20delete\x20plan',_0x478be3),_0x406d1f=assertMenuDeletePlanCurrent(_0x55299d[_0x3963f5(0x19e)],_0x1fe02e['appCode'],_0x2f1e02),assertDeleteTargetsComplete(_0x55299d['plan'],_0x2f1e02),_0x406d1f[_0x3963f5(0x19d)](_0xfe9809=>assertDeleteSafety(_0xfe9809,_0x55299d[_0x3963f5(0x19e)][_0x3963f5(0x193)])),assertNoSharedPages(_0x2f1e02,_0x406d1f),assertCascadeMatchesPlan(_0x4ff36f,_0x406d1f);}catch(_0x5c7967){throw menuFailure(asMenuError(_0x5c7967),_0x4ff36f,{'stage':_0x3963f5(0x170),'failed':{'id':_0x478be3}});}const _0x572130=_0x55299d[_0x3963f5(0x19e)][_0x3963f5(0x14f)];let _0x19ba5e;try{_0x19ba5e=await batchDeleteMenuEntities(_0x1fe02e[_0x3963f5(0x188)],_0x572130);}catch(_0x55eecb){const _0xa3646b=mapMenuApiError(_0x55eecb,_0x3963f5(0x165)),_0x392238=['The\x20batch\x20delete\x20may\x20have\x20partially\x20applied;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20creating\x20a\x20new\x20plan.'];let _0x3b1f80;try{_0x3b1f80=await readDeleteOutcome(_0x1fe02e,_0x572130);}catch(_0x3537d3){const _0x5d5339=describeMenuErrorCause(_0x3537d3,_0x3963f5(0x16a),_0x478be3);_0x392238[_0x3963f5(0x14d)](_0x3963f5(0x191)+_0x5d5339[_0x3963f5(0x19a)]+_0x3963f5(0x18b)+_0x5d5339[_0x3963f5(0x14e)]);throw menuFailure(_0xa3646b,_0x4ff36f,{'stage':_0x3963f5(0x18d),'failed':{'targetIds':_0x572130,'targetIdsAbsent':'unconfirmed',..._0x5d5339},'warnings':_0x392238,'verification':{'status':_0x3963f5(0x177),'lookupCommand':_0x3963f5(0x13c),'targetIds':_0x572130}});}throw menuFailure(_0xa3646b,_0x4ff36f,{'stage':_0x3963f5(0x18d),'succeeded':_0x3b1f80[_0x3963f5(0x154)][_0x3963f5(0x16b)](_0x25f0f0=>({'id':_0x25f0f0,'deleted':!![]})),'failed':{'targetIds':_0x572130,'absentIds':_0x3b1f80[_0x3963f5(0x154)],'remainingIds':_0x3b1f80[_0x3963f5(0x16d)]},'warnings':_0x392238,'verification':verificationFromOutcome(_0x3b1f80)});}if(_0x19ba5e!==_0x572130[_0x3963f5(0x139)]){const _0x41ba09=menuError(_0x3963f5(0x146),'Backend\x20reported\x20'+_0x19ba5e+_0x3963f5(0x194)+_0x572130['length']+'.',_0x3963f5(0x14c)),_0x1a0451=[_0x3963f5(0x181)];let _0x266247;try{_0x266247=await readDeleteOutcome(_0x1fe02e,_0x572130);}catch(_0x44b484){const _0x233f05=describeMenuErrorCause(_0x44b484,_0x3963f5(0x13a),_0x478be3);_0x1a0451[_0x3963f5(0x14d)](_0x3963f5(0x197)+_0x233f05[_0x3963f5(0x19a)]+_0x3963f5(0x18b)+_0x233f05[_0x3963f5(0x14e)]);throw menuFailure(_0x41ba09,_0x4ff36f,{'stage':_0x3963f5(0x18d),'failed':{'targetIds':_0x572130,'expectedCount':_0x572130[_0x3963f5(0x139)],'reportedDeletedCount':_0x19ba5e,'targetIdsAbsent':_0x3963f5(0x1a6),..._0x233f05},'warnings':_0x1a0451,'verification':{'status':'failed','lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20json','targetIds':_0x572130}});}throw menuFailure(_0x41ba09,_0x4ff36f,{'stage':_0x3963f5(0x18d),'succeeded':_0x266247['absentIds']['map'](_0xacfaab=>({'id':_0xacfaab,'deleted':!![]})),'failed':{'targetIds':_0x572130,'expectedCount':_0x572130[_0x3963f5(0x139)],'reportedDeletedCount':_0x19ba5e,'absentIds':_0x266247[_0x3963f5(0x154)],'remainingIds':_0x266247[_0x3963f5(0x16d)]},'warnings':_0x1a0451,'verification':verificationFromOutcome(_0x266247)});}let _0x4b8516;try{_0x4b8516=await readDeleteOutcome(_0x1fe02e,_0x572130);}catch(_0x3d14ad){const _0x187d65=describeMenuErrorCause(_0x3d14ad,_0x3963f5(0x19c),_0x478be3),_0x4fb2a7=asVerificationError(_0x3d14ad,'Batch\x20delete\x20request\x20for\x20menu\x20'+_0x478be3+_0x3963f5(0x15b));throw menuFailure(_0x4fb2a7,_0x4ff36f,{'stage':_0x3963f5(0x15e),'succeeded':_0x572130[_0x3963f5(0x16b)](_0x53ce29=>({'id':_0x53ce29,'deleteRequested':!![]})),'failed':{'id':_0x478be3,'targetIds':_0x572130,'targetIdsAbsent':_0x3963f5(0x1a6),..._0x187d65},'warnings':[_0x3963f5(0x17d)],'verification':{'status':'failed','lookupCommand':_0x3963f5(0x13c),'targetIds':_0x572130}});}if(_0x4b8516[_0x3963f5(0x16d)][_0x3963f5(0x139)]>0x0){const _0x227941=menuError(_0x3963f5(0x192),_0x3963f5(0x19b)+_0x4b8516[_0x3963f5(0x16d)][_0x3963f5(0x18c)](',\x20')+'.',_0x3963f5(0x14c));throw menuFailure(_0x227941,_0x4ff36f,{'stage':'verification','succeeded':_0x572130[_0x3963f5(0x16b)](_0x27c3ef=>({'id':_0x27c3ef,'deleteRequested':!![]})),'failed':{'id':_0x478be3,'targetIds':_0x572130,'absentIds':_0x4b8516[_0x3963f5(0x154)],'remainingIds':_0x4b8516[_0x3963f5(0x16d)]},'warnings':[_0x3963f5(0x1a2)],'verification':verificationFromOutcome(_0x4b8516)});}const _0x380ce0=_0x572130[_0x3963f5(0x16b)](_0x1b2c59=>({'id':_0x1b2c59,'deleted':!![]})),_0x37b33c=mutationResult({..._0x4ff36f,'dryRun':![],'succeeded':_0x380ce0,'verification':{'checkedBy':_0x3963f5(0x152),'plannedSnapshotHash':_0x4ff36f[_0x3963f5(0x167)],'finalSnapshotHash':_0x4b8516['snapshot']['hash'],'reportedDeletedCount':_0x19ba5e,'targetAbsent':!_0x4b8516['snapshot'][_0x3963f5(0x142)][_0x3963f5(0x140)](_0x478be3),'allTargetsAbsent':!![],'targetIds':_0x572130}});return{'ok':!![],'data':_0x37b33c,'message':_0x3963f5(0x153)+_0x380ce0[_0x3963f5(0x139)]+'\x20menu(s)\x20under\x20exact\x20id\x20'+_0x478be3+'.'};}};async function readDeleteOutcome(_0x378328,_0x2b0d3c){const _0x143ca2=a102_0x45adbd,_0x37e321=await fetchMenuSnapshot(_0x378328[_0x143ca2(0x13e)],_0x378328[_0x143ca2(0x188)]);return{'snapshot':_0x37e321,'absentIds':_0x2b0d3c[_0x143ca2(0x13b)](_0x201f03=>!_0x37e321[_0x143ca2(0x142)][_0x143ca2(0x140)](_0x201f03)),'remainingIds':_0x2b0d3c['filter'](_0x31158e=>_0x37e321['byId'][_0x143ca2(0x140)](_0x31158e))};}function verificationFromOutcome(_0x41ca47){const _0x190e5b=a102_0x45adbd;return{'checkedBy':_0x190e5b(0x152),'absentIds':_0x41ca47[_0x190e5b(0x154)],'remainingIds':_0x41ca47['remainingIds']};}function validateDeleteDryRunInput(_0x11e896){const _0x2a2fa1=a102_0x45adbd;validateExactId(_0x11e896);if(!hasFlag(_0x11e896,_0x2a2fa1(0x158))||!_0x11e896[_0x2a2fa1(0x15f)](_0x2a2fa1(0x158))['trim']())throw CliErrors['flagMissing'](_0x2a2fa1(0x158),_0x2a2fa1(0x163));if(hasFlag(_0x11e896,'plan'))throw CliErrors[_0x2a2fa1(0x159)]('--plan\x20cannot\x20be\x20combined\x20with\x20--dry-run;\x20use\x20--plan-out.');}function validateDeleteExecuteInput(_0xbb0680){const _0x52b3d9=a102_0x45adbd;if(!hasFlag(_0xbb0680,_0x52b3d9(0x19e))||!_0xbb0680[_0x52b3d9(0x15f)]('plan')[_0x52b3d9(0x183)]())throw CliErrors[_0x52b3d9(0x185)](_0x52b3d9(0x19e),'--plan\x20is\x20required\x20for\x20menu\x20delete\x20execution.');const _0x1b6919=['id',_0x52b3d9(0x193),_0x52b3d9(0x158),'expect-parent-id',_0x52b3d9(0x182),'expected-children-count'][_0x52b3d9(0x13b)](_0x34df39=>hasFlag(_0xbb0680,_0x34df39));if(_0x1b6919[_0x52b3d9(0x139)]>0x0)throw CliErrors[_0x52b3d9(0x159)](_0x52b3d9(0x1ad)+_0x1b6919[_0x52b3d9(0x16b)](_0x2c4005=>'--'+_0x2c4005)[_0x52b3d9(0x18c)](',\x20')+'.');}async function buildDeletePlan(_0xed320a){const _0x24e1a6=a102_0x45adbd,_0x2e8bf1=validateExactId(_0xed320a),_0x1e0b68=await fetchMutationSnapshot(_0xed320a,_0x24e1a6(0x198),_0x2e8bf1),_0x52e9d4=requireMenu(_0x1e0b68,_0x2e8bf1);assertExpectedState(_0xed320a,_0x52e9d4);const _0x5cc6b1=_0xed320a[_0x24e1a6(0x1a0)](_0x24e1a6(0x193));let _0x4cc959;if(_0x5cc6b1){if(_0x52e9d4[_0x24e1a6(0x150)][_0x24e1a6(0x183)]()['toLowerCase']()!=='folder')throw menuError('menu_recursive_requires_folder',_0x24e1a6(0x176)+_0x52e9d4['id']+_0x24e1a6(0x1ab)+(_0x52e9d4[_0x24e1a6(0x150)]||_0x24e1a6(0x155))+_0x24e1a6(0x1aa));_0x4cc959=collectDeleteTargets(_0x1e0b68,_0x52e9d4),_0x4cc959[_0x24e1a6(0x19d)](_0x397dd3=>assertDeleteSafety(_0x397dd3,!![]));}else assertDeleteSafety(_0x52e9d4),_0x4cc959=[_0x52e9d4];assertNoSharedPages(_0x1e0b68,_0x4cc959);const _0x2c402e=_0x4cc959['map'](_0x482152=>_0x482152['id']),_0x3def5a=cascadeForTargets(_0x4cc959),_0x1920a6=_0x3def5a['pages'][_0x24e1a6(0x139)]>0x0?[_0x24e1a6(0x160)]:[];return mutationResult({'operation':_0x24e1a6(0x144),'selector':{'id':_0x2e8bf1,'recursive':_0x5cc6b1},'before':_0x52e9d4,'after':null,'dryRun':!![],'backend':[...BACKEND],'plannedActions':[{'stage':_0x24e1a6(0x143),'method':_0x24e1a6(0x15a),'path':_0x24e1a6(0x190),'body':{'idList':_0x2c402e}}],'targets':_0x4cc959,'deleteOrder':_0x2c402e,'snapshotHash':_0x1e0b68['hash'],'cascade':_0x3def5a,'warnings':_0x1920a6});}function assertDeleteSafety(_0x4108d5,_0x2f1b65=![]){const _0x4ba1bc=a102_0x45adbd,_0x518808=_0x4108d5[_0x4ba1bc(0x150)][_0x4ba1bc(0x183)]()[_0x4ba1bc(0x17f)]()===_0x4ba1bc(0x148);if(_0x4108d5[_0x4ba1bc(0x18f)]>0x0&&(!_0x2f1b65||!_0x518808))throw menuError('menu_non_empty',_0x4ba1bc(0x176)+_0x4108d5['id']+_0x4ba1bc(0x156)+_0x4108d5[_0x4ba1bc(0x18f)]+_0x4ba1bc(0x17b),_0x4ba1bc(0x17e)+_0x4108d5[_0x4ba1bc(0x162)][_0x4ba1bc(0x18c)](',\x20'));if(_0x518808&&_0x4108d5[_0x4ba1bc(0x17c)]!=null)throw menuError(_0x4ba1bc(0x16f),_0x4ba1bc(0x161)+_0x4108d5['id']+'\x20is\x20unexpectedly\x20bound\x20to\x20page\x20'+_0x4108d5['pageId']+_0x4ba1bc(0x147),_0x4ba1bc(0x179));if(!_0x518808)return;if(!_0x4108d5[_0x4ba1bc(0x157)])throw menuError('menu_folder_resources_invalid','Folder\x20'+_0x4108d5['id']+'\x20has\x20an\x20unreadable\x20extend.resources\x20value\x20and\x20cannot\x20be\x20proven\x20empty.','Inspect\x20and\x20repair\x20the\x20folder\x20resource\x20binding\x20in\x20the\x20platform\x20before\x20deleting\x20it.');if(_0x4108d5[_0x4ba1bc(0x141)][_0x4ba1bc(0x139)]>0x0)throw menuError(_0x4ba1bc(0x166),'Folder\x20'+_0x4108d5['id']+'\x20still\x20references\x20'+_0x4108d5[_0x4ba1bc(0x141)][_0x4ba1bc(0x139)]+'\x20resource\x20URL(s).',_0x4ba1bc(0x13f));}function collectDeleteTargets(_0x4f5170,_0x1b390){const _0x46068c=[],_0x3ae863=new Set(),_0x14935f=new Set(),_0x25230b=_0x59f536=>{const _0x14e985=a102_0x2a24;if(_0x3ae863[_0x14e985(0x140)](_0x59f536['id']))throw menuError(_0x14e985(0x16e),_0x14e985(0x151)+_0x59f536['id']+'.');if(_0x14935f['has'](_0x59f536['id']))return;_0x3ae863[_0x14e985(0x1a3)](_0x59f536['id']);for(const _0x1ea4a6 of _0x59f536['childrenIds']){const _0x40353e=_0x4f5170[_0x14e985(0x142)]['get'](_0x1ea4a6);if(!_0x40353e)throw menuError('menu_tree_invalid',_0x14e985(0x176)+_0x59f536['id']+_0x14e985(0x195)+_0x1ea4a6+'.');_0x25230b(_0x40353e);}_0x3ae863[_0x14e985(0x144)](_0x59f536['id']),_0x14935f['add'](_0x59f536['id']),_0x46068c[_0x14e985(0x14d)](_0x59f536);};return _0x25230b(_0x1b390),_0x46068c;}function assertDeleteTargetsComplete(_0x8913ab,_0x1c171e){const _0x43d508=a102_0x45adbd,_0x1c1ae3=requireMenu(_0x1c171e,_0x8913ab[_0x43d508(0x15c)]['id']);if(_0x8913ab[_0x43d508(0x193)]&&_0x1c1ae3[_0x43d508(0x150)][_0x43d508(0x183)]()['toLowerCase']()!==_0x43d508(0x148))throw menuError('menu_plan_invalid','Recursive\x20menu\x20delete\x20plan\x20root\x20'+_0x1c1ae3['id']+_0x43d508(0x164));const _0x500319=_0x8913ab['recursive']?collectDeleteTargets(_0x1c171e,_0x1c1ae3)['map'](_0x4b2e5a=>_0x4b2e5a['id']):[_0x1c1ae3['id']];if(JSON[_0x43d508(0x13d)](_0x8913ab[_0x43d508(0x14f)])!==JSON[_0x43d508(0x13d)](_0x500319))throw menuError('menu_plan_invalid',_0x43d508(0x187),_0x43d508(0x145));}function assertNoSharedPages(_0xfb8348,_0x1c00e8){const _0xb9f5e4=a102_0x45adbd,_0x155897=new Set(_0x1c00e8[_0xb9f5e4(0x16b)](_0x31b97c=>_0x31b97c['id'])),_0x24478b=new Set(_0x1c00e8[_0xb9f5e4(0x16b)](_0x4e7585=>_0x4e7585[_0xb9f5e4(0x17c)])[_0xb9f5e4(0x13b)](_0x31500a=>_0x31500a!=null));if(_0x24478b[_0xb9f5e4(0x174)]===0x0)return;const _0x10812e=_0xfb8348['menus'][_0xb9f5e4(0x13b)](_0x3605d7=>!_0x155897[_0xb9f5e4(0x140)](_0x3605d7['id'])&&_0x3605d7[_0xb9f5e4(0x17c)]!=null&&_0x24478b['has'](_0x3605d7[_0xb9f5e4(0x17c)]));if(_0x10812e[_0xb9f5e4(0x139)]===0x0)return;const _0x117b7f=_0x10812e['map'](_0x1ab10e=>'page\x20'+_0x1ab10e['pageId']+'\x20->\x20menu\x20'+_0x1ab10e['id'])[_0xb9f5e4(0x18c)](',\x20');throw menuError('menu_page_shared',_0xb9f5e4(0x1ac)+_0x117b7f+'.',_0xb9f5e4(0x171));}function assertCascadeMatchesPlan(_0x3cb3cd,_0x20cb3a){const _0xc41866=a102_0x45adbd,_0x492259=cascadeForTargets(_0x20cb3a);if(JSON[_0xc41866(0x13d)](_0x3cb3cd[_0xc41866(0x18a)])!==JSON[_0xc41866(0x13d)](_0x492259))throw menuError(_0xc41866(0x14b),'Menu\x20delete\x20plan\x20cascade\x20does\x20not\x20match\x20the\x20reviewed\x20target\x20page\x20facts.');}function cascadeForTargets(_0xb7509f){const _0x1f62e4=a102_0x45adbd,_0x6c0e82=_0xb7509f['map'](_0x58c697=>_0x58c697['pageId'])['filter'](_0x1c2562=>_0x1c2562!=null)['filter']((_0x594869,_0x19c834,_0x5b0277)=>_0x5b0277[_0x1f62e4(0x186)](_0x594869)===_0x19c834);return{'pages':_0x6c0e82,'pageSchemaAffected':_0x6c0e82[_0x1f62e4(0x139)]>0x0};}function asMenuError(_0x116495){const _0x4971d7=a102_0x45adbd;return _0x116495 instanceof CliError?_0x116495:menuError(_0x4971d7(0x14b),_0x116495 instanceof Error?_0x116495[_0x4971d7(0x1a9)]:String(_0x116495));}
|
|
1
|
+
const a102_0x59e587=a102_0x4582;(function(_0x2d909d,_0x497e3c){const _0x3e02af=a102_0x4582,_0x2bf72b=_0x2d909d();while(!![]){try{const _0x5deeb5=-parseInt(_0x3e02af(0x21d))/0x1+-parseInt(_0x3e02af(0x1f6))/0x2+parseInt(_0x3e02af(0x237))/0x3*(-parseInt(_0x3e02af(0x234))/0x4)+parseInt(_0x3e02af(0x243))/0x5*(parseInt(_0x3e02af(0x226))/0x6)+parseInt(_0x3e02af(0x1eb))/0x7*(parseInt(_0x3e02af(0x227))/0x8)+parseInt(_0x3e02af(0x23a))/0x9+parseInt(_0x3e02af(0x1e6))/0xa*(parseInt(_0x3e02af(0x24d))/0xb);if(_0x5deeb5===_0x497e3c)break;else _0x2bf72b['push'](_0x2bf72b['shift']());}catch(_0x494558){_0x2bf72b['push'](_0x2bf72b['shift']());}}}(a102_0x57e8,0xb6d78));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertMenuDeletePlanCurrent,assertMenuDeletePlanExecutable,createMenuDeletePlanFile,mutationPlanFromDeleteFile,readMenuDeletePlan,writeMenuDeletePlan}from'../../commands/menu/shared/delete-plan.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{MENU_EXPECT_FLAGS,MENU_ID_FLAG,asVerificationError,assertExpectedState,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,requireExplicitYes,requireMenu,validateExactId}from'../../commands/menu/shared/mutations.js';import{batchDeleteMenuEntities}from'../../commands/menu/shared/service.js';import{CliError,CliErrors}from'../../errors.js';const BACKEND=[{'method':a102_0x59e587(0x24b),'path':a102_0x59e587(0x253)}],MENU_DELETE_ID_FLAG={...MENU_ID_FLAG,'required':![],'description':a102_0x59e587(0x1ee)},MENU_DELETE_RECURSIVE_FLAG={'name':'recursive','type':'boolean','description':a102_0x59e587(0x22c)},MENU_DELETE_PLAN_OUT_FLAG={'name':a102_0x59e587(0x1f2),'type':a102_0x59e587(0x256),'description':a102_0x59e587(0x1f9)},MENU_DELETE_PLAN_FLAG={'name':a102_0x59e587(0x254),'type':a102_0x59e587(0x256),'description':a102_0x59e587(0x20e)};export const menuDelete={'service':a102_0x59e587(0x25b),'command':'delete','description':a102_0x59e587(0x236),'risk':a102_0x59e587(0x1e1),'structuredErrors':!![],'flags':[MENU_DELETE_ID_FLAG,MENU_DELETE_RECURSIVE_FLAG,MENU_DELETE_PLAN_OUT_FLAG,MENU_DELETE_PLAN_FLAG,...MENU_EXPECT_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3bad1e){const _0x1251e5=a102_0x59e587;_0x3bad1e[_0x1251e5(0x215)]('dry-run')?validateDeleteDryRunInput(_0x3bad1e):validateDeleteExecuteInput(_0x3bad1e),requireExplicitYes(_0x3bad1e);},async 'dryRun'(_0x3dd718){const _0x5147bd=a102_0x59e587;validateDeleteDryRunInput(_0x3dd718);const _0x78c78f=await buildDeletePlan(_0x3dd718),_0xa3cbd6=createMenuDeletePlanFile(_0x3dd718[_0x5147bd(0x1f0)],_0x78c78f),_0x53df5a=await writeMenuDeletePlan(_0x3dd718[_0x5147bd(0x250)]('plan-out'),_0xa3cbd6),_0xec7e38=mutationResult({..._0x78c78f,'planFile':{'path':_0x53df5a,'createdAt':_0xa3cbd6[_0x5147bd(0x240)],'expiresAt':_0xa3cbd6[_0x5147bd(0x200)]}});return menuDryRunResult(_0xec7e38,{'method':'POST','url':_0x5147bd(0x253),'body':{'idList':_0xec7e38[_0x5147bd(0x213)]},'description':'Would\x20batch\x20delete\x20'+(_0xec7e38['deleteOrder']?.[_0x5147bd(0x20b)]??0x1)+_0x5147bd(0x20c)+_0xec7e38[_0x5147bd(0x202)]['id']+_0x5147bd(0x22d)+_0x53df5a+'.'});},async 'execute'(_0x5c1e55){const _0x4cfb73=a102_0x59e587;requireExplicitYes(_0x5c1e55),validateDeleteExecuteInput(_0x5c1e55);const _0x300a0f=await readMenuDeletePlan(_0x5c1e55[_0x4cfb73(0x250)](_0x4cfb73(0x254))),_0x45f8f7=mutationPlanFromDeleteFile(_0x300a0f['plan'],_0x300a0f[_0x4cfb73(0x23c)]),_0xea097b=_0x300a0f[_0x4cfb73(0x254)][_0x4cfb73(0x1fe)]['id'];try{assertMenuDeletePlanExecutable(_0x300a0f[_0x4cfb73(0x254)],_0x5c1e55[_0x4cfb73(0x1f0)]);}catch(_0x59f668){throw menuFailure(asMenuError(_0x59f668),_0x45f8f7,{'stage':_0x4cfb73(0x204),'failed':{'id':_0xea097b}});}let _0x5f38a7,_0x546691;try{_0x5f38a7=await fetchMutationSnapshot(_0x5c1e55,_0x4cfb73(0x220),_0xea097b),_0x546691=assertMenuDeletePlanCurrent(_0x300a0f[_0x4cfb73(0x254)],_0x5c1e55['appCode'],_0x5f38a7),assertDeleteTargetsComplete(_0x300a0f[_0x4cfb73(0x254)],_0x5f38a7),_0x546691[_0x4cfb73(0x201)](_0x48ca62=>assertDeleteSafety(_0x48ca62,_0x300a0f[_0x4cfb73(0x254)][_0x4cfb73(0x1e4)])),assertNoSharedPages(_0x5f38a7,_0x546691),assertCascadeMatchesPlan(_0x45f8f7,_0x546691);}catch(_0x337411){throw menuFailure(asMenuError(_0x337411),_0x45f8f7,{'stage':'pre-write-plan-validation','failed':{'id':_0xea097b}});}const _0x2f9c52=_0x300a0f[_0x4cfb73(0x254)][_0x4cfb73(0x213)];let _0x548462;try{_0x548462=await batchDeleteMenuEntities(_0x5c1e55[_0x4cfb73(0x1e9)],_0x2f9c52);}catch(_0x17e983){const _0x563fa2=mapMenuApiError(_0x17e983,'batch\x20delete'),_0x386bc4=['The\x20batch\x20delete\x20may\x20have\x20partially\x20applied;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20creating\x20a\x20new\x20plan.'];let _0x2987af;try{_0x2987af=await readDeleteOutcome(_0x5c1e55,_0x2f9c52);}catch(_0x300d24){const _0x1803f1=describeMenuErrorCause(_0x300d24,_0x4cfb73(0x235),_0xea097b);_0x386bc4['push'](_0x4cfb73(0x25e)+_0x1803f1[_0x4cfb73(0x21a)]+'):\x20'+_0x1803f1['causeMessage']);throw menuFailure(_0x563fa2,_0x45f8f7,{'stage':_0x4cfb73(0x248),'failed':{'targetIds':_0x2f9c52,'targetIdsAbsent':_0x4cfb73(0x1e7),..._0x1803f1},'warnings':_0x386bc4,'verification':{'status':_0x4cfb73(0x263),'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20json','targetIds':_0x2f9c52}});}throw menuFailure(_0x563fa2,_0x45f8f7,{'stage':'batch-delete','succeeded':_0x2987af[_0x4cfb73(0x262)]['map'](_0x37ed65=>({'id':_0x37ed65,'deleted':!![]})),'failed':{'targetIds':_0x2f9c52,'absentIds':_0x2987af['absentIds'],'remainingIds':_0x2987af[_0x4cfb73(0x1ec)]},'warnings':_0x386bc4,'verification':verificationFromOutcome(_0x2987af)});}if(_0x548462!==_0x2f9c52['length']){const _0x5289c7=menuError(_0x4cfb73(0x210),_0x4cfb73(0x208)+_0x548462+_0x4cfb73(0x25a)+_0x2f9c52[_0x4cfb73(0x20b)]+'.',_0x4cfb73(0x20f)),_0x4d9fe8=[_0x4cfb73(0x206)];let _0x44ad78;try{_0x44ad78=await readDeleteOutcome(_0x5c1e55,_0x2f9c52);}catch(_0x5b82af){const _0x4085a7=describeMenuErrorCause(_0x5b82af,_0x4cfb73(0x245),_0xea097b);_0x4d9fe8[_0x4cfb73(0x1ef)](_0x4cfb73(0x252)+_0x4085a7[_0x4cfb73(0x21a)]+_0x4cfb73(0x23e)+_0x4085a7[_0x4cfb73(0x1fd)]);throw menuFailure(_0x5289c7,_0x45f8f7,{'stage':_0x4cfb73(0x248),'failed':{'targetIds':_0x2f9c52,'expectedCount':_0x2f9c52[_0x4cfb73(0x20b)],'reportedDeletedCount':_0x548462,'targetIdsAbsent':'unconfirmed',..._0x4085a7},'warnings':_0x4d9fe8,'verification':{'status':_0x4cfb73(0x263),'lookupCommand':_0x4cfb73(0x1f8),'targetIds':_0x2f9c52}});}throw menuFailure(_0x5289c7,_0x45f8f7,{'stage':'batch-delete','succeeded':_0x44ad78[_0x4cfb73(0x262)][_0x4cfb73(0x216)](_0x40cfb6=>({'id':_0x40cfb6,'deleted':!![]})),'failed':{'targetIds':_0x2f9c52,'expectedCount':_0x2f9c52[_0x4cfb73(0x20b)],'reportedDeletedCount':_0x548462,'absentIds':_0x44ad78[_0x4cfb73(0x262)],'remainingIds':_0x44ad78[_0x4cfb73(0x1ec)]},'warnings':_0x4d9fe8,'verification':verificationFromOutcome(_0x44ad78)});}let _0x588963;try{_0x588963=await readDeleteOutcome(_0x5c1e55,_0x2f9c52);}catch(_0x2dcb71){const _0x355894=describeMenuErrorCause(_0x2dcb71,_0x4cfb73(0x21e),_0xea097b),_0x22ce35=asVerificationError(_0x2dcb71,_0x4cfb73(0x247)+_0xea097b+_0x4cfb73(0x224));throw menuFailure(_0x22ce35,_0x45f8f7,{'stage':_0x4cfb73(0x264),'succeeded':_0x2f9c52[_0x4cfb73(0x216)](_0x31d832=>({'id':_0x31d832,'deleteRequested':!![]})),'failed':{'id':_0xea097b,'targetIds':_0x2f9c52,'targetIdsAbsent':_0x4cfb73(0x1e7),..._0x355894},'warnings':[_0x4cfb73(0x211)],'verification':{'status':_0x4cfb73(0x263),'lookupCommand':_0x4cfb73(0x1f8),'targetIds':_0x2f9c52}});}if(_0x588963['remainingIds'][_0x4cfb73(0x20b)]>0x0){const _0x2f31bf=menuError(_0x4cfb73(0x1ff),_0x4cfb73(0x255)+_0x588963[_0x4cfb73(0x1ec)]['join'](',\x20')+'.','Inspect\x20the\x20latest\x20menu\x20facts\x20and\x20generate\x20a\x20new\x20delete\x20plan;\x20do\x20not\x20retry\x20this\x20plan.');throw menuFailure(_0x2f31bf,_0x45f8f7,{'stage':_0x4cfb73(0x264),'succeeded':_0x2f9c52[_0x4cfb73(0x216)](_0xb5995c=>({'id':_0xb5995c,'deleteRequested':!![]})),'failed':{'id':_0xea097b,'targetIds':_0x2f9c52,'absentIds':_0x588963['absentIds'],'remainingIds':_0x588963[_0x4cfb73(0x1ec)]},'warnings':[_0x4cfb73(0x22b)],'verification':verificationFromOutcome(_0x588963)});}const _0x15fbbb=_0x2f9c52[_0x4cfb73(0x216)](_0x5521ba=>({'id':_0x5521ba,'deleted':!![]})),_0x2de6b5=mutationResult({..._0x45f8f7,'dryRun':![],'succeeded':_0x15fbbb,'verification':{'checkedBy':'menu\x20list','plannedSnapshotHash':_0x45f8f7[_0x4cfb73(0x1e3)],'finalSnapshotHash':_0x588963[_0x4cfb73(0x25f)]['hash'],'reportedDeletedCount':_0x548462,'targetAbsent':!_0x588963['snapshot'][_0x4cfb73(0x249)][_0x4cfb73(0x1e8)](_0xea097b),'allTargetsAbsent':!![],'targetIds':_0x2f9c52}});return{'ok':!![],'data':_0x2de6b5,'message':_0x4cfb73(0x1f3)+_0x15fbbb['length']+_0x4cfb73(0x20c)+_0xea097b+'.'};}};async function readDeleteOutcome(_0xb58ef6,_0x2b8a88){const _0x150665=a102_0x59e587,_0x1fa96c=await fetchMenuSnapshot(_0xb58ef6['appCode'],_0xb58ef6[_0x150665(0x1e9)]);return{'snapshot':_0x1fa96c,'absentIds':_0x2b8a88['filter'](_0x3b4c64=>!_0x1fa96c[_0x150665(0x249)]['has'](_0x3b4c64)),'remainingIds':_0x2b8a88[_0x150665(0x212)](_0x652344=>_0x1fa96c[_0x150665(0x249)][_0x150665(0x1e8)](_0x652344))};}function verificationFromOutcome(_0x380124){const _0xd63ce7=a102_0x59e587;return{'checkedBy':_0xd63ce7(0x207),'absentIds':_0x380124['absentIds'],'remainingIds':_0x380124[_0xd63ce7(0x1ec)]};}function validateDeleteDryRunInput(_0x4143ac){const _0x5a0495=a102_0x59e587;validateExactId(_0x4143ac);if(!hasFlag(_0x4143ac,_0x5a0495(0x1f2))||!_0x4143ac['str']('plan-out')[_0x5a0495(0x260)]())throw CliErrors[_0x5a0495(0x1f4)](_0x5a0495(0x1f2),'--plan-out\x20is\x20required\x20for\x20menu\x20delete\x20dry-run\x20so\x20execution\x20can\x20consume\x20the\x20reviewed\x20plan.');if(hasFlag(_0x4143ac,_0x5a0495(0x254)))throw CliErrors[_0x5a0495(0x223)](_0x5a0495(0x1ea));}function a102_0x57e8(){const _0x59929a=['trim','add','absentIds','failed','verification','menu_folder_has_resources','high-risk-write','\x20is\x20not\x20a\x20folder.','snapshotHash','recursive','Handle\x20child\x20ids\x20in\x20the\x20platform\x20first:\x20','5146770nMqkkB','unconfirmed','has','cookie','--plan\x20cannot\x20be\x20combined\x20with\x20--dry-run;\x20use\x20--plan-out.','7Lwatzh','remainingIds','message','Exact\x20menu\x20id\x20(required\x20with\x20--dry-run)','push','appCode','\x20is\x20unexpectedly\x20bound\x20to\x20page\x20','plan-out','Deleted\x20','flagMissing','delete','2869970ByXhfX','folder','rabetbase\x20menu\x20list\x20--format\x20json','Required\x20with\x20--dry-run;\x20write\x20the\x20reviewed\x20plan\x20to\x20a\x20new\x20local\x20JSON\x20file','Recursive\x20menu\x20delete\x20plan\x20root\x20','childrenIds','Remove\x20or\x20verify\x20the\x20resource\x20bindings\x20in\x20the\x20platform\x20before\x20deleting\x20the\x20folder.','causeMessage','target','menu_verification_failed','expiresAt','forEach','selector','Menu\x20delete\x20plan\x20does\x20not\x20contain\x20the\x20complete\x20current\x20subtree\x20in\x20leaf-first\x20order.','plan-validation','type','The\x20batch\x20response\x20count\x20did\x20not\x20match\x20the\x20reviewed\x20target\x20count;\x20do\x20not\x20retry\x20the\x20same\x20plan.','menu\x20list','Backend\x20reported\x20','\x20is\x20type\x20\x22','\x20references\x20missing\x20child\x20','length','\x20menu(s)\x20under\x20exact\x20id\x20','resources','Required\x20for\x20execution;\x20consume\x20an\x20unexpired\x20plan\x20created\x20by\x20--plan-out','Inspect\x20the\x20latest\x20menu\x20facts\x20and\x20generate\x20a\x20new\x20delete\x20plan;\x20do\x20not\x20retry\x20this\x20plan.','menu_batch_delete_count_mismatch','The\x20batch\x20delete\x20request\x20was\x20accepted,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.','filter','deleteOrder','\x20and\x20cannot\x20be\x20deleted\x20safely.','bool','map','cascade','indexOf','Menu\x20delete\x20plan\x20cascade\x20does\x20not\x20match\x20the\x20reviewed\x20target\x20page\x20facts.','causeCode','\x20still\x20references\x20','\x20->\x20menu\x20','935683GxPWuE','verify\x20batch\x20delete','hash','execute\x20reviewed\x20delete\x20plan','stringify','batch-delete-menu','validation','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20absence','\x22;\x20--recursive\x20requires\x20a\x20folder\x20root.','676662OBQSmo','8272456roGicU','\x20has\x20an\x20unreadable\x20extend.resources\x20value\x20and\x20cannot\x20be\x20proven\x20empty.','toLowerCase','childrenCount','The\x20backend\x20acknowledged\x20the\x20batch\x20request,\x20but\x20final\x20menu\x20facts\x20did\x20not\x20confirm\x20every\x20deletion.','Include\x20every\x20descendant\x20of\x20the\x20exact\x20folder\x20id,\x20deleting\x20leaves\x20first',';\x20execution\x20must\x20consume\x20','menu_recursive_requires_folder','get','Inspect\x20the\x20folder\x20in\x20the\x20platform\x20before\x20deleting\x20it.','Menu\x20','Folder\x20','page\x20','3796636PFnUKh','read\x20menu\x20state\x20after\x20batch\x20delete\x20failure','Delete\x20an\x20exact\x20menu\x20or\x20a\x20folder\x20subtree\x20from\x20a\x20reviewed\x20plan','3UipYBU','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20do\x20not\x20remove\x20or\x20reorder\x20targets.','menu_page_shared','11515194exeuxO','menu_folder_resources_invalid','path','menu_tree_invalid','):\x20','expected-children-count','createdAt','expect-parent-id','pages','55itXPtW','\x20resource\x20URL(s).','read\x20menu\x20state\x20after\x20batch\x20delete\x20count\x20mismatch','Keep\x20every\x20shared\x20page\x20reference\x20outside\x20this\x20operation,\x20or\x20choose\x20a\x20folder\x20whose\x20complete\x20subtree\x20contains\x20all\x20references.','Batch\x20delete\x20request\x20for\x20menu\x20','batch-delete','byId','menu_non_empty','POST','Menu\x20delete\x20execution\x20consumes\x20only\x20--plan;\x20remove\x20','11PyJjvT','expect-path','menu_plan_invalid','str','resourcesValid','Post-mismatch\x20menu\x20readback\x20failed\x20(','/smartapi/menu/batchDelete','plan','One\x20or\x20more\x20planned\x20menus\x20are\x20still\x20present\x20after\x20the\x20batch\x20delete\x20request:\x20','string','\x20direct\x20child\x20menu(s)\x20and\x20cannot\x20be\x20deleted.','pageId','menus','\x20deleted\x20menus;\x20expected\x20','menu','Page\x20bindings\x20are\x20referenced\x20by\x20menus\x20outside\x20the\x20delete\x20plan:\x20','menu_delete_page_bound','Post-failure\x20menu\x20readback\x20failed\x20(','snapshot'];a102_0x57e8=function(){return _0x59929a;};return a102_0x57e8();}function validateDeleteExecuteInput(_0x587da0){const _0x52fe91=a102_0x59e587;if(!hasFlag(_0x587da0,_0x52fe91(0x254))||!_0x587da0[_0x52fe91(0x250)]('plan')[_0x52fe91(0x260)]())throw CliErrors[_0x52fe91(0x1f4)](_0x52fe91(0x254),'--plan\x20is\x20required\x20for\x20menu\x20delete\x20execution.');const _0x54ff62=['id',_0x52fe91(0x1e4),_0x52fe91(0x1f2),_0x52fe91(0x241),_0x52fe91(0x24e),_0x52fe91(0x23f)][_0x52fe91(0x212)](_0x304886=>hasFlag(_0x587da0,_0x304886));if(_0x54ff62[_0x52fe91(0x20b)]>0x0)throw CliErrors[_0x52fe91(0x223)](_0x52fe91(0x24c)+_0x54ff62['map'](_0x46c622=>'--'+_0x46c622)['join'](',\x20')+'.');}async function buildDeletePlan(_0x109e94){const _0x515c8d=a102_0x59e587,_0x53a537=validateExactId(_0x109e94),_0x49bc1f=await fetchMutationSnapshot(_0x109e94,'plan\x20delete',_0x53a537),_0x36a10d=requireMenu(_0x49bc1f,_0x53a537);assertExpectedState(_0x109e94,_0x36a10d);const _0x1a37b9=_0x109e94[_0x515c8d(0x215)](_0x515c8d(0x1e4));let _0x57c389;if(_0x1a37b9){if(_0x36a10d[_0x515c8d(0x205)][_0x515c8d(0x260)]()[_0x515c8d(0x229)]()!==_0x515c8d(0x1f7))throw menuError(_0x515c8d(0x22e),_0x515c8d(0x231)+_0x36a10d['id']+_0x515c8d(0x209)+(_0x36a10d['type']||'unknown')+_0x515c8d(0x225));_0x57c389=collectDeleteTargets(_0x49bc1f,_0x36a10d),_0x57c389[_0x515c8d(0x201)](_0x15caee=>assertDeleteSafety(_0x15caee,!![]));}else assertDeleteSafety(_0x36a10d),_0x57c389=[_0x36a10d];assertNoSharedPages(_0x49bc1f,_0x57c389);const _0x74583f=_0x57c389[_0x515c8d(0x216)](_0x58bb68=>_0x58bb68['id']),_0x2bf787=cascadeForTargets(_0x57c389),_0x731639=_0x2bf787[_0x515c8d(0x242)][_0x515c8d(0x20b)]>0x0?['Deleting\x20page-bound\x20menus\x20invokes\x20the\x20platform\x27s\x20existing\x20page\x20and\x20PageSchema\x20cascade;\x20listed\x20page\x20ids\x20are\x20direct\x20menu\x20bindings.']:[];return mutationResult({'operation':_0x515c8d(0x1f5),'selector':{'id':_0x53a537,'recursive':_0x1a37b9},'before':_0x36a10d,'after':null,'dryRun':!![],'backend':[...BACKEND],'plannedActions':[{'stage':_0x515c8d(0x222),'method':'POST','path':_0x515c8d(0x253),'body':{'idList':_0x74583f}}],'targets':_0x57c389,'deleteOrder':_0x74583f,'snapshotHash':_0x49bc1f[_0x515c8d(0x21f)],'cascade':_0x2bf787,'warnings':_0x731639});}function assertDeleteSafety(_0x82623,_0x19226b=![]){const _0x3bb107=a102_0x59e587,_0x4623f3=_0x82623[_0x3bb107(0x205)][_0x3bb107(0x260)]()[_0x3bb107(0x229)]()==='folder';if(_0x82623[_0x3bb107(0x22a)]>0x0&&(!_0x19226b||!_0x4623f3))throw menuError(_0x3bb107(0x24a),'Menu\x20'+_0x82623['id']+'\x20has\x20'+_0x82623['childrenCount']+_0x3bb107(0x257),_0x3bb107(0x1e5)+_0x82623[_0x3bb107(0x1fb)]['join'](',\x20'));if(_0x4623f3&&_0x82623[_0x3bb107(0x258)]!=null)throw menuError(_0x3bb107(0x25d),_0x3bb107(0x232)+_0x82623['id']+_0x3bb107(0x1f1)+_0x82623[_0x3bb107(0x258)]+_0x3bb107(0x214),_0x3bb107(0x230));if(!_0x4623f3)return;if(!_0x82623[_0x3bb107(0x251)])throw menuError(_0x3bb107(0x23b),'Folder\x20'+_0x82623['id']+_0x3bb107(0x228),'Inspect\x20and\x20repair\x20the\x20folder\x20resource\x20binding\x20in\x20the\x20platform\x20before\x20deleting\x20it.');if(_0x82623[_0x3bb107(0x20d)][_0x3bb107(0x20b)]>0x0)throw menuError(_0x3bb107(0x1e0),_0x3bb107(0x232)+_0x82623['id']+_0x3bb107(0x21b)+_0x82623['resources'][_0x3bb107(0x20b)]+_0x3bb107(0x244),_0x3bb107(0x1fc));}function collectDeleteTargets(_0x56fba0,_0x4ec951){const _0x5ddff1=[],_0x2e9adf=new Set(),_0x10754c=new Set(),_0x1c015a=_0x248e5f=>{const _0x2374d1=a102_0x4582;if(_0x2e9adf[_0x2374d1(0x1e8)](_0x248e5f['id']))throw menuError(_0x2374d1(0x23d),'Menu\x20tree\x20contains\x20a\x20cycle\x20at\x20menu\x20'+_0x248e5f['id']+'.');if(_0x10754c[_0x2374d1(0x1e8)](_0x248e5f['id']))return;_0x2e9adf['add'](_0x248e5f['id']);for(const _0x5bb3a4 of _0x248e5f[_0x2374d1(0x1fb)]){const _0x50ba0=_0x56fba0[_0x2374d1(0x249)][_0x2374d1(0x22f)](_0x5bb3a4);if(!_0x50ba0)throw menuError('menu_tree_invalid',_0x2374d1(0x231)+_0x248e5f['id']+_0x2374d1(0x20a)+_0x5bb3a4+'.');_0x1c015a(_0x50ba0);}_0x2e9adf[_0x2374d1(0x1f5)](_0x248e5f['id']),_0x10754c[_0x2374d1(0x261)](_0x248e5f['id']),_0x5ddff1[_0x2374d1(0x1ef)](_0x248e5f);};return _0x1c015a(_0x4ec951),_0x5ddff1;}function assertDeleteTargetsComplete(_0x2d012f,_0x398b7f){const _0x2488af=a102_0x59e587,_0x121b88=requireMenu(_0x398b7f,_0x2d012f[_0x2488af(0x1fe)]['id']);if(_0x2d012f['recursive']&&_0x121b88[_0x2488af(0x205)]['trim']()[_0x2488af(0x229)]()!==_0x2488af(0x1f7))throw menuError('menu_plan_invalid',_0x2488af(0x1fa)+_0x121b88['id']+_0x2488af(0x1e2));const _0x31743d=_0x2d012f[_0x2488af(0x1e4)]?collectDeleteTargets(_0x398b7f,_0x121b88)['map'](_0x443ca0=>_0x443ca0['id']):[_0x121b88['id']];if(JSON[_0x2488af(0x221)](_0x2d012f[_0x2488af(0x213)])!==JSON['stringify'](_0x31743d))throw menuError(_0x2488af(0x24f),_0x2488af(0x203),_0x2488af(0x238));}function assertNoSharedPages(_0x535a3a,_0x33488a){const _0x1a6eac=a102_0x59e587,_0x9f9891=new Set(_0x33488a[_0x1a6eac(0x216)](_0x333510=>_0x333510['id'])),_0x45001d=new Set(_0x33488a[_0x1a6eac(0x216)](_0x24834f=>_0x24834f[_0x1a6eac(0x258)])['filter'](_0x3f7a23=>_0x3f7a23!=null));if(_0x45001d['size']===0x0)return;const _0x18f3fe=_0x535a3a[_0x1a6eac(0x259)][_0x1a6eac(0x212)](_0x5bf057=>!_0x9f9891['has'](_0x5bf057['id'])&&_0x5bf057['pageId']!=null&&_0x45001d[_0x1a6eac(0x1e8)](_0x5bf057[_0x1a6eac(0x258)]));if(_0x18f3fe[_0x1a6eac(0x20b)]===0x0)return;const _0x50fe26=_0x18f3fe[_0x1a6eac(0x216)](_0x48c373=>_0x1a6eac(0x233)+_0x48c373[_0x1a6eac(0x258)]+_0x1a6eac(0x21c)+_0x48c373['id'])['join'](',\x20');throw menuError(_0x1a6eac(0x239),_0x1a6eac(0x25c)+_0x50fe26+'.',_0x1a6eac(0x246));}function a102_0x4582(_0x2b5cdd,_0x58941a){_0x2b5cdd=_0x2b5cdd-0x1e0;const _0x57e8f8=a102_0x57e8();let _0x4582f0=_0x57e8f8[_0x2b5cdd];return _0x4582f0;}function assertCascadeMatchesPlan(_0x2835e8,_0x1f7a9f){const _0xb9e485=a102_0x59e587,_0x5872f5=cascadeForTargets(_0x1f7a9f);if(JSON[_0xb9e485(0x221)](_0x2835e8[_0xb9e485(0x217)])!==JSON[_0xb9e485(0x221)](_0x5872f5))throw menuError(_0xb9e485(0x24f),_0xb9e485(0x219));}function cascadeForTargets(_0x3ea958){const _0x4ffff6=a102_0x59e587,_0x32f8d6=_0x3ea958[_0x4ffff6(0x216)](_0x49d347=>_0x49d347['pageId'])['filter'](_0x298123=>_0x298123!=null)[_0x4ffff6(0x212)]((_0x565a1c,_0x21c0c6,_0x5bfbbb)=>_0x5bfbbb[_0x4ffff6(0x218)](_0x565a1c)===_0x21c0c6);return{'pages':_0x32f8d6,'pageSchemaAffected':_0x32f8d6['length']>0x0};}function asMenuError(_0x3b52bf){const _0x1f9d32=a102_0x59e587;return _0x3b52bf instanceof CliError?_0x3b52bf:menuError('menu_plan_invalid',_0x3b52bf instanceof Error?_0x3b52bf[_0x1f9d32(0x1ed)]:String(_0x3b52bf));}
|