@lovrabet/rabetbase-cli 2.5.7 → 2.5.8-beta.2
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 +7 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +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 +2 -2
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.d.ts +19 -0
- package/lib/core/kb-management-client.js +1 -0
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/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 +2 -2
- package/skills/rabetbase/references/rabetbase-kb.md +7 -6
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a197_0x5297c2=a197_0x28ce;(function(_0xfc9d69,_0x82ba3a){const _0x5d5f66=a197_0x28ce,_0x1abee8=_0xfc9d69();while(!![]){try{const _0x33eece=-parseInt(_0x5d5f66(0x226))/0x1*(-parseInt(_0x5d5f66(0x1f1))/0x2)+-parseInt(_0x5d5f66(0x20d))/0x3*(parseInt(_0x5d5f66(0x200))/0x4)+-parseInt(_0x5d5f66(0x1c4))/0x5*(parseInt(_0x5d5f66(0x1df))/0x6)+parseInt(_0x5d5f66(0x237))/0x7+-parseInt(_0x5d5f66(0x1c8))/0x8+parseInt(_0x5d5f66(0x21f))/0x9+parseInt(_0x5d5f66(0x236))/0xa;if(_0x33eece===_0x82ba3a)break;else _0x1abee8['push'](_0x1abee8['shift']());}catch(_0x1c4444){_0x1abee8['push'](_0x1abee8['shift']());}}}(a197_0x1773,0x4deb8));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';function a197_0x1773(){const _0x50ea2c=['notification_config_','Invalid\x20notification\x20config\x20response.','endpointUrlRaw','Notification\x20JSON\x20field\x20\x22','\x22\x20must\x20be\x20','Notification\x20JSON\x20channelConfig\x20field\x20\x22','a\x20JSON\x20object\x20or\x20null','notification_config_json_invalid','\x20--format\x20compress','parse','\x22\x20cannot\x20exceed\x20','\x22configName\x22.','subjectPrefix','endpointUrl','channelConfig','notification_config_update_empty','WECOM','2XUDjhg','create','notification_config_response_invalid','appCode','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Application-level\x20notification\x20config\x20ID','configName','kind','from-env','a\x20supported\x20string','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','number','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','setEncoding','trim','196216SigkIs','length','update','utf8','join','channelConfigRaw','apiError','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','bool','\x20failed.','Invalid\x20--','str','18PFBnrv','notification_config_source_unavailable','configCode','Create\x20JSON\x20requires\x20field\x20','boolean','environment\x20variable\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20has\x20an\x20invalid\x20appCode.','\x20must\x20be\x20an\x20object.','push','Item\x20','messageTemplate','\x20has\x20an\x20invalid\x20channelType.','replyTo','isSafeInteger','mutation','a\x20JSON\x20object','\x20is\x20missing\x20required\x20field\x20\x22','1440855RbyifI','ccList','EMAIL','has','\x20characters.','Unknown\x20notification\x20JSON\x20field\x20\x22','stringify','342569gEVREe','a\x20string\x20or\x20null','notification_config_field_unknown','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20--type\x20','path','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Allowed\x20values:\x20','stdin','includes','connectTimeout','FEISHU','notification_config_field_invalid','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Notification\x20JSON\x20from\x20','1862890lHUhtv','3842902BDZCxH','notification_config_confirmation_required','notification_config_id_invalid','file\x20','a\x20non-empty\x20string','description','Notification\x20config\x20','keys','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_field_required','\x20has\x20invalid\x20field\x20\x22','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x22\x20is\x20forbidden.','5SHJREU','prototype','channelCode','rabetbase\x20notification\x20config-list\x20--appcode\x20','436128vodnXh','\x20is\x20invalid.','hasOwnProperty','WEBHOOK','failed','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','file','notification_config_channel_field_forbidden','Notification\x20config\x20list\x20item\x20','string','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','dry-run','channelType','env','call','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','recipients','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','validation','updateTime','name','endpointUrl:null','readTimeout','3419634NELCqg'];a197_0x1773=function(){return _0x50ea2c;};return a197_0x1773();}import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x5297c2(0x221),a197_0x5297c2(0x231),'DINGTALK',a197_0x5297c2(0x1f0),a197_0x5297c2(0x1cb)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x5297c2(0x1f7),'channelType',a197_0x5297c2(0x1ed),'channelConfig',a197_0x5297c2(0x23c),a197_0x5297c2(0x230),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x5297c2(0x1f4),a197_0x5297c2(0x20f),a197_0x5297c2(0x1c6)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a197_0x5297c2(0x1d8),a197_0x5297c2(0x220),'bccList',a197_0x5297c2(0x21a),a197_0x5297c2(0x1ec),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x5297c2(0x1ce),'type':a197_0x5297c2(0x1d1),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a197_0x5297c2(0x22e),'type':a197_0x5297c2(0x211),'required':![],'default':![],'description':a197_0x5297c2(0x234)},{'name':'from-env','type':a197_0x5297c2(0x1d1),'required':![],'description':a197_0x5297c2(0x1cd)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x5297c2(0x1fc),'required':!![],'description':a197_0x5297c2(0x1f6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3cf4d8,_0x270d7f,_0x41e511){return new CliError(_0x3cf4d8,0x1,_0x270d7f,_0x41e511);}export function readNotificationId(_0x1a6e16){const _0x30ebf6=a197_0x5297c2,_0x1248f9=_0x1a6e16['num']('id');if(!Number['isSafeInteger'](_0x1248f9)||_0x1248f9<=0x0)throw notificationError(_0x30ebf6(0x239),_0x30ebf6(0x213));return _0x1248f9;}export function requireNotificationExplicitYes(_0x40ebde){const _0x554030=a197_0x5297c2;if(_0x40ebde[_0x554030(0x209)](_0x554030(0x1d3))||_0x40ebde[_0x554030(0x209)]('yes'))return;throw notificationError(_0x554030(0x238),_0x554030(0x1fd),_0x554030(0x1f5));}export function readNotificationChannelType(_0x1f13f9,_0x557f4='type',_0x116d66='EMAIL'){const _0x262ae0=a197_0x5297c2,_0x538578=_0x1f13f9[_0x262ae0(0x20c)](_0x557f4)[_0x262ae0(0x1ff)]()||_0x116d66;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x538578))throw CliErrors[_0x262ae0(0x1da)](_0x262ae0(0x20b)+_0x557f4+':\x20'+_0x538578,_0x262ae0(0x22d)+NOTIFICATION_CHANNEL_TYPES[_0x262ae0(0x204)](',\x20')+'.');return _0x538578;}export function assertSingleNotificationSource(_0x43ff54){const _0x5434e2=a197_0x5297c2,_0x2c5ee4=[],_0x11879f=_0x43ff54[_0x5434e2(0x20c)](_0x5434e2(0x1ce))[_0x5434e2(0x1ff)]();if(_0x11879f)_0x2c5ee4[_0x5434e2(0x216)]({'kind':_0x5434e2(0x1ce),'path':_0x11879f});if(_0x43ff54[_0x5434e2(0x209)](_0x5434e2(0x22e)))_0x2c5ee4[_0x5434e2(0x216)]({'kind':_0x5434e2(0x22e)});const _0xfca172=_0x43ff54[_0x5434e2(0x20c)](_0x5434e2(0x1f9))['trim']();if(_0xfca172)_0x2c5ee4[_0x5434e2(0x216)]({'kind':_0x5434e2(0x1d5),'name':_0xfca172});if(_0x2c5ee4[_0x5434e2(0x201)]===0x0)throw CliErrors[_0x5434e2(0x1da)]('Missing\x20notification\x20JSON\x20source.',_0x5434e2(0x207));if(_0x2c5ee4['length']>0x1)throw CliErrors[_0x5434e2(0x1da)](_0x5434e2(0x23f),_0x5434e2(0x207));return _0x2c5ee4[0x0];}export async function readNotificationDocument(_0x3f2692,_0x5ab45e){const _0x23d927=a197_0x5297c2,_0x180dc4=assertSingleNotificationSource(_0x3f2692),_0x39c7fe=_0x180dc4['kind']==='file'?_0x23d927(0x23a)+_0x180dc4[_0x23d927(0x22b)]:_0x180dc4[_0x23d927(0x1f8)]===_0x23d927(0x1d5)?_0x23d927(0x212)+_0x180dc4[_0x23d927(0x1dc)]:_0x23d927(0x22e);let _0x153aa2;try{if(_0x180dc4[_0x23d927(0x1f8)]===_0x23d927(0x1ce))_0x153aa2=await readFile(_0x180dc4['path'],'utf8');else{if(_0x180dc4['kind']===_0x23d927(0x1d5)){if(!(_0x180dc4[_0x23d927(0x1dc)]in process.env))throw notificationError(_0x23d927(0x20e),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x180dc4['name']);_0x153aa2=process.env[_0x180dc4.name]??'';}else _0x153aa2=await readStdin();}}catch(_0x463678){if(_0x463678 instanceof CliError)throw _0x463678;throw notificationError(_0x23d927(0x20e),_0x23d927(0x1c2)+_0x39c7fe+'.');}let _0x379f9c;try{_0x379f9c=JSON[_0x23d927(0x1e9)](_0x153aa2);}catch{throw notificationError('notification_config_json_invalid',_0x23d927(0x235)+_0x39c7fe+_0x23d927(0x1c9),_0x23d927(0x233));}if(!isJsonObject(_0x379f9c))throw notificationError(_0x23d927(0x1e7),_0x23d927(0x235)+_0x39c7fe+_0x23d927(0x215));return validateNotificationDocument(_0x379f9c,_0x5ab45e);}export function projectNotificationListConfig(_0x1e1d95,_0x1b7378){const _0x41c96d=a197_0x5297c2;return{'id':typeof _0x1e1d95['id']===_0x41c96d(0x1fc)?_0x1e1d95['id']:null,'configCode':requireResponseString(_0x1e1d95[_0x41c96d(0x20f)],'configCode',_0x1b7378),'configName':requireResponseString(_0x1e1d95[_0x41c96d(0x1f7)],'configName',_0x1b7378),'channelType':requireResponseString(_0x1e1d95[_0x41c96d(0x1d4)],'channelType',_0x1b7378),'description':normalizeNullableString(_0x1e1d95['description']),'createTime':normalizeNullableString(_0x1e1d95['createTime']),'updateTime':normalizeNullableString(_0x1e1d95[_0x41c96d(0x1db)])};}export function normalizeExactNotificationConfig(_0x10be21,_0x37e1ae,_0x577e93){const _0x51affe=a197_0x5297c2;if(!Number[_0x51affe(0x21b)](_0x10be21['id'])||_0x10be21['id']!==_0x37e1ae)throw notificationError(_0x51affe(0x1f3),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x37e1ae+'.');if(_0x10be21['appCode']!==_0x577e93)throw notificationError(_0x51affe(0x1f3),_0x51affe(0x23d)+_0x37e1ae+_0x51affe(0x1d9));const _0x39f964=requireExactString(_0x10be21['configName'],_0x51affe(0x1f7),_0x37e1ae),_0x202e90=requireExactString(_0x10be21[_0x51affe(0x20f)],_0x51affe(0x20f),_0x37e1ae),_0x40da44=requireExactString(_0x10be21[_0x51affe(0x1d4)],_0x51affe(0x1d4),_0x37e1ae);if(!NOTIFICATION_CHANNEL_TYPES[_0x51affe(0x22f)](_0x40da44))throw notificationError(_0x51affe(0x1f3),_0x51affe(0x23d)+_0x37e1ae+'\x20has\x20an\x20unsupported\x20channelType.');const _0x109121=responseNullableString(_0x10be21[_0x51affe(0x1ed)],_0x51affe(0x1ed),_0x37e1ae),_0x3e1354=responseNullableString(_0x10be21[_0x51affe(0x1ee)],_0x51affe(0x1ee),_0x37e1ae),_0x4970cd=responseNullableString(_0x10be21['description'],_0x51affe(0x23c),_0x37e1ae),_0x476274=responseNullableTimeout(_0x10be21['connectTimeout'],'connectTimeout',_0x37e1ae),_0x99a58e=responseNullableTimeout(_0x10be21[_0x51affe(0x1de)],_0x51affe(0x1de),_0x37e1ae);return{'id':_0x37e1ae,'appCode':_0x577e93,'configCode':_0x202e90,'configName':_0x39f964,'channelType':_0x40da44,'endpointUrl':redactSensitive(_0x109121),'channelConfig':redactSensitive(_0x3e1354),'description':_0x4970cd,'connectTimeout':_0x476274,'readTimeout':_0x99a58e,'endpointUrlRaw':_0x109121,'channelConfigRaw':_0x3e1354};}export async function requireExactNotificationConfig(_0x386962,_0x2e1f92,_0x22ab9d){const _0x3e91f7=a197_0x5297c2;let _0x547dec;try{_0x547dec=await getNotificationChannelConfig(_0x2e1f92,_0x386962);}catch{throw safeApiFailure(_0x22ab9d,'preflight',_0x3e91f7(0x1d7)+_0x386962+_0x3e91f7(0x229));}return normalizeExactNotificationConfig(_0x547dec,_0x2e1f92,_0x386962);}export function projectNotificationConfig(_0x21298c){const _0x51cb61=a197_0x5297c2;return{'id':_0x21298c['id']??null,'appCode':_0x21298c['appCode'],'configCode':_0x21298c[_0x51cb61(0x20f)]??null,'configName':_0x21298c['configName'],'channelType':_0x21298c[_0x51cb61(0x1d4)],'endpointUrl':redactSensitive(_0x21298c['endpointUrl']),'channelConfig':redactSensitive(_0x21298c[_0x51cb61(0x1ee)]),'description':_0x21298c['description']??null,'connectTimeout':_0x21298c[_0x51cb61(0x230)]??null,'readTimeout':_0x21298c['readTimeout']??null};}export function notificationSelector(_0x4471f3){const _0x242055=a197_0x5297c2;return{'appCode':_0x4471f3[_0x242055(0x1f4)],'id':_0x4471f3['id'],'configCode':_0x4471f3[_0x242055(0x20f)],'configName':_0x4471f3[_0x242055(0x1f7)],'channelType':_0x4471f3['channelType']};}export function createMutationInput(_0x152a5c,_0x283bbd){const _0x497bf7=a197_0x5297c2;return{'appCode':_0x152a5c,'configName':_0x283bbd[_0x497bf7(0x1f7)],'channelType':_0x283bbd[_0x497bf7(0x1d4)],...hasOwn(_0x283bbd,_0x497bf7(0x1ed))?{'endpointUrl':_0x283bbd[_0x497bf7(0x1ed)]}:{},...hasOwn(_0x283bbd,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x283bbd['channelConfig'])}:{},...hasOwn(_0x283bbd,'description')?{'description':_0x283bbd[_0x497bf7(0x23c)]}:{},...hasOwn(_0x283bbd,_0x497bf7(0x230))?{'connectTimeout':_0x283bbd[_0x497bf7(0x230)]}:{},...hasOwn(_0x283bbd,_0x497bf7(0x1de))?{'readTimeout':_0x283bbd[_0x497bf7(0x1de)]}:{}};}export function mergeUpdateInput(_0x54ed2d,_0x4b0a51){const _0x40b213=a197_0x5297c2;return{'id':_0x54ed2d['id'],'appCode':_0x54ed2d['appCode'],'configName':_0x4b0a51[_0x40b213(0x1f7)]??_0x54ed2d[_0x40b213(0x1f7)],'channelType':_0x4b0a51[_0x40b213(0x1d4)]??_0x54ed2d[_0x40b213(0x1d4)],'endpointUrl':hasOwn(_0x4b0a51,'endpointUrl')?_0x4b0a51[_0x40b213(0x1ed)]:_0x54ed2d[_0x40b213(0x1e2)],'channelConfig':hasOwn(_0x4b0a51,_0x40b213(0x1ee))?serializeChannelConfig(_0x4b0a51[_0x40b213(0x1ee)]):_0x54ed2d[_0x40b213(0x205)],'description':hasOwn(_0x4b0a51,'description')?_0x4b0a51['description']:_0x54ed2d[_0x40b213(0x23c)],'connectTimeout':hasOwn(_0x4b0a51,'connectTimeout')?_0x4b0a51[_0x40b213(0x230)]:_0x54ed2d['connectTimeout'],'readTimeout':hasOwn(_0x4b0a51,_0x40b213(0x1de))?_0x4b0a51[_0x40b213(0x1de)]:_0x54ed2d['readTimeout']};}export function plannedUpdateProjection(_0x37fb6f,_0x5ab2d4){const _0x40b25e=a197_0x5297c2;return projectNotificationConfig({'id':_0x37fb6f['id'],'appCode':_0x37fb6f['appCode'],'configCode':_0x37fb6f[_0x40b25e(0x20f)],'configName':_0x5ab2d4[_0x40b25e(0x1f7)]??_0x37fb6f['configName'],'channelType':_0x5ab2d4[_0x40b25e(0x1d4)]??_0x37fb6f[_0x40b25e(0x1d4)],'endpointUrl':hasOwn(_0x5ab2d4,_0x40b25e(0x1ed))?_0x5ab2d4['endpointUrl']:_0x37fb6f['endpointUrlRaw'],'channelConfig':hasOwn(_0x5ab2d4,_0x40b25e(0x1ee))?_0x5ab2d4[_0x40b25e(0x1ee)]:_0x37fb6f[_0x40b25e(0x205)],'description':hasOwn(_0x5ab2d4,_0x40b25e(0x23c))?_0x5ab2d4['description']:_0x37fb6f[_0x40b25e(0x23c)],'connectTimeout':hasOwn(_0x5ab2d4,'connectTimeout')?_0x5ab2d4[_0x40b25e(0x230)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x37fb6f[_0x40b25e(0x230)],'readTimeout':hasOwn(_0x5ab2d4,_0x40b25e(0x1de))?_0x5ab2d4['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x37fb6f[_0x40b25e(0x1de)]});}export function requestedSafeFieldsMatch(_0x3c7fc9,_0x1bb0e7,_0x9093d8){const _0x125a33=a197_0x5297c2,_0x3d0aff=[],_0x4f7dfd=[],_0x2e0032=[];for(const _0x6aae65 of[_0x125a33(0x1f7),_0x125a33(0x1d4),_0x125a33(0x23c)]){if(!hasOwn(_0x9093d8,_0x6aae65))continue;_0x2e0032[_0x125a33(0x216)](_0x6aae65),_0x3d0aff['push'](_0x1bb0e7[_0x6aae65]===_0x9093d8[_0x6aae65]),_0x4f7dfd['push'](_0x3c7fc9[_0x6aae65]!==_0x9093d8[_0x6aae65]&&_0x1bb0e7[_0x6aae65]===_0x9093d8[_0x6aae65]);}for(const _0x463e32 of[_0x125a33(0x230),_0x125a33(0x1de)]){if(!hasOwn(_0x9093d8,_0x463e32))continue;const _0x36a388=_0x9093d8[_0x463e32]??(_0x463e32==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x2e0032[_0x125a33(0x216)](_0x463e32),_0x3d0aff[_0x125a33(0x216)](_0x1bb0e7[_0x463e32]===_0x36a388),_0x4f7dfd[_0x125a33(0x216)](_0x3c7fc9[_0x463e32]!==_0x36a388&&_0x1bb0e7[_0x463e32]===_0x36a388);}return hasOwn(_0x9093d8,_0x125a33(0x1ed))&&_0x9093d8[_0x125a33(0x1ed)]===null&&(_0x2e0032[_0x125a33(0x216)](_0x125a33(0x1dd)),_0x3d0aff['push'](_0x1bb0e7['endpointUrlRaw']===null||_0x1bb0e7[_0x125a33(0x1e2)]===''),_0x4f7dfd[_0x125a33(0x216)](_0x3c7fc9['endpointUrlRaw']!==null&&_0x3c7fc9[_0x125a33(0x1e2)]!==''&&(_0x1bb0e7['endpointUrlRaw']===null||_0x1bb0e7[_0x125a33(0x1e2)]===''))),{'allMatch':_0x3d0aff['every'](Boolean),'provesChange':_0x4f7dfd['some'](Boolean),'verifiedFields':_0x2e0032};}export function validateNotificationDeleteReadback(_0x41f475,_0x58f23c,_0x4556aa){const _0x2900ae=a197_0x5297c2;for(const [_0x5a5251,_0xd88e57]of _0x41f475['entries']()){if(!Number[_0x2900ae(0x21b)](_0xd88e57['id'])||_0xd88e57['id']<=0x0)throw notificationError(_0x2900ae(0x1f3),'Notification\x20config\x20list\x20item\x20'+(_0x5a5251+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0xd88e57[_0x2900ae(0x1f4)]!==_0x58f23c)throw notificationError(_0x2900ae(0x1f3),_0x2900ae(0x1d0)+(_0x5a5251+0x1)+_0x2900ae(0x214));if(_0xd88e57[_0x2900ae(0x1d4)]!==_0x4556aa)throw notificationError(_0x2900ae(0x1f3),_0x2900ae(0x1d0)+(_0x5a5251+0x1)+_0x2900ae(0x219));}}export function safeApiFailure(_0x464247,_0x33fbb6,_0x48cd0e){const _0x432f5e=a197_0x5297c2;return notificationError(_0x432f5e(0x1e0)+_0x464247+'_'+(_0x33fbb6===_0x432f5e(0x21c)?_0x432f5e(0x1cc):_0x33fbb6+'_unavailable'),_0x432f5e(0x23d)+_0x464247+'\x20'+_0x33fbb6+_0x432f5e(0x20a),_0x48cd0e);}export function notificationLookupCommand(_0x523335,_0x1a242b){const _0x21eaaa=a197_0x5297c2;return _0x21eaaa(0x1c7)+_0x523335+_0x21eaaa(0x22a)+_0x1a242b+_0x21eaaa(0x1e8);}function validateNotificationDocument(_0x5dd4eb,_0x5e5d1e){const _0x266ad6=a197_0x5297c2;for(const _0x1a26db of Object['keys'](_0x5dd4eb)){if(FORBIDDEN_IDENTITY_FIELDS[_0x266ad6(0x222)](_0x1a26db))throw notificationError('notification_config_field_forbidden',_0x266ad6(0x1e3)+_0x1a26db+_0x266ad6(0x208));if(!ALLOWED_INPUT_FIELDS['has'](_0x1a26db))throw notificationError(_0x266ad6(0x228),_0x266ad6(0x224)+_0x1a26db+'\x22.');}if(_0x5e5d1e===_0x266ad6(0x202)&&Object[_0x266ad6(0x23e)](_0x5dd4eb)['length']===0x0)throw notificationError(_0x266ad6(0x1ef),_0x266ad6(0x22c));const _0x374821={};if(hasOwn(_0x5dd4eb,_0x266ad6(0x1f7)))_0x374821[_0x266ad6(0x1f7)]=validateRequiredString(_0x5dd4eb[_0x266ad6(0x1f7)],_0x266ad6(0x1f7),0x80);else{if(_0x5e5d1e===_0x266ad6(0x1f2))throw notificationError(_0x266ad6(0x240),_0x266ad6(0x210)+_0x266ad6(0x1eb));}if(hasOwn(_0x5dd4eb,_0x266ad6(0x1d4))){if(typeof _0x5dd4eb['channelType']!==_0x266ad6(0x1d1))throw invalidFieldType(_0x266ad6(0x1d4),_0x266ad6(0x1fa));const _0x58be6=_0x5dd4eb[_0x266ad6(0x1d4)][_0x266ad6(0x1ff)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x266ad6(0x22f)](_0x58be6))throw notificationError('notification_config_field_invalid',_0x266ad6(0x1fb),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x266ad6(0x204)](',\x20')+'.');_0x374821['channelType']=_0x58be6;}else{if(_0x5e5d1e===_0x266ad6(0x1f2))throw notificationError(_0x266ad6(0x240),_0x266ad6(0x210)+'\x22channelType\x22.');}for(const [_0x27670d,_0x45bde4]of[[_0x266ad6(0x1ed),0x200],['description',0x100]]){if(!hasOwn(_0x5dd4eb,_0x27670d))continue;const _0x2af05d=_0x5dd4eb[_0x27670d];if(_0x2af05d!==null&&typeof _0x2af05d!==_0x266ad6(0x1d1))throw invalidFieldType(_0x27670d,_0x266ad6(0x227));if(typeof _0x2af05d===_0x266ad6(0x1d1)&&_0x2af05d[_0x266ad6(0x201)]>_0x45bde4)throw notificationError(_0x266ad6(0x232),_0x266ad6(0x1e3)+_0x27670d+_0x266ad6(0x1ea)+_0x45bde4+_0x266ad6(0x223));_0x374821[_0x27670d]=_0x2af05d;}if(hasOwn(_0x5dd4eb,'channelConfig')){const _0xb9fc48=_0x5dd4eb[_0x266ad6(0x1ee)];if(_0xb9fc48===null&&_0x5e5d1e==='create')throw invalidFieldType('channelConfig',_0x266ad6(0x21d));if(_0xb9fc48!==null&&!isJsonObject(_0xb9fc48))throw invalidFieldType(_0x266ad6(0x1ee),_0x5e5d1e===_0x266ad6(0x202)?_0x266ad6(0x1e6):_0x266ad6(0x21d));_0xb9fc48!==null&&validateChannelConfigFields(_0x374821['channelType'],_0xb9fc48),_0x374821[_0x266ad6(0x1ee)]=_0xb9fc48;}for(const _0xa9e3b4 of[_0x266ad6(0x230),'readTimeout']){if(!hasOwn(_0x5dd4eb,_0xa9e3b4))continue;const _0x4d27f8=_0x5dd4eb[_0xa9e3b4];if(_0x4d27f8!==null&&(!Number['isSafeInteger'](_0x4d27f8)||_0x4d27f8<0x0))throw notificationError(_0x266ad6(0x232),_0x266ad6(0x1e3)+_0xa9e3b4+_0x266ad6(0x1d2));_0x374821[_0xa9e3b4]=_0x4d27f8;}return _0x374821;}function validateRequiredString(_0x13d4bd,_0x273f2c,_0x3c7dc3){const _0x596a88=a197_0x5297c2;if(typeof _0x13d4bd!==_0x596a88(0x1d1))throw invalidFieldType(_0x273f2c,_0x596a88(0x23b));const _0x1990d3=_0x13d4bd[_0x596a88(0x1ff)]();if(!_0x1990d3)throw notificationError(_0x596a88(0x232),'Notification\x20JSON\x20field\x20\x22'+_0x273f2c+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x1990d3[_0x596a88(0x201)]>_0x3c7dc3)throw notificationError(_0x596a88(0x232),_0x596a88(0x1e3)+_0x273f2c+_0x596a88(0x1ea)+_0x3c7dc3+_0x596a88(0x223));return _0x1990d3;}function validateChannelConfigFields(_0x319e92,_0x4dcf5b){const _0x3812c2=a197_0x5297c2;if(hasOwn(_0x4dcf5b,'messageTemplate'))throw forbiddenChannelConfigField(_0x3812c2(0x218));if(_0x319e92===_0x3812c2(0x221))for(const _0x3bff3e of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4dcf5b,_0x3bff3e))throw forbiddenChannelConfigField(_0x3bff3e);}}function forbiddenChannelConfigField(_0x2f67bf){const _0x207983=a197_0x5297c2;return notificationError(_0x207983(0x1cf),_0x207983(0x1e5)+_0x2f67bf+_0x207983(0x1c3));}function invalidFieldType(_0x1d08c7,_0x112257){const _0x2a742c=a197_0x5297c2;return notificationError(_0x2a742c(0x232),_0x2a742c(0x1e3)+_0x1d08c7+_0x2a742c(0x1e4)+_0x112257+'.');}function serializeChannelConfig(_0x3e8a68){const _0x3635b1=a197_0x5297c2;return _0x3e8a68===null||_0x3e8a68===undefined?null:JSON[_0x3635b1(0x225)](_0x3e8a68);}function redactSensitive(_0x132664){return _0x132664===null||_0x132664===undefined||_0x132664===''?null:'<redacted>';}function requireResponseString(_0x553f5f,_0x3fc2b9,_0x351b1e){const _0x4f219b=a197_0x5297c2;if(typeof _0x553f5f!==_0x4f219b(0x1d1)||_0x553f5f[_0x4f219b(0x1ff)]()==='')throw CliErrors[_0x4f219b(0x206)](_0x4f219b(0x1e1),_0x4f219b(0x217)+(_0x351b1e+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x3fc2b9+'\x22.');return _0x553f5f[_0x4f219b(0x1ff)]();}function requireExactString(_0x1ea571,_0x44a5f6,_0x1ef1d3){const _0x10a70b=a197_0x5297c2;if(typeof _0x1ea571!=='string'||_0x1ea571[_0x10a70b(0x1ff)]()==='')throw notificationError(_0x10a70b(0x1f3),_0x10a70b(0x23d)+_0x1ef1d3+_0x10a70b(0x21e)+_0x44a5f6+'\x22.');return _0x1ea571[_0x10a70b(0x1ff)]();}function a197_0x28ce(_0x417639,_0x2d0e0e){_0x417639=_0x417639-0x1c2;const _0x1773c6=a197_0x1773();let _0x28ce49=_0x1773c6[_0x417639];return _0x28ce49;}function responseNullableString(_0x3f9234,_0xdaa76a,_0x8dc5e4){const _0xc8992a=a197_0x5297c2;if(_0x3f9234===undefined||_0x3f9234===null)return null;if(typeof _0x3f9234!==_0xc8992a(0x1d1))throw notificationError(_0xc8992a(0x1f3),_0xc8992a(0x23d)+_0x8dc5e4+_0xc8992a(0x241)+_0xdaa76a+'\x22.');return _0x3f9234;}function responseNullableTimeout(_0x5cfcd5,_0x3c6ee2,_0x2580ba){const _0x948e75=a197_0x5297c2;if(_0x5cfcd5===undefined||_0x5cfcd5===null)return null;if(!Number[_0x948e75(0x21b)](_0x5cfcd5)||_0x5cfcd5<0x0)throw notificationError(_0x948e75(0x1f3),'Notification\x20config\x20'+_0x2580ba+_0x948e75(0x241)+_0x3c6ee2+'\x22.');return _0x5cfcd5;}function normalizeNullableString(_0x5c6cfd){return typeof _0x5c6cfd==='string'?_0x5c6cfd:null;}function isJsonObject(_0x2c0975){return _0x2c0975!==null&&typeof _0x2c0975==='object'&&!Array['isArray'](_0x2c0975);}function hasOwn(_0x59209a,_0x4f03b8){const _0x22ccd3=a197_0x5297c2;return Object[_0x22ccd3(0x1c5)][_0x22ccd3(0x1ca)][_0x22ccd3(0x1d6)](_0x59209a,_0x4f03b8);}async function readStdin(){const _0x1f8618=a197_0x5297c2;let _0x5db7c2='';process[_0x1f8618(0x22e)][_0x1f8618(0x1fe)](_0x1f8618(0x203));for await(const _0x17928f of process['stdin'])_0x5db7c2+=_0x17928f;return _0x5db7c2;}
|
|
1
|
+
const a197_0x5c5ecd=a197_0x4de5;(function(_0x40450a,_0x187042){const _0x4cdcfe=a197_0x4de5,_0x323192=_0x40450a();while(!![]){try{const _0x25bf57=parseInt(_0x4cdcfe(0x1d7))/0x1*(-parseInt(_0x4cdcfe(0x19f))/0x2)+-parseInt(_0x4cdcfe(0x1ce))/0x3*(parseInt(_0x4cdcfe(0x173))/0x4)+-parseInt(_0x4cdcfe(0x1b7))/0x5+-parseInt(_0x4cdcfe(0x175))/0x6+parseInt(_0x4cdcfe(0x188))/0x7*(-parseInt(_0x4cdcfe(0x1ca))/0x8)+-parseInt(_0x4cdcfe(0x1d6))/0x9*(-parseInt(_0x4cdcfe(0x1a1))/0xa)+parseInt(_0x4cdcfe(0x189))/0xb*(parseInt(_0x4cdcfe(0x1ee))/0xc);if(_0x25bf57===_0x187042)break;else _0x323192['push'](_0x323192['shift']());}catch(_0xd7cdf9){_0x323192['push'](_0x323192['shift']());}}}(a197_0x5085,0x7ddad));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x5c5ecd(0x19a),a197_0x5c5ecd(0x1b9),a197_0x5c5ecd(0x1e1),a197_0x5c5ecd(0x18e),a197_0x5c5ecd(0x187)];function a197_0x4de5(_0x73b85b,_0x15fc3b){_0x73b85b=_0x73b85b-0x172;const _0x50857f=a197_0x5085();let _0x4de525=_0x50857f[_0x73b85b];return _0x4de525;}export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x5c5ecd(0x1e0),a197_0x5c5ecd(0x1cb),'endpointUrl',a197_0x5c5ecd(0x1ec),'description','connectTimeout',a197_0x5c5ecd(0x1c9)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x5c5ecd(0x178),'configCode','channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x5c5ecd(0x1af),a197_0x5c5ecd(0x191),'ccList',a197_0x5c5ecd(0x1bc),a197_0x5c5ecd(0x1e7),'subjectPrefix',a197_0x5c5ecd(0x1a4),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a197_0x5c5ecd(0x1de),'required':![],'default':![],'description':a197_0x5c5ecd(0x1c0)},{'name':'from-env','type':a197_0x5c5ecd(0x1e8),'required':![],'description':a197_0x5c5ecd(0x180)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x5c5ecd(0x1ad),'required':!![],'description':a197_0x5c5ecd(0x19e)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x4a5234,_0x12ff38,_0xb57196){return new CliError(_0x4a5234,0x1,_0x12ff38,_0xb57196);}export function readNotificationId(_0x26ec38){const _0x324d5c=a197_0x5c5ecd,_0x2d8b07=_0x26ec38[_0x324d5c(0x1ac)]('id');if(!Number[_0x324d5c(0x17b)](_0x2d8b07)||_0x2d8b07<=0x0)throw notificationError(_0x324d5c(0x186),_0x324d5c(0x183));return _0x2d8b07;}export function requireNotificationExplicitYes(_0x4f6bd5){const _0x5b516d=a197_0x5c5ecd;if(_0x4f6bd5['bool'](_0x5b516d(0x1a7))||_0x4f6bd5[_0x5b516d(0x1ae)](_0x5b516d(0x1cd)))return;throw notificationError(_0x5b516d(0x1cc),_0x5b516d(0x1bf),_0x5b516d(0x17f));}export function readNotificationChannelType(_0x5009f6,_0x451838=a197_0x5c5ecd(0x1cf),_0x549a4c=a197_0x5c5ecd(0x19a)){const _0x16affd=a197_0x5c5ecd,_0x2cac1b=_0x5009f6[_0x16affd(0x1e6)](_0x451838)[_0x16affd(0x184)]()||_0x549a4c;if(!NOTIFICATION_CHANNEL_TYPES[_0x16affd(0x1b1)](_0x2cac1b))throw CliErrors[_0x16affd(0x1b5)]('Invalid\x20--'+_0x451838+':\x20'+_0x2cac1b,_0x16affd(0x199)+NOTIFICATION_CHANNEL_TYPES[_0x16affd(0x1f3)](',\x20')+'.');return _0x2cac1b;}export function assertSingleNotificationSource(_0x383a2e){const _0x3da54e=a197_0x5c5ecd,_0x15d4b6=[],_0x56470a=_0x383a2e[_0x3da54e(0x1e6)](_0x3da54e(0x1b6))[_0x3da54e(0x184)]();if(_0x56470a)_0x15d4b6['push']({'kind':'file','path':_0x56470a});if(_0x383a2e[_0x3da54e(0x1ae)]('stdin'))_0x15d4b6[_0x3da54e(0x1e4)]({'kind':_0x3da54e(0x195)});const _0x3d0801=_0x383a2e[_0x3da54e(0x1e6)](_0x3da54e(0x1ef))[_0x3da54e(0x184)]();if(_0x3d0801)_0x15d4b6[_0x3da54e(0x1e4)]({'kind':_0x3da54e(0x1db),'name':_0x3d0801});if(_0x15d4b6[_0x3da54e(0x1d8)]===0x0)throw CliErrors[_0x3da54e(0x1b5)](_0x3da54e(0x172),_0x3da54e(0x1aa));if(_0x15d4b6['length']>0x1)throw CliErrors[_0x3da54e(0x1b5)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x3da54e(0x1aa));return _0x15d4b6[0x0];}export async function readNotificationDocument(_0x283b0a,_0x46f0bb){const _0x259561=a197_0x5c5ecd,_0x5956d0=assertSingleNotificationSource(_0x283b0a),_0xf7ff7c=_0x5956d0['kind']===_0x259561(0x1b6)?'file\x20'+_0x5956d0[_0x259561(0x1f2)]:_0x5956d0[_0x259561(0x1e2)]==='env'?'environment\x20variable\x20'+_0x5956d0[_0x259561(0x1d1)]:_0x259561(0x195);let _0x258025;try{if(_0x5956d0[_0x259561(0x1e2)]===_0x259561(0x1b6))_0x258025=await readFile(_0x5956d0[_0x259561(0x1f2)],_0x259561(0x1d3));else{if(_0x5956d0[_0x259561(0x1e2)]===_0x259561(0x1db)){if(!(_0x5956d0[_0x259561(0x1d1)]in process.env))throw notificationError(_0x259561(0x1df),_0x259561(0x1a9)+_0x5956d0[_0x259561(0x1d1)]);_0x258025=process.env[_0x5956d0.name]??'';}else _0x258025=await readStdin();}}catch(_0x935159){if(_0x935159 instanceof CliError)throw _0x935159;throw notificationError(_0x259561(0x1df),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0xf7ff7c+'.');}let _0x2d7881;try{_0x2d7881=JSON[_0x259561(0x1a2)](_0x258025);}catch{throw notificationError(_0x259561(0x17a),_0x259561(0x17c)+_0xf7ff7c+_0x259561(0x1c8),_0x259561(0x19c));}if(!isJsonObject(_0x2d7881))throw notificationError(_0x259561(0x17a),_0x259561(0x17c)+_0xf7ff7c+_0x259561(0x1f0));return validateNotificationDocument(_0x2d7881,_0x46f0bb);}export function projectNotificationListConfig(_0x327e73,_0x3e3d54){const _0x12ae11=a197_0x5c5ecd;return{'id':typeof _0x327e73['id']===_0x12ae11(0x1ad)?_0x327e73['id']:null,'configCode':requireResponseString(_0x327e73['configCode'],_0x12ae11(0x1e9),_0x3e3d54),'configName':requireResponseString(_0x327e73[_0x12ae11(0x1e0)],_0x12ae11(0x1e0),_0x3e3d54),'channelType':requireResponseString(_0x327e73[_0x12ae11(0x1cb)],'channelType',_0x3e3d54),'description':normalizeNullableString(_0x327e73[_0x12ae11(0x19b)]),'createTime':normalizeNullableString(_0x327e73[_0x12ae11(0x1f1)]),'updateTime':normalizeNullableString(_0x327e73[_0x12ae11(0x1c7)])};}export function normalizeExactNotificationConfig(_0x69c711,_0x44f0e6,_0x543f5c){const _0x408d23=a197_0x5c5ecd;if(!Number[_0x408d23(0x17b)](_0x69c711['id'])||_0x69c711['id']!==_0x44f0e6)throw notificationError(_0x408d23(0x1dc),_0x408d23(0x193)+_0x44f0e6+'.');if(_0x69c711[_0x408d23(0x178)]!==_0x543f5c)throw notificationError(_0x408d23(0x1dc),_0x408d23(0x179)+_0x44f0e6+_0x408d23(0x174));const _0x415ea0=requireExactString(_0x69c711[_0x408d23(0x1e0)],_0x408d23(0x1e0),_0x44f0e6),_0x5de2e9=requireExactString(_0x69c711[_0x408d23(0x1e9)],_0x408d23(0x1e9),_0x44f0e6),_0x277f0a=requireExactString(_0x69c711['channelType'],_0x408d23(0x1cb),_0x44f0e6);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x277f0a))throw notificationError(_0x408d23(0x1dc),'Notification\x20config\x20'+_0x44f0e6+'\x20has\x20an\x20unsupported\x20channelType.');const _0x37fa84=responseNullableString(_0x69c711[_0x408d23(0x18c)],_0x408d23(0x18c),_0x44f0e6),_0x5d9485=responseNullableString(_0x69c711[_0x408d23(0x1ec)],'channelConfig',_0x44f0e6),_0x3f0a65=responseNullableString(_0x69c711[_0x408d23(0x19b)],_0x408d23(0x19b),_0x44f0e6),_0x556031=responseNullableTimeout(_0x69c711[_0x408d23(0x1d9)],'connectTimeout',_0x44f0e6),_0x2959c8=responseNullableTimeout(_0x69c711[_0x408d23(0x1c9)],_0x408d23(0x1c9),_0x44f0e6);return{'id':_0x44f0e6,'appCode':_0x543f5c,'configCode':_0x5de2e9,'configName':_0x415ea0,'channelType':_0x277f0a,'endpointUrl':redactSensitive(_0x37fa84),'channelConfig':redactSensitive(_0x5d9485),'description':_0x3f0a65,'connectTimeout':_0x556031,'readTimeout':_0x2959c8,'endpointUrlRaw':_0x37fa84,'channelConfigRaw':_0x5d9485};}export async function requireExactNotificationConfig(_0x5353d5,_0x2438ec,_0x371261){const _0x50c247=a197_0x5c5ecd;let _0x3d4e52;try{_0x3d4e52=await getNotificationChannelConfig(_0x2438ec,_0x5353d5);}catch{throw safeApiFailure(_0x371261,_0x50c247(0x1bd),_0x50c247(0x1c2)+_0x5353d5+_0x50c247(0x190));}return normalizeExactNotificationConfig(_0x3d4e52,_0x2438ec,_0x5353d5);}export function projectNotificationConfig(_0x3d8ea4){const _0x174c4e=a197_0x5c5ecd;return{'id':_0x3d8ea4['id']??null,'appCode':_0x3d8ea4[_0x174c4e(0x178)],'configCode':_0x3d8ea4[_0x174c4e(0x1e9)]??null,'configName':_0x3d8ea4['configName'],'channelType':_0x3d8ea4[_0x174c4e(0x1cb)],'endpointUrl':redactSensitive(_0x3d8ea4[_0x174c4e(0x18c)]),'channelConfig':redactSensitive(_0x3d8ea4[_0x174c4e(0x1ec)]),'description':_0x3d8ea4[_0x174c4e(0x19b)]??null,'connectTimeout':_0x3d8ea4[_0x174c4e(0x1d9)]??null,'readTimeout':_0x3d8ea4[_0x174c4e(0x1c9)]??null};}export function notificationSelector(_0x383071){const _0x34639d=a197_0x5c5ecd;return{'appCode':_0x383071[_0x34639d(0x178)],'id':_0x383071['id'],'configCode':_0x383071[_0x34639d(0x1e9)],'configName':_0x383071[_0x34639d(0x1e0)],'channelType':_0x383071[_0x34639d(0x1cb)]};}export function createMutationInput(_0x1ad7cd,_0x4b71fb){const _0x448e3a=a197_0x5c5ecd;return{'appCode':_0x1ad7cd,'configName':_0x4b71fb['configName'],'channelType':_0x4b71fb[_0x448e3a(0x1cb)],...hasOwn(_0x4b71fb,_0x448e3a(0x18c))?{'endpointUrl':_0x4b71fb['endpointUrl']}:{},...hasOwn(_0x4b71fb,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x4b71fb[_0x448e3a(0x1ec)])}:{},...hasOwn(_0x4b71fb,'description')?{'description':_0x4b71fb[_0x448e3a(0x19b)]}:{},...hasOwn(_0x4b71fb,_0x448e3a(0x1d9))?{'connectTimeout':_0x4b71fb['connectTimeout']}:{},...hasOwn(_0x4b71fb,_0x448e3a(0x1c9))?{'readTimeout':_0x4b71fb[_0x448e3a(0x1c9)]}:{}};}export function mergeUpdateInput(_0x17555b,_0x29915b){const _0x56d2eb=a197_0x5c5ecd;return{'id':_0x17555b['id'],'appCode':_0x17555b[_0x56d2eb(0x178)],'configName':_0x29915b[_0x56d2eb(0x1e0)]??_0x17555b[_0x56d2eb(0x1e0)],'channelType':_0x29915b['channelType']??_0x17555b[_0x56d2eb(0x1cb)],'endpointUrl':hasOwn(_0x29915b,_0x56d2eb(0x18c))?_0x29915b[_0x56d2eb(0x18c)]:_0x17555b[_0x56d2eb(0x1ea)],'channelConfig':hasOwn(_0x29915b,_0x56d2eb(0x1ec))?serializeChannelConfig(_0x29915b[_0x56d2eb(0x1ec)]):_0x17555b[_0x56d2eb(0x1e3)],'description':hasOwn(_0x29915b,_0x56d2eb(0x19b))?_0x29915b[_0x56d2eb(0x19b)]:_0x17555b[_0x56d2eb(0x19b)],'connectTimeout':hasOwn(_0x29915b,_0x56d2eb(0x1d9))?_0x29915b[_0x56d2eb(0x1d9)]:_0x17555b[_0x56d2eb(0x1d9)],'readTimeout':hasOwn(_0x29915b,'readTimeout')?_0x29915b[_0x56d2eb(0x1c9)]:_0x17555b[_0x56d2eb(0x1c9)]};}export function plannedUpdateProjection(_0x48202d,_0x187ce5){const _0x30cc4a=a197_0x5c5ecd;return projectNotificationConfig({'id':_0x48202d['id'],'appCode':_0x48202d['appCode'],'configCode':_0x48202d[_0x30cc4a(0x1e9)],'configName':_0x187ce5[_0x30cc4a(0x1e0)]??_0x48202d['configName'],'channelType':_0x187ce5[_0x30cc4a(0x1cb)]??_0x48202d[_0x30cc4a(0x1cb)],'endpointUrl':hasOwn(_0x187ce5,_0x30cc4a(0x18c))?_0x187ce5['endpointUrl']:_0x48202d[_0x30cc4a(0x1ea)],'channelConfig':hasOwn(_0x187ce5,_0x30cc4a(0x1ec))?_0x187ce5[_0x30cc4a(0x1ec)]:_0x48202d['channelConfigRaw'],'description':hasOwn(_0x187ce5,_0x30cc4a(0x19b))?_0x187ce5['description']:_0x48202d[_0x30cc4a(0x19b)],'connectTimeout':hasOwn(_0x187ce5,_0x30cc4a(0x1d9))?_0x187ce5[_0x30cc4a(0x1d9)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x48202d['connectTimeout'],'readTimeout':hasOwn(_0x187ce5,_0x30cc4a(0x1c9))?_0x187ce5[_0x30cc4a(0x1c9)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x48202d[_0x30cc4a(0x1c9)]});}export function requestedSafeFieldsMatch(_0x2f0fd3,_0x3515df,_0x113ddd){const _0x4333a5=a197_0x5c5ecd,_0x5bc8d9=[],_0x3b59e0=[],_0x15ad2a=[];for(const _0x15d4b9 of[_0x4333a5(0x1e0),_0x4333a5(0x1cb),_0x4333a5(0x19b)]){if(!hasOwn(_0x113ddd,_0x15d4b9))continue;_0x15ad2a[_0x4333a5(0x1e4)](_0x15d4b9),_0x5bc8d9[_0x4333a5(0x1e4)](_0x3515df[_0x15d4b9]===_0x113ddd[_0x15d4b9]),_0x3b59e0[_0x4333a5(0x1e4)](_0x2f0fd3[_0x15d4b9]!==_0x113ddd[_0x15d4b9]&&_0x3515df[_0x15d4b9]===_0x113ddd[_0x15d4b9]);}for(const _0x1f2a51 of[_0x4333a5(0x1d9),_0x4333a5(0x1c9)]){if(!hasOwn(_0x113ddd,_0x1f2a51))continue;const _0x19e8ff=_0x113ddd[_0x1f2a51]??(_0x1f2a51===_0x4333a5(0x1d9)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x15ad2a[_0x4333a5(0x1e4)](_0x1f2a51),_0x5bc8d9[_0x4333a5(0x1e4)](_0x3515df[_0x1f2a51]===_0x19e8ff),_0x3b59e0[_0x4333a5(0x1e4)](_0x2f0fd3[_0x1f2a51]!==_0x19e8ff&&_0x3515df[_0x1f2a51]===_0x19e8ff);}return hasOwn(_0x113ddd,_0x4333a5(0x18c))&&_0x113ddd[_0x4333a5(0x18c)]===null&&(_0x15ad2a['push']('endpointUrl:null'),_0x5bc8d9[_0x4333a5(0x1e4)](_0x3515df['endpointUrlRaw']===null||_0x3515df['endpointUrlRaw']===''),_0x3b59e0[_0x4333a5(0x1e4)](_0x2f0fd3[_0x4333a5(0x1ea)]!==null&&_0x2f0fd3[_0x4333a5(0x1ea)]!==''&&(_0x3515df[_0x4333a5(0x1ea)]===null||_0x3515df[_0x4333a5(0x1ea)]===''))),{'allMatch':_0x5bc8d9['every'](Boolean),'provesChange':_0x3b59e0['some'](Boolean),'verifiedFields':_0x15ad2a};}export function validateNotificationDeleteReadback(_0x1e34dc,_0x67a086,_0x2a15da){const _0x3e07d3=a197_0x5c5ecd;for(const [_0x907bcb,_0x5b748c]of _0x1e34dc['entries']()){if(!Number[_0x3e07d3(0x17b)](_0x5b748c['id'])||_0x5b748c['id']<=0x0)throw notificationError(_0x3e07d3(0x1dc),'Notification\x20config\x20list\x20item\x20'+(_0x907bcb+0x1)+_0x3e07d3(0x196));if(_0x5b748c[_0x3e07d3(0x178)]!==_0x67a086)throw notificationError(_0x3e07d3(0x1dc),_0x3e07d3(0x1d5)+(_0x907bcb+0x1)+_0x3e07d3(0x1b4));if(_0x5b748c[_0x3e07d3(0x1cb)]!==_0x2a15da)throw notificationError('notification_config_response_invalid',_0x3e07d3(0x1d5)+(_0x907bcb+0x1)+_0x3e07d3(0x1c6));}}export function safeApiFailure(_0x5a76e3,_0x1618bd,_0x2d2947){const _0x35e100=a197_0x5c5ecd;return notificationError(_0x35e100(0x1ba)+_0x5a76e3+'_'+(_0x1618bd===_0x35e100(0x18d)?_0x35e100(0x1a6):_0x1618bd+'_unavailable'),_0x35e100(0x179)+_0x5a76e3+'\x20'+_0x1618bd+_0x35e100(0x197),_0x2d2947);}export function notificationLookupCommand(_0x1a4331,_0x3b1c2e){const _0x10e18c=a197_0x5c5ecd;return _0x10e18c(0x1eb)+_0x1a4331+_0x10e18c(0x1b8)+_0x3b1c2e+_0x10e18c(0x17e);}function validateNotificationDocument(_0x28dfb7,_0x4aa3c2){const _0x59d85f=a197_0x5c5ecd;for(const _0x4db1f2 of Object[_0x59d85f(0x1c1)](_0x28dfb7)){if(FORBIDDEN_IDENTITY_FIELDS[_0x59d85f(0x1be)](_0x4db1f2))throw notificationError('notification_config_field_forbidden',_0x59d85f(0x1d2)+_0x4db1f2+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x59d85f(0x1be)](_0x4db1f2))throw notificationError(_0x59d85f(0x192),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x4db1f2+'\x22.');}if(_0x4aa3c2===_0x59d85f(0x185)&&Object[_0x59d85f(0x1c1)](_0x28dfb7)[_0x59d85f(0x1d8)]===0x0)throw notificationError('notification_config_update_empty',_0x59d85f(0x1d4));const _0x552736={};if(hasOwn(_0x28dfb7,_0x59d85f(0x1e0)))_0x552736[_0x59d85f(0x1e0)]=validateRequiredString(_0x28dfb7[_0x59d85f(0x1e0)],_0x59d85f(0x1e0),0x80);else{if(_0x4aa3c2===_0x59d85f(0x1da))throw notificationError('notification_config_field_required',_0x59d85f(0x18a)+'\x22configName\x22.');}if(hasOwn(_0x28dfb7,'channelType')){if(typeof _0x28dfb7[_0x59d85f(0x1cb)]!==_0x59d85f(0x1e8))throw invalidFieldType(_0x59d85f(0x1cb),_0x59d85f(0x194));const _0x202ad4=_0x28dfb7[_0x59d85f(0x1cb)][_0x59d85f(0x184)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x59d85f(0x1b1)](_0x202ad4))throw notificationError(_0x59d85f(0x1bb),_0x59d85f(0x1c3),_0x59d85f(0x199)+NOTIFICATION_CHANNEL_TYPES[_0x59d85f(0x1f3)](',\x20')+'.');_0x552736[_0x59d85f(0x1cb)]=_0x202ad4;}else{if(_0x4aa3c2===_0x59d85f(0x1da))throw notificationError(_0x59d85f(0x198),_0x59d85f(0x18a)+_0x59d85f(0x1b3));}for(const [_0x424740,_0xf1bc20]of[[_0x59d85f(0x18c),0x200],['description',0x100]]){if(!hasOwn(_0x28dfb7,_0x424740))continue;const _0x1567e4=_0x28dfb7[_0x424740];if(_0x1567e4!==null&&typeof _0x1567e4!==_0x59d85f(0x1e8))throw invalidFieldType(_0x424740,_0x59d85f(0x1b0));if(typeof _0x1567e4===_0x59d85f(0x1e8)&&_0x1567e4[_0x59d85f(0x1d8)]>_0xf1bc20)throw notificationError(_0x59d85f(0x1bb),'Notification\x20JSON\x20field\x20\x22'+_0x424740+'\x22\x20cannot\x20exceed\x20'+_0xf1bc20+'\x20characters.');_0x552736[_0x424740]=_0x1567e4;}if(hasOwn(_0x28dfb7,_0x59d85f(0x1ec))){const _0x546ea6=_0x28dfb7[_0x59d85f(0x1ec)];if(_0x546ea6===null&&_0x4aa3c2===_0x59d85f(0x1da))throw invalidFieldType(_0x59d85f(0x1ec),'a\x20JSON\x20object');if(_0x546ea6!==null&&!isJsonObject(_0x546ea6))throw invalidFieldType(_0x59d85f(0x1ec),_0x4aa3c2===_0x59d85f(0x185)?_0x59d85f(0x1d0):_0x59d85f(0x182));_0x546ea6!==null&&validateChannelConfigFields(_0x552736['channelType'],_0x546ea6),_0x552736[_0x59d85f(0x1ec)]=_0x546ea6;}for(const _0x5cea1a of[_0x59d85f(0x1d9),_0x59d85f(0x1c9)]){if(!hasOwn(_0x28dfb7,_0x5cea1a))continue;const _0x1930a0=_0x28dfb7[_0x5cea1a];if(_0x1930a0!==null&&(!Number[_0x59d85f(0x17b)](_0x1930a0)||_0x1930a0<0x0))throw notificationError(_0x59d85f(0x1bb),_0x59d85f(0x1d2)+_0x5cea1a+_0x59d85f(0x1b2));_0x552736[_0x5cea1a]=_0x1930a0;}return _0x552736;}function validateRequiredString(_0x54b6ab,_0x2933e1,_0x28053a){const _0x3e3a66=a197_0x5c5ecd;if(typeof _0x54b6ab!==_0x3e3a66(0x1e8))throw invalidFieldType(_0x2933e1,_0x3e3a66(0x1ab));const _0x142721=_0x54b6ab[_0x3e3a66(0x184)]();if(!_0x142721)throw notificationError(_0x3e3a66(0x1bb),'Notification\x20JSON\x20field\x20\x22'+_0x2933e1+_0x3e3a66(0x18f));if(_0x142721['length']>_0x28053a)throw notificationError('notification_config_field_invalid',_0x3e3a66(0x1d2)+_0x2933e1+_0x3e3a66(0x1a8)+_0x28053a+_0x3e3a66(0x181));return _0x142721;}function validateChannelConfigFields(_0x4298b0,_0x4e24af){const _0xa898a1=a197_0x5c5ecd;if(hasOwn(_0x4e24af,'messageTemplate'))throw forbiddenChannelConfigField('messageTemplate');if(_0x4298b0===_0xa898a1(0x19a))for(const _0x4606f1 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4e24af,_0x4606f1))throw forbiddenChannelConfigField(_0x4606f1);}}function forbiddenChannelConfigField(_0x192aa5){const _0x166328=a197_0x5c5ecd;return notificationError(_0x166328(0x1a0),_0x166328(0x1c4)+_0x192aa5+_0x166328(0x1ed));}function invalidFieldType(_0x1cadec,_0x515433){const _0xb5acdf=a197_0x5c5ecd;return notificationError(_0xb5acdf(0x1bb),_0xb5acdf(0x1d2)+_0x1cadec+_0xb5acdf(0x19d)+_0x515433+'.');}function serializeChannelConfig(_0x35c828){const _0x5ce927=a197_0x5c5ecd;return _0x35c828===null||_0x35c828===undefined?null:JSON[_0x5ce927(0x1c5)](_0x35c828);}function redactSensitive(_0x372684){return _0x372684===null||_0x372684===undefined||_0x372684===''?null:'<redacted>';}function requireResponseString(_0x110dc2,_0x337c81,_0x194349){const _0x46c1bb=a197_0x5c5ecd;if(typeof _0x110dc2!==_0x46c1bb(0x1e8)||_0x110dc2[_0x46c1bb(0x184)]()==='')throw CliErrors[_0x46c1bb(0x1a5)]('Invalid\x20notification\x20config\x20response.',_0x46c1bb(0x18b)+(_0x194349+0x1)+_0x46c1bb(0x176)+_0x337c81+'\x22.');return _0x110dc2[_0x46c1bb(0x184)]();}function a197_0x5085(){const _0x181673=['call','str','replyTo','string','configCode','endpointUrlRaw','rabetbase\x20notification\x20config-list\x20--appcode\x20','channelConfig','\x22\x20is\x20forbidden.','5160Fmqunv','from-env','\x20must\x20be\x20an\x20object.','createTime','path','join','Missing\x20notification\x20JSON\x20source.','1206404QRKtTF','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','4655436FtiJmM','\x20is\x20missing\x20required\x20field\x20\x22','hasOwnProperty','appCode','Notification\x20config\x20','notification_config_json_invalid','isSafeInteger','Notification\x20JSON\x20from\x20','\x20has\x20invalid\x20field\x20\x22','\x20--format\x20compress','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','\x20characters.','a\x20JSON\x20object','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','trim','update','notification_config_id_invalid','WEBHOOK','5952450cBjfgO','53449niQqDG','Create\x20JSON\x20requires\x20field\x20','Item\x20','endpointUrl','mutation','WECOM','\x22\x20must\x20be\x20a\x20non-empty\x20string.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','recipients','notification_config_field_unknown','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','a\x20supported\x20string','stdin','\x20has\x20an\x20invalid\x20id.','\x20failed.','notification_config_field_required','Allowed\x20values:\x20','EMAIL','description','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x22\x20must\x20be\x20','Application-level\x20notification\x20config\x20ID','74PMFwPp','notification_config_channel_field_forbidden','190BPfXce','parse','isArray','fromName','apiError','failed','dry-run','\x22\x20cannot\x20exceed\x20','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','a\x20non-empty\x20string','num','number','bool','emailTargets','a\x20string\x20or\x20null','includes','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x22channelType\x22.','\x20has\x20an\x20invalid\x20appCode.','validation','file','642585OWDMbH','\x20--type\x20','FEISHU','notification_config_','notification_config_field_invalid','bccList','preflight','has','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','keys','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','stringify','\x20has\x20an\x20invalid\x20channelType.','updateTime','\x20is\x20invalid.','readTimeout','8PEhOUB','channelType','notification_config_confirmation_required','yes','3CCIjev','type','a\x20JSON\x20object\x20or\x20null','name','Notification\x20JSON\x20field\x20\x22','utf8','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Notification\x20config\x20list\x20item\x20','337446aZXhGg','6213bcshAS','length','connectTimeout','create','env','notification_config_response_invalid','prototype','boolean','notification_config_source_unavailable','configName','DINGTALK','kind','channelConfigRaw','push'];a197_0x5085=function(){return _0x181673;};return a197_0x5085();}function requireExactString(_0x2a828c,_0x301f3b,_0x38e3de){const _0x42d8f9=a197_0x5c5ecd;if(typeof _0x2a828c!==_0x42d8f9(0x1e8)||_0x2a828c[_0x42d8f9(0x184)]()==='')throw notificationError(_0x42d8f9(0x1dc),_0x42d8f9(0x179)+_0x38e3de+_0x42d8f9(0x176)+_0x301f3b+'\x22.');return _0x2a828c[_0x42d8f9(0x184)]();}function responseNullableString(_0xf168f1,_0x54b214,_0x427866){const _0x5f01ba=a197_0x5c5ecd;if(_0xf168f1===undefined||_0xf168f1===null)return null;if(typeof _0xf168f1!=='string')throw notificationError(_0x5f01ba(0x1dc),'Notification\x20config\x20'+_0x427866+_0x5f01ba(0x17d)+_0x54b214+'\x22.');return _0xf168f1;}function responseNullableTimeout(_0x4e931e,_0x1fca54,_0x4275c3){const _0x3a08a6=a197_0x5c5ecd;if(_0x4e931e===undefined||_0x4e931e===null)return null;if(!Number[_0x3a08a6(0x17b)](_0x4e931e)||_0x4e931e<0x0)throw notificationError(_0x3a08a6(0x1dc),_0x3a08a6(0x179)+_0x4275c3+'\x20has\x20invalid\x20field\x20\x22'+_0x1fca54+'\x22.');return _0x4e931e;}function normalizeNullableString(_0x219ad2){const _0x28c347=a197_0x5c5ecd;return typeof _0x219ad2===_0x28c347(0x1e8)?_0x219ad2:null;}function isJsonObject(_0x1dca3f){const _0x5a0ac8=a197_0x5c5ecd;return _0x1dca3f!==null&&typeof _0x1dca3f==='object'&&!Array[_0x5a0ac8(0x1a3)](_0x1dca3f);}function hasOwn(_0x30903d,_0x312f33){const _0x2fc359=a197_0x5c5ecd;return Object[_0x2fc359(0x1dd)][_0x2fc359(0x177)][_0x2fc359(0x1e5)](_0x30903d,_0x312f33);}async function readStdin(){const _0x5644e9=a197_0x5c5ecd;let _0x57b482='';process[_0x5644e9(0x195)]['setEncoding'](_0x5644e9(0x1d3));for await(const _0x578341 of process[_0x5644e9(0x195)])_0x57b482+=_0x578341;return _0x57b482;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x322366=a198_0x2048;(function(_0x4f29b5,_0x21b313){const _0x2c58d0=a198_0x2048,_0x5b3de3=_0x4f29b5();while(!![]){try{const _0x43eeb2=parseInt(_0x2c58d0(0xe9))/0x1+parseInt(_0x2c58d0(0xd6))/0x2*(parseInt(_0x2c58d0(0xfb))/0x3)+-parseInt(_0x2c58d0(0xfd))/0x4*(-parseInt(_0x2c58d0(0xdf))/0x5)+parseInt(_0x2c58d0(0xdd))/0x6*(parseInt(_0x2c58d0(0xeb))/0x7)+parseInt(_0x2c58d0(0xde))/0x8+-parseInt(_0x2c58d0(0x105))/0x9+-parseInt(_0x2c58d0(0xd4))/0xa;if(_0x43eeb2===_0x21b313)break;else _0x5b3de3['push'](_0x5b3de3['shift']());}catch(_0x239e88){_0x5b3de3['push'](_0x5b3de3['shift']());}}}(a198_0x4cdf,0x8d675));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a198_0x322366(0xe2),'general','form',a198_0x322366(0xf5)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x322366(0xf0),'general':'General','form':'Table','idCard':a198_0x322366(0x101)},SCENE_FLAG={'name':a198_0x322366(0xf9),'type':a198_0x322366(0xd7),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x322366(0xe6)},IMAGE_FILE_FLAG={'name':a198_0x322366(0xee),'type':a198_0x322366(0xd7),'description':a198_0x322366(0x103)},IMAGE_URL_FLAG={'name':'image-url','type':a198_0x322366(0xd7),'description':a198_0x322366(0xea)};function a198_0x4cdf(){const _0x2f472a=['appCode','2haeIOR','string','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','Preview:\x20recognize\x20','imageFile','toString','count','6detbGg','3896024cCViJw','3703915NPrjhg','image-url','imageUrl','invoice','path','validation','/smartapi/common/queryFileUrl','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','filter','\x20OCR\x20from\x20URL','15478WLQtRK','Publicly\x20accessible\x20image\x20or\x20file\x20URL','3391031GANJpt','POST','Unsupported\x20OCR\x20scene:\x20','image-file','.\x20Supported\x20scenes:\x20','Invoice','File\x20URL\x20response\x20missing\x20fileUrl.','str','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','/smartapi/common/uploadFile','idCard','form','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','/smartapi/ocr/recognize-text','scene','GET','1451598uUTxUw','fileUrl','4kehXKp','/smartapi/ocr/recognize-text?','trim','apiError','IdCard','general','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','\x20OCR','441846GmPmER','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','filePath','File\x20upload\x20response\x20missing\x20filePath.','15832800tSDItK'];a198_0x4cdf=function(){return _0x2f472a;};return a198_0x4cdf();}function normalizeScene(_0x314191){const _0x41a8c8=a198_0x322366,_0x12d494=_0x314191[_0x41a8c8(0xff)]()['toLowerCase']();if(_0x12d494==='idcard')return _0x41a8c8(0xf5);if(_0x12d494===_0x41a8c8(0xe2)||_0x12d494===_0x41a8c8(0x102)||_0x12d494===_0x41a8c8(0xf6))return _0x12d494;throw CliErrors[_0x41a8c8(0xe4)](_0x41a8c8(0xed)+_0x314191+_0x41a8c8(0xef)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x495ce8){const _0x5cf61a=a198_0x322366,_0x352dc2=_0x495ce8[_0x5cf61a(0xf2)](_0x5cf61a(0xee))['trim'](),_0x174115=_0x495ce8[_0x5cf61a(0xf2)](_0x5cf61a(0xe0))[_0x5cf61a(0xff)]();return{'imageFile':_0x352dc2,'imageUrl':_0x174115,'count':[_0x352dc2,_0x174115][_0x5cf61a(0xe7)](Boolean)['length']};}function validateInputSelection(_0x58e43c){const _0x14b94e=a198_0x322366,_0x38ad8f=selectedInputs(_0x58e43c);if(_0x38ad8f[_0x14b94e(0xdc)]!==0x1)throw CliErrors[_0x14b94e(0xe4)](_0x14b94e(0xf7));return _0x38ad8f;}function withScene(_0x53bdb7,_0x4c1b28,_0x302466){const _0x44338e=a198_0x322366;return{..._0x53bdb7,'scene':_0x4c1b28,..._0x302466?{'sourceFile':{'fileName':_0x302466['fileName'],'filePath':_0x302466[_0x44338e(0xd2)]}}:{}};}const ocrRecognize={'service':'ocr','command':'recognize','description':a198_0x322366(0xf3),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x5470a8){const _0x4569a5=a198_0x322366,_0x1fe5e8=normalizeScene(_0x5470a8[_0x4569a5(0xf2)](_0x4569a5(0xf9))),_0x2cc7e5=SCENE_TO_LEGACY_TYPE[_0x1fe5e8],_0x4f5828=validateInputSelection(_0x5470a8);if(_0x4f5828[_0x4569a5(0xe1)]){const _0x302278=new URLSearchParams({'url':_0x4f5828[_0x4569a5(0xe1)],'type':_0x2cc7e5,'appCode':_0x5470a8[_0x4569a5(0xd5)]});return{'method':'GET','url':_0x4569a5(0xfe)+_0x302278[_0x4569a5(0xdb)](),'description':_0x4569a5(0xd9)+_0x1fe5e8+_0x4569a5(0xe8)};}const _0x4f7de7=requireDevelopmentUploadFile(_0x4f5828[_0x4569a5(0xda)],'image-file');return{'method':_0x4569a5(0xec),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x4569a5(0xec),'url':_0x4569a5(0xf4),'body':{'appCode':_0x5470a8[_0x4569a5(0xd5)],'multipart':{'file':_0x4f7de7}}},{'method':'POST','url':_0x4569a5(0xe5),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x4569a5(0xfa),'url':_0x4569a5(0xf8),'query':{'appCode':_0x5470a8[_0x4569a5(0xd5)],'url':_0x4569a5(0xd1),'type':_0x2cc7e5}}]},'description':_0x4569a5(0xd8)+_0x1fe5e8+_0x4569a5(0x104)};},async 'execute'(_0x32e905){const _0x16cee7=a198_0x322366,_0x210398=normalizeScene(_0x32e905[_0x16cee7(0xf2)]('scene')),_0x185bb6=SCENE_TO_LEGACY_TYPE[_0x210398],_0x2df01c=validateInputSelection(_0x32e905);if(_0x2df01c[_0x16cee7(0xe1)]){const _0x264111=await recognizeDevelopmentOcr(_0x32e905['appCode'],{'url':_0x2df01c[_0x16cee7(0xe1)],'type':_0x185bb6});return{'ok':!![],'data':withScene(_0x264111,_0x210398)};}const _0x2a81a5=requireDevelopmentUploadFile(_0x2df01c[_0x16cee7(0xda)],_0x16cee7(0xee)),_0x511d7c=await uploadDevelopmentFile(_0x32e905['appCode'],_0x2a81a5[_0x16cee7(0xe3)]);if(!_0x511d7c[_0x16cee7(0xd2)])throw CliErrors['apiError'](_0x16cee7(0xd3));const _0x5a77dd=await queryDevelopmentFileUrl(_0x511d7c['filePath'],{'download':![]});if(!_0x5a77dd['fileUrl'])throw CliErrors[_0x16cee7(0x100)](_0x16cee7(0xf1));const _0x1357fc=await recognizeDevelopmentOcr(_0x32e905[_0x16cee7(0xd5)],{'url':_0x5a77dd[_0x16cee7(0xfc)],'type':_0x185bb6});return{'ok':!![],'data':withScene(_0x1357fc,_0x210398,_0x511d7c)};}};function a198_0x2048(_0x1baa27,_0x21cdde){_0x1baa27=_0x1baa27-0xd1;const _0x4cdfec=a198_0x4cdf();let _0x20488b=_0x4cdfec[_0x1baa27];return _0x20488b;}export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a199_0xf63ba8=a199_0x82ff;function a199_0x2fbb(){const _0x2eeb33=['876711UsRxym','page-dir','isInteger','includes','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','pageName','Would\x20create\x20Custom\x20Page\x20','page.create','1204112lgOMCy','compress','page-content','Custom_page_','page','create','CUSTOM','version','pageName\x20cannot\x20exceed\x20100\x20characters.','validation','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','573352UenXPJ','isNaN','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','2245lptwYJ','stringify','BLANK','str','toLowerCase','now','3863970pIdLZi','page-pattern','Created\x20Custom\x20Page\x20','parent-menu-id','\x20and\x20its\x20menu\x20entry.','18QECuhb','num','pageId','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','3774Apauyn','8YYdxHG','ONEPAGE','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','string','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','createMenu','.json','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','trim','/smartapi/webcode/page/create','373CSeztF','files','38ZqnMCk','appCode','../../../templates/custom-pages','isArray','length','menuId','apiError','number','menuPath','object','parse','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','656280kZUpHZ','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','Invalid\x20Custom\x20Page\x20pattern:\x20','name'];a199_0x2fbb=function(){return _0x2eeb33;};return a199_0x2fbb();}(function(_0x31da2c,_0x20cf40){const _0x8f2a8f=a199_0x82ff,_0x343f42=_0x31da2c();while(!![]){try{const _0x358e01=parseInt(_0x8f2a8f(0x1fc))/0x1*(parseInt(_0x8f2a8f(0x1fe))/0x2)+-parseInt(_0x8f2a8f(0x1cc))/0x3+-parseInt(_0x8f2a8f(0x1df))/0x4+-parseInt(_0x8f2a8f(0x1e2))/0x5*(-parseInt(_0x8f2a8f(0x1f1))/0x6)+parseInt(_0x8f2a8f(0x1d4))/0x7*(-parseInt(_0x8f2a8f(0x1f2))/0x8)+-parseInt(_0x8f2a8f(0x1ed))/0x9*(-parseInt(_0x8f2a8f(0x1c8))/0xa)+parseInt(_0x8f2a8f(0x1e8))/0xb;if(_0x358e01===_0x20cf40)break;else _0x343f42['push'](_0x343f42['shift']());}catch(_0x5b58a4){_0x343f42['push'](_0x343f42['shift']());}}}(a199_0x2fbb,0x2825b));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a199_0xf63ba8(0x1e4),a199_0xf63ba8(0x1f3),'DASHBOARD'],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a199_0xf63ba8(0x200));export const pageCreate={'service':a199_0xf63ba8(0x1d8),'command':a199_0xf63ba8(0x1d9),'description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':'write','defaultOutputFormat':a199_0xf63ba8(0x1d5),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':a199_0xf63ba8(0x1f0)},{'name':a199_0xf63ba8(0x1d6),'message':a199_0xf63ba8(0x1e1),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':a199_0xf63ba8(0x1cb),'type':a199_0xf63ba8(0x1f5),'description':a199_0xf63ba8(0x1c7)},{'name':a199_0xf63ba8(0x1eb),'type':a199_0xf63ba8(0x205),'description':a199_0xf63ba8(0x1f9)},{'name':'page-pattern','type':'string','description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0xf63ba8(0x1cd),'type':a199_0xf63ba8(0x1f5),'description':'Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0x511f87){await readValidatedPageSource(_0x511f87);},async 'dryRun'(_0xea99ae){const _0x2871f3=a199_0xf63ba8,_0x2c43f0=readInput(_0xea99ae,await readValidatedPageSource(_0xea99ae));return{'method':'POST','url':_0x2871f3(0x1fb),'body':{'appCode':_0x2c43f0[_0x2871f3(0x1ff)],'pageName':_0x2c43f0[_0x2871f3(0x1d1)],..._0x2c43f0['parentMenuId']!=null?{'parentMenuId':_0x2c43f0['parentMenuId']}:{},'createMenu':_0x2c43f0[_0x2871f3(0x1f7)],'codeContent':_0x2c43f0[_0x2871f3(0x1fd)]},'description':_0x2871f3(0x1d2)+JSON[_0x2871f3(0x1e3)](_0x2c43f0['pageName'])+_0x2871f3(0x1ec)};},async 'execute'(_0x45edd6){const _0x37fe9=a199_0xf63ba8,_0x5452c7=readInput(_0x45edd6,await readValidatedPageSource(_0x45edd6)),_0x52fde9=await createCustomPage(_0x5452c7);if(!Number['isInteger'](_0x52fde9[_0x37fe9(0x1ef)])||_0x52fde9[_0x37fe9(0x1ef)]<=0x0)throw CliErrors[_0x37fe9(0x204)](_0x37fe9(0x1de));const _0x3deb91=buildCustomPageDevelopmentUrl(_0x5452c7['appCode'],_0x52fde9[_0x37fe9(0x206)]),_0x2264e7=buildCustomPageEditUrl(_0x5452c7['appCode'],_0x52fde9['pageId']);return{'ok':!![],'data':{'operation':_0x37fe9(0x1d3),'pageType':_0x37fe9(0x1da),'pagePattern':readPagePattern(_0x45edd6),'selector':{'appCode':_0x5452c7[_0x37fe9(0x1ff)],'pageName':_0x5452c7[_0x37fe9(0x1d1)]},'before':null,'after':{'pageId':_0x52fde9[_0x37fe9(0x1ef)],'pageName':_0x52fde9[_0x37fe9(0x1d1)],'appCode':_0x52fde9['appCode'],'version':_0x52fde9[_0x37fe9(0x1db)],'menuId':_0x52fde9[_0x37fe9(0x203)],'menuPath':_0x52fde9[_0x37fe9(0x206)],'files':_0x52fde9[_0x37fe9(0x1fd)]??Object['keys'](_0x5452c7[_0x37fe9(0x1fd)])},'dryRun':![],'request':_0x5452c7,..._0x3deb91?{'pageUrl':_0x3deb91}:{},..._0x2264e7?{'editPageUrl':_0x2264e7}:{},'warnings':_0x3deb91?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x37fe9(0x1ea)+_0x52fde9[_0x37fe9(0x1ef)]+'.'};}};function readPagePattern(_0x4c84bc){const _0x195532=a199_0xf63ba8,_0x452c1c=_0x4c84bc[_0x195532(0x1e5)](_0x195532(0x1e9))['trim'](),_0x4b6676=_0x4c84bc[_0x195532(0x1e5)](_0x195532(0x1cd))[_0x195532(0x1fa)]();if(_0x452c1c&&_0x4b6676)throw CliErrors[_0x195532(0x1dd)]('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x4b6676)return null;if(!_0x452c1c)throw CliErrors[_0x195532(0x1dd)](_0x195532(0x1d0));if(!CUSTOM_PAGE_PATTERNS[_0x195532(0x1cf)](_0x452c1c))throw CliErrors[_0x195532(0x1dd)](_0x195532(0x1f6));return _0x452c1c;}async function readPageSource(_0x2bfada){const _0x31e758=a199_0xf63ba8,_0x2472ae=_0x2bfada['str']('page-dir')[_0x31e758(0x1fa)](),_0x56a764=readPagePattern(_0x2bfada);if(_0x56a764===null){const _0x32f911=await readCustomPageDirectory(_0x2472ae);if(Object['keys'](_0x32f911)['length']===0x0)throw CliErrors[_0x31e758(0x1dd)](_0x31e758(0x1c9));return _0x32f911;}let _0x2ede51;try{_0x2ede51=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x56a764[_0x31e758(0x1e6)]()+_0x31e758(0x1f8)),'utf8');}catch{throw CliErrors[_0x31e758(0x1dd)]('Custom\x20Page\x20pattern\x20not\x20found:\x20'+_0x56a764+'.');}let _0x3b3933;try{_0x3b3933=JSON[_0x31e758(0x208)](_0x2ede51);}catch{throw CliErrors[_0x31e758(0x1dd)](_0x31e758(0x1ca)+_0x56a764+'.');}if(!_0x3b3933||typeof _0x3b3933!==_0x31e758(0x207)||Array[_0x31e758(0x201)](_0x3b3933)||Object['values'](_0x3b3933)['some'](_0x5ecac4=>typeof _0x5ecac4!==_0x31e758(0x1f5)))throw CliErrors['validation'](_0x31e758(0x1ca)+_0x56a764+'.');return _0x3b3933;}function a199_0x82ff(_0xcd70a3,_0x4ddc75){_0xcd70a3=_0xcd70a3-0x1c7;const _0x2fbb24=a199_0x2fbb();let _0x82ff0f=_0x2fbb24[_0xcd70a3];return _0x82ff0f;}async function readValidatedPageSource(_0x37f315){const _0x215b27=await readPageSource(_0x37f315);return await validateCustomPageContent(_0x215b27),_0x215b27;}function readInput(_0x545e2a,_0x565ebd){const _0x2c5cde=a199_0xf63ba8,_0x9f68e2=_0x545e2a[_0x2c5cde(0x1e5)](_0x2c5cde(0x1cb))[_0x2c5cde(0x1fa)]()||_0x2c5cde(0x1d7)+Date[_0x2c5cde(0x1e7)]();if(_0x9f68e2[_0x2c5cde(0x202)]>0x64)throw CliErrors[_0x2c5cde(0x1dd)](_0x2c5cde(0x1dc));const _0x5c332a=_0x545e2a[_0x2c5cde(0x1ee)]('parent-menu-id',NaN),_0x30d6cc=!Number[_0x2c5cde(0x1e0)](_0x5c332a);if(_0x30d6cc&&(!Number[_0x2c5cde(0x1ce)](_0x5c332a)||_0x5c332a<=0x0))throw CliErrors[_0x2c5cde(0x1dd)](_0x2c5cde(0x1f4));return{'appCode':_0x545e2a[_0x2c5cde(0x1ff)],'pageName':_0x9f68e2,..._0x30d6cc?{'parentMenuId':_0x5c332a}:{},'createMenu':!![],'files':_0x565ebd};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a200_0x5cf6(){const _0x476b06=['padStart','152ommbnk','appcode','getMinutes','1227256brPTTX','8318ndTekV','2079KWsmld','Retrieved\x20Custom\x20Page\x20','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getDate','4113FswWfr','join','pageCode','cookie','isNaN','430152vbPmQP','420AFnOGH','13336HwKmpz','getTime','str','getSeconds','3567455dsxLVC','number','custom-detail','14982hlSrxF','409783jugMTF','getMonth','trim','Custom\x20Page\x20ID'];a200_0x5cf6=function(){return _0x476b06;};return a200_0x5cf6();}function a200_0x5ae6(_0x348daf,_0x593958){_0x348daf=_0x348daf-0xbb;const _0x5cf672=a200_0x5cf6();let _0x5ae69d=_0x5cf672[_0x348daf];return _0x5ae69d;}const a200_0x57c8a5=a200_0x5ae6;(function(_0x415699,_0xf0ccb6){const _0xdd03c=a200_0x5ae6,_0x428b79=_0x415699();while(!![]){try{const _0xf79898=-parseInt(_0xdd03c(0xd2))/0x1*(parseInt(_0xdd03c(0xce))/0x2)+-parseInt(_0xdd03c(0xbf))/0x3+parseInt(_0xdd03c(0xd1))/0x4+-parseInt(_0xdd03c(0xc5))/0x5+parseInt(_0xdd03c(0xc8))/0x6*(-parseInt(_0xdd03c(0xd3))/0x7)+parseInt(_0xdd03c(0xc1))/0x8*(parseInt(_0xdd03c(0xd7))/0x9)+-parseInt(_0xdd03c(0xc0))/0xa*(-parseInt(_0xdd03c(0xc9))/0xb);if(_0xf79898===_0xf0ccb6)break;else _0x428b79['push'](_0x428b79['shift']());}catch(_0x38bfb2){_0x428b79['push'](_0x428b79['shift']());}}}(a200_0x5cf6,0x624af));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':a200_0x57c8a5(0xc7),'description':a200_0x57c8a5(0xd5),'risk':'read','defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a200_0x57c8a5(0xc6),'required':!![],'description':a200_0x57c8a5(0xcc)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x407c8e){readCustomPageId(_0x407c8e);},async 'execute'(_0x422628){const _0x32f361=a200_0x57c8a5,_0x38e4b7=readCustomPageId(_0x422628),_0x17e1ac=await getCustomPageSource(_0x38e4b7),{bundle:_0x294985,createTime:_0x31e3f0,updateTime:_0x36ca91,..._0x5a0100}=_0x17e1ac,_0x3ca45b=_0x17e1ac['id']??_0x38e4b7,_0x44824f=_0x17e1ac['appCode']?.[_0x32f361(0xcb)]()||_0x422628[_0x32f361(0xc3)](_0x32f361(0xcf))[_0x32f361(0xcb)](),_0x5a8ba8=buildCustomPageRuntimeUrl(_0x44824f,_0x17e1ac[_0x32f361(0xbc)]),_0x1e4071=buildCustomPageEditUrl(_0x44824f,_0x3ca45b),_0x3442ee=await resolveCustomPageDevelopmentUrl(_0x44824f,_0x3ca45b,_0x422628[_0x32f361(0xbd)]);return{'ok':!![],'data':{..._0x5a0100,..._0x5a8ba8?{'runtimePageUrl':_0x5a8ba8}:{},..._0x3442ee?{'pageUrl':_0x3442ee}:{},..._0x1e4071?{'editPageUrl':_0x1e4071}:{},..._0x31e3f0==null?{}:{'createTime':formatTime(_0x31e3f0)},..._0x36ca91==null?{}:{'updateTime':formatTime(_0x36ca91)}},'message':_0x32f361(0xd4)+_0x38e4b7+'.'};}};function formatTime(_0x283588){const _0x1dd889=a200_0x57c8a5,_0x306166=new Date(_0x283588);if(Number[_0x1dd889(0xbe)](_0x306166[_0x1dd889(0xc2)]()))return String(_0x283588);const _0x3b48f9=[_0x306166['getFullYear'](),String(_0x306166[_0x1dd889(0xca)]()+0x1)['padStart'](0x2,'0'),String(_0x306166[_0x1dd889(0xd6)]())[_0x1dd889(0xcd)](0x2,'0')][_0x1dd889(0xbb)]('-'),_0x51d59d=[String(_0x306166['getHours']())[_0x1dd889(0xcd)](0x2,'0'),String(_0x306166[_0x1dd889(0xd0)]())[_0x1dd889(0xcd)](0x2,'0'),String(_0x306166[_0x1dd889(0xc4)]())[_0x1dd889(0xcd)](0x2,'0')]['join'](':');return _0x3b48f9+'\x20'+_0x51d59d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a201_0x129912=a201_0x4476;(function(_0x5b9096,_0x4d2eba){const _0x192601=a201_0x4476,_0x33002a=_0x5b9096();while(!![]){try{const _0x1b28c7=parseInt(_0x192601(0xb4))/0x1+-parseInt(_0x192601(0xac))/0x2*(parseInt(_0x192601(0xc1))/0x3)+-parseInt(_0x192601(0xbf))/0x4*(-parseInt(_0x192601(0xbc))/0x5)+parseInt(_0x192601(0xaa))/0x6*(-parseInt(_0x192601(0xb0))/0x7)+parseInt(_0x192601(0xb5))/0x8*(-parseInt(_0x192601(0xbb))/0x9)+parseInt(_0x192601(0xc6))/0xa+parseInt(_0x192601(0xc0))/0xb*(parseInt(_0x192601(0xb8))/0xc);if(_0x1b28c7===_0x4d2eba)break;else _0x33002a['push'](_0x33002a['shift']());}catch(_0x1b70b4){_0x33002a['push'](_0x33002a['shift']());}}}(a201_0x18f9,0x587e3));function a201_0x4476(_0x1aa515,_0x298620){_0x1aa515=_0x1aa515-0xaa;const _0x18f9fd=a201_0x18f9();let _0x4476a4=_0x18f9fd[_0x1aa515];return _0x4476a4;}function a201_0x18f9(){const _0x365bf6=['appCode','cookie','7076170XfjVLD','12mCRyhb','\x20Custom\x20Page(s).','21178wzZujy','length','label','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','2084551PGRmYh','page','flatMap','No\x20Custom\x20Pages\x20found.','492696FjqdxR','988912gTnvRP','menus','read','12fhCmCz','compress','path','45SPvWCh','7565wuyZqm','Found\x20','type','1588JWWiPN','4282421cBAqeF','174EZwNTD','custom-list','pageId'];a201_0x18f9=function(){return _0x365bf6;};return a201_0x18f9();}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';export const pageCustomList={'service':a201_0x129912(0xb1),'command':a201_0x129912(0xc2),'description':a201_0x129912(0xaf),'risk':a201_0x129912(0xb7),'defaultOutputFormat':a201_0x129912(0xb9),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5d6448){const _0x40de89=a201_0x129912,_0x558d2a=(await fetchMenuSnapshot(_0x5d6448[_0x40de89(0xc4)],_0x5d6448[_0x40de89(0xc5)]))[_0x40de89(0xb6)][_0x40de89(0xb2)](_0x5c91f1=>{const _0x5062b5=_0x40de89;if(_0x5c91f1[_0x5062b5(0xbe)]!=='react'||_0x5c91f1[_0x5062b5(0xc3)]==null)return[];const _0x213d1f=buildCustomPageDevelopmentUrl(_0x5d6448[_0x5062b5(0xc4)],_0x5c91f1[_0x5062b5(0xba)]),_0x2e3045=buildCustomPageRuntimeUrl(_0x5d6448['appCode'],_0x5c91f1['path']),_0xd481da=buildCustomPageEditUrl(_0x5d6448[_0x5062b5(0xc4)],_0x5c91f1[_0x5062b5(0xc3)]);return[{'pageId':_0x5c91f1[_0x5062b5(0xc3)],'label':_0x5c91f1[_0x5062b5(0xae)],'path':_0x5c91f1[_0x5062b5(0xba)],..._0x213d1f?{'pageUrl':_0x213d1f}:{},..._0x2e3045?{'runtimePageUrl':_0x2e3045}:{},..._0xd481da?{'editPageUrl':_0xd481da}:{}}];});return{'ok':!![],'data':{'pages':_0x558d2a},'message':_0x558d2a[_0x40de89(0xad)]===0x0?_0x40de89(0xb3):_0x40de89(0xbd)+_0x558d2a[_0x40de89(0xad)]+_0x40de89(0xab)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a202_0x32d02c=a202_0x2a38;(function(_0x4888e1,_0x3d0ddb){const _0x111adf=a202_0x2a38,_0x145050=_0x4888e1();while(!![]){try{const _0x229716=parseInt(_0x111adf(0x137))/0x1+parseInt(_0x111adf(0x144))/0x2+-parseInt(_0x111adf(0x127))/0x3+-parseInt(_0x111adf(0x125))/0x4+-parseInt(_0x111adf(0x139))/0x5+parseInt(_0x111adf(0x136))/0x6*(parseInt(_0x111adf(0x138))/0x7)+-parseInt(_0x111adf(0x134))/0x8*(-parseInt(_0x111adf(0x142))/0x9);if(_0x229716===_0x3d0ddb)break;else _0x145050['push'](_0x145050['shift']());}catch(_0x2993de){_0x145050['push'](_0x145050['shift']());}}}(a202_0x5279,0x936a1));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';function a202_0x2a38(_0x54f922,_0x18487b){_0x54f922=_0x54f922-0x125;const _0x5279ea=a202_0x5279();let _0x2a38c9=_0x5279ea[_0x54f922];return _0x2a38c9;}export const pageCustomPublish={'service':a202_0x32d02c(0x141),'command':'custom-publish','description':'Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','risk':a202_0x32d02c(0x13e),'defaultOutputFormat':a202_0x32d02c(0x140),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a202_0x32d02c(0x130),'required':!![],'description':a202_0x32d02c(0x12b)},{'name':a202_0x32d02c(0x145),'type':a202_0x32d02c(0x13c),'description':a202_0x32d02c(0x133)}],async 'validate'(_0x2a98df){readCustomPageId(_0x2a98df);},async 'dryRun'(_0x5c8366){const _0x3bb718=a202_0x32d02c,_0x4e2635=readInput(_0x5c8366);return{'method':_0x3bb718(0x13a),'url':_0x3bb718(0x126),'body':{'id':_0x4e2635[_0x3bb718(0x135)],..._0x4e2635[_0x3bb718(0x145)]?{'remark':_0x4e2635[_0x3bb718(0x145)]}:{}},'description':_0x3bb718(0x13d)+_0x4e2635[_0x3bb718(0x135)]+'.'};},async 'execute'(_0x5dff4f){const _0x58ccc7=a202_0x32d02c,_0xbba63a=readInput(_0x5dff4f);await getCustomPageSource(_0xbba63a['pageId']);const _0x44aa4c=await publishCustomPage(_0xbba63a);if(!Number[_0x58ccc7(0x12e)](_0x44aa4c)||_0x44aa4c!==_0xbba63a['pageId'])throw CliErrors[_0x58ccc7(0x12c)](_0x58ccc7(0x146));const _0x1440d2=await getCustomPageSource(_0xbba63a[_0x58ccc7(0x135)]);if(_0x1440d2[_0x58ccc7(0x13b)]!==_0x58ccc7(0x143))throw CliErrors['apiError']('Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x1440d2[_0x58ccc7(0x13b)]??_0x58ccc7(0x131))+'.');const _0x180d5c=_0x1440d2[_0x58ccc7(0x129)]?.[_0x58ccc7(0x12d)](),_0x382498=buildCustomPageEditUrl(_0x180d5c,_0xbba63a[_0x58ccc7(0x135)]),_0x4deb5a=await resolveCustomPageDevelopmentUrl(_0x180d5c,_0xbba63a[_0x58ccc7(0x135)],_0x5dff4f['cookie']),_0x16f753=buildMutationData(_0xbba63a,!![],_0x4deb5a,_0x382498);_0x180d5c&&!_0x4deb5a&&_0x16f753[_0x58ccc7(0x13f)]['push']('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x3a0f0f=buildCustomPageRuntimeUrl(_0x1440d2[_0x58ccc7(0x129)],_0x1440d2['pageCode']);return _0x3a0f0f?_0x16f753['runtimePageUrl']=_0x3a0f0f:_0x16f753[_0x58ccc7(0x13f)][_0x58ccc7(0x12f)](_0x58ccc7(0x132)),{'ok':!![],'data':_0x16f753,'message':_0x58ccc7(0x12a)+_0xbba63a[_0x58ccc7(0x135)]+'.'};}};function readInput(_0x3de88b){const _0x2c5f27=a202_0x32d02c,_0x2d6269=readCustomPageId(_0x3de88b),_0x54d906=_0x3de88b['str'](_0x2c5f27(0x145))[_0x2c5f27(0x12d)]();return{'pageId':_0x2d6269,..._0x54d906?{'remark':_0x54d906}:{}};}function buildMutationData(_0xcb288d,_0x2828bb=![],_0x1a0134,_0x3e872b){const _0x44aaa6=a202_0x32d02c;return{'operation':_0x44aaa6(0x128),'selector':{'pageId':_0xcb288d[_0x44aaa6(0x135)]},'before':null,'after':{'pageId':_0xcb288d[_0x44aaa6(0x135)],'status':_0x44aaa6(0x143)},'dryRun':!_0x2828bb,'request':_0xcb288d,..._0x1a0134?{'pageUrl':_0x1a0134}:{},..._0x3e872b?{'editPageUrl':_0x3e872b}:{},'warnings':[]};}function a202_0x5279(){const _0x37ccde=['appCode','Published\x20Custom\x20Page\x20','Custom\x20Page\x20ID','apiError','trim','isInteger','push','number','unknown','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','Optional\x20publish\x20remark','272arbsxL','pageId','247002IEAodp','200142cDBNoF','133ctEqzm','4961200CgwtMd','POST','status','string','Would\x20publish\x20Custom\x20Page\x20','write','warnings','compress','page','299898vrPAmP','FORMAL','889810ykPZqw','remark','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','1527964LSylIc','/smartapi/webcode/file/publish','1746384PCfkHw','page.custom-publish'];a202_0x5279=function(){return _0x37ccde;};return a202_0x5279();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x284be7,_0x33365f){const _0xef5769=a203_0x1231,_0x5bbf8a=_0x284be7();while(!![]){try{const _0x315bf2=parseInt(_0xef5769(0x89))/0x1*(parseInt(_0xef5769(0x8e))/0x2)+parseInt(_0xef5769(0x84))/0x3+parseInt(_0xef5769(0x78))/0x4*(-parseInt(_0xef5769(0x8b))/0x5)+parseInt(_0xef5769(0x77))/0x6*(-parseInt(_0xef5769(0x86))/0x7)+-parseInt(_0xef5769(0x7f))/0x8*(-parseInt(_0xef5769(0x79))/0x9)+parseInt(_0xef5769(0x81))/0xa+parseInt(_0xef5769(0x8f))/0xb;if(_0x315bf2===_0x33365f)break;else _0x5bbf8a['push'](_0x5bbf8a['shift']());}catch(_0x4c7d38){_0x5bbf8a['push'](_0x5bbf8a['shift']());}}}(a203_0x36dd,0x9fb18));function a203_0x1231(_0x448497,_0x5205d0){_0x448497=_0x448497-0x77;const _0x36dd3f=a203_0x36dd();let _0x12311f=_0x36dd3f[_0x448497];return _0x12311f;}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':'Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted'};function trimOptional(_0x56405f){const _0x424912=a203_0x1231;return _0x56405f?.[_0x424912(0x88)]()||undefined;}export function buildCustomPageRuntimeUrl(_0xe34d7b,_0x336c2e){const _0x1e52c2=trimOptional(_0xe34d7b),_0x46073a=trimOptional(_0x336c2e);if(!_0x1e52c2||!_0x46073a)return undefined;return getPublishedAppDomain(_0x1e52c2)+'/'+encodeURIComponent(_0x46073a);}export function buildCustomPageDevelopmentUrl(_0x359627,_0x4382ed){const _0x46a742=trimOptional(_0x359627),_0x216945=trimOptional(_0x4382ed);if(!_0x46a742||!_0x216945)return undefined;return getAppBaseUrl(_0x46a742)+'/pages/'+encodeURIComponent(_0x216945);}export async function resolveCustomPageDevelopmentUrl(_0x50b4f9,_0x14177f,_0x18221a){const _0x296e76=a203_0x1231,_0x46afa1=trimOptional(_0x50b4f9);if(!_0x46afa1)return undefined;try{const _0x2a8c54=(await fetchMenuSnapshot(_0x46afa1,_0x18221a))[_0x296e76(0x8a)][_0x296e76(0x85)](_0x45f220=>_0x45f220[_0x296e76(0x80)]===_0x296e76(0x8c)&&_0x45f220[_0x296e76(0x7b)]===_0x14177f);return buildCustomPageDevelopmentUrl(_0x46afa1,_0x2a8c54?.[_0x296e76(0x90)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x4632ff,_0x10e698){const _0xfbb4f0=a203_0x1231,_0x36ea14=trimOptional(_0x4632ff);if(!_0x36ea14)return;const _0x78627b=trimOptional(String(_0x10e698??''));if(!_0x78627b)return;return getAppBaseUrl(_0x36ea14)+_0xfbb4f0(0x7a)+encodeURIComponent(_0x78627b);}export async function validateCustomPageContent(_0x1697f0){const _0x3b35be=a203_0x1231,_0x2b2af9=await validateCustomPageSourceFiles(_0x1697f0);if(_0x2b2af9[_0x3b35be(0x87)]>0x0)throw CliErrors['validation'](_0x3b35be(0x7c)+_0x2b2af9[_0x3b35be(0x83)](_0x2d32bb=>_0x2d32bb[_0x3b35be(0x7d)]+':\x20'+_0x2d32bb[_0x3b35be(0x7e)])['join'](';\x20'));}function a203_0x36dd(){const _0x4092f1=['num','64bVOwkr','915134oQajGm','path','6MSVqxh','60tBRmKs','153198rFeENz','/ide/','pageId','Invalid\x20Custom\x20Page\x20content:\x20','file','message','488UxLVlI','type','8522350mBnkxd','--id\x20must\x20be\x20a\x20positive\x20integer.','map','53976JlXyKc','find','8695792HlTLIJ','length','trim','4671fUWcvx','menus','81625wlEbGk','react'];a203_0x36dd=function(){return _0x4092f1;};return a203_0x36dd();}export function readCustomPageId(_0x2b81e2){const _0xd7d5f9=a203_0x1231,_0x5a206a=_0x2b81e2[_0xd7d5f9(0x8d)]('id');if(!Number['isInteger'](_0x5a206a)||_0x5a206a<=0x0)throw CliErrors['validation'](_0xd7d5f9(0x82));return _0x5a206a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a204_0x277c4a=a204_0x5661;(function(_0x53e852,_0x219453){const _0x2aea8f=a204_0x5661,_0xd8a421=_0x53e852();while(!![]){try{const _0x21d590=-parseInt(_0x2aea8f(0x1f5))/0x1+parseInt(_0x2aea8f(0x1f6))/0x2+parseInt(_0x2aea8f(0x1ec))/0x3+parseInt(_0x2aea8f(0x1f7))/0x4*(parseInt(_0x2aea8f(0x1f1))/0x5)+parseInt(_0x2aea8f(0x1e9))/0x6*(parseInt(_0x2aea8f(0x1e7))/0x7)+-parseInt(_0x2aea8f(0x1f3))/0x8*(-parseInt(_0x2aea8f(0x1e8))/0x9)+-parseInt(_0x2aea8f(0x1eb))/0xa;if(_0x21d590===_0x219453)break;else _0xd8a421['push'](_0xd8a421['shift']());}catch(_0x4f86bf){_0xd8a421['push'](_0xd8a421['shift']());}}}(a204_0x1ef4,0x6fe1f));function a204_0x5661(_0x2b8142,_0x495e58){_0x2b8142=_0x2b8142-0x1e4;const _0x1ef470=a204_0x1ef4();let _0x5661f8=_0x1ef470[_0x2b8142];return _0x5661f8;}import{format}from'prettier';const SOURCE_PARSERS={'.js':'babel','.jsx':'babel','.ts':a204_0x277c4a(0x1f2),'.tsx':a204_0x277c4a(0x1f2)},CUSTOM_PAGE_EXTENSIONS=[a204_0x277c4a(0x1ee),'.tsx'];export async function validateCustomPageSourceFiles(_0x48c55){const _0x22b2fd=a204_0x277c4a,_0x4329bf=Object[_0x22b2fd(0x1ed)](_0x48c55)[_0x22b2fd(0x1e5)](([_0x5434be])=>getParser(_0x5434be));if(!_0x4329bf[_0x22b2fd(0x1f4)](([_0x37cf9e])=>isReactSourceFile(_0x37cf9e)))return[{'file':_0x22b2fd(0x1e4),'message':_0x22b2fd(0x1f0)}];const _0x1a466a=await Promise[_0x22b2fd(0x1ea)](_0x4329bf['map'](async([_0x1c0b27,_0x13ecc7])=>{try{return await format(_0x13ecc7,{'parser':getParser(_0x1c0b27)}),undefined;}catch(_0x49b5f4){return{'file':_0x1c0b27,'message':_0x49b5f4 instanceof Error?_0x49b5f4['message']:String(_0x49b5f4)};}}));return _0x1a466a[_0x22b2fd(0x1e5)](_0x501da7=>_0x501da7!==undefined);}function getParser(_0x186d51){const _0x75af63=a204_0x277c4a,_0x7e354e=_0x186d51['trim']()[_0x75af63(0x1e6)]();return Object[_0x75af63(0x1ed)](SOURCE_PARSERS)[_0x75af63(0x1ef)](([_0x245644])=>_0x7e354e[_0x75af63(0x1f8)](_0x245644))?.[0x1];}function isReactSourceFile(_0x323e09){const _0x4f7c59=a204_0x277c4a,_0x1d2282=_0x323e09['trim']()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS[_0x4f7c59(0x1f4)](_0x30bd68=>_0x1d2282[_0x4f7c59(0x1f8)](_0x30bd68));}function a204_0x1ef4(){const _0x53dc23=['typescript','1400tjKDtS','some','838089FwTpAA','1137326yzhPLY','752HsjKxY','endsWith','page\x20files','filter','toLowerCase','519099jnwyuF','32553xzRICM','48THTWHy','all','17105410EQSEQs','1913001WFzBZX','entries','.jsx','find','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','15275Midmuy'];a204_0x1ef4=function(){return _0x53dc23;};return a204_0x1ef4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a205_0x34e4(_0x256a13,_0xf7ec17){_0x256a13=_0x256a13-0x159;const _0x53a709=a205_0x53a7();let _0x34e4b2=_0x53a709[_0x256a13];return _0x34e4b2;}const a205_0x74bc29=a205_0x34e4;(function(_0x22fb37,_0xbb09fd){const _0x5e554b=a205_0x34e4,_0x3edc82=_0x22fb37();while(!![]){try{const _0x558776=-parseInt(_0x5e554b(0x16a))/0x1+-parseInt(_0x5e554b(0x15e))/0x2+parseInt(_0x5e554b(0x15a))/0x3+parseInt(_0x5e554b(0x173))/0x4*(-parseInt(_0x5e554b(0x168))/0x5)+parseInt(_0x5e554b(0x17a))/0x6*(-parseInt(_0x5e554b(0x15c))/0x7)+-parseInt(_0x5e554b(0x178))/0x8*(parseInt(_0x5e554b(0x172))/0x9)+-parseInt(_0x5e554b(0x17b))/0xa*(-parseInt(_0x5e554b(0x16b))/0xb);if(_0x558776===_0xbb09fd)break;else _0x3edc82['push'](_0x3edc82['shift']());}catch(_0x81a802){_0x3edc82['push'](_0x3edc82['shift']());}}}(a205_0x53a7,0x43ee5));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';function a205_0x53a7(){const _0x21faec=['9CDtaFE','18228DnyeOQ','pageId','trim','isInteger','Custom\x20Page\x20ID','763112bVnSMv','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','258bmDqFY','10JwOZtl','Updated\x20Custom\x20Page\x20','1510215gpfCfB','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','43939YHnvvn','custom-update','1046680iUCVwp','newVersion','appCode','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','cookie','page-content','apiError','page-dir','page','number','470tweIDN','pageContent','539522ZSLEvG','17944960KhjrDR','POST','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','appcode','/smartapi/webcode/page/update/content','compress','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.'];a205_0x53a7=function(){return _0x21faec;};return a205_0x53a7();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a205_0x74bc29(0x166),'command':a205_0x74bc29(0x15d),'description':a205_0x74bc29(0x15b),'risk':'write','defaultOutputFormat':a205_0x74bc29(0x170),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a205_0x74bc29(0x163),'message':'page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','hint':a205_0x74bc29(0x16d)}],'flags':[{'name':'id','type':a205_0x74bc29(0x167),'required':!![],'description':a205_0x74bc29(0x177)},{'name':a205_0x74bc29(0x165),'type':'string','required':!![],'description':'Directory\x20containing\x20all\x20complete\x20page\x20files'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2d1483){readCustomPageId(_0x2d1483),await readValidatedPageContent(_0x2d1483);},async 'dryRun'(_0x4136ca){const _0x127e00=a205_0x74bc29,_0x597099=await readInput(_0x4136ca);return{'method':_0x127e00(0x16c),'url':_0x127e00(0x16f),'body':{'id':_0x597099[_0x127e00(0x174)],'codeContent':_0x597099['pageContent']},'description':_0x127e00(0x161)+_0x597099['pageId']+'.'};},async 'execute'(_0x4d0d6e){const _0x7dcb0c=a205_0x74bc29,_0x4ce123=await readInput(_0x4d0d6e),_0x2f97bb=await updateCustomPageContent({'pageId':_0x4ce123[_0x7dcb0c(0x174)],'pageContent':_0x4ce123[_0x7dcb0c(0x169)]});if(!Number[_0x7dcb0c(0x176)](_0x2f97bb[_0x7dcb0c(0x15f)])||_0x2f97bb[_0x7dcb0c(0x15f)]<=0x0)throw CliErrors[_0x7dcb0c(0x164)]('Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0x1ecc9e=buildCustomPageEditUrl(_0x4ce123['appCode'],_0x4ce123[_0x7dcb0c(0x174)]),_0x400604=await resolveCustomPageDevelopmentUrl(_0x4ce123[_0x7dcb0c(0x160)],_0x4ce123[_0x7dcb0c(0x174)],_0x4d0d6e[_0x7dcb0c(0x162)]);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x4ce123[_0x7dcb0c(0x160)],'pageId':_0x4ce123[_0x7dcb0c(0x174)]},'before':null,'after':{'pageId':_0x2f97bb['pageId'],'version':_0x2f97bb[_0x7dcb0c(0x15f)],'pageContent':_0x4ce123[_0x7dcb0c(0x169)]},'dryRun':![],'request':_0x4ce123,..._0x400604?{'pageUrl':_0x400604}:{},..._0x1ecc9e?{'editPageUrl':_0x1ecc9e}:{},'warnings':_0x400604?[]:[_0x7dcb0c(0x171)]},'message':_0x7dcb0c(0x159)+_0x4ce123['pageId']+'.'};}};async function readInput(_0x200776){const _0xef31a7=a205_0x74bc29,_0x48eaa0=readCustomPageId(_0x200776),_0x36fc4a=_0x200776['str'](_0xef31a7(0x16e))[_0xef31a7(0x175)]()||(await getCustomPageSource(_0x48eaa0))[_0xef31a7(0x160)]?.['trim']();if(!_0x36fc4a)throw CliErrors['validation'](_0xef31a7(0x179)+_0x48eaa0+'.');return{'appCode':_0x36fc4a,'pageId':_0x48eaa0,'pageContent':await readValidatedPageContent(_0x200776)};}async function readValidatedPageContent(_0x370b79){const _0x350638=await readCustomPageDirectory(_0x370b79['str']('page-dir'));return await validateCustomPageContent(_0x350638),_0x350638;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a206_0x5ebe(_0x4a3bba,_0x2e90a5){_0x4a3bba=_0x4a3bba-0xf2;const _0xf02a5a=a206_0xf02a();let _0x5ebe02=_0xf02a5a[_0x4a3bba];return _0x5ebe02;}const a206_0xe6d5cc=a206_0x5ebe;(function(_0x1b5b86,_0xa047e8){const _0x2c3f78=a206_0x5ebe,_0x459b4d=_0x1b5b86();while(!![]){try{const _0x3083da=-parseInt(_0x2c3f78(0x10a))/0x1*(-parseInt(_0x2c3f78(0x106))/0x2)+parseInt(_0x2c3f78(0xf2))/0x3+parseInt(_0x2c3f78(0x107))/0x4+-parseInt(_0x2c3f78(0xf3))/0x5+parseInt(_0x2c3f78(0xfc))/0x6+-parseInt(_0x2c3f78(0xfa))/0x7*(parseInt(_0x2c3f78(0xf7))/0x8)+-parseInt(_0x2c3f78(0xfb))/0x9;if(_0x3083da===_0xa047e8)break;else _0x459b4d['push'](_0x459b4d['shift']());}catch(_0x17ae84){_0x459b4d['push'](_0x459b4d['shift']());}}}(a206_0xf02a,0x921d6));function a206_0xf02a(){const _0x3c411c=['1xvpUaM','3115122XpUGhB','4984445dRANSl','compress','manualResolutionRequired','related-pages-fallback','1160504UaxGPE','code','status','7LZTgYU','18638595SmJdVX','7059060mSjInR','data-list-status','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','/smartapi/lovrabet/dataset/','query-data-list-status','page','/standard-page-status?appCode=','nextAction','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','GET','1075218oymZge','4235600Hovhsv','name','length'];a206_0xf02a=function(){return _0x3c411c;};return a206_0xf02a();}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a206_0xe6d5cc(0x101),'command':a206_0xe6d5cc(0xfd),'description':a206_0xe6d5cc(0x104),'risk':'read','defaultOutputFormat':a206_0xe6d5cc(0xf4),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a206_0xe6d5cc(0xfe)}],async 'validate'(_0x2873b9){validateDatasetSelector(_0x2873b9);},async 'dryRun'(_0x1adb82){const _0x1b64f4=a206_0xe6d5cc,_0x431062=await loadDatasetDetailForPage(_0x1adb82);return{'method':_0x1b64f4(0x105),'url':_0x1b64f4(0xff)+_0x431062[_0x1b64f4(0xf8)]+_0x1b64f4(0x102)+encodeURIComponent(_0x1adb82['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x431062['id'],'code':_0x431062[_0x1b64f4(0xf8)],'name':_0x431062[_0x1b64f4(0x108)]},'action':_0x1b64f4(0x100)})};},async 'execute'(_0x3f60db){const _0x30bd12=a206_0xe6d5cc,_0x2a99ab=await loadDatasetDetailForPage(_0x3f60db),_0x40236a=await loadDataListPageStatusForGenerate(_0x3f60db,_0x2a99ab['code']),_0x2cbcd6=getUndeletedRelatedPages(_0x2a99ab),_0x56951d=assessDataListPageState(_0x2a99ab[_0x30bd12(0xf8)],_0x40236a,{'fallbackUndeletedPages':_0x2cbcd6});return{'ok':!![],'data':{'datasetCode':_0x2a99ab[_0x30bd12(0xf8)],'precheckSource':_0x40236a?.['source']??_0x30bd12(0xf6),'status':_0x56951d[_0x30bd12(0xf9)],'manualResolutionRequired':_0x56951d[_0x30bd12(0xf5)],'nextAction':_0x56951d[_0x30bd12(0x103)],'dataListPageStatus':_0x40236a,'relatedPages':{'total':_0x2a99ab['relatedPages']['length'],'undeletedCount':_0x2cbcd6[_0x30bd12(0x109)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a207_0x7990e5=a207_0x6c72;(function(_0x513310,_0x54b1eb){const _0x2e78c6=a207_0x6c72,_0x2c8c7c=_0x513310();while(!![]){try{const _0x153ce7=-parseInt(_0x2e78c6(0x17f))/0x1*(parseInt(_0x2e78c6(0x162))/0x2)+parseInt(_0x2e78c6(0x187))/0x3*(parseInt(_0x2e78c6(0x193))/0x4)+parseInt(_0x2e78c6(0x16d))/0x5+-parseInt(_0x2e78c6(0x183))/0x6*(-parseInt(_0x2e78c6(0x165))/0x7)+parseInt(_0x2e78c6(0x191))/0x8*(-parseInt(_0x2e78c6(0x169))/0x9)+parseInt(_0x2e78c6(0x172))/0xa*(parseInt(_0x2e78c6(0x16a))/0xb)+parseInt(_0x2e78c6(0x179))/0xc;if(_0x153ce7===_0x54b1eb)break;else _0x2c8c7c['push'](_0x2c8c7c['shift']());}catch(_0x106c4d){_0x2c8c7c['push'](_0x2c8c7c['shift']());}}}(a207_0x6db3,0x6555a));function a207_0x6c72(_0x5aa0c7,_0x4d3f08){_0x5aa0c7=_0x5aa0c7-0x15e;const _0x6db392=a207_0x6db3();let _0x6c72d7=_0x6db392[_0x5aa0c7];return _0x6c72d7;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a207_0x6db3(){const _0x136678=['page-pattern','3296QMgvaz','apply','boolean','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','DATA_LIST','2ANqHbV','generate-start','/generate-standard-pages/start','1365lFyiBW','page-type','precheck','bool','2061QMiIKG','33ggSdPt','reused','POST','1147350IVnwXJ','message','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','status','PARTIAL_SUCCESS','2032990grkoPv','source','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','related-pages-fallback','nextAction','1319832QwYdVC','dataListPageStatus','dataset','name','operationId','clientOperationId','480257Thphxt','SUCCESS','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','string','13026cGwQZJ','CRUD_PAGE_SET','number','fieldCount','12loGEvB','currentStep','taskId','page','manualResolutionRequired','appCode','code','allowGenerate','progressRate','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','16792cbBzZD'];a207_0x6db3=function(){return _0x136678;};return a207_0x6db3();}import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a207_0x7990e5(0x18a),'command':a207_0x7990e5(0x163),'description':a207_0x7990e5(0x174),'risk':'write','defaultOutputFormat':'compress','rejectedFlags':[{'name':a207_0x7990e5(0x166),'message':a207_0x7990e5(0x160),'hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':a207_0x7990e5(0x192),'message':a207_0x7990e5(0x190),'hint':a207_0x7990e5(0x175)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a207_0x7990e5(0x182),'description':a207_0x7990e5(0x16f)},{'name':a207_0x7990e5(0x15e),'type':a207_0x7990e5(0x15f),'description':a207_0x7990e5(0x181)}],async 'validate'(_0x164309){validateDatasetSelector(_0x164309);},async 'dryRun'(_0x406800){const _0x41a8c9=a207_0x7990e5,_0x4670d9=await prepare(_0x406800);return{'method':_0x41a8c9(0x16c),'url':'/smartapi/lovrabet/dataset/'+_0x4670d9[_0x41a8c9(0x17b)][_0x41a8c9(0x18d)]+_0x41a8c9(0x164),'body':{'appCode':_0x406800[_0x41a8c9(0x18c)],'clientOperationId':_0x4670d9[_0x41a8c9(0x17e)]},'description':serializeDryRunDescription({'dataset':{'id':_0x4670d9[_0x41a8c9(0x17b)]['id'],'code':_0x4670d9[_0x41a8c9(0x17b)][_0x41a8c9(0x18d)],'name':_0x4670d9['dataset'][_0x41a8c9(0x17c)],'fieldCount':_0x4670d9['dataset'][_0x41a8c9(0x186)]},'precheckSource':_0x4670d9[_0x41a8c9(0x17a)]?.['source']??_0x41a8c9(0x177),'action':_0x41a8c9(0x163),'clientOperationId':_0x4670d9['clientOperationId'],'plannedStatus':_0x4670d9[_0x41a8c9(0x167)][_0x41a8c9(0x170)],'reason':_0x4670d9['precheck']['message']})};},async 'execute'(_0x2fa63a){const _0x426aac=a207_0x7990e5;if(!_0x2fa63a[_0x426aac(0x168)](_0x426aac(0x15e))){const _0x34d560=await pageGenerateStart['dryRun'](_0x2fa63a);return{'ok':!![],'message':_0x426aac(0x176),'data':_0x34d560};}const _0x2c227e=await prepare(_0x2fa63a);if(!_0x2c227e[_0x426aac(0x167)][_0x426aac(0x18e)])return{'ok':![],'message':_0x2c227e['precheck'][_0x426aac(0x16e)],'data':{'datasetCode':_0x2c227e[_0x426aac(0x17b)][_0x426aac(0x18d)],'pageType':_0x426aac(0x161),'pagePattern':_0x426aac(0x184),'clientOperationId':_0x2c227e['clientOperationId'],'precheckSource':_0x2c227e[_0x426aac(0x17a)]?.[_0x426aac(0x173)]??_0x426aac(0x177),'status':_0x2c227e[_0x426aac(0x167)][_0x426aac(0x170)],'manualResolutionRequired':_0x2c227e[_0x426aac(0x167)][_0x426aac(0x18b)],'nextAction':_0x2c227e[_0x426aac(0x167)][_0x426aac(0x178)],'query':{'command':buildDataListPageStatusQueryCommand(_0x2c227e['dataset']['code'],_0x2fa63a[_0x426aac(0x18c)])},'dataListPageStatus':_0x2c227e['dataListPageStatus']}};const _0x3748b9=await startGenerateDataListPages(_0x2fa63a[_0x426aac(0x18c)],_0x2c227e['dataset'][_0x426aac(0x18d)],{'clientOperationId':_0x2c227e[_0x426aac(0x17e)]}),_0x1c4a26=_0x3748b9[_0x426aac(0x170)]===_0x426aac(0x180)||_0x3748b9[_0x426aac(0x170)]===_0x426aac(0x171)?await loadDataListPageStatusForGenerate(_0x2fa63a,_0x2c227e['dataset']['code']):null,_0x56b7a1=assessGenerateOperationState(_0x2c227e['dataset'][_0x426aac(0x18d)],_0x3748b9[_0x426aac(0x170)],_0x1c4a26);return{'ok':!![],'message':_0x3748b9[_0x426aac(0x16b)]?'Reusing\x20an\x20existing\x20generate\x20task':'Submitted\x20a\x20generate\x20task','data':{'datasetCode':_0x2c227e[_0x426aac(0x17b)][_0x426aac(0x18d)],'appCode':_0x2fa63a[_0x426aac(0x18c)],'pageType':_0x426aac(0x161),'pagePattern':_0x426aac(0x184),'taskId':_0x3748b9[_0x426aac(0x189)]??null,'operationId':_0x3748b9[_0x426aac(0x17d)]??null,'clientOperationId':_0x2c227e[_0x426aac(0x17e)],'jobStatus':_0x3748b9[_0x426aac(0x170)]??null,'progressRate':typeof _0x3748b9[_0x426aac(0x18f)]===_0x426aac(0x185)?_0x3748b9[_0x426aac(0x18f)]:null,'currentStep':_0x3748b9[_0x426aac(0x188)]??null,'reused':_0x3748b9[_0x426aac(0x16b)]===!![],'status':_0x56b7a1['status'],'manualResolutionRequired':_0x56b7a1[_0x426aac(0x18b)],'nextAction':_0x56b7a1['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x2c227e[_0x426aac(0x17b)]['code'],{'appCode':_0x2fa63a['appCode'],'taskId':_0x3748b9[_0x426aac(0x189)],'operationId':_0x3748b9[_0x426aac(0x17d)],'clientOperationId':_0x2c227e[_0x426aac(0x17e)]})},'dataListPageStatus':_0x1c4a26}};}};async function prepare(_0x208c1e){const _0x522f80=a207_0x7990e5,_0x1b8018=await loadDatasetDetailForPage(_0x208c1e),_0x4e9ddd=await loadDataListPageStatusForGenerate(_0x208c1e,_0x1b8018[_0x522f80(0x18d)]),_0x49f0b3=getUndeletedRelatedPages(_0x1b8018);return{'dataset':_0x1b8018,'dataListPageStatus':_0x4e9ddd,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x1b8018[_0x522f80(0x18d)],_0x4e9ddd,{'fallbackUndeletedPages':_0x49f0b3})};}
|