@lovrabet/rabetbase-cli 2.5.0-beta.5 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-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/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/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/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-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/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.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 +2 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a134_0xff4f(){const _0x57576c=['✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','16DORCQr','3543KyAkLp','length','sync','Menu\x20creation\x20failed','appcode','map','paths','Menu\x20sync\x20skipped','5946743CknoTc','25JNIIXe','flag','\x20page(s)','Creating\x20','jsUrl','Pre-fill\x20JS/CSS\x20URLs.\x20','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','2806110qvOMZO','selectedAppName','cookie','onlineMenuList','Failed\x20to\x20fetch\x20online\x20menu\x20list','string','cssUrl','\x20menu(s)','failed','filter','Sync\x20local\x20pages\x20as\x20platform\x20menus','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','yes','\x20\x20Create\x20','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','localPages','57326fQmnyI','✓\x20Menu\x20sync\x20completed:\x20','skipped','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20created.','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','POST','message','validation','\x20menu(s)\x20created','\x20created,\x20','Menu\x20sync\x20completed:\x20','10016ycILQl','boolean','Fetching\x20online\x20menu\x20list...','/smartapi/menu/create','228uVcgtj','str','onlinePaths','14kfZgUP','\x20menu(s)...','rawFlags','740106ocgjMp','Would\x20create\x20','gray','size','write','1658682JHzJhL','appCode','Created\x20','targetPages','split','Online\x20menu\x20list\x20fetched','\x20menu(s)\x20with\x20JS:\x20','created','params','\x20local\x20microfrontend\x20menu(s).'];a134_0xff4f=function(){return _0x57576c;};return a134_0xff4f();}const a134_0x248192=a134_0x47e3;(function(_0x4d0966,_0x521734){const _0x5be1ad=a134_0x47e3,_0x4e848a=_0x4d0966();while(!![]){try{const _0x410bad=-parseInt(_0x5be1ad(0x144))/0x1+-parseInt(_0x5be1ad(0x156))/0x2*(-parseInt(_0x5be1ad(0x16d))/0x3)+parseInt(_0x5be1ad(0x152))/0x4*(parseInt(_0x5be1ad(0x12b))/0x5)+parseInt(_0x5be1ad(0x15c))/0x6*(parseInt(_0x5be1ad(0x159))/0x7)+-parseInt(_0x5be1ad(0x16c))/0x8*(parseInt(_0x5be1ad(0x161))/0x9)+-parseInt(_0x5be1ad(0x133))/0xa+parseInt(_0x5be1ad(0x12a))/0xb;if(_0x410bad===_0x521734)break;else _0x4e848a['push'](_0x4e848a['shift']());}catch(_0x559103){_0x4e848a['push'](_0x4e848a['shift']());}}}(a134_0xff4f,0x37a60));import a134_0xb0c515 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a134_0x47e3(_0x301748,_0x6c199f){_0x301748=_0x301748-0x129;const _0xff4fe5=a134_0xff4f();let _0x47e39e=_0xff4fe5[_0x301748];return _0x47e39e;}import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':a134_0x248192(0x16f),'description':a134_0x248192(0x13d),'risk':a134_0x248192(0x160),'flags':[{'name':'params','type':a134_0x248192(0x138),'description':a134_0x248192(0x130)+a134_0x248192(0x148)},{'name':a134_0x248192(0x173),'type':a134_0x248192(0x138),'description':a134_0x248192(0x14a)},{'name':'yes','type':a134_0x248192(0x153),'description':a134_0x248192(0x142)}],async 'dryRun'(_0x576e6f){const _0x196a6f=a134_0x248192;ensureRunnableContext(_0x576e6f[_0x196a6f(0x15b)],_0x576e6f['selectedAppName']);const _0x2b6447=await runMenuSyncCore(_0x576e6f[_0x196a6f(0x162)],_0x576e6f[_0x196a6f(0x135)],parsePaths(_0x576e6f[_0x196a6f(0x157)](_0x196a6f(0x173))),_0x576e6f[_0x196a6f(0x157)](_0x196a6f(0x169)),{'dryRun':!![]});return{'method':_0x196a6f(0x14c),'url':_0x196a6f(0x155),'body':_0x2b6447,'description':_0x2b6447[_0x196a6f(0x146)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x196a6f(0x15d)+_0x2b6447[_0x196a6f(0x164)][_0x196a6f(0x16e)]+_0x196a6f(0x16a)};},async 'execute'(_0x4577d){const _0x6dfdbe=a134_0x248192;ensureRunnableContext(_0x4577d[_0x6dfdbe(0x15b)],_0x4577d[_0x6dfdbe(0x134)]);const _0x279d34=_0x4577d[_0x6dfdbe(0x12c)](_0x6dfdbe(0x13f)),_0x4bbc21=_0x4577d[_0x6dfdbe(0x157)](_0x6dfdbe(0x169)),_0x1a5249=parsePaths(_0x4577d[_0x6dfdbe(0x157)](_0x6dfdbe(0x173))),_0x14d4cc=parseMenuSyncParams(_0x4bbc21);if(_0x279d34){const _0xfb9485=await runMenuSyncCore(_0x4577d['appCode'],_0x4577d['cookie'],_0x1a5249,_0x4bbc21);if(_0xfb9485['skipped']){const _0x7d4102=getLocalPages();_0x7d4102[_0x6dfdbe(0x16e)]===0x0?writeCliSideChannelLine(_0x6dfdbe(0x13e)):writeCliSideChannelLine(_0x6dfdbe(0x16b));}else writeCliSideChannelLine(_0x6dfdbe(0x145)+_0xfb9485[_0x6dfdbe(0x168)]+_0x6dfdbe(0x14f));return{'ok':!![],'data':_0xfb9485,'message':_0xfb9485[_0x6dfdbe(0x146)]?_0x6dfdbe(0x129):_0x6dfdbe(0x151)+_0xfb9485['created']+_0x6dfdbe(0x149)};}if(_0x1a5249[_0x6dfdbe(0x16e)]>0x0)throw CliErrors[_0x6dfdbe(0x14e)](_0x6dfdbe(0x147),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x4bbc21)throw CliErrors['validation'](_0x6dfdbe(0x141),_0x6dfdbe(0x14b));requireInteractive();const _0x585de4=startSpinner(_0x6dfdbe(0x154));let _0x1d3ccd,_0x366861,_0x4e0264;try{const _0x5dab9d=await fetchMenuData(_0x4577d[_0x6dfdbe(0x162)],_0x4577d['cookie']);_0x1d3ccd=_0x5dab9d[_0x6dfdbe(0x143)],_0x366861=_0x5dab9d[_0x6dfdbe(0x158)],_0x4e0264=_0x5dab9d[_0x6dfdbe(0x136)],stopSpinner(_0x585de4,_0x6dfdbe(0x166),!![]);}catch(_0x19350c){stopSpinner(_0x585de4,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x6dfdbe(0x14e)](_0x19350c instanceof Error?_0x19350c[_0x6dfdbe(0x14d)]:_0x6dfdbe(0x137));}if(_0x1d3ccd['length']===0x0)return writeCliSideChannelLine(a134_0xb0c515['yellow']('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x398302=buildCompareRows(_0x1d3ccd,_0x366861);writeCliSideChannelLine(renderCompareTable(_0x398302)),writeCliSideChannelLine('');const _0x7adf02=await selectPages(_0x1d3ccd,_0x366861);writeCliSideChannelLine(''),writeCliSideChannelLine(a134_0xb0c515['cyan']('\x20\x20✓\x20Selected:\x20'+_0x7adf02[_0x6dfdbe(0x16e)]+_0x6dfdbe(0x12d)));const _0x12067c=_0x14d4cc[_0x6dfdbe(0x12f)]&&_0x14d4cc['cssUrl'];if(!_0x12067c){writeCliSideChannelLine(renderSyncSummary(_0x7adf02,_0x366861[_0x6dfdbe(0x15f)]>0x0));const _0x2034e7=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x2034e7)return writeCliSideChannelLine(a134_0xb0c515[_0x6dfdbe(0x15e)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x1307dd=_0x14d4cc[_0x6dfdbe(0x12f)],_0x34a71a=_0x14d4cc[_0x6dfdbe(0x139)];!_0x1307dd&&(_0x1307dd=await askJsUrl());!_0x34a71a&&(_0x34a71a=await askCssUrl());const _0x201795=await askConfirm(_0x6dfdbe(0x140)+_0x7adf02['length']+_0x6dfdbe(0x167)+_0x1307dd+'\x20and\x20CSS:\x20'+_0x34a71a+'?');if(!_0x201795)return writeCliSideChannelLine(a134_0xb0c515[_0x6dfdbe(0x15e)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x409ae9=[_0x1307dd,_0x34a71a],_0x452da0=startSpinner(_0x6dfdbe(0x12e)+_0x7adf02['length']+_0x6dfdbe(0x15a));try{const _0x1d1024=await doCreateMenus(_0x4577d['appCode'],_0x4577d['cookie'],_0x7adf02,_0x409ae9);return stopSpinner(_0x452da0,_0x6dfdbe(0x163)+_0x1d1024['created']+_0x6dfdbe(0x13a),!![]),{'ok':!![],'data':_0x1d1024,'message':'Menu\x20sync\x20completed:\x20'+_0x1d1024[_0x6dfdbe(0x168)]+_0x6dfdbe(0x150)+_0x1d1024[_0x6dfdbe(0x13b)]+'\x20failed.'};}catch(_0x38dcc8){stopSpinner(_0x452da0,_0x6dfdbe(0x170),![]);throw CliErrors[_0x6dfdbe(0x14e)](_0x38dcc8 instanceof Error?_0x38dcc8[_0x6dfdbe(0x14d)]:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0x882c29,_0x4c2e6b){const _0x4d8fba=a134_0x248192,_0x2b9a07=_0x882c29[_0x4d8fba(0x171)]?String(_0x882c29[_0x4d8fba(0x171)])['trim']():'';if(!isInProject()&&!_0x4c2e6b&&!_0x2b9a07)throw CliErrors[_0x4d8fba(0x14e)](_0x4d8fba(0x131)+_0x4d8fba(0x132));}function parsePaths(_0xb8175){const _0x59d073=a134_0x248192;return[...new Set(_0xb8175[_0x59d073(0x165)](',')[_0x59d073(0x172)](_0x5311e4=>_0x5311e4['trim']())[_0x59d073(0x13c)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a135_0x342536=a135_0x5192;(function(_0xade0c2,_0x1a5754){const _0x11d1c3=a135_0x5192,_0x4d7488=_0xade0c2();while(!![]){try{const _0x2b7d55=-parseInt(_0x11d1c3(0x202))/0x1+-parseInt(_0x11d1c3(0x240))/0x2+-parseInt(_0x11d1c3(0x210))/0x3+parseInt(_0x11d1c3(0x23a))/0x4+parseInt(_0x11d1c3(0x1d3))/0x5*(-parseInt(_0x11d1c3(0x1ef))/0x6)+-parseInt(_0x11d1c3(0x1f2))/0x7+parseInt(_0x11d1c3(0x1e5))/0x8;if(_0x2b7d55===_0x1a5754)break;else _0x4d7488['push'](_0x4d7488['shift']());}catch(_0x3b6194){_0x4d7488['push'](_0x4d7488['shift']());}}}(a135_0x2703,0xc8745));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 a135_0x5192(_0x4f0fbf,_0x386f5e){_0x4f0fbf=_0x4f0fbf-0x1cf;const _0x2703d2=a135_0x2703();let _0x519264=_0x2703d2[_0x4f0fbf];return _0x519264;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a135_0x342536(0x1f5)}];export const menuVisibilityUpdate={'service':a135_0x342536(0x200),'command':a135_0x342536(0x1f1),'description':a135_0x342536(0x21c),'risk':a135_0x342536(0x209),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':a135_0x342536(0x1d9),'description':a135_0x342536(0x235)},{'name':a135_0x342536(0x211),'type':a135_0x342536(0x1d9),'description':a135_0x342536(0x1ea)},{'name':a135_0x342536(0x225),'type':a135_0x342536(0x1ff),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a135_0x342536(0x223),'type':a135_0x342536(0x1ff),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a135_0x342536(0x222),'type':'number','description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5f4acb){parseInput(_0x5f4acb),requireExplicitYes(_0x5f4acb);},async 'dryRun'(_0x89908e){const _0x1a30d5=a135_0x342536,_0x5c403d=await buildPlan(_0x89908e,!![]),_0x183f21=_0x5c403d[_0x1a30d5(0x230)][_0x1a30d5(0x20f)]?.[_0x1a30d5(0x1de)]??0x0,_0x2d98d5=_0x5c403d[_0x1a30d5(0x230)][_0x1a30d5(0x23b)]['length']-_0x183f21;return menuDryRunResult(_0x5c403d[_0x1a30d5(0x230)],{'method':_0x1a30d5(0x1d5),'url':_0x1a30d5(0x1f5),'body':{'updates':_0x5c403d[_0x1a30d5(0x230)][_0x1a30d5(0x20f)]?.[_0x1a30d5(0x219)](_0x24b8bb=>_0x24b8bb['body'])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x183f21+'\x20menu(s);\x20skip\x20'+_0x2d98d5+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x9cec2b){const _0xdead29=a135_0x342536;requireExplicitYes(_0x9cec2b);const _0x3c3625=await buildPlan(_0x9cec2b,![]);await recheckMutationSnapshot(_0x9cec2b,_0x3c3625['plan'],_0xdead29(0x232));const _0x41a6ae=[],_0x22822e=[],_0x4732f1=[];for(const _0x474f1a of _0x3c3625['plan']['targets']){if(_0x474f1a[_0xdead29(0x208)][_0xdead29(0x225)]===_0x3c3625[_0xdead29(0x230)][_0xdead29(0x215)]){_0x41a6ae[_0xdead29(0x20b)]({'id':_0x474f1a['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x9cec2b[_0xdead29(0x227)],_0x9cec2b[_0xdead29(0x1fb)],{'id':_0x474f1a['id'],'visible':_0x3c3625[_0xdead29(0x230)][_0xdead29(0x215)]}),_0x41a6ae[_0xdead29(0x20b)]({'id':_0x474f1a['id'],'updated':!![],'skipped':![]});}catch(_0x2de758){const _0x2ce631=mapMenuApiError(_0x2de758,_0xdead29(0x1d1),_0x474f1a['id']);if(isMenuResponseLoss(_0x2de758)&&_0x2ce631[_0xdead29(0x23d)]!==_0xdead29(0x1fd)){_0x4732f1['push'](_0x474f1a['id']);continue;}_0x22822e[_0xdead29(0x20b)]({'id':_0x474f1a['id'],'stage':'update','code':_0x2ce631[_0xdead29(0x23d)],'message':_0x2ce631[_0xdead29(0x1e4)]});}}let _0x5cef3b;try{_0x5cef3b=await fetchMenuSnapshot(_0x9cec2b[_0xdead29(0x227)],_0x9cec2b[_0xdead29(0x1fb)]);}catch(_0x4b6a10){const _0x3c8b8f=describeMenuErrorCause(_0x4b6a10,_0xdead29(0x20a)),_0x4f658f=_0x4732f1[_0xdead29(0x219)](_0x18fee9=>({'id':_0x18fee9,'stage':'update-recovery','code':_0xdead29(0x1df),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x18fee9+_0xdead29(0x224),'requestedStateConfirmed':![],'recovered':![]})),_0x3decff={'stage':'verification','code':'menu_verification_failed','message':_0xdead29(0x20c),'targetIds':_0x3c3625['plan'][_0xdead29(0x23b)][_0xdead29(0x219)](_0x2eada9=>_0x2eada9['id']),'requestedStateConfirmed':![],..._0x3c8b8f};throw menuFailure(asVerificationError(_0x4b6a10,_0xdead29(0x21b)),_0x3c3625['plan'],{'stage':_0xdead29(0x22e),'succeeded':_0x41a6ae,'failedRecords':[..._0x22822e,..._0x4f658f,_0x3decff],'warnings':[_0xdead29(0x1f8)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':_0xdead29(0x1fe)}});}const _0x1ba17a=[];for(const _0x49e6e1 of _0x41a6ae){const _0x128098=Number(_0x49e6e1['id']),_0x564c91=_0x3c3625[_0xdead29(0x22a)][_0xdead29(0x221)](_0x128098),_0x1a693f=_0x5cef3b[_0xdead29(0x1d0)]['get'](_0x128098);try{verifyVisibilityUpdate(_0x564c91,_0x1a693f,_0x3c3625[_0xdead29(0x230)][_0xdead29(0x215)]);}catch(_0x4db0f1){const _0x3fef9e=asVerificationError(_0x4db0f1,_0xdead29(0x213)+_0x128098+_0xdead29(0x233));_0x1ba17a[_0xdead29(0x20b)]({'id':_0x128098,'stage':_0xdead29(0x22e),'code':_0x3fef9e[_0xdead29(0x23d)],'message':_0x3fef9e[_0xdead29(0x1e4)],'requestedStateConfirmed':![]});}}for(const _0x1edcee of _0x4732f1){const _0x28d5cb=_0x3c3625[_0xdead29(0x22a)][_0xdead29(0x221)](_0x1edcee),_0x5c363b=_0x5cef3b['byId'][_0xdead29(0x221)](_0x1edcee);try{verifyVisibilityUpdate(_0x28d5cb,_0x5c363b,_0x3c3625[_0xdead29(0x230)][_0xdead29(0x215)]),_0x41a6ae[_0xdead29(0x20b)]({'id':_0x1edcee,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x48740a){const _0x3fe0f5=asVerificationError(_0x48740a,_0xdead29(0x205)+_0x1edcee+_0xdead29(0x214));_0x1ba17a['push']({'id':_0x1edcee,'stage':_0xdead29(0x228),'code':_0x3fe0f5[_0xdead29(0x23d)],'message':_0x3fe0f5['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x1ba17a[_0xdead29(0x1de)]>0x0){const _0x14812b=_0x1ba17a[_0xdead29(0x219)](_0x4ebc1b=>Number(_0x4ebc1b['id'])),_0x30e898=_0x41a6ae['filter'](_0x4b6833=>_0x4b6833[_0xdead29(0x241)]===!![])['length'],_0x1a82ba=menuError(_0xdead29(0x1df),_0xdead29(0x1e6)+_0x14812b[_0xdead29(0x22d)](',\x20')+'.',_0xdead29(0x1f6));throw menuFailure(_0x1a82ba,_0x3c3625[_0xdead29(0x230)],{'stage':_0xdead29(0x22e),'succeeded':_0x41a6ae,'failedRecords':[..._0x22822e,..._0x1ba17a],'warnings':[_0xdead29(0x1e7)],'verification':{'status':_0xdead29(0x1ee),..._0x14812b[_0xdead29(0x1de)]===0x1?{'targetId':_0x14812b[0x0]}:{'targetIds':_0x14812b},'recoveredCount':_0x30e898,'lookupCommand':_0xdead29(0x1fe)}});}const _0x27e3d2=_0x41a6ae[_0xdead29(0x1e2)](_0x542118=>_0x542118['updated']===!![])[_0xdead29(0x1de)],_0x18572b=_0x41a6ae['length']-_0x27e3d2,_0x57a2c2={..._0x3c3625[_0xdead29(0x230)],'succeeded':_0x41a6ae,'failed':_0x22822e,'warnings':_0x22822e['length']>0x0?[..._0x3c3625['plan'][_0xdead29(0x1e0)],_0xdead29(0x242)]:_0x3c3625['plan'][_0xdead29(0x1e0)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x5cef3b['hash'],'matchesRequestedState':_0x22822e[_0xdead29(0x1de)]===0x0,'recoveredCount':_0x4732f1[_0xdead29(0x1de)]}};return{'ok':_0x22822e[_0xdead29(0x1de)]===0x0,'data':_0x57a2c2,'message':_0x22822e['length']===0x0?'Updated\x20visibility\x20for\x20'+_0x27e3d2+'\x20menu(s);\x20skipped\x20'+_0x18572b+_0xdead29(0x212):_0xdead29(0x217)+_0x27e3d2+_0xdead29(0x1eb)+_0x18572b+_0xdead29(0x204)+_0x22822e[_0xdead29(0x1de)]+_0xdead29(0x1da)};}};function parseInput(_0x21de01){const _0x222a17=a135_0x342536,_0x59d8d9=parseMenuIds(_0x21de01[_0x222a17(0x1e8)]('menu-ids')),_0x3c0672=parseCsv(_0x21de01[_0x222a17(0x1e8)](_0x222a17(0x211)));if(_0x59d8d9[_0x222a17(0x1de)]===0x0&&_0x3c0672[_0x222a17(0x1de)]===0x0)throw CliErrors['validation'](_0x222a17(0x1d2));const _0x2b4040=parseBooleanFlag(_0x21de01,_0x222a17(0x225),!![]),_0x3d09c7=parseBooleanFlag(_0x21de01,_0x222a17(0x223),![]);let _0x48e38d;if(hasFlag(_0x21de01,_0x222a17(0x222))){_0x48e38d=_0x21de01[_0x222a17(0x238)](_0x222a17(0x222));if(!Number[_0x222a17(0x1d4)](_0x48e38d)||_0x48e38d<0x0)throw CliErrors[_0x222a17(0x23e)](_0x222a17(0x237));}return{'menuIds':_0x59d8d9,'paths':_0x3c0672,'visible':_0x2b4040,'expectVisible':_0x3d09c7,'expectedCount':_0x48e38d};}async function buildPlan(_0x34b076,_0x2100b3){const _0x4505e2=a135_0x342536,_0x3407d8=parseInput(_0x34b076),_0x2ef513=await fetchMutationSnapshot(_0x34b076,'update\x20menu\x20visibility'),_0x19bc53=selectTargets(_0x2ef513[_0x4505e2(0x1d6)],_0x3407d8[_0x4505e2(0x1f3)],_0x3407d8['paths']);if(_0x3407d8[_0x4505e2(0x1db)]!==undefined&&_0x19bc53[_0x4505e2(0x1de)]!==_0x3407d8[_0x4505e2(0x1db)])throw menuError(_0x4505e2(0x1e1),'Selected\x20'+_0x19bc53[_0x4505e2(0x1de)]+_0x4505e2(0x1ed)+_0x3407d8[_0x4505e2(0x1db)]+'.',_0x4505e2(0x21f));if(_0x3407d8[_0x4505e2(0x207)]!==undefined){const _0x1d211e=_0x19bc53[_0x4505e2(0x1e2)](_0x277e3a=>_0x277e3a[_0x4505e2(0x225)]!==_0x3407d8[_0x4505e2(0x207)]);if(_0x1d211e[_0x4505e2(0x1de)]>0x0)throw menuError('menu_state_drift',_0x4505e2(0x229)+_0x1d211e[_0x4505e2(0x219)](_0x4d52ef=>_0x4d52ef['id'])[_0x4505e2(0x22d)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x4f2eb5=_0x19bc53['map'](_0xe4292d=>({'id':_0xe4292d['id'],'label':_0xe4292d['label'],'path':_0xe4292d['path'],'before':{'visible':_0xe4292d['visible']},'after':{'visible':_0x3407d8[_0x4505e2(0x225)]}})),_0x467d51=_0x4f2eb5[_0x4505e2(0x1e2)](_0x529a3e=>_0x529a3e[_0x4505e2(0x208)][_0x4505e2(0x225)]!==_0x3407d8[_0x4505e2(0x225)])[_0x4505e2(0x219)](_0x92fe4b=>({'stage':'update-menu-visibility','method':_0x4505e2(0x1d5),'path':'/smartapi/menu/update','body':{'appCode':_0x34b076[_0x4505e2(0x227)],'id':_0x92fe4b['id'],'visible':_0x3407d8['visible']}})),_0x5c0e11=mutationResult({'operation':_0x4505e2(0x1f1),'selector':{'menuIds':_0x3407d8[_0x4505e2(0x1f3)],'paths':_0x3407d8[_0x4505e2(0x211)]},'before':{'menus':_0x19bc53[_0x4505e2(0x219)](_0x315c35=>({'id':_0x315c35['id'],'path':_0x315c35[_0x4505e2(0x1fc)],'visible':_0x315c35[_0x4505e2(0x225)]}))},'after':{'menus':_0x19bc53[_0x4505e2(0x219)](_0x1ec7fc=>({'id':_0x1ec7fc['id'],'path':_0x1ec7fc[_0x4505e2(0x1fc)],'visible':_0x3407d8[_0x4505e2(0x225)]}))},'dryRun':_0x2100b3,'backend':[...BACKEND],'plannedActions':_0x467d51,'snapshotHash':_0x2ef513['hash'],'warnings':_0x467d51[_0x4505e2(0x1de)]===0x0?[_0x4505e2(0x239)]:[]});return{'plan':{..._0x5c0e11,'requestedVisible':_0x3407d8[_0x4505e2(0x225)],'targets':_0x4f2eb5},'beforeById':new Map(_0x19bc53[_0x4505e2(0x219)](_0x4a5619=>[_0x4a5619['id'],_0x4a5619]))};}function selectTargets(_0x137c24,_0x146276,_0x5d2ee9){const _0x64134b=a135_0x342536,_0x52a3c5=new Map(_0x137c24[_0x64134b(0x219)](_0x3ed2af=>[_0x3ed2af['id'],_0x3ed2af])),_0x3061d6=new Map(),_0x401d46=_0x146276['filter'](_0xcdc4cf=>!_0x52a3c5[_0x64134b(0x22f)](_0xcdc4cf));if(_0x401d46[_0x64134b(0x1de)]>0x0)throw menuError(_0x64134b(0x231),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x401d46[_0x64134b(0x22d)](',\x20')+'.',_0x64134b(0x226));for(const _0x219a33 of _0x146276){_0x3061d6['set'](_0x219a33,_0x52a3c5['get'](_0x219a33));}for(const _0x4e4fb2 of _0x5d2ee9){const _0x369391=_0x137c24[_0x64134b(0x1e2)](_0x30b55d=>_0x30b55d[_0x64134b(0x1fc)]===_0x4e4fb2);if(_0x369391['length']===0x0)throw menuError(_0x64134b(0x231),_0x64134b(0x1dd)+JSON[_0x64134b(0x21a)](_0x4e4fb2)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x369391[_0x64134b(0x1de)]>0x1)throw menuError(_0x64134b(0x218),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x4e4fb2)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x369391['map'](_0x2a8127=>_0x2a8127['id'])['join'](',\x20')+'.');const _0x55b849=_0x369391[0x0];_0x3061d6[_0x64134b(0x21e)](_0x55b849['id'],_0x55b849);}return[..._0x3061d6[_0x64134b(0x206)]()];}function parseMenuIds(_0x2af31a){const _0x5e92aa=a135_0x342536,_0x3026d9=parseCsv(_0x2af31a),_0x522861=_0x3026d9[_0x5e92aa(0x219)](Number);if(_0x522861[_0x5e92aa(0x234)](_0x55cb1d=>!Number['isSafeInteger'](_0x55cb1d)||_0x55cb1d<=0x0))throw CliErrors[_0x5e92aa(0x23e)](_0x5e92aa(0x1f0));return[...new Set(_0x522861)];}function parseCsv(_0x57d9a0){const _0x3fe296=a135_0x342536;return[...new Set(_0x57d9a0[_0x3fe296(0x216)](',')[_0x3fe296(0x219)](_0x418ccb=>_0x418ccb[_0x3fe296(0x22b)]())[_0x3fe296(0x1e2)](Boolean))];}function parseBooleanFlag(_0x3d1a6a,_0x48bb28,_0x3a64c3){const _0xd2d4e7=a135_0x342536;if(!hasFlag(_0x3d1a6a,_0x48bb28)){if(_0x3a64c3)throw CliErrors[_0xd2d4e7(0x20d)](_0x48bb28);return undefined;}const _0x256864=_0x3d1a6a[_0xd2d4e7(0x1f9)][_0x48bb28];if(_0x256864===!![]||_0x256864===![])return _0x256864;if(_0x256864===_0xd2d4e7(0x21d))return!![];if(_0x256864==='false')return![];throw CliErrors[_0xd2d4e7(0x23e)]('--'+_0x48bb28+'\x20must\x20be\x20true\x20or\x20false.');}function a135_0x2703(){const _0xaba0ce=['plannedActions','3467118sDlVKW','paths','\x20unchanged\x20menu(s).','Menu\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','requestedVisible','split','Menu\x20visibility\x20update\x20completed:\x20','menu_selector_ambiguous','map','stringify','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','true','set','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','datasetCode','get','expected-count','expect-visible','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','visible','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','appCode','update-recovery','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','beforeById','trim','type','join','verification','has','plan','menu_selector_not_found','update\x20menu\x20visibility','\x20visibility\x20update\x20could\x20not\x20be\x20verified','some','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','num','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','2089160ikHJax','targets','isArray','code','validation','parentId','2031270FuEipA','recovered','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','pageType','byId','update\x20visibility\x20for','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','5wlREUC','isSafeInteger','POST','menus','resourcesValid','modelType','string','\x20failed.','expectedCount','label','Menu\x20path\x20selector\x20not\x20found:\x20','length','menu_verification_failed','warnings','menu_expected_count_mismatch','filter','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','message','41833768gnEFMu','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','str','datasetId','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20updated,\x20','\x20changed\x20unexpectedly.','\x20menu(s),\x20expected\x20','failed','5375334kMnjuX','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','visibility-update','2356039AeqhLt','menuIds','url','/smartapi/menu/update','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','pageId','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','rawFlags','sort','cookie','path','menu_permission_denied','rabetbase\x20menu\x20list\x20--format\x20compress','boolean','menu','resources','1526643wZHJeY','childrenCount','\x20skipped,\x20','Response\x20was\x20lost\x20and\x20menu\x20','values','expectVisible','before','high-risk-write','verify\x20menu\x20visibility\x20update','push','Final\x20menu\x20visibility\x20readback\x20failed.','flagMissing','depth'];a135_0x2703=function(){return _0xaba0ce;};return a135_0x2703();}function verifyVisibilityUpdate(_0x1f3141,_0x27b7de,_0x1b0727){const _0x25268d=a135_0x342536;assertVerified(!!_0x27b7de,_0x25268d(0x213)+_0x1f3141['id']+_0x25268d(0x1e3)),assertVerified(_0x27b7de[_0x25268d(0x225)]===_0x1b0727,'Menu\x20'+_0x1f3141['id']+_0x25268d(0x236));const _0x45c122=[['id',_0x27b7de['id'],_0x1f3141['id']],[_0x25268d(0x23f),_0x27b7de['parentId'],_0x1f3141[_0x25268d(0x23f)]],[_0x25268d(0x20e),_0x27b7de[_0x25268d(0x20e)],_0x1f3141['depth']],[_0x25268d(0x1dc),_0x27b7de['label'],_0x1f3141[_0x25268d(0x1dc)]],[_0x25268d(0x1fc),_0x27b7de['path'],_0x1f3141['path']],[_0x25268d(0x1f4),_0x27b7de['url'],_0x1f3141[_0x25268d(0x1f4)]],[_0x25268d(0x22c),_0x27b7de['type'],_0x1f3141['type']],[_0x25268d(0x1fa),_0x27b7de[_0x25268d(0x1fa)],_0x1f3141['sort']],[_0x25268d(0x201),_0x27b7de[_0x25268d(0x201)],_0x1f3141[_0x25268d(0x201)]],[_0x25268d(0x1d7),_0x27b7de[_0x25268d(0x1d7)],_0x1f3141['resourcesValid']],['childrenIds',_0x27b7de['childrenIds'],_0x1f3141['childrenIds']],[_0x25268d(0x203),_0x27b7de[_0x25268d(0x203)],_0x1f3141['childrenCount']],[_0x25268d(0x1f7),_0x27b7de['pageId'],_0x1f3141[_0x25268d(0x1f7)]],[_0x25268d(0x1cf),_0x27b7de['pageType'],_0x1f3141[_0x25268d(0x1cf)]],[_0x25268d(0x1d8),_0x27b7de[_0x25268d(0x1d8)],_0x1f3141[_0x25268d(0x1d8)]],[_0x25268d(0x1e9),_0x27b7de[_0x25268d(0x1e9)],_0x1f3141[_0x25268d(0x1e9)]],[_0x25268d(0x220),_0x27b7de['datasetCode'],_0x1f3141[_0x25268d(0x220)]]];for(const [_0x367f63,_0x2967b3,_0x53fc59]of _0x45c122){assertVerified(sameValue(_0x2967b3,_0x53fc59),_0x25268d(0x213)+_0x1f3141['id']+'\x20'+_0x367f63+_0x25268d(0x1ec));}}function sameValue(_0x50a87a,_0x2c2de6){const _0x3c8744=a135_0x342536;if(Array[_0x3c8744(0x23c)](_0x50a87a)||Array[_0x3c8744(0x23c)](_0x2c2de6))return JSON[_0x3c8744(0x21a)](_0x50a87a)===JSON['stringify'](_0x2c2de6);return _0x50a87a===_0x2c2de6;}
|
|
1
|
+
const a135_0x4a82ce=a135_0x5e37;(function(_0x264136,_0x44e43a){const _0x5c6dee=a135_0x5e37,_0x59fdd7=_0x264136();while(!![]){try{const _0x110cff=-parseInt(_0x5c6dee(0x162))/0x1*(parseInt(_0x5c6dee(0x16d))/0x2)+-parseInt(_0x5c6dee(0x113))/0x3+-parseInt(_0x5c6dee(0x171))/0x4+-parseInt(_0x5c6dee(0x170))/0x5+-parseInt(_0x5c6dee(0x12a))/0x6*(-parseInt(_0x5c6dee(0x168))/0x7)+-parseInt(_0x5c6dee(0x12c))/0x8+parseInt(_0x5c6dee(0x13b))/0x9;if(_0x110cff===_0x44e43a)break;else _0x59fdd7['push'](_0x59fdd7['shift']());}catch(_0x25f05d){_0x59fdd7['push'](_0x59fdd7['shift']());}}}(a135_0x5796,0x5f51c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a135_0x5796(){const _0x562586=['\x20menu(s);\x20skipped\x20','resourcesValid','verify\x20menu\x20visibility\x20update','failed','638910kiZsRj','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','expectVisible','flagMissing','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','menu\x20list','expectedCount','pageType','Updated\x20visibility\x20for\x20','Response\x20was\x20lost\x20and\x20menu\x20','datasetCode','expected-count','menu_expected_count_mismatch','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','type','Response\x20was\x20lost\x20for\x20menu\x20','recovered','hash','\x20changed\x20unexpectedly.','Final\x20menu\x20visibility\x20readback\x20failed.','menu_selector_not_found','12CcIDuY','boolean','1626408nfGoqq','join','childrenIds','stringify','set','path','byId','Menu\x20path\x20selector\x20not\x20found:\x20','expect-visible','plannedActions','update\x20visibility\x20for','updated','get','warnings','Menu\x20id\x20selector(s)\x20not\x20found:\x20','17533800FCzvJC','sort','update-recovery','\x20unchanged\x20menu(s).','code','rawFlags','pageId','visibility-update','message','string','resources','modelType','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menuIds','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','POST','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','\x20skipped,\x20','\x20updated,\x20','before','childrenCount','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','isSafeInteger','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','number','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','update','rabetbase\x20menu\x20list\x20--format\x20compress','plan','label','targets','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','has','\x20must\x20be\x20true\x20or\x20false.','paths','Requested\x20menu\x20visibility','appCode','update\x20menu\x20visibility','27539aMpTNN','verification','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','true','menu-ids','filter','280063PVDZha','datasetId','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','body','length','28MdBtaB','visible','push','884870Muicpc','2635996jAaDkx','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','\x20failed.','/smartapi/menu/update','menu_verification_failed','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','Menu\x20','map','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','Selected\x20','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','validation','false','requestedVisible','parentId','isArray','depth','Menu\x20visibility\x20update\x20completed:\x20','cookie','url','beforeById','Would\x20update\x20visibility\x20for\x20','values','some'];a135_0x5796=function(){return _0x562586;};return a135_0x5796();}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':a135_0x4a82ce(0x14b),'path':a135_0x4a82ce(0x174)}];export const menuVisibilityUpdate={'service':'menu','command':a135_0x4a82ce(0x142),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a135_0x4a82ce(0x166),'type':'string','description':a135_0x4a82ce(0x153)},{'name':a135_0x4a82ce(0x15e),'type':a135_0x4a82ce(0x144),'description':a135_0x4a82ce(0x119)},{'name':a135_0x4a82ce(0x16e),'type':a135_0x4a82ce(0x12b),'required':!![],'description':a135_0x4a82ce(0x15f)},{'name':'expect-visible','type':'boolean','description':a135_0x4a82ce(0x15b)},{'name':a135_0x4a82ce(0x120),'type':a135_0x4a82ce(0x154),'description':a135_0x4a82ce(0x151)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1f6f00){parseInput(_0x1f6f00),requireExplicitYes(_0x1f6f00);},async 'dryRun'(_0x32282e){const _0x16d57d=a135_0x4a82ce,_0x3c0dd9=await buildPlan(_0x32282e,!![]),_0x48feac=_0x3c0dd9[_0x16d57d(0x158)][_0x16d57d(0x135)]?.[_0x16d57d(0x16c)]??0x0,_0x5a86f4=_0x3c0dd9[_0x16d57d(0x158)]['targets'][_0x16d57d(0x16c)]-_0x48feac;return menuDryRunResult(_0x3c0dd9['plan'],{'method':_0x16d57d(0x14b),'url':'/smartapi/menu/update','body':{'updates':_0x3c0dd9[_0x16d57d(0x158)][_0x16d57d(0x135)]?.[_0x16d57d(0x178)](_0x111d82=>_0x111d82[_0x16d57d(0x16b)])??[]},'description':_0x16d57d(0x186)+_0x48feac+'\x20menu(s);\x20skip\x20'+_0x5a86f4+_0x16d57d(0x13e)});},async 'execute'(_0x2ba8d3){const _0x590615=a135_0x4a82ce;requireExplicitYes(_0x2ba8d3);const _0x46106f=await buildPlan(_0x2ba8d3,![]);await recheckMutationSnapshot(_0x2ba8d3,_0x46106f[_0x590615(0x158)],'update\x20menu\x20visibility');const _0x1348b6=[],_0x3c6aba=[],_0x1e83ae=[];for(const _0x214e08 of _0x46106f[_0x590615(0x158)][_0x590615(0x15a)]){if(_0x214e08[_0x590615(0x14f)][_0x590615(0x16e)]===_0x46106f[_0x590615(0x158)]['requestedVisible']){_0x1348b6[_0x590615(0x16f)]({'id':_0x214e08['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2ba8d3[_0x590615(0x160)],_0x2ba8d3[_0x590615(0x183)],{'id':_0x214e08['id'],'visible':_0x46106f[_0x590615(0x158)]['requestedVisible']}),_0x1348b6[_0x590615(0x16f)]({'id':_0x214e08['id'],'updated':!![],'skipped':![]});}catch(_0x31c4da){const _0x2ab59c=mapMenuApiError(_0x31c4da,_0x590615(0x136),_0x214e08['id']);if(isMenuResponseLoss(_0x31c4da)&&_0x2ab59c[_0x590615(0x13f)]!=='menu_permission_denied'){_0x1e83ae['push'](_0x214e08['id']);continue;}_0x3c6aba[_0x590615(0x16f)]({'id':_0x214e08['id'],'stage':_0x590615(0x156),'code':_0x2ab59c[_0x590615(0x13f)],'message':_0x2ab59c['message']});}}let _0x473d5e;try{_0x473d5e=await fetchMenuSnapshot(_0x2ba8d3['appCode'],_0x2ba8d3['cookie']);}catch(_0x166291){const _0x27bced=describeMenuErrorCause(_0x166291,_0x590615(0x111)),_0xd42b3b=_0x1e83ae[_0x590615(0x178)](_0x58255c=>({'id':_0x58255c,'stage':_0x590615(0x13d),'code':_0x590615(0x175),'message':_0x590615(0x124)+_0x58255c+_0x590615(0x114),'requestedStateConfirmed':![],'recovered':![]})),_0x3fe776={'stage':_0x590615(0x163),'code':_0x590615(0x175),'message':_0x590615(0x128),'targetIds':_0x46106f[_0x590615(0x158)]['targets'][_0x590615(0x178)](_0x4f943b=>_0x4f943b['id']),'requestedStateConfirmed':![],..._0x27bced};throw menuFailure(asVerificationError(_0x166291,_0x590615(0x17b)),_0x46106f[_0x590615(0x158)],{'stage':'verification','succeeded':_0x1348b6,'failedRecords':[..._0x3c6aba,..._0xd42b3b,_0x3fe776],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':_0x590615(0x157)}});}const _0x255bf5=[];for(const _0x310f7c of _0x1348b6){const _0x43adce=Number(_0x310f7c['id']),_0x577bf1=_0x46106f[_0x590615(0x185)][_0x590615(0x138)](_0x43adce),_0x4c5a1e=_0x473d5e['byId'][_0x590615(0x138)](_0x43adce);try{verifyVisibilityUpdate(_0x577bf1,_0x4c5a1e,_0x46106f['plan'][_0x590615(0x17e)]);}catch(_0x4b8378){const _0x572653=asVerificationError(_0x4b8378,_0x590615(0x177)+_0x43adce+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x255bf5['push']({'id':_0x43adce,'stage':_0x590615(0x163),'code':_0x572653[_0x590615(0x13f)],'message':_0x572653[_0x590615(0x143)],'requestedStateConfirmed':![]});}}for(const _0x10d6f8 of _0x1e83ae){const _0x5028ba=_0x46106f[_0x590615(0x185)][_0x590615(0x138)](_0x10d6f8),_0x1ed8cd=_0x473d5e[_0x590615(0x132)]['get'](_0x10d6f8);try{verifyVisibilityUpdate(_0x5028ba,_0x1ed8cd,_0x46106f['plan']['requestedVisible']),_0x1348b6['push']({'id':_0x10d6f8,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x4adab2){const _0x3b433d=asVerificationError(_0x4adab2,_0x590615(0x11e)+_0x10d6f8+_0x590615(0x148));_0x255bf5['push']({'id':_0x10d6f8,'stage':'update-recovery','code':_0x3b433d['code'],'message':_0x3b433d[_0x590615(0x143)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x255bf5['length']>0x0){const _0x57b2d3=_0x255bf5[_0x590615(0x178)](_0x3ed0ea=>Number(_0x3ed0ea['id'])),_0x4c8d4a=_0x1348b6['filter'](_0x62f161=>_0x62f161[_0x590615(0x125)]===!![])[_0x590615(0x16c)],_0x3a59c1=menuError('menu_verification_failed',_0x590615(0x172)+_0x57b2d3[_0x590615(0x12d)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x3a59c1,_0x46106f[_0x590615(0x158)],{'stage':'verification','succeeded':_0x1348b6,'failedRecords':[..._0x3c6aba,..._0x255bf5],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x590615(0x112),..._0x57b2d3[_0x590615(0x16c)]===0x1?{'targetId':_0x57b2d3[0x0]}:{'targetIds':_0x57b2d3},'recoveredCount':_0x4c8d4a,'lookupCommand':_0x590615(0x157)}});}const _0x426379=_0x1348b6[_0x590615(0x167)](_0x2786b8=>_0x2786b8[_0x590615(0x137)]===!![])[_0x590615(0x16c)],_0x17031e=_0x1348b6[_0x590615(0x16c)]-_0x426379,_0xc8355f={..._0x46106f[_0x590615(0x158)],'succeeded':_0x1348b6,'failed':_0x3c6aba,'warnings':_0x3c6aba[_0x590615(0x16c)]>0x0?[..._0x46106f['plan'][_0x590615(0x139)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x46106f[_0x590615(0x158)][_0x590615(0x139)],'verification':{'checkedBy':_0x590615(0x11a),'snapshotHash':_0x473d5e[_0x590615(0x126)],'matchesRequestedState':_0x3c6aba['length']===0x0,'recoveredCount':_0x1e83ae['length']}};return{'ok':_0x3c6aba[_0x590615(0x16c)]===0x0,'data':_0xc8355f,'message':_0x3c6aba[_0x590615(0x16c)]===0x0?_0x590615(0x11d)+_0x426379+_0x590615(0x10f)+_0x17031e+_0x590615(0x13e):_0x590615(0x182)+_0x426379+_0x590615(0x14e)+_0x17031e+_0x590615(0x14d)+_0x3c6aba[_0x590615(0x16c)]+_0x590615(0x173)};}};function parseInput(_0xba331e){const _0x46a639=a135_0x4a82ce,_0x38c75e=parseMenuIds(_0xba331e['str']('menu-ids')),_0x552a11=parseCsv(_0xba331e['str'](_0x46a639(0x15e)));if(_0x38c75e[_0x46a639(0x16c)]===0x0&&_0x552a11[_0x46a639(0x16c)]===0x0)throw CliErrors['validation'](_0x46a639(0x122));const _0x47934c=parseBooleanFlag(_0xba331e,'visible',!![]),_0x45b719=parseBooleanFlag(_0xba331e,_0x46a639(0x134),![]);let _0x57cb49;if(hasFlag(_0xba331e,_0x46a639(0x120))){_0x57cb49=_0xba331e['num']('expected-count');if(!Number[_0x46a639(0x152)](_0x57cb49)||_0x57cb49<0x0)throw CliErrors['validation'](_0x46a639(0x155));}return{'menuIds':_0x38c75e,'paths':_0x552a11,'visible':_0x47934c,'expectVisible':_0x45b719,'expectedCount':_0x57cb49};}function a135_0x5e37(_0x472bca,_0x5f48b1){_0x472bca=_0x472bca-0x10e;const _0x579665=a135_0x5796();let _0x5e3765=_0x579665[_0x472bca];return _0x5e3765;}async function buildPlan(_0x184f54,_0x2aef55){const _0x310045=a135_0x4a82ce,_0x10e575=parseInput(_0x184f54),_0x397ee0=await fetchMutationSnapshot(_0x184f54,_0x310045(0x161)),_0x797518=selectTargets(_0x397ee0['menus'],_0x10e575['menuIds'],_0x10e575['paths']);if(_0x10e575[_0x310045(0x11b)]!==undefined&&_0x797518[_0x310045(0x16c)]!==_0x10e575[_0x310045(0x11b)])throw menuError(_0x310045(0x121),_0x310045(0x17a)+_0x797518['length']+'\x20menu(s),\x20expected\x20'+_0x10e575[_0x310045(0x11b)]+'.',_0x310045(0x176));if(_0x10e575[_0x310045(0x117)]!==undefined){const _0x552ccf=_0x797518['filter'](_0x5a18ef=>_0x5a18ef[_0x310045(0x16e)]!==_0x10e575[_0x310045(0x117)]);if(_0x552ccf[_0x310045(0x16c)]>0x0)throw menuError('menu_state_drift',_0x310045(0x115)+_0x552ccf[_0x310045(0x178)](_0xebbf8f=>_0xebbf8f['id'])[_0x310045(0x12d)](',\x20')+'.',_0x310045(0x179));}const _0x1a371a=_0x797518[_0x310045(0x178)](_0x3d9edc=>({'id':_0x3d9edc['id'],'label':_0x3d9edc[_0x310045(0x159)],'path':_0x3d9edc['path'],'before':{'visible':_0x3d9edc['visible']},'after':{'visible':_0x10e575[_0x310045(0x16e)]}})),_0x3e6777=_0x1a371a[_0x310045(0x167)](_0x20722e=>_0x20722e[_0x310045(0x14f)]['visible']!==_0x10e575[_0x310045(0x16e)])['map'](_0x132aab=>({'stage':'update-menu-visibility','method':_0x310045(0x14b),'path':'/smartapi/menu/update','body':{'appCode':_0x184f54['appCode'],'id':_0x132aab['id'],'visible':_0x10e575[_0x310045(0x16e)]}})),_0x4d0eb0=mutationResult({'operation':_0x310045(0x142),'selector':{'menuIds':_0x10e575[_0x310045(0x149)],'paths':_0x10e575[_0x310045(0x15e)]},'before':{'menus':_0x797518[_0x310045(0x178)](_0x1bac84=>({'id':_0x1bac84['id'],'path':_0x1bac84['path'],'visible':_0x1bac84[_0x310045(0x16e)]}))},'after':{'menus':_0x797518[_0x310045(0x178)](_0x17c8a1=>({'id':_0x17c8a1['id'],'path':_0x17c8a1['path'],'visible':_0x10e575[_0x310045(0x16e)]}))},'dryRun':_0x2aef55,'backend':[...BACKEND],'plannedActions':_0x3e6777,'snapshotHash':_0x397ee0[_0x310045(0x126)],'warnings':_0x3e6777[_0x310045(0x16c)]===0x0?[_0x310045(0x16a)]:[]});return{'plan':{..._0x4d0eb0,'requestedVisible':_0x10e575[_0x310045(0x16e)],'targets':_0x1a371a},'beforeById':new Map(_0x797518[_0x310045(0x178)](_0x4c9d4a=>[_0x4c9d4a['id'],_0x4c9d4a]))};}function selectTargets(_0xa0d7ee,_0x5407a5,_0x3a4384){const _0x3aa99c=a135_0x4a82ce,_0x3c6547=new Map(_0xa0d7ee['map'](_0x5971be=>[_0x5971be['id'],_0x5971be])),_0x283ace=new Map(),_0x2bbdda=_0x5407a5[_0x3aa99c(0x167)](_0x4de4c3=>!_0x3c6547[_0x3aa99c(0x15c)](_0x4de4c3));if(_0x2bbdda[_0x3aa99c(0x16c)]>0x0)throw menuError(_0x3aa99c(0x129),_0x3aa99c(0x13a)+_0x2bbdda['join'](',\x20')+'.',_0x3aa99c(0x14c));for(const _0x165096 of _0x5407a5){_0x283ace[_0x3aa99c(0x130)](_0x165096,_0x3c6547[_0x3aa99c(0x138)](_0x165096));}for(const _0x251a4a of _0x3a4384){const _0x5053ed=_0xa0d7ee[_0x3aa99c(0x167)](_0x478f25=>_0x478f25[_0x3aa99c(0x131)]===_0x251a4a);if(_0x5053ed[_0x3aa99c(0x16c)]===0x0)throw menuError('menu_selector_not_found',_0x3aa99c(0x133)+JSON[_0x3aa99c(0x12f)](_0x251a4a)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x5053ed[_0x3aa99c(0x16c)]>0x1)throw menuError('menu_selector_ambiguous','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x251a4a)+'.',_0x3aa99c(0x116)+_0x5053ed[_0x3aa99c(0x178)](_0x235f13=>_0x235f13['id'])[_0x3aa99c(0x12d)](',\x20')+'.');const _0x506791=_0x5053ed[0x0];_0x283ace[_0x3aa99c(0x130)](_0x506791['id'],_0x506791);}return[..._0x283ace[_0x3aa99c(0x187)]()];}function parseMenuIds(_0x241550){const _0x488be4=a135_0x4a82ce,_0x4284c4=parseCsv(_0x241550),_0x17441f=_0x4284c4[_0x488be4(0x178)](Number);if(_0x17441f[_0x488be4(0x10e)](_0x2ffa85=>!Number[_0x488be4(0x152)](_0x2ffa85)||_0x2ffa85<=0x0))throw CliErrors[_0x488be4(0x17c)](_0x488be4(0x164));return[...new Set(_0x17441f)];}function parseCsv(_0x226884){const _0x590005=a135_0x4a82ce;return[...new Set(_0x226884['split'](',')[_0x590005(0x178)](_0x3758b0=>_0x3758b0['trim']())[_0x590005(0x167)](Boolean))];}function parseBooleanFlag(_0xe89bfa,_0x98b108,_0x3047bf){const _0x141148=a135_0x4a82ce;if(!hasFlag(_0xe89bfa,_0x98b108)){if(_0x3047bf)throw CliErrors[_0x141148(0x118)](_0x98b108);return undefined;}const _0x522580=_0xe89bfa[_0x141148(0x140)][_0x98b108];if(_0x522580===!![]||_0x522580===![])return _0x522580;if(_0x522580===_0x141148(0x165))return!![];if(_0x522580===_0x141148(0x17d))return![];throw CliErrors[_0x141148(0x17c)]('--'+_0x98b108+_0x141148(0x15d));}function verifyVisibilityUpdate(_0x31473f,_0x13dad7,_0x5a0ee9){const _0x25d9bc=a135_0x4a82ce;assertVerified(!!_0x13dad7,'Menu\x20'+_0x31473f['id']+_0x25d9bc(0x147)),assertVerified(_0x13dad7[_0x25d9bc(0x16e)]===_0x5a0ee9,'Menu\x20'+_0x31473f['id']+_0x25d9bc(0x14a));const _0x1ef185=[['id',_0x13dad7['id'],_0x31473f['id']],[_0x25d9bc(0x17f),_0x13dad7[_0x25d9bc(0x17f)],_0x31473f[_0x25d9bc(0x17f)]],[_0x25d9bc(0x181),_0x13dad7[_0x25d9bc(0x181)],_0x31473f[_0x25d9bc(0x181)]],['label',_0x13dad7[_0x25d9bc(0x159)],_0x31473f['label']],['path',_0x13dad7[_0x25d9bc(0x131)],_0x31473f[_0x25d9bc(0x131)]],[_0x25d9bc(0x184),_0x13dad7[_0x25d9bc(0x184)],_0x31473f[_0x25d9bc(0x184)]],[_0x25d9bc(0x123),_0x13dad7[_0x25d9bc(0x123)],_0x31473f[_0x25d9bc(0x123)]],[_0x25d9bc(0x13c),_0x13dad7[_0x25d9bc(0x13c)],_0x31473f['sort']],[_0x25d9bc(0x145),_0x13dad7[_0x25d9bc(0x145)],_0x31473f[_0x25d9bc(0x145)]],[_0x25d9bc(0x110),_0x13dad7['resourcesValid'],_0x31473f['resourcesValid']],[_0x25d9bc(0x12e),_0x13dad7[_0x25d9bc(0x12e)],_0x31473f['childrenIds']],[_0x25d9bc(0x150),_0x13dad7['childrenCount'],_0x31473f[_0x25d9bc(0x150)]],['pageId',_0x13dad7[_0x25d9bc(0x141)],_0x31473f[_0x25d9bc(0x141)]],[_0x25d9bc(0x11c),_0x13dad7[_0x25d9bc(0x11c)],_0x31473f[_0x25d9bc(0x11c)]],['modelType',_0x13dad7['modelType'],_0x31473f[_0x25d9bc(0x146)]],[_0x25d9bc(0x169),_0x13dad7[_0x25d9bc(0x169)],_0x31473f[_0x25d9bc(0x169)]],[_0x25d9bc(0x11f),_0x13dad7[_0x25d9bc(0x11f)],_0x31473f[_0x25d9bc(0x11f)]]];for(const [_0x3bafa4,_0x285c0c,_0x2d91d5]of _0x1ef185){assertVerified(sameValue(_0x285c0c,_0x2d91d5),_0x25d9bc(0x177)+_0x31473f['id']+'\x20'+_0x3bafa4+_0x25d9bc(0x127));}}function sameValue(_0x4f6420,_0x45dd3d){const _0x52ca35=a135_0x4a82ce;if(Array[_0x52ca35(0x180)](_0x4f6420)||Array[_0x52ca35(0x180)](_0x45dd3d))return JSON['stringify'](_0x4f6420)===JSON[_0x52ca35(0x12f)](_0x45dd3d);return _0x4f6420===_0x45dd3d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a136_0x593862=a136_0x2b23;(function(_0x3c00cd,_0x5764a1){const _0x2ed617=a136_0x2b23,_0x9030e8=_0x3c00cd();while(!![]){try{const _0x26bd90=parseInt(_0x2ed617(0xf2))/0x1*(-parseInt(_0x2ed617(0x101))/0x2)+-parseInt(_0x2ed617(0x100))/0x3*(-parseInt(_0x2ed617(0xfb))/0x4)+parseInt(_0x2ed617(0xed))/0x5*(-parseInt(_0x2ed617(0x10c))/0x6)+parseInt(_0x2ed617(0xfd))/0x7*(-parseInt(_0x2ed617(0x103))/0x8)+parseInt(_0x2ed617(0xfc))/0x9*(-parseInt(_0x2ed617(0xf4))/0xa)+-parseInt(_0x2ed617(0xff))/0xb+parseInt(_0x2ed617(0xf5))/0xc;if(_0x26bd90===_0x5764a1)break;else _0x9030e8['push'](_0x9030e8['shift']());}catch(_0x4effef){_0x9030e8['push'](_0x9030e8['shift']());}}}(a136_0x3895,0x8efda));import{asDryRunResult}from'../../commands/common/dry-run.js';function a136_0x2b23(_0x222d27,_0x5c51cf){_0x222d27=_0x222d27-0xec;const _0x3895ec=a136_0x3895();let _0x2b2371=_0x3895ec[_0x222d27];return _0x2b2371;}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';function a136_0x3895(){const _0x2860d8=['planned','appCode','verification','5wAjIoT','notification_config_create_outcome_unknown','verified','POST','notification','79DYAvUC','endpointUrl','2129990seBdzu','20191620ncASkS','Inspect\x20with\x20','description','mutation','isSafeInteger','connectTimeout','3524504XmnKXP','9yCBQLb','189231gKmRJB','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','12194226OdwayN','3PyIAGu','1264ZBxbwD','input','56kpxNiU','Created\x20notification\x20config\x20','channelType','config-create','document','configName',';\x20do\x20not\x20resubmit.','configCode','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','2504082NPRbxw','write','create'];a136_0x3895=function(){return _0x2860d8;};return a136_0x3895();}async function prepareCreate(_0x46eb8e){const _0x2bfee5=a136_0x2b23,_0x99204e=await readNotificationDocument(_0x46eb8e,_0x2bfee5(0x10e)),_0x408893=createMutationInput(_0x46eb8e[_0x2bfee5(0x110)],_0x99204e);return{'document':_0x99204e,'input':_0x408893,'planned':projectNotificationConfig({'appCode':_0x46eb8e['appCode'],'configName':_0x99204e['configName'],'channelType':_0x99204e[_0x2bfee5(0x105)],'endpointUrl':_0x99204e[_0x2bfee5(0xf3)],'channelConfig':_0x99204e['channelConfig'],'description':_0x99204e[_0x2bfee5(0xf7)],'connectTimeout':_0x99204e[_0x2bfee5(0xfa)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x99204e['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a136_0x593862(0xf1),'command':a136_0x593862(0x106),'description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':a136_0x593862(0x10d),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x286fc3){assertSingleNotificationSource(_0x286fc3);},async 'dryRun'(_0x1f87a2){const _0x5b6e31=a136_0x593862,_0x4be833=await prepareCreate(_0x1f87a2),_0x27981e=notificationLookupCommand(_0x1f87a2[_0x5b6e31(0x110)],_0x4be833[_0x5b6e31(0x107)]['channelType']);return asDryRunResult({'operation':_0x5b6e31(0x10e),'selector':{'appCode':_0x1f87a2[_0x5b6e31(0x110)],'configName':_0x4be833[_0x5b6e31(0x107)][_0x5b6e31(0x108)],'channelType':_0x4be833[_0x5b6e31(0x107)][_0x5b6e31(0x105)]},'before':null,'after':_0x4be833[_0x5b6e31(0x10f)],'dryRun':!![],'backend':{'method':_0x5b6e31(0xf0),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x5b6e31(0x10f),'lookupCommand':_0x27981e}},{'method':_0x5b6e31(0xf0),'url':CREATE_PATH});},async 'execute'(_0x5614e2){const _0x3a8576=a136_0x593862,_0x521f81=await prepareCreate(_0x5614e2),_0x581660=notificationLookupCommand(_0x5614e2['appCode'],_0x521f81[_0x3a8576(0x107)][_0x3a8576(0x105)]);let _0x122b58;try{_0x122b58=await createNotificationChannelConfig(_0x521f81[_0x3a8576(0x102)]);}catch(_0x13ef18){if(isPlatformTransportFailure(_0x13ef18))throw notificationError('notification_config_create_outcome_unknown',_0x3a8576(0xfe),_0x3a8576(0xf6)+_0x581660+_0x3a8576(0x109));throw safeApiFailure(_0x3a8576(0x10e),_0x3a8576(0xf8),'Inspect\x20with\x20'+_0x581660+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number[_0x3a8576(0xf9)](_0x122b58)||_0x122b58<=0x0)throw notificationError(_0x3a8576(0xee),_0x3a8576(0x10b),_0x3a8576(0xf6)+_0x581660+';\x20do\x20not\x20resubmit.');let _0xd9b17a;try{const _0x27b113=await getNotificationChannelConfig(_0x122b58,_0x5614e2[_0x3a8576(0x110)]);_0xd9b17a=normalizeExactNotificationConfig(_0x27b113,_0x122b58,_0x5614e2[_0x3a8576(0x110)]);}catch{throw safeApiFailure(_0x3a8576(0x10e),_0x3a8576(0xec),_0x3a8576(0xf6)+_0x581660+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x3a8576(0x10e),'selector':{'appCode':_0xd9b17a[_0x3a8576(0x110)],'id':_0xd9b17a['id'],'configCode':_0xd9b17a[_0x3a8576(0x10a)],'configName':_0xd9b17a[_0x3a8576(0x108)],'channelType':_0xd9b17a[_0x3a8576(0x105)]},'before':null,'after':projectNotificationConfig(_0xd9b17a),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3a8576(0xef),'lookupCommand':_0x581660}},'message':_0x3a8576(0x104)+_0xd9b17a['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x365e91=a137_0x1230;(function(_0x209b86,_0x36abac){const _0x14734e=a137_0x1230,_0x5b65d5=_0x209b86();while(!![]){try{const _0x3ef8d0=-parseInt(_0x14734e(0x1de))/0x1*(parseInt(_0x14734e(0x1e9))/0x2)+-parseInt(_0x14734e(0x1f4))/0x3+parseInt(_0x14734e(0x1f7))/0x4*(-parseInt(_0x14734e(0x1ef))/0x5)+parseInt(_0x14734e(0x1e4))/0x6+-parseInt(_0x14734e(0x1fa))/0x7+-parseInt(_0x14734e(0x1f8))/0x8+-parseInt(_0x14734e(0x1ea))/0x9*(-parseInt(_0x14734e(0x1f6))/0xa);if(_0x3ef8d0===_0x36abac)break;else _0x5b65d5['push'](_0x5b65d5['shift']());}catch(_0x51650d){_0x5b65d5['push'](_0x5b65d5['shift']());}}}(a137_0x174a,0xb4698));import{asDryRunResult}from'../../commands/common/dry-run.js';function a137_0x174a(){const _0x35c0b5=['unshift','notification_config_delete_verification_unavailable','3122187KIWDGf','delete','42500950tPpFxM','216xcVySB','7428600KaaniM','before','6044787PcYqpl','Notification\x20config\x20','appCode','notification_config_delete_verification_failed','671059MpLhhr','planned','POST','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','high-risk-write',';\x20no\x20automatic\x20retry\x20was\x20attempted.','5639628vtKEvg','channelType','config-delete','/notification/channel-config/delete','mutation','4gCixML','9QFPHrW','notification_config_delete_outcome_unknown','\x20remains\x20present\x20after\x20delete.',';\x20do\x20not\x20resubmit\x20automatically.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','25565sTLLlf','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','Inspect\x20with\x20'];a137_0x174a=function(){return _0x35c0b5;};return a137_0x174a();}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=a137_0x365e91(0x1e7),REFERENCE_WARNING=a137_0x365e91(0x1e1);function a137_0x1230(_0x655bcc,_0x42e960){_0x655bcc=_0x655bcc-0x1de;const _0x174a6b=a137_0x174a();let _0x123029=_0x174a6b[_0x655bcc];return _0x123029;}async function prepareDelete(_0x34120f){const _0x1cb229=a137_0x365e91,_0x5203a6=readNotificationId(_0x34120f),_0x36b653=await requireExactNotificationConfig(_0x34120f[_0x1cb229(0x1fc)],_0x5203a6,_0x1cb229(0x1f5));return{'id':_0x5203a6,'before':_0x36b653};}export const notificationConfigDelete={'service':'notification','command':a137_0x365e91(0x1e6),'description':a137_0x365e91(0x1ee),'risk':a137_0x365e91(0x1e2),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x388269){readNotificationId(_0x388269),requireNotificationExplicitYes(_0x388269);},async 'dryRun'(_0x548e97){const _0xf4b900=a137_0x365e91,_0x57884b=await prepareDelete(_0x548e97),_0x4931e0=notificationLookupCommand(_0x548e97[_0xf4b900(0x1fc)],_0x57884b[_0xf4b900(0x1f9)][_0xf4b900(0x1e5)]);return asDryRunResult({'operation':_0xf4b900(0x1f5),'selector':notificationSelector(_0x57884b[_0xf4b900(0x1f9)]),'before':projectNotificationConfig(_0x57884b[_0xf4b900(0x1f9)]),'after':null,'dryRun':!![],'backend':{'method':_0xf4b900(0x1e0),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0xf4b900(0x1df),'lookupCommand':_0x4931e0}},{'method':_0xf4b900(0x1e0),'url':DELETE_PATH});},async 'execute'(_0x3c213a){const _0x3defd4=a137_0x365e91;requireNotificationExplicitYes(_0x3c213a);const _0x47d152=await prepareDelete(_0x3c213a),_0x82f5a0=notificationLookupCommand(_0x3c213a[_0x3defd4(0x1fc)],_0x47d152['before'][_0x3defd4(0x1e5)]);let _0xac8a99=![];try{await deleteNotificationChannelConfig(_0x47d152['id'],_0x3c213a[_0x3defd4(0x1fc)]);}catch(_0x47e99f){if(!isPlatformTransportFailure(_0x47e99f))throw safeApiFailure(_0x3defd4(0x1f5),_0x3defd4(0x1e8),'Inspect\x20with\x20'+_0x82f5a0+_0x3defd4(0x1e3));_0xac8a99=!![];}let _0x3c68ba;try{_0x3c68ba=await listNotificationChannelConfigs(_0x3c213a['appCode'],_0x47d152['before'][_0x3defd4(0x1e5)]),validateNotificationDeleteReadback(_0x3c68ba,_0x3c213a['appCode'],_0x47d152['before'][_0x3defd4(0x1e5)]);}catch{throw notificationError(_0xac8a99?_0x3defd4(0x1eb):_0x3defd4(0x1f3),_0x3defd4(0x1fb)+_0x47d152['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x3defd4(0x1f1)+_0x82f5a0+_0x3defd4(0x1ed));}if(_0x3c68ba['some'](_0x3079c4=>_0x3079c4['id']===_0x47d152['id']))throw notificationError(_0xac8a99?'notification_config_delete_outcome_unknown':_0x3defd4(0x1fd),_0x3defd4(0x1fb)+_0x47d152['id']+_0x3defd4(0x1ec),_0x3defd4(0x1f1)+_0x82f5a0+';\x20do\x20not\x20resubmit\x20automatically.');const _0x13ed97=[REFERENCE_WARNING];return _0xac8a99&&_0x13ed97[_0x3defd4(0x1f2)](_0x3defd4(0x1f0)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x47d152[_0x3defd4(0x1f9)]),'before':projectNotificationConfig(_0x47d152[_0x3defd4(0x1f9)]),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x13ed97,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0xac8a99,'lookupCommand':_0x82f5a0}},'message':'Deleted\x20notification\x20config\x20'+_0x47d152['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a138_0x1478b1=a138_0x1170;(function(_0x5f4109,_0x384c3b){const _0x5aac3c=a138_0x1170,_0x51d35d=_0x5f4109();while(!![]){try{const _0x4fa5fb=-parseInt(_0x5aac3c(0x152))/0x1*(parseInt(_0x5aac3c(0x15c))/0x2)+-parseInt(_0x5aac3c(0x162))/0x3*(parseInt(_0x5aac3c(0x158))/0x4)+-parseInt(_0x5aac3c(0x161))/0x5*(parseInt(_0x5aac3c(0x166))/0x6)+-parseInt(_0x5aac3c(0x155))/0x7*(parseInt(_0x5aac3c(0x160))/0x8)+-parseInt(_0x5aac3c(0x168))/0x9*(-parseInt(_0x5aac3c(0x167))/0xa)+-parseInt(_0x5aac3c(0x156))/0xb*(-parseInt(_0x5aac3c(0x15a))/0xc)+parseInt(_0x5aac3c(0x157))/0xd;if(_0x4fa5fb===_0x384c3b)break;else _0x51d35d['push'](_0x51d35d['shift']());}catch(_0x2c0d55){_0x51d35d['push'](_0x51d35d['shift']());}}}(a138_0x27b1,0x4c04c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a138_0x1170(_0x461374,_0x47f7b4){_0x461374=_0x461374-0x152;const _0x27b176=a138_0x27b1();let _0x117007=_0x27b176[_0x461374];return _0x117007;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a138_0x27b1(){const _0x46fa67=['243OkYFhU','type','1927IYrYfr','read','notification','133QRxTUk','11dEwjsL','12234534GJfIRV','4KfGlcX','Found\x20','5138580UUEoOc','appCode','150WqDrEU','map','\x20notification\x20config(s)','Notification\x20channel\x20type','96816lLbiMh','5OGmyaE','1104051lZGbVW','string','EMAIL','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','1894668fCOfoH','110gbPJqS'];a138_0x27b1=function(){return _0x46fa67;};return a138_0x27b1();}export const notificationConfigList={'service':a138_0x1478b1(0x154),'command':'config-list','description':a138_0x1478b1(0x165),'risk':a138_0x1478b1(0x153),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a138_0x1478b1(0x169),'type':a138_0x1478b1(0x163),'description':a138_0x1478b1(0x15f),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a138_0x1478b1(0x164)}],async 'validate'(_0x3bfce2){readNotificationChannelType(_0x3bfce2);},async 'execute'(_0x802064){const _0x110272=a138_0x1478b1,_0x2747b2=readNotificationChannelType(_0x802064),_0xf3824a=await listNotificationChannelConfigs(_0x802064[_0x110272(0x15b)],_0x2747b2),_0x5e63ea=_0xf3824a[_0x110272(0x15d)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x802064[_0x110272(0x15b)],'channelType':_0x2747b2,'count':_0x5e63ea['length'],'configs':_0x5e63ea},'message':_0x110272(0x159)+_0x5e63ea['length']+'\x20'+_0x2747b2+_0x110272(0x15e)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a139_0x3ee437=a139_0x39b0;(function(_0x26e5ea,_0x590e5f){const _0x28db9a=a139_0x39b0,_0x2cd702=_0x26e5ea();while(!![]){try{const _0x517dad=-parseInt(_0x28db9a(0x1c3))/0x1*(parseInt(_0x28db9a(0x1b5))/0x2)+-parseInt(_0x28db9a(0x1d2))/0x3*(-parseInt(_0x28db9a(0x1b3))/0x4)+parseInt(_0x28db9a(0x1b9))/0x5*(parseInt(_0x28db9a(0x1b6))/0x6)+-parseInt(_0x28db9a(0x1bf))/0x7+parseInt(_0x28db9a(0x1cc))/0x8*(parseInt(_0x28db9a(0x1bb))/0x9)+-parseInt(_0x28db9a(0x1d1))/0xa*(-parseInt(_0x28db9a(0x1c7))/0xb)+parseInt(_0x28db9a(0x1c1))/0xc;if(_0x517dad===_0x590e5f)break;else _0x2cd702['push'](_0x2cd702['shift']());}catch(_0x1e6fb9){_0x2cd702['push'](_0x2cd702['shift']());}}}(a139_0x3a8a,0x8ddc7));import{asDryRunResult}from'../../commands/common/dry-run.js';function a139_0x3a8a(){const _0x319b3c=['4vKmZkj','planned','205622rMLTiY','36TkAJzw',';\x20do\x20not\x20resubmit\x20automatically.','\x20via\x20','653090nOVEFF','verified','126veyGCt','notification_config_update_verification_failed','patch','Inspect\x20with\x20--id\x20','3803240TZNtpp',';\x20no\x20automatic\x20retry\x20was\x20attempted.','3731760LIxLhh','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','11goFWWd','appCode','\x20with\x20','before','360107WHgTnL','notification_config_update_verification_unavailable','Notification\x20config\x20','payload','notification','27088YDBCaP','channelType','notification_config_update_outcome_unknown','POST','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','210iJhTeO','1277205beCtqi','/notification/channel-config/update','update','mutation','config-update','provesChange','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.'];a139_0x3a8a=function(){return _0x319b3c;};return a139_0x3a8a();}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a139_0x39b0(_0x11f447,_0x5a0cb2){_0x11f447=_0x11f447-0x1ae;const _0x3a8a6b=a139_0x3a8a();let _0x39b059=_0x3a8a6b[_0x11f447];return _0x39b059;}const UPDATE_PATH=a139_0x3ee437(0x1d3);async function prepareUpdate(_0x13609b){const _0x80d115=a139_0x3ee437,_0x53d8e6=readNotificationId(_0x13609b),_0x498c3d=await readNotificationDocument(_0x13609b,_0x80d115(0x1ae)),_0x4342e8=await requireExactNotificationConfig(_0x13609b[_0x80d115(0x1c4)],_0x53d8e6,_0x80d115(0x1ae));return{'id':_0x53d8e6,'patch':_0x498c3d,'before':_0x4342e8,'payload':mergeUpdateInput(_0x4342e8,_0x498c3d),'planned':plannedUpdateProjection(_0x4342e8,_0x498c3d)};}export const notificationConfigUpdate={'service':a139_0x3ee437(0x1cb),'command':a139_0x3ee437(0x1b0),'description':a139_0x3ee437(0x1d0),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x1dcf1e){readNotificationId(_0x1dcf1e),assertSingleNotificationSource(_0x1dcf1e),requireNotificationExplicitYes(_0x1dcf1e);},async 'dryRun'(_0x430ff3){const _0x144ddf=a139_0x3ee437,_0x1396e9=await prepareUpdate(_0x430ff3),_0x27d6b0=notificationLookupCommand(_0x430ff3[_0x144ddf(0x1c4)],_0x1396e9[_0x144ddf(0x1c6)][_0x144ddf(0x1cd)]);return asDryRunResult({'operation':_0x144ddf(0x1ae),'selector':notificationSelector(_0x1396e9[_0x144ddf(0x1c6)]),'before':projectNotificationConfig(_0x1396e9[_0x144ddf(0x1c6)]),'after':_0x1396e9[_0x144ddf(0x1b4)],'dryRun':!![],'backend':{'method':_0x144ddf(0x1cf),'path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x27d6b0}},{'method':_0x144ddf(0x1cf),'url':UPDATE_PATH});},async 'execute'(_0x56c211){const _0x31db6f=a139_0x3ee437;requireNotificationExplicitYes(_0x56c211);const _0x442de0=await prepareUpdate(_0x56c211),_0x210509=notificationLookupCommand(_0x56c211['appCode'],_0x442de0[_0x31db6f(0x1c6)][_0x31db6f(0x1cd)]);let _0x19f410=![];try{await updateNotificationChannelConfig(_0x442de0[_0x31db6f(0x1ca)]);}catch(_0x4b0a7b){if(!isPlatformTransportFailure(_0x4b0a7b))throw safeApiFailure('update',_0x31db6f(0x1af),'Inspect\x20ID\x20'+_0x442de0['id']+_0x31db6f(0x1c5)+_0x210509+_0x31db6f(0x1c0));_0x19f410=!![];}let _0x92b6c5;try{const _0x409b55=await getNotificationChannelConfig(_0x442de0['id'],_0x56c211['appCode']);_0x92b6c5=normalizeExactNotificationConfig(_0x409b55,_0x442de0['id'],_0x56c211[_0x31db6f(0x1c4)]);}catch{throw notificationError(_0x19f410?'notification_config_update_outcome_unknown':_0x31db6f(0x1c8),_0x31db6f(0x1c9)+_0x442de0['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x31db6f(0x1be)+_0x442de0['id']+_0x31db6f(0x1b8)+_0x210509+_0x31db6f(0x1b7));}const _0x1c19ef=requestedSafeFieldsMatch(_0x442de0[_0x31db6f(0x1c6)],_0x92b6c5,_0x442de0[_0x31db6f(0x1bd)]);if(!_0x1c19ef['allMatch']||_0x19f410&&!_0x1c19ef[_0x31db6f(0x1b1)])throw notificationError(_0x19f410?_0x31db6f(0x1ce):_0x31db6f(0x1bc),'Notification\x20config\x20'+_0x442de0['id']+_0x31db6f(0x1c2),_0x31db6f(0x1be)+_0x442de0['id']+_0x31db6f(0x1b8)+_0x210509+';\x20do\x20not\x20resubmit\x20automatically.');const _0xd91b7c=_0x19f410?[_0x31db6f(0x1b2)]:[];return{'ok':!![],'data':{'operation':_0x31db6f(0x1ae),'selector':notificationSelector(_0x92b6c5),'before':projectNotificationConfig(_0x442de0[_0x31db6f(0x1c6)]),'after':projectNotificationConfig(_0x92b6c5),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0xd91b7c,'verification':{'status':_0x31db6f(0x1ba),'recoveredAfterUnknownResponse':_0x19f410,'verifiedFields':_0x1c19ef['verifiedFields'],'lookupCommand':_0x210509}},'message':'Updated\x20notification\x20config\x20'+_0x92b6c5['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xf8f3b9,_0x25af3f){const _0x38cf30=a140_0x161c,_0x27a10e=_0xf8f3b9();while(!![]){try{const _0x108eb8=-parseInt(_0x38cf30(0x10e))/0x1+parseInt(_0x38cf30(0x111))/0x2*(-parseInt(_0x38cf30(0x115))/0x3)+parseInt(_0x38cf30(0x110))/0x4+parseInt(_0x38cf30(0x113))/0x5*(-parseInt(_0x38cf30(0x10d))/0x6)+parseInt(_0x38cf30(0x10f))/0x7*(-parseInt(_0x38cf30(0x112))/0x8)+-parseInt(_0x38cf30(0x116))/0x9+-parseInt(_0x38cf30(0x117))/0xa*(-parseInt(_0x38cf30(0x114))/0xb);if(_0x108eb8===_0x25af3f)break;else _0x27a10e['push'](_0x27a10e['shift']());}catch(_0x49be49){_0x27a10e['push'](_0x27a10e['shift']());}}}(a140_0x36a3,0x412fb));import{notificationConfigList}from'../../commands/notification/config-list.js';function a140_0x36a3(){const _0x4959e5=['1065520mHZYoX','24424FgkapT','104jRirbW','213145MFbYxa','573441ocUKAl','6KSpMij','289872THuHga','90DbZoth','18aPXUuS','61906sbdsUW','119609aqcAqW'];a140_0x36a3=function(){return _0x4959e5;};return a140_0x36a3();}import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a140_0x161c(_0x3c17dd,_0x14f00f){_0x3c17dd=_0x3c17dd-0x10d;const _0x36a3a8=a140_0x36a3();let _0x161c69=_0x36a3a8[_0x3c17dd];return _0x161c69;}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a141_0x56e1dc=a141_0xb74d;(function(_0x2ce96e,_0x3134fc){const _0x553483=a141_0xb74d,_0x4e005e=_0x2ce96e();while(!![]){try{const _0x4d0bfb=parseInt(_0x553483(0x14b))/0x1*(-parseInt(_0x553483(0x12b))/0x2)+-parseInt(_0x553483(0x122))/0x3+parseInt(_0x553483(0x125))/0x4+parseInt(_0x553483(0x14c))/0x5+parseInt(_0x553483(0x103))/0x6+-parseInt(_0x553483(0x107))/0x7*(parseInt(_0x553483(0xe0))/0x8)+parseInt(_0x553483(0x11a))/0x9;if(_0x4d0bfb===_0x3134fc)break;else _0x4e005e['push'](_0x4e005e['shift']());}catch(_0x501266){_0x4e005e['push'](_0x4e005e['shift']());}}}(a141_0x6eba,0x74b82));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a141_0x56e1dc(0xf2),a141_0x56e1dc(0x119),a141_0x56e1dc(0xf6),a141_0x56e1dc(0x110),a141_0x56e1dc(0x134)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType',a141_0x56e1dc(0x152),'channelConfig',a141_0x56e1dc(0x157),a141_0x56e1dc(0xf3),a141_0x56e1dc(0xec)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a141_0x56e1dc(0x105),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a141_0x56e1dc(0x11f),a141_0x56e1dc(0x10d),a141_0x56e1dc(0x138),a141_0x56e1dc(0x140),a141_0x56e1dc(0xdd),'subjectPrefix','fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a141_0x56e1dc(0xfb),'type':a141_0x56e1dc(0x115),'required':![],'description':a141_0x56e1dc(0xf7)},{'name':a141_0x56e1dc(0x109),'type':a141_0x56e1dc(0x104),'required':![],'default':![],'description':a141_0x56e1dc(0x142)},{'name':a141_0x56e1dc(0x156),'type':a141_0x56e1dc(0x115),'required':![],'description':a141_0x56e1dc(0x135)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a141_0x56e1dc(0x129)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x1ead4b,_0xfa0cf7,_0x88fc0c){return new CliError(_0x1ead4b,0x1,_0xfa0cf7,_0x88fc0c);}export function readNotificationId(_0x64892){const _0x4552dd=a141_0x56e1dc,_0x473d71=_0x64892[_0x4552dd(0x112)]('id');if(!Number['isSafeInteger'](_0x473d71)||_0x473d71<=0x0)throw notificationError(_0x4552dd(0xeb),_0x4552dd(0x11e));return _0x473d71;}export function requireNotificationExplicitYes(_0x42ea01){const _0x4ab63d=a141_0x56e1dc;if(_0x42ea01[_0x4ab63d(0xe8)](_0x4ab63d(0x121))||_0x42ea01[_0x4ab63d(0xe8)](_0x4ab63d(0x143)))return;throw notificationError(_0x4ab63d(0xde),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x4ab63d(0x10c));}export function readNotificationChannelType(_0x51ed67,_0x1079f4='type',_0x344ea8=a141_0x56e1dc(0xf2)){const _0x37923f=a141_0x56e1dc,_0x5deabe=_0x51ed67['str'](_0x1079f4)['trim']()||_0x344ea8;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5deabe))throw CliErrors[_0x37923f(0x159)](_0x37923f(0x13a)+_0x1079f4+':\x20'+_0x5deabe,_0x37923f(0x113)+NOTIFICATION_CHANNEL_TYPES[_0x37923f(0x14f)](',\x20')+'.');return _0x5deabe;}export function assertSingleNotificationSource(_0x2fde07){const _0x5017f4=a141_0x56e1dc,_0x4fb726=[],_0x26da94=_0x2fde07[_0x5017f4(0x100)](_0x5017f4(0xfb))['trim']();if(_0x26da94)_0x4fb726[_0x5017f4(0x137)]({'kind':_0x5017f4(0xfb),'path':_0x26da94});if(_0x2fde07[_0x5017f4(0xe8)](_0x5017f4(0x109)))_0x4fb726[_0x5017f4(0x137)]({'kind':_0x5017f4(0x109)});const _0x28f219=_0x2fde07[_0x5017f4(0x100)](_0x5017f4(0x156))[_0x5017f4(0x120)]();if(_0x28f219)_0x4fb726[_0x5017f4(0x137)]({'kind':_0x5017f4(0x108),'name':_0x28f219});if(_0x4fb726[_0x5017f4(0xef)]===0x0)throw CliErrors[_0x5017f4(0x159)](_0x5017f4(0xe5),_0x5017f4(0x154));if(_0x4fb726[_0x5017f4(0xef)]>0x1)throw CliErrors[_0x5017f4(0x159)](_0x5017f4(0x123),_0x5017f4(0x154));return _0x4fb726[0x0];}export async function readNotificationDocument(_0x3d73c9,_0x5c7f7c){const _0x476ca9=a141_0x56e1dc,_0x15f605=assertSingleNotificationSource(_0x3d73c9),_0x176f75=_0x15f605['kind']==='file'?_0x476ca9(0xf0)+_0x15f605[_0x476ca9(0x133)]:_0x15f605[_0x476ca9(0x139)]===_0x476ca9(0x108)?_0x476ca9(0xf1)+_0x15f605['name']:'stdin';let _0xf92630;try{if(_0x15f605[_0x476ca9(0x139)]===_0x476ca9(0xfb))_0xf92630=await readFile(_0x15f605[_0x476ca9(0x133)],_0x476ca9(0x11c));else{if(_0x15f605['kind']===_0x476ca9(0x108)){if(!(_0x15f605[_0x476ca9(0x12e)]in process.env))throw notificationError(_0x476ca9(0x144),_0x476ca9(0x13e)+_0x15f605[_0x476ca9(0x12e)]);_0xf92630=process.env[_0x15f605.name]??'';}else _0xf92630=await readStdin();}}catch(_0x329e05){if(_0x329e05 instanceof CliError)throw _0x329e05;throw notificationError(_0x476ca9(0x144),_0x476ca9(0xfd)+_0x176f75+'.');}let _0x4b466c;try{_0x4b466c=JSON[_0x476ca9(0x15c)](_0xf92630);}catch{throw notificationError(_0x476ca9(0x13c),'Notification\x20JSON\x20from\x20'+_0x176f75+_0x476ca9(0x12d),_0x476ca9(0x15a));}if(!isJsonObject(_0x4b466c))throw notificationError(_0x476ca9(0x13c),_0x476ca9(0x12f)+_0x176f75+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x4b466c,_0x5c7f7c);}export function projectNotificationListConfig(_0x32071b,_0x5071e7){const _0xdf8045=a141_0x56e1dc;return{'id':typeof _0x32071b['id']===_0xdf8045(0x155)?_0x32071b['id']:null,'configCode':requireResponseString(_0x32071b[_0xdf8045(0x105)],_0xdf8045(0x105),_0x5071e7),'configName':requireResponseString(_0x32071b[_0xdf8045(0xfe)],_0xdf8045(0xfe),_0x5071e7),'channelType':requireResponseString(_0x32071b[_0xdf8045(0x132)],_0xdf8045(0x132),_0x5071e7),'description':normalizeNullableString(_0x32071b[_0xdf8045(0x157)]),'createTime':normalizeNullableString(_0x32071b[_0xdf8045(0x102)]),'updateTime':normalizeNullableString(_0x32071b[_0xdf8045(0x13f)])};}export function normalizeExactNotificationConfig(_0x468a0,_0x5f394e,_0x1dd539){const _0x21d222=a141_0x56e1dc;if(!Number[_0x21d222(0xe6)](_0x468a0['id'])||_0x468a0['id']!==_0x5f394e)throw notificationError(_0x21d222(0x13d),_0x21d222(0x148)+_0x5f394e+'.');if(_0x468a0['appCode']!==_0x1dd539)throw notificationError(_0x21d222(0x13d),_0x21d222(0xdf)+_0x5f394e+_0x21d222(0x151));const _0x3d811b=requireExactString(_0x468a0[_0x21d222(0xfe)],_0x21d222(0xfe),_0x5f394e),_0x17b2f4=requireExactString(_0x468a0['configCode'],_0x21d222(0x105),_0x5f394e),_0x4d9825=requireExactString(_0x468a0[_0x21d222(0x132)],_0x21d222(0x132),_0x5f394e);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x4d9825))throw notificationError(_0x21d222(0x13d),_0x21d222(0xdf)+_0x5f394e+_0x21d222(0xe3));const _0x4e4ee1=responseNullableString(_0x468a0[_0x21d222(0x152)],'endpointUrl',_0x5f394e),_0x4a417c=responseNullableString(_0x468a0['channelConfig'],_0x21d222(0x149),_0x5f394e),_0x21609f=responseNullableString(_0x468a0[_0x21d222(0x157)],_0x21d222(0x157),_0x5f394e),_0x2277c0=responseNullableTimeout(_0x468a0[_0x21d222(0xf3)],_0x21d222(0xf3),_0x5f394e),_0x196ee5=responseNullableTimeout(_0x468a0[_0x21d222(0xec)],_0x21d222(0xec),_0x5f394e);return{'id':_0x5f394e,'appCode':_0x1dd539,'configCode':_0x17b2f4,'configName':_0x3d811b,'channelType':_0x4d9825,'endpointUrl':redactSensitive(_0x4e4ee1),'channelConfig':redactSensitive(_0x4a417c),'description':_0x21609f,'connectTimeout':_0x2277c0,'readTimeout':_0x196ee5,'endpointUrlRaw':_0x4e4ee1,'channelConfigRaw':_0x4a417c};}export async function requireExactNotificationConfig(_0x1c315c,_0x1c0f11,_0x59ec35){const _0x22dbac=a141_0x56e1dc;let _0x176d25;try{_0x176d25=await getNotificationChannelConfig(_0x1c0f11,_0x1c315c);}catch{throw safeApiFailure(_0x59ec35,_0x22dbac(0xf9),_0x22dbac(0x124)+_0x1c315c+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x176d25,_0x1c0f11,_0x1c315c);}export function projectNotificationConfig(_0x1d7d9c){const _0x103137=a141_0x56e1dc;return{'id':_0x1d7d9c['id']??null,'appCode':_0x1d7d9c['appCode'],'configCode':_0x1d7d9c['configCode']??null,'configName':_0x1d7d9c['configName'],'channelType':_0x1d7d9c[_0x103137(0x132)],'endpointUrl':redactSensitive(_0x1d7d9c['endpointUrl']),'channelConfig':redactSensitive(_0x1d7d9c['channelConfig']),'description':_0x1d7d9c[_0x103137(0x157)]??null,'connectTimeout':_0x1d7d9c['connectTimeout']??null,'readTimeout':_0x1d7d9c[_0x103137(0xec)]??null};}export function notificationSelector(_0x80d774){const _0x2f9f61=a141_0x56e1dc;return{'appCode':_0x80d774[_0x2f9f61(0x12a)],'id':_0x80d774['id'],'configCode':_0x80d774[_0x2f9f61(0x105)],'configName':_0x80d774['configName'],'channelType':_0x80d774[_0x2f9f61(0x132)]};}export function createMutationInput(_0x2a7d4d,_0xae0687){const _0x14a437=a141_0x56e1dc;return{'appCode':_0x2a7d4d,'configName':_0xae0687['configName'],'channelType':_0xae0687['channelType'],...hasOwn(_0xae0687,_0x14a437(0x152))?{'endpointUrl':_0xae0687[_0x14a437(0x152)]}:{},...hasOwn(_0xae0687,'channelConfig')?{'channelConfig':serializeChannelConfig(_0xae0687[_0x14a437(0x149)])}:{},...hasOwn(_0xae0687,_0x14a437(0x157))?{'description':_0xae0687['description']}:{},...hasOwn(_0xae0687,'connectTimeout')?{'connectTimeout':_0xae0687[_0x14a437(0xf3)]}:{},...hasOwn(_0xae0687,_0x14a437(0xec))?{'readTimeout':_0xae0687['readTimeout']}:{}};}export function mergeUpdateInput(_0x26e704,_0x1a1dff){const _0x535e00=a141_0x56e1dc;return{'id':_0x26e704['id'],'appCode':_0x26e704[_0x535e00(0x12a)],'configName':_0x1a1dff[_0x535e00(0xfe)]??_0x26e704[_0x535e00(0xfe)],'channelType':_0x1a1dff[_0x535e00(0x132)]??_0x26e704[_0x535e00(0x132)],'endpointUrl':hasOwn(_0x1a1dff,_0x535e00(0x152))?_0x1a1dff['endpointUrl']:_0x26e704['endpointUrlRaw'],'channelConfig':hasOwn(_0x1a1dff,_0x535e00(0x149))?serializeChannelConfig(_0x1a1dff[_0x535e00(0x149)]):_0x26e704[_0x535e00(0xfc)],'description':hasOwn(_0x1a1dff,_0x535e00(0x157))?_0x1a1dff[_0x535e00(0x157)]:_0x26e704[_0x535e00(0x157)],'connectTimeout':hasOwn(_0x1a1dff,'connectTimeout')?_0x1a1dff['connectTimeout']:_0x26e704[_0x535e00(0xf3)],'readTimeout':hasOwn(_0x1a1dff,'readTimeout')?_0x1a1dff[_0x535e00(0xec)]:_0x26e704[_0x535e00(0xec)]};}export function plannedUpdateProjection(_0x40fa81,_0x316c47){const _0x188603=a141_0x56e1dc;return projectNotificationConfig({'id':_0x40fa81['id'],'appCode':_0x40fa81['appCode'],'configCode':_0x40fa81[_0x188603(0x105)],'configName':_0x316c47[_0x188603(0xfe)]??_0x40fa81[_0x188603(0xfe)],'channelType':_0x316c47[_0x188603(0x132)]??_0x40fa81[_0x188603(0x132)],'endpointUrl':hasOwn(_0x316c47,_0x188603(0x152))?_0x316c47[_0x188603(0x152)]:_0x40fa81[_0x188603(0xf4)],'channelConfig':hasOwn(_0x316c47,_0x188603(0x149))?_0x316c47[_0x188603(0x149)]:_0x40fa81['channelConfigRaw'],'description':hasOwn(_0x316c47,_0x188603(0x157))?_0x316c47['description']:_0x40fa81[_0x188603(0x157)],'connectTimeout':hasOwn(_0x316c47,_0x188603(0xf3))?_0x316c47[_0x188603(0xf3)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x40fa81[_0x188603(0xf3)],'readTimeout':hasOwn(_0x316c47,_0x188603(0xec))?_0x316c47[_0x188603(0xec)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x40fa81['readTimeout']});}export function requestedSafeFieldsMatch(_0x3b5810,_0xd0dd27,_0x33460a){const _0x233281=a141_0x56e1dc,_0x25cca6=[],_0x51ac45=[],_0x4e28ff=[];for(const _0x5d9633 of[_0x233281(0xfe),_0x233281(0x132),_0x233281(0x157)]){if(!hasOwn(_0x33460a,_0x5d9633))continue;_0x4e28ff['push'](_0x5d9633),_0x25cca6[_0x233281(0x137)](_0xd0dd27[_0x5d9633]===_0x33460a[_0x5d9633]),_0x51ac45[_0x233281(0x137)](_0x3b5810[_0x5d9633]!==_0x33460a[_0x5d9633]&&_0xd0dd27[_0x5d9633]===_0x33460a[_0x5d9633]);}for(const _0x2437a of[_0x233281(0xf3),'readTimeout']){if(!hasOwn(_0x33460a,_0x2437a))continue;const _0xae6e44=_0x33460a[_0x2437a]??(_0x2437a===_0x233281(0xf3)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x4e28ff[_0x233281(0x137)](_0x2437a),_0x25cca6['push'](_0xd0dd27[_0x2437a]===_0xae6e44),_0x51ac45['push'](_0x3b5810[_0x2437a]!==_0xae6e44&&_0xd0dd27[_0x2437a]===_0xae6e44);}return hasOwn(_0x33460a,_0x233281(0x152))&&_0x33460a[_0x233281(0x152)]===null&&(_0x4e28ff[_0x233281(0x137)](_0x233281(0x146)),_0x25cca6[_0x233281(0x137)](_0xd0dd27['endpointUrlRaw']===null||_0xd0dd27['endpointUrlRaw']===''),_0x51ac45[_0x233281(0x137)](_0x3b5810[_0x233281(0xf4)]!==null&&_0x3b5810[_0x233281(0xf4)]!==''&&(_0xd0dd27[_0x233281(0xf4)]===null||_0xd0dd27[_0x233281(0xf4)]===''))),{'allMatch':_0x25cca6['every'](Boolean),'provesChange':_0x51ac45['some'](Boolean),'verifiedFields':_0x4e28ff};}export function validateNotificationDeleteReadback(_0x1aaee8,_0x5367d7,_0x52ee9b){const _0xc118f0=a141_0x56e1dc;for(const [_0x51452b,_0x130cf6]of _0x1aaee8[_0xc118f0(0x15d)]()){if(!Number[_0xc118f0(0xe6)](_0x130cf6['id'])||_0x130cf6['id']<=0x0)throw notificationError(_0xc118f0(0x13d),_0xc118f0(0xf5)+(_0x51452b+0x1)+_0xc118f0(0xe2));if(_0x130cf6[_0xc118f0(0x12a)]!==_0x5367d7)throw notificationError(_0xc118f0(0x13d),'Notification\x20config\x20list\x20item\x20'+(_0x51452b+0x1)+_0xc118f0(0x101));if(_0x130cf6[_0xc118f0(0x132)]!==_0x52ee9b)throw notificationError(_0xc118f0(0x13d),'Notification\x20config\x20list\x20item\x20'+(_0x51452b+0x1)+_0xc118f0(0xff));}}export function safeApiFailure(_0x2fd01a,_0x4d1991,_0x337e8f){const _0x41f672=a141_0x56e1dc;return notificationError(_0x41f672(0xfa)+_0x2fd01a+'_'+(_0x4d1991===_0x41f672(0xe4)?_0x41f672(0x153):_0x4d1991+_0x41f672(0x10b)),_0x41f672(0xdf)+_0x2fd01a+'\x20'+_0x4d1991+'\x20failed.',_0x337e8f);}export function notificationLookupCommand(_0x36ad63,_0x36f1a3){const _0xcbcd2c=a141_0x56e1dc;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x36ad63+_0xcbcd2c(0x14d)+_0x36f1a3+_0xcbcd2c(0x130);}function validateNotificationDocument(_0x1297f4,_0x3035e5){const _0x33be91=a141_0x56e1dc;for(const _0x330289 of Object[_0x33be91(0x15f)](_0x1297f4)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x330289))throw notificationError(_0x33be91(0x158),'Notification\x20JSON\x20field\x20\x22'+_0x330289+_0x33be91(0x145));if(!ALLOWED_INPUT_FIELDS[_0x33be91(0x116)](_0x330289))throw notificationError(_0x33be91(0x15e),_0x33be91(0x10e)+_0x330289+'\x22.');}if(_0x3035e5===_0x33be91(0x111)&&Object['keys'](_0x1297f4)[_0x33be91(0xef)]===0x0)throw notificationError(_0x33be91(0x14a),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x4b209d={};if(hasOwn(_0x1297f4,'configName'))_0x4b209d['configName']=validateRequiredString(_0x1297f4[_0x33be91(0xfe)],'configName',0x80);else{if(_0x3035e5===_0x33be91(0x131))throw notificationError('notification_config_field_required',_0x33be91(0x12c)+_0x33be91(0x136));}if(hasOwn(_0x1297f4,'channelType')){if(typeof _0x1297f4[_0x33be91(0x132)]!==_0x33be91(0x115))throw invalidFieldType('channelType',_0x33be91(0x127));const _0x18ae4a=_0x1297f4[_0x33be91(0x132)][_0x33be91(0x120)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x33be91(0x10a)](_0x18ae4a))throw notificationError(_0x33be91(0x11d),_0x33be91(0x10f),_0x33be91(0x113)+NOTIFICATION_CHANNEL_TYPES[_0x33be91(0x14f)](',\x20')+'.');_0x4b209d['channelType']=_0x18ae4a;}else{if(_0x3035e5===_0x33be91(0x131))throw notificationError('notification_config_field_required','Create\x20JSON\x20requires\x20field\x20'+'\x22channelType\x22.');}for(const [_0x5a7d89,_0x3b24fe]of[[_0x33be91(0x152),0x200],[_0x33be91(0x157),0x100]]){if(!hasOwn(_0x1297f4,_0x5a7d89))continue;const _0x17cfcb=_0x1297f4[_0x5a7d89];if(_0x17cfcb!==null&&typeof _0x17cfcb!==_0x33be91(0x115))throw invalidFieldType(_0x5a7d89,_0x33be91(0x114));if(typeof _0x17cfcb===_0x33be91(0x115)&&_0x17cfcb['length']>_0x3b24fe)throw notificationError(_0x33be91(0x11d),'Notification\x20JSON\x20field\x20\x22'+_0x5a7d89+_0x33be91(0xe9)+_0x3b24fe+_0x33be91(0x126));_0x4b209d[_0x5a7d89]=_0x17cfcb;}if(hasOwn(_0x1297f4,_0x33be91(0x149))){const _0x496246=_0x1297f4[_0x33be91(0x149)];if(_0x496246===null&&_0x3035e5===_0x33be91(0x131))throw invalidFieldType(_0x33be91(0x149),_0x33be91(0x15b));if(_0x496246!==null&&!isJsonObject(_0x496246))throw invalidFieldType(_0x33be91(0x149),_0x3035e5==='update'?_0x33be91(0x147):_0x33be91(0x15b));_0x496246!==null&&validateChannelConfigFields(_0x4b209d[_0x33be91(0x132)],_0x496246),_0x4b209d[_0x33be91(0x149)]=_0x496246;}for(const _0x39f86e of['connectTimeout',_0x33be91(0xec)]){if(!hasOwn(_0x1297f4,_0x39f86e))continue;const _0x4a7596=_0x1297f4[_0x39f86e];if(_0x4a7596!==null&&(!Number[_0x33be91(0xe6)](_0x4a7596)||_0x4a7596<0x0))throw notificationError('notification_config_field_invalid',_0x33be91(0xf8)+_0x39f86e+_0x33be91(0x117));_0x4b209d[_0x39f86e]=_0x4a7596;}return _0x4b209d;}function a141_0x6eba(){const _0x3fe126=['environment\x20variable\x20','EMAIL','connectTimeout','endpointUrlRaw','Notification\x20config\x20list\x20item\x20','DINGTALK','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Notification\x20JSON\x20field\x20\x22','preflight','notification_config_','file','channelConfigRaw','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','configName','\x20has\x20an\x20invalid\x20channelType.','str','\x20has\x20an\x20invalid\x20appCode.','createTime','2397870NpFdMF','boolean','configCode','<redacted>','10983fUFIcm','env','stdin','includes','_unavailable','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','recipients','Unknown\x20notification\x20JSON\x20field\x20\x22','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','WECOM','update','num','Allowed\x20values:\x20','a\x20string\x20or\x20null','string','has','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','Invalid\x20notification\x20config\x20response.','FEISHU','8292690RbkdPF','call','utf8','notification_config_field_invalid','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','emailTargets','trim','dry-run','1793103OlJxtF','Notification\x20JSON\x20source\x20is\x20ambiguous.','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','1070752cuSRkL','\x20characters.','a\x20supported\x20string','\x20has\x20invalid\x20field\x20\x22','Application-level\x20notification\x20config\x20ID','appCode','118418pgzxvw','Create\x20JSON\x20requires\x20field\x20','\x20is\x20invalid.','name','Notification\x20JSON\x20from\x20','\x20--format\x20compress','create','channelType','path','WEBHOOK','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','\x22configName\x22.','push','ccList','kind','Invalid\x20--','setEncoding','notification_config_json_invalid','notification_config_response_invalid','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','updateTime','bccList','\x20is\x20missing\x20required\x20field\x20\x22','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','yes','notification_config_source_unavailable','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','endpointUrl:null','a\x20JSON\x20object\x20or\x20null','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','channelConfig','notification_config_update_empty','7AzQYSQ','3830110ZJTxUz','\x20--type\x20','stringify','join','prototype','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','endpointUrl','failed','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','number','from-env','description','notification_config_field_forbidden','validation','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','a\x20JSON\x20object','parse','entries','notification_config_field_unknown','keys','Notification\x20JSON\x20channelConfig\x20field\x20\x22','replyTo','notification_config_confirmation_required','Notification\x20config\x20','4408KSIBLQ','apiError','\x20has\x20an\x20invalid\x20id.','\x20has\x20an\x20unsupported\x20channelType.','mutation','Missing\x20notification\x20JSON\x20source.','isSafeInteger','hasOwnProperty','bool','\x22\x20cannot\x20exceed\x20','\x22\x20is\x20forbidden.','notification_config_id_invalid','readTimeout','messageTemplate','object','length','file\x20'];a141_0x6eba=function(){return _0x3fe126;};return a141_0x6eba();}function validateRequiredString(_0x364199,_0x1e9c85,_0x2e8321){const _0x2ca095=a141_0x56e1dc;if(typeof _0x364199!=='string')throw invalidFieldType(_0x1e9c85,'a\x20non-empty\x20string');const _0x2165c4=_0x364199[_0x2ca095(0x120)]();if(!_0x2165c4)throw notificationError(_0x2ca095(0x11d),_0x2ca095(0xf8)+_0x1e9c85+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x2165c4[_0x2ca095(0xef)]>_0x2e8321)throw notificationError('notification_config_field_invalid',_0x2ca095(0xf8)+_0x1e9c85+'\x22\x20cannot\x20exceed\x20'+_0x2e8321+_0x2ca095(0x126));return _0x2165c4;}function validateChannelConfigFields(_0x17deca,_0x58e929){const _0x437fe8=a141_0x56e1dc;if(hasOwn(_0x58e929,'messageTemplate'))throw forbiddenChannelConfigField(_0x437fe8(0xed));if(_0x17deca===_0x437fe8(0xf2))for(const _0x355b68 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x58e929,_0x355b68))throw forbiddenChannelConfigField(_0x355b68);}}function forbiddenChannelConfigField(_0x2681e3){const _0x477c9a=a141_0x56e1dc;return notificationError('notification_config_channel_field_forbidden',_0x477c9a(0xdc)+_0x2681e3+_0x477c9a(0xea));}function invalidFieldType(_0x287207,_0x30ee41){const _0x4ac787=a141_0x56e1dc;return notificationError(_0x4ac787(0x11d),_0x4ac787(0xf8)+_0x287207+'\x22\x20must\x20be\x20'+_0x30ee41+'.');}function serializeChannelConfig(_0x58dfcd){const _0x19c078=a141_0x56e1dc;return _0x58dfcd===null||_0x58dfcd===undefined?null:JSON[_0x19c078(0x14e)](_0x58dfcd);}function redactSensitive(_0xaede08){const _0x269c18=a141_0x56e1dc;return _0xaede08===null||_0xaede08===undefined||_0xaede08===''?null:_0x269c18(0x106);}function requireResponseString(_0x46fe80,_0x5e7e44,_0x209209){const _0x10630b=a141_0x56e1dc;if(typeof _0x46fe80!==_0x10630b(0x115)||_0x46fe80[_0x10630b(0x120)]()==='')throw CliErrors[_0x10630b(0xe1)](_0x10630b(0x118),'Item\x20'+(_0x209209+0x1)+_0x10630b(0x141)+_0x5e7e44+'\x22.');return _0x46fe80[_0x10630b(0x120)]();}function requireExactString(_0x1ec96b,_0x224374,_0x1f1619){const _0x406067=a141_0x56e1dc;if(typeof _0x1ec96b!==_0x406067(0x115)||_0x1ec96b['trim']()==='')throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x1f1619+_0x406067(0x141)+_0x224374+'\x22.');return _0x1ec96b['trim']();}function responseNullableString(_0x358915,_0x1056b2,_0x5dd6f8){const _0x270100=a141_0x56e1dc;if(_0x358915===undefined||_0x358915===null)return null;if(typeof _0x358915!==_0x270100(0x115))throw notificationError('notification_config_response_invalid',_0x270100(0xdf)+_0x5dd6f8+_0x270100(0x128)+_0x1056b2+'\x22.');return _0x358915;}function a141_0xb74d(_0x21e65a,_0xca09d7){_0x21e65a=_0x21e65a-0xdc;const _0x6eba94=a141_0x6eba();let _0xb74d85=_0x6eba94[_0x21e65a];return _0xb74d85;}function responseNullableTimeout(_0x33369a,_0x309a80,_0x164115){const _0x252bf4=a141_0x56e1dc;if(_0x33369a===undefined||_0x33369a===null)return null;if(!Number[_0x252bf4(0xe6)](_0x33369a)||_0x33369a<0x0)throw notificationError(_0x252bf4(0x13d),_0x252bf4(0xdf)+_0x164115+_0x252bf4(0x128)+_0x309a80+'\x22.');return _0x33369a;}function normalizeNullableString(_0x4f96a5){return typeof _0x4f96a5==='string'?_0x4f96a5:null;}function isJsonObject(_0x18067c){const _0x20d78e=a141_0x56e1dc;return _0x18067c!==null&&typeof _0x18067c===_0x20d78e(0xee)&&!Array['isArray'](_0x18067c);}function hasOwn(_0x1879ee,_0x589195){const _0x2ee319=a141_0x56e1dc;return Object[_0x2ee319(0x150)][_0x2ee319(0xe7)][_0x2ee319(0x11b)](_0x1879ee,_0x589195);}async function readStdin(){const _0x22bc89=a141_0x56e1dc;let _0x3cd5da='';process[_0x22bc89(0x109)][_0x22bc89(0x13b)](_0x22bc89(0x11c));for await(const _0x54c1a8 of process[_0x22bc89(0x109)])_0x3cd5da+=_0x54c1a8;return _0x3cd5da;}
|
|
1
|
+
const a141_0x2ec41a=a141_0x60d2;(function(_0x2c9445,_0x294431){const _0x32759f=a141_0x60d2,_0x308a3d=_0x2c9445();while(!![]){try{const _0x301a40=-parseInt(_0x32759f(0x1e0))/0x1*(parseInt(_0x32759f(0x1db))/0x2)+-parseInt(_0x32759f(0x1ce))/0x3*(-parseInt(_0x32759f(0x177))/0x4)+parseInt(_0x32759f(0x1df))/0x5+-parseInt(_0x32759f(0x1f6))/0x6+parseInt(_0x32759f(0x189))/0x7*(-parseInt(_0x32759f(0x182))/0x8)+parseInt(_0x32759f(0x1de))/0x9*(parseInt(_0x32759f(0x1dd))/0xa)+parseInt(_0x32759f(0x1c9))/0xb;if(_0x301a40===_0x294431)break;else _0x308a3d['push'](_0x308a3d['shift']());}catch(_0x466436){_0x308a3d['push'](_0x308a3d['shift']());}}}(a141_0x28f2,0x82d55));function a141_0x60d2(_0x13ab10,_0x4d8864){_0x13ab10=_0x13ab10-0x174;const _0x28f215=a141_0x28f2();let _0x60d2ef=_0x28f215[_0x13ab10];return _0x60d2ef;}import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a141_0x2ec41a(0x1f5),a141_0x2ec41a(0x174),a141_0x2ec41a(0x187),'WECOM',a141_0x2ec41a(0x1d2)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a141_0x2ec41a(0x1c0),a141_0x2ec41a(0x1e2),a141_0x2ec41a(0x1ec),'channelConfig',a141_0x2ec41a(0x1cf),'connectTimeout',a141_0x2ec41a(0x1ca)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a141_0x2ec41a(0x17d),'configCode',a141_0x2ec41a(0x1e4)]),EMAIL_RECIPIENT_FIELDS=new Set([a141_0x2ec41a(0x18a),'recipients',a141_0x2ec41a(0x1ad),'bccList','replyTo','subjectPrefix',a141_0x2ec41a(0x1d1),'to','cc']);function a141_0x28f2(){const _0x4cf545=['Allowed\x20values:\x20','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','length','configName','kind','Unknown\x20notification\x20JSON\x20field\x20\x22','endpointUrlRaw','\x20has\x20an\x20unsupported\x20channelType.','Notification\x20config\x20list\x20item\x20','updateTime','a\x20JSON\x20object\x20or\x20null','\x22configName\x22.','12898820xWmcDh','readTimeout','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','endpointUrl:null','\x20has\x20an\x20invalid\x20id.','2933697cGHkKU','description','createTime','fromName','WEBHOOK','Item\x20','join','notification_config_field_unknown','stdin','includes','notification_config_field_invalid','has','utf8','86jbeZib','Missing\x20notification\x20JSON\x20source.','30380pFWoeA','216FctAdP','255680eeeabT','13242LzpSgl','str','channelType','a\x20string\x20or\x20null','channelCode','notification_config_','\x20characters.','trim','notification_config_update_empty','keys','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','push','endpointUrl','\x20has\x20invalid\x20field\x20\x22','environment\x20variable\x20','validation','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','_unavailable','Invalid\x20notification\x20config\x20response.','\x22channelType\x22.','notification_config_json_invalid','EMAIL','3781374UjCDLW','bool','\x20is\x20missing\x20required\x20field\x20\x22','FEISHU','configCode','rabetbase\x20notification\x20config-list\x20--appcode\x20','4ftLezl','\x20--format\x20compress','Create\x20JSON\x20requires\x20field\x20','\x20must\x20be\x20an\x20object.','isSafeInteger','call','appCode','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','from-env','channelConfig','apiError','8sOtAdL','string','num','channelConfigRaw','hasOwnProperty','DINGTALK','\x22\x20cannot\x20exceed\x20','3773273rBXosg','emailTargets','some','env','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','boolean','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','a\x20supported\x20string','name','\x20failed.','messageTemplate','Invalid\x20--','update','Notification\x20JSON\x20field\x20\x22','yes','\x20has\x20an\x20invalid\x20channelType.','notification_config_channel_field_forbidden','create','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','file','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','a\x20JSON\x20object','notification_config_id_invalid','type','\x22\x20is\x20forbidden.','connectTimeout','Application-level\x20notification\x20config\x20ID','notification_config_source_unavailable','Notification\x20config\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','entries','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','notification_config_field_required','path','ccList','parse','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','number','a\x20non-empty\x20string','notification_config_field_forbidden','notification_config_response_invalid','prototype','Notification\x20JSON\x20from\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','every','Notification\x20JSON\x20source\x20is\x20ambiguous.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','isArray','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'];a141_0x28f2=function(){return _0x4cf545;};return a141_0x28f2();}export const NOTIFICATION_INPUT_FLAGS=[{'name':a141_0x2ec41a(0x19d),'type':a141_0x2ec41a(0x183),'required':![],'description':a141_0x2ec41a(0x1bc)},{'name':a141_0x2ec41a(0x1d6),'type':a141_0x2ec41a(0x18e),'required':![],'default':![],'description':a141_0x2ec41a(0x1b9)},{'name':a141_0x2ec41a(0x17f),'type':'string','required':![],'description':a141_0x2ec41a(0x1f0)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a141_0x2ec41a(0x1b0),'required':!![],'description':a141_0x2ec41a(0x1a4)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3269d3,_0x291302,_0x4827ac){return new CliError(_0x3269d3,0x1,_0x291302,_0x4827ac);}export function readNotificationId(_0x38d431){const _0x4ba77c=a141_0x2ec41a,_0x5495f2=_0x38d431[_0x4ba77c(0x184)]('id');if(!Number[_0x4ba77c(0x17b)](_0x5495f2)||_0x5495f2<=0x0)throw notificationError(_0x4ba77c(0x1a0),_0x4ba77c(0x1aa));return _0x5495f2;}export function requireNotificationExplicitYes(_0x34d184){const _0x1f6838=a141_0x2ec41a;if(_0x34d184['bool']('dry-run')||_0x34d184[_0x1f6838(0x1f7)](_0x1f6838(0x198)))return;throw notificationError('notification_config_confirmation_required',_0x1f6838(0x19e),_0x1f6838(0x17e));}export function readNotificationChannelType(_0x30ce05,_0x4b5810=a141_0x2ec41a(0x1a1),_0x2bf864='EMAIL'){const _0x1b2a90=a141_0x2ec41a,_0x1a0e82=_0x30ce05[_0x1b2a90(0x1e1)](_0x4b5810)['trim']()||_0x2bf864;if(!NOTIFICATION_CHANNEL_TYPES[_0x1b2a90(0x1d7)](_0x1a0e82))throw CliErrors[_0x1b2a90(0x1ef)](_0x1b2a90(0x195)+_0x4b5810+':\x20'+_0x1a0e82,_0x1b2a90(0x1bd)+NOTIFICATION_CHANNEL_TYPES[_0x1b2a90(0x1d4)](',\x20')+'.');return _0x1a0e82;}export function assertSingleNotificationSource(_0x43cede){const _0x3bb4dd=a141_0x2ec41a,_0x21fd08=[],_0xfadfc6=_0x43cede[_0x3bb4dd(0x1e1)]('file')[_0x3bb4dd(0x1e7)]();if(_0xfadfc6)_0x21fd08[_0x3bb4dd(0x1eb)]({'kind':_0x3bb4dd(0x19d),'path':_0xfadfc6});if(_0x43cede[_0x3bb4dd(0x1f7)](_0x3bb4dd(0x1d6)))_0x21fd08['push']({'kind':_0x3bb4dd(0x1d6)});const _0x203cb8=_0x43cede[_0x3bb4dd(0x1e1)](_0x3bb4dd(0x17f))['trim']();if(_0x203cb8)_0x21fd08[_0x3bb4dd(0x1eb)]({'kind':_0x3bb4dd(0x18c),'name':_0x203cb8});if(_0x21fd08['length']===0x0)throw CliErrors[_0x3bb4dd(0x1ef)](_0x3bb4dd(0x1dc),_0x3bb4dd(0x1a7));if(_0x21fd08[_0x3bb4dd(0x1bf)]>0x1)throw CliErrors[_0x3bb4dd(0x1ef)](_0x3bb4dd(0x1b8),_0x3bb4dd(0x1a7));return _0x21fd08[0x0];}export async function readNotificationDocument(_0x562676,_0x4372d5){const _0x2bc444=a141_0x2ec41a,_0x1ad750=assertSingleNotificationSource(_0x562676),_0x337693=_0x1ad750[_0x2bc444(0x1c1)]===_0x2bc444(0x19d)?'file\x20'+_0x1ad750[_0x2bc444(0x1ac)]:_0x1ad750[_0x2bc444(0x1c1)]===_0x2bc444(0x18c)?_0x2bc444(0x1ee)+_0x1ad750[_0x2bc444(0x192)]:_0x2bc444(0x1d6);let _0x120a0f;try{if(_0x1ad750[_0x2bc444(0x1c1)]===_0x2bc444(0x19d))_0x120a0f=await readFile(_0x1ad750[_0x2bc444(0x1ac)],_0x2bc444(0x1da));else{if(_0x1ad750[_0x2bc444(0x1c1)]===_0x2bc444(0x18c)){if(!(_0x1ad750['name']in process.env))throw notificationError('notification_config_source_unavailable',_0x2bc444(0x19c)+_0x1ad750[_0x2bc444(0x192)]);_0x120a0f=process.env[_0x1ad750.name]??'';}else _0x120a0f=await readStdin();}}catch(_0x37f0cd){if(_0x37f0cd instanceof CliError)throw _0x37f0cd;throw notificationError(_0x2bc444(0x1a5),_0x2bc444(0x18d)+_0x337693+'.');}let _0x1ce5e6;try{_0x1ce5e6=JSON[_0x2bc444(0x1ae)](_0x120a0f);}catch{throw notificationError(_0x2bc444(0x1f4),_0x2bc444(0x1b5)+_0x337693+'\x20is\x20invalid.',_0x2bc444(0x1cb));}if(!isJsonObject(_0x1ce5e6))throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0x337693+_0x2bc444(0x17a));return validateNotificationDocument(_0x1ce5e6,_0x4372d5);}export function projectNotificationListConfig(_0x4100ac,_0x2f98ff){const _0x5290fc=a141_0x2ec41a;return{'id':typeof _0x4100ac['id']===_0x5290fc(0x1b0)?_0x4100ac['id']:null,'configCode':requireResponseString(_0x4100ac[_0x5290fc(0x175)],_0x5290fc(0x175),_0x2f98ff),'configName':requireResponseString(_0x4100ac[_0x5290fc(0x1c0)],'configName',_0x2f98ff),'channelType':requireResponseString(_0x4100ac['channelType'],_0x5290fc(0x1e2),_0x2f98ff),'description':normalizeNullableString(_0x4100ac[_0x5290fc(0x1cf)]),'createTime':normalizeNullableString(_0x4100ac[_0x5290fc(0x1d0)]),'updateTime':normalizeNullableString(_0x4100ac[_0x5290fc(0x1c6)])};}export function normalizeExactNotificationConfig(_0x5dcdfc,_0x2ea76d,_0x630f53){const _0x2e9f52=a141_0x2ec41a;if(!Number['isSafeInteger'](_0x5dcdfc['id'])||_0x5dcdfc['id']!==_0x2ea76d)throw notificationError(_0x2e9f52(0x1b3),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x2ea76d+'.');if(_0x5dcdfc[_0x2e9f52(0x17d)]!==_0x630f53)throw notificationError(_0x2e9f52(0x1b3),'Notification\x20config\x20'+_0x2ea76d+_0x2e9f52(0x1ea));const _0x5516e9=requireExactString(_0x5dcdfc[_0x2e9f52(0x1c0)],_0x2e9f52(0x1c0),_0x2ea76d),_0x56c157=requireExactString(_0x5dcdfc[_0x2e9f52(0x175)],_0x2e9f52(0x175),_0x2ea76d),_0xf6b616=requireExactString(_0x5dcdfc[_0x2e9f52(0x1e2)],_0x2e9f52(0x1e2),_0x2ea76d);if(!NOTIFICATION_CHANNEL_TYPES[_0x2e9f52(0x1d7)](_0xf6b616))throw notificationError(_0x2e9f52(0x1b3),_0x2e9f52(0x1a6)+_0x2ea76d+_0x2e9f52(0x1c4));const _0x642425=responseNullableString(_0x5dcdfc[_0x2e9f52(0x1ec)],'endpointUrl',_0x2ea76d),_0x49353=responseNullableString(_0x5dcdfc[_0x2e9f52(0x180)],'channelConfig',_0x2ea76d),_0x145eb2=responseNullableString(_0x5dcdfc[_0x2e9f52(0x1cf)],'description',_0x2ea76d),_0x4b3afb=responseNullableTimeout(_0x5dcdfc['connectTimeout'],_0x2e9f52(0x1a3),_0x2ea76d),_0x21e831=responseNullableTimeout(_0x5dcdfc[_0x2e9f52(0x1ca)],_0x2e9f52(0x1ca),_0x2ea76d);return{'id':_0x2ea76d,'appCode':_0x630f53,'configCode':_0x56c157,'configName':_0x5516e9,'channelType':_0xf6b616,'endpointUrl':redactSensitive(_0x642425),'channelConfig':redactSensitive(_0x49353),'description':_0x145eb2,'connectTimeout':_0x4b3afb,'readTimeout':_0x21e831,'endpointUrlRaw':_0x642425,'channelConfigRaw':_0x49353};}export async function requireExactNotificationConfig(_0x522d66,_0x258371,_0x2c484c){const _0x474e90=a141_0x2ec41a;let _0x56247c;try{_0x56247c=await getNotificationChannelConfig(_0x258371,_0x522d66);}catch{throw safeApiFailure(_0x2c484c,'preflight',_0x474e90(0x18f)+_0x522d66+_0x474e90(0x1a9));}return normalizeExactNotificationConfig(_0x56247c,_0x258371,_0x522d66);}export function projectNotificationConfig(_0x5bd896){const _0x1d7691=a141_0x2ec41a;return{'id':_0x5bd896['id']??null,'appCode':_0x5bd896[_0x1d7691(0x17d)],'configCode':_0x5bd896[_0x1d7691(0x175)]??null,'configName':_0x5bd896[_0x1d7691(0x1c0)],'channelType':_0x5bd896[_0x1d7691(0x1e2)],'endpointUrl':redactSensitive(_0x5bd896[_0x1d7691(0x1ec)]),'channelConfig':redactSensitive(_0x5bd896[_0x1d7691(0x180)]),'description':_0x5bd896[_0x1d7691(0x1cf)]??null,'connectTimeout':_0x5bd896['connectTimeout']??null,'readTimeout':_0x5bd896[_0x1d7691(0x1ca)]??null};}export function notificationSelector(_0x3ca2cb){const _0x2f9764=a141_0x2ec41a;return{'appCode':_0x3ca2cb[_0x2f9764(0x17d)],'id':_0x3ca2cb['id'],'configCode':_0x3ca2cb[_0x2f9764(0x175)],'configName':_0x3ca2cb['configName'],'channelType':_0x3ca2cb['channelType']};}export function createMutationInput(_0xc55acb,_0x47ccf9){const _0x576ba9=a141_0x2ec41a;return{'appCode':_0xc55acb,'configName':_0x47ccf9[_0x576ba9(0x1c0)],'channelType':_0x47ccf9[_0x576ba9(0x1e2)],...hasOwn(_0x47ccf9,'endpointUrl')?{'endpointUrl':_0x47ccf9['endpointUrl']}:{},...hasOwn(_0x47ccf9,_0x576ba9(0x180))?{'channelConfig':serializeChannelConfig(_0x47ccf9[_0x576ba9(0x180)])}:{},...hasOwn(_0x47ccf9,_0x576ba9(0x1cf))?{'description':_0x47ccf9[_0x576ba9(0x1cf)]}:{},...hasOwn(_0x47ccf9,'connectTimeout')?{'connectTimeout':_0x47ccf9[_0x576ba9(0x1a3)]}:{},...hasOwn(_0x47ccf9,'readTimeout')?{'readTimeout':_0x47ccf9[_0x576ba9(0x1ca)]}:{}};}export function mergeUpdateInput(_0x245846,_0x3738c2){const _0x2d5623=a141_0x2ec41a;return{'id':_0x245846['id'],'appCode':_0x245846[_0x2d5623(0x17d)],'configName':_0x3738c2[_0x2d5623(0x1c0)]??_0x245846[_0x2d5623(0x1c0)],'channelType':_0x3738c2[_0x2d5623(0x1e2)]??_0x245846[_0x2d5623(0x1e2)],'endpointUrl':hasOwn(_0x3738c2,_0x2d5623(0x1ec))?_0x3738c2[_0x2d5623(0x1ec)]:_0x245846[_0x2d5623(0x1c3)],'channelConfig':hasOwn(_0x3738c2,'channelConfig')?serializeChannelConfig(_0x3738c2[_0x2d5623(0x180)]):_0x245846['channelConfigRaw'],'description':hasOwn(_0x3738c2,_0x2d5623(0x1cf))?_0x3738c2[_0x2d5623(0x1cf)]:_0x245846['description'],'connectTimeout':hasOwn(_0x3738c2,_0x2d5623(0x1a3))?_0x3738c2[_0x2d5623(0x1a3)]:_0x245846[_0x2d5623(0x1a3)],'readTimeout':hasOwn(_0x3738c2,'readTimeout')?_0x3738c2['readTimeout']:_0x245846[_0x2d5623(0x1ca)]};}export function plannedUpdateProjection(_0x9dac59,_0x4a5198){const _0x54dc41=a141_0x2ec41a;return projectNotificationConfig({'id':_0x9dac59['id'],'appCode':_0x9dac59[_0x54dc41(0x17d)],'configCode':_0x9dac59[_0x54dc41(0x175)],'configName':_0x4a5198[_0x54dc41(0x1c0)]??_0x9dac59[_0x54dc41(0x1c0)],'channelType':_0x4a5198['channelType']??_0x9dac59[_0x54dc41(0x1e2)],'endpointUrl':hasOwn(_0x4a5198,_0x54dc41(0x1ec))?_0x4a5198[_0x54dc41(0x1ec)]:_0x9dac59[_0x54dc41(0x1c3)],'channelConfig':hasOwn(_0x4a5198,_0x54dc41(0x180))?_0x4a5198[_0x54dc41(0x180)]:_0x9dac59[_0x54dc41(0x185)],'description':hasOwn(_0x4a5198,'description')?_0x4a5198[_0x54dc41(0x1cf)]:_0x9dac59[_0x54dc41(0x1cf)],'connectTimeout':hasOwn(_0x4a5198,_0x54dc41(0x1a3))?_0x4a5198[_0x54dc41(0x1a3)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x9dac59[_0x54dc41(0x1a3)],'readTimeout':hasOwn(_0x4a5198,_0x54dc41(0x1ca))?_0x4a5198['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x9dac59[_0x54dc41(0x1ca)]});}export function requestedSafeFieldsMatch(_0x32bc3f,_0x3db517,_0x376913){const _0xe78568=a141_0x2ec41a,_0x5bf788=[],_0x3e8504=[],_0x455c8a=[];for(const _0x431b6c of[_0xe78568(0x1c0),_0xe78568(0x1e2),'description']){if(!hasOwn(_0x376913,_0x431b6c))continue;_0x455c8a['push'](_0x431b6c),_0x5bf788[_0xe78568(0x1eb)](_0x3db517[_0x431b6c]===_0x376913[_0x431b6c]),_0x3e8504['push'](_0x32bc3f[_0x431b6c]!==_0x376913[_0x431b6c]&&_0x3db517[_0x431b6c]===_0x376913[_0x431b6c]);}for(const _0x464a51 of[_0xe78568(0x1a3),_0xe78568(0x1ca)]){if(!hasOwn(_0x376913,_0x464a51))continue;const _0x5ea4c2=_0x376913[_0x464a51]??(_0x464a51==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x455c8a[_0xe78568(0x1eb)](_0x464a51),_0x5bf788['push'](_0x3db517[_0x464a51]===_0x5ea4c2),_0x3e8504[_0xe78568(0x1eb)](_0x32bc3f[_0x464a51]!==_0x5ea4c2&&_0x3db517[_0x464a51]===_0x5ea4c2);}return hasOwn(_0x376913,_0xe78568(0x1ec))&&_0x376913[_0xe78568(0x1ec)]===null&&(_0x455c8a['push'](_0xe78568(0x1cc)),_0x5bf788['push'](_0x3db517['endpointUrlRaw']===null||_0x3db517[_0xe78568(0x1c3)]===''),_0x3e8504['push'](_0x32bc3f[_0xe78568(0x1c3)]!==null&&_0x32bc3f['endpointUrlRaw']!==''&&(_0x3db517[_0xe78568(0x1c3)]===null||_0x3db517[_0xe78568(0x1c3)]===''))),{'allMatch':_0x5bf788[_0xe78568(0x1b7)](Boolean),'provesChange':_0x3e8504[_0xe78568(0x18b)](Boolean),'verifiedFields':_0x455c8a};}export function validateNotificationDeleteReadback(_0x4c3990,_0x464088,_0x38c51e){const _0x26cea9=a141_0x2ec41a;for(const [_0x4a8acc,_0x28949a]of _0x4c3990[_0x26cea9(0x1a8)]()){if(!Number['isSafeInteger'](_0x28949a['id'])||_0x28949a['id']<=0x0)throw notificationError(_0x26cea9(0x1b3),_0x26cea9(0x1c5)+(_0x4a8acc+0x1)+_0x26cea9(0x1cd));if(_0x28949a[_0x26cea9(0x17d)]!==_0x464088)throw notificationError('notification_config_response_invalid',_0x26cea9(0x1c5)+(_0x4a8acc+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x28949a[_0x26cea9(0x1e2)]!==_0x38c51e)throw notificationError(_0x26cea9(0x1b3),_0x26cea9(0x1c5)+(_0x4a8acc+0x1)+_0x26cea9(0x199));}}export function safeApiFailure(_0xba0d4f,_0xa24088,_0x2bc985){const _0x3ade9d=a141_0x2ec41a;return notificationError(_0x3ade9d(0x1e5)+_0xba0d4f+'_'+(_0xa24088==='mutation'?'failed':_0xa24088+_0x3ade9d(0x1f1)),_0x3ade9d(0x1a6)+_0xba0d4f+'\x20'+_0xa24088+_0x3ade9d(0x193),_0x2bc985);}export function notificationLookupCommand(_0x478cd7,_0x5adb13){const _0x5dd064=a141_0x2ec41a;return _0x5dd064(0x176)+_0x478cd7+'\x20--type\x20'+_0x5adb13+_0x5dd064(0x178);}function validateNotificationDocument(_0x3b218c,_0x5d0cf1){const _0x56ae7b=a141_0x2ec41a;for(const _0x5e7e7d of Object[_0x56ae7b(0x1e9)](_0x3b218c)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x5e7e7d))throw notificationError(_0x56ae7b(0x1b2),_0x56ae7b(0x197)+_0x5e7e7d+_0x56ae7b(0x190));if(!ALLOWED_INPUT_FIELDS[_0x56ae7b(0x1d9)](_0x5e7e7d))throw notificationError(_0x56ae7b(0x1d5),_0x56ae7b(0x1c2)+_0x5e7e7d+'\x22.');}if(_0x5d0cf1==='update'&&Object[_0x56ae7b(0x1e9)](_0x3b218c)['length']===0x0)throw notificationError(_0x56ae7b(0x1e8),_0x56ae7b(0x1af));const _0x8f1b49={};if(hasOwn(_0x3b218c,_0x56ae7b(0x1c0)))_0x8f1b49[_0x56ae7b(0x1c0)]=validateRequiredString(_0x3b218c['configName'],_0x56ae7b(0x1c0),0x80);else{if(_0x5d0cf1===_0x56ae7b(0x19b))throw notificationError(_0x56ae7b(0x1ab),_0x56ae7b(0x179)+_0x56ae7b(0x1c8));}if(hasOwn(_0x3b218c,_0x56ae7b(0x1e2))){if(typeof _0x3b218c['channelType']!==_0x56ae7b(0x183))throw invalidFieldType(_0x56ae7b(0x1e2),_0x56ae7b(0x191));const _0x15a8da=_0x3b218c[_0x56ae7b(0x1e2)][_0x56ae7b(0x1e7)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x56ae7b(0x1d7)](_0x15a8da))throw notificationError(_0x56ae7b(0x1d8),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x56ae7b(0x1d4)](',\x20')+'.');_0x8f1b49[_0x56ae7b(0x1e2)]=_0x15a8da;}else{if(_0x5d0cf1==='create')throw notificationError('notification_config_field_required',_0x56ae7b(0x179)+_0x56ae7b(0x1f3));}for(const [_0x28b348,_0x2b3947]of[[_0x56ae7b(0x1ec),0x200],[_0x56ae7b(0x1cf),0x100]]){if(!hasOwn(_0x3b218c,_0x28b348))continue;const _0x38581a=_0x3b218c[_0x28b348];if(_0x38581a!==null&&typeof _0x38581a!=='string')throw invalidFieldType(_0x28b348,_0x56ae7b(0x1e3));if(typeof _0x38581a===_0x56ae7b(0x183)&&_0x38581a[_0x56ae7b(0x1bf)]>_0x2b3947)throw notificationError('notification_config_field_invalid',_0x56ae7b(0x197)+_0x28b348+_0x56ae7b(0x188)+_0x2b3947+_0x56ae7b(0x1e6));_0x8f1b49[_0x28b348]=_0x38581a;}if(hasOwn(_0x3b218c,_0x56ae7b(0x180))){const _0x62b5fb=_0x3b218c['channelConfig'];if(_0x62b5fb===null&&_0x5d0cf1===_0x56ae7b(0x19b))throw invalidFieldType(_0x56ae7b(0x180),'a\x20JSON\x20object');if(_0x62b5fb!==null&&!isJsonObject(_0x62b5fb))throw invalidFieldType(_0x56ae7b(0x180),_0x5d0cf1===_0x56ae7b(0x196)?_0x56ae7b(0x1c7):_0x56ae7b(0x19f));_0x62b5fb!==null&&validateChannelConfigFields(_0x8f1b49[_0x56ae7b(0x1e2)],_0x62b5fb),_0x8f1b49[_0x56ae7b(0x180)]=_0x62b5fb;}for(const _0x5a2961 of[_0x56ae7b(0x1a3),_0x56ae7b(0x1ca)]){if(!hasOwn(_0x3b218c,_0x5a2961))continue;const _0x9a5e5a=_0x3b218c[_0x5a2961];if(_0x9a5e5a!==null&&(!Number[_0x56ae7b(0x17b)](_0x9a5e5a)||_0x9a5e5a<0x0))throw notificationError('notification_config_field_invalid',_0x56ae7b(0x197)+_0x5a2961+_0x56ae7b(0x1be));_0x8f1b49[_0x5a2961]=_0x9a5e5a;}return _0x8f1b49;}function validateRequiredString(_0x24c826,_0x56927f,_0x38e5b8){const _0x14ce78=a141_0x2ec41a;if(typeof _0x24c826!==_0x14ce78(0x183))throw invalidFieldType(_0x56927f,_0x14ce78(0x1b1));const _0x8bec3e=_0x24c826[_0x14ce78(0x1e7)]();if(!_0x8bec3e)throw notificationError(_0x14ce78(0x1d8),_0x14ce78(0x197)+_0x56927f+_0x14ce78(0x1b6));if(_0x8bec3e[_0x14ce78(0x1bf)]>_0x38e5b8)throw notificationError(_0x14ce78(0x1d8),_0x14ce78(0x197)+_0x56927f+_0x14ce78(0x188)+_0x38e5b8+_0x14ce78(0x1e6));return _0x8bec3e;}function validateChannelConfigFields(_0x16313e,_0x42c0ec){const _0x43edc2=a141_0x2ec41a;if(hasOwn(_0x42c0ec,_0x43edc2(0x194)))throw forbiddenChannelConfigField(_0x43edc2(0x194));if(_0x16313e==='EMAIL')for(const _0xa2aa8e of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x42c0ec,_0xa2aa8e))throw forbiddenChannelConfigField(_0xa2aa8e);}}function forbiddenChannelConfigField(_0x56eef1){const _0x135e79=a141_0x2ec41a;return notificationError(_0x135e79(0x19a),_0x135e79(0x1bb)+_0x56eef1+_0x135e79(0x1a2));}function invalidFieldType(_0x2d2b8a,_0x275fa6){return notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x2d2b8a+'\x22\x20must\x20be\x20'+_0x275fa6+'.');}function serializeChannelConfig(_0x475d05){return _0x475d05===null||_0x475d05===undefined?null:JSON['stringify'](_0x475d05);}function redactSensitive(_0xcd25a3){return _0xcd25a3===null||_0xcd25a3===undefined||_0xcd25a3===''?null:'<redacted>';}function requireResponseString(_0x5acce9,_0xe8e038,_0x26dea1){const _0x589cf2=a141_0x2ec41a;if(typeof _0x5acce9!==_0x589cf2(0x183)||_0x5acce9['trim']()==='')throw CliErrors[_0x589cf2(0x181)](_0x589cf2(0x1f2),_0x589cf2(0x1d3)+(_0x26dea1+0x1)+_0x589cf2(0x1f8)+_0xe8e038+'\x22.');return _0x5acce9[_0x589cf2(0x1e7)]();}function requireExactString(_0x143347,_0x5bbdb6,_0x598546){const _0x49efad=a141_0x2ec41a;if(typeof _0x143347!=='string'||_0x143347[_0x49efad(0x1e7)]()==='')throw notificationError('notification_config_response_invalid',_0x49efad(0x1a6)+_0x598546+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x5bbdb6+'\x22.');return _0x143347['trim']();}function responseNullableString(_0x4cf539,_0x4d7dee,_0x5508ae){const _0x4a72e9=a141_0x2ec41a;if(_0x4cf539===undefined||_0x4cf539===null)return null;if(typeof _0x4cf539!==_0x4a72e9(0x183))throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x5508ae+_0x4a72e9(0x1ed)+_0x4d7dee+'\x22.');return _0x4cf539;}function responseNullableTimeout(_0x20e3c0,_0x29025b,_0x2669e0){const _0x4c11d4=a141_0x2ec41a;if(_0x20e3c0===undefined||_0x20e3c0===null)return null;if(!Number[_0x4c11d4(0x17b)](_0x20e3c0)||_0x20e3c0<0x0)throw notificationError(_0x4c11d4(0x1b3),_0x4c11d4(0x1a6)+_0x2669e0+_0x4c11d4(0x1ed)+_0x29025b+'\x22.');return _0x20e3c0;}function normalizeNullableString(_0x3092d3){return typeof _0x3092d3==='string'?_0x3092d3:null;}function isJsonObject(_0x540458){const _0x3c7de3=a141_0x2ec41a;return _0x540458!==null&&typeof _0x540458==='object'&&!Array[_0x3c7de3(0x1ba)](_0x540458);}function hasOwn(_0x69137,_0xa38a77){const _0x2625c6=a141_0x2ec41a;return Object[_0x2625c6(0x1b4)][_0x2625c6(0x186)][_0x2625c6(0x17c)](_0x69137,_0xa38a77);}async function readStdin(){const _0x15406d=a141_0x2ec41a;let _0x21680e='';process[_0x15406d(0x1d6)]['setEncoding']('utf8');for await(const _0xf103f0 of process[_0x15406d(0x1d6)])_0x21680e+=_0xf103f0;return _0x21680e;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a142_0x2c0e50=a142_0x588c;(function(_0x389e91,_0x4e5402){const _0x45acf5=a142_0x588c,_0x328f5b=_0x389e91();while(!![]){try{const _0xa00977=parseInt(_0x45acf5(0x129))/0x1*(-parseInt(_0x45acf5(0x134))/0x2)+parseInt(_0x45acf5(0x14f))/0x3*(parseInt(_0x45acf5(0x12c))/0x4)+-parseInt(_0x45acf5(0x138))/0x5*(-parseInt(_0x45acf5(0x11d))/0x6)+parseInt(_0x45acf5(0x11f))/0x7*(parseInt(_0x45acf5(0x12b))/0x8)+-parseInt(_0x45acf5(0x14d))/0x9*(-parseInt(_0x45acf5(0x14c))/0xa)+parseInt(_0x45acf5(0x120))/0xb*(-parseInt(_0x45acf5(0x130))/0xc)+-parseInt(_0x45acf5(0x127))/0xd;if(_0xa00977===_0x4e5402)break;else _0x328f5b['push'](_0x328f5b['shift']());}catch(_0x4d5f45){_0x328f5b['push'](_0x328f5b['shift']());}}}(a142_0x43fa,0x28207));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a142_0x588c(_0x48bc9d,_0x365c55){_0x48bc9d=_0x48bc9d-0x117;const _0x43fa84=a142_0x43fa();let _0x588c54=_0x43fa84[_0x48bc9d];return _0x588c54;}const SUPPORTED_SCENES=[a142_0x2c0e50(0x135),a142_0x2c0e50(0x152),a142_0x2c0e50(0x14a),a142_0x2c0e50(0x13f)],SCENE_TO_LEGACY_TYPE={'invoice':a142_0x2c0e50(0x13a),'general':a142_0x2c0e50(0x119),'form':'Table','idCard':a142_0x2c0e50(0x14b)},SCENE_FLAG={'name':a142_0x2c0e50(0x11c),'type':a142_0x2c0e50(0x145),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a142_0x2c0e50(0x142)},IMAGE_FILE_FLAG={'name':a142_0x2c0e50(0x149),'type':'string','description':a142_0x2c0e50(0x121)},IMAGE_URL_FLAG={'name':a142_0x2c0e50(0x140),'type':a142_0x2c0e50(0x145),'description':a142_0x2c0e50(0x13d)};function normalizeScene(_0x2abc79){const _0x147034=a142_0x2c0e50,_0x11551e=_0x2abc79[_0x147034(0x12a)]()[_0x147034(0x124)]();if(_0x11551e===_0x147034(0x151))return _0x147034(0x13f);if(_0x11551e===_0x147034(0x135)||_0x11551e===_0x147034(0x152)||_0x11551e==='form')return _0x11551e;throw CliErrors[_0x147034(0x13c)](_0x147034(0x13b)+_0x2abc79+_0x147034(0x11a)+SUPPORTED_SCENES[_0x147034(0x133)](',\x20'));}function a142_0x43fa(){const _0x4c40aa=['image-file','form','IdCard','5860KTXsHx','4482eLrxKX','Preview:\x20recognize\x20','28347DEhyRN','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','idcard','general','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','count','\x20OCR','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','General','.\x20Supported\x20scenes:\x20','filePath','scene','570nNoqbO','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','91ghZTCx','7117rhrEbW','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','fileUrl','GET','toLowerCase','File\x20URL\x20response\x20missing\x20fileUrl.','fileName','6614205YduXOD','path','1ePOShs','trim','202184Pcvcjz','12EobtFB','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','/smartapi/common/uploadFile','str','48DQkooF','toString','imageUrl','join','104254amsWcy','invoice','\x20OCR\x20from\x20URL','recognize','4165IZlhrm','POST','Invoice','Unsupported\x20OCR\x20scene:\x20','validation','Publicly\x20accessible\x20image\x20or\x20file\x20URL','read','idCard','image-url','/smartapi/ocr/recognize-text?','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','appCode','ocr','string','apiError','length','File\x20upload\x20response\x20missing\x20filePath.'];a142_0x43fa=function(){return _0x4c40aa;};return a142_0x43fa();}function selectedInputs(_0x1d773c){const _0x46aa6c=a142_0x2c0e50,_0x5698f1=_0x1d773c[_0x46aa6c(0x12f)](_0x46aa6c(0x149))[_0x46aa6c(0x12a)](),_0x2e3c14=_0x1d773c['str'](_0x46aa6c(0x140))[_0x46aa6c(0x12a)]();return{'imageFile':_0x5698f1,'imageUrl':_0x2e3c14,'count':[_0x5698f1,_0x2e3c14]['filter'](Boolean)[_0x46aa6c(0x147)]};}function validateInputSelection(_0x244876){const _0x567156=a142_0x2c0e50,_0x12df23=selectedInputs(_0x244876);if(_0x12df23[_0x567156(0x154)]!==0x1)throw CliErrors[_0x567156(0x13c)](_0x567156(0x118));return _0x12df23;}function withScene(_0x547692,_0x26317b,_0x459d90){const _0x954dbe=a142_0x2c0e50;return{..._0x547692,'scene':_0x26317b,..._0x459d90?{'sourceFile':{'fileName':_0x459d90[_0x954dbe(0x126)],'filePath':_0x459d90[_0x954dbe(0x11b)]}}:{}};}const ocrRecognize={'service':a142_0x2c0e50(0x144),'command':a142_0x2c0e50(0x137),'description':a142_0x2c0e50(0x153),'risk':a142_0x2c0e50(0x13e),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x44d0d5){const _0x46afe8=a142_0x2c0e50,_0x211468=normalizeScene(_0x44d0d5[_0x46afe8(0x12f)](_0x46afe8(0x11c))),_0x31c5a0=SCENE_TO_LEGACY_TYPE[_0x211468],_0xea31bc=validateInputSelection(_0x44d0d5);if(_0xea31bc['imageUrl']){const _0x172b94=new URLSearchParams({'url':_0xea31bc['imageUrl'],'type':_0x31c5a0,'appCode':_0x44d0d5[_0x46afe8(0x143)]});return{'method':_0x46afe8(0x123),'url':_0x46afe8(0x141)+_0x172b94[_0x46afe8(0x131)](),'description':_0x46afe8(0x14e)+_0x211468+_0x46afe8(0x136)};}const _0x2783d=requireDevelopmentUploadFile(_0xea31bc['imageFile'],'image-file');return{'method':'POST','url':_0x46afe8(0x12e),'body':{'steps':[{'method':_0x46afe8(0x139),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x44d0d5[_0x46afe8(0x143)],'multipart':{'file':_0x2783d}}},{'method':_0x46afe8(0x139),'url':'/smartapi/common/queryFileUrl','body':{'filePath':_0x46afe8(0x11e),'downloadFlag':![]}},{'method':_0x46afe8(0x123),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x44d0d5[_0x46afe8(0x143)],'url':_0x46afe8(0x150),'type':_0x31c5a0}}]},'description':_0x46afe8(0x12d)+_0x211468+_0x46afe8(0x117)};},async 'execute'(_0x50632d){const _0x3fc318=a142_0x2c0e50,_0x385665=normalizeScene(_0x50632d[_0x3fc318(0x12f)](_0x3fc318(0x11c))),_0x4bc091=SCENE_TO_LEGACY_TYPE[_0x385665],_0x2b8e6c=validateInputSelection(_0x50632d);if(_0x2b8e6c[_0x3fc318(0x132)]){const _0x1ad98e=await recognizeDevelopmentOcr(_0x50632d[_0x3fc318(0x143)],{'url':_0x2b8e6c[_0x3fc318(0x132)],'type':_0x4bc091});return{'ok':!![],'data':withScene(_0x1ad98e,_0x385665)};}const _0x17697b=requireDevelopmentUploadFile(_0x2b8e6c['imageFile'],'image-file'),_0x42b327=await uploadDevelopmentFile(_0x50632d[_0x3fc318(0x143)],_0x17697b[_0x3fc318(0x128)]);if(!_0x42b327[_0x3fc318(0x11b)])throw CliErrors['apiError'](_0x3fc318(0x148));const _0xcc60e5=await queryDevelopmentFileUrl(_0x42b327[_0x3fc318(0x11b)],{'download':![]});if(!_0xcc60e5[_0x3fc318(0x122)])throw CliErrors[_0x3fc318(0x146)](_0x3fc318(0x125));const _0x4562af=await recognizeDevelopmentOcr(_0x50632d[_0x3fc318(0x143)],{'url':_0xcc60e5[_0x3fc318(0x122)],'type':_0x4bc091});return{'ok':!![],'data':withScene(_0x4562af,_0x385665,_0x42b327)};}};export const ocrDefinitions=[ocrRecognize];
|