@lovrabet/rabetbase-cli 2.5.12-beta.1 → 2.5.12
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 +1 -1
- 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_0x45a942=a194_0x4136;(function(_0x4f3399,_0x32b444){const _0x27febf=a194_0x4136,_0x5a09a5=_0x4f3399();while(!![]){try{const _0x1e159c=-parseInt(_0x27febf(0x1b6))/0x1*(-parseInt(_0x27febf(0x1be))/0x2)+parseInt(_0x27febf(0x1b8))/0x3+-parseInt(_0x27febf(0x1c1))/0x4+-parseInt(_0x27febf(0x1b7))/0x5*(parseInt(_0x27febf(0x1b1))/0x6)+-parseInt(_0x27febf(0x1ad))/0x7+parseInt(_0x27febf(0x1b5))/0x8+parseInt(_0x27febf(0x1bb))/0x9;if(_0x1e159c===_0x32b444)break;else _0x5a09a5['push'](_0x5a09a5['shift']());}catch(_0x6801da){_0x5a09a5['push'](_0x5a09a5['shift']());}}}(a194_0xe63e,0xbc5f9));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a194_0x4136(_0x3c7a44,_0xc2dac1){_0x3c7a44=_0x3c7a44-0x1ad;const _0xe63e10=a194_0xe63e();let _0x413646=_0xe63e10[_0x3c7a44];return _0x413646;}import{CliErrors}from'../../errors.js';function a194_0xe63e(){const _0x1141d9=['config-list','type','2650224kukstA','1GviNYD','963565jbTTkt','3211917uUYdDL','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','31689954DNOsPh','string','bool','806676vSLyPT','all','flat','5913576kkQXxL','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','read','\x20notification\x20config(s)','trim','boolean','map','10742802HDkTyj','validation','Found\x20','appCode','48bdSafr','length'];a194_0xe63e=function(){return _0x1141d9;};return a194_0xe63e();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a194_0x45a942(0x1b3),'description':a194_0x45a942(0x1ba),'risk':a194_0x45a942(0x1c3),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a194_0x45a942(0x1bc),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a194_0x45a942(0x1c6),'default':![],'description':a194_0x45a942(0x1b9)}],async 'validate'(_0xba3b34){const _0x448e1f=a194_0x45a942;if(_0xba3b34[_0x448e1f(0x1bd)]('all')&&_0xba3b34['str'](_0x448e1f(0x1b4))[_0x448e1f(0x1c5)]())throw CliErrors[_0x448e1f(0x1ae)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0xba3b34['bool'](_0x448e1f(0x1bf)))return;readNotificationChannelType(_0xba3b34);},async 'execute'(_0x4d572a){const _0x19d613=a194_0x45a942;if(_0x4d572a[_0x19d613(0x1bd)](_0x19d613(0x1bf))){const _0x4de92a=await Promise[_0x19d613(0x1bf)](NOTIFICATION_CHANNEL_TYPES[_0x19d613(0x1c7)](_0x55146d=>listNotificationChannelConfigs(_0x4d572a[_0x19d613(0x1b0)],_0x55146d))),_0xba7ed5=_0x4de92a[_0x19d613(0x1c0)]()[_0x19d613(0x1c7)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x4d572a[_0x19d613(0x1b0)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0xba7ed5[_0x19d613(0x1b2)],'configs':_0xba7ed5},'message':_0x19d613(0x1af)+_0xba7ed5[_0x19d613(0x1b2)]+_0x19d613(0x1c2)};}const _0x247df5=readNotificationChannelType(_0x4d572a),_0xe7a1b4=await listNotificationChannelConfigs(_0x4d572a[_0x19d613(0x1b0)],_0x247df5),_0x364656=_0xe7a1b4[_0x19d613(0x1c7)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x4d572a[_0x19d613(0x1b0)],'channelType':_0x247df5,'count':_0x364656[_0x19d613(0x1b2)],'configs':_0x364656},'message':_0x19d613(0x1af)+_0x364656[_0x19d613(0x1b2)]+'\x20'+_0x247df5+_0x19d613(0x1c4)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x3ea7b8=a195_0x4d78;function a195_0x4d78(_0x114917,_0x19c5e4){_0x114917=_0x114917-0x1e9;const _0x503cb7=a195_0x503c();let _0x4d788d=_0x503cb7[_0x114917];return _0x4d788d;}(function(_0x4805bd,_0x367864){const _0x1a120e=a195_0x4d78,_0x2e7edc=_0x4805bd();while(!![]){try{const _0x5309b3=-parseInt(_0x1a120e(0x206))/0x1*(parseInt(_0x1a120e(0x1f6))/0x2)+parseInt(_0x1a120e(0x1fd))/0x3*(-parseInt(_0x1a120e(0x1f8))/0x4)+parseInt(_0x1a120e(0x1f2))/0x5+-parseInt(_0x1a120e(0x1f9))/0x6*(parseInt(_0x1a120e(0x1e9))/0x7)+parseInt(_0x1a120e(0x1f1))/0x8+-parseInt(_0x1a120e(0x1eb))/0x9*(-parseInt(_0x1a120e(0x1fa))/0xa)+parseInt(_0x1a120e(0x205))/0xb;if(_0x5309b3===_0x367864)break;else _0x2e7edc['push'](_0x2e7edc['shift']());}catch(_0x222030){_0x2e7edc['push'](_0x2e7edc['shift']());}}}(a195_0x503c,0x7deb3));function a195_0x503c(){const _0x115448=['high-risk-write','\x20with\x20','Inspect\x20ID\x20','appCode','1572851hwoyLA','POST','27isCnSC','verified','planned','verifiedFields','config-update','Inspect\x20with\x20--id\x20','7540216NMynZa','4646810sDDIJd','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','notification_config_update_outcome_unknown','178506CqOPLP','notification_config_update_verification_unavailable','316FpsuyV','18ZFpLqJ','2679110dkyVAm','patch','allMatch','35745xHwHfJ','Updated\x20notification\x20config\x20','mutation','channelType',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20','before','\x20via\x20','1864819tYMxKU','8yXlRqb','update','payload',';\x20do\x20not\x20resubmit\x20automatically.'];a195_0x503c=function(){return _0x115448;};return a195_0x503c();}import{asDryRunResult}from'../../commands/common/dry-run.js';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';const UPDATE_PATH='/notification/channel-config/update';async function prepareUpdate(_0xa1b9d){const _0x2d6718=a195_0x4d78,_0x2cf046=readNotificationId(_0xa1b9d),_0x33e6b7=await readNotificationDocument(_0xa1b9d,_0x2d6718(0x207)),_0x41652c=await requireExactNotificationConfig(_0xa1b9d[_0x2d6718(0x20d)],_0x2cf046,'update');return{'id':_0x2cf046,'patch':_0x33e6b7,'before':_0x41652c,'payload':mergeUpdateInput(_0x41652c,_0x33e6b7),'planned':plannedUpdateProjection(_0x41652c,_0x33e6b7)};}export const notificationConfigUpdate={'service':'notification','command':a195_0x3ea7b8(0x1ef),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':a195_0x3ea7b8(0x20a),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x223530){readNotificationId(_0x223530),assertSingleNotificationSource(_0x223530),requireNotificationExplicitYes(_0x223530);},async 'dryRun'(_0x3c281f){const _0x1245c6=a195_0x3ea7b8,_0x243e0e=await prepareUpdate(_0x3c281f),_0x42ca8c=notificationLookupCommand(_0x3c281f[_0x1245c6(0x20d)],_0x243e0e[_0x1245c6(0x203)][_0x1245c6(0x200)]);return asDryRunResult({'operation':_0x1245c6(0x207),'selector':notificationSelector(_0x243e0e[_0x1245c6(0x203)]),'before':projectNotificationConfig(_0x243e0e[_0x1245c6(0x203)]),'after':_0x243e0e[_0x1245c6(0x1ed)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x1245c6(0x1ed),'lookupCommand':_0x42ca8c}},{'method':_0x1245c6(0x1ea),'url':UPDATE_PATH});},async 'execute'(_0x26d10b){const _0x5be2e8=a195_0x3ea7b8;requireNotificationExplicitYes(_0x26d10b);const _0x3c78b0=await prepareUpdate(_0x26d10b),_0x29288e=notificationLookupCommand(_0x26d10b['appCode'],_0x3c78b0[_0x5be2e8(0x203)][_0x5be2e8(0x200)]);let _0x50e7cd=![];try{await updateNotificationChannelConfig(_0x3c78b0[_0x5be2e8(0x208)]);}catch(_0x497ce4){if(!isPlatformTransportFailure(_0x497ce4))throw safeApiFailure(_0x5be2e8(0x207),_0x5be2e8(0x1ff),_0x5be2e8(0x20c)+_0x3c78b0['id']+_0x5be2e8(0x20b)+_0x29288e+_0x5be2e8(0x201));_0x50e7cd=!![];}let _0x1e121;try{const _0x4b6e0f=await getNotificationChannelConfig(_0x3c78b0['id'],_0x26d10b[_0x5be2e8(0x20d)]);_0x1e121=normalizeExactNotificationConfig(_0x4b6e0f,_0x3c78b0['id'],_0x26d10b[_0x5be2e8(0x20d)]);}catch{throw notificationError(_0x50e7cd?'notification_config_update_outcome_unknown':_0x5be2e8(0x1f7),_0x5be2e8(0x202)+_0x3c78b0['id']+_0x5be2e8(0x1f4),_0x5be2e8(0x1f0)+_0x3c78b0['id']+_0x5be2e8(0x204)+_0x29288e+_0x5be2e8(0x209));}const _0x25ba5c=requestedSafeFieldsMatch(_0x3c78b0[_0x5be2e8(0x203)],_0x1e121,_0x3c78b0[_0x5be2e8(0x1fb)]);if(!_0x25ba5c[_0x5be2e8(0x1fc)]||_0x50e7cd&&!_0x25ba5c['provesChange'])throw notificationError(_0x50e7cd?_0x5be2e8(0x1f5):'notification_config_update_verification_failed','Notification\x20config\x20'+_0x3c78b0['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Inspect\x20with\x20--id\x20'+_0x3c78b0['id']+_0x5be2e8(0x204)+_0x29288e+';\x20do\x20not\x20resubmit\x20automatically.');const _0x1d6e8c=_0x50e7cd?[_0x5be2e8(0x1f3)]:[];return{'ok':!![],'data':{'operation':_0x5be2e8(0x207),'selector':notificationSelector(_0x1e121),'before':projectNotificationConfig(_0x3c78b0[_0x5be2e8(0x203)]),'after':projectNotificationConfig(_0x1e121),'dryRun':![],'backend':{'method':_0x5be2e8(0x1ea),'path':UPDATE_PATH},'warnings':_0x1d6e8c,'verification':{'status':_0x5be2e8(0x1ec),'recoveredAfterUnknownResponse':_0x50e7cd,'verifiedFields':_0x25ba5c[_0x5be2e8(0x1ee)],'lookupCommand':_0x29288e}},'message':_0x5be2e8(0x1fe)+_0x1e121['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x394d86,_0x89036c){const _0x2cb9bb=a196_0x5b5c,_0x492a98=_0x394d86();while(!![]){try{const _0x299d75=parseInt(_0x2cb9bb(0x1dc))/0x1*(parseInt(_0x2cb9bb(0x1da))/0x2)+-parseInt(_0x2cb9bb(0x1e2))/0x3+-parseInt(_0x2cb9bb(0x1e3))/0x4*(-parseInt(_0x2cb9bb(0x1de))/0x5)+parseInt(_0x2cb9bb(0x1db))/0x6*(parseInt(_0x2cb9bb(0x1e0))/0x7)+-parseInt(_0x2cb9bb(0x1e4))/0x8*(parseInt(_0x2cb9bb(0x1dd))/0x9)+parseInt(_0x2cb9bb(0x1df))/0xa+-parseInt(_0x2cb9bb(0x1e1))/0xb;if(_0x299d75===_0x89036c)break;else _0x492a98['push'](_0x492a98['shift']());}catch(_0x5662f2){_0x492a98['push'](_0x492a98['shift']());}}}(a196_0xb89b,0x5bde2));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a196_0xb89b(){const _0x5e664d=['684PsVYti','1fLTMXf','9JGuxBB','3370dKmmdq','4228850VVsqaz','28343EfFZgH','7450036OFQmlB','1592310gYgDXd','4240DcKXdk','1472008BDLmIC','338852raxbmp'];a196_0xb89b=function(){return _0x5e664d;};return a196_0xb89b();}function a196_0x5b5c(_0x1bb6cf,_0x4ab575){_0x1bb6cf=_0x1bb6cf-0x1da;const _0xb89b4=a196_0xb89b();let _0x5b5c3c=_0xb89b4[_0x1bb6cf];return _0x5b5c3c;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a197_0x51c123=a197_0x62a1;(function(_0xd95dab,_0x5401d2){const _0x21c77e=a197_0x62a1,_0x34ce2c=_0xd95dab();while(!![]){try{const _0x10325f=-parseInt(_0x21c77e(0x1d7))/0x1+-parseInt(_0x21c77e(0x1de))/0x2+parseInt(_0x21c77e(0x218))/0x3*(parseInt(_0x21c77e(0x214))/0x4)+parseInt(_0x21c77e(0x20c))/0x5*(parseInt(_0x21c77e(0x228))/0x6)+parseInt(_0x21c77e(0x1f8))/0x7+parseInt(_0x21c77e(0x202))/0x8*(parseInt(_0x21c77e(0x1cd))/0x9)+parseInt(_0x21c77e(0x22f))/0xa*(-parseInt(_0x21c77e(0x1f1))/0xb);if(_0x10325f===_0x5401d2)break;else _0x34ce2c['push'](_0x34ce2c['shift']());}catch(_0x2d7a4e){_0x34ce2c['push'](_0x34ce2c['shift']());}}}(a197_0x4274,0x6026b));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_0x51c123(0x1ec),a197_0x51c123(0x21e),a197_0x51c123(0x1f4),a197_0x51c123(0x1d9),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName',a197_0x51c123(0x1f9),a197_0x51c123(0x1bc),a197_0x51c123(0x221),a197_0x51c123(0x209),a197_0x51c123(0x21b),a197_0x51c123(0x1f2)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x51c123(0x1df),a197_0x51c123(0x1f6),a197_0x51c123(0x1eb)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x51c123(0x1d4),'recipients',a197_0x51c123(0x1f0),a197_0x51c123(0x1fd),a197_0x51c123(0x1be),a197_0x51c123(0x1d6),a197_0x51c123(0x22e),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x51c123(0x1e1),'type':'string','required':![],'description':a197_0x51c123(0x220)},{'name':'stdin','type':a197_0x51c123(0x1ff),'required':![],'default':![],'description':a197_0x51c123(0x1bb)},{'name':a197_0x51c123(0x1b4),'type':a197_0x51c123(0x1e2),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x51c123(0x206),'required':!![],'description':a197_0x51c123(0x200)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5fc04a,_0xfcd853,_0x392451){return new CliError(_0x5fc04a,0x1,_0xfcd853,_0x392451);}export function readNotificationId(_0x3276d0){const _0x4e4c11=a197_0x51c123,_0x26b0f6=_0x3276d0[_0x4e4c11(0x1cf)]('id');if(!Number[_0x4e4c11(0x231)](_0x26b0f6)||_0x26b0f6<=0x0)throw notificationError(_0x4e4c11(0x1b3),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x26b0f6;}export function requireNotificationExplicitYes(_0x399d3e){const _0x4d7630=a197_0x51c123;if(_0x399d3e['bool'](_0x4d7630(0x1ba))||_0x399d3e[_0x4d7630(0x21d)](_0x4d7630(0x208)))return;throw notificationError(_0x4d7630(0x216),_0x4d7630(0x1b6),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x6c5774,_0x196a71=a197_0x51c123(0x20b),_0x305917=a197_0x51c123(0x1ec)){const _0x54687c=a197_0x51c123,_0x15bf4a=_0x6c5774[_0x54687c(0x1ed)](_0x196a71)['trim']()||_0x305917;if(!NOTIFICATION_CHANNEL_TYPES[_0x54687c(0x1c2)](_0x15bf4a))throw CliErrors['validation']('Invalid\x20--'+_0x196a71+':\x20'+_0x15bf4a,_0x54687c(0x1d0)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x15bf4a;}export function assertSingleNotificationSource(_0x70c9f8){const _0x1f3a30=a197_0x51c123,_0x41aca4=[],_0xf2a12=_0x70c9f8[_0x1f3a30(0x1ed)](_0x1f3a30(0x1e1))[_0x1f3a30(0x1bd)]();if(_0xf2a12)_0x41aca4['push']({'kind':'file','path':_0xf2a12});if(_0x70c9f8[_0x1f3a30(0x21d)](_0x1f3a30(0x1ca)))_0x41aca4[_0x1f3a30(0x1d1)]({'kind':_0x1f3a30(0x1ca)});const _0x11620c=_0x70c9f8[_0x1f3a30(0x1ed)]('from-env')[_0x1f3a30(0x1bd)]();if(_0x11620c)_0x41aca4['push']({'kind':_0x1f3a30(0x20a),'name':_0x11620c});if(_0x41aca4[_0x1f3a30(0x1db)]===0x0)throw CliErrors[_0x1f3a30(0x232)](_0x1f3a30(0x1e6),_0x1f3a30(0x1fc));if(_0x41aca4['length']>0x1)throw CliErrors[_0x1f3a30(0x232)](_0x1f3a30(0x1d8),_0x1f3a30(0x1fc));return _0x41aca4[0x0];}export async function readNotificationDocument(_0x49e1e9,_0x2a74c7){const _0x44daab=a197_0x51c123,_0x51e2a0=assertSingleNotificationSource(_0x49e1e9),_0x5b28ce=_0x51e2a0[_0x44daab(0x1ea)]===_0x44daab(0x1e1)?'file\x20'+_0x51e2a0[_0x44daab(0x224)]:_0x51e2a0[_0x44daab(0x1ea)]===_0x44daab(0x20a)?'environment\x20variable\x20'+_0x51e2a0[_0x44daab(0x229)]:_0x44daab(0x1ca);let _0x1dc2d7;try{if(_0x51e2a0[_0x44daab(0x1ea)]==='file')_0x1dc2d7=await readFile(_0x51e2a0[_0x44daab(0x224)],_0x44daab(0x1e4));else{if(_0x51e2a0[_0x44daab(0x1ea)]===_0x44daab(0x20a)){if(!(_0x51e2a0[_0x44daab(0x229)]in process.env))throw notificationError('notification_config_source_unavailable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x51e2a0[_0x44daab(0x229)]);_0x1dc2d7=process.env[_0x51e2a0.name]??'';}else _0x1dc2d7=await readStdin();}}catch(_0x32f2e9){if(_0x32f2e9 instanceof CliError)throw _0x32f2e9;throw notificationError(_0x44daab(0x225),_0x44daab(0x233)+_0x5b28ce+'.');}let _0x39c415;try{_0x39c415=JSON['parse'](_0x1dc2d7);}catch{throw notificationError(_0x44daab(0x223),_0x44daab(0x213)+_0x5b28ce+_0x44daab(0x21f),_0x44daab(0x1c4));}if(!isJsonObject(_0x39c415))throw notificationError(_0x44daab(0x223),_0x44daab(0x213)+_0x5b28ce+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x39c415,_0x2a74c7);}export function projectNotificationListConfig(_0x4ea650,_0xa24ed9){const _0xf68613=a197_0x51c123;return{'id':typeof _0x4ea650['id']===_0xf68613(0x206)?_0x4ea650['id']:null,'configCode':requireResponseString(_0x4ea650['configCode'],_0xf68613(0x1f6),_0xa24ed9),'configName':requireResponseString(_0x4ea650[_0xf68613(0x219)],'configName',_0xa24ed9),'channelType':requireResponseString(_0x4ea650[_0xf68613(0x1f9)],_0xf68613(0x1f9),_0xa24ed9),'description':normalizeNullableString(_0x4ea650[_0xf68613(0x209)]),'createTime':normalizeNullableString(_0x4ea650['createTime']),'updateTime':normalizeNullableString(_0x4ea650['updateTime'])};}export function normalizeExactNotificationConfig(_0x9f518c,_0x4158c0,_0xe90409){const _0x48f3b3=a197_0x51c123;if(!Number[_0x48f3b3(0x231)](_0x9f518c['id'])||_0x9f518c['id']!==_0x4158c0)throw notificationError(_0x48f3b3(0x20d),_0x48f3b3(0x205)+_0x4158c0+'.');if(_0x9f518c[_0x48f3b3(0x1df)]!==_0xe90409)throw notificationError(_0x48f3b3(0x20d),_0x48f3b3(0x1b5)+_0x4158c0+_0x48f3b3(0x1dd));const _0x3b5270=requireExactString(_0x9f518c[_0x48f3b3(0x219)],'configName',_0x4158c0),_0x4e34ab=requireExactString(_0x9f518c[_0x48f3b3(0x1f6)],_0x48f3b3(0x1f6),_0x4158c0),_0xf6750c=requireExactString(_0x9f518c[_0x48f3b3(0x1f9)],_0x48f3b3(0x1f9),_0x4158c0);if(!NOTIFICATION_CHANNEL_TYPES[_0x48f3b3(0x1c2)](_0xf6750c))throw notificationError(_0x48f3b3(0x20d),'Notification\x20config\x20'+_0x4158c0+_0x48f3b3(0x1c8));const _0x5d3350=responseNullableString(_0x9f518c[_0x48f3b3(0x1bc)],_0x48f3b3(0x1bc),_0x4158c0),_0x254f23=responseNullableString(_0x9f518c[_0x48f3b3(0x221)],_0x48f3b3(0x221),_0x4158c0),_0x3d5b5a=responseNullableString(_0x9f518c[_0x48f3b3(0x209)],'description',_0x4158c0),_0x588bb9=responseNullableTimeout(_0x9f518c[_0x48f3b3(0x21b)],_0x48f3b3(0x21b),_0x4158c0),_0x3ed077=responseNullableTimeout(_0x9f518c[_0x48f3b3(0x1f2)],'readTimeout',_0x4158c0);return{'id':_0x4158c0,'appCode':_0xe90409,'configCode':_0x4e34ab,'configName':_0x3b5270,'channelType':_0xf6750c,'endpointUrl':redactSensitive(_0x5d3350),'channelConfig':redactSensitive(_0x254f23),'description':_0x3d5b5a,'connectTimeout':_0x588bb9,'readTimeout':_0x3ed077,'endpointUrlRaw':_0x5d3350,'channelConfigRaw':_0x254f23};}function a197_0x62a1(_0x15ec07,_0x36259f){_0x15ec07=_0x15ec07-0x1b2;const _0x4274b5=a197_0x4274();let _0x62a16=_0x4274b5[_0x15ec07];return _0x62a16;}export async function requireExactNotificationConfig(_0x4b40fc,_0x209b56,_0x72dbb3){const _0x2497bc=a197_0x51c123;let _0x59848f;try{_0x59848f=await getNotificationChannelConfig(_0x209b56,_0x4b40fc);}catch{throw safeApiFailure(_0x72dbb3,'preflight',_0x2497bc(0x215)+_0x4b40fc+_0x2497bc(0x22c));}return normalizeExactNotificationConfig(_0x59848f,_0x209b56,_0x4b40fc);}export function projectNotificationConfig(_0x26852c){const _0x55e8a9=a197_0x51c123;return{'id':_0x26852c['id']??null,'appCode':_0x26852c[_0x55e8a9(0x1df)],'configCode':_0x26852c[_0x55e8a9(0x1f6)]??null,'configName':_0x26852c['configName'],'channelType':_0x26852c['channelType'],'endpointUrl':redactSensitive(_0x26852c['endpointUrl']),'channelConfig':redactSensitive(_0x26852c[_0x55e8a9(0x221)]),'description':_0x26852c[_0x55e8a9(0x209)]??null,'connectTimeout':_0x26852c[_0x55e8a9(0x21b)]??null,'readTimeout':_0x26852c[_0x55e8a9(0x1f2)]??null};}export function notificationSelector(_0x486d53){const _0x1bf32f=a197_0x51c123;return{'appCode':_0x486d53['appCode'],'id':_0x486d53['id'],'configCode':_0x486d53[_0x1bf32f(0x1f6)],'configName':_0x486d53[_0x1bf32f(0x219)],'channelType':_0x486d53[_0x1bf32f(0x1f9)]};}export function createMutationInput(_0x31c74d,_0xfacbc5){const _0x34ec5f=a197_0x51c123;return{'appCode':_0x31c74d,'configName':_0xfacbc5['configName'],'channelType':_0xfacbc5[_0x34ec5f(0x1f9)],...hasOwn(_0xfacbc5,_0x34ec5f(0x1bc))?{'endpointUrl':_0xfacbc5['endpointUrl']}:{},...hasOwn(_0xfacbc5,_0x34ec5f(0x221))?{'channelConfig':serializeChannelConfig(_0xfacbc5[_0x34ec5f(0x221)])}:{},...hasOwn(_0xfacbc5,_0x34ec5f(0x209))?{'description':_0xfacbc5[_0x34ec5f(0x209)]}:{},...hasOwn(_0xfacbc5,_0x34ec5f(0x21b))?{'connectTimeout':_0xfacbc5['connectTimeout']}:{},...hasOwn(_0xfacbc5,_0x34ec5f(0x1f2))?{'readTimeout':_0xfacbc5[_0x34ec5f(0x1f2)]}:{}};}export function mergeUpdateInput(_0x57fff1,_0x5888c1){const _0x54ec22=a197_0x51c123;return{'id':_0x57fff1['id'],'appCode':_0x57fff1['appCode'],'configName':_0x5888c1[_0x54ec22(0x219)]??_0x57fff1[_0x54ec22(0x219)],'channelType':_0x5888c1[_0x54ec22(0x1f9)]??_0x57fff1[_0x54ec22(0x1f9)],'endpointUrl':hasOwn(_0x5888c1,_0x54ec22(0x1bc))?_0x5888c1['endpointUrl']:_0x57fff1[_0x54ec22(0x1f3)],'channelConfig':hasOwn(_0x5888c1,_0x54ec22(0x221))?serializeChannelConfig(_0x5888c1[_0x54ec22(0x221)]):_0x57fff1[_0x54ec22(0x1c1)],'description':hasOwn(_0x5888c1,'description')?_0x5888c1[_0x54ec22(0x209)]:_0x57fff1[_0x54ec22(0x209)],'connectTimeout':hasOwn(_0x5888c1,_0x54ec22(0x21b))?_0x5888c1[_0x54ec22(0x21b)]:_0x57fff1['connectTimeout'],'readTimeout':hasOwn(_0x5888c1,'readTimeout')?_0x5888c1[_0x54ec22(0x1f2)]:_0x57fff1[_0x54ec22(0x1f2)]};}export function plannedUpdateProjection(_0x81e93e,_0x1763f0){const _0x546d4a=a197_0x51c123;return projectNotificationConfig({'id':_0x81e93e['id'],'appCode':_0x81e93e['appCode'],'configCode':_0x81e93e[_0x546d4a(0x1f6)],'configName':_0x1763f0[_0x546d4a(0x219)]??_0x81e93e[_0x546d4a(0x219)],'channelType':_0x1763f0['channelType']??_0x81e93e[_0x546d4a(0x1f9)],'endpointUrl':hasOwn(_0x1763f0,'endpointUrl')?_0x1763f0[_0x546d4a(0x1bc)]:_0x81e93e['endpointUrlRaw'],'channelConfig':hasOwn(_0x1763f0,'channelConfig')?_0x1763f0['channelConfig']:_0x81e93e['channelConfigRaw'],'description':hasOwn(_0x1763f0,'description')?_0x1763f0[_0x546d4a(0x209)]:_0x81e93e[_0x546d4a(0x209)],'connectTimeout':hasOwn(_0x1763f0,_0x546d4a(0x21b))?_0x1763f0[_0x546d4a(0x21b)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x81e93e['connectTimeout'],'readTimeout':hasOwn(_0x1763f0,_0x546d4a(0x1f2))?_0x1763f0[_0x546d4a(0x1f2)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x81e93e[_0x546d4a(0x1f2)]});}export function requestedSafeFieldsMatch(_0x134dd8,_0xefbe8f,_0x4bd6b8){const _0x415bdd=a197_0x51c123,_0x2d2d78=[],_0x335d5f=[],_0x339cee=[];for(const _0x3e07cb of['configName',_0x415bdd(0x1f9),_0x415bdd(0x209)]){if(!hasOwn(_0x4bd6b8,_0x3e07cb))continue;_0x339cee[_0x415bdd(0x1d1)](_0x3e07cb),_0x2d2d78[_0x415bdd(0x1d1)](_0xefbe8f[_0x3e07cb]===_0x4bd6b8[_0x3e07cb]),_0x335d5f['push'](_0x134dd8[_0x3e07cb]!==_0x4bd6b8[_0x3e07cb]&&_0xefbe8f[_0x3e07cb]===_0x4bd6b8[_0x3e07cb]);}for(const _0x2eea37 of[_0x415bdd(0x21b),_0x415bdd(0x1f2)]){if(!hasOwn(_0x4bd6b8,_0x2eea37))continue;const _0x33f261=_0x4bd6b8[_0x2eea37]??(_0x2eea37==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x339cee[_0x415bdd(0x1d1)](_0x2eea37),_0x2d2d78[_0x415bdd(0x1d1)](_0xefbe8f[_0x2eea37]===_0x33f261),_0x335d5f[_0x415bdd(0x1d1)](_0x134dd8[_0x2eea37]!==_0x33f261&&_0xefbe8f[_0x2eea37]===_0x33f261);}return hasOwn(_0x4bd6b8,_0x415bdd(0x1bc))&&_0x4bd6b8[_0x415bdd(0x1bc)]===null&&(_0x339cee['push'](_0x415bdd(0x1b9)),_0x2d2d78[_0x415bdd(0x1d1)](_0xefbe8f[_0x415bdd(0x1f3)]===null||_0xefbe8f['endpointUrlRaw']===''),_0x335d5f['push'](_0x134dd8[_0x415bdd(0x1f3)]!==null&&_0x134dd8[_0x415bdd(0x1f3)]!==''&&(_0xefbe8f['endpointUrlRaw']===null||_0xefbe8f[_0x415bdd(0x1f3)]===''))),{'allMatch':_0x2d2d78[_0x415bdd(0x1ef)](Boolean),'provesChange':_0x335d5f[_0x415bdd(0x1bf)](Boolean),'verifiedFields':_0x339cee};}export function validateNotificationDeleteReadback(_0x1be10c,_0x2ffe17,_0x323636){const _0x1304e4=a197_0x51c123;for(const [_0x1cbe8e,_0x166f5e]of _0x1be10c[_0x1304e4(0x1da)]()){if(!Number['isSafeInteger'](_0x166f5e['id'])||_0x166f5e['id']<=0x0)throw notificationError(_0x1304e4(0x20d),'Notification\x20config\x20list\x20item\x20'+(_0x1cbe8e+0x1)+_0x1304e4(0x1fa));if(_0x166f5e[_0x1304e4(0x1df)]!==_0x2ffe17)throw notificationError(_0x1304e4(0x20d),_0x1304e4(0x211)+(_0x1cbe8e+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x166f5e[_0x1304e4(0x1f9)]!==_0x323636)throw notificationError(_0x1304e4(0x20d),_0x1304e4(0x211)+(_0x1cbe8e+0x1)+_0x1304e4(0x1dc));}}export function safeApiFailure(_0x4ea72c,_0x12c234,_0x588760){const _0x20a6e9=a197_0x51c123;return notificationError(_0x20a6e9(0x1b7)+_0x4ea72c+'_'+(_0x12c234===_0x20a6e9(0x212)?_0x20a6e9(0x1b2):_0x12c234+_0x20a6e9(0x1c0)),_0x20a6e9(0x1b5)+_0x4ea72c+'\x20'+_0x12c234+'\x20failed.',_0x588760);}export function notificationLookupCommand(_0x385255,_0x312d69){const _0x56493a=a197_0x51c123;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x385255+_0x56493a(0x21a)+_0x312d69+_0x56493a(0x1ee);}function validateNotificationDocument(_0x10c11d,_0x109733){const _0x41db8e=a197_0x51c123;for(const _0x745da of Object[_0x41db8e(0x1f7)](_0x10c11d)){if(FORBIDDEN_IDENTITY_FIELDS[_0x41db8e(0x1ce)](_0x745da))throw notificationError('notification_config_field_forbidden',_0x41db8e(0x1f5)+_0x745da+_0x41db8e(0x201));if(!ALLOWED_INPUT_FIELDS['has'](_0x745da))throw notificationError(_0x41db8e(0x1e3),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x745da+'\x22.');}if(_0x109733===_0x41db8e(0x22a)&&Object[_0x41db8e(0x1f7)](_0x10c11d)[_0x41db8e(0x1db)]===0x0)throw notificationError(_0x41db8e(0x1e9),_0x41db8e(0x1b8));const _0x1f5eaf={};if(hasOwn(_0x10c11d,_0x41db8e(0x219)))_0x1f5eaf[_0x41db8e(0x219)]=validateRequiredString(_0x10c11d[_0x41db8e(0x219)],_0x41db8e(0x219),0x80);else{if(_0x109733==='create')throw notificationError('notification_config_field_required',_0x41db8e(0x226)+_0x41db8e(0x1e8));}if(hasOwn(_0x10c11d,_0x41db8e(0x1f9))){if(typeof _0x10c11d[_0x41db8e(0x1f9)]!==_0x41db8e(0x1e2))throw invalidFieldType(_0x41db8e(0x1f9),'a\x20supported\x20string');const _0x334c56=_0x10c11d[_0x41db8e(0x1f9)][_0x41db8e(0x1bd)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x334c56))throw notificationError(_0x41db8e(0x1c9),_0x41db8e(0x20e),_0x41db8e(0x1d0)+NOTIFICATION_CHANNEL_TYPES[_0x41db8e(0x1c6)](',\x20')+'.');_0x1f5eaf['channelType']=_0x334c56;}else{if(_0x109733===_0x41db8e(0x203))throw notificationError(_0x41db8e(0x20f),'Create\x20JSON\x20requires\x20field\x20'+_0x41db8e(0x1c7));}for(const [_0x2b33c1,_0xc53402]of[['endpointUrl',0x200],['description',0x100]]){if(!hasOwn(_0x10c11d,_0x2b33c1))continue;const _0x55a76e=_0x10c11d[_0x2b33c1];if(_0x55a76e!==null&&typeof _0x55a76e!==_0x41db8e(0x1e2))throw invalidFieldType(_0x2b33c1,_0x41db8e(0x1e0));if(typeof _0x55a76e===_0x41db8e(0x1e2)&&_0x55a76e['length']>_0xc53402)throw notificationError('notification_config_field_invalid',_0x41db8e(0x1f5)+_0x2b33c1+'\x22\x20cannot\x20exceed\x20'+_0xc53402+_0x41db8e(0x1cb));_0x1f5eaf[_0x2b33c1]=_0x55a76e;}if(hasOwn(_0x10c11d,_0x41db8e(0x221))){const _0x44aa33=_0x10c11d[_0x41db8e(0x221)];if(_0x44aa33===null&&_0x109733==='create')throw invalidFieldType('channelConfig',_0x41db8e(0x22d));if(_0x44aa33!==null&&!isJsonObject(_0x44aa33))throw invalidFieldType(_0x41db8e(0x221),_0x109733===_0x41db8e(0x22a)?_0x41db8e(0x1c5):_0x41db8e(0x22d));_0x44aa33!==null&&validateChannelConfigFields(_0x1f5eaf[_0x41db8e(0x1f9)],_0x44aa33),_0x1f5eaf['channelConfig']=_0x44aa33;}for(const _0x327437 of[_0x41db8e(0x21b),'readTimeout']){if(!hasOwn(_0x10c11d,_0x327437))continue;const _0x566a9e=_0x10c11d[_0x327437];if(_0x566a9e!==null&&(!Number[_0x41db8e(0x231)](_0x566a9e)||_0x566a9e<0x0))throw notificationError(_0x41db8e(0x1c9),_0x41db8e(0x1f5)+_0x327437+_0x41db8e(0x21c));_0x1f5eaf[_0x327437]=_0x566a9e;}return _0x1f5eaf;}function validateRequiredString(_0x2faba1,_0x3d1072,_0x53b380){const _0x234d52=a197_0x51c123;if(typeof _0x2faba1!==_0x234d52(0x1e2))throw invalidFieldType(_0x3d1072,_0x234d52(0x1d3));const _0x26fc17=_0x2faba1[_0x234d52(0x1bd)]();if(!_0x26fc17)throw notificationError(_0x234d52(0x1c9),_0x234d52(0x1f5)+_0x3d1072+_0x234d52(0x227));if(_0x26fc17['length']>_0x53b380)throw notificationError(_0x234d52(0x1c9),'Notification\x20JSON\x20field\x20\x22'+_0x3d1072+'\x22\x20cannot\x20exceed\x20'+_0x53b380+_0x234d52(0x1cb));return _0x26fc17;}function validateChannelConfigFields(_0x10a28c,_0x224d20){const _0x24c5b3=a197_0x51c123;if(hasOwn(_0x224d20,_0x24c5b3(0x1cc)))throw forbiddenChannelConfigField(_0x24c5b3(0x1cc));if(_0x10a28c==='EMAIL')for(const _0x1017c9 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x224d20,_0x1017c9))throw forbiddenChannelConfigField(_0x1017c9);}}function a197_0x4274(){const _0x149b54=['Allowed\x20values:\x20','push','isArray','a\x20non-empty\x20string','emailTargets','Notification\x20JSON\x20channelConfig\x20field\x20\x22','subjectPrefix','384306NVEBkc','Notification\x20JSON\x20source\x20is\x20ambiguous.','WECOM','entries','length','\x20has\x20an\x20invalid\x20channelType.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','60194cMCbmo','appCode','a\x20string\x20or\x20null','file','string','notification_config_field_unknown','utf8','Invalid\x20notification\x20config\x20response.','Missing\x20notification\x20JSON\x20source.','apiError','\x22configName\x22.','notification_config_update_empty','kind','channelCode','EMAIL','str','\x20--format\x20compress','every','ccList','11MXKlfx','readTimeout','endpointUrlRaw','DINGTALK','Notification\x20JSON\x20field\x20\x22','configCode','keys','5492123LmxKNQ','channelType','\x20has\x20an\x20invalid\x20id.','notification_config_channel_field_forbidden','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','bccList','\x20has\x20invalid\x20field\x20\x22','boolean','Application-level\x20notification\x20config\x20ID','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','24ecMucg','create','hasOwnProperty','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','number','\x22\x20must\x20be\x20','yes','description','env','type','35635RjMkJK','notification_config_response_invalid','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','notification_config_field_required','call','Notification\x20config\x20list\x20item\x20','mutation','Notification\x20JSON\x20from\x20','2624124TLCLyC','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_confirmation_required','\x22\x20is\x20forbidden.','3VSWjnN','configName','\x20--type\x20','connectTimeout','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','bool','FEISHU','\x20is\x20invalid.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','channelConfig','setEncoding','notification_config_json_invalid','path','notification_config_source_unavailable','Create\x20JSON\x20requires\x20field\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','474LxUXgm','name','update','Item\x20','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','a\x20JSON\x20object','fromName','14383100JFQcLH','\x20is\x20missing\x20required\x20field\x20\x22','isSafeInteger','validation','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','failed','notification_config_id_invalid','from-env','Notification\x20config\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','notification_config_','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','endpointUrl:null','dry-run','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','endpointUrl','trim','replyTo','some','_unavailable','channelConfigRaw','includes','prototype','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','a\x20JSON\x20object\x20or\x20null','join','\x22channelType\x22.','\x20has\x20an\x20unsupported\x20channelType.','notification_config_field_invalid','stdin','\x20characters.','messageTemplate','728685qgMcJg','has','num'];a197_0x4274=function(){return _0x149b54;};return a197_0x4274();}function forbiddenChannelConfigField(_0x225109){const _0x436835=a197_0x51c123;return notificationError(_0x436835(0x1fb),_0x436835(0x1d5)+_0x225109+_0x436835(0x217));}function invalidFieldType(_0x39cf6d,_0x13f003){const _0x3409ca=a197_0x51c123;return notificationError(_0x3409ca(0x1c9),'Notification\x20JSON\x20field\x20\x22'+_0x39cf6d+_0x3409ca(0x207)+_0x13f003+'.');}function serializeChannelConfig(_0x2a9283){return _0x2a9283===null||_0x2a9283===undefined?null:JSON['stringify'](_0x2a9283);}function redactSensitive(_0x47fe8b){return _0x47fe8b===null||_0x47fe8b===undefined||_0x47fe8b===''?null:'<redacted>';}function requireResponseString(_0x5dff04,_0x5b567f,_0x248aa7){const _0x2db123=a197_0x51c123;if(typeof _0x5dff04!==_0x2db123(0x1e2)||_0x5dff04[_0x2db123(0x1bd)]()==='')throw CliErrors[_0x2db123(0x1e7)](_0x2db123(0x1e5),_0x2db123(0x22b)+(_0x248aa7+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x5b567f+'\x22.');return _0x5dff04[_0x2db123(0x1bd)]();}function requireExactString(_0x36f3b5,_0x1646ca,_0x284e7c){const _0x33b135=a197_0x51c123;if(typeof _0x36f3b5!==_0x33b135(0x1e2)||_0x36f3b5[_0x33b135(0x1bd)]()==='')throw notificationError(_0x33b135(0x20d),_0x33b135(0x1b5)+_0x284e7c+_0x33b135(0x230)+_0x1646ca+'\x22.');return _0x36f3b5[_0x33b135(0x1bd)]();}function responseNullableString(_0x2e2cf2,_0x830c28,_0x28de90){const _0x2cbe36=a197_0x51c123;if(_0x2e2cf2===undefined||_0x2e2cf2===null)return null;if(typeof _0x2e2cf2!==_0x2cbe36(0x1e2))throw notificationError(_0x2cbe36(0x20d),_0x2cbe36(0x1b5)+_0x28de90+_0x2cbe36(0x1fe)+_0x830c28+'\x22.');return _0x2e2cf2;}function responseNullableTimeout(_0x234b8c,_0x3e3f11,_0x51b6e9){const _0x5ec9a1=a197_0x51c123;if(_0x234b8c===undefined||_0x234b8c===null)return null;if(!Number['isSafeInteger'](_0x234b8c)||_0x234b8c<0x0)throw notificationError(_0x5ec9a1(0x20d),'Notification\x20config\x20'+_0x51b6e9+_0x5ec9a1(0x1fe)+_0x3e3f11+'\x22.');return _0x234b8c;}function normalizeNullableString(_0x3c5e2f){return typeof _0x3c5e2f==='string'?_0x3c5e2f:null;}function isJsonObject(_0x2f4e1f){const _0x5dd8ae=a197_0x51c123;return _0x2f4e1f!==null&&typeof _0x2f4e1f==='object'&&!Array[_0x5dd8ae(0x1d2)](_0x2f4e1f);}function hasOwn(_0x302d4c,_0x1d4caf){const _0x1b1538=a197_0x51c123;return Object[_0x1b1538(0x1c3)][_0x1b1538(0x204)][_0x1b1538(0x210)](_0x302d4c,_0x1d4caf);}async function readStdin(){const _0x28eb53=a197_0x51c123;let _0x145d64='';process[_0x28eb53(0x1ca)][_0x28eb53(0x222)](_0x28eb53(0x1e4));for await(const _0x3119ba of process[_0x28eb53(0x1ca)])_0x145d64+=_0x3119ba;return _0x145d64;}
|
|
1
|
+
const a197_0x3a257c=a197_0x9b03;(function(_0x282698,_0x2d789f){const _0x40a5b2=a197_0x9b03,_0x673f4e=_0x282698();while(!![]){try{const _0x599557=parseInt(_0x40a5b2(0x1ee))/0x1*(parseInt(_0x40a5b2(0x1b7))/0x2)+parseInt(_0x40a5b2(0x1f9))/0x3+parseInt(_0x40a5b2(0x1ac))/0x4+parseInt(_0x40a5b2(0x1eb))/0x5+parseInt(_0x40a5b2(0x1dd))/0x6+-parseInt(_0x40a5b2(0x1ca))/0x7+parseInt(_0x40a5b2(0x1f1))/0x8*(-parseInt(_0x40a5b2(0x1b4))/0x9);if(_0x599557===_0x2d789f)break;else _0x673f4e['push'](_0x673f4e['shift']());}catch(_0x2efc86){_0x673f4e['push'](_0x673f4e['shift']());}}}(a197_0x428e,0x6817b));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_0x3a257c(0x1b0),a197_0x3a257c(0x1e4),'DINGTALK',a197_0x3a257c(0x210),a197_0x3a257c(0x1f2)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x3a257c(0x20b),a197_0x3a257c(0x205),a197_0x3a257c(0x1ff),a197_0x3a257c(0x1e1),a197_0x3a257c(0x1bf),'connectTimeout',a197_0x3a257c(0x1aa)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x3a257c(0x1c7),a197_0x3a257c(0x1cf),a197_0x3a257c(0x1bd)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x3a257c(0x1b5),a197_0x3a257c(0x1bc),'ccList',a197_0x3a257c(0x1ae),a197_0x3a257c(0x21d),a197_0x3a257c(0x1d8),a197_0x3a257c(0x212),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x3a257c(0x1c2),'type':a197_0x3a257c(0x1d2),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a197_0x3a257c(0x227),'required':![],'default':![],'description':a197_0x3a257c(0x215)},{'name':a197_0x3a257c(0x207),'type':a197_0x3a257c(0x1d2),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x3a257c(0x1ea),'required':!![],'description':a197_0x3a257c(0x21f)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a197_0x9b03(_0x54db44,_0x11acaf){_0x54db44=_0x54db44-0x1a8;const _0x428e5d=a197_0x428e();let _0x9b03a5=_0x428e5d[_0x54db44];return _0x9b03a5;}export function notificationError(_0x570205,_0x35f2fd,_0x8a7ef2){return new CliError(_0x570205,0x1,_0x35f2fd,_0x8a7ef2);}export function readNotificationId(_0x4d59ca){const _0x5ef6d7=a197_0x3a257c,_0x14fccc=_0x4d59ca[_0x5ef6d7(0x213)]('id');if(!Number[_0x5ef6d7(0x208)](_0x14fccc)||_0x14fccc<=0x0)throw notificationError(_0x5ef6d7(0x211),_0x5ef6d7(0x218));return _0x14fccc;}export function requireNotificationExplicitYes(_0x1df13){const _0x4ea272=a197_0x3a257c;if(_0x1df13[_0x4ea272(0x1f0)](_0x4ea272(0x1c4))||_0x1df13[_0x4ea272(0x1f0)]('yes'))return;throw notificationError('notification_config_confirmation_required',_0x4ea272(0x1f5),_0x4ea272(0x20a));}export function readNotificationChannelType(_0x4e1b55,_0x60dca4='type',_0x5bcd13=a197_0x3a257c(0x1b0)){const _0x578b1d=a197_0x3a257c,_0x60608c=_0x4e1b55[_0x578b1d(0x209)](_0x60dca4)[_0x578b1d(0x1ce)]()||_0x5bcd13;if(!NOTIFICATION_CHANNEL_TYPES[_0x578b1d(0x1f8)](_0x60608c))throw CliErrors[_0x578b1d(0x1e6)]('Invalid\x20--'+_0x60dca4+':\x20'+_0x60608c,_0x578b1d(0x1d1)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x60608c;}export function assertSingleNotificationSource(_0x13e5e1){const _0x223aef=a197_0x3a257c,_0x595646=[],_0x5c5f4b=_0x13e5e1[_0x223aef(0x209)]('file')[_0x223aef(0x1ce)]();if(_0x5c5f4b)_0x595646[_0x223aef(0x20f)]({'kind':_0x223aef(0x1c2),'path':_0x5c5f4b});if(_0x13e5e1[_0x223aef(0x1f0)](_0x223aef(0x221)))_0x595646[_0x223aef(0x20f)]({'kind':'stdin'});const _0x15ffa1=_0x13e5e1[_0x223aef(0x209)](_0x223aef(0x207))[_0x223aef(0x1ce)]();if(_0x15ffa1)_0x595646[_0x223aef(0x20f)]({'kind':_0x223aef(0x1ed),'name':_0x15ffa1});if(_0x595646[_0x223aef(0x20e)]===0x0)throw CliErrors['validation'](_0x223aef(0x1b2),_0x223aef(0x1bb));if(_0x595646['length']>0x1)throw CliErrors[_0x223aef(0x1e6)](_0x223aef(0x1b6),_0x223aef(0x1bb));return _0x595646[0x0];}export async function readNotificationDocument(_0xb2022,_0x11f6c3){const _0x2b226c=a197_0x3a257c,_0x699147=assertSingleNotificationSource(_0xb2022),_0x17fd4b=_0x699147[_0x2b226c(0x203)]===_0x2b226c(0x1c2)?_0x2b226c(0x1e2)+_0x699147['path']:_0x699147['kind']==='env'?'environment\x20variable\x20'+_0x699147[_0x2b226c(0x1be)]:_0x2b226c(0x221);let _0x172fcd;try{if(_0x699147[_0x2b226c(0x203)]===_0x2b226c(0x1c2))_0x172fcd=await readFile(_0x699147['path'],_0x2b226c(0x1da));else{if(_0x699147[_0x2b226c(0x203)]===_0x2b226c(0x1ed)){if(!(_0x699147[_0x2b226c(0x1be)]in process.env))throw notificationError(_0x2b226c(0x1dc),_0x2b226c(0x1cb)+_0x699147[_0x2b226c(0x1be)]);_0x172fcd=process.env[_0x699147.name]??'';}else _0x172fcd=await readStdin();}}catch(_0x2d3d52){if(_0x2d3d52 instanceof CliError)throw _0x2d3d52;throw notificationError(_0x2b226c(0x1dc),_0x2b226c(0x224)+_0x17fd4b+'.');}let _0x4dc53e;try{_0x4dc53e=JSON[_0x2b226c(0x1f3)](_0x172fcd);}catch{throw notificationError(_0x2b226c(0x1e7),_0x2b226c(0x20c)+_0x17fd4b+_0x2b226c(0x1a8),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x4dc53e))throw notificationError('notification_config_json_invalid',_0x2b226c(0x20c)+_0x17fd4b+_0x2b226c(0x1e9));return validateNotificationDocument(_0x4dc53e,_0x11f6c3);}export function projectNotificationListConfig(_0x22f0d7,_0x5717fb){const _0x1e2c12=a197_0x3a257c;return{'id':typeof _0x22f0d7['id']==='number'?_0x22f0d7['id']:null,'configCode':requireResponseString(_0x22f0d7[_0x1e2c12(0x1cf)],_0x1e2c12(0x1cf),_0x5717fb),'configName':requireResponseString(_0x22f0d7[_0x1e2c12(0x20b)],_0x1e2c12(0x20b),_0x5717fb),'channelType':requireResponseString(_0x22f0d7[_0x1e2c12(0x205)],_0x1e2c12(0x205),_0x5717fb),'description':normalizeNullableString(_0x22f0d7[_0x1e2c12(0x1bf)]),'createTime':normalizeNullableString(_0x22f0d7[_0x1e2c12(0x1d5)]),'updateTime':normalizeNullableString(_0x22f0d7[_0x1e2c12(0x1f4)])};}export function normalizeExactNotificationConfig(_0x22d09d,_0x3edc0e,_0x4e633d){const _0x431fc1=a197_0x3a257c;if(!Number[_0x431fc1(0x208)](_0x22d09d['id'])||_0x22d09d['id']!==_0x3edc0e)throw notificationError(_0x431fc1(0x1e0),_0x431fc1(0x202)+_0x3edc0e+'.');if(_0x22d09d[_0x431fc1(0x1c7)]!==_0x4e633d)throw notificationError(_0x431fc1(0x1e0),_0x431fc1(0x222)+_0x3edc0e+_0x431fc1(0x20d));const _0x45c577=requireExactString(_0x22d09d[_0x431fc1(0x20b)],_0x431fc1(0x20b),_0x3edc0e),_0x2219d3=requireExactString(_0x22d09d[_0x431fc1(0x1cf)],_0x431fc1(0x1cf),_0x3edc0e),_0xe1d738=requireExactString(_0x22d09d[_0x431fc1(0x205)],_0x431fc1(0x205),_0x3edc0e);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0xe1d738))throw notificationError(_0x431fc1(0x1e0),_0x431fc1(0x222)+_0x3edc0e+_0x431fc1(0x1d7));const _0x14a25f=responseNullableString(_0x22d09d['endpointUrl'],'endpointUrl',_0x3edc0e),_0x3d2868=responseNullableString(_0x22d09d[_0x431fc1(0x1e1)],_0x431fc1(0x1e1),_0x3edc0e),_0x594ab4=responseNullableString(_0x22d09d[_0x431fc1(0x1bf)],_0x431fc1(0x1bf),_0x3edc0e),_0x55bcd1=responseNullableTimeout(_0x22d09d[_0x431fc1(0x228)],_0x431fc1(0x228),_0x3edc0e),_0x3c7268=responseNullableTimeout(_0x22d09d[_0x431fc1(0x1aa)],_0x431fc1(0x1aa),_0x3edc0e);return{'id':_0x3edc0e,'appCode':_0x4e633d,'configCode':_0x2219d3,'configName':_0x45c577,'channelType':_0xe1d738,'endpointUrl':redactSensitive(_0x14a25f),'channelConfig':redactSensitive(_0x3d2868),'description':_0x594ab4,'connectTimeout':_0x55bcd1,'readTimeout':_0x3c7268,'endpointUrlRaw':_0x14a25f,'channelConfigRaw':_0x3d2868};}export async function requireExactNotificationConfig(_0x47fb46,_0xd77b8,_0x31eec1){const _0x96b7f6=a197_0x3a257c;let _0x149f31;try{_0x149f31=await getNotificationChannelConfig(_0xd77b8,_0x47fb46);}catch{throw safeApiFailure(_0x31eec1,_0x96b7f6(0x226),_0x96b7f6(0x1c3)+_0x47fb46+_0x96b7f6(0x206));}return normalizeExactNotificationConfig(_0x149f31,_0xd77b8,_0x47fb46);}export function projectNotificationConfig(_0x4cd98b){const _0x116825=a197_0x3a257c;return{'id':_0x4cd98b['id']??null,'appCode':_0x4cd98b[_0x116825(0x1c7)],'configCode':_0x4cd98b[_0x116825(0x1cf)]??null,'configName':_0x4cd98b[_0x116825(0x20b)],'channelType':_0x4cd98b[_0x116825(0x205)],'endpointUrl':redactSensitive(_0x4cd98b[_0x116825(0x1ff)]),'channelConfig':redactSensitive(_0x4cd98b[_0x116825(0x1e1)]),'description':_0x4cd98b[_0x116825(0x1bf)]??null,'connectTimeout':_0x4cd98b['connectTimeout']??null,'readTimeout':_0x4cd98b['readTimeout']??null};}export function notificationSelector(_0x19f2d0){const _0x63c90=a197_0x3a257c;return{'appCode':_0x19f2d0[_0x63c90(0x1c7)],'id':_0x19f2d0['id'],'configCode':_0x19f2d0[_0x63c90(0x1cf)],'configName':_0x19f2d0[_0x63c90(0x20b)],'channelType':_0x19f2d0['channelType']};}export function createMutationInput(_0x14833a,_0x151e26){const _0xd0dba8=a197_0x3a257c;return{'appCode':_0x14833a,'configName':_0x151e26[_0xd0dba8(0x20b)],'channelType':_0x151e26['channelType'],...hasOwn(_0x151e26,_0xd0dba8(0x1ff))?{'endpointUrl':_0x151e26[_0xd0dba8(0x1ff)]}:{},...hasOwn(_0x151e26,_0xd0dba8(0x1e1))?{'channelConfig':serializeChannelConfig(_0x151e26[_0xd0dba8(0x1e1)])}:{},...hasOwn(_0x151e26,'description')?{'description':_0x151e26[_0xd0dba8(0x1bf)]}:{},...hasOwn(_0x151e26,'connectTimeout')?{'connectTimeout':_0x151e26[_0xd0dba8(0x228)]}:{},...hasOwn(_0x151e26,_0xd0dba8(0x1aa))?{'readTimeout':_0x151e26[_0xd0dba8(0x1aa)]}:{}};}export function mergeUpdateInput(_0x1e9687,_0x5e18a0){const _0x4e1353=a197_0x3a257c;return{'id':_0x1e9687['id'],'appCode':_0x1e9687['appCode'],'configName':_0x5e18a0[_0x4e1353(0x20b)]??_0x1e9687['configName'],'channelType':_0x5e18a0['channelType']??_0x1e9687[_0x4e1353(0x205)],'endpointUrl':hasOwn(_0x5e18a0,_0x4e1353(0x1ff))?_0x5e18a0[_0x4e1353(0x1ff)]:_0x1e9687['endpointUrlRaw'],'channelConfig':hasOwn(_0x5e18a0,_0x4e1353(0x1e1))?serializeChannelConfig(_0x5e18a0[_0x4e1353(0x1e1)]):_0x1e9687[_0x4e1353(0x1d3)],'description':hasOwn(_0x5e18a0,_0x4e1353(0x1bf))?_0x5e18a0[_0x4e1353(0x1bf)]:_0x1e9687[_0x4e1353(0x1bf)],'connectTimeout':hasOwn(_0x5e18a0,_0x4e1353(0x228))?_0x5e18a0[_0x4e1353(0x228)]:_0x1e9687[_0x4e1353(0x228)],'readTimeout':hasOwn(_0x5e18a0,_0x4e1353(0x1aa))?_0x5e18a0[_0x4e1353(0x1aa)]:_0x1e9687[_0x4e1353(0x1aa)]};}export function plannedUpdateProjection(_0xf5f14b,_0x4f7fd3){const _0x549968=a197_0x3a257c;return projectNotificationConfig({'id':_0xf5f14b['id'],'appCode':_0xf5f14b[_0x549968(0x1c7)],'configCode':_0xf5f14b[_0x549968(0x1cf)],'configName':_0x4f7fd3[_0x549968(0x20b)]??_0xf5f14b['configName'],'channelType':_0x4f7fd3['channelType']??_0xf5f14b['channelType'],'endpointUrl':hasOwn(_0x4f7fd3,'endpointUrl')?_0x4f7fd3[_0x549968(0x1ff)]:_0xf5f14b[_0x549968(0x1c1)],'channelConfig':hasOwn(_0x4f7fd3,'channelConfig')?_0x4f7fd3[_0x549968(0x1e1)]:_0xf5f14b['channelConfigRaw'],'description':hasOwn(_0x4f7fd3,_0x549968(0x1bf))?_0x4f7fd3[_0x549968(0x1bf)]:_0xf5f14b[_0x549968(0x1bf)],'connectTimeout':hasOwn(_0x4f7fd3,_0x549968(0x228))?_0x4f7fd3[_0x549968(0x228)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0xf5f14b[_0x549968(0x228)],'readTimeout':hasOwn(_0x4f7fd3,_0x549968(0x1aa))?_0x4f7fd3[_0x549968(0x1aa)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0xf5f14b[_0x549968(0x1aa)]});}export function requestedSafeFieldsMatch(_0x4ccbb1,_0x48872e,_0x38ac42){const _0xc4de20=a197_0x3a257c,_0x168280=[],_0x2199bd=[],_0x3731d2=[];for(const _0x3cef59 of[_0xc4de20(0x20b),_0xc4de20(0x205),'description']){if(!hasOwn(_0x38ac42,_0x3cef59))continue;_0x3731d2[_0xc4de20(0x20f)](_0x3cef59),_0x168280[_0xc4de20(0x20f)](_0x48872e[_0x3cef59]===_0x38ac42[_0x3cef59]),_0x2199bd[_0xc4de20(0x20f)](_0x4ccbb1[_0x3cef59]!==_0x38ac42[_0x3cef59]&&_0x48872e[_0x3cef59]===_0x38ac42[_0x3cef59]);}for(const _0x51b8a6 of['connectTimeout',_0xc4de20(0x1aa)]){if(!hasOwn(_0x38ac42,_0x51b8a6))continue;const _0x1ab5f6=_0x38ac42[_0x51b8a6]??(_0x51b8a6===_0xc4de20(0x228)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x3731d2[_0xc4de20(0x20f)](_0x51b8a6),_0x168280[_0xc4de20(0x20f)](_0x48872e[_0x51b8a6]===_0x1ab5f6),_0x2199bd[_0xc4de20(0x20f)](_0x4ccbb1[_0x51b8a6]!==_0x1ab5f6&&_0x48872e[_0x51b8a6]===_0x1ab5f6);}return hasOwn(_0x38ac42,'endpointUrl')&&_0x38ac42[_0xc4de20(0x1ff)]===null&&(_0x3731d2[_0xc4de20(0x20f)](_0xc4de20(0x21a)),_0x168280[_0xc4de20(0x20f)](_0x48872e['endpointUrlRaw']===null||_0x48872e[_0xc4de20(0x1c1)]===''),_0x2199bd['push'](_0x4ccbb1[_0xc4de20(0x1c1)]!==null&&_0x4ccbb1[_0xc4de20(0x1c1)]!==''&&(_0x48872e['endpointUrlRaw']===null||_0x48872e['endpointUrlRaw']===''))),{'allMatch':_0x168280[_0xc4de20(0x1c0)](Boolean),'provesChange':_0x2199bd[_0xc4de20(0x1b3)](Boolean),'verifiedFields':_0x3731d2};}export function validateNotificationDeleteReadback(_0x178df0,_0x3eeccc,_0xa8a5f0){const _0x32aa86=a197_0x3a257c;for(const [_0x260f67,_0x887a7]of _0x178df0[_0x32aa86(0x1af)]()){if(!Number['isSafeInteger'](_0x887a7['id'])||_0x887a7['id']<=0x0)throw notificationError(_0x32aa86(0x1e0),_0x32aa86(0x1c8)+(_0x260f67+0x1)+_0x32aa86(0x219));if(_0x887a7[_0x32aa86(0x1c7)]!==_0x3eeccc)throw notificationError(_0x32aa86(0x1e0),'Notification\x20config\x20list\x20item\x20'+(_0x260f67+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x887a7['channelType']!==_0xa8a5f0)throw notificationError(_0x32aa86(0x1e0),_0x32aa86(0x1c8)+(_0x260f67+0x1)+_0x32aa86(0x1db));}}export function safeApiFailure(_0x334a88,_0x5acdf1,_0x4e42e4){const _0x233c6e=a197_0x3a257c;return notificationError(_0x233c6e(0x1b9)+_0x334a88+'_'+(_0x5acdf1===_0x233c6e(0x1d9)?_0x233c6e(0x1e5):_0x5acdf1+'_unavailable'),_0x233c6e(0x222)+_0x334a88+'\x20'+_0x5acdf1+_0x233c6e(0x1fb),_0x4e42e4);}export function notificationLookupCommand(_0x45909d,_0x380dcb){const _0x72cca5=a197_0x3a257c;return _0x72cca5(0x216)+_0x45909d+'\x20--type\x20'+_0x380dcb+'\x20--format\x20compress';}function a197_0x428e(){const _0x596792=['\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','notification_config_response_invalid','channelConfig','file\x20','notification_config_field_required','FEISHU','failed','validation','notification_config_json_invalid','has','\x20must\x20be\x20an\x20object.','number','2953945feIDRL','notification_config_field_unknown','env','1xfdAcs','Notification\x20JSON\x20field\x20\x22','bool','80vUSimh','WEBHOOK','parse','updateTime','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','setEncoding','notification_config_update_empty','includes','2524743xtHWaO','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','\x20failed.','Create\x20JSON\x20requires\x20field\x20','\x22configName\x22.','\x20characters.','endpointUrl','isArray','notification_config_field_invalid','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','kind','keys','channelType','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','from-env','isSafeInteger','str','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','configName','Notification\x20JSON\x20from\x20','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','length','push','WECOM','notification_config_id_invalid','fromName','num','create','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','rabetbase\x20notification\x20config-list\x20--appcode\x20','a\x20JSON\x20object\x20or\x20null','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20has\x20an\x20invalid\x20id.','endpointUrl:null','\x22channelType\x22.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','replyTo','\x20is\x20missing\x20required\x20field\x20\x22','Application-level\x20notification\x20config\x20ID','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','stdin','Notification\x20config\x20','a\x20string\x20or\x20null','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20has\x20invalid\x20field\x20\x22','preflight','boolean','connectTimeout','\x20is\x20invalid.','notification_config_field_forbidden','readTimeout','<redacted>','2058680xUGiXj','stringify','bccList','entries','EMAIL','update','Missing\x20notification\x20JSON\x20source.','some','1581642FJtWwK','emailTargets','Notification\x20JSON\x20source\x20is\x20ambiguous.','5092MVuRBd','hasOwnProperty','notification_config_','\x22\x20cannot\x20exceed\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','recipients','channelCode','name','description','every','endpointUrlRaw','file','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','dry-run','\x22\x20is\x20forbidden.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','appCode','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20channelConfig\x20field\x20\x22','2702287JDfbUi','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','a\x20supported\x20string','apiError','trim','configCode','Unknown\x20notification\x20JSON\x20field\x20\x22','Allowed\x20values:\x20','string','channelConfigRaw','object','createTime','join','\x20has\x20an\x20unsupported\x20channelType.','subjectPrefix','mutation','utf8','\x20has\x20an\x20invalid\x20channelType.','notification_config_source_unavailable','3721188HFRSWz','messageTemplate'];a197_0x428e=function(){return _0x596792;};return a197_0x428e();}function validateNotificationDocument(_0x19cf90,_0x141c4b){const _0x4ea985=a197_0x3a257c;for(const _0x39d457 of Object[_0x4ea985(0x204)](_0x19cf90)){if(FORBIDDEN_IDENTITY_FIELDS[_0x4ea985(0x1e8)](_0x39d457))throw notificationError(_0x4ea985(0x1a9),'Notification\x20JSON\x20field\x20\x22'+_0x39d457+_0x4ea985(0x1df));if(!ALLOWED_INPUT_FIELDS[_0x4ea985(0x1e8)](_0x39d457))throw notificationError(_0x4ea985(0x1ec),_0x4ea985(0x1d0)+_0x39d457+'\x22.');}if(_0x141c4b==='update'&&Object[_0x4ea985(0x204)](_0x19cf90)['length']===0x0)throw notificationError(_0x4ea985(0x1f7),_0x4ea985(0x1fa));const _0x318ba4={};if(hasOwn(_0x19cf90,'configName'))_0x318ba4[_0x4ea985(0x20b)]=validateRequiredString(_0x19cf90[_0x4ea985(0x20b)],_0x4ea985(0x20b),0x80);else{if(_0x141c4b===_0x4ea985(0x214))throw notificationError(_0x4ea985(0x1e3),_0x4ea985(0x1fc)+_0x4ea985(0x1fd));}if(hasOwn(_0x19cf90,_0x4ea985(0x205))){if(typeof _0x19cf90[_0x4ea985(0x205)]!=='string')throw invalidFieldType(_0x4ea985(0x205),_0x4ea985(0x1cc));const _0xcf15f5=_0x19cf90[_0x4ea985(0x205)][_0x4ea985(0x1ce)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x4ea985(0x1f8)](_0xcf15f5))throw notificationError(_0x4ea985(0x201),_0x4ea985(0x220),_0x4ea985(0x1d1)+NOTIFICATION_CHANNEL_TYPES[_0x4ea985(0x1d6)](',\x20')+'.');_0x318ba4['channelType']=_0xcf15f5;}else{if(_0x141c4b==='create')throw notificationError(_0x4ea985(0x1e3),_0x4ea985(0x1fc)+_0x4ea985(0x21b));}for(const [_0x561950,_0x349e7e]of[[_0x4ea985(0x1ff),0x200],[_0x4ea985(0x1bf),0x100]]){if(!hasOwn(_0x19cf90,_0x561950))continue;const _0x389b39=_0x19cf90[_0x561950];if(_0x389b39!==null&&typeof _0x389b39!==_0x4ea985(0x1d2))throw invalidFieldType(_0x561950,_0x4ea985(0x223));if(typeof _0x389b39==='string'&&_0x389b39[_0x4ea985(0x20e)]>_0x349e7e)throw notificationError(_0x4ea985(0x201),_0x4ea985(0x1ef)+_0x561950+_0x4ea985(0x1ba)+_0x349e7e+_0x4ea985(0x1fe));_0x318ba4[_0x561950]=_0x389b39;}if(hasOwn(_0x19cf90,_0x4ea985(0x1e1))){const _0x321d74=_0x19cf90['channelConfig'];if(_0x321d74===null&&_0x141c4b===_0x4ea985(0x214))throw invalidFieldType(_0x4ea985(0x1e1),'a\x20JSON\x20object');if(_0x321d74!==null&&!isJsonObject(_0x321d74))throw invalidFieldType(_0x4ea985(0x1e1),_0x141c4b===_0x4ea985(0x1b1)?_0x4ea985(0x217):'a\x20JSON\x20object');_0x321d74!==null&&validateChannelConfigFields(_0x318ba4[_0x4ea985(0x205)],_0x321d74),_0x318ba4[_0x4ea985(0x1e1)]=_0x321d74;}for(const _0x5cbef3 of[_0x4ea985(0x228),_0x4ea985(0x1aa)]){if(!hasOwn(_0x19cf90,_0x5cbef3))continue;const _0x4647d2=_0x19cf90[_0x5cbef3];if(_0x4647d2!==null&&(!Number['isSafeInteger'](_0x4647d2)||_0x4647d2<0x0))throw notificationError('notification_config_field_invalid',_0x4ea985(0x1ef)+_0x5cbef3+_0x4ea985(0x1c6));_0x318ba4[_0x5cbef3]=_0x4647d2;}return _0x318ba4;}function validateRequiredString(_0x57523a,_0x15eeb0,_0xdc474f){const _0x345c90=a197_0x3a257c;if(typeof _0x57523a!==_0x345c90(0x1d2))throw invalidFieldType(_0x15eeb0,'a\x20non-empty\x20string');const _0x2233fc=_0x57523a[_0x345c90(0x1ce)]();if(!_0x2233fc)throw notificationError(_0x345c90(0x201),'Notification\x20JSON\x20field\x20\x22'+_0x15eeb0+_0x345c90(0x21c));if(_0x2233fc[_0x345c90(0x20e)]>_0xdc474f)throw notificationError(_0x345c90(0x201),_0x345c90(0x1ef)+_0x15eeb0+'\x22\x20cannot\x20exceed\x20'+_0xdc474f+'\x20characters.');return _0x2233fc;}function validateChannelConfigFields(_0x349b81,_0x2cf8fc){const _0x3073b3=a197_0x3a257c;if(hasOwn(_0x2cf8fc,_0x3073b3(0x1de)))throw forbiddenChannelConfigField(_0x3073b3(0x1de));if(_0x349b81===_0x3073b3(0x1b0))for(const _0x82b57 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x2cf8fc,_0x82b57))throw forbiddenChannelConfigField(_0x82b57);}}function forbiddenChannelConfigField(_0x551771){const _0xda743=a197_0x3a257c;return notificationError('notification_config_channel_field_forbidden',_0xda743(0x1c9)+_0x551771+_0xda743(0x1c5));}function invalidFieldType(_0x2c417a,_0x2bcabe){const _0xfad11a=a197_0x3a257c;return notificationError(_0xfad11a(0x201),_0xfad11a(0x1ef)+_0x2c417a+'\x22\x20must\x20be\x20'+_0x2bcabe+'.');}function serializeChannelConfig(_0x3c3099){const _0x53ce2e=a197_0x3a257c;return _0x3c3099===null||_0x3c3099===undefined?null:JSON[_0x53ce2e(0x1ad)](_0x3c3099);}function redactSensitive(_0x4269a0){const _0x181f49=a197_0x3a257c;return _0x4269a0===null||_0x4269a0===undefined||_0x4269a0===''?null:_0x181f49(0x1ab);}function requireResponseString(_0x47af15,_0xd3470d,_0x35af52){const _0x11800a=a197_0x3a257c;if(typeof _0x47af15!==_0x11800a(0x1d2)||_0x47af15[_0x11800a(0x1ce)]()==='')throw CliErrors[_0x11800a(0x1cd)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x35af52+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0xd3470d+'\x22.');return _0x47af15[_0x11800a(0x1ce)]();}function requireExactString(_0x3999bb,_0x1c815d,_0x3333bd){const _0x42c52b=a197_0x3a257c;if(typeof _0x3999bb!==_0x42c52b(0x1d2)||_0x3999bb[_0x42c52b(0x1ce)]()==='')throw notificationError(_0x42c52b(0x1e0),_0x42c52b(0x222)+_0x3333bd+_0x42c52b(0x21e)+_0x1c815d+'\x22.');return _0x3999bb[_0x42c52b(0x1ce)]();}function responseNullableString(_0x346eeb,_0x499ae0,_0xe7fb6){const _0x656dbf=a197_0x3a257c;if(_0x346eeb===undefined||_0x346eeb===null)return null;if(typeof _0x346eeb!=='string')throw notificationError(_0x656dbf(0x1e0),_0x656dbf(0x222)+_0xe7fb6+_0x656dbf(0x225)+_0x499ae0+'\x22.');return _0x346eeb;}function responseNullableTimeout(_0x11698a,_0x2b263a,_0x3ab3e6){const _0x26ceb3=a197_0x3a257c;if(_0x11698a===undefined||_0x11698a===null)return null;if(!Number[_0x26ceb3(0x208)](_0x11698a)||_0x11698a<0x0)throw notificationError('notification_config_response_invalid',_0x26ceb3(0x222)+_0x3ab3e6+_0x26ceb3(0x225)+_0x2b263a+'\x22.');return _0x11698a;}function normalizeNullableString(_0x34800b){const _0x1f7795=a197_0x3a257c;return typeof _0x34800b===_0x1f7795(0x1d2)?_0x34800b:null;}function isJsonObject(_0x229388){const _0xd77b27=a197_0x3a257c;return _0x229388!==null&&typeof _0x229388===_0xd77b27(0x1d4)&&!Array[_0xd77b27(0x200)](_0x229388);}function hasOwn(_0x23aaf3,_0x25424d){const _0x30b955=a197_0x3a257c;return Object['prototype'][_0x30b955(0x1b8)]['call'](_0x23aaf3,_0x25424d);}async function readStdin(){const _0xd94bfc=a197_0x3a257c;let _0x3730e4='';process['stdin'][_0xd94bfc(0x1f6)](_0xd94bfc(0x1da));for await(const _0x47a5a8 of process[_0xd94bfc(0x221)])_0x3730e4+=_0x47a5a8;return _0x3730e4;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x23687c=a198_0x26ee;(function(_0x57e3c6,_0x24a426){const _0x9d2f65=a198_0x26ee,_0x42175b=_0x57e3c6();while(!![]){try{const _0xbd952=parseInt(_0x9d2f65(0xa9))/0x1*(parseInt(_0x9d2f65(0x91))/0x2)+parseInt(_0x9d2f65(0x8a))/0x3*(-parseInt(_0x9d2f65(0x94))/0x4)+parseInt(_0x9d2f65(0x74))/0x5*(-parseInt(_0x9d2f65(0x86))/0x6)+-parseInt(_0x9d2f65(0xac))/0x7*(parseInt(_0x9d2f65(0x9c))/0x8)+-parseInt(_0x9d2f65(0x99))/0x9+parseInt(_0x9d2f65(0x73))/0xa+parseInt(_0x9d2f65(0x8b))/0xb*(parseInt(_0x9d2f65(0x88))/0xc);if(_0xbd952===_0x24a426)break;else _0x42175b['push'](_0x42175b['shift']());}catch(_0x5af864){_0x42175b['push'](_0x42175b['shift']());}}}(a198_0xb425,0xa650e));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a198_0x26ee(_0x1872eb,_0x4cce46){_0x1872eb=_0x1872eb-0x71;const _0xb42580=a198_0xb425();let _0x26ee41=_0xb42580[_0x1872eb];return _0x26ee41;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a198_0x23687c(0x92),'general','form',a198_0x23687c(0x83)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x23687c(0x7c),'general':a198_0x23687c(0x78),'form':a198_0x23687c(0x8c),'idCard':'IdCard'},SCENE_FLAG={'name':a198_0x23687c(0x77),'type':a198_0x23687c(0x97),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x23687c(0xaa)},IMAGE_FILE_FLAG={'name':a198_0x23687c(0x76),'type':a198_0x23687c(0x97),'description':a198_0x23687c(0xa0)},IMAGE_URL_FLAG={'name':a198_0x23687c(0x8e),'type':a198_0x23687c(0x97),'description':a198_0x23687c(0x93)};function a198_0xb425(){const _0x4a7111=['383654fLkQoC','invoice','Publicly\x20accessible\x20image\x20or\x20file\x20URL','3516bWFKzy','str','toLowerCase','string','recognize','7854795PxghNj','form','/smartapi/common/queryFileUrl','3288752rAxsNA','path','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','\x20OCR','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','fileUrl','imageUrl','/smartapi/ocr/recognize-text?','Unsupported\x20OCR\x20scene:\x20','Preview:\x20recognize\x20','length','File\x20URL\x20response\x20missing\x20fileUrl.','.\x20Supported\x20scenes:\x20','1XYpOAZ','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','7QARgph','trim','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','8055540vjhPQW','1545ghnDrW','POST','image-file','scene','General','GET','toString','\x20OCR\x20from\x20URL','Invoice','validation','filePath','ocr','/smartapi/common/uploadFile','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','imageFile','idCard','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','apiError','4920HFRICc','appCode','21414204LgrtwD','idcard','1923FfzrJH','11IjMOvq','Table','join','image-url','File\x20upload\x20response\x20missing\x20filePath.','read'];a198_0xb425=function(){return _0x4a7111;};return a198_0xb425();}function normalizeScene(_0x250632){const _0x58d562=a198_0x23687c,_0x4b6738=_0x250632[_0x58d562(0x71)]()[_0x58d562(0x96)]();if(_0x4b6738===_0x58d562(0x89))return'idCard';if(_0x4b6738===_0x58d562(0x92)||_0x4b6738==='general'||_0x4b6738===_0x58d562(0x9a))return _0x4b6738;throw CliErrors[_0x58d562(0x7d)](_0x58d562(0xa4)+_0x250632+_0x58d562(0xa8)+SUPPORTED_SCENES[_0x58d562(0x8d)](',\x20'));}function selectedInputs(_0x25f991){const _0xd813ee=a198_0x23687c,_0x273b7f=_0x25f991[_0xd813ee(0x95)](_0xd813ee(0x76))[_0xd813ee(0x71)](),_0x2c260d=_0x25f991['str']('image-url')[_0xd813ee(0x71)]();return{'imageFile':_0x273b7f,'imageUrl':_0x2c260d,'count':[_0x273b7f,_0x2c260d]['filter'](Boolean)[_0xd813ee(0xa6)]};}function validateInputSelection(_0x52168e){const _0x150eb9=a198_0x23687c,_0x4e03f5=selectedInputs(_0x52168e);if(_0x4e03f5['count']!==0x1)throw CliErrors[_0x150eb9(0x7d)](_0x150eb9(0x9e));return _0x4e03f5;}function withScene(_0x2b7e63,_0x209528,_0x15c503){const _0x1ffa35=a198_0x23687c;return{..._0x2b7e63,'scene':_0x209528,..._0x15c503?{'sourceFile':{'fileName':_0x15c503['fileName'],'filePath':_0x15c503[_0x1ffa35(0x7e)]}}:{}};}const ocrRecognize={'service':a198_0x23687c(0x7f),'command':a198_0x23687c(0x98),'description':a198_0x23687c(0x72),'risk':a198_0x23687c(0x90),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x51dafd){const _0x304769=a198_0x23687c,_0x27fa3f=normalizeScene(_0x51dafd['str'](_0x304769(0x77))),_0x3c0a4f=SCENE_TO_LEGACY_TYPE[_0x27fa3f],_0x5af008=validateInputSelection(_0x51dafd);if(_0x5af008[_0x304769(0xa2)]){const _0x22a472=new URLSearchParams({'url':_0x5af008['imageUrl'],'type':_0x3c0a4f,'appCode':_0x51dafd[_0x304769(0x87)]});return{'method':'GET','url':_0x304769(0xa3)+_0x22a472[_0x304769(0x7a)](),'description':_0x304769(0xa5)+_0x27fa3f+_0x304769(0x7b)};}const _0x321204=requireDevelopmentUploadFile(_0x5af008[_0x304769(0x82)],_0x304769(0x76));return{'method':_0x304769(0x75),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x304769(0x75),'url':_0x304769(0x80),'body':{'appCode':_0x51dafd[_0x304769(0x87)],'multipart':{'file':_0x321204}}},{'method':_0x304769(0x75),'url':_0x304769(0x9b),'body':{'filePath':_0x304769(0x81),'downloadFlag':![]}},{'method':_0x304769(0x79),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x51dafd[_0x304769(0x87)],'url':_0x304769(0x84),'type':_0x3c0a4f}}]},'description':_0x304769(0xab)+_0x27fa3f+_0x304769(0x9f)};},async 'execute'(_0x5d9335){const _0x5de28b=a198_0x23687c,_0x137041=normalizeScene(_0x5d9335[_0x5de28b(0x95)](_0x5de28b(0x77))),_0x2db524=SCENE_TO_LEGACY_TYPE[_0x137041],_0x3c1d63=validateInputSelection(_0x5d9335);if(_0x3c1d63[_0x5de28b(0xa2)]){const _0x3e7a38=await recognizeDevelopmentOcr(_0x5d9335['appCode'],{'url':_0x3c1d63[_0x5de28b(0xa2)],'type':_0x2db524});return{'ok':!![],'data':withScene(_0x3e7a38,_0x137041)};}const _0x3b234b=requireDevelopmentUploadFile(_0x3c1d63[_0x5de28b(0x82)],_0x5de28b(0x76)),_0x39b02c=await uploadDevelopmentFile(_0x5d9335[_0x5de28b(0x87)],_0x3b234b[_0x5de28b(0x9d)]);if(!_0x39b02c[_0x5de28b(0x7e)])throw CliErrors[_0x5de28b(0x85)](_0x5de28b(0x8f));const _0x4e0fca=await queryDevelopmentFileUrl(_0x39b02c[_0x5de28b(0x7e)],{'download':![]});if(!_0x4e0fca[_0x5de28b(0xa1)])throw CliErrors[_0x5de28b(0x85)](_0x5de28b(0xa7));const _0x413179=await recognizeDevelopmentOcr(_0x5d9335['appCode'],{'url':_0x4e0fca[_0x5de28b(0xa1)],'type':_0x2db524});return{'ok':!![],'data':withScene(_0x413179,_0x137041,_0x39b02c)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a199_0x34e4(){const _0x4d2024=['6KBYuhP','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','compress','332464OifebT','BLANK','write','files','parentMenuId','keys','create','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','menuPath','../../../templates/custom-pages','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','Would\x20create\x20Custom\x20Page\x20','1130331UqtVzr','5899616zSGowA','/smartapi/webcode/page/create','number','appCode','Custom_page_','10566689IaFwmG','utf8','CUSTOM','version','DASHBOARD','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','page-content','apiError','page','240780uNRBbk','12MeFTQI','str','isInteger','6051429wYNTMr','page-dir','createMenu','Custom\x20Page\x20pattern\x20not\x20found:\x20','\x20and\x20its\x20menu\x20entry.','.json','num','220996ZuvOvI','name','trim','page-type','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','now','pageName','page.create','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','parent-menu-id','page-pattern','Invalid\x20Custom\x20Page\x20pattern:\x20','length','toLowerCase','page\x20create\x20does\x20not\x20accept\x20--page-type.','menuId','object','pageId','string','validation','includes','values'];a199_0x34e4=function(){return _0x4d2024;};return a199_0x34e4();}const a199_0x36c169=a199_0x1cb0;(function(_0xf2c3ac,_0x45233f){const _0x4fd0ba=a199_0x1cb0,_0x55a984=_0xf2c3ac();while(!![]){try{const _0x4151d4=parseInt(_0x4fd0ba(0x115))/0x1+-parseInt(_0x4fd0ba(0xec))/0x2*(-parseInt(_0x4fd0ba(0x125))/0x3)+-parseInt(_0x4fd0ba(0x116))/0x4+-parseInt(_0x4fd0ba(0x124))/0x5+parseInt(_0x4fd0ba(0x104))/0x6*(parseInt(_0x4fd0ba(0x11b))/0x7)+-parseInt(_0x4fd0ba(0x107))/0x8+-parseInt(_0x4fd0ba(0x128))/0x9;if(_0x4151d4===_0x45233f)break;else _0x55a984['push'](_0x55a984['shift']());}catch(_0x5300f5){_0x55a984['push'](_0x55a984['shift']());}}}(a199_0x34e4,0xce433));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';function a199_0x1cb0(_0x4d84f8,_0x1ed216){_0x4d84f8=_0x4d84f8-0xec;const _0x34e4ee=a199_0x34e4();let _0x1cb0b2=_0x34e4ee[_0x4d84f8];return _0x1cb0b2;}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_0x36c169(0x108),'ONEPAGE',a199_0x36c169(0x11f)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a199_0x36c169(0x112));export const pageCreate={'service':a199_0x36c169(0x123),'command':a199_0x36c169(0x10d),'description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':a199_0x36c169(0x109),'defaultOutputFormat':a199_0x36c169(0x106),'structuredErrors':!![],'rejectedFlags':[{'name':a199_0x36c169(0xef),'message':a199_0x36c169(0xfc),'hint':a199_0x36c169(0x113)},{'name':a199_0x36c169(0x121),'message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a199_0x36c169(0x10f)}],'flags':[{'name':a199_0x36c169(0xed),'type':a199_0x36c169(0x100),'description':a199_0x36c169(0xf0)},{'name':a199_0x36c169(0xf7),'type':a199_0x36c169(0x118),'description':a199_0x36c169(0xf1)},{'name':a199_0x36c169(0xf8),'type':a199_0x36c169(0x100),'description':a199_0x36c169(0xf6),'enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0x36c169(0x129),'type':a199_0x36c169(0x100),'description':a199_0x36c169(0x120)},APPCODE_FLAG],async 'validate'(_0x55699f){await readValidatedPageSource(_0x55699f);},async 'dryRun'(_0x15c429){const _0x57af17=a199_0x36c169,_0xfd04d3=readInput(_0x15c429,await readValidatedPageSource(_0x15c429));return{'method':'POST','url':_0x57af17(0x117),'body':{'appCode':_0xfd04d3[_0x57af17(0x119)],'pageName':_0xfd04d3[_0x57af17(0xf3)],..._0xfd04d3[_0x57af17(0x10b)]!=null?{'parentMenuId':_0xfd04d3[_0x57af17(0x10b)]}:{},'createMenu':_0xfd04d3[_0x57af17(0x12a)],'codeContent':_0xfd04d3[_0x57af17(0x10a)]},'description':_0x57af17(0x114)+JSON['stringify'](_0xfd04d3['pageName'])+_0x57af17(0x12c)};},async 'execute'(_0x1505ce){const _0x412077=a199_0x36c169,_0x4fcc1c=readInput(_0x1505ce,await readValidatedPageSource(_0x1505ce)),_0x208c62=await createCustomPage(_0x4fcc1c);if(!Number[_0x412077(0x127)](_0x208c62[_0x412077(0xff)])||_0x208c62[_0x412077(0xff)]<=0x0)throw CliErrors[_0x412077(0x122)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x5790ef=buildCustomPageDevelopmentUrl(_0x4fcc1c[_0x412077(0x119)],_0x208c62[_0x412077(0x111)]),_0x76d52d=buildCustomPageEditUrl(_0x4fcc1c[_0x412077(0x119)],_0x208c62[_0x412077(0xff)]);return{'ok':!![],'data':{'operation':_0x412077(0xf4),'pageType':_0x412077(0x11d),'pagePattern':readPagePattern(_0x1505ce),'selector':{'appCode':_0x4fcc1c['appCode'],'pageName':_0x4fcc1c[_0x412077(0xf3)]},'before':null,'after':{'pageId':_0x208c62[_0x412077(0xff)],'pageName':_0x208c62[_0x412077(0xf3)],'appCode':_0x208c62[_0x412077(0x119)],'version':_0x208c62[_0x412077(0x11e)],'menuId':_0x208c62[_0x412077(0xfd)],'menuPath':_0x208c62[_0x412077(0x111)],'files':_0x208c62[_0x412077(0x10a)]??Object['keys'](_0x4fcc1c[_0x412077(0x10a)])},'dryRun':![],'request':_0x4fcc1c,..._0x5790ef?{'pageUrl':_0x5790ef}:{},..._0x76d52d?{'editPageUrl':_0x76d52d}:{},'warnings':_0x5790ef?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':'Created\x20Custom\x20Page\x20'+_0x208c62[_0x412077(0xff)]+'.'};}};function readPagePattern(_0x2a9736){const _0x1da48a=a199_0x36c169,_0x52486f=_0x2a9736[_0x1da48a(0x126)](_0x1da48a(0xf8))[_0x1da48a(0xee)](),_0xcf2680=_0x2a9736[_0x1da48a(0x126)]('page-dir')[_0x1da48a(0xee)]();if(_0x52486f&&_0xcf2680)throw CliErrors['validation'](_0x1da48a(0xf5));if(_0xcf2680)return null;if(!_0x52486f)throw CliErrors[_0x1da48a(0x101)](_0x1da48a(0x10e));if(!CUSTOM_PAGE_PATTERNS[_0x1da48a(0x102)](_0x52486f))throw CliErrors[_0x1da48a(0x101)]('--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.');return _0x52486f;}async function readPageSource(_0x83aa66){const _0x1fdc69=a199_0x36c169,_0x3c7889=_0x83aa66[_0x1fdc69(0x126)]('page-dir')[_0x1fdc69(0xee)](),_0x9537ee=readPagePattern(_0x83aa66);if(_0x9537ee===null){const _0x62e8f=await readCustomPageDirectory(_0x3c7889);if(Object[_0x1fdc69(0x10c)](_0x62e8f)[_0x1fdc69(0xfa)]===0x0)throw CliErrors[_0x1fdc69(0x101)](_0x1fdc69(0x110));return _0x62e8f;}let _0x4f076d;try{_0x4f076d=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x9537ee[_0x1fdc69(0xfb)]()+_0x1fdc69(0x12d)),_0x1fdc69(0x11c));}catch{throw CliErrors[_0x1fdc69(0x101)](_0x1fdc69(0x12b)+_0x9537ee+'.');}let _0x3bf29a;try{_0x3bf29a=JSON['parse'](_0x4f076d);}catch{throw CliErrors[_0x1fdc69(0x101)](_0x1fdc69(0xf9)+_0x9537ee+'.');}if(!_0x3bf29a||typeof _0x3bf29a!==_0x1fdc69(0xfe)||Array['isArray'](_0x3bf29a)||Object[_0x1fdc69(0x103)](_0x3bf29a)['some'](_0x21c010=>typeof _0x21c010!==_0x1fdc69(0x100)))throw CliErrors[_0x1fdc69(0x101)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x9537ee+'.');return _0x3bf29a;}async function readValidatedPageSource(_0x5c7bdc){const _0xd02377=await readPageSource(_0x5c7bdc);return await validateCustomPageContent(_0xd02377),_0xd02377;}function readInput(_0x279373,_0x51b096){const _0x4015c4=a199_0x36c169,_0x46c093=_0x279373[_0x4015c4(0x126)](_0x4015c4(0xed))[_0x4015c4(0xee)]()||_0x4015c4(0x11a)+Date[_0x4015c4(0xf2)]();if(_0x46c093['length']>0x64)throw CliErrors[_0x4015c4(0x101)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0xabed60=_0x279373[_0x4015c4(0x12e)](_0x4015c4(0xf7),NaN),_0x54a3d4=!Number['isNaN'](_0xabed60);if(_0x54a3d4&&(!Number[_0x4015c4(0x127)](_0xabed60)||_0xabed60<=0x0))throw CliErrors[_0x4015c4(0x101)](_0x4015c4(0x105));return{'appCode':_0x279373['appCode'],'pageName':_0x46c093,..._0x54a3d4?{'parentMenuId':_0xabed60}:{},'createMenu':!![],'files':_0x51b096};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0xdc7219=a200_0x2254;(function(_0x124878,_0x54d489){const _0x1c6b4a=a200_0x2254,_0x163005=_0x124878();while(!![]){try{const _0x2ef9cf=parseInt(_0x1c6b4a(0x154))/0x1+-parseInt(_0x1c6b4a(0x15e))/0x2*(-parseInt(_0x1c6b4a(0x150))/0x3)+-parseInt(_0x1c6b4a(0x15b))/0x4*(parseInt(_0x1c6b4a(0x14a))/0x5)+-parseInt(_0x1c6b4a(0x158))/0x6+parseInt(_0x1c6b4a(0x162))/0x7+parseInt(_0x1c6b4a(0x149))/0x8*(-parseInt(_0x1c6b4a(0x159))/0x9)+-parseInt(_0x1c6b4a(0x15f))/0xa*(-parseInt(_0x1c6b4a(0x157))/0xb);if(_0x2ef9cf===_0x54d489)break;else _0x163005['push'](_0x163005['shift']());}catch(_0x28c05c){_0x163005['push'](_0x163005['shift']());}}}(a200_0x453a,0x944ba));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':a200_0xdc7219(0x153),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a200_0xdc7219(0x14c),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a200_0xdc7219(0x164),'required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x383570){readCustomPageId(_0x383570);},async 'execute'(_0x1c9577){const _0x2d6bde=a200_0xdc7219,_0x48313a=readCustomPageId(_0x1c9577),_0x1d5c97=await getCustomPageSource(_0x48313a),{bundle:_0x570d9d,createTime:_0x5b381f,updateTime:_0x3e97fb,..._0x4123f5}=_0x1d5c97,_0x235455=_0x1d5c97['id']??_0x48313a,_0xe72106=_0x1d5c97[_0x2d6bde(0x161)]?.['trim']()||_0x1c9577[_0x2d6bde(0x151)]('appcode')[_0x2d6bde(0x15a)](),_0x29d788=buildCustomPageRuntimeUrl(_0xe72106,_0x1d5c97[_0x2d6bde(0x155)]),_0x5884bb=buildCustomPageEditUrl(_0xe72106,_0x235455),_0x136519=await resolveCustomPageDevelopmentUrl(_0xe72106,_0x235455,_0x1c9577[_0x2d6bde(0x14f)]);return{'ok':!![],'data':{..._0x4123f5,..._0x29d788?{'runtimePageUrl':_0x29d788}:{},..._0x136519?{'pageUrl':_0x136519}:{},..._0x5884bb?{'editPageUrl':_0x5884bb}:{},..._0x5b381f==null?{}:{'createTime':formatTime(_0x5b381f)},..._0x3e97fb==null?{}:{'updateTime':formatTime(_0x3e97fb)}},'message':_0x2d6bde(0x15d)+_0x48313a+'.'};}};function formatTime(_0x2c9cbd){const _0x64b535=a200_0xdc7219,_0x58da40=new Date(_0x2c9cbd);if(Number[_0x64b535(0x14e)](_0x58da40[_0x64b535(0x15c)]()))return String(_0x2c9cbd);const _0x4fe1af=[_0x58da40[_0x64b535(0x165)](),String(_0x58da40[_0x64b535(0x156)]()+0x1)[_0x64b535(0x160)](0x2,'0'),String(_0x58da40[_0x64b535(0x14b)]())['padStart'](0x2,'0')]['join']('-'),_0x41df0b=[String(_0x58da40['getHours']())[_0x64b535(0x160)](0x2,'0'),String(_0x58da40[_0x64b535(0x163)]())[_0x64b535(0x160)](0x2,'0'),String(_0x58da40[_0x64b535(0x14d)]())['padStart'](0x2,'0')][_0x64b535(0x152)](':');return _0x4fe1af+'\x20'+_0x41df0b;}function a200_0x2254(_0x59e003,_0x6d0bd2){_0x59e003=_0x59e003-0x149;const _0x453acb=a200_0x453a();let _0x2254ad=_0x453acb[_0x59e003];return _0x2254ad;}function a200_0x453a(){const _0x1d2fc7=['cookie','1443588nQxALQ','str','join','custom-detail','122972cKcxKi','pageCode','getMonth','264dpYDOD','1512450fZhJpl','2529htLJYo','trim','571084xdFkaz','getTime','Retrieved\x20Custom\x20Page\x20','2puumRh','179590moAVec','padStart','appCode','8195026qlxFRw','getMinutes','number','getFullYear','13944INufQM','30rXQznz','getDate','read','getSeconds','isNaN'];a200_0x453a=function(){return _0x1d2fc7;};return a200_0x453a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a201_0x4f907f=a201_0x8d9f;(function(_0x24e7b1,_0x44996e){const _0x84ce09=a201_0x8d9f,_0x59e6ca=_0x24e7b1();while(!![]){try{const _0x232764=-parseInt(_0x84ce09(0x10b))/0x1+parseInt(_0x84ce09(0x107))/0x2+-parseInt(_0x84ce09(0xf7))/0x3*(parseInt(_0x84ce09(0x106))/0x4)+parseInt(_0x84ce09(0x10d))/0x5+-parseInt(_0x84ce09(0xfd))/0x6+-parseInt(_0x84ce09(0x105))/0x7+-parseInt(_0x84ce09(0xf8))/0x8*(-parseInt(_0x84ce09(0x101))/0x9);if(_0x232764===_0x44996e)break;else _0x59e6ca['push'](_0x59e6ca['shift']());}catch(_0x36c25e){_0x59e6ca['push'](_0x59e6ca['shift']());}}}(a201_0x4c6e,0x722ca));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';function a201_0x8d9f(_0x292825,_0x2a8334){_0x292825=_0x292825-0xf6;const _0x4c6ed9=a201_0x4c6e();let _0x8d9f9=_0x4c6ed9[_0x292825];return _0x8d9f9;}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';export const pageCustomList={'service':a201_0x4f907f(0xff),'command':a201_0x4f907f(0xfa),'description':a201_0x4f907f(0x10c),'risk':a201_0x4f907f(0xfb),'defaultOutputFormat':a201_0x4f907f(0x10a),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4fa004){const _0x1c2d5d=a201_0x4f907f,_0x51d4c8=(await fetchMenuSnapshot(_0x4fa004[_0x1c2d5d(0x103)],_0x4fa004['cookie']))['menus']['flatMap'](_0x16c553=>{const _0xa678a0=_0x1c2d5d;if(_0x16c553[_0xa678a0(0xf6)]!==_0xa678a0(0x109)||_0x16c553['pageId']==null)return[];const _0x4c0836=buildCustomPageDevelopmentUrl(_0x4fa004[_0xa678a0(0x103)],_0x16c553[_0xa678a0(0x102)]),_0x790df0=buildCustomPageRuntimeUrl(_0x4fa004[_0xa678a0(0x103)],_0x16c553['path']),_0x89f5ca=buildCustomPageEditUrl(_0x4fa004[_0xa678a0(0x103)],_0x16c553[_0xa678a0(0xfe)]);return[{'pageId':_0x16c553['pageId'],'label':_0x16c553[_0xa678a0(0xfc)],'path':_0x16c553[_0xa678a0(0x102)],..._0x4c0836?{'pageUrl':_0x4c0836}:{},..._0x790df0?{'runtimePageUrl':_0x790df0}:{},..._0x89f5ca?{'editPageUrl':_0x89f5ca}:{}}];});return{'ok':!![],'data':{'pages':_0x51d4c8},'message':_0x51d4c8[_0x1c2d5d(0x104)]===0x0?_0x1c2d5d(0xf9):_0x1c2d5d(0x108)+_0x51d4c8[_0x1c2d5d(0x104)]+_0x1c2d5d(0x100)};}};function a201_0x4c6e(){const _0x33aab8=['19950YujEUJ','type','9TeJCZu','8zhuFem','No\x20Custom\x20Pages\x20found.','custom-list','read','label','4738398hthdLv','pageId','page','\x20Custom\x20Page(s).','26862309EBJocp','path','appCode','length','5047742JhEwcC','1078084OuhNPv','1020790XzaRQb','Found\x20','react','compress','712026glhGxl','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app'];a201_0x4c6e=function(){return _0x33aab8;};return a201_0x4c6e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a202_0x1db5cf=a202_0x29b0;(function(_0x84539c,_0x5df27c){const _0x1326b8=a202_0x29b0,_0x259097=_0x84539c();while(!![]){try{const _0x4eade4=-parseInt(_0x1326b8(0x194))/0x1+-parseInt(_0x1326b8(0x1b2))/0x2*(parseInt(_0x1326b8(0x199))/0x3)+parseInt(_0x1326b8(0x1a4))/0x4+parseInt(_0x1326b8(0x1ad))/0x5*(-parseInt(_0x1326b8(0x18f))/0x6)+-parseInt(_0x1326b8(0x190))/0x7+parseInt(_0x1326b8(0x1b1))/0x8+-parseInt(_0x1326b8(0x1af))/0x9*(-parseInt(_0x1326b8(0x19e))/0xa);if(_0x4eade4===_0x5df27c)break;else _0x259097['push'](_0x259097['shift']());}catch(_0x2279f2){_0x259097['push'](_0x259097['shift']());}}}(a202_0x317b,0x53988));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';function a202_0x317b(){const _0x26d3b9=['FORMAL','isInteger','runtimePageUrl','appCode','Optional\x20publish\x20remark','4255yiVDKK','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','945YRmbXq','pageId','521232AHMJep','2tJkZNy','str','remark','3096qFiUNV','4338096AjbCFi','/smartapi/webcode/file/publish','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','unknown','606115ekFvUS','write','compress','push','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','1587318UcjaEK','trim','number','status','pageCode','233050sRXJzt','apiError','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','warnings','Custom\x20Page\x20ID','Would\x20publish\x20Custom\x20Page\x20','97176EFOJxq','Published\x20Custom\x20Page\x20','string','POST'];a202_0x317b=function(){return _0x26d3b9;};return a202_0x317b();}export const pageCustomPublish={'service':'page','command':'custom-publish','description':'Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','risk':a202_0x1db5cf(0x195),'defaultOutputFormat':a202_0x1db5cf(0x196),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a202_0x1db5cf(0x19b),'required':!![],'description':a202_0x1db5cf(0x1a2)},{'name':a202_0x1db5cf(0x18e),'type':a202_0x1db5cf(0x1a6),'description':a202_0x1db5cf(0x1ac)}],async 'validate'(_0x5cf8de){readCustomPageId(_0x5cf8de);},async 'dryRun'(_0x45da85){const _0x3ac119=a202_0x1db5cf,_0x58922f=readInput(_0x45da85);return{'method':_0x3ac119(0x1a7),'url':_0x3ac119(0x191),'body':{'id':_0x58922f['pageId'],..._0x58922f[_0x3ac119(0x18e)]?{'remark':_0x58922f[_0x3ac119(0x18e)]}:{}},'description':_0x3ac119(0x1a3)+_0x58922f['pageId']+'.'};},async 'execute'(_0x1fc9c5){const _0x8dc86a=a202_0x1db5cf,_0x265180=readInput(_0x1fc9c5);await getCustomPageSource(_0x265180['pageId']);const _0x317a26=await publishCustomPage(_0x265180);if(!Number[_0x8dc86a(0x1a9)](_0x317a26)||_0x317a26!==_0x265180['pageId'])throw CliErrors[_0x8dc86a(0x19f)](_0x8dc86a(0x1a0));const _0x16abcf=await getCustomPageSource(_0x265180[_0x8dc86a(0x1b0)]);if(_0x16abcf[_0x8dc86a(0x19c)]!==_0x8dc86a(0x1a8))throw CliErrors['apiError'](_0x8dc86a(0x192)+(_0x16abcf[_0x8dc86a(0x19c)]??_0x8dc86a(0x193))+'.');const _0x5424c5=_0x16abcf['appCode']?.[_0x8dc86a(0x19a)](),_0x36bda6=buildCustomPageEditUrl(_0x5424c5,_0x265180[_0x8dc86a(0x1b0)]),_0x68287e=await resolveCustomPageDevelopmentUrl(_0x5424c5,_0x265180[_0x8dc86a(0x1b0)],_0x1fc9c5['cookie']),_0x34beec=buildMutationData(_0x265180,!![],_0x68287e,_0x36bda6);_0x5424c5&&!_0x68287e&&_0x34beec[_0x8dc86a(0x1a1)][_0x8dc86a(0x197)](_0x8dc86a(0x1ae));const _0x17c863=buildCustomPageRuntimeUrl(_0x16abcf[_0x8dc86a(0x1ab)],_0x16abcf[_0x8dc86a(0x19d)]);return _0x17c863?_0x34beec[_0x8dc86a(0x1aa)]=_0x17c863:_0x34beec['warnings'][_0x8dc86a(0x197)](_0x8dc86a(0x198)),{'ok':!![],'data':_0x34beec,'message':_0x8dc86a(0x1a5)+_0x265180[_0x8dc86a(0x1b0)]+'.'};}};function readInput(_0x5ab6c0){const _0x106a30=a202_0x1db5cf,_0x39e9bd=readCustomPageId(_0x5ab6c0),_0x53f62b=_0x5ab6c0[_0x106a30(0x18d)](_0x106a30(0x18e))['trim']();return{'pageId':_0x39e9bd,..._0x53f62b?{'remark':_0x53f62b}:{}};}function a202_0x29b0(_0x32dd39,_0x2dda53){_0x32dd39=_0x32dd39-0x18d;const _0x317bb8=a202_0x317b();let _0x29b05c=_0x317bb8[_0x32dd39];return _0x29b05c;}function buildMutationData(_0x45e08a,_0x3ecb92=![],_0x4ee2da,_0x1a07a3){const _0x310c4c=a202_0x1db5cf;return{'operation':'page.custom-publish','selector':{'pageId':_0x45e08a[_0x310c4c(0x1b0)]},'before':null,'after':{'pageId':_0x45e08a['pageId'],'status':_0x310c4c(0x1a8)},'dryRun':!_0x3ecb92,'request':_0x45e08a,..._0x4ee2da?{'pageUrl':_0x4ee2da}:{},..._0x1a07a3?{'editPageUrl':_0x1a07a3}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a203_0x6a6018=a203_0xbc5e;(function(_0x64c820,_0x1c8710){const _0xf531c2=a203_0xbc5e,_0x1a388b=_0x64c820();while(!![]){try{const _0x45294c=parseInt(_0xf531c2(0x1e8))/0x1+-parseInt(_0xf531c2(0x1fc))/0x2*(-parseInt(_0xf531c2(0x1f1))/0x3)+parseInt(_0xf531c2(0x1ea))/0x4*(parseInt(_0xf531c2(0x1ec))/0x5)+parseInt(_0xf531c2(0x1fd))/0x6*(parseInt(_0xf531c2(0x1fa))/0x7)+-parseInt(_0xf531c2(0x1f0))/0x8+-parseInt(_0xf531c2(0x1ed))/0x9+-parseInt(_0xf531c2(0x1f8))/0xa;if(_0x45294c===_0x1c8710)break;else _0x1a388b['push'](_0x1a388b['shift']());}catch(_0x4e0565){_0x1a388b['push'](_0x1a388b['shift']());}}}(a203_0x4378,0x4daec));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';function a203_0xbc5e(_0x327838,_0x571161){_0x327838=_0x327838-0x1e7;const _0x437817=a203_0x4378();let _0xbc5ee0=_0x437817[_0x327838];return _0xbc5ee0;}function a203_0x4378(){const _0x76e7c9=['/pages/','map','react','pageId','file','7955580BzfjDe','join','182atJeYB','validation','93354RmRNLI','80400FTmWzP','trim','find','num','434617aHHFXy','type','1912DhxxXo','/ide/','6420eCHOAX','5648535euIeuI','--id\x20must\x20be\x20a\x20positive\x20integer.','menus','2097672pNfVif','39imbPmm','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted'];a203_0x4378=function(){return _0x76e7c9;};return a203_0x4378();}import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a203_0x6a6018(0x1f2)};function trimOptional(_0x227095){const _0x47982f=a203_0x6a6018;return _0x227095?.[_0x47982f(0x1fe)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x3a6ade,_0xa2f18b){const _0x31cd3b=trimOptional(_0x3a6ade),_0x3c5ae6=trimOptional(_0xa2f18b);if(!_0x31cd3b||!_0x3c5ae6)return undefined;return getPublishedAppDomain(_0x31cd3b)+'/'+encodeURIComponent(_0x3c5ae6);}export function buildCustomPageDevelopmentUrl(_0x2e6590,_0x21a801){const _0x2f0799=a203_0x6a6018,_0x1f18c6=trimOptional(_0x2e6590),_0x483d6b=trimOptional(_0x21a801);if(!_0x1f18c6||!_0x483d6b)return undefined;return getAppBaseUrl(_0x1f18c6)+_0x2f0799(0x1f3)+encodeURIComponent(_0x483d6b);}export async function resolveCustomPageDevelopmentUrl(_0x1f5f11,_0xb2e923,_0x401531){const _0x3630fc=a203_0x6a6018,_0x123472=trimOptional(_0x1f5f11);if(!_0x123472)return undefined;try{const _0x727109=(await fetchMenuSnapshot(_0x123472,_0x401531))[_0x3630fc(0x1ef)][_0x3630fc(0x1ff)](_0x10a868=>_0x10a868[_0x3630fc(0x1e9)]===_0x3630fc(0x1f5)&&_0x10a868[_0x3630fc(0x1f6)]===_0xb2e923);return buildCustomPageDevelopmentUrl(_0x123472,_0x727109?.['path']);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x126e64,_0x344328){const _0x47e97a=a203_0x6a6018,_0x3b44f9=trimOptional(_0x126e64);if(!_0x3b44f9)return;const _0x32e407=trimOptional(String(_0x344328??''));if(!_0x32e407)return;return getAppBaseUrl(_0x3b44f9)+_0x47e97a(0x1eb)+encodeURIComponent(_0x32e407);}export async function validateCustomPageContent(_0x1cee02){const _0xaa6450=a203_0x6a6018,_0x1ba7d8=await validateCustomPageSourceFiles(_0x1cee02);if(_0x1ba7d8['length']>0x0)throw CliErrors[_0xaa6450(0x1fb)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x1ba7d8[_0xaa6450(0x1f4)](_0x4fba63=>_0x4fba63[_0xaa6450(0x1f7)]+':\x20'+_0x4fba63['message'])[_0xaa6450(0x1f9)](';\x20'));}export function readCustomPageId(_0x2dfe72){const _0x45bb69=a203_0x6a6018,_0x1a8ae5=_0x2dfe72[_0x45bb69(0x1e7)]('id');if(!Number['isInteger'](_0x1a8ae5)||_0x1a8ae5<=0x0)throw CliErrors[_0x45bb69(0x1fb)](_0x45bb69(0x1ee));return _0x1a8ae5;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a204_0x59b1(_0x390f8d,_0x2b3f43){_0x390f8d=_0x390f8d-0xc6;const _0x24f38d=a204_0x24f3();let _0x59b189=_0x24f38d[_0x390f8d];return _0x59b189;}const a204_0x669421=a204_0x59b1;(function(_0x1a2edc,_0x212943){const _0x499f45=a204_0x59b1,_0x5d0558=_0x1a2edc();while(!![]){try{const _0x33e662=-parseInt(_0x499f45(0xdb))/0x1+parseInt(_0x499f45(0xd8))/0x2*(-parseInt(_0x499f45(0xc8))/0x3)+-parseInt(_0x499f45(0xd3))/0x4+-parseInt(_0x499f45(0xd4))/0x5+-parseInt(_0x499f45(0xc6))/0x6*(-parseInt(_0x499f45(0xc9))/0x7)+parseInt(_0x499f45(0xce))/0x8*(parseInt(_0x499f45(0xda))/0x9)+parseInt(_0x499f45(0xd6))/0xa*(parseInt(_0x499f45(0xd2))/0xb);if(_0x33e662===_0x212943)break;else _0x5d0558['push'](_0x5d0558['shift']());}catch(_0x6603cc){_0x5d0558['push'](_0x5d0558['shift']());}}}(a204_0x24f3,0x9ba9e));import{format}from'prettier';const SOURCE_PARSERS={'.js':a204_0x669421(0xc7),'.jsx':'babel','.ts':'typescript','.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=[a204_0x669421(0xdd),a204_0x669421(0xcb)];export async function validateCustomPageSourceFiles(_0x1fee54){const _0x571c43=a204_0x669421,_0x2916e1=Object[_0x571c43(0xcc)](_0x1fee54)['filter'](([_0x37d403])=>getParser(_0x37d403));if(!_0x2916e1[_0x571c43(0xca)](([_0x286338])=>isReactSourceFile(_0x286338)))return[{'file':_0x571c43(0xd7),'message':'Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx'}];const _0x1ebd75=await Promise['all'](_0x2916e1[_0x571c43(0xd9)](async([_0x26b8cd,_0x26e1f1])=>{const _0x2c59a9=_0x571c43;try{return await format(_0x26e1f1,{'parser':getParser(_0x26b8cd)}),undefined;}catch(_0xfe1347){return{'file':_0x26b8cd,'message':_0xfe1347 instanceof Error?_0xfe1347[_0x2c59a9(0xcf)]:String(_0xfe1347)};}}));return _0x1ebd75[_0x571c43(0xcd)](_0xba5bfd=>_0xba5bfd!==undefined);}function a204_0x24f3(){const _0x17b71d=['.tsx','entries','filter','16136WtwUcH','message','endsWith','toLowerCase','33DUsXaP','3776456hWrWwj','4039590DxvnZo','find','6972470oKxpOr','page\x20files','44mfqsLu','map','4581srttDs','842787ObjXts','trim','.jsx','18LKSSXP','babel','75270YeDrff','1554007aNFzze','some'];a204_0x24f3=function(){return _0x17b71d;};return a204_0x24f3();}function getParser(_0x4d53f8){const _0x188f7e=a204_0x669421,_0x594bc8=_0x4d53f8[_0x188f7e(0xdc)]()[_0x188f7e(0xd1)]();return Object['entries'](SOURCE_PARSERS)[_0x188f7e(0xd5)](([_0x4217d6])=>_0x594bc8[_0x188f7e(0xd0)](_0x4217d6))?.[0x1];}function isReactSourceFile(_0x4042bf){const _0x398fa0=a204_0x669421,_0x41550a=_0x4042bf[_0x398fa0(0xdc)]()[_0x398fa0(0xd1)]();return CUSTOM_PAGE_EXTENSIONS[_0x398fa0(0xca)](_0xfc6eae=>_0x41550a[_0x398fa0(0xd0)](_0xfc6eae));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a205_0x32683f=a205_0x3521;function a205_0x39ee(){const _0x27ab12=['trim','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','page.custom-update','2405530zzaXBP','str','16slStev','pageId','page-dir','write','492450wNGaKY','805580ifJljM','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','appCode','950463dohDPc','pageContent','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','1gWapLQ','558204EofrIO','page-content','newVersion','862365mHqXjd','10QwakJv','/smartapi/webcode/page/update/content','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','page','string','cookie','Custom\x20Page\x20ID','11157BDybxN','appcode'];a205_0x39ee=function(){return _0x27ab12;};return a205_0x39ee();}(function(_0x18531b,_0x285c98){const _0x203e12=a205_0x3521,_0x11db1c=_0x18531b();while(!![]){try{const _0x3a9ba1=parseInt(_0x203e12(0x18c))/0x1*(parseInt(_0x203e12(0x18d))/0x2)+parseInt(_0x203e12(0x17a))/0x3+-parseInt(_0x203e12(0x186))/0x4+-parseInt(_0x203e12(0x173))/0x5*(-parseInt(_0x203e12(0x185))/0x6)+-parseInt(_0x203e12(0x172))/0x7+-parseInt(_0x203e12(0x181))/0x8*(parseInt(_0x203e12(0x189))/0x9)+parseInt(_0x203e12(0x17f))/0xa;if(_0x3a9ba1===_0x285c98)break;else _0x11db1c['push'](_0x11db1c['shift']());}catch(_0x330d2a){_0x11db1c['push'](_0x11db1c['shift']());}}}(a205_0x39ee,0x250a8));function a205_0x3521(_0x412a6b,_0x2d7a21){_0x412a6b=_0x412a6b-0x171;const _0x39eea4=a205_0x39ee();let _0x3521dc=_0x39eea4[_0x412a6b];return _0x3521dc;}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':a205_0x32683f(0x176),'command':'custom-update','description':'Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','risk':a205_0x32683f(0x184),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a205_0x32683f(0x18e),'message':a205_0x32683f(0x187),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'id','type':'number','required':!![],'description':a205_0x32683f(0x179)},{'name':'page-dir','type':a205_0x32683f(0x177),'required':!![],'description':'Directory\x20containing\x20all\x20complete\x20page\x20files'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x22d601){readCustomPageId(_0x22d601),await readValidatedPageContent(_0x22d601);},async 'dryRun'(_0xc1a292){const _0xef0ce1=a205_0x32683f,_0x344c92=await readInput(_0xc1a292);return{'method':'POST','url':_0xef0ce1(0x174),'body':{'id':_0x344c92['pageId'],'codeContent':_0x344c92[_0xef0ce1(0x18a)]},'description':_0xef0ce1(0x175)+_0x344c92['pageId']+'.'};},async 'execute'(_0x20ae21){const _0x4ee73c=a205_0x32683f,_0x5a2bc4=await readInput(_0x20ae21),_0x4a1ddd=await updateCustomPageContent({'pageId':_0x5a2bc4[_0x4ee73c(0x182)],'pageContent':_0x5a2bc4['pageContent']});if(!Number['isInteger'](_0x4a1ddd[_0x4ee73c(0x171)])||_0x4a1ddd[_0x4ee73c(0x171)]<=0x0)throw CliErrors['apiError'](_0x4ee73c(0x17d));const _0x543346=buildCustomPageEditUrl(_0x5a2bc4['appCode'],_0x5a2bc4[_0x4ee73c(0x182)]),_0x4d36a6=await resolveCustomPageDevelopmentUrl(_0x5a2bc4[_0x4ee73c(0x188)],_0x5a2bc4[_0x4ee73c(0x182)],_0x20ae21[_0x4ee73c(0x178)]);return{'ok':!![],'data':{'operation':_0x4ee73c(0x17e),'selector':{'appCode':_0x5a2bc4['appCode'],'pageId':_0x5a2bc4[_0x4ee73c(0x182)]},'before':null,'after':{'pageId':_0x4a1ddd['pageId'],'version':_0x4a1ddd[_0x4ee73c(0x171)],'pageContent':_0x5a2bc4[_0x4ee73c(0x18a)]},'dryRun':![],'request':_0x5a2bc4,..._0x4d36a6?{'pageUrl':_0x4d36a6}:{},..._0x543346?{'editPageUrl':_0x543346}:{},'warnings':_0x4d36a6?[]:[_0x4ee73c(0x18b)]},'message':'Updated\x20Custom\x20Page\x20'+_0x5a2bc4[_0x4ee73c(0x182)]+'.'};}};async function readInput(_0x1a425e){const _0x194b77=a205_0x32683f,_0x55faff=readCustomPageId(_0x1a425e),_0x48fdcf=_0x1a425e[_0x194b77(0x180)](_0x194b77(0x17b))[_0x194b77(0x17c)]()||(await getCustomPageSource(_0x55faff))['appCode']?.[_0x194b77(0x17c)]();if(!_0x48fdcf)throw CliErrors['validation']('Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20'+_0x55faff+'.');return{'appCode':_0x48fdcf,'pageId':_0x55faff,'pageContent':await readValidatedPageContent(_0x1a425e)};}async function readValidatedPageContent(_0x1c55da){const _0x4805cf=a205_0x32683f,_0x1bfba4=await readCustomPageDirectory(_0x1c55da[_0x4805cf(0x180)](_0x4805cf(0x183)));return await validateCustomPageContent(_0x1bfba4),_0x1bfba4;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a206_0x5a02aa=a206_0x1083;(function(_0x344808,_0x5a9023){const _0x2e83b7=a206_0x1083,_0x5199bd=_0x344808();while(!![]){try{const _0x46bc98=parseInt(_0x2e83b7(0x1e3))/0x1*(-parseInt(_0x2e83b7(0x1e5))/0x2)+-parseInt(_0x2e83b7(0x1de))/0x3*(parseInt(_0x2e83b7(0x1f1))/0x4)+-parseInt(_0x2e83b7(0x1e2))/0x5+parseInt(_0x2e83b7(0x1e8))/0x6+parseInt(_0x2e83b7(0x1ee))/0x7+-parseInt(_0x2e83b7(0x1ef))/0x8*(-parseInt(_0x2e83b7(0x1ea))/0x9)+-parseInt(_0x2e83b7(0x1f2))/0xa;if(_0x46bc98===_0x5a9023)break;else _0x5199bd['push'](_0x5199bd['shift']());}catch(_0x3fdb14){_0x5199bd['push'](_0x5199bd['shift']());}}}(a206_0x4165,0xa19ff));function a206_0x1083(_0x5e5d9c,_0x5f0dab){_0x5e5d9c=_0x5e5d9c-0x1db;const _0x416595=a206_0x4165();let _0x10834b=_0x416595[_0x5e5d9c];return _0x10834b;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a206_0x5a02aa(0x1ec),'command':a206_0x5a02aa(0x1ed),'description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':'read','defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a206_0x5a02aa(0x1dc),'type':a206_0x5a02aa(0x1dd),'description':a206_0x5a02aa(0x1db)}],async 'validate'(_0x342448){validateDatasetSelector(_0x342448);},async 'dryRun'(_0x1b0409){const _0x566270=a206_0x5a02aa,_0x222078=await loadDatasetDetailForPage(_0x1b0409);return{'method':_0x566270(0x1e1),'url':_0x566270(0x1e4)+_0x222078[_0x566270(0x1eb)]+'/standard-page-status?appCode='+encodeURIComponent(_0x1b0409['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x222078['id'],'code':_0x222078['code'],'name':_0x222078[_0x566270(0x1df)]},'action':'query-data-list-status'})};},async 'execute'(_0x703733){const _0x400be1=a206_0x5a02aa,_0x2e2400=await loadDatasetDetailForPage(_0x703733),_0x49a8b2=await loadDataListPageStatusForGenerate(_0x703733,_0x2e2400[_0x400be1(0x1eb)]),_0x354789=getUndeletedRelatedPages(_0x2e2400),_0xc9136c=assessDataListPageState(_0x2e2400[_0x400be1(0x1eb)],_0x49a8b2,{'fallbackUndeletedPages':_0x354789});return{'ok':!![],'data':{'datasetCode':_0x2e2400[_0x400be1(0x1eb)],'precheckSource':_0x49a8b2?.['source']??_0x400be1(0x1e7),'status':_0xc9136c['status'],'manualResolutionRequired':_0xc9136c[_0x400be1(0x1f0)],'nextAction':_0xc9136c[_0x400be1(0x1e9)],'dataListPageStatus':_0x49a8b2,'relatedPages':{'total':_0x2e2400[_0x400be1(0x1e6)][_0x400be1(0x1e0)],'undeletedCount':_0x354789[_0x400be1(0x1e0)]}}};}};function a206_0x4165(){const _0x518143=['Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','alias','string','3ufxRaf','name','length','GET','2043185DWJgEP','1QQOLYV','/smartapi/lovrabet/dataset/','1091544IQofZT','relatedPages','related-pages-fallback','2594622CTsHjW','nextAction','1961793qHGRXz','code','page','data-list-status','7812399EBJvRz','32DmTihe','manualResolutionRequired','2375388AQGxoS','2101310gDKSgD'];a206_0x4165=function(){return _0x518143;};return a206_0x4165();}
|