@lovrabet/rabetbase-cli 2.5.8-beta.2 → 2.5.9-beta.1
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 +6 -6
- 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.d.ts +8 -5
- 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.d.ts +5 -3
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +14 -11
- 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 +2 -2
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +3 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/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 +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +17 -15
- package/skills/rabetbase/references/rabetbase-rule.md +8 -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_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
|
+
const a197_0xe04579=a197_0x4104;(function(_0x4d212b,_0x39d1c8){const _0x4cae5e=a197_0x4104,_0x1efeee=_0x4d212b();while(!![]){try{const _0x331403=parseInt(_0x4cae5e(0x233))/0x1*(-parseInt(_0x4cae5e(0x238))/0x2)+-parseInt(_0x4cae5e(0x221))/0x3*(-parseInt(_0x4cae5e(0x265))/0x4)+parseInt(_0x4cae5e(0x23d))/0x5*(parseInt(_0x4cae5e(0x22e))/0x6)+-parseInt(_0x4cae5e(0x253))/0x7*(parseInt(_0x4cae5e(0x224))/0x8)+-parseInt(_0x4cae5e(0x1fb))/0x9*(-parseInt(_0x4cae5e(0x25d))/0xa)+-parseInt(_0x4cae5e(0x1f7))/0xb+parseInt(_0x4cae5e(0x250))/0xc;if(_0x331403===_0x39d1c8)break;else _0x1efeee['push'](_0x1efeee['shift']());}catch(_0x2d3f52){_0x1efeee['push'](_0x1efeee['shift']());}}}(a197_0x32f1,0xe8f11));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a197_0x4104(_0xffadff,_0x13c274){_0xffadff=_0xffadff-0x1ef;const _0x32f1eb=a197_0x32f1();let _0x410490=_0x32f1eb[_0xffadff];return _0x410490;}import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a197_0xe04579(0x216),a197_0xe04579(0x272),'WECOM','WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName',a197_0xe04579(0x217),a197_0xe04579(0x21a),a197_0xe04579(0x22f),'description',a197_0xe04579(0x247),a197_0xe04579(0x219)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0xe04579(0x257),a197_0xe04579(0x266),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a197_0xe04579(0x245),'recipients',a197_0xe04579(0x1fe),'bccList','replyTo',a197_0xe04579(0x26b),a197_0xe04579(0x20b),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0xe04579(0x20e),'type':a197_0xe04579(0x213),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a197_0xe04579(0x1f2),'type':'boolean','required':![],'default':![],'description':a197_0xe04579(0x25c)},{'name':a197_0xe04579(0x21d),'type':a197_0xe04579(0x213),'required':![],'description':a197_0xe04579(0x1ef)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0xe04579(0x21b),'required':!![],'description':a197_0xe04579(0x26c)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x326e4d,_0x1346dc,_0x4c39a4){return new CliError(_0x326e4d,0x1,_0x1346dc,_0x4c39a4);}export function readNotificationId(_0x1b646d){const _0x23df7f=a197_0xe04579,_0x165943=_0x1b646d[_0x23df7f(0x22b)]('id');if(!Number[_0x23df7f(0x271)](_0x165943)||_0x165943<=0x0)throw notificationError(_0x23df7f(0x20a),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x165943;}export function requireNotificationExplicitYes(_0x3cfd89){const _0x2664a6=a197_0xe04579;if(_0x3cfd89[_0x2664a6(0x241)](_0x2664a6(0x223))||_0x3cfd89[_0x2664a6(0x241)](_0x2664a6(0x244)))return;throw notificationError(_0x2664a6(0x22d),_0x2664a6(0x23f),_0x2664a6(0x25e));}export function readNotificationChannelType(_0x17d9aa,_0x546bd0=a197_0xe04579(0x1f6),_0xd37c3f=a197_0xe04579(0x24e)){const _0x34a5ae=a197_0xe04579,_0xa7ee46=_0x17d9aa['str'](_0x546bd0)[_0x34a5ae(0x208)]()||_0xd37c3f;if(!NOTIFICATION_CHANNEL_TYPES[_0x34a5ae(0x255)](_0xa7ee46))throw CliErrors[_0x34a5ae(0x22c)](_0x34a5ae(0x269)+_0x546bd0+':\x20'+_0xa7ee46,_0x34a5ae(0x242)+NOTIFICATION_CHANNEL_TYPES[_0x34a5ae(0x23a)](',\x20')+'.');return _0xa7ee46;}export function assertSingleNotificationSource(_0x4120dc){const _0x11b7fb=a197_0xe04579,_0x4db16a=[],_0x389150=_0x4120dc[_0x11b7fb(0x252)](_0x11b7fb(0x20e))['trim']();if(_0x389150)_0x4db16a[_0x11b7fb(0x270)]({'kind':_0x11b7fb(0x20e),'path':_0x389150});if(_0x4120dc['bool']('stdin'))_0x4db16a[_0x11b7fb(0x270)]({'kind':'stdin'});const _0x33656f=_0x4120dc['str'](_0x11b7fb(0x21d))['trim']();if(_0x33656f)_0x4db16a[_0x11b7fb(0x270)]({'kind':_0x11b7fb(0x26a),'name':_0x33656f});if(_0x4db16a[_0x11b7fb(0x226)]===0x0)throw CliErrors[_0x11b7fb(0x22c)](_0x11b7fb(0x25a),_0x11b7fb(0x273));if(_0x4db16a['length']>0x1)throw CliErrors['validation']('Notification\x20JSON\x20source\x20is\x20ambiguous.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x4db16a[0x0];}export async function readNotificationDocument(_0x3f8a06,_0xa2cfeb){const _0x432a23=a197_0xe04579,_0x1266f4=assertSingleNotificationSource(_0x3f8a06),_0x1bff7f=_0x1266f4[_0x432a23(0x259)]===_0x432a23(0x20e)?_0x432a23(0x227)+_0x1266f4[_0x432a23(0x23e)]:_0x1266f4[_0x432a23(0x259)]==='env'?'environment\x20variable\x20'+_0x1266f4[_0x432a23(0x205)]:_0x432a23(0x1f2);let _0x464939;try{if(_0x1266f4[_0x432a23(0x259)]===_0x432a23(0x20e))_0x464939=await readFile(_0x1266f4[_0x432a23(0x23e)],_0x432a23(0x206));else{if(_0x1266f4[_0x432a23(0x259)]==='env'){if(!(_0x1266f4[_0x432a23(0x205)]in process.env))throw notificationError('notification_config_source_unavailable',_0x432a23(0x211)+_0x1266f4[_0x432a23(0x205)]);_0x464939=process.env[_0x1266f4.name]??'';}else _0x464939=await readStdin();}}catch(_0xe2dcc2){if(_0xe2dcc2 instanceof CliError)throw _0xe2dcc2;throw notificationError(_0x432a23(0x236),_0x432a23(0x1fd)+_0x1bff7f+'.');}let _0x10d8fc;try{_0x10d8fc=JSON['parse'](_0x464939);}catch{throw notificationError(_0x432a23(0x209),_0x432a23(0x24b)+_0x1bff7f+_0x432a23(0x26f),_0x432a23(0x258));}if(!isJsonObject(_0x10d8fc))throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0x1bff7f+_0x432a23(0x23c));return validateNotificationDocument(_0x10d8fc,_0xa2cfeb);}export function projectNotificationListConfig(_0xfed73a,_0x701d11){const _0x272441=a197_0xe04579;return{'id':typeof _0xfed73a['id']===_0x272441(0x21b)?_0xfed73a['id']:null,'configCode':requireResponseString(_0xfed73a[_0x272441(0x266)],_0x272441(0x266),_0x701d11),'configName':requireResponseString(_0xfed73a[_0x272441(0x222)],_0x272441(0x222),_0x701d11),'channelType':requireResponseString(_0xfed73a[_0x272441(0x217)],_0x272441(0x217),_0x701d11),'description':normalizeNullableString(_0xfed73a[_0x272441(0x24d)]),'createTime':normalizeNullableString(_0xfed73a[_0x272441(0x1f4)]),'updateTime':normalizeNullableString(_0xfed73a[_0x272441(0x1f3)])};}export function normalizeExactNotificationConfig(_0x4ba2d9,_0x1ac7f1,_0x5a3a16){const _0x37eea8=a197_0xe04579;if(!Number[_0x37eea8(0x271)](_0x4ba2d9['id'])||_0x4ba2d9['id']!==_0x1ac7f1)throw notificationError(_0x37eea8(0x202),_0x37eea8(0x262)+_0x1ac7f1+'.');if(_0x4ba2d9[_0x37eea8(0x257)]!==_0x5a3a16)throw notificationError(_0x37eea8(0x202),'Notification\x20config\x20'+_0x1ac7f1+_0x37eea8(0x201));const _0x101b29=requireExactString(_0x4ba2d9[_0x37eea8(0x222)],'configName',_0x1ac7f1),_0x54f376=requireExactString(_0x4ba2d9[_0x37eea8(0x266)],'configCode',_0x1ac7f1),_0x39181b=requireExactString(_0x4ba2d9['channelType'],_0x37eea8(0x217),_0x1ac7f1);if(!NOTIFICATION_CHANNEL_TYPES[_0x37eea8(0x255)](_0x39181b))throw notificationError('notification_config_response_invalid',_0x37eea8(0x21e)+_0x1ac7f1+_0x37eea8(0x246));const _0x5a512e=responseNullableString(_0x4ba2d9[_0x37eea8(0x21a)],_0x37eea8(0x21a),_0x1ac7f1),_0x548de2=responseNullableString(_0x4ba2d9[_0x37eea8(0x22f)],_0x37eea8(0x22f),_0x1ac7f1),_0x356151=responseNullableString(_0x4ba2d9['description'],_0x37eea8(0x24d),_0x1ac7f1),_0x471efd=responseNullableTimeout(_0x4ba2d9['connectTimeout'],_0x37eea8(0x247),_0x1ac7f1),_0x266cb3=responseNullableTimeout(_0x4ba2d9[_0x37eea8(0x219)],_0x37eea8(0x219),_0x1ac7f1);return{'id':_0x1ac7f1,'appCode':_0x5a3a16,'configCode':_0x54f376,'configName':_0x101b29,'channelType':_0x39181b,'endpointUrl':redactSensitive(_0x5a512e),'channelConfig':redactSensitive(_0x548de2),'description':_0x356151,'connectTimeout':_0x471efd,'readTimeout':_0x266cb3,'endpointUrlRaw':_0x5a512e,'channelConfigRaw':_0x548de2};}export async function requireExactNotificationConfig(_0x43dd76,_0x1bdff0,_0x49bcbc){const _0x5c1daf=a197_0xe04579;let _0x500016;try{_0x500016=await getNotificationChannelConfig(_0x1bdff0,_0x43dd76);}catch{throw safeApiFailure(_0x49bcbc,_0x5c1daf(0x1f5),_0x5c1daf(0x1f9)+_0x43dd76+_0x5c1daf(0x1fa));}return normalizeExactNotificationConfig(_0x500016,_0x1bdff0,_0x43dd76);}export function projectNotificationConfig(_0x355de0){const _0x4af799=a197_0xe04579;return{'id':_0x355de0['id']??null,'appCode':_0x355de0[_0x4af799(0x257)],'configCode':_0x355de0['configCode']??null,'configName':_0x355de0['configName'],'channelType':_0x355de0[_0x4af799(0x217)],'endpointUrl':redactSensitive(_0x355de0[_0x4af799(0x21a)]),'channelConfig':redactSensitive(_0x355de0['channelConfig']),'description':_0x355de0[_0x4af799(0x24d)]??null,'connectTimeout':_0x355de0['connectTimeout']??null,'readTimeout':_0x355de0[_0x4af799(0x219)]??null};}export function notificationSelector(_0xe4a0f0){const _0x2c90c3=a197_0xe04579;return{'appCode':_0xe4a0f0[_0x2c90c3(0x257)],'id':_0xe4a0f0['id'],'configCode':_0xe4a0f0[_0x2c90c3(0x266)],'configName':_0xe4a0f0['configName'],'channelType':_0xe4a0f0['channelType']};}export function createMutationInput(_0x16dec8,_0x47361f){const _0x3e0a9a=a197_0xe04579;return{'appCode':_0x16dec8,'configName':_0x47361f[_0x3e0a9a(0x222)],'channelType':_0x47361f['channelType'],...hasOwn(_0x47361f,_0x3e0a9a(0x21a))?{'endpointUrl':_0x47361f[_0x3e0a9a(0x21a)]}:{},...hasOwn(_0x47361f,_0x3e0a9a(0x22f))?{'channelConfig':serializeChannelConfig(_0x47361f[_0x3e0a9a(0x22f)])}:{},...hasOwn(_0x47361f,'description')?{'description':_0x47361f[_0x3e0a9a(0x24d)]}:{},...hasOwn(_0x47361f,_0x3e0a9a(0x247))?{'connectTimeout':_0x47361f['connectTimeout']}:{},...hasOwn(_0x47361f,_0x3e0a9a(0x219))?{'readTimeout':_0x47361f[_0x3e0a9a(0x219)]}:{}};}export function mergeUpdateInput(_0x2bcb26,_0x2eade7){const _0x142b21=a197_0xe04579;return{'id':_0x2bcb26['id'],'appCode':_0x2bcb26[_0x142b21(0x257)],'configName':_0x2eade7[_0x142b21(0x222)]??_0x2bcb26['configName'],'channelType':_0x2eade7[_0x142b21(0x217)]??_0x2bcb26[_0x142b21(0x217)],'endpointUrl':hasOwn(_0x2eade7,_0x142b21(0x21a))?_0x2eade7['endpointUrl']:_0x2bcb26[_0x142b21(0x232)],'channelConfig':hasOwn(_0x2eade7,_0x142b21(0x22f))?serializeChannelConfig(_0x2eade7[_0x142b21(0x22f)]):_0x2bcb26[_0x142b21(0x1f1)],'description':hasOwn(_0x2eade7,_0x142b21(0x24d))?_0x2eade7[_0x142b21(0x24d)]:_0x2bcb26[_0x142b21(0x24d)],'connectTimeout':hasOwn(_0x2eade7,_0x142b21(0x247))?_0x2eade7[_0x142b21(0x247)]:_0x2bcb26[_0x142b21(0x247)],'readTimeout':hasOwn(_0x2eade7,_0x142b21(0x219))?_0x2eade7[_0x142b21(0x219)]:_0x2bcb26[_0x142b21(0x219)]};}export function plannedUpdateProjection(_0x4a40ec,_0x4efaef){const _0x26fdc0=a197_0xe04579;return projectNotificationConfig({'id':_0x4a40ec['id'],'appCode':_0x4a40ec[_0x26fdc0(0x257)],'configCode':_0x4a40ec[_0x26fdc0(0x266)],'configName':_0x4efaef[_0x26fdc0(0x222)]??_0x4a40ec[_0x26fdc0(0x222)],'channelType':_0x4efaef[_0x26fdc0(0x217)]??_0x4a40ec[_0x26fdc0(0x217)],'endpointUrl':hasOwn(_0x4efaef,_0x26fdc0(0x21a))?_0x4efaef[_0x26fdc0(0x21a)]:_0x4a40ec[_0x26fdc0(0x232)],'channelConfig':hasOwn(_0x4efaef,_0x26fdc0(0x22f))?_0x4efaef['channelConfig']:_0x4a40ec[_0x26fdc0(0x1f1)],'description':hasOwn(_0x4efaef,_0x26fdc0(0x24d))?_0x4efaef[_0x26fdc0(0x24d)]:_0x4a40ec[_0x26fdc0(0x24d)],'connectTimeout':hasOwn(_0x4efaef,'connectTimeout')?_0x4efaef['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x4a40ec[_0x26fdc0(0x247)],'readTimeout':hasOwn(_0x4efaef,_0x26fdc0(0x219))?_0x4efaef[_0x26fdc0(0x219)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x4a40ec['readTimeout']});}export function requestedSafeFieldsMatch(_0x21ca29,_0x508c12,_0x42e211){const _0x20791f=a197_0xe04579,_0x5ae3e5=[],_0x2c44c5=[],_0x4687bb=[];for(const _0x4eea5c of[_0x20791f(0x222),'channelType','description']){if(!hasOwn(_0x42e211,_0x4eea5c))continue;_0x4687bb[_0x20791f(0x270)](_0x4eea5c),_0x5ae3e5['push'](_0x508c12[_0x4eea5c]===_0x42e211[_0x4eea5c]),_0x2c44c5['push'](_0x21ca29[_0x4eea5c]!==_0x42e211[_0x4eea5c]&&_0x508c12[_0x4eea5c]===_0x42e211[_0x4eea5c]);}for(const _0x43c8d2 of[_0x20791f(0x247),'readTimeout']){if(!hasOwn(_0x42e211,_0x43c8d2))continue;const _0x1f7f1d=_0x42e211[_0x43c8d2]??(_0x43c8d2===_0x20791f(0x247)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x4687bb[_0x20791f(0x270)](_0x43c8d2),_0x5ae3e5[_0x20791f(0x270)](_0x508c12[_0x43c8d2]===_0x1f7f1d),_0x2c44c5[_0x20791f(0x270)](_0x21ca29[_0x43c8d2]!==_0x1f7f1d&&_0x508c12[_0x43c8d2]===_0x1f7f1d);}return hasOwn(_0x42e211,_0x20791f(0x21a))&&_0x42e211['endpointUrl']===null&&(_0x4687bb[_0x20791f(0x270)](_0x20791f(0x20c)),_0x5ae3e5[_0x20791f(0x270)](_0x508c12[_0x20791f(0x232)]===null||_0x508c12[_0x20791f(0x232)]===''),_0x2c44c5[_0x20791f(0x270)](_0x21ca29[_0x20791f(0x232)]!==null&&_0x21ca29[_0x20791f(0x232)]!==''&&(_0x508c12['endpointUrlRaw']===null||_0x508c12[_0x20791f(0x232)]===''))),{'allMatch':_0x5ae3e5[_0x20791f(0x200)](Boolean),'provesChange':_0x2c44c5[_0x20791f(0x22a)](Boolean),'verifiedFields':_0x4687bb};}function a197_0x32f1(){const _0xd668f6=['from-env','Notification\x20config\x20','Notification\x20JSON\x20field\x20\x22','\x20has\x20invalid\x20field\x20\x22','128064gbxnsL','configName','dry-run','24uYFSfP','Notification\x20config\x20list\x20item\x20','length','file\x20','notification_config_field_required','update','some','num','validation','notification_config_confirmation_required','6BLHypa','channelConfig','\x22\x20must\x20be\x20a\x20non-empty\x20string.','\x20characters.','endpointUrlRaw','339019rtLXFk','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','notification_config_channel_field_forbidden','notification_config_source_unavailable','prototype','2DDBWnQ','\x20is\x20missing\x20required\x20field\x20\x22','join','call','\x20must\x20be\x20an\x20object.','4140235iWqBDe','path','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','keys','bool','Allowed\x20values:\x20','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','yes','emailTargets','\x20has\x20an\x20unsupported\x20channelType.','connectTimeout','Item\x20','\x22\x20cannot\x20exceed\x20','object','Notification\x20JSON\x20from\x20','\x22\x20must\x20be\x20','description','EMAIL','_unavailable','10614588sXJfCx','Invalid\x20notification\x20config\x20response.','str','2265557WreLVL','failed','includes','notification_config_update_empty','appCode','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','kind','Missing\x20notification\x20JSON\x20source.','notification_config_field_forbidden','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','1285970vHRWXb','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','\x20--format\x20compress','\x22\x20is\x20forbidden.','notification_config_','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','a\x20string\x20or\x20null','\x20has\x20an\x20invalid\x20id.','24qYGuZZ','configCode','Notification\x20JSON\x20channelConfig\x20field\x20\x22','a\x20non-empty\x20string','Invalid\x20--','env','subjectPrefix','Application-level\x20notification\x20config\x20ID','Create\x20JSON\x20requires\x20field\x20','\x20--type\x20','\x20is\x20invalid.','push','isSafeInteger','DINGTALK','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','\x20has\x20an\x20invalid\x20appCode.','channelConfigRaw','stdin','updateTime','createTime','preflight','type','8067389EcusQo','a\x20supported\x20string','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','72JAuDDj','notification_config_field_invalid','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','ccList','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','every','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','notification_config_response_invalid','has','\x20has\x20an\x20invalid\x20channelType.','name','utf8','rabetbase\x20notification\x20config-list\x20--appcode\x20','trim','notification_config_json_invalid','notification_config_id_invalid','fromName','endpointUrl:null','create','file','<redacted>','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','hasOwnProperty','string','a\x20JSON\x20object','setEncoding','FEISHU','channelType','\x20failed.','readTimeout','endpointUrl','number','messageTemplate'];a197_0x32f1=function(){return _0xd668f6;};return a197_0x32f1();}export function validateNotificationDeleteReadback(_0x49fca4,_0x5afb89,_0x29c767){const _0x329c6f=a197_0xe04579;for(const [_0x3627da,_0x286c51]of _0x49fca4['entries']()){if(!Number['isSafeInteger'](_0x286c51['id'])||_0x286c51['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x329c6f(0x225)+(_0x3627da+0x1)+_0x329c6f(0x264));if(_0x286c51[_0x329c6f(0x257)]!==_0x5afb89)throw notificationError('notification_config_response_invalid',_0x329c6f(0x225)+(_0x3627da+0x1)+_0x329c6f(0x1f0));if(_0x286c51[_0x329c6f(0x217)]!==_0x29c767)throw notificationError(_0x329c6f(0x202),_0x329c6f(0x225)+(_0x3627da+0x1)+_0x329c6f(0x204));}}export function safeApiFailure(_0xc56284,_0x118cce,_0x484ce2){const _0x49d0df=a197_0xe04579;return notificationError(_0x49d0df(0x261)+_0xc56284+'_'+(_0x118cce==='mutation'?_0x49d0df(0x254):_0x118cce+_0x49d0df(0x24f)),_0x49d0df(0x21e)+_0xc56284+'\x20'+_0x118cce+_0x49d0df(0x218),_0x484ce2);}export function notificationLookupCommand(_0x3ba31f,_0x547359){const _0x2eef10=a197_0xe04579;return _0x2eef10(0x207)+_0x3ba31f+_0x2eef10(0x26e)+_0x547359+_0x2eef10(0x25f);}function validateNotificationDocument(_0x3a88d2,_0x7e4905){const _0x54f771=a197_0xe04579;for(const _0x54e328 of Object[_0x54f771(0x240)](_0x3a88d2)){if(FORBIDDEN_IDENTITY_FIELDS[_0x54f771(0x203)](_0x54e328))throw notificationError(_0x54f771(0x25b),'Notification\x20JSON\x20field\x20\x22'+_0x54e328+_0x54f771(0x1ff));if(!ALLOWED_INPUT_FIELDS[_0x54f771(0x203)](_0x54e328))throw notificationError('notification_config_field_unknown','Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x54e328+'\x22.');}if(_0x7e4905===_0x54f771(0x229)&&Object[_0x54f771(0x240)](_0x3a88d2)[_0x54f771(0x226)]===0x0)throw notificationError(_0x54f771(0x256),_0x54f771(0x243));const _0x707e09={};if(hasOwn(_0x3a88d2,_0x54f771(0x222)))_0x707e09['configName']=validateRequiredString(_0x3a88d2[_0x54f771(0x222)],_0x54f771(0x222),0x80);else{if(_0x7e4905===_0x54f771(0x20d))throw notificationError(_0x54f771(0x228),_0x54f771(0x26d)+'\x22configName\x22.');}if(hasOwn(_0x3a88d2,_0x54f771(0x217))){if(typeof _0x3a88d2[_0x54f771(0x217)]!==_0x54f771(0x213))throw invalidFieldType('channelType',_0x54f771(0x1f8));const _0x5f37a4=_0x3a88d2['channelType']['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x54f771(0x255)](_0x5f37a4))throw notificationError(_0x54f771(0x1fc),_0x54f771(0x210),_0x54f771(0x242)+NOTIFICATION_CHANNEL_TYPES[_0x54f771(0x23a)](',\x20')+'.');_0x707e09[_0x54f771(0x217)]=_0x5f37a4;}else{if(_0x7e4905==='create')throw notificationError('notification_config_field_required',_0x54f771(0x26d)+'\x22channelType\x22.');}for(const [_0x113f14,_0x3fc771]of[[_0x54f771(0x21a),0x200],['description',0x100]]){if(!hasOwn(_0x3a88d2,_0x113f14))continue;const _0x6692b6=_0x3a88d2[_0x113f14];if(_0x6692b6!==null&&typeof _0x6692b6!==_0x54f771(0x213))throw invalidFieldType(_0x113f14,_0x54f771(0x263));if(typeof _0x6692b6===_0x54f771(0x213)&&_0x6692b6['length']>_0x3fc771)throw notificationError(_0x54f771(0x1fc),_0x54f771(0x21f)+_0x113f14+'\x22\x20cannot\x20exceed\x20'+_0x3fc771+_0x54f771(0x231));_0x707e09[_0x113f14]=_0x6692b6;}if(hasOwn(_0x3a88d2,_0x54f771(0x22f))){const _0x3357f5=_0x3a88d2['channelConfig'];if(_0x3357f5===null&&_0x7e4905===_0x54f771(0x20d))throw invalidFieldType(_0x54f771(0x22f),_0x54f771(0x214));if(_0x3357f5!==null&&!isJsonObject(_0x3357f5))throw invalidFieldType('channelConfig',_0x7e4905==='update'?'a\x20JSON\x20object\x20or\x20null':_0x54f771(0x214));_0x3357f5!==null&&validateChannelConfigFields(_0x707e09[_0x54f771(0x217)],_0x3357f5),_0x707e09[_0x54f771(0x22f)]=_0x3357f5;}for(const _0x3d650b of[_0x54f771(0x247),_0x54f771(0x219)]){if(!hasOwn(_0x3a88d2,_0x3d650b))continue;const _0x26e996=_0x3a88d2[_0x3d650b];if(_0x26e996!==null&&(!Number[_0x54f771(0x271)](_0x26e996)||_0x26e996<0x0))throw notificationError(_0x54f771(0x1fc),_0x54f771(0x21f)+_0x3d650b+_0x54f771(0x234));_0x707e09[_0x3d650b]=_0x26e996;}return _0x707e09;}function validateRequiredString(_0xf27d7e,_0x44e358,_0x31f6fa){const _0x241cb3=a197_0xe04579;if(typeof _0xf27d7e!==_0x241cb3(0x213))throw invalidFieldType(_0x44e358,_0x241cb3(0x268));const _0x148222=_0xf27d7e[_0x241cb3(0x208)]();if(!_0x148222)throw notificationError(_0x241cb3(0x1fc),'Notification\x20JSON\x20field\x20\x22'+_0x44e358+_0x241cb3(0x230));if(_0x148222[_0x241cb3(0x226)]>_0x31f6fa)throw notificationError(_0x241cb3(0x1fc),'Notification\x20JSON\x20field\x20\x22'+_0x44e358+_0x241cb3(0x249)+_0x31f6fa+_0x241cb3(0x231));return _0x148222;}function validateChannelConfigFields(_0x69ab98,_0x117257){const _0x20ffe2=a197_0xe04579;if(hasOwn(_0x117257,_0x20ffe2(0x21c)))throw forbiddenChannelConfigField(_0x20ffe2(0x21c));if(_0x69ab98===_0x20ffe2(0x24e))for(const _0x47ede9 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x117257,_0x47ede9))throw forbiddenChannelConfigField(_0x47ede9);}}function forbiddenChannelConfigField(_0x26c456){const _0x3dc606=a197_0xe04579;return notificationError(_0x3dc606(0x235),_0x3dc606(0x267)+_0x26c456+_0x3dc606(0x260));}function invalidFieldType(_0x53dcff,_0x49cd52){const _0x550366=a197_0xe04579;return notificationError('notification_config_field_invalid',_0x550366(0x21f)+_0x53dcff+_0x550366(0x24c)+_0x49cd52+'.');}function serializeChannelConfig(_0x206757){return _0x206757===null||_0x206757===undefined?null:JSON['stringify'](_0x206757);}function redactSensitive(_0x2c7a0e){const _0x3f1b70=a197_0xe04579;return _0x2c7a0e===null||_0x2c7a0e===undefined||_0x2c7a0e===''?null:_0x3f1b70(0x20f);}function requireResponseString(_0x1d0b75,_0xa73a2b,_0x2342c2){const _0x338ed1=a197_0xe04579;if(typeof _0x1d0b75!==_0x338ed1(0x213)||_0x1d0b75[_0x338ed1(0x208)]()==='')throw CliErrors['apiError'](_0x338ed1(0x251),_0x338ed1(0x248)+(_0x2342c2+0x1)+_0x338ed1(0x239)+_0xa73a2b+'\x22.');return _0x1d0b75[_0x338ed1(0x208)]();}function requireExactString(_0x56ba8d,_0x55ce66,_0x182e8c){const _0x291891=a197_0xe04579;if(typeof _0x56ba8d!==_0x291891(0x213)||_0x56ba8d[_0x291891(0x208)]()==='')throw notificationError(_0x291891(0x202),'Notification\x20config\x20'+_0x182e8c+_0x291891(0x239)+_0x55ce66+'\x22.');return _0x56ba8d[_0x291891(0x208)]();}function responseNullableString(_0x113d5f,_0x1e6cc5,_0x419eaf){const _0x54eb4f=a197_0xe04579;if(_0x113d5f===undefined||_0x113d5f===null)return null;if(typeof _0x113d5f!==_0x54eb4f(0x213))throw notificationError('notification_config_response_invalid',_0x54eb4f(0x21e)+_0x419eaf+_0x54eb4f(0x220)+_0x1e6cc5+'\x22.');return _0x113d5f;}function responseNullableTimeout(_0x4b73a3,_0xe9c88,_0x53dc63){const _0x583e90=a197_0xe04579;if(_0x4b73a3===undefined||_0x4b73a3===null)return null;if(!Number[_0x583e90(0x271)](_0x4b73a3)||_0x4b73a3<0x0)throw notificationError(_0x583e90(0x202),_0x583e90(0x21e)+_0x53dc63+'\x20has\x20invalid\x20field\x20\x22'+_0xe9c88+'\x22.');return _0x4b73a3;}function normalizeNullableString(_0x5af2ce){const _0x73d084=a197_0xe04579;return typeof _0x5af2ce===_0x73d084(0x213)?_0x5af2ce:null;}function isJsonObject(_0xa293f6){const _0x41e396=a197_0xe04579;return _0xa293f6!==null&&typeof _0xa293f6===_0x41e396(0x24a)&&!Array['isArray'](_0xa293f6);}function hasOwn(_0x576434,_0x365ecd){const _0x112161=a197_0xe04579;return Object[_0x112161(0x237)][_0x112161(0x212)][_0x112161(0x23b)](_0x576434,_0x365ecd);}async function readStdin(){const _0xb411bb=a197_0xe04579;let _0x208535='';process['stdin'][_0xb411bb(0x215)](_0xb411bb(0x206));for await(const _0x1d3ad7 of process[_0xb411bb(0x1f2)])_0x208535+=_0x1d3ad7;return _0x208535;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x46fc93=a198_0x2f75;(function(_0x36492b,_0x4f8743){const _0x522f58=a198_0x2f75,_0x4af56c=_0x36492b();while(!![]){try{const _0x4778fc=parseInt(_0x522f58(0x119))/0x1*(parseInt(_0x522f58(0x123))/0x2)+parseInt(_0x522f58(0x133))/0x3*(-parseInt(_0x522f58(0x10b))/0x4)+-parseInt(_0x522f58(0x129))/0x5*(parseInt(_0x522f58(0xfc))/0x6)+parseInt(_0x522f58(0x104))/0x7+-parseInt(_0x522f58(0x10c))/0x8+-parseInt(_0x522f58(0x10e))/0x9*(-parseInt(_0x522f58(0x103))/0xa)+parseInt(_0x522f58(0x110))/0xb*(-parseInt(_0x522f58(0x111))/0xc);if(_0x4778fc===_0x4f8743)break;else _0x4af56c['push'](_0x4af56c['shift']());}catch(_0x1e5fda){_0x4af56c['push'](_0x4af56c['shift']());}}}(a198_0x521b,0x63959));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a198_0x2f75(_0x10a5a7,_0x1c15f3){_0x10a5a7=_0x10a5a7-0xfc;const _0x521b04=a198_0x521b();let _0x2f75d1=_0x521b04[_0x10a5a7];return _0x2f75d1;}const SUPPORTED_SCENES=[a198_0x46fc93(0x12f),'general',a198_0x46fc93(0x109),a198_0x46fc93(0x12a)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x46fc93(0x11c),'general':'General','form':a198_0x46fc93(0x10f),'idCard':'IdCard'},SCENE_FLAG={'name':a198_0x46fc93(0x117),'type':a198_0x46fc93(0x118),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x46fc93(0x130)},IMAGE_FILE_FLAG={'name':a198_0x46fc93(0xfe),'type':a198_0x46fc93(0x118),'description':a198_0x46fc93(0x105)},IMAGE_URL_FLAG={'name':a198_0x46fc93(0x131),'type':a198_0x46fc93(0x118),'description':a198_0x46fc93(0x12b)};function normalizeScene(_0x30e8b6){const _0x1c4327=a198_0x46fc93,_0x2b7733=_0x30e8b6['trim']()['toLowerCase']();if(_0x2b7733===_0x1c4327(0x107))return _0x1c4327(0x12a);if(_0x2b7733===_0x1c4327(0x12f)||_0x2b7733===_0x1c4327(0x102)||_0x2b7733==='form')return _0x2b7733;throw CliErrors[_0x1c4327(0x11a)](_0x1c4327(0x134)+_0x30e8b6+_0x1c4327(0x10a)+SUPPORTED_SCENES[_0x1c4327(0x127)](',\x20'));}function selectedInputs(_0x5aa636){const _0x26b4b3=a198_0x46fc93,_0x5c03df=_0x5aa636[_0x26b4b3(0x126)](_0x26b4b3(0xfe))[_0x26b4b3(0x114)](),_0x1b63bc=_0x5aa636[_0x26b4b3(0x126)](_0x26b4b3(0x131))[_0x26b4b3(0x114)]();return{'imageFile':_0x5c03df,'imageUrl':_0x1b63bc,'count':[_0x5c03df,_0x1b63bc][_0x26b4b3(0x10d)](Boolean)[_0x26b4b3(0x12e)]};}function validateInputSelection(_0x386445){const _0x462881=a198_0x46fc93,_0x393da1=selectedInputs(_0x386445);if(_0x393da1['count']!==0x1)throw CliErrors[_0x462881(0x11a)](_0x462881(0x12d));return _0x393da1;}function a198_0x521b(){const _0x29b44a=['<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','/smartapi/common/queryFileUrl','str','join','\x20OCR','37280kqAIHi','idCard','Publicly\x20accessible\x20image\x20or\x20file\x20URL','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','length','invoice','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','image-url','fileUrl','4533ntZDHI','Unsupported\x20OCR\x20scene:\x20','GET','18PvNijN','/smartapi/ocr/recognize-text','image-file','read','imageUrl','path','general','20HrQrHF','4054533tEbXcy','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','recognize','idcard','/smartapi/ocr/recognize-text?','form','.\x20Supported\x20scenes:\x20','280WMiraP','3444208SbJCyK','filter','1901223gXdrym','Table','33pvjWUJ','200976ztKSQu','\x20OCR\x20from\x20URL','File\x20upload\x20response\x20missing\x20filePath.','trim','POST','imageFile','scene','string','196vhCCqp','validation','apiError','Invoice','appCode','toString','/smartapi/common/uploadFile','filePath','fileName','File\x20URL\x20response\x20missing\x20fileUrl.','154dFmjsC'];a198_0x521b=function(){return _0x29b44a;};return a198_0x521b();}function withScene(_0x71862b,_0x2c1752,_0x20e4c0){const _0x26d7da=a198_0x46fc93;return{..._0x71862b,'scene':_0x2c1752,..._0x20e4c0?{'sourceFile':{'fileName':_0x20e4c0[_0x26d7da(0x121)],'filePath':_0x20e4c0['filePath']}}:{}};}const ocrRecognize={'service':'ocr','command':a198_0x46fc93(0x106),'description':'Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','risk':a198_0x46fc93(0xff),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x11b148){const _0x483b7f=a198_0x46fc93,_0x4cab3c=normalizeScene(_0x11b148['str'](_0x483b7f(0x117))),_0x3bbb8a=SCENE_TO_LEGACY_TYPE[_0x4cab3c],_0x3c3a52=validateInputSelection(_0x11b148);if(_0x3c3a52['imageUrl']){const _0x409346=new URLSearchParams({'url':_0x3c3a52[_0x483b7f(0x100)],'type':_0x3bbb8a,'appCode':_0x11b148[_0x483b7f(0x11d)]});return{'method':_0x483b7f(0x135),'url':_0x483b7f(0x108)+_0x409346[_0x483b7f(0x11e)](),'description':'Preview:\x20recognize\x20'+_0x4cab3c+_0x483b7f(0x112)};}const _0x21ef0f=requireDevelopmentUploadFile(_0x3c3a52[_0x483b7f(0x116)],_0x483b7f(0xfe));return{'method':_0x483b7f(0x115),'url':_0x483b7f(0x11f),'body':{'steps':[{'method':_0x483b7f(0x115),'url':_0x483b7f(0x11f),'body':{'appCode':_0x11b148[_0x483b7f(0x11d)],'multipart':{'file':_0x21ef0f}}},{'method':'POST','url':_0x483b7f(0x125),'body':{'filePath':_0x483b7f(0x12c),'downloadFlag':![]}},{'method':_0x483b7f(0x135),'url':_0x483b7f(0xfd),'query':{'appCode':_0x11b148[_0x483b7f(0x11d)],'url':_0x483b7f(0x124),'type':_0x3bbb8a}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x4cab3c+_0x483b7f(0x128)};},async 'execute'(_0x23661b){const _0xbd8a3=a198_0x46fc93,_0x100a25=normalizeScene(_0x23661b[_0xbd8a3(0x126)](_0xbd8a3(0x117))),_0x5af4b7=SCENE_TO_LEGACY_TYPE[_0x100a25],_0x441cb4=validateInputSelection(_0x23661b);if(_0x441cb4[_0xbd8a3(0x100)]){const _0xbd1945=await recognizeDevelopmentOcr(_0x23661b['appCode'],{'url':_0x441cb4[_0xbd8a3(0x100)],'type':_0x5af4b7});return{'ok':!![],'data':withScene(_0xbd1945,_0x100a25)};}const _0x2597f2=requireDevelopmentUploadFile(_0x441cb4[_0xbd8a3(0x116)],'image-file'),_0x68e06c=await uploadDevelopmentFile(_0x23661b[_0xbd8a3(0x11d)],_0x2597f2[_0xbd8a3(0x101)]);if(!_0x68e06c['filePath'])throw CliErrors[_0xbd8a3(0x11b)](_0xbd8a3(0x113));const _0x8922d1=await queryDevelopmentFileUrl(_0x68e06c[_0xbd8a3(0x120)],{'download':![]});if(!_0x8922d1[_0xbd8a3(0x132)])throw CliErrors[_0xbd8a3(0x11b)](_0xbd8a3(0x122));const _0x2c011c=await recognizeDevelopmentOcr(_0x23661b[_0xbd8a3(0x11d)],{'url':_0x8922d1[_0xbd8a3(0x132)],'type':_0x5af4b7});return{'ok':!![],'data':withScene(_0x2c011c,_0x100a25,_0x68e06c)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a199_0x5353(){const _0x205155=['This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','now','13230405ILzCEC','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','1296026IywCuY','pageId','6lfwaLZ','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','773232DtYNUA','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','utf8','isInteger','8HEKJSV','ONEPAGE','validation','57465540lIklin','Custom_page_','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','create','stringify','pageName','CUSTOM','name','page.create','isNaN','menuPath','trim','20xpOxij','str','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','page-dir','version','createMenu','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','menuId','page\x20create\x20does\x20not\x20accept\x20--page-type.','.json','page-type','includes','127180AajITs','write','parentMenuId','page','string','90984YkdxsE','apiError','number','compress','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','Created\x20Custom\x20Page\x20','appCode','BLANK','DASHBOARD','toLowerCase','some','object','parent-menu-id','page-content','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','values','files','476ZcsjME','parse','23200siQEjy','POST','Invalid\x20Custom\x20Page\x20pattern:\x20','keys','page-pattern','length'];a199_0x5353=function(){return _0x205155;};return a199_0x5353();}const a199_0x2e7449=a199_0x2df9;(function(_0x27a50f,_0x1c7ca4){const _0x35bb67=a199_0x2df9,_0x5cbc6e=_0x27a50f();while(!![]){try{const _0x4d3abc=-parseInt(_0x35bb67(0xde))/0x1+-parseInt(_0x35bb67(0xe0))/0x2*(parseInt(_0x35bb67(0xe2))/0x3)+-parseInt(_0x35bb67(0xbb))/0x4*(-parseInt(_0x35bb67(0xaf))/0x5)+-parseInt(_0x35bb67(0xc0))/0x6*(parseInt(_0x35bb67(0xd1))/0x7)+parseInt(_0x35bb67(0xa0))/0x8*(-parseInt(_0x35bb67(0xdc))/0x9)+parseInt(_0x35bb67(0xd3))/0xa+parseInt(_0x35bb67(0xa3))/0xb;if(_0x4d3abc===_0x1c7ca4)break;else _0x5cbc6e['push'](_0x5cbc6e['shift']());}catch(_0x29bd76){_0x5cbc6e['push'](_0x5cbc6e['shift']());}}}(a199_0x5353,0xbf351));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';function a199_0x2df9(_0x27247c,_0x189771){_0x27247c=_0x27247c-0x9e;const _0x535321=a199_0x5353();let _0x2df922=_0x535321[_0x27247c];return _0x2df922;}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a199_0x2e7449(0xc7),a199_0x2e7449(0xa1),a199_0x2e7449(0xc8)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),'../../../templates/custom-pages');export const pageCreate={'service':a199_0x2e7449(0xbe),'command':a199_0x2e7449(0xa6),'description':a199_0x2e7449(0xda),'risk':a199_0x2e7449(0xbc),'defaultOutputFormat':a199_0x2e7449(0xc3),'structuredErrors':!![],'rejectedFlags':[{'name':a199_0x2e7449(0xb9),'message':a199_0x2e7449(0xb7),'hint':a199_0x2e7449(0xd9)},{'name':a199_0x2e7449(0xcd),'message':a199_0x2e7449(0xe3),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':a199_0x2e7449(0xaa),'type':a199_0x2e7449(0xbf),'description':a199_0x2e7449(0xdd)},{'name':'parent-menu-id','type':a199_0x2e7449(0xc2),'description':a199_0x2e7449(0xa5)},{'name':a199_0x2e7449(0xd7),'type':a199_0x2e7449(0xbf),'description':a199_0x2e7449(0xc4),'enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0x2e7449(0xb2),'type':a199_0x2e7449(0xbf),'description':'Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0x129ae2){await readValidatedPageSource(_0x129ae2);},async 'dryRun'(_0x215e20){const _0x5ef9e5=a199_0x2e7449,_0x262a22=readInput(_0x215e20,await readValidatedPageSource(_0x215e20));return{'method':_0x5ef9e5(0xd4),'url':'/smartapi/webcode/page/create','body':{'appCode':_0x262a22[_0x5ef9e5(0xc6)],'pageName':_0x262a22['pageName'],..._0x262a22[_0x5ef9e5(0xbd)]!=null?{'parentMenuId':_0x262a22[_0x5ef9e5(0xbd)]}:{},'createMenu':_0x262a22[_0x5ef9e5(0xb4)],'codeContent':_0x262a22[_0x5ef9e5(0xd0)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x5ef9e5(0xa7)](_0x262a22[_0x5ef9e5(0xa8)])+'\x20and\x20its\x20menu\x20entry.'};},async 'execute'(_0x4724c2){const _0x1f09d5=a199_0x2e7449,_0x272007=readInput(_0x4724c2,await readValidatedPageSource(_0x4724c2)),_0x57d5c9=await createCustomPage(_0x272007);if(!Number[_0x1f09d5(0x9f)](_0x57d5c9[_0x1f09d5(0xdf)])||_0x57d5c9[_0x1f09d5(0xdf)]<=0x0)throw CliErrors[_0x1f09d5(0xc1)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x460646=buildCustomPageDevelopmentUrl(_0x272007[_0x1f09d5(0xc6)],_0x57d5c9[_0x1f09d5(0xad)]),_0x3ba32e=buildCustomPageEditUrl(_0x272007[_0x1f09d5(0xc6)],_0x57d5c9[_0x1f09d5(0xdf)]);return{'ok':!![],'data':{'operation':_0x1f09d5(0xab),'pageType':_0x1f09d5(0xa9),'pagePattern':readPagePattern(_0x4724c2),'selector':{'appCode':_0x272007[_0x1f09d5(0xc6)],'pageName':_0x272007['pageName']},'before':null,'after':{'pageId':_0x57d5c9[_0x1f09d5(0xdf)],'pageName':_0x57d5c9[_0x1f09d5(0xa8)],'appCode':_0x57d5c9[_0x1f09d5(0xc6)],'version':_0x57d5c9[_0x1f09d5(0xb3)],'menuId':_0x57d5c9[_0x1f09d5(0xb6)],'menuPath':_0x57d5c9[_0x1f09d5(0xad)],'files':_0x57d5c9[_0x1f09d5(0xd0)]??Object[_0x1f09d5(0xd6)](_0x272007[_0x1f09d5(0xd0)])},'dryRun':![],'request':_0x272007,..._0x460646?{'pageUrl':_0x460646}:{},..._0x3ba32e?{'editPageUrl':_0x3ba32e}:{},'warnings':_0x460646?[]:[_0x1f09d5(0xce)]},'message':_0x1f09d5(0xc5)+_0x57d5c9[_0x1f09d5(0xdf)]+'.'};}};function readPagePattern(_0x3a0db8){const _0x3edbea=a199_0x2e7449,_0x1cdb47=_0x3a0db8[_0x3edbea(0xb0)](_0x3edbea(0xd7))[_0x3edbea(0xae)](),_0x5bd082=_0x3a0db8['str']('page-dir')['trim']();if(_0x1cdb47&&_0x5bd082)throw CliErrors[_0x3edbea(0xa2)]('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x5bd082)return null;if(!_0x1cdb47)throw CliErrors[_0x3edbea(0xa2)](_0x3edbea(0xe1));if(!CUSTOM_PAGE_PATTERNS[_0x3edbea(0xba)](_0x1cdb47))throw CliErrors[_0x3edbea(0xa2)](_0x3edbea(0xb1));return _0x1cdb47;}async function readPageSource(_0x1d4f42){const _0x16826d=a199_0x2e7449,_0x2d0865=_0x1d4f42[_0x16826d(0xb0)](_0x16826d(0xb2))[_0x16826d(0xae)](),_0x4c00d4=readPagePattern(_0x1d4f42);if(_0x4c00d4===null){const _0x3cebb7=await readCustomPageDirectory(_0x2d0865);if(Object[_0x16826d(0xd6)](_0x3cebb7)[_0x16826d(0xd8)]===0x0)throw CliErrors[_0x16826d(0xa2)]('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x3cebb7;}let _0x280da1;try{_0x280da1=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x4c00d4[_0x16826d(0xc9)]()+_0x16826d(0xb8)),_0x16826d(0x9e));}catch{throw CliErrors['validation']('Custom\x20Page\x20pattern\x20not\x20found:\x20'+_0x4c00d4+'.');}let _0x135445;try{_0x135445=JSON[_0x16826d(0xd2)](_0x280da1);}catch{throw CliErrors[_0x16826d(0xa2)](_0x16826d(0xd5)+_0x4c00d4+'.');}if(!_0x135445||typeof _0x135445!==_0x16826d(0xcb)||Array['isArray'](_0x135445)||Object[_0x16826d(0xcf)](_0x135445)[_0x16826d(0xca)](_0x52d920=>typeof _0x52d920!=='string'))throw CliErrors['validation'](_0x16826d(0xd5)+_0x4c00d4+'.');return _0x135445;}async function readValidatedPageSource(_0x414ac4){const _0x3270a9=await readPageSource(_0x414ac4);return await validateCustomPageContent(_0x3270a9),_0x3270a9;}function readInput(_0x532a50,_0x30b57f){const _0x10c95f=a199_0x2e7449,_0x14bd20=_0x532a50[_0x10c95f(0xb0)](_0x10c95f(0xaa))['trim']()||_0x10c95f(0xa4)+Date[_0x10c95f(0xdb)]();if(_0x14bd20[_0x10c95f(0xd8)]>0x64)throw CliErrors[_0x10c95f(0xa2)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x293449=_0x532a50['num'](_0x10c95f(0xcc),NaN),_0x4a8dc8=!Number[_0x10c95f(0xac)](_0x293449);if(_0x4a8dc8&&(!Number['isInteger'](_0x293449)||_0x293449<=0x0))throw CliErrors[_0x10c95f(0xa2)](_0x10c95f(0xb5));return{'appCode':_0x532a50[_0x10c95f(0xc6)],'pageName':_0x14bd20,..._0x4a8dc8?{'parentMenuId':_0x293449}:{},'createMenu':!![],'files':_0x30b57f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a200_0x8ff035=a200_0x42b7;(function(_0x74f58e,_0x5ccd40){const _0x5d66d4=a200_0x42b7,_0x199fce=_0x74f58e();while(!![]){try{const _0x438fec=-parseInt(_0x5d66d4(0x76))/0x1*(-parseInt(_0x5d66d4(0x88))/0x2)+-parseInt(_0x5d66d4(0x77))/0x3*(-parseInt(_0x5d66d4(0x7c))/0x4)+-parseInt(_0x5d66d4(0x7f))/0x5+-parseInt(_0x5d66d4(0x82))/0x6+-parseInt(_0x5d66d4(0x7d))/0x7*(-parseInt(_0x5d66d4(0x7e))/0x8)+parseInt(_0x5d66d4(0x75))/0x9*(-parseInt(_0x5d66d4(0x7b))/0xa)+-parseInt(_0x5d66d4(0x8c))/0xb*(parseInt(_0x5d66d4(0x79))/0xc);if(_0x438fec===_0x5ccd40)break;else _0x199fce['push'](_0x199fce['shift']());}catch(_0x4f5979){_0x199fce['push'](_0x199fce['shift']());}}}(a200_0x179e,0x7d82b));function a200_0x42b7(_0x36f94a,_0x5cc2e4){_0x36f94a=_0x36f94a-0x73;const _0x179e8d=a200_0x179e();let _0x42b750=_0x179e8d[_0x36f94a];return _0x42b750;}import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a200_0x8ff035(0x74),'command':a200_0x8ff035(0x89),'description':a200_0x8ff035(0x81),'risk':a200_0x8ff035(0x7a),'defaultOutputFormat':a200_0x8ff035(0x83),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3d8947){readCustomPageId(_0x3d8947);},async 'execute'(_0x115a3d){const _0x49f722=a200_0x8ff035,_0x1afe53=readCustomPageId(_0x115a3d),_0x56a5d0=await getCustomPageSource(_0x1afe53),{bundle:_0x47b0fe,createTime:_0x28944c,updateTime:_0x13b5f2,..._0x36e282}=_0x56a5d0,_0x1b2a72=_0x56a5d0['id']??_0x1afe53,_0x121edc=_0x56a5d0[_0x49f722(0x8b)]?.['trim']()||_0x115a3d[_0x49f722(0x80)]('appcode')[_0x49f722(0x84)](),_0x330c1d=buildCustomPageRuntimeUrl(_0x121edc,_0x56a5d0[_0x49f722(0x8d)]),_0x23a2ed=buildCustomPageEditUrl(_0x121edc,_0x1b2a72),_0x2ec311=await resolveCustomPageDevelopmentUrl(_0x121edc,_0x1b2a72,_0x115a3d['cookie']);return{'ok':!![],'data':{..._0x36e282,..._0x330c1d?{'runtimePageUrl':_0x330c1d}:{},..._0x2ec311?{'pageUrl':_0x2ec311}:{},..._0x23a2ed?{'editPageUrl':_0x23a2ed}:{},..._0x28944c==null?{}:{'createTime':formatTime(_0x28944c)},..._0x13b5f2==null?{}:{'updateTime':formatTime(_0x13b5f2)}},'message':_0x49f722(0x78)+_0x1afe53+'.'};}};function formatTime(_0x37de1b){const _0x562f37=a200_0x8ff035,_0x2d4e7b=new Date(_0x37de1b);if(Number[_0x562f37(0x87)](_0x2d4e7b[_0x562f37(0x8a)]()))return String(_0x37de1b);const _0x4e7e88=[_0x2d4e7b[_0x562f37(0x8e)](),String(_0x2d4e7b['getMonth']()+0x1)[_0x562f37(0x85)](0x2,'0'),String(_0x2d4e7b[_0x562f37(0x86)]())[_0x562f37(0x85)](0x2,'0')][_0x562f37(0x73)]('-'),_0x5a642b=[String(_0x2d4e7b['getHours']())[_0x562f37(0x85)](0x2,'0'),String(_0x2d4e7b['getMinutes']())[_0x562f37(0x85)](0x2,'0'),String(_0x2d4e7b['getSeconds']())[_0x562f37(0x85)](0x2,'0')]['join'](':');return _0x4e7e88+'\x20'+_0x5a642b;}function a200_0x179e(){const _0x5436cb=['Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','618294FtMfQB','compress','trim','padStart','getDate','isNaN','194YPncYM','custom-detail','getTime','appCode','33Bfgwsw','pageCode','getFullYear','join','page','9ahpANg','10401hPvmRj','5862lqRAKS','Retrieved\x20Custom\x20Page\x20','2439672OIKcUu','read','2936030DYzkDi','124sDCKUb','5375482mBFITb','8MbnJXN','1583680sWlWLW','str'];a200_0x179e=function(){return _0x5436cb;};return a200_0x179e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a201_0x5cff(_0x2374c1,_0x5d371e){_0x2374c1=_0x2374c1-0xab;const _0x4a602f=a201_0x4a60();let _0x5cffc7=_0x4a602f[_0x2374c1];return _0x5cffc7;}const a201_0x3bf039=a201_0x5cff;(function(_0x559ba9,_0x546006){const _0x3888b6=a201_0x5cff,_0x86c151=_0x559ba9();while(!![]){try{const _0x33ffdd=parseInt(_0x3888b6(0xc3))/0x1*(parseInt(_0x3888b6(0xac))/0x2)+parseInt(_0x3888b6(0xc1))/0x3*(parseInt(_0x3888b6(0xb0))/0x4)+parseInt(_0x3888b6(0xaf))/0x5*(parseInt(_0x3888b6(0xb3))/0x6)+parseInt(_0x3888b6(0xbd))/0x7*(-parseInt(_0x3888b6(0xc4))/0x8)+parseInt(_0x3888b6(0xc0))/0x9+-parseInt(_0x3888b6(0xbf))/0xa+-parseInt(_0x3888b6(0xbb))/0xb*(parseInt(_0x3888b6(0xb2))/0xc);if(_0x33ffdd===_0x546006)break;else _0x86c151['push'](_0x86c151['shift']());}catch(_0x468fcc){_0x86c151['push'](_0x86c151['shift']());}}}(a201_0x4a60,0x89262));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';function a201_0x4a60(){const _0x2c6962=['flatMap','6467UkRrCe','8ySzqRG','length','88cTtTMm','Found\x20','pageId','706165GmFqQH','1796wKiLaH','menus','1239900rjMfmp','42xAAEyX','custom-list','compress','\x20Custom\x20Page(s).','path','appCode','read','type','55MLMMgS','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','4632922TPreNR','page','2250680uwWDJu','563616TEewgd','4206scHYuF'];a201_0x4a60=function(){return _0x2c6962;};return a201_0x4a60();}export const pageCustomList={'service':a201_0x3bf039(0xbe),'command':a201_0x3bf039(0xb4),'description':a201_0x3bf039(0xbc),'risk':a201_0x3bf039(0xb9),'defaultOutputFormat':a201_0x3bf039(0xb5),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x54755a){const _0x2a2478=a201_0x3bf039,_0x46b9d2=(await fetchMenuSnapshot(_0x54755a[_0x2a2478(0xb8)],_0x54755a['cookie']))[_0x2a2478(0xb1)][_0x2a2478(0xc2)](_0x47baa9=>{const _0x27c85b=_0x2a2478;if(_0x47baa9[_0x27c85b(0xba)]!=='react'||_0x47baa9[_0x27c85b(0xae)]==null)return[];const _0x308702=buildCustomPageDevelopmentUrl(_0x54755a[_0x27c85b(0xb8)],_0x47baa9[_0x27c85b(0xb7)]),_0x150084=buildCustomPageRuntimeUrl(_0x54755a[_0x27c85b(0xb8)],_0x47baa9[_0x27c85b(0xb7)]),_0x888843=buildCustomPageEditUrl(_0x54755a['appCode'],_0x47baa9[_0x27c85b(0xae)]);return[{'pageId':_0x47baa9[_0x27c85b(0xae)],'label':_0x47baa9['label'],'path':_0x47baa9[_0x27c85b(0xb7)],..._0x308702?{'pageUrl':_0x308702}:{},..._0x150084?{'runtimePageUrl':_0x150084}:{},..._0x888843?{'editPageUrl':_0x888843}:{}}];});return{'ok':!![],'data':{'pages':_0x46b9d2},'message':_0x46b9d2[_0x2a2478(0xab)]===0x0?'No\x20Custom\x20Pages\x20found.':_0x2a2478(0xad)+_0x46b9d2[_0x2a2478(0xab)]+_0x2a2478(0xb6)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a202_0x268de7=a202_0x2a32;(function(_0x333929,_0x514fdc){const _0x427b7b=a202_0x2a32,_0x1f98eb=_0x333929();while(!![]){try{const _0x32494b=parseInt(_0x427b7b(0xa9))/0x1*(parseInt(_0x427b7b(0xc3))/0x2)+parseInt(_0x427b7b(0xa3))/0x3*(-parseInt(_0x427b7b(0xb1))/0x4)+parseInt(_0x427b7b(0xb0))/0x5+parseInt(_0x427b7b(0xc6))/0x6+parseInt(_0x427b7b(0xc0))/0x7+parseInt(_0x427b7b(0xb6))/0x8*(-parseInt(_0x427b7b(0xa4))/0x9)+-parseInt(_0x427b7b(0xb3))/0xa;if(_0x32494b===_0x514fdc)break;else _0x1f98eb['push'](_0x1f98eb['shift']());}catch(_0x201a28){_0x1f98eb['push'](_0x1f98eb['shift']());}}}(a202_0x444f,0x5f188));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';function a202_0x444f(){const _0x5dbaf3=['unknown','trim','2939517FgJlVl','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','str','385346EqJKzL','pageId','write','2662668QpqkDO','status','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','568059lMnURe','1647pBuqsC','pageCode','push','Custom\x20Page\x20ID','apiError','3jsMGyM','string','Would\x20publish\x20Custom\x20Page\x20','POST','isInteger','compress','remark','3055095WNWxUX','8nEbUnR','page','12014470gEAvHq','custom-publish','Optional\x20publish\x20remark','3632QtlAfs','warnings','number','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','/smartapi/webcode/file/publish','FORMAL','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','Published\x20Custom\x20Page\x20'];a202_0x444f=function(){return _0x5dbaf3;};return a202_0x444f();}function a202_0x2a32(_0x56eef6,_0x374212){_0x56eef6=_0x56eef6-0xa1;const _0x444fb0=a202_0x444f();let _0x2a32e3=_0x444fb0[_0x56eef6];return _0x2a32e3;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a202_0x268de7(0xb2),'command':a202_0x268de7(0xb4),'description':a202_0x268de7(0xa2),'risk':a202_0x268de7(0xc5),'defaultOutputFormat':a202_0x268de7(0xae),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a202_0x268de7(0xb8),'required':!![],'description':a202_0x268de7(0xa7)},{'name':'remark','type':a202_0x268de7(0xaa),'description':a202_0x268de7(0xb5)}],async 'validate'(_0x15d1c1){readCustomPageId(_0x15d1c1);},async 'dryRun'(_0x408b46){const _0xb7064d=a202_0x268de7,_0x3b286f=readInput(_0x408b46);return{'method':_0xb7064d(0xac),'url':_0xb7064d(0xba),'body':{'id':_0x3b286f[_0xb7064d(0xc4)],..._0x3b286f['remark']?{'remark':_0x3b286f[_0xb7064d(0xaf)]}:{}},'description':_0xb7064d(0xab)+_0x3b286f[_0xb7064d(0xc4)]+'.'};},async 'execute'(_0x1fe22e){const _0x5ac63f=a202_0x268de7,_0x30862f=readInput(_0x1fe22e);await getCustomPageSource(_0x30862f['pageId']);const _0x1b7652=await publishCustomPage(_0x30862f);if(!Number[_0x5ac63f(0xad)](_0x1b7652)||_0x1b7652!==_0x30862f['pageId'])throw CliErrors[_0x5ac63f(0xa8)](_0x5ac63f(0xbc));const _0x10c0e3=await getCustomPageSource(_0x30862f[_0x5ac63f(0xc4)]);if(_0x10c0e3['status']!==_0x5ac63f(0xbb))throw CliErrors['apiError']('Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x10c0e3[_0x5ac63f(0xa1)]??_0x5ac63f(0xbe))+'.');const _0x3b987b=_0x10c0e3['appCode']?.[_0x5ac63f(0xbf)](),_0x3f1ae9=buildCustomPageEditUrl(_0x3b987b,_0x30862f[_0x5ac63f(0xc4)]),_0x46e437=await resolveCustomPageDevelopmentUrl(_0x3b987b,_0x30862f[_0x5ac63f(0xc4)],_0x1fe22e['cookie']),_0x356e9e=buildMutationData(_0x30862f,!![],_0x46e437,_0x3f1ae9);_0x3b987b&&!_0x46e437&&_0x356e9e[_0x5ac63f(0xb7)]['push'](_0x5ac63f(0xb9));const _0x363fd0=buildCustomPageRuntimeUrl(_0x10c0e3['appCode'],_0x10c0e3[_0x5ac63f(0xa5)]);return _0x363fd0?_0x356e9e['runtimePageUrl']=_0x363fd0:_0x356e9e['warnings'][_0x5ac63f(0xa6)](_0x5ac63f(0xc1)),{'ok':!![],'data':_0x356e9e,'message':_0x5ac63f(0xbd)+_0x30862f[_0x5ac63f(0xc4)]+'.'};}};function readInput(_0xf7386){const _0x3cba80=a202_0x268de7,_0x2f9d68=readCustomPageId(_0xf7386),_0x2b17b5=_0xf7386[_0x3cba80(0xc2)]('remark')[_0x3cba80(0xbf)]();return{'pageId':_0x2f9d68,..._0x2b17b5?{'remark':_0x2b17b5}:{}};}function buildMutationData(_0x3b7033,_0x3abe3c=![],_0x593e93,_0x455f15){const _0x399303=a202_0x268de7;return{'operation':'page.custom-publish','selector':{'pageId':_0x3b7033[_0x399303(0xc4)]},'before':null,'after':{'pageId':_0x3b7033[_0x399303(0xc4)],'status':_0x399303(0xbb)},'dryRun':!_0x3abe3c,'request':_0x3b7033,..._0x593e93?{'pageUrl':_0x593e93}:{},..._0x455f15?{'editPageUrl':_0x455f15}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3027ad,_0x26e5be){const _0x49d81e=a203_0x256e,_0x6d0c08=_0x3027ad();while(!![]){try{const _0x8c36c7=parseInt(_0x49d81e(0x1d6))/0x1*(-parseInt(_0x49d81e(0x1d5))/0x2)+parseInt(_0x49d81e(0x1e0))/0x3*(parseInt(_0x49d81e(0x1eb))/0x4)+parseInt(_0x49d81e(0x1e1))/0x5*(-parseInt(_0x49d81e(0x1d4))/0x6)+parseInt(_0x49d81e(0x1ed))/0x7+-parseInt(_0x49d81e(0x1dc))/0x8+-parseInt(_0x49d81e(0x1e4))/0x9+parseInt(_0x49d81e(0x1e7))/0xa*(parseInt(_0x49d81e(0x1e8))/0xb);if(_0x8c36c7===_0x26e5be)break;else _0x6d0c08['push'](_0x6d0c08['shift']());}catch(_0x493abe){_0x6d0c08['push'](_0x6d0c08['shift']());}}}(a203_0x2152,0x434a3));function a203_0x256e(_0x1675cb,_0x5c6427){_0x1675cb=_0x1675cb-0x1d4;const _0x2152d3=a203_0x2152();let _0x256eda=_0x2152d3[_0x1675cb];return _0x256eda;}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(_0x2d8644){return _0x2d8644?.['trim']()||undefined;}export function buildCustomPageRuntimeUrl(_0x39ae4e,_0x170169){const _0x99a683=trimOptional(_0x39ae4e),_0x2261a0=trimOptional(_0x170169);if(!_0x99a683||!_0x2261a0)return undefined;return getPublishedAppDomain(_0x99a683)+'/'+encodeURIComponent(_0x2261a0);}export function buildCustomPageDevelopmentUrl(_0x552269,_0x1b0db8){const _0x1c4d2a=a203_0x256e,_0x4c5718=trimOptional(_0x552269),_0x4c97fb=trimOptional(_0x1b0db8);if(!_0x4c5718||!_0x4c97fb)return undefined;return getAppBaseUrl(_0x4c5718)+_0x1c4d2a(0x1e3)+encodeURIComponent(_0x4c97fb);}export async function resolveCustomPageDevelopmentUrl(_0x5af835,_0x1f1501,_0x2c9ca8){const _0x3a30a4=a203_0x256e,_0x408f67=trimOptional(_0x5af835);if(!_0x408f67)return undefined;try{const _0xc265a3=(await fetchMenuSnapshot(_0x408f67,_0x2c9ca8))[_0x3a30a4(0x1df)][_0x3a30a4(0x1de)](_0x2be10a=>_0x2be10a[_0x3a30a4(0x1ea)]===_0x3a30a4(0x1db)&&_0x2be10a[_0x3a30a4(0x1e9)]===_0x1f1501);return buildCustomPageDevelopmentUrl(_0x408f67,_0xc265a3?.[_0x3a30a4(0x1d7)]);}catch{return undefined;}}function a203_0x2152(){const _0x144d20=['path','join','map','Invalid\x20Custom\x20Page\x20content:\x20','react','684664DEAoXJ','--id\x20must\x20be\x20a\x20positive\x20integer.','find','menus','15nPDYKH','15miGNWc','length','/pages/','1717632NzCLhI','num','isInteger','20dAPLQf','3598463FhCeqh','pageId','type','112144ouTuLE','/ide/','3709265wfpRoI','859968WgOLwB','14MXTyWh','48901rwAHDO'];a203_0x2152=function(){return _0x144d20;};return a203_0x2152();}export function buildCustomPageEditUrl(_0x3daadf,_0x49b058){const _0x5e6e9b=a203_0x256e,_0x326bd9=trimOptional(_0x3daadf);if(!_0x326bd9)return;const _0x1dc2b5=trimOptional(String(_0x49b058??''));if(!_0x1dc2b5)return;return getAppBaseUrl(_0x326bd9)+_0x5e6e9b(0x1ec)+encodeURIComponent(_0x1dc2b5);}export async function validateCustomPageContent(_0x4c696b){const _0x2e1ac8=a203_0x256e,_0x220aee=await validateCustomPageSourceFiles(_0x4c696b);if(_0x220aee[_0x2e1ac8(0x1e2)]>0x0)throw CliErrors['validation'](_0x2e1ac8(0x1da)+_0x220aee[_0x2e1ac8(0x1d9)](_0x593873=>_0x593873['file']+':\x20'+_0x593873['message'])[_0x2e1ac8(0x1d8)](';\x20'));}export function readCustomPageId(_0x46deed){const _0x490ee0=a203_0x256e,_0x3218cd=_0x46deed[_0x490ee0(0x1e5)]('id');if(!Number[_0x490ee0(0x1e6)](_0x3218cd)||_0x3218cd<=0x0)throw CliErrors['validation'](_0x490ee0(0x1dd));return _0x3218cd;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a204_0x59b06d=a204_0x1edd;(function(_0x4fd359,_0x33e91c){const _0x4d9dc3=a204_0x1edd,_0x1d8e81=_0x4fd359();while(!![]){try{const _0x4993c2=-parseInt(_0x4d9dc3(0x164))/0x1+parseInt(_0x4d9dc3(0x165))/0x2*(-parseInt(_0x4d9dc3(0x154))/0x3)+parseInt(_0x4d9dc3(0x158))/0x4+parseInt(_0x4d9dc3(0x151))/0x5+-parseInt(_0x4d9dc3(0x168))/0x6*(-parseInt(_0x4d9dc3(0x155))/0x7)+-parseInt(_0x4d9dc3(0x159))/0x8+-parseInt(_0x4d9dc3(0x161))/0x9*(parseInt(_0x4d9dc3(0x166))/0xa);if(_0x4993c2===_0x33e91c)break;else _0x1d8e81['push'](_0x1d8e81['shift']());}catch(_0x494adc){_0x1d8e81['push'](_0x1d8e81['shift']());}}}(a204_0x3581,0x46afc));import{format}from'prettier';function a204_0x1edd(_0x5f1af9,_0xe31674){_0x5f1af9=_0x5f1af9-0x151;const _0x358171=a204_0x3581();let _0x1edd72=_0x358171[_0x5f1af9];return _0x1edd72;}const SOURCE_PARSERS={'.js':a204_0x59b06d(0x15c),'.jsx':'babel','.ts':a204_0x59b06d(0x15e),'.tsx':a204_0x59b06d(0x15e)},CUSTOM_PAGE_EXTENSIONS=[a204_0x59b06d(0x157),a204_0x59b06d(0x15b)];export async function validateCustomPageSourceFiles(_0x1aa2a9){const _0x284f02=a204_0x59b06d,_0x3f8d13=Object['entries'](_0x1aa2a9)[_0x284f02(0x160)](([_0x16fd30])=>getParser(_0x16fd30));if(!_0x3f8d13['some'](([_0x24fe18])=>isReactSourceFile(_0x24fe18)))return[{'file':_0x284f02(0x167),'message':_0x284f02(0x162)}];const _0x4e5bc7=await Promise[_0x284f02(0x163)](_0x3f8d13[_0x284f02(0x15d)](async([_0x568cd4,_0x52fb99])=>{try{return await format(_0x52fb99,{'parser':getParser(_0x568cd4)}),undefined;}catch(_0x2f925a){return{'file':_0x568cd4,'message':_0x2f925a instanceof Error?_0x2f925a['message']:String(_0x2f925a)};}}));return _0x4e5bc7[_0x284f02(0x160)](_0x5e07eb=>_0x5e07eb!==undefined);}function a204_0x3581(){const _0x3d1a1d=['toLowerCase','trim','6wUBjlb','182iaOrQQ','endsWith','.jsx','1125964EwqWPT','716264nKlADz','entries','.tsx','babel','map','typescript','find','filter','644490CADbIK','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','all','248652UEraid','132818ekymCR','10umcDTH','page\x20files','54756DOYMNH','1566890SLzbBB'];a204_0x3581=function(){return _0x3d1a1d;};return a204_0x3581();}function getParser(_0x22cb41){const _0x5b02db=a204_0x59b06d,_0x4b9667=_0x22cb41['trim']()[_0x5b02db(0x152)]();return Object[_0x5b02db(0x15a)](SOURCE_PARSERS)[_0x5b02db(0x15f)](([_0x2623be])=>_0x4b9667['endsWith'](_0x2623be))?.[0x1];}function isReactSourceFile(_0x66b04){const _0x237eec=a204_0x59b06d,_0x2a5c54=_0x66b04[_0x237eec(0x153)]()[_0x237eec(0x152)]();return CUSTOM_PAGE_EXTENSIONS['some'](_0x2fc99a=>_0x2a5c54[_0x237eec(0x156)](_0x2fc99a));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a205_0x1075a7=a205_0x5237;function a205_0x12cd(){const _0x1d4cc9=['pageId','string','Custom\x20Page\x20ID','page','trim','119qUIkOa','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','Updated\x20Custom\x20Page\x20','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','13510431JUzKwd','571944dXPewJ','441830gJasBL','426856LQxvmp','12GWuhgU','824111CJbUfg','page-dir','appCode','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','16fgpXGp','number','/smartapi/webcode/page/update/content','pageContent','validation','compress','str','Directory\x20containing\x20all\x20complete\x20page\x20files','751362opXnln','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','80GRMXxO','appcode','isInteger','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','cookie','2050806QNmNXy','newVersion','117dyidVi','page.custom-update'];a205_0x12cd=function(){return _0x1d4cc9;};return a205_0x12cd();}(function(_0x20afaf,_0x2768cd){const _0x23881f=a205_0x5237,_0x29e229=_0x20afaf();while(!![]){try{const _0x700ed9=parseInt(_0x23881f(0xcf))/0x1+-parseInt(_0x23881f(0xbc))/0x2+-parseInt(_0x23881f(0xb4))/0x3*(-parseInt(_0x23881f(0xac))/0x4)+-parseInt(_0x23881f(0xb6))/0x5*(-parseInt(_0x23881f(0xcb))/0x6)+-parseInt(_0x23881f(0xc5))/0x7*(parseInt(_0x23881f(0xcd))/0x8)+parseInt(_0x23881f(0xbe))/0x9*(parseInt(_0x23881f(0xcc))/0xa)+parseInt(_0x23881f(0xca))/0xb*(-parseInt(_0x23881f(0xce))/0xc);if(_0x700ed9===_0x2768cd)break;else _0x29e229['push'](_0x29e229['shift']());}catch(_0x5edeb1){_0x29e229['push'](_0x29e229['shift']());}}}(a205_0x12cd,0xbab7d));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';function a205_0x5237(_0x1f23fb,_0x39d414){_0x1f23fb=_0x1f23fb-0xa9;const _0x12cd36=a205_0x12cd();let _0x5237aa=_0x12cd36[_0x1f23fb];return _0x5237aa;}import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a205_0x1075a7(0xc3),'command':'custom-update','description':a205_0x1075a7(0xc6),'risk':'write','defaultOutputFormat':a205_0x1075a7(0xb1),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':'page-content','message':a205_0x1075a7(0xc9),'hint':a205_0x1075a7(0xc8)}],'flags':[{'name':'id','type':a205_0x1075a7(0xad),'required':!![],'description':a205_0x1075a7(0xc2)},{'name':a205_0x1075a7(0xa9),'type':a205_0x1075a7(0xc1),'required':!![],'description':a205_0x1075a7(0xb3)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x21df18){readCustomPageId(_0x21df18),await readValidatedPageContent(_0x21df18);},async 'dryRun'(_0x4f3d36){const _0x242ea9=a205_0x1075a7,_0x113972=await readInput(_0x4f3d36);return{'method':'POST','url':_0x242ea9(0xae),'body':{'id':_0x113972[_0x242ea9(0xc0)],'codeContent':_0x113972[_0x242ea9(0xaf)]},'description':_0x242ea9(0xb5)+_0x113972[_0x242ea9(0xc0)]+'.'};},async 'execute'(_0x436e82){const _0x5e5962=a205_0x1075a7,_0x129a7f=await readInput(_0x436e82),_0x8df095=await updateCustomPageContent({'pageId':_0x129a7f['pageId'],'pageContent':_0x129a7f['pageContent']});if(!Number[_0x5e5962(0xb8)](_0x8df095[_0x5e5962(0xbd)])||_0x8df095[_0x5e5962(0xbd)]<=0x0)throw CliErrors['apiError'](_0x5e5962(0xba));const _0x1a9b33=buildCustomPageEditUrl(_0x129a7f[_0x5e5962(0xaa)],_0x129a7f[_0x5e5962(0xc0)]),_0x4a6f76=await resolveCustomPageDevelopmentUrl(_0x129a7f['appCode'],_0x129a7f['pageId'],_0x436e82[_0x5e5962(0xbb)]);return{'ok':!![],'data':{'operation':_0x5e5962(0xbf),'selector':{'appCode':_0x129a7f[_0x5e5962(0xaa)],'pageId':_0x129a7f['pageId']},'before':null,'after':{'pageId':_0x8df095[_0x5e5962(0xc0)],'version':_0x8df095[_0x5e5962(0xbd)],'pageContent':_0x129a7f[_0x5e5962(0xaf)]},'dryRun':![],'request':_0x129a7f,..._0x4a6f76?{'pageUrl':_0x4a6f76}:{},..._0x1a9b33?{'editPageUrl':_0x1a9b33}:{},'warnings':_0x4a6f76?[]:[_0x5e5962(0xb9)]},'message':_0x5e5962(0xc7)+_0x129a7f['pageId']+'.'};}};async function readInput(_0x530dde){const _0x51eda3=a205_0x1075a7,_0x501fb5=readCustomPageId(_0x530dde),_0x206f63=_0x530dde['str'](_0x51eda3(0xb7))[_0x51eda3(0xc4)]()||(await getCustomPageSource(_0x501fb5))[_0x51eda3(0xaa)]?.[_0x51eda3(0xc4)]();if(!_0x206f63)throw CliErrors[_0x51eda3(0xb0)](_0x51eda3(0xab)+_0x501fb5+'.');return{'appCode':_0x206f63,'pageId':_0x501fb5,'pageContent':await readValidatedPageContent(_0x530dde)};}async function readValidatedPageContent(_0x5cd142){const _0x4ed3d3=a205_0x1075a7,_0x2e49a2=await readCustomPageDirectory(_0x5cd142[_0x4ed3d3(0xb2)]('page-dir'));return await validateCustomPageContent(_0x2e49a2),_0x2e49a2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a206_0x59c6(){const _0x11941c=['manualResolutionRequired','GET','3972572uOtLVp','length','14861Eyxmeo','related-pages-fallback','/smartapi/lovrabet/dataset/','page','nextAction','1625991ygetHS','compress','4NzADIV','2797788vYNCpB','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','10046052rpSpYb','3608QamgjD','data-list-status','/standard-page-status?appCode=','relatedPages','string','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','status','1943875cmOCxa','code','appCode','54962xBqIhT','source','name','query-data-list-status'];a206_0x59c6=function(){return _0x11941c;};return a206_0x59c6();}const a206_0xbc4550=a206_0x2fb4;(function(_0x57a6e2,_0x42b19b){const _0x12d3c2=a206_0x2fb4,_0x5286fb=_0x57a6e2();while(!![]){try{const _0x51f150=-parseInt(_0x12d3c2(0x1f8))/0x1*(-parseInt(_0x12d3c2(0x1ea))/0x2)+parseInt(_0x12d3c2(0x1e8))/0x3+parseInt(_0x12d3c2(0x1e1))/0x4+-parseInt(_0x12d3c2(0x1f5))/0x5+-parseInt(_0x12d3c2(0x1eb))/0x6+-parseInt(_0x12d3c2(0x1e3))/0x7*(-parseInt(_0x12d3c2(0x1ee))/0x8)+-parseInt(_0x12d3c2(0x1ed))/0x9;if(_0x51f150===_0x42b19b)break;else _0x5286fb['push'](_0x5286fb['shift']());}catch(_0x3ac581){_0x5286fb['push'](_0x5286fb['shift']());}}}(a206_0x59c6,0x9a1c4));function a206_0x2fb4(_0x3195c2,_0x38e4d9){_0x3195c2=_0x3195c2-0x1e1;const _0x59c629=a206_0x59c6();let _0x2fb4ea=_0x59c629[_0x3195c2];return _0x2fb4ea;}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_0xbc4550(0x1e6),'command':a206_0xbc4550(0x1ef),'description':a206_0xbc4550(0x1ec),'risk':'read','defaultOutputFormat':a206_0xbc4550(0x1e9),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a206_0xbc4550(0x1f2),'description':a206_0xbc4550(0x1f3)}],async 'validate'(_0x4aab6e){validateDatasetSelector(_0x4aab6e);},async 'dryRun'(_0x468da4){const _0x356993=a206_0xbc4550,_0x1b0497=await loadDatasetDetailForPage(_0x468da4);return{'method':_0x356993(0x1fd),'url':_0x356993(0x1e5)+_0x1b0497['code']+_0x356993(0x1f0)+encodeURIComponent(_0x468da4[_0x356993(0x1f7)]),'description':serializeDryRunDescription({'dataset':{'id':_0x1b0497['id'],'code':_0x1b0497[_0x356993(0x1f6)],'name':_0x1b0497[_0x356993(0x1fa)]},'action':_0x356993(0x1fb)})};},async 'execute'(_0x1ee495){const _0x12f2c4=a206_0xbc4550,_0x1ad47a=await loadDatasetDetailForPage(_0x1ee495),_0x4232fa=await loadDataListPageStatusForGenerate(_0x1ee495,_0x1ad47a['code']),_0xb94ee2=getUndeletedRelatedPages(_0x1ad47a),_0x361d9d=assessDataListPageState(_0x1ad47a[_0x12f2c4(0x1f6)],_0x4232fa,{'fallbackUndeletedPages':_0xb94ee2});return{'ok':!![],'data':{'datasetCode':_0x1ad47a[_0x12f2c4(0x1f6)],'precheckSource':_0x4232fa?.[_0x12f2c4(0x1f9)]??_0x12f2c4(0x1e4),'status':_0x361d9d[_0x12f2c4(0x1f4)],'manualResolutionRequired':_0x361d9d[_0x12f2c4(0x1fc)],'nextAction':_0x361d9d[_0x12f2c4(0x1e7)],'dataListPageStatus':_0x4232fa,'relatedPages':{'total':_0x1ad47a[_0x12f2c4(0x1f1)][_0x12f2c4(0x1e2)],'undeletedCount':_0xb94ee2[_0x12f2c4(0x1e2)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a207_0x1993cc=a207_0x9819;function a207_0x1e4e(){const _0x2ce912=['page-pattern','manualResolutionRequired','source','8pBLlzS','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','Reusing\x20an\x20existing\x20generate\x20task','172bJJcZs','dryRun','PARTIAL_SUCCESS','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','apply','dataListPageStatus','number','nextAction','page','status','string','dataset','compress','name','appCode','message','527180AXaWUq','allowGenerate','1983MwxmuX','clientOperationId','7zoeMBF','1272132nAanLh','taskId','page-type','152746edrCpa','reused','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','code','DATA_LIST','progressRate','6XQNSDG','related-pages-fallback','7058cXVvbe','60moExBK','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','fieldCount','boolean','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','SUCCESS','CRUD_PAGE_SET','1327242CIDcEQ','468306vlpzrn','precheck','write','generate-start'];a207_0x1e4e=function(){return _0x2ce912;};return a207_0x1e4e();}function a207_0x9819(_0x3962a4,_0x22b08f){_0x3962a4=_0x3962a4-0x197;const _0x1e4e90=a207_0x1e4e();let _0x9819a=_0x1e4e90[_0x3962a4];return _0x9819a;}(function(_0x490bb7,_0x498633){const _0x5e8729=a207_0x9819,_0x1b6832=_0x490bb7();while(!![]){try{const _0x329681=parseInt(_0x5e8729(0x1a0))/0x1*(-parseInt(_0x5e8729(0x1ac))/0x2)+-parseInt(_0x5e8729(0x19e))/0x3*(parseInt(_0x5e8729(0x1c0))/0x4)+parseInt(_0x5e8729(0x19c))/0x5+parseInt(_0x5e8729(0x1aa))/0x6*(parseInt(_0x5e8729(0x1b4))/0x7)+-parseInt(_0x5e8729(0x1bc))/0x8*(-parseInt(_0x5e8729(0x1b5))/0x9)+parseInt(_0x5e8729(0x1ad))/0xa*(-parseInt(_0x5e8729(0x1a4))/0xb)+-parseInt(_0x5e8729(0x1a1))/0xc;if(_0x329681===_0x498633)break;else _0x1b6832['push'](_0x1b6832['shift']());}catch(_0x3c068b){_0x1b6832['push'](_0x1b6832['shift']());}}}(a207_0x1e4e,0x198af));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';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_0x1993cc(0x1c8),'command':'generate-start','description':'Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':a207_0x1993cc(0x1b7),'defaultOutputFormat':a207_0x1993cc(0x198),'rejectedFlags':[{'name':a207_0x1993cc(0x1a3),'message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','hint':a207_0x1993cc(0x1c3)},{'name':a207_0x1993cc(0x1b9),'message':a207_0x1993cc(0x1ae),'hint':a207_0x1993cc(0x1be)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a207_0x1993cc(0x1ca),'description':a207_0x1993cc(0x1bd)},{'name':a207_0x1993cc(0x1c4),'type':a207_0x1993cc(0x1b0),'description':a207_0x1993cc(0x1b1)}],async 'validate'(_0x4c2f83){validateDatasetSelector(_0x4c2f83);},async 'dryRun'(_0x3794e3){const _0x3f208d=a207_0x1993cc,_0x25aa63=await prepare(_0x3794e3);return{'method':'POST','url':'/smartapi/lovrabet/dataset/'+_0x25aa63['dataset'][_0x3f208d(0x1a7)]+'/generate-standard-pages/start','body':{'appCode':_0x3794e3['appCode'],'clientOperationId':_0x25aa63[_0x3f208d(0x19f)]},'description':serializeDryRunDescription({'dataset':{'id':_0x25aa63['dataset']['id'],'code':_0x25aa63[_0x3f208d(0x197)][_0x3f208d(0x1a7)],'name':_0x25aa63[_0x3f208d(0x197)][_0x3f208d(0x199)],'fieldCount':_0x25aa63[_0x3f208d(0x197)][_0x3f208d(0x1af)]},'precheckSource':_0x25aa63['dataListPageStatus']?.[_0x3f208d(0x1bb)]??_0x3f208d(0x1ab),'action':_0x3f208d(0x1b8),'clientOperationId':_0x25aa63[_0x3f208d(0x19f)],'plannedStatus':_0x25aa63[_0x3f208d(0x1b6)]['status'],'reason':_0x25aa63['precheck']['message']})};},async 'execute'(_0x62cc29){const _0x538a8d=a207_0x1993cc;if(!_0x62cc29['bool']('apply')){const _0x2ee062=await pageGenerateStart[_0x538a8d(0x1c1)](_0x62cc29);return{'ok':!![],'message':_0x538a8d(0x1a6),'data':_0x2ee062};}const _0x5c5cac=await prepare(_0x62cc29);if(!_0x5c5cac['precheck'][_0x538a8d(0x19d)])return{'ok':![],'message':_0x5c5cac['precheck'][_0x538a8d(0x19b)],'data':{'datasetCode':_0x5c5cac[_0x538a8d(0x197)]['code'],'pageType':_0x538a8d(0x1a8),'pagePattern':_0x538a8d(0x1b3),'clientOperationId':_0x5c5cac[_0x538a8d(0x19f)],'precheckSource':_0x5c5cac[_0x538a8d(0x1c5)]?.['source']??'related-pages-fallback','status':_0x5c5cac['precheck'][_0x538a8d(0x1c9)],'manualResolutionRequired':_0x5c5cac[_0x538a8d(0x1b6)]['manualResolutionRequired'],'nextAction':_0x5c5cac[_0x538a8d(0x1b6)][_0x538a8d(0x1c7)],'query':{'command':buildDataListPageStatusQueryCommand(_0x5c5cac[_0x538a8d(0x197)][_0x538a8d(0x1a7)],_0x62cc29[_0x538a8d(0x19a)])},'dataListPageStatus':_0x5c5cac[_0x538a8d(0x1c5)]}};const _0x54f00e=await startGenerateDataListPages(_0x62cc29[_0x538a8d(0x19a)],_0x5c5cac[_0x538a8d(0x197)][_0x538a8d(0x1a7)],{'clientOperationId':_0x5c5cac[_0x538a8d(0x19f)]}),_0x342800=_0x54f00e[_0x538a8d(0x1c9)]===_0x538a8d(0x1b2)||_0x54f00e[_0x538a8d(0x1c9)]===_0x538a8d(0x1c2)?await loadDataListPageStatusForGenerate(_0x62cc29,_0x5c5cac[_0x538a8d(0x197)][_0x538a8d(0x1a7)]):null,_0x439fe4=assessGenerateOperationState(_0x5c5cac[_0x538a8d(0x197)]['code'],_0x54f00e[_0x538a8d(0x1c9)],_0x342800);return{'ok':!![],'message':_0x54f00e[_0x538a8d(0x1a5)]?_0x538a8d(0x1bf):'Submitted\x20a\x20generate\x20task','data':{'datasetCode':_0x5c5cac[_0x538a8d(0x197)][_0x538a8d(0x1a7)],'appCode':_0x62cc29['appCode'],'pageType':'DATA_LIST','pagePattern':_0x538a8d(0x1b3),'taskId':_0x54f00e[_0x538a8d(0x1a2)]??null,'operationId':_0x54f00e['operationId']??null,'clientOperationId':_0x5c5cac[_0x538a8d(0x19f)],'jobStatus':_0x54f00e[_0x538a8d(0x1c9)]??null,'progressRate':typeof _0x54f00e[_0x538a8d(0x1a9)]===_0x538a8d(0x1c6)?_0x54f00e['progressRate']:null,'currentStep':_0x54f00e['currentStep']??null,'reused':_0x54f00e['reused']===!![],'status':_0x439fe4[_0x538a8d(0x1c9)],'manualResolutionRequired':_0x439fe4[_0x538a8d(0x1ba)],'nextAction':_0x439fe4['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x5c5cac['dataset'][_0x538a8d(0x1a7)],{'appCode':_0x62cc29[_0x538a8d(0x19a)],'taskId':_0x54f00e[_0x538a8d(0x1a2)],'operationId':_0x54f00e['operationId'],'clientOperationId':_0x5c5cac[_0x538a8d(0x19f)]})},'dataListPageStatus':_0x342800}};}};async function prepare(_0x3e4505){const _0x56cf36=a207_0x1993cc,_0x19b989=await loadDatasetDetailForPage(_0x3e4505),_0x256d42=await loadDataListPageStatusForGenerate(_0x3e4505,_0x19b989[_0x56cf36(0x1a7)]),_0x1a7b22=getUndeletedRelatedPages(_0x19b989);return{'dataset':_0x19b989,'dataListPageStatus':_0x256d42,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x19b989[_0x56cf36(0x1a7)],_0x256d42,{'fallbackUndeletedPages':_0x1a7b22})};}
|