@lovrabet/rabetbase-cli 2.5.10-beta.4 → 2.5.10
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/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.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/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.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/page-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/context.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/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-analysis.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/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.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/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.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/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 +4 -4
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x569221=a194_0x24e2;(function(_0x94cd65,_0x4e4680){const _0x423135=a194_0x24e2,_0x9fb606=_0x94cd65();while(!![]){try{const _0x5025c7=parseInt(_0x423135(0xec))/0x1*(-parseInt(_0x423135(0xef))/0x2)+parseInt(_0x423135(0xf3))/0x3*(parseInt(_0x423135(0xdd))/0x4)+-parseInt(_0x423135(0xd8))/0x5*(parseInt(_0x423135(0xe1))/0x6)+-parseInt(_0x423135(0xe0))/0x7*(-parseInt(_0x423135(0xe3))/0x8)+-parseInt(_0x423135(0xdb))/0x9+-parseInt(_0x423135(0xf0))/0xa*(-parseInt(_0x423135(0xdc))/0xb)+parseInt(_0x423135(0xda))/0xc*(-parseInt(_0x423135(0xd9))/0xd);if(_0x5025c7===_0x4e4680)break;else _0x9fb606['push'](_0x9fb606['shift']());}catch(_0x5a710d){_0x9fb606['push'](_0x9fb606['shift']());}}}(a194_0x44bf,0x2cb65));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a194_0x24e2(_0xd56367,_0x1f0f86){_0xd56367=_0xd56367-0xd6;const _0x44bf01=a194_0x44bf();let _0x24e226=_0x44bf01[_0xd56367];return _0x24e226;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x569221(0xd7),'command':'config-list','description':a194_0x569221(0xf1),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a194_0x569221(0xe2),'description':a194_0x569221(0xea),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x569221(0xeb),'type':'boolean','default':![],'description':a194_0x569221(0xed)}],async 'validate'(_0x38d940){const _0x4adf52=a194_0x569221;if(_0x38d940[_0x4adf52(0xe8)](_0x4adf52(0xeb))&&_0x38d940['str']('type')[_0x4adf52(0xd6)]())throw CliErrors[_0x4adf52(0xe9)](_0x4adf52(0xee),_0x4adf52(0xe4));if(_0x38d940[_0x4adf52(0xe8)]('all'))return;readNotificationChannelType(_0x38d940);},async 'execute'(_0x5277ac){const _0x275660=a194_0x569221;if(_0x5277ac['bool'](_0x275660(0xeb))){const _0x1977a8=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0x275660(0xf2)](_0x15f0e1=>listNotificationChannelConfigs(_0x5277ac[_0x275660(0xdf)],_0x15f0e1))),_0x5d3b64=_0x1977a8[_0x275660(0xe5)]()[_0x275660(0xf2)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5277ac['appCode'],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x5d3b64[_0x275660(0xde)],'configs':_0x5d3b64},'message':_0x275660(0xe6)+_0x5d3b64[_0x275660(0xde)]+_0x275660(0xf4)};}const _0x533dc3=readNotificationChannelType(_0x5277ac),_0x4b3c82=await listNotificationChannelConfigs(_0x5277ac['appCode'],_0x533dc3),_0x14879a=_0x4b3c82[_0x275660(0xf2)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5277ac[_0x275660(0xdf)],'channelType':_0x533dc3,'count':_0x14879a[_0x275660(0xde)],'configs':_0x14879a},'message':_0x275660(0xe6)+_0x14879a['length']+'\x20'+_0x533dc3+_0x275660(0xe7)};}};function a194_0x44bf(){const _0x480055=['flat','Found\x20','\x20notification\x20config(s)','bool','validation','Notification\x20channel\x20type','all','388dzwDGP','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','46LaupoM','79330ZLaICr','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','map','789Mpbgxx','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','trim','notification','5CRLnUD','39xXrujP','1337124eTDPva','170253nUsDqG','407cKOklv','2276LsqUvm','length','appCode','21okKmgF','1483404skorJm','string','931544lahDrw','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.'];a194_0x44bf=function(){return _0x480055;};return a194_0x44bf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x4f6d15=a195_0x1253;(function(_0x22a79b,_0x2d3896){const _0x8da085=a195_0x1253,_0x1b6e97=_0x22a79b();while(!![]){try{const _0x353b89=parseInt(_0x8da085(0xa5))/0x1+parseInt(_0x8da085(0xc2))/0x2*(parseInt(_0x8da085(0xb9))/0x3)+parseInt(_0x8da085(0xbd))/0x4*(parseInt(_0x8da085(0xae))/0x5)+parseInt(_0x8da085(0xb6))/0x6+-parseInt(_0x8da085(0xc6))/0x7*(parseInt(_0x8da085(0xb3))/0x8)+-parseInt(_0x8da085(0xb0))/0x9+-parseInt(_0x8da085(0xca))/0xa;if(_0x353b89===_0x2d3896)break;else _0x1b6e97['push'](_0x1b6e97['shift']());}catch(_0x41cb05){_0x1b6e97['push'](_0x1b6e97['shift']());}}}(a195_0x28a8,0x7a550));import{asDryRunResult}from'../../commands/common/dry-run.js';function a195_0x1253(_0x1667aa,_0x12d512){_0x1667aa=_0x1667aa-0xa5;const _0x28a804=a195_0x28a8();let _0x12532a=_0x28a804[_0x1667aa];return _0x12532a;}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a195_0x28a8(){const _0x351b63=['verified','Inspect\x20with\x20--id\x20','/notification/channel-config/update','provesChange','355395GHbgMk','update','6425730uJjrUh','notification_config_update_verification_unavailable','patch','152IznMqR','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','mutation','2136306eDdaTi','before','Notification\x20config\x20','11955Udmaxi','planned','notification_config_update_verification_failed','high-risk-write','52MoixPr',';\x20do\x20not\x20resubmit\x20automatically.','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','notification','notification_config_update_outcome_unknown','268QWnCuV','appCode','channelType','config-update','33075WRbnDq','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','Updated\x20notification\x20config\x20','5842560rlkIDS','75005BZYmpm','POST','verifiedFields','\x20with\x20','Inspect\x20ID\x20'];a195_0x28a8=function(){return _0x351b63;};return a195_0x28a8();}const UPDATE_PATH=a195_0x4f6d15(0xac);async function prepareUpdate(_0x55bcb0){const _0xf877bc=a195_0x4f6d15,_0x2ae23c=readNotificationId(_0x55bcb0),_0x2e548e=await readNotificationDocument(_0x55bcb0,_0xf877bc(0xaf)),_0x3fdd0e=await requireExactNotificationConfig(_0x55bcb0[_0xf877bc(0xc3)],_0x2ae23c,_0xf877bc(0xaf));return{'id':_0x2ae23c,'patch':_0x2e548e,'before':_0x3fdd0e,'payload':mergeUpdateInput(_0x3fdd0e,_0x2e548e),'planned':plannedUpdateProjection(_0x3fdd0e,_0x2e548e)};}export const notificationConfigUpdate={'service':a195_0x4f6d15(0xc0),'command':a195_0x4f6d15(0xc5),'description':a195_0x4f6d15(0xbf),'risk':a195_0x4f6d15(0xbc),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x533131){readNotificationId(_0x533131),assertSingleNotificationSource(_0x533131),requireNotificationExplicitYes(_0x533131);},async 'dryRun'(_0x1256ac){const _0xfca745=a195_0x4f6d15,_0x25dd4e=await prepareUpdate(_0x1256ac),_0x56f278=notificationLookupCommand(_0x1256ac['appCode'],_0x25dd4e[_0xfca745(0xb7)][_0xfca745(0xc4)]);return asDryRunResult({'operation':_0xfca745(0xaf),'selector':notificationSelector(_0x25dd4e[_0xfca745(0xb7)]),'before':projectNotificationConfig(_0x25dd4e[_0xfca745(0xb7)]),'after':_0x25dd4e[_0xfca745(0xba)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':_0xfca745(0xba),'lookupCommand':_0x56f278}},{'method':_0xfca745(0xa6),'url':UPDATE_PATH});},async 'execute'(_0x1f857c){const _0x1e5577=a195_0x4f6d15;requireNotificationExplicitYes(_0x1f857c);const _0x54b426=await prepareUpdate(_0x1f857c),_0x542035=notificationLookupCommand(_0x1f857c[_0x1e5577(0xc3)],_0x54b426['before']['channelType']);let _0x342ff8=![];try{await updateNotificationChannelConfig(_0x54b426['payload']);}catch(_0x57432d){if(!isPlatformTransportFailure(_0x57432d))throw safeApiFailure(_0x1e5577(0xaf),_0x1e5577(0xb5),_0x1e5577(0xa9)+_0x54b426['id']+_0x1e5577(0xa8)+_0x542035+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x342ff8=!![];}let _0x9a5abd;try{const _0x17ce02=await getNotificationChannelConfig(_0x54b426['id'],_0x1f857c[_0x1e5577(0xc3)]);_0x9a5abd=normalizeExactNotificationConfig(_0x17ce02,_0x54b426['id'],_0x1f857c[_0x1e5577(0xc3)]);}catch{throw notificationError(_0x342ff8?_0x1e5577(0xc1):_0x1e5577(0xb1),_0x1e5577(0xb8)+_0x54b426['id']+_0x1e5577(0xc8),'Inspect\x20with\x20--id\x20'+_0x54b426['id']+'\x20via\x20'+_0x542035+_0x1e5577(0xbe));}const _0x367603=requestedSafeFieldsMatch(_0x54b426[_0x1e5577(0xb7)],_0x9a5abd,_0x54b426[_0x1e5577(0xb2)]);if(!_0x367603['allMatch']||_0x342ff8&&!_0x367603[_0x1e5577(0xad)])throw notificationError(_0x342ff8?'notification_config_update_outcome_unknown':_0x1e5577(0xbb),'Notification\x20config\x20'+_0x54b426['id']+_0x1e5577(0xc7),_0x1e5577(0xab)+_0x54b426['id']+'\x20via\x20'+_0x542035+_0x1e5577(0xbe));const _0xf6f322=_0x342ff8?[_0x1e5577(0xb4)]:[];return{'ok':!![],'data':{'operation':_0x1e5577(0xaf),'selector':notificationSelector(_0x9a5abd),'before':projectNotificationConfig(_0x54b426[_0x1e5577(0xb7)]),'after':projectNotificationConfig(_0x9a5abd),'dryRun':![],'backend':{'method':_0x1e5577(0xa6),'path':UPDATE_PATH},'warnings':_0xf6f322,'verification':{'status':_0x1e5577(0xaa),'recoveredAfterUnknownResponse':_0x342ff8,'verifiedFields':_0x367603[_0x1e5577(0xa7)],'lookupCommand':_0x542035}},'message':_0x1e5577(0xc9)+_0x9a5abd['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9848bf,_0x266cbc){const _0xdbea0a=a196_0x5309,_0x3f666b=_0x9848bf();while(!![]){try{const _0x46d329=-parseInt(_0xdbea0a(0x169))/0x1+-parseInt(_0xdbea0a(0x16d))/0x2+-parseInt(_0xdbea0a(0x16b))/0x3*(-parseInt(_0xdbea0a(0x16e))/0x4)+parseInt(_0xdbea0a(0x16c))/0x5+-parseInt(_0xdbea0a(0x16a))/0x6*(parseInt(_0xdbea0a(0x172))/0x7)+parseInt(_0xdbea0a(0x168))/0x8*(-parseInt(_0xdbea0a(0x16f))/0x9)+parseInt(_0xdbea0a(0x170))/0xa*(parseInt(_0xdbea0a(0x171))/0xb);if(_0x46d329===_0x266cbc)break;else _0x3f666b['push'](_0x3f666b['shift']());}catch(_0x1c471c){_0x3f666b['push'](_0x3f666b['shift']());}}}(a196_0x48bb,0x3f2b1));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a196_0x5309(_0x5b28b7,_0x554fb0){_0x5b28b7=_0x5b28b7-0x168;const _0x48bb40=a196_0x48bb();let _0x530919=_0x48bb40[_0x5b28b7];return _0x530919;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a196_0x48bb(){const _0x10e4a8=['995560SBXddC','488116COxWDg','387gdTRDw','293990VRiSPx','572uSjyfc','3615017fwAcJD','46472mdIuKv','181801kGAcAQ','6vJyDXs','3hXjIkz','268795MZYzlr'];a196_0x48bb=function(){return _0x10e4a8;};return a196_0x48bb();}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a197_0x1e9c36=a197_0x3bdc;function a197_0x3473(){const _0x2574cf=['stringify','Notification\x20JSON\x20field\x20\x22','trim','call','replyTo','channelType','a\x20non-empty\x20string','\x20has\x20an\x20invalid\x20channelType.','isSafeInteger','notification_config_update_empty','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x22configName\x22.','29170qOmTJk','stdin','update','configName','a\x20string\x20or\x20null','subjectPrefix','notification_config_field_required','ccList','Notification\x20config\x20list\x20item\x20','prototype','push','isArray','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','every','860kzuKJL','channelConfigRaw','name','Allowed\x20values:\x20','notification_config_field_forbidden','32waqnad','from-env','notification_config_confirmation_required','WECOM','join','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','apiError','\x22\x20cannot\x20exceed\x20','Notification\x20JSON\x20from\x20','3355rIwwXi','entries','Item\x20','path','description','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_field_unknown','bccList','WEBHOOK','readTimeout','<redacted>','6Ntgult','notification_config_','\x20has\x20an\x20invalid\x20id.','notification_config_source_unavailable','preflight','DINGTALK','length','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','a\x20supported\x20string','FEISHU','\x20is\x20missing\x20required\x20field\x20\x22','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','number','channelConfig','\x20--type\x20','\x20has\x20invalid\x20field\x20\x22','\x20has\x20an\x20unsupported\x20channelType.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','451535hrQOKP','env','emailTargets','endpointUrl:null','file','notification_config_channel_field_forbidden','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','includes','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Unknown\x20notification\x20JSON\x20field\x20\x22','setEncoding','Missing\x20notification\x20JSON\x20source.','\x20characters.','keys','updateTime','Notification\x20JSON\x20source\x20is\x20ambiguous.','Notification\x20config\x20','channelCode','Application-level\x20notification\x20config\x20ID','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','784728RirHFN','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','messageTemplate','Notification\x20JSON\x20channelConfig\x20field\x20\x22','132828HeSSJd','notification_config_field_invalid','endpointUrlRaw','\x22\x20must\x20be\x20','str','Invalid\x20notification\x20config\x20response.','mutation','boolean','_unavailable','notification_config_id_invalid','EMAIL','Invalid\x20--','has','endpointUrl','connectTimeout','environment\x20variable\x20','configCode','a\x20JSON\x20object','\x22\x20is\x20forbidden.','string','115596JTduCx','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20must\x20be\x20an\x20object.','bool','notification_config_response_invalid','create','utf8','dry-run','4dIlDUp','\x22channelType\x22.','failed','notification_config_json_invalid','validation','Create\x20JSON\x20requires\x20field\x20','appCode','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','fromName','kind','4899284NDRngR','num','1544575yMCBxV'];a197_0x3473=function(){return _0x2574cf;};return a197_0x3473();}(function(_0x51b05d,_0x5d493f){const _0x47261f=a197_0x3bdc,_0xac62f0=_0x51b05d();while(!![]){try{const _0x1e3a37=-parseInt(_0x47261f(0x19a))/0x1*(parseInt(_0x47261f(0x1b3))/0x2)+parseInt(_0x47261f(0x17a))/0x3+-parseInt(_0x47261f(0x1a4))/0x4+parseInt(_0x47261f(0x1a6))/0x5*(-parseInt(_0x47261f(0x1db))/0x6)+-parseInt(_0x47261f(0x165))/0x7*(parseInt(_0x47261f(0x1c6))/0x8)+parseInt(_0x47261f(0x192))/0x9*(-parseInt(_0x47261f(0x1c1))/0xa)+parseInt(_0x47261f(0x1d0))/0xb*(parseInt(_0x47261f(0x17e))/0xc);if(_0x1e3a37===_0x5d493f)break;else _0xac62f0['push'](_0xac62f0['shift']());}catch(_0xbf76d7){_0xac62f0['push'](_0xac62f0['shift']());}}}(a197_0x3473,0xa6bbd));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=[a197_0x1e9c36(0x188),a197_0x1e9c36(0x15c),a197_0x1e9c36(0x158),a197_0x1e9c36(0x1c9),a197_0x1e9c36(0x1d8)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType',a197_0x1e9c36(0x18b),a197_0x1e9c36(0x160),a197_0x1e9c36(0x1d4),a197_0x1e9c36(0x18c),a197_0x1e9c36(0x1d9)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x1e9c36(0x1a0),a197_0x1e9c36(0x18e),a197_0x1e9c36(0x177)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x1e9c36(0x167),'recipients',a197_0x1e9c36(0x1ba),a197_0x1e9c36(0x1d7),a197_0x1e9c36(0x1ab),a197_0x1e9c36(0x1b8),a197_0x1e9c36(0x1a2),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x1e9c36(0x169),'type':a197_0x1e9c36(0x191),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a197_0x1e9c36(0x185),'required':![],'default':![],'description':a197_0x1e9c36(0x1a1)},{'name':a197_0x1e9c36(0x1c7),'type':a197_0x1e9c36(0x191),'required':![],'description':a197_0x1e9c36(0x15a)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x1e9c36(0x15f),'required':!![],'description':a197_0x1e9c36(0x178)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5a63b3,_0x1a5dd9,_0x2c0214){return new CliError(_0x5a63b3,0x1,_0x1a5dd9,_0x2c0214);}export function readNotificationId(_0x58975f){const _0x59eb95=a197_0x1e9c36,_0x14fb36=_0x58975f[_0x59eb95(0x1a5)]('id');if(!Number[_0x59eb95(0x1af)](_0x14fb36)||_0x14fb36<=0x0)throw notificationError(_0x59eb95(0x187),_0x59eb95(0x16b));return _0x14fb36;}export function requireNotificationExplicitYes(_0x13aefe){const _0x5f2d5f=a197_0x1e9c36;if(_0x13aefe[_0x5f2d5f(0x195)](_0x5f2d5f(0x199))||_0x13aefe['bool']('yes'))return;throw notificationError(_0x5f2d5f(0x1c8),_0x5f2d5f(0x1cb),_0x5f2d5f(0x164));}export function readNotificationChannelType(_0x27c422,_0x245650='type',_0x154281=a197_0x1e9c36(0x188)){const _0x4d8d9b=a197_0x1e9c36,_0x42cc1c=_0x27c422[_0x4d8d9b(0x182)](_0x245650)[_0x4d8d9b(0x1a9)]()||_0x154281;if(!NOTIFICATION_CHANNEL_TYPES[_0x4d8d9b(0x16d)](_0x42cc1c))throw CliErrors[_0x4d8d9b(0x19e)](_0x4d8d9b(0x189)+_0x245650+':\x20'+_0x42cc1c,_0x4d8d9b(0x1c4)+NOTIFICATION_CHANNEL_TYPES[_0x4d8d9b(0x1ca)](',\x20')+'.');return _0x42cc1c;}export function assertSingleNotificationSource(_0x3d2774){const _0x58cda9=a197_0x1e9c36,_0x2a5142=[],_0xff3d9b=_0x3d2774[_0x58cda9(0x182)](_0x58cda9(0x169))['trim']();if(_0xff3d9b)_0x2a5142['push']({'kind':'file','path':_0xff3d9b});if(_0x3d2774[_0x58cda9(0x195)](_0x58cda9(0x1b4)))_0x2a5142[_0x58cda9(0x1bd)]({'kind':_0x58cda9(0x1b4)});const _0x235303=_0x3d2774[_0x58cda9(0x182)](_0x58cda9(0x1c7))[_0x58cda9(0x1a9)]();if(_0x235303)_0x2a5142['push']({'kind':'env','name':_0x235303});if(_0x2a5142['length']===0x0)throw CliErrors['validation'](_0x58cda9(0x171),_0x58cda9(0x17b));if(_0x2a5142[_0x58cda9(0x159)]>0x1)throw CliErrors['validation'](_0x58cda9(0x175),_0x58cda9(0x17b));return _0x2a5142[0x0];}export async function readNotificationDocument(_0x35f880,_0x4a0031){const _0x289d43=a197_0x1e9c36,_0x3a0fbb=assertSingleNotificationSource(_0x35f880),_0x509991=_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x169)?'file\x20'+_0x3a0fbb[_0x289d43(0x1d3)]:_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x166)?_0x289d43(0x18d)+_0x3a0fbb[_0x289d43(0x1c3)]:_0x289d43(0x1b4);let _0x40b947;try{if(_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x169))_0x40b947=await readFile(_0x3a0fbb[_0x289d43(0x1d3)],_0x289d43(0x198));else{if(_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x166)){if(!(_0x3a0fbb['name']in process.env))throw notificationError(_0x289d43(0x1de),_0x289d43(0x1d5)+_0x3a0fbb['name']);_0x40b947=process.env[_0x3a0fbb.name]??'';}else _0x40b947=await readStdin();}}catch(_0x5b672c){if(_0x5b672c instanceof CliError)throw _0x5b672c;throw notificationError(_0x289d43(0x1de),_0x289d43(0x15e)+_0x509991+'.');}let _0x270284;try{_0x270284=JSON['parse'](_0x40b947);}catch{throw notificationError(_0x289d43(0x19d),_0x289d43(0x1cf)+_0x509991+'\x20is\x20invalid.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x270284))throw notificationError(_0x289d43(0x19d),_0x289d43(0x1cf)+_0x509991+_0x289d43(0x194));return validateNotificationDocument(_0x270284,_0x4a0031);}export function projectNotificationListConfig(_0x31ba34,_0x15a2a0){const _0x1baa24=a197_0x1e9c36;return{'id':typeof _0x31ba34['id']===_0x1baa24(0x15f)?_0x31ba34['id']:null,'configCode':requireResponseString(_0x31ba34[_0x1baa24(0x18e)],'configCode',_0x15a2a0),'configName':requireResponseString(_0x31ba34['configName'],_0x1baa24(0x1b6),_0x15a2a0),'channelType':requireResponseString(_0x31ba34[_0x1baa24(0x1ac)],_0x1baa24(0x1ac),_0x15a2a0),'description':normalizeNullableString(_0x31ba34[_0x1baa24(0x1d4)]),'createTime':normalizeNullableString(_0x31ba34['createTime']),'updateTime':normalizeNullableString(_0x31ba34[_0x1baa24(0x174)])};}function a197_0x3bdc(_0x49ac77,_0x2ea21a){_0x49ac77=_0x49ac77-0x158;const _0x34730d=a197_0x3473();let _0x3bdcf7=_0x34730d[_0x49ac77];return _0x3bdcf7;}export function normalizeExactNotificationConfig(_0x47c136,_0x3ab9a1,_0x32cc36){const _0x612b13=a197_0x1e9c36;if(!Number[_0x612b13(0x1af)](_0x47c136['id'])||_0x47c136['id']!==_0x3ab9a1)throw notificationError(_0x612b13(0x196),_0x612b13(0x1bf)+_0x3ab9a1+'.');if(_0x47c136['appCode']!==_0x32cc36)throw notificationError(_0x612b13(0x196),_0x612b13(0x176)+_0x3ab9a1+_0x612b13(0x1b1));const _0x4f93db=requireExactString(_0x47c136[_0x612b13(0x1b6)],_0x612b13(0x1b6),_0x3ab9a1),_0x3992f2=requireExactString(_0x47c136['configCode'],'configCode',_0x3ab9a1),_0x537ffa=requireExactString(_0x47c136[_0x612b13(0x1ac)],_0x612b13(0x1ac),_0x3ab9a1);if(!NOTIFICATION_CHANNEL_TYPES[_0x612b13(0x16d)](_0x537ffa))throw notificationError(_0x612b13(0x196),_0x612b13(0x176)+_0x3ab9a1+_0x612b13(0x163));const _0x4ca14e=responseNullableString(_0x47c136[_0x612b13(0x18b)],_0x612b13(0x18b),_0x3ab9a1),_0x2535a5=responseNullableString(_0x47c136['channelConfig'],_0x612b13(0x160),_0x3ab9a1),_0xced6ae=responseNullableString(_0x47c136[_0x612b13(0x1d4)],_0x612b13(0x1d4),_0x3ab9a1),_0x5b0e08=responseNullableTimeout(_0x47c136[_0x612b13(0x18c)],_0x612b13(0x18c),_0x3ab9a1),_0x46f7ed=responseNullableTimeout(_0x47c136[_0x612b13(0x1d9)],'readTimeout',_0x3ab9a1);return{'id':_0x3ab9a1,'appCode':_0x32cc36,'configCode':_0x3992f2,'configName':_0x4f93db,'channelType':_0x537ffa,'endpointUrl':redactSensitive(_0x4ca14e),'channelConfig':redactSensitive(_0x2535a5),'description':_0xced6ae,'connectTimeout':_0x5b0e08,'readTimeout':_0x46f7ed,'endpointUrlRaw':_0x4ca14e,'channelConfigRaw':_0x2535a5};}export async function requireExactNotificationConfig(_0x292666,_0x5e90e7,_0x3a4146){const _0x26029b=a197_0x1e9c36;let _0x165b01;try{_0x165b01=await getNotificationChannelConfig(_0x5e90e7,_0x292666);}catch{throw safeApiFailure(_0x3a4146,_0x26029b(0x1df),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x292666+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x165b01,_0x5e90e7,_0x292666);}export function projectNotificationConfig(_0x3ca4dd){const _0x11c188=a197_0x1e9c36;return{'id':_0x3ca4dd['id']??null,'appCode':_0x3ca4dd[_0x11c188(0x1a0)],'configCode':_0x3ca4dd['configCode']??null,'configName':_0x3ca4dd[_0x11c188(0x1b6)],'channelType':_0x3ca4dd['channelType'],'endpointUrl':redactSensitive(_0x3ca4dd['endpointUrl']),'channelConfig':redactSensitive(_0x3ca4dd[_0x11c188(0x160)]),'description':_0x3ca4dd['description']??null,'connectTimeout':_0x3ca4dd[_0x11c188(0x18c)]??null,'readTimeout':_0x3ca4dd[_0x11c188(0x1d9)]??null};}export function notificationSelector(_0x42e44b){const _0x87b05a=a197_0x1e9c36;return{'appCode':_0x42e44b[_0x87b05a(0x1a0)],'id':_0x42e44b['id'],'configCode':_0x42e44b[_0x87b05a(0x18e)],'configName':_0x42e44b[_0x87b05a(0x1b6)],'channelType':_0x42e44b[_0x87b05a(0x1ac)]};}export function createMutationInput(_0x3c66a2,_0xa73468){const _0xd7d1e9=a197_0x1e9c36;return{'appCode':_0x3c66a2,'configName':_0xa73468[_0xd7d1e9(0x1b6)],'channelType':_0xa73468[_0xd7d1e9(0x1ac)],...hasOwn(_0xa73468,'endpointUrl')?{'endpointUrl':_0xa73468[_0xd7d1e9(0x18b)]}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x160))?{'channelConfig':serializeChannelConfig(_0xa73468[_0xd7d1e9(0x160)])}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x1d4))?{'description':_0xa73468[_0xd7d1e9(0x1d4)]}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x18c))?{'connectTimeout':_0xa73468['connectTimeout']}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x1d9))?{'readTimeout':_0xa73468[_0xd7d1e9(0x1d9)]}:{}};}export function mergeUpdateInput(_0xf15ec1,_0x380a5b){const _0x243d05=a197_0x1e9c36;return{'id':_0xf15ec1['id'],'appCode':_0xf15ec1[_0x243d05(0x1a0)],'configName':_0x380a5b[_0x243d05(0x1b6)]??_0xf15ec1['configName'],'channelType':_0x380a5b[_0x243d05(0x1ac)]??_0xf15ec1[_0x243d05(0x1ac)],'endpointUrl':hasOwn(_0x380a5b,_0x243d05(0x18b))?_0x380a5b[_0x243d05(0x18b)]:_0xf15ec1['endpointUrlRaw'],'channelConfig':hasOwn(_0x380a5b,_0x243d05(0x160))?serializeChannelConfig(_0x380a5b[_0x243d05(0x160)]):_0xf15ec1[_0x243d05(0x1c2)],'description':hasOwn(_0x380a5b,_0x243d05(0x1d4))?_0x380a5b['description']:_0xf15ec1[_0x243d05(0x1d4)],'connectTimeout':hasOwn(_0x380a5b,_0x243d05(0x18c))?_0x380a5b[_0x243d05(0x18c)]:_0xf15ec1[_0x243d05(0x18c)],'readTimeout':hasOwn(_0x380a5b,_0x243d05(0x1d9))?_0x380a5b['readTimeout']:_0xf15ec1[_0x243d05(0x1d9)]};}export function plannedUpdateProjection(_0x202927,_0x4b96a5){const _0x4ca9b4=a197_0x1e9c36;return projectNotificationConfig({'id':_0x202927['id'],'appCode':_0x202927[_0x4ca9b4(0x1a0)],'configCode':_0x202927[_0x4ca9b4(0x18e)],'configName':_0x4b96a5['configName']??_0x202927['configName'],'channelType':_0x4b96a5['channelType']??_0x202927['channelType'],'endpointUrl':hasOwn(_0x4b96a5,_0x4ca9b4(0x18b))?_0x4b96a5[_0x4ca9b4(0x18b)]:_0x202927[_0x4ca9b4(0x180)],'channelConfig':hasOwn(_0x4b96a5,_0x4ca9b4(0x160))?_0x4b96a5[_0x4ca9b4(0x160)]:_0x202927[_0x4ca9b4(0x1c2)],'description':hasOwn(_0x4b96a5,'description')?_0x4b96a5[_0x4ca9b4(0x1d4)]:_0x202927[_0x4ca9b4(0x1d4)],'connectTimeout':hasOwn(_0x4b96a5,_0x4ca9b4(0x18c))?_0x4b96a5[_0x4ca9b4(0x18c)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x202927[_0x4ca9b4(0x18c)],'readTimeout':hasOwn(_0x4b96a5,_0x4ca9b4(0x1d9))?_0x4b96a5['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x202927['readTimeout']});}export function requestedSafeFieldsMatch(_0x47345b,_0x1c36c5,_0x54145e){const _0x19179e=a197_0x1e9c36,_0x4ca850=[],_0x3ebf1c=[],_0x5f7cd4=[];for(const _0x12276b of[_0x19179e(0x1b6),_0x19179e(0x1ac),'description']){if(!hasOwn(_0x54145e,_0x12276b))continue;_0x5f7cd4[_0x19179e(0x1bd)](_0x12276b),_0x4ca850[_0x19179e(0x1bd)](_0x1c36c5[_0x12276b]===_0x54145e[_0x12276b]),_0x3ebf1c[_0x19179e(0x1bd)](_0x47345b[_0x12276b]!==_0x54145e[_0x12276b]&&_0x1c36c5[_0x12276b]===_0x54145e[_0x12276b]);}for(const _0x3e5f85 of[_0x19179e(0x18c),_0x19179e(0x1d9)]){if(!hasOwn(_0x54145e,_0x3e5f85))continue;const _0x447341=_0x54145e[_0x3e5f85]??(_0x3e5f85===_0x19179e(0x18c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5f7cd4[_0x19179e(0x1bd)](_0x3e5f85),_0x4ca850['push'](_0x1c36c5[_0x3e5f85]===_0x447341),_0x3ebf1c['push'](_0x47345b[_0x3e5f85]!==_0x447341&&_0x1c36c5[_0x3e5f85]===_0x447341);}return hasOwn(_0x54145e,_0x19179e(0x18b))&&_0x54145e[_0x19179e(0x18b)]===null&&(_0x5f7cd4[_0x19179e(0x1bd)](_0x19179e(0x168)),_0x4ca850[_0x19179e(0x1bd)](_0x1c36c5[_0x19179e(0x180)]===null||_0x1c36c5[_0x19179e(0x180)]===''),_0x3ebf1c[_0x19179e(0x1bd)](_0x47345b['endpointUrlRaw']!==null&&_0x47345b['endpointUrlRaw']!==''&&(_0x1c36c5['endpointUrlRaw']===null||_0x1c36c5[_0x19179e(0x180)]===''))),{'allMatch':_0x4ca850[_0x19179e(0x1c0)](Boolean),'provesChange':_0x3ebf1c['some'](Boolean),'verifiedFields':_0x5f7cd4};}export function validateNotificationDeleteReadback(_0x3fecd2,_0x3386b6,_0x366f23){const _0x34806e=a197_0x1e9c36;for(const [_0x199df0,_0x2db8e1]of _0x3fecd2[_0x34806e(0x1d1)]()){if(!Number[_0x34806e(0x1af)](_0x2db8e1['id'])||_0x2db8e1['id']<=0x0)throw notificationError(_0x34806e(0x196),_0x34806e(0x1bb)+(_0x199df0+0x1)+_0x34806e(0x1dd));if(_0x2db8e1[_0x34806e(0x1a0)]!==_0x3386b6)throw notificationError(_0x34806e(0x196),_0x34806e(0x1bb)+(_0x199df0+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x2db8e1[_0x34806e(0x1ac)]!==_0x366f23)throw notificationError(_0x34806e(0x196),_0x34806e(0x1bb)+(_0x199df0+0x1)+_0x34806e(0x1ae));}}export function safeApiFailure(_0x791a5e,_0x1d9a64,_0x23faa4){const _0x5ec257=a197_0x1e9c36;return notificationError(_0x5ec257(0x1dc)+_0x791a5e+'_'+(_0x1d9a64===_0x5ec257(0x184)?_0x5ec257(0x19c):_0x1d9a64+_0x5ec257(0x186)),_0x5ec257(0x176)+_0x791a5e+'\x20'+_0x1d9a64+'\x20failed.',_0x23faa4);}export function notificationLookupCommand(_0x33b105,_0x16fce8){const _0x3514be=a197_0x1e9c36;return _0x3514be(0x193)+_0x33b105+_0x3514be(0x161)+_0x16fce8+'\x20--format\x20compress';}function validateNotificationDocument(_0x5bbd30,_0x13a7e8){const _0x8f554d=a197_0x1e9c36;for(const _0x22cdc9 of Object[_0x8f554d(0x173)](_0x5bbd30)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x22cdc9))throw notificationError(_0x8f554d(0x1c5),'Notification\x20JSON\x20field\x20\x22'+_0x22cdc9+_0x8f554d(0x179));if(!ALLOWED_INPUT_FIELDS[_0x8f554d(0x18a)](_0x22cdc9))throw notificationError(_0x8f554d(0x1d6),_0x8f554d(0x16f)+_0x22cdc9+'\x22.');}if(_0x13a7e8===_0x8f554d(0x1b5)&&Object[_0x8f554d(0x173)](_0x5bbd30)['length']===0x0)throw notificationError(_0x8f554d(0x1b0),_0x8f554d(0x16e));const _0x4a888d={};if(hasOwn(_0x5bbd30,_0x8f554d(0x1b6)))_0x4a888d[_0x8f554d(0x1b6)]=validateRequiredString(_0x5bbd30[_0x8f554d(0x1b6)],_0x8f554d(0x1b6),0x80);else{if(_0x13a7e8===_0x8f554d(0x197))throw notificationError(_0x8f554d(0x1b9),_0x8f554d(0x19f)+_0x8f554d(0x1b2));}if(hasOwn(_0x5bbd30,_0x8f554d(0x1ac))){if(typeof _0x5bbd30['channelType']!==_0x8f554d(0x191))throw invalidFieldType(_0x8f554d(0x1ac),_0x8f554d(0x15b));const _0x3b828b=_0x5bbd30[_0x8f554d(0x1ac)][_0x8f554d(0x1a9)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x8f554d(0x16d)](_0x3b828b))throw notificationError(_0x8f554d(0x17f),_0x8f554d(0x16c),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x4a888d[_0x8f554d(0x1ac)]=_0x3b828b;}else{if(_0x13a7e8==='create')throw notificationError(_0x8f554d(0x1b9),'Create\x20JSON\x20requires\x20field\x20'+_0x8f554d(0x19b));}for(const [_0x1db835,_0x136ce1]of[[_0x8f554d(0x18b),0x200],[_0x8f554d(0x1d4),0x100]]){if(!hasOwn(_0x5bbd30,_0x1db835))continue;const _0x27a1ea=_0x5bbd30[_0x1db835];if(_0x27a1ea!==null&&typeof _0x27a1ea!==_0x8f554d(0x191))throw invalidFieldType(_0x1db835,_0x8f554d(0x1b7));if(typeof _0x27a1ea===_0x8f554d(0x191)&&_0x27a1ea[_0x8f554d(0x159)]>_0x136ce1)throw notificationError(_0x8f554d(0x17f),_0x8f554d(0x1a8)+_0x1db835+_0x8f554d(0x1ce)+_0x136ce1+'\x20characters.');_0x4a888d[_0x1db835]=_0x27a1ea;}if(hasOwn(_0x5bbd30,_0x8f554d(0x160))){const _0x5d27d9=_0x5bbd30[_0x8f554d(0x160)];if(_0x5d27d9===null&&_0x13a7e8===_0x8f554d(0x197))throw invalidFieldType(_0x8f554d(0x160),'a\x20JSON\x20object');if(_0x5d27d9!==null&&!isJsonObject(_0x5d27d9))throw invalidFieldType('channelConfig',_0x13a7e8===_0x8f554d(0x1b5)?'a\x20JSON\x20object\x20or\x20null':_0x8f554d(0x18f));_0x5d27d9!==null&&validateChannelConfigFields(_0x4a888d[_0x8f554d(0x1ac)],_0x5d27d9),_0x4a888d['channelConfig']=_0x5d27d9;}for(const _0x3948d2 of['connectTimeout','readTimeout']){if(!hasOwn(_0x5bbd30,_0x3948d2))continue;const _0x17898a=_0x5bbd30[_0x3948d2];if(_0x17898a!==null&&(!Number[_0x8f554d(0x1af)](_0x17898a)||_0x17898a<0x0))throw notificationError(_0x8f554d(0x17f),_0x8f554d(0x1a8)+_0x3948d2+_0x8f554d(0x1cc));_0x4a888d[_0x3948d2]=_0x17898a;}return _0x4a888d;}function validateRequiredString(_0x4bf4fd,_0x54401a,_0x34299c){const _0x24fa61=a197_0x1e9c36;if(typeof _0x4bf4fd!==_0x24fa61(0x191))throw invalidFieldType(_0x54401a,_0x24fa61(0x1ad));const _0x308b04=_0x4bf4fd[_0x24fa61(0x1a9)]();if(!_0x308b04)throw notificationError(_0x24fa61(0x17f),'Notification\x20JSON\x20field\x20\x22'+_0x54401a+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x308b04['length']>_0x34299c)throw notificationError(_0x24fa61(0x17f),_0x24fa61(0x1a8)+_0x54401a+_0x24fa61(0x1ce)+_0x34299c+_0x24fa61(0x172));return _0x308b04;}function validateChannelConfigFields(_0x223b23,_0x1af9b5){const _0x482fe3=a197_0x1e9c36;if(hasOwn(_0x1af9b5,_0x482fe3(0x17c)))throw forbiddenChannelConfigField(_0x482fe3(0x17c));if(_0x223b23==='EMAIL')for(const _0x1195de of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x1af9b5,_0x1195de))throw forbiddenChannelConfigField(_0x1195de);}}function forbiddenChannelConfigField(_0x59cf85){const _0x55e0e3=a197_0x1e9c36;return notificationError(_0x55e0e3(0x16a),_0x55e0e3(0x17d)+_0x59cf85+_0x55e0e3(0x190));}function invalidFieldType(_0x4adeb0,_0x405c5b){const _0x395112=a197_0x1e9c36;return notificationError(_0x395112(0x17f),_0x395112(0x1a8)+_0x4adeb0+_0x395112(0x181)+_0x405c5b+'.');}function serializeChannelConfig(_0x2f11a5){const _0x78a205=a197_0x1e9c36;return _0x2f11a5===null||_0x2f11a5===undefined?null:JSON[_0x78a205(0x1a7)](_0x2f11a5);}function redactSensitive(_0x3033fd){const _0x1814f9=a197_0x1e9c36;return _0x3033fd===null||_0x3033fd===undefined||_0x3033fd===''?null:_0x1814f9(0x1da);}function requireResponseString(_0x269978,_0x2d13fc,_0x4fa68b){const _0x4044da=a197_0x1e9c36;if(typeof _0x269978!=='string'||_0x269978[_0x4044da(0x1a9)]()==='')throw CliErrors[_0x4044da(0x1cd)](_0x4044da(0x183),_0x4044da(0x1d2)+(_0x4fa68b+0x1)+_0x4044da(0x15d)+_0x2d13fc+'\x22.');return _0x269978[_0x4044da(0x1a9)]();}function requireExactString(_0x170fdc,_0x22efbe,_0x5eefdc){const _0x14f526=a197_0x1e9c36;if(typeof _0x170fdc!=='string'||_0x170fdc[_0x14f526(0x1a9)]()==='')throw notificationError(_0x14f526(0x196),_0x14f526(0x176)+_0x5eefdc+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x22efbe+'\x22.');return _0x170fdc[_0x14f526(0x1a9)]();}function responseNullableString(_0xff51d2,_0x2ea35,_0x1dc2d8){const _0x3a3c63=a197_0x1e9c36;if(_0xff51d2===undefined||_0xff51d2===null)return null;if(typeof _0xff51d2!==_0x3a3c63(0x191))throw notificationError(_0x3a3c63(0x196),_0x3a3c63(0x176)+_0x1dc2d8+_0x3a3c63(0x162)+_0x2ea35+'\x22.');return _0xff51d2;}function responseNullableTimeout(_0x210b03,_0x2a3ae9,_0x216c8e){const _0x552af7=a197_0x1e9c36;if(_0x210b03===undefined||_0x210b03===null)return null;if(!Number[_0x552af7(0x1af)](_0x210b03)||_0x210b03<0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x216c8e+_0x552af7(0x162)+_0x2a3ae9+'\x22.');return _0x210b03;}function normalizeNullableString(_0x35f11a){const _0x4e3100=a197_0x1e9c36;return typeof _0x35f11a===_0x4e3100(0x191)?_0x35f11a:null;}function isJsonObject(_0x5c98da){const _0x955b81=a197_0x1e9c36;return _0x5c98da!==null&&typeof _0x5c98da==='object'&&!Array[_0x955b81(0x1be)](_0x5c98da);}function hasOwn(_0x3dce21,_0x4bf735){const _0x4820a8=a197_0x1e9c36;return Object[_0x4820a8(0x1bc)]['hasOwnProperty'][_0x4820a8(0x1aa)](_0x3dce21,_0x4bf735);}async function readStdin(){const _0x59c1aa=a197_0x1e9c36;let _0x1f3f6f='';process['stdin'][_0x59c1aa(0x170)](_0x59c1aa(0x198));for await(const _0x3df6eb of process[_0x59c1aa(0x1b4)])_0x1f3f6f+=_0x3df6eb;return _0x1f3f6f;}
|
|
1
|
+
const a197_0x2c563b=a197_0x1b83;(function(_0xd5104,_0x4d5a1c){const _0x18f6a6=a197_0x1b83,_0x20c17f=_0xd5104();while(!![]){try{const _0x4f24eb=parseInt(_0x18f6a6(0x189))/0x1+-parseInt(_0x18f6a6(0x16d))/0x2+-parseInt(_0x18f6a6(0x147))/0x3+-parseInt(_0x18f6a6(0x19d))/0x4+parseInt(_0x18f6a6(0x17c))/0x5+parseInt(_0x18f6a6(0x161))/0x6*(parseInt(_0x18f6a6(0x193))/0x7)+parseInt(_0x18f6a6(0x17b))/0x8*(parseInt(_0x18f6a6(0x15e))/0x9);if(_0x4f24eb===_0x4d5a1c)break;else _0x20c17f['push'](_0x20c17f['shift']());}catch(_0x37dde1){_0x20c17f['push'](_0x20c17f['shift']());}}}(a197_0x4cbd,0xd87fd));function a197_0x1b83(_0x306be0,_0x2614b7){_0x306be0=_0x306be0-0x133;const _0x4cbd6e=a197_0x4cbd();let _0x1b83d9=_0x4cbd6e[_0x306be0];return _0x1b83d9;}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=['EMAIL',a197_0x2c563b(0x198),a197_0x2c563b(0x1ad),'WECOM',a197_0x2c563b(0x149)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x2c563b(0x138),'channelType','endpointUrl',a197_0x2c563b(0x192),a197_0x2c563b(0x1a4),a197_0x2c563b(0x169),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x2c563b(0x15d),a197_0x2c563b(0x195),a197_0x2c563b(0x179)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a197_0x2c563b(0x196),a197_0x2c563b(0x153),a197_0x2c563b(0x160),'replyTo',a197_0x2c563b(0x134),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x2c563b(0x185),'type':a197_0x2c563b(0x1b0),'required':![],'description':a197_0x2c563b(0x146)},{'name':a197_0x2c563b(0x17a),'type':'boolean','required':![],'default':![],'description':a197_0x2c563b(0x188)},{'name':a197_0x2c563b(0x180),'type':a197_0x2c563b(0x1b0),'required':![],'description':a197_0x2c563b(0x145)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x2c563b(0x177),'required':!![],'description':a197_0x2c563b(0x1a3)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x48fda9,_0x209304,_0x1cb6f4){return new CliError(_0x48fda9,0x1,_0x209304,_0x1cb6f4);}export function readNotificationId(_0x30d9f8){const _0x441fb3=a197_0x2c563b,_0x4e33d0=_0x30d9f8['num']('id');if(!Number[_0x441fb3(0x1ae)](_0x4e33d0)||_0x4e33d0<=0x0)throw notificationError('notification_config_id_invalid',_0x441fb3(0x152));return _0x4e33d0;}export function requireNotificationExplicitYes(_0x3478ab){const _0x3f38e9=a197_0x2c563b;if(_0x3478ab[_0x3f38e9(0x1a5)]('dry-run')||_0x3478ab[_0x3f38e9(0x1a5)]('yes'))return;throw notificationError('notification_config_confirmation_required',_0x3f38e9(0x13e),_0x3f38e9(0x157));}export function readNotificationChannelType(_0x71d9e6,_0x2fb695=a197_0x2c563b(0x1ab),_0x42cc28=a197_0x2c563b(0x187)){const _0x511dfd=a197_0x2c563b,_0x1f26d4=_0x71d9e6[_0x511dfd(0x14c)](_0x2fb695)[_0x511dfd(0x183)]()||_0x42cc28;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x1f26d4))throw CliErrors[_0x511dfd(0x19f)](_0x511dfd(0x15b)+_0x2fb695+':\x20'+_0x1f26d4,_0x511dfd(0x13b)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1f26d4;}export function assertSingleNotificationSource(_0x5a6090){const _0xe2d231=a197_0x2c563b,_0x6b5a3f=[],_0x1ef145=_0x5a6090[_0xe2d231(0x14c)]('file')[_0xe2d231(0x183)]();if(_0x1ef145)_0x6b5a3f[_0xe2d231(0x135)]({'kind':_0xe2d231(0x185),'path':_0x1ef145});if(_0x5a6090[_0xe2d231(0x1a5)](_0xe2d231(0x17a)))_0x6b5a3f[_0xe2d231(0x135)]({'kind':_0xe2d231(0x17a)});const _0x389e16=_0x5a6090[_0xe2d231(0x14c)](_0xe2d231(0x180))['trim']();if(_0x389e16)_0x6b5a3f[_0xe2d231(0x135)]({'kind':_0xe2d231(0x167),'name':_0x389e16});if(_0x6b5a3f[_0xe2d231(0x13c)]===0x0)throw CliErrors[_0xe2d231(0x19f)](_0xe2d231(0x16a),_0xe2d231(0x15a));if(_0x6b5a3f['length']>0x1)throw CliErrors['validation'](_0xe2d231(0x184),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x6b5a3f[0x0];}export async function readNotificationDocument(_0x4e7b74,_0x53be3f){const _0x322063=a197_0x2c563b,_0x203423=assertSingleNotificationSource(_0x4e7b74),_0x420e6f=_0x203423[_0x322063(0x1a6)]===_0x322063(0x185)?_0x322063(0x15f)+_0x203423[_0x322063(0x14e)]:_0x203423['kind']===_0x322063(0x167)?_0x322063(0x178)+_0x203423[_0x322063(0x14a)]:_0x322063(0x17a);let _0x4a6340;try{if(_0x203423[_0x322063(0x1a6)]===_0x322063(0x185))_0x4a6340=await readFile(_0x203423[_0x322063(0x14e)],_0x322063(0x18e));else{if(_0x203423[_0x322063(0x1a6)]===_0x322063(0x167)){if(!(_0x203423[_0x322063(0x14a)]in process.env))throw notificationError(_0x322063(0x19c),_0x322063(0x197)+_0x203423['name']);_0x4a6340=process.env[_0x203423.name]??'';}else _0x4a6340=await readStdin();}}catch(_0x5cf131){if(_0x5cf131 instanceof CliError)throw _0x5cf131;throw notificationError('notification_config_source_unavailable',_0x322063(0x18b)+_0x420e6f+'.');}let _0x144048;try{_0x144048=JSON['parse'](_0x4a6340);}catch{throw notificationError('notification_config_json_invalid',_0x322063(0x16f)+_0x420e6f+'\x20is\x20invalid.',_0x322063(0x1b2));}if(!isJsonObject(_0x144048))throw notificationError(_0x322063(0x171),_0x322063(0x16f)+_0x420e6f+_0x322063(0x19a));return validateNotificationDocument(_0x144048,_0x53be3f);}export function projectNotificationListConfig(_0x20eb5d,_0x2dc8c8){const _0x49ca5e=a197_0x2c563b;return{'id':typeof _0x20eb5d['id']===_0x49ca5e(0x177)?_0x20eb5d['id']:null,'configCode':requireResponseString(_0x20eb5d[_0x49ca5e(0x195)],'configCode',_0x2dc8c8),'configName':requireResponseString(_0x20eb5d['configName'],_0x49ca5e(0x138),_0x2dc8c8),'channelType':requireResponseString(_0x20eb5d['channelType'],_0x49ca5e(0x13a),_0x2dc8c8),'description':normalizeNullableString(_0x20eb5d[_0x49ca5e(0x1a4)]),'createTime':normalizeNullableString(_0x20eb5d[_0x49ca5e(0x1b1)]),'updateTime':normalizeNullableString(_0x20eb5d[_0x49ca5e(0x1a0)])};}export function normalizeExactNotificationConfig(_0x14cbaf,_0x1c191b,_0x439775){const _0x475332=a197_0x2c563b;if(!Number['isSafeInteger'](_0x14cbaf['id'])||_0x14cbaf['id']!==_0x1c191b)throw notificationError(_0x475332(0x1a8),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x1c191b+'.');if(_0x14cbaf[_0x475332(0x15d)]!==_0x439775)throw notificationError(_0x475332(0x1a8),'Notification\x20config\x20'+_0x1c191b+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x1bc3fd=requireExactString(_0x14cbaf['configName'],_0x475332(0x138),_0x1c191b),_0x46cc00=requireExactString(_0x14cbaf[_0x475332(0x195)],_0x475332(0x195),_0x1c191b),_0x1d74b4=requireExactString(_0x14cbaf[_0x475332(0x13a)],'channelType',_0x1c191b);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x1d74b4))throw notificationError(_0x475332(0x1a8),_0x475332(0x148)+_0x1c191b+'\x20has\x20an\x20unsupported\x20channelType.');const _0x177d4b=responseNullableString(_0x14cbaf['endpointUrl'],_0x475332(0x162),_0x1c191b),_0x3d94dd=responseNullableString(_0x14cbaf[_0x475332(0x192)],'channelConfig',_0x1c191b),_0x17cf0a=responseNullableString(_0x14cbaf[_0x475332(0x1a4)],_0x475332(0x1a4),_0x1c191b),_0x28e36e=responseNullableTimeout(_0x14cbaf[_0x475332(0x169)],'connectTimeout',_0x1c191b),_0x300ea9=responseNullableTimeout(_0x14cbaf['readTimeout'],_0x475332(0x1b3),_0x1c191b);return{'id':_0x1c191b,'appCode':_0x439775,'configCode':_0x46cc00,'configName':_0x1bc3fd,'channelType':_0x1d74b4,'endpointUrl':redactSensitive(_0x177d4b),'channelConfig':redactSensitive(_0x3d94dd),'description':_0x17cf0a,'connectTimeout':_0x28e36e,'readTimeout':_0x300ea9,'endpointUrlRaw':_0x177d4b,'channelConfigRaw':_0x3d94dd};}export async function requireExactNotificationConfig(_0x2d75f6,_0x11c265,_0x2ea121){const _0x4457b0=a197_0x2c563b;let _0x29f911;try{_0x29f911=await getNotificationChannelConfig(_0x11c265,_0x2d75f6);}catch{throw safeApiFailure(_0x2ea121,_0x4457b0(0x18a),_0x4457b0(0x186)+_0x2d75f6+_0x4457b0(0x174));}return normalizeExactNotificationConfig(_0x29f911,_0x11c265,_0x2d75f6);}export function projectNotificationConfig(_0x558e2c){const _0x1dbf54=a197_0x2c563b;return{'id':_0x558e2c['id']??null,'appCode':_0x558e2c[_0x1dbf54(0x15d)],'configCode':_0x558e2c['configCode']??null,'configName':_0x558e2c[_0x1dbf54(0x138)],'channelType':_0x558e2c[_0x1dbf54(0x13a)],'endpointUrl':redactSensitive(_0x558e2c['endpointUrl']),'channelConfig':redactSensitive(_0x558e2c[_0x1dbf54(0x192)]),'description':_0x558e2c[_0x1dbf54(0x1a4)]??null,'connectTimeout':_0x558e2c[_0x1dbf54(0x169)]??null,'readTimeout':_0x558e2c[_0x1dbf54(0x1b3)]??null};}export function notificationSelector(_0xe45693){const _0x48aff4=a197_0x2c563b;return{'appCode':_0xe45693['appCode'],'id':_0xe45693['id'],'configCode':_0xe45693[_0x48aff4(0x195)],'configName':_0xe45693['configName'],'channelType':_0xe45693[_0x48aff4(0x13a)]};}export function createMutationInput(_0x416635,_0x3693db){const _0x2633ac=a197_0x2c563b;return{'appCode':_0x416635,'configName':_0x3693db[_0x2633ac(0x138)],'channelType':_0x3693db[_0x2633ac(0x13a)],...hasOwn(_0x3693db,_0x2633ac(0x162))?{'endpointUrl':_0x3693db['endpointUrl']}:{},...hasOwn(_0x3693db,_0x2633ac(0x192))?{'channelConfig':serializeChannelConfig(_0x3693db[_0x2633ac(0x192)])}:{},...hasOwn(_0x3693db,_0x2633ac(0x1a4))?{'description':_0x3693db['description']}:{},...hasOwn(_0x3693db,'connectTimeout')?{'connectTimeout':_0x3693db[_0x2633ac(0x169)]}:{},...hasOwn(_0x3693db,_0x2633ac(0x1b3))?{'readTimeout':_0x3693db[_0x2633ac(0x1b3)]}:{}};}export function mergeUpdateInput(_0x2e225f,_0x230ab3){const _0x46262f=a197_0x2c563b;return{'id':_0x2e225f['id'],'appCode':_0x2e225f[_0x46262f(0x15d)],'configName':_0x230ab3['configName']??_0x2e225f[_0x46262f(0x138)],'channelType':_0x230ab3[_0x46262f(0x13a)]??_0x2e225f['channelType'],'endpointUrl':hasOwn(_0x230ab3,'endpointUrl')?_0x230ab3[_0x46262f(0x162)]:_0x2e225f[_0x46262f(0x141)],'channelConfig':hasOwn(_0x230ab3,'channelConfig')?serializeChannelConfig(_0x230ab3[_0x46262f(0x192)]):_0x2e225f[_0x46262f(0x191)],'description':hasOwn(_0x230ab3,_0x46262f(0x1a4))?_0x230ab3[_0x46262f(0x1a4)]:_0x2e225f[_0x46262f(0x1a4)],'connectTimeout':hasOwn(_0x230ab3,_0x46262f(0x169))?_0x230ab3[_0x46262f(0x169)]:_0x2e225f[_0x46262f(0x169)],'readTimeout':hasOwn(_0x230ab3,_0x46262f(0x1b3))?_0x230ab3[_0x46262f(0x1b3)]:_0x2e225f[_0x46262f(0x1b3)]};}export function plannedUpdateProjection(_0x33daf6,_0x4d1041){const _0x260d80=a197_0x2c563b;return projectNotificationConfig({'id':_0x33daf6['id'],'appCode':_0x33daf6[_0x260d80(0x15d)],'configCode':_0x33daf6[_0x260d80(0x195)],'configName':_0x4d1041['configName']??_0x33daf6[_0x260d80(0x138)],'channelType':_0x4d1041[_0x260d80(0x13a)]??_0x33daf6[_0x260d80(0x13a)],'endpointUrl':hasOwn(_0x4d1041,_0x260d80(0x162))?_0x4d1041['endpointUrl']:_0x33daf6['endpointUrlRaw'],'channelConfig':hasOwn(_0x4d1041,_0x260d80(0x192))?_0x4d1041['channelConfig']:_0x33daf6['channelConfigRaw'],'description':hasOwn(_0x4d1041,_0x260d80(0x1a4))?_0x4d1041[_0x260d80(0x1a4)]:_0x33daf6[_0x260d80(0x1a4)],'connectTimeout':hasOwn(_0x4d1041,'connectTimeout')?_0x4d1041[_0x260d80(0x169)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x33daf6[_0x260d80(0x169)],'readTimeout':hasOwn(_0x4d1041,_0x260d80(0x1b3))?_0x4d1041[_0x260d80(0x1b3)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x33daf6[_0x260d80(0x1b3)]});}export function requestedSafeFieldsMatch(_0x537bfe,_0x4e59e2,_0x2985d8){const _0x44076b=a197_0x2c563b,_0x309e0e=[],_0x3c2cfe=[],_0x3a606f=[];for(const _0x174211 of[_0x44076b(0x138),_0x44076b(0x13a),_0x44076b(0x1a4)]){if(!hasOwn(_0x2985d8,_0x174211))continue;_0x3a606f[_0x44076b(0x135)](_0x174211),_0x309e0e[_0x44076b(0x135)](_0x4e59e2[_0x174211]===_0x2985d8[_0x174211]),_0x3c2cfe[_0x44076b(0x135)](_0x537bfe[_0x174211]!==_0x2985d8[_0x174211]&&_0x4e59e2[_0x174211]===_0x2985d8[_0x174211]);}for(const _0x2a18fa of[_0x44076b(0x169),_0x44076b(0x1b3)]){if(!hasOwn(_0x2985d8,_0x2a18fa))continue;const _0x12025b=_0x2985d8[_0x2a18fa]??(_0x2a18fa===_0x44076b(0x169)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x3a606f['push'](_0x2a18fa),_0x309e0e[_0x44076b(0x135)](_0x4e59e2[_0x2a18fa]===_0x12025b),_0x3c2cfe[_0x44076b(0x135)](_0x537bfe[_0x2a18fa]!==_0x12025b&&_0x4e59e2[_0x2a18fa]===_0x12025b);}return hasOwn(_0x2985d8,_0x44076b(0x162))&&_0x2985d8['endpointUrl']===null&&(_0x3a606f['push']('endpointUrl:null'),_0x309e0e[_0x44076b(0x135)](_0x4e59e2[_0x44076b(0x141)]===null||_0x4e59e2['endpointUrlRaw']===''),_0x3c2cfe[_0x44076b(0x135)](_0x537bfe[_0x44076b(0x141)]!==null&&_0x537bfe[_0x44076b(0x141)]!==''&&(_0x4e59e2[_0x44076b(0x141)]===null||_0x4e59e2[_0x44076b(0x141)]===''))),{'allMatch':_0x309e0e[_0x44076b(0x13f)](Boolean),'provesChange':_0x3c2cfe[_0x44076b(0x16c)](Boolean),'verifiedFields':_0x3a606f};}export function validateNotificationDeleteReadback(_0x48a875,_0x5f45e6,_0x36be73){const _0x4692be=a197_0x2c563b;for(const [_0x5c874d,_0x5790f9]of _0x48a875[_0x4692be(0x173)]()){if(!Number[_0x4692be(0x1ae)](_0x5790f9['id'])||_0x5790f9['id']<=0x0)throw notificationError(_0x4692be(0x1a8),_0x4692be(0x194)+(_0x5c874d+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x5790f9[_0x4692be(0x15d)]!==_0x5f45e6)throw notificationError('notification_config_response_invalid',_0x4692be(0x194)+(_0x5c874d+0x1)+_0x4692be(0x15c));if(_0x5790f9['channelType']!==_0x36be73)throw notificationError(_0x4692be(0x1a8),'Notification\x20config\x20list\x20item\x20'+(_0x5c874d+0x1)+_0x4692be(0x181));}}export function safeApiFailure(_0xc9a8f2,_0x50ea33,_0x2b86ff){const _0x5c7326=a197_0x2c563b;return notificationError(_0x5c7326(0x1ac)+_0xc9a8f2+'_'+(_0x50ea33===_0x5c7326(0x136)?_0x5c7326(0x1a7):_0x50ea33+_0x5c7326(0x163)),'Notification\x20config\x20'+_0xc9a8f2+'\x20'+_0x50ea33+_0x5c7326(0x172),_0x2b86ff);}function a197_0x4cbd(){const _0x4b3a47=['notification_config_field_required','type','notification_config_','DINGTALK','isSafeInteger','\x20has\x20invalid\x20field\x20\x22','string','createTime','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','readTimeout','join','subjectPrefix','push','mutation','create','configName','messageTemplate','channelType','Allowed\x20values:\x20','length','notification_config_field_invalid','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','every','Unknown\x20notification\x20JSON\x20field\x20\x22','endpointUrlRaw','notification_config_channel_field_forbidden','keys','\x22\x20is\x20forbidden.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','2756721xnnxNN','Notification\x20config\x20','WEBHOOK','name','\x20characters.','str','prototype','path','a\x20supported\x20string','a\x20non-empty\x20string','\x20is\x20missing\x20required\x20field\x20\x22','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','ccList','notification_config_update_empty','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','has','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','stringify','Create\x20JSON\x20requires\x20field\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Invalid\x20--','\x20has\x20an\x20invalid\x20appCode.','appCode','5773509ZyurgQ','file\x20','bccList','6fcHfEi','endpointUrl','_unavailable','notification_config_field_unknown','Item\x20','call','env','includes','connectTimeout','Missing\x20notification\x20JSON\x20source.','update','some','2869848nqyOlU','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Notification\x20JSON\x20from\x20','apiError','notification_config_json_invalid','\x20failed.','entries','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x22channelType\x22.','number','environment\x20variable\x20','channelCode','stdin','32oBDNcu','5023555zvPjRS','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x22\x20must\x20be\x20','Notification\x20JSON\x20field\x20\x22','from-env','\x20has\x20an\x20invalid\x20channelType.','notification_config_field_forbidden','trim','Notification\x20JSON\x20source\x20is\x20ambiguous.','file','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','EMAIL','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','424981EXNUPr','preflight','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','a\x20string\x20or\x20null','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','utf8','isArray','\x22\x20must\x20be\x20a\x20non-empty\x20string.','channelConfigRaw','channelConfig','2837695xUcjoa','Notification\x20config\x20list\x20item\x20','configCode','recipients','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','FEISHU','\x22\x20cannot\x20exceed\x20','\x20must\x20be\x20an\x20object.','a\x20JSON\x20object','notification_config_source_unavailable','4641876YBIJbl','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','validation','updateTime','a\x20JSON\x20object\x20or\x20null','\x20--type\x20','Application-level\x20notification\x20config\x20ID','description','bool','kind','failed','notification_config_response_invalid','\x22configName\x22.'];a197_0x4cbd=function(){return _0x4b3a47;};return a197_0x4cbd();}export function notificationLookupCommand(_0x11ffc3,_0x799f5){const _0x2c76eb=a197_0x2c563b;return _0x2c76eb(0x175)+_0x11ffc3+_0x2c76eb(0x1a2)+_0x799f5+'\x20--format\x20compress';}function validateNotificationDocument(_0x35898f,_0x24efbe){const _0x1aedc1=a197_0x2c563b;for(const _0x4883d0 of Object[_0x1aedc1(0x143)](_0x35898f)){if(FORBIDDEN_IDENTITY_FIELDS[_0x1aedc1(0x156)](_0x4883d0))throw notificationError(_0x1aedc1(0x182),'Notification\x20JSON\x20field\x20\x22'+_0x4883d0+_0x1aedc1(0x155));if(!ALLOWED_INPUT_FIELDS[_0x1aedc1(0x156)](_0x4883d0))throw notificationError(_0x1aedc1(0x164),_0x1aedc1(0x140)+_0x4883d0+'\x22.');}if(_0x24efbe===_0x1aedc1(0x16b)&&Object[_0x1aedc1(0x143)](_0x35898f)['length']===0x0)throw notificationError(_0x1aedc1(0x154),_0x1aedc1(0x19e));const _0x267e69={};if(hasOwn(_0x35898f,_0x1aedc1(0x138)))_0x267e69[_0x1aedc1(0x138)]=validateRequiredString(_0x35898f[_0x1aedc1(0x138)],_0x1aedc1(0x138),0x80);else{if(_0x24efbe===_0x1aedc1(0x137))throw notificationError(_0x1aedc1(0x1aa),_0x1aedc1(0x159)+_0x1aedc1(0x1a9));}if(hasOwn(_0x35898f,'channelType')){if(typeof _0x35898f[_0x1aedc1(0x13a)]!==_0x1aedc1(0x1b0))throw invalidFieldType(_0x1aedc1(0x13a),_0x1aedc1(0x14f));const _0x9f3fd1=_0x35898f[_0x1aedc1(0x13a)][_0x1aedc1(0x183)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x1aedc1(0x168)](_0x9f3fd1))throw notificationError(_0x1aedc1(0x13d),_0x1aedc1(0x17d),_0x1aedc1(0x13b)+NOTIFICATION_CHANNEL_TYPES[_0x1aedc1(0x133)](',\x20')+'.');_0x267e69[_0x1aedc1(0x13a)]=_0x9f3fd1;}else{if(_0x24efbe===_0x1aedc1(0x137))throw notificationError(_0x1aedc1(0x1aa),_0x1aedc1(0x159)+_0x1aedc1(0x176));}for(const [_0x326267,_0x54ec28]of[[_0x1aedc1(0x162),0x200],[_0x1aedc1(0x1a4),0x100]]){if(!hasOwn(_0x35898f,_0x326267))continue;const _0x9a6f2=_0x35898f[_0x326267];if(_0x9a6f2!==null&&typeof _0x9a6f2!==_0x1aedc1(0x1b0))throw invalidFieldType(_0x326267,_0x1aedc1(0x18c));if(typeof _0x9a6f2===_0x1aedc1(0x1b0)&&_0x9a6f2[_0x1aedc1(0x13c)]>_0x54ec28)throw notificationError(_0x1aedc1(0x13d),_0x1aedc1(0x17f)+_0x326267+_0x1aedc1(0x199)+_0x54ec28+_0x1aedc1(0x14b));_0x267e69[_0x326267]=_0x9a6f2;}if(hasOwn(_0x35898f,_0x1aedc1(0x192))){const _0x21a5e7=_0x35898f[_0x1aedc1(0x192)];if(_0x21a5e7===null&&_0x24efbe===_0x1aedc1(0x137))throw invalidFieldType('channelConfig',_0x1aedc1(0x19b));if(_0x21a5e7!==null&&!isJsonObject(_0x21a5e7))throw invalidFieldType('channelConfig',_0x24efbe==='update'?_0x1aedc1(0x1a1):'a\x20JSON\x20object');_0x21a5e7!==null&&validateChannelConfigFields(_0x267e69[_0x1aedc1(0x13a)],_0x21a5e7),_0x267e69[_0x1aedc1(0x192)]=_0x21a5e7;}for(const _0x33cfe7 of[_0x1aedc1(0x169),_0x1aedc1(0x1b3)]){if(!hasOwn(_0x35898f,_0x33cfe7))continue;const _0x2bd867=_0x35898f[_0x33cfe7];if(_0x2bd867!==null&&(!Number[_0x1aedc1(0x1ae)](_0x2bd867)||_0x2bd867<0x0))throw notificationError(_0x1aedc1(0x13d),_0x1aedc1(0x17f)+_0x33cfe7+_0x1aedc1(0x18d));_0x267e69[_0x33cfe7]=_0x2bd867;}return _0x267e69;}function validateRequiredString(_0x168fbd,_0x1b50a1,_0x12cccf){const _0x1b9c0f=a197_0x2c563b;if(typeof _0x168fbd!==_0x1b9c0f(0x1b0))throw invalidFieldType(_0x1b50a1,_0x1b9c0f(0x150));const _0x1be9fb=_0x168fbd[_0x1b9c0f(0x183)]();if(!_0x1be9fb)throw notificationError(_0x1b9c0f(0x13d),_0x1b9c0f(0x17f)+_0x1b50a1+_0x1b9c0f(0x190));if(_0x1be9fb['length']>_0x12cccf)throw notificationError(_0x1b9c0f(0x13d),_0x1b9c0f(0x17f)+_0x1b50a1+_0x1b9c0f(0x199)+_0x12cccf+_0x1b9c0f(0x14b));return _0x1be9fb;}function validateChannelConfigFields(_0x16b3be,_0x17f361){const _0x5b3e55=a197_0x2c563b;if(hasOwn(_0x17f361,_0x5b3e55(0x139)))throw forbiddenChannelConfigField(_0x5b3e55(0x139));if(_0x16b3be===_0x5b3e55(0x187))for(const _0x5991fa of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x17f361,_0x5991fa))throw forbiddenChannelConfigField(_0x5991fa);}}function forbiddenChannelConfigField(_0x421a3f){const _0x21fb0d=a197_0x2c563b;return notificationError(_0x21fb0d(0x142),_0x21fb0d(0x16e)+_0x421a3f+_0x21fb0d(0x144));}function invalidFieldType(_0x5e07c5,_0x53287e){const _0x11979c=a197_0x2c563b;return notificationError(_0x11979c(0x13d),'Notification\x20JSON\x20field\x20\x22'+_0x5e07c5+_0x11979c(0x17e)+_0x53287e+'.');}function serializeChannelConfig(_0xb06bc5){const _0x31691e=a197_0x2c563b;return _0xb06bc5===null||_0xb06bc5===undefined?null:JSON[_0x31691e(0x158)](_0xb06bc5);}function redactSensitive(_0x42cba2){return _0x42cba2===null||_0x42cba2===undefined||_0x42cba2===''?null:'<redacted>';}function requireResponseString(_0x145959,_0x3bbd24,_0x4b4d03){const _0x45b6a8=a197_0x2c563b;if(typeof _0x145959!==_0x45b6a8(0x1b0)||_0x145959['trim']()==='')throw CliErrors[_0x45b6a8(0x170)]('Invalid\x20notification\x20config\x20response.',_0x45b6a8(0x165)+(_0x4b4d03+0x1)+_0x45b6a8(0x151)+_0x3bbd24+'\x22.');return _0x145959['trim']();}function requireExactString(_0x4c17ea,_0x17568f,_0x33b1ed){const _0x439b29=a197_0x2c563b;if(typeof _0x4c17ea!==_0x439b29(0x1b0)||_0x4c17ea[_0x439b29(0x183)]()==='')throw notificationError(_0x439b29(0x1a8),_0x439b29(0x148)+_0x33b1ed+_0x439b29(0x151)+_0x17568f+'\x22.');return _0x4c17ea[_0x439b29(0x183)]();}function responseNullableString(_0x1e36d1,_0x17187f,_0x5b6d3b){const _0x352c26=a197_0x2c563b;if(_0x1e36d1===undefined||_0x1e36d1===null)return null;if(typeof _0x1e36d1!==_0x352c26(0x1b0))throw notificationError('notification_config_response_invalid',_0x352c26(0x148)+_0x5b6d3b+_0x352c26(0x1af)+_0x17187f+'\x22.');return _0x1e36d1;}function responseNullableTimeout(_0x2ebc7a,_0x1f37b1,_0x8e7f0a){const _0x2352f4=a197_0x2c563b;if(_0x2ebc7a===undefined||_0x2ebc7a===null)return null;if(!Number[_0x2352f4(0x1ae)](_0x2ebc7a)||_0x2ebc7a<0x0)throw notificationError(_0x2352f4(0x1a8),_0x2352f4(0x148)+_0x8e7f0a+_0x2352f4(0x1af)+_0x1f37b1+'\x22.');return _0x2ebc7a;}function normalizeNullableString(_0x35211a){const _0x29316f=a197_0x2c563b;return typeof _0x35211a===_0x29316f(0x1b0)?_0x35211a:null;}function isJsonObject(_0x421987){const _0x179fdc=a197_0x2c563b;return _0x421987!==null&&typeof _0x421987==='object'&&!Array[_0x179fdc(0x18f)](_0x421987);}function hasOwn(_0x8bd41b,_0x30a70c){const _0x4c1e42=a197_0x2c563b;return Object[_0x4c1e42(0x14d)]['hasOwnProperty'][_0x4c1e42(0x166)](_0x8bd41b,_0x30a70c);}async function readStdin(){const _0x2dede8=a197_0x2c563b;let _0x50afad='';process[_0x2dede8(0x17a)]['setEncoding'](_0x2dede8(0x18e));for await(const _0x72acb1 of process[_0x2dede8(0x17a)])_0x50afad+=_0x72acb1;return _0x50afad;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a198_0x559f(){const _0x256cc6=['ocr','fileUrl','Preview:\x20recognize\x20','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','appCode','image-file','Invoice','GET','/smartapi/ocr/recognize-text','str','/smartapi/ocr/recognize-text?','7qjqcxG','\x20OCR','length','string','apiError','filter','form','26656832QomTtv','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','General','image-url','164504UsMRxR','Publicly\x20accessible\x20image\x20or\x20file\x20URL','trim','Table','2020608FKdWgd','validation','fileName','imageFile','idcard','File\x20upload\x20response\x20missing\x20filePath.','6962485XxQIlK','general','/smartapi/common/queryFileUrl','scene','toLowerCase','759629ZMeUhN','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','read','IdCard','POST','\x20OCR\x20from\x20URL','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','invoice','imageUrl','count','recognize','Unsupported\x20OCR\x20scene:\x20','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','230280aQeLwU','filePath','9fpCEbc','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','7572522qFAGYR','path','/smartapi/common/uploadFile'];a198_0x559f=function(){return _0x256cc6;};return a198_0x559f();}const a198_0x336b06=a198_0x1962;(function(_0x26b212,_0xd312be){const _0x146fbe=a198_0x1962,_0x3a66f1=_0x26b212();while(!![]){try{const _0x5dce76=-parseInt(_0x146fbe(0xd1))/0x1+parseInt(_0x146fbe(0xc6))/0x2+-parseInt(_0x146fbe(0xdf))/0x3+parseInt(_0x146fbe(0xc2))/0x4+-parseInt(_0x146fbe(0xcc))/0x5+parseInt(_0x146fbe(0xe3))/0x6*(-parseInt(_0x146fbe(0xf1))/0x7)+-parseInt(_0x146fbe(0xf8))/0x8*(-parseInt(_0x146fbe(0xe1))/0x9);if(_0x5dce76===_0xd312be)break;else _0x3a66f1['push'](_0x3a66f1['shift']());}catch(_0x57e1c9){_0x3a66f1['push'](_0x3a66f1['shift']());}}}(a198_0x559f,0xd9e91));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=[a198_0x336b06(0xd9),'general','form','idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x336b06(0xec),'general':a198_0x336b06(0xfa),'form':a198_0x336b06(0xc5),'idCard':a198_0x336b06(0xd4)},SCENE_FLAG={'name':a198_0x336b06(0xcf),'type':a198_0x336b06(0xf4),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x336b06(0xd7)},IMAGE_FILE_FLAG={'name':a198_0x336b06(0xeb),'type':'string','description':a198_0x336b06(0xd8)},IMAGE_URL_FLAG={'name':a198_0x336b06(0xfb),'type':'string','description':a198_0x336b06(0xc3)};function normalizeScene(_0x237b96){const _0x50c9db=a198_0x336b06,_0xfecdc1=_0x237b96[_0x50c9db(0xc4)]()[_0x50c9db(0xd0)]();if(_0xfecdc1===_0x50c9db(0xca))return'idCard';if(_0xfecdc1==='invoice'||_0xfecdc1===_0x50c9db(0xcd)||_0xfecdc1===_0x50c9db(0xf7))return _0xfecdc1;throw CliErrors[_0x50c9db(0xc7)](_0x50c9db(0xdd)+_0x237b96+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x1e226d){const _0x1500a4=a198_0x336b06,_0x403632=_0x1e226d[_0x1500a4(0xef)](_0x1500a4(0xeb))[_0x1500a4(0xc4)](),_0x5f45c6=_0x1e226d[_0x1500a4(0xef)](_0x1500a4(0xfb))[_0x1500a4(0xc4)]();return{'imageFile':_0x403632,'imageUrl':_0x5f45c6,'count':[_0x403632,_0x5f45c6][_0x1500a4(0xf6)](Boolean)[_0x1500a4(0xf3)]};}function a198_0x1962(_0x5fbf69,_0x2d61cf){_0x5fbf69=_0x5fbf69-0xc2;const _0x559f5c=a198_0x559f();let _0x196289=_0x559f5c[_0x5fbf69];return _0x196289;}function validateInputSelection(_0x3c2f00){const _0x1088c7=a198_0x336b06,_0x33f994=selectedInputs(_0x3c2f00);if(_0x33f994[_0x1088c7(0xdb)]!==0x1)throw CliErrors[_0x1088c7(0xc7)](_0x1088c7(0xd2));return _0x33f994;}function withScene(_0x556241,_0x3e76ca,_0x2e9743){const _0xb40e22=a198_0x336b06;return{..._0x556241,'scene':_0x3e76ca,..._0x2e9743?{'sourceFile':{'fileName':_0x2e9743[_0xb40e22(0xc8)],'filePath':_0x2e9743[_0xb40e22(0xe0)]}}:{}};}const ocrRecognize={'service':a198_0x336b06(0xe6),'command':a198_0x336b06(0xdc),'description':a198_0x336b06(0xf9),'risk':a198_0x336b06(0xd3),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0xcf8920){const _0x19ba0d=a198_0x336b06,_0x156b52=normalizeScene(_0xcf8920[_0x19ba0d(0xef)](_0x19ba0d(0xcf))),_0xda351b=SCENE_TO_LEGACY_TYPE[_0x156b52],_0x19dae1=validateInputSelection(_0xcf8920);if(_0x19dae1[_0x19ba0d(0xda)]){const _0x4ee4d6=new URLSearchParams({'url':_0x19dae1[_0x19ba0d(0xda)],'type':_0xda351b,'appCode':_0xcf8920[_0x19ba0d(0xea)]});return{'method':'GET','url':_0x19ba0d(0xf0)+_0x4ee4d6['toString'](),'description':_0x19ba0d(0xe8)+_0x156b52+_0x19ba0d(0xd6)};}const _0xa43495=requireDevelopmentUploadFile(_0x19dae1[_0x19ba0d(0xc9)],'image-file');return{'method':_0x19ba0d(0xd5),'url':_0x19ba0d(0xe5),'body':{'steps':[{'method':_0x19ba0d(0xd5),'url':_0x19ba0d(0xe5),'body':{'appCode':_0xcf8920[_0x19ba0d(0xea)],'multipart':{'file':_0xa43495}}},{'method':'POST','url':_0x19ba0d(0xce),'body':{'filePath':_0x19ba0d(0xe2),'downloadFlag':![]}},{'method':_0x19ba0d(0xed),'url':_0x19ba0d(0xee),'query':{'appCode':_0xcf8920[_0x19ba0d(0xea)],'url':_0x19ba0d(0xde),'type':_0xda351b}}]},'description':_0x19ba0d(0xe9)+_0x156b52+_0x19ba0d(0xf2)};},async 'execute'(_0x3fca20){const _0x1dbcf1=a198_0x336b06,_0x220512=normalizeScene(_0x3fca20[_0x1dbcf1(0xef)](_0x1dbcf1(0xcf))),_0x277d20=SCENE_TO_LEGACY_TYPE[_0x220512],_0x4ba972=validateInputSelection(_0x3fca20);if(_0x4ba972[_0x1dbcf1(0xda)]){const _0x30c53b=await recognizeDevelopmentOcr(_0x3fca20[_0x1dbcf1(0xea)],{'url':_0x4ba972[_0x1dbcf1(0xda)],'type':_0x277d20});return{'ok':!![],'data':withScene(_0x30c53b,_0x220512)};}const _0x5894df=requireDevelopmentUploadFile(_0x4ba972[_0x1dbcf1(0xc9)],_0x1dbcf1(0xeb)),_0xe82b02=await uploadDevelopmentFile(_0x3fca20[_0x1dbcf1(0xea)],_0x5894df[_0x1dbcf1(0xe4)]);if(!_0xe82b02['filePath'])throw CliErrors[_0x1dbcf1(0xf5)](_0x1dbcf1(0xcb));const _0xe1d63f=await queryDevelopmentFileUrl(_0xe82b02[_0x1dbcf1(0xe0)],{'download':![]});if(!_0xe1d63f[_0x1dbcf1(0xe7)])throw CliErrors[_0x1dbcf1(0xf5)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x2239e5=await recognizeDevelopmentOcr(_0x3fca20[_0x1dbcf1(0xea)],{'url':_0xe1d63f['fileUrl'],'type':_0x277d20});return{'ok':!![],'data':withScene(_0x2239e5,_0x220512,_0xe82b02)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a199_0x453474=a199_0xdf51;(function(_0x30fd73,_0x5301c2){const _0xa04a20=a199_0xdf51,_0x3553a6=_0x30fd73();while(!![]){try{const _0x43521d=-parseInt(_0xa04a20(0x1cc))/0x1*(-parseInt(_0xa04a20(0x1eb))/0x2)+-parseInt(_0xa04a20(0x1b6))/0x3+-parseInt(_0xa04a20(0x1e6))/0x4*(parseInt(_0xa04a20(0x1bd))/0x5)+parseInt(_0xa04a20(0x1ab))/0x6+parseInt(_0xa04a20(0x1c1))/0x7*(-parseInt(_0xa04a20(0x1cb))/0x8)+parseInt(_0xa04a20(0x1e8))/0x9+parseInt(_0xa04a20(0x1b1))/0xa*(parseInt(_0xa04a20(0x1e7))/0xb);if(_0x43521d===_0x5301c2)break;else _0x3553a6['push'](_0x3553a6['shift']());}catch(_0x503c1a){_0x3553a6['push'](_0x3553a6['shift']());}}}(a199_0x5d81,0x94256));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';const CUSTOM_PAGE_PATTERNS=[a199_0x453474(0x1e1),a199_0x453474(0x1aa),a199_0x453474(0x1de)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),'../../../templates/custom-pages');export const pageCreate={'service':'page','command':a199_0x453474(0x1e5),'description':a199_0x453474(0x1c5),'risk':a199_0x453474(0x1cf),'defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a199_0x453474(0x1dc),'message':a199_0x453474(0x1af),'hint':'This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.'},{'name':'page-content','message':a199_0x453474(0x1df),'hint':a199_0x453474(0x1ca)}],'flags':[{'name':'name','type':a199_0x453474(0x1e9),'description':a199_0x453474(0x1d5)},{'name':a199_0x453474(0x1b4),'type':a199_0x453474(0x1bc),'description':a199_0x453474(0x1c8)},{'name':a199_0x453474(0x1ce),'type':a199_0x453474(0x1e9),'description':a199_0x453474(0x1c0),'enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0x453474(0x1ed),'type':a199_0x453474(0x1e9),'description':a199_0x453474(0x1db)},APPCODE_FLAG],async 'validate'(_0x218829){await readValidatedPageSource(_0x218829);},async 'dryRun'(_0xf9e9e0){const _0x4c938d=a199_0x453474,_0x43a0fd=readInput(_0xf9e9e0,await readValidatedPageSource(_0xf9e9e0));return{'method':_0x4c938d(0x1ad),'url':_0x4c938d(0x1e4),'body':{'appCode':_0x43a0fd[_0x4c938d(0x1c4)],'pageName':_0x43a0fd[_0x4c938d(0x1b2)],..._0x43a0fd['parentMenuId']!=null?{'parentMenuId':_0x43a0fd[_0x4c938d(0x1c7)]}:{},'createMenu':_0x43a0fd[_0x4c938d(0x1d4)],'codeContent':_0x43a0fd[_0x4c938d(0x1ba)]},'description':_0x4c938d(0x1d7)+JSON[_0x4c938d(0x1b7)](_0x43a0fd[_0x4c938d(0x1b2)])+_0x4c938d(0x1c3)};},async 'execute'(_0x19ab37){const _0x2c2e4b=a199_0x453474,_0x4573fe=readInput(_0x19ab37,await readValidatedPageSource(_0x19ab37)),_0x81063b=await createCustomPage(_0x4573fe);if(!Number[_0x2c2e4b(0x1b5)](_0x81063b[_0x2c2e4b(0x1b0)])||_0x81063b[_0x2c2e4b(0x1b0)]<=0x0)throw CliErrors[_0x2c2e4b(0x1c2)](_0x2c2e4b(0x1ac));const _0x3f1216=buildCustomPageDevelopmentUrl(_0x4573fe['appCode'],_0x81063b[_0x2c2e4b(0x1e3)]),_0x43cd3e=buildCustomPageEditUrl(_0x4573fe[_0x2c2e4b(0x1c4)],_0x81063b[_0x2c2e4b(0x1b0)]);return{'ok':!![],'data':{'operation':_0x2c2e4b(0x1d6),'pageType':_0x2c2e4b(0x1e2),'pagePattern':readPagePattern(_0x19ab37),'selector':{'appCode':_0x4573fe[_0x2c2e4b(0x1c4)],'pageName':_0x4573fe[_0x2c2e4b(0x1b2)]},'before':null,'after':{'pageId':_0x81063b[_0x2c2e4b(0x1b0)],'pageName':_0x81063b[_0x2c2e4b(0x1b2)],'appCode':_0x81063b[_0x2c2e4b(0x1c4)],'version':_0x81063b[_0x2c2e4b(0x1bf)],'menuId':_0x81063b['menuId'],'menuPath':_0x81063b[_0x2c2e4b(0x1e3)],'files':_0x81063b[_0x2c2e4b(0x1ba)]??Object[_0x2c2e4b(0x1b9)](_0x4573fe[_0x2c2e4b(0x1ba)])},'dryRun':![],'request':_0x4573fe,..._0x3f1216?{'pageUrl':_0x3f1216}:{},..._0x43cd3e?{'editPageUrl':_0x43cd3e}:{},'warnings':_0x3f1216?[]:[_0x2c2e4b(0x1d9)]},'message':_0x2c2e4b(0x1d3)+_0x81063b['pageId']+'.'};}};function a199_0xdf51(_0x3cdf44,_0xe796e3){_0x3cdf44=_0x3cdf44-0x1aa;const _0x5d8156=a199_0x5d81();let _0xdf516d=_0x5d8156[_0x3cdf44];return _0xdf516d;}function readPagePattern(_0xef1858){const _0x452c47=a199_0x453474,_0x105024=_0xef1858[_0x452c47(0x1b8)](_0x452c47(0x1ce))[_0x452c47(0x1b3)](),_0x177623=_0xef1858[_0x452c47(0x1b8)]('page-dir')[_0x452c47(0x1b3)]();if(_0x105024&&_0x177623)throw CliErrors['validation']('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x177623)return null;if(!_0x105024)throw CliErrors[_0x452c47(0x1ec)](_0x452c47(0x1e0));if(!CUSTOM_PAGE_PATTERNS['includes'](_0x105024))throw CliErrors[_0x452c47(0x1ec)](_0x452c47(0x1da));return _0x105024;}function a199_0x5d81(){const _0x3a0ef7=['192iihZoK','1mJesHU','object','page-pattern','write','some','pageName\x20cannot\x20exceed\x20100\x20characters.','Custom_page_','Created\x20Custom\x20Page\x20','createMenu','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','page.create','Would\x20create\x20Custom\x20Page\x20','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','page-type','Custom\x20Page\x20pattern\x20not\x20found:\x20','DASHBOARD','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','BLANK','CUSTOM','menuPath','/smartapi/webcode/page/create','create','35692uTeoYX','649nqaFQZ','3860838AfloVl','string','name','967786JXdKQC','validation','page-dir','toLowerCase','ONEPAGE','6660318KjRRdO','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','POST','isNaN','page\x20create\x20does\x20not\x20accept\x20--page-type.','pageId','12960ZTrxre','pageName','trim','parent-menu-id','isInteger','1414137dekLAb','stringify','str','keys','files','length','number','185fTTsop','values','version','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','201558QDXmhi','apiError','\x20and\x20its\x20menu\x20entry.','appCode','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','num','parentMenuId','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','Invalid\x20Custom\x20Page\x20pattern:\x20','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'];a199_0x5d81=function(){return _0x3a0ef7;};return a199_0x5d81();}async function readPageSource(_0x5036b6){const _0x5baecf=a199_0x453474,_0x133773=_0x5036b6[_0x5baecf(0x1b8)](_0x5baecf(0x1ed))['trim'](),_0x13ef1a=readPagePattern(_0x5036b6);if(_0x13ef1a===null){const _0x4a60a2=await readCustomPageDirectory(_0x133773);if(Object[_0x5baecf(0x1b9)](_0x4a60a2)[_0x5baecf(0x1bb)]===0x0)throw CliErrors['validation']('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x4a60a2;}let _0x52a630;try{_0x52a630=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x13ef1a[_0x5baecf(0x1ee)]()+'.json'),'utf8');}catch{throw CliErrors['validation'](_0x5baecf(0x1dd)+_0x13ef1a+'.');}let _0x48b1d7;try{_0x48b1d7=JSON['parse'](_0x52a630);}catch{throw CliErrors[_0x5baecf(0x1ec)](_0x5baecf(0x1c9)+_0x13ef1a+'.');}if(!_0x48b1d7||typeof _0x48b1d7!==_0x5baecf(0x1cd)||Array['isArray'](_0x48b1d7)||Object[_0x5baecf(0x1be)](_0x48b1d7)[_0x5baecf(0x1d0)](_0x2ae158=>typeof _0x2ae158!==_0x5baecf(0x1e9)))throw CliErrors[_0x5baecf(0x1ec)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x13ef1a+'.');return _0x48b1d7;}async function readValidatedPageSource(_0x14b02d){const _0x366037=await readPageSource(_0x14b02d);return await validateCustomPageContent(_0x366037),_0x366037;}function readInput(_0x1807b9,_0x3b699d){const _0x1181dd=a199_0x453474,_0x264f0f=_0x1807b9[_0x1181dd(0x1b8)](_0x1181dd(0x1ea))['trim']()||_0x1181dd(0x1d2)+Date['now']();if(_0x264f0f[_0x1181dd(0x1bb)]>0x64)throw CliErrors[_0x1181dd(0x1ec)](_0x1181dd(0x1d1));const _0x56de7c=_0x1807b9[_0x1181dd(0x1c6)]('parent-menu-id',NaN),_0x4b3610=!Number[_0x1181dd(0x1ae)](_0x56de7c);if(_0x4b3610&&(!Number[_0x1181dd(0x1b5)](_0x56de7c)||_0x56de7c<=0x0))throw CliErrors[_0x1181dd(0x1ec)](_0x1181dd(0x1d8));return{'appCode':_0x1807b9['appCode'],'pageName':_0x264f0f,..._0x4b3610?{'parentMenuId':_0x56de7c}:{},'createMenu':!![],'files':_0x3b699d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a200_0x2c7d26=a200_0x7abf;(function(_0x1c6b9b,_0xa4af46){const _0x140c87=a200_0x7abf,_0x220500=_0x1c6b9b();while(!![]){try{const _0x121b23=parseInt(_0x140c87(0x1f2))/0x1+-parseInt(_0x140c87(0x1e2))/0x2*(parseInt(_0x140c87(0x1ea))/0x3)+parseInt(_0x140c87(0x1e5))/0x4*(-parseInt(_0x140c87(0x1eb))/0x5)+parseInt(_0x140c87(0x1f4))/0x6+parseInt(_0x140c87(0x1e3))/0x7+parseInt(_0x140c87(0x1fb))/0x8+parseInt(_0x140c87(0x1f6))/0x9*(-parseInt(_0x140c87(0x1f9))/0xa);if(_0x121b23===_0xa4af46)break;else _0x220500['push'](_0x220500['shift']());}catch(_0x4f87c1){_0x220500['push'](_0x220500['shift']());}}}(a200_0x1fba,0x6409a));import{getCustomPageSource}from'../../../core/api-client.js';function a200_0x1fba(){const _0x2e68b4=['join','1004eiqpZD','2216767DzSFvW','pageCode','17132MPnMTG','getFullYear','Retrieved\x20Custom\x20Page\x20','getSeconds','cookie','4359zQcbdH','740yvDccJ','padStart','compress','page','appcode','trim','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','771816TFVxxh','isNaN','4327194aHbWoc','appCode','1234854UBuXQs','getHours','custom-detail','20QDFinK','read','1902080xGqeOR','getMinutes','Custom\x20Page\x20ID'];a200_0x1fba=function(){return _0x2e68b4;};return a200_0x1fba();}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a200_0x2c7d26(0x1ee),'command':a200_0x2c7d26(0x1f8),'description':a200_0x2c7d26(0x1f1),'risk':a200_0x2c7d26(0x1fa),'defaultOutputFormat':a200_0x2c7d26(0x1ed),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a200_0x2c7d26(0x1fd)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x203c31){readCustomPageId(_0x203c31);},async 'execute'(_0x3b331e){const _0x98cc54=a200_0x2c7d26,_0x2ffdff=readCustomPageId(_0x3b331e),_0x313c61=await getCustomPageSource(_0x2ffdff),{bundle:_0xfbfa08,createTime:_0x1ad608,updateTime:_0x31a61a,..._0x49c77e}=_0x313c61,_0x1b1430=_0x313c61['id']??_0x2ffdff,_0x5861e7=_0x313c61[_0x98cc54(0x1f5)]?.[_0x98cc54(0x1f0)]()||_0x3b331e['str'](_0x98cc54(0x1ef))[_0x98cc54(0x1f0)](),_0x40e9e0=buildCustomPageRuntimeUrl(_0x5861e7,_0x313c61[_0x98cc54(0x1e4)]),_0xcf2c57=buildCustomPageEditUrl(_0x5861e7,_0x1b1430),_0x156c78=await resolveCustomPageDevelopmentUrl(_0x5861e7,_0x1b1430,_0x3b331e[_0x98cc54(0x1e9)]);return{'ok':!![],'data':{..._0x49c77e,..._0x40e9e0?{'runtimePageUrl':_0x40e9e0}:{},..._0x156c78?{'pageUrl':_0x156c78}:{},..._0xcf2c57?{'editPageUrl':_0xcf2c57}:{},..._0x1ad608==null?{}:{'createTime':formatTime(_0x1ad608)},..._0x31a61a==null?{}:{'updateTime':formatTime(_0x31a61a)}},'message':_0x98cc54(0x1e7)+_0x2ffdff+'.'};}};function a200_0x7abf(_0x5bff04,_0x528086){_0x5bff04=_0x5bff04-0x1e1;const _0x1fba3d=a200_0x1fba();let _0x7abf4e=_0x1fba3d[_0x5bff04];return _0x7abf4e;}function formatTime(_0x69298b){const _0xd5546c=a200_0x2c7d26,_0x3d5e45=new Date(_0x69298b);if(Number[_0xd5546c(0x1f3)](_0x3d5e45['getTime']()))return String(_0x69298b);const _0x4c59b7=[_0x3d5e45[_0xd5546c(0x1e6)](),String(_0x3d5e45['getMonth']()+0x1)[_0xd5546c(0x1ec)](0x2,'0'),String(_0x3d5e45['getDate']())[_0xd5546c(0x1ec)](0x2,'0')][_0xd5546c(0x1e1)]('-'),_0x519ecb=[String(_0x3d5e45[_0xd5546c(0x1f7)]())['padStart'](0x2,'0'),String(_0x3d5e45[_0xd5546c(0x1fc)]())[_0xd5546c(0x1ec)](0x2,'0'),String(_0x3d5e45[_0xd5546c(0x1e8)]())[_0xd5546c(0x1ec)](0x2,'0')][_0xd5546c(0x1e1)](':');return _0x4c59b7+'\x20'+_0x519ecb;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a201_0x5403(){const _0x28e0fd=['custom-list','menus','80nHOtVv','276558hEHWRl','path','Found\x20','1662VcGyzq','label','No\x20Custom\x20Pages\x20found.','3180440fIWPFL','flatMap','1RfpKFY','\x20Custom\x20Page(s).','pageId','appCode','4772kAnzSy','713678vpdTSy','17433150XzfNPB','compress','2826927iUdQci','page','1450406ddCPAb','cookie','length'];a201_0x5403=function(){return _0x28e0fd;};return a201_0x5403();}function a201_0x7bb5(_0x4c70b8,_0x1310df){_0x4c70b8=_0x4c70b8-0x10d;const _0x540349=a201_0x5403();let _0x7bb53a=_0x540349[_0x4c70b8];return _0x7bb53a;}const a201_0x45e99e=a201_0x7bb5;(function(_0x2aa90b,_0x306f32){const _0x239fce=a201_0x7bb5,_0x4dedb4=_0x2aa90b();while(!![]){try{const _0x25bac4=parseInt(_0x239fce(0x117))/0x1*(parseInt(_0x239fce(0x121))/0x2)+-parseInt(_0x239fce(0x112))/0x3*(-parseInt(_0x239fce(0x11b))/0x4)+-parseInt(_0x239fce(0x10e))/0x5*(-parseInt(_0x239fce(0x10f))/0x6)+parseInt(_0x239fce(0x11c))/0x7+-parseInt(_0x239fce(0x115))/0x8+parseInt(_0x239fce(0x11f))/0x9+-parseInt(_0x239fce(0x11d))/0xa;if(_0x25bac4===_0x306f32)break;else _0x4dedb4['push'](_0x4dedb4['shift']());}catch(_0x4c6c4c){_0x4dedb4['push'](_0x4dedb4['shift']());}}}(a201_0x5403,0x615d0));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';export const pageCustomList={'service':a201_0x45e99e(0x120),'command':a201_0x45e99e(0x124),'description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':'read','defaultOutputFormat':a201_0x45e99e(0x11e),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4e71f2){const _0x514344=a201_0x45e99e,_0x46f32e=(await fetchMenuSnapshot(_0x4e71f2[_0x514344(0x11a)],_0x4e71f2[_0x514344(0x122)]))[_0x514344(0x10d)][_0x514344(0x116)](_0x391cda=>{const _0x16e6c9=_0x514344;if(_0x391cda['type']!=='react'||_0x391cda[_0x16e6c9(0x119)]==null)return[];const _0xe86f93=buildCustomPageDevelopmentUrl(_0x4e71f2[_0x16e6c9(0x11a)],_0x391cda[_0x16e6c9(0x110)]),_0xe5e885=buildCustomPageRuntimeUrl(_0x4e71f2[_0x16e6c9(0x11a)],_0x391cda[_0x16e6c9(0x110)]),_0x408b1e=buildCustomPageEditUrl(_0x4e71f2[_0x16e6c9(0x11a)],_0x391cda[_0x16e6c9(0x119)]);return[{'pageId':_0x391cda[_0x16e6c9(0x119)],'label':_0x391cda[_0x16e6c9(0x113)],'path':_0x391cda[_0x16e6c9(0x110)],..._0xe86f93?{'pageUrl':_0xe86f93}:{},..._0xe5e885?{'runtimePageUrl':_0xe5e885}:{},..._0x408b1e?{'editPageUrl':_0x408b1e}:{}}];});return{'ok':!![],'data':{'pages':_0x46f32e},'message':_0x46f32e[_0x514344(0x123)]===0x0?_0x514344(0x114):_0x514344(0x111)+_0x46f32e['length']+_0x514344(0x118)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a202_0x15ab42=a202_0x3d82;(function(_0x9247be,_0xd6f86a){const _0x521c27=a202_0x3d82,_0x264521=_0x9247be();while(!![]){try{const _0x54767a=parseInt(_0x521c27(0x14b))/0x1+parseInt(_0x521c27(0x140))/0x2*(parseInt(_0x521c27(0x14a))/0x3)+parseInt(_0x521c27(0x151))/0x4+parseInt(_0x521c27(0x13d))/0x5+parseInt(_0x521c27(0x136))/0x6*(parseInt(_0x521c27(0x143))/0x7)+parseInt(_0x521c27(0x13b))/0x8*(-parseInt(_0x521c27(0x152))/0x9)+-parseInt(_0x521c27(0x13c))/0xa*(parseInt(_0x521c27(0x133))/0xb);if(_0x54767a===_0xd6f86a)break;else _0x264521['push'](_0x264521['shift']());}catch(_0x1e739e){_0x264521['push'](_0x264521['shift']());}}}(a202_0x5178,0xc50e9));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';function a202_0x5178(){const _0x5943a3=['remark','apiError','unknown','appCode','11wJvpUe','warnings','Would\x20publish\x20Custom\x20Page\x20','32454Zztdbb','string','push','POST','Custom\x20Page\x20ID','669256TYaxMT','1447730lvvCgn','4672150IOKWdj','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','Optional\x20publish\x20remark','492818JMUdnL','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','trim','623vyMmgp','write','cookie','page.custom-publish','isInteger','custom-publish','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','3IQmWEO','16765ybaKce','FORMAL','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','pageId','str','772560xXQaKR','99LgIPaL','status'];a202_0x5178=function(){return _0x5943a3;};return a202_0x5178();}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';function a202_0x3d82(_0x1d1974,_0x3cd166){_0x1d1974=_0x1d1974-0x131;const _0x51788a=a202_0x5178();let _0x3d8257=_0x51788a[_0x1d1974];return _0x3d8257;}export const pageCustomPublish={'service':'page','command':a202_0x15ab42(0x148),'description':a202_0x15ab42(0x14d),'risk':a202_0x15ab42(0x144),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a202_0x15ab42(0x13a)},{'name':a202_0x15ab42(0x154),'type':a202_0x15ab42(0x137),'description':a202_0x15ab42(0x13f)}],async 'validate'(_0x540fd4){readCustomPageId(_0x540fd4);},async 'dryRun'(_0x5f297d){const _0x3ab65a=a202_0x15ab42,_0x3d300a=readInput(_0x5f297d);return{'method':_0x3ab65a(0x139),'url':'/smartapi/webcode/file/publish','body':{'id':_0x3d300a[_0x3ab65a(0x14f)],..._0x3d300a['remark']?{'remark':_0x3d300a[_0x3ab65a(0x154)]}:{}},'description':_0x3ab65a(0x135)+_0x3d300a[_0x3ab65a(0x14f)]+'.'};},async 'execute'(_0x1bd63e){const _0x357e29=a202_0x15ab42,_0x579087=readInput(_0x1bd63e);await getCustomPageSource(_0x579087['pageId']);const _0x4c63e2=await publishCustomPage(_0x579087);if(!Number[_0x357e29(0x147)](_0x4c63e2)||_0x4c63e2!==_0x579087[_0x357e29(0x14f)])throw CliErrors[_0x357e29(0x155)](_0x357e29(0x13e));const _0x482c42=await getCustomPageSource(_0x579087[_0x357e29(0x14f)]);if(_0x482c42['status']!==_0x357e29(0x14c))throw CliErrors[_0x357e29(0x155)](_0x357e29(0x14e)+(_0x482c42[_0x357e29(0x153)]??_0x357e29(0x131))+'.');const _0x28efaf=_0x482c42[_0x357e29(0x132)]?.['trim'](),_0x172a54=buildCustomPageEditUrl(_0x28efaf,_0x579087[_0x357e29(0x14f)]),_0x448add=await resolveCustomPageDevelopmentUrl(_0x28efaf,_0x579087[_0x357e29(0x14f)],_0x1bd63e[_0x357e29(0x145)]),_0x388a0a=buildMutationData(_0x579087,!![],_0x448add,_0x172a54);_0x28efaf&&!_0x448add&&_0x388a0a[_0x357e29(0x134)]['push'](_0x357e29(0x141));const _0xe9d0fb=buildCustomPageRuntimeUrl(_0x482c42['appCode'],_0x482c42['pageCode']);return _0xe9d0fb?_0x388a0a['runtimePageUrl']=_0xe9d0fb:_0x388a0a[_0x357e29(0x134)][_0x357e29(0x138)](_0x357e29(0x149)),{'ok':!![],'data':_0x388a0a,'message':'Published\x20Custom\x20Page\x20'+_0x579087[_0x357e29(0x14f)]+'.'};}};function readInput(_0x5e4196){const _0x239988=a202_0x15ab42,_0x5d9486=readCustomPageId(_0x5e4196),_0x2eceea=_0x5e4196[_0x239988(0x150)]('remark')[_0x239988(0x142)]();return{'pageId':_0x5d9486,..._0x2eceea?{'remark':_0x2eceea}:{}};}function buildMutationData(_0x2e7e03,_0x1628ba=![],_0x29b92d,_0x58de98){const _0x339626=a202_0x15ab42;return{'operation':_0x339626(0x146),'selector':{'pageId':_0x2e7e03['pageId']},'before':null,'after':{'pageId':_0x2e7e03[_0x339626(0x14f)],'status':_0x339626(0x14c)},'dryRun':!_0x1628ba,'request':_0x2e7e03,..._0x29b92d?{'pageUrl':_0x29b92d}:{},..._0x58de98?{'editPageUrl':_0x58de98}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a203_0x5802(_0x392f77,_0x517e5c){_0x392f77=_0x392f77-0xd0;const _0x92ae=a203_0x92ae();let _0x580291=_0x92ae[_0x392f77];return _0x580291;}const a203_0x5437fb=a203_0x5802;(function(_0x52cae1,_0x33776c){const _0x4943ee=a203_0x5802,_0x48b3b2=_0x52cae1();while(!![]){try{const _0x4c4106=parseInt(_0x4943ee(0xe0))/0x1*(parseInt(_0x4943ee(0xea))/0x2)+-parseInt(_0x4943ee(0xe3))/0x3*(parseInt(_0x4943ee(0xd1))/0x4)+parseInt(_0x4943ee(0xe7))/0x5*(-parseInt(_0x4943ee(0xdd))/0x6)+-parseInt(_0x4943ee(0xeb))/0x7*(parseInt(_0x4943ee(0xda))/0x8)+-parseInt(_0x4943ee(0xd9))/0x9*(parseInt(_0x4943ee(0xd2))/0xa)+-parseInt(_0x4943ee(0xd7))/0xb+-parseInt(_0x4943ee(0xdf))/0xc*(-parseInt(_0x4943ee(0xd8))/0xd);if(_0x4c4106===_0x33776c)break;else _0x48b3b2['push'](_0x48b3b2['shift']());}catch(_0x3a7214){_0x48b3b2['push'](_0x48b3b2['shift']());}}}(a203_0x92ae,0x2e0b7));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';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':a203_0x5437fb(0xd4)};function trimOptional(_0x3b5dda){const _0x30427d=a203_0x5437fb;return _0x3b5dda?.[_0x30427d(0xe2)]()||undefined;}function a203_0x92ae(){const _0x2f84c3=['message','1722945DZhEPG','/ide/','join','2RrZebp','166509FOZnUc','pageId','448676vOtViK','20410hxdanW','find','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','menus','/pages/','2720729BFnLfo','52pVJIVM','990FuiTpo','24bpgLQg','length','path','6PDORiA','file','2580624sWERHY','328359ERHzdT','isInteger','trim','3QnzBhO','num','validation'];a203_0x92ae=function(){return _0x2f84c3;};return a203_0x92ae();}export function buildCustomPageRuntimeUrl(_0x100af1,_0x327741){const _0x5d7127=trimOptional(_0x100af1),_0x489d07=trimOptional(_0x327741);if(!_0x5d7127||!_0x489d07)return undefined;return getPublishedAppDomain(_0x5d7127)+'/'+encodeURIComponent(_0x489d07);}export function buildCustomPageDevelopmentUrl(_0x1e4485,_0x28af1c){const _0x5785f1=a203_0x5437fb,_0x452aa7=trimOptional(_0x1e4485),_0x577dd5=trimOptional(_0x28af1c);if(!_0x452aa7||!_0x577dd5)return undefined;return getAppBaseUrl(_0x452aa7)+_0x5785f1(0xd6)+encodeURIComponent(_0x577dd5);}export async function resolveCustomPageDevelopmentUrl(_0x25037a,_0x4cdc32,_0x105bd2){const _0x580b8e=a203_0x5437fb,_0x59ed21=trimOptional(_0x25037a);if(!_0x59ed21)return undefined;try{const _0x27bc17=(await fetchMenuSnapshot(_0x59ed21,_0x105bd2))[_0x580b8e(0xd5)][_0x580b8e(0xd3)](_0x355a55=>_0x355a55['type']==='react'&&_0x355a55[_0x580b8e(0xd0)]===_0x4cdc32);return buildCustomPageDevelopmentUrl(_0x59ed21,_0x27bc17?.[_0x580b8e(0xdc)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x3fb864,_0xeb90a9){const _0x53c4ea=a203_0x5437fb,_0x4db37b=trimOptional(_0x3fb864);if(!_0x4db37b)return;const _0x187eed=trimOptional(String(_0xeb90a9??''));if(!_0x187eed)return;return getAppBaseUrl(_0x4db37b)+_0x53c4ea(0xe8)+encodeURIComponent(_0x187eed);}export async function validateCustomPageContent(_0x3ef1fe){const _0x4c8e13=a203_0x5437fb,_0x168e91=await validateCustomPageSourceFiles(_0x3ef1fe);if(_0x168e91[_0x4c8e13(0xdb)]>0x0)throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20content:\x20'+_0x168e91['map'](_0x365cfa=>_0x365cfa[_0x4c8e13(0xde)]+':\x20'+_0x365cfa[_0x4c8e13(0xe6)])[_0x4c8e13(0xe9)](';\x20'));}export function readCustomPageId(_0x2eeae9){const _0x342be6=a203_0x5437fb,_0x30f034=_0x2eeae9[_0x342be6(0xe4)]('id');if(!Number[_0x342be6(0xe1)](_0x30f034)||_0x30f034<=0x0)throw CliErrors[_0x342be6(0xe5)]('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x30f034;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a204_0x1169d5=a204_0x6fb5;function a204_0x6fb5(_0x26aaf1,_0xd9e26d){_0x26aaf1=_0x26aaf1-0x85;const _0x74385a=a204_0x7438();let _0x6fb555=_0x74385a[_0x26aaf1];return _0x6fb555;}(function(_0x5f03e0,_0x5f4686){const _0x54e789=a204_0x6fb5,_0x303584=_0x5f03e0();while(!![]){try{const _0x30a8aa=-parseInt(_0x54e789(0x8b))/0x1+-parseInt(_0x54e789(0x93))/0x2+-parseInt(_0x54e789(0x95))/0x3+parseInt(_0x54e789(0x89))/0x4+-parseInt(_0x54e789(0x90))/0x5+parseInt(_0x54e789(0x8e))/0x6*(parseInt(_0x54e789(0x97))/0x7)+parseInt(_0x54e789(0x94))/0x8;if(_0x30a8aa===_0x5f4686)break;else _0x303584['push'](_0x303584['shift']());}catch(_0x533196){_0x303584['push'](_0x303584['shift']());}}}(a204_0x7438,0x95a30));import{format}from'prettier';const SOURCE_PARSERS={'.js':a204_0x1169d5(0x8d),'.jsx':a204_0x1169d5(0x8d),'.ts':'typescript','.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=['.jsx',a204_0x1169d5(0x8c)];function a204_0x7438(){const _0x5bc9fd=['303700NmoFWo','message','toLowerCase','1413586BuFrTE','10405360OqnZWy','2812785DUxeLe','filter','371MZWuqN','page\x20files','endsWith','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','trim','4335388wUvkbd','some','188006VYwaPy','.tsx','babel','13758RmxzAW','entries'];a204_0x7438=function(){return _0x5bc9fd;};return a204_0x7438();}export async function validateCustomPageSourceFiles(_0x3032a4){const _0x6fa1aa=a204_0x1169d5,_0x556e7a=Object[_0x6fa1aa(0x8f)](_0x3032a4)[_0x6fa1aa(0x96)](([_0x346c20])=>getParser(_0x346c20));if(!_0x556e7a['some'](([_0x1bc1f5])=>isReactSourceFile(_0x1bc1f5)))return[{'file':_0x6fa1aa(0x85),'message':_0x6fa1aa(0x87)}];const _0x4228ab=await Promise['all'](_0x556e7a['map'](async([_0x5f4889,_0x389b54])=>{const _0xd33e3d=_0x6fa1aa;try{return await format(_0x389b54,{'parser':getParser(_0x5f4889)}),undefined;}catch(_0x206389){return{'file':_0x5f4889,'message':_0x206389 instanceof Error?_0x206389[_0xd33e3d(0x91)]:String(_0x206389)};}}));return _0x4228ab[_0x6fa1aa(0x96)](_0x3ab1d3=>_0x3ab1d3!==undefined);}function getParser(_0x4115a6){const _0x436ad8=a204_0x1169d5,_0x21c451=_0x4115a6['trim']()[_0x436ad8(0x92)]();return Object[_0x436ad8(0x8f)](SOURCE_PARSERS)['find'](([_0x371c4f])=>_0x21c451['endsWith'](_0x371c4f))?.[0x1];}function isReactSourceFile(_0x48a2b7){const _0x3e5698=a204_0x1169d5,_0x41cf84=_0x48a2b7[_0x3e5698(0x88)]()[_0x3e5698(0x92)]();return CUSTOM_PAGE_EXTENSIONS[_0x3e5698(0x8a)](_0x3f6bd3=>_0x41cf84[_0x3e5698(0x86)](_0x3f6bd3));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a205_0x3c4422=a205_0x4a6a;(function(_0xf9a318,_0x25ec57){const _0x6e72e0=a205_0x4a6a,_0x4ed47a=_0xf9a318();while(!![]){try{const _0x367f62=parseInt(_0x6e72e0(0x1f3))/0x1*(parseInt(_0x6e72e0(0x1fa))/0x2)+parseInt(_0x6e72e0(0x1fd))/0x3*(-parseInt(_0x6e72e0(0x1eb))/0x4)+parseInt(_0x6e72e0(0x1fe))/0x5*(-parseInt(_0x6e72e0(0x1f6))/0x6)+parseInt(_0x6e72e0(0x20b))/0x7+-parseInt(_0x6e72e0(0x1f5))/0x8*(parseInt(_0x6e72e0(0x1ea))/0x9)+-parseInt(_0x6e72e0(0x204))/0xa+parseInt(_0x6e72e0(0x20a))/0xb*(parseInt(_0x6e72e0(0x205))/0xc);if(_0x367f62===_0x25ec57)break;else _0x4ed47a['push'](_0x4ed47a['shift']());}catch(_0x5cc437){_0x4ed47a['push'](_0x4ed47a['shift']());}}}(a205_0x1703,0x6f2bd));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';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':'page','command':'custom-update','description':a205_0x3c4422(0x1e9),'risk':a205_0x3c4422(0x209),'defaultOutputFormat':a205_0x3c4422(0x1ee),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':'page-content','message':a205_0x3c4422(0x1ed),'hint':a205_0x3c4422(0x1f7)}],'flags':[{'name':'id','type':a205_0x3c4422(0x1f8),'required':!![],'description':a205_0x3c4422(0x201)},{'name':a205_0x3c4422(0x1f2),'type':'string','required':!![],'description':a205_0x3c4422(0x1fc)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x206075){readCustomPageId(_0x206075),await readValidatedPageContent(_0x206075);},async 'dryRun'(_0x474dc2){const _0x2b5507=a205_0x3c4422,_0x101c92=await readInput(_0x474dc2);return{'method':_0x2b5507(0x1f1),'url':_0x2b5507(0x207),'body':{'id':_0x101c92[_0x2b5507(0x1ff)],'codeContent':_0x101c92['pageContent']},'description':_0x2b5507(0x206)+_0x101c92['pageId']+'.'};},async 'execute'(_0x49f227){const _0x459e52=a205_0x3c4422,_0x29ecc2=await readInput(_0x49f227),_0x32efbe=await updateCustomPageContent({'pageId':_0x29ecc2[_0x459e52(0x1ff)],'pageContent':_0x29ecc2[_0x459e52(0x1fb)]});if(!Number['isInteger'](_0x32efbe[_0x459e52(0x203)])||_0x32efbe[_0x459e52(0x203)]<=0x0)throw CliErrors[_0x459e52(0x1ec)]('Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0x72ec2=buildCustomPageEditUrl(_0x29ecc2[_0x459e52(0x1ef)],_0x29ecc2['pageId']),_0x198375=await resolveCustomPageDevelopmentUrl(_0x29ecc2[_0x459e52(0x1ef)],_0x29ecc2[_0x459e52(0x1ff)],_0x49f227[_0x459e52(0x200)]);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x29ecc2[_0x459e52(0x1ef)],'pageId':_0x29ecc2[_0x459e52(0x1ff)]},'before':null,'after':{'pageId':_0x32efbe[_0x459e52(0x1ff)],'version':_0x32efbe['newVersion'],'pageContent':_0x29ecc2[_0x459e52(0x1fb)]},'dryRun':![],'request':_0x29ecc2,..._0x198375?{'pageUrl':_0x198375}:{},..._0x72ec2?{'editPageUrl':_0x72ec2}:{},'warnings':_0x198375?[]:[_0x459e52(0x208)]},'message':_0x459e52(0x202)+_0x29ecc2['pageId']+'.'};}};async function readInput(_0x5a0a84){const _0xc3a061=a205_0x3c4422,_0x19641d=readCustomPageId(_0x5a0a84),_0x3e77e6=_0x5a0a84[_0xc3a061(0x1f0)]('appcode')[_0xc3a061(0x1f4)]()||(await getCustomPageSource(_0x19641d))['appCode']?.[_0xc3a061(0x1f4)]();if(!_0x3e77e6)throw CliErrors[_0xc3a061(0x1f9)]('Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20'+_0x19641d+'.');return{'appCode':_0x3e77e6,'pageId':_0x19641d,'pageContent':await readValidatedPageContent(_0x5a0a84)};}function a205_0x4a6a(_0x159ebd,_0x14b5e1){_0x159ebd=_0x159ebd-0x1e9;const _0x170337=a205_0x1703();let _0x4a6a6a=_0x170337[_0x159ebd];return _0x4a6a6a;}function a205_0x1703(){const _0x5989c5=['page-dir','937yFDmfu','trim','8lOztnK','6wxuEpd','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','number','validation','274wzaLfT','pageContent','Directory\x20containing\x20all\x20complete\x20page\x20files','1162509ghbwye','2237295FGtJia','pageId','cookie','Custom\x20Page\x20ID','Updated\x20Custom\x20Page\x20','newVersion','9066770kSeuMT','381588mlQNwb','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','/smartapi/webcode/page/update/content','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','write','682PSZhps','3755745svPhgh','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','467487qLXgyQ','8wYyYlY','apiError','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','compress','appCode','str','POST'];a205_0x1703=function(){return _0x5989c5;};return a205_0x1703();}async function readValidatedPageContent(_0x25e337){const _0x11f135=a205_0x3c4422,_0x1ddc54=await readCustomPageDirectory(_0x25e337[_0x11f135(0x1f0)](_0x11f135(0x1f2)));return await validateCustomPageContent(_0x1ddc54),_0x1ddc54;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a206_0x1476(){const _0x15b0b3=['page','7979384DQNYjx','64868WlVfDA','compress','nextAction','2592836SvDODZ','length','/smartapi/lovrabet/dataset/','505hfcFRj','read','9DOUkON','alias','query-data-list-status','213012NhlqfI','name','681810RyMMrN','/standard-page-status?appCode=','relatedPages','appCode','manualResolutionRequired','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','status','759YZiwfu','code','569079qnWoAJ','data-list-status','30YMuFkF','source','1282265wcbNnB'];a206_0x1476=function(){return _0x15b0b3;};return a206_0x1476();}const a206_0x252b2f=a206_0x41d2;(function(_0x4cb1ef,_0x2bc31c){const _0x5253d9=a206_0x41d2,_0x2bb2cf=_0x4cb1ef();while(!![]){try{const _0x2d91b3=parseInt(_0x5253d9(0x92))/0x1+parseInt(_0x5253d9(0x98))/0x2+parseInt(_0x5253d9(0xa0))/0x3+-parseInt(_0x5253d9(0x95))/0x4*(-parseInt(_0x5253d9(0x9b))/0x5)+-parseInt(_0x5253d9(0x90))/0x6*(-parseInt(_0x5253d9(0x8e))/0x7)+parseInt(_0x5253d9(0x94))/0x8*(parseInt(_0x5253d9(0x9d))/0x9)+parseInt(_0x5253d9(0xa2))/0xa*(-parseInt(_0x5253d9(0xa9))/0xb);if(_0x2d91b3===_0x2bc31c)break;else _0x2bb2cf['push'](_0x2bb2cf['shift']());}catch(_0x13fa93){_0x2bb2cf['push'](_0x2bb2cf['shift']());}}}(a206_0x1476,0xf0f8f));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a206_0x41d2(_0x2254d2,_0xc29f07){_0x2254d2=_0x2254d2-0x8e;const _0x147673=a206_0x1476();let _0x41d25b=_0x147673[_0x2254d2];return _0x41d25b;}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a206_0x252b2f(0x93),'command':a206_0x252b2f(0x8f),'description':a206_0x252b2f(0xa7),'risk':a206_0x252b2f(0x9c),'defaultOutputFormat':a206_0x252b2f(0x96),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a206_0x252b2f(0x9e),'type':'string','description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x42777b){validateDatasetSelector(_0x42777b);},async 'dryRun'(_0x59b3f9){const _0x176507=a206_0x252b2f,_0x28e344=await loadDatasetDetailForPage(_0x59b3f9);return{'method':'GET','url':_0x176507(0x9a)+_0x28e344[_0x176507(0xaa)]+_0x176507(0xa3)+encodeURIComponent(_0x59b3f9[_0x176507(0xa5)]),'description':serializeDryRunDescription({'dataset':{'id':_0x28e344['id'],'code':_0x28e344[_0x176507(0xaa)],'name':_0x28e344[_0x176507(0xa1)]},'action':_0x176507(0x9f)})};},async 'execute'(_0x27ccf1){const _0x25e793=a206_0x252b2f,_0x1bab98=await loadDatasetDetailForPage(_0x27ccf1),_0x3171be=await loadDataListPageStatusForGenerate(_0x27ccf1,_0x1bab98[_0x25e793(0xaa)]),_0x3aa744=getUndeletedRelatedPages(_0x1bab98),_0x3658cc=assessDataListPageState(_0x1bab98[_0x25e793(0xaa)],_0x3171be,{'fallbackUndeletedPages':_0x3aa744});return{'ok':!![],'data':{'datasetCode':_0x1bab98[_0x25e793(0xaa)],'precheckSource':_0x3171be?.[_0x25e793(0x91)]??'related-pages-fallback','status':_0x3658cc[_0x25e793(0xa8)],'manualResolutionRequired':_0x3658cc[_0x25e793(0xa6)],'nextAction':_0x3658cc[_0x25e793(0x97)],'dataListPageStatus':_0x3171be,'relatedPages':{'total':_0x1bab98[_0x25e793(0xa4)]['length'],'undeletedCount':_0x3aa744[_0x25e793(0x99)]}}};}};
|