@lovrabet/rabetbase-cli 2.5.4-beta.5 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a183_0x41ab1f=a183_0x5b99;(function(_0xdd5f70,_0x81fda3){const _0x1db4f2=a183_0x5b99,_0x3c9e2e=_0xdd5f70();while(!![]){try{const _0x1b946d=-parseInt(_0x1db4f2(0x1d3))/0x1*(-parseInt(_0x1db4f2(0x1c2))/0x2)+-parseInt(_0x1db4f2(0x1d9))/0x3*(parseInt(_0x1db4f2(0x1d0))/0x4)+parseInt(_0x1db4f2(0x1d4))/0x5*(parseInt(_0x1db4f2(0x1cb))/0x6)+parseInt(_0x1db4f2(0x1de))/0x7*(-parseInt(_0x1db4f2(0x1c5))/0x8)+-parseInt(_0x1db4f2(0x1dc))/0x9*(-parseInt(_0x1db4f2(0x1d2))/0xa)+-parseInt(_0x1db4f2(0x1d7))/0xb*(-parseInt(_0x1db4f2(0x1c1))/0xc)+parseInt(_0x1db4f2(0x1cf))/0xd*(-parseInt(_0x1db4f2(0x1cc))/0xe);if(_0x1b946d===_0x81fda3)break;else _0x3c9e2e['push'](_0x3c9e2e['shift']());}catch(_0x19ccd2){_0x3c9e2e['push'](_0x3c9e2e['shift']());}}}(a183_0x3b82,0x5b28b));function a183_0x3b82(){const _0x2fc499=['28KjIpMF','appCode','431784VDaWph','412304LLgozq','config-list','all','213424VlPmAr','bool','flat','validation','Notification\x20channel\x20type','str','335256VrgxHP','81746IwzkPj','boolean','length','2275seBNIR','5428xcyWoC','notification','56370NOyNYz','3JtGStA','55NknPtj','type','map','33JVJNbZ','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','1227VpSnji','trim','read','1143RimBFC','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values'];a183_0x3b82=function(){return _0x2fc499;};return a183_0x3b82();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a183_0x5b99(_0x2204bf,_0x5333d4){_0x2204bf=_0x2204bf-0x1c1;const _0x3b8250=a183_0x3b82();let _0x5b9928=_0x3b8250[_0x2204bf];return _0x5b9928;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a183_0x41ab1f(0x1d1),'command':a183_0x41ab1f(0x1c3),'description':a183_0x41ab1f(0x1dd),'risk':a183_0x41ab1f(0x1db),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a183_0x41ab1f(0x1d5),'type':'string','description':a183_0x41ab1f(0x1c9),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a183_0x41ab1f(0x1cd),'default':![],'description':a183_0x41ab1f(0x1d8)}],async 'validate'(_0x3289d9){const _0x3b0d2a=a183_0x41ab1f;if(_0x3289d9[_0x3b0d2a(0x1c6)](_0x3b0d2a(0x1c4))&&_0x3289d9[_0x3b0d2a(0x1ca)](_0x3b0d2a(0x1d5))[_0x3b0d2a(0x1da)]())throw CliErrors[_0x3b0d2a(0x1c8)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0x3289d9[_0x3b0d2a(0x1c6)](_0x3b0d2a(0x1c4)))return;readNotificationChannelType(_0x3289d9);},async 'execute'(_0x58849b){const _0xff1ef0=a183_0x41ab1f;if(_0x58849b[_0xff1ef0(0x1c6)](_0xff1ef0(0x1c4))){const _0xa7d716=await Promise[_0xff1ef0(0x1c4)](NOTIFICATION_CHANNEL_TYPES[_0xff1ef0(0x1d6)](_0x55a7aa=>listNotificationChannelConfigs(_0x58849b[_0xff1ef0(0x1df)],_0x55a7aa))),_0x56e833=_0xa7d716[_0xff1ef0(0x1c7)]()[_0xff1ef0(0x1d6)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x58849b['appCode'],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x56e833[_0xff1ef0(0x1ce)],'configs':_0x56e833},'message':'Found\x20'+_0x56e833[_0xff1ef0(0x1ce)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x85f6d5=readNotificationChannelType(_0x58849b),_0x392bc1=await listNotificationChannelConfigs(_0x58849b[_0xff1ef0(0x1df)],_0x85f6d5),_0x13fb65=_0x392bc1[_0xff1ef0(0x1d6)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x58849b[_0xff1ef0(0x1df)],'channelType':_0x85f6d5,'count':_0x13fb65[_0xff1ef0(0x1ce)],'configs':_0x13fb65},'message':'Found\x20'+_0x13fb65['length']+'\x20'+_0x85f6d5+'\x20notification\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x5ab877=a184_0x9e1d;function a184_0x4fba(){const _0x4d9bba=['Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','8JcTGes','provesChange','notification_config_update_verification_unavailable','allMatch','payload','488241GXshJx','405076CPFfTP','before','1214017axVkDP','8ZDzZgG','planned','appCode','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','143159nvvteK','high-risk-write','notification_config_update_outcome_unknown','/notification/channel-config/update','POST','verified','364158PBowbE','mutation','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','verifiedFields','Notification\x20config\x20','update','\x20via\x20','Inspect\x20with\x20--id\x20','\x20with\x20',';\x20do\x20not\x20resubmit\x20automatically.','1525446VxqRYK','427275VOOyuC','Inspect\x20ID\x20','patch'];a184_0x4fba=function(){return _0x4d9bba;};return a184_0x4fba();}(function(_0xaa643a,_0x8310a7){const _0x24ef6a=a184_0x9e1d,_0xbd4727=_0xaa643a();while(!![]){try{const _0x1f51db=-parseInt(_0x24ef6a(0x81))/0x1+parseInt(_0x24ef6a(0x7a))/0x2+parseInt(_0x24ef6a(0x79))/0x3+-parseInt(_0x24ef6a(0x97))/0x4*(-parseInt(_0x24ef6a(0x93))/0x5)+parseInt(_0x24ef6a(0x87))/0x6+-parseInt(_0x24ef6a(0x7c))/0x7+-parseInt(_0x24ef6a(0x7d))/0x8*(parseInt(_0x24ef6a(0x92))/0x9);if(_0x1f51db===_0x8310a7)break;else _0xbd4727['push'](_0xbd4727['shift']());}catch(_0x362613){_0xbd4727['push'](_0xbd4727['shift']());}}}(a184_0x4fba,0x1b0d4));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a184_0x9e1d(_0xd4a02,_0x25c4fc){_0xd4a02=_0xd4a02-0x77;const _0x4fba01=a184_0x4fba();let _0x9e1dd5=_0x4fba01[_0xd4a02];return _0x9e1dd5;}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';const UPDATE_PATH=a184_0x5ab877(0x84);async function prepareUpdate(_0x4bb0fe){const _0x43c7eb=a184_0x5ab877,_0x404365=readNotificationId(_0x4bb0fe),_0x3e9cfb=await readNotificationDocument(_0x4bb0fe,'update'),_0x412cbf=await requireExactNotificationConfig(_0x4bb0fe[_0x43c7eb(0x7f)],_0x404365,_0x43c7eb(0x8d));return{'id':_0x404365,'patch':_0x3e9cfb,'before':_0x412cbf,'payload':mergeUpdateInput(_0x412cbf,_0x3e9cfb),'planned':plannedUpdateProjection(_0x412cbf,_0x3e9cfb)};}export const notificationConfigUpdate={'service':'notification','command':'config-update','description':a184_0x5ab877(0x96),'risk':a184_0x5ab877(0x82),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x513c2e){readNotificationId(_0x513c2e),assertSingleNotificationSource(_0x513c2e),requireNotificationExplicitYes(_0x513c2e);},async 'dryRun'(_0x41b508){const _0x4e7f0c=a184_0x5ab877,_0x2172e5=await prepareUpdate(_0x41b508),_0x4ac1bc=notificationLookupCommand(_0x41b508[_0x4e7f0c(0x7f)],_0x2172e5[_0x4e7f0c(0x7b)]['channelType']);return asDryRunResult({'operation':_0x4e7f0c(0x8d),'selector':notificationSelector(_0x2172e5['before']),'before':projectNotificationConfig(_0x2172e5['before']),'after':_0x2172e5[_0x4e7f0c(0x7e)],'dryRun':!![],'backend':{'method':_0x4e7f0c(0x85),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x4e7f0c(0x7e),'lookupCommand':_0x4ac1bc}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x33441d){const _0x30db91=a184_0x5ab877;requireNotificationExplicitYes(_0x33441d);const _0x1071e2=await prepareUpdate(_0x33441d),_0x232168=notificationLookupCommand(_0x33441d[_0x30db91(0x7f)],_0x1071e2[_0x30db91(0x7b)]['channelType']);let _0x493261=![];try{await updateNotificationChannelConfig(_0x1071e2[_0x30db91(0x78)]);}catch(_0x135ffc){if(!isPlatformTransportFailure(_0x135ffc))throw safeApiFailure('update',_0x30db91(0x88),_0x30db91(0x94)+_0x1071e2['id']+_0x30db91(0x90)+_0x232168+_0x30db91(0x8a));_0x493261=!![];}let _0x1ac8d4;try{const _0x5a91fe=await getNotificationChannelConfig(_0x1071e2['id'],_0x33441d['appCode']);_0x1ac8d4=normalizeExactNotificationConfig(_0x5a91fe,_0x1071e2['id'],_0x33441d[_0x30db91(0x7f)]);}catch{throw notificationError(_0x493261?_0x30db91(0x83):_0x30db91(0x99),_0x30db91(0x8c)+_0x1071e2['id']+_0x30db91(0x80),'Inspect\x20with\x20--id\x20'+_0x1071e2['id']+_0x30db91(0x8e)+_0x232168+';\x20do\x20not\x20resubmit\x20automatically.');}const _0x2b7284=requestedSafeFieldsMatch(_0x1071e2['before'],_0x1ac8d4,_0x1071e2[_0x30db91(0x95)]);if(!_0x2b7284[_0x30db91(0x77)]||_0x493261&&!_0x2b7284[_0x30db91(0x98)])throw notificationError(_0x493261?_0x30db91(0x83):'notification_config_update_verification_failed',_0x30db91(0x8c)+_0x1071e2['id']+_0x30db91(0x89),_0x30db91(0x8f)+_0x1071e2['id']+_0x30db91(0x8e)+_0x232168+_0x30db91(0x91));const _0x491479=_0x493261?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x30db91(0x8d),'selector':notificationSelector(_0x1ac8d4),'before':projectNotificationConfig(_0x1071e2['before']),'after':projectNotificationConfig(_0x1ac8d4),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x491479,'verification':{'status':_0x30db91(0x86),'recoveredAfterUnknownResponse':_0x493261,'verifiedFields':_0x2b7284[_0x30db91(0x8b)],'lookupCommand':_0x232168}},'message':'Updated\x20notification\x20config\x20'+_0x1ac8d4['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3826e6,_0x7eb32a){const _0x35a74c=a185_0xc4c5,_0x4f612a=_0x3826e6();while(!![]){try{const _0x23f5de=parseInt(_0x35a74c(0x1c2))/0x1+-parseInt(_0x35a74c(0x1be))/0x2*(-parseInt(_0x35a74c(0x1bc))/0x3)+parseInt(_0x35a74c(0x1bb))/0x4+-parseInt(_0x35a74c(0x1c4))/0x5*(-parseInt(_0x35a74c(0x1bf))/0x6)+parseInt(_0x35a74c(0x1ba))/0x7*(-parseInt(_0x35a74c(0x1bd))/0x8)+parseInt(_0x35a74c(0x1c0))/0x9+parseInt(_0x35a74c(0x1c1))/0xa*(-parseInt(_0x35a74c(0x1c3))/0xb);if(_0x23f5de===_0x7eb32a)break;else _0x4f612a['push'](_0x4f612a['shift']());}catch(_0x28a535){_0x4f612a['push'](_0x4f612a['shift']());}}}(a185_0x5c78,0x6051a));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a185_0xc4c5(_0x330ec4,_0x3baab1){_0x330ec4=_0x330ec4-0x1ba;const _0x5c782e=a185_0x5c78();let _0xc4c5ab=_0x5c782e[_0x330ec4];return _0xc4c5ab;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a185_0x5c78(){const _0x20f4be=['10XJpLHl','575471luBrNw','9296804nuBWKO','398105pECzXd','22099KYvAXF','3032164gOyyOq','747Xnryha','1168QEmkQP','96iWQoOf','6MRhBTR','2479707LNOGmU'];a185_0x5c78=function(){return _0x20f4be;};return a185_0x5c78();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a186_0x524f(){const _0x29815f=['\x20characters.','rabetbase\x20notification\x20config-list\x20--appcode\x20','every','boolean','5070968dGrqJc','a\x20string\x20or\x20null','notification_config_source_unavailable','13291443fCMbLm','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Create\x20JSON\x20requires\x20field\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','length','appCode','utf8','DINGTALK','notification_config_update_empty','prototype','882472NRBBjp','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','path','create','4858032pFYzfd','type','\x20is\x20invalid.','description','\x22\x20is\x20forbidden.','Notification\x20config\x20','file','\x22\x20must\x20be\x20a\x20non-empty\x20string.','7TfmdZw','file\x20','notification_config_field_forbidden','push','updateTime','2bxnRzM','Missing\x20notification\x20JSON\x20source.','number','configCode','Unknown\x20notification\x20JSON\x20field\x20\x22','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','name','WEBHOOK','\x22\x20cannot\x20exceed\x20','yes','replyTo','num','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','mutation','connectTimeout','1511070tjjryI','emailTargets','\x20has\x20an\x20unsupported\x20channelType.','\x20has\x20an\x20invalid\x20id.','setEncoding','call','endpointUrlRaw','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','bool','EMAIL','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','has','recipients','\x20--format\x20compress','<redacted>','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','string','readTimeout','kind','Item\x20','stdin','some','endpointUrl','keys','fromName','update','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x22channelType\x22.','str','env','Allowed\x20values:\x20','bccList','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','notification_config_confirmation_required','\x20has\x20an\x20invalid\x20appCode.','isSafeInteger','join','notification_config_channel_field_forbidden','Application-level\x20notification\x20config\x20ID','parse','11898HTIYoW','a\x20JSON\x20object','a\x20JSON\x20object\x20or\x20null','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20field\x20\x22','configName','\x20has\x20invalid\x20field\x20\x22','notification_config_field_unknown','\x20must\x20be\x20an\x20object.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','endpointUrl:null','channelType','\x20is\x20missing\x20required\x20field\x20\x22','\x20--type\x20','from-env','notification_config_response_invalid','channelConfig','1485zZLEkO','environment\x20variable\x20','validation','includes','stringify','notification_config_json_invalid','Invalid\x20notification\x20config\x20response.','notification_config_field_required','createTime','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','ccList','notification_config_id_invalid','trim','channelCode','notification_config_field_invalid','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Notification\x20JSON\x20from\x20','isArray','1335762nhHaVQ','object'];a186_0x524f=function(){return _0x29815f;};return a186_0x524f();}const a186_0x24a8d0=a186_0x4be6;(function(_0x4de708,_0x215510){const _0x2d846d=a186_0x4be6,_0x509a7e=_0x4de708();while(!![]){try{const _0x514a44=parseInt(_0x2d846d(0x1f0))/0x1*(parseInt(_0x2d846d(0x201))/0x2)+parseInt(_0x2d846d(0x1dc))/0x3+parseInt(_0x2d846d(0x1f4))/0x4+-parseInt(_0x2d846d(0x1ca))/0x5*(parseInt(_0x2d846d(0x1b9))/0x6)+-parseInt(_0x2d846d(0x1fc))/0x7*(-parseInt(_0x2d846d(0x1e2))/0x8)+-parseInt(_0x2d846d(0x1e5))/0x9+-parseInt(_0x2d846d(0x210))/0xa;if(_0x514a44===_0x215510)break;else _0x509a7e['push'](_0x509a7e['shift']());}catch(_0x14e065){_0x509a7e['push'](_0x509a7e['shift']());}}}(a186_0x524f,0xea2f4));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=[a186_0x24a8d0(0x219),'FEISHU',a186_0x24a8d0(0x1ed),'WECOM',a186_0x24a8d0(0x208)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a186_0x24a8d0(0x1be),a186_0x24a8d0(0x1c4),a186_0x24a8d0(0x1a7),a186_0x24a8d0(0x1c9),a186_0x24a8d0(0x1f7),a186_0x24a8d0(0x20f),a186_0x24a8d0(0x1a2)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode','configCode',a186_0x24a8d0(0x1d7)]),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x24a8d0(0x211),a186_0x24a8d0(0x19d),a186_0x24a8d0(0x1d4),a186_0x24a8d0(0x1b0),a186_0x24a8d0(0x20b),'subjectPrefix',a186_0x24a8d0(0x1a9),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':'string','required':![],'description':a186_0x24a8d0(0x20d)},{'name':'stdin','type':a186_0x24a8d0(0x1e1),'required':![],'default':![],'description':a186_0x24a8d0(0x1f1)},{'name':a186_0x24a8d0(0x1c7),'type':a186_0x24a8d0(0x1a1),'required':![],'description':a186_0x24a8d0(0x1e6)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a186_0x24a8d0(0x203),'required':!![],'description':a186_0x24a8d0(0x1b7)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2f70ef,_0x39927d,_0x2e2306){return new CliError(_0x2f70ef,0x1,_0x39927d,_0x2e2306);}export function readNotificationId(_0x44f0ab){const _0x87576e=a186_0x24a8d0,_0xc47c0=_0x44f0ab[_0x87576e(0x20c)]('id');if(!Number['isSafeInteger'](_0xc47c0)||_0xc47c0<=0x0)throw notificationError(_0x87576e(0x1d5),_0x87576e(0x1d3));return _0xc47c0;}export function requireNotificationExplicitYes(_0x5c6962){const _0x423e06=a186_0x24a8d0;if(_0x5c6962[_0x423e06(0x218)]('dry-run')||_0x5c6962[_0x423e06(0x218)](_0x423e06(0x20a)))return;throw notificationError(_0x423e06(0x1b2),_0x423e06(0x1b1),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x3ebbc4,_0x43d12f=a186_0x24a8d0(0x1f5),_0x4fe89d=a186_0x24a8d0(0x219)){const _0x30dc5e=a186_0x24a8d0,_0x6cce8e=_0x3ebbc4[_0x30dc5e(0x1ad)](_0x43d12f)['trim']()||_0x4fe89d;if(!NOTIFICATION_CHANNEL_TYPES[_0x30dc5e(0x1cd)](_0x6cce8e))throw CliErrors[_0x30dc5e(0x1cc)]('Invalid\x20--'+_0x43d12f+':\x20'+_0x6cce8e,_0x30dc5e(0x1af)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x6cce8e;}export function assertSingleNotificationSource(_0x58bbd1){const _0x247445=a186_0x24a8d0,_0x9bfec9=[],_0x484a44=_0x58bbd1[_0x247445(0x1ad)]('file')[_0x247445(0x1d6)]();if(_0x484a44)_0x9bfec9[_0x247445(0x1ff)]({'kind':'file','path':_0x484a44});if(_0x58bbd1['bool'](_0x247445(0x1a5)))_0x9bfec9[_0x247445(0x1ff)]({'kind':_0x247445(0x1a5)});const _0x56c555=_0x58bbd1['str']('from-env')[_0x247445(0x1d6)]();if(_0x56c555)_0x9bfec9[_0x247445(0x1ff)]({'kind':_0x247445(0x1ae),'name':_0x56c555});if(_0x9bfec9[_0x247445(0x1ea)]===0x0)throw CliErrors['validation'](_0x247445(0x202),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x9bfec9['length']>0x1)throw CliErrors['validation']('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x247445(0x1e9));return _0x9bfec9[0x0];}export async function readNotificationDocument(_0x44d1ea,_0x993e1e){const _0x332295=a186_0x24a8d0,_0x5b1df5=assertSingleNotificationSource(_0x44d1ea),_0x245a82=_0x5b1df5[_0x332295(0x1a3)]===_0x332295(0x1fa)?_0x332295(0x1fd)+_0x5b1df5[_0x332295(0x1f2)]:_0x5b1df5['kind']===_0x332295(0x1ae)?_0x332295(0x1cb)+_0x5b1df5[_0x332295(0x207)]:'stdin';let _0x37e051;try{if(_0x5b1df5[_0x332295(0x1a3)]===_0x332295(0x1fa))_0x37e051=await readFile(_0x5b1df5[_0x332295(0x1f2)],_0x332295(0x1ec));else{if(_0x5b1df5[_0x332295(0x1a3)]===_0x332295(0x1ae)){if(!(_0x5b1df5[_0x332295(0x207)]in process.env))throw notificationError('notification_config_source_unavailable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x5b1df5['name']);_0x37e051=process.env[_0x5b1df5.name]??'';}else _0x37e051=await readStdin();}}catch(_0x7bb10e){if(_0x7bb10e instanceof CliError)throw _0x7bb10e;throw notificationError(_0x332295(0x1e4),_0x332295(0x1c2)+_0x245a82+'.');}let _0x99a934;try{_0x99a934=JSON[_0x332295(0x1b8)](_0x37e051);}catch{throw notificationError(_0x332295(0x1cf),_0x332295(0x1da)+_0x245a82+_0x332295(0x1f6),_0x332295(0x1d9));}if(!isJsonObject(_0x99a934))throw notificationError(_0x332295(0x1cf),_0x332295(0x1da)+_0x245a82+_0x332295(0x1c1));return validateNotificationDocument(_0x99a934,_0x993e1e);}export function projectNotificationListConfig(_0x2d2ad6,_0x1d4317){const _0x17c42f=a186_0x24a8d0;return{'id':typeof _0x2d2ad6['id']===_0x17c42f(0x203)?_0x2d2ad6['id']:null,'configCode':requireResponseString(_0x2d2ad6['configCode'],_0x17c42f(0x204),_0x1d4317),'configName':requireResponseString(_0x2d2ad6['configName'],_0x17c42f(0x1be),_0x1d4317),'channelType':requireResponseString(_0x2d2ad6[_0x17c42f(0x1c4)],_0x17c42f(0x1c4),_0x1d4317),'description':normalizeNullableString(_0x2d2ad6[_0x17c42f(0x1f7)]),'createTime':normalizeNullableString(_0x2d2ad6[_0x17c42f(0x1d2)]),'updateTime':normalizeNullableString(_0x2d2ad6[_0x17c42f(0x200)])};}export function normalizeExactNotificationConfig(_0x5da4dc,_0x3677f0,_0x93fd16){const _0x137028=a186_0x24a8d0;if(!Number['isSafeInteger'](_0x5da4dc['id'])||_0x5da4dc['id']!==_0x3677f0)throw notificationError('notification_config_response_invalid',_0x137028(0x1e7)+_0x3677f0+'.');if(_0x5da4dc[_0x137028(0x1eb)]!==_0x93fd16)throw notificationError(_0x137028(0x1c8),_0x137028(0x1f9)+_0x3677f0+_0x137028(0x217));const _0x415fb6=requireExactString(_0x5da4dc[_0x137028(0x1be)],'configName',_0x3677f0),_0x3b79dc=requireExactString(_0x5da4dc[_0x137028(0x204)],_0x137028(0x204),_0x3677f0),_0xb76d9e=requireExactString(_0x5da4dc['channelType'],_0x137028(0x1c4),_0x3677f0);if(!NOTIFICATION_CHANNEL_TYPES[_0x137028(0x1cd)](_0xb76d9e))throw notificationError('notification_config_response_invalid',_0x137028(0x1f9)+_0x3677f0+_0x137028(0x212));const _0x5b1e50=responseNullableString(_0x5da4dc[_0x137028(0x1a7)],_0x137028(0x1a7),_0x3677f0),_0x452b50=responseNullableString(_0x5da4dc[_0x137028(0x1c9)],_0x137028(0x1c9),_0x3677f0),_0x38690a=responseNullableString(_0x5da4dc[_0x137028(0x1f7)],'description',_0x3677f0),_0x43a2e2=responseNullableTimeout(_0x5da4dc[_0x137028(0x20f)],_0x137028(0x20f),_0x3677f0),_0x5d7bd6=responseNullableTimeout(_0x5da4dc[_0x137028(0x1a2)],_0x137028(0x1a2),_0x3677f0);return{'id':_0x3677f0,'appCode':_0x93fd16,'configCode':_0x3b79dc,'configName':_0x415fb6,'channelType':_0xb76d9e,'endpointUrl':redactSensitive(_0x5b1e50),'channelConfig':redactSensitive(_0x452b50),'description':_0x38690a,'connectTimeout':_0x43a2e2,'readTimeout':_0x5d7bd6,'endpointUrlRaw':_0x5b1e50,'channelConfigRaw':_0x452b50};}export async function requireExactNotificationConfig(_0x344f3f,_0x51241d,_0x3b28df){const _0x36c17c=a186_0x24a8d0;let _0x4175d7;try{_0x4175d7=await getNotificationChannelConfig(_0x51241d,_0x344f3f);}catch{throw safeApiFailure(_0x3b28df,'preflight',_0x36c17c(0x1ab)+_0x344f3f+_0x36c17c(0x206));}return normalizeExactNotificationConfig(_0x4175d7,_0x51241d,_0x344f3f);}export function projectNotificationConfig(_0x475f9a){const _0x1ecab3=a186_0x24a8d0;return{'id':_0x475f9a['id']??null,'appCode':_0x475f9a[_0x1ecab3(0x1eb)],'configCode':_0x475f9a[_0x1ecab3(0x204)]??null,'configName':_0x475f9a[_0x1ecab3(0x1be)],'channelType':_0x475f9a[_0x1ecab3(0x1c4)],'endpointUrl':redactSensitive(_0x475f9a[_0x1ecab3(0x1a7)]),'channelConfig':redactSensitive(_0x475f9a[_0x1ecab3(0x1c9)]),'description':_0x475f9a['description']??null,'connectTimeout':_0x475f9a[_0x1ecab3(0x20f)]??null,'readTimeout':_0x475f9a[_0x1ecab3(0x1a2)]??null};}export function notificationSelector(_0x1b5c73){const _0x181445=a186_0x24a8d0;return{'appCode':_0x1b5c73['appCode'],'id':_0x1b5c73['id'],'configCode':_0x1b5c73[_0x181445(0x204)],'configName':_0x1b5c73[_0x181445(0x1be)],'channelType':_0x1b5c73[_0x181445(0x1c4)]};}export function createMutationInput(_0x2b8d8b,_0x1c7f6a){const _0x5b7f39=a186_0x24a8d0;return{'appCode':_0x2b8d8b,'configName':_0x1c7f6a['configName'],'channelType':_0x1c7f6a['channelType'],...hasOwn(_0x1c7f6a,_0x5b7f39(0x1a7))?{'endpointUrl':_0x1c7f6a[_0x5b7f39(0x1a7)]}:{},...hasOwn(_0x1c7f6a,_0x5b7f39(0x1c9))?{'channelConfig':serializeChannelConfig(_0x1c7f6a['channelConfig'])}:{},...hasOwn(_0x1c7f6a,_0x5b7f39(0x1f7))?{'description':_0x1c7f6a[_0x5b7f39(0x1f7)]}:{},...hasOwn(_0x1c7f6a,_0x5b7f39(0x20f))?{'connectTimeout':_0x1c7f6a['connectTimeout']}:{},...hasOwn(_0x1c7f6a,_0x5b7f39(0x1a2))?{'readTimeout':_0x1c7f6a['readTimeout']}:{}};}export function mergeUpdateInput(_0x4bc771,_0x21832b){const _0x4ecbe6=a186_0x24a8d0;return{'id':_0x4bc771['id'],'appCode':_0x4bc771[_0x4ecbe6(0x1eb)],'configName':_0x21832b['configName']??_0x4bc771[_0x4ecbe6(0x1be)],'channelType':_0x21832b['channelType']??_0x4bc771[_0x4ecbe6(0x1c4)],'endpointUrl':hasOwn(_0x21832b,_0x4ecbe6(0x1a7))?_0x21832b[_0x4ecbe6(0x1a7)]:_0x4bc771[_0x4ecbe6(0x216)],'channelConfig':hasOwn(_0x21832b,_0x4ecbe6(0x1c9))?serializeChannelConfig(_0x21832b[_0x4ecbe6(0x1c9)]):_0x4bc771['channelConfigRaw'],'description':hasOwn(_0x21832b,_0x4ecbe6(0x1f7))?_0x21832b['description']:_0x4bc771[_0x4ecbe6(0x1f7)],'connectTimeout':hasOwn(_0x21832b,_0x4ecbe6(0x20f))?_0x21832b[_0x4ecbe6(0x20f)]:_0x4bc771[_0x4ecbe6(0x20f)],'readTimeout':hasOwn(_0x21832b,_0x4ecbe6(0x1a2))?_0x21832b[_0x4ecbe6(0x1a2)]:_0x4bc771[_0x4ecbe6(0x1a2)]};}export function plannedUpdateProjection(_0x2476d4,_0x5dcde6){const _0x3cf652=a186_0x24a8d0;return projectNotificationConfig({'id':_0x2476d4['id'],'appCode':_0x2476d4[_0x3cf652(0x1eb)],'configCode':_0x2476d4[_0x3cf652(0x204)],'configName':_0x5dcde6['configName']??_0x2476d4[_0x3cf652(0x1be)],'channelType':_0x5dcde6[_0x3cf652(0x1c4)]??_0x2476d4['channelType'],'endpointUrl':hasOwn(_0x5dcde6,_0x3cf652(0x1a7))?_0x5dcde6[_0x3cf652(0x1a7)]:_0x2476d4[_0x3cf652(0x216)],'channelConfig':hasOwn(_0x5dcde6,_0x3cf652(0x1c9))?_0x5dcde6[_0x3cf652(0x1c9)]:_0x2476d4['channelConfigRaw'],'description':hasOwn(_0x5dcde6,'description')?_0x5dcde6['description']:_0x2476d4[_0x3cf652(0x1f7)],'connectTimeout':hasOwn(_0x5dcde6,_0x3cf652(0x20f))?_0x5dcde6[_0x3cf652(0x20f)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2476d4[_0x3cf652(0x20f)],'readTimeout':hasOwn(_0x5dcde6,_0x3cf652(0x1a2))?_0x5dcde6['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2476d4['readTimeout']});}export function requestedSafeFieldsMatch(_0x3153f2,_0x20914e,_0x455202){const _0x3fcab1=a186_0x24a8d0,_0x198490=[],_0x525b14=[],_0x170c1d=[];for(const _0x1d9a4c of[_0x3fcab1(0x1be),_0x3fcab1(0x1c4),'description']){if(!hasOwn(_0x455202,_0x1d9a4c))continue;_0x170c1d[_0x3fcab1(0x1ff)](_0x1d9a4c),_0x198490[_0x3fcab1(0x1ff)](_0x20914e[_0x1d9a4c]===_0x455202[_0x1d9a4c]),_0x525b14[_0x3fcab1(0x1ff)](_0x3153f2[_0x1d9a4c]!==_0x455202[_0x1d9a4c]&&_0x20914e[_0x1d9a4c]===_0x455202[_0x1d9a4c]);}for(const _0xb2cd82 of['connectTimeout',_0x3fcab1(0x1a2)]){if(!hasOwn(_0x455202,_0xb2cd82))continue;const _0x1c905a=_0x455202[_0xb2cd82]??(_0xb2cd82===_0x3fcab1(0x20f)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x170c1d[_0x3fcab1(0x1ff)](_0xb2cd82),_0x198490['push'](_0x20914e[_0xb2cd82]===_0x1c905a),_0x525b14[_0x3fcab1(0x1ff)](_0x3153f2[_0xb2cd82]!==_0x1c905a&&_0x20914e[_0xb2cd82]===_0x1c905a);}return hasOwn(_0x455202,_0x3fcab1(0x1a7))&&_0x455202[_0x3fcab1(0x1a7)]===null&&(_0x170c1d[_0x3fcab1(0x1ff)](_0x3fcab1(0x1c3)),_0x198490['push'](_0x20914e[_0x3fcab1(0x216)]===null||_0x20914e['endpointUrlRaw']===''),_0x525b14['push'](_0x3153f2['endpointUrlRaw']!==null&&_0x3153f2[_0x3fcab1(0x216)]!==''&&(_0x20914e[_0x3fcab1(0x216)]===null||_0x20914e[_0x3fcab1(0x216)]===''))),{'allMatch':_0x198490[_0x3fcab1(0x1e0)](Boolean),'provesChange':_0x525b14[_0x3fcab1(0x1a6)](Boolean),'verifiedFields':_0x170c1d};}export function validateNotificationDeleteReadback(_0x87acbf,_0x1cf0b3,_0x1a66f7){const _0x5e1abe=a186_0x24a8d0;for(const [_0x2ebd1b,_0x436496]of _0x87acbf['entries']()){if(!Number['isSafeInteger'](_0x436496['id'])||_0x436496['id']<=0x0)throw notificationError(_0x5e1abe(0x1c8),_0x5e1abe(0x1bc)+(_0x2ebd1b+0x1)+_0x5e1abe(0x213));if(_0x436496[_0x5e1abe(0x1eb)]!==_0x1cf0b3)throw notificationError('notification_config_response_invalid',_0x5e1abe(0x1bc)+(_0x2ebd1b+0x1)+_0x5e1abe(0x1b3));if(_0x436496[_0x5e1abe(0x1c4)]!==_0x1a66f7)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x2ebd1b+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x21d087,_0x2211b0,_0x214a32){const _0x3e4819=a186_0x24a8d0;return notificationError('notification_config_'+_0x21d087+'_'+(_0x2211b0===_0x3e4819(0x20e)?'failed':_0x2211b0+'_unavailable'),'Notification\x20config\x20'+_0x21d087+'\x20'+_0x2211b0+'\x20failed.',_0x214a32);}export function notificationLookupCommand(_0x2eee51,_0x4a817d){const _0x323936=a186_0x24a8d0;return _0x323936(0x1df)+_0x2eee51+_0x323936(0x1c6)+_0x4a817d+_0x323936(0x19e);}function validateNotificationDocument(_0x12ade0,_0x2aa91e){const _0x10b3a2=a186_0x24a8d0;for(const _0x257abc of Object[_0x10b3a2(0x1a8)](_0x12ade0)){if(FORBIDDEN_IDENTITY_FIELDS[_0x10b3a2(0x19c)](_0x257abc))throw notificationError(_0x10b3a2(0x1fe),_0x10b3a2(0x1bd)+_0x257abc+_0x10b3a2(0x1a0));if(!ALLOWED_INPUT_FIELDS[_0x10b3a2(0x19c)](_0x257abc))throw notificationError(_0x10b3a2(0x1c0),_0x10b3a2(0x205)+_0x257abc+'\x22.');}if(_0x2aa91e===_0x10b3a2(0x1aa)&&Object['keys'](_0x12ade0)[_0x10b3a2(0x1ea)]===0x0)throw notificationError(_0x10b3a2(0x1ee),_0x10b3a2(0x19b));const _0x2ed31e={};if(hasOwn(_0x12ade0,_0x10b3a2(0x1be)))_0x2ed31e['configName']=validateRequiredString(_0x12ade0[_0x10b3a2(0x1be)],_0x10b3a2(0x1be),0x80);else{if(_0x2aa91e==='create')throw notificationError(_0x10b3a2(0x1d1),'Create\x20JSON\x20requires\x20field\x20'+'\x22configName\x22.');}if(hasOwn(_0x12ade0,'channelType')){if(typeof _0x12ade0[_0x10b3a2(0x1c4)]!==_0x10b3a2(0x1a1))throw invalidFieldType(_0x10b3a2(0x1c4),'a\x20supported\x20string');const _0x243e61=_0x12ade0[_0x10b3a2(0x1c4)][_0x10b3a2(0x1d6)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x10b3a2(0x1cd)](_0x243e61))throw notificationError(_0x10b3a2(0x1d8),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x10b3a2(0x1af)+NOTIFICATION_CHANNEL_TYPES[_0x10b3a2(0x1b5)](',\x20')+'.');_0x2ed31e[_0x10b3a2(0x1c4)]=_0x243e61;}else{if(_0x2aa91e===_0x10b3a2(0x1f3))throw notificationError(_0x10b3a2(0x1d1),_0x10b3a2(0x1e8)+_0x10b3a2(0x1ac));}for(const [_0x52a0ff,_0x296bf6]of[[_0x10b3a2(0x1a7),0x200],['description',0x100]]){if(!hasOwn(_0x12ade0,_0x52a0ff))continue;const _0x3b77b1=_0x12ade0[_0x52a0ff];if(_0x3b77b1!==null&&typeof _0x3b77b1!==_0x10b3a2(0x1a1))throw invalidFieldType(_0x52a0ff,_0x10b3a2(0x1e3));if(typeof _0x3b77b1==='string'&&_0x3b77b1[_0x10b3a2(0x1ea)]>_0x296bf6)throw notificationError('notification_config_field_invalid',_0x10b3a2(0x1bd)+_0x52a0ff+_0x10b3a2(0x209)+_0x296bf6+_0x10b3a2(0x1de));_0x2ed31e[_0x52a0ff]=_0x3b77b1;}if(hasOwn(_0x12ade0,'channelConfig')){const _0x4dce48=_0x12ade0['channelConfig'];if(_0x4dce48===null&&_0x2aa91e===_0x10b3a2(0x1f3))throw invalidFieldType('channelConfig',_0x10b3a2(0x1ba));if(_0x4dce48!==null&&!isJsonObject(_0x4dce48))throw invalidFieldType(_0x10b3a2(0x1c9),_0x2aa91e==='update'?_0x10b3a2(0x1bb):_0x10b3a2(0x1ba));_0x4dce48!==null&&validateChannelConfigFields(_0x2ed31e[_0x10b3a2(0x1c4)],_0x4dce48),_0x2ed31e[_0x10b3a2(0x1c9)]=_0x4dce48;}for(const _0x18d720 of['connectTimeout','readTimeout']){if(!hasOwn(_0x12ade0,_0x18d720))continue;const _0x112d63=_0x12ade0[_0x18d720];if(_0x112d63!==null&&(!Number[_0x10b3a2(0x1b4)](_0x112d63)||_0x112d63<0x0))throw notificationError(_0x10b3a2(0x1d8),_0x10b3a2(0x1bd)+_0x18d720+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x2ed31e[_0x18d720]=_0x112d63;}return _0x2ed31e;}function validateRequiredString(_0x28dc89,_0x37f5d9,_0xa5e3af){const _0x353b8c=a186_0x24a8d0;if(typeof _0x28dc89!=='string')throw invalidFieldType(_0x37f5d9,'a\x20non-empty\x20string');const _0x47575c=_0x28dc89['trim']();if(!_0x47575c)throw notificationError('notification_config_field_invalid',_0x353b8c(0x1bd)+_0x37f5d9+_0x353b8c(0x1fb));if(_0x47575c[_0x353b8c(0x1ea)]>_0xa5e3af)throw notificationError(_0x353b8c(0x1d8),_0x353b8c(0x1bd)+_0x37f5d9+'\x22\x20cannot\x20exceed\x20'+_0xa5e3af+_0x353b8c(0x1de));return _0x47575c;}function validateChannelConfigFields(_0xc6ef5b,_0x401376){const _0x38d600=a186_0x24a8d0;if(hasOwn(_0x401376,'messageTemplate'))throw forbiddenChannelConfigField('messageTemplate');if(_0xc6ef5b===_0x38d600(0x219))for(const _0x35c5d2 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x401376,_0x35c5d2))throw forbiddenChannelConfigField(_0x35c5d2);}}function forbiddenChannelConfigField(_0x43e777){const _0x3f5de0=a186_0x24a8d0;return notificationError(_0x3f5de0(0x1b6),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x43e777+_0x3f5de0(0x1f8));}function invalidFieldType(_0x301346,_0x2ef3f){const _0x43d5ad=a186_0x24a8d0;return notificationError(_0x43d5ad(0x1d8),'Notification\x20JSON\x20field\x20\x22'+_0x301346+'\x22\x20must\x20be\x20'+_0x2ef3f+'.');}function serializeChannelConfig(_0xd539ab){const _0x1a3b3d=a186_0x24a8d0;return _0xd539ab===null||_0xd539ab===undefined?null:JSON[_0x1a3b3d(0x1ce)](_0xd539ab);}function redactSensitive(_0x206de8){const _0x205611=a186_0x24a8d0;return _0x206de8===null||_0x206de8===undefined||_0x206de8===''?null:_0x205611(0x19f);}function requireResponseString(_0x53373e,_0x319819,_0x1640fb){const _0x43ac29=a186_0x24a8d0;if(typeof _0x53373e!==_0x43ac29(0x1a1)||_0x53373e[_0x43ac29(0x1d6)]()==='')throw CliErrors['apiError'](_0x43ac29(0x1d0),_0x43ac29(0x1a4)+(_0x1640fb+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x319819+'\x22.');return _0x53373e['trim']();}function requireExactString(_0x18a471,_0x49c032,_0x4cd65c){const _0x1b8354=a186_0x24a8d0;if(typeof _0x18a471!==_0x1b8354(0x1a1)||_0x18a471[_0x1b8354(0x1d6)]()==='')throw notificationError(_0x1b8354(0x1c8),_0x1b8354(0x1f9)+_0x4cd65c+_0x1b8354(0x1c5)+_0x49c032+'\x22.');return _0x18a471[_0x1b8354(0x1d6)]();}function responseNullableString(_0xc7bfe5,_0x21c2fd,_0x16959d){const _0xf94a3a=a186_0x24a8d0;if(_0xc7bfe5===undefined||_0xc7bfe5===null)return null;if(typeof _0xc7bfe5!==_0xf94a3a(0x1a1))throw notificationError(_0xf94a3a(0x1c8),_0xf94a3a(0x1f9)+_0x16959d+_0xf94a3a(0x1bf)+_0x21c2fd+'\x22.');return _0xc7bfe5;}function a186_0x4be6(_0x10ec79,_0x2d8789){_0x10ec79=_0x10ec79-0x19b;const _0x524f19=a186_0x524f();let _0x4be621=_0x524f19[_0x10ec79];return _0x4be621;}function responseNullableTimeout(_0x1515ae,_0x184208,_0x4942c2){const _0x16a723=a186_0x24a8d0;if(_0x1515ae===undefined||_0x1515ae===null)return null;if(!Number['isSafeInteger'](_0x1515ae)||_0x1515ae<0x0)throw notificationError(_0x16a723(0x1c8),'Notification\x20config\x20'+_0x4942c2+'\x20has\x20invalid\x20field\x20\x22'+_0x184208+'\x22.');return _0x1515ae;}function normalizeNullableString(_0x4939bd){const _0x2a5c38=a186_0x24a8d0;return typeof _0x4939bd===_0x2a5c38(0x1a1)?_0x4939bd:null;}function isJsonObject(_0x22654c){const _0x45097b=a186_0x24a8d0;return _0x22654c!==null&&typeof _0x22654c===_0x45097b(0x1dd)&&!Array[_0x45097b(0x1db)](_0x22654c);}function hasOwn(_0x35793a,_0x2ca999){const _0x46539e=a186_0x24a8d0;return Object[_0x46539e(0x1ef)]['hasOwnProperty'][_0x46539e(0x215)](_0x35793a,_0x2ca999);}async function readStdin(){const _0x528f8a=a186_0x24a8d0;let _0x331569='';process[_0x528f8a(0x1a5)][_0x528f8a(0x214)](_0x528f8a(0x1ec));for await(const _0x346c6f of process[_0x528f8a(0x1a5)])_0x331569+=_0x346c6f;return _0x331569;}
|
|
1
|
+
const a186_0x89cf5a=a186_0x1644;(function(_0x1b9854,_0x39e182){const _0x4cf98a=a186_0x1644,_0x2674e2=_0x1b9854();while(!![]){try{const _0x23c79c=-parseInt(_0x4cf98a(0x1b7))/0x1*(parseInt(_0x4cf98a(0x1dc))/0x2)+-parseInt(_0x4cf98a(0x1ac))/0x3*(-parseInt(_0x4cf98a(0x1c5))/0x4)+-parseInt(_0x4cf98a(0x1d5))/0x5*(parseInt(_0x4cf98a(0x1d3))/0x6)+parseInt(_0x4cf98a(0x1f4))/0x7*(parseInt(_0x4cf98a(0x19b))/0x8)+parseInt(_0x4cf98a(0x1f2))/0x9*(-parseInt(_0x4cf98a(0x1de))/0xa)+parseInt(_0x4cf98a(0x1df))/0xb+parseInt(_0x4cf98a(0x1c9))/0xc*(-parseInt(_0x4cf98a(0x198))/0xd);if(_0x23c79c===_0x39e182)break;else _0x2674e2['push'](_0x2674e2['shift']());}catch(_0x1e7ac1){_0x2674e2['push'](_0x2674e2['shift']());}}}(a186_0x34f0,0x93769));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=[a186_0x89cf5a(0x1bf),a186_0x89cf5a(0x1a0),a186_0x89cf5a(0x1ec),a186_0x89cf5a(0x216),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName',a186_0x89cf5a(0x1ba),a186_0x89cf5a(0x1e1),a186_0x89cf5a(0x212),a186_0x89cf5a(0x1b3),'connectTimeout',a186_0x89cf5a(0x1c0)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a186_0x89cf5a(0x1ad),a186_0x89cf5a(0x1f0),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x89cf5a(0x1f9),a186_0x89cf5a(0x1a1),a186_0x89cf5a(0x1fd),a186_0x89cf5a(0x1b1),a186_0x89cf5a(0x206),'subjectPrefix',a186_0x89cf5a(0x205),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a186_0x89cf5a(0x1cd),'type':a186_0x89cf5a(0x1ab),'required':![],'description':a186_0x89cf5a(0x1b8)},{'name':a186_0x89cf5a(0x1a4),'type':a186_0x89cf5a(0x1e3),'required':![],'default':![],'description':a186_0x89cf5a(0x219)},{'name':a186_0x89cf5a(0x1ee),'type':a186_0x89cf5a(0x1ab),'required':![],'description':a186_0x89cf5a(0x1ed)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a186_0x89cf5a(0x1c7),'required':!![],'description':a186_0x89cf5a(0x197)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a186_0x34f0(){const _0x204a52=['a\x20supported\x20string','\x22channelType\x22.','Notification\x20config\x20list\x20item\x20','Application-level\x20notification\x20config\x20ID','13DhEUtX','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','dry-run','16PVDYZU','includes','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','preflight','has','FEISHU','recipients','\x22\x20is\x20forbidden.','num','stdin','Invalid\x20notification\x20config\x20response.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x20--format\x20compress','\x22configName\x22.','a\x20string\x20or\x20null','name','string','3ixWMHY','appCode','yes','stringify','path','bccList','\x20has\x20invalid\x20field\x20\x22','description','kind','notification_config_field_unknown','notification_config_confirmation_required','383419zWKRjo','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','environment\x20variable\x20','channelType','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20must\x20be\x20an\x20object.','messageTemplate','Item\x20','EMAIL','readTimeout','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Notification\x20JSON\x20field\x20\x22','notification_config_source_unavailable','\x20is\x20invalid.','3900604alDGZq','createTime','number','notification_config_json_invalid','6556692zhrdIL','\x20has\x20an\x20invalid\x20id.','\x22\x20cannot\x20exceed\x20','Create\x20JSON\x20requires\x20field\x20','file','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x20--type\x20','\x20is\x20missing\x20required\x20field\x20\x22','\x20characters.','isSafeInteger','15522JdmKiI','env','455jiLIrR','failed','channelConfigRaw','push','\x20has\x20an\x20invalid\x20channelType.','notification_config_field_required','\x20has\x20an\x20unsupported\x20channelType.','2QoPDJq','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','10110zRLxUD','11434489hTbGRM','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','endpointUrl','endpointUrlRaw','boolean','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','<redacted>','configName','Notification\x20config\x20','_unavailable','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','object','call','DINGTALK','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','from-env','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','configCode','notification_config_field_invalid','6138swbCaB','isArray','1554308DWdMuc','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x22\x20must\x20be\x20','entries','emailTargets','notification_config_channel_field_forbidden','Allowed\x20values:\x20','bool','ccList','str','notification_config_id_invalid','type','file\x20','updateTime','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','fromName','replyTo','endpointUrl:null','connectTimeout','validation','update','parse','some','setEncoding','Invalid\x20--','join','every','trim','channelConfig','\x22\x20must\x20be\x20a\x20non-empty\x20string.','utf8','notification_config_response_invalid','WECOM','apiError','create','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','notification_config_','keys','a\x20JSON\x20object','prototype','notification_config_update_empty','length'];a186_0x34f0=function(){return _0x204a52;};return a186_0x34f0();}export function notificationError(_0x595ee1,_0x1bf6a0,_0x361bf0){return new CliError(_0x595ee1,0x1,_0x1bf6a0,_0x361bf0);}export function readNotificationId(_0x26f95f){const _0x3fccb4=a186_0x89cf5a,_0x23e534=_0x26f95f[_0x3fccb4(0x1a3)]('id');if(!Number[_0x3fccb4(0x1d2)](_0x23e534)||_0x23e534<=0x0)throw notificationError(_0x3fccb4(0x1ff),_0x3fccb4(0x1e0));return _0x23e534;}export function requireNotificationExplicitYes(_0x39c2ca){const _0x572ea6=a186_0x89cf5a;if(_0x39c2ca[_0x572ea6(0x1fc)](_0x572ea6(0x19a))||_0x39c2ca[_0x572ea6(0x1fc)](_0x572ea6(0x1ae)))return;throw notificationError(_0x572ea6(0x1b6),_0x572ea6(0x199),_0x572ea6(0x19d));}export function readNotificationChannelType(_0x42ac9a,_0x1c234b=a186_0x89cf5a(0x200),_0x321a92=a186_0x89cf5a(0x1bf)){const _0x8f0a82=a186_0x89cf5a,_0x310715=_0x42ac9a[_0x8f0a82(0x1fe)](_0x1c234b)[_0x8f0a82(0x211)]()||_0x321a92;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x310715))throw CliErrors[_0x8f0a82(0x209)](_0x8f0a82(0x20e)+_0x1c234b+':\x20'+_0x310715,_0x8f0a82(0x1fb)+NOTIFICATION_CHANNEL_TYPES[_0x8f0a82(0x20f)](',\x20')+'.');return _0x310715;}export function assertSingleNotificationSource(_0x372dcf){const _0x5044d1=a186_0x89cf5a,_0xdf748f=[],_0x5634db=_0x372dcf[_0x5044d1(0x1fe)](_0x5044d1(0x1cd))[_0x5044d1(0x211)]();if(_0x5634db)_0xdf748f[_0x5044d1(0x1d8)]({'kind':'file','path':_0x5634db});if(_0x372dcf['bool'](_0x5044d1(0x1a4)))_0xdf748f[_0x5044d1(0x1d8)]({'kind':_0x5044d1(0x1a4)});const _0x5cded7=_0x372dcf[_0x5044d1(0x1fe)](_0x5044d1(0x1ee))[_0x5044d1(0x211)]();if(_0x5cded7)_0xdf748f[_0x5044d1(0x1d8)]({'kind':_0x5044d1(0x1d4),'name':_0x5cded7});if(_0xdf748f['length']===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x5044d1(0x1ef));if(_0xdf748f['length']>0x1)throw CliErrors[_0x5044d1(0x209)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x5044d1(0x1ef));return _0xdf748f[0x0];}export async function readNotificationDocument(_0x5d7205,_0x558c35){const _0x45d124=a186_0x89cf5a,_0x2eb963=assertSingleNotificationSource(_0x5d7205),_0x5341e5=_0x2eb963[_0x45d124(0x1b4)]===_0x45d124(0x1cd)?_0x45d124(0x201)+_0x2eb963[_0x45d124(0x1b0)]:_0x2eb963[_0x45d124(0x1b4)]==='env'?_0x45d124(0x1b9)+_0x2eb963[_0x45d124(0x1aa)]:_0x45d124(0x1a4);let _0x4b2c26;try{if(_0x2eb963[_0x45d124(0x1b4)]==='file')_0x4b2c26=await readFile(_0x2eb963[_0x45d124(0x1b0)],_0x45d124(0x214));else{if(_0x2eb963[_0x45d124(0x1b4)]===_0x45d124(0x1d4)){if(!(_0x2eb963[_0x45d124(0x1aa)]in process.env))throw notificationError('notification_config_source_unavailable',_0x45d124(0x1c1)+_0x2eb963[_0x45d124(0x1aa)]);_0x4b2c26=process.env[_0x2eb963.name]??'';}else _0x4b2c26=await readStdin();}}catch(_0x273fdc){if(_0x273fdc instanceof CliError)throw _0x273fdc;throw notificationError(_0x45d124(0x1c3),_0x45d124(0x1dd)+_0x5341e5+'.');}let _0x43caca;try{_0x43caca=JSON[_0x45d124(0x20b)](_0x4b2c26);}catch{throw notificationError(_0x45d124(0x1c8),'Notification\x20JSON\x20from\x20'+_0x5341e5+_0x45d124(0x1c4),_0x45d124(0x1f6));}if(!isJsonObject(_0x43caca))throw notificationError(_0x45d124(0x1c8),'Notification\x20JSON\x20from\x20'+_0x5341e5+_0x45d124(0x1bc));return validateNotificationDocument(_0x43caca,_0x558c35);}export function projectNotificationListConfig(_0x524c3c,_0x534c98){const _0x2309cc=a186_0x89cf5a;return{'id':typeof _0x524c3c['id']===_0x2309cc(0x1c7)?_0x524c3c['id']:null,'configCode':requireResponseString(_0x524c3c[_0x2309cc(0x1f0)],_0x2309cc(0x1f0),_0x534c98),'configName':requireResponseString(_0x524c3c[_0x2309cc(0x1e6)],_0x2309cc(0x1e6),_0x534c98),'channelType':requireResponseString(_0x524c3c['channelType'],'channelType',_0x534c98),'description':normalizeNullableString(_0x524c3c['description']),'createTime':normalizeNullableString(_0x524c3c[_0x2309cc(0x1c6)]),'updateTime':normalizeNullableString(_0x524c3c[_0x2309cc(0x202)])};}export function normalizeExactNotificationConfig(_0x2dbc2a,_0x82b5d2,_0x2b58d3){const _0x6e5fc6=a186_0x89cf5a;if(!Number[_0x6e5fc6(0x1d2)](_0x2dbc2a['id'])||_0x2dbc2a['id']!==_0x82b5d2)throw notificationError(_0x6e5fc6(0x215),_0x6e5fc6(0x1f5)+_0x82b5d2+'.');if(_0x2dbc2a[_0x6e5fc6(0x1ad)]!==_0x2b58d3)throw notificationError(_0x6e5fc6(0x215),_0x6e5fc6(0x1e7)+_0x82b5d2+_0x6e5fc6(0x1a6));const _0x193698=requireExactString(_0x2dbc2a[_0x6e5fc6(0x1e6)],_0x6e5fc6(0x1e6),_0x82b5d2),_0x2ec148=requireExactString(_0x2dbc2a[_0x6e5fc6(0x1f0)],_0x6e5fc6(0x1f0),_0x82b5d2),_0x1bba2c=requireExactString(_0x2dbc2a[_0x6e5fc6(0x1ba)],'channelType',_0x82b5d2);if(!NOTIFICATION_CHANNEL_TYPES[_0x6e5fc6(0x19c)](_0x1bba2c))throw notificationError('notification_config_response_invalid',_0x6e5fc6(0x1e7)+_0x82b5d2+_0x6e5fc6(0x1db));const _0x5f2c0e=responseNullableString(_0x2dbc2a[_0x6e5fc6(0x1e1)],'endpointUrl',_0x82b5d2),_0x304e86=responseNullableString(_0x2dbc2a['channelConfig'],_0x6e5fc6(0x212),_0x82b5d2),_0x1b0900=responseNullableString(_0x2dbc2a['description'],'description',_0x82b5d2),_0x36fea8=responseNullableTimeout(_0x2dbc2a[_0x6e5fc6(0x208)],_0x6e5fc6(0x208),_0x82b5d2),_0x5a5dd8=responseNullableTimeout(_0x2dbc2a[_0x6e5fc6(0x1c0)],_0x6e5fc6(0x1c0),_0x82b5d2);return{'id':_0x82b5d2,'appCode':_0x2b58d3,'configCode':_0x2ec148,'configName':_0x193698,'channelType':_0x1bba2c,'endpointUrl':redactSensitive(_0x5f2c0e),'channelConfig':redactSensitive(_0x304e86),'description':_0x1b0900,'connectTimeout':_0x36fea8,'readTimeout':_0x5a5dd8,'endpointUrlRaw':_0x5f2c0e,'channelConfigRaw':_0x304e86};}export async function requireExactNotificationConfig(_0x39b1b4,_0x1187e2,_0x453c18){const _0x21cc76=a186_0x89cf5a;let _0x555abe;try{_0x555abe=await getNotificationChannelConfig(_0x1187e2,_0x39b1b4);}catch{throw safeApiFailure(_0x453c18,_0x21cc76(0x19e),_0x21cc76(0x1bb)+_0x39b1b4+_0x21cc76(0x203));}return normalizeExactNotificationConfig(_0x555abe,_0x1187e2,_0x39b1b4);}export function projectNotificationConfig(_0x36eee2){const _0x4ea3c6=a186_0x89cf5a;return{'id':_0x36eee2['id']??null,'appCode':_0x36eee2['appCode'],'configCode':_0x36eee2[_0x4ea3c6(0x1f0)]??null,'configName':_0x36eee2['configName'],'channelType':_0x36eee2[_0x4ea3c6(0x1ba)],'endpointUrl':redactSensitive(_0x36eee2[_0x4ea3c6(0x1e1)]),'channelConfig':redactSensitive(_0x36eee2[_0x4ea3c6(0x212)]),'description':_0x36eee2[_0x4ea3c6(0x1b3)]??null,'connectTimeout':_0x36eee2['connectTimeout']??null,'readTimeout':_0x36eee2['readTimeout']??null};}export function notificationSelector(_0x2af966){const _0x1bcbea=a186_0x89cf5a;return{'appCode':_0x2af966[_0x1bcbea(0x1ad)],'id':_0x2af966['id'],'configCode':_0x2af966[_0x1bcbea(0x1f0)],'configName':_0x2af966[_0x1bcbea(0x1e6)],'channelType':_0x2af966[_0x1bcbea(0x1ba)]};}export function createMutationInput(_0x23ba9e,_0x54a571){const _0x15deed=a186_0x89cf5a;return{'appCode':_0x23ba9e,'configName':_0x54a571[_0x15deed(0x1e6)],'channelType':_0x54a571[_0x15deed(0x1ba)],...hasOwn(_0x54a571,_0x15deed(0x1e1))?{'endpointUrl':_0x54a571[_0x15deed(0x1e1)]}:{},...hasOwn(_0x54a571,_0x15deed(0x212))?{'channelConfig':serializeChannelConfig(_0x54a571[_0x15deed(0x212)])}:{},...hasOwn(_0x54a571,_0x15deed(0x1b3))?{'description':_0x54a571[_0x15deed(0x1b3)]}:{},...hasOwn(_0x54a571,_0x15deed(0x208))?{'connectTimeout':_0x54a571[_0x15deed(0x208)]}:{},...hasOwn(_0x54a571,_0x15deed(0x1c0))?{'readTimeout':_0x54a571[_0x15deed(0x1c0)]}:{}};}function a186_0x1644(_0x34605a,_0x5cd53f){_0x34605a=_0x34605a-0x193;const _0x34f038=a186_0x34f0();let _0x1644d4=_0x34f038[_0x34605a];return _0x1644d4;}export function mergeUpdateInput(_0x5ee2a3,_0x509d79){const _0x39d938=a186_0x89cf5a;return{'id':_0x5ee2a3['id'],'appCode':_0x5ee2a3['appCode'],'configName':_0x509d79[_0x39d938(0x1e6)]??_0x5ee2a3[_0x39d938(0x1e6)],'channelType':_0x509d79['channelType']??_0x5ee2a3['channelType'],'endpointUrl':hasOwn(_0x509d79,_0x39d938(0x1e1))?_0x509d79[_0x39d938(0x1e1)]:_0x5ee2a3[_0x39d938(0x1e2)],'channelConfig':hasOwn(_0x509d79,'channelConfig')?serializeChannelConfig(_0x509d79[_0x39d938(0x212)]):_0x5ee2a3[_0x39d938(0x1d7)],'description':hasOwn(_0x509d79,_0x39d938(0x1b3))?_0x509d79['description']:_0x5ee2a3['description'],'connectTimeout':hasOwn(_0x509d79,_0x39d938(0x208))?_0x509d79[_0x39d938(0x208)]:_0x5ee2a3[_0x39d938(0x208)],'readTimeout':hasOwn(_0x509d79,_0x39d938(0x1c0))?_0x509d79['readTimeout']:_0x5ee2a3[_0x39d938(0x1c0)]};}export function plannedUpdateProjection(_0x2e763d,_0x17e75b){const _0x25e983=a186_0x89cf5a;return projectNotificationConfig({'id':_0x2e763d['id'],'appCode':_0x2e763d['appCode'],'configCode':_0x2e763d['configCode'],'configName':_0x17e75b[_0x25e983(0x1e6)]??_0x2e763d[_0x25e983(0x1e6)],'channelType':_0x17e75b[_0x25e983(0x1ba)]??_0x2e763d[_0x25e983(0x1ba)],'endpointUrl':hasOwn(_0x17e75b,_0x25e983(0x1e1))?_0x17e75b[_0x25e983(0x1e1)]:_0x2e763d['endpointUrlRaw'],'channelConfig':hasOwn(_0x17e75b,'channelConfig')?_0x17e75b[_0x25e983(0x212)]:_0x2e763d[_0x25e983(0x1d7)],'description':hasOwn(_0x17e75b,_0x25e983(0x1b3))?_0x17e75b[_0x25e983(0x1b3)]:_0x2e763d[_0x25e983(0x1b3)],'connectTimeout':hasOwn(_0x17e75b,'connectTimeout')?_0x17e75b['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2e763d['connectTimeout'],'readTimeout':hasOwn(_0x17e75b,_0x25e983(0x1c0))?_0x17e75b[_0x25e983(0x1c0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2e763d[_0x25e983(0x1c0)]});}export function requestedSafeFieldsMatch(_0x444618,_0x5bb8c7,_0x4cebf0){const _0x452fcb=a186_0x89cf5a,_0x44f8af=[],_0x69b072=[],_0x5b2739=[];for(const _0x36d011 of['configName',_0x452fcb(0x1ba),'description']){if(!hasOwn(_0x4cebf0,_0x36d011))continue;_0x5b2739[_0x452fcb(0x1d8)](_0x36d011),_0x44f8af[_0x452fcb(0x1d8)](_0x5bb8c7[_0x36d011]===_0x4cebf0[_0x36d011]),_0x69b072[_0x452fcb(0x1d8)](_0x444618[_0x36d011]!==_0x4cebf0[_0x36d011]&&_0x5bb8c7[_0x36d011]===_0x4cebf0[_0x36d011]);}for(const _0x80c05c of[_0x452fcb(0x208),_0x452fcb(0x1c0)]){if(!hasOwn(_0x4cebf0,_0x80c05c))continue;const _0x4f1d43=_0x4cebf0[_0x80c05c]??(_0x80c05c===_0x452fcb(0x208)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5b2739['push'](_0x80c05c),_0x44f8af['push'](_0x5bb8c7[_0x80c05c]===_0x4f1d43),_0x69b072['push'](_0x444618[_0x80c05c]!==_0x4f1d43&&_0x5bb8c7[_0x80c05c]===_0x4f1d43);}return hasOwn(_0x4cebf0,'endpointUrl')&&_0x4cebf0[_0x452fcb(0x1e1)]===null&&(_0x5b2739['push'](_0x452fcb(0x207)),_0x44f8af[_0x452fcb(0x1d8)](_0x5bb8c7[_0x452fcb(0x1e2)]===null||_0x5bb8c7[_0x452fcb(0x1e2)]===''),_0x69b072[_0x452fcb(0x1d8)](_0x444618[_0x452fcb(0x1e2)]!==null&&_0x444618[_0x452fcb(0x1e2)]!==''&&(_0x5bb8c7[_0x452fcb(0x1e2)]===null||_0x5bb8c7[_0x452fcb(0x1e2)]===''))),{'allMatch':_0x44f8af[_0x452fcb(0x210)](Boolean),'provesChange':_0x69b072[_0x452fcb(0x20c)](Boolean),'verifiedFields':_0x5b2739};}export function validateNotificationDeleteReadback(_0xa753db,_0x4e2036,_0x31cd49){const _0x2808bd=a186_0x89cf5a;for(const [_0x46eefd,_0x2eefa9]of _0xa753db[_0x2808bd(0x1f8)]()){if(!Number['isSafeInteger'](_0x2eefa9['id'])||_0x2eefa9['id']<=0x0)throw notificationError(_0x2808bd(0x215),_0x2808bd(0x196)+(_0x46eefd+0x1)+_0x2808bd(0x1ca));if(_0x2eefa9[_0x2808bd(0x1ad)]!==_0x4e2036)throw notificationError(_0x2808bd(0x215),_0x2808bd(0x196)+(_0x46eefd+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x2eefa9[_0x2808bd(0x1ba)]!==_0x31cd49)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x46eefd+0x1)+_0x2808bd(0x1d9));}}export function safeApiFailure(_0x995fe5,_0x43b38a,_0xa22385){const _0x12ae9d=a186_0x89cf5a;return notificationError(_0x12ae9d(0x21a)+_0x995fe5+'_'+(_0x43b38a==='mutation'?_0x12ae9d(0x1d6):_0x43b38a+_0x12ae9d(0x1e8)),_0x12ae9d(0x1e7)+_0x995fe5+'\x20'+_0x43b38a+'\x20failed.',_0xa22385);}export function notificationLookupCommand(_0x22a3ff,_0x107d79){const _0x973c17=a186_0x89cf5a;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x22a3ff+_0x973c17(0x1cf)+_0x107d79+_0x973c17(0x1a7);}function validateNotificationDocument(_0x4acaf9,_0x10dd20){const _0x505797=a186_0x89cf5a;for(const _0x4aab75 of Object[_0x505797(0x21b)](_0x4acaf9)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x4aab75))throw notificationError('notification_config_field_forbidden',_0x505797(0x1c2)+_0x4aab75+_0x505797(0x1ce));if(!ALLOWED_INPUT_FIELDS[_0x505797(0x19f)](_0x4aab75))throw notificationError(_0x505797(0x1b5),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x4aab75+'\x22.');}if(_0x10dd20===_0x505797(0x20a)&&Object[_0x505797(0x21b)](_0x4acaf9)['length']===0x0)throw notificationError(_0x505797(0x21e),_0x505797(0x1e4));const _0x438983={};if(hasOwn(_0x4acaf9,'configName'))_0x438983['configName']=validateRequiredString(_0x4acaf9[_0x505797(0x1e6)],_0x505797(0x1e6),0x80);else{if(_0x10dd20===_0x505797(0x218))throw notificationError(_0x505797(0x1da),_0x505797(0x1cc)+_0x505797(0x1a8));}if(hasOwn(_0x4acaf9,'channelType')){if(typeof _0x4acaf9['channelType']!=='string')throw invalidFieldType(_0x505797(0x1ba),_0x505797(0x194));const _0xe72d39=_0x4acaf9[_0x505797(0x1ba)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x505797(0x19c)](_0xe72d39))throw notificationError(_0x505797(0x1f1),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x505797(0x1fb)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x438983['channelType']=_0xe72d39;}else{if(_0x10dd20==='create')throw notificationError(_0x505797(0x1da),_0x505797(0x1cc)+_0x505797(0x195));}for(const [_0xbc68f4,_0xb2f4c3]of[[_0x505797(0x1e1),0x200],['description',0x100]]){if(!hasOwn(_0x4acaf9,_0xbc68f4))continue;const _0x22bb98=_0x4acaf9[_0xbc68f4];if(_0x22bb98!==null&&typeof _0x22bb98!==_0x505797(0x1ab))throw invalidFieldType(_0xbc68f4,_0x505797(0x1a9));if(typeof _0x22bb98===_0x505797(0x1ab)&&_0x22bb98[_0x505797(0x193)]>_0xb2f4c3)throw notificationError('notification_config_field_invalid',_0x505797(0x1c2)+_0xbc68f4+'\x22\x20cannot\x20exceed\x20'+_0xb2f4c3+_0x505797(0x1d1));_0x438983[_0xbc68f4]=_0x22bb98;}if(hasOwn(_0x4acaf9,_0x505797(0x212))){const _0x1578a1=_0x4acaf9[_0x505797(0x212)];if(_0x1578a1===null&&_0x10dd20==='create')throw invalidFieldType('channelConfig',_0x505797(0x21c));if(_0x1578a1!==null&&!isJsonObject(_0x1578a1))throw invalidFieldType(_0x505797(0x212),_0x10dd20==='update'?'a\x20JSON\x20object\x20or\x20null':_0x505797(0x21c));_0x1578a1!==null&&validateChannelConfigFields(_0x438983[_0x505797(0x1ba)],_0x1578a1),_0x438983[_0x505797(0x212)]=_0x1578a1;}for(const _0x1d6bb7 of[_0x505797(0x208),'readTimeout']){if(!hasOwn(_0x4acaf9,_0x1d6bb7))continue;const _0x4dcf85=_0x4acaf9[_0x1d6bb7];if(_0x4dcf85!==null&&(!Number[_0x505797(0x1d2)](_0x4dcf85)||_0x4dcf85<0x0))throw notificationError(_0x505797(0x1f1),_0x505797(0x1c2)+_0x1d6bb7+_0x505797(0x1e9));_0x438983[_0x1d6bb7]=_0x4dcf85;}return _0x438983;}function validateRequiredString(_0x115fd1,_0x548a50,_0x31156d){const _0x46b0b2=a186_0x89cf5a;if(typeof _0x115fd1!=='string')throw invalidFieldType(_0x548a50,'a\x20non-empty\x20string');const _0x5c80d3=_0x115fd1['trim']();if(!_0x5c80d3)throw notificationError(_0x46b0b2(0x1f1),_0x46b0b2(0x1c2)+_0x548a50+_0x46b0b2(0x213));if(_0x5c80d3['length']>_0x31156d)throw notificationError('notification_config_field_invalid',_0x46b0b2(0x1c2)+_0x548a50+_0x46b0b2(0x1cb)+_0x31156d+_0x46b0b2(0x1d1));return _0x5c80d3;}function validateChannelConfigFields(_0x4edc89,_0x4398da){const _0x843389=a186_0x89cf5a;if(hasOwn(_0x4398da,_0x843389(0x1bd)))throw forbiddenChannelConfigField('messageTemplate');if(_0x4edc89==='EMAIL')for(const _0x9aaf99 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4398da,_0x9aaf99))throw forbiddenChannelConfigField(_0x9aaf99);}}function forbiddenChannelConfigField(_0x4acdfb){const _0x5c7718=a186_0x89cf5a;return notificationError(_0x5c7718(0x1fa),_0x5c7718(0x204)+_0x4acdfb+_0x5c7718(0x1a2));}function invalidFieldType(_0x43f383,_0x25c04a){const _0x3559a0=a186_0x89cf5a;return notificationError(_0x3559a0(0x1f1),_0x3559a0(0x1c2)+_0x43f383+_0x3559a0(0x1f7)+_0x25c04a+'.');}function serializeChannelConfig(_0x1658e1){const _0x341308=a186_0x89cf5a;return _0x1658e1===null||_0x1658e1===undefined?null:JSON[_0x341308(0x1af)](_0x1658e1);}function redactSensitive(_0x2d49b5){const _0x5d8720=a186_0x89cf5a;return _0x2d49b5===null||_0x2d49b5===undefined||_0x2d49b5===''?null:_0x5d8720(0x1e5);}function requireResponseString(_0x255c01,_0x445904,_0x68320a){const _0x5ab0aa=a186_0x89cf5a;if(typeof _0x255c01!=='string'||_0x255c01[_0x5ab0aa(0x211)]()==='')throw CliErrors[_0x5ab0aa(0x217)](_0x5ab0aa(0x1a5),_0x5ab0aa(0x1be)+(_0x68320a+0x1)+_0x5ab0aa(0x1d0)+_0x445904+'\x22.');return _0x255c01[_0x5ab0aa(0x211)]();}function requireExactString(_0x320318,_0x16e049,_0xe70c7c){const _0x1ebfd9=a186_0x89cf5a;if(typeof _0x320318!==_0x1ebfd9(0x1ab)||_0x320318['trim']()==='')throw notificationError('notification_config_response_invalid',_0x1ebfd9(0x1e7)+_0xe70c7c+_0x1ebfd9(0x1d0)+_0x16e049+'\x22.');return _0x320318[_0x1ebfd9(0x211)]();}function responseNullableString(_0x37fe34,_0x113dc3,_0x70de64){const _0x55adaf=a186_0x89cf5a;if(_0x37fe34===undefined||_0x37fe34===null)return null;if(typeof _0x37fe34!==_0x55adaf(0x1ab))throw notificationError(_0x55adaf(0x215),_0x55adaf(0x1e7)+_0x70de64+_0x55adaf(0x1b2)+_0x113dc3+'\x22.');return _0x37fe34;}function responseNullableTimeout(_0x2dfd13,_0x2d5ebd,_0x2503e7){const _0x4b23ce=a186_0x89cf5a;if(_0x2dfd13===undefined||_0x2dfd13===null)return null;if(!Number[_0x4b23ce(0x1d2)](_0x2dfd13)||_0x2dfd13<0x0)throw notificationError(_0x4b23ce(0x215),_0x4b23ce(0x1e7)+_0x2503e7+_0x4b23ce(0x1b2)+_0x2d5ebd+'\x22.');return _0x2dfd13;}function normalizeNullableString(_0x53bb2e){return typeof _0x53bb2e==='string'?_0x53bb2e:null;}function isJsonObject(_0x5e49c4){const _0x116601=a186_0x89cf5a;return _0x5e49c4!==null&&typeof _0x5e49c4===_0x116601(0x1ea)&&!Array[_0x116601(0x1f3)](_0x5e49c4);}function hasOwn(_0x4f0b88,_0x18ec1e){const _0x55c2d5=a186_0x89cf5a;return Object[_0x55c2d5(0x21d)]['hasOwnProperty'][_0x55c2d5(0x1eb)](_0x4f0b88,_0x18ec1e);}async function readStdin(){const _0xbfc55b=a186_0x89cf5a;let _0x48babd='';process[_0xbfc55b(0x1a4)][_0xbfc55b(0x20d)](_0xbfc55b(0x214));for await(const _0x5d4860 of process[_0xbfc55b(0x1a4)])_0x48babd+=_0x5d4860;return _0x48babd;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a187_0x1915de=a187_0x5797;(function(_0x1d060a,_0x13090d){const _0x5c8b37=a187_0x5797,_0x3a02c5=_0x1d060a();while(!![]){try{const _0x3f185f=-parseInt(_0x5c8b37(0x210))/0x1*(parseInt(_0x5c8b37(0x215))/0x2)+parseInt(_0x5c8b37(0x1fb))/0x3*(parseInt(_0x5c8b37(0x201))/0x4)+parseInt(_0x5c8b37(0x203))/0x5+-parseInt(_0x5c8b37(0x204))/0x6+parseInt(_0x5c8b37(0x1f5))/0x7+parseInt(_0x5c8b37(0x1f6))/0x8*(-parseInt(_0x5c8b37(0x1fe))/0x9)+-parseInt(_0x5c8b37(0x206))/0xa*(parseInt(_0x5c8b37(0x211))/0xb);if(_0x3f185f===_0x13090d)break;else _0x3a02c5['push'](_0x3a02c5['shift']());}catch(_0x15a835){_0x3a02c5['push'](_0x3a02c5['shift']());}}}(a187_0x5658,0x4e11a));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a187_0x1915de(0x208),a187_0x1915de(0x213),a187_0x1915de(0x20f),a187_0x1915de(0x20d)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':'General','form':a187_0x1915de(0x217),'idCard':'IdCard'},SCENE_FLAG={'name':a187_0x1915de(0x1ed),'type':a187_0x1915de(0x1fc),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a187_0x1915de(0x216)},IMAGE_FILE_FLAG={'name':a187_0x1915de(0x1f9),'type':a187_0x1915de(0x1fc),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a187_0x1915de(0x1f8),'type':a187_0x1915de(0x1fc),'description':a187_0x1915de(0x1f2)};function normalizeScene(_0x46d50a){const _0x330558=a187_0x1915de,_0x33b4c3=_0x46d50a[_0x330558(0x1f3)]()[_0x330558(0x20b)]();if(_0x33b4c3===_0x330558(0x21d))return _0x330558(0x20d);if(_0x33b4c3===_0x330558(0x208)||_0x33b4c3===_0x330558(0x213)||_0x33b4c3===_0x330558(0x20f))return _0x33b4c3;throw CliErrors['validation'](_0x330558(0x1eb)+_0x46d50a+_0x330558(0x1f0)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x59d1e4){const _0x4780ab=a187_0x1915de,_0x531c3d=_0x59d1e4[_0x4780ab(0x202)](_0x4780ab(0x1f9))[_0x4780ab(0x1f3)](),_0x337d47=_0x59d1e4['str'](_0x4780ab(0x1f8))[_0x4780ab(0x1f3)]();return{'imageFile':_0x531c3d,'imageUrl':_0x337d47,'count':[_0x531c3d,_0x337d47]['filter'](Boolean)[_0x4780ab(0x207)]};}function validateInputSelection(_0x104d83){const _0x399042=a187_0x1915de,_0x4f2b72=selectedInputs(_0x104d83);if(_0x4f2b72[_0x399042(0x205)]!==0x1)throw CliErrors['validation'](_0x399042(0x1ec));return _0x4f2b72;}function withScene(_0x44cfc0,_0xf41f60,_0x343263){const _0x3d6912=a187_0x1915de;return{..._0x44cfc0,'scene':_0xf41f60,..._0x343263?{'sourceFile':{'fileName':_0x343263['fileName'],'filePath':_0x343263[_0x3d6912(0x200)]}}:{}};}function a187_0x5797(_0x982eb1,_0x314391){_0x982eb1=_0x982eb1-0x1eb;const _0x565886=a187_0x5658();let _0x579732=_0x565886[_0x982eb1];return _0x579732;}const ocrRecognize={'service':a187_0x1915de(0x1f1),'command':'recognize','description':a187_0x1915de(0x21a),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3077e8){const _0x2abb93=a187_0x1915de,_0x10fce4=normalizeScene(_0x3077e8['str'](_0x2abb93(0x1ed))),_0x2e80d1=SCENE_TO_LEGACY_TYPE[_0x10fce4],_0x4e135b=validateInputSelection(_0x3077e8);if(_0x4e135b[_0x2abb93(0x20a)]){const _0x220157=new URLSearchParams({'url':_0x4e135b[_0x2abb93(0x20a)],'type':_0x2e80d1,'appCode':_0x3077e8['appCode']});return{'method':_0x2abb93(0x1ef),'url':_0x2abb93(0x1f4)+_0x220157['toString'](),'description':_0x2abb93(0x21c)+_0x10fce4+_0x2abb93(0x20e)};}const _0x144e15=requireDevelopmentUploadFile(_0x4e135b[_0x2abb93(0x1fd)],'image-file');return{'method':_0x2abb93(0x218),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':'POST','url':'/smartapi/common/uploadFile','body':{'appCode':_0x3077e8[_0x2abb93(0x1f7)],'multipart':{'file':_0x144e15}}},{'method':_0x2abb93(0x218),'url':'/smartapi/common/queryFileUrl','body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x2abb93(0x1ef),'url':_0x2abb93(0x214),'query':{'appCode':_0x3077e8[_0x2abb93(0x1f7)],'url':_0x2abb93(0x20c),'type':_0x2e80d1}}]},'description':_0x2abb93(0x212)+_0x10fce4+_0x2abb93(0x209)};},async 'execute'(_0x4666c0){const _0x2c43a9=a187_0x1915de,_0x4d7a76=normalizeScene(_0x4666c0[_0x2c43a9(0x202)](_0x2c43a9(0x1ed))),_0x453c02=SCENE_TO_LEGACY_TYPE[_0x4d7a76],_0x4fd8cd=validateInputSelection(_0x4666c0);if(_0x4fd8cd[_0x2c43a9(0x20a)]){const _0x4e69c1=await recognizeDevelopmentOcr(_0x4666c0[_0x2c43a9(0x1f7)],{'url':_0x4fd8cd[_0x2c43a9(0x20a)],'type':_0x453c02});return{'ok':!![],'data':withScene(_0x4e69c1,_0x4d7a76)};}const _0xa61de=requireDevelopmentUploadFile(_0x4fd8cd[_0x2c43a9(0x1fd)],_0x2c43a9(0x1f9)),_0x441afd=await uploadDevelopmentFile(_0x4666c0[_0x2c43a9(0x1f7)],_0xa61de[_0x2c43a9(0x219)]);if(!_0x441afd[_0x2c43a9(0x200)])throw CliErrors[_0x2c43a9(0x21b)](_0x2c43a9(0x1fa));const _0x201f74=await queryDevelopmentFileUrl(_0x441afd[_0x2c43a9(0x200)],{'download':![]});if(!_0x201f74['fileUrl'])throw CliErrors[_0x2c43a9(0x21b)](_0x2c43a9(0x1ee));const _0x17c967=await recognizeDevelopmentOcr(_0x4666c0[_0x2c43a9(0x1f7)],{'url':_0x201f74[_0x2c43a9(0x1ff)],'type':_0x453c02});return{'ok':!![],'data':withScene(_0x17c967,_0x4d7a76,_0x441afd)};}};export const ocrDefinitions=[ocrRecognize];function a187_0x5658(){const _0x51556a=['8elviCN','str','3002615tTsvhs','786816wDawWc','count','14710EScVnN','length','invoice','\x20OCR','imageUrl','toLowerCase','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','idCard','\x20OCR\x20from\x20URL','form','181mqTXrI','781ELBCme','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','general','/smartapi/ocr/recognize-text','4942rKUJCb','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Table','POST','path','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','apiError','Preview:\x20recognize\x20','idcard','Unsupported\x20OCR\x20scene:\x20','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','scene','File\x20URL\x20response\x20missing\x20fileUrl.','GET','.\x20Supported\x20scenes:\x20','ocr','Publicly\x20accessible\x20image\x20or\x20file\x20URL','trim','/smartapi/ocr/recognize-text?','4043186SgKyRH','8WVlcLg','appCode','image-url','image-file','File\x20upload\x20response\x20missing\x20filePath.','414813CKJEVP','string','imageFile','4068585wZmWpq','fileUrl','filePath'];a187_0x5658=function(){return _0x51556a;};return a187_0x5658();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a188_0x14ba(){const _0x2725f9=['trim','version','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','isNaN','parent-menu-id','files','write','.json','stringify','string','Would\x20create\x20Custom\x20Page\x20','createMenu','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','5575716iCKpUz','keys','page-pattern','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','DASHBOARD','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','str','create','values','\x20and\x20its\x20menu\x20entry.','isArray','object','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','328114XBKPyp','name','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','page-dir','toLowerCase','ONEPAGE','pageName\x20cannot\x20exceed\x20100\x20characters.','5095235KKxphH','compress','page-content','Invalid\x20Custom\x20Page\x20pattern:\x20','apiError','2pHYJOO','74010avenAX','utf8','some','isInteger','38859150dPTkKo','55830zEMWhI','../../../templates/custom-pages','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','/smartapi/webcode/page/create','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','CUSTOM','appCode','includes','4zBYwAK','menuPath','7928552ZNJucD','num','parse','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','603NiIBRn','pageName','now','pageId','Custom_page_','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','number','validation','parentMenuId','Created\x20Custom\x20Page\x20','7LbeZsZ','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','Custom\x20Page\x20pattern\x20not\x20found:\x20','length','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)'];a188_0x14ba=function(){return _0x2725f9;};return a188_0x14ba();}const a188_0x19fcba=a188_0x2843;(function(_0x2d251d,_0x25a509){const _0x1997f8=a188_0x2843,_0x3bfc94=_0x2d251d();while(!![]){try{const _0x50e6b3=-parseInt(_0x1997f8(0x1de))/0x1*(-parseInt(_0x1997f8(0x1d2))/0x2)+-parseInt(_0x1997f8(0x1df))/0x3*(parseInt(_0x1997f8(0x1ec))/0x4)+-parseInt(_0x1997f8(0x1d9))/0x5+-parseInt(_0x1997f8(0x20e))/0x6+parseInt(_0x1997f8(0x1fc))/0x7*(-parseInt(_0x1997f8(0x1ee))/0x8)+-parseInt(_0x1997f8(0x1f2))/0x9*(parseInt(_0x1997f8(0x1e4))/0xa)+parseInt(_0x1997f8(0x1e3))/0xb;if(_0x50e6b3===_0x25a509)break;else _0x3bfc94['push'](_0x3bfc94['shift']());}catch(_0x2bd450){_0x3bfc94['push'](_0x3bfc94['shift']());}}}(a188_0x14ba,0x7f987));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';function a188_0x2843(_0x5d0413,_0x4928d9){_0x5d0413=_0x5d0413-0x1c9;const _0x14ba5f=a188_0x14ba();let _0x2843e2=_0x14ba5f[_0x5d0413];return _0x2843e2;}const CUSTOM_PAGE_PATTERNS=['BLANK',a188_0x19fcba(0x1d7),a188_0x19fcba(0x1c9)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a188_0x19fcba(0x1e5));export const pageCreate={'service':'page','command':a188_0x19fcba(0x1cc),'description':a188_0x19fcba(0x1ca),'risk':a188_0x19fcba(0x207),'defaultOutputFormat':a188_0x19fcba(0x1da),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':'This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.'},{'name':a188_0x19fcba(0x1db),'message':a188_0x19fcba(0x1f7),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':a188_0x19fcba(0x1d3),'type':'string','description':a188_0x19fcba(0x203)},{'name':'parent-menu-id','type':a188_0x19fcba(0x1f8),'description':a188_0x19fcba(0x1e8)},{'name':a188_0x19fcba(0x210),'type':a188_0x19fcba(0x20a),'description':a188_0x19fcba(0x200),'enum':CUSTOM_PAGE_PATTERNS},{'name':a188_0x19fcba(0x1d5),'type':'string','description':a188_0x19fcba(0x1fd)},APPCODE_FLAG],async 'validate'(_0x5dcadc){await readValidatedPageSource(_0x5dcadc);},async 'dryRun'(_0x3f6912){const _0x18e326=a188_0x19fcba,_0x527d9a=readInput(_0x3f6912,await readValidatedPageSource(_0x3f6912));return{'method':'POST','url':_0x18e326(0x1e7),'body':{'appCode':_0x527d9a['appCode'],'pageName':_0x527d9a[_0x18e326(0x1f3)],..._0x527d9a[_0x18e326(0x1fa)]!=null?{'parentMenuId':_0x527d9a[_0x18e326(0x1fa)]}:{},'createMenu':_0x527d9a[_0x18e326(0x20c)],'codeContent':_0x527d9a[_0x18e326(0x206)]},'description':_0x18e326(0x20b)+JSON[_0x18e326(0x209)](_0x527d9a[_0x18e326(0x1f3)])+_0x18e326(0x1ce)};},async 'execute'(_0x492eb6){const _0x182929=a188_0x19fcba,_0x180c99=readInput(_0x492eb6,await readValidatedPageSource(_0x492eb6)),_0x40ebe1=await createCustomPage(_0x180c99);if(!Number[_0x182929(0x1e2)](_0x40ebe1[_0x182929(0x1f5)])||_0x40ebe1[_0x182929(0x1f5)]<=0x0)throw CliErrors[_0x182929(0x1dd)](_0x182929(0x1e6));const _0x11ddb8=buildCustomPageDevelopmentUrl(_0x180c99['appCode'],_0x40ebe1[_0x182929(0x1ed)]),_0x31c5b4=buildCustomPageEditUrl(_0x180c99[_0x182929(0x1ea)],_0x40ebe1[_0x182929(0x1f5)]);return{'ok':!![],'data':{'operation':'page.create','pageType':_0x182929(0x1e9),'pagePattern':readPagePattern(_0x492eb6),'selector':{'appCode':_0x180c99[_0x182929(0x1ea)],'pageName':_0x180c99[_0x182929(0x1f3)]},'before':null,'after':{'pageId':_0x40ebe1[_0x182929(0x1f5)],'pageName':_0x40ebe1[_0x182929(0x1f3)],'appCode':_0x40ebe1['appCode'],'version':_0x40ebe1[_0x182929(0x202)],'menuId':_0x40ebe1['menuId'],'menuPath':_0x40ebe1[_0x182929(0x1ed)],'files':_0x40ebe1[_0x182929(0x206)]??Object[_0x182929(0x20f)](_0x180c99['files'])},'dryRun':![],'request':_0x180c99,..._0x11ddb8?{'pageUrl':_0x11ddb8}:{},..._0x31c5b4?{'editPageUrl':_0x31c5b4}:{},'warnings':_0x11ddb8?[]:[_0x182929(0x1f1)]},'message':_0x182929(0x1fb)+_0x40ebe1[_0x182929(0x1f5)]+'.'};}};function readPagePattern(_0x1c5920){const _0x3f5045=a188_0x19fcba,_0x524b0d=_0x1c5920['str'](_0x3f5045(0x210))[_0x3f5045(0x201)](),_0x1b6be4=_0x1c5920[_0x3f5045(0x1cb)](_0x3f5045(0x1d5))[_0x3f5045(0x201)]();if(_0x524b0d&&_0x1b6be4)throw CliErrors[_0x3f5045(0x1f9)]('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x1b6be4)return null;if(!_0x524b0d)throw CliErrors['validation'](_0x3f5045(0x20d));if(!CUSTOM_PAGE_PATTERNS[_0x3f5045(0x1eb)](_0x524b0d))throw CliErrors[_0x3f5045(0x1f9)](_0x3f5045(0x1d4));return _0x524b0d;}async function readPageSource(_0x3cbe9){const _0x3489a1=a188_0x19fcba,_0x2bc8da=_0x3cbe9[_0x3489a1(0x1cb)]('page-dir')[_0x3489a1(0x201)](),_0x555a28=readPagePattern(_0x3cbe9);if(_0x555a28===null){const _0x1cf8ab=await readCustomPageDirectory(_0x2bc8da);if(Object[_0x3489a1(0x20f)](_0x1cf8ab)[_0x3489a1(0x1ff)]===0x0)throw CliErrors['validation'](_0x3489a1(0x1d1));return _0x1cf8ab;}let _0xb55eee;try{_0xb55eee=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x555a28[_0x3489a1(0x1d6)]()+_0x3489a1(0x208)),_0x3489a1(0x1e0));}catch{throw CliErrors[_0x3489a1(0x1f9)](_0x3489a1(0x1fe)+_0x555a28+'.');}let _0x38850e;try{_0x38850e=JSON[_0x3489a1(0x1f0)](_0xb55eee);}catch{throw CliErrors[_0x3489a1(0x1f9)](_0x3489a1(0x1dc)+_0x555a28+'.');}if(!_0x38850e||typeof _0x38850e!==_0x3489a1(0x1d0)||Array[_0x3489a1(0x1cf)](_0x38850e)||Object[_0x3489a1(0x1cd)](_0x38850e)[_0x3489a1(0x1e1)](_0x5cf908=>typeof _0x5cf908!==_0x3489a1(0x20a)))throw CliErrors[_0x3489a1(0x1f9)](_0x3489a1(0x1dc)+_0x555a28+'.');return _0x38850e;}async function readValidatedPageSource(_0x2f368f){const _0x5e2a92=await readPageSource(_0x2f368f);return await validateCustomPageContent(_0x5e2a92),_0x5e2a92;}function readInput(_0xf61960,_0x29e63c){const _0x5668ce=a188_0x19fcba,_0x277bc3=_0xf61960[_0x5668ce(0x1cb)](_0x5668ce(0x1d3))[_0x5668ce(0x201)]()||_0x5668ce(0x1f6)+Date[_0x5668ce(0x1f4)]();if(_0x277bc3[_0x5668ce(0x1ff)]>0x64)throw CliErrors['validation'](_0x5668ce(0x1d8));const _0x280b23=_0xf61960[_0x5668ce(0x1ef)](_0x5668ce(0x205),NaN),_0x2fee54=!Number[_0x5668ce(0x204)](_0x280b23);if(_0x2fee54&&(!Number[_0x5668ce(0x1e2)](_0x280b23)||_0x280b23<=0x0))throw CliErrors['validation'](_0x5668ce(0x211));return{'appCode':_0xf61960[_0x5668ce(0x1ea)],'pageName':_0x277bc3,..._0x2fee54?{'parentMenuId':_0x280b23}:{},'createMenu':!![],'files':_0x29e63c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0x3cf9fc=a189_0x75a7;(function(_0x267e5e,_0x4c554d){const _0x42d0d7=a189_0x75a7,_0x52a3cc=_0x267e5e();while(!![]){try{const _0x5a8437=parseInt(_0x42d0d7(0x1ca))/0x1+-parseInt(_0x42d0d7(0x1ce))/0x2+parseInt(_0x42d0d7(0x1c0))/0x3+parseInt(_0x42d0d7(0x1bf))/0x4+-parseInt(_0x42d0d7(0x1d5))/0x5*(-parseInt(_0x42d0d7(0x1c4))/0x6)+parseInt(_0x42d0d7(0x1cc))/0x7*(parseInt(_0x42d0d7(0x1d1))/0x8)+-parseInt(_0x42d0d7(0x1cf))/0x9*(parseInt(_0x42d0d7(0x1c8))/0xa);if(_0x5a8437===_0x4c554d)break;else _0x52a3cc['push'](_0x52a3cc['shift']());}catch(_0x1eeb7d){_0x52a3cc['push'](_0x52a3cc['shift']());}}}(a189_0x266a,0x4d5f0));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a189_0x3cf9fc(0x1c5),'command':'custom-detail','description':a189_0x3cf9fc(0x1c6),'risk':a189_0x3cf9fc(0x1bc),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2e31db){readCustomPageId(_0x2e31db);},async 'execute'(_0x26dbc3){const _0x2f621f=a189_0x3cf9fc,_0x20fc1e=readCustomPageId(_0x26dbc3),_0x31a0da=await getCustomPageSource(_0x20fc1e),{bundle:_0x340d69,createTime:_0x24d930,updateTime:_0x247926,..._0x167afb}=_0x31a0da,_0xdded2e=_0x31a0da['id']??_0x20fc1e,_0x3e1a73=_0x31a0da[_0x2f621f(0x1c3)]?.[_0x2f621f(0x1c2)]()||_0x26dbc3[_0x2f621f(0x1cb)](_0x2f621f(0x1d3))[_0x2f621f(0x1c2)](),_0x280eff=buildCustomPageRuntimeUrl(_0x3e1a73,_0x31a0da[_0x2f621f(0x1d4)]),_0x3d4525=buildCustomPageEditUrl(_0x3e1a73,_0xdded2e),_0x1341cf=await resolveCustomPageDevelopmentUrl(_0x3e1a73,_0xdded2e,_0x26dbc3[_0x2f621f(0x1d7)]);return{'ok':!![],'data':{..._0x167afb,..._0x280eff?{'runtimePageUrl':_0x280eff}:{},..._0x1341cf?{'pageUrl':_0x1341cf}:{},..._0x3d4525?{'editPageUrl':_0x3d4525}:{},..._0x24d930==null?{}:{'createTime':formatTime(_0x24d930)},..._0x247926==null?{}:{'updateTime':formatTime(_0x247926)}},'message':_0x2f621f(0x1ba)+_0x20fc1e+'.'};}};function a189_0x75a7(_0x153d10,_0x63e9b9){_0x153d10=_0x153d10-0x1ba;const _0x266a49=a189_0x266a();let _0x75a73e=_0x266a49[_0x153d10];return _0x75a73e;}function a189_0x266a(){const _0x36e58a=['getMonth','55372tudjxD','1767861NTzJCx','join','trim','appCode','449346Omdraq','page','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getFullYear','20710lhDHLa','getHours','514978dgcZXs','str','189CSQfCT','padStart','180468jFMmgj','7362LetKWN','getSeconds','180344JMFADb','getTime','appcode','pageCode','25dLlwaP','getDate','cookie','Retrieved\x20Custom\x20Page\x20','isNaN','read','getMinutes'];a189_0x266a=function(){return _0x36e58a;};return a189_0x266a();}function formatTime(_0xbb23c9){const _0x10d6bb=a189_0x3cf9fc,_0x14217d=new Date(_0xbb23c9);if(Number[_0x10d6bb(0x1bb)](_0x14217d[_0x10d6bb(0x1d2)]()))return String(_0xbb23c9);const _0x3effa1=[_0x14217d[_0x10d6bb(0x1c7)](),String(_0x14217d[_0x10d6bb(0x1be)]()+0x1)[_0x10d6bb(0x1cd)](0x2,'0'),String(_0x14217d[_0x10d6bb(0x1d6)]())[_0x10d6bb(0x1cd)](0x2,'0')][_0x10d6bb(0x1c1)]('-'),_0x24643a=[String(_0x14217d[_0x10d6bb(0x1c9)]())[_0x10d6bb(0x1cd)](0x2,'0'),String(_0x14217d[_0x10d6bb(0x1bd)]())[_0x10d6bb(0x1cd)](0x2,'0'),String(_0x14217d[_0x10d6bb(0x1d0)]())[_0x10d6bb(0x1cd)](0x2,'0')][_0x10d6bb(0x1c1)](':');return _0x3effa1+'\x20'+_0x24643a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a190_0x5e23(){const _0x491d16=['4OmyjXR','208995TEtRmt','2712EcCgKy','846jJgHNj','Found\x20','1358IrcPjw','type','1131528NHIzjO','15TnjTpE','1393106MPasLI','path','79993hQmCIq','menus','label','6740TSPxob','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','\x20Custom\x20Page(s).','cookie','flatMap','pageId','128092dFEXra','appCode','custom-list','length','read','react','compress'];a190_0x5e23=function(){return _0x491d16;};return a190_0x5e23();}const a190_0x532139=a190_0x5b2c;(function(_0x2011c3,_0x2cc219){const _0x1f5ca2=a190_0x5b2c,_0x2067a3=_0x2011c3();while(!![]){try{const _0x49a1ab=-parseInt(_0x1f5ca2(0x171))/0x1+-parseInt(_0x1f5ca2(0x166))/0x2*(parseInt(_0x1f5ca2(0x167))/0x3)+parseInt(_0x1f5ca2(0x17a))/0x4*(parseInt(_0x1f5ca2(0x16e))/0x5)+parseInt(_0x1f5ca2(0x168))/0x6*(-parseInt(_0x1f5ca2(0x16b))/0x7)+parseInt(_0x1f5ca2(0x16d))/0x8+parseInt(_0x1f5ca2(0x169))/0x9*(parseInt(_0x1f5ca2(0x174))/0xa)+parseInt(_0x1f5ca2(0x16f))/0xb;if(_0x49a1ab===_0x2cc219)break;else _0x2067a3['push'](_0x2067a3['shift']());}catch(_0x29451d){_0x2067a3['push'](_0x2067a3['shift']());}}}(a190_0x5e23,0x1d6b5));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';function a190_0x5b2c(_0x3b74a0,_0x540399){_0x3b74a0=_0x3b74a0-0x163;const _0x5e23f7=a190_0x5e23();let _0x5b2cf3=_0x5e23f7[_0x3b74a0];return _0x5b2cf3;}export const pageCustomList={'service':'page','command':a190_0x532139(0x17c),'description':a190_0x532139(0x175),'risk':a190_0x532139(0x163),'defaultOutputFormat':a190_0x532139(0x165),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0xd06a17){const _0x374dd1=a190_0x532139,_0x27f294=(await fetchMenuSnapshot(_0xd06a17[_0x374dd1(0x17b)],_0xd06a17[_0x374dd1(0x177)]))[_0x374dd1(0x172)][_0x374dd1(0x178)](_0x10d997=>{const _0x148219=_0x374dd1;if(_0x10d997[_0x148219(0x16c)]!==_0x148219(0x164)||_0x10d997[_0x148219(0x179)]==null)return[];const _0x453e1b=buildCustomPageDevelopmentUrl(_0xd06a17[_0x148219(0x17b)],_0x10d997[_0x148219(0x170)]),_0x4baee7=buildCustomPageRuntimeUrl(_0xd06a17[_0x148219(0x17b)],_0x10d997[_0x148219(0x170)]),_0x49f860=buildCustomPageEditUrl(_0xd06a17[_0x148219(0x17b)],_0x10d997[_0x148219(0x179)]);return[{'pageId':_0x10d997[_0x148219(0x179)],'label':_0x10d997[_0x148219(0x173)],'path':_0x10d997['path'],..._0x453e1b?{'pageUrl':_0x453e1b}:{},..._0x4baee7?{'runtimePageUrl':_0x4baee7}:{},..._0x49f860?{'editPageUrl':_0x49f860}:{}}];});return{'ok':!![],'data':{'pages':_0x27f294},'message':_0x27f294[_0x374dd1(0x17d)]===0x0?'No\x20Custom\x20Pages\x20found.':_0x374dd1(0x16a)+_0x27f294[_0x374dd1(0x17d)]+_0x374dd1(0x176)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a191_0x57f81d=a191_0x414a;(function(_0x48c2c4,_0x905ede){const _0x16861f=a191_0x414a,_0x42e8fd=_0x48c2c4();while(!![]){try{const _0x1e42da=parseInt(_0x16861f(0xb9))/0x1+-parseInt(_0x16861f(0xc3))/0x2*(parseInt(_0x16861f(0xcd))/0x3)+parseInt(_0x16861f(0xb4))/0x4+-parseInt(_0x16861f(0xb6))/0x5+parseInt(_0x16861f(0xbb))/0x6*(parseInt(_0x16861f(0xd1))/0x7)+parseInt(_0x16861f(0xba))/0x8*(-parseInt(_0x16861f(0xcb))/0x9)+parseInt(_0x16861f(0xd3))/0xa;if(_0x1e42da===_0x905ede)break;else _0x42e8fd['push'](_0x42e8fd['shift']());}catch(_0x201ab9){_0x42e8fd['push'](_0x42e8fd['shift']());}}}(a191_0x1a4d,0x76c8f));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';function a191_0x414a(_0x7e389,_0x50ea08){_0x7e389=_0x7e389-0xb3;const _0x1a4d69=a191_0x1a4d();let _0x414a7f=_0x1a4d69[_0x7e389];return _0x414a7f;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';function a191_0x1a4d(){const _0x459a84=['remark','pageId','FORMAL','223404ysSGqz','warnings','appCode','Published\x20Custom\x20Page\x20','Custom\x20Page\x20ID','compress','string','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','36DZNqUm','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','15ZNUbig','status','number','apiError','1001ngamRV','runtimePageUrl','603290tEBsSU','page','write','2279936ygEWtl','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','2245540hUkiHR','/smartapi/webcode/file/publish','trim','619430VXFopR','309104AaOdGL','16740uVMPNm','push','pageCode','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page'];a191_0x1a4d=function(){return _0x459a84;};return a191_0x1a4d();}export const pageCustomPublish={'service':a191_0x57f81d(0xd4),'command':'custom-publish','description':a191_0x57f81d(0xbf),'risk':a191_0x57f81d(0xb3),'defaultOutputFormat':a191_0x57f81d(0xc8),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a191_0x57f81d(0xcf),'required':!![],'description':a191_0x57f81d(0xc7)},{'name':a191_0x57f81d(0xc0),'type':a191_0x57f81d(0xc9),'description':'Optional\x20publish\x20remark'}],async 'validate'(_0x44e0dc){readCustomPageId(_0x44e0dc);},async 'dryRun'(_0x6d110c){const _0x2c85bc=a191_0x57f81d,_0xe90fb8=readInput(_0x6d110c);return{'method':'POST','url':_0x2c85bc(0xb7),'body':{'id':_0xe90fb8[_0x2c85bc(0xc1)],..._0xe90fb8['remark']?{'remark':_0xe90fb8['remark']}:{}},'description':'Would\x20publish\x20Custom\x20Page\x20'+_0xe90fb8[_0x2c85bc(0xc1)]+'.'};},async 'execute'(_0x580708){const _0x22900e=a191_0x57f81d,_0x3b3c1f=readInput(_0x580708);await getCustomPageSource(_0x3b3c1f[_0x22900e(0xc1)]);const _0x48703c=await publishCustomPage(_0x3b3c1f);if(!Number['isInteger'](_0x48703c)||_0x48703c!==_0x3b3c1f['pageId'])throw CliErrors[_0x22900e(0xd0)](_0x22900e(0xcc));const _0x31163d=await getCustomPageSource(_0x3b3c1f[_0x22900e(0xc1)]);if(_0x31163d[_0x22900e(0xce)]!==_0x22900e(0xc2))throw CliErrors['apiError'](_0x22900e(0xbe)+(_0x31163d[_0x22900e(0xce)]??'unknown')+'.');const _0x1cf451=_0x31163d['appCode']?.[_0x22900e(0xb8)](),_0x34410f=buildCustomPageEditUrl(_0x1cf451,_0x3b3c1f[_0x22900e(0xc1)]),_0x51a9f7=await resolveCustomPageDevelopmentUrl(_0x1cf451,_0x3b3c1f[_0x22900e(0xc1)],_0x580708['cookie']),_0x4ef744=buildMutationData(_0x3b3c1f,!![],_0x51a9f7,_0x34410f);_0x1cf451&&!_0x51a9f7&&_0x4ef744[_0x22900e(0xc4)][_0x22900e(0xbc)](_0x22900e(0xb5));const _0x4fbdc4=buildCustomPageRuntimeUrl(_0x31163d[_0x22900e(0xc5)],_0x31163d[_0x22900e(0xbd)]);return _0x4fbdc4?_0x4ef744[_0x22900e(0xd2)]=_0x4fbdc4:_0x4ef744[_0x22900e(0xc4)][_0x22900e(0xbc)](_0x22900e(0xca)),{'ok':!![],'data':_0x4ef744,'message':_0x22900e(0xc6)+_0x3b3c1f[_0x22900e(0xc1)]+'.'};}};function readInput(_0x493446){const _0xda1986=a191_0x57f81d,_0x10a3d4=readCustomPageId(_0x493446),_0x3af597=_0x493446['str']('remark')[_0xda1986(0xb8)]();return{'pageId':_0x10a3d4,..._0x3af597?{'remark':_0x3af597}:{}};}function buildMutationData(_0x215062,_0x3c5f3=![],_0x6b3e76,_0x580880){const _0x5c24f7=a191_0x57f81d;return{'operation':'page.custom-publish','selector':{'pageId':_0x215062[_0x5c24f7(0xc1)]},'before':null,'after':{'pageId':_0x215062[_0x5c24f7(0xc1)],'status':_0x5c24f7(0xc2)},'dryRun':!_0x3c5f3,'request':_0x215062,..._0x6b3e76?{'pageUrl':_0x6b3e76}:{},..._0x580880?{'editPageUrl':_0x580880}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a192_0x1af7(){const _0x5f27fb=['path','733565sGBRGR','validation','type','/ide/','1066792rpKofM','516766AmVYpA','15762HPVrag','30eUjUkx','length','message','find','--id\x20must\x20be\x20a\x20positive\x20integer.','file','6KCPjTE','join','9438708pqjKrO','Invalid\x20Custom\x20Page\x20content:\x20','menus','pageId','9bNsFKe','936465MIomVX','map','856801TqrNWG','1VCKfve','4LmHRYW'];a192_0x1af7=function(){return _0x5f27fb;};return a192_0x1af7();}(function(_0x230ca2,_0x2f1706){const _0x38d476=a192_0x27ae,_0x125626=_0x230ca2();while(!![]){try{const _0x5ba124=-parseInt(_0x38d476(0x9c))/0x1*(parseInt(_0x38d476(0xa4))/0x2)+-parseInt(_0x38d476(0xa5))/0x3*(-parseInt(_0x38d476(0x9d))/0x4)+-parseInt(_0x38d476(0x99))/0x5+-parseInt(_0x38d476(0x92))/0x6*(parseInt(_0x38d476(0x9f))/0x7)+parseInt(_0x38d476(0xa3))/0x8*(parseInt(_0x38d476(0x98))/0x9)+-parseInt(_0x38d476(0xa6))/0xa*(parseInt(_0x38d476(0x9b))/0xb)+parseInt(_0x38d476(0x94))/0xc;if(_0x5ba124===_0x2f1706)break;else _0x125626['push'](_0x125626['shift']());}catch(_0x5b1d8a){_0x125626['push'](_0x125626['shift']());}}}(a192_0x1af7,0x226da));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a192_0x27ae(_0x3e8b4c,_0x36a6e5){_0x3e8b4c=_0x3e8b4c-0x8d;const _0x1af78f=a192_0x1af7();let _0x27ae7d=_0x1af78f[_0x3e8b4c];return _0x27ae7d;}import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':'Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted'};function trimOptional(_0x1d7e02){return _0x1d7e02?.['trim']()||undefined;}export function buildCustomPageRuntimeUrl(_0x50c44b,_0x50d033){const _0x619d7f=trimOptional(_0x50c44b),_0xa3f83=trimOptional(_0x50d033);if(!_0x619d7f||!_0xa3f83)return undefined;return getPublishedAppDomain(_0x619d7f)+'/'+encodeURIComponent(_0xa3f83);}export function buildCustomPageDevelopmentUrl(_0x2ed2dd,_0x1ab8ff){const _0x4ed895=trimOptional(_0x2ed2dd),_0x17fd2a=trimOptional(_0x1ab8ff);if(!_0x4ed895||!_0x17fd2a)return undefined;return getAppBaseUrl(_0x4ed895)+'/pages/'+encodeURIComponent(_0x17fd2a);}export async function resolveCustomPageDevelopmentUrl(_0x14f099,_0x34877d,_0x5db9fe){const _0x507632=a192_0x27ae,_0x427dad=trimOptional(_0x14f099);if(!_0x427dad)return undefined;try{const _0xc44261=(await fetchMenuSnapshot(_0x427dad,_0x5db9fe))[_0x507632(0x96)][_0x507632(0x8f)](_0x1c0ba5=>_0x1c0ba5[_0x507632(0xa1)]==='react'&&_0x1c0ba5[_0x507632(0x97)]===_0x34877d);return buildCustomPageDevelopmentUrl(_0x427dad,_0xc44261?.[_0x507632(0x9e)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x2b7691,_0x1e1989){const _0x15c2c3=a192_0x27ae,_0x1ed16c=trimOptional(_0x2b7691);if(!_0x1ed16c)return;const _0x1cc753=trimOptional(String(_0x1e1989??''));if(!_0x1cc753)return;return getAppBaseUrl(_0x1ed16c)+_0x15c2c3(0xa2)+encodeURIComponent(_0x1cc753);}export async function validateCustomPageContent(_0x38d6ee){const _0x42eb5a=a192_0x27ae,_0x7500e3=await validateCustomPageSourceFiles(_0x38d6ee);if(_0x7500e3[_0x42eb5a(0x8d)]>0x0)throw CliErrors[_0x42eb5a(0xa0)](_0x42eb5a(0x95)+_0x7500e3[_0x42eb5a(0x9a)](_0x575e20=>_0x575e20[_0x42eb5a(0x91)]+':\x20'+_0x575e20[_0x42eb5a(0x8e)])[_0x42eb5a(0x93)](';\x20'));}export function readCustomPageId(_0x31c106){const _0x31c792=a192_0x27ae,_0x28d8bb=_0x31c106['num']('id');if(!Number['isInteger'](_0x28d8bb)||_0x28d8bb<=0x0)throw CliErrors['validation'](_0x31c792(0x90));return _0x28d8bb;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a193_0x3a67(_0x245434,_0x261ac7){_0x245434=_0x245434-0x185;const _0x3a8d53=a193_0x3a8d();let _0x3a6781=_0x3a8d53[_0x245434];return _0x3a6781;}const a193_0x5c9638=a193_0x3a67;function a193_0x3a8d(){const _0x423e4c=['8uzVDaF','map','9397451uvOpmE','entries','97930dYEluu','.tsx','1255952cAIvfu','5484005UrXtRl','6RKBgZC','page\x20files','all','message','6sXWhlo','filter','toLowerCase','160791BngwwR','endsWith','29153883UJnZlW','trim','babel','typescript','805668apjzEF','1089xgLllX','some'];a193_0x3a8d=function(){return _0x423e4c;};return a193_0x3a8d();}(function(_0x1ce7dd,_0x480889){const _0x1d22b4=a193_0x3a67,_0x155ab3=_0x1ce7dd();while(!![]){try{const _0x3915ae=parseInt(_0x1d22b4(0x198))/0x1+parseInt(_0x1d22b4(0x186))/0x2*(-parseInt(_0x1d22b4(0x195))/0x3)+-parseInt(_0x1d22b4(0x18f))/0x4+-parseInt(_0x1d22b4(0x190))/0x5*(parseInt(_0x1d22b4(0x191))/0x6)+parseInt(_0x1d22b4(0x18b))/0x7*(parseInt(_0x1d22b4(0x189))/0x8)+-parseInt(_0x1d22b4(0x187))/0x9*(parseInt(_0x1d22b4(0x18d))/0xa)+parseInt(_0x1d22b4(0x19a))/0xb;if(_0x3915ae===_0x480889)break;else _0x155ab3['push'](_0x155ab3['shift']());}catch(_0x4ded4b){_0x155ab3['push'](_0x155ab3['shift']());}}}(a193_0x3a8d,0xb7a63));import{format}from'prettier';const SOURCE_PARSERS={'.js':a193_0x5c9638(0x19c),'.jsx':a193_0x5c9638(0x19c),'.ts':'typescript','.tsx':a193_0x5c9638(0x185)},CUSTOM_PAGE_EXTENSIONS=['.jsx',a193_0x5c9638(0x18e)];export async function validateCustomPageSourceFiles(_0x44fb7d){const _0x2985a6=a193_0x5c9638,_0x423a7f=Object[_0x2985a6(0x18c)](_0x44fb7d)[_0x2985a6(0x196)](([_0x50734f])=>getParser(_0x50734f));if(!_0x423a7f[_0x2985a6(0x188)](([_0x3dfece])=>isReactSourceFile(_0x3dfece)))return[{'file':_0x2985a6(0x192),'message':'Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx'}];const _0x4fe90a=await Promise[_0x2985a6(0x193)](_0x423a7f[_0x2985a6(0x18a)](async([_0xb94c89,_0x540b21])=>{const _0x300642=_0x2985a6;try{return await format(_0x540b21,{'parser':getParser(_0xb94c89)}),undefined;}catch(_0x4f759e){return{'file':_0xb94c89,'message':_0x4f759e instanceof Error?_0x4f759e[_0x300642(0x194)]:String(_0x4f759e)};}}));return _0x4fe90a[_0x2985a6(0x196)](_0x5541c8=>_0x5541c8!==undefined);}function getParser(_0x4003f3){const _0x22ea39=a193_0x5c9638,_0x2b6a1d=_0x4003f3[_0x22ea39(0x19b)]()['toLowerCase']();return Object['entries'](SOURCE_PARSERS)['find'](([_0x140b8f])=>_0x2b6a1d[_0x22ea39(0x199)](_0x140b8f))?.[0x1];}function isReactSourceFile(_0x17d7af){const _0x4e6ff5=a193_0x5c9638,_0x4cb5c9=_0x17d7af['trim']()[_0x4e6ff5(0x197)]();return CUSTOM_PAGE_EXTENSIONS[_0x4e6ff5(0x188)](_0xe4b8f2=>_0x4cb5c9[_0x4e6ff5(0x199)](_0xe4b8f2));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a194_0x7af4(_0x1ef09f,_0x5ec0a2){_0x1ef09f=_0x1ef09f-0x1ce;const _0x112bf6=a194_0x112b();let _0x7af4a=_0x112bf6[_0x1ef09f];return _0x7af4a;}const a194_0x70ac56=a194_0x7af4;(function(_0xdbe073,_0x4db89a){const _0x439c07=a194_0x7af4,_0x334d5a=_0xdbe073();while(!![]){try{const _0x10c7ab=-parseInt(_0x439c07(0x1ec))/0x1+parseInt(_0x439c07(0x1e2))/0x2+parseInt(_0x439c07(0x1ee))/0x3*(parseInt(_0x439c07(0x1f1))/0x4)+-parseInt(_0x439c07(0x1df))/0x5+-parseInt(_0x439c07(0x1cf))/0x6*(-parseInt(_0x439c07(0x1d2))/0x7)+parseInt(_0x439c07(0x1d7))/0x8+-parseInt(_0x439c07(0x1dd))/0x9;if(_0x10c7ab===_0x4db89a)break;else _0x334d5a['push'](_0x334d5a['shift']());}catch(_0x4b93d0){_0x334d5a['push'](_0x334d5a['shift']());}}}(a194_0x112b,0x965f7));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';function a194_0x112b(){const _0x1b3f97=['appCode','6101905TCzcsW','Custom\x20Page\x20ID','string','1194482dUcPpC','pageContent','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','page-content','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','page-dir','write','page','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','page.custom-update','1106234pFFGwp','/smartapi/webcode/page/update/content','3PocSUe','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','trim','2556712UhWPZf','Directory\x20containing\x20all\x20complete\x20page\x20files','custom-update','18jblzBo','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','number','2092538XeKaVT','validation','isInteger','newVersion','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','8121112jUAcxr','apiError','POST','appcode','str','pageId','1852362ccyrJa'];a194_0x112b=function(){return _0x1b3f97;};return a194_0x112b();}import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a194_0x70ac56(0x1e9),'command':a194_0x70ac56(0x1ce),'description':'Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','risk':a194_0x70ac56(0x1e8),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a194_0x70ac56(0x1e5),'message':a194_0x70ac56(0x1ef),'hint':a194_0x70ac56(0x1e6)}],'flags':[{'name':'id','type':a194_0x70ac56(0x1d1),'required':!![],'description':a194_0x70ac56(0x1e0)},{'name':a194_0x70ac56(0x1e7),'type':a194_0x70ac56(0x1e1),'required':!![],'description':a194_0x70ac56(0x1f2)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4426f2){readCustomPageId(_0x4426f2),await readValidatedPageContent(_0x4426f2);},async 'dryRun'(_0x2e4aef){const _0x44e279=a194_0x70ac56,_0xfe1301=await readInput(_0x2e4aef);return{'method':_0x44e279(0x1d9),'url':_0x44e279(0x1ed),'body':{'id':_0xfe1301[_0x44e279(0x1dc)],'codeContent':_0xfe1301[_0x44e279(0x1e3)]},'description':_0x44e279(0x1d0)+_0xfe1301[_0x44e279(0x1dc)]+'.'};},async 'execute'(_0x19ecd5){const _0x11e2bf=a194_0x70ac56,_0x1a78cd=await readInput(_0x19ecd5),_0x47eeb2=await updateCustomPageContent({'pageId':_0x1a78cd['pageId'],'pageContent':_0x1a78cd[_0x11e2bf(0x1e3)]});if(!Number[_0x11e2bf(0x1d4)](_0x47eeb2[_0x11e2bf(0x1d5)])||_0x47eeb2[_0x11e2bf(0x1d5)]<=0x0)throw CliErrors[_0x11e2bf(0x1d8)](_0x11e2bf(0x1e4));const _0x41a3ea=buildCustomPageEditUrl(_0x1a78cd[_0x11e2bf(0x1de)],_0x1a78cd[_0x11e2bf(0x1dc)]),_0x3b145d=await resolveCustomPageDevelopmentUrl(_0x1a78cd[_0x11e2bf(0x1de)],_0x1a78cd[_0x11e2bf(0x1dc)],_0x19ecd5['cookie']);return{'ok':!![],'data':{'operation':_0x11e2bf(0x1eb),'selector':{'appCode':_0x1a78cd[_0x11e2bf(0x1de)],'pageId':_0x1a78cd[_0x11e2bf(0x1dc)]},'before':null,'after':{'pageId':_0x47eeb2[_0x11e2bf(0x1dc)],'version':_0x47eeb2[_0x11e2bf(0x1d5)],'pageContent':_0x1a78cd[_0x11e2bf(0x1e3)]},'dryRun':![],'request':_0x1a78cd,..._0x3b145d?{'pageUrl':_0x3b145d}:{},..._0x41a3ea?{'editPageUrl':_0x41a3ea}:{},'warnings':_0x3b145d?[]:[_0x11e2bf(0x1ea)]},'message':'Updated\x20Custom\x20Page\x20'+_0x1a78cd['pageId']+'.'};}};async function readInput(_0x56efff){const _0x53b505=a194_0x70ac56,_0x513cb8=readCustomPageId(_0x56efff),_0x21e16e=_0x56efff[_0x53b505(0x1db)](_0x53b505(0x1da))[_0x53b505(0x1f0)]()||(await getCustomPageSource(_0x513cb8))[_0x53b505(0x1de)]?.['trim']();if(!_0x21e16e)throw CliErrors[_0x53b505(0x1d3)](_0x53b505(0x1d6)+_0x513cb8+'.');return{'appCode':_0x21e16e,'pageId':_0x513cb8,'pageContent':await readValidatedPageContent(_0x56efff)};}async function readValidatedPageContent(_0x53d40a){const _0x43d661=a194_0x70ac56,_0x11ba32=await readCustomPageDirectory(_0x53d40a[_0x43d661(0x1db)](_0x43d661(0x1e7)));return await validateCustomPageContent(_0x11ba32),_0x11ba32;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a195_0x92175e=a195_0x3cab;function a195_0x3cab(_0x51ff05,_0x4ad430){_0x51ff05=_0x51ff05-0xde;const _0x1fb60e=a195_0x1fb6();let _0x3cabe0=_0x1fb60e[_0x51ff05];return _0x3cabe0;}(function(_0x4658c0,_0x7ff845){const _0x489e58=a195_0x3cab,_0x3ba3b3=_0x4658c0();while(!![]){try{const _0x43db98=parseInt(_0x489e58(0xe9))/0x1+parseInt(_0x489e58(0xe5))/0x2+parseInt(_0x489e58(0xeb))/0x3*(-parseInt(_0x489e58(0xde))/0x4)+parseInt(_0x489e58(0xef))/0x5+parseInt(_0x489e58(0xe8))/0x6+-parseInt(_0x489e58(0xf7))/0x7+-parseInt(_0x489e58(0xe3))/0x8*(parseInt(_0x489e58(0xf4))/0x9);if(_0x43db98===_0x7ff845)break;else _0x3ba3b3['push'](_0x3ba3b3['shift']());}catch(_0x20672e){_0x3ba3b3['push'](_0x3ba3b3['shift']());}}}(a195_0x1fb6,0xef63f));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a195_0x92175e(0xe0),'command':a195_0x92175e(0xf5),'description':a195_0x92175e(0xf0),'risk':'read','defaultOutputFormat':a195_0x92175e(0xe6),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a195_0x92175e(0xf1),'type':'string','description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x49ef3c){validateDatasetSelector(_0x49ef3c);},async 'dryRun'(_0x307c86){const _0x548936=a195_0x92175e,_0x119384=await loadDatasetDetailForPage(_0x307c86);return{'method':_0x548936(0xed),'url':_0x548936(0xea)+_0x119384['code']+_0x548936(0xf6)+encodeURIComponent(_0x307c86[_0x548936(0xf2)]),'description':serializeDryRunDescription({'dataset':{'id':_0x119384['id'],'code':_0x119384[_0x548936(0xe7)],'name':_0x119384[_0x548936(0xe1)]},'action':'query-data-list-status'})};},async 'execute'(_0x2954b1){const _0x233af9=a195_0x92175e,_0x2dceda=await loadDatasetDetailForPage(_0x2954b1),_0x261953=await loadDataListPageStatusForGenerate(_0x2954b1,_0x2dceda[_0x233af9(0xe7)]),_0x4bb99c=getUndeletedRelatedPages(_0x2dceda),_0x21e521=assessDataListPageState(_0x2dceda['code'],_0x261953,{'fallbackUndeletedPages':_0x4bb99c});return{'ok':!![],'data':{'datasetCode':_0x2dceda[_0x233af9(0xe7)],'precheckSource':_0x261953?.[_0x233af9(0xf3)]??_0x233af9(0xee),'status':_0x21e521[_0x233af9(0xf8)],'manualResolutionRequired':_0x21e521[_0x233af9(0xec)],'nextAction':_0x21e521[_0x233af9(0xe4)],'dataListPageStatus':_0x261953,'relatedPages':{'total':_0x2dceda[_0x233af9(0xe2)][_0x233af9(0xdf)],'undeletedCount':_0x4bb99c['length']}}};}};function a195_0x1fb6(){const _0xa6aecc=['18OlrofF','data-list-status','/standard-page-status?appCode=','10380097xleiNB','status','4536340XMbHBj','length','page','name','relatedPages','3798688IymrAH','nextAction','3340606rVfEJV','compress','code','2434740pwMEaO','1004447whEjNa','/smartapi/lovrabet/dataset/','3DrIERs','manualResolutionRequired','GET','related-pages-fallback','7333155DuPyUi','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','alias','appCode','source'];a195_0x1fb6=function(){return _0xa6aecc;};return a195_0x1fb6();}
|