@lovrabet/rabetbase-cli 2.5.4-beta.3 → 2.5.4-beta.5
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/README.md +8 -2
- 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.d.ts +2 -0
- package/lib/commands/app/detail.js +1 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +3 -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.d.ts +2 -0
- package/lib/commands/menu/shared/path.js +1 -0
- package/lib/commands/menu/shared/service.d.ts +6 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.d.ts +28 -0
- package/lib/commands/menu/shared/subapp-assets.js +1 -0
- package/lib/commands/menu/shared/sync-core.d.ts +2 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +14 -4
- 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.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-status.js +1 -0
- package/lib/commands/menu/subapp-assets-update.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-update.js +1 -0
- 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.d.ts +16 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +22 -13
- package/skills/rabetbase/guides/backend-function.md +2 -7
- package/skills/rabetbase/guides/bff-creation-workflow.md +24 -23
- package/skills/rabetbase/guides/host-frontend-integration.md +62 -0
- package/skills/rabetbase/guides/independent-deployment.md +45 -0
- package/skills/rabetbase/guides/troubleshooting.md +9 -1
- package/skills/rabetbase/references/rabetbase-app-detail.md +31 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +2 -2
- package/skills/rabetbase/references/rabetbase-data-list-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +5 -1
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -7
- package/skills/rabetbase/references/rabetbase-menu-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-status.md +19 -0
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-update.md +27 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +40 -14
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -3
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-user-account.md +8 -8
- package/skills/rabetbase.manifest.json +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a182_0x52a442=a182_0x1304;(function(_0x5f36ad,_0x57d627){const _0x96c578=a182_0x1304,_0x28aecb=_0x5f36ad();while(!![]){try{const _0x30e249=-parseInt(_0x96c578(0x91))/0x1+-parseInt(_0x96c578(0x81))/0x2*(-parseInt(_0x96c578(0x7a))/0x3)+-parseInt(_0x96c578(0x89))/0x4+-parseInt(_0x96c578(0x90))/0x5+-parseInt(_0x96c578(0x8f))/0x6*(parseInt(_0x96c578(0x8b))/0x7)+-parseInt(_0x96c578(0x79))/0x8+parseInt(_0x96c578(0x8d))/0x9;if(_0x30e249===_0x57d627)break;else _0x28aecb['push'](_0x28aecb['shift']());}catch(_0x1316f1){_0x28aecb['push'](_0x28aecb['shift']());}}}(a182_0x2d8a,0xe106b));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a182_0x1304(_0x2d9e4d,_0x2b927d){_0x2d9e4d=_0x2d9e4d-0x79;const _0x2d8a40=a182_0x2d8a();let _0x13042e=_0x2d8a40[_0x2d9e4d];return _0x13042e;}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH='/notification/channel-config/delete',REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x4a0278){const _0x4a000b=a182_0x1304,_0x4b9d58=readNotificationId(_0x4a0278),_0xfac836=await requireExactNotificationConfig(_0x4a0278['appCode'],_0x4b9d58,_0x4a000b(0x88));return{'id':_0x4b9d58,'before':_0xfac836};}export const notificationConfigDelete={'service':'notification','command':a182_0x52a442(0x84),'description':a182_0x52a442(0x7c),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x23ef42){readNotificationId(_0x23ef42),requireNotificationExplicitYes(_0x23ef42);},async 'dryRun'(_0x11b9c6){const _0x328d15=a182_0x52a442,_0x19d4d3=await prepareDelete(_0x11b9c6),_0x2b9fa3=notificationLookupCommand(_0x11b9c6[_0x328d15(0x85)],_0x19d4d3[_0x328d15(0x8a)]['channelType']);return asDryRunResult({'operation':_0x328d15(0x88),'selector':notificationSelector(_0x19d4d3[_0x328d15(0x8a)]),'before':projectNotificationConfig(_0x19d4d3[_0x328d15(0x8a)]),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x2b9fa3}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x76924a){const _0x548975=a182_0x52a442;requireNotificationExplicitYes(_0x76924a);const _0x2a23c5=await prepareDelete(_0x76924a),_0x57c1e0=notificationLookupCommand(_0x76924a[_0x548975(0x85)],_0x2a23c5['before'][_0x548975(0x7d)]);let _0x1852ea=![];try{await deleteNotificationChannelConfig(_0x2a23c5['id'],_0x76924a[_0x548975(0x85)]);}catch(_0x4d408a){if(!isPlatformTransportFailure(_0x4d408a))throw safeApiFailure('delete',_0x548975(0x87),_0x548975(0x80)+_0x57c1e0+_0x548975(0x8e));_0x1852ea=!![];}let _0x3cadc4;try{_0x3cadc4=await listNotificationChannelConfigs(_0x76924a['appCode'],_0x2a23c5[_0x548975(0x8a)][_0x548975(0x7d)]),validateNotificationDeleteReadback(_0x3cadc4,_0x76924a[_0x548975(0x85)],_0x2a23c5[_0x548975(0x8a)][_0x548975(0x7d)]);}catch{throw notificationError(_0x1852ea?_0x548975(0x86):'notification_config_delete_verification_unavailable','Notification\x20config\x20'+_0x2a23c5['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x548975(0x80)+_0x57c1e0+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x3cadc4[_0x548975(0x7f)](_0x231597=>_0x231597['id']===_0x2a23c5['id']))throw notificationError(_0x1852ea?_0x548975(0x86):_0x548975(0x8c),'Notification\x20config\x20'+_0x2a23c5['id']+'\x20remains\x20present\x20after\x20delete.',_0x548975(0x80)+_0x57c1e0+_0x548975(0x82));const _0x5cb903=[REFERENCE_WARNING];return _0x1852ea&&_0x5cb903[_0x548975(0x7e)](_0x548975(0x83)),{'ok':!![],'data':{'operation':_0x548975(0x88),'selector':notificationSelector(_0x2a23c5['before']),'before':projectNotificationConfig(_0x2a23c5['before']),'after':null,'dryRun':![],'backend':{'method':_0x548975(0x7b),'path':DELETE_PATH},'warnings':_0x5cb903,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1852ea,'lookupCommand':_0x57c1e0}},'message':'Deleted\x20notification\x20config\x20'+_0x2a23c5['id']};}};function a182_0x2d8a(){const _0x1c9bfe=['11274fDlcxA','335440NUJUNT','400606CZkELA','5397328jQpDqk','1613583lEtbyi','POST','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','channelType','unshift','some','Inspect\x20with\x20','6mGZXYX',';\x20do\x20not\x20resubmit\x20automatically.','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','config-delete','appCode','notification_config_delete_outcome_unknown','mutation','delete','4850360TijjRh','before','1141EZraZE','notification_config_delete_verification_failed','17724159eUoFzP',';\x20no\x20automatic\x20retry\x20was\x20attempted.'];a182_0x2d8a=function(){return _0x1c9bfe;};return a182_0x2d8a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a183_0x4a4c(_0x5b0271,_0x2b3a59){_0x5b0271=_0x5b0271-0x1b2;const _0x58bc10=a183_0x58bc();let _0x4a4c1a=_0x58bc10[_0x5b0271];return _0x4a4c1a;}const a183_0x30cabb=a183_0x4a4c;(function(_0x160a65,_0x23cb75){const _0x2ed61a=a183_0x4a4c,_0x2373d1=_0x160a65();while(!![]){try{const _0x46fe75=parseInt(_0x2ed61a(0x1b5))/0x1+parseInt(_0x2ed61a(0x1b4))/0x2*(parseInt(_0x2ed61a(0x1c5))/0x3)+-parseInt(_0x2ed61a(0x1b8))/0x4+parseInt(_0x2ed61a(0x1cb))/0x5+parseInt(_0x2ed61a(0x1b3))/0x6+parseInt(_0x2ed61a(0x1bd))/0x7+-parseInt(_0x2ed61a(0x1b9))/0x8*(parseInt(_0x2ed61a(0x1ba))/0x9);if(_0x46fe75===_0x23cb75)break;else _0x2373d1['push'](_0x2373d1['shift']());}catch(_0x1ff554){_0x2373d1['push'](_0x2373d1['shift']());}}}(a183_0x58bc,0x58829));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a183_0x58bc(){const _0x2bb2ab=['config-list','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','appCode','type','length','2556020bmDebG','bool','3340698tNnxKI','42bLfKjZ','550365OmrtCE','all','Found\x20','35484elWWiS','24rvRInR','5749470hjxBhO','str','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','4664184aAasGQ','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','map','notification','Notification\x20channel\x20type','validation','\x20notification\x20config(s)','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','462takvmJ'];a183_0x58bc=function(){return _0x2bb2ab;};return a183_0x58bc();}export const notificationConfigList={'service':a183_0x30cabb(0x1c0),'command':a183_0x30cabb(0x1c6),'description':a183_0x30cabb(0x1c4),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a183_0x30cabb(0x1c9),'type':'string','description':a183_0x30cabb(0x1c1),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':'boolean','default':![],'description':a183_0x30cabb(0x1c7)}],async 'validate'(_0xd37d17){const _0xff2fc9=a183_0x30cabb;if(_0xd37d17[_0xff2fc9(0x1b2)](_0xff2fc9(0x1b6))&&_0xd37d17[_0xff2fc9(0x1bb)](_0xff2fc9(0x1c9))['trim']())throw CliErrors[_0xff2fc9(0x1c2)](_0xff2fc9(0x1bc),_0xff2fc9(0x1be));if(_0xd37d17['bool'](_0xff2fc9(0x1b6)))return;readNotificationChannelType(_0xd37d17);},async 'execute'(_0x3e103f){const _0xc75b8=a183_0x30cabb;if(_0x3e103f['bool'](_0xc75b8(0x1b6))){const _0x378d86=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0xc75b8(0x1bf)](_0x120754=>listNotificationChannelConfigs(_0x3e103f[_0xc75b8(0x1c8)],_0x120754))),_0x5a9e80=_0x378d86['flat']()[_0xc75b8(0x1bf)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3e103f[_0xc75b8(0x1c8)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x5a9e80[_0xc75b8(0x1ca)],'configs':_0x5a9e80},'message':_0xc75b8(0x1b7)+_0x5a9e80['length']+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x1ca068=readNotificationChannelType(_0x3e103f),_0xd0fc87=await listNotificationChannelConfigs(_0x3e103f['appCode'],_0x1ca068),_0x2a18f1=_0xd0fc87[_0xc75b8(0x1bf)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3e103f[_0xc75b8(0x1c8)],'channelType':_0x1ca068,'count':_0x2a18f1[_0xc75b8(0x1ca)],'configs':_0x2a18f1},'message':_0xc75b8(0x1b7)+_0x2a18f1[_0xc75b8(0x1ca)]+'\x20'+_0x1ca068+_0xc75b8(0x1c3)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x35fbcc=a184_0x11f9;(function(_0x231179,_0x393bb1){const _0x5ad826=a184_0x11f9,_0x47b99c=_0x231179();while(!![]){try{const _0x2617ee=parseInt(_0x5ad826(0xf5))/0x1*(-parseInt(_0x5ad826(0xf3))/0x2)+parseInt(_0x5ad826(0x109))/0x3+-parseInt(_0x5ad826(0xfa))/0x4*(parseInt(_0x5ad826(0x10c))/0x5)+parseInt(_0x5ad826(0xfc))/0x6*(-parseInt(_0x5ad826(0x10f))/0x7)+-parseInt(_0x5ad826(0x107))/0x8*(parseInt(_0x5ad826(0xfb))/0x9)+-parseInt(_0x5ad826(0xf4))/0xa+parseInt(_0x5ad826(0x10e))/0xb;if(_0x2617ee===_0x393bb1)break;else _0x47b99c['push'](_0x47b99c['shift']());}catch(_0x33a17e){_0x47b99c['push'](_0x47b99c['shift']());}}}(a184_0x542b,0xb02d2));import{asDryRunResult}from'../../commands/common/dry-run.js';function a184_0x542b(){const _0x73b0b=['153256TlaFPK','notification_config_update_verification_failed','128937lLyhoV','notification_config_update_outcome_unknown','planned','18345BPKYVm','notification','21093743osROEL','35161hGtSef','Notification\x20config\x20','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','/notification/channel-config/update','POST','allMatch','provesChange','14278rQHFeb','1350200mnAWzc','50yWVTze','before','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.',';\x20do\x20not\x20resubmit\x20automatically.','appCode','156zMwUZR','279KbGnrN','12rjICEx','update','\x20via\x20','high-risk-write','verified','Inspect\x20with\x20--id\x20','mutation','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','channelType','verifiedFields'];a184_0x542b=function(){return _0x73b0b;};return a184_0x542b();}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=a184_0x35fbcc(0xef);async function prepareUpdate(_0x3fb942){const _0x2cbbf8=a184_0x35fbcc,_0xa102d4=readNotificationId(_0x3fb942),_0x30387c=await readNotificationDocument(_0x3fb942,_0x2cbbf8(0xfd)),_0x10f73a=await requireExactNotificationConfig(_0x3fb942[_0x2cbbf8(0xf9)],_0xa102d4,_0x2cbbf8(0xfd));return{'id':_0xa102d4,'patch':_0x30387c,'before':_0x10f73a,'payload':mergeUpdateInput(_0x10f73a,_0x30387c),'planned':plannedUpdateProjection(_0x10f73a,_0x30387c)};}function a184_0x11f9(_0x22768d,_0x34e722){_0x22768d=_0x22768d-0xee;const _0x542bb9=a184_0x542b();let _0x11f969=_0x542bb9[_0x22768d];return _0x11f969;}export const notificationConfigUpdate={'service':a184_0x35fbcc(0x10d),'command':'config-update','description':a184_0x35fbcc(0xee),'risk':a184_0x35fbcc(0xff),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x24f765){readNotificationId(_0x24f765),assertSingleNotificationSource(_0x24f765),requireNotificationExplicitYes(_0x24f765);},async 'dryRun'(_0x23c827){const _0x1abcd9=a184_0x35fbcc,_0xb92d69=await prepareUpdate(_0x23c827),_0x1bac03=notificationLookupCommand(_0x23c827[_0x1abcd9(0xf9)],_0xb92d69[_0x1abcd9(0xf6)][_0x1abcd9(0x105)]);return asDryRunResult({'operation':_0x1abcd9(0xfd),'selector':notificationSelector(_0xb92d69[_0x1abcd9(0xf6)]),'before':projectNotificationConfig(_0xb92d69[_0x1abcd9(0xf6)]),'after':_0xb92d69[_0x1abcd9(0x10b)],'dryRun':!![],'backend':{'method':_0x1abcd9(0xf0),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x1abcd9(0x10b),'lookupCommand':_0x1bac03}},{'method':_0x1abcd9(0xf0),'url':UPDATE_PATH});},async 'execute'(_0x233142){const _0x3d872c=a184_0x35fbcc;requireNotificationExplicitYes(_0x233142);const _0x24f97a=await prepareUpdate(_0x233142),_0x4522d5=notificationLookupCommand(_0x233142[_0x3d872c(0xf9)],_0x24f97a[_0x3d872c(0xf6)][_0x3d872c(0x105)]);let _0x4038fd=![];try{await updateNotificationChannelConfig(_0x24f97a['payload']);}catch(_0x496fde){if(!isPlatformTransportFailure(_0x496fde))throw safeApiFailure('update',_0x3d872c(0x102),'Inspect\x20ID\x20'+_0x24f97a['id']+'\x20with\x20'+_0x4522d5+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x4038fd=!![];}let _0x1459a6;try{const _0x32eb76=await getNotificationChannelConfig(_0x24f97a['id'],_0x233142['appCode']);_0x1459a6=normalizeExactNotificationConfig(_0x32eb76,_0x24f97a['id'],_0x233142['appCode']);}catch{throw notificationError(_0x4038fd?'notification_config_update_outcome_unknown':'notification_config_update_verification_unavailable','Notification\x20config\x20'+_0x24f97a['id']+_0x3d872c(0x104),_0x3d872c(0x101)+_0x24f97a['id']+_0x3d872c(0xfe)+_0x4522d5+_0x3d872c(0xf8));}const _0x454031=requestedSafeFieldsMatch(_0x24f97a[_0x3d872c(0xf6)],_0x1459a6,_0x24f97a['patch']);if(!_0x454031[_0x3d872c(0xf1)]||_0x4038fd&&!_0x454031[_0x3d872c(0xf2)])throw notificationError(_0x4038fd?_0x3d872c(0x10a):_0x3d872c(0x108),_0x3d872c(0x110)+_0x24f97a['id']+_0x3d872c(0x103),'Inspect\x20with\x20--id\x20'+_0x24f97a['id']+_0x3d872c(0xfe)+_0x4522d5+_0x3d872c(0xf8));const _0xe5e6ac=_0x4038fd?[_0x3d872c(0xf7)]:[];return{'ok':!![],'data':{'operation':_0x3d872c(0xfd),'selector':notificationSelector(_0x1459a6),'before':projectNotificationConfig(_0x24f97a[_0x3d872c(0xf6)]),'after':projectNotificationConfig(_0x1459a6),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0xe5e6ac,'verification':{'status':_0x3d872c(0x100),'recoveredAfterUnknownResponse':_0x4038fd,'verifiedFields':_0x454031[_0x3d872c(0x106)],'lookupCommand':_0x4522d5}},'message':'Updated\x20notification\x20config\x20'+_0x1459a6['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f1219,_0x361025){const _0x7c4e1c=a185_0x2c25,_0x441560=_0x1f1219();while(!![]){try{const _0x5c11ea=-parseInt(_0x7c4e1c(0xaf))/0x1*(-parseInt(_0x7c4e1c(0xae))/0x2)+parseInt(_0x7c4e1c(0xb4))/0x3+-parseInt(_0x7c4e1c(0xac))/0x4+parseInt(_0x7c4e1c(0xad))/0x5+parseInt(_0x7c4e1c(0xb0))/0x6*(parseInt(_0x7c4e1c(0xb3))/0x7)+-parseInt(_0x7c4e1c(0xb2))/0x8+-parseInt(_0x7c4e1c(0xb1))/0x9;if(_0x5c11ea===_0x361025)break;else _0x441560['push'](_0x441560['shift']());}catch(_0x3031b3){_0x441560['push'](_0x441560['shift']());}}}(a185_0x1f94,0xa95c5));function a185_0x1f94(){const _0xe9a1ce=['94phIuia','247MKdksA','24OwEWhW','7598520ohHqxn','7763216MZJJbN','317541EtyaBe','3974442fEXdaW','923828EPDmwm','6107325HMLgxe'];a185_0x1f94=function(){return _0xe9a1ce;};return a185_0x1f94();}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a185_0x2c25(_0x226eb,_0x375666){_0x226eb=_0x226eb-0xac;const _0x1f94b1=a185_0x1f94();let _0x2c2544=_0x1f94b1[_0x226eb];return _0x2c2544;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a181_0x1fbea3=a181_0x5936;(function(_0x3c3bcb,_0x92c4e5){const _0x1faa46=a181_0x5936,_0x2ea2b7=_0x3c3bcb();while(!![]){try{const _0x17f871=-parseInt(_0x1faa46(0x89))/0x1*(-parseInt(_0x1faa46(0xa6))/0x2)+parseInt(_0x1faa46(0xe8))/0x3+parseInt(_0x1faa46(0xe9))/0x4+-parseInt(_0x1faa46(0xb4))/0x5+-parseInt(_0x1faa46(0x9c))/0x6*(-parseInt(_0x1faa46(0xb8))/0x7)+parseInt(_0x1faa46(0xed))/0x8*(parseInt(_0x1faa46(0xbf))/0x9)+parseInt(_0x1faa46(0xe7))/0xa*(-parseInt(_0x1faa46(0x85))/0xb);if(_0x17f871===_0x92c4e5)break;else _0x2ea2b7['push'](_0x2ea2b7['shift']());}catch(_0x11819b){_0x2ea2b7['push'](_0x2ea2b7['shift']());}}}(a181_0x4113,0x2302d));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=[a181_0x1fbea3(0xc9),a181_0x1fbea3(0xcb),a181_0x1fbea3(0xa8),a181_0x1fbea3(0xe3),a181_0x1fbea3(0xe5)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x1fbea3(0x8c),a181_0x1fbea3(0xaf),a181_0x1fbea3(0x83),a181_0x1fbea3(0x9d),a181_0x1fbea3(0xc6),a181_0x1fbea3(0x81),a181_0x1fbea3(0xab)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a181_0x1fbea3(0xe2),a181_0x1fbea3(0xa9),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x1fbea3(0xd2),a181_0x1fbea3(0xcf),a181_0x1fbea3(0xde),a181_0x1fbea3(0xad),a181_0x1fbea3(0x8f),a181_0x1fbea3(0x84),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a181_0x1fbea3(0x8d),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a181_0x1fbea3(0x86),'type':a181_0x1fbea3(0xf0),'required':![],'default':![],'description':a181_0x1fbea3(0xb3)},{'name':a181_0x1fbea3(0x92),'type':a181_0x1fbea3(0x8d),'required':![],'description':a181_0x1fbea3(0x8b)}];function a181_0x5936(_0x1f8891,_0x6e9ad2){_0x1f8891=_0x1f8891-0x7f;const _0x4113c4=a181_0x4113();let _0x59367f=_0x4113c4[_0x1f8891];return _0x59367f;}export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a181_0x1fbea3(0xe6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0xd3f86b,_0xdc2f08,_0x459cba){return new CliError(_0xd3f86b,0x1,_0xdc2f08,_0x459cba);}export function readNotificationId(_0xfe4a78){const _0x535a16=a181_0x1fbea3,_0x1a637c=_0xfe4a78[_0x535a16(0xb5)]('id');if(!Number['isSafeInteger'](_0x1a637c)||_0x1a637c<=0x0)throw notificationError('notification_config_id_invalid','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x1a637c;}export function requireNotificationExplicitYes(_0x3d02f5){const _0x1e98ab=a181_0x1fbea3;if(_0x3d02f5[_0x1e98ab(0xf5)](_0x1e98ab(0xd7))||_0x3d02f5[_0x1e98ab(0xf5)](_0x1e98ab(0x8a)))return;throw notificationError('notification_config_confirmation_required',_0x1e98ab(0xb1),_0x1e98ab(0xcd));}export function readNotificationChannelType(_0x3d6b4b,_0x3280c1=a181_0x1fbea3(0x80),_0x1a9f08=a181_0x1fbea3(0xc9)){const _0x302f9b=a181_0x1fbea3,_0x12be4c=_0x3d6b4b[_0x302f9b(0x7f)](_0x3280c1)[_0x302f9b(0xc4)]()||_0x1a9f08;if(!NOTIFICATION_CHANNEL_TYPES[_0x302f9b(0xb9)](_0x12be4c))throw CliErrors['validation']('Invalid\x20--'+_0x3280c1+':\x20'+_0x12be4c,_0x302f9b(0xa5)+NOTIFICATION_CHANNEL_TYPES[_0x302f9b(0xb0)](',\x20')+'.');return _0x12be4c;}export function assertSingleNotificationSource(_0x27f882){const _0x44ae11=a181_0x1fbea3,_0x28f0ca=[],_0x3a8b29=_0x27f882[_0x44ae11(0x7f)](_0x44ae11(0xd0))[_0x44ae11(0xc4)]();if(_0x3a8b29)_0x28f0ca[_0x44ae11(0xcc)]({'kind':_0x44ae11(0xd0),'path':_0x3a8b29});if(_0x27f882[_0x44ae11(0xf5)](_0x44ae11(0x86)))_0x28f0ca[_0x44ae11(0xcc)]({'kind':'stdin'});const _0x543912=_0x27f882[_0x44ae11(0x7f)](_0x44ae11(0x92))[_0x44ae11(0xc4)]();if(_0x543912)_0x28f0ca[_0x44ae11(0xcc)]({'kind':_0x44ae11(0xc5),'name':_0x543912});if(_0x28f0ca['length']===0x0)throw CliErrors[_0x44ae11(0x9a)](_0x44ae11(0xbd),_0x44ae11(0xd1));if(_0x28f0ca[_0x44ae11(0xf1)]>0x1)throw CliErrors[_0x44ae11(0x9a)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x44ae11(0xd1));return _0x28f0ca[0x0];}export async function readNotificationDocument(_0x34fb5f,_0x2526bc){const _0x4fcbc0=a181_0x1fbea3,_0x4ecd11=assertSingleNotificationSource(_0x34fb5f),_0x53204b=_0x4ecd11['kind']===_0x4fcbc0(0xd0)?'file\x20'+_0x4ecd11[_0x4fcbc0(0x96)]:_0x4ecd11[_0x4fcbc0(0xfa)]===_0x4fcbc0(0xc5)?_0x4fcbc0(0xaa)+_0x4ecd11[_0x4fcbc0(0xb2)]:_0x4fcbc0(0x86);let _0x28894e;try{if(_0x4ecd11['kind']==='file')_0x28894e=await readFile(_0x4ecd11['path'],_0x4fcbc0(0xe0));else{if(_0x4ecd11[_0x4fcbc0(0xfa)]===_0x4fcbc0(0xc5)){if(!(_0x4ecd11[_0x4fcbc0(0xb2)]in process.env))throw notificationError(_0x4fcbc0(0xda),_0x4fcbc0(0xe1)+_0x4ecd11[_0x4fcbc0(0xb2)]);_0x28894e=process.env[_0x4ecd11.name]??'';}else _0x28894e=await readStdin();}}catch(_0x261c9c){if(_0x261c9c instanceof CliError)throw _0x261c9c;throw notificationError(_0x4fcbc0(0xda),_0x4fcbc0(0xdf)+_0x53204b+'.');}let _0x2b7707;try{_0x2b7707=JSON[_0x4fcbc0(0xfb)](_0x28894e);}catch{throw notificationError(_0x4fcbc0(0x9e),'Notification\x20JSON\x20from\x20'+_0x53204b+_0x4fcbc0(0xca),_0x4fcbc0(0x90));}if(!isJsonObject(_0x2b7707))throw notificationError('notification_config_json_invalid',_0x4fcbc0(0xc2)+_0x53204b+_0x4fcbc0(0xec));return validateNotificationDocument(_0x2b7707,_0x2526bc);}export function projectNotificationListConfig(_0x5f374f,_0x1c6564){const _0x568b36=a181_0x1fbea3;return{'id':typeof _0x5f374f['id']===_0x568b36(0x94)?_0x5f374f['id']:null,'configCode':requireResponseString(_0x5f374f[_0x568b36(0xa9)],'configCode',_0x1c6564),'configName':requireResponseString(_0x5f374f[_0x568b36(0x8c)],'configName',_0x1c6564),'channelType':requireResponseString(_0x5f374f[_0x568b36(0xaf)],_0x568b36(0xaf),_0x1c6564),'description':normalizeNullableString(_0x5f374f[_0x568b36(0xc6)]),'createTime':normalizeNullableString(_0x5f374f['createTime']),'updateTime':normalizeNullableString(_0x5f374f[_0x568b36(0xeb)])};}export function normalizeExactNotificationConfig(_0x1886a7,_0x4aeea2,_0x217d76){const _0x2f5a66=a181_0x1fbea3;if(!Number[_0x2f5a66(0xe4)](_0x1886a7['id'])||_0x1886a7['id']!==_0x4aeea2)throw notificationError('notification_config_response_invalid','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x4aeea2+'.');if(_0x1886a7[_0x2f5a66(0xe2)]!==_0x217d76)throw notificationError(_0x2f5a66(0xbb),_0x2f5a66(0xa4)+_0x4aeea2+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x5e32de=requireExactString(_0x1886a7[_0x2f5a66(0x8c)],_0x2f5a66(0x8c),_0x4aeea2),_0x20b7b0=requireExactString(_0x1886a7[_0x2f5a66(0xa9)],_0x2f5a66(0xa9),_0x4aeea2),_0x50cdc4=requireExactString(_0x1886a7[_0x2f5a66(0xaf)],_0x2f5a66(0xaf),_0x4aeea2);if(!NOTIFICATION_CHANNEL_TYPES[_0x2f5a66(0xb9)](_0x50cdc4))throw notificationError(_0x2f5a66(0xbb),_0x2f5a66(0xa4)+_0x4aeea2+_0x2f5a66(0xa0));const _0x1fe313=responseNullableString(_0x1886a7[_0x2f5a66(0x83)],'endpointUrl',_0x4aeea2),_0x31788f=responseNullableString(_0x1886a7[_0x2f5a66(0x9d)],_0x2f5a66(0x9d),_0x4aeea2),_0x3a8ec0=responseNullableString(_0x1886a7['description'],_0x2f5a66(0xc6),_0x4aeea2),_0x46846a=responseNullableTimeout(_0x1886a7[_0x2f5a66(0x81)],'connectTimeout',_0x4aeea2),_0x4c7d09=responseNullableTimeout(_0x1886a7['readTimeout'],_0x2f5a66(0xab),_0x4aeea2);return{'id':_0x4aeea2,'appCode':_0x217d76,'configCode':_0x20b7b0,'configName':_0x5e32de,'channelType':_0x50cdc4,'endpointUrl':redactSensitive(_0x1fe313),'channelConfig':redactSensitive(_0x31788f),'description':_0x3a8ec0,'connectTimeout':_0x46846a,'readTimeout':_0x4c7d09,'endpointUrlRaw':_0x1fe313,'channelConfigRaw':_0x31788f};}function a181_0x4113(){const _0x148320=['notification_config_field_unknown','recipients','file','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','emailTargets','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','isArray','failed','\x20failed.','dry-run','\x20--type\x20','channelConfigRaw','notification_config_source_unavailable','Invalid\x20notification\x20config\x20response.','mutation','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','ccList','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','utf8','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','appCode','WECOM','isSafeInteger','WEBHOOK','Application-level\x20notification\x20config\x20ID','410aowWZF','627777NvMIAF','650196WIYHDH','every','updateTime','\x20must\x20be\x20an\x20object.','316264sSUbAw','\x22\x20must\x20be\x20a\x20non-empty\x20string.','rabetbase\x20notification\x20config-list\x20--appcode\x20','boolean','length','call','Unknown\x20notification\x20JSON\x20field\x20\x22','preflight','bool','a\x20non-empty\x20string','create','notification_config_field_invalid','Item\x20','kind','parse','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Notification\x20config\x20list\x20item\x20','str','type','connectTimeout','endpointUrlRaw','endpointUrl','subjectPrefix','166298QbIQjN','stdin','prototype','a\x20supported\x20string','91hJvlnA','yes','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','configName','string','\x20characters.','replyTo','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','has','from-env','Notification\x20JSON\x20field\x20\x22','number','object','path','\x20has\x20an\x20invalid\x20id.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','\x20has\x20invalid\x20field\x20\x22','validation','<redacted>','1063872fXDkVM','channelConfig','notification_config_json_invalid','\x20has\x20an\x20invalid\x20appCode.','\x20has\x20an\x20unsupported\x20channelType.','Create\x20JSON\x20requires\x20field\x20','some','stringify','Notification\x20config\x20','Allowed\x20values:\x20','1642PpeRXc','\x20--format\x20compress','DINGTALK','configCode','environment\x20variable\x20','readTimeout','notification_config_field_required','bccList','a\x20JSON\x20object\x20or\x20null','channelType','join','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','name','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','488930cdutaF','num','notification_config_','endpointUrl:null','7rFVAkg','includes','setEncoding','notification_config_response_invalid','update','Missing\x20notification\x20JSON\x20source.','messageTemplate','54TjFxSB','a\x20JSON\x20object','keys','Notification\x20JSON\x20from\x20','\x22channelType\x22.','trim','env','description','a\x20string\x20or\x20null','apiError','EMAIL','\x20is\x20invalid.','FEISHU','push','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.'];a181_0x4113=function(){return _0x148320;};return a181_0x4113();}export async function requireExactNotificationConfig(_0x50e01b,_0x3bfd2b,_0x570943){const _0x50f277=a181_0x1fbea3;let _0x18c723;try{_0x18c723=await getNotificationChannelConfig(_0x3bfd2b,_0x50e01b);}catch{throw safeApiFailure(_0x570943,_0x50f277(0xf4),_0x50f277(0xfc)+_0x50e01b+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x18c723,_0x3bfd2b,_0x50e01b);}export function projectNotificationConfig(_0x42e72b){const _0xdf806a=a181_0x1fbea3;return{'id':_0x42e72b['id']??null,'appCode':_0x42e72b[_0xdf806a(0xe2)],'configCode':_0x42e72b['configCode']??null,'configName':_0x42e72b[_0xdf806a(0x8c)],'channelType':_0x42e72b[_0xdf806a(0xaf)],'endpointUrl':redactSensitive(_0x42e72b[_0xdf806a(0x83)]),'channelConfig':redactSensitive(_0x42e72b[_0xdf806a(0x9d)]),'description':_0x42e72b[_0xdf806a(0xc6)]??null,'connectTimeout':_0x42e72b[_0xdf806a(0x81)]??null,'readTimeout':_0x42e72b[_0xdf806a(0xab)]??null};}export function notificationSelector(_0x1e0abe){const _0x57c50a=a181_0x1fbea3;return{'appCode':_0x1e0abe[_0x57c50a(0xe2)],'id':_0x1e0abe['id'],'configCode':_0x1e0abe[_0x57c50a(0xa9)],'configName':_0x1e0abe[_0x57c50a(0x8c)],'channelType':_0x1e0abe[_0x57c50a(0xaf)]};}export function createMutationInput(_0x3bf05b,_0x508e15){const _0x1d5198=a181_0x1fbea3;return{'appCode':_0x3bf05b,'configName':_0x508e15['configName'],'channelType':_0x508e15[_0x1d5198(0xaf)],...hasOwn(_0x508e15,_0x1d5198(0x83))?{'endpointUrl':_0x508e15[_0x1d5198(0x83)]}:{},...hasOwn(_0x508e15,_0x1d5198(0x9d))?{'channelConfig':serializeChannelConfig(_0x508e15['channelConfig'])}:{},...hasOwn(_0x508e15,_0x1d5198(0xc6))?{'description':_0x508e15[_0x1d5198(0xc6)]}:{},...hasOwn(_0x508e15,_0x1d5198(0x81))?{'connectTimeout':_0x508e15[_0x1d5198(0x81)]}:{},...hasOwn(_0x508e15,_0x1d5198(0xab))?{'readTimeout':_0x508e15[_0x1d5198(0xab)]}:{}};}export function mergeUpdateInput(_0x3892f0,_0x2c5ad5){const _0x4d42c6=a181_0x1fbea3;return{'id':_0x3892f0['id'],'appCode':_0x3892f0[_0x4d42c6(0xe2)],'configName':_0x2c5ad5[_0x4d42c6(0x8c)]??_0x3892f0[_0x4d42c6(0x8c)],'channelType':_0x2c5ad5[_0x4d42c6(0xaf)]??_0x3892f0[_0x4d42c6(0xaf)],'endpointUrl':hasOwn(_0x2c5ad5,_0x4d42c6(0x83))?_0x2c5ad5[_0x4d42c6(0x83)]:_0x3892f0[_0x4d42c6(0x82)],'channelConfig':hasOwn(_0x2c5ad5,_0x4d42c6(0x9d))?serializeChannelConfig(_0x2c5ad5[_0x4d42c6(0x9d)]):_0x3892f0[_0x4d42c6(0xd9)],'description':hasOwn(_0x2c5ad5,'description')?_0x2c5ad5[_0x4d42c6(0xc6)]:_0x3892f0[_0x4d42c6(0xc6)],'connectTimeout':hasOwn(_0x2c5ad5,_0x4d42c6(0x81))?_0x2c5ad5[_0x4d42c6(0x81)]:_0x3892f0[_0x4d42c6(0x81)],'readTimeout':hasOwn(_0x2c5ad5,_0x4d42c6(0xab))?_0x2c5ad5['readTimeout']:_0x3892f0[_0x4d42c6(0xab)]};}export function plannedUpdateProjection(_0x60491d,_0x1a2734){const _0x5c6905=a181_0x1fbea3;return projectNotificationConfig({'id':_0x60491d['id'],'appCode':_0x60491d[_0x5c6905(0xe2)],'configCode':_0x60491d[_0x5c6905(0xa9)],'configName':_0x1a2734['configName']??_0x60491d['configName'],'channelType':_0x1a2734[_0x5c6905(0xaf)]??_0x60491d[_0x5c6905(0xaf)],'endpointUrl':hasOwn(_0x1a2734,_0x5c6905(0x83))?_0x1a2734[_0x5c6905(0x83)]:_0x60491d[_0x5c6905(0x82)],'channelConfig':hasOwn(_0x1a2734,'channelConfig')?_0x1a2734[_0x5c6905(0x9d)]:_0x60491d[_0x5c6905(0xd9)],'description':hasOwn(_0x1a2734,_0x5c6905(0xc6))?_0x1a2734[_0x5c6905(0xc6)]:_0x60491d['description'],'connectTimeout':hasOwn(_0x1a2734,_0x5c6905(0x81))?_0x1a2734[_0x5c6905(0x81)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x60491d['connectTimeout'],'readTimeout':hasOwn(_0x1a2734,_0x5c6905(0xab))?_0x1a2734['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x60491d[_0x5c6905(0xab)]});}export function requestedSafeFieldsMatch(_0x1d95ff,_0x388984,_0x2ee1e7){const _0x441aee=a181_0x1fbea3,_0x52ac72=[],_0x4049b0=[],_0x7fe1f4=[];for(const _0x5f04d2 of[_0x441aee(0x8c),'channelType',_0x441aee(0xc6)]){if(!hasOwn(_0x2ee1e7,_0x5f04d2))continue;_0x7fe1f4[_0x441aee(0xcc)](_0x5f04d2),_0x52ac72[_0x441aee(0xcc)](_0x388984[_0x5f04d2]===_0x2ee1e7[_0x5f04d2]),_0x4049b0[_0x441aee(0xcc)](_0x1d95ff[_0x5f04d2]!==_0x2ee1e7[_0x5f04d2]&&_0x388984[_0x5f04d2]===_0x2ee1e7[_0x5f04d2]);}for(const _0x3d76a9 of[_0x441aee(0x81),_0x441aee(0xab)]){if(!hasOwn(_0x2ee1e7,_0x3d76a9))continue;const _0x49f197=_0x2ee1e7[_0x3d76a9]??(_0x3d76a9===_0x441aee(0x81)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x7fe1f4['push'](_0x3d76a9),_0x52ac72[_0x441aee(0xcc)](_0x388984[_0x3d76a9]===_0x49f197),_0x4049b0['push'](_0x1d95ff[_0x3d76a9]!==_0x49f197&&_0x388984[_0x3d76a9]===_0x49f197);}return hasOwn(_0x2ee1e7,_0x441aee(0x83))&&_0x2ee1e7['endpointUrl']===null&&(_0x7fe1f4['push'](_0x441aee(0xb7)),_0x52ac72[_0x441aee(0xcc)](_0x388984[_0x441aee(0x82)]===null||_0x388984[_0x441aee(0x82)]===''),_0x4049b0[_0x441aee(0xcc)](_0x1d95ff[_0x441aee(0x82)]!==null&&_0x1d95ff[_0x441aee(0x82)]!==''&&(_0x388984[_0x441aee(0x82)]===null||_0x388984[_0x441aee(0x82)]===''))),{'allMatch':_0x52ac72[_0x441aee(0xea)](Boolean),'provesChange':_0x4049b0[_0x441aee(0xa2)](Boolean),'verifiedFields':_0x7fe1f4};}export function validateNotificationDeleteReadback(_0xd352f4,_0x10f563,_0x4377ec){const _0xf9edeb=a181_0x1fbea3;for(const [_0x52e963,_0x10d3db]of _0xd352f4['entries']()){if(!Number['isSafeInteger'](_0x10d3db['id'])||_0x10d3db['id']<=0x0)throw notificationError('notification_config_response_invalid',_0xf9edeb(0xfd)+(_0x52e963+0x1)+_0xf9edeb(0x97));if(_0x10d3db[_0xf9edeb(0xe2)]!==_0x10f563)throw notificationError(_0xf9edeb(0xbb),_0xf9edeb(0xfd)+(_0x52e963+0x1)+_0xf9edeb(0x9f));if(_0x10d3db[_0xf9edeb(0xaf)]!==_0x4377ec)throw notificationError('notification_config_response_invalid',_0xf9edeb(0xfd)+(_0x52e963+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x18d1ba,_0x199889,_0x17e7c8){const _0x301240=a181_0x1fbea3;return notificationError(_0x301240(0xb6)+_0x18d1ba+'_'+(_0x199889===_0x301240(0xdc)?_0x301240(0xd5):_0x199889+'_unavailable'),_0x301240(0xa4)+_0x18d1ba+'\x20'+_0x199889+_0x301240(0xd6),_0x17e7c8);}export function notificationLookupCommand(_0x5b3d53,_0xe8ac21){const _0x500c97=a181_0x1fbea3;return _0x500c97(0xef)+_0x5b3d53+_0x500c97(0xd8)+_0xe8ac21+_0x500c97(0xa7);}function validateNotificationDocument(_0x1ec33c,_0x41fcfd){const _0x1500fe=a181_0x1fbea3;for(const _0x2c14de of Object[_0x1500fe(0xc1)](_0x1ec33c)){if(FORBIDDEN_IDENTITY_FIELDS[_0x1500fe(0x91)](_0x2c14de))throw notificationError('notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22'+_0x2c14de+_0x1500fe(0xd3));if(!ALLOWED_INPUT_FIELDS['has'](_0x2c14de))throw notificationError(_0x1500fe(0xce),_0x1500fe(0xf3)+_0x2c14de+'\x22.');}if(_0x41fcfd==='update'&&Object[_0x1500fe(0xc1)](_0x1ec33c)[_0x1500fe(0xf1)]===0x0)throw notificationError('notification_config_update_empty',_0x1500fe(0x98));const _0xff5585={};if(hasOwn(_0x1ec33c,_0x1500fe(0x8c)))_0xff5585[_0x1500fe(0x8c)]=validateRequiredString(_0x1ec33c[_0x1500fe(0x8c)],'configName',0x80);else{if(_0x41fcfd==='create')throw notificationError('notification_config_field_required',_0x1500fe(0xa1)+'\x22configName\x22.');}if(hasOwn(_0x1ec33c,'channelType')){if(typeof _0x1ec33c[_0x1500fe(0xaf)]!==_0x1500fe(0x8d))throw invalidFieldType(_0x1500fe(0xaf),_0x1500fe(0x88));const _0x124754=_0x1ec33c[_0x1500fe(0xaf)][_0x1500fe(0xc4)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x1500fe(0xb9)](_0x124754))throw notificationError(_0x1500fe(0xf8),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x1500fe(0xb0)](',\x20')+'.');_0xff5585[_0x1500fe(0xaf)]=_0x124754;}else{if(_0x41fcfd===_0x1500fe(0xf7))throw notificationError(_0x1500fe(0xac),_0x1500fe(0xa1)+_0x1500fe(0xc3));}for(const [_0x5e8e29,_0x3fbddd]of[[_0x1500fe(0x83),0x200],['description',0x100]]){if(!hasOwn(_0x1ec33c,_0x5e8e29))continue;const _0x3a106a=_0x1ec33c[_0x5e8e29];if(_0x3a106a!==null&&typeof _0x3a106a!==_0x1500fe(0x8d))throw invalidFieldType(_0x5e8e29,_0x1500fe(0xc7));if(typeof _0x3a106a===_0x1500fe(0x8d)&&_0x3a106a[_0x1500fe(0xf1)]>_0x3fbddd)throw notificationError(_0x1500fe(0xf8),'Notification\x20JSON\x20field\x20\x22'+_0x5e8e29+'\x22\x20cannot\x20exceed\x20'+_0x3fbddd+_0x1500fe(0x8e));_0xff5585[_0x5e8e29]=_0x3a106a;}if(hasOwn(_0x1ec33c,_0x1500fe(0x9d))){const _0x4b7b00=_0x1ec33c[_0x1500fe(0x9d)];if(_0x4b7b00===null&&_0x41fcfd===_0x1500fe(0xf7))throw invalidFieldType('channelConfig',_0x1500fe(0xc0));if(_0x4b7b00!==null&&!isJsonObject(_0x4b7b00))throw invalidFieldType(_0x1500fe(0x9d),_0x41fcfd===_0x1500fe(0xbc)?_0x1500fe(0xae):_0x1500fe(0xc0));_0x4b7b00!==null&&validateChannelConfigFields(_0xff5585[_0x1500fe(0xaf)],_0x4b7b00),_0xff5585[_0x1500fe(0x9d)]=_0x4b7b00;}for(const _0x2e39d7 of[_0x1500fe(0x81),_0x1500fe(0xab)]){if(!hasOwn(_0x1ec33c,_0x2e39d7))continue;const _0x1de916=_0x1ec33c[_0x2e39d7];if(_0x1de916!==null&&(!Number[_0x1500fe(0xe4)](_0x1de916)||_0x1de916<0x0))throw notificationError('notification_config_field_invalid',_0x1500fe(0x93)+_0x2e39d7+_0x1500fe(0xdd));_0xff5585[_0x2e39d7]=_0x1de916;}return _0xff5585;}function validateRequiredString(_0x22f68c,_0x2df928,_0x11369f){const _0x158a3f=a181_0x1fbea3;if(typeof _0x22f68c!=='string')throw invalidFieldType(_0x2df928,_0x158a3f(0xf6));const _0x42f52a=_0x22f68c['trim']();if(!_0x42f52a)throw notificationError(_0x158a3f(0xf8),_0x158a3f(0x93)+_0x2df928+_0x158a3f(0xee));if(_0x42f52a[_0x158a3f(0xf1)]>_0x11369f)throw notificationError(_0x158a3f(0xf8),_0x158a3f(0x93)+_0x2df928+'\x22\x20cannot\x20exceed\x20'+_0x11369f+_0x158a3f(0x8e));return _0x42f52a;}function validateChannelConfigFields(_0x15283e,_0x410f79){const _0x1577c7=a181_0x1fbea3;if(hasOwn(_0x410f79,_0x1577c7(0xbe)))throw forbiddenChannelConfigField(_0x1577c7(0xbe));if(_0x15283e===_0x1577c7(0xc9))for(const _0x2e8e0a of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x410f79,_0x2e8e0a))throw forbiddenChannelConfigField(_0x2e8e0a);}}function forbiddenChannelConfigField(_0x569542){return notificationError('notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x569542+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x441a4d,_0x347ff1){const _0x39eb24=a181_0x1fbea3;return notificationError(_0x39eb24(0xf8),_0x39eb24(0x93)+_0x441a4d+'\x22\x20must\x20be\x20'+_0x347ff1+'.');}function serializeChannelConfig(_0x312c77){const _0x4586fa=a181_0x1fbea3;return _0x312c77===null||_0x312c77===undefined?null:JSON[_0x4586fa(0xa3)](_0x312c77);}function redactSensitive(_0x5731c7){const _0x169783=a181_0x1fbea3;return _0x5731c7===null||_0x5731c7===undefined||_0x5731c7===''?null:_0x169783(0x9b);}function requireResponseString(_0x59e8d0,_0x3ac716,_0xe9098f){const _0x5670db=a181_0x1fbea3;if(typeof _0x59e8d0!==_0x5670db(0x8d)||_0x59e8d0['trim']()==='')throw CliErrors[_0x5670db(0xc8)](_0x5670db(0xdb),_0x5670db(0xf9)+(_0xe9098f+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x3ac716+'\x22.');return _0x59e8d0[_0x5670db(0xc4)]();}function requireExactString(_0x15c098,_0x386ca3,_0x43bd5d){const _0x1c9814=a181_0x1fbea3;if(typeof _0x15c098!==_0x1c9814(0x8d)||_0x15c098[_0x1c9814(0xc4)]()==='')throw notificationError(_0x1c9814(0xbb),'Notification\x20config\x20'+_0x43bd5d+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x386ca3+'\x22.');return _0x15c098[_0x1c9814(0xc4)]();}function responseNullableString(_0x508ab2,_0x40d518,_0x4c6c36){const _0x2ad010=a181_0x1fbea3;if(_0x508ab2===undefined||_0x508ab2===null)return null;if(typeof _0x508ab2!==_0x2ad010(0x8d))throw notificationError(_0x2ad010(0xbb),'Notification\x20config\x20'+_0x4c6c36+_0x2ad010(0x99)+_0x40d518+'\x22.');return _0x508ab2;}function responseNullableTimeout(_0x64192b,_0x2c9815,_0x2dda02){const _0x144591=a181_0x1fbea3;if(_0x64192b===undefined||_0x64192b===null)return null;if(!Number[_0x144591(0xe4)](_0x64192b)||_0x64192b<0x0)throw notificationError(_0x144591(0xbb),_0x144591(0xa4)+_0x2dda02+_0x144591(0x99)+_0x2c9815+'\x22.');return _0x64192b;}function normalizeNullableString(_0x5a4f02){return typeof _0x5a4f02==='string'?_0x5a4f02:null;}function isJsonObject(_0x578452){const _0x2257be=a181_0x1fbea3;return _0x578452!==null&&typeof _0x578452===_0x2257be(0x95)&&!Array[_0x2257be(0xd4)](_0x578452);}function hasOwn(_0xc7158d,_0x51d492){const _0x344b07=a181_0x1fbea3;return Object[_0x344b07(0x87)]['hasOwnProperty'][_0x344b07(0xf2)](_0xc7158d,_0x51d492);}async function readStdin(){const _0x1cad08=a181_0x1fbea3;let _0xf9a33c='';process[_0x1cad08(0x86)][_0x1cad08(0xba)](_0x1cad08(0xe0));for await(const _0x17f117 of process['stdin'])_0xf9a33c+=_0x17f117;return _0xf9a33c;}
|
|
1
|
+
function a186_0x524f(){const _0x29815f=['\x20characters.','rabetbase\x20notification\x20config-list\x20--appcode\x20','every','boolean','5070968dGrqJc','a\x20string\x20or\x20null','notification_config_source_unavailable','13291443fCMbLm','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Create\x20JSON\x20requires\x20field\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','length','appCode','utf8','DINGTALK','notification_config_update_empty','prototype','882472NRBBjp','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','path','create','4858032pFYzfd','type','\x20is\x20invalid.','description','\x22\x20is\x20forbidden.','Notification\x20config\x20','file','\x22\x20must\x20be\x20a\x20non-empty\x20string.','7TfmdZw','file\x20','notification_config_field_forbidden','push','updateTime','2bxnRzM','Missing\x20notification\x20JSON\x20source.','number','configCode','Unknown\x20notification\x20JSON\x20field\x20\x22','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','name','WEBHOOK','\x22\x20cannot\x20exceed\x20','yes','replyTo','num','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','mutation','connectTimeout','1511070tjjryI','emailTargets','\x20has\x20an\x20unsupported\x20channelType.','\x20has\x20an\x20invalid\x20id.','setEncoding','call','endpointUrlRaw','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','bool','EMAIL','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','has','recipients','\x20--format\x20compress','<redacted>','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','string','readTimeout','kind','Item\x20','stdin','some','endpointUrl','keys','fromName','update','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x22channelType\x22.','str','env','Allowed\x20values:\x20','bccList','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','notification_config_confirmation_required','\x20has\x20an\x20invalid\x20appCode.','isSafeInteger','join','notification_config_channel_field_forbidden','Application-level\x20notification\x20config\x20ID','parse','11898HTIYoW','a\x20JSON\x20object','a\x20JSON\x20object\x20or\x20null','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20field\x20\x22','configName','\x20has\x20invalid\x20field\x20\x22','notification_config_field_unknown','\x20must\x20be\x20an\x20object.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','endpointUrl:null','channelType','\x20is\x20missing\x20required\x20field\x20\x22','\x20--type\x20','from-env','notification_config_response_invalid','channelConfig','1485zZLEkO','environment\x20variable\x20','validation','includes','stringify','notification_config_json_invalid','Invalid\x20notification\x20config\x20response.','notification_config_field_required','createTime','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','ccList','notification_config_id_invalid','trim','channelCode','notification_config_field_invalid','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Notification\x20JSON\x20from\x20','isArray','1335762nhHaVQ','object'];a186_0x524f=function(){return _0x29815f;};return a186_0x524f();}const a186_0x24a8d0=a186_0x4be6;(function(_0x4de708,_0x215510){const _0x2d846d=a186_0x4be6,_0x509a7e=_0x4de708();while(!![]){try{const _0x514a44=parseInt(_0x2d846d(0x1f0))/0x1*(parseInt(_0x2d846d(0x201))/0x2)+parseInt(_0x2d846d(0x1dc))/0x3+parseInt(_0x2d846d(0x1f4))/0x4+-parseInt(_0x2d846d(0x1ca))/0x5*(parseInt(_0x2d846d(0x1b9))/0x6)+-parseInt(_0x2d846d(0x1fc))/0x7*(-parseInt(_0x2d846d(0x1e2))/0x8)+-parseInt(_0x2d846d(0x1e5))/0x9+-parseInt(_0x2d846d(0x210))/0xa;if(_0x514a44===_0x215510)break;else _0x509a7e['push'](_0x509a7e['shift']());}catch(_0x14e065){_0x509a7e['push'](_0x509a7e['shift']());}}}(a186_0x524f,0xea2f4));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a186_0x24a8d0(0x219),'FEISHU',a186_0x24a8d0(0x1ed),'WECOM',a186_0x24a8d0(0x208)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a186_0x24a8d0(0x1be),a186_0x24a8d0(0x1c4),a186_0x24a8d0(0x1a7),a186_0x24a8d0(0x1c9),a186_0x24a8d0(0x1f7),a186_0x24a8d0(0x20f),a186_0x24a8d0(0x1a2)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode','configCode',a186_0x24a8d0(0x1d7)]),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x24a8d0(0x211),a186_0x24a8d0(0x19d),a186_0x24a8d0(0x1d4),a186_0x24a8d0(0x1b0),a186_0x24a8d0(0x20b),'subjectPrefix',a186_0x24a8d0(0x1a9),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':'string','required':![],'description':a186_0x24a8d0(0x20d)},{'name':'stdin','type':a186_0x24a8d0(0x1e1),'required':![],'default':![],'description':a186_0x24a8d0(0x1f1)},{'name':a186_0x24a8d0(0x1c7),'type':a186_0x24a8d0(0x1a1),'required':![],'description':a186_0x24a8d0(0x1e6)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a186_0x24a8d0(0x203),'required':!![],'description':a186_0x24a8d0(0x1b7)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2f70ef,_0x39927d,_0x2e2306){return new CliError(_0x2f70ef,0x1,_0x39927d,_0x2e2306);}export function readNotificationId(_0x44f0ab){const _0x87576e=a186_0x24a8d0,_0xc47c0=_0x44f0ab[_0x87576e(0x20c)]('id');if(!Number['isSafeInteger'](_0xc47c0)||_0xc47c0<=0x0)throw notificationError(_0x87576e(0x1d5),_0x87576e(0x1d3));return _0xc47c0;}export function requireNotificationExplicitYes(_0x5c6962){const _0x423e06=a186_0x24a8d0;if(_0x5c6962[_0x423e06(0x218)]('dry-run')||_0x5c6962[_0x423e06(0x218)](_0x423e06(0x20a)))return;throw notificationError(_0x423e06(0x1b2),_0x423e06(0x1b1),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x3ebbc4,_0x43d12f=a186_0x24a8d0(0x1f5),_0x4fe89d=a186_0x24a8d0(0x219)){const _0x30dc5e=a186_0x24a8d0,_0x6cce8e=_0x3ebbc4[_0x30dc5e(0x1ad)](_0x43d12f)['trim']()||_0x4fe89d;if(!NOTIFICATION_CHANNEL_TYPES[_0x30dc5e(0x1cd)](_0x6cce8e))throw CliErrors[_0x30dc5e(0x1cc)]('Invalid\x20--'+_0x43d12f+':\x20'+_0x6cce8e,_0x30dc5e(0x1af)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x6cce8e;}export function assertSingleNotificationSource(_0x58bbd1){const _0x247445=a186_0x24a8d0,_0x9bfec9=[],_0x484a44=_0x58bbd1[_0x247445(0x1ad)]('file')[_0x247445(0x1d6)]();if(_0x484a44)_0x9bfec9[_0x247445(0x1ff)]({'kind':'file','path':_0x484a44});if(_0x58bbd1['bool'](_0x247445(0x1a5)))_0x9bfec9[_0x247445(0x1ff)]({'kind':_0x247445(0x1a5)});const _0x56c555=_0x58bbd1['str']('from-env')[_0x247445(0x1d6)]();if(_0x56c555)_0x9bfec9[_0x247445(0x1ff)]({'kind':_0x247445(0x1ae),'name':_0x56c555});if(_0x9bfec9[_0x247445(0x1ea)]===0x0)throw CliErrors['validation'](_0x247445(0x202),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x9bfec9['length']>0x1)throw CliErrors['validation']('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x247445(0x1e9));return _0x9bfec9[0x0];}export async function readNotificationDocument(_0x44d1ea,_0x993e1e){const _0x332295=a186_0x24a8d0,_0x5b1df5=assertSingleNotificationSource(_0x44d1ea),_0x245a82=_0x5b1df5[_0x332295(0x1a3)]===_0x332295(0x1fa)?_0x332295(0x1fd)+_0x5b1df5[_0x332295(0x1f2)]:_0x5b1df5['kind']===_0x332295(0x1ae)?_0x332295(0x1cb)+_0x5b1df5[_0x332295(0x207)]:'stdin';let _0x37e051;try{if(_0x5b1df5[_0x332295(0x1a3)]===_0x332295(0x1fa))_0x37e051=await readFile(_0x5b1df5[_0x332295(0x1f2)],_0x332295(0x1ec));else{if(_0x5b1df5[_0x332295(0x1a3)]===_0x332295(0x1ae)){if(!(_0x5b1df5[_0x332295(0x207)]in process.env))throw notificationError('notification_config_source_unavailable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x5b1df5['name']);_0x37e051=process.env[_0x5b1df5.name]??'';}else _0x37e051=await readStdin();}}catch(_0x7bb10e){if(_0x7bb10e instanceof CliError)throw _0x7bb10e;throw notificationError(_0x332295(0x1e4),_0x332295(0x1c2)+_0x245a82+'.');}let _0x99a934;try{_0x99a934=JSON[_0x332295(0x1b8)](_0x37e051);}catch{throw notificationError(_0x332295(0x1cf),_0x332295(0x1da)+_0x245a82+_0x332295(0x1f6),_0x332295(0x1d9));}if(!isJsonObject(_0x99a934))throw notificationError(_0x332295(0x1cf),_0x332295(0x1da)+_0x245a82+_0x332295(0x1c1));return validateNotificationDocument(_0x99a934,_0x993e1e);}export function projectNotificationListConfig(_0x2d2ad6,_0x1d4317){const _0x17c42f=a186_0x24a8d0;return{'id':typeof _0x2d2ad6['id']===_0x17c42f(0x203)?_0x2d2ad6['id']:null,'configCode':requireResponseString(_0x2d2ad6['configCode'],_0x17c42f(0x204),_0x1d4317),'configName':requireResponseString(_0x2d2ad6['configName'],_0x17c42f(0x1be),_0x1d4317),'channelType':requireResponseString(_0x2d2ad6[_0x17c42f(0x1c4)],_0x17c42f(0x1c4),_0x1d4317),'description':normalizeNullableString(_0x2d2ad6[_0x17c42f(0x1f7)]),'createTime':normalizeNullableString(_0x2d2ad6[_0x17c42f(0x1d2)]),'updateTime':normalizeNullableString(_0x2d2ad6[_0x17c42f(0x200)])};}export function normalizeExactNotificationConfig(_0x5da4dc,_0x3677f0,_0x93fd16){const _0x137028=a186_0x24a8d0;if(!Number['isSafeInteger'](_0x5da4dc['id'])||_0x5da4dc['id']!==_0x3677f0)throw notificationError('notification_config_response_invalid',_0x137028(0x1e7)+_0x3677f0+'.');if(_0x5da4dc[_0x137028(0x1eb)]!==_0x93fd16)throw notificationError(_0x137028(0x1c8),_0x137028(0x1f9)+_0x3677f0+_0x137028(0x217));const _0x415fb6=requireExactString(_0x5da4dc[_0x137028(0x1be)],'configName',_0x3677f0),_0x3b79dc=requireExactString(_0x5da4dc[_0x137028(0x204)],_0x137028(0x204),_0x3677f0),_0xb76d9e=requireExactString(_0x5da4dc['channelType'],_0x137028(0x1c4),_0x3677f0);if(!NOTIFICATION_CHANNEL_TYPES[_0x137028(0x1cd)](_0xb76d9e))throw notificationError('notification_config_response_invalid',_0x137028(0x1f9)+_0x3677f0+_0x137028(0x212));const _0x5b1e50=responseNullableString(_0x5da4dc[_0x137028(0x1a7)],_0x137028(0x1a7),_0x3677f0),_0x452b50=responseNullableString(_0x5da4dc[_0x137028(0x1c9)],_0x137028(0x1c9),_0x3677f0),_0x38690a=responseNullableString(_0x5da4dc[_0x137028(0x1f7)],'description',_0x3677f0),_0x43a2e2=responseNullableTimeout(_0x5da4dc[_0x137028(0x20f)],_0x137028(0x20f),_0x3677f0),_0x5d7bd6=responseNullableTimeout(_0x5da4dc[_0x137028(0x1a2)],_0x137028(0x1a2),_0x3677f0);return{'id':_0x3677f0,'appCode':_0x93fd16,'configCode':_0x3b79dc,'configName':_0x415fb6,'channelType':_0xb76d9e,'endpointUrl':redactSensitive(_0x5b1e50),'channelConfig':redactSensitive(_0x452b50),'description':_0x38690a,'connectTimeout':_0x43a2e2,'readTimeout':_0x5d7bd6,'endpointUrlRaw':_0x5b1e50,'channelConfigRaw':_0x452b50};}export async function requireExactNotificationConfig(_0x344f3f,_0x51241d,_0x3b28df){const _0x36c17c=a186_0x24a8d0;let _0x4175d7;try{_0x4175d7=await getNotificationChannelConfig(_0x51241d,_0x344f3f);}catch{throw safeApiFailure(_0x3b28df,'preflight',_0x36c17c(0x1ab)+_0x344f3f+_0x36c17c(0x206));}return normalizeExactNotificationConfig(_0x4175d7,_0x51241d,_0x344f3f);}export function projectNotificationConfig(_0x475f9a){const _0x1ecab3=a186_0x24a8d0;return{'id':_0x475f9a['id']??null,'appCode':_0x475f9a[_0x1ecab3(0x1eb)],'configCode':_0x475f9a[_0x1ecab3(0x204)]??null,'configName':_0x475f9a[_0x1ecab3(0x1be)],'channelType':_0x475f9a[_0x1ecab3(0x1c4)],'endpointUrl':redactSensitive(_0x475f9a[_0x1ecab3(0x1a7)]),'channelConfig':redactSensitive(_0x475f9a[_0x1ecab3(0x1c9)]),'description':_0x475f9a['description']??null,'connectTimeout':_0x475f9a[_0x1ecab3(0x20f)]??null,'readTimeout':_0x475f9a[_0x1ecab3(0x1a2)]??null};}export function notificationSelector(_0x1b5c73){const _0x181445=a186_0x24a8d0;return{'appCode':_0x1b5c73['appCode'],'id':_0x1b5c73['id'],'configCode':_0x1b5c73[_0x181445(0x204)],'configName':_0x1b5c73[_0x181445(0x1be)],'channelType':_0x1b5c73[_0x181445(0x1c4)]};}export function createMutationInput(_0x2b8d8b,_0x1c7f6a){const _0x5b7f39=a186_0x24a8d0;return{'appCode':_0x2b8d8b,'configName':_0x1c7f6a['configName'],'channelType':_0x1c7f6a['channelType'],...hasOwn(_0x1c7f6a,_0x5b7f39(0x1a7))?{'endpointUrl':_0x1c7f6a[_0x5b7f39(0x1a7)]}:{},...hasOwn(_0x1c7f6a,_0x5b7f39(0x1c9))?{'channelConfig':serializeChannelConfig(_0x1c7f6a['channelConfig'])}:{},...hasOwn(_0x1c7f6a,_0x5b7f39(0x1f7))?{'description':_0x1c7f6a[_0x5b7f39(0x1f7)]}:{},...hasOwn(_0x1c7f6a,_0x5b7f39(0x20f))?{'connectTimeout':_0x1c7f6a['connectTimeout']}:{},...hasOwn(_0x1c7f6a,_0x5b7f39(0x1a2))?{'readTimeout':_0x1c7f6a['readTimeout']}:{}};}export function mergeUpdateInput(_0x4bc771,_0x21832b){const _0x4ecbe6=a186_0x24a8d0;return{'id':_0x4bc771['id'],'appCode':_0x4bc771[_0x4ecbe6(0x1eb)],'configName':_0x21832b['configName']??_0x4bc771[_0x4ecbe6(0x1be)],'channelType':_0x21832b['channelType']??_0x4bc771[_0x4ecbe6(0x1c4)],'endpointUrl':hasOwn(_0x21832b,_0x4ecbe6(0x1a7))?_0x21832b[_0x4ecbe6(0x1a7)]:_0x4bc771[_0x4ecbe6(0x216)],'channelConfig':hasOwn(_0x21832b,_0x4ecbe6(0x1c9))?serializeChannelConfig(_0x21832b[_0x4ecbe6(0x1c9)]):_0x4bc771['channelConfigRaw'],'description':hasOwn(_0x21832b,_0x4ecbe6(0x1f7))?_0x21832b['description']:_0x4bc771[_0x4ecbe6(0x1f7)],'connectTimeout':hasOwn(_0x21832b,_0x4ecbe6(0x20f))?_0x21832b[_0x4ecbe6(0x20f)]:_0x4bc771[_0x4ecbe6(0x20f)],'readTimeout':hasOwn(_0x21832b,_0x4ecbe6(0x1a2))?_0x21832b[_0x4ecbe6(0x1a2)]:_0x4bc771[_0x4ecbe6(0x1a2)]};}export function plannedUpdateProjection(_0x2476d4,_0x5dcde6){const _0x3cf652=a186_0x24a8d0;return projectNotificationConfig({'id':_0x2476d4['id'],'appCode':_0x2476d4[_0x3cf652(0x1eb)],'configCode':_0x2476d4[_0x3cf652(0x204)],'configName':_0x5dcde6['configName']??_0x2476d4[_0x3cf652(0x1be)],'channelType':_0x5dcde6[_0x3cf652(0x1c4)]??_0x2476d4['channelType'],'endpointUrl':hasOwn(_0x5dcde6,_0x3cf652(0x1a7))?_0x5dcde6[_0x3cf652(0x1a7)]:_0x2476d4[_0x3cf652(0x216)],'channelConfig':hasOwn(_0x5dcde6,_0x3cf652(0x1c9))?_0x5dcde6[_0x3cf652(0x1c9)]:_0x2476d4['channelConfigRaw'],'description':hasOwn(_0x5dcde6,'description')?_0x5dcde6['description']:_0x2476d4[_0x3cf652(0x1f7)],'connectTimeout':hasOwn(_0x5dcde6,_0x3cf652(0x20f))?_0x5dcde6[_0x3cf652(0x20f)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2476d4[_0x3cf652(0x20f)],'readTimeout':hasOwn(_0x5dcde6,_0x3cf652(0x1a2))?_0x5dcde6['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2476d4['readTimeout']});}export function requestedSafeFieldsMatch(_0x3153f2,_0x20914e,_0x455202){const _0x3fcab1=a186_0x24a8d0,_0x198490=[],_0x525b14=[],_0x170c1d=[];for(const _0x1d9a4c of[_0x3fcab1(0x1be),_0x3fcab1(0x1c4),'description']){if(!hasOwn(_0x455202,_0x1d9a4c))continue;_0x170c1d[_0x3fcab1(0x1ff)](_0x1d9a4c),_0x198490[_0x3fcab1(0x1ff)](_0x20914e[_0x1d9a4c]===_0x455202[_0x1d9a4c]),_0x525b14[_0x3fcab1(0x1ff)](_0x3153f2[_0x1d9a4c]!==_0x455202[_0x1d9a4c]&&_0x20914e[_0x1d9a4c]===_0x455202[_0x1d9a4c]);}for(const _0xb2cd82 of['connectTimeout',_0x3fcab1(0x1a2)]){if(!hasOwn(_0x455202,_0xb2cd82))continue;const _0x1c905a=_0x455202[_0xb2cd82]??(_0xb2cd82===_0x3fcab1(0x20f)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x170c1d[_0x3fcab1(0x1ff)](_0xb2cd82),_0x198490['push'](_0x20914e[_0xb2cd82]===_0x1c905a),_0x525b14[_0x3fcab1(0x1ff)](_0x3153f2[_0xb2cd82]!==_0x1c905a&&_0x20914e[_0xb2cd82]===_0x1c905a);}return hasOwn(_0x455202,_0x3fcab1(0x1a7))&&_0x455202[_0x3fcab1(0x1a7)]===null&&(_0x170c1d[_0x3fcab1(0x1ff)](_0x3fcab1(0x1c3)),_0x198490['push'](_0x20914e[_0x3fcab1(0x216)]===null||_0x20914e['endpointUrlRaw']===''),_0x525b14['push'](_0x3153f2['endpointUrlRaw']!==null&&_0x3153f2[_0x3fcab1(0x216)]!==''&&(_0x20914e[_0x3fcab1(0x216)]===null||_0x20914e[_0x3fcab1(0x216)]===''))),{'allMatch':_0x198490[_0x3fcab1(0x1e0)](Boolean),'provesChange':_0x525b14[_0x3fcab1(0x1a6)](Boolean),'verifiedFields':_0x170c1d};}export function validateNotificationDeleteReadback(_0x87acbf,_0x1cf0b3,_0x1a66f7){const _0x5e1abe=a186_0x24a8d0;for(const [_0x2ebd1b,_0x436496]of _0x87acbf['entries']()){if(!Number['isSafeInteger'](_0x436496['id'])||_0x436496['id']<=0x0)throw notificationError(_0x5e1abe(0x1c8),_0x5e1abe(0x1bc)+(_0x2ebd1b+0x1)+_0x5e1abe(0x213));if(_0x436496[_0x5e1abe(0x1eb)]!==_0x1cf0b3)throw notificationError('notification_config_response_invalid',_0x5e1abe(0x1bc)+(_0x2ebd1b+0x1)+_0x5e1abe(0x1b3));if(_0x436496[_0x5e1abe(0x1c4)]!==_0x1a66f7)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x2ebd1b+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x21d087,_0x2211b0,_0x214a32){const _0x3e4819=a186_0x24a8d0;return notificationError('notification_config_'+_0x21d087+'_'+(_0x2211b0===_0x3e4819(0x20e)?'failed':_0x2211b0+'_unavailable'),'Notification\x20config\x20'+_0x21d087+'\x20'+_0x2211b0+'\x20failed.',_0x214a32);}export function notificationLookupCommand(_0x2eee51,_0x4a817d){const _0x323936=a186_0x24a8d0;return _0x323936(0x1df)+_0x2eee51+_0x323936(0x1c6)+_0x4a817d+_0x323936(0x19e);}function validateNotificationDocument(_0x12ade0,_0x2aa91e){const _0x10b3a2=a186_0x24a8d0;for(const _0x257abc of Object[_0x10b3a2(0x1a8)](_0x12ade0)){if(FORBIDDEN_IDENTITY_FIELDS[_0x10b3a2(0x19c)](_0x257abc))throw notificationError(_0x10b3a2(0x1fe),_0x10b3a2(0x1bd)+_0x257abc+_0x10b3a2(0x1a0));if(!ALLOWED_INPUT_FIELDS[_0x10b3a2(0x19c)](_0x257abc))throw notificationError(_0x10b3a2(0x1c0),_0x10b3a2(0x205)+_0x257abc+'\x22.');}if(_0x2aa91e===_0x10b3a2(0x1aa)&&Object['keys'](_0x12ade0)[_0x10b3a2(0x1ea)]===0x0)throw notificationError(_0x10b3a2(0x1ee),_0x10b3a2(0x19b));const _0x2ed31e={};if(hasOwn(_0x12ade0,_0x10b3a2(0x1be)))_0x2ed31e['configName']=validateRequiredString(_0x12ade0[_0x10b3a2(0x1be)],_0x10b3a2(0x1be),0x80);else{if(_0x2aa91e==='create')throw notificationError(_0x10b3a2(0x1d1),'Create\x20JSON\x20requires\x20field\x20'+'\x22configName\x22.');}if(hasOwn(_0x12ade0,'channelType')){if(typeof _0x12ade0[_0x10b3a2(0x1c4)]!==_0x10b3a2(0x1a1))throw invalidFieldType(_0x10b3a2(0x1c4),'a\x20supported\x20string');const _0x243e61=_0x12ade0[_0x10b3a2(0x1c4)][_0x10b3a2(0x1d6)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x10b3a2(0x1cd)](_0x243e61))throw notificationError(_0x10b3a2(0x1d8),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x10b3a2(0x1af)+NOTIFICATION_CHANNEL_TYPES[_0x10b3a2(0x1b5)](',\x20')+'.');_0x2ed31e[_0x10b3a2(0x1c4)]=_0x243e61;}else{if(_0x2aa91e===_0x10b3a2(0x1f3))throw notificationError(_0x10b3a2(0x1d1),_0x10b3a2(0x1e8)+_0x10b3a2(0x1ac));}for(const [_0x52a0ff,_0x296bf6]of[[_0x10b3a2(0x1a7),0x200],['description',0x100]]){if(!hasOwn(_0x12ade0,_0x52a0ff))continue;const _0x3b77b1=_0x12ade0[_0x52a0ff];if(_0x3b77b1!==null&&typeof _0x3b77b1!==_0x10b3a2(0x1a1))throw invalidFieldType(_0x52a0ff,_0x10b3a2(0x1e3));if(typeof _0x3b77b1==='string'&&_0x3b77b1[_0x10b3a2(0x1ea)]>_0x296bf6)throw notificationError('notification_config_field_invalid',_0x10b3a2(0x1bd)+_0x52a0ff+_0x10b3a2(0x209)+_0x296bf6+_0x10b3a2(0x1de));_0x2ed31e[_0x52a0ff]=_0x3b77b1;}if(hasOwn(_0x12ade0,'channelConfig')){const _0x4dce48=_0x12ade0['channelConfig'];if(_0x4dce48===null&&_0x2aa91e===_0x10b3a2(0x1f3))throw invalidFieldType('channelConfig',_0x10b3a2(0x1ba));if(_0x4dce48!==null&&!isJsonObject(_0x4dce48))throw invalidFieldType(_0x10b3a2(0x1c9),_0x2aa91e==='update'?_0x10b3a2(0x1bb):_0x10b3a2(0x1ba));_0x4dce48!==null&&validateChannelConfigFields(_0x2ed31e[_0x10b3a2(0x1c4)],_0x4dce48),_0x2ed31e[_0x10b3a2(0x1c9)]=_0x4dce48;}for(const _0x18d720 of['connectTimeout','readTimeout']){if(!hasOwn(_0x12ade0,_0x18d720))continue;const _0x112d63=_0x12ade0[_0x18d720];if(_0x112d63!==null&&(!Number[_0x10b3a2(0x1b4)](_0x112d63)||_0x112d63<0x0))throw notificationError(_0x10b3a2(0x1d8),_0x10b3a2(0x1bd)+_0x18d720+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x2ed31e[_0x18d720]=_0x112d63;}return _0x2ed31e;}function validateRequiredString(_0x28dc89,_0x37f5d9,_0xa5e3af){const _0x353b8c=a186_0x24a8d0;if(typeof _0x28dc89!=='string')throw invalidFieldType(_0x37f5d9,'a\x20non-empty\x20string');const _0x47575c=_0x28dc89['trim']();if(!_0x47575c)throw notificationError('notification_config_field_invalid',_0x353b8c(0x1bd)+_0x37f5d9+_0x353b8c(0x1fb));if(_0x47575c[_0x353b8c(0x1ea)]>_0xa5e3af)throw notificationError(_0x353b8c(0x1d8),_0x353b8c(0x1bd)+_0x37f5d9+'\x22\x20cannot\x20exceed\x20'+_0xa5e3af+_0x353b8c(0x1de));return _0x47575c;}function validateChannelConfigFields(_0xc6ef5b,_0x401376){const _0x38d600=a186_0x24a8d0;if(hasOwn(_0x401376,'messageTemplate'))throw forbiddenChannelConfigField('messageTemplate');if(_0xc6ef5b===_0x38d600(0x219))for(const _0x35c5d2 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x401376,_0x35c5d2))throw forbiddenChannelConfigField(_0x35c5d2);}}function forbiddenChannelConfigField(_0x43e777){const _0x3f5de0=a186_0x24a8d0;return notificationError(_0x3f5de0(0x1b6),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x43e777+_0x3f5de0(0x1f8));}function invalidFieldType(_0x301346,_0x2ef3f){const _0x43d5ad=a186_0x24a8d0;return notificationError(_0x43d5ad(0x1d8),'Notification\x20JSON\x20field\x20\x22'+_0x301346+'\x22\x20must\x20be\x20'+_0x2ef3f+'.');}function serializeChannelConfig(_0xd539ab){const _0x1a3b3d=a186_0x24a8d0;return _0xd539ab===null||_0xd539ab===undefined?null:JSON[_0x1a3b3d(0x1ce)](_0xd539ab);}function redactSensitive(_0x206de8){const _0x205611=a186_0x24a8d0;return _0x206de8===null||_0x206de8===undefined||_0x206de8===''?null:_0x205611(0x19f);}function requireResponseString(_0x53373e,_0x319819,_0x1640fb){const _0x43ac29=a186_0x24a8d0;if(typeof _0x53373e!==_0x43ac29(0x1a1)||_0x53373e[_0x43ac29(0x1d6)]()==='')throw CliErrors['apiError'](_0x43ac29(0x1d0),_0x43ac29(0x1a4)+(_0x1640fb+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x319819+'\x22.');return _0x53373e['trim']();}function requireExactString(_0x18a471,_0x49c032,_0x4cd65c){const _0x1b8354=a186_0x24a8d0;if(typeof _0x18a471!==_0x1b8354(0x1a1)||_0x18a471[_0x1b8354(0x1d6)]()==='')throw notificationError(_0x1b8354(0x1c8),_0x1b8354(0x1f9)+_0x4cd65c+_0x1b8354(0x1c5)+_0x49c032+'\x22.');return _0x18a471[_0x1b8354(0x1d6)]();}function responseNullableString(_0xc7bfe5,_0x21c2fd,_0x16959d){const _0xf94a3a=a186_0x24a8d0;if(_0xc7bfe5===undefined||_0xc7bfe5===null)return null;if(typeof _0xc7bfe5!==_0xf94a3a(0x1a1))throw notificationError(_0xf94a3a(0x1c8),_0xf94a3a(0x1f9)+_0x16959d+_0xf94a3a(0x1bf)+_0x21c2fd+'\x22.');return _0xc7bfe5;}function a186_0x4be6(_0x10ec79,_0x2d8789){_0x10ec79=_0x10ec79-0x19b;const _0x524f19=a186_0x524f();let _0x4be621=_0x524f19[_0x10ec79];return _0x4be621;}function responseNullableTimeout(_0x1515ae,_0x184208,_0x4942c2){const _0x16a723=a186_0x24a8d0;if(_0x1515ae===undefined||_0x1515ae===null)return null;if(!Number['isSafeInteger'](_0x1515ae)||_0x1515ae<0x0)throw notificationError(_0x16a723(0x1c8),'Notification\x20config\x20'+_0x4942c2+'\x20has\x20invalid\x20field\x20\x22'+_0x184208+'\x22.');return _0x1515ae;}function normalizeNullableString(_0x4939bd){const _0x2a5c38=a186_0x24a8d0;return typeof _0x4939bd===_0x2a5c38(0x1a1)?_0x4939bd:null;}function isJsonObject(_0x22654c){const _0x45097b=a186_0x24a8d0;return _0x22654c!==null&&typeof _0x22654c===_0x45097b(0x1dd)&&!Array[_0x45097b(0x1db)](_0x22654c);}function hasOwn(_0x35793a,_0x2ca999){const _0x46539e=a186_0x24a8d0;return Object[_0x46539e(0x1ef)]['hasOwnProperty'][_0x46539e(0x215)](_0x35793a,_0x2ca999);}async function readStdin(){const _0x528f8a=a186_0x24a8d0;let _0x331569='';process[_0x528f8a(0x1a5)][_0x528f8a(0x214)](_0x528f8a(0x1ec));for await(const _0x346c6f of process[_0x528f8a(0x1a5)])_0x331569+=_0x346c6f;return _0x331569;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a187_0x123583=a187_0x1a32;(function(_0x484d3b,_0x59216e){const _0x2c35d5=a187_0x1a32,_0xcc8053=_0x484d3b();while(!![]){try{const _0x2bcc94=-parseInt(_0x2c35d5(0x196))/0x1*(parseInt(_0x2c35d5(0x198))/0x2)+-parseInt(_0x2c35d5(0x193))/0x3+-parseInt(_0x2c35d5(0x1b0))/0x4*(-parseInt(_0x2c35d5(0x18c))/0x5)+-parseInt(_0x2c35d5(0x184))/0x6*(-parseInt(_0x2c35d5(0x1aa))/0x7)+parseInt(_0x2c35d5(0x18f))/0x8*(-parseInt(_0x2c35d5(0x1a3))/0x9)+-parseInt(_0x2c35d5(0x19f))/0xa+parseInt(_0x2c35d5(0x1a9))/0xb;if(_0x2bcc94===_0x59216e)break;else _0xcc8053['push'](_0xcc8053['shift']());}catch(_0x537371){_0xcc8053['push'](_0xcc8053['shift']());}}}(a187_0x377c,0x228e2));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a187_0x377c(){const _0xcfdcbc=['count','POST','823878eYCbIL','File\x20upload\x20response\x20missing\x20filePath.','form','272305AYcQnS','join','2SUsgBx','invoice','fileUrl','/smartapi/common/uploadFile','\x20OCR','apiError','image-file','798970oQlPis','imageFile','general','ocr','554661ztuJdR','string','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','GET','imageUrl','toLowerCase','3461304aJCXpR','1705088ZgMgWG','.\x20Supported\x20scenes:\x20','read','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Table','\x20OCR\x20from\x20URL','4sHaVgM','validation','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','path','scene','appCode','/smartapi/ocr/recognize-text?','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','6erQlhF','str','File\x20URL\x20response\x20missing\x20fileUrl.','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','General','Preview:\x20recognize\x20','filePath','trim','1358735svGZmh','/smartapi/ocr/recognize-text','idCard','8GmepJL','image-url'];a187_0x377c=function(){return _0xcfdcbc;};return a187_0x377c();}const SUPPORTED_SCENES=[a187_0x123583(0x199),a187_0x123583(0x1a1),'form',a187_0x123583(0x18e)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a187_0x123583(0x188),'form':a187_0x123583(0x1ae),'idCard':'IdCard'},SCENE_FLAG={'name':'scene','type':a187_0x123583(0x1a4),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a187_0x123583(0x1ad)},IMAGE_FILE_FLAG={'name':a187_0x123583(0x19e),'type':a187_0x123583(0x1a4),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a187_0x123583(0x190),'type':a187_0x123583(0x1a4),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x47da6e){const _0x3dc2a0=a187_0x123583,_0x22836d=_0x47da6e['trim']()[_0x3dc2a0(0x1a8)]();if(_0x22836d==='idcard')return'idCard';if(_0x22836d===_0x3dc2a0(0x199)||_0x22836d===_0x3dc2a0(0x1a1)||_0x22836d===_0x3dc2a0(0x195))return _0x22836d;throw CliErrors[_0x3dc2a0(0x1b1)]('Unsupported\x20OCR\x20scene:\x20'+_0x47da6e+_0x3dc2a0(0x1ab)+SUPPORTED_SCENES[_0x3dc2a0(0x197)](',\x20'));}function selectedInputs(_0x1298f9){const _0xe5f43c=a187_0x123583,_0xd27c09=_0x1298f9[_0xe5f43c(0x185)](_0xe5f43c(0x19e))[_0xe5f43c(0x18b)](),_0x3dade5=_0x1298f9[_0xe5f43c(0x185)](_0xe5f43c(0x190))[_0xe5f43c(0x18b)]();return{'imageFile':_0xd27c09,'imageUrl':_0x3dade5,'count':[_0xd27c09,_0x3dade5]['filter'](Boolean)['length']};}function validateInputSelection(_0x5ec995){const _0x51e362=a187_0x123583,_0x3abcbd=selectedInputs(_0x5ec995);if(_0x3abcbd[_0x51e362(0x191)]!==0x1)throw CliErrors[_0x51e362(0x1b1)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x3abcbd;}function a187_0x1a32(_0x4377a1,_0x5dc463){_0x4377a1=_0x4377a1-0x184;const _0x377cee=a187_0x377c();let _0x1a3252=_0x377cee[_0x4377a1];return _0x1a3252;}function withScene(_0x24a272,_0x4bca95,_0x31c0b9){const _0x502c91=a187_0x123583;return{..._0x24a272,'scene':_0x4bca95,..._0x31c0b9?{'sourceFile':{'fileName':_0x31c0b9['fileName'],'filePath':_0x31c0b9[_0x502c91(0x18a)]}}:{}};}const ocrRecognize={'service':a187_0x123583(0x1a2),'command':'recognize','description':a187_0x123583(0x1b7),'risk':a187_0x123583(0x1ac),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x2a01c1){const _0x559005=a187_0x123583,_0x43c93f=normalizeScene(_0x2a01c1[_0x559005(0x185)](_0x559005(0x1b4))),_0x39ac11=SCENE_TO_LEGACY_TYPE[_0x43c93f],_0x3387cb=validateInputSelection(_0x2a01c1);if(_0x3387cb[_0x559005(0x1a7)]){const _0x1759bd=new URLSearchParams({'url':_0x3387cb[_0x559005(0x1a7)],'type':_0x39ac11,'appCode':_0x2a01c1[_0x559005(0x1b5)]});return{'method':_0x559005(0x1a6),'url':_0x559005(0x1b6)+_0x1759bd['toString'](),'description':_0x559005(0x189)+_0x43c93f+_0x559005(0x1af)};}const _0x5da3ea=requireDevelopmentUploadFile(_0x3387cb[_0x559005(0x1a0)],'image-file');return{'method':_0x559005(0x192),'url':_0x559005(0x19b),'body':{'steps':[{'method':'POST','url':'/smartapi/common/uploadFile','body':{'appCode':_0x2a01c1[_0x559005(0x1b5)],'multipart':{'file':_0x5da3ea}}},{'method':_0x559005(0x192),'url':'/smartapi/common/queryFileUrl','body':{'filePath':_0x559005(0x187),'downloadFlag':![]}},{'method':'GET','url':_0x559005(0x18d),'query':{'appCode':_0x2a01c1[_0x559005(0x1b5)],'url':_0x559005(0x1b2),'type':_0x39ac11}}]},'description':_0x559005(0x1a5)+_0x43c93f+_0x559005(0x19c)};},async 'execute'(_0x2b2d3c){const _0x42dd17=a187_0x123583,_0x5a6c34=normalizeScene(_0x2b2d3c[_0x42dd17(0x185)](_0x42dd17(0x1b4))),_0x362d0b=SCENE_TO_LEGACY_TYPE[_0x5a6c34],_0x2a9bd8=validateInputSelection(_0x2b2d3c);if(_0x2a9bd8['imageUrl']){const _0x4f58b6=await recognizeDevelopmentOcr(_0x2b2d3c['appCode'],{'url':_0x2a9bd8[_0x42dd17(0x1a7)],'type':_0x362d0b});return{'ok':!![],'data':withScene(_0x4f58b6,_0x5a6c34)};}const _0x1b3149=requireDevelopmentUploadFile(_0x2a9bd8['imageFile'],'image-file'),_0x1680b9=await uploadDevelopmentFile(_0x2b2d3c[_0x42dd17(0x1b5)],_0x1b3149[_0x42dd17(0x1b3)]);if(!_0x1680b9[_0x42dd17(0x18a)])throw CliErrors[_0x42dd17(0x19d)](_0x42dd17(0x194));const _0x543c8b=await queryDevelopmentFileUrl(_0x1680b9[_0x42dd17(0x18a)],{'download':![]});if(!_0x543c8b[_0x42dd17(0x19a)])throw CliErrors[_0x42dd17(0x19d)](_0x42dd17(0x186));const _0x11ba42=await recognizeDevelopmentOcr(_0x2b2d3c[_0x42dd17(0x1b5)],{'url':_0x543c8b['fileUrl'],'type':_0x362d0b});return{'ok':!![],'data':withScene(_0x11ba42,_0x5a6c34,_0x1680b9)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a188_0x3e596a=a188_0x4b60;(function(_0x5b793f,_0x1c332d){const _0x5a32f3=a188_0x4b60,_0x352dba=_0x5b793f();while(!![]){try{const _0x2e579b=parseInt(_0x5a32f3(0xdd))/0x1*(-parseInt(_0x5a32f3(0xfd))/0x2)+-parseInt(_0x5a32f3(0xe6))/0x3+-parseInt(_0x5a32f3(0xe4))/0x4+-parseInt(_0x5a32f3(0x10d))/0x5+-parseInt(_0x5a32f3(0xe3))/0x6*(parseInt(_0x5a32f3(0xd5))/0x7)+-parseInt(_0x5a32f3(0x100))/0x8*(-parseInt(_0x5a32f3(0xd6))/0x9)+parseInt(_0x5a32f3(0xf2))/0xa;if(_0x2e579b===_0x1c332d)break;else _0x352dba['push'](_0x352dba['shift']());}catch(_0x241cbe){_0x352dba['push'](_0x352dba['shift']());}}}(a188_0x4414,0x7d054));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';function a188_0x4b60(_0x2faf15,_0x5a6634){_0x2faf15=_0x2faf15-0xd1;const _0x441442=a188_0x4414();let _0x4b6029=_0x441442[_0x2faf15];return _0x4b6029;}import{readCustomPageDirectory}from'../../core/page/file-system.js';function a188_0x4414(){const _0x56b032=['toLowerCase','length','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','str','Custom\x20Page\x20pattern\x20not\x20found:\x20','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','16853BFDFFz','CUSTOM','menuId','files','isInteger','Custom_page_','384NLifBh','1256204KijUud','trim','282546hurUtn','../../../templates/custom-pages','BLANK','/smartapi/webcode/page/create','apiError','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','parentMenuId','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','keys','some','parse','validation','16754610rNSwmg','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','name','string','Created\x20Custom\x20Page\x20','Would\x20create\x20Custom\x20Page\x20','object','page-type','isNaN','page\x20create\x20does\x20not\x20accept\x20--page-type.','write','10YLCaGp','pageName','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','49496kRGVyB','pageId','POST','now','version','appCode','values','createMenu','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','page-dir','\x20and\x20its\x20menu\x20entry.','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','ONEPAGE','2985570fefNej','compress','Invalid\x20Custom\x20Page\x20pattern:\x20','includes','page-pattern','.json','menuPath','num','pageName\x20cannot\x20exceed\x20100\x20characters.','19572YeNSMr','153WeQEIw'];a188_0x4414=function(){return _0x56b032;};return a188_0x4414();}import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a188_0x3e596a(0xe8),a188_0x3e596a(0x10c),'DASHBOARD'],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a188_0x3e596a(0xe7));export const pageCreate={'service':'page','command':'create','description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':a188_0x3e596a(0xfc),'defaultOutputFormat':a188_0x3e596a(0x10e),'structuredErrors':!![],'rejectedFlags':[{'name':a188_0x3e596a(0xf9),'message':a188_0x3e596a(0xfb),'hint':a188_0x3e596a(0xed)},{'name':'page-content','message':a188_0x3e596a(0xdc),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'name','type':'string','description':a188_0x3e596a(0x10b)},{'name':'parent-menu-id','type':'number','description':a188_0x3e596a(0xeb)},{'name':a188_0x3e596a(0x111),'type':a188_0x3e596a(0xf5),'description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':a188_0x3e596a(0x109),'type':a188_0x3e596a(0xf5),'description':'Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0x3a226b){await readValidatedPageSource(_0x3a226b);},async 'dryRun'(_0x28840c){const _0x590af6=a188_0x3e596a,_0xdf8189=readInput(_0x28840c,await readValidatedPageSource(_0x28840c));return{'method':_0x590af6(0x102),'url':_0x590af6(0xe9),'body':{'appCode':_0xdf8189['appCode'],'pageName':_0xdf8189[_0x590af6(0xfe)],..._0xdf8189[_0x590af6(0xec)]!=null?{'parentMenuId':_0xdf8189['parentMenuId']}:{},'createMenu':_0xdf8189[_0x590af6(0x107)],'codeContent':_0xdf8189[_0x590af6(0xe0)]},'description':_0x590af6(0xf7)+JSON['stringify'](_0xdf8189['pageName'])+_0x590af6(0x10a)};},async 'execute'(_0x581db5){const _0x11963f=a188_0x3e596a,_0x5ba32c=readInput(_0x581db5,await readValidatedPageSource(_0x581db5)),_0x2041cf=await createCustomPage(_0x5ba32c);if(!Number['isInteger'](_0x2041cf[_0x11963f(0x101)])||_0x2041cf[_0x11963f(0x101)]<=0x0)throw CliErrors[_0x11963f(0xea)](_0x11963f(0x108));const _0xaff437=buildCustomPageDevelopmentUrl(_0x5ba32c[_0x11963f(0x105)],_0x2041cf[_0x11963f(0xd2)]),_0x498e2e=buildCustomPageEditUrl(_0x5ba32c[_0x11963f(0x105)],_0x2041cf['pageId']);return{'ok':!![],'data':{'operation':'page.create','pageType':_0x11963f(0xde),'pagePattern':readPagePattern(_0x581db5),'selector':{'appCode':_0x5ba32c[_0x11963f(0x105)],'pageName':_0x5ba32c['pageName']},'before':null,'after':{'pageId':_0x2041cf['pageId'],'pageName':_0x2041cf[_0x11963f(0xfe)],'appCode':_0x2041cf['appCode'],'version':_0x2041cf[_0x11963f(0x104)],'menuId':_0x2041cf[_0x11963f(0xdf)],'menuPath':_0x2041cf[_0x11963f(0xd2)],'files':_0x2041cf[_0x11963f(0xe0)]??Object[_0x11963f(0xee)](_0x5ba32c[_0x11963f(0xe0)])},'dryRun':![],'request':_0x5ba32c,..._0xaff437?{'pageUrl':_0xaff437}:{},..._0x498e2e?{'editPageUrl':_0x498e2e}:{},'warnings':_0xaff437?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x11963f(0xf6)+_0x2041cf[_0x11963f(0x101)]+'.'};}};function readPagePattern(_0x4b6b7c){const _0x523462=a188_0x3e596a,_0x505c5a=_0x4b6b7c[_0x523462(0xda)](_0x523462(0x111))[_0x523462(0xe5)](),_0xd9b022=_0x4b6b7c[_0x523462(0xda)](_0x523462(0x109))[_0x523462(0xe5)]();if(_0x505c5a&&_0xd9b022)throw CliErrors[_0x523462(0xf1)](_0x523462(0xff));if(_0xd9b022)return null;if(!_0x505c5a)throw CliErrors['validation']('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x523462(0x110)](_0x505c5a))throw CliErrors['validation'](_0x523462(0xf3));return _0x505c5a;}async function readPageSource(_0x30f265){const _0x10b653=a188_0x3e596a,_0x2594ef=_0x30f265[_0x10b653(0xda)](_0x10b653(0x109))[_0x10b653(0xe5)](),_0x746899=readPagePattern(_0x30f265);if(_0x746899===null){const _0x348f89=await readCustomPageDirectory(_0x2594ef);if(Object['keys'](_0x348f89)[_0x10b653(0xd8)]===0x0)throw CliErrors['validation']('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x348f89;}let _0xf6e040;try{_0xf6e040=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x746899[_0x10b653(0xd7)]()+_0x10b653(0xd1)),'utf8');}catch{throw CliErrors[_0x10b653(0xf1)](_0x10b653(0xdb)+_0x746899+'.');}let _0x50c838;try{_0x50c838=JSON[_0x10b653(0xf0)](_0xf6e040);}catch{throw CliErrors[_0x10b653(0xf1)](_0x10b653(0x10f)+_0x746899+'.');}if(!_0x50c838||typeof _0x50c838!==_0x10b653(0xf8)||Array['isArray'](_0x50c838)||Object[_0x10b653(0x106)](_0x50c838)[_0x10b653(0xef)](_0x2f9912=>typeof _0x2f9912!==_0x10b653(0xf5)))throw CliErrors['validation'](_0x10b653(0x10f)+_0x746899+'.');return _0x50c838;}async function readValidatedPageSource(_0x1d977b){const _0x1e0b7d=await readPageSource(_0x1d977b);return await validateCustomPageContent(_0x1e0b7d),_0x1e0b7d;}function readInput(_0xaee314,_0x490bfa){const _0x39d595=a188_0x3e596a,_0x28d308=_0xaee314['str'](_0x39d595(0xf4))[_0x39d595(0xe5)]()||_0x39d595(0xe2)+Date[_0x39d595(0x103)]();if(_0x28d308[_0x39d595(0xd8)]>0x64)throw CliErrors['validation'](_0x39d595(0xd4));const _0x41a865=_0xaee314[_0x39d595(0xd3)]('parent-menu-id',NaN),_0x11c526=!Number[_0x39d595(0xfa)](_0x41a865);if(_0x11c526&&(!Number[_0x39d595(0xe1)](_0x41a865)||_0x41a865<=0x0))throw CliErrors[_0x39d595(0xf1)](_0x39d595(0xd9));return{'appCode':_0xaee314[_0x39d595(0x105)],'pageName':_0x28d308,..._0x11c526?{'parentMenuId':_0x41a865}:{},'createMenu':!![],'files':_0x490bfa};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0x1c8dbb=a189_0x4e04;(function(_0x25af46,_0x206e89){const _0x58a1e1=a189_0x4e04,_0x134ad0=_0x25af46();while(!![]){try{const _0x391e81=parseInt(_0x58a1e1(0x181))/0x1+-parseInt(_0x58a1e1(0x187))/0x2*(-parseInt(_0x58a1e1(0x18f))/0x3)+parseInt(_0x58a1e1(0x17d))/0x4+parseInt(_0x58a1e1(0x194))/0x5*(-parseInt(_0x58a1e1(0x18c))/0x6)+-parseInt(_0x58a1e1(0x177))/0x7+parseInt(_0x58a1e1(0x178))/0x8*(-parseInt(_0x58a1e1(0x17e))/0x9)+-parseInt(_0x58a1e1(0x179))/0xa*(-parseInt(_0x58a1e1(0x183))/0xb);if(_0x391e81===_0x206e89)break;else _0x134ad0['push'](_0x134ad0['shift']());}catch(_0x28b389){_0x134ad0['push'](_0x134ad0['shift']());}}}(a189_0x5458,0x8f45a));function a189_0x5458(){const _0x549c91=['50oBjody','read','Custom\x20Page\x20ID','getFullYear','573024IAhJpO','27Eozgtu','compress','padStart','819449duMgSW','pageCode','1904507KGrqpj','getMonth','custom-detail','join','293866uQNLZJ','cookie','isNaN','number','appCode','42gfliat','getDate','getTime','3gExbbj','appcode','trim','str','Retrieved\x20Custom\x20Page\x20','30105mNDqnc','getSeconds','6766179gEKmtv','1012632PwAULN'];a189_0x5458=function(){return _0x549c91;};return a189_0x5458();}import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';function a189_0x4e04(_0x55f2fd,_0x1691b7){_0x55f2fd=_0x55f2fd-0x176;const _0x5458bb=a189_0x5458();let _0x4e0460=_0x5458bb[_0x55f2fd];return _0x4e0460;}export const pageCustomDetail={'service':'page','command':a189_0x1c8dbb(0x185),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a189_0x1c8dbb(0x17a),'defaultOutputFormat':a189_0x1c8dbb(0x17f),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a189_0x1c8dbb(0x18a),'required':!![],'description':a189_0x1c8dbb(0x17b)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3d8fb4){readCustomPageId(_0x3d8fb4);},async 'execute'(_0x2732d9){const _0x5cce71=a189_0x1c8dbb,_0x24d79d=readCustomPageId(_0x2732d9),_0x4cf929=await getCustomPageSource(_0x24d79d),{bundle:_0x4ea24a,createTime:_0x10f04c,updateTime:_0x453d79,..._0x2a3e80}=_0x4cf929,_0x5bd1b0=_0x4cf929['id']??_0x24d79d,_0x365fd1=_0x4cf929[_0x5cce71(0x18b)]?.[_0x5cce71(0x191)]()||_0x2732d9[_0x5cce71(0x192)](_0x5cce71(0x190))[_0x5cce71(0x191)](),_0x275881=buildCustomPageRuntimeUrl(_0x365fd1,_0x4cf929[_0x5cce71(0x182)]),_0x202bde=buildCustomPageEditUrl(_0x365fd1,_0x5bd1b0),_0x374899=await resolveCustomPageDevelopmentUrl(_0x365fd1,_0x5bd1b0,_0x2732d9[_0x5cce71(0x188)]);return{'ok':!![],'data':{..._0x2a3e80,..._0x275881?{'runtimePageUrl':_0x275881}:{},..._0x374899?{'pageUrl':_0x374899}:{},..._0x202bde?{'editPageUrl':_0x202bde}:{},..._0x10f04c==null?{}:{'createTime':formatTime(_0x10f04c)},..._0x453d79==null?{}:{'updateTime':formatTime(_0x453d79)}},'message':_0x5cce71(0x193)+_0x24d79d+'.'};}};function formatTime(_0x1adf4b){const _0x8cd06d=a189_0x1c8dbb,_0x1295b6=new Date(_0x1adf4b);if(Number[_0x8cd06d(0x189)](_0x1295b6[_0x8cd06d(0x18e)]()))return String(_0x1adf4b);const _0xb40e92=[_0x1295b6[_0x8cd06d(0x17c)](),String(_0x1295b6[_0x8cd06d(0x184)]()+0x1)['padStart'](0x2,'0'),String(_0x1295b6[_0x8cd06d(0x18d)]())[_0x8cd06d(0x180)](0x2,'0')]['join']('-'),_0xcd91a3=[String(_0x1295b6['getHours']())[_0x8cd06d(0x180)](0x2,'0'),String(_0x1295b6['getMinutes']())[_0x8cd06d(0x180)](0x2,'0'),String(_0x1295b6[_0x8cd06d(0x176)]())[_0x8cd06d(0x180)](0x2,'0')][_0x8cd06d(0x186)](':');return _0xb40e92+'\x20'+_0xcd91a3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a190_0x37ae7f=a190_0x1fe3;(function(_0x2cdd9f,_0x48dadd){const _0x9ce512=a190_0x1fe3,_0x48d1d6=_0x2cdd9f();while(!![]){try{const _0xe860ed=parseInt(_0x9ce512(0x13c))/0x1*(parseInt(_0x9ce512(0x147))/0x2)+parseInt(_0x9ce512(0x133))/0x3+parseInt(_0x9ce512(0x138))/0x4+-parseInt(_0x9ce512(0x144))/0x5+parseInt(_0x9ce512(0x13d))/0x6*(parseInt(_0x9ce512(0x145))/0x7)+parseInt(_0x9ce512(0x136))/0x8+-parseInt(_0x9ce512(0x13b))/0x9;if(_0xe860ed===_0x48dadd)break;else _0x48d1d6['push'](_0x48d1d6['shift']());}catch(_0x2db56c){_0x48d1d6['push'](_0x48d1d6['shift']());}}}(a190_0x7e82,0x4b06b));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';function a190_0x7e82(){const _0x39a91c=['3339378XJEebz','page','pageId','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','Found\x20','path','No\x20Custom\x20Pages\x20found.','2561755ndLGKv','7qloGHP','compress','562510ogTnzr','appCode','\x20Custom\x20Page(s).','365547UVwaZX','cookie','read','2907064zJKYUd','custom-list','510188JJzLIJ','length','flatMap','5678451xYGdvs','1ldbgMp'];a190_0x7e82=function(){return _0x39a91c;};return a190_0x7e82();}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';function a190_0x1fe3(_0x456460,_0x4d0168){_0x456460=_0x456460-0x132;const _0x7e82c5=a190_0x7e82();let _0x1fe3bf=_0x7e82c5[_0x456460];return _0x1fe3bf;}export const pageCustomList={'service':a190_0x37ae7f(0x13e),'command':a190_0x37ae7f(0x137),'description':a190_0x37ae7f(0x140),'risk':a190_0x37ae7f(0x135),'defaultOutputFormat':a190_0x37ae7f(0x146),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2cf228){const _0x4a018c=a190_0x37ae7f,_0x1b2174=(await fetchMenuSnapshot(_0x2cf228['appCode'],_0x2cf228[_0x4a018c(0x134)]))['menus'][_0x4a018c(0x13a)](_0x5c263e=>{const _0x3324a2=_0x4a018c;if(_0x5c263e['type']!=='react'||_0x5c263e[_0x3324a2(0x13f)]==null)return[];const _0x556a20=buildCustomPageDevelopmentUrl(_0x2cf228[_0x3324a2(0x148)],_0x5c263e[_0x3324a2(0x142)]),_0x2ebc46=buildCustomPageRuntimeUrl(_0x2cf228[_0x3324a2(0x148)],_0x5c263e['path']),_0x3bf052=buildCustomPageEditUrl(_0x2cf228[_0x3324a2(0x148)],_0x5c263e['pageId']);return[{'pageId':_0x5c263e[_0x3324a2(0x13f)],'label':_0x5c263e['label'],'path':_0x5c263e[_0x3324a2(0x142)],..._0x556a20?{'pageUrl':_0x556a20}:{},..._0x2ebc46?{'runtimePageUrl':_0x2ebc46}:{},..._0x3bf052?{'editPageUrl':_0x3bf052}:{}}];});return{'ok':!![],'data':{'pages':_0x1b2174},'message':_0x1b2174['length']===0x0?_0x4a018c(0x143):_0x4a018c(0x141)+_0x1b2174[_0x4a018c(0x139)]+_0x4a018c(0x132)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a191_0x19a1(){const _0x3a2253=['2888TSWZix','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','pageCode','push','FORMAL','Custom\x20Page\x20ID','8547mYaAzK','string','310icQYvM','1843820TlCWlg','trim','isInteger','remark','apiError','custom-publish','35853554CWiucZ','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','12CAcAoU','24ynsboH','cookie','pageId','warnings','779160qZzDOp','page.custom-publish','Would\x20publish\x20Custom\x20Page\x20','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','page','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','status','233379rLzdzn','281943EbVbIp','number','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','appCode','unknown','1477090OMRTNa','write'];a191_0x19a1=function(){return _0x3a2253;};return a191_0x19a1();}const a191_0x4edebf=a191_0x1418;function a191_0x1418(_0x17e8be,_0x1657af){_0x17e8be=_0x17e8be-0x8a;const _0x19a1d5=a191_0x19a1();let _0x141831=_0x19a1d5[_0x17e8be];return _0x141831;}(function(_0x3004d2,_0x21e00b){const _0x58b3b6=a191_0x1418,_0x1b631b=_0x3004d2();while(!![]){try{const _0x4adaf6=-parseInt(_0x58b3b6(0x8c))/0x1+parseInt(_0x58b3b6(0xa4))/0x2+parseInt(_0x58b3b6(0x94))/0x3*(-parseInt(_0x58b3b6(0xac))/0x4)+-parseInt(_0x58b3b6(0x99))/0x5*(parseInt(_0x58b3b6(0xad))/0x6)+-parseInt(_0x58b3b6(0xa1))/0x7*(parseInt(_0x58b3b6(0x9b))/0x8)+-parseInt(_0x58b3b6(0x93))/0x9*(parseInt(_0x58b3b6(0xa3))/0xa)+parseInt(_0x58b3b6(0xaa))/0xb;if(_0x4adaf6===_0x21e00b)break;else _0x1b631b['push'](_0x1b631b['shift']());}catch(_0x5d86f0){_0x1b631b['push'](_0x1b631b['shift']());}}}(a191_0x19a1,0xa9693));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':a191_0x4edebf(0x90),'command':a191_0x4edebf(0xa9),'description':a191_0x4edebf(0x91),'risk':a191_0x4edebf(0x9a),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a191_0x4edebf(0x95),'required':!![],'description':a191_0x4edebf(0xa0)},{'name':'remark','type':a191_0x4edebf(0xa2),'description':'Optional\x20publish\x20remark'}],async 'validate'(_0x546fe8){readCustomPageId(_0x546fe8);},async 'dryRun'(_0x160c2b){const _0x1e1753=a191_0x4edebf,_0x19ef0b=readInput(_0x160c2b);return{'method':'POST','url':'/smartapi/webcode/file/publish','body':{'id':_0x19ef0b['pageId'],..._0x19ef0b[_0x1e1753(0xa7)]?{'remark':_0x19ef0b[_0x1e1753(0xa7)]}:{}},'description':_0x1e1753(0x8e)+_0x19ef0b[_0x1e1753(0x8a)]+'.'};},async 'execute'(_0x3fd2ef){const _0x4de395=a191_0x4edebf,_0x8bc3ed=readInput(_0x3fd2ef);await getCustomPageSource(_0x8bc3ed[_0x4de395(0x8a)]);const _0x24b83c=await publishCustomPage(_0x8bc3ed);if(!Number[_0x4de395(0xa6)](_0x24b83c)||_0x24b83c!==_0x8bc3ed[_0x4de395(0x8a)])throw CliErrors['apiError'](_0x4de395(0x9c));const _0x821045=await getCustomPageSource(_0x8bc3ed[_0x4de395(0x8a)]);if(_0x821045[_0x4de395(0x92)]!==_0x4de395(0x9f))throw CliErrors[_0x4de395(0xa8)](_0x4de395(0xab)+(_0x821045[_0x4de395(0x92)]??_0x4de395(0x98))+'.');const _0x2aa3b5=_0x821045[_0x4de395(0x97)]?.['trim'](),_0xb2f2ad=buildCustomPageEditUrl(_0x2aa3b5,_0x8bc3ed[_0x4de395(0x8a)]),_0x2c5297=await resolveCustomPageDevelopmentUrl(_0x2aa3b5,_0x8bc3ed[_0x4de395(0x8a)],_0x3fd2ef[_0x4de395(0xae)]),_0x1202ff=buildMutationData(_0x8bc3ed,!![],_0x2c5297,_0xb2f2ad);_0x2aa3b5&&!_0x2c5297&&_0x1202ff['warnings'][_0x4de395(0x9e)](_0x4de395(0x96));const _0x326187=buildCustomPageRuntimeUrl(_0x821045[_0x4de395(0x97)],_0x821045[_0x4de395(0x9d)]);return _0x326187?_0x1202ff['runtimePageUrl']=_0x326187:_0x1202ff[_0x4de395(0x8b)]['push'](_0x4de395(0x8f)),{'ok':!![],'data':_0x1202ff,'message':'Published\x20Custom\x20Page\x20'+_0x8bc3ed['pageId']+'.'};}};function readInput(_0x51d11b){const _0xc27afa=a191_0x4edebf,_0xe6f906=readCustomPageId(_0x51d11b),_0x1daf56=_0x51d11b['str'](_0xc27afa(0xa7))[_0xc27afa(0xa5)]();return{'pageId':_0xe6f906,..._0x1daf56?{'remark':_0x1daf56}:{}};}function buildMutationData(_0x42d7ec,_0x5dd6f6=![],_0x5ae8db,_0xb763ef){const _0x3033bf=a191_0x4edebf;return{'operation':_0x3033bf(0x8d),'selector':{'pageId':_0x42d7ec[_0x3033bf(0x8a)]},'before':null,'after':{'pageId':_0x42d7ec[_0x3033bf(0x8a)],'status':_0x3033bf(0x9f)},'dryRun':!_0x5dd6f6,'request':_0x42d7ec,..._0x5ae8db?{'pageUrl':_0x5ae8db}:{},..._0xb763ef?{'editPageUrl':_0xb763ef}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a192_0x406386=a192_0x1725;(function(_0x2ca4dc,_0x4fdea4){const _0x1d5a0e=a192_0x1725,_0xec76dd=_0x2ca4dc();while(!![]){try{const _0x4264d6=-parseInt(_0x1d5a0e(0x142))/0x1*(-parseInt(_0x1d5a0e(0x143))/0x2)+parseInt(_0x1d5a0e(0x141))/0x3*(-parseInt(_0x1d5a0e(0x131))/0x4)+parseInt(_0x1d5a0e(0x13f))/0x5+parseInt(_0x1d5a0e(0x145))/0x6*(parseInt(_0x1d5a0e(0x146))/0x7)+-parseInt(_0x1d5a0e(0x133))/0x8+-parseInt(_0x1d5a0e(0x140))/0x9+-parseInt(_0x1d5a0e(0x13a))/0xa*(-parseInt(_0x1d5a0e(0x134))/0xb);if(_0x4264d6===_0x4fdea4)break;else _0xec76dd['push'](_0xec76dd['shift']());}catch(_0x2a1646){_0xec76dd['push'](_0xec76dd['shift']());}}}(a192_0x1a69,0xb63a1));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':a192_0x406386(0x130)};function trimOptional(_0x445fd2){const _0x15896f=a192_0x406386;return _0x445fd2?.[_0x15896f(0x136)]()||undefined;}function a192_0x1725(_0x19a922,_0x14686f){_0x19a922=_0x19a922-0x130;const _0x1a6986=a192_0x1a69();let _0x172580=_0x1a6986[_0x19a922];return _0x172580;}export function buildCustomPageRuntimeUrl(_0x3eb6d6,_0xf19432){const _0x23dd64=trimOptional(_0x3eb6d6),_0x20b4a8=trimOptional(_0xf19432);if(!_0x23dd64||!_0x20b4a8)return undefined;return getPublishedAppDomain(_0x23dd64)+'/'+encodeURIComponent(_0x20b4a8);}export function buildCustomPageDevelopmentUrl(_0x4a8779,_0x4db4ce){const _0x22ddc5=trimOptional(_0x4a8779),_0x55b0bd=trimOptional(_0x4db4ce);if(!_0x22ddc5||!_0x55b0bd)return undefined;return getAppBaseUrl(_0x22ddc5)+'/pages/'+encodeURIComponent(_0x55b0bd);}export async function resolveCustomPageDevelopmentUrl(_0x24c38f,_0x484e37,_0x28920d){const _0x4dee67=a192_0x406386,_0x3e374d=trimOptional(_0x24c38f);if(!_0x3e374d)return undefined;try{const _0x3d1f11=(await fetchMenuSnapshot(_0x3e374d,_0x28920d))[_0x4dee67(0x149)][_0x4dee67(0x13e)](_0x368958=>_0x368958[_0x4dee67(0x147)]===_0x4dee67(0x138)&&_0x368958[_0x4dee67(0x132)]===_0x484e37);return buildCustomPageDevelopmentUrl(_0x3e374d,_0x3d1f11?.['path']);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x510749,_0x326b87){const _0x1654c8=a192_0x406386,_0xd60ee0=trimOptional(_0x510749);if(!_0xd60ee0)return;const _0x33d427=trimOptional(String(_0x326b87??''));if(!_0x33d427)return;return getAppBaseUrl(_0xd60ee0)+_0x1654c8(0x148)+encodeURIComponent(_0x33d427);}export async function validateCustomPageContent(_0x49d7e1){const _0x3d2144=a192_0x406386,_0x190c6c=await validateCustomPageSourceFiles(_0x49d7e1);if(_0x190c6c[_0x3d2144(0x137)]>0x0)throw CliErrors[_0x3d2144(0x139)](_0x3d2144(0x144)+_0x190c6c[_0x3d2144(0x135)](_0x345df9=>_0x345df9[_0x3d2144(0x13d)]+':\x20'+_0x345df9[_0x3d2144(0x13c)])['join'](';\x20'));}export function readCustomPageId(_0x1dc2c0){const _0x445d93=a192_0x406386,_0x4689e5=_0x1dc2c0[_0x445d93(0x13b)]('id');if(!Number[_0x445d93(0x14a)](_0x4689e5)||_0x4689e5<=0x0)throw CliErrors[_0x445d93(0x139)]('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x4689e5;}function a192_0x1a69(){const _0x5ee8ac=['pageId','8788728RZerXu','2454254eFVUsq','map','trim','length','react','validation','100RrDsis','num','message','file','find','1079265yVQPWw','6837048wCcefZ','15ZGTenm','1IaDsFI','986362XHTWwS','Invalid\x20Custom\x20Page\x20content:\x20','240QxRVRa','137928WTijxJ','type','/ide/','menus','isInteger','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','898936HQyXNi'];a192_0x1a69=function(){return _0x5ee8ac;};return a192_0x1a69();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a193_0x331469=a193_0x1211;(function(_0x13ada2,_0x32a8d7){const _0x5d6b70=a193_0x1211,_0x339b5d=_0x13ada2();while(!![]){try{const _0x416965=parseInt(_0x5d6b70(0xf3))/0x1*(-parseInt(_0x5d6b70(0xf5))/0x2)+parseInt(_0x5d6b70(0xe5))/0x3*(parseInt(_0x5d6b70(0xef))/0x4)+-parseInt(_0x5d6b70(0xe0))/0x5*(-parseInt(_0x5d6b70(0xf2))/0x6)+parseInt(_0x5d6b70(0xeb))/0x7*(parseInt(_0x5d6b70(0xe6))/0x8)+parseInt(_0x5d6b70(0xdd))/0x9+parseInt(_0x5d6b70(0xdf))/0xa*(parseInt(_0x5d6b70(0xf4))/0xb)+-parseInt(_0x5d6b70(0xde))/0xc;if(_0x416965===_0x32a8d7)break;else _0x339b5d['push'](_0x339b5d['shift']());}catch(_0x4ee0ff){_0x339b5d['push'](_0x339b5d['shift']());}}}(a193_0x4569,0x8177a));import{format}from'prettier';const SOURCE_PARSERS={'.js':a193_0x331469(0xec),'.jsx':a193_0x331469(0xec),'.ts':'typescript','.tsx':a193_0x331469(0xe2)},CUSTOM_PAGE_EXTENSIONS=[a193_0x331469(0xe8),'.tsx'];export async function validateCustomPageSourceFiles(_0x4f0de0){const _0xb3f8ea=a193_0x331469,_0x35cc85=Object[_0xb3f8ea(0xea)](_0x4f0de0)[_0xb3f8ea(0xed)](([_0x51d06d])=>getParser(_0x51d06d));if(!_0x35cc85[_0xb3f8ea(0xf0)](([_0xdc0234])=>isReactSourceFile(_0xdc0234)))return[{'file':_0xb3f8ea(0xe3),'message':_0xb3f8ea(0xe7)}];const _0x1e6700=await Promise[_0xb3f8ea(0xe9)](_0x35cc85[_0xb3f8ea(0xe4)](async([_0x4d13ba,_0x566441])=>{const _0x100bb3=_0xb3f8ea;try{return await format(_0x566441,{'parser':getParser(_0x4d13ba)}),undefined;}catch(_0x5c1657){return{'file':_0x4d13ba,'message':_0x5c1657 instanceof Error?_0x5c1657[_0x100bb3(0xee)]:String(_0x5c1657)};}}));return _0x1e6700[_0xb3f8ea(0xed)](_0x194388=>_0x194388!==undefined);}function a193_0x1211(_0x3c1be9,_0x34638e){_0x3c1be9=_0x3c1be9-0xdd;const _0x456942=a193_0x4569();let _0x1211a6=_0x456942[_0x3c1be9];return _0x1211a6;}function getParser(_0x4d9335){const _0x1d45d0=a193_0x331469,_0x308a72=_0x4d9335['trim']()['toLowerCase']();return Object[_0x1d45d0(0xea)](SOURCE_PARSERS)[_0x1d45d0(0xe1)](([_0x73247d])=>_0x308a72['endsWith'](_0x73247d))?.[0x1];}function a193_0x4569(){const _0x3e8d94=['endsWith','6145470WcxOwl','5605812mHqRIo','18910riKQKQ','142340zVYKFm','find','typescript','page\x20files','map','125088NFVhXl','344prFKvH','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','.jsx','all','entries','11725kKtIIG','babel','filter','message','24bWpImm','some','trim','72TqNVjC','40311xuJgcv','2893UWjFPK','42JjErka'];a193_0x4569=function(){return _0x3e8d94;};return a193_0x4569();}function isReactSourceFile(_0x362313){const _0x5a6d56=a193_0x331469,_0x1cf69d=_0x362313[_0x5a6d56(0xf1)]()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS[_0x5a6d56(0xf0)](_0x283a71=>_0x1cf69d[_0x5a6d56(0xf6)](_0x283a71));}
|