@lovrabet/rabetbase-cli 2.5.12 → 2.5.13
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/guides/custom-page-workflow.md +32 -2
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +106 -6
- 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
- package/templates/custom-pages/blank.json +1 -1
- package/templates/custom-pages/dashboard.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a194_0x3836(){const _0x3a16a2=['1132284BuKgrK','all','string','3eyRFDY','\x20notification\x20config(s)','2488576CBQeFD','40blaRqI','577086MCrFlu','Notification\x20channel\x20type','notification','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','map','appCode','9DIdZjy','config-list','bool','length','type','Found\x20','flat','boolean','trim','985726QKKxDb','592228HOGLDv','34623610SFyrVT','2162400SevAvx','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.'];a194_0x3836=function(){return _0x3a16a2;};return a194_0x3836();}const a194_0x5170e9=a194_0x4cdf;(function(_0x533ff4,_0xcfa3f9){const _0x25f5f5=a194_0x4cdf,_0x4cddd5=_0x533ff4();while(!![]){try{const _0x29c3db=-parseInt(_0x25f5f5(0x1a5))/0x1+-parseInt(_0x25f5f5(0x1a3))/0x2*(parseInt(_0x25f5f5(0x1a1))/0x3)+parseInt(_0x25f5f5(0x19a))/0x4+-parseInt(_0x25f5f5(0x19c))/0x5+parseInt(_0x25f5f5(0x19e))/0x6+parseInt(_0x25f5f5(0x199))/0x7*(-parseInt(_0x25f5f5(0x1a4))/0x8)+-parseInt(_0x25f5f5(0x190))/0x9*(-parseInt(_0x25f5f5(0x19b))/0xa);if(_0x29c3db===_0xcfa3f9)break;else _0x4cddd5['push'](_0x4cddd5['shift']());}catch(_0x578875){_0x4cddd5['push'](_0x4cddd5['shift']());}}}(a194_0x3836,0xcd5e4));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a194_0x4cdf(_0x9ce818,_0x377225){_0x9ce818=_0x9ce818-0x18b;const _0x3836c2=a194_0x3836();let _0x4cdf68=_0x3836c2[_0x9ce818];return _0x4cdf68;}import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x5170e9(0x18c),'command':a194_0x5170e9(0x191),'description':a194_0x5170e9(0x18d),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a194_0x5170e9(0x1a0),'description':a194_0x5170e9(0x18b),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x5170e9(0x19f),'type':a194_0x5170e9(0x197),'default':![],'description':'List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type'}],async 'validate'(_0x3b6a52){const _0x1f2c37=a194_0x5170e9;if(_0x3b6a52[_0x1f2c37(0x192)](_0x1f2c37(0x19f))&&_0x3b6a52['str'](_0x1f2c37(0x194))[_0x1f2c37(0x198)]())throw CliErrors['validation'](_0x1f2c37(0x19d),'Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0x3b6a52[_0x1f2c37(0x192)]('all'))return;readNotificationChannelType(_0x3b6a52);},async 'execute'(_0x5994bf){const _0x251a3a=a194_0x5170e9;if(_0x5994bf[_0x251a3a(0x192)]('all')){const _0x282a57=await Promise['all'](NOTIFICATION_CHANNEL_TYPES['map'](_0x17d18c=>listNotificationChannelConfigs(_0x5994bf[_0x251a3a(0x18f)],_0x17d18c))),_0x55ea0d=_0x282a57[_0x251a3a(0x196)]()[_0x251a3a(0x18e)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5994bf[_0x251a3a(0x18f)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x55ea0d[_0x251a3a(0x193)],'configs':_0x55ea0d},'message':'Found\x20'+_0x55ea0d[_0x251a3a(0x193)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x3b6e2c=readNotificationChannelType(_0x5994bf),_0xb7df3e=await listNotificationChannelConfigs(_0x5994bf['appCode'],_0x3b6e2c),_0x5aac5c=_0xb7df3e[_0x251a3a(0x18e)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5994bf['appCode'],'channelType':_0x3b6e2c,'count':_0x5aac5c[_0x251a3a(0x193)],'configs':_0x5aac5c},'message':_0x251a3a(0x195)+_0x5aac5c[_0x251a3a(0x193)]+'\x20'+_0x3b6e2c+_0x251a3a(0x1a2)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a195_0x22e7(_0xcc3fb1,_0x563781){_0xcc3fb1=_0xcc3fb1-0xd2;const _0x248e8d=a195_0x248e();let _0x22e77d=_0x248e8d[_0xcc3fb1];return _0x22e77d;}const a195_0x3b5b55=a195_0x22e7;(function(_0x198c46,_0x42b4b4){const _0x163b10=a195_0x22e7,_0x4662ed=_0x198c46();while(!![]){try{const _0x16aee3=-parseInt(_0x163b10(0xd9))/0x1+-parseInt(_0x163b10(0xdd))/0x2+-parseInt(_0x163b10(0xf1))/0x3+parseInt(_0x163b10(0xf8))/0x4*(-parseInt(_0x163b10(0xed))/0x5)+-parseInt(_0x163b10(0xe2))/0x6*(-parseInt(_0x163b10(0xe3))/0x7)+-parseInt(_0x163b10(0xe0))/0x8*(parseInt(_0x163b10(0xdb))/0x9)+-parseInt(_0x163b10(0xd5))/0xa*(-parseInt(_0x163b10(0xe1))/0xb);if(_0x16aee3===_0x42b4b4)break;else _0x4662ed['push'](_0x4662ed['shift']());}catch(_0x4c021b){_0x4662ed['push'](_0x4662ed['shift']());}}}(a195_0x248e,0xba256));import{asDryRunResult}from'../../commands/common/dry-run.js';function a195_0x248e(){const _0x470dfb=['Inspect\x20ID\x20','before','10088QuKqaY','payload','Inspect\x20with\x20--id\x20','\x20via\x20','10WCwYMZ','allMatch','verified','update','1429093RIhDaj','channelType','585PsBWJk','high-risk-write','533370xonrbe','planned','patch','22440Tqvzfu','29529247TQRirp','42cWRQYX','1203041LqrTnL','Notification\x20config\x20','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','notification_config_update_outcome_unknown','/notification/channel-config/update',';\x20do\x20not\x20resubmit\x20automatically.','appCode','provesChange','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','POST','1535BUgwWd','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','notification_config_update_verification_unavailable','1418121lQSmAG','notification_config_update_verification_failed','mutation','notification','config-update'];a195_0x248e=function(){return _0x470dfb;};return a195_0x248e();}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=a195_0x3b5b55(0xe7);async function prepareUpdate(_0x38577c){const _0xfb0be1=a195_0x3b5b55,_0x46e658=readNotificationId(_0x38577c),_0x5a9142=await readNotificationDocument(_0x38577c,_0xfb0be1(0xd8)),_0x30d8f0=await requireExactNotificationConfig(_0x38577c[_0xfb0be1(0xe9)],_0x46e658,'update');return{'id':_0x46e658,'patch':_0x5a9142,'before':_0x30d8f0,'payload':mergeUpdateInput(_0x30d8f0,_0x5a9142),'planned':plannedUpdateProjection(_0x30d8f0,_0x5a9142)};}export const notificationConfigUpdate={'service':a195_0x3b5b55(0xf4),'command':a195_0x3b5b55(0xf5),'description':a195_0x3b5b55(0xeb),'risk':a195_0x3b5b55(0xdc),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4bc137){readNotificationId(_0x4bc137),assertSingleNotificationSource(_0x4bc137),requireNotificationExplicitYes(_0x4bc137);},async 'dryRun'(_0x4c54ca){const _0x165dbf=a195_0x3b5b55,_0x5bd462=await prepareUpdate(_0x4c54ca),_0x1336d2=notificationLookupCommand(_0x4c54ca[_0x165dbf(0xe9)],_0x5bd462[_0x165dbf(0xf7)][_0x165dbf(0xda)]);return asDryRunResult({'operation':_0x165dbf(0xd8),'selector':notificationSelector(_0x5bd462[_0x165dbf(0xf7)]),'before':projectNotificationConfig(_0x5bd462['before']),'after':_0x5bd462[_0x165dbf(0xde)],'dryRun':!![],'backend':{'method':_0x165dbf(0xec),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x165dbf(0xde),'lookupCommand':_0x1336d2}},{'method':_0x165dbf(0xec),'url':UPDATE_PATH});},async 'execute'(_0x190734){const _0x59f090=a195_0x3b5b55;requireNotificationExplicitYes(_0x190734);const _0x21d991=await prepareUpdate(_0x190734),_0x1593ec=notificationLookupCommand(_0x190734[_0x59f090(0xe9)],_0x21d991[_0x59f090(0xf7)]['channelType']);let _0x5db7ec=![];try{await updateNotificationChannelConfig(_0x21d991[_0x59f090(0xd2)]);}catch(_0x226ca6){if(!isPlatformTransportFailure(_0x226ca6))throw safeApiFailure(_0x59f090(0xd8),_0x59f090(0xf3),_0x59f090(0xf6)+_0x21d991['id']+'\x20with\x20'+_0x1593ec+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x5db7ec=!![];}let _0x1c7e56;try{const _0x3aded6=await getNotificationChannelConfig(_0x21d991['id'],_0x190734[_0x59f090(0xe9)]);_0x1c7e56=normalizeExactNotificationConfig(_0x3aded6,_0x21d991['id'],_0x190734[_0x59f090(0xe9)]);}catch{throw notificationError(_0x5db7ec?_0x59f090(0xe6):_0x59f090(0xf0),_0x59f090(0xe4)+_0x21d991['id']+_0x59f090(0xef),_0x59f090(0xd3)+_0x21d991['id']+_0x59f090(0xd4)+_0x1593ec+_0x59f090(0xe8));}const _0x43d2d5=requestedSafeFieldsMatch(_0x21d991[_0x59f090(0xf7)],_0x1c7e56,_0x21d991[_0x59f090(0xdf)]);if(!_0x43d2d5[_0x59f090(0xd6)]||_0x5db7ec&&!_0x43d2d5[_0x59f090(0xea)])throw notificationError(_0x5db7ec?'notification_config_update_outcome_unknown':_0x59f090(0xf2),_0x59f090(0xe4)+_0x21d991['id']+_0x59f090(0xe5),'Inspect\x20with\x20--id\x20'+_0x21d991['id']+'\x20via\x20'+_0x1593ec+_0x59f090(0xe8));const _0x4a43cf=_0x5db7ec?[_0x59f090(0xee)]:[];return{'ok':!![],'data':{'operation':_0x59f090(0xd8),'selector':notificationSelector(_0x1c7e56),'before':projectNotificationConfig(_0x21d991[_0x59f090(0xf7)]),'after':projectNotificationConfig(_0x1c7e56),'dryRun':![],'backend':{'method':_0x59f090(0xec),'path':UPDATE_PATH},'warnings':_0x4a43cf,'verification':{'status':_0x59f090(0xd7),'recoveredAfterUnknownResponse':_0x5db7ec,'verifiedFields':_0x43d2d5['verifiedFields'],'lookupCommand':_0x1593ec}},'message':'Updated\x20notification\x20config\x20'+_0x1c7e56['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a196_0x2aa8(){const _0x2cc680=['1366458wAHedP','4409909JZoJEG','103194FwDCjg','424602xuLipZ','372119TKXhCs','45gMPxYr','496952zTIFWP','162ZCFecd','8PTaUWm','723391YjPwKL','780PBFBJR'];a196_0x2aa8=function(){return _0x2cc680;};return a196_0x2aa8();}(function(_0x5b3398,_0x1d5ca5){const _0x247a9b=a196_0x2633,_0x4bfdc8=_0x5b3398();while(!![]){try{const _0xc1fb05=parseInt(_0x247a9b(0x186))/0x1+-parseInt(_0x247a9b(0x18b))/0x2+-parseInt(_0x247a9b(0x188))/0x3*(-parseInt(_0x247a9b(0x190))/0x4)+parseInt(_0x247a9b(0x18d))/0x5*(parseInt(_0x247a9b(0x18a))/0x6)+parseInt(_0x247a9b(0x189))/0x7+parseInt(_0x247a9b(0x18e))/0x8*(parseInt(_0x247a9b(0x18f))/0x9)+-parseInt(_0x247a9b(0x187))/0xa*(parseInt(_0x247a9b(0x18c))/0xb);if(_0xc1fb05===_0x1d5ca5)break;else _0x4bfdc8['push'](_0x4bfdc8['shift']());}catch(_0x3d8d8a){_0x4bfdc8['push'](_0x4bfdc8['shift']());}}}(a196_0x2aa8,0xa78f0));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a196_0x2633(_0xaf88cc,_0xfc5aed){_0xaf88cc=_0xaf88cc-0x186;const _0x2aa893=a196_0x2aa8();let _0x263386=_0x2aa893[_0xaf88cc];return _0x263386;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a197_0x41795d=a197_0x46fb;(function(_0x55d60e,_0x5d7e8e){const _0x27b46a=a197_0x46fb,_0x2c40a9=_0x55d60e();while(!![]){try{const _0x433950=parseInt(_0x27b46a(0x176))/0x1*(parseInt(_0x27b46a(0x1cb))/0x2)+parseInt(_0x27b46a(0x18c))/0x3+parseInt(_0x27b46a(0x1aa))/0x4+-parseInt(_0x27b46a(0x199))/0x5*(parseInt(_0x27b46a(0x16d))/0x6)+-parseInt(_0x27b46a(0x1c7))/0x7+-parseInt(_0x27b46a(0x196))/0x8+parseInt(_0x27b46a(0x1b8))/0x9*(-parseInt(_0x27b46a(0x175))/0xa);if(_0x433950===_0x5d7e8e)break;else _0x2c40a9['push'](_0x2c40a9['shift']());}catch(_0x2d1e5c){_0x2c40a9['push'](_0x2c40a9['shift']());}}}(a197_0x5280,0xf1799));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_0x41795d(0x1a3),'FEISHU',a197_0x41795d(0x163),a197_0x41795d(0x1c2),a197_0x41795d(0x1a1)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x41795d(0x198),a197_0x41795d(0x1a4),'endpointUrl',a197_0x41795d(0x166),'description',a197_0x41795d(0x15c),a197_0x41795d(0x1c6)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x41795d(0x177),a197_0x41795d(0x19e),a197_0x41795d(0x18b)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a197_0x41795d(0x167),a197_0x41795d(0x159),a197_0x41795d(0x14e),a197_0x41795d(0x178),'subjectPrefix',a197_0x41795d(0x1b2),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x41795d(0x150),'type':a197_0x41795d(0x1a8),'required':![],'description':a197_0x41795d(0x155)},{'name':'stdin','type':a197_0x41795d(0x16e),'required':![],'default':![],'description':a197_0x41795d(0x185)},{'name':'from-env','type':a197_0x41795d(0x1a8),'required':![],'description':a197_0x41795d(0x19b)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x41795d(0x195),'required':!![],'description':a197_0x41795d(0x1ac)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2d0865,_0x1204dd,_0x7677e1){return new CliError(_0x2d0865,0x1,_0x1204dd,_0x7677e1);}export function readNotificationId(_0x5b82d5){const _0x181c0e=a197_0x41795d,_0x34512b=_0x5b82d5[_0x181c0e(0x1a7)]('id');if(!Number['isSafeInteger'](_0x34512b)||_0x34512b<=0x0)throw notificationError(_0x181c0e(0x16c),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x34512b;}export function requireNotificationExplicitYes(_0x345755){const _0x19ac48=a197_0x41795d;if(_0x345755[_0x19ac48(0x160)](_0x19ac48(0x15a))||_0x345755[_0x19ac48(0x160)](_0x19ac48(0x19d)))return;throw notificationError(_0x19ac48(0x169),_0x19ac48(0x1c0),_0x19ac48(0x187));}export function readNotificationChannelType(_0x5b83f9,_0x471631=a197_0x41795d(0x174),_0x5833f7=a197_0x41795d(0x1a3)){const _0x1860cd=a197_0x41795d,_0x5501dc=_0x5b83f9[_0x1860cd(0x170)](_0x471631)[_0x1860cd(0x17c)]()||_0x5833f7;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5501dc))throw CliErrors[_0x1860cd(0x171)](_0x1860cd(0x1be)+_0x471631+':\x20'+_0x5501dc,_0x1860cd(0x1af)+NOTIFICATION_CHANNEL_TYPES[_0x1860cd(0x18f)](',\x20')+'.');return _0x5501dc;}export function assertSingleNotificationSource(_0x29222d){const _0x28cbf8=a197_0x41795d,_0x2fb1bf=[],_0x5a5261=_0x29222d[_0x28cbf8(0x170)](_0x28cbf8(0x150))['trim']();if(_0x5a5261)_0x2fb1bf[_0x28cbf8(0x162)]({'kind':'file','path':_0x5a5261});if(_0x29222d['bool'](_0x28cbf8(0x18e)))_0x2fb1bf[_0x28cbf8(0x162)]({'kind':'stdin'});const _0x19f58d=_0x29222d['str']('from-env')[_0x28cbf8(0x17c)]();if(_0x19f58d)_0x2fb1bf[_0x28cbf8(0x162)]({'kind':_0x28cbf8(0x1c9),'name':_0x19f58d});if(_0x2fb1bf['length']===0x0)throw CliErrors[_0x28cbf8(0x171)]('Missing\x20notification\x20JSON\x20source.',_0x28cbf8(0x1c1));if(_0x2fb1bf[_0x28cbf8(0x1ad)]>0x1)throw CliErrors[_0x28cbf8(0x171)](_0x28cbf8(0x153),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x2fb1bf[0x0];}export async function readNotificationDocument(_0x1b311b,_0x5da2de){const _0x2170f4=a197_0x41795d,_0x48af3b=assertSingleNotificationSource(_0x1b311b),_0x15c956=_0x48af3b[_0x2170f4(0x184)]===_0x2170f4(0x150)?_0x2170f4(0x156)+_0x48af3b[_0x2170f4(0x1ca)]:_0x48af3b[_0x2170f4(0x184)]===_0x2170f4(0x1c9)?_0x2170f4(0x1b1)+_0x48af3b[_0x2170f4(0x17a)]:_0x2170f4(0x18e);let _0x37631c;try{if(_0x48af3b[_0x2170f4(0x184)]===_0x2170f4(0x150))_0x37631c=await readFile(_0x48af3b['path'],_0x2170f4(0x1a6));else{if(_0x48af3b[_0x2170f4(0x184)]==='env'){if(!(_0x48af3b[_0x2170f4(0x17a)]in process.env))throw notificationError('notification_config_source_unavailable',_0x2170f4(0x168)+_0x48af3b[_0x2170f4(0x17a)]);_0x37631c=process.env[_0x48af3b.name]??'';}else _0x37631c=await readStdin();}}catch(_0x4b56a4){if(_0x4b56a4 instanceof CliError)throw _0x4b56a4;throw notificationError(_0x2170f4(0x183),_0x2170f4(0x14f)+_0x15c956+'.');}let _0xbe5036;try{_0xbe5036=JSON[_0x2170f4(0x19f)](_0x37631c);}catch{throw notificationError(_0x2170f4(0x15f),_0x2170f4(0x1bf)+_0x15c956+_0x2170f4(0x193),_0x2170f4(0x161));}if(!isJsonObject(_0xbe5036))throw notificationError('notification_config_json_invalid',_0x2170f4(0x1bf)+_0x15c956+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0xbe5036,_0x5da2de);}export function projectNotificationListConfig(_0x214a5e,_0x5e49ba){const _0x2e3d53=a197_0x41795d;return{'id':typeof _0x214a5e['id']==='number'?_0x214a5e['id']:null,'configCode':requireResponseString(_0x214a5e['configCode'],_0x2e3d53(0x19e),_0x5e49ba),'configName':requireResponseString(_0x214a5e[_0x2e3d53(0x198)],_0x2e3d53(0x198),_0x5e49ba),'channelType':requireResponseString(_0x214a5e[_0x2e3d53(0x1a4)],_0x2e3d53(0x1a4),_0x5e49ba),'description':normalizeNullableString(_0x214a5e[_0x2e3d53(0x14b)]),'createTime':normalizeNullableString(_0x214a5e[_0x2e3d53(0x1b6)]),'updateTime':normalizeNullableString(_0x214a5e[_0x2e3d53(0x1b0)])};}export function normalizeExactNotificationConfig(_0x549c0c,_0x362618,_0x6b4140){const _0x1627d1=a197_0x41795d;if(!Number[_0x1627d1(0x1c5)](_0x549c0c['id'])||_0x549c0c['id']!==_0x362618)throw notificationError(_0x1627d1(0x1bd),_0x1627d1(0x1ae)+_0x362618+'.');if(_0x549c0c[_0x1627d1(0x177)]!==_0x6b4140)throw notificationError('notification_config_response_invalid',_0x1627d1(0x197)+_0x362618+_0x1627d1(0x17f));const _0xb8168a=requireExactString(_0x549c0c[_0x1627d1(0x198)],_0x1627d1(0x198),_0x362618),_0x4a8348=requireExactString(_0x549c0c[_0x1627d1(0x19e)],_0x1627d1(0x19e),_0x362618),_0x128109=requireExactString(_0x549c0c['channelType'],_0x1627d1(0x1a4),_0x362618);if(!NOTIFICATION_CHANNEL_TYPES[_0x1627d1(0x181)](_0x128109))throw notificationError('notification_config_response_invalid',_0x1627d1(0x197)+_0x362618+_0x1627d1(0x172));const _0x4edfb3=responseNullableString(_0x549c0c[_0x1627d1(0x1a5)],_0x1627d1(0x1a5),_0x362618),_0x4c6fd2=responseNullableString(_0x549c0c['channelConfig'],'channelConfig',_0x362618),_0x1d2128=responseNullableString(_0x549c0c[_0x1627d1(0x14b)],_0x1627d1(0x14b),_0x362618),_0x4a3691=responseNullableTimeout(_0x549c0c[_0x1627d1(0x15c)],'connectTimeout',_0x362618),_0x39de41=responseNullableTimeout(_0x549c0c[_0x1627d1(0x1c6)],_0x1627d1(0x1c6),_0x362618);return{'id':_0x362618,'appCode':_0x6b4140,'configCode':_0x4a8348,'configName':_0xb8168a,'channelType':_0x128109,'endpointUrl':redactSensitive(_0x4edfb3),'channelConfig':redactSensitive(_0x4c6fd2),'description':_0x1d2128,'connectTimeout':_0x4a3691,'readTimeout':_0x39de41,'endpointUrlRaw':_0x4edfb3,'channelConfigRaw':_0x4c6fd2};}export async function requireExactNotificationConfig(_0x4b601b,_0x5c8e4d,_0x19e6ed){const _0x236ce9=a197_0x41795d;let _0x15d303;try{_0x15d303=await getNotificationChannelConfig(_0x5c8e4d,_0x4b601b);}catch{throw safeApiFailure(_0x19e6ed,_0x236ce9(0x14c),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x4b601b+_0x236ce9(0x18a));}return normalizeExactNotificationConfig(_0x15d303,_0x5c8e4d,_0x4b601b);}export function projectNotificationConfig(_0x5d6c77){const _0x2579ea=a197_0x41795d;return{'id':_0x5d6c77['id']??null,'appCode':_0x5d6c77['appCode'],'configCode':_0x5d6c77['configCode']??null,'configName':_0x5d6c77['configName'],'channelType':_0x5d6c77[_0x2579ea(0x1a4)],'endpointUrl':redactSensitive(_0x5d6c77[_0x2579ea(0x1a5)]),'channelConfig':redactSensitive(_0x5d6c77[_0x2579ea(0x166)]),'description':_0x5d6c77[_0x2579ea(0x14b)]??null,'connectTimeout':_0x5d6c77[_0x2579ea(0x15c)]??null,'readTimeout':_0x5d6c77[_0x2579ea(0x1c6)]??null};}export function notificationSelector(_0x368c26){const _0x42cd3f=a197_0x41795d;return{'appCode':_0x368c26[_0x42cd3f(0x177)],'id':_0x368c26['id'],'configCode':_0x368c26['configCode'],'configName':_0x368c26['configName'],'channelType':_0x368c26[_0x42cd3f(0x1a4)]};}export function createMutationInput(_0x4f1e6b,_0x4b5c92){const _0x209755=a197_0x41795d;return{'appCode':_0x4f1e6b,'configName':_0x4b5c92[_0x209755(0x198)],'channelType':_0x4b5c92[_0x209755(0x1a4)],...hasOwn(_0x4b5c92,'endpointUrl')?{'endpointUrl':_0x4b5c92[_0x209755(0x1a5)]}:{},...hasOwn(_0x4b5c92,_0x209755(0x166))?{'channelConfig':serializeChannelConfig(_0x4b5c92[_0x209755(0x166)])}:{},...hasOwn(_0x4b5c92,'description')?{'description':_0x4b5c92[_0x209755(0x14b)]}:{},...hasOwn(_0x4b5c92,'connectTimeout')?{'connectTimeout':_0x4b5c92[_0x209755(0x15c)]}:{},...hasOwn(_0x4b5c92,_0x209755(0x1c6))?{'readTimeout':_0x4b5c92[_0x209755(0x1c6)]}:{}};}function a197_0x46fb(_0x36859b,_0x539fb1){_0x36859b=_0x36859b-0x14b;const _0x5280a1=a197_0x5280();let _0x46fbe8=_0x5280a1[_0x36859b];return _0x46fbe8;}export function mergeUpdateInput(_0x4683ae,_0x85ddf8){const _0x398a1e=a197_0x41795d;return{'id':_0x4683ae['id'],'appCode':_0x4683ae['appCode'],'configName':_0x85ddf8[_0x398a1e(0x198)]??_0x4683ae[_0x398a1e(0x198)],'channelType':_0x85ddf8['channelType']??_0x4683ae[_0x398a1e(0x1a4)],'endpointUrl':hasOwn(_0x85ddf8,_0x398a1e(0x1a5))?_0x85ddf8[_0x398a1e(0x1a5)]:_0x4683ae[_0x398a1e(0x164)],'channelConfig':hasOwn(_0x85ddf8,_0x398a1e(0x166))?serializeChannelConfig(_0x85ddf8[_0x398a1e(0x166)]):_0x4683ae[_0x398a1e(0x173)],'description':hasOwn(_0x85ddf8,_0x398a1e(0x14b))?_0x85ddf8['description']:_0x4683ae['description'],'connectTimeout':hasOwn(_0x85ddf8,_0x398a1e(0x15c))?_0x85ddf8['connectTimeout']:_0x4683ae['connectTimeout'],'readTimeout':hasOwn(_0x85ddf8,'readTimeout')?_0x85ddf8[_0x398a1e(0x1c6)]:_0x4683ae['readTimeout']};}export function plannedUpdateProjection(_0x4baea2,_0x253138){const _0x95066f=a197_0x41795d;return projectNotificationConfig({'id':_0x4baea2['id'],'appCode':_0x4baea2[_0x95066f(0x177)],'configCode':_0x4baea2[_0x95066f(0x19e)],'configName':_0x253138[_0x95066f(0x198)]??_0x4baea2[_0x95066f(0x198)],'channelType':_0x253138['channelType']??_0x4baea2[_0x95066f(0x1a4)],'endpointUrl':hasOwn(_0x253138,_0x95066f(0x1a5))?_0x253138['endpointUrl']:_0x4baea2[_0x95066f(0x164)],'channelConfig':hasOwn(_0x253138,_0x95066f(0x166))?_0x253138[_0x95066f(0x166)]:_0x4baea2['channelConfigRaw'],'description':hasOwn(_0x253138,_0x95066f(0x14b))?_0x253138[_0x95066f(0x14b)]:_0x4baea2[_0x95066f(0x14b)],'connectTimeout':hasOwn(_0x253138,_0x95066f(0x15c))?_0x253138[_0x95066f(0x15c)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x4baea2['connectTimeout'],'readTimeout':hasOwn(_0x253138,_0x95066f(0x1c6))?_0x253138[_0x95066f(0x1c6)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x4baea2[_0x95066f(0x1c6)]});}export function requestedSafeFieldsMatch(_0x3e258f,_0x2dacb2,_0x13795c){const _0x19f83c=a197_0x41795d,_0x5137a9=[],_0x25f0f8=[],_0x21f084=[];for(const _0x4821e9 of[_0x19f83c(0x198),_0x19f83c(0x1a4),_0x19f83c(0x14b)]){if(!hasOwn(_0x13795c,_0x4821e9))continue;_0x21f084['push'](_0x4821e9),_0x5137a9[_0x19f83c(0x162)](_0x2dacb2[_0x4821e9]===_0x13795c[_0x4821e9]),_0x25f0f8['push'](_0x3e258f[_0x4821e9]!==_0x13795c[_0x4821e9]&&_0x2dacb2[_0x4821e9]===_0x13795c[_0x4821e9]);}for(const _0x1c0d1c of['connectTimeout',_0x19f83c(0x1c6)]){if(!hasOwn(_0x13795c,_0x1c0d1c))continue;const _0x36a5f8=_0x13795c[_0x1c0d1c]??(_0x1c0d1c===_0x19f83c(0x15c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x21f084[_0x19f83c(0x162)](_0x1c0d1c),_0x5137a9['push'](_0x2dacb2[_0x1c0d1c]===_0x36a5f8),_0x25f0f8[_0x19f83c(0x162)](_0x3e258f[_0x1c0d1c]!==_0x36a5f8&&_0x2dacb2[_0x1c0d1c]===_0x36a5f8);}return hasOwn(_0x13795c,_0x19f83c(0x1a5))&&_0x13795c[_0x19f83c(0x1a5)]===null&&(_0x21f084[_0x19f83c(0x162)](_0x19f83c(0x17b)),_0x5137a9['push'](_0x2dacb2[_0x19f83c(0x164)]===null||_0x2dacb2[_0x19f83c(0x164)]===''),_0x25f0f8['push'](_0x3e258f[_0x19f83c(0x164)]!==null&&_0x3e258f['endpointUrlRaw']!==''&&(_0x2dacb2[_0x19f83c(0x164)]===null||_0x2dacb2[_0x19f83c(0x164)]===''))),{'allMatch':_0x5137a9[_0x19f83c(0x188)](Boolean),'provesChange':_0x25f0f8[_0x19f83c(0x1c4)](Boolean),'verifiedFields':_0x21f084};}export function validateNotificationDeleteReadback(_0x237998,_0x41dfbe,_0x1d9307){const _0x100bfe=a197_0x41795d;for(const [_0x55ea53,_0xac9274]of _0x237998['entries']()){if(!Number[_0x100bfe(0x1c5)](_0xac9274['id'])||_0xac9274['id']<=0x0)throw notificationError(_0x100bfe(0x1bd),_0x100bfe(0x192)+(_0x55ea53+0x1)+_0x100bfe(0x17e));if(_0xac9274[_0x100bfe(0x177)]!==_0x41dfbe)throw notificationError('notification_config_response_invalid',_0x100bfe(0x192)+(_0x55ea53+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0xac9274['channelType']!==_0x1d9307)throw notificationError(_0x100bfe(0x1bd),_0x100bfe(0x192)+(_0x55ea53+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x522cd5,_0xdb0bd7,_0x938470){const _0x24a7cc=a197_0x41795d;return notificationError(_0x24a7cc(0x1b3)+_0x522cd5+'_'+(_0xdb0bd7==='mutation'?_0x24a7cc(0x1bb):_0xdb0bd7+_0x24a7cc(0x18d)),_0x24a7cc(0x197)+_0x522cd5+'\x20'+_0xdb0bd7+_0x24a7cc(0x1b5),_0x938470);}export function notificationLookupCommand(_0x315ed8,_0x3339f7){const _0x4518e8=a197_0x41795d;return _0x4518e8(0x1b7)+_0x315ed8+_0x4518e8(0x1b9)+_0x3339f7+_0x4518e8(0x182);}function validateNotificationDocument(_0xeb57fc,_0x5670ac){const _0xe99308=a197_0x41795d;for(const _0x30dd77 of Object[_0xe99308(0x15e)](_0xeb57fc)){if(FORBIDDEN_IDENTITY_FIELDS[_0xe99308(0x1a0)](_0x30dd77))throw notificationError('notification_config_field_forbidden',_0xe99308(0x157)+_0x30dd77+_0xe99308(0x1bc));if(!ALLOWED_INPUT_FIELDS[_0xe99308(0x1a0)](_0x30dd77))throw notificationError('notification_config_field_unknown',_0xe99308(0x14d)+_0x30dd77+'\x22.');}if(_0x5670ac===_0xe99308(0x16b)&&Object[_0xe99308(0x15e)](_0xeb57fc)[_0xe99308(0x1ad)]===0x0)throw notificationError(_0xe99308(0x151),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x2ff35a={};if(hasOwn(_0xeb57fc,_0xe99308(0x198)))_0x2ff35a[_0xe99308(0x198)]=validateRequiredString(_0xeb57fc['configName'],_0xe99308(0x198),0x80);else{if(_0x5670ac===_0xe99308(0x1a2))throw notificationError(_0xe99308(0x19c),_0xe99308(0x186)+'\x22configName\x22.');}if(hasOwn(_0xeb57fc,'channelType')){if(typeof _0xeb57fc[_0xe99308(0x1a4)]!==_0xe99308(0x1a8))throw invalidFieldType('channelType',_0xe99308(0x1ab));const _0x44eada=_0xeb57fc['channelType'][_0xe99308(0x17c)]();if(!NOTIFICATION_CHANNEL_TYPES[_0xe99308(0x181)](_0x44eada))throw notificationError('notification_config_field_invalid',_0xe99308(0x17d),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0xe99308(0x18f)](',\x20')+'.');_0x2ff35a[_0xe99308(0x1a4)]=_0x44eada;}else{if(_0x5670ac==='create')throw notificationError('notification_config_field_required',_0xe99308(0x186)+'\x22channelType\x22.');}for(const [_0x45b0f9,_0x83d050]of[['endpointUrl',0x200],[_0xe99308(0x14b),0x100]]){if(!hasOwn(_0xeb57fc,_0x45b0f9))continue;const _0x33c01f=_0xeb57fc[_0x45b0f9];if(_0x33c01f!==null&&typeof _0x33c01f!==_0xe99308(0x1a8))throw invalidFieldType(_0x45b0f9,_0xe99308(0x1ba));if(typeof _0x33c01f==='string'&&_0x33c01f[_0xe99308(0x1ad)]>_0x83d050)throw notificationError(_0xe99308(0x191),'Notification\x20JSON\x20field\x20\x22'+_0x45b0f9+'\x22\x20cannot\x20exceed\x20'+_0x83d050+_0xe99308(0x179));_0x2ff35a[_0x45b0f9]=_0x33c01f;}if(hasOwn(_0xeb57fc,_0xe99308(0x166))){const _0x301174=_0xeb57fc[_0xe99308(0x166)];if(_0x301174===null&&_0x5670ac==='create')throw invalidFieldType(_0xe99308(0x166),_0xe99308(0x194));if(_0x301174!==null&&!isJsonObject(_0x301174))throw invalidFieldType(_0xe99308(0x166),_0x5670ac===_0xe99308(0x16b)?_0xe99308(0x1c3):_0xe99308(0x194));_0x301174!==null&&validateChannelConfigFields(_0x2ff35a[_0xe99308(0x1a4)],_0x301174),_0x2ff35a[_0xe99308(0x166)]=_0x301174;}for(const _0x1b187a of['connectTimeout',_0xe99308(0x1c6)]){if(!hasOwn(_0xeb57fc,_0x1b187a))continue;const _0x2c796c=_0xeb57fc[_0x1b187a];if(_0x2c796c!==null&&(!Number[_0xe99308(0x1c5)](_0x2c796c)||_0x2c796c<0x0))throw notificationError(_0xe99308(0x191),_0xe99308(0x157)+_0x1b187a+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x2ff35a[_0x1b187a]=_0x2c796c;}return _0x2ff35a;}function validateRequiredString(_0x5a4c0b,_0x3bd401,_0x2915a8){const _0x22a5ab=a197_0x41795d;if(typeof _0x5a4c0b!==_0x22a5ab(0x1a8))throw invalidFieldType(_0x3bd401,'a\x20non-empty\x20string');const _0x58a146=_0x5a4c0b['trim']();if(!_0x58a146)throw notificationError(_0x22a5ab(0x191),_0x22a5ab(0x157)+_0x3bd401+_0x22a5ab(0x158));if(_0x58a146['length']>_0x2915a8)throw notificationError(_0x22a5ab(0x191),_0x22a5ab(0x157)+_0x3bd401+_0x22a5ab(0x190)+_0x2915a8+_0x22a5ab(0x179));return _0x58a146;}function validateChannelConfigFields(_0x2c386b,_0x1a180a){const _0x3da98c=a197_0x41795d;if(hasOwn(_0x1a180a,_0x3da98c(0x152)))throw forbiddenChannelConfigField(_0x3da98c(0x152));if(_0x2c386b===_0x3da98c(0x1a3))for(const _0x456a62 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x1a180a,_0x456a62))throw forbiddenChannelConfigField(_0x456a62);}}function forbiddenChannelConfigField(_0x257924){const _0x107db5=a197_0x41795d;return notificationError(_0x107db5(0x15b),_0x107db5(0x1c8)+_0x257924+_0x107db5(0x180));}function a197_0x5280(){const _0x273d80=['stringify','7828368KtMnNx','a\x20supported\x20string','Application-level\x20notification\x20config\x20ID','length','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Allowed\x20values:\x20','updateTime','environment\x20variable\x20','fromName','notification_config_','\x22\x20must\x20be\x20','\x20failed.','createTime','rabetbase\x20notification\x20config-list\x20--appcode\x20','9ZcaANs','\x20--type\x20','a\x20string\x20or\x20null','failed','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','notification_config_response_invalid','Invalid\x20--','Notification\x20JSON\x20from\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','WECOM','a\x20JSON\x20object\x20or\x20null','some','isSafeInteger','readTimeout','3163657NhpqzH','Notification\x20JSON\x20channelConfig\x20field\x20\x22','env','path','2TFZCMA','description','preflight','Unknown\x20notification\x20JSON\x20field\x20\x22','bccList','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','file','notification_config_update_empty','messageTemplate','Notification\x20JSON\x20source\x20is\x20ambiguous.','object','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','file\x20','Notification\x20JSON\x20field\x20\x22','\x22\x20must\x20be\x20a\x20non-empty\x20string.','ccList','dry-run','notification_config_channel_field_forbidden','connectTimeout','<redacted>','keys','notification_config_json_invalid','bool','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','push','DINGTALK','endpointUrlRaw','Item\x20','channelConfig','recipients','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_confirmation_required','\x20has\x20invalid\x20field\x20\x22','update','notification_config_id_invalid','343968fJntGK','boolean','setEncoding','str','validation','\x20has\x20an\x20unsupported\x20channelType.','channelConfigRaw','type','5680880sbASeM','1638363ZVItYY','appCode','replyTo','\x20characters.','name','endpointUrl:null','trim','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20has\x20an\x20invalid\x20id.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x22\x20is\x20forbidden.','includes','\x20--format\x20compress','notification_config_source_unavailable','kind','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Create\x20JSON\x20requires\x20field\x20','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','every','apiError','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','channelCode','1381737lSwXBy','_unavailable','stdin','join','\x22\x20cannot\x20exceed\x20','notification_config_field_invalid','Notification\x20config\x20list\x20item\x20','\x20is\x20invalid.','a\x20JSON\x20object','number','12247696AfiUpT','Notification\x20config\x20','configName','45eCAlSx','\x20is\x20missing\x20required\x20field\x20\x22','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','notification_config_field_required','yes','configCode','parse','has','WEBHOOK','create','EMAIL','channelType','endpointUrl','utf8','num','string'];a197_0x5280=function(){return _0x273d80;};return a197_0x5280();}function invalidFieldType(_0x3f3f37,_0x20d7bc){const _0x5be43a=a197_0x41795d;return notificationError(_0x5be43a(0x191),_0x5be43a(0x157)+_0x3f3f37+_0x5be43a(0x1b4)+_0x20d7bc+'.');}function serializeChannelConfig(_0x1e4e59){const _0xdabaed=a197_0x41795d;return _0x1e4e59===null||_0x1e4e59===undefined?null:JSON[_0xdabaed(0x1a9)](_0x1e4e59);}function redactSensitive(_0x2a9eb4){const _0x51a735=a197_0x41795d;return _0x2a9eb4===null||_0x2a9eb4===undefined||_0x2a9eb4===''?null:_0x51a735(0x15d);}function requireResponseString(_0x225fbf,_0xe4e08a,_0xc13c12){const _0x53780c=a197_0x41795d;if(typeof _0x225fbf!==_0x53780c(0x1a8)||_0x225fbf[_0x53780c(0x17c)]()==='')throw CliErrors[_0x53780c(0x189)]('Invalid\x20notification\x20config\x20response.',_0x53780c(0x165)+(_0xc13c12+0x1)+_0x53780c(0x19a)+_0xe4e08a+'\x22.');return _0x225fbf[_0x53780c(0x17c)]();}function requireExactString(_0x47b521,_0x158320,_0x58d922){const _0x5eb795=a197_0x41795d;if(typeof _0x47b521!==_0x5eb795(0x1a8)||_0x47b521[_0x5eb795(0x17c)]()==='')throw notificationError(_0x5eb795(0x1bd),'Notification\x20config\x20'+_0x58d922+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x158320+'\x22.');return _0x47b521[_0x5eb795(0x17c)]();}function responseNullableString(_0x1f3b3b,_0x1ac541,_0x38c539){const _0x197b1e=a197_0x41795d;if(_0x1f3b3b===undefined||_0x1f3b3b===null)return null;if(typeof _0x1f3b3b!==_0x197b1e(0x1a8))throw notificationError(_0x197b1e(0x1bd),'Notification\x20config\x20'+_0x38c539+_0x197b1e(0x16a)+_0x1ac541+'\x22.');return _0x1f3b3b;}function responseNullableTimeout(_0x4c6198,_0x116a2c,_0xb9025f){const _0x534cde=a197_0x41795d;if(_0x4c6198===undefined||_0x4c6198===null)return null;if(!Number[_0x534cde(0x1c5)](_0x4c6198)||_0x4c6198<0x0)throw notificationError('notification_config_response_invalid',_0x534cde(0x197)+_0xb9025f+_0x534cde(0x16a)+_0x116a2c+'\x22.');return _0x4c6198;}function normalizeNullableString(_0x445d92){return typeof _0x445d92==='string'?_0x445d92:null;}function isJsonObject(_0xd7df19){const _0x56f489=a197_0x41795d;return _0xd7df19!==null&&typeof _0xd7df19===_0x56f489(0x154)&&!Array['isArray'](_0xd7df19);}function hasOwn(_0x21be1c,_0x15262f){return Object['prototype']['hasOwnProperty']['call'](_0x21be1c,_0x15262f);}async function readStdin(){const _0x3e83ff=a197_0x41795d;let _0x201536='';process['stdin'][_0x3e83ff(0x16f)](_0x3e83ff(0x1a6));for await(const _0x3d1dab of process['stdin'])_0x201536+=_0x3d1dab;return _0x201536;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x4b5bd6=a198_0xd996;(function(_0x442d45,_0x233ae1){const _0x33e681=a198_0xd996,_0x1775e8=_0x442d45();while(!![]){try{const _0x4d6923=parseInt(_0x33e681(0x102))/0x1+-parseInt(_0x33e681(0x101))/0x2+-parseInt(_0x33e681(0x106))/0x3+parseInt(_0x33e681(0xf0))/0x4*(-parseInt(_0x33e681(0xe3))/0x5)+-parseInt(_0x33e681(0xdf))/0x6*(parseInt(_0x33e681(0xff))/0x7)+parseInt(_0x33e681(0xdd))/0x8+-parseInt(_0x33e681(0xee))/0x9*(-parseInt(_0x33e681(0xef))/0xa);if(_0x4d6923===_0x233ae1)break;else _0x1775e8['push'](_0x1775e8['shift']());}catch(_0x1b8bfd){_0x1775e8['push'](_0x1775e8['shift']());}}}(a198_0x401e,0xbaf0b));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a198_0x4b5bd6(0xe5),'general',a198_0x4b5bd6(0xf1),a198_0x4b5bd6(0xe1)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':'General','form':a198_0x4b5bd6(0xe2),'idCard':a198_0x4b5bd6(0xed)},SCENE_FLAG={'name':a198_0x4b5bd6(0xeb),'type':a198_0x4b5bd6(0xe9),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a198_0x4b5bd6(0xec),'type':a198_0x4b5bd6(0xe9),'description':a198_0x4b5bd6(0x104)},IMAGE_URL_FLAG={'name':a198_0x4b5bd6(0xd7),'type':a198_0x4b5bd6(0xe9),'description':a198_0x4b5bd6(0xfc)};function a198_0xd996(_0x10c318,_0x26edec){_0x10c318=_0x10c318-0xd7;const _0x401e39=a198_0x401e();let _0xd996a2=_0x401e39[_0x10c318];return _0xd996a2;}function normalizeScene(_0x3d55f5){const _0xa5fe1f=a198_0x4b5bd6,_0x18f449=_0x3d55f5[_0xa5fe1f(0xfd)]()[_0xa5fe1f(0x108)]();if(_0x18f449==='idcard')return _0xa5fe1f(0xe1);if(_0x18f449===_0xa5fe1f(0xe5)||_0x18f449==='general'||_0x18f449===_0xa5fe1f(0xf1))return _0x18f449;throw CliErrors[_0xa5fe1f(0xf9)](_0xa5fe1f(0xfa)+_0x3d55f5+_0xa5fe1f(0x105)+SUPPORTED_SCENES[_0xa5fe1f(0xfb)](',\x20'));}function selectedInputs(_0x6c4ebf){const _0x7eb778=a198_0x4b5bd6,_0x263a6c=_0x6c4ebf[_0x7eb778(0xfe)](_0x7eb778(0xec))[_0x7eb778(0xfd)](),_0x33f84f=_0x6c4ebf['str'](_0x7eb778(0xd7))[_0x7eb778(0xfd)]();return{'imageFile':_0x263a6c,'imageUrl':_0x33f84f,'count':[_0x263a6c,_0x33f84f][_0x7eb778(0xf7)](Boolean)[_0x7eb778(0x107)]};}function validateInputSelection(_0x514331){const _0x3f0e30=a198_0x4b5bd6,_0x462c8e=selectedInputs(_0x514331);if(_0x462c8e[_0x3f0e30(0xdb)]!==0x1)throw CliErrors[_0x3f0e30(0xf9)](_0x3f0e30(0xda));return _0x462c8e;}function withScene(_0x21063e,_0xcd7746,_0x42ed28){const _0x4bb48f=a198_0x4b5bd6;return{..._0x21063e,'scene':_0xcd7746,..._0x42ed28?{'sourceFile':{'fileName':_0x42ed28[_0x4bb48f(0xf3)],'filePath':_0x42ed28[_0x4bb48f(0xe4)]}}:{}};}function a198_0x401e(){const _0x3ab389=['apiError','path','fileUrl','/smartapi/common/uploadFile','image-url','imageFile','imageUrl','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','count','POST','1579200wuVBgw','recognize','6441918ZReEeW','\x20OCR\x20from\x20URL','idCard','Table','1875ksZPlg','filePath','invoice','/smartapi/ocr/recognize-text?','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','string','appCode','scene','image-file','IdCard','6906969MLlNPv','40aGZZvr','668nJnoik','form','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','fileName','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','read','ocr','filter','File\x20upload\x20response\x20missing\x20filePath.','validation','Unsupported\x20OCR\x20scene:\x20','join','Publicly\x20accessible\x20image\x20or\x20file\x20URL','trim','str','7WXxoYC','/smartapi/ocr/recognize-text','1777208DNdZJy','999397BcjqeX','GET','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','.\x20Supported\x20scenes:\x20','4427916bZIhbt','length','toLowerCase'];a198_0x401e=function(){return _0x3ab389;};return a198_0x401e();}const ocrRecognize={'service':a198_0x4b5bd6(0xf6),'command':a198_0x4b5bd6(0xde),'description':a198_0x4b5bd6(0xf2),'risk':a198_0x4b5bd6(0xf5),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x43d434){const _0x11a589=a198_0x4b5bd6,_0x27082d=normalizeScene(_0x43d434[_0x11a589(0xfe)](_0x11a589(0xeb))),_0x55338f=SCENE_TO_LEGACY_TYPE[_0x27082d],_0x206799=validateInputSelection(_0x43d434);if(_0x206799[_0x11a589(0xd9)]){const _0x42627e=new URLSearchParams({'url':_0x206799[_0x11a589(0xd9)],'type':_0x55338f,'appCode':_0x43d434[_0x11a589(0xea)]});return{'method':_0x11a589(0x103),'url':_0x11a589(0xe6)+_0x42627e['toString'](),'description':'Preview:\x20recognize\x20'+_0x27082d+_0x11a589(0xe0)};}const _0xf4ad62=requireDevelopmentUploadFile(_0x206799[_0x11a589(0xd8)],_0x11a589(0xec));return{'method':_0x11a589(0xdc),'url':_0x11a589(0x10c),'body':{'steps':[{'method':_0x11a589(0xdc),'url':_0x11a589(0x10c),'body':{'appCode':_0x43d434[_0x11a589(0xea)],'multipart':{'file':_0xf4ad62}}},{'method':_0x11a589(0xdc),'url':'/smartapi/common/queryFileUrl','body':{'filePath':_0x11a589(0xe7),'downloadFlag':![]}},{'method':_0x11a589(0x103),'url':_0x11a589(0x100),'query':{'appCode':_0x43d434[_0x11a589(0xea)],'url':_0x11a589(0xf4),'type':_0x55338f}}]},'description':_0x11a589(0xe8)+_0x27082d+'\x20OCR'};},async 'execute'(_0x4992d6){const _0x539c4c=a198_0x4b5bd6,_0x323978=normalizeScene(_0x4992d6[_0x539c4c(0xfe)](_0x539c4c(0xeb))),_0x382064=SCENE_TO_LEGACY_TYPE[_0x323978],_0x2da874=validateInputSelection(_0x4992d6);if(_0x2da874[_0x539c4c(0xd9)]){const _0x792e58=await recognizeDevelopmentOcr(_0x4992d6[_0x539c4c(0xea)],{'url':_0x2da874['imageUrl'],'type':_0x382064});return{'ok':!![],'data':withScene(_0x792e58,_0x323978)};}const _0x18b477=requireDevelopmentUploadFile(_0x2da874['imageFile'],_0x539c4c(0xec)),_0x5a0a84=await uploadDevelopmentFile(_0x4992d6['appCode'],_0x18b477[_0x539c4c(0x10a)]);if(!_0x5a0a84[_0x539c4c(0xe4)])throw CliErrors[_0x539c4c(0x109)](_0x539c4c(0xf8));const _0x5cdf4b=await queryDevelopmentFileUrl(_0x5a0a84[_0x539c4c(0xe4)],{'download':![]});if(!_0x5cdf4b[_0x539c4c(0x10b)])throw CliErrors[_0x539c4c(0x109)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x4bc984=await recognizeDevelopmentOcr(_0x4992d6[_0x539c4c(0xea)],{'url':_0x5cdf4b[_0x539c4c(0x10b)],'type':_0x382064});return{'ok':!![],'data':withScene(_0x4bc984,_0x323978,_0x5a0a84)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a199_0x1bef01=a199_0x578c;(function(_0x5020ba,_0x2b70da){const _0x27ac5e=a199_0x578c,_0x20ddae=_0x5020ba();while(!![]){try{const _0x585b38=-parseInt(_0x27ac5e(0xad))/0x1*(parseInt(_0x27ac5e(0x9b))/0x2)+-parseInt(_0x27ac5e(0x91))/0x3+parseInt(_0x27ac5e(0xa3))/0x4+-parseInt(_0x27ac5e(0x9c))/0x5+-parseInt(_0x27ac5e(0xa7))/0x6*(parseInt(_0x27ac5e(0x7e))/0x7)+-parseInt(_0x27ac5e(0x83))/0x8+parseInt(_0x27ac5e(0x94))/0x9;if(_0x585b38===_0x2b70da)break;else _0x20ddae['push'](_0x20ddae['shift']());}catch(_0x123713){_0x20ddae['push'](_0x20ddae['shift']());}}}(a199_0x5a76,0xf0b8d));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';function a199_0x578c(_0x3ee1f4,_0x2bbcf8){_0x3ee1f4=_0x3ee1f4-0x7d;const _0x5a76c8=a199_0x5a76();let _0x578cc2=_0x5a76c8[_0x3ee1f4];return _0x578cc2;}const CUSTOM_PAGE_PATTERNS=['BLANK',a199_0x1bef01(0x9e),a199_0x1bef01(0xa9)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a199_0x1bef01(0xa8));export const pageCreate={'service':a199_0x1bef01(0xa2),'command':a199_0x1bef01(0xaa),'description':a199_0x1bef01(0xb5),'risk':a199_0x1bef01(0x84),'defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a199_0x1bef01(0x7f),'message':a199_0x1bef01(0xba),'hint':'This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.'},{'name':a199_0x1bef01(0x7d),'message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a199_0x1bef01(0xa4)}],'flags':[{'name':a199_0x1bef01(0x80),'type':a199_0x1bef01(0x8e),'description':a199_0x1bef01(0x95)},{'name':a199_0x1bef01(0x8b),'type':'number','description':a199_0x1bef01(0x8f)},{'name':'page-pattern','type':'string','description':a199_0x1bef01(0x98),'enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0x1bef01(0x9d),'type':a199_0x1bef01(0x8e),'description':a199_0x1bef01(0xb6)},APPCODE_FLAG],async 'validate'(_0x5df044){await readValidatedPageSource(_0x5df044);},async 'dryRun'(_0x33f261){const _0x42039e=a199_0x1bef01,_0x331538=readInput(_0x33f261,await readValidatedPageSource(_0x33f261));return{'method':'POST','url':_0x42039e(0xbb),'body':{'appCode':_0x331538[_0x42039e(0xb4)],'pageName':_0x331538[_0x42039e(0x90)],..._0x331538['parentMenuId']!=null?{'parentMenuId':_0x331538[_0x42039e(0xa6)]}:{},'createMenu':_0x331538[_0x42039e(0x9f)],'codeContent':_0x331538[_0x42039e(0xa5)]},'description':_0x42039e(0xb7)+JSON[_0x42039e(0x89)](_0x331538['pageName'])+_0x42039e(0xb1)};},async 'execute'(_0x1aa2c1){const _0x342538=a199_0x1bef01,_0x49846d=readInput(_0x1aa2c1,await readValidatedPageSource(_0x1aa2c1)),_0x561fc6=await createCustomPage(_0x49846d);if(!Number['isInteger'](_0x561fc6[_0x342538(0xb2)])||_0x561fc6[_0x342538(0xb2)]<=0x0)throw CliErrors[_0x342538(0xb0)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x21a55a=buildCustomPageDevelopmentUrl(_0x49846d[_0x342538(0xb4)],_0x561fc6[_0x342538(0x81)]),_0x501e28=buildCustomPageEditUrl(_0x49846d['appCode'],_0x561fc6['pageId']);return{'ok':!![],'data':{'operation':_0x342538(0x96),'pageType':_0x342538(0xb8),'pagePattern':readPagePattern(_0x1aa2c1),'selector':{'appCode':_0x49846d[_0x342538(0xb4)],'pageName':_0x49846d[_0x342538(0x90)]},'before':null,'after':{'pageId':_0x561fc6[_0x342538(0xb2)],'pageName':_0x561fc6[_0x342538(0x90)],'appCode':_0x561fc6[_0x342538(0xb4)],'version':_0x561fc6['version'],'menuId':_0x561fc6[_0x342538(0x86)],'menuPath':_0x561fc6['menuPath'],'files':_0x561fc6[_0x342538(0xa5)]??Object[_0x342538(0xab)](_0x49846d[_0x342538(0xa5)])},'dryRun':![],'request':_0x49846d,..._0x21a55a?{'pageUrl':_0x21a55a}:{},..._0x501e28?{'editPageUrl':_0x501e28}:{},'warnings':_0x21a55a?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x342538(0x8d)+_0x561fc6['pageId']+'.'};}};function readPagePattern(_0x5b40d4){const _0x1c95d6=a199_0x1bef01,_0x16c77e=_0x5b40d4[_0x1c95d6(0x87)]('page-pattern')[_0x1c95d6(0x82)](),_0x2504ec=_0x5b40d4[_0x1c95d6(0x87)](_0x1c95d6(0x9d))[_0x1c95d6(0x82)]();if(_0x16c77e&&_0x2504ec)throw CliErrors[_0x1c95d6(0xa0)](_0x1c95d6(0x85));if(_0x2504ec)return null;if(!_0x16c77e)throw CliErrors[_0x1c95d6(0xa0)]('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS['includes'](_0x16c77e))throw CliErrors['validation'](_0x1c95d6(0x99));return _0x16c77e;}async function readPageSource(_0x5ad9b9){const _0xab7a75=a199_0x1bef01,_0x33e352=_0x5ad9b9[_0xab7a75(0x87)](_0xab7a75(0x9d))[_0xab7a75(0x82)](),_0x41d09b=readPagePattern(_0x5ad9b9);if(_0x41d09b===null){const _0x326065=await readCustomPageDirectory(_0x33e352);if(Object[_0xab7a75(0xab)](_0x326065)[_0xab7a75(0x88)]===0x0)throw CliErrors[_0xab7a75(0xa0)](_0xab7a75(0x9a));return _0x326065;}let _0x454ddd;try{_0x454ddd=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x41d09b[_0xab7a75(0x97)]()+_0xab7a75(0xb9)),_0xab7a75(0xac));}catch{throw CliErrors[_0xab7a75(0xa0)](_0xab7a75(0xbc)+_0x41d09b+'.');}let _0x3c907f;try{_0x3c907f=JSON[_0xab7a75(0xa1)](_0x454ddd);}catch{throw CliErrors[_0xab7a75(0xa0)](_0xab7a75(0xae)+_0x41d09b+'.');}if(!_0x3c907f||typeof _0x3c907f!==_0xab7a75(0xbd)||Array['isArray'](_0x3c907f)||Object[_0xab7a75(0xb3)](_0x3c907f)[_0xab7a75(0x92)](_0x2c333a=>typeof _0x2c333a!==_0xab7a75(0x8e)))throw CliErrors['validation'](_0xab7a75(0xae)+_0x41d09b+'.');return _0x3c907f;}async function readValidatedPageSource(_0x14c127){const _0x3ed640=await readPageSource(_0x14c127);return await validateCustomPageContent(_0x3ed640),_0x3ed640;}function a199_0x5a76(){const _0x2d332e=['str','length','stringify','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','parent-menu-id','now','Created\x20Custom\x20Page\x20','string','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','pageName','3799392LOxNeH','some','Custom_page_','65846925GUpOwo','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','page.create','toLowerCase','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','394jTLxQk','9199345fauUdC','page-dir','ONEPAGE','createMenu','validation','parse','page','5527772hEhRVC','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','files','parentMenuId','222fnGFSq','../../../templates/custom-pages','DASHBOARD','create','keys','utf8','9326RwYqrz','Invalid\x20Custom\x20Page\x20pattern:\x20','isNaN','apiError','\x20and\x20its\x20menu\x20entry.','pageId','values','appCode','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','Would\x20create\x20Custom\x20Page\x20','CUSTOM','.json','page\x20create\x20does\x20not\x20accept\x20--page-type.','/smartapi/webcode/page/create','Custom\x20Page\x20pattern\x20not\x20found:\x20','object','page-content','197435LwhMDm','page-type','name','menuPath','trim','13801048jfwKou','write','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','menuId'];a199_0x5a76=function(){return _0x2d332e;};return a199_0x5a76();}function readInput(_0x824f61,_0x41aada){const _0x5dfe9a=a199_0x1bef01,_0x5a7c0c=_0x824f61[_0x5dfe9a(0x87)](_0x5dfe9a(0x80))['trim']()||_0x5dfe9a(0x93)+Date[_0x5dfe9a(0x8c)]();if(_0x5a7c0c['length']>0x64)throw CliErrors[_0x5dfe9a(0xa0)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x215f56=_0x824f61['num'](_0x5dfe9a(0x8b),NaN),_0x30c6ed=!Number[_0x5dfe9a(0xaf)](_0x215f56);if(_0x30c6ed&&(!Number['isInteger'](_0x215f56)||_0x215f56<=0x0))throw CliErrors[_0x5dfe9a(0xa0)](_0x5dfe9a(0x8a));return{'appCode':_0x824f61[_0x5dfe9a(0xb4)],'pageName':_0x5a7c0c,..._0x30c6ed?{'parentMenuId':_0x215f56}:{},'createMenu':!![],'files':_0x41aada};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0x4814cd=a200_0x4bde;(function(_0x4ad882,_0x4f2b6e){const _0x3f847b=a200_0x4bde,_0x3a9d03=_0x4ad882();while(!![]){try{const _0x1f875e=parseInt(_0x3f847b(0x16a))/0x1+-parseInt(_0x3f847b(0x168))/0x2+-parseInt(_0x3f847b(0x158))/0x3+-parseInt(_0x3f847b(0x155))/0x4*(-parseInt(_0x3f847b(0x15f))/0x5)+parseInt(_0x3f847b(0x16d))/0x6*(parseInt(_0x3f847b(0x15e))/0x7)+parseInt(_0x3f847b(0x160))/0x8*(parseInt(_0x3f847b(0x15d))/0x9)+-parseInt(_0x3f847b(0x16c))/0xa*(-parseInt(_0x3f847b(0x16b))/0xb);if(_0x1f875e===_0x4f2b6e)break;else _0x3a9d03['push'](_0x3a9d03['shift']());}catch(_0x1bc3a7){_0x3a9d03['push'](_0x3a9d03['shift']());}}}(a200_0x1e90,0x8935a));import{getCustomPageSource}from'../../../core/api-client.js';function a200_0x1e90(){const _0x4a0a85=['getSeconds','831027XmWpRj','Custom\x20Page\x20ID','join','trim','cookie','108FJRTvK','7zbpVRT','254645WZEfxG','561360ZSdeYi','isNaN','Retrieved\x20Custom\x20Page\x20','getFullYear','number','getTime','getHours','custom-detail','1535678BdxzAv','appcode','79453EGyDQT','44MKboog','36590anuOCY','2802078PsemsS','padStart','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','str','getMonth','compress','16eOaaid','page'];a200_0x1e90=function(){return _0x4a0a85;};return a200_0x1e90();}function a200_0x4bde(_0x22f6da,_0x5453b0){_0x22f6da=_0x22f6da-0x152;const _0x1e90b2=a200_0x1e90();let _0x4bdef5=_0x1e90b2[_0x22f6da];return _0x4bdef5;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a200_0x4814cd(0x156),'command':a200_0x4814cd(0x167),'description':a200_0x4814cd(0x16f),'risk':'read','defaultOutputFormat':a200_0x4814cd(0x154),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a200_0x4814cd(0x164),'required':!![],'description':a200_0x4814cd(0x159)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2c737e){readCustomPageId(_0x2c737e);},async 'execute'(_0x378bca){const _0x1e733f=a200_0x4814cd,_0x28ba9a=readCustomPageId(_0x378bca),_0x213bc9=await getCustomPageSource(_0x28ba9a),{bundle:_0x26c97e,createTime:_0x20b7bf,updateTime:_0x138d31,..._0x13cbb5}=_0x213bc9,_0x52b5b7=_0x213bc9['id']??_0x28ba9a,_0x10817c=_0x213bc9['appCode']?.[_0x1e733f(0x15b)]()||_0x378bca[_0x1e733f(0x152)](_0x1e733f(0x169))[_0x1e733f(0x15b)](),_0x3bda69=buildCustomPageRuntimeUrl(_0x10817c,_0x213bc9['pageCode']),_0x40b7aa=buildCustomPageEditUrl(_0x10817c,_0x52b5b7),_0x54e5e0=await resolveCustomPageDevelopmentUrl(_0x10817c,_0x52b5b7,_0x378bca[_0x1e733f(0x15c)]);return{'ok':!![],'data':{..._0x13cbb5,..._0x3bda69?{'runtimePageUrl':_0x3bda69}:{},..._0x54e5e0?{'pageUrl':_0x54e5e0}:{},..._0x40b7aa?{'editPageUrl':_0x40b7aa}:{},..._0x20b7bf==null?{}:{'createTime':formatTime(_0x20b7bf)},..._0x138d31==null?{}:{'updateTime':formatTime(_0x138d31)}},'message':_0x1e733f(0x162)+_0x28ba9a+'.'};}};function formatTime(_0x121bb0){const _0x4c9758=a200_0x4814cd,_0x2879c8=new Date(_0x121bb0);if(Number[_0x4c9758(0x161)](_0x2879c8[_0x4c9758(0x165)]()))return String(_0x121bb0);const _0x5a4a3a=[_0x2879c8[_0x4c9758(0x163)](),String(_0x2879c8[_0x4c9758(0x153)]()+0x1)[_0x4c9758(0x16e)](0x2,'0'),String(_0x2879c8['getDate']())['padStart'](0x2,'0')]['join']('-'),_0xc055d1=[String(_0x2879c8[_0x4c9758(0x166)]())[_0x4c9758(0x16e)](0x2,'0'),String(_0x2879c8['getMinutes']())[_0x4c9758(0x16e)](0x2,'0'),String(_0x2879c8[_0x4c9758(0x157)]())[_0x4c9758(0x16e)](0x2,'0')][_0x4c9758(0x15a)](':');return _0x5a4a3a+'\x20'+_0xc055d1;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a201_0x3e804e=a201_0x5373;function a201_0x4fc1(){const _0x47a883=['compress','6257wwrIqk','read','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','pageId','custom-list','label','854420PFmvOT','126959BnrYJi','644214BzhSRi','322220BFMZCo','1128690srhhFf','15ySGfen','length','8ibWDZn','cookie','48iKDjTH','react','flatMap','page','menus','1289295kGLhTm','Found\x20','appCode','path'];a201_0x4fc1=function(){return _0x47a883;};return a201_0x4fc1();}(function(_0x4a834c,_0x4c0099){const _0x6746b6=a201_0x5373,_0x868cab=_0x4a834c();while(!![]){try{const _0x543fec=-parseInt(_0x6746b6(0x16e))/0x1*(parseInt(_0x6746b6(0x164))/0x2)+parseInt(_0x6746b6(0x15f))/0x3+parseInt(_0x6746b6(0x15e))/0x4+parseInt(_0x6746b6(0x160))/0x5*(-parseInt(_0x6746b6(0x15d))/0x6)+-parseInt(_0x6746b6(0x15c))/0x7*(parseInt(_0x6746b6(0x162))/0x8)+parseInt(_0x6746b6(0x169))/0x9+parseInt(_0x6746b6(0x15b))/0xa;if(_0x543fec===_0x4c0099)break;else _0x868cab['push'](_0x868cab['shift']());}catch(_0x18d043){_0x868cab['push'](_0x868cab['shift']());}}}(a201_0x4fc1,0x2f9fe));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a201_0x5373(_0x5ba8b8,_0x590d1d){_0x5ba8b8=_0x5ba8b8-0x159;const _0x4fc1f6=a201_0x4fc1();let _0x537333=_0x4fc1f6[_0x5ba8b8];return _0x537333;}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';export const pageCustomList={'service':a201_0x3e804e(0x167),'command':a201_0x3e804e(0x159),'description':a201_0x3e804e(0x170),'risk':a201_0x3e804e(0x16f),'defaultOutputFormat':a201_0x3e804e(0x16d),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x40cdb9){const _0x551b27=a201_0x3e804e,_0x906505=(await fetchMenuSnapshot(_0x40cdb9[_0x551b27(0x16b)],_0x40cdb9[_0x551b27(0x163)]))[_0x551b27(0x168)][_0x551b27(0x166)](_0xc42435=>{const _0x20410a=_0x551b27;if(_0xc42435['type']!==_0x20410a(0x165)||_0xc42435['pageId']==null)return[];const _0x4998e4=buildCustomPageDevelopmentUrl(_0x40cdb9[_0x20410a(0x16b)],_0xc42435[_0x20410a(0x16c)]),_0x363383=buildCustomPageRuntimeUrl(_0x40cdb9[_0x20410a(0x16b)],_0xc42435[_0x20410a(0x16c)]),_0x5362bf=buildCustomPageEditUrl(_0x40cdb9[_0x20410a(0x16b)],_0xc42435[_0x20410a(0x171)]);return[{'pageId':_0xc42435[_0x20410a(0x171)],'label':_0xc42435[_0x20410a(0x15a)],'path':_0xc42435[_0x20410a(0x16c)],..._0x4998e4?{'pageUrl':_0x4998e4}:{},..._0x363383?{'runtimePageUrl':_0x363383}:{},..._0x5362bf?{'editPageUrl':_0x5362bf}:{}}];});return{'ok':!![],'data':{'pages':_0x906505},'message':_0x906505[_0x551b27(0x161)]===0x0?'No\x20Custom\x20Pages\x20found.':_0x551b27(0x16a)+_0x906505[_0x551b27(0x161)]+'\x20Custom\x20Page(s).'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a202_0x56ddc5=a202_0x1c73;function a202_0x1c73(_0x2dc1ee,_0x47fed4){_0x2dc1ee=_0x2dc1ee-0x16f;const _0x5ea4fe=a202_0x5ea4();let _0x1c7318=_0x5ea4fe[_0x2dc1ee];return _0x1c7318;}(function(_0x42aa1f,_0x47a0b4){const _0x15fb48=a202_0x1c73,_0x40784c=_0x42aa1f();while(!![]){try{const _0x47a66d=-parseInt(_0x15fb48(0x17f))/0x1+-parseInt(_0x15fb48(0x187))/0x2+-parseInt(_0x15fb48(0x191))/0x3+-parseInt(_0x15fb48(0x192))/0x4*(-parseInt(_0x15fb48(0x178))/0x5)+-parseInt(_0x15fb48(0x18f))/0x6+-parseInt(_0x15fb48(0x18d))/0x7*(-parseInt(_0x15fb48(0x17d))/0x8)+-parseInt(_0x15fb48(0x17a))/0x9*(-parseInt(_0x15fb48(0x170))/0xa);if(_0x47a66d===_0x47a0b4)break;else _0x40784c['push'](_0x40784c['shift']());}catch(_0x9637a1){_0x40784c['push'](_0x40784c['shift']());}}}(a202_0x5ea4,0x63464));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':'page','command':a202_0x56ddc5(0x17b),'description':a202_0x56ddc5(0x177),'risk':a202_0x56ddc5(0x18c),'defaultOutputFormat':a202_0x56ddc5(0x18a),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a202_0x56ddc5(0x190)},{'name':a202_0x56ddc5(0x188),'type':'string','description':a202_0x56ddc5(0x173)}],async 'validate'(_0xeffc0f){readCustomPageId(_0xeffc0f);},async 'dryRun'(_0x3efe2b){const _0x35e2cc=a202_0x56ddc5,_0x1efa53=readInput(_0x3efe2b);return{'method':_0x35e2cc(0x17c),'url':_0x35e2cc(0x181),'body':{'id':_0x1efa53[_0x35e2cc(0x18b)],..._0x1efa53[_0x35e2cc(0x188)]?{'remark':_0x1efa53[_0x35e2cc(0x188)]}:{}},'description':_0x35e2cc(0x174)+_0x1efa53[_0x35e2cc(0x18b)]+'.'};},async 'execute'(_0x43d211){const _0x2fd83f=a202_0x56ddc5,_0x22e873=readInput(_0x43d211);await getCustomPageSource(_0x22e873[_0x2fd83f(0x18b)]);const _0x2ee725=await publishCustomPage(_0x22e873);if(!Number[_0x2fd83f(0x185)](_0x2ee725)||_0x2ee725!==_0x22e873[_0x2fd83f(0x18b)])throw CliErrors[_0x2fd83f(0x176)]('Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.');const _0x20d437=await getCustomPageSource(_0x22e873[_0x2fd83f(0x18b)]);if(_0x20d437[_0x2fd83f(0x179)]!==_0x2fd83f(0x182))throw CliErrors[_0x2fd83f(0x176)](_0x2fd83f(0x189)+(_0x20d437[_0x2fd83f(0x179)]??'unknown')+'.');const _0x3b26db=_0x20d437['appCode']?.[_0x2fd83f(0x171)](),_0x475af4=buildCustomPageEditUrl(_0x3b26db,_0x22e873[_0x2fd83f(0x18b)]),_0x43339f=await resolveCustomPageDevelopmentUrl(_0x3b26db,_0x22e873[_0x2fd83f(0x18b)],_0x43d211['cookie']),_0x467fe1=buildMutationData(_0x22e873,!![],_0x43339f,_0x475af4);_0x3b26db&&!_0x43339f&&_0x467fe1[_0x2fd83f(0x175)][_0x2fd83f(0x172)](_0x2fd83f(0x17e));const _0x527ead=buildCustomPageRuntimeUrl(_0x20d437[_0x2fd83f(0x184)],_0x20d437[_0x2fd83f(0x16f)]);return _0x527ead?_0x467fe1['runtimePageUrl']=_0x527ead:_0x467fe1[_0x2fd83f(0x175)]['push'](_0x2fd83f(0x183)),{'ok':!![],'data':_0x467fe1,'message':_0x2fd83f(0x18e)+_0x22e873['pageId']+'.'};}};function readInput(_0x405ad7){const _0x84f7f1=a202_0x56ddc5,_0x36d623=readCustomPageId(_0x405ad7),_0x4e0eac=_0x405ad7[_0x84f7f1(0x180)]('remark')['trim']();return{'pageId':_0x36d623,..._0x4e0eac?{'remark':_0x4e0eac}:{}};}function a202_0x5ea4(){const _0x1c627b=['trim','push','Optional\x20publish\x20remark','Would\x20publish\x20Custom\x20Page\x20','warnings','apiError','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','110RLWDsK','status','8006130izovRX','custom-publish','POST','636360MzEydS','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','803299SvtEcX','str','/smartapi/webcode/file/publish','FORMAL','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','appCode','isInteger','page.custom-publish','364302PJFbyk','remark','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','compress','pageId','write','35eLwwwQ','Published\x20Custom\x20Page\x20','359412MaqHxe','Custom\x20Page\x20ID','3651fxSePp','30164JBFZyo','pageCode','10kZBeQp'];a202_0x5ea4=function(){return _0x1c627b;};return a202_0x5ea4();}function buildMutationData(_0x4a5fea,_0x409209=![],_0x3e3153,_0x4ac0cd){const _0x29de81=a202_0x56ddc5;return{'operation':_0x29de81(0x186),'selector':{'pageId':_0x4a5fea[_0x29de81(0x18b)]},'before':null,'after':{'pageId':_0x4a5fea['pageId'],'status':_0x29de81(0x182)},'dryRun':!_0x409209,'request':_0x4a5fea,..._0x3e3153?{'pageUrl':_0x3e3153}:{},..._0x4ac0cd?{'editPageUrl':_0x4ac0cd}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a203_0x206600=a203_0x513f;(function(_0x36d4a7,_0x2990c4){const _0x3de257=a203_0x513f,_0x4333ea=_0x36d4a7();while(!![]){try{const _0x3c067e=parseInt(_0x3de257(0x142))/0x1+parseInt(_0x3de257(0x139))/0x2*(parseInt(_0x3de257(0x140))/0x3)+-parseInt(_0x3de257(0x13c))/0x4*(parseInt(_0x3de257(0x13e))/0x5)+-parseInt(_0x3de257(0x147))/0x6*(-parseInt(_0x3de257(0x13f))/0x7)+parseInt(_0x3de257(0x152))/0x8+parseInt(_0x3de257(0x141))/0x9*(-parseInt(_0x3de257(0x148))/0xa)+parseInt(_0x3de257(0x143))/0xb;if(_0x3c067e===_0x2990c4)break;else _0x4333ea['push'](_0x4333ea['shift']());}catch(_0xbdf30c){_0x4333ea['push'](_0x4333ea['shift']());}}}(a203_0x2f10,0x53df4));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a203_0x206600(0x14e)};function a203_0x513f(_0x47111b,_0x176105){_0x47111b=_0x47111b-0x139;const _0x2f1072=a203_0x2f10();let _0x513f16=_0x2f1072[_0x47111b];return _0x513f16;}function a203_0x2f10(){const _0x4e5f69=['trim','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','type','message','/ide/','2341120biDpTh','react','num','map','120002Yrunrr','Invalid\x20Custom\x20Page\x20content:\x20','validation','4LXsQMp','isInteger','979230uzngNS','63uxANyI','6kIQBwr','18AUJIcI','172791cbsnsk','172590AbQzpv','path','join','menus','83838Vqzyqh','937470XFMZkv','file','pageId','length','--id\x20must\x20be\x20a\x20positive\x20integer.'];a203_0x2f10=function(){return _0x4e5f69;};return a203_0x2f10();}function trimOptional(_0x190679){const _0x1f7039=a203_0x206600;return _0x190679?.[_0x1f7039(0x14d)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x44a0e1,_0x1f8a3a){const _0x40e358=trimOptional(_0x44a0e1),_0x3efd33=trimOptional(_0x1f8a3a);if(!_0x40e358||!_0x3efd33)return undefined;return getPublishedAppDomain(_0x40e358)+'/'+encodeURIComponent(_0x3efd33);}export function buildCustomPageDevelopmentUrl(_0x5d3104,_0x2e629d){const _0x33cd49=trimOptional(_0x5d3104),_0x288d7e=trimOptional(_0x2e629d);if(!_0x33cd49||!_0x288d7e)return undefined;return getAppBaseUrl(_0x33cd49)+'/pages/'+encodeURIComponent(_0x288d7e);}export async function resolveCustomPageDevelopmentUrl(_0x20463f,_0x199112,_0xcfb584){const _0x2346d8=a203_0x206600,_0x39e30e=trimOptional(_0x20463f);if(!_0x39e30e)return undefined;try{const _0x42ac24=(await fetchMenuSnapshot(_0x39e30e,_0xcfb584))[_0x2346d8(0x146)]['find'](_0x3e2d14=>_0x3e2d14[_0x2346d8(0x14f)]===_0x2346d8(0x153)&&_0x3e2d14[_0x2346d8(0x14a)]===_0x199112);return buildCustomPageDevelopmentUrl(_0x39e30e,_0x42ac24?.[_0x2346d8(0x144)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x122c61,_0x2dfc24){const _0x59c5e6=a203_0x206600,_0x2f0109=trimOptional(_0x122c61);if(!_0x2f0109)return;const _0x12baaf=trimOptional(String(_0x2dfc24??''));if(!_0x12baaf)return;return getAppBaseUrl(_0x2f0109)+_0x59c5e6(0x151)+encodeURIComponent(_0x12baaf);}export async function validateCustomPageContent(_0x32ceb5){const _0x1e5ba2=a203_0x206600,_0x51dcc7=await validateCustomPageSourceFiles(_0x32ceb5);if(_0x51dcc7[_0x1e5ba2(0x14b)]>0x0)throw CliErrors[_0x1e5ba2(0x13b)](_0x1e5ba2(0x13a)+_0x51dcc7[_0x1e5ba2(0x155)](_0x83a226=>_0x83a226[_0x1e5ba2(0x149)]+':\x20'+_0x83a226[_0x1e5ba2(0x150)])[_0x1e5ba2(0x145)](';\x20'));}export function readCustomPageId(_0x55425c){const _0x11885f=a203_0x206600,_0xa40a17=_0x55425c[_0x11885f(0x154)]('id');if(!Number[_0x11885f(0x13d)](_0xa40a17)||_0xa40a17<=0x0)throw CliErrors[_0x11885f(0x13b)](_0x11885f(0x14c));return _0xa40a17;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a204_0x4812a1=a204_0x39c8;(function(_0x1642ae,_0x380a65){const _0x2c3db1=a204_0x39c8,_0x35aa63=_0x1642ae();while(!![]){try{const _0x15332=parseInt(_0x2c3db1(0x1ce))/0x1+parseInt(_0x2c3db1(0x1de))/0x2+parseInt(_0x2c3db1(0x1d9))/0x3+parseInt(_0x2c3db1(0x1dc))/0x4+parseInt(_0x2c3db1(0x1e0))/0x5*(parseInt(_0x2c3db1(0x1df))/0x6)+-parseInt(_0x2c3db1(0x1d4))/0x7*(-parseInt(_0x2c3db1(0x1db))/0x8)+parseInt(_0x2c3db1(0x1d6))/0x9*(-parseInt(_0x2c3db1(0x1d0))/0xa);if(_0x15332===_0x380a65)break;else _0x35aa63['push'](_0x35aa63['shift']());}catch(_0x2cc8cd){_0x35aa63['push'](_0x35aa63['shift']());}}}(a204_0x413a,0xb43aa));import{format}from'prettier';const SOURCE_PARSERS={'.js':a204_0x4812a1(0x1cd),'.jsx':'babel','.ts':a204_0x4812a1(0x1dd),'.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=[a204_0x4812a1(0x1d1),a204_0x4812a1(0x1d5)];function a204_0x39c8(_0x5127f4,_0x51e130){_0x5127f4=_0x5127f4-0x1cc;const _0x413a00=a204_0x413a();let _0x39c81c=_0x413a00[_0x5127f4];return _0x39c81c;}export async function validateCustomPageSourceFiles(_0x4990e){const _0x23801c=a204_0x4812a1,_0x5de6ce=Object['entries'](_0x4990e)[_0x23801c(0x1cc)](([_0x34925d])=>getParser(_0x34925d));if(!_0x5de6ce[_0x23801c(0x1e1)](([_0x445439])=>isReactSourceFile(_0x445439)))return[{'file':'page\x20files','message':'Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx'}];const _0x53a831=await Promise['all'](_0x5de6ce['map'](async([_0x3cdc2f,_0x27c95f])=>{const _0x540782=_0x23801c;try{return await format(_0x27c95f,{'parser':getParser(_0x3cdc2f)}),undefined;}catch(_0xc25083){return{'file':_0x3cdc2f,'message':_0xc25083 instanceof Error?_0xc25083[_0x540782(0x1d3)]:String(_0xc25083)};}}));return _0x53a831[_0x23801c(0x1cc)](_0x14f374=>_0x14f374!==undefined);}function getParser(_0x1a2880){const _0x4a0f64=a204_0x4812a1,_0x472a77=_0x1a2880[_0x4a0f64(0x1d7)]()[_0x4a0f64(0x1cf)]();return Object[_0x4a0f64(0x1d8)](SOURCE_PARSERS)[_0x4a0f64(0x1da)](([_0x63be0])=>_0x472a77[_0x4a0f64(0x1d2)](_0x63be0))?.[0x1];}function isReactSourceFile(_0x392ebc){const _0x2c35e6=a204_0x4812a1,_0x3f4482=_0x392ebc['trim']()[_0x2c35e6(0x1cf)]();return CUSTOM_PAGE_EXTENSIONS[_0x2c35e6(0x1e1)](_0x5e9a62=>_0x3f4482['endsWith'](_0x5e9a62));}function a204_0x413a(){const _0x3aef90=['.tsx','56178mrheAu','trim','entries','3019356eRNnHS','find','8NJISSq','3727992HcazbP','typescript','187610IPKSql','21990VZuvau','1325zrtKMD','some','filter','babel','221313wsekrU','toLowerCase','4330NobBge','.jsx','endsWith','message','1513477OTSnXr'];a204_0x413a=function(){return _0x3aef90;};return a204_0x413a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a205_0x1a9d(){const _0x1d602f=['apiError','number','page','appCode','appcode','newVersion','2032968DpkVWx','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','942188dAlSmc','compress','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','pageContent','page-content','page-dir','426880hieOFP','/smartapi/webcode/page/update/content','pageId','POST','str','28wgEKQW','isInteger','136gEFwJm','page.custom-update','267639OlDwJq','6012405hQyIjX','6rjrISY','Custom\x20Page\x20ID','17755770ZoYdrv','710541TDkMlz','write'];a205_0x1a9d=function(){return _0x1d602f;};return a205_0x1a9d();}const a205_0x26b7d3=a205_0x2520;(function(_0x1b3de8,_0xa73710){const _0x3e1be2=a205_0x2520,_0x45187c=_0x1b3de8();while(!![]){try{const _0x50936f=parseInt(_0x3e1be2(0x104))/0x1+-parseInt(_0x3e1be2(0x102))/0x2+-parseInt(_0x3e1be2(0x114))/0x3*(parseInt(_0x3e1be2(0x110))/0x4)+parseInt(_0x3e1be2(0x10b))/0x5+parseInt(_0x3e1be2(0x116))/0x6*(parseInt(_0x3e1be2(0x115))/0x7)+-parseInt(_0x3e1be2(0x112))/0x8*(parseInt(_0x3e1be2(0x119))/0x9)+parseInt(_0x3e1be2(0x118))/0xa;if(_0x50936f===_0xa73710)break;else _0x45187c['push'](_0x45187c['shift']());}catch(_0x3a0d97){_0x45187c['push'](_0x45187c['shift']());}}}(a205_0x1a9d,0xa5c24));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_0x26b7d3(0xfe),'command':'custom-update','description':a205_0x26b7d3(0x103),'risk':a205_0x26b7d3(0xfb),'defaultOutputFormat':a205_0x26b7d3(0x105),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a205_0x26b7d3(0x109),'message':'page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'id','type':a205_0x26b7d3(0xfd),'required':!![],'description':a205_0x26b7d3(0x117)},{'name':a205_0x26b7d3(0x10a),'type':'string','required':!![],'description':'Directory\x20containing\x20all\x20complete\x20page\x20files'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2f7f69){readCustomPageId(_0x2f7f69),await readValidatedPageContent(_0x2f7f69);},async 'dryRun'(_0x472fff){const _0x1f5e32=a205_0x26b7d3,_0x42ee18=await readInput(_0x472fff);return{'method':_0x1f5e32(0x10e),'url':_0x1f5e32(0x10c),'body':{'id':_0x42ee18[_0x1f5e32(0x10d)],'codeContent':_0x42ee18[_0x1f5e32(0x108)]},'description':'Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20'+_0x42ee18[_0x1f5e32(0x10d)]+'.'};},async 'execute'(_0x5c38ea){const _0x41df5f=a205_0x26b7d3,_0x2bc56=await readInput(_0x5c38ea),_0x3c4a89=await updateCustomPageContent({'pageId':_0x2bc56['pageId'],'pageContent':_0x2bc56[_0x41df5f(0x108)]});if(!Number[_0x41df5f(0x111)](_0x3c4a89[_0x41df5f(0x101)])||_0x3c4a89['newVersion']<=0x0)throw CliErrors[_0x41df5f(0xfc)](_0x41df5f(0x106));const _0xf52db8=buildCustomPageEditUrl(_0x2bc56[_0x41df5f(0xff)],_0x2bc56[_0x41df5f(0x10d)]),_0x3e235f=await resolveCustomPageDevelopmentUrl(_0x2bc56[_0x41df5f(0xff)],_0x2bc56[_0x41df5f(0x10d)],_0x5c38ea['cookie']);return{'ok':!![],'data':{'operation':_0x41df5f(0x113),'selector':{'appCode':_0x2bc56[_0x41df5f(0xff)],'pageId':_0x2bc56[_0x41df5f(0x10d)]},'before':null,'after':{'pageId':_0x3c4a89[_0x41df5f(0x10d)],'version':_0x3c4a89[_0x41df5f(0x101)],'pageContent':_0x2bc56[_0x41df5f(0x108)]},'dryRun':![],'request':_0x2bc56,..._0x3e235f?{'pageUrl':_0x3e235f}:{},..._0xf52db8?{'editPageUrl':_0xf52db8}:{},'warnings':_0x3e235f?[]:[_0x41df5f(0x107)]},'message':'Updated\x20Custom\x20Page\x20'+_0x2bc56[_0x41df5f(0x10d)]+'.'};}};async function readInput(_0x118a47){const _0x146dd0=a205_0x26b7d3,_0x4cf067=readCustomPageId(_0x118a47),_0x3f3143=_0x118a47[_0x146dd0(0x10f)](_0x146dd0(0x100))['trim']()||(await getCustomPageSource(_0x4cf067))[_0x146dd0(0xff)]?.['trim']();if(!_0x3f3143)throw CliErrors['validation']('Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20'+_0x4cf067+'.');return{'appCode':_0x3f3143,'pageId':_0x4cf067,'pageContent':await readValidatedPageContent(_0x118a47)};}function a205_0x2520(_0x4254a6,_0x3b7e18){_0x4254a6=_0x4254a6-0xfb;const _0x1a9d71=a205_0x1a9d();let _0x2520e8=_0x1a9d71[_0x4254a6];return _0x2520e8;}async function readValidatedPageContent(_0x555afd){const _0x2afaa1=a205_0x26b7d3,_0x49de00=await readCustomPageDirectory(_0x555afd[_0x2afaa1(0x10f)](_0x2afaa1(0x10a)));return await validateCustomPageContent(_0x49de00),_0x49de00;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a206_0x3ec9ad=a206_0x55ea;function a206_0x55ea(_0x12fd9b,_0x5d24ff){_0x12fd9b=_0x12fd9b-0x13e;const _0x9a941f=a206_0x9a94();let _0x55ead8=_0x9a941f[_0x12fd9b];return _0x55ead8;}(function(_0x3f05e6,_0x576a8b){const _0x3c4572=a206_0x55ea,_0x256f1a=_0x3f05e6();while(!![]){try{const _0x1e49b9=parseInt(_0x3c4572(0x148))/0x1+parseInt(_0x3c4572(0x14e))/0x2+-parseInt(_0x3c4572(0x150))/0x3+-parseInt(_0x3c4572(0x144))/0x4+parseInt(_0x3c4572(0x143))/0x5+-parseInt(_0x3c4572(0x14b))/0x6+-parseInt(_0x3c4572(0x152))/0x7;if(_0x1e49b9===_0x576a8b)break;else _0x256f1a['push'](_0x256f1a['shift']());}catch(_0x114b2a){_0x256f1a['push'](_0x256f1a['shift']());}}}(a206_0x9a94,0x2aa52));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_0x3ec9ad(0x147),'command':'data-list-status','description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a206_0x3ec9ad(0x140),'defaultOutputFormat':a206_0x3ec9ad(0x14d),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a206_0x3ec9ad(0x145),'type':a206_0x3ec9ad(0x149),'description':a206_0x3ec9ad(0x153)}],async 'validate'(_0x3b6465){validateDatasetSelector(_0x3b6465);},async 'dryRun'(_0x53cb68){const _0x3742b0=a206_0x3ec9ad,_0x55d852=await loadDatasetDetailForPage(_0x53cb68);return{'method':_0x3742b0(0x146),'url':'/smartapi/lovrabet/dataset/'+_0x55d852[_0x3742b0(0x14a)]+_0x3742b0(0x142)+encodeURIComponent(_0x53cb68[_0x3742b0(0x13e)]),'description':serializeDryRunDescription({'dataset':{'id':_0x55d852['id'],'code':_0x55d852[_0x3742b0(0x14a)],'name':_0x55d852['name']},'action':_0x3742b0(0x14f)})};},async 'execute'(_0x1d28a3){const _0x2f5029=a206_0x3ec9ad,_0x307fb5=await loadDatasetDetailForPage(_0x1d28a3),_0x148177=await loadDataListPageStatusForGenerate(_0x1d28a3,_0x307fb5[_0x2f5029(0x14a)]),_0x4cb516=getUndeletedRelatedPages(_0x307fb5),_0xcf504c=assessDataListPageState(_0x307fb5['code'],_0x148177,{'fallbackUndeletedPages':_0x4cb516});return{'ok':!![],'data':{'datasetCode':_0x307fb5[_0x2f5029(0x14a)],'precheckSource':_0x148177?.['source']??_0x2f5029(0x141),'status':_0xcf504c[_0x2f5029(0x13f)],'manualResolutionRequired':_0xcf504c[_0x2f5029(0x151)],'nextAction':_0xcf504c[_0x2f5029(0x14c)],'dataListPageStatus':_0x148177,'relatedPages':{'total':_0x307fb5['relatedPages']['length'],'undeletedCount':_0x4cb516['length']}}};}};function a206_0x9a94(){const _0xda4c13=['275486AnGGVU','query-data-list-status','224814jiCWxf','manualResolutionRequired','352828bVIkZo','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','appCode','status','read','related-pages-fallback','/standard-page-status?appCode=','350660sBWugr','107776tkCYze','alias','GET','page','131192bLaZSJ','string','code','72642ULtLIL','nextAction','compress'];a206_0x9a94=function(){return _0xda4c13;};return a206_0x9a94();}
|