@lovrabet/rabetbase-cli 2.5.4-beta.5 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.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/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a172_0x228b(){const _0x5ddd33=['1777512vaAOaq','map','validation','app','string','2643861errxEY','780sdnLyC','app.extend.assets\x20must\x20be\x20an\x20array.','\x20resources','length','trim','menu\x20','246301QnQDbw','\x20must\x20be\x20an\x20array\x20of\x20URLs.','sharedResources','893014UebciJ','102294ZQXGPI','object','app.extend','str','10crcpjZ','message','assets','Duplicate\x20subapp\x20records\x20for\x20','\x20contains\x20invalid\x20JSON.','--app-name\x20is\x20required.','menu','resources','filter','appCode','subapp.resources','\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','appName','stringify','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','\x20must\x20be\x20a\x20JSON\x20object.','21QPcDlm','extend','36BCsdpw','parse','app-name','No\x20shared\x20resources\x20configured\x20for\x20','isArray','path','62332LuWBKo','sharedConfigured','623892UWhjOc','some'];a172_0x228b=function(){return _0x5ddd33;};return a172_0x228b();}const a172_0x371033=a172_0x30a4;(function(_0x45a35b,_0x3fa892){const _0x269411=a172_0x30a4,_0x4dd415=_0x45a35b();while(!![]){try{const _0x10101b=-parseInt(_0x269411(0x1db))/0x1+-parseInt(_0x269411(0x1dc))/0x2+-parseInt(_0x269411(0x1d1))/0x3+parseInt(_0x269411(0x1c8))/0x4*(parseInt(_0x269411(0x1af))/0x5)+parseInt(_0x269411(0x1ca))/0x6*(-parseInt(_0x269411(0x1c0))/0x7)+-parseInt(_0x269411(0x1cc))/0x8*(-parseInt(_0x269411(0x1c2))/0x9)+-parseInt(_0x269411(0x1d2))/0xa*(-parseInt(_0x269411(0x1d8))/0xb);if(_0x10101b===_0x3fa892)break;else _0x4dd415['push'](_0x4dd415['shift']());}catch(_0x15e248){_0x4dd415['push'](_0x4dd415['shift']());}}}(a172_0x228b,0x81282));import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x371c53,_0x3ac569){const _0x465867=a172_0x30a4,_0x5289ec=typeof _0x371c53===_0x465867(0x1d0)?parseJson(_0x371c53,_0x3ac569):_0x371c53;if(!_0x5289ec||typeof _0x5289ec!==_0x465867(0x1dd)||Array[_0x465867(0x1c6)](_0x5289ec))throw CliErrors[_0x465867(0x1ce)](_0x3ac569+_0x465867(0x1bf));return _0x5289ec;}function parseJson(_0x4f0121,_0x998f2e){const _0x52438b=a172_0x30a4;try{return JSON[_0x52438b(0x1c3)](_0x4f0121);}catch{throw CliErrors[_0x52438b(0x1ce)](_0x998f2e+_0x52438b(0x1b3));}}function resourceList(_0x28a40a,_0x2145e6){const _0x1227da=a172_0x30a4;if(typeof _0x28a40a!==_0x1227da(0x1d0))throw CliErrors[_0x1227da(0x1ce)](_0x2145e6+_0x1227da(0x1ba));const _0x1ae707=parseJson(_0x28a40a,_0x2145e6);if(!Array[_0x1227da(0x1c6)](_0x1ae707)||_0x1ae707[_0x1227da(0x1cb)](_0x421d6e=>typeof _0x421d6e!==_0x1227da(0x1d0)))throw CliErrors['validation'](_0x2145e6+_0x1227da(0x1d9));return _0x1ae707;}function a172_0x30a4(_0x586cf7,_0x105aae){_0x586cf7=_0x586cf7-0x1ad;const _0x228ba4=a172_0x228b();let _0x30a440=_0x228ba4[_0x586cf7];return _0x30a440;}export function buildSubappAssetsStatus(_0x22a441,_0x55582d,_0x1a9fa0){const _0x131777=a172_0x30a4,_0x5a9522=_0x22a441[_0x131777(0x1c1)]==null?{}:objectValue(_0x22a441[_0x131777(0x1c1)],_0x131777(0x1ad)),_0x2eb0db=_0x5a9522['assets']==null?[]:typeof _0x5a9522[_0x131777(0x1b1)]===_0x131777(0x1d0)?parseJson(_0x5a9522[_0x131777(0x1b1)],'app.extend.assets'):_0x5a9522['assets'];if(!Array[_0x131777(0x1c6)](_0x2eb0db))throw CliErrors[_0x131777(0x1ce)](_0x131777(0x1d3));const _0x47ee82=_0x2eb0db[_0x131777(0x1cd)]((_0x2a6703,_0x3cdcc0)=>objectValue(_0x2a6703,'app.extend.assets['+_0x3cdcc0+']')),_0x5a42e3=_0x47ee82[_0x131777(0x1b7)](_0x29a87d=>_0x29a87d[_0x131777(0x1bc)]===_0x1a9fa0);if(_0x5a42e3[_0x131777(0x1d5)]>0x1)throw CliErrors[_0x131777(0x1ce)](_0x131777(0x1b2)+_0x1a9fa0+'.');const _0x437a99=_0x5a42e3[0x0],_0x52a254=_0x437a99?.[_0x131777(0x1b6)]==null?[]:resourceList(_0x437a99['resources'],_0x131777(0x1b9)),_0x40281d=_0x55582d[_0x131777(0x1b7)](_0x35bd91=>_0x35bd91['extend']?.['appName']===_0x1a9fa0),_0x25e5b7=_0x40281d[_0x131777(0x1cd)](_0xcbcdc=>{const _0x296b62=_0x131777;let _0x2f13ed=null,_0x49293b=null;try{_0x2f13ed=_0xcbcdc[_0x296b62(0x1c1)]?.[_0x296b62(0x1b6)]==null?_0xcbcdc[_0x296b62(0x1b6)]:resourceList(_0xcbcdc[_0x296b62(0x1c1)][_0x296b62(0x1b6)],_0x296b62(0x1d7)+_0xcbcdc['id']+_0x296b62(0x1d4));}catch(_0x37590b){_0x49293b=_0x37590b instanceof Error?_0x37590b[_0x296b62(0x1b0)]:String(_0x37590b);}const _0x42f178=_0x52a254[_0x296b62(0x1d5)]>0x0?'app':_0x296b62(0x1b5),_0x3ae1b7=_0x42f178===_0x296b62(0x1cf)?_0x52a254:_0x2f13ed;return{'id':_0xcbcdc['id'],'path':_0xcbcdc[_0x296b62(0x1c7)],'preferredSourceIfSupported':_0x42f178,'preferredResourcesIfSupported':_0x3ae1b7,'menuFallbackResources':_0x2f13ed,'menuFallbackError':_0x49293b,'fallbackDiffers':_0x2f13ed===null?null:_0x42f178===_0x296b62(0x1cf)&&_0x2f13ed['length']>0x0&&JSON[_0x296b62(0x1bd)](_0x2f13ed)!==JSON[_0x296b62(0x1bd)](_0x3ae1b7)};});return{'appName':_0x1a9fa0,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x437a99),'sharedResources':_0x52a254,'loadScriptMode':_0x437a99?.['loadScriptMode']??null,'basename':_0x437a99?.['basename']??null,'boundMenus':_0x25e5b7['length'],'staleMenuFallbacks':_0x25e5b7[_0x131777(0x1b7)](_0x22859a=>_0x22859a['fallbackDiffers'])[_0x131777(0x1d5)],'menus':_0x25e5b7};}export async function assertSharedResourcesConfigured(_0x404ec0,_0x50b38d,_0x199ed2){const _0x5857e0=a172_0x30a4,_0x23cb18=await getSmartAppRecord(_0x404ec0,_0x50b38d),_0x4d4753=buildSubappAssetsStatus(_0x23cb18,[],_0x199ed2);if(!_0x4d4753[_0x5857e0(0x1c9)]||_0x4d4753[_0x5857e0(0x1da)][_0x5857e0(0x1d5)]===0x0)throw CliErrors[_0x5857e0(0x1ce)](_0x5857e0(0x1c5)+_0x199ed2+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a172_0x371033(0x1be)},{'name':a172_0x371033(0x1c4),'type':'string','required':!![],'description':a172_0x371033(0x1bb)}];export function getSubappSelector(_0x417f43){const _0x2aa590=a172_0x371033,_0x46dd67=_0x417f43[_0x2aa590(0x1b8)],_0x2039f6=_0x417f43[_0x2aa590(0x1ae)](_0x2aa590(0x1c4))[_0x2aa590(0x1d6)]();if(!_0x2039f6)throw CliErrors[_0x2aa590(0x1ce)](_0x2aa590(0x1b4));return{'appCode':_0x46dd67,'appName':_0x2039f6};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a173_0x97141b=a173_0x32e5;function a173_0x49f9(){const _0x27fb6=['get','cwd','isInteger','JS\x20URL\x20is\x20unreachable:\x20','No\x20local\x20pages\x20matched\x20paths:\x20','pages','340WfPtof','number','CSS\x20URL\x20is\x20unreachable:\x20','order','2653ZpOaCV','Invalid\x20--params:\x20','label','has','folder','import','length','Invalid\x20--params.','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','object','parentId','\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','dryRun','\x22\x20for\x20','isArray','map','Invalid\x20--params\x20fields:\x20','visible','392IcsDvR','33478wjxEPz','push','hasOwn','group','cssUrl','filter','message','procode','Start\x20non-interactive\x20menu\x20sync','parse','31206VHkzKY','appName',';\x20found\x20','info','trim','join','setLogPath','string',':\x20expected\x20a\x20non-empty\x20string.','245680QCPdyF','menu-sync','35780EgrZdE','field','2954727KCoRzf','boolean','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','30wCEQHn','--params.','keys','jsUrl','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','path','Menu\x20sync\x20completed','436310WWbeAn','\x0a\x20\x20Available\x20local\x20paths:\x20','type'];a173_0x49f9=function(){return _0x27fb6;};return a173_0x49f9();}function a173_0x32e5(_0x23e7ef,_0x3c1158){_0x23e7ef=_0x23e7ef-0x1a8;const _0x49f997=a173_0x49f9();let _0x32e511=_0x49f997[_0x23e7ef];return _0x32e511;}(function(_0x238753,_0x467fa3){const _0x365343=a173_0x32e5,_0x12ba6c=_0x238753();while(!![]){try{const _0xff489e=parseInt(_0x365343(0x1db))/0x1+-parseInt(_0x365343(0x1ac))/0x2*(-parseInt(_0x365343(0x1b2))/0x3)+-parseInt(_0x365343(0x1aa))/0x4+parseInt(_0x365343(0x1c3))/0x5*(parseInt(_0x365343(0x1e5))/0x6)+-parseInt(_0x365343(0x1c7))/0x7*(-parseInt(_0x365343(0x1da))/0x8)+-parseInt(_0x365343(0x1ae))/0x9+parseInt(_0x365343(0x1ba))/0xa;if(_0xff489e===_0x467fa3)break;else _0x12ba6c['push'](_0x12ba6c['shift']());}catch(_0x546823){_0x12ba6c['push'](_0x12ba6c['shift']());}}}(a173_0x49f9,0x3a3bd));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{logger}from'../../../utils/logger.js';import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';const MENU_SYNC_PARAM_KEYS=new Set([a173_0x97141b(0x1b5),a173_0x97141b(0x1df),'appName',a173_0x97141b(0x1d9),'parentId']);export function resolvePage(_0x3b0a95,_0x297478,_0x276cea){const _0x548bbc=a173_0x97141b;let _0x575fb4=_0x297478['parentId']??_0x3b0a95[_0x548bbc(0x1d1)];if(_0x575fb4===undefined&&_0x3b0a95[_0x548bbc(0x1de)]){const _0x16b440=_0x276cea[_0x548bbc(0x1e0)](_0x42d8d0=>_0x42d8d0[_0x548bbc(0x1bc)]==='folder'&&_0x42d8d0['label']===_0x3b0a95['group']);if(_0x16b440['length']!==0x1)throw new Error('Expected\x20one\x20folder\x20named\x20\x22'+_0x3b0a95[_0x548bbc(0x1de)]+_0x548bbc(0x1d5)+_0x3b0a95[_0x548bbc(0x1b8)]+_0x548bbc(0x1e7)+_0x16b440['length']);_0x575fb4=_0x16b440[0x0]['id'];}if(_0x575fb4!==undefined&&_0x575fb4!==0x0&&_0x276cea[_0x548bbc(0x1e0)](_0x3b573f=>_0x3b573f['id']===_0x575fb4&&_0x3b573f[_0x548bbc(0x1bc)]===_0x548bbc(0x1cb))['length']!==0x1)throw new Error('Parent\x20'+_0x575fb4+_0x548bbc(0x1d2));return{..._0x3b0a95,..._0x575fb4===undefined?{}:{'parentId':_0x575fb4},..._0x297478['visible']===undefined?{}:{'visible':_0x297478['visible']}};}function validateParams(_0x2d75d0){const _0x259e45=a173_0x97141b,_0x39b127=[];return _0x2d75d0[_0x259e45(0x1b5)]&&!isValidJsHttpsUrl(_0x2d75d0[_0x259e45(0x1b5)])&&_0x39b127[_0x259e45(0x1dc)]({'field':'jsUrl','message':_0x259e45(0x1d3)}),_0x2d75d0[_0x259e45(0x1df)]&&!isValidCssHttpsUrl(_0x2d75d0[_0x259e45(0x1df)])&&_0x39b127[_0x259e45(0x1dc)]({'field':_0x259e45(0x1df),'message':_0x259e45(0x1cf)}),_0x39b127;}export async function runMenuSyncCore(_0x8bc673,_0x5b4a08,_0x392d03=[],_0x342a6a,_0x594081={}){const _0x42c6f4=a173_0x97141b,_0x11be51=parseMenuSyncParams(_0x342a6a),_0xe05642=[...new Set(_0x392d03[_0x42c6f4(0x1d7)](_0x4553d9=>_0x4553d9[_0x42c6f4(0x1e9)]())[_0x42c6f4(0x1e0)](Boolean)[_0x42c6f4(0x1d7)](menuPathKey))],_0x63b328=_0x11be51[_0x42c6f4(0x1b5)],_0xde714f=_0x11be51[_0x42c6f4(0x1df)],_0x549b2=[];if(_0x63b328)_0x549b2['push'](_0x63b328);if(_0xde714f)_0x549b2[_0x42c6f4(0x1dc)](_0xde714f);const _0x4f891a=validateParams(_0x11be51);if(_0x4f891a[_0x42c6f4(0x1cd)]>0x0){const _0x222b74=_0x4f891a[_0x42c6f4(0x1d7)](_0x38b9cb=>_0x42c6f4(0x1b3)+_0x38b9cb[_0x42c6f4(0x1ad)]+':\x20'+_0x38b9cb[_0x42c6f4(0x1e1)])[_0x42c6f4(0x1ea)](';\x20');throw new Error(_0x42c6f4(0x1c8)+_0x222b74);}logger[_0x42c6f4(0x1eb)](process[_0x42c6f4(0x1be)]()),logger[_0x42c6f4(0x1e8)](_0x42c6f4(0x1ab),_0x42c6f4(0x1e3),{'appCode':_0x8bc673,'selectedCount':_0xe05642['length'],'jsUrl':_0x63b328,'cssUrl':_0xde714f});if(_0x63b328){const _0x39ca0c=await isUrlReachable(_0x63b328);if(!_0x39ca0c)throw new Error(_0x42c6f4(0x1c0)+_0x63b328);}if(_0xde714f){const _0x291fbc=await isUrlReachable(_0xde714f);if(!_0x291fbc)throw new Error(_0x42c6f4(0x1c5)+_0xde714f);}const _0x437586=getLocalPages();if(_0x437586[_0x42c6f4(0x1cd)]===0x0){if(_0xe05642['length']>0x0)throw new Error(_0x42c6f4(0x1c1)+_0xe05642['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x594081[_0x42c6f4(0x1d4)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x387932=await getOnlineMenuList(_0x8bc673,_0x5b4a08),_0x5f20c6=new Set(_0x387932[_0x42c6f4(0x1d7)](_0x4b1865=>menuPathKey(_0x4b1865[_0x42c6f4(0x1b8)])));let _0x2d3330;if(_0xe05642[_0x42c6f4(0x1cd)]>0x0){const _0x402a05=new Map(_0x437586['map'](_0x28eddc=>[menuPathKey(_0x28eddc['path']),_0x28eddc])),_0x50e492=_0xe05642[_0x42c6f4(0x1e0)](_0x26ff93=>!_0x402a05[_0x42c6f4(0x1ca)](_0x26ff93));if(_0x50e492[_0x42c6f4(0x1cd)]>0x0){const _0x994f22=_0x437586[_0x42c6f4(0x1d7)](_0x1efaec=>_0x1efaec[_0x42c6f4(0x1b8)])['join'](',\x20');throw new Error(_0x42c6f4(0x1c1)+_0x50e492[_0x42c6f4(0x1ea)](',\x20')+_0x42c6f4(0x1bb)+_0x994f22);}const _0x51b926=_0xe05642[_0x42c6f4(0x1e0)](_0x43a56b=>_0x5f20c6[_0x42c6f4(0x1ca)](_0x43a56b));if(_0x51b926[_0x42c6f4(0x1cd)]>0x0)throw new Error(_0x42c6f4(0x1b6)+_0x51b926['join'](',\x20'));_0x2d3330=_0xe05642[_0x42c6f4(0x1d7)](_0x1bafca=>_0x402a05[_0x42c6f4(0x1bd)](_0x1bafca));}else _0x2d3330=_0x437586[_0x42c6f4(0x1e0)](_0x5f1111=>!_0x5f20c6[_0x42c6f4(0x1ca)](menuPathKey(_0x5f1111[_0x42c6f4(0x1b8)])));if(_0x2d3330[_0x42c6f4(0x1cd)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x594081[_0x42c6f4(0x1d4)]===!![],'targetPages':[],'plannedMenus':[]};_0x2d3330=_0x2d3330[_0x42c6f4(0x1d7)](_0x4e0176=>resolvePage(_0x4e0176,_0x11be51,_0x387932));_0x11be51['appName']&&_0x549b2[_0x42c6f4(0x1cd)]===0x0&&await assertSharedResourcesConfigured(_0x8bc673,_0x5b4a08,_0x11be51[_0x42c6f4(0x1e6)]);const _0x1fef77=_0x2d3330[_0x42c6f4(0x1d7)](_0x13452f=>({'type':_0x42c6f4(0x1e2),'path':_0x13452f['path'],'label':_0x13452f[_0x42c6f4(0x1c9)],'loadScriptMode':_0x42c6f4(0x1cc),'resources':[..._0x549b2],..._0x13452f[_0x42c6f4(0x1d9)]===undefined?{}:{'visible':_0x13452f[_0x42c6f4(0x1d9)]},..._0x13452f[_0x42c6f4(0x1d1)]===undefined?{}:{'parentId':_0x13452f[_0x42c6f4(0x1d1)]},..._0x13452f[_0x42c6f4(0x1c6)]===undefined?{}:{'sort':_0x13452f[_0x42c6f4(0x1c6)]},..._0x11be51[_0x42c6f4(0x1e6)]===undefined?{}:{'appName':_0x11be51[_0x42c6f4(0x1e6)]}}));if(_0x594081[_0x42c6f4(0x1d4)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x2d3330,'plannedMenus':_0x1fef77};const _0x1aa0a7=_0x11be51[_0x42c6f4(0x1e6)]?await createMenus(_0x8bc673,_0x5b4a08,_0x2d3330,_0x549b2[_0x42c6f4(0x1cd)]>0x0?_0x549b2:undefined,{'appName':_0x11be51[_0x42c6f4(0x1e6)]}):await createMenus(_0x8bc673,_0x5b4a08,_0x2d3330,_0x549b2[_0x42c6f4(0x1cd)]>0x0?_0x549b2:undefined);return logger[_0x42c6f4(0x1e8)]('menu-sync',_0x42c6f4(0x1b9),{'count':_0x2d3330[_0x42c6f4(0x1cd)],'resources':_0x549b2}),{'created':_0x1aa0a7['length'],'skipped':![],'dryRun':![],'targetPages':_0x2d3330,'plannedMenus':_0x1fef77,'menus':_0x1aa0a7};}export function parseMenuSyncParams(_0x588f31){const _0x459b2f=a173_0x97141b;if(!_0x588f31||typeof _0x588f31!==_0x459b2f(0x1a8))return{};let _0xe31b37;try{_0xe31b37=JSON[_0x459b2f(0x1e4)](_0x588f31);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0xe31b37!==_0x459b2f(0x1d0)||_0xe31b37===null||Array[_0x459b2f(0x1d6)](_0xe31b37))throw new Error(_0x459b2f(0x1b7));const _0x52be9e=_0xe31b37;if(Object[_0x459b2f(0x1dd)](_0x52be9e,_0x459b2f(0x1c2)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x3d59e3=Object[_0x459b2f(0x1b4)](_0x52be9e)[_0x459b2f(0x1e0)](_0x46959f=>!MENU_SYNC_PARAM_KEYS[_0x459b2f(0x1ca)](_0x46959f));if(_0x3d59e3[_0x459b2f(0x1cd)]>0x0)throw new Error(_0x459b2f(0x1d8)+_0x3d59e3[_0x459b2f(0x1ea)](',\x20')+'.');for(const _0x1ec9fe of[_0x459b2f(0x1b5),_0x459b2f(0x1df),_0x459b2f(0x1e6)]){const _0x149129=_0x52be9e[_0x1ec9fe];if(_0x149129!==undefined&&(typeof _0x149129!==_0x459b2f(0x1a8)||_0x149129[_0x459b2f(0x1e9)]()===''))throw new Error(_0x459b2f(0x1ce)+_0x1ec9fe+_0x459b2f(0x1a9));}if(_0x52be9e[_0x459b2f(0x1d9)]!==undefined&&typeof _0x52be9e[_0x459b2f(0x1d9)]!==_0x459b2f(0x1af))throw new Error(_0x459b2f(0x1b0));if(_0x52be9e['parentId']!==undefined&&(!Number[_0x459b2f(0x1bf)](_0x52be9e[_0x459b2f(0x1d1)])||_0x52be9e[_0x459b2f(0x1d1)]<0x0))throw new Error(_0x459b2f(0x1b1));return{'jsUrl':typeof _0x52be9e[_0x459b2f(0x1b5)]===_0x459b2f(0x1a8)?_0x52be9e[_0x459b2f(0x1b5)]['trim']():undefined,'cssUrl':typeof _0x52be9e[_0x459b2f(0x1df)]===_0x459b2f(0x1a8)?_0x52be9e['cssUrl'][_0x459b2f(0x1e9)]():undefined,'appName':typeof _0x52be9e[_0x459b2f(0x1e6)]===_0x459b2f(0x1a8)?_0x52be9e[_0x459b2f(0x1e6)][_0x459b2f(0x1e9)]():undefined,'visible':typeof _0x52be9e[_0x459b2f(0x1d9)]===_0x459b2f(0x1af)?_0x52be9e[_0x459b2f(0x1d9)]:undefined,'parentId':typeof _0x52be9e[_0x459b2f(0x1d1)]===_0x459b2f(0x1c4)?_0x52be9e[_0x459b2f(0x1d1)]:undefined};}
|
|
1
|
+
const a173_0x1849ab=a173_0x3d41;(function(_0x231e52,_0x3b1e74){const _0x395f32=a173_0x3d41,_0x287289=_0x231e52();while(!![]){try{const _0x50ed4f=parseInt(_0x395f32(0x1f1))/0x1*(-parseInt(_0x395f32(0x207))/0x2)+parseInt(_0x395f32(0x1d2))/0x3*(-parseInt(_0x395f32(0x200))/0x4)+-parseInt(_0x395f32(0x1e5))/0x5*(parseInt(_0x395f32(0x1eb))/0x6)+-parseInt(_0x395f32(0x1ce))/0x7*(-parseInt(_0x395f32(0x209))/0x8)+-parseInt(_0x395f32(0x1d1))/0x9*(parseInt(_0x395f32(0x1f4))/0xa)+-parseInt(_0x395f32(0x1e0))/0xb*(-parseInt(_0x395f32(0x1ea))/0xc)+-parseInt(_0x395f32(0x1f7))/0xd*(-parseInt(_0x395f32(0x1e8))/0xe);if(_0x50ed4f===_0x3b1e74)break;else _0x287289['push'](_0x287289['shift']());}catch(_0x44a052){_0x287289['push'](_0x287289['shift']());}}}(a173_0x1a85,0xe0bc1));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a173_0x3d41(_0x31408b,_0x3fd168){_0x31408b=_0x31408b-0x1cd;const _0x1a85e7=a173_0x1a85();let _0x3d410f=_0x1a85e7[_0x31408b];return _0x3d410f;}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';function a173_0x1a85(){const _0xe96fe0=['label','field','13VStHWx','filter','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','dryRun','Invalid\x20--params.','isArray','Invalid\x20--params:\x20','object','string','111956zbYTRK','group','visible','Parent\x20','CSS\x20URL\x20is\x20unreachable:\x20','isInteger','menu-sync','348388UmHJYp','join','12744272eVqFEL','JS\x20URL\x20is\x20unreachable:\x20','hasOwn','path','7NdxYkZ','Menu\x20sync\x20completed','get','2470536AoPqbH','3yAmehc','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL',':\x20expected\x20a\x20non-empty\x20string.','type','Start\x20non-interactive\x20menu\x20sync','jsUrl','appName','has','cwd','Expected\x20one\x20folder\x20named\x20\x22','trim','--params.','import','order','13644983oRuuHP','Invalid\x20--params\x20fields:\x20','cssUrl','setLogPath','push','10IsVUnP','length','No\x20local\x20pages\x20matched\x20paths:\x20','7812378elEbXu','\x0a\x20\x20Available\x20local\x20paths:\x20','12OdeWuV','1200426eTdWZx','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','boolean','number','map','7YlZfaj','keys','parentId','30uTSscr'];a173_0x1a85=function(){return _0xe96fe0;};return a173_0x1a85();}import{logger}from'../../../utils/logger.js';import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';const MENU_SYNC_PARAM_KEYS=new Set([a173_0x1849ab(0x1d7),a173_0x1849ab(0x1e2),'appName',a173_0x1849ab(0x202),'parentId']);export function resolvePage(_0x496a3c,_0x49ac05,_0x2c8c64){const _0x5dccb0=a173_0x1849ab;let _0x145635=_0x49ac05['parentId']??_0x496a3c[_0x5dccb0(0x1f3)];if(_0x145635===undefined&&_0x496a3c[_0x5dccb0(0x201)]){const _0xe6f0ef=_0x2c8c64[_0x5dccb0(0x1f8)](_0x218576=>_0x218576[_0x5dccb0(0x1d5)]==='folder'&&_0x218576[_0x5dccb0(0x1f5)]===_0x496a3c[_0x5dccb0(0x201)]);if(_0xe6f0ef['length']!==0x1)throw new Error(_0x5dccb0(0x1db)+_0x496a3c[_0x5dccb0(0x201)]+'\x22\x20for\x20'+_0x496a3c[_0x5dccb0(0x1cd)]+';\x20found\x20'+_0xe6f0ef[_0x5dccb0(0x1e6)]);_0x145635=_0xe6f0ef[0x0]['id'];}if(_0x145635!==undefined&&_0x145635!==0x0&&_0x2c8c64['filter'](_0xf286a1=>_0xf286a1['id']===_0x145635&&_0xf286a1[_0x5dccb0(0x1d5)]==='folder')[_0x5dccb0(0x1e6)]!==0x1)throw new Error(_0x5dccb0(0x203)+_0x145635+'\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.');return{..._0x496a3c,..._0x145635===undefined?{}:{'parentId':_0x145635},..._0x49ac05['visible']===undefined?{}:{'visible':_0x49ac05['visible']}};}function validateParams(_0x49594a){const _0x33dc7c=a173_0x1849ab,_0x4f3480=[];return _0x49594a[_0x33dc7c(0x1d7)]&&!isValidJsHttpsUrl(_0x49594a[_0x33dc7c(0x1d7)])&&_0x4f3480[_0x33dc7c(0x1e4)]({'field':_0x33dc7c(0x1d7),'message':_0x33dc7c(0x1d3)}),_0x49594a[_0x33dc7c(0x1e2)]&&!isValidCssHttpsUrl(_0x49594a[_0x33dc7c(0x1e2)])&&_0x4f3480['push']({'field':_0x33dc7c(0x1e2),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x4f3480;}export async function runMenuSyncCore(_0x42206b,_0x1536dc,_0xaf3ec1=[],_0x1160d5,_0x5c4eb9={}){const _0x2527d4=a173_0x1849ab,_0x3225a9=parseMenuSyncParams(_0x1160d5),_0x59b7a3=[...new Set(_0xaf3ec1[_0x2527d4(0x1f0)](_0xb49c88=>_0xb49c88[_0x2527d4(0x1dc)]())[_0x2527d4(0x1f8)](Boolean)[_0x2527d4(0x1f0)](menuPathKey))],_0x236533=_0x3225a9[_0x2527d4(0x1d7)],_0x38622e=_0x3225a9['cssUrl'],_0x45b3c3=[];if(_0x236533)_0x45b3c3[_0x2527d4(0x1e4)](_0x236533);if(_0x38622e)_0x45b3c3['push'](_0x38622e);const _0x5dfd3b=validateParams(_0x3225a9);if(_0x5dfd3b[_0x2527d4(0x1e6)]>0x0){const _0x30bb31=_0x5dfd3b[_0x2527d4(0x1f0)](_0x26a170=>_0x2527d4(0x1dd)+_0x26a170[_0x2527d4(0x1f6)]+':\x20'+_0x26a170['message'])[_0x2527d4(0x208)](';\x20');throw new Error(_0x2527d4(0x1fd)+_0x30bb31);}logger[_0x2527d4(0x1e3)](process[_0x2527d4(0x1da)]()),logger['info'](_0x2527d4(0x206),_0x2527d4(0x1d6),{'appCode':_0x42206b,'selectedCount':_0x59b7a3[_0x2527d4(0x1e6)],'jsUrl':_0x236533,'cssUrl':_0x38622e});if(_0x236533){const _0x481778=await isUrlReachable(_0x236533);if(!_0x481778)throw new Error(_0x2527d4(0x20a)+_0x236533);}if(_0x38622e){const _0x5d0eb2=await isUrlReachable(_0x38622e);if(!_0x5d0eb2)throw new Error(_0x2527d4(0x204)+_0x38622e);}const _0x5c9970=getLocalPages();if(_0x5c9970[_0x2527d4(0x1e6)]===0x0){if(_0x59b7a3[_0x2527d4(0x1e6)]>0x0)throw new Error(_0x2527d4(0x1e7)+_0x59b7a3[_0x2527d4(0x208)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x5c4eb9[_0x2527d4(0x1fa)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x1b5ddd=await getOnlineMenuList(_0x42206b,_0x1536dc),_0x358663=new Set(_0x1b5ddd['map'](_0x564d05=>menuPathKey(_0x564d05[_0x2527d4(0x1cd)])));let _0x50755e;if(_0x59b7a3[_0x2527d4(0x1e6)]>0x0){const _0x42ac63=new Map(_0x5c9970[_0x2527d4(0x1f0)](_0x2b6a0f=>[menuPathKey(_0x2b6a0f['path']),_0x2b6a0f])),_0x5be530=_0x59b7a3[_0x2527d4(0x1f8)](_0x31b853=>!_0x42ac63[_0x2527d4(0x1d9)](_0x31b853));if(_0x5be530['length']>0x0){const _0xd971ef=_0x5c9970[_0x2527d4(0x1f0)](_0x151c74=>_0x151c74[_0x2527d4(0x1cd)])[_0x2527d4(0x208)](',\x20');throw new Error(_0x2527d4(0x1e7)+_0x5be530[_0x2527d4(0x208)](',\x20')+_0x2527d4(0x1e9)+_0xd971ef);}const _0x11a927=_0x59b7a3[_0x2527d4(0x1f8)](_0x3fa9bc=>_0x358663['has'](_0x3fa9bc));if(_0x11a927[_0x2527d4(0x1e6)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x11a927[_0x2527d4(0x208)](',\x20'));_0x50755e=_0x59b7a3[_0x2527d4(0x1f0)](_0x21501b=>_0x42ac63[_0x2527d4(0x1d0)](_0x21501b));}else _0x50755e=_0x5c9970[_0x2527d4(0x1f8)](_0x3f12d8=>!_0x358663[_0x2527d4(0x1d9)](menuPathKey(_0x3f12d8[_0x2527d4(0x1cd)])));if(_0x50755e[_0x2527d4(0x1e6)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x5c4eb9[_0x2527d4(0x1fa)]===!![],'targetPages':[],'plannedMenus':[]};_0x50755e=_0x50755e['map'](_0x1839d6=>resolvePage(_0x1839d6,_0x3225a9,_0x1b5ddd));_0x3225a9[_0x2527d4(0x1d8)]&&_0x45b3c3[_0x2527d4(0x1e6)]===0x0&&await assertSharedResourcesConfigured(_0x42206b,_0x1536dc,_0x3225a9[_0x2527d4(0x1d8)]);const _0x3393f6=_0x50755e[_0x2527d4(0x1f0)](_0x1d5682=>({'type':'procode','path':_0x1d5682[_0x2527d4(0x1cd)],'label':_0x1d5682[_0x2527d4(0x1f5)],'loadScriptMode':_0x2527d4(0x1de),'resources':[..._0x45b3c3],..._0x1d5682[_0x2527d4(0x202)]===undefined?{}:{'visible':_0x1d5682[_0x2527d4(0x202)]},..._0x1d5682[_0x2527d4(0x1f3)]===undefined?{}:{'parentId':_0x1d5682[_0x2527d4(0x1f3)]},..._0x1d5682[_0x2527d4(0x1df)]===undefined?{}:{'sort':_0x1d5682[_0x2527d4(0x1df)]},..._0x3225a9[_0x2527d4(0x1d8)]===undefined?{}:{'appName':_0x3225a9[_0x2527d4(0x1d8)]}}));if(_0x5c4eb9[_0x2527d4(0x1fa)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x50755e,'plannedMenus':_0x3393f6};const _0xb49d00=_0x3225a9[_0x2527d4(0x1d8)]?await createMenus(_0x42206b,_0x1536dc,_0x50755e,_0x45b3c3['length']>0x0?_0x45b3c3:undefined,{'appName':_0x3225a9[_0x2527d4(0x1d8)]}):await createMenus(_0x42206b,_0x1536dc,_0x50755e,_0x45b3c3[_0x2527d4(0x1e6)]>0x0?_0x45b3c3:undefined);return logger['info'](_0x2527d4(0x206),_0x2527d4(0x1cf),{'count':_0x50755e[_0x2527d4(0x1e6)],'resources':_0x45b3c3}),{'created':_0xb49d00[_0x2527d4(0x1e6)],'skipped':![],'dryRun':![],'targetPages':_0x50755e,'plannedMenus':_0x3393f6,'menus':_0xb49d00};}export function parseMenuSyncParams(_0x7ce868){const _0x1c09a4=a173_0x1849ab;if(!_0x7ce868||typeof _0x7ce868!=='string')return{};let _0x5b1e0d;try{_0x5b1e0d=JSON['parse'](_0x7ce868);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x5b1e0d!==_0x1c09a4(0x1fe)||_0x5b1e0d===null||Array[_0x1c09a4(0x1fc)](_0x5b1e0d))throw new Error(_0x1c09a4(0x1ec));const _0x45cb41=_0x5b1e0d;if(Object[_0x1c09a4(0x20b)](_0x45cb41,'pages'))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0xf6f7fa=Object[_0x1c09a4(0x1f2)](_0x45cb41)[_0x1c09a4(0x1f8)](_0x5695a7=>!MENU_SYNC_PARAM_KEYS[_0x1c09a4(0x1d9)](_0x5695a7));if(_0xf6f7fa[_0x1c09a4(0x1e6)]>0x0)throw new Error(_0x1c09a4(0x1e1)+_0xf6f7fa[_0x1c09a4(0x208)](',\x20')+'.');for(const _0x1990d3 of[_0x1c09a4(0x1d7),_0x1c09a4(0x1e2),_0x1c09a4(0x1d8)]){const _0xdcbdaf=_0x45cb41[_0x1990d3];if(_0xdcbdaf!==undefined&&(typeof _0xdcbdaf!=='string'||_0xdcbdaf[_0x1c09a4(0x1dc)]()===''))throw new Error(_0x1c09a4(0x1fb)+_0x1990d3+_0x1c09a4(0x1d4));}if(_0x45cb41['visible']!==undefined&&typeof _0x45cb41['visible']!==_0x1c09a4(0x1ee))throw new Error(_0x1c09a4(0x1ed));if(_0x45cb41[_0x1c09a4(0x1f3)]!==undefined&&(!Number[_0x1c09a4(0x205)](_0x45cb41['parentId'])||_0x45cb41['parentId']<0x0))throw new Error(_0x1c09a4(0x1f9));return{'jsUrl':typeof _0x45cb41[_0x1c09a4(0x1d7)]===_0x1c09a4(0x1ff)?_0x45cb41['jsUrl']['trim']():undefined,'cssUrl':typeof _0x45cb41[_0x1c09a4(0x1e2)]===_0x1c09a4(0x1ff)?_0x45cb41['cssUrl'][_0x1c09a4(0x1dc)]():undefined,'appName':typeof _0x45cb41[_0x1c09a4(0x1d8)]===_0x1c09a4(0x1ff)?_0x45cb41[_0x1c09a4(0x1d8)][_0x1c09a4(0x1dc)]():undefined,'visible':typeof _0x45cb41['visible']===_0x1c09a4(0x1ee)?_0x45cb41[_0x1c09a4(0x202)]:undefined,'parentId':typeof _0x45cb41['parentId']===_0x1c09a4(0x1ef)?_0x45cb41[_0x1c09a4(0x1f3)]:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x272418,_0x415038){const _0x33b423=a175_0x583c,_0x584e6a=_0x272418();while(!![]){try{const _0x2d41b5=parseInt(_0x33b423(0x11e))/0x1+-parseInt(_0x33b423(0x10d))/0x2*(-parseInt(_0x33b423(0x100))/0x3)+parseInt(_0x33b423(0xef))/0x4+-parseInt(_0x33b423(0x11a))/0x5*(parseInt(_0x33b423(0xfa))/0x6)+-parseInt(_0x33b423(0xe8))/0x7+-parseInt(_0x33b423(0xea))/0x8+-parseInt(_0x33b423(0x112))/0x9*(-parseInt(_0x33b423(0x127))/0xa);if(_0x2d41b5===_0x415038)break;else _0x584e6a['push'](_0x584e6a['shift']());}catch(_0x4535e7){_0x584e6a['push'](_0x584e6a['shift']());}}}(a175_0x1e89,0x3a338));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x4526fc){const _0x4cb5cd=a175_0x583c,_0x535835=[];return _0x4526fc[_0x4cb5cd(0x115)]&&!isValidJsHttpsUrl(_0x4526fc[_0x4cb5cd(0x115)])&&_0x535835[_0x4cb5cd(0xe4)]({'field':'jsUrl','message':_0x4cb5cd(0xf5)}),_0x4526fc['cssUrl']&&!isValidCssHttpsUrl(_0x4526fc[_0x4cb5cd(0xe7)])&&_0x535835[_0x4cb5cd(0xe4)]({'field':_0x4cb5cd(0xe7),'message':_0x4cb5cd(0x111)}),_0x535835;}export async function runMenuUpdateCore(_0x33326d,_0x3b1993,_0x32fc97,_0x4feb59={}){const _0x5d6328=a175_0x583c,_0x15da02=parseUpdateParamsFlag(_0x32fc97),_0x45e1ee=normalizeMode(_0x4feb59[_0x5d6328(0xf3)]);validateSelection(_0x4feb59[_0x5d6328(0x118)]);const _0x39503d=[];if(_0x15da02['jsUrl'])_0x39503d['push'](_0x15da02[_0x5d6328(0x115)]);if(_0x15da02[_0x5d6328(0xe7)])_0x39503d[_0x5d6328(0xe4)](_0x15da02['cssUrl']);const _0x133693=validateParams(_0x15da02);if(_0x133693['length']>0x0){const _0x107616=_0x133693[_0x5d6328(0x110)](_0x11214d=>'--params.'+_0x11214d[_0x5d6328(0xf9)]+':\x20'+_0x11214d[_0x5d6328(0xe2)])[_0x5d6328(0x102)](';\x20');throw new Error(_0x5d6328(0xe3)+_0x107616);}if(_0x39503d['length']===0x0)throw new Error(_0x5d6328(0x108)+_0x5d6328(0x116));logger[_0x5d6328(0x101)](process['cwd']()),logger[_0x5d6328(0xfb)]('menu-asset-update',_0x5d6328(0xfc),{'appCode':_0x33326d,'jsUrl':_0x15da02[_0x5d6328(0x115)],'cssUrl':_0x15da02['cssUrl'],'mode':_0x45e1ee,'dryRun':_0x4feb59['dryRun']===!![]});if(_0x15da02[_0x5d6328(0x115)]){const _0x42fc13=await isUrlReachable(_0x15da02[_0x5d6328(0x115)]);if(!_0x42fc13)throw new Error(_0x5d6328(0x106)+_0x15da02['jsUrl']);}if(_0x15da02[_0x5d6328(0xe7)]){const _0x150b88=await isUrlReachable(_0x15da02['cssUrl']);if(!_0x150b88)throw new Error(_0x5d6328(0x123)+_0x15da02['cssUrl']);}const _0x276183=await getOnlineMenuList(_0x33326d,_0x3b1993),_0x1e1f1a=_0x276183[_0x5d6328(0x119)](_0x566858=>_0x566858[_0x5d6328(0x120)][_0x5d6328(0x124)]>0x0),_0x1883a1=selectMenusForUpdate(_0x1e1f1a,_0x4feb59[_0x5d6328(0x118)]);if(_0x1883a1[_0x5d6328(0x124)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x4feb59[_0x5d6328(0xf4)]===!![]};const _0x442cb4=_0x1883a1['map'](_0x8cadbd=>buildMenuUpdateDiff(_0x8cadbd,_0x15da02,_0x45e1ee,_0x4feb59[_0x5d6328(0xe6)]===!![],_0x4feb59[_0x5d6328(0x129)]));if(_0x4feb59[_0x5d6328(0xf4)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x442cb4};const _0x467c63=await Promise[_0x5d6328(0x10e)](_0x1883a1['map']((_0x559944,_0x162e18)=>updateMenuCdnUrl(_0x33326d,_0x3b1993,{'id':_0x559944['id'],'label':_0x559944[_0x5d6328(0x122)],'path':_0x559944['path'],'resources':_0x442cb4[_0x162e18][_0x5d6328(0xf8)]['resources'],'extend':_0x559944['extend']??null,'loadScriptMode':_0x4feb59['loadScriptMode']}))),_0x38aed3=_0x467c63[_0x5d6328(0x119)](_0x5b7094=>_0x5b7094[_0x5d6328(0xed)]===_0x5d6328(0x10f))[_0x5d6328(0x110)](_0x4e6784=>_0x4e6784[_0x5d6328(0x103)]),_0x2c82e2=_0x467c63[_0x5d6328(0x119)](_0x58af88=>_0x58af88[_0x5d6328(0xed)]==='rejected')['length'];return logger[_0x5d6328(0xfb)](_0x5d6328(0xe5),'Menu\x20asset\x20update\x20completed',{'count':_0x1883a1[_0x5d6328(0x124)],'resources':_0x39503d}),{'updated':_0x38aed3[_0x5d6328(0x124)],'failed':_0x2c82e2,'skipped':![],'menus':_0x38aed3};}function validateSelection(_0x3496ee){const _0x4de3f3=a175_0x583c;if(!_0x3496ee)throw new Error(_0x4de3f3(0x11b));if(_0x3496ee[_0x4de3f3(0xee)]&&(_0x3496ee[_0x4de3f3(0x11d)][_0x4de3f3(0x124)]>0x0||_0x3496ee[_0x4de3f3(0x126)][_0x4de3f3(0x124)]>0x0))throw new Error(_0x4de3f3(0x105));if(!_0x3496ee[_0x4de3f3(0xee)]&&_0x3496ee[_0x4de3f3(0x11d)]['length']===0x0&&_0x3496ee[_0x4de3f3(0x126)][_0x4de3f3(0x124)]===0x0)throw new Error(_0x4de3f3(0x11b));}export function selectMenusForUpdate(_0x1a12ef,_0x32cf68){const _0x4027fe=a175_0x583c;validateSelection(_0x32cf68);if(_0x32cf68['all'])return _0x1a12ef;const _0x1fc634=new Set(_0x1a12ef[_0x4027fe(0x110)](_0x53ea2a=>_0x53ea2a['id'])),_0x45fed8=new Set(_0x1a12ef[_0x4027fe(0x110)](_0x533b13=>_0x533b13[_0x4027fe(0xfd)])),_0x165f9f=_0x32cf68[_0x4027fe(0x11d)][_0x4027fe(0x119)](_0x4009b7=>!_0x1fc634[_0x4027fe(0x125)](_0x4009b7)),_0x37ebe8=_0x32cf68['paths'][_0x4027fe(0x119)](_0x1853ef=>!_0x45fed8[_0x4027fe(0x125)](_0x1853ef));if(_0x165f9f[_0x4027fe(0x124)]>0x0||_0x37ebe8['length']>0x0){const _0x4a1a4d=[..._0x165f9f[_0x4027fe(0x110)](_0x38f880=>String(_0x38f880)),..._0x37ebe8][_0x4027fe(0x102)](',\x20');throw new Error(_0x4027fe(0x113)+_0x4a1a4d);}const _0x1c4596=new Set(_0x32cf68[_0x4027fe(0x11d)]),_0xea66a8=new Set(_0x32cf68[_0x4027fe(0x126)]);return _0x1a12ef[_0x4027fe(0x119)](_0x1af1d9=>_0x1c4596[_0x4027fe(0x125)](_0x1af1d9['id'])||_0xea66a8[_0x4027fe(0x125)](_0x1af1d9[_0x4027fe(0xfd)]));}function normalizeMode(_0x499e19){const _0x2602b3=a175_0x583c;if(!_0x499e19)return _0x2602b3(0xf2);if(_0x499e19===_0x2602b3(0xec)||_0x499e19==='patch')return _0x499e19;throw new Error(_0x2602b3(0x121)+_0x499e19+_0x2602b3(0x114));}function a175_0x583c(_0x418dd1,_0xe7f998){_0x418dd1=_0x418dd1-0xe2;const _0x1e89c7=a175_0x1e89();let _0x583cab=_0x1e89c7[_0x418dd1];return _0x583cab;}function buildMenuUpdateDiff(_0x3d6687,_0x2343b3,_0x5c3e28,_0x38682f,_0x55bb1a){const _0x12ec82=a175_0x583c,_0x2452dc=[..._0x3d6687['resources']];_0x5c3e28===_0x12ec82(0xf2)&&assertUnambiguousPatchResources(_0x3d6687,_0x2452dc,_0x2343b3);const _0x3487ac=_0x5c3e28==='patch'?patchResources(_0x2452dc,_0x2343b3):replaceResources(_0x2343b3),_0x5e95b2=[],_0x2166be=_0x2452dc[_0x12ec82(0x10a)](isJsResource),_0x1b7b5d=_0x3487ac[_0x12ec82(0x10a)](isJsResource);if(_0x2166be&&!_0x1b7b5d){const _0x5f5d8a=_0x12ec82(0xf0)+_0x3d6687[_0x12ec82(0x122)]+_0x12ec82(0xeb)+_0x3d6687[_0x12ec82(0xfd)]+_0x12ec82(0x12a)+_0x12ec82(0x10b);if(!_0x38682f)throw new Error(_0x5f5d8a);_0x5e95b2[_0x12ec82(0xe4)](_0x5f5d8a);}const _0x1c68c5=_0x2452dc[_0x12ec82(0x10a)](isCssResource),_0x536f47=_0x3487ac['some'](isCssResource);_0x1c68c5&&!_0x536f47&&_0x5e95b2[_0x12ec82(0xe4)](_0x12ec82(0x109)+_0x3d6687['label']+'\x22\x20('+_0x3d6687[_0x12ec82(0xfd)]+').');const _0x51028b=typeof _0x3d6687[_0x12ec82(0x107)]?.[_0x12ec82(0x129)]===_0x12ec82(0x10c)?_0x3d6687[_0x12ec82(0x107)][_0x12ec82(0x129)]:null,_0x3128ef=_0x55bb1a?{'loadScriptMode':_0x51028b}:{},_0x555f11=_0x55bb1a?{'loadScriptMode':_0x55bb1a}:{};return{'id':_0x3d6687['id'],'label':_0x3d6687['label'],'path':_0x3d6687[_0x12ec82(0xfd)],'mode':_0x5c3e28,'before':{'resources':_0x2452dc,..._0x3128ef},'after':{'resources':_0x3487ac,..._0x555f11},'warnings':_0x5e95b2};}function replaceResources(_0x40b42f){const _0x46ed6a=a175_0x583c;return[_0x40b42f[_0x46ed6a(0x115)],_0x40b42f[_0x46ed6a(0xe7)]][_0x46ed6a(0x119)](_0x5a588d=>!!_0x5a588d);}function assertUnambiguousPatchResources(_0x509c74,_0x255147,_0x18d3c8){const _0x4df893=a175_0x583c,_0x49b7db=_0x255147[_0x4df893(0x119)](isJsResource)[_0x4df893(0x124)];if(_0x18d3c8[_0x4df893(0x115)]&&_0x49b7db>0x1)throw new Error(_0x4df893(0x11c)+_0x49b7db+_0x4df893(0xff)+_0x509c74[_0x4df893(0x122)]+_0x4df893(0xeb)+_0x509c74[_0x4df893(0xfd)]+')\x20'+_0x4df893(0xf7));const _0x11e2e6=_0x255147[_0x4df893(0x119)](isCssResource)['length'];if(_0x18d3c8[_0x4df893(0xe7)]&&_0x11e2e6>0x1)throw new Error(_0x4df893(0x11c)+_0x11e2e6+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x509c74[_0x4df893(0x122)]+_0x4df893(0xeb)+_0x509c74[_0x4df893(0xfd)]+')\x20'+'with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');}function patchResources(_0x583e25,_0x273bc7){const _0x34fb31=a175_0x583c;let _0x10e540=![],_0x523758=![];const _0x690275=[];for(const _0x1ba53a of _0x583e25){if(isJsResource(_0x1ba53a)){if(_0x273bc7[_0x34fb31(0x115)]&&!_0x10e540)_0x690275[_0x34fb31(0xe4)](_0x273bc7[_0x34fb31(0x115)]),_0x10e540=!![];else!_0x273bc7[_0x34fb31(0x115)]&&_0x690275['push'](_0x1ba53a);continue;}if(isCssResource(_0x1ba53a)){if(_0x273bc7[_0x34fb31(0xe7)]&&!_0x523758)_0x690275[_0x34fb31(0xe4)](_0x273bc7[_0x34fb31(0xe7)]),_0x523758=!![];else!_0x273bc7[_0x34fb31(0xe7)]&&_0x690275[_0x34fb31(0xe4)](_0x1ba53a);continue;}_0x690275[_0x34fb31(0xe4)](_0x1ba53a);}return _0x273bc7['jsUrl']&&!_0x10e540&&_0x690275[_0x34fb31(0xf1)](_0x273bc7[_0x34fb31(0x115)]),_0x273bc7[_0x34fb31(0xe7)]&&!_0x523758&&_0x690275[_0x34fb31(0xe4)](_0x273bc7[_0x34fb31(0xe7)]),_0x690275;}function isJsResource(_0x146669){const _0x44daca=a175_0x583c;return stripQuery(_0x146669)[_0x44daca(0xe9)]()['endsWith']('.js');}function isCssResource(_0x61653d){const _0x4b988e=a175_0x583c;return stripQuery(_0x61653d)['toLowerCase']()[_0x4b988e(0xfe)](_0x4b988e(0x104));}function stripQuery(_0x1396b6){return _0x1396b6['split']('?')[0x0]??_0x1396b6;}function parseUpdateParamsFlag(_0x36265e){const _0x740f7f=a175_0x583c;if(!_0x36265e||typeof _0x36265e!=='string')return{};try{const _0x3584ea=JSON[_0x740f7f(0x117)](_0x36265e);if(typeof _0x3584ea!==_0x740f7f(0x11f)||_0x3584ea===null||Array[_0x740f7f(0x128)](_0x3584ea))return{};return{'jsUrl':typeof _0x3584ea[_0x740f7f(0x115)]===_0x740f7f(0x10c)?_0x3584ea[_0x740f7f(0x115)]['trim']():undefined,'cssUrl':typeof _0x3584ea[_0x740f7f(0xe7)]==='string'?_0x3584ea[_0x740f7f(0xe7)][_0x740f7f(0xf6)]():undefined};}catch{return{};}}function a175_0x1e89(){const _0x5953f9=['Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','some','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','string','6080XxVuGR','allSettled','fulfilled','map','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','42966PmYVOe','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','.\x20Allowed\x20values:\x20replace,\x20patch','jsUrl','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','parse','selection','filter','15UdBBGk','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','menu\x20asset-update\x20cannot\x20patch\x20','menuIds','147264gKDZtE','object','resources','Invalid\x20--mode:\x20','label','CSS\x20URL\x20is\x20unreachable:\x20','length','has','paths','1850GntQgJ','isArray','loadScriptMode',').\x20','message','Invalid\x20--params:\x20','push','menu-asset-update','force','cssUrl','2894101qRCWkB','toLowerCase','2956784kHeOgH','\x22\x20(','replace','status','all','676016VLsyfU','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','unshift','patch','mode','dryRun','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','trim','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','after','field','854610WLZCSk','info','Start\x20non-interactive\x20menu\x20asset\x20update','path','endsWith','\x20existing\x20JS\x20resources\x20for\x20\x22','246jeDmHX','setLogPath','join','value','.css','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','JS\x20URL\x20is\x20unreachable:\x20','extend'];a175_0x1e89=function(){return _0x5953f9;};return a175_0x1e89();}
|
|
1
|
+
(function(_0x44358a,_0x2b8c80){const _0x12950c=a175_0x4f14,_0x57ea0b=_0x44358a();while(!![]){try{const _0x5c4e77=parseInt(_0x12950c(0xdd))/0x1+parseInt(_0x12950c(0xd9))/0x2+-parseInt(_0x12950c(0xb0))/0x3*(-parseInt(_0x12950c(0xe6))/0x4)+-parseInt(_0x12950c(0xca))/0x5+-parseInt(_0x12950c(0xdc))/0x6*(-parseInt(_0x12950c(0xef))/0x7)+parseInt(_0x12950c(0xb6))/0x8*(parseInt(_0x12950c(0xb3))/0x9)+-parseInt(_0x12950c(0xd8))/0xa;if(_0x5c4e77===_0x2b8c80)break;else _0x57ea0b['push'](_0x57ea0b['shift']());}catch(_0x2f05e0){_0x57ea0b['push'](_0x57ea0b['shift']());}}}(a175_0x257e,0x4f0d8));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x2c750a){const _0x2adf02=a175_0x4f14,_0x47399e=[];return _0x2c750a[_0x2adf02(0xe4)]&&!isValidJsHttpsUrl(_0x2c750a['jsUrl'])&&_0x47399e['push']({'field':_0x2adf02(0xe4),'message':_0x2adf02(0xaf)}),_0x2c750a['cssUrl']&&!isValidCssHttpsUrl(_0x2c750a[_0x2adf02(0xec)])&&_0x47399e['push']({'field':'cssUrl','message':_0x2adf02(0xdb)}),_0x47399e;}export async function runMenuUpdateCore(_0x450bad,_0x47bca6,_0x48bc8e,_0x2559e2={}){const _0xdc3604=a175_0x4f14,_0x19df46=parseUpdateParamsFlag(_0x48bc8e),_0x8d5159=normalizeMode(_0x2559e2[_0xdc3604(0xac)]);validateSelection(_0x2559e2[_0xdc3604(0xe0)]);const _0xe52a1f=[];if(_0x19df46[_0xdc3604(0xe4)])_0xe52a1f[_0xdc3604(0xbf)](_0x19df46[_0xdc3604(0xe4)]);if(_0x19df46[_0xdc3604(0xec)])_0xe52a1f[_0xdc3604(0xbf)](_0x19df46['cssUrl']);const _0x4da46d=validateParams(_0x19df46);if(_0x4da46d[_0xdc3604(0xdf)]>0x0){const _0x44f234=_0x4da46d['map'](_0x16af2f=>_0xdc3604(0xd3)+_0x16af2f[_0xdc3604(0xbc)]+':\x20'+_0x16af2f['message'])[_0xdc3604(0xc8)](';\x20');throw new Error(_0xdc3604(0xce)+_0x44f234);}if(_0xe52a1f[_0xdc3604(0xdf)]===0x0)throw new Error(_0xdc3604(0xd0)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0xdc3604(0xb1)](process['cwd']()),logger[_0xdc3604(0xea)]('menu-asset-update',_0xdc3604(0xb5),{'appCode':_0x450bad,'jsUrl':_0x19df46[_0xdc3604(0xe4)],'cssUrl':_0x19df46[_0xdc3604(0xec)],'mode':_0x8d5159,'dryRun':_0x2559e2[_0xdc3604(0xc4)]===!![]});if(_0x19df46[_0xdc3604(0xe4)]){const _0x529e22=await isUrlReachable(_0x19df46[_0xdc3604(0xe4)]);if(!_0x529e22)throw new Error(_0xdc3604(0xb9)+_0x19df46[_0xdc3604(0xe4)]);}if(_0x19df46['cssUrl']){const _0x50762e=await isUrlReachable(_0x19df46[_0xdc3604(0xec)]);if(!_0x50762e)throw new Error(_0xdc3604(0xe3)+_0x19df46['cssUrl']);}const _0x3debc7=await getOnlineMenuList(_0x450bad,_0x47bca6),_0x252b44=_0x3debc7[_0xdc3604(0xc3)](_0x2e6c19=>_0x2e6c19['resources'][_0xdc3604(0xdf)]>0x0),_0x3fb464=selectMenusForUpdate(_0x252b44,_0x2559e2[_0xdc3604(0xe0)]);if(_0x3fb464[_0xdc3604(0xdf)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x2559e2[_0xdc3604(0xc4)]===!![]};const _0x2cf937=_0x3fb464[_0xdc3604(0xed)](_0x2d34db=>buildMenuUpdateDiff(_0x2d34db,_0x19df46,_0x8d5159,_0x2559e2[_0xdc3604(0xbd)]===!![],_0x2559e2['loadScriptMode']));if(_0x2559e2[_0xdc3604(0xc4)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x2cf937};const _0x79ac24=await Promise[_0xdc3604(0xcd)](_0x3fb464[_0xdc3604(0xed)]((_0x15be96,_0x32454c)=>updateMenuCdnUrl(_0x450bad,_0x47bca6,{'id':_0x15be96['id'],'label':_0x15be96[_0xdc3604(0xf0)],'path':_0x15be96[_0xdc3604(0xb4)],'resources':_0x2cf937[_0x32454c][_0xdc3604(0xb2)]['resources'],'extend':_0x15be96[_0xdc3604(0xeb)]??null,'loadScriptMode':_0x2559e2[_0xdc3604(0xe5)]}))),_0x1a9f55=_0x79ac24[_0xdc3604(0xc3)](_0x29241e=>_0x29241e[_0xdc3604(0xe2)]===_0xdc3604(0xd2))[_0xdc3604(0xed)](_0x3e8443=>_0x3e8443[_0xdc3604(0xc1)]),_0x16c3f4=_0x79ac24[_0xdc3604(0xc3)](_0x5db429=>_0x5db429[_0xdc3604(0xe2)]===_0xdc3604(0xbe))[_0xdc3604(0xdf)];return logger[_0xdc3604(0xea)](_0xdc3604(0xd7),_0xdc3604(0xc5),{'count':_0x3fb464['length'],'resources':_0xe52a1f}),{'updated':_0x1a9f55[_0xdc3604(0xdf)],'failed':_0x16c3f4,'skipped':![],'menus':_0x1a9f55};}function validateSelection(_0x4713b6){const _0x204b0c=a175_0x4f14;if(!_0x4713b6)throw new Error(_0x204b0c(0xb8));if(_0x4713b6[_0x204b0c(0xd6)]&&(_0x4713b6[_0x204b0c(0xe1)]['length']>0x0||_0x4713b6[_0x204b0c(0xcf)]['length']>0x0))throw new Error(_0x204b0c(0xda));if(!_0x4713b6[_0x204b0c(0xd6)]&&_0x4713b6[_0x204b0c(0xe1)][_0x204b0c(0xdf)]===0x0&&_0x4713b6[_0x204b0c(0xcf)]['length']===0x0)throw new Error(_0x204b0c(0xb8));}export function selectMenusForUpdate(_0x4d209a,_0x5c89cf){const _0x5e6f15=a175_0x4f14;validateSelection(_0x5c89cf);if(_0x5c89cf['all'])return _0x4d209a;const _0x4e6af=new Set(_0x4d209a[_0x5e6f15(0xed)](_0x188e1b=>_0x188e1b['id'])),_0x130583=new Set(_0x4d209a['map'](_0x1309b3=>_0x1309b3[_0x5e6f15(0xb4)])),_0x1dd3b0=_0x5c89cf[_0x5e6f15(0xe1)][_0x5e6f15(0xc3)](_0x20de20=>!_0x4e6af[_0x5e6f15(0xc9)](_0x20de20)),_0x3eaaca=_0x5c89cf[_0x5e6f15(0xcf)][_0x5e6f15(0xc3)](_0x5695f0=>!_0x130583[_0x5e6f15(0xc9)](_0x5695f0));if(_0x1dd3b0[_0x5e6f15(0xdf)]>0x0||_0x3eaaca[_0x5e6f15(0xdf)]>0x0){const _0x2cd338=[..._0x1dd3b0[_0x5e6f15(0xed)](_0x527519=>String(_0x527519)),..._0x3eaaca][_0x5e6f15(0xc8)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x2cd338);}const _0x3d75b4=new Set(_0x5c89cf[_0x5e6f15(0xe1)]),_0x5324be=new Set(_0x5c89cf['paths']);return _0x4d209a[_0x5e6f15(0xc3)](_0x5d3453=>_0x3d75b4[_0x5e6f15(0xc9)](_0x5d3453['id'])||_0x5324be[_0x5e6f15(0xc9)](_0x5d3453[_0x5e6f15(0xb4)]));}function normalizeMode(_0x305652){const _0x288976=a175_0x4f14;if(!_0x305652)return'patch';if(_0x305652==='replace'||_0x305652===_0x288976(0xbb))return _0x305652;throw new Error(_0x288976(0xcb)+_0x305652+_0x288976(0xd5));}function buildMenuUpdateDiff(_0x1d7919,_0x205ffd,_0x1a2247,_0xd5bfa1,_0x1e7c60){const _0x5ece0b=a175_0x4f14,_0x3a80af=[..._0x1d7919[_0x5ece0b(0xd1)]];_0x1a2247===_0x5ece0b(0xbb)&&assertUnambiguousPatchResources(_0x1d7919,_0x3a80af,_0x205ffd);const _0x21cce8=_0x1a2247===_0x5ece0b(0xbb)?patchResources(_0x3a80af,_0x205ffd):replaceResources(_0x205ffd),_0x112b45=[],_0x17863e=_0x3a80af['some'](isJsResource),_0x2000dc=_0x21cce8['some'](isJsResource);if(_0x17863e&&!_0x2000dc){const _0x23ad81=_0x5ece0b(0xe8)+_0x1d7919[_0x5ece0b(0xf0)]+_0x5ece0b(0xc7)+_0x1d7919[_0x5ece0b(0xb4)]+').\x20'+_0x5ece0b(0xe7);if(!_0xd5bfa1)throw new Error(_0x23ad81);_0x112b45['push'](_0x23ad81);}const _0x3086d7=_0x3a80af[_0x5ece0b(0xd4)](isCssResource),_0x261ecb=_0x21cce8[_0x5ece0b(0xd4)](isCssResource);_0x3086d7&&!_0x261ecb&&_0x112b45[_0x5ece0b(0xbf)](_0x5ece0b(0xc0)+_0x1d7919[_0x5ece0b(0xf0)]+_0x5ece0b(0xc7)+_0x1d7919[_0x5ece0b(0xb4)]+').');const _0x5cd311=typeof _0x1d7919[_0x5ece0b(0xeb)]?.['loadScriptMode']===_0x5ece0b(0xde)?_0x1d7919[_0x5ece0b(0xeb)][_0x5ece0b(0xe5)]:null,_0x5ce32f=_0x1e7c60?{'loadScriptMode':_0x5cd311}:{},_0x26fbb0=_0x1e7c60?{'loadScriptMode':_0x1e7c60}:{};return{'id':_0x1d7919['id'],'label':_0x1d7919['label'],'path':_0x1d7919[_0x5ece0b(0xb4)],'mode':_0x1a2247,'before':{'resources':_0x3a80af,..._0x5ce32f},'after':{'resources':_0x21cce8,..._0x26fbb0},'warnings':_0x112b45};}function a175_0x4f14(_0xb20085,_0x51e446){_0xb20085=_0xb20085-0xab;const _0x257e2f=a175_0x257e();let _0x4f1412=_0x257e2f[_0xb20085];return _0x4f1412;}function replaceResources(_0x2bb33a){const _0x28177f=a175_0x4f14;return[_0x2bb33a[_0x28177f(0xe4)],_0x2bb33a['cssUrl']][_0x28177f(0xc3)](_0x2e9ca6=>!!_0x2e9ca6);}function assertUnambiguousPatchResources(_0x4f73a2,_0x56aa2c,_0x3bf993){const _0xabc873=a175_0x4f14,_0x24c3b4=_0x56aa2c[_0xabc873(0xc3)](isJsResource)[_0xabc873(0xdf)];if(_0x3bf993[_0xabc873(0xe4)]&&_0x24c3b4>0x1)throw new Error(_0xabc873(0xf2)+_0x24c3b4+_0xabc873(0xab)+_0x4f73a2[_0xabc873(0xf0)]+_0xabc873(0xc7)+_0x4f73a2[_0xabc873(0xb4)]+')\x20'+_0xabc873(0xad));const _0x95e933=_0x56aa2c[_0xabc873(0xc3)](isCssResource)['length'];if(_0x3bf993[_0xabc873(0xec)]&&_0x95e933>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x95e933+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x4f73a2[_0xabc873(0xf0)]+_0xabc873(0xc7)+_0x4f73a2[_0xabc873(0xb4)]+')\x20'+'with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');}function patchResources(_0x9e7e6b,_0x51f69d){const _0x597d0c=a175_0x4f14;let _0x1221c4=![],_0x3b6832=![];const _0x2dfe19=[];for(const _0x3e23af of _0x9e7e6b){if(isJsResource(_0x3e23af)){if(_0x51f69d['jsUrl']&&!_0x1221c4)_0x2dfe19[_0x597d0c(0xbf)](_0x51f69d['jsUrl']),_0x1221c4=!![];else!_0x51f69d[_0x597d0c(0xe4)]&&_0x2dfe19[_0x597d0c(0xbf)](_0x3e23af);continue;}if(isCssResource(_0x3e23af)){if(_0x51f69d[_0x597d0c(0xec)]&&!_0x3b6832)_0x2dfe19[_0x597d0c(0xbf)](_0x51f69d[_0x597d0c(0xec)]),_0x3b6832=!![];else!_0x51f69d[_0x597d0c(0xec)]&&_0x2dfe19[_0x597d0c(0xbf)](_0x3e23af);continue;}_0x2dfe19['push'](_0x3e23af);}return _0x51f69d[_0x597d0c(0xe4)]&&!_0x1221c4&&_0x2dfe19[_0x597d0c(0xc6)](_0x51f69d[_0x597d0c(0xe4)]),_0x51f69d[_0x597d0c(0xec)]&&!_0x3b6832&&_0x2dfe19[_0x597d0c(0xbf)](_0x51f69d[_0x597d0c(0xec)]),_0x2dfe19;}function isJsResource(_0xd3abb2){const _0xd5b0c=a175_0x4f14;return stripQuery(_0xd3abb2)[_0xd5b0c(0xae)]()[_0xd5b0c(0xb7)](_0xd5b0c(0xee));}function isCssResource(_0x498e51){const _0x322888=a175_0x4f14;return stripQuery(_0x498e51)['toLowerCase']()[_0x322888(0xb7)]('.css');}function stripQuery(_0xe4f429){const _0x20ecfd=a175_0x4f14;return _0xe4f429[_0x20ecfd(0xe9)]('?')[0x0]??_0xe4f429;}function parseUpdateParamsFlag(_0x2dd0a0){const _0x1473e5=a175_0x4f14;if(!_0x2dd0a0||typeof _0x2dd0a0!=='string')return{};try{const _0x304aa6=JSON[_0x1473e5(0xc2)](_0x2dd0a0);if(typeof _0x304aa6!==_0x1473e5(0xf1)||_0x304aa6===null||Array[_0x1473e5(0xba)](_0x304aa6))return{};return{'jsUrl':typeof _0x304aa6[_0x1473e5(0xe4)]===_0x1473e5(0xde)?_0x304aa6[_0x1473e5(0xe4)][_0x1473e5(0xcc)]():undefined,'cssUrl':typeof _0x304aa6[_0x1473e5(0xec)]===_0x1473e5(0xde)?_0x304aa6[_0x1473e5(0xec)]['trim']():undefined};}catch{return{};}}function a175_0x257e(){const _0x57761c=['some','.\x20Allowed\x20values:\x20replace,\x20patch','all','menu-asset-update','6992460FyuRKm','668546XOrTjE','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','2118RUsJvF','501655FtAPCZ','string','length','selection','menuIds','status','CSS\x20URL\x20is\x20unreachable:\x20','jsUrl','loadScriptMode','8tqgTkw','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','split','info','extend','cssUrl','map','.js','2072aWLsfj','label','object','menu\x20asset-update\x20cannot\x20patch\x20','\x20existing\x20JS\x20resources\x20for\x20\x22','mode','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','toLowerCase','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','281661ySONKH','setLogPath','after','59346TeFzcN','path','Start\x20non-interactive\x20menu\x20asset\x20update','56EQgNjm','endsWith','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','JS\x20URL\x20is\x20unreachable:\x20','isArray','patch','field','force','rejected','push','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','value','parse','filter','dryRun','Menu\x20asset\x20update\x20completed','unshift','\x22\x20(','join','has','756510ISGmUK','Invalid\x20--mode:\x20','trim','allSettled','Invalid\x20--params:\x20','paths','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','resources','fulfilled','--params.'];a175_0x257e=function(){return _0x57761c;};return a175_0x257e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11c0d1,_0x40f258){const _0x25242d=a176_0x185f,_0x564648=_0x11c0d1();while(!![]){try{const _0x2715fc=parseInt(_0x25242d(0x8b))/0x1*(parseInt(_0x25242d(0x95))/0x2)+parseInt(_0x25242d(0x94))/0x3*(-parseInt(_0x25242d(0x91))/0x4)+-parseInt(_0x25242d(0x90))/0x5*(-parseInt(_0x25242d(0x8e))/0x6)+-parseInt(_0x25242d(0x93))/0x7+parseInt(_0x25242d(0x97))/0x8+parseInt(_0x25242d(0x99))/0x9+-parseInt(_0x25242d(0x98))/0xa;if(_0x2715fc===_0x40f258)break;else _0x564648['push'](_0x564648['shift']());}catch(_0x43a2e0){_0x564648['push'](_0x564648['shift']());}}}(a176_0x1f70,0xebf09));export function isValidJsHttpsUrl(_0x5cfd0e){const _0x5cf388=a176_0x185f;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x5cfd0e[_0x5cf388(0x96)]());}function a176_0x185f(_0x1df799,_0x52ab08){_0x1df799=_0x1df799-0x8b;const _0x1f701c=a176_0x1f70();let _0x185fbf=_0x1f701c[_0x1df799];return _0x185fbf;}export function isValidCssHttpsUrl(_0x3b61de){const _0x44e1de=a176_0x185f;return/^https:\/\/.+\.css(\?.*)?$/[_0x44e1de(0x8f)](_0x3b61de[_0x44e1de(0x96)]());}export async function isUrlReachable(_0x5c8ed4){const _0x34fbbd=a176_0x185f;try{const _0x41cb8d=await fetch(_0x5c8ed4,{'method':_0x34fbbd(0x9a)});if(_0x41cb8d['ok'])return!![];}catch{}try{const _0xb92b46=await fetch(_0x5c8ed4,{'method':_0x34fbbd(0x8c),'headers':{'Range':'bytes=0-0'}}),_0x51ae21=_0xb92b46['ok'];try{await _0xb92b46[_0x34fbbd(0x92)]?.[_0x34fbbd(0x8d)]();}catch{}return _0x51ae21;}catch{return![];}}function a176_0x1f70(){const _0xe465dc=['902388OjTOFz','4jjCHgt','trim','445968ijsDYD','5980450gVqmWw','13949748cMnHEM','HEAD','900534OJJwrK','GET','cancel','551886AeCOig','test','5CskwHF','4HFRKVp','body','11434619McKEiT'];a176_0x1f70=function(){return _0xe465dc;};return a176_0x1f70();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a177_0x2a4e(_0x3eb686,_0x5851fc){_0x3eb686=_0x3eb686-0xfa;const _0x52f612=a177_0x52f6();let _0x2a4ea6=_0x52f612[_0x3eb686];return _0x2a4ea6;}const a177_0x53fe0d=a177_0x2a4e;(function(_0x3fdf5f,_0x1e4578){const _0x5d66ce=a177_0x2a4e,_0xf85418=_0x3fdf5f();while(!![]){try{const _0x96db0e=-parseInt(_0x5d66ce(0xfd))/0x1+parseInt(_0x5d66ce(0x108))/0x2+-parseInt(_0x5d66ce(0xfb))/0x3+parseInt(_0x5d66ce(0x107))/0x4*(parseInt(_0x5d66ce(0xfa))/0x5)+parseInt(_0x5d66ce(0x105))/0x6+-parseInt(_0x5d66ce(0x104))/0x7*(parseInt(_0x5d66ce(0x103))/0x8)+-parseInt(_0x5d66ce(0xff))/0x9;if(_0x96db0e===_0x1e4578)break;else _0xf85418['push'](_0xf85418['shift']());}catch(_0x2edd94){_0xf85418['push'](_0xf85418['shift']());}}}(a177_0x52f6,0x44126));import{getSmartAppRecord}from'../../core/api-client.js';function a177_0x52f6(){const _0x500618=['2497650wOWpsM','\x20menu(s)\x20for\x20','1590388TNblsy','929196BDdyPQ','5KEcmRn','819234qepqoH','boundMenus','241804zmetGN','menu','311094kKSOrh','cookie','all','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','36016ouqKAy','700PkeTvF'];a177_0x52f6=function(){return _0x500618;};return a177_0x52f6();}import{getOnlineMenuList}from'../../commands/menu/shared/service.js';import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';export const menuSubappAssetsStatus={'service':a177_0x53fe0d(0xfe),'command':'subapp-assets-status','description':a177_0x53fe0d(0x102),'risk':'read','strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x140386){getSubappSelector(_0x140386);},async 'execute'(_0x4a6293){const _0x106825=a177_0x53fe0d,{appCode:_0x4bf44c,appName:_0x9e27ea}=getSubappSelector(_0x4a6293),[_0x48e9ba,_0x948078]=await Promise[_0x106825(0x101)]([getSmartAppRecord(_0x4bf44c,_0x4a6293[_0x106825(0x100)]),getOnlineMenuList(_0x4bf44c,_0x4a6293[_0x106825(0x100)])]),_0x3d9dc9={'appCode':_0x4bf44c,...buildSubappAssetsStatus(_0x48e9ba,_0x948078,_0x9e27ea)};return{'ok':!![],'data':_0x3d9dc9,'message':'Inspected\x20'+_0x3d9dc9[_0x106825(0xfc)]+_0x106825(0x106)+_0x9e27ea+'\x20in\x20menu\x20host\x20'+_0x4bf44c+'.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a178_0x3fdbc3=a178_0x4d5e;(function(_0x1bec6a,_0x5f548e){const _0x1e1d18=a178_0x4d5e,_0x297503=_0x1bec6a();while(!![]){try{const _0x4bed1f=-parseInt(_0x1e1d18(0x1cd))/0x1*(-parseInt(_0x1e1d18(0x1d9))/0x2)+parseInt(_0x1e1d18(0x1b0))/0x3*(parseInt(_0x1e1d18(0x1d1))/0x4)+parseInt(_0x1e1d18(0x1b4))/0x5*(parseInt(_0x1e1d18(0x1c7))/0x6)+parseInt(_0x1e1d18(0x1e2))/0x7+parseInt(_0x1e1d18(0x1b1))/0x8+-parseInt(_0x1e1d18(0x1cc))/0x9+-parseInt(_0x1e1d18(0x19a))/0xa*(parseInt(_0x1e1d18(0x1b8))/0xb);if(_0x4bed1f===_0x5f548e)break;else _0x297503['push'](_0x297503['shift']());}catch(_0x3bb00b){_0x297503['push'](_0x297503['shift']());}}}(a178_0x7d1b,0x6cd1f));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a178_0x7d1b(){const _0x13d8cf=['--resources\x20is\x20required.','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','expected-hash','Unknown\x20app.extend\x20fields:\x20','string','assets','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.',';\x20independent\x20deployment\x20not\x20verified.','\x20in\x20menu\x20host\x20','https:','protocol','resources','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','object','tenantColumn','resources[','test','326271BMJPhm','6642456NNyVzJ','entries','isArray','355uPTCPu','apiError','not\x20HTTPS','parse','9783400qfhjgr',']\x20must\x20be\x20a\x20URL\x20string.','length','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','filter','stringify','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','str','extend','some','app.extend.assets','cookie','Would\x20update\x20shared\x20assets\x20for\x20','directDbEnabled',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','56802uhpcqn','join','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','expectedHash','vipDeploy','2571912nCdprh','1udAxcj','appName','/smartapi/app/update','accessKey','4VSDLPU','\x20contains\x20invalid\x20JSON.','size','trim','sha256','enableAutoSync','appPublishStatus','appCode','17734sjjTun','.\x20Refusing\x20update.','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','keys','enableOpenApi','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','has','map','validation','5649WRMZUd','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','nextExtend','hex','unchanged','10raAeTg','Updated\x20shared\x20resources\x20for\x20'];a178_0x7d1b=function(){return _0x13d8cf;};return a178_0x7d1b();}import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set(['skinColor',a178_0x3fdbc3(0x1dd),a178_0x3fdbc3(0x1d0),a178_0x3fdbc3(0x1a2),a178_0x3fdbc3(0x1ad),'enableSample',a178_0x3fdbc3(0x1cb),a178_0x3fdbc3(0x1d6),'directDbId',a178_0x3fdbc3(0x1c5)]);function a178_0x4d5e(_0x65258,_0x296655){_0x65258=_0x65258-0x199;const _0x7d1b06=a178_0x7d1b();let _0x4d5e12=_0x7d1b06[_0x65258];return _0x4d5e12;}function parseObject(_0x15660b,_0x261f0b){const _0x4034f9=a178_0x3fdbc3;let _0xef56d=_0x15660b;if(typeof _0x15660b===_0x4034f9(0x1a1))try{_0xef56d=JSON[_0x4034f9(0x1b7)](_0x15660b);}catch{throw CliErrors[_0x4034f9(0x1e1)](_0x261f0b+_0x4034f9(0x1d2));}if(!_0xef56d||typeof _0xef56d!==_0x4034f9(0x1ac)||Array[_0x4034f9(0x1b3)](_0xef56d))throw CliErrors[_0x4034f9(0x1e1)](_0x261f0b+'\x20must\x20be\x20a\x20JSON\x20object.');return _0xef56d;}function parseArray(_0x19a1e9,_0xa92694){const _0x5c1be9=a178_0x3fdbc3;let _0x4c99f4;try{_0x4c99f4=JSON[_0x5c1be9(0x1b7)](_0x19a1e9);}catch{throw CliErrors[_0x5c1be9(0x1e1)](_0xa92694+_0x5c1be9(0x1d2));}if(!Array['isArray'](_0x4c99f4))throw CliErrors['validation'](_0xa92694+'\x20must\x20be\x20a\x20JSON\x20array.');return _0x4c99f4[_0x5c1be9(0x1e0)]((_0x38334c,_0x102301)=>parseObject(_0x38334c,_0xa92694+'['+_0x102301+']'));}function validateResources(_0x2cdc5b){const _0x2a27ae=a178_0x3fdbc3;if(_0x2cdc5b[_0x2a27ae(0x1ba)]===0x0)throw CliErrors[_0x2a27ae(0x1e1)]('At\x20least\x20one\x20resource\x20URL\x20is\x20required.');for(const [_0x296377,_0x22388e]of _0x2cdc5b[_0x2a27ae(0x1b2)]()){if(typeof _0x22388e!=='string')throw CliErrors[_0x2a27ae(0x1e1)](_0x2a27ae(0x1ae)+_0x296377+_0x2a27ae(0x1b9));try{if(new URL(_0x22388e)[_0x2a27ae(0x1a8)]!==_0x2a27ae(0x1a7))throw new Error(_0x2a27ae(0x1b6));}catch{throw CliErrors['validation'](_0x2a27ae(0x1ae)+_0x296377+_0x2a27ae(0x1c6));}}if(new Set(_0x2cdc5b)[_0x2a27ae(0x1d3)]!==_0x2cdc5b['length']||!_0x2cdc5b[_0x2a27ae(0x1c1)](_0x4f96ff=>/\.m?js(?:[?#]|$)/i[_0x2a27ae(0x1af)](_0x4f96ff)))throw CliErrors[_0x2a27ae(0x1e1)]('Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.');return _0x2cdc5b;}function prepare(_0xa4cca8,_0x2a6e9b,_0x17b9ae){const _0x1ffb3e=a178_0x3fdbc3;if(!Number['isSafeInteger'](_0xa4cca8['id'])||(_0xa4cca8['id']??0x0)<=0x0||typeof _0xa4cca8[_0x1ffb3e(0x1d7)]!==_0x1ffb3e(0x1a1)||!_0xa4cca8[_0x1ffb3e(0x1d7)])throw CliErrors[_0x1ffb3e(0x1e1)](_0x1ffb3e(0x1de));const _0x3a735c=parseObject(_0xa4cca8[_0x1ffb3e(0x1c0)],'app.extend'),_0x814478=Object[_0x1ffb3e(0x1dc)](_0x3a735c)[_0x1ffb3e(0x1bc)](_0x5f2a64=>!KNOWN_EXTEND_KEYS[_0x1ffb3e(0x1df)](_0x5f2a64));if(_0x814478[_0x1ffb3e(0x1ba)])throw CliErrors[_0x1ffb3e(0x1e1)](_0x1ffb3e(0x1a0)+_0x814478[_0x1ffb3e(0x1c8)](',\x20')+_0x1ffb3e(0x1da));if(typeof _0x3a735c['assets']!==_0x1ffb3e(0x1a1))throw CliErrors[_0x1ffb3e(0x1e1)](_0x1ffb3e(0x1aa));const _0x2ee6bf=parseArray(_0x3a735c[_0x1ffb3e(0x1a2)],_0x1ffb3e(0x1c2)),_0x112a39=_0x2ee6bf[_0x1ffb3e(0x1bc)](_0x128060=>_0x128060[_0x1ffb3e(0x1ce)]===_0x2a6e9b);if(_0x112a39[_0x1ffb3e(0x1ba)]!==0x1)throw CliErrors[_0x1ffb3e(0x1e1)]('Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20'+_0x2a6e9b+';\x20found\x20'+_0x112a39[_0x1ffb3e(0x1ba)]+'.');const _0x5b4a3b=_0x112a39[0x0];if(typeof _0x5b4a3b[_0x1ffb3e(0x1a9)]!==_0x1ffb3e(0x1a1))throw CliErrors[_0x1ffb3e(0x1e1)](_0x1ffb3e(0x1db));let _0x4d437e;try{_0x4d437e=JSON[_0x1ffb3e(0x1b7)](_0x5b4a3b[_0x1ffb3e(0x1a9)]);}catch{throw CliErrors[_0x1ffb3e(0x1e1)](_0x1ffb3e(0x19d));}if(!Array['isArray'](_0x4d437e)||_0x4d437e[_0x1ffb3e(0x1c1)](_0x534477=>typeof _0x534477!==_0x1ffb3e(0x1a1)))throw CliErrors[_0x1ffb3e(0x1e1)](_0x1ffb3e(0x1ab));const _0x181e0b=_0x2ee6bf[_0x1ffb3e(0x1e0)](_0x33061f=>_0x33061f===_0x5b4a3b?{..._0x33061f,'resources':JSON[_0x1ffb3e(0x1bd)](_0x17b9ae)}:_0x33061f),_0x966818={..._0x3a735c,'assets':JSON[_0x1ffb3e(0x1bd)](_0x181e0b)},_0x216b31=createHash(_0x1ffb3e(0x1d5))['update'](JSON[_0x1ffb3e(0x1bd)]({'appCode':_0xa4cca8[_0x1ffb3e(0x1d8)],'id':_0xa4cca8['id'],'appPublishStatus':_0xa4cca8['appPublishStatus'],'extend':_0x3a735c,'appName':_0x2a6e9b,'resources':_0x17b9ae}))['digest'](_0x1ffb3e(0x1e5));return{'before':_0x4d437e,'nextExtend':_0x966818,'expectedHash':_0x216b31,'unchanged':isDeepStrictEqual(_0x4d437e,_0x17b9ae)};}function flags(_0x2f855b){const _0x5179e6=a178_0x3fdbc3,{appCode:_0x3ece58,appName:_0x2e8a28}=getSubappSelector(_0x2f855b),_0x5cad73=_0x2f855b[_0x5179e6(0x1bf)](_0x5179e6(0x1a9))[_0x5179e6(0x1d4)]();if(!_0x5cad73)throw CliErrors['validation'](_0x5179e6(0x19c));let _0x471bc1;try{_0x471bc1=JSON['parse'](_0x5cad73);}catch{throw CliErrors[_0x5179e6(0x1e1)](_0x5179e6(0x19e));}if(!Array[_0x5179e6(0x1b3)](_0x471bc1))throw CliErrors[_0x5179e6(0x1e1)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');return{'appCode':_0x3ece58,'appName':_0x2e8a28,'resources':validateResources(_0x471bc1)};}export const menuSubappAssetsUpdate={'service':'menu','command':'subapp-assets-update','description':a178_0x3fdbc3(0x1bb),'risk':'write','strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a178_0x3fdbc3(0x1a9),'type':a178_0x3fdbc3(0x1a1),'required':!![],'description':'JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs'},{'name':'expected-hash','type':a178_0x3fdbc3(0x1a1),'description':a178_0x3fdbc3(0x1c9)}],async 'validate'(_0x5d1c20){flags(_0x5d1c20);},async 'dryRun'(_0x578b23){const _0x3ffaef=a178_0x3fdbc3,{appCode:_0x378e68,appName:_0x433a14,resources:_0x4e32dc}=flags(_0x578b23),_0x3660c7=await getSmartAppRecord(_0x378e68,_0x578b23['cookie']),_0x43c0eb=prepare(_0x3660c7,_0x433a14,_0x4e32dc);return{'method':'POST','url':_0x3ffaef(0x1cf),'body':{'preview':{'appCode':_0x378e68,'appName':_0x433a14,'before':_0x43c0eb['before'],'after':_0x4e32dc,'expectedHash':_0x43c0eb['expectedHash'],'unchanged':_0x43c0eb[_0x3ffaef(0x199)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x43c0eb[_0x3ffaef(0x199)]?_0x3ffaef(0x1a3):_0x3ffaef(0x1c4)+_0x433a14+'.'};},async 'execute'(_0x5064d7){const _0x141371=a178_0x3fdbc3,{appCode:_0x2ad1ca,appName:_0x129c27,resources:_0x382c95}=flags(_0x5064d7),_0x188695=_0x5064d7[_0x141371(0x1bf)](_0x141371(0x19f))['trim']();if(!/^[a-f0-9]{64}$/i[_0x141371(0x1af)](_0x188695))throw CliErrors[_0x141371(0x1e1)](_0x141371(0x1a4));const _0x22e729=await getSmartAppRecord(_0x2ad1ca,_0x5064d7[_0x141371(0x1c3)]),_0x5c5fc5=prepare(_0x22e729,_0x129c27,_0x382c95);if(_0x188695!==_0x5c5fc5[_0x141371(0x1ca)])throw CliErrors[_0x141371(0x1e1)](_0x141371(0x1be));if(_0x5c5fc5['unchanged'])return{'ok':!![],'data':{'appCode':_0x2ad1ca,'appName':_0x129c27,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x141371(0x1e3)};await updateSmartAppRecord({'id':_0x22e729['id'],'appCode':_0x2ad1ca,'appPublishStatus':_0x22e729[_0x141371(0x1d7)],'extend':_0x5c5fc5['nextExtend']},_0x5064d7[_0x141371(0x1c3)]);const _0x5551e2=await getSmartAppRecord(_0x2ad1ca,_0x5064d7['cookie']),_0x141e1f=parseObject(_0x5551e2[_0x141371(0x1c0)],'verified\x20app.extend');if(_0x5551e2['id']!==_0x22e729['id']||_0x5551e2[_0x141371(0x1d7)]!==_0x22e729[_0x141371(0x1d7)]||!isDeepStrictEqual(_0x141e1f,_0x5c5fc5[_0x141371(0x1e4)]))throw CliErrors[_0x141371(0x1b5)]('App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.');return{'ok':!![],'data':{'appCode':_0x2ad1ca,'appName':_0x129c27,'updated':!![],'resources':_0x382c95,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x141371(0x19b)+_0x129c27+_0x141371(0x1a6)+_0x2ad1ca+_0x141371(0x1a5)};}};
|
|
1
|
+
const a178_0xe7b19c=a178_0x1d2f;function a178_0x589c(){const _0x43f326=['skinColor','accessKey','1863363Ethdgx','size','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','test','map','.\x20Refusing\x20update.','some',';\x20independent\x20deployment\x20not\x20verified.','object','extend','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','string','keys','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','Would\x20update\x20shared\x20assets\x20for\x20','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','cookie','app.extend.assets','unchanged','directDbEnabled','nextExtend','digest','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','expectedHash','stringify','hex','vipDeploy','24WdUjgk','46642WZxYtB','sha256','enableOpenApi','https:','has','/smartapi/app/update','\x20in\x20menu\x20host\x20','str','--resources\x20is\x20required.','Updated\x20shared\x20resources\x20for\x20','verified\x20app.extend','3826963kifJbq','\x20must\x20be\x20a\x20JSON\x20object.',']\x20must\x20be\x20a\x20URL\x20string.','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','trim','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','15wIjKuy','isArray','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','resources','6037390AvgiWx','resources[','filter','316809vjZZsn','apiError','6mgXWty','\x20must\x20be\x20a\x20JSON\x20array.','entries','enableSample','validation','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','directDbId','length','subapp-assets-update','appPublishStatus','appCode','689932yLWpOZ','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','expected-hash','parse','before','assets','\x20contains\x20invalid\x20JSON.','enableAutoSync',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','POST','551925ttUAOx'];a178_0x589c=function(){return _0x43f326;};return a178_0x589c();}(function(_0x3c8b7f,_0x3d18d0){const _0x83ce97=a178_0x1d2f,_0x15126c=_0x3c8b7f();while(!![]){try{const _0x2116c7=-parseInt(_0x83ce97(0xc1))/0x1+-parseInt(_0x83ce97(0xe1))/0x2+-parseInt(_0x83ce97(0xc4))/0x3+parseInt(_0x83ce97(0xb7))/0x4*(parseInt(_0x83ce97(0xa3))/0x5)+parseInt(_0x83ce97(0xac))/0x6*(parseInt(_0x83ce97(0x9d))/0x7)+-parseInt(_0x83ce97(0xe0))/0x8*(parseInt(_0x83ce97(0xaa))/0x9)+parseInt(_0x83ce97(0xa7))/0xa;if(_0x2116c7===_0x3d18d0)break;else _0x15126c['push'](_0x15126c['shift']());}catch(_0x3c6d14){_0x15126c['push'](_0x15126c['shift']());}}}(a178_0x589c,0x59567));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a178_0xe7b19c(0xc2),a178_0xe7b19c(0xe3),a178_0xe7b19c(0xc3),'assets','tenantColumn',a178_0xe7b19c(0xaf),a178_0xe7b19c(0xdf),a178_0xe7b19c(0xbe),a178_0xe7b19c(0xb2),a178_0xe7b19c(0xd8)]);function parseObject(_0x4e3497,_0x4403d6){const _0x2ee1a0=a178_0xe7b19c;let _0x99593=_0x4e3497;if(typeof _0x4e3497===_0x2ee1a0(0xd0))try{_0x99593=JSON[_0x2ee1a0(0xba)](_0x4e3497);}catch{throw CliErrors['validation'](_0x4403d6+_0x2ee1a0(0xbd));}if(!_0x99593||typeof _0x99593!==_0x2ee1a0(0xcc)||Array[_0x2ee1a0(0xa4)](_0x99593))throw CliErrors[_0x2ee1a0(0xb0)](_0x4403d6+_0x2ee1a0(0x9e));return _0x99593;}function parseArray(_0x14fbf2,_0xb9421c){const _0x50e0ac=a178_0xe7b19c;let _0x2151a7;try{_0x2151a7=JSON['parse'](_0x14fbf2);}catch{throw CliErrors[_0x50e0ac(0xb0)](_0xb9421c+_0x50e0ac(0xbd));}if(!Array['isArray'](_0x2151a7))throw CliErrors[_0x50e0ac(0xb0)](_0xb9421c+_0x50e0ac(0xad));return _0x2151a7[_0x50e0ac(0xc8)]((_0x589dab,_0x3c0ed0)=>parseObject(_0x589dab,_0xb9421c+'['+_0x3c0ed0+']'));}function a178_0x1d2f(_0x321a85,_0x24fed4){_0x321a85=_0x321a85-0x97;const _0x589c25=a178_0x589c();let _0x1d2f79=_0x589c25[_0x321a85];return _0x1d2f79;}function validateResources(_0x483330){const _0x2eed06=a178_0xe7b19c;if(_0x483330[_0x2eed06(0xb3)]===0x0)throw CliErrors[_0x2eed06(0xb0)]('At\x20least\x20one\x20resource\x20URL\x20is\x20required.');for(const [_0x534d91,_0x293ea6]of _0x483330[_0x2eed06(0xae)]()){if(typeof _0x293ea6!==_0x2eed06(0xd0))throw CliErrors[_0x2eed06(0xb0)](_0x2eed06(0xa8)+_0x534d91+_0x2eed06(0x9f));try{if(new URL(_0x293ea6)['protocol']!==_0x2eed06(0xe4))throw new Error('not\x20HTTPS');}catch{throw CliErrors['validation']('resources['+_0x534d91+_0x2eed06(0xbf));}}if(new Set(_0x483330)[_0x2eed06(0xc5)]!==_0x483330['length']||!_0x483330[_0x2eed06(0xca)](_0x1a9b85=>/\.m?js(?:[?#]|$)/i[_0x2eed06(0xc7)](_0x1a9b85)))throw CliErrors[_0x2eed06(0xb0)](_0x2eed06(0xd4));return _0x483330;}function prepare(_0x2582e0,_0x34e15e,_0x2a81e5){const _0x31f68a=a178_0xe7b19c;if(!Number['isSafeInteger'](_0x2582e0['id'])||(_0x2582e0['id']??0x0)<=0x0||typeof _0x2582e0[_0x31f68a(0xb5)]!==_0x31f68a(0xd0)||!_0x2582e0[_0x31f68a(0xb5)])throw CliErrors[_0x31f68a(0xb0)](_0x31f68a(0xa5));const _0x34a2d0=parseObject(_0x2582e0[_0x31f68a(0xcd)],'app.extend'),_0x3f7c6f=Object[_0x31f68a(0xd1)](_0x34a2d0)['filter'](_0x47ec8b=>!KNOWN_EXTEND_KEYS[_0x31f68a(0xe5)](_0x47ec8b));if(_0x3f7c6f[_0x31f68a(0xb3)])throw CliErrors[_0x31f68a(0xb0)]('Unknown\x20app.extend\x20fields:\x20'+_0x3f7c6f['join'](',\x20')+_0x31f68a(0xc9));if(typeof _0x34a2d0[_0x31f68a(0xbc)]!==_0x31f68a(0xd0))throw CliErrors[_0x31f68a(0xb0)]('app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.');const _0x4fc138=parseArray(_0x34a2d0[_0x31f68a(0xbc)],_0x31f68a(0xd6)),_0x474b3d=_0x4fc138[_0x31f68a(0xa9)](_0x5911f4=>_0x5911f4['appName']===_0x34e15e);if(_0x474b3d[_0x31f68a(0xb3)]!==0x1)throw CliErrors[_0x31f68a(0xb0)](_0x31f68a(0xd2)+_0x34e15e+';\x20found\x20'+_0x474b3d['length']+'.');const _0x4b7626=_0x474b3d[0x0];if(typeof _0x4b7626[_0x31f68a(0xa6)]!==_0x31f68a(0xd0))throw CliErrors[_0x31f68a(0xb0)](_0x31f68a(0xce));let _0x330e6a;try{_0x330e6a=JSON[_0x31f68a(0xba)](_0x4b7626[_0x31f68a(0xa6)]);}catch{throw CliErrors[_0x31f68a(0xb0)]('Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.');}if(!Array[_0x31f68a(0xa4)](_0x330e6a)||_0x330e6a[_0x31f68a(0xca)](_0x1efef5=>typeof _0x1efef5!==_0x31f68a(0xd0)))throw CliErrors['validation'](_0x31f68a(0xa0));const _0x5a8ec3=_0x4fc138[_0x31f68a(0xc8)](_0x47df66=>_0x47df66===_0x4b7626?{..._0x47df66,'resources':JSON[_0x31f68a(0xdd)](_0x2a81e5)}:_0x47df66),_0x12d274={..._0x34a2d0,'assets':JSON['stringify'](_0x5a8ec3)},_0x494d1e=createHash(_0x31f68a(0xe2))['update'](JSON[_0x31f68a(0xdd)]({'appCode':_0x2582e0[_0x31f68a(0xb6)],'id':_0x2582e0['id'],'appPublishStatus':_0x2582e0['appPublishStatus'],'extend':_0x34a2d0,'appName':_0x34e15e,'resources':_0x2a81e5}))[_0x31f68a(0xda)](_0x31f68a(0xde));return{'before':_0x330e6a,'nextExtend':_0x12d274,'expectedHash':_0x494d1e,'unchanged':isDeepStrictEqual(_0x330e6a,_0x2a81e5)};}function flags(_0x4c0622){const _0x38807a=a178_0xe7b19c,{appCode:_0x88ab13,appName:_0x29b52}=getSubappSelector(_0x4c0622),_0x4b0456=_0x4c0622[_0x38807a(0x99)](_0x38807a(0xa6))[_0x38807a(0xa1)]();if(!_0x4b0456)throw CliErrors[_0x38807a(0xb0)](_0x38807a(0x9a));let _0x3038d;try{_0x3038d=JSON[_0x38807a(0xba)](_0x4b0456);}catch{throw CliErrors[_0x38807a(0xb0)](_0x38807a(0xb8));}if(!Array[_0x38807a(0xa4)](_0x3038d))throw CliErrors[_0x38807a(0xb0)](_0x38807a(0xb8));return{'appCode':_0x88ab13,'appName':_0x29b52,'resources':validateResources(_0x3038d)};}export const menuSubappAssetsUpdate={'service':'menu','command':a178_0xe7b19c(0xb4),'description':a178_0xe7b19c(0xc6),'risk':'write','strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a178_0xe7b19c(0xa6),'type':a178_0xe7b19c(0xd0),'required':!![],'description':a178_0xe7b19c(0xa2)},{'name':'expected-hash','type':a178_0xe7b19c(0xd0),'description':a178_0xe7b19c(0xb1)}],async 'validate'(_0x9aefed){flags(_0x9aefed);},async 'dryRun'(_0x348a5f){const _0x2d100e=a178_0xe7b19c,{appCode:_0x1a6691,appName:_0xf56ee2,resources:_0x29fb47}=flags(_0x348a5f),_0x3cfa8b=await getSmartAppRecord(_0x1a6691,_0x348a5f[_0x2d100e(0xd5)]),_0x183cfe=prepare(_0x3cfa8b,_0xf56ee2,_0x29fb47);return{'method':_0x2d100e(0xc0),'url':_0x2d100e(0x97),'body':{'preview':{'appCode':_0x1a6691,'appName':_0xf56ee2,'before':_0x183cfe[_0x2d100e(0xbb)],'after':_0x29fb47,'expectedHash':_0x183cfe['expectedHash'],'unchanged':_0x183cfe['unchanged'],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x183cfe[_0x2d100e(0xd7)]?'Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.':_0x2d100e(0xd3)+_0xf56ee2+'.'};},async 'execute'(_0x8272d0){const _0x2efe1f=a178_0xe7b19c,{appCode:_0x32919d,appName:_0x23dc95,resources:_0x58629c}=flags(_0x8272d0),_0x32eea5=_0x8272d0[_0x2efe1f(0x99)](_0x2efe1f(0xb9))[_0x2efe1f(0xa1)]();if(!/^[a-f0-9]{64}$/i[_0x2efe1f(0xc7)](_0x32eea5))throw CliErrors[_0x2efe1f(0xb0)](_0x2efe1f(0xcf));const _0x2541d7=await getSmartAppRecord(_0x32919d,_0x8272d0[_0x2efe1f(0xd5)]),_0xff9de5=prepare(_0x2541d7,_0x23dc95,_0x58629c);if(_0x32eea5!==_0xff9de5[_0x2efe1f(0xdc)])throw CliErrors['validation']('App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.');if(_0xff9de5[_0x2efe1f(0xd7)])return{'ok':!![],'data':{'appCode':_0x32919d,'appName':_0x23dc95,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x2efe1f(0xdb)};await updateSmartAppRecord({'id':_0x2541d7['id'],'appCode':_0x32919d,'appPublishStatus':_0x2541d7[_0x2efe1f(0xb5)],'extend':_0xff9de5[_0x2efe1f(0xd9)]},_0x8272d0['cookie']);const _0x491e49=await getSmartAppRecord(_0x32919d,_0x8272d0[_0x2efe1f(0xd5)]),_0x2c35d7=parseObject(_0x491e49[_0x2efe1f(0xcd)],_0x2efe1f(0x9c));if(_0x491e49['id']!==_0x2541d7['id']||_0x491e49[_0x2efe1f(0xb5)]!==_0x2541d7[_0x2efe1f(0xb5)]||!isDeepStrictEqual(_0x2c35d7,_0xff9de5[_0x2efe1f(0xd9)]))throw CliErrors[_0x2efe1f(0xab)]('App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.');return{'ok':!![],'data':{'appCode':_0x32919d,'appName':_0x23dc95,'updated':!![],'resources':_0x58629c,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x2efe1f(0x9b)+_0x23dc95+_0x2efe1f(0x98)+_0x32919d+_0x2efe1f(0xcb)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a179_0x4f5273=a179_0x4dbd;(function(_0x80c1aa,_0x48439a){const _0x313e40=a179_0x4dbd,_0x2b9960=_0x80c1aa();while(!![]){try{const _0x651843=parseInt(_0x313e40(0x18f))/0x1+-parseInt(_0x313e40(0x19e))/0x2*(parseInt(_0x313e40(0x1c6))/0x3)+-parseInt(_0x313e40(0x197))/0x4+-parseInt(_0x313e40(0x1c7))/0x5+parseInt(_0x313e40(0x195))/0x6*(parseInt(_0x313e40(0x193))/0x7)+parseInt(_0x313e40(0x1bf))/0x8+parseInt(_0x313e40(0x198))/0x9*(-parseInt(_0x313e40(0x19b))/0xa);if(_0x651843===_0x48439a)break;else _0x2b9960['push'](_0x2b9960['shift']());}catch(_0x1024b3){_0x2b9960['push'](_0x2b9960['shift']());}}}(a179_0x71fd,0x786ce));import a179_0x29d165 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';function a179_0x4dbd(_0x18a5e5,_0x2f4e71){_0x18a5e5=_0x18a5e5-0x18d;const _0x71fd73=a179_0x71fd();let _0x4dbd5c=_0x71fd73[_0x18a5e5];return _0x4dbd5c;}export const menuSync={'service':'menu','command':a179_0x4f5273(0x1b9),'description':'Register\x20local\x20pages\x20as\x20platform\x20menus','risk':'write','flags':[{'name':a179_0x4f5273(0x1a9),'type':a179_0x4f5273(0x1ab),'description':a179_0x4f5273(0x1a0)+a179_0x4f5273(0x19f)},{'name':a179_0x4f5273(0x1d0),'type':'string','description':a179_0x4f5273(0x1bd)},{'name':a179_0x4f5273(0x1c8),'type':a179_0x4f5273(0x1b0),'description':a179_0x4f5273(0x1cb)}],async 'dryRun'(_0x5a261a){const _0x210b27=a179_0x4f5273;ensureRunnableContext(_0x5a261a['rawFlags'],_0x5a261a[_0x210b27(0x1cc)]);const _0x10a359=await runMenuSyncCore(_0x5a261a[_0x210b27(0x1b2)],_0x5a261a[_0x210b27(0x1cf)],parsePaths(_0x5a261a[_0x210b27(0x1ad)](_0x210b27(0x1d0))),_0x5a261a[_0x210b27(0x1ad)](_0x210b27(0x1a9)),{'dryRun':!![]});return{'method':_0x210b27(0x1a8),'url':_0x210b27(0x1b4),'body':_0x10a359,'description':_0x10a359[_0x210b27(0x1b3)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':'Would\x20create\x20'+_0x10a359[_0x210b27(0x1ca)][_0x210b27(0x1c0)]+_0x210b27(0x1c4)};},async 'execute'(_0x28d0ba){const _0x1396ed=a179_0x4f5273;ensureRunnableContext(_0x28d0ba[_0x1396ed(0x1a6)],_0x28d0ba[_0x1396ed(0x1cc)]);const _0x42bb42=_0x28d0ba[_0x1396ed(0x1af)]('yes'),_0x371c92=_0x28d0ba[_0x1396ed(0x1ad)](_0x1396ed(0x1a9)),_0x82f8bb=parsePaths(_0x28d0ba[_0x1396ed(0x1ad)]('paths')),_0x807a75=parseMenuSyncParams(_0x371c92);if(_0x42bb42){const _0x39ef92=await runMenuSyncCore(_0x28d0ba[_0x1396ed(0x1b2)],_0x28d0ba[_0x1396ed(0x1cf)],_0x82f8bb,_0x371c92);if(_0x39ef92[_0x1396ed(0x1b3)]){const _0x3b3396=getLocalPages();_0x3b3396['length']===0x0?writeCliSideChannelLine(_0x1396ed(0x191)):writeCliSideChannelLine(_0x1396ed(0x18d));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x39ef92[_0x1396ed(0x1a4)]+_0x1396ed(0x1c2));return{'ok':!![],'data':_0x39ef92,'message':_0x39ef92[_0x1396ed(0x1b3)]?_0x1396ed(0x1ce):_0x1396ed(0x1be)+_0x39ef92['created']+_0x1396ed(0x1bb)};}if(_0x82f8bb[_0x1396ed(0x1c0)]>0x0)throw CliErrors[_0x1396ed(0x1d2)]('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0x1396ed(0x1d1));if(!isInteractive()&&_0x371c92)throw CliErrors['validation'](_0x1396ed(0x19c),_0x1396ed(0x1d1));requireInteractive(),writeCliSideChannelLine(_0x1396ed(0x1b8));const _0x438844=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x1c3a36,_0x485dd8,_0x5dda26;try{const _0x3972ec=await fetchMenuData(_0x28d0ba[_0x1396ed(0x1b2)],_0x28d0ba[_0x1396ed(0x1cf)]);_0x1c3a36=_0x3972ec[_0x1396ed(0x19d)],_0x485dd8=_0x3972ec[_0x1396ed(0x196)],_0x5dda26=_0x3972ec[_0x1396ed(0x192)],stopSpinner(_0x438844,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x50c6d0){stopSpinner(_0x438844,_0x1396ed(0x199),![]);throw CliErrors[_0x1396ed(0x1d2)](_0x50c6d0 instanceof Error?_0x50c6d0[_0x1396ed(0x1a7)]:_0x1396ed(0x199));}if(_0x1c3a36[_0x1396ed(0x1c0)]===0x0)return writeCliSideChannelLine(a179_0x29d165['yellow'](_0x1396ed(0x190))),{'ok':!![]};const _0x5aad15=buildCompareRows(_0x1c3a36,_0x485dd8);writeCliSideChannelLine(renderCompareTable(_0x5aad15)),writeCliSideChannelLine('');const _0x59c8cf=await selectPages(_0x1c3a36,_0x485dd8);writeCliSideChannelLine(''),writeCliSideChannelLine(a179_0x29d165[_0x1396ed(0x1a1)]('\x20\x20✓\x20Selected:\x20'+_0x59c8cf['length']+'\x20page(s)'));const _0xcb5151=_0x807a75[_0x1396ed(0x1c3)]&&_0x807a75[_0x1396ed(0x1b1)];if(!_0xcb5151){writeCliSideChannelLine(renderSyncSummary(_0x59c8cf,_0x485dd8['size']>0x0));const _0x3acb4f=await askConfirm(_0x1396ed(0x18e));if(!_0x3acb4f)return writeCliSideChannelLine(a179_0x29d165['gray']('\x20\x20Cancelled.')),{'ok':!![]};}let _0xada97c=_0x807a75[_0x1396ed(0x1c3)],_0x226929=_0x807a75[_0x1396ed(0x1b1)];!_0xada97c&&!_0x807a75[_0x1396ed(0x1b6)]&&(_0xada97c=await askJsUrl());!_0x226929&&!_0x807a75[_0x1396ed(0x1b6)]&&(_0x226929=await askCssUrl());const _0x4326b4=await askConfirm(_0x807a75[_0x1396ed(0x1b6)]?_0x1396ed(0x1bc)+_0x59c8cf[_0x1396ed(0x1c0)]+_0x1396ed(0x1cd)+_0x807a75[_0x1396ed(0x1b6)]+'?':'\x20\x20Create\x20'+_0x59c8cf[_0x1396ed(0x1c0)]+'\x20menu(s)\x20with\x20JS:\x20'+_0xada97c+'\x20and\x20CSS:\x20'+_0x226929+'?');if(!_0x4326b4)return writeCliSideChannelLine(a179_0x29d165[_0x1396ed(0x19a)](_0x1396ed(0x194))),{'ok':!![]};const _0x264601=[_0xada97c,_0x226929][_0x1396ed(0x1ae)](_0x3a4416=>Boolean(_0x3a4416));_0x807a75[_0x1396ed(0x1b6)]&&_0x264601[_0x1396ed(0x1c0)]===0x0&&await assertSharedResourcesConfigured(_0x28d0ba[_0x1396ed(0x1b2)],_0x28d0ba[_0x1396ed(0x1cf)],_0x807a75[_0x1396ed(0x1b6)]);const _0x54d371=startSpinner(_0x1396ed(0x1ba)+_0x59c8cf[_0x1396ed(0x1c0)]+'\x20menu(s)...');try{const _0xb8d41a=_0x59c8cf[_0x1396ed(0x1a5)](_0x14996a=>resolvePage(_0x14996a,_0x807a75,_0x5dda26)),_0x3f3d72=await doCreateMenus(_0x28d0ba[_0x1396ed(0x1b2)],_0x28d0ba[_0x1396ed(0x1cf)],_0xb8d41a,_0x264601,_0x807a75[_0x1396ed(0x1b6)]?{'appName':_0x807a75[_0x1396ed(0x1b6)]}:undefined);return stopSpinner(_0x54d371,_0x1396ed(0x1b7)+_0x3f3d72['created']+'\x20menu(s)',!![]),{'ok':!![],'data':_0x3f3d72,'message':_0x1396ed(0x1be)+_0x3f3d72['created']+_0x1396ed(0x1d3)+_0x3f3d72[_0x1396ed(0x1c1)]+_0x1396ed(0x1c9)};}catch(_0xcc7b39){stopSpinner(_0x54d371,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x1396ed(0x1d2)](_0xcc7b39 instanceof Error?_0xcc7b39['message']:_0x1396ed(0x1ac));}}};function ensureRunnableContext(_0xc63261,_0x42cce8){const _0x8a2922=a179_0x4f5273,_0x347b83=_0xc63261['appcode']?String(_0xc63261[_0x8a2922(0x1a3)])[_0x8a2922(0x1c5)]():'';if(!isInProject()&&!_0x42cce8&&!_0x347b83)throw CliErrors[_0x8a2922(0x1d2)](_0x8a2922(0x1b5)+_0x8a2922(0x1aa));}function a179_0x71fd(){const _0x2a51f8=['appcode','created','map','rawFlags','message','POST','params','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','string','Menu\x20creation\x20failed','str','filter','flag','boolean','cssUrl','appCode','skipped','/smartapi/menu/create','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','appName','Created\x20','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','sync','Creating\x20','\x20created.','\x20\x20Create\x20','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Menu\x20sync\x20completed:\x20','7307880DKaVaI','length','failed','\x20menu(s)\x20created','jsUrl','\x20local\x20microfrontend\x20menu(s).','trim','2661471EvSxUO','1451700jwwDPi','yes','\x20failed.','targetPages','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','selectedAppName','\x20menu(s)\x20bound\x20to\x20','Menu\x20sync\x20skipped','cookie','paths','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','validation','\x20created,\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20\x20Continue\x20with\x20creation?','765224yGXzzN','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','onlineMenuList','123095NXpMoW','\x20\x20Cancelled.','84ICTqeZ','onlinePaths','6932OSCncm','13131LtJFmk','Failed\x20to\x20fetch\x20online\x20menu\x20list','gray','1730bhmViu','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','localPages','2aKOktj','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','cyan','split'];a179_0x71fd=function(){return _0x2a51f8;};return a179_0x71fd();}function parsePaths(_0x2844e9){const _0x24a7ae=a179_0x4f5273;return[...new Set(_0x2844e9[_0x24a7ae(0x1a2)](',')[_0x24a7ae(0x1a5)](_0x4a84ce=>_0x4a84ce[_0x24a7ae(0x1c5)]())[_0x24a7ae(0x1ae)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a180_0x13d0dc=a180_0x80cf;function a180_0x80cf(_0x43932d,_0x1862ff){_0x43932d=_0x43932d-0x159;const _0x2b2722=a180_0x2b27();let _0x80cfaa=_0x2b2722[_0x43932d];return _0x80cfaa;}(function(_0x569779,_0x375f3e){const _0x2e539f=a180_0x80cf,_0x175614=_0x569779();while(!![]){try{const _0x4d461a=parseInt(_0x2e539f(0x172))/0x1*(parseInt(_0x2e539f(0x1c6))/0x2)+-parseInt(_0x2e539f(0x19f))/0x3*(parseInt(_0x2e539f(0x17e))/0x4)+-parseInt(_0x2e539f(0x16d))/0x5*(-parseInt(_0x2e539f(0x170))/0x6)+parseInt(_0x2e539f(0x16c))/0x7+-parseInt(_0x2e539f(0x1c2))/0x8+-parseInt(_0x2e539f(0x1a1))/0x9+-parseInt(_0x2e539f(0x1c8))/0xa;if(_0x4d461a===_0x375f3e)break;else _0x175614['push'](_0x175614['shift']());}catch(_0x14c055){_0x175614['push'](_0x175614['shift']());}}}(a180_0x2b27,0xa28d6));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a180_0x13d0dc(0x183),'path':a180_0x13d0dc(0x164)}];export const menuVisibilityUpdate={'service':a180_0x13d0dc(0x178),'command':a180_0x13d0dc(0x196),'description':a180_0x13d0dc(0x16e),'risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a180_0x13d0dc(0x160),'type':a180_0x13d0dc(0x15e),'description':a180_0x13d0dc(0x1c0)},{'name':'paths','type':a180_0x13d0dc(0x15e),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a180_0x13d0dc(0x1be),'type':a180_0x13d0dc(0x1c1),'required':!![],'description':a180_0x13d0dc(0x1b4)},{'name':a180_0x13d0dc(0x1cc),'type':a180_0x13d0dc(0x1c1),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':'expected-count','type':a180_0x13d0dc(0x19c),'description':a180_0x13d0dc(0x173)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x226902){parseInput(_0x226902),requireExplicitYes(_0x226902);},async 'dryRun'(_0x2ab56e){const _0x8a0505=a180_0x13d0dc,_0x396022=await buildPlan(_0x2ab56e,!![]),_0x382631=_0x396022['plan'][_0x8a0505(0x1ac)]?.[_0x8a0505(0x188)]??0x0,_0x433246=_0x396022[_0x8a0505(0x190)][_0x8a0505(0x18e)]['length']-_0x382631;return menuDryRunResult(_0x396022[_0x8a0505(0x190)],{'method':'POST','url':_0x8a0505(0x164),'body':{'updates':_0x396022['plan']['plannedActions']?.['map'](_0x25183b=>_0x25183b[_0x8a0505(0x18d)])??[]},'description':_0x8a0505(0x17d)+_0x382631+_0x8a0505(0x166)+_0x433246+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x442f82){const _0xb8be52=a180_0x13d0dc;requireExplicitYes(_0x442f82);const _0x495e4e=await buildPlan(_0x442f82,![]);await recheckMutationSnapshot(_0x442f82,_0x495e4e[_0xb8be52(0x190)],'update\x20menu\x20visibility');const _0x53758d=[],_0x493cb3=[],_0x38c991=[];for(const _0xa861e of _0x495e4e[_0xb8be52(0x190)][_0xb8be52(0x18e)]){if(_0xa861e[_0xb8be52(0x195)][_0xb8be52(0x1be)]===_0x495e4e[_0xb8be52(0x190)]['requestedVisible']){_0x53758d[_0xb8be52(0x1a7)]({'id':_0xa861e['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x442f82[_0xb8be52(0x16b)],_0x442f82[_0xb8be52(0x163)],{'id':_0xa861e['id'],'visible':_0x495e4e[_0xb8be52(0x190)]['requestedVisible']}),_0x53758d['push']({'id':_0xa861e['id'],'updated':!![],'skipped':![]});}catch(_0x5d6dba){const _0x38caec=mapMenuApiError(_0x5d6dba,_0xb8be52(0x15b),_0xa861e['id']);if(isMenuResponseLoss(_0x5d6dba)&&_0x38caec[_0xb8be52(0x15d)]!==_0xb8be52(0x1d2)){_0x38c991[_0xb8be52(0x1a7)](_0xa861e['id']);continue;}_0x493cb3['push']({'id':_0xa861e['id'],'stage':_0xb8be52(0x180),'code':_0x38caec[_0xb8be52(0x15d)],'message':_0x38caec[_0xb8be52(0x1ad)]});}}let _0x6b79e6;try{_0x6b79e6=await fetchMenuSnapshot(_0x442f82[_0xb8be52(0x16b)],_0x442f82[_0xb8be52(0x163)]);}catch(_0x5776c5){const _0xc68148=describeMenuErrorCause(_0x5776c5,'verify\x20menu\x20visibility\x20update'),_0x54ec72=_0x38c991[_0xb8be52(0x15f)](_0x4ecc49=>({'id':_0x4ecc49,'stage':_0xb8be52(0x17a),'code':_0xb8be52(0x18b),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x4ecc49+_0xb8be52(0x1d0),'requestedStateConfirmed':![],'recovered':![]})),_0x2fda6e={'stage':_0xb8be52(0x181),'code':_0xb8be52(0x18b),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x495e4e['plan'][_0xb8be52(0x18e)][_0xb8be52(0x15f)](_0x48dc99=>_0x48dc99['id']),'requestedStateConfirmed':![],..._0xc68148};throw menuFailure(asVerificationError(_0x5776c5,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x495e4e[_0xb8be52(0x190)],{'stage':_0xb8be52(0x181),'succeeded':_0x53758d,'failedRecords':[..._0x493cb3,..._0x54ec72,_0x2fda6e],'warnings':[_0xb8be52(0x185)],'verification':{'status':_0xb8be52(0x169),'recoveredCount':0x0,'lookupCommand':_0xb8be52(0x1b8)}});}const _0x4a82c0=[];for(const _0x20f914 of _0x53758d){const _0x269d96=Number(_0x20f914['id']),_0x423c89=_0x495e4e['beforeById'][_0xb8be52(0x1cb)](_0x269d96),_0x1184f5=_0x6b79e6[_0xb8be52(0x15a)]['get'](_0x269d96);try{verifyVisibilityUpdate(_0x423c89,_0x1184f5,_0x495e4e[_0xb8be52(0x190)][_0xb8be52(0x162)]);}catch(_0xaf90b8){const _0x5594bb=asVerificationError(_0xaf90b8,'Menu\x20'+_0x269d96+_0xb8be52(0x1c3));_0x4a82c0[_0xb8be52(0x1a7)]({'id':_0x269d96,'stage':_0xb8be52(0x181),'code':_0x5594bb[_0xb8be52(0x15d)],'message':_0x5594bb[_0xb8be52(0x1ad)],'requestedStateConfirmed':![]});}}for(const _0x56770e of _0x38c991){const _0x551752=_0x495e4e[_0xb8be52(0x1bf)][_0xb8be52(0x1cb)](_0x56770e),_0x2ed03d=_0x6b79e6[_0xb8be52(0x15a)][_0xb8be52(0x1cb)](_0x56770e);try{verifyVisibilityUpdate(_0x551752,_0x2ed03d,_0x495e4e['plan']['requestedVisible']),_0x53758d[_0xb8be52(0x1a7)]({'id':_0x56770e,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x170bdd){const _0x29f230=asVerificationError(_0x170bdd,_0xb8be52(0x1b9)+_0x56770e+_0xb8be52(0x167));_0x4a82c0[_0xb8be52(0x1a7)]({'id':_0x56770e,'stage':_0xb8be52(0x17a),'code':_0x29f230['code'],'message':_0x29f230[_0xb8be52(0x1ad)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4a82c0[_0xb8be52(0x188)]>0x0){const _0x4812f4=_0x4a82c0[_0xb8be52(0x15f)](_0x2a6dc8=>Number(_0x2a6dc8['id'])),_0xa48d05=_0x53758d[_0xb8be52(0x182)](_0x43fe62=>_0x43fe62[_0xb8be52(0x17c)]===!![])[_0xb8be52(0x188)],_0xd1d528=menuError('menu_verification_failed',_0xb8be52(0x1bc)+_0x4812f4[_0xb8be52(0x1c4)](',\x20')+'.',_0xb8be52(0x194));throw menuFailure(_0xd1d528,_0x495e4e['plan'],{'stage':'verification','succeeded':_0x53758d,'failedRecords':[..._0x493cb3,..._0x4a82c0],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0xb8be52(0x169),..._0x4812f4[_0xb8be52(0x188)]===0x1?{'targetId':_0x4812f4[0x0]}:{'targetIds':_0x4812f4},'recoveredCount':_0xa48d05,'lookupCommand':_0xb8be52(0x1b8)}});}const _0x1ba6a2=_0x53758d[_0xb8be52(0x182)](_0x119749=>_0x119749[_0xb8be52(0x177)]===!![])[_0xb8be52(0x188)],_0x5dd89a=_0x53758d[_0xb8be52(0x188)]-_0x1ba6a2,_0x529789={..._0x495e4e['plan'],'succeeded':_0x53758d,'failed':_0x493cb3,'warnings':_0x493cb3['length']>0x0?[..._0x495e4e[_0xb8be52(0x190)]['warnings'],_0xb8be52(0x18c)]:_0x495e4e[_0xb8be52(0x190)]['warnings'],'verification':{'checkedBy':_0xb8be52(0x1ab),'snapshotHash':_0x6b79e6[_0xb8be52(0x176)],'matchesRequestedState':_0x493cb3[_0xb8be52(0x188)]===0x0,'recoveredCount':_0x38c991[_0xb8be52(0x188)]}};return{'ok':_0x493cb3[_0xb8be52(0x188)]===0x0,'data':_0x529789,'message':_0x493cb3['length']===0x0?'Updated\x20visibility\x20for\x20'+_0x1ba6a2+'\x20menu(s);\x20skipped\x20'+_0x5dd89a+_0xb8be52(0x192):'Menu\x20visibility\x20update\x20completed:\x20'+_0x1ba6a2+_0xb8be52(0x1a2)+_0x5dd89a+'\x20skipped,\x20'+_0x493cb3['length']+_0xb8be52(0x1cf)};}};function parseInput(_0x4ddc4b){const _0x834b47=a180_0x13d0dc,_0x5a6e78=parseMenuIds(_0x4ddc4b[_0x834b47(0x18f)]('menu-ids')),_0x3e7c6b=parseCsv(_0x4ddc4b[_0x834b47(0x18f)](_0x834b47(0x197)));if(_0x5a6e78[_0x834b47(0x188)]===0x0&&_0x3e7c6b[_0x834b47(0x188)]===0x0)throw CliErrors[_0x834b47(0x1af)](_0x834b47(0x161));const _0x5e808f=parseBooleanFlag(_0x4ddc4b,_0x834b47(0x1be),!![]),_0x2f13b9=parseBooleanFlag(_0x4ddc4b,_0x834b47(0x1cc),![]);let _0x473dd3;if(hasFlag(_0x4ddc4b,'expected-count')){_0x473dd3=_0x4ddc4b[_0x834b47(0x1bd)](_0x834b47(0x1d1));if(!Number[_0x834b47(0x1ca)](_0x473dd3)||_0x473dd3<0x0)throw CliErrors[_0x834b47(0x1af)](_0x834b47(0x1c9));}return{'menuIds':_0x5a6e78,'paths':_0x3e7c6b,'visible':_0x5e808f,'expectVisible':_0x2f13b9,'expectedCount':_0x473dd3};}function a180_0x2b27(){const _0xc7ca30=['paths','Menu\x20id\x20selector(s)\x20not\x20found:\x20','pageId','resourcesValid','menuIds','number','label','sort','64542LmuIEa','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','223803xMdCBd','\x20updated,\x20','flagMissing','isArray','rawFlags','menu_selector_ambiguous','push','childrenIds','pageType','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','menu\x20list','plannedActions','message','menu_state_drift','validation','\x20must\x20be\x20true\x20or\x20false.','trim','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','datasetId','Requested\x20menu\x20visibility','\x20menu(s),\x20expected\x20','stringify','childrenCount','rabetbase\x20menu\x20list\x20--format\x20compress','Response\x20was\x20lost\x20and\x20menu\x20','expectVisible','split','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','num','visible','beforeById','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','boolean','2791336IbLfzn','\x20visibility\x20update\x20could\x20not\x20be\x20verified','join','expectedCount','1443082qTBuFv','set','12619770NoApxV','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','isSafeInteger','get','expect-visible','menu_expected_count_mismatch','modelType','\x20failed.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','expected-count','menu_permission_denied','datasetCode','byId','update\x20visibility\x20for','true','code','string','map','menu-ids','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','requestedVisible','cookie','/smartapi/menu/update','depth','\x20menu(s);\x20skip\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Selected\x20','failed','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','appCode','3823211SLjGcM','5aTuDlD','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','menus','7106754NcpYOV','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','1bxsMCL','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','path','type','hash','updated','menu','parentId','update-recovery','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','recovered','Would\x20update\x20visibility\x20for\x20','28VpweIB','values','update','verification','filter','POST','Menu\x20','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','url','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','length','resources','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menu_verification_failed','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','body','targets','str','plan','false','\x20unchanged\x20menu(s).','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','before','visibility-update'];a180_0x2b27=function(){return _0xc7ca30;};return a180_0x2b27();}async function buildPlan(_0x48052e,_0x17b1eb){const _0x498ed1=a180_0x13d0dc,_0x30fb41=parseInput(_0x48052e),_0x355a6d=await fetchMutationSnapshot(_0x48052e,'update\x20menu\x20visibility'),_0x5c84ce=selectTargets(_0x355a6d[_0x498ed1(0x16f)],_0x30fb41[_0x498ed1(0x19b)],_0x30fb41[_0x498ed1(0x197)]);if(_0x30fb41['expectedCount']!==undefined&&_0x5c84ce[_0x498ed1(0x188)]!==_0x30fb41[_0x498ed1(0x1c5)])throw menuError(_0x498ed1(0x1cd),_0x498ed1(0x168)+_0x5c84ce[_0x498ed1(0x188)]+_0x498ed1(0x1b5)+_0x30fb41[_0x498ed1(0x1c5)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x30fb41[_0x498ed1(0x1ba)]!==undefined){const _0x43290f=_0x5c84ce[_0x498ed1(0x182)](_0x1f2d85=>_0x1f2d85[_0x498ed1(0x1be)]!==_0x30fb41[_0x498ed1(0x1ba)]);if(_0x43290f[_0x498ed1(0x188)]>0x0)throw menuError(_0x498ed1(0x1ae),_0x498ed1(0x1aa)+_0x43290f[_0x498ed1(0x15f)](_0x5ad5e4=>_0x5ad5e4['id'])[_0x498ed1(0x1c4)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x38687c=_0x5c84ce[_0x498ed1(0x15f)](_0x4f594b=>({'id':_0x4f594b['id'],'label':_0x4f594b['label'],'path':_0x4f594b[_0x498ed1(0x174)],'before':{'visible':_0x4f594b[_0x498ed1(0x1be)]},'after':{'visible':_0x30fb41[_0x498ed1(0x1be)]}})),_0x2173e6=_0x38687c[_0x498ed1(0x182)](_0x1c18d5=>_0x1c18d5[_0x498ed1(0x195)][_0x498ed1(0x1be)]!==_0x30fb41['visible'])['map'](_0xa13d75=>({'stage':'update-menu-visibility','method':_0x498ed1(0x183),'path':'/smartapi/menu/update','body':{'appCode':_0x48052e[_0x498ed1(0x16b)],'id':_0xa13d75['id'],'visible':_0x30fb41[_0x498ed1(0x1be)]}})),_0x3af1e3=mutationResult({'operation':_0x498ed1(0x196),'selector':{'menuIds':_0x30fb41[_0x498ed1(0x19b)],'paths':_0x30fb41[_0x498ed1(0x197)]},'before':{'menus':_0x5c84ce[_0x498ed1(0x15f)](_0xb25554=>({'id':_0xb25554['id'],'path':_0xb25554[_0x498ed1(0x174)],'visible':_0xb25554[_0x498ed1(0x1be)]}))},'after':{'menus':_0x5c84ce[_0x498ed1(0x15f)](_0x4b0949=>({'id':_0x4b0949['id'],'path':_0x4b0949[_0x498ed1(0x174)],'visible':_0x30fb41[_0x498ed1(0x1be)]}))},'dryRun':_0x17b1eb,'backend':[...BACKEND],'plannedActions':_0x2173e6,'snapshotHash':_0x355a6d[_0x498ed1(0x176)],'warnings':_0x2173e6[_0x498ed1(0x188)]===0x0?[_0x498ed1(0x1a0)]:[]});return{'plan':{..._0x3af1e3,'requestedVisible':_0x30fb41[_0x498ed1(0x1be)],'targets':_0x38687c},'beforeById':new Map(_0x5c84ce['map'](_0x3cf2ca=>[_0x3cf2ca['id'],_0x3cf2ca]))};}function selectTargets(_0xad3a24,_0x519058,_0x5e7c66){const _0xb6149f=a180_0x13d0dc,_0x397bde=new Map(_0xad3a24[_0xb6149f(0x15f)](_0x486fa9=>[_0x486fa9['id'],_0x486fa9])),_0x45be2c=new Map(),_0x4b9d88=_0x519058[_0xb6149f(0x182)](_0xdf4133=>!_0x397bde['has'](_0xdf4133));if(_0x4b9d88[_0xb6149f(0x188)]>0x0)throw menuError('menu_selector_not_found',_0xb6149f(0x198)+_0x4b9d88[_0xb6149f(0x1c4)](',\x20')+'.',_0xb6149f(0x17b));for(const _0xdcb22c of _0x519058){_0x45be2c[_0xb6149f(0x1c7)](_0xdcb22c,_0x397bde['get'](_0xdcb22c));}for(const _0x174437 of _0x5e7c66){const _0x46b03d=_0xad3a24['filter'](_0x283fbf=>_0x283fbf[_0xb6149f(0x174)]===_0x174437);if(_0x46b03d[_0xb6149f(0x188)]===0x0)throw menuError('menu_selector_not_found','Menu\x20path\x20selector\x20not\x20found:\x20'+JSON['stringify'](_0x174437)+'.',_0xb6149f(0x1b2));if(_0x46b03d[_0xb6149f(0x188)]>0x1)throw menuError(_0xb6149f(0x1a6),_0xb6149f(0x193)+JSON['stringify'](_0x174437)+'.',_0xb6149f(0x187)+_0x46b03d['map'](_0x2f5d38=>_0x2f5d38['id'])[_0xb6149f(0x1c4)](',\x20')+'.');const _0x1f4d6a=_0x46b03d[0x0];_0x45be2c['set'](_0x1f4d6a['id'],_0x1f4d6a);}return[..._0x45be2c[_0xb6149f(0x17f)]()];}function parseMenuIds(_0x264c50){const _0x274158=a180_0x13d0dc,_0x167731=parseCsv(_0x264c50),_0x28a211=_0x167731[_0x274158(0x15f)](Number);if(_0x28a211['some'](_0x47b80a=>!Number[_0x274158(0x1ca)](_0x47b80a)||_0x47b80a<=0x0))throw CliErrors[_0x274158(0x1af)](_0x274158(0x171));return[...new Set(_0x28a211)];}function parseCsv(_0x2a1b9b){const _0x155438=a180_0x13d0dc;return[...new Set(_0x2a1b9b[_0x155438(0x1bb)](',')['map'](_0x5ddaa2=>_0x5ddaa2[_0x155438(0x1b1)]())['filter'](Boolean))];}function parseBooleanFlag(_0x5e08e0,_0x1fc338,_0x21878b){const _0x7259e8=a180_0x13d0dc;if(!hasFlag(_0x5e08e0,_0x1fc338)){if(_0x21878b)throw CliErrors[_0x7259e8(0x1a3)](_0x1fc338);return undefined;}const _0x11ecee=_0x5e08e0[_0x7259e8(0x1a5)][_0x1fc338];if(_0x11ecee===!![]||_0x11ecee===![])return _0x11ecee;if(_0x11ecee===_0x7259e8(0x15c))return!![];if(_0x11ecee===_0x7259e8(0x191))return![];throw CliErrors[_0x7259e8(0x1af)]('--'+_0x1fc338+_0x7259e8(0x1b0));}function verifyVisibilityUpdate(_0x186737,_0x433a90,_0x49662a){const _0x5271dd=a180_0x13d0dc;assertVerified(!!_0x433a90,_0x5271dd(0x184)+_0x186737['id']+_0x5271dd(0x16a)),assertVerified(_0x433a90[_0x5271dd(0x1be)]===_0x49662a,_0x5271dd(0x184)+_0x186737['id']+_0x5271dd(0x18a));const _0x3eb4e9=[['id',_0x433a90['id'],_0x186737['id']],[_0x5271dd(0x179),_0x433a90[_0x5271dd(0x179)],_0x186737[_0x5271dd(0x179)]],[_0x5271dd(0x165),_0x433a90[_0x5271dd(0x165)],_0x186737[_0x5271dd(0x165)]],[_0x5271dd(0x19d),_0x433a90[_0x5271dd(0x19d)],_0x186737[_0x5271dd(0x19d)]],[_0x5271dd(0x174),_0x433a90['path'],_0x186737['path']],[_0x5271dd(0x186),_0x433a90[_0x5271dd(0x186)],_0x186737[_0x5271dd(0x186)]],[_0x5271dd(0x175),_0x433a90[_0x5271dd(0x175)],_0x186737[_0x5271dd(0x175)]],[_0x5271dd(0x19e),_0x433a90[_0x5271dd(0x19e)],_0x186737['sort']],['resources',_0x433a90[_0x5271dd(0x189)],_0x186737[_0x5271dd(0x189)]],['resourcesValid',_0x433a90[_0x5271dd(0x19a)],_0x186737[_0x5271dd(0x19a)]],[_0x5271dd(0x1a8),_0x433a90[_0x5271dd(0x1a8)],_0x186737['childrenIds']],[_0x5271dd(0x1b7),_0x433a90['childrenCount'],_0x186737[_0x5271dd(0x1b7)]],['pageId',_0x433a90[_0x5271dd(0x199)],_0x186737[_0x5271dd(0x199)]],[_0x5271dd(0x1a9),_0x433a90[_0x5271dd(0x1a9)],_0x186737[_0x5271dd(0x1a9)]],[_0x5271dd(0x1ce),_0x433a90['modelType'],_0x186737[_0x5271dd(0x1ce)]],[_0x5271dd(0x1b3),_0x433a90[_0x5271dd(0x1b3)],_0x186737[_0x5271dd(0x1b3)]],[_0x5271dd(0x159),_0x433a90[_0x5271dd(0x159)],_0x186737['datasetCode']]];for(const [_0x28b2b3,_0x441b1e,_0x4240f0]of _0x3eb4e9){assertVerified(sameValue(_0x441b1e,_0x4240f0),_0x5271dd(0x184)+_0x186737['id']+'\x20'+_0x28b2b3+'\x20changed\x20unexpectedly.');}}function sameValue(_0x1bd12f,_0x418a09){const _0x32458a=a180_0x13d0dc;if(Array[_0x32458a(0x1a4)](_0x1bd12f)||Array[_0x32458a(0x1a4)](_0x418a09))return JSON[_0x32458a(0x1b6)](_0x1bd12f)===JSON[_0x32458a(0x1b6)](_0x418a09);return _0x1bd12f===_0x418a09;}
|
|
1
|
+
const a180_0x5f488b=a180_0x5ce2;function a180_0x5272(){const _0x292012=['hash','get','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','path','modelType','childrenIds','resources','pageType','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Response\x20was\x20lost\x20for\x20menu\x20','Menu\x20path\x20selector\x20not\x20found:\x20','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','datasetCode','expectedCount','visibility-update','str','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','POST','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','high-risk-write','validation','expected-count','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','some','600285HyDBeq','rabetbase\x20menu\x20list\x20--format\x20compress','menu_selector_ambiguous','map','plan','true','requestedVisible','message','byId','recovered','url','2693592QDxeuM','Final\x20menu\x20visibility\x20readback\x20failed.','\x20updated,\x20','paths','isArray','label','update\x20visibility\x20for','set','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','50LtVWPu','isSafeInteger','datasetId','Updated\x20visibility\x20for\x20','\x20menu(s);\x20skipped\x20','update-recovery','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','push','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','\x20skipped,\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','\x20must\x20be\x20true\x20or\x20false.','cookie','string','targets','209476cdXiws','8zJKPui','failed','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','false','menu-ids','menu\x20list','childrenCount','/smartapi/menu/update','expect-visible','menu_expected_count_mismatch','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','join','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','flagMissing','values','code','820813fPoXvb','body','number','split','verification','trim','15692gFioKi','129PdcjcE','Would\x20update\x20visibility\x20for\x20','Menu\x20','boolean','sort','visible','menu_verification_failed','updated','menuIds','939719rKyjwy','menu','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Requested\x20menu\x20visibility','\x20menu(s);\x20skip\x20','depth','expectVisible','appCode','menu_selector_not_found','12Wguepk','plannedActions','\x20unchanged\x20menu(s).','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','261142YhQBXp','warnings','update','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','type','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','before','Menu\x20visibility\x20update\x20completed:\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','resourcesValid','beforeById','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','length','Selected\x20','stringify','pageId','update-menu-visibility','update\x20menu\x20visibility','num','parentId','\x20failed.','filter'];a180_0x5272=function(){return _0x292012;};return a180_0x5272();}(function(_0x461fde,_0x5d6c27){const _0x606da7=a180_0x5ce2,_0x2a3464=_0x461fde();while(!![]){try{const _0x1fe36b=parseInt(_0x606da7(0x199))/0x1+-parseInt(_0x606da7(0x1c8))/0x2+-parseInt(_0x606da7(0x1b2))/0x3*(parseInt(_0x606da7(0x1b1))/0x4)+parseInt(_0x606da7(0x1f7))/0x5*(parseInt(_0x606da7(0x1c4))/0x6)+-parseInt(_0x606da7(0x1ab))/0x7*(parseInt(_0x606da7(0x19a))/0x8)+-parseInt(_0x606da7(0x202))/0x9+parseInt(_0x606da7(0x20b))/0xa*(parseInt(_0x606da7(0x1bb))/0xb);if(_0x1fe36b===_0x5d6c27)break;else _0x2a3464['push'](_0x2a3464['shift']());}catch(_0x4c7703){_0x2a3464['push'](_0x2a3464['shift']());}}}(a180_0x5272,0x274a0));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';function a180_0x5ce2(_0x47e5ab,_0x5007b1){_0x47e5ab=_0x47e5ab-0x18d;const _0x5272e7=a180_0x5272();let _0x5ce296=_0x5272e7[_0x47e5ab];return _0x5ce296;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a180_0x5f488b(0x1ef),'path':a180_0x5f488b(0x1a1)}];export const menuVisibilityUpdate={'service':a180_0x5f488b(0x1bc),'command':a180_0x5f488b(0x1ec),'description':a180_0x5f488b(0x190),'risk':a180_0x5f488b(0x1f2),'structuredErrors':!![],'flags':[{'name':a180_0x5f488b(0x19e),'type':a180_0x5f488b(0x197),'description':a180_0x5f488b(0x1c7)},{'name':a180_0x5f488b(0x205),'type':a180_0x5f488b(0x197),'description':a180_0x5f488b(0x1ee)},{'name':a180_0x5f488b(0x1b7),'type':a180_0x5f488b(0x1b5),'required':!![],'description':a180_0x5f488b(0x1be)},{'name':a180_0x5f488b(0x1a2),'type':a180_0x5f488b(0x1b5),'description':a180_0x5f488b(0x1cb)},{'name':a180_0x5f488b(0x1f4),'type':a180_0x5f488b(0x1ad),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x182f42){parseInput(_0x182f42),requireExplicitYes(_0x182f42);},async 'dryRun'(_0x182175){const _0x38645f=a180_0x5f488b,_0x3d3b29=await buildPlan(_0x182175,!![]),_0x391be0=_0x3d3b29[_0x38645f(0x1fb)]['plannedActions']?.[_0x38645f(0x1d4)]??0x0,_0x2a9a4f=_0x3d3b29['plan'][_0x38645f(0x198)][_0x38645f(0x1d4)]-_0x391be0;return menuDryRunResult(_0x3d3b29[_0x38645f(0x1fb)],{'method':_0x38645f(0x1ef),'url':_0x38645f(0x1a1),'body':{'updates':_0x3d3b29[_0x38645f(0x1fb)][_0x38645f(0x1c5)]?.[_0x38645f(0x1fa)](_0x21de81=>_0x21de81[_0x38645f(0x1ac)])??[]},'description':_0x38645f(0x1b3)+_0x391be0+_0x38645f(0x1bf)+_0x2a9a4f+_0x38645f(0x1c6)});},async 'execute'(_0x2cd634){const _0x1c5cc3=a180_0x5f488b;requireExplicitYes(_0x2cd634);const _0x149bd5=await buildPlan(_0x2cd634,![]);await recheckMutationSnapshot(_0x2cd634,_0x149bd5['plan'],_0x1c5cc3(0x1d9));const _0x1f6d5f=[],_0x2d56ba=[],_0x80d278=[];for(const _0x11d387 of _0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x198)]){if(_0x11d387['before'][_0x1c5cc3(0x1b7)]===_0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x1fd)]){_0x1f6d5f['push']({'id':_0x11d387['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2cd634[_0x1c5cc3(0x1c2)],_0x2cd634['cookie'],{'id':_0x11d387['id'],'visible':_0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x1fd)]}),_0x1f6d5f[_0x1c5cc3(0x191)]({'id':_0x11d387['id'],'updated':!![],'skipped':![]});}catch(_0x378286){const _0x47b226=mapMenuApiError(_0x378286,_0x1c5cc3(0x208),_0x11d387['id']);if(isMenuResponseLoss(_0x378286)&&_0x47b226[_0x1c5cc3(0x1aa)]!=='menu_permission_denied'){_0x80d278[_0x1c5cc3(0x191)](_0x11d387['id']);continue;}_0x2d56ba[_0x1c5cc3(0x191)]({'id':_0x11d387['id'],'stage':_0x1c5cc3(0x1ca),'code':_0x47b226[_0x1c5cc3(0x1aa)],'message':_0x47b226[_0x1c5cc3(0x1fe)]});}}let _0x42f8f8;try{_0x42f8f8=await fetchMenuSnapshot(_0x2cd634[_0x1c5cc3(0x1c2)],_0x2cd634[_0x1c5cc3(0x196)]);}catch(_0xbe09a4){const _0x56a7fb=describeMenuErrorCause(_0xbe09a4,'verify\x20menu\x20visibility\x20update'),_0x4b540b=_0x80d278[_0x1c5cc3(0x1fa)](_0x526d02=>({'id':_0x526d02,'stage':'update-recovery','code':_0x1c5cc3(0x1b8),'message':_0x1c5cc3(0x1e7)+_0x526d02+_0x1c5cc3(0x1e0),'requestedStateConfirmed':![],'recovered':![]})),_0x1cab98={'stage':_0x1c5cc3(0x1af),'code':_0x1c5cc3(0x1b8),'message':_0x1c5cc3(0x203),'targetIds':_0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x198)]['map'](_0x36c68f=>_0x36c68f['id']),'requestedStateConfirmed':![],..._0x56a7fb};throw menuFailure(asVerificationError(_0xbe09a4,_0x1c5cc3(0x20a)),_0x149bd5[_0x1c5cc3(0x1fb)],{'stage':_0x1c5cc3(0x1af),'succeeded':_0x1f6d5f,'failedRecords':[..._0x2d56ba,..._0x4b540b,_0x1cab98],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1c5cc3(0x19b),'recoveredCount':0x0,'lookupCommand':_0x1c5cc3(0x1f8)}});}const _0x46ade6=[];for(const _0x1089ff of _0x1f6d5f){const _0x500ca0=Number(_0x1089ff['id']),_0x3804eb=_0x149bd5[_0x1c5cc3(0x1d2)][_0x1c5cc3(0x1df)](_0x500ca0),_0x42aa06=_0x42f8f8[_0x1c5cc3(0x1ff)][_0x1c5cc3(0x1df)](_0x500ca0);try{verifyVisibilityUpdate(_0x3804eb,_0x42aa06,_0x149bd5['plan'][_0x1c5cc3(0x1fd)]);}catch(_0xbb22c4){const _0x5824ed=asVerificationError(_0xbb22c4,'Menu\x20'+_0x500ca0+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x46ade6[_0x1c5cc3(0x191)]({'id':_0x500ca0,'stage':_0x1c5cc3(0x1af),'code':_0x5824ed['code'],'message':_0x5824ed[_0x1c5cc3(0x1fe)],'requestedStateConfirmed':![]});}}for(const _0x5b019f of _0x80d278){const _0x4f70c3=_0x149bd5[_0x1c5cc3(0x1d2)][_0x1c5cc3(0x1df)](_0x5b019f),_0xc34f35=_0x42f8f8[_0x1c5cc3(0x1ff)][_0x1c5cc3(0x1df)](_0x5b019f);try{verifyVisibilityUpdate(_0x4f70c3,_0xc34f35,_0x149bd5['plan'][_0x1c5cc3(0x1fd)]),_0x1f6d5f[_0x1c5cc3(0x191)]({'id':_0x5b019f,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x5949b2){const _0x2c3ea5=asVerificationError(_0x5949b2,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x5b019f+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x46ade6[_0x1c5cc3(0x191)]({'id':_0x5b019f,'stage':_0x1c5cc3(0x18f),'code':_0x2c3ea5[_0x1c5cc3(0x1aa)],'message':_0x2c3ea5[_0x1c5cc3(0x1fe)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x46ade6[_0x1c5cc3(0x1d4)]>0x0){const _0x24d199=_0x46ade6[_0x1c5cc3(0x1fa)](_0x57608d=>Number(_0x57608d['id'])),_0x4bdf26=_0x1f6d5f[_0x1c5cc3(0x1dd)](_0x247a71=>_0x247a71[_0x1c5cc3(0x200)]===!![])[_0x1c5cc3(0x1d4)],_0x2fea05=menuError(_0x1c5cc3(0x1b8),_0x1c5cc3(0x1a5)+_0x24d199[_0x1c5cc3(0x1a6)](',\x20')+'.',_0x1c5cc3(0x1f0));throw menuFailure(_0x2fea05,_0x149bd5[_0x1c5cc3(0x1fb)],{'stage':_0x1c5cc3(0x1af),'succeeded':_0x1f6d5f,'failedRecords':[..._0x2d56ba,..._0x46ade6],'warnings':[_0x1c5cc3(0x19c)],'verification':{'status':_0x1c5cc3(0x19b),..._0x24d199[_0x1c5cc3(0x1d4)]===0x1?{'targetId':_0x24d199[0x0]}:{'targetIds':_0x24d199},'recoveredCount':_0x4bdf26,'lookupCommand':_0x1c5cc3(0x1f8)}});}const _0x3da9d2=_0x1f6d5f[_0x1c5cc3(0x1dd)](_0x366058=>_0x366058[_0x1c5cc3(0x1b9)]===!![])['length'],_0x3b63e9=_0x1f6d5f[_0x1c5cc3(0x1d4)]-_0x3da9d2,_0x30c733={..._0x149bd5[_0x1c5cc3(0x1fb)],'succeeded':_0x1f6d5f,'failed':_0x2d56ba,'warnings':_0x2d56ba[_0x1c5cc3(0x1d4)]>0x0?[..._0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x1c9)],_0x1c5cc3(0x1f5)]:_0x149bd5[_0x1c5cc3(0x1fb)]['warnings'],'verification':{'checkedBy':_0x1c5cc3(0x19f),'snapshotHash':_0x42f8f8[_0x1c5cc3(0x1de)],'matchesRequestedState':_0x2d56ba[_0x1c5cc3(0x1d4)]===0x0,'recoveredCount':_0x80d278[_0x1c5cc3(0x1d4)]}};return{'ok':_0x2d56ba[_0x1c5cc3(0x1d4)]===0x0,'data':_0x30c733,'message':_0x2d56ba['length']===0x0?_0x1c5cc3(0x18d)+_0x3da9d2+_0x1c5cc3(0x18e)+_0x3b63e9+_0x1c5cc3(0x1c6):_0x1c5cc3(0x1cf)+_0x3da9d2+_0x1c5cc3(0x204)+_0x3b63e9+_0x1c5cc3(0x193)+_0x2d56ba[_0x1c5cc3(0x1d4)]+_0x1c5cc3(0x1dc)};}};function parseInput(_0x3d30f0){const _0x3176ed=a180_0x5f488b,_0x5632ca=parseMenuIds(_0x3d30f0['str']('menu-ids')),_0x507e78=parseCsv(_0x3d30f0[_0x3176ed(0x1ed)]('paths'));if(_0x5632ca[_0x3176ed(0x1d4)]===0x0&&_0x507e78[_0x3176ed(0x1d4)]===0x0)throw CliErrors[_0x3176ed(0x1f3)](_0x3176ed(0x194));const _0x407c16=parseBooleanFlag(_0x3d30f0,'visible',!![]),_0x31a1a9=parseBooleanFlag(_0x3d30f0,_0x3176ed(0x1a2),![]);let _0x5df37a;if(hasFlag(_0x3d30f0,_0x3176ed(0x1f4))){_0x5df37a=_0x3d30f0[_0x3176ed(0x1da)](_0x3176ed(0x1f4));if(!Number[_0x3176ed(0x20c)](_0x5df37a)||_0x5df37a<0x0)throw CliErrors[_0x3176ed(0x1f3)](_0x3176ed(0x1bd));}return{'menuIds':_0x5632ca,'paths':_0x507e78,'visible':_0x407c16,'expectVisible':_0x31a1a9,'expectedCount':_0x5df37a};}async function buildPlan(_0x57aff7,_0x4785fb){const _0x42cfa9=a180_0x5f488b,_0x5781aa=parseInput(_0x57aff7),_0x15bdfa=await fetchMutationSnapshot(_0x57aff7,_0x42cfa9(0x1d9)),_0x246f0f=selectTargets(_0x15bdfa['menus'],_0x5781aa[_0x42cfa9(0x1ba)],_0x5781aa['paths']);if(_0x5781aa[_0x42cfa9(0x1eb)]!==undefined&&_0x246f0f[_0x42cfa9(0x1d4)]!==_0x5781aa[_0x42cfa9(0x1eb)])throw menuError(_0x42cfa9(0x1a3),_0x42cfa9(0x1d5)+_0x246f0f['length']+'\x20menu(s),\x20expected\x20'+_0x5781aa[_0x42cfa9(0x1eb)]+'.',_0x42cfa9(0x1cd));if(_0x5781aa[_0x42cfa9(0x1c1)]!==undefined){const _0x1b15c3=_0x246f0f[_0x42cfa9(0x1dd)](_0x174aed=>_0x174aed[_0x42cfa9(0x1b7)]!==_0x5781aa[_0x42cfa9(0x1c1)]);if(_0x1b15c3[_0x42cfa9(0x1d4)]>0x0)throw menuError('menu_state_drift',_0x42cfa9(0x1a7)+_0x1b15c3['map'](_0x27f2f2=>_0x27f2f2['id'])['join'](',\x20')+'.',_0x42cfa9(0x1d0));}const _0x379506=_0x246f0f[_0x42cfa9(0x1fa)](_0x54d057=>({'id':_0x54d057['id'],'label':_0x54d057[_0x42cfa9(0x207)],'path':_0x54d057[_0x42cfa9(0x1e1)],'before':{'visible':_0x54d057['visible']},'after':{'visible':_0x5781aa['visible']}})),_0x3a7553=_0x379506[_0x42cfa9(0x1dd)](_0x27b181=>_0x27b181[_0x42cfa9(0x1ce)][_0x42cfa9(0x1b7)]!==_0x5781aa['visible'])[_0x42cfa9(0x1fa)](_0x3179b6=>({'stage':_0x42cfa9(0x1d8),'method':'POST','path':_0x42cfa9(0x1a1),'body':{'appCode':_0x57aff7[_0x42cfa9(0x1c2)],'id':_0x3179b6['id'],'visible':_0x5781aa[_0x42cfa9(0x1b7)]}})),_0x55c033=mutationResult({'operation':_0x42cfa9(0x1ec),'selector':{'menuIds':_0x5781aa['menuIds'],'paths':_0x5781aa['paths']},'before':{'menus':_0x246f0f[_0x42cfa9(0x1fa)](_0x13c63e=>({'id':_0x13c63e['id'],'path':_0x13c63e['path'],'visible':_0x13c63e['visible']}))},'after':{'menus':_0x246f0f[_0x42cfa9(0x1fa)](_0x230138=>({'id':_0x230138['id'],'path':_0x230138[_0x42cfa9(0x1e1)],'visible':_0x5781aa['visible']}))},'dryRun':_0x4785fb,'backend':[...BACKEND],'plannedActions':_0x3a7553,'snapshotHash':_0x15bdfa['hash'],'warnings':_0x3a7553[_0x42cfa9(0x1d4)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x55c033,'requestedVisible':_0x5781aa[_0x42cfa9(0x1b7)],'targets':_0x379506},'beforeById':new Map(_0x246f0f[_0x42cfa9(0x1fa)](_0x3f9a05=>[_0x3f9a05['id'],_0x3f9a05]))};}function selectTargets(_0x43b413,_0x2b73d9,_0xf86d63){const _0x120f10=a180_0x5f488b,_0x59ca40=new Map(_0x43b413[_0x120f10(0x1fa)](_0x447673=>[_0x447673['id'],_0x447673])),_0x2b2e09=new Map(),_0x3fc3d5=_0x2b73d9[_0x120f10(0x1dd)](_0x17bd47=>!_0x59ca40['has'](_0x17bd47));if(_0x3fc3d5[_0x120f10(0x1d4)]>0x0)throw menuError(_0x120f10(0x1c3),_0x120f10(0x1e6)+_0x3fc3d5[_0x120f10(0x1a6)](',\x20')+'.',_0x120f10(0x1a4));for(const _0x4222a6 of _0x2b73d9){_0x2b2e09['set'](_0x4222a6,_0x59ca40[_0x120f10(0x1df)](_0x4222a6));}for(const _0x40c00b of _0xf86d63){const _0x140d93=_0x43b413['filter'](_0x14433d=>_0x14433d['path']===_0x40c00b);if(_0x140d93[_0x120f10(0x1d4)]===0x0)throw menuError(_0x120f10(0x1c3),_0x120f10(0x1e8)+JSON['stringify'](_0x40c00b)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x140d93[_0x120f10(0x1d4)]>0x1)throw menuError(_0x120f10(0x1f9),_0x120f10(0x192)+JSON[_0x120f10(0x1d6)](_0x40c00b)+'.',_0x120f10(0x1e9)+_0x140d93['map'](_0x3736bb=>_0x3736bb['id'])['join'](',\x20')+'.');const _0x4011f5=_0x140d93[0x0];_0x2b2e09[_0x120f10(0x209)](_0x4011f5['id'],_0x4011f5);}return[..._0x2b2e09[_0x120f10(0x1a9)]()];}function parseMenuIds(_0x443288){const _0x19439c=a180_0x5f488b,_0x2de016=parseCsv(_0x443288),_0x4f4db9=_0x2de016[_0x19439c(0x1fa)](Number);if(_0x4f4db9[_0x19439c(0x1f6)](_0x482c6b=>!Number[_0x19439c(0x20c)](_0x482c6b)||_0x482c6b<=0x0))throw CliErrors['validation'](_0x19439c(0x1f1));return[...new Set(_0x4f4db9)];}function parseCsv(_0x164021){const _0xcdba5=a180_0x5f488b;return[...new Set(_0x164021[_0xcdba5(0x1ae)](',')[_0xcdba5(0x1fa)](_0x492c5b=>_0x492c5b[_0xcdba5(0x1b0)]())[_0xcdba5(0x1dd)](Boolean))];}function parseBooleanFlag(_0x2fd715,_0x501f2d,_0x25b137){const _0x53cff3=a180_0x5f488b;if(!hasFlag(_0x2fd715,_0x501f2d)){if(_0x25b137)throw CliErrors[_0x53cff3(0x1a8)](_0x501f2d);return undefined;}const _0x8dd4d4=_0x2fd715['rawFlags'][_0x501f2d];if(_0x8dd4d4===!![]||_0x8dd4d4===![])return _0x8dd4d4;if(_0x8dd4d4===_0x53cff3(0x1fc))return!![];if(_0x8dd4d4===_0x53cff3(0x19d))return![];throw CliErrors[_0x53cff3(0x1f3)]('--'+_0x501f2d+_0x53cff3(0x195));}function verifyVisibilityUpdate(_0x4d591a,_0x3d67ce,_0x1aa0a1){const _0x521f2f=a180_0x5f488b;assertVerified(!!_0x3d67ce,'Menu\x20'+_0x4d591a['id']+_0x521f2f(0x1d3)),assertVerified(_0x3d67ce[_0x521f2f(0x1b7)]===_0x1aa0a1,'Menu\x20'+_0x4d591a['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x252051=[['id',_0x3d67ce['id'],_0x4d591a['id']],[_0x521f2f(0x1db),_0x3d67ce['parentId'],_0x4d591a[_0x521f2f(0x1db)]],[_0x521f2f(0x1c0),_0x3d67ce[_0x521f2f(0x1c0)],_0x4d591a[_0x521f2f(0x1c0)]],['label',_0x3d67ce[_0x521f2f(0x207)],_0x4d591a['label']],[_0x521f2f(0x1e1),_0x3d67ce[_0x521f2f(0x1e1)],_0x4d591a[_0x521f2f(0x1e1)]],[_0x521f2f(0x201),_0x3d67ce[_0x521f2f(0x201)],_0x4d591a[_0x521f2f(0x201)]],[_0x521f2f(0x1cc),_0x3d67ce['type'],_0x4d591a['type']],[_0x521f2f(0x1b6),_0x3d67ce[_0x521f2f(0x1b6)],_0x4d591a[_0x521f2f(0x1b6)]],[_0x521f2f(0x1e4),_0x3d67ce[_0x521f2f(0x1e4)],_0x4d591a['resources']],['resourcesValid',_0x3d67ce[_0x521f2f(0x1d1)],_0x4d591a[_0x521f2f(0x1d1)]],[_0x521f2f(0x1e3),_0x3d67ce[_0x521f2f(0x1e3)],_0x4d591a['childrenIds']],[_0x521f2f(0x1a0),_0x3d67ce['childrenCount'],_0x4d591a[_0x521f2f(0x1a0)]],[_0x521f2f(0x1d7),_0x3d67ce[_0x521f2f(0x1d7)],_0x4d591a[_0x521f2f(0x1d7)]],[_0x521f2f(0x1e5),_0x3d67ce[_0x521f2f(0x1e5)],_0x4d591a[_0x521f2f(0x1e5)]],['modelType',_0x3d67ce[_0x521f2f(0x1e2)],_0x4d591a[_0x521f2f(0x1e2)]],['datasetId',_0x3d67ce[_0x521f2f(0x20d)],_0x4d591a[_0x521f2f(0x20d)]],[_0x521f2f(0x1ea),_0x3d67ce[_0x521f2f(0x1ea)],_0x4d591a[_0x521f2f(0x1ea)]]];for(const [_0x45f278,_0x34d223,_0x47b8c5]of _0x252051){assertVerified(sameValue(_0x34d223,_0x47b8c5),_0x521f2f(0x1b4)+_0x4d591a['id']+'\x20'+_0x45f278+'\x20changed\x20unexpectedly.');}}function sameValue(_0x56ec98,_0xd07f8){const _0x165b45=a180_0x5f488b;if(Array[_0x165b45(0x206)](_0x56ec98)||Array['isArray'](_0xd07f8))return JSON['stringify'](_0x56ec98)===JSON['stringify'](_0xd07f8);return _0x56ec98===_0xd07f8;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a181_0x1884(_0x2c4cf1,_0x58b207){_0x2c4cf1=_0x2c4cf1-0xe3;const _0x54fce1=a181_0x54fc();let _0x1884f4=_0x54fce1[_0x2c4cf1];return _0x1884f4;}const a181_0x438801=a181_0x1884;(function(_0x254586,_0x2b8f79){const _0x554f07=a181_0x1884,_0x30480b=_0x254586();while(!![]){try{const _0x34b03e=parseInt(_0x554f07(0x102))/0x1*(-parseInt(_0x554f07(0x106))/0x2)+parseInt(_0x554f07(0xfc))/0x3+-parseInt(_0x554f07(0xfd))/0x4+parseInt(_0x554f07(0xed))/0x5*(-parseInt(_0x554f07(0xf6))/0x6)+parseInt(_0x554f07(0x101))/0x7*(-parseInt(_0x554f07(0xf7))/0x8)+parseInt(_0x554f07(0xec))/0x9+parseInt(_0x554f07(0xe8))/0xa*(parseInt(_0x554f07(0xe7))/0xb);if(_0x34b03e===_0x2b8f79)break;else _0x30480b['push'](_0x30480b['shift']());}catch(_0x2dfcba){_0x30480b['push'](_0x30480b['shift']());}}}(a181_0x54fc,0x8bfcd));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x37e2f2){const _0x1496a2=a181_0x1884,_0x5f4aba=await readNotificationDocument(_0x37e2f2,_0x1496a2(0x109)),_0x1f0e47=createMutationInput(_0x37e2f2[_0x1496a2(0xe6)],_0x5f4aba);return{'document':_0x5f4aba,'input':_0x1f0e47,'planned':projectNotificationConfig({'appCode':_0x37e2f2[_0x1496a2(0xe6)],'configName':_0x5f4aba['configName'],'channelType':_0x5f4aba[_0x1496a2(0xee)],'endpointUrl':_0x5f4aba[_0x1496a2(0x108)],'channelConfig':_0x5f4aba[_0x1496a2(0xf8)],'description':_0x5f4aba[_0x1496a2(0x103)],'connectTimeout':_0x5f4aba[_0x1496a2(0xfa)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x5f4aba[_0x1496a2(0xf0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a181_0x54fc(){const _0x48ce1b=['document','configName','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','verification','write','51186lqhMYc','131296pMrdyV','channelConfig','POST','connectTimeout','notification','1485627KKAKnl','3998168UgACjc',';\x20no\x20automatic\x20retry\x20was\x20attempted.','verified','Inspect\x20with\x20','56pMUCvL','2jwMOvb','description','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',';\x20do\x20not\x20resubmit.','602872cjaEWD',';\x20do\x20not\x20resubmit\x20automatically.','endpointUrl','create','config-create','notification_config_create_outcome_unknown','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','input','appCode','737GLFHPw','143490jRffHk','mutation','isSafeInteger','Created\x20notification\x20config\x20','9343701XvGByF','110rzuIoD','channelType','planned','readTimeout'];a181_0x54fc=function(){return _0x48ce1b;};return a181_0x54fc();}export const notificationConfigCreate={'service':a181_0x438801(0xfb),'command':a181_0x438801(0x10a),'description':a181_0x438801(0xf3),'risk':a181_0x438801(0xf5),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3247a6){assertSingleNotificationSource(_0x3247a6);},async 'dryRun'(_0x1aa369){const _0x944bbb=a181_0x438801,_0x528ac4=await prepareCreate(_0x1aa369),_0x143cc5=notificationLookupCommand(_0x1aa369['appCode'],_0x528ac4[_0x944bbb(0xf1)]['channelType']);return asDryRunResult({'operation':_0x944bbb(0x109),'selector':{'appCode':_0x1aa369[_0x944bbb(0xe6)],'configName':_0x528ac4['document'][_0x944bbb(0xf2)],'channelType':_0x528ac4[_0x944bbb(0xf1)][_0x944bbb(0xee)]},'before':null,'after':_0x528ac4[_0x944bbb(0xef)],'dryRun':!![],'backend':{'method':_0x944bbb(0xf9),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x944bbb(0xef),'lookupCommand':_0x143cc5}},{'method':_0x944bbb(0xf9),'url':CREATE_PATH});},async 'execute'(_0x5310d2){const _0x55f304=a181_0x438801,_0x290176=await prepareCreate(_0x5310d2),_0x4da242=notificationLookupCommand(_0x5310d2[_0x55f304(0xe6)],_0x290176['document']['channelType']);let _0x1517fb;try{_0x1517fb=await createNotificationChannelConfig(_0x290176[_0x55f304(0xe5)]);}catch(_0x3d4749){if(isPlatformTransportFailure(_0x3d4749))throw notificationError(_0x55f304(0xe3),_0x55f304(0xe4),'Inspect\x20with\x20'+_0x4da242+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x55f304(0x109),_0x55f304(0xe9),_0x55f304(0x100)+_0x4da242+_0x55f304(0xfe));}if(!Number[_0x55f304(0xea)](_0x1517fb)||_0x1517fb<=0x0)throw notificationError(_0x55f304(0xe3),_0x55f304(0x104),'Inspect\x20with\x20'+_0x4da242+_0x55f304(0x105));let _0x54854a;try{const _0x5c0f2c=await getNotificationChannelConfig(_0x1517fb,_0x5310d2[_0x55f304(0xe6)]);_0x54854a=normalizeExactNotificationConfig(_0x5c0f2c,_0x1517fb,_0x5310d2[_0x55f304(0xe6)]);}catch{throw safeApiFailure(_0x55f304(0x109),_0x55f304(0xf4),_0x55f304(0x100)+_0x4da242+_0x55f304(0x107));}return{'ok':!![],'data':{'operation':_0x55f304(0x109),'selector':{'appCode':_0x54854a[_0x55f304(0xe6)],'id':_0x54854a['id'],'configCode':_0x54854a['configCode'],'configName':_0x54854a['configName'],'channelType':_0x54854a[_0x55f304(0xee)]},'before':null,'after':projectNotificationConfig(_0x54854a),'dryRun':![],'backend':{'method':_0x55f304(0xf9),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x55f304(0xff),'lookupCommand':_0x4da242}},'message':_0x55f304(0xeb)+_0x54854a['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a182_0x429f(){const _0x11717f=['18729YYUXCt','2uRbSAv','Notification\x20config\x20','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','45858jBYrPg','delete','/notification/channel-config/delete','6503101pzEPsM','verified',';\x20no\x20automatic\x20retry\x20was\x20attempted.','1659834LkPqHj','3340IjTqCl','notification_config_delete_outcome_unknown','before','1340152GdLIUZ','Inspect\x20with\x20','config-delete','planned','some','39010YQwybU','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','unshift','805gvShAq','appCode','notification','POST',';\x20do\x20not\x20resubmit\x20automatically.','Deleted\x20notification\x20config\x20','\x20remains\x20present\x20after\x20delete.','channelType','high-risk-write','324zyFdts','notification_config_delete_verification_failed','600727UXoKmW'];a182_0x429f=function(){return _0x11717f;};return a182_0x429f();}const a182_0xdf5c87=a182_0x1a05;(function(_0x1e5859,_0x245e7d){const _0x8f9f1a=a182_0x1a05,_0x2d1ab1=_0x1e5859();while(!![]){try{const _0x47aac3=parseInt(_0x8f9f1a(0x13a))/0x1*(-parseInt(_0x8f9f1a(0x13c))/0x2)+parseInt(_0x8f9f1a(0x145))/0x3+parseInt(_0x8f9f1a(0x138))/0x4*(-parseInt(_0x8f9f1a(0x14e))/0x5)+-parseInt(_0x8f9f1a(0x13f))/0x6*(-parseInt(_0x8f9f1a(0x151))/0x7)+parseInt(_0x8f9f1a(0x149))/0x8+-parseInt(_0x8f9f1a(0x13b))/0x9*(-parseInt(_0x8f9f1a(0x146))/0xa)+-parseInt(_0x8f9f1a(0x142))/0xb;if(_0x47aac3===_0x245e7d)break;else _0x2d1ab1['push'](_0x2d1ab1['shift']());}catch(_0x14a550){_0x2d1ab1['push'](_0x2d1ab1['shift']());}}}(a182_0x429f,0x72f84));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a182_0xdf5c87(0x141),REFERENCE_WARNING=a182_0xdf5c87(0x14f);function a182_0x1a05(_0x3dfa14,_0x172681){_0x3dfa14=_0x3dfa14-0x138;const _0x429f74=a182_0x429f();let _0x1a057a=_0x429f74[_0x3dfa14];return _0x1a057a;}async function prepareDelete(_0x159668){const _0x366a4c=a182_0xdf5c87,_0x38f068=readNotificationId(_0x159668),_0x339dc4=await requireExactNotificationConfig(_0x159668[_0x366a4c(0x152)],_0x38f068,'delete');return{'id':_0x38f068,'before':_0x339dc4};}export const notificationConfigDelete={'service':a182_0xdf5c87(0x153),'command':a182_0xdf5c87(0x14b),'description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a182_0xdf5c87(0x159),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x96cbda){readNotificationId(_0x96cbda),requireNotificationExplicitYes(_0x96cbda);},async 'dryRun'(_0x437ddb){const _0xd486c2=a182_0xdf5c87,_0x54d180=await prepareDelete(_0x437ddb),_0xe315a4=notificationLookupCommand(_0x437ddb[_0xd486c2(0x152)],_0x54d180['before'][_0xd486c2(0x158)]);return asDryRunResult({'operation':_0xd486c2(0x140),'selector':notificationSelector(_0x54d180[_0xd486c2(0x148)]),'before':projectNotificationConfig(_0x54d180[_0xd486c2(0x148)]),'after':null,'dryRun':!![],'backend':{'method':_0xd486c2(0x154),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0xd486c2(0x14c),'lookupCommand':_0xe315a4}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x2d6c2f){const _0x2b2cae=a182_0xdf5c87;requireNotificationExplicitYes(_0x2d6c2f);const _0x1509c8=await prepareDelete(_0x2d6c2f),_0x25c36a=notificationLookupCommand(_0x2d6c2f[_0x2b2cae(0x152)],_0x1509c8[_0x2b2cae(0x148)]['channelType']);let _0x4dbba9=![];try{await deleteNotificationChannelConfig(_0x1509c8['id'],_0x2d6c2f['appCode']);}catch(_0x1941cb){if(!isPlatformTransportFailure(_0x1941cb))throw safeApiFailure(_0x2b2cae(0x140),'mutation',_0x2b2cae(0x14a)+_0x25c36a+_0x2b2cae(0x144));_0x4dbba9=!![];}let _0x4c66d7;try{_0x4c66d7=await listNotificationChannelConfigs(_0x2d6c2f[_0x2b2cae(0x152)],_0x1509c8[_0x2b2cae(0x148)]['channelType']),validateNotificationDeleteReadback(_0x4c66d7,_0x2d6c2f[_0x2b2cae(0x152)],_0x1509c8['before'][_0x2b2cae(0x158)]);}catch{throw notificationError(_0x4dbba9?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x2b2cae(0x13d)+_0x1509c8['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x2b2cae(0x14a)+_0x25c36a+_0x2b2cae(0x155));}if(_0x4c66d7[_0x2b2cae(0x14d)](_0x4e7887=>_0x4e7887['id']===_0x1509c8['id']))throw notificationError(_0x4dbba9?_0x2b2cae(0x147):_0x2b2cae(0x139),_0x2b2cae(0x13d)+_0x1509c8['id']+_0x2b2cae(0x157),_0x2b2cae(0x14a)+_0x25c36a+_0x2b2cae(0x155));const _0x3f0c74=[REFERENCE_WARNING];return _0x4dbba9&&_0x3f0c74[_0x2b2cae(0x150)](_0x2b2cae(0x13e)),{'ok':!![],'data':{'operation':_0x2b2cae(0x140),'selector':notificationSelector(_0x1509c8['before']),'before':projectNotificationConfig(_0x1509c8[_0x2b2cae(0x148)]),'after':null,'dryRun':![],'backend':{'method':_0x2b2cae(0x154),'path':DELETE_PATH},'warnings':_0x3f0c74,'verification':{'status':_0x2b2cae(0x143),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x4dbba9,'lookupCommand':_0x25c36a}},'message':_0x2b2cae(0x156)+_0x1509c8['id']};}};
|