@lovrabet/rabetbase-cli 2.4.7 → 2.5.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +13 -3
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +7 -0
- package/lib/api/generate-sdk-config-file.js +1 -0
- 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/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.d.ts +2 -5
- 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/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.d.ts +5 -0
- package/lib/commands/config/delete.js +1 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.d.ts +12 -0
- package/lib/commands/config/init.js +1 -0
- 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/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/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-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/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.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/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/template.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/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +1 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.d.ts +6 -2
- 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.d.ts +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/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.d.ts +2 -2
- 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.d.ts +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/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/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.d.ts +10 -0
- package/lib/config/domain-config.js +1 -0
- package/lib/config/schema.d.ts +3 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +23 -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.d.ts +9 -0
- package/lib/constant/region.js +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.d.ts +4 -6
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +2 -2
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -0
- 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/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.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/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.d.ts +11 -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.d.ts +2 -2
- 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/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +28 -0
- package/lib/utils/ai_config.d.ts +1 -2
- 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 -3
- package/skills/rabetbase/SKILL.md +33 -28
- package/skills/rabetbase/guides/backend-function.md +41 -12
- package/skills/rabetbase/guides/bff-creation-workflow.md +6 -4
- package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
- package/skills/rabetbase/guides/data-api-guidelines.md +8 -8
- package/skills/rabetbase/guides/database-connection-workflow.md +8 -16
- package/skills/rabetbase/guides/menu-anomaly-manual-cleanup.md +1 -6
- package/skills/rabetbase/guides/sdk-client-generation.md +146 -0
- package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
- package/skills/rabetbase/guides/troubleshooting.md +1 -1
- package/skills/rabetbase/guides/typescript-sdk.md +46 -10
- package/skills/rabetbase/references/rabetbase-api-list.md +4 -4
- package/skills/rabetbase/references/rabetbase-api-pull.md +44 -29
- package/skills/rabetbase/references/rabetbase-app-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-auth-login.md +4 -2
- package/skills/rabetbase/references/rabetbase-bff-push.md +3 -1
- package/skills/rabetbase/references/rabetbase-codegen-sql.md +3 -1
- package/skills/rabetbase/references/rabetbase-config.md +75 -30
- package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +17 -6
- package/skills/rabetbase/references/rabetbase-dataset-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-db-analyze.md +3 -3
- package/skills/rabetbase/references/rabetbase-db-detail.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -4
- package/skills/rabetbase/references/rabetbase-db-diff.md +6 -9
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
- package/skills/rabetbase/references/rabetbase-init.md +57 -51
- package/skills/rabetbase/references/rabetbase-kb.md +2 -0
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-custom-detail.md +3 -3
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-project-create.md +12 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +2 -2
- package/skills/rabetbase/references/rabetbase-role-user-resolve.md +2 -2
- package/skills/rabetbase/references/rabetbase-user-account.md +1 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +6 -6
- package/skills/rabetbase.manifest.json +4 -3
- package/templates/README.md +17 -28
- package/templates/generate-api/api.ts.tpl +3 -3
- package/templates/generate-api/client.ts.tpl +10 -37
- package/lib/commands/data/filter.d.ts +0 -7
- package/lib/commands/data/filter.js +0 -1
- package/lib/commands/data/getOne.d.ts +0 -7
- package/lib/commands/data/getOne.js +0 -1
- package/lib/commands/data/index.d.ts +0 -8
- package/lib/commands/data/index.js +0 -1
- package/lib/commands/data/shared.d.ts +0 -33
- package/lib/commands/data/shared.js +0 -1
- package/lib/commands/init/index.d.ts +0 -11
- package/lib/commands/init/index.js +0 -1
- package/lib/utils/rules-cdn.d.ts +0 -38
- package/lib/utils/rules-cdn.js +0 -1
- package/templates/rules/lovrabet_rules.mdc.tpl +0 -893
- package/templates/skill/SKILL.md.tpl +0 -120
|
@@ -1 +1 @@
|
|
|
1
|
-
const a142_0x280aff=a142_0x4298;(function(_0x135906,_0x3dc624){const _0x117af1=a142_0x4298,_0x3c41ce=_0x135906();while(!![]){try{const _0x30bf70=parseInt(_0x117af1(0x199))/0x1+parseInt(_0x117af1(0x1f2))/0x2+parseInt(_0x117af1(0x1eb))/0x3*(-parseInt(_0x117af1(0x1f4))/0x4)+parseInt(_0x117af1(0x1d8))/0x5+-parseInt(_0x117af1(0x20c))/0x6*(-parseInt(_0x117af1(0x1b1))/0x7)+parseInt(_0x117af1(0x1a1))/0x8*(parseInt(_0x117af1(0x215))/0x9)+-parseInt(_0x117af1(0x1d4))/0xa;if(_0x30bf70===_0x3dc624)break;else _0x3c41ce['push'](_0x3c41ce['shift']());}catch(_0x8cd43f){_0x3c41ce['push'](_0x3c41ce['shift']());}}}(a142_0x3a8b,0xd9fd1));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=[a142_0x280aff(0x1e2),a142_0x280aff(0x20e),a142_0x280aff(0x1ab),'WECOM',a142_0x280aff(0x1d7)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a142_0x280aff(0x209),a142_0x280aff(0x1d6),a142_0x280aff(0x1a4),a142_0x280aff(0x1af),a142_0x280aff(0x1cf),a142_0x280aff(0x204),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a142_0x280aff(0x1f5),a142_0x280aff(0x1bc),a142_0x280aff(0x1ce)]),EMAIL_RECIPIENT_FIELDS=new Set([a142_0x280aff(0x1e5),a142_0x280aff(0x1dd),a142_0x280aff(0x1bb),a142_0x280aff(0x1b0),a142_0x280aff(0x1ca),'subjectPrefix',a142_0x280aff(0x1b9),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a142_0x280aff(0x20b),'type':'string','required':![],'description':a142_0x280aff(0x19b)},{'name':a142_0x280aff(0x1ee),'type':a142_0x280aff(0x211),'required':![],'default':![],'description':a142_0x280aff(0x208)},{'name':a142_0x280aff(0x1d2),'type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a142_0x280aff(0x1a6),'required':!![],'description':a142_0x280aff(0x19e)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x53ae8e,_0x217888,_0x485b6e){return new CliError(_0x53ae8e,0x1,_0x217888,_0x485b6e);}export function readNotificationId(_0x23aa76){const _0x19ba21=a142_0x280aff,_0x1a87c0=_0x23aa76['num']('id');if(!Number[_0x19ba21(0x216)](_0x1a87c0)||_0x1a87c0<=0x0)throw notificationError(_0x19ba21(0x1dc),_0x19ba21(0x1b3));return _0x1a87c0;}export function requireNotificationExplicitYes(_0x5ee9fc){const _0x5777d7=a142_0x280aff;if(_0x5ee9fc[_0x5777d7(0x1a7)](_0x5777d7(0x19c))||_0x5ee9fc[_0x5777d7(0x1a7)](_0x5777d7(0x200)))return;throw notificationError(_0x5777d7(0x21a),_0x5777d7(0x1be),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x5d11ea,_0x32227f=a142_0x280aff(0x1c3),_0x33b420=a142_0x280aff(0x1e2)){const _0x1e482e=a142_0x280aff,_0x7617fd=_0x5d11ea[_0x1e482e(0x1b8)](_0x32227f)[_0x1e482e(0x1cb)]()||_0x33b420;if(!NOTIFICATION_CHANNEL_TYPES[_0x1e482e(0x1b7)](_0x7617fd))throw CliErrors[_0x1e482e(0x218)](_0x1e482e(0x1cd)+_0x32227f+':\x20'+_0x7617fd,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x1e482e(0x1ea)](',\x20')+'.');return _0x7617fd;}export function assertSingleNotificationSource(_0xe3d0d3){const _0x1f16c7=a142_0x280aff,_0x44e20e=[],_0x883250=_0xe3d0d3[_0x1f16c7(0x1b8)](_0x1f16c7(0x20b))[_0x1f16c7(0x1cb)]();if(_0x883250)_0x44e20e[_0x1f16c7(0x1db)]({'kind':'file','path':_0x883250});if(_0xe3d0d3[_0x1f16c7(0x1a7)](_0x1f16c7(0x1ee)))_0x44e20e[_0x1f16c7(0x1db)]({'kind':'stdin'});const _0x5eef20=_0xe3d0d3[_0x1f16c7(0x1b8)](_0x1f16c7(0x1d2))[_0x1f16c7(0x1cb)]();if(_0x5eef20)_0x44e20e[_0x1f16c7(0x1db)]({'kind':_0x1f16c7(0x1bf),'name':_0x5eef20});if(_0x44e20e[_0x1f16c7(0x1f9)]===0x0)throw CliErrors[_0x1f16c7(0x218)](_0x1f16c7(0x1fb),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x44e20e['length']>0x1)throw CliErrors[_0x1f16c7(0x218)](_0x1f16c7(0x1b5),_0x1f16c7(0x1e1));return _0x44e20e[0x0];}export async function readNotificationDocument(_0x582ce0,_0x512de9){const _0x463846=a142_0x280aff,_0xf5cf92=assertSingleNotificationSource(_0x582ce0),_0x19c6a6=_0xf5cf92[_0x463846(0x1e4)]===_0x463846(0x20b)?_0x463846(0x1cc)+_0xf5cf92[_0x463846(0x1d3)]:_0xf5cf92[_0x463846(0x1e4)]==='env'?'environment\x20variable\x20'+_0xf5cf92['name']:_0x463846(0x1ee);let _0x476b85;try{if(_0xf5cf92['kind']==='file')_0x476b85=await readFile(_0xf5cf92[_0x463846(0x1d3)],_0x463846(0x1c6));else{if(_0xf5cf92['kind']==='env'){if(!(_0xf5cf92[_0x463846(0x1f7)]in process.env))throw notificationError(_0x463846(0x1b6),_0x463846(0x20a)+_0xf5cf92['name']);_0x476b85=process.env[_0xf5cf92.name]??'';}else _0x476b85=await readStdin();}}catch(_0x54a902){if(_0x54a902 instanceof CliError)throw _0x54a902;throw notificationError(_0x463846(0x1b6),_0x463846(0x1fd)+_0x19c6a6+'.');}let _0x30d759;try{_0x30d759=JSON[_0x463846(0x21b)](_0x476b85);}catch{throw notificationError('notification_config_json_invalid',_0x463846(0x198)+_0x19c6a6+'\x20is\x20invalid.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x30d759))throw notificationError('notification_config_json_invalid',_0x463846(0x198)+_0x19c6a6+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x30d759,_0x512de9);}export function projectNotificationListConfig(_0x3c8694,_0x1875a1){const _0x2fc144=a142_0x280aff;return{'id':typeof _0x3c8694['id']==='number'?_0x3c8694['id']:null,'configCode':requireResponseString(_0x3c8694['configCode'],_0x2fc144(0x1bc),_0x1875a1),'configName':requireResponseString(_0x3c8694['configName'],_0x2fc144(0x209),_0x1875a1),'channelType':requireResponseString(_0x3c8694[_0x2fc144(0x1d6)],'channelType',_0x1875a1),'description':normalizeNullableString(_0x3c8694[_0x2fc144(0x1cf)]),'createTime':normalizeNullableString(_0x3c8694[_0x2fc144(0x1d1)]),'updateTime':normalizeNullableString(_0x3c8694['updateTime'])};}export function normalizeExactNotificationConfig(_0x4d38ce,_0x123dca,_0x9cbff8){const _0x172983=a142_0x280aff;if(!Number['isSafeInteger'](_0x4d38ce['id'])||_0x4d38ce['id']!==_0x123dca)throw notificationError(_0x172983(0x213),_0x172983(0x1d5)+_0x123dca+'.');if(_0x4d38ce[_0x172983(0x1f5)]!==_0x9cbff8)throw notificationError(_0x172983(0x213),_0x172983(0x19a)+_0x123dca+_0x172983(0x210));const _0x422d84=requireExactString(_0x4d38ce[_0x172983(0x209)],'configName',_0x123dca),_0x3b1cae=requireExactString(_0x4d38ce[_0x172983(0x1bc)],_0x172983(0x1bc),_0x123dca),_0x5167ae=requireExactString(_0x4d38ce[_0x172983(0x1d6)],_0x172983(0x1d6),_0x123dca);if(!NOTIFICATION_CHANNEL_TYPES[_0x172983(0x1b7)](_0x5167ae))throw notificationError(_0x172983(0x213),'Notification\x20config\x20'+_0x123dca+_0x172983(0x1c9));const _0x16b04e=responseNullableString(_0x4d38ce[_0x172983(0x1a4)],_0x172983(0x1a4),_0x123dca),_0xd13e3a=responseNullableString(_0x4d38ce['channelConfig'],_0x172983(0x1af),_0x123dca),_0x5cc19b=responseNullableString(_0x4d38ce['description'],_0x172983(0x1cf),_0x123dca),_0x172b0c=responseNullableTimeout(_0x4d38ce[_0x172983(0x204)],_0x172983(0x204),_0x123dca),_0x4944ad=responseNullableTimeout(_0x4d38ce[_0x172983(0x1a5)],_0x172983(0x1a5),_0x123dca);return{'id':_0x123dca,'appCode':_0x9cbff8,'configCode':_0x3b1cae,'configName':_0x422d84,'channelType':_0x5167ae,'endpointUrl':redactSensitive(_0x16b04e),'channelConfig':redactSensitive(_0xd13e3a),'description':_0x5cc19b,'connectTimeout':_0x172b0c,'readTimeout':_0x4944ad,'endpointUrlRaw':_0x16b04e,'channelConfigRaw':_0xd13e3a};}export async function requireExactNotificationConfig(_0x511788,_0x260920,_0x8b81c5){const _0x2acf83=a142_0x280aff;let _0xa8efa6;try{_0xa8efa6=await getNotificationChannelConfig(_0x260920,_0x511788);}catch{throw safeApiFailure(_0x8b81c5,_0x2acf83(0x202),_0x2acf83(0x19f)+_0x511788+_0x2acf83(0x1f0));}return normalizeExactNotificationConfig(_0xa8efa6,_0x260920,_0x511788);}export function projectNotificationConfig(_0x127556){const _0x3364f3=a142_0x280aff;return{'id':_0x127556['id']??null,'appCode':_0x127556[_0x3364f3(0x1f5)],'configCode':_0x127556[_0x3364f3(0x1bc)]??null,'configName':_0x127556['configName'],'channelType':_0x127556[_0x3364f3(0x1d6)],'endpointUrl':redactSensitive(_0x127556['endpointUrl']),'channelConfig':redactSensitive(_0x127556[_0x3364f3(0x1af)]),'description':_0x127556[_0x3364f3(0x1cf)]??null,'connectTimeout':_0x127556[_0x3364f3(0x204)]??null,'readTimeout':_0x127556[_0x3364f3(0x1a5)]??null};}export function notificationSelector(_0x4da872){const _0x529982=a142_0x280aff;return{'appCode':_0x4da872[_0x529982(0x1f5)],'id':_0x4da872['id'],'configCode':_0x4da872['configCode'],'configName':_0x4da872[_0x529982(0x209)],'channelType':_0x4da872[_0x529982(0x1d6)]};}export function createMutationInput(_0x3bc1d3,_0x4a0b39){const _0x392b47=a142_0x280aff;return{'appCode':_0x3bc1d3,'configName':_0x4a0b39[_0x392b47(0x209)],'channelType':_0x4a0b39['channelType'],...hasOwn(_0x4a0b39,_0x392b47(0x1a4))?{'endpointUrl':_0x4a0b39[_0x392b47(0x1a4)]}:{},...hasOwn(_0x4a0b39,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x4a0b39[_0x392b47(0x1af)])}:{},...hasOwn(_0x4a0b39,'description')?{'description':_0x4a0b39[_0x392b47(0x1cf)]}:{},...hasOwn(_0x4a0b39,_0x392b47(0x204))?{'connectTimeout':_0x4a0b39[_0x392b47(0x204)]}:{},...hasOwn(_0x4a0b39,_0x392b47(0x1a5))?{'readTimeout':_0x4a0b39[_0x392b47(0x1a5)]}:{}};}export function mergeUpdateInput(_0x165574,_0x5905c9){const _0x3f47d1=a142_0x280aff;return{'id':_0x165574['id'],'appCode':_0x165574[_0x3f47d1(0x1f5)],'configName':_0x5905c9[_0x3f47d1(0x209)]??_0x165574[_0x3f47d1(0x209)],'channelType':_0x5905c9[_0x3f47d1(0x1d6)]??_0x165574[_0x3f47d1(0x1d6)],'endpointUrl':hasOwn(_0x5905c9,'endpointUrl')?_0x5905c9['endpointUrl']:_0x165574[_0x3f47d1(0x1df)],'channelConfig':hasOwn(_0x5905c9,'channelConfig')?serializeChannelConfig(_0x5905c9[_0x3f47d1(0x1af)]):_0x165574['channelConfigRaw'],'description':hasOwn(_0x5905c9,'description')?_0x5905c9['description']:_0x165574[_0x3f47d1(0x1cf)],'connectTimeout':hasOwn(_0x5905c9,'connectTimeout')?_0x5905c9[_0x3f47d1(0x204)]:_0x165574[_0x3f47d1(0x204)],'readTimeout':hasOwn(_0x5905c9,'readTimeout')?_0x5905c9[_0x3f47d1(0x1a5)]:_0x165574[_0x3f47d1(0x1a5)]};}export function plannedUpdateProjection(_0x25d8e3,_0x1ba915){const _0x157b4b=a142_0x280aff;return projectNotificationConfig({'id':_0x25d8e3['id'],'appCode':_0x25d8e3[_0x157b4b(0x1f5)],'configCode':_0x25d8e3[_0x157b4b(0x1bc)],'configName':_0x1ba915[_0x157b4b(0x209)]??_0x25d8e3[_0x157b4b(0x209)],'channelType':_0x1ba915['channelType']??_0x25d8e3['channelType'],'endpointUrl':hasOwn(_0x1ba915,_0x157b4b(0x1a4))?_0x1ba915[_0x157b4b(0x1a4)]:_0x25d8e3[_0x157b4b(0x1df)],'channelConfig':hasOwn(_0x1ba915,_0x157b4b(0x1af))?_0x1ba915['channelConfig']:_0x25d8e3[_0x157b4b(0x1b4)],'description':hasOwn(_0x1ba915,_0x157b4b(0x1cf))?_0x1ba915[_0x157b4b(0x1cf)]:_0x25d8e3[_0x157b4b(0x1cf)],'connectTimeout':hasOwn(_0x1ba915,_0x157b4b(0x204))?_0x1ba915['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x25d8e3['connectTimeout'],'readTimeout':hasOwn(_0x1ba915,_0x157b4b(0x1a5))?_0x1ba915['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x25d8e3[_0x157b4b(0x1a5)]});}export function requestedSafeFieldsMatch(_0x4ca2da,_0x1ffbd8,_0x331016){const _0x3c291f=a142_0x280aff,_0x23203e=[],_0x974a09=[],_0x4bd13d=[];for(const _0x113e44 of[_0x3c291f(0x209),'channelType','description']){if(!hasOwn(_0x331016,_0x113e44))continue;_0x4bd13d[_0x3c291f(0x1db)](_0x113e44),_0x23203e['push'](_0x1ffbd8[_0x113e44]===_0x331016[_0x113e44]),_0x974a09[_0x3c291f(0x1db)](_0x4ca2da[_0x113e44]!==_0x331016[_0x113e44]&&_0x1ffbd8[_0x113e44]===_0x331016[_0x113e44]);}for(const _0x215807 of[_0x3c291f(0x204),'readTimeout']){if(!hasOwn(_0x331016,_0x215807))continue;const _0x1babf6=_0x331016[_0x215807]??(_0x215807===_0x3c291f(0x204)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x4bd13d['push'](_0x215807),_0x23203e[_0x3c291f(0x1db)](_0x1ffbd8[_0x215807]===_0x1babf6),_0x974a09[_0x3c291f(0x1db)](_0x4ca2da[_0x215807]!==_0x1babf6&&_0x1ffbd8[_0x215807]===_0x1babf6);}return hasOwn(_0x331016,_0x3c291f(0x1a4))&&_0x331016[_0x3c291f(0x1a4)]===null&&(_0x4bd13d[_0x3c291f(0x1db)]('endpointUrl:null'),_0x23203e[_0x3c291f(0x1db)](_0x1ffbd8['endpointUrlRaw']===null||_0x1ffbd8[_0x3c291f(0x1df)]===''),_0x974a09[_0x3c291f(0x1db)](_0x4ca2da[_0x3c291f(0x1df)]!==null&&_0x4ca2da[_0x3c291f(0x1df)]!==''&&(_0x1ffbd8[_0x3c291f(0x1df)]===null||_0x1ffbd8[_0x3c291f(0x1df)]===''))),{'allMatch':_0x23203e[_0x3c291f(0x1c5)](Boolean),'provesChange':_0x974a09[_0x3c291f(0x1fc)](Boolean),'verifiedFields':_0x4bd13d};}export function validateNotificationDeleteReadback(_0x4931ce,_0x467d7c,_0x466adf){const _0x197509=a142_0x280aff;for(const [_0x56ba74,_0x270729]of _0x4931ce[_0x197509(0x1c2)]()){if(!Number[_0x197509(0x216)](_0x270729['id'])||_0x270729['id']<=0x0)throw notificationError(_0x197509(0x213),_0x197509(0x1ec)+(_0x56ba74+0x1)+_0x197509(0x1e9));if(_0x270729[_0x197509(0x1f5)]!==_0x467d7c)throw notificationError(_0x197509(0x213),_0x197509(0x1ec)+(_0x56ba74+0x1)+_0x197509(0x1a3));if(_0x270729[_0x197509(0x1d6)]!==_0x466adf)throw notificationError(_0x197509(0x213),_0x197509(0x1ec)+(_0x56ba74+0x1)+_0x197509(0x1c0));}}export function safeApiFailure(_0x3456cf,_0x342c9d,_0x1488b1){const _0xeedf2=a142_0x280aff;return notificationError(_0xeedf2(0x207)+_0x3456cf+'_'+(_0x342c9d===_0xeedf2(0x1e3)?'failed':_0x342c9d+'_unavailable'),_0xeedf2(0x19a)+_0x3456cf+'\x20'+_0x342c9d+_0xeedf2(0x1ba),_0x1488b1);}function a142_0x3a8b(){const _0xdcec66=['\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','every','utf8','\x22\x20cannot\x20exceed\x20','call','\x20has\x20an\x20unsupported\x20channelType.','replyTo','trim','file\x20','Invalid\x20--','channelCode','description','stringify','createTime','from-env','path','16713180ZvEAMI','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','channelType','WEBHOOK','4125095oEXYPn','hasOwnProperty','a\x20string\x20or\x20null','push','notification_config_id_invalid','recipients','notification_config_field_unknown','endpointUrlRaw','Notification\x20JSON\x20field\x20\x22','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','EMAIL','mutation','kind','emailTargets','string','notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20has\x20an\x20invalid\x20id.','join','1971489OpzcUq','Notification\x20config\x20list\x20item\x20','messageTemplate','stdin','\x20is\x20missing\x20required\x20field\x20\x22','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','a\x20supported\x20string','3157260LCOXqt','notification_config_update_empty','4lbSjgn','appCode','\x20characters.','name','Notification\x20JSON\x20channelConfig\x20field\x20\x22','length','a\x20JSON\x20object','Missing\x20notification\x20JSON\x20source.','some','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','has','Invalid\x20notification\x20config\x20response.','yes','object','preflight','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','connectTimeout','notification_config_channel_field_forbidden','\x22configName\x22.','notification_config_','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','configName','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','file','3472758BTWqQB','update','FEISHU','isArray','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','boolean','\x20has\x20invalid\x20field\x20\x22','notification_config_response_invalid','keys','99aZkYSk','isSafeInteger','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','validation','notification_config_field_required','notification_config_confirmation_required','parse','Notification\x20JSON\x20from\x20','86196kaNAWG','Notification\x20config\x20','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','dry-run','apiError','Application-level\x20notification\x20config\x20ID','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','a\x20non-empty\x20string','111072PEeSFK','<redacted>','\x20has\x20an\x20invalid\x20appCode.','endpointUrl','readTimeout','number','bool','rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_invalid','\x20--format\x20compress','DINGTALK','\x22\x20is\x20forbidden.','create','Unknown\x20notification\x20JSON\x20field\x20\x22','channelConfig','bccList','7RbHrVo','Allowed\x20values:\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','channelConfigRaw','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_source_unavailable','includes','str','fromName','\x20failed.','ccList','configCode','Create\x20JSON\x20requires\x20field\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','env','\x20has\x20an\x20invalid\x20channelType.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','entries','type'];a142_0x3a8b=function(){return _0xdcec66;};return a142_0x3a8b();}export function notificationLookupCommand(_0x23a016,_0x4d8e6f){const _0x408472=a142_0x280aff;return _0x408472(0x1a8)+_0x23a016+'\x20--type\x20'+_0x4d8e6f+_0x408472(0x1aa);}function validateNotificationDocument(_0x2aee17,_0x5f42c9){const _0x5bf2f4=a142_0x280aff;for(const _0x7750b2 of Object[_0x5bf2f4(0x214)](_0x2aee17)){if(FORBIDDEN_IDENTITY_FIELDS[_0x5bf2f4(0x1fe)](_0x7750b2))throw notificationError(_0x5bf2f4(0x1e7),_0x5bf2f4(0x1e0)+_0x7750b2+_0x5bf2f4(0x1c4));if(!ALLOWED_INPUT_FIELDS[_0x5bf2f4(0x1fe)](_0x7750b2))throw notificationError(_0x5bf2f4(0x1de),_0x5bf2f4(0x1ae)+_0x7750b2+'\x22.');}if(_0x5f42c9===_0x5bf2f4(0x20d)&&Object[_0x5bf2f4(0x214)](_0x2aee17)[_0x5bf2f4(0x1f9)]===0x0)throw notificationError(_0x5bf2f4(0x1f3),_0x5bf2f4(0x203));const _0x117e30={};if(hasOwn(_0x2aee17,_0x5bf2f4(0x209)))_0x117e30[_0x5bf2f4(0x209)]=validateRequiredString(_0x2aee17[_0x5bf2f4(0x209)],_0x5bf2f4(0x209),0x80);else{if(_0x5f42c9===_0x5bf2f4(0x1ad))throw notificationError(_0x5bf2f4(0x219),_0x5bf2f4(0x1bd)+_0x5bf2f4(0x206));}if(hasOwn(_0x2aee17,'channelType')){if(typeof _0x2aee17[_0x5bf2f4(0x1d6)]!==_0x5bf2f4(0x1e6))throw invalidFieldType(_0x5bf2f4(0x1d6),_0x5bf2f4(0x1f1));const _0x38a2d3=_0x2aee17[_0x5bf2f4(0x1d6)][_0x5bf2f4(0x1cb)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x5bf2f4(0x1b7)](_0x38a2d3))throw notificationError('notification_config_field_invalid',_0x5bf2f4(0x1e8),_0x5bf2f4(0x1b2)+NOTIFICATION_CHANNEL_TYPES[_0x5bf2f4(0x1ea)](',\x20')+'.');_0x117e30[_0x5bf2f4(0x1d6)]=_0x38a2d3;}else{if(_0x5f42c9===_0x5bf2f4(0x1ad))throw notificationError('notification_config_field_required',_0x5bf2f4(0x1bd)+'\x22channelType\x22.');}for(const [_0x2fe74b,_0x2d8f13]of[['endpointUrl',0x200],[_0x5bf2f4(0x1cf),0x100]]){if(!hasOwn(_0x2aee17,_0x2fe74b))continue;const _0x5beabf=_0x2aee17[_0x2fe74b];if(_0x5beabf!==null&&typeof _0x5beabf!==_0x5bf2f4(0x1e6))throw invalidFieldType(_0x2fe74b,_0x5bf2f4(0x1da));if(typeof _0x5beabf===_0x5bf2f4(0x1e6)&&_0x5beabf['length']>_0x2d8f13)throw notificationError('notification_config_field_invalid',_0x5bf2f4(0x1e0)+_0x2fe74b+_0x5bf2f4(0x1c7)+_0x2d8f13+_0x5bf2f4(0x1f6));_0x117e30[_0x2fe74b]=_0x5beabf;}if(hasOwn(_0x2aee17,'channelConfig')){const _0x322741=_0x2aee17[_0x5bf2f4(0x1af)];if(_0x322741===null&&_0x5f42c9==='create')throw invalidFieldType(_0x5bf2f4(0x1af),_0x5bf2f4(0x1fa));if(_0x322741!==null&&!isJsonObject(_0x322741))throw invalidFieldType(_0x5bf2f4(0x1af),_0x5f42c9===_0x5bf2f4(0x20d)?'a\x20JSON\x20object\x20or\x20null':_0x5bf2f4(0x1fa));_0x322741!==null&&validateChannelConfigFields(_0x117e30[_0x5bf2f4(0x1d6)],_0x322741),_0x117e30[_0x5bf2f4(0x1af)]=_0x322741;}for(const _0x265755 of['connectTimeout',_0x5bf2f4(0x1a5)]){if(!hasOwn(_0x2aee17,_0x265755))continue;const _0x88d266=_0x2aee17[_0x265755];if(_0x88d266!==null&&(!Number[_0x5bf2f4(0x216)](_0x88d266)||_0x88d266<0x0))throw notificationError(_0x5bf2f4(0x1a9),_0x5bf2f4(0x1e0)+_0x265755+_0x5bf2f4(0x217));_0x117e30[_0x265755]=_0x88d266;}return _0x117e30;}function validateRequiredString(_0x295fe5,_0x28530e,_0x5e6fde){const _0x2c08c7=a142_0x280aff;if(typeof _0x295fe5!==_0x2c08c7(0x1e6))throw invalidFieldType(_0x28530e,_0x2c08c7(0x1a0));const _0x17446d=_0x295fe5[_0x2c08c7(0x1cb)]();if(!_0x17446d)throw notificationError(_0x2c08c7(0x1a9),'Notification\x20JSON\x20field\x20\x22'+_0x28530e+_0x2c08c7(0x1c1));if(_0x17446d[_0x2c08c7(0x1f9)]>_0x5e6fde)throw notificationError(_0x2c08c7(0x1a9),_0x2c08c7(0x1e0)+_0x28530e+_0x2c08c7(0x1c7)+_0x5e6fde+_0x2c08c7(0x1f6));return _0x17446d;}function a142_0x4298(_0x2e0838,_0x5a546a){_0x2e0838=_0x2e0838-0x198;const _0x3a8b53=a142_0x3a8b();let _0x4298c3=_0x3a8b53[_0x2e0838];return _0x4298c3;}function validateChannelConfigFields(_0x47a284,_0x5f211f){const _0x378014=a142_0x280aff;if(hasOwn(_0x5f211f,_0x378014(0x1ed)))throw forbiddenChannelConfigField('messageTemplate');if(_0x47a284==='EMAIL')for(const _0x4195a9 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x5f211f,_0x4195a9))throw forbiddenChannelConfigField(_0x4195a9);}}function forbiddenChannelConfigField(_0x38731d){const _0x26a0e3=a142_0x280aff;return notificationError(_0x26a0e3(0x205),_0x26a0e3(0x1f8)+_0x38731d+_0x26a0e3(0x1ac));}function invalidFieldType(_0x17ee1b,_0xd9ecc){return notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x17ee1b+'\x22\x20must\x20be\x20'+_0xd9ecc+'.');}function serializeChannelConfig(_0x13221b){const _0x362c39=a142_0x280aff;return _0x13221b===null||_0x13221b===undefined?null:JSON[_0x362c39(0x1d0)](_0x13221b);}function redactSensitive(_0xb8ca96){const _0xda2b1b=a142_0x280aff;return _0xb8ca96===null||_0xb8ca96===undefined||_0xb8ca96===''?null:_0xda2b1b(0x1a2);}function requireResponseString(_0x5e684a,_0x4d873d,_0x4cbf6b){const _0x82e5c8=a142_0x280aff;if(typeof _0x5e684a!=='string'||_0x5e684a['trim']()==='')throw CliErrors[_0x82e5c8(0x19d)](_0x82e5c8(0x1ff),'Item\x20'+(_0x4cbf6b+0x1)+_0x82e5c8(0x1ef)+_0x4d873d+'\x22.');return _0x5e684a[_0x82e5c8(0x1cb)]();}function requireExactString(_0x783fe7,_0x46e5c7,_0x1c3b01){const _0x3cff95=a142_0x280aff;if(typeof _0x783fe7!==_0x3cff95(0x1e6)||_0x783fe7[_0x3cff95(0x1cb)]()==='')throw notificationError(_0x3cff95(0x213),'Notification\x20config\x20'+_0x1c3b01+_0x3cff95(0x1ef)+_0x46e5c7+'\x22.');return _0x783fe7['trim']();}function responseNullableString(_0x1470c0,_0x403f01,_0x2758bf){const _0x1d1f59=a142_0x280aff;if(_0x1470c0===undefined||_0x1470c0===null)return null;if(typeof _0x1470c0!==_0x1d1f59(0x1e6))throw notificationError(_0x1d1f59(0x213),'Notification\x20config\x20'+_0x2758bf+'\x20has\x20invalid\x20field\x20\x22'+_0x403f01+'\x22.');return _0x1470c0;}function responseNullableTimeout(_0x10273b,_0x12f774,_0x3ba043){const _0x2c5525=a142_0x280aff;if(_0x10273b===undefined||_0x10273b===null)return null;if(!Number[_0x2c5525(0x216)](_0x10273b)||_0x10273b<0x0)throw notificationError(_0x2c5525(0x213),_0x2c5525(0x19a)+_0x3ba043+_0x2c5525(0x212)+_0x12f774+'\x22.');return _0x10273b;}function normalizeNullableString(_0x102d1b){const _0x1c3a04=a142_0x280aff;return typeof _0x102d1b===_0x1c3a04(0x1e6)?_0x102d1b:null;}function isJsonObject(_0x20816c){const _0x11b343=a142_0x280aff;return _0x20816c!==null&&typeof _0x20816c===_0x11b343(0x201)&&!Array[_0x11b343(0x20f)](_0x20816c);}function hasOwn(_0x3a8fa7,_0x413450){const _0x4657b=a142_0x280aff;return Object['prototype'][_0x4657b(0x1d9)][_0x4657b(0x1c8)](_0x3a8fa7,_0x413450);}async function readStdin(){const _0x318ea2=a142_0x280aff;let _0x2a7aca='';process[_0x318ea2(0x1ee)]['setEncoding'](_0x318ea2(0x1c6));for await(const _0x108bcb of process[_0x318ea2(0x1ee)])_0x2a7aca+=_0x108bcb;return _0x2a7aca;}
|
|
1
|
+
const a140_0x44f68b=a140_0x49a1;(function(_0x4d0292,_0x4203df){const _0xc808c8=a140_0x49a1,_0x380491=_0x4d0292();while(!![]){try{const _0x37025c=-parseInt(_0xc808c8(0x196))/0x1+parseInt(_0xc808c8(0x1d8))/0x2+parseInt(_0xc808c8(0x200))/0x3*(-parseInt(_0xc808c8(0x19c))/0x4)+-parseInt(_0xc808c8(0x1a6))/0x5+parseInt(_0xc808c8(0x1fd))/0x6+parseInt(_0xc808c8(0x193))/0x7*(-parseInt(_0xc808c8(0x1bf))/0x8)+parseInt(_0xc808c8(0x1c7))/0x9*(parseInt(_0xc808c8(0x1e5))/0xa);if(_0x37025c===_0x4203df)break;else _0x380491['push'](_0x380491['shift']());}catch(_0x13d8eb){_0x380491['push'](_0x380491['shift']());}}}(a140_0x5f46,0xdd11b));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';function a140_0x49a1(_0x31e9d3,_0x292937){_0x31e9d3=_0x31e9d3-0x193;const _0x5f46bc=a140_0x5f46();let _0x49a18a=_0x5f46bc[_0x31e9d3];return _0x49a18a;}export const NOTIFICATION_CHANNEL_TYPES=[a140_0x44f68b(0x1be),a140_0x44f68b(0x1b1),a140_0x44f68b(0x1c5),a140_0x44f68b(0x202),a140_0x44f68b(0x1b7)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a140_0x44f68b(0x19d),'channelType',a140_0x44f68b(0x19e),a140_0x44f68b(0x1c9),a140_0x44f68b(0x20b),a140_0x44f68b(0x1eb),a140_0x44f68b(0x1e7)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a140_0x44f68b(0x1cf),a140_0x44f68b(0x19a),a140_0x44f68b(0x1c1)]),EMAIL_RECIPIENT_FIELDS=new Set([a140_0x44f68b(0x1f8),a140_0x44f68b(0x199),a140_0x44f68b(0x1dc),a140_0x44f68b(0x1b8),'replyTo',a140_0x44f68b(0x212),a140_0x44f68b(0x1b9),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a140_0x44f68b(0x208),'type':'string','required':![],'description':a140_0x44f68b(0x1ba)},{'name':a140_0x44f68b(0x1e8),'type':a140_0x44f68b(0x1c0),'required':![],'default':![],'description':a140_0x44f68b(0x1cd)},{'name':a140_0x44f68b(0x20d),'type':'string','required':![],'description':a140_0x44f68b(0x1c3)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a140_0x44f68b(0x1c2),'required':!![],'description':a140_0x44f68b(0x1a4)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x4fb839,_0x2329a5,_0x2b0e0a){return new CliError(_0x4fb839,0x1,_0x2329a5,_0x2b0e0a);}export function readNotificationId(_0x344b66){const _0x2f0b50=a140_0x44f68b,_0x1f05be=_0x344b66['num']('id');if(!Number[_0x2f0b50(0x1d4)](_0x1f05be)||_0x1f05be<=0x0)throw notificationError(_0x2f0b50(0x1c8),_0x2f0b50(0x213));return _0x1f05be;}export function requireNotificationExplicitYes(_0x5bd2f3){const _0x5a67dc=a140_0x44f68b;if(_0x5bd2f3[_0x5a67dc(0x1a5)](_0x5a67dc(0x1d5))||_0x5bd2f3[_0x5a67dc(0x1a5)](_0x5a67dc(0x1e4)))return;throw notificationError(_0x5a67dc(0x1bc),_0x5a67dc(0x19f),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x5a439b,_0x513557='type',_0x184ac5=a140_0x44f68b(0x1be)){const _0x24d7a8=a140_0x44f68b,_0x4854ff=_0x5a439b[_0x24d7a8(0x1de)](_0x513557)['trim']()||_0x184ac5;if(!NOTIFICATION_CHANNEL_TYPES[_0x24d7a8(0x197)](_0x4854ff))throw CliErrors[_0x24d7a8(0x217)](_0x24d7a8(0x1e6)+_0x513557+':\x20'+_0x4854ff,_0x24d7a8(0x1b3)+NOTIFICATION_CHANNEL_TYPES[_0x24d7a8(0x195)](',\x20')+'.');return _0x4854ff;}function a140_0x5f46(){const _0x31ecb8=['str','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','preflight','failed','updateTime','notification_config_source_unavailable','yes','4160mQShXN','Invalid\x20--','readTimeout','stdin','notification_config_update_empty','channelType','connectTimeout','notification_config_json_invalid','string','isArray','name','Notification\x20JSON\x20from\x20','endpointUrl:null','\x20characters.','path','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','every','\x20has\x20an\x20invalid\x20channelType.','emailTargets','\x22\x20must\x20be\x20a\x20non-empty\x20string.','prototype','\x20has\x20an\x20unsupported\x20channelType.','\x22\x20is\x20forbidden.','2904150IUCdKP','Notification\x20JSON\x20source\x20is\x20ambiguous.','\x22configName\x22.','22668UPiOZD','\x20--type\x20','WECOM','some','Notification\x20JSON\x20channelConfig\x20field\x20\x22','object','notification_config_field_invalid','keys','file','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','messageTemplate','description','a\x20JSON\x20object','from-env','\x20failed.','\x20has\x20an\x20invalid\x20id.','kind','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','subjectPrefix','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','a\x20non-empty\x20string','length','Unknown\x20notification\x20JSON\x20field\x20\x22','validation','createTime','3409tXWTNk','Notification\x20JSON\x20field\x20\x22','join','289886IVGxVK','includes','environment\x20variable\x20','recipients','configCode','setEncoding','544wJRODN','configName','endpointUrl','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','\x20has\x20an\x20invalid\x20appCode.','push','utf8','Notification\x20config\x20','Application-level\x20notification\x20config\x20ID','bool','3038535GFRjMB','has','notification_config_field_unknown','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','notification_config_response_invalid','Create\x20JSON\x20requires\x20field\x20','update','_unavailable','trim','entries','env','FEISHU','channelConfigRaw','Allowed\x20values:\x20','apiError','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','notification_config_','WEBHOOK','bccList','fromName','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','notification_config_field_required','notification_config_confirmation_required','\x22channelType\x22.','EMAIL','26792WBouhO','boolean','channelCode','number','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','DINGTALK','file\x20','85383VfxbkC','notification_config_id_invalid','channelConfig','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Missing\x20notification\x20JSON\x20source.','endpointUrlRaw','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Notification\x20config\x20list\x20item\x20','appCode','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','hasOwnProperty','a\x20string\x20or\x20null','Invalid\x20notification\x20config\x20response.','isSafeInteger','dry-run','\x20is\x20missing\x20required\x20field\x20\x22','\x22\x20cannot\x20exceed\x20','62108HAZkAK','notification_config_field_forbidden','a\x20JSON\x20object\x20or\x20null','\x20has\x20invalid\x20field\x20\x22','ccList','parse'];a140_0x5f46=function(){return _0x31ecb8;};return a140_0x5f46();}export function assertSingleNotificationSource(_0xed34a7){const _0x3e9861=a140_0x44f68b,_0x530957=[],_0x4018e2=_0xed34a7[_0x3e9861(0x1de)](_0x3e9861(0x208))[_0x3e9861(0x1ae)]();if(_0x4018e2)_0x530957[_0x3e9861(0x1a1)]({'kind':'file','path':_0x4018e2});if(_0xed34a7[_0x3e9861(0x1a5)](_0x3e9861(0x1e8)))_0x530957[_0x3e9861(0x1a1)]({'kind':_0x3e9861(0x1e8)});const _0x4c72ef=_0xed34a7['str'](_0x3e9861(0x20d))[_0x3e9861(0x1ae)]();if(_0x4c72ef)_0x530957[_0x3e9861(0x1a1)]({'kind':_0x3e9861(0x1b0),'name':_0x4c72ef});if(_0x530957['length']===0x0)throw CliErrors[_0x3e9861(0x217)](_0x3e9861(0x1cb),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x530957[_0x3e9861(0x215)]>0x1)throw CliErrors[_0x3e9861(0x217)](_0x3e9861(0x1fe),_0x3e9861(0x1b5));return _0x530957[0x0];}export async function readNotificationDocument(_0x1cc23c,_0x5c2167){const _0x20b60a=a140_0x44f68b,_0x226e06=assertSingleNotificationSource(_0x1cc23c),_0xc1c038=_0x226e06['kind']===_0x20b60a(0x208)?_0x20b60a(0x1c6)+_0x226e06[_0x20b60a(0x1f3)]:_0x226e06[_0x20b60a(0x210)]===_0x20b60a(0x1b0)?_0x20b60a(0x198)+_0x226e06['name']:_0x20b60a(0x1e8);let _0x53b199;try{if(_0x226e06[_0x20b60a(0x210)]===_0x20b60a(0x208))_0x53b199=await readFile(_0x226e06[_0x20b60a(0x1f3)],_0x20b60a(0x1a2));else{if(_0x226e06[_0x20b60a(0x210)]===_0x20b60a(0x1b0)){if(!(_0x226e06[_0x20b60a(0x1ef)]in process.env))throw notificationError(_0x20b60a(0x1e3),_0x20b60a(0x209)+_0x226e06['name']);_0x53b199=process.env[_0x226e06.name]??'';}else _0x53b199=await readStdin();}}catch(_0x59bf7e){if(_0x59bf7e instanceof CliError)throw _0x59bf7e;throw notificationError(_0x20b60a(0x1e3),_0x20b60a(0x1f5)+_0xc1c038+'.');}let _0x265acb;try{_0x265acb=JSON[_0x20b60a(0x1dd)](_0x53b199);}catch{throw notificationError(_0x20b60a(0x1ec),_0x20b60a(0x1f0)+_0xc1c038+'\x20is\x20invalid.',_0x20b60a(0x1d0));}if(!isJsonObject(_0x265acb))throw notificationError(_0x20b60a(0x1ec),_0x20b60a(0x1f0)+_0xc1c038+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x265acb,_0x5c2167);}export function projectNotificationListConfig(_0x197cc4,_0x37aea4){const _0x11c78d=a140_0x44f68b;return{'id':typeof _0x197cc4['id']===_0x11c78d(0x1c2)?_0x197cc4['id']:null,'configCode':requireResponseString(_0x197cc4[_0x11c78d(0x19a)],'configCode',_0x37aea4),'configName':requireResponseString(_0x197cc4[_0x11c78d(0x19d)],_0x11c78d(0x19d),_0x37aea4),'channelType':requireResponseString(_0x197cc4[_0x11c78d(0x1ea)],_0x11c78d(0x1ea),_0x37aea4),'description':normalizeNullableString(_0x197cc4[_0x11c78d(0x20b)]),'createTime':normalizeNullableString(_0x197cc4[_0x11c78d(0x218)]),'updateTime':normalizeNullableString(_0x197cc4[_0x11c78d(0x1e2)])};}export function normalizeExactNotificationConfig(_0x121367,_0x546d71,_0x2951c0){const _0x5c6f3a=a140_0x44f68b;if(!Number[_0x5c6f3a(0x1d4)](_0x121367['id'])||_0x121367['id']!==_0x546d71)throw notificationError(_0x5c6f3a(0x1aa),_0x5c6f3a(0x211)+_0x546d71+'.');if(_0x121367[_0x5c6f3a(0x1cf)]!==_0x2951c0)throw notificationError(_0x5c6f3a(0x1aa),_0x5c6f3a(0x1a3)+_0x546d71+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x524c22=requireExactString(_0x121367[_0x5c6f3a(0x19d)],_0x5c6f3a(0x19d),_0x546d71),_0x1b86d6=requireExactString(_0x121367['configCode'],_0x5c6f3a(0x19a),_0x546d71),_0x313d66=requireExactString(_0x121367[_0x5c6f3a(0x1ea)],'channelType',_0x546d71);if(!NOTIFICATION_CHANNEL_TYPES[_0x5c6f3a(0x197)](_0x313d66))throw notificationError(_0x5c6f3a(0x1aa),_0x5c6f3a(0x1a3)+_0x546d71+_0x5c6f3a(0x1fb));const _0x1d725c=responseNullableString(_0x121367[_0x5c6f3a(0x19e)],_0x5c6f3a(0x19e),_0x546d71),_0x25d7f8=responseNullableString(_0x121367['channelConfig'],_0x5c6f3a(0x1c9),_0x546d71),_0x10d214=responseNullableString(_0x121367[_0x5c6f3a(0x20b)],'description',_0x546d71),_0x379427=responseNullableTimeout(_0x121367['connectTimeout'],_0x5c6f3a(0x1eb),_0x546d71),_0x7941d9=responseNullableTimeout(_0x121367[_0x5c6f3a(0x1e7)],'readTimeout',_0x546d71);return{'id':_0x546d71,'appCode':_0x2951c0,'configCode':_0x1b86d6,'configName':_0x524c22,'channelType':_0x313d66,'endpointUrl':redactSensitive(_0x1d725c),'channelConfig':redactSensitive(_0x25d7f8),'description':_0x10d214,'connectTimeout':_0x379427,'readTimeout':_0x7941d9,'endpointUrlRaw':_0x1d725c,'channelConfigRaw':_0x25d7f8};}export async function requireExactNotificationConfig(_0x725001,_0x5b8e0d,_0x17a880){const _0x19a6cd=a140_0x44f68b;let _0x233e58;try{_0x233e58=await getNotificationChannelConfig(_0x5b8e0d,_0x725001);}catch{throw safeApiFailure(_0x17a880,_0x19a6cd(0x1e0),_0x19a6cd(0x1df)+_0x725001+_0x19a6cd(0x1ca));}return normalizeExactNotificationConfig(_0x233e58,_0x5b8e0d,_0x725001);}export function projectNotificationConfig(_0x41be3f){const _0x56f654=a140_0x44f68b;return{'id':_0x41be3f['id']??null,'appCode':_0x41be3f[_0x56f654(0x1cf)],'configCode':_0x41be3f[_0x56f654(0x19a)]??null,'configName':_0x41be3f[_0x56f654(0x19d)],'channelType':_0x41be3f[_0x56f654(0x1ea)],'endpointUrl':redactSensitive(_0x41be3f[_0x56f654(0x19e)]),'channelConfig':redactSensitive(_0x41be3f[_0x56f654(0x1c9)]),'description':_0x41be3f[_0x56f654(0x20b)]??null,'connectTimeout':_0x41be3f['connectTimeout']??null,'readTimeout':_0x41be3f[_0x56f654(0x1e7)]??null};}export function notificationSelector(_0x276c2c){const _0x2806cb=a140_0x44f68b;return{'appCode':_0x276c2c['appCode'],'id':_0x276c2c['id'],'configCode':_0x276c2c[_0x2806cb(0x19a)],'configName':_0x276c2c[_0x2806cb(0x19d)],'channelType':_0x276c2c['channelType']};}export function createMutationInput(_0x289c4a,_0xc74100){const _0x257d4a=a140_0x44f68b;return{'appCode':_0x289c4a,'configName':_0xc74100[_0x257d4a(0x19d)],'channelType':_0xc74100[_0x257d4a(0x1ea)],...hasOwn(_0xc74100,'endpointUrl')?{'endpointUrl':_0xc74100[_0x257d4a(0x19e)]}:{},...hasOwn(_0xc74100,_0x257d4a(0x1c9))?{'channelConfig':serializeChannelConfig(_0xc74100[_0x257d4a(0x1c9)])}:{},...hasOwn(_0xc74100,_0x257d4a(0x20b))?{'description':_0xc74100['description']}:{},...hasOwn(_0xc74100,_0x257d4a(0x1eb))?{'connectTimeout':_0xc74100['connectTimeout']}:{},...hasOwn(_0xc74100,_0x257d4a(0x1e7))?{'readTimeout':_0xc74100['readTimeout']}:{}};}export function mergeUpdateInput(_0x3c4d77,_0x7372cc){const _0xfb4f8e=a140_0x44f68b;return{'id':_0x3c4d77['id'],'appCode':_0x3c4d77[_0xfb4f8e(0x1cf)],'configName':_0x7372cc[_0xfb4f8e(0x19d)]??_0x3c4d77['configName'],'channelType':_0x7372cc[_0xfb4f8e(0x1ea)]??_0x3c4d77[_0xfb4f8e(0x1ea)],'endpointUrl':hasOwn(_0x7372cc,_0xfb4f8e(0x19e))?_0x7372cc[_0xfb4f8e(0x19e)]:_0x3c4d77[_0xfb4f8e(0x1cc)],'channelConfig':hasOwn(_0x7372cc,_0xfb4f8e(0x1c9))?serializeChannelConfig(_0x7372cc[_0xfb4f8e(0x1c9)]):_0x3c4d77[_0xfb4f8e(0x1b2)],'description':hasOwn(_0x7372cc,'description')?_0x7372cc[_0xfb4f8e(0x20b)]:_0x3c4d77[_0xfb4f8e(0x20b)],'connectTimeout':hasOwn(_0x7372cc,_0xfb4f8e(0x1eb))?_0x7372cc[_0xfb4f8e(0x1eb)]:_0x3c4d77[_0xfb4f8e(0x1eb)],'readTimeout':hasOwn(_0x7372cc,_0xfb4f8e(0x1e7))?_0x7372cc[_0xfb4f8e(0x1e7)]:_0x3c4d77[_0xfb4f8e(0x1e7)]};}export function plannedUpdateProjection(_0x227d22,_0x4a7157){const _0x193341=a140_0x44f68b;return projectNotificationConfig({'id':_0x227d22['id'],'appCode':_0x227d22['appCode'],'configCode':_0x227d22['configCode'],'configName':_0x4a7157[_0x193341(0x19d)]??_0x227d22[_0x193341(0x19d)],'channelType':_0x4a7157['channelType']??_0x227d22[_0x193341(0x1ea)],'endpointUrl':hasOwn(_0x4a7157,_0x193341(0x19e))?_0x4a7157[_0x193341(0x19e)]:_0x227d22[_0x193341(0x1cc)],'channelConfig':hasOwn(_0x4a7157,_0x193341(0x1c9))?_0x4a7157[_0x193341(0x1c9)]:_0x227d22['channelConfigRaw'],'description':hasOwn(_0x4a7157,_0x193341(0x20b))?_0x4a7157[_0x193341(0x20b)]:_0x227d22[_0x193341(0x20b)],'connectTimeout':hasOwn(_0x4a7157,_0x193341(0x1eb))?_0x4a7157[_0x193341(0x1eb)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x227d22[_0x193341(0x1eb)],'readTimeout':hasOwn(_0x4a7157,_0x193341(0x1e7))?_0x4a7157[_0x193341(0x1e7)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x227d22[_0x193341(0x1e7)]});}export function requestedSafeFieldsMatch(_0x4ec6d6,_0x11a844,_0x8abafe){const _0x251781=a140_0x44f68b,_0x5dbf13=[],_0xe656fb=[],_0x400ca1=[];for(const _0x1b901c of[_0x251781(0x19d),'channelType',_0x251781(0x20b)]){if(!hasOwn(_0x8abafe,_0x1b901c))continue;_0x400ca1[_0x251781(0x1a1)](_0x1b901c),_0x5dbf13[_0x251781(0x1a1)](_0x11a844[_0x1b901c]===_0x8abafe[_0x1b901c]),_0xe656fb[_0x251781(0x1a1)](_0x4ec6d6[_0x1b901c]!==_0x8abafe[_0x1b901c]&&_0x11a844[_0x1b901c]===_0x8abafe[_0x1b901c]);}for(const _0x549d37 of[_0x251781(0x1eb),_0x251781(0x1e7)]){if(!hasOwn(_0x8abafe,_0x549d37))continue;const _0x4fc70f=_0x8abafe[_0x549d37]??(_0x549d37===_0x251781(0x1eb)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x400ca1['push'](_0x549d37),_0x5dbf13[_0x251781(0x1a1)](_0x11a844[_0x549d37]===_0x4fc70f),_0xe656fb[_0x251781(0x1a1)](_0x4ec6d6[_0x549d37]!==_0x4fc70f&&_0x11a844[_0x549d37]===_0x4fc70f);}return hasOwn(_0x8abafe,_0x251781(0x19e))&&_0x8abafe[_0x251781(0x19e)]===null&&(_0x400ca1[_0x251781(0x1a1)](_0x251781(0x1f1)),_0x5dbf13['push'](_0x11a844['endpointUrlRaw']===null||_0x11a844[_0x251781(0x1cc)]===''),_0xe656fb[_0x251781(0x1a1)](_0x4ec6d6[_0x251781(0x1cc)]!==null&&_0x4ec6d6['endpointUrlRaw']!==''&&(_0x11a844[_0x251781(0x1cc)]===null||_0x11a844['endpointUrlRaw']===''))),{'allMatch':_0x5dbf13[_0x251781(0x1f6)](Boolean),'provesChange':_0xe656fb[_0x251781(0x203)](Boolean),'verifiedFields':_0x400ca1};}export function validateNotificationDeleteReadback(_0x5db92b,_0x5a8cbb,_0x15b108){const _0x3753a1=a140_0x44f68b;for(const [_0x17d30c,_0x2d2ca1]of _0x5db92b[_0x3753a1(0x1af)]()){if(!Number['isSafeInteger'](_0x2d2ca1['id'])||_0x2d2ca1['id']<=0x0)throw notificationError(_0x3753a1(0x1aa),_0x3753a1(0x1ce)+(_0x17d30c+0x1)+_0x3753a1(0x20f));if(_0x2d2ca1[_0x3753a1(0x1cf)]!==_0x5a8cbb)throw notificationError(_0x3753a1(0x1aa),_0x3753a1(0x1ce)+(_0x17d30c+0x1)+_0x3753a1(0x1a0));if(_0x2d2ca1[_0x3753a1(0x1ea)]!==_0x15b108)throw notificationError(_0x3753a1(0x1aa),'Notification\x20config\x20list\x20item\x20'+(_0x17d30c+0x1)+_0x3753a1(0x1f7));}}export function safeApiFailure(_0x53286e,_0x26178b,_0x4886eb){const _0x15e3ca=a140_0x44f68b;return notificationError(_0x15e3ca(0x1b6)+_0x53286e+'_'+(_0x26178b==='mutation'?_0x15e3ca(0x1e1):_0x26178b+_0x15e3ca(0x1ad)),_0x15e3ca(0x1a3)+_0x53286e+'\x20'+_0x26178b+_0x15e3ca(0x20e),_0x4886eb);}export function notificationLookupCommand(_0x1c5ca9,_0x1b2d81){const _0x31d6ce=a140_0x44f68b;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x1c5ca9+_0x31d6ce(0x201)+_0x1b2d81+'\x20--format\x20compress';}function validateNotificationDocument(_0x13766b,_0xafc204){const _0x7e0f8b=a140_0x44f68b;for(const _0x4342a3 of Object[_0x7e0f8b(0x207)](_0x13766b)){if(FORBIDDEN_IDENTITY_FIELDS[_0x7e0f8b(0x1a7)](_0x4342a3))throw notificationError(_0x7e0f8b(0x1d9),_0x7e0f8b(0x194)+_0x4342a3+_0x7e0f8b(0x1a9));if(!ALLOWED_INPUT_FIELDS[_0x7e0f8b(0x1a7)](_0x4342a3))throw notificationError(_0x7e0f8b(0x1a8),_0x7e0f8b(0x216)+_0x4342a3+'\x22.');}if(_0xafc204===_0x7e0f8b(0x1ac)&&Object[_0x7e0f8b(0x207)](_0x13766b)[_0x7e0f8b(0x215)]===0x0)throw notificationError(_0x7e0f8b(0x1e9),_0x7e0f8b(0x1f4));const _0x1eb247={};if(hasOwn(_0x13766b,_0x7e0f8b(0x19d)))_0x1eb247[_0x7e0f8b(0x19d)]=validateRequiredString(_0x13766b['configName'],'configName',0x80);else{if(_0xafc204==='create')throw notificationError(_0x7e0f8b(0x1bb),'Create\x20JSON\x20requires\x20field\x20'+_0x7e0f8b(0x1ff));}if(hasOwn(_0x13766b,'channelType')){if(typeof _0x13766b[_0x7e0f8b(0x1ea)]!==_0x7e0f8b(0x1ed))throw invalidFieldType(_0x7e0f8b(0x1ea),'a\x20supported\x20string');const _0x2a1d4b=_0x13766b[_0x7e0f8b(0x1ea)][_0x7e0f8b(0x1ae)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x2a1d4b))throw notificationError('notification_config_field_invalid',_0x7e0f8b(0x1c4),_0x7e0f8b(0x1b3)+NOTIFICATION_CHANNEL_TYPES[_0x7e0f8b(0x195)](',\x20')+'.');_0x1eb247[_0x7e0f8b(0x1ea)]=_0x2a1d4b;}else{if(_0xafc204==='create')throw notificationError(_0x7e0f8b(0x1bb),_0x7e0f8b(0x1ab)+_0x7e0f8b(0x1bd));}for(const [_0x4d59df,_0x4c764c]of[[_0x7e0f8b(0x19e),0x200],[_0x7e0f8b(0x20b),0x100]]){if(!hasOwn(_0x13766b,_0x4d59df))continue;const _0x30f782=_0x13766b[_0x4d59df];if(_0x30f782!==null&&typeof _0x30f782!==_0x7e0f8b(0x1ed))throw invalidFieldType(_0x4d59df,_0x7e0f8b(0x1d2));if(typeof _0x30f782==='string'&&_0x30f782[_0x7e0f8b(0x215)]>_0x4c764c)throw notificationError(_0x7e0f8b(0x206),_0x7e0f8b(0x194)+_0x4d59df+_0x7e0f8b(0x1d7)+_0x4c764c+_0x7e0f8b(0x1f2));_0x1eb247[_0x4d59df]=_0x30f782;}if(hasOwn(_0x13766b,_0x7e0f8b(0x1c9))){const _0xbc2670=_0x13766b[_0x7e0f8b(0x1c9)];if(_0xbc2670===null&&_0xafc204==='create')throw invalidFieldType(_0x7e0f8b(0x1c9),_0x7e0f8b(0x20c));if(_0xbc2670!==null&&!isJsonObject(_0xbc2670))throw invalidFieldType(_0x7e0f8b(0x1c9),_0xafc204===_0x7e0f8b(0x1ac)?_0x7e0f8b(0x1da):_0x7e0f8b(0x20c));_0xbc2670!==null&&validateChannelConfigFields(_0x1eb247['channelType'],_0xbc2670),_0x1eb247['channelConfig']=_0xbc2670;}for(const _0x398caf of[_0x7e0f8b(0x1eb),'readTimeout']){if(!hasOwn(_0x13766b,_0x398caf))continue;const _0x5bcb76=_0x13766b[_0x398caf];if(_0x5bcb76!==null&&(!Number[_0x7e0f8b(0x1d4)](_0x5bcb76)||_0x5bcb76<0x0))throw notificationError('notification_config_field_invalid',_0x7e0f8b(0x194)+_0x398caf+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x1eb247[_0x398caf]=_0x5bcb76;}return _0x1eb247;}function validateRequiredString(_0x30b755,_0x8e6df4,_0x560c2f){const _0x459737=a140_0x44f68b;if(typeof _0x30b755!=='string')throw invalidFieldType(_0x8e6df4,_0x459737(0x214));const _0x5cc003=_0x30b755[_0x459737(0x1ae)]();if(!_0x5cc003)throw notificationError(_0x459737(0x206),_0x459737(0x194)+_0x8e6df4+_0x459737(0x1f9));if(_0x5cc003[_0x459737(0x215)]>_0x560c2f)throw notificationError('notification_config_field_invalid',_0x459737(0x194)+_0x8e6df4+_0x459737(0x1d7)+_0x560c2f+_0x459737(0x1f2));return _0x5cc003;}function validateChannelConfigFields(_0x1faa68,_0x1bd492){const _0x425849=a140_0x44f68b;if(hasOwn(_0x1bd492,_0x425849(0x20a)))throw forbiddenChannelConfigField(_0x425849(0x20a));if(_0x1faa68===_0x425849(0x1be))for(const _0x4ae7b6 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x1bd492,_0x4ae7b6))throw forbiddenChannelConfigField(_0x4ae7b6);}}function forbiddenChannelConfigField(_0x418709){const _0x1b1eac=a140_0x44f68b;return notificationError('notification_config_channel_field_forbidden',_0x1b1eac(0x204)+_0x418709+_0x1b1eac(0x1fc));}function invalidFieldType(_0x5d0a87,_0x5e8bcf){return notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x5d0a87+'\x22\x20must\x20be\x20'+_0x5e8bcf+'.');}function serializeChannelConfig(_0x4f29e3){return _0x4f29e3===null||_0x4f29e3===undefined?null:JSON['stringify'](_0x4f29e3);}function redactSensitive(_0x563e99){return _0x563e99===null||_0x563e99===undefined||_0x563e99===''?null:'<redacted>';}function requireResponseString(_0x150572,_0x2e6b3a,_0x407725){const _0x455c6a=a140_0x44f68b;if(typeof _0x150572!==_0x455c6a(0x1ed)||_0x150572[_0x455c6a(0x1ae)]()==='')throw CliErrors[_0x455c6a(0x1b4)](_0x455c6a(0x1d3),'Item\x20'+(_0x407725+0x1)+_0x455c6a(0x1d6)+_0x2e6b3a+'\x22.');return _0x150572[_0x455c6a(0x1ae)]();}function requireExactString(_0x3c2528,_0x11d0d6,_0x2fd26e){const _0x31094a=a140_0x44f68b;if(typeof _0x3c2528!==_0x31094a(0x1ed)||_0x3c2528[_0x31094a(0x1ae)]()==='')throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x2fd26e+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x11d0d6+'\x22.');return _0x3c2528[_0x31094a(0x1ae)]();}function responseNullableString(_0x377842,_0x2bda90,_0x3ec668){const _0x3fea37=a140_0x44f68b;if(_0x377842===undefined||_0x377842===null)return null;if(typeof _0x377842!==_0x3fea37(0x1ed))throw notificationError('notification_config_response_invalid',_0x3fea37(0x1a3)+_0x3ec668+_0x3fea37(0x1db)+_0x2bda90+'\x22.');return _0x377842;}function responseNullableTimeout(_0x27ae9e,_0x5d4c9b,_0x2a5b02){const _0x1c4e88=a140_0x44f68b;if(_0x27ae9e===undefined||_0x27ae9e===null)return null;if(!Number['isSafeInteger'](_0x27ae9e)||_0x27ae9e<0x0)throw notificationError(_0x1c4e88(0x1aa),_0x1c4e88(0x1a3)+_0x2a5b02+_0x1c4e88(0x1db)+_0x5d4c9b+'\x22.');return _0x27ae9e;}function normalizeNullableString(_0x2af64){const _0x490a86=a140_0x44f68b;return typeof _0x2af64===_0x490a86(0x1ed)?_0x2af64:null;}function isJsonObject(_0x279a6b){const _0x1f6026=a140_0x44f68b;return _0x279a6b!==null&&typeof _0x279a6b===_0x1f6026(0x205)&&!Array[_0x1f6026(0x1ee)](_0x279a6b);}function hasOwn(_0xb870b5,_0x2407ab){const _0x4f9aae=a140_0x44f68b;return Object[_0x4f9aae(0x1fa)][_0x4f9aae(0x1d1)]['call'](_0xb870b5,_0x2407ab);}async function readStdin(){const _0x126e98=a140_0x44f68b;let _0x2e50e6='';process[_0x126e98(0x1e8)][_0x126e98(0x19b)](_0x126e98(0x1a2));for await(const _0x5a5aec of process[_0x126e98(0x1e8)])_0x2e50e6+=_0x5a5aec;return _0x2e50e6;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a141_0x5758cc=a141_0x3a98;(function(_0x185193,_0x29793f){const _0x22b60b=a141_0x3a98,_0x4b1fe4=_0x185193();while(!![]){try{const _0x1a3ca3=parseInt(_0x22b60b(0x1e2))/0x1*(parseInt(_0x22b60b(0x20d))/0x2)+parseInt(_0x22b60b(0x1e7))/0x3+parseInt(_0x22b60b(0x20f))/0x4+parseInt(_0x22b60b(0x1f5))/0x5*(parseInt(_0x22b60b(0x200))/0x6)+-parseInt(_0x22b60b(0x211))/0x7*(-parseInt(_0x22b60b(0x20b))/0x8)+-parseInt(_0x22b60b(0x201))/0x9+-parseInt(_0x22b60b(0x203))/0xa;if(_0x1a3ca3===_0x29793f)break;else _0x4b1fe4['push'](_0x4b1fe4['shift']());}catch(_0x19c88a){_0x4b1fe4['push'](_0x4b1fe4['shift']());}}}(a141_0x521c,0xc08e8));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a141_0x3a98(_0x447ab6,_0x379e55){_0x447ab6=_0x447ab6-0x1e2;const _0x521cdd=a141_0x521c();let _0x3a98bf=_0x521cdd[_0x447ab6];return _0x3a98bf;}const SUPPORTED_SCENES=[a141_0x5758cc(0x1f2),a141_0x5758cc(0x1e8),a141_0x5758cc(0x1ec),a141_0x5758cc(0x1f9)],SCENE_TO_LEGACY_TYPE={'invoice':a141_0x5758cc(0x1f7),'general':a141_0x5758cc(0x1fa),'form':a141_0x5758cc(0x1fd),'idCard':'IdCard'},SCENE_FLAG={'name':a141_0x5758cc(0x1f6),'type':a141_0x5758cc(0x20c),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':'image-file','type':a141_0x5758cc(0x20c),'description':a141_0x5758cc(0x1f4)},IMAGE_URL_FLAG={'name':a141_0x5758cc(0x1ed),'type':a141_0x5758cc(0x20c),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x3eaed8){const _0x7f1f72=a141_0x5758cc,_0x4601f4=_0x3eaed8[_0x7f1f72(0x1fc)]()['toLowerCase']();if(_0x4601f4==='idcard')return _0x7f1f72(0x1f9);if(_0x4601f4===_0x7f1f72(0x1f2)||_0x4601f4==='general'||_0x4601f4===_0x7f1f72(0x1ec))return _0x4601f4;throw CliErrors[_0x7f1f72(0x1e4)]('Unsupported\x20OCR\x20scene:\x20'+_0x3eaed8+_0x7f1f72(0x20a)+SUPPORTED_SCENES[_0x7f1f72(0x1e3)](',\x20'));}function selectedInputs(_0x1e6ba0){const _0xa6716f=a141_0x5758cc,_0x2cc744=_0x1e6ba0[_0xa6716f(0x212)](_0xa6716f(0x1eb))[_0xa6716f(0x1fc)](),_0x2d7483=_0x1e6ba0[_0xa6716f(0x212)](_0xa6716f(0x1ed))['trim']();return{'imageFile':_0x2cc744,'imageUrl':_0x2d7483,'count':[_0x2cc744,_0x2d7483][_0xa6716f(0x210)](Boolean)[_0xa6716f(0x214)]};}function validateInputSelection(_0x182ff5){const _0x2ec3c6=a141_0x5758cc,_0x46d5a1=selectedInputs(_0x182ff5);if(_0x46d5a1[_0x2ec3c6(0x1e9)]!==0x1)throw CliErrors[_0x2ec3c6(0x1e4)](_0x2ec3c6(0x205));return _0x46d5a1;}function a141_0x521c(){const _0x2c40b7=['\x20OCR','22077FBwpuM','general','count','recognize','image-file','form','image-url','path','filePath','read','GET','invoice','File\x20URL\x20response\x20missing\x20fileUrl.','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','5HLqLOE','scene','Invoice','imageUrl','idCard','General','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','trim','Table','File\x20upload\x20response\x20missing\x20filePath.','fileUrl','108822PMaMmZ','6564933gjdcOt','appCode','11627920voPEGH','toString','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','fileName','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','imageFile','apiError','.\x20Supported\x20scenes:\x20','448jEmkcy','string','36pXtEpj','POST','2343468mGDPPe','filter','162953dkkzoX','str','ocr','length','42553kzBMhs','join','validation','/smartapi/common/uploadFile'];a141_0x521c=function(){return _0x2c40b7;};return a141_0x521c();}function withScene(_0x5d6019,_0x172349,_0x1c32ad){const _0x5173e9=a141_0x5758cc;return{..._0x5d6019,'scene':_0x172349,..._0x1c32ad?{'sourceFile':{'fileName':_0x1c32ad[_0x5173e9(0x206)],'filePath':_0x1c32ad[_0x5173e9(0x1ef)]}}:{}};}const ocrRecognize={'service':a141_0x5758cc(0x213),'command':a141_0x5758cc(0x1ea),'description':'Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','risk':a141_0x5758cc(0x1f0),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0xf5dba4){const _0xa85fb4=a141_0x5758cc,_0x53e51d=normalizeScene(_0xf5dba4[_0xa85fb4(0x212)](_0xa85fb4(0x1f6))),_0x2bffea=SCENE_TO_LEGACY_TYPE[_0x53e51d],_0x31a8c5=validateInputSelection(_0xf5dba4);if(_0x31a8c5[_0xa85fb4(0x1f8)]){const _0x948e57=new URLSearchParams({'url':_0x31a8c5['imageUrl'],'type':_0x2bffea,'appCode':_0xf5dba4[_0xa85fb4(0x202)]});return{'method':_0xa85fb4(0x1f1),'url':'/smartapi/ocr/recognize-text?'+_0x948e57[_0xa85fb4(0x204)](),'description':'Preview:\x20recognize\x20'+_0x53e51d+'\x20OCR\x20from\x20URL'};}const _0x20a411=requireDevelopmentUploadFile(_0x31a8c5[_0xa85fb4(0x208)],_0xa85fb4(0x1eb));return{'method':_0xa85fb4(0x20e),'url':_0xa85fb4(0x1e5),'body':{'steps':[{'method':'POST','url':_0xa85fb4(0x1e5),'body':{'appCode':_0xf5dba4[_0xa85fb4(0x202)],'multipart':{'file':_0x20a411}}},{'method':_0xa85fb4(0x20e),'url':'/smartapi/common/queryFileUrl','body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0xa85fb4(0x1f1),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0xf5dba4[_0xa85fb4(0x202)],'url':_0xa85fb4(0x1fb),'type':_0x2bffea}}]},'description':_0xa85fb4(0x207)+_0x53e51d+_0xa85fb4(0x1e6)};},async 'execute'(_0x4e2426){const _0x1a8d20=a141_0x5758cc,_0x5f1ceb=normalizeScene(_0x4e2426[_0x1a8d20(0x212)](_0x1a8d20(0x1f6))),_0x4c4756=SCENE_TO_LEGACY_TYPE[_0x5f1ceb],_0x14626f=validateInputSelection(_0x4e2426);if(_0x14626f['imageUrl']){const _0x7e14e6=await recognizeDevelopmentOcr(_0x4e2426[_0x1a8d20(0x202)],{'url':_0x14626f[_0x1a8d20(0x1f8)],'type':_0x4c4756});return{'ok':!![],'data':withScene(_0x7e14e6,_0x5f1ceb)};}const _0x531108=requireDevelopmentUploadFile(_0x14626f[_0x1a8d20(0x208)],_0x1a8d20(0x1eb)),_0x15647d=await uploadDevelopmentFile(_0x4e2426[_0x1a8d20(0x202)],_0x531108[_0x1a8d20(0x1ee)]);if(!_0x15647d[_0x1a8d20(0x1ef)])throw CliErrors['apiError'](_0x1a8d20(0x1fe));const _0x27885d=await queryDevelopmentFileUrl(_0x15647d[_0x1a8d20(0x1ef)],{'download':![]});if(!_0x27885d[_0x1a8d20(0x1ff)])throw CliErrors[_0x1a8d20(0x209)](_0x1a8d20(0x1f3));const _0x289097=await recognizeDevelopmentOcr(_0x4e2426[_0x1a8d20(0x202)],{'url':_0x27885d['fileUrl'],'type':_0x4c4756});return{'ok':!![],'data':withScene(_0x289097,_0x5f1ceb,_0x15647d)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a142_0x2428(_0x46da7c,_0x3365dc){_0x46da7c=_0x46da7c-0xbc;const _0x1ee02d=a142_0x1ee0();let _0x2428f2=_0x1ee02d[_0x46da7c];return _0x2428f2;}const a142_0x29bf00=a142_0x2428;(function(_0x3cfcda,_0x2ab1a5){const _0x54ffbc=a142_0x2428,_0x46da3f=_0x3cfcda();while(!![]){try{const _0x49c7bb=-parseInt(_0x54ffbc(0xf8))/0x1+parseInt(_0x54ffbc(0xc2))/0x2+-parseInt(_0x54ffbc(0xec))/0x3*(-parseInt(_0x54ffbc(0xc7))/0x4)+parseInt(_0x54ffbc(0xef))/0x5*(-parseInt(_0x54ffbc(0xdc))/0x6)+parseInt(_0x54ffbc(0xc4))/0x7*(parseInt(_0x54ffbc(0xd7))/0x8)+-parseInt(_0x54ffbc(0xcf))/0x9*(parseInt(_0x54ffbc(0xc9))/0xa)+-parseInt(_0x54ffbc(0xf9))/0xb*(-parseInt(_0x54ffbc(0xd5))/0xc);if(_0x49c7bb===_0x2ab1a5)break;else _0x46da3f['push'](_0x46da3f['shift']());}catch(_0x43c73f){_0x46da3f['push'](_0x46da3f['shift']());}}}(a142_0x1ee0,0xd0580));function a142_0x1ee0(){const _0x3d0e15=['Created\x20Custom\x20Page\x20','length','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','zh-CN','BLANK','316793dOyTqO','407vXrVgV','Custom_page_','isInteger','isNaN','warnings','page-content','en-US','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','pageName\x20cannot\x20exceed\x20100\x20characters.','page-pattern','768078sRbxoA','str','6062lyNQyu','string','menuId','6410968HDWLVx','pageName','20DGbIoV','--page-pattern\x20and\x20--page-content\x20cannot\x20be\x20used\x20together.','pageId','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','number','enableI18n','718479fVvuon','--page-pattern\x20currently\x20supports\x20only\x20BLANK.','menuPath','write','parentMenuId','apiError','32124rBgeDh','\x20and\x20its\x20menu\x20entry.','3904SlqtrN','page\x20create\x20does\x20not\x20accept\x20--page-type.','version','page','createMenu','2358PtMFKu','create','validation','Would\x20create\x20Custom\x20Page\x20','Complete\x20page\x20files\x20as\x20JSON\x20(conflicts\x20with\x20--page-pattern)','appCode','name','/smartapi/webcode/page/create','POST','files','trim','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK\x20or\x20--page-content.','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','Custom\x20Page\x20pattern\x20(currently\x20BLANK;\x20conflicts\x20with\x20--page-content)','parent-menu-id','langs','3WXJdff','input','CUSTOM','14995EBIVse','page-type','stringify','Provide\x20--page-pattern\x20BLANK\x20or\x20--page-content.'];a142_0x1ee0=function(){return _0x3d0e15;};return a142_0x1ee0();}import{APPCODE_FLAG}from'../../commands/common/flags.js';import{buildInitialFiles}from'../../commands/page/custom/template.js';import{createCustomPage,getI18nInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,parseCustomPageContent,validateCustomPageContent}from'./custom/shared.js';const DEFAULT_CUSTOM_PAGE_LANGUAGES=[a142_0x29bf00(0xf6),a142_0x29bf00(0xbe)];export const pageCreate={'service':a142_0x29bf00(0xda),'command':a142_0x29bf00(0xdd),'description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20complete\x20files','risk':a142_0x29bf00(0xd2),'defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a142_0x29bf00(0xf0),'message':a142_0x29bf00(0xd8),'hint':a142_0x29bf00(0xe7)}],'flags':[{'name':a142_0x29bf00(0xe2),'type':a142_0x29bf00(0xc5),'description':a142_0x29bf00(0xf5)},{'name':a142_0x29bf00(0xea),'type':a142_0x29bf00(0xcd),'description':a142_0x29bf00(0xe8)},{'name':a142_0x29bf00(0xc1),'type':a142_0x29bf00(0xc5),'description':a142_0x29bf00(0xe9),'enum':[a142_0x29bf00(0xf7)]},{'name':a142_0x29bf00(0xbd),'type':'string','description':a142_0x29bf00(0xe0)},APPCODE_FLAG],async 'validate'(_0x4838ba){const _0x41a175=a142_0x29bf00,_0x9d7c4e=readPagePattern(_0x4838ba);await validateCustomPageContent(readInput(_0x4838ba,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x9d7c4e)[_0x41a175(0xe5)]);},async 'dryRun'(_0xd49396){const _0x4de411=a142_0x29bf00,{input:_0x16ad0d}=await prepare(_0xd49396);return{'method':_0x4de411(0xe4),'url':_0x4de411(0xe3),'body':{'appCode':_0x16ad0d[_0x4de411(0xe1)],'pageName':_0x16ad0d['pageName'],..._0x16ad0d['parentMenuId']!=null?{'parentMenuId':_0x16ad0d[_0x4de411(0xd3)]}:{},'createMenu':_0x16ad0d[_0x4de411(0xdb)],'codeContent':_0x16ad0d['files']},'description':_0x4de411(0xdf)+JSON[_0x4de411(0xf1)](_0x16ad0d['pageName'])+_0x4de411(0xd6)};},async 'execute'(_0x4b7221){const _0x1c4018=a142_0x29bf00,_0x3ef83a=await prepare(_0x4b7221),_0x3366d5=await createCustomPage(_0x3ef83a[_0x1c4018(0xed)]);if(!Number[_0x1c4018(0xfb)](_0x3366d5[_0x1c4018(0xcb)])||_0x3366d5['pageId']<=0x0)throw CliErrors[_0x1c4018(0xd4)](_0x1c4018(0xbf));return{'ok':!![],'data':buildMutationData(_0x3ef83a,_0x3366d5),'message':_0x1c4018(0xf3)+_0x3366d5['pageId']+'.'};}};async function prepare(_0x373ff6){const _0x4b7512=a142_0x29bf00,_0x204fb8=readPagePattern(_0x373ff6);if(_0x204fb8===null)return{'input':readInput(_0x373ff6,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x204fb8),'warnings':[],'pagePattern':_0x204fb8};let _0x3b2ebd=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x1a0405=[];try{const _0x494ca5=await getI18nInfo(_0x373ff6[_0x4b7512(0xe1)]);_0x494ca5[_0x4b7512(0xce)]&&_0x494ca5[_0x4b7512(0xeb)]?.[_0x4b7512(0xf4)]&&(_0x3b2ebd=_0x494ca5[_0x4b7512(0xeb)]);}catch{_0x1a0405=['Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.'];}return{'input':readInput(_0x373ff6,_0x3b2ebd,_0x204fb8),'warnings':_0x1a0405,'pagePattern':_0x204fb8};}function readPagePattern(_0x1b59f2){const _0xf6aad5=a142_0x29bf00,_0x2e8f5d=_0x1b59f2[_0xf6aad5(0xc3)](_0xf6aad5(0xc1))['trim'](),_0xf45116=_0x1b59f2['str'](_0xf6aad5(0xbd))[_0xf6aad5(0xe6)]()[_0xf6aad5(0xf4)]>0x0;if(_0x2e8f5d&&_0xf45116)throw CliErrors['validation'](_0xf6aad5(0xca));if(_0xf45116)return null;if(!_0x2e8f5d)throw CliErrors[_0xf6aad5(0xde)](_0xf6aad5(0xf2));if(_0x2e8f5d!=='BLANK')throw CliErrors['validation'](_0xf6aad5(0xd0));return _0x2e8f5d;}function readInput(_0x5e7ffd,_0xbd83cb=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x375b16=readPagePattern(_0x5e7ffd)){const _0x2c5c36=a142_0x29bf00,_0x31e19b=_0x5e7ffd[_0x2c5c36(0xc3)](_0x2c5c36(0xe2))['trim']()||_0x2c5c36(0xfa)+Date['now']();if(_0x31e19b[_0x2c5c36(0xf4)]>0x64)throw CliErrors[_0x2c5c36(0xde)](_0x2c5c36(0xc0));const _0xce8c3d=_0x5e7ffd['num'](_0x2c5c36(0xea),NaN),_0x53a210=!Number[_0x2c5c36(0xfc)](_0xce8c3d);if(_0x53a210&&(!Number['isInteger'](_0xce8c3d)||_0xce8c3d<=0x0))throw CliErrors[_0x2c5c36(0xde)](_0x2c5c36(0xcc));return{'appCode':_0x5e7ffd[_0x2c5c36(0xe1)],'pageName':_0x31e19b,..._0x53a210?{'parentMenuId':_0xce8c3d}:{},'createMenu':!![],'files':_0x375b16===null?parseCustomPageContent(_0x5e7ffd[_0x2c5c36(0xc3)]('page-content')):buildInitialFiles(_0x31e19b,_0xbd83cb)};}function buildMutationData(_0x46aae6,_0x5425a4){const _0x1e78ce=a142_0x29bf00,{input:_0x1347c8}=_0x46aae6,_0x28afd7=_0x5425a4&&buildCustomPageDevelopmentUrl(_0x1347c8[_0x1e78ce(0xe1)],_0x5425a4['menuPath']),_0xd6b39a=_0x5425a4&&buildCustomPageEditUrl(_0x1347c8['appCode'],_0x5425a4[_0x1e78ce(0xcb)]);return{'operation':'page.create','pageType':_0x1e78ce(0xee),'pagePattern':_0x46aae6['pagePattern'],'selector':{'appCode':_0x1347c8[_0x1e78ce(0xe1)],'pageName':_0x1347c8[_0x1e78ce(0xc8)]},'before':null,'after':{'pageId':_0x5425a4?.[_0x1e78ce(0xcb)]??null,'pageName':_0x5425a4?.[_0x1e78ce(0xc8)]??_0x1347c8[_0x1e78ce(0xc8)],'appCode':_0x5425a4?.[_0x1e78ce(0xe1)]??_0x1347c8['appCode'],'version':_0x5425a4?.[_0x1e78ce(0xd9)]??null,'menuId':_0x5425a4?.[_0x1e78ce(0xc6)]??null,'menuPath':_0x5425a4?.[_0x1e78ce(0xd1)]??null,'files':_0x5425a4?.[_0x1e78ce(0xe5)]??Object['keys'](_0x1347c8[_0x1e78ce(0xe5)])},'dryRun':_0x5425a4===undefined,'request':_0x1347c8,..._0x28afd7?{'pageUrl':_0x28afd7}:{},..._0xd6b39a?{'editPageUrl':_0xd6b39a}:{},'warnings':[..._0x46aae6[_0x1e78ce(0xbc)],..._0x5425a4&&!_0x28afd7?['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']:[]]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x473267=a143_0x471e;function a143_0x3ea1(){const _0x562adc=['number','getSeconds','getMinutes','166523CFULwb','22373615AwjLeW','98204UNLwjW','custom-detail','258dYFTIH','getFullYear','9933208qCVeAa','getHours','compress','1Qeosdz','trim','getMonth','5883500wurhBd','9KobOzO','join','125WqqZRc','Retrieved\x20Custom\x20Page\x20','appcode','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','padStart','3643644CNgVId','isNaN','2598860LYJQWF','Custom\x20Page\x20ID','read','getTime'];a143_0x3ea1=function(){return _0x562adc;};return a143_0x3ea1();}(function(_0x34633e,_0x280753){const _0x258020=a143_0x471e,_0xdf2b95=_0x34633e();while(!![]){try{const _0x4c84bf=-parseInt(_0x258020(0x131))/0x1*(-parseInt(_0x258020(0x13e))/0x2)+-parseInt(_0x258020(0x13c))/0x3+-parseInt(_0x258020(0x12a))/0x4*(parseInt(_0x258020(0x137))/0x5)+-parseInt(_0x258020(0x12c))/0x6*(-parseInt(_0x258020(0x128))/0x7)+parseInt(_0x258020(0x12e))/0x8*(-parseInt(_0x258020(0x135))/0x9)+-parseInt(_0x258020(0x134))/0xa+parseInt(_0x258020(0x129))/0xb;if(_0x4c84bf===_0x280753)break;else _0xdf2b95['push'](_0xdf2b95['shift']());}catch(_0x4723d1){_0xdf2b95['push'](_0xdf2b95['shift']());}}}(a143_0x3ea1,0xaa68e));function a143_0x471e(_0x2a1834,_0x59a4a6){_0x2a1834=_0x2a1834-0x127;const _0x3ea187=a143_0x3ea1();let _0x471eb3=_0x3ea187[_0x2a1834];return _0x471eb3;}import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':a143_0x473267(0x12b),'description':a143_0x473267(0x13a),'risk':a143_0x473267(0x140),'defaultOutputFormat':a143_0x473267(0x130),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a143_0x473267(0x142),'required':!![],'description':a143_0x473267(0x13f)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x744861){readCustomPageId(_0x744861);},async 'execute'(_0x3d8492){const _0x3aa1ec=a143_0x473267,_0x4371d0=readCustomPageId(_0x3d8492),_0x43dcdb=await getCustomPageSource(_0x4371d0),{bundle:_0x33d2a7,createTime:_0x104c93,updateTime:_0x1719e7,..._0x39089d}=_0x43dcdb,_0x4ccfb3=_0x43dcdb['id']??_0x4371d0,_0x1de6f8=_0x43dcdb['appCode']?.[_0x3aa1ec(0x132)]()||_0x3d8492['str'](_0x3aa1ec(0x139))[_0x3aa1ec(0x132)](),_0x2b636c=buildCustomPageRuntimeUrl(_0x1de6f8,_0x43dcdb['pageCode']),_0xdef82a=buildCustomPageEditUrl(_0x1de6f8,_0x4ccfb3),_0x5b124c=await resolveCustomPageDevelopmentUrl(_0x1de6f8,_0x4ccfb3,_0x3d8492['cookie']);return{'ok':!![],'data':{..._0x39089d,..._0x2b636c?{'runtimePageUrl':_0x2b636c}:{},..._0x5b124c?{'pageUrl':_0x5b124c}:{},..._0xdef82a?{'editPageUrl':_0xdef82a}:{},..._0x104c93==null?{}:{'createTime':formatTime(_0x104c93)},..._0x1719e7==null?{}:{'updateTime':formatTime(_0x1719e7)}},'message':_0x3aa1ec(0x138)+_0x4371d0+'.'};}};function formatTime(_0x2b8e5b){const _0x25566=a143_0x473267,_0x45305a=new Date(_0x2b8e5b);if(Number[_0x25566(0x13d)](_0x45305a[_0x25566(0x141)]()))return String(_0x2b8e5b);const _0x48e8a7=[_0x45305a[_0x25566(0x12d)](),String(_0x45305a[_0x25566(0x133)]()+0x1)[_0x25566(0x13b)](0x2,'0'),String(_0x45305a['getDate']())[_0x25566(0x13b)](0x2,'0')][_0x25566(0x136)]('-'),_0x5442c0=[String(_0x45305a[_0x25566(0x12f)]())['padStart'](0x2,'0'),String(_0x45305a[_0x25566(0x127)]())[_0x25566(0x13b)](0x2,'0'),String(_0x45305a[_0x25566(0x143)]())['padStart'](0x2,'0')]['join'](':');return _0x48e8a7+'\x20'+_0x5442c0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a144_0x5af6c6=a144_0x170b;(function(_0xcef75d,_0x5e0308){const _0x3a4ff0=a144_0x170b,_0x263487=_0xcef75d();while(!![]){try{const _0x4faa4e=-parseInt(_0x3a4ff0(0x1be))/0x1+parseInt(_0x3a4ff0(0x1c0))/0x2*(parseInt(_0x3a4ff0(0x1bd))/0x3)+parseInt(_0x3a4ff0(0x1c5))/0x4+-parseInt(_0x3a4ff0(0x1b0))/0x5+parseInt(_0x3a4ff0(0x1b4))/0x6+parseInt(_0x3a4ff0(0x1c4))/0x7+-parseInt(_0x3a4ff0(0x1b3))/0x8*(parseInt(_0x3a4ff0(0x1b7))/0x9);if(_0x4faa4e===_0x5e0308)break;else _0x263487['push'](_0x263487['shift']());}catch(_0x2e0612){_0x263487['push'](_0x263487['shift']());}}}(a144_0x5f23,0x40732));import{APPCODE_FLAG}from'../../../commands/common/flags.js';function a144_0x170b(_0x21b48f,_0x5515d1){_0x21b48f=_0x21b48f-0x1b0;const _0x5f23c3=a144_0x5f23();let _0x170b45=_0x5f23c3[_0x21b48f];return _0x170b45;}function a144_0x5f23(){const _0x113bf3=['2015650LRSnqy','appCode','path','2120uDATmw','1623198AQjPOM','pageId','page','10971deMyMB','react','Found\x20','cookie','custom-list','type','9DRfkYU','55202gbpvIG','length','93260AjuUjR','flatMap','label','\x20Custom\x20Page(s).','1231167haAqYA','1836196UOvIlB','No\x20Custom\x20Pages\x20found.'];a144_0x5f23=function(){return _0x113bf3;};return a144_0x5f23();}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a144_0x5af6c6(0x1b6),'command':a144_0x5af6c6(0x1bb),'description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':'read','defaultOutputFormat':'compress','structuredErrors':!![],'flags':[APPCODE_FLAG],async 'execute'(_0x44538b){const _0x13f9d6=a144_0x5af6c6,_0x103abc=(await fetchMenuSnapshot(_0x44538b[_0x13f9d6(0x1b1)],_0x44538b[_0x13f9d6(0x1ba)]))['menus'][_0x13f9d6(0x1c1)](_0x1ff0ac=>{const _0x4ce459=_0x13f9d6;if(_0x1ff0ac[_0x4ce459(0x1bc)]!==_0x4ce459(0x1b8)||_0x1ff0ac[_0x4ce459(0x1b5)]==null)return[];const _0xb74426=buildCustomPageDevelopmentUrl(_0x44538b['appCode'],_0x1ff0ac[_0x4ce459(0x1b2)]),_0x250c27=buildCustomPageEditUrl(_0x44538b[_0x4ce459(0x1b1)],_0x1ff0ac[_0x4ce459(0x1b5)]);return[{'pageId':_0x1ff0ac['pageId'],'label':_0x1ff0ac[_0x4ce459(0x1c2)],..._0xb74426?{'pageUrl':_0xb74426}:{},..._0x250c27?{'editPageUrl':_0x250c27}:{}}];});return{'ok':!![],'data':{'pages':_0x103abc},'message':_0x103abc[_0x13f9d6(0x1bf)]===0x0?_0x13f9d6(0x1c6):_0x13f9d6(0x1b9)+_0x103abc[_0x13f9d6(0x1bf)]+_0x13f9d6(0x1c3)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a145_0x1554(){const _0x16092a=['2523775DKRMBh','trim','push','Published\x20Custom\x20Page\x20','apiError','pageId','remark','111aKSMVG','str','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','/smartapi/webcode/file/publish','37274aaWyTd','FORMAL','16GsxCgg','runtimePageUrl','isInteger','Would\x20publish\x20Custom\x20Page\x20','POST','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','string','pageCode','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','75213OveRPh','status','warnings','Custom\x20Page\x20ID','compress','5071032RvMbeD','custom-publish','4089659CBgFDD','write','1781584tCOMbm','Optional\x20publish\x20remark','number','1852938Yvzwpr','page.custom-publish'];a145_0x1554=function(){return _0x16092a;};return a145_0x1554();}const a145_0x491c37=a145_0x4bf6;(function(_0x4b9363,_0x764084){const _0x2bff88=a145_0x4bf6,_0xb8d638=_0x4b9363();while(!![]){try{const _0x5ba0bc=-parseInt(_0x2bff88(0xad))/0x1+-parseInt(_0x2bff88(0xa2))/0x2*(parseInt(_0x2bff88(0x9e))/0x3)+-parseInt(_0x2bff88(0xb6))/0x4+parseInt(_0x2bff88(0xbb))/0x5+-parseInt(_0x2bff88(0xb9))/0x6+parseInt(_0x2bff88(0xb4))/0x7*(parseInt(_0x2bff88(0xa4))/0x8)+parseInt(_0x2bff88(0xb2))/0x9;if(_0x5ba0bc===_0x764084)break;else _0xb8d638['push'](_0xb8d638['shift']());}catch(_0x1853ee){_0xb8d638['push'](_0xb8d638['shift']());}}}(a145_0x1554,0xaf36c));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a145_0x4bf6(_0x328a70,_0x17e1e5){_0x328a70=_0x328a70-0x9e;const _0x1554eb=a145_0x1554();let _0x4bf6d1=_0x1554eb[_0x328a70];return _0x4bf6d1;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':'page','command':a145_0x491c37(0xb3),'description':a145_0x491c37(0xa0),'risk':a145_0x491c37(0xb5),'defaultOutputFormat':a145_0x491c37(0xb1),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a145_0x491c37(0xb8),'required':!![],'description':a145_0x491c37(0xb0)},{'name':'remark','type':a145_0x491c37(0xaa),'description':a145_0x491c37(0xb7)}],async 'validate'(_0x166478){readCustomPageId(_0x166478);},async 'dryRun'(_0x18dadd){const _0x4b640c=a145_0x491c37,_0x51a11f=readInput(_0x18dadd);return{'method':_0x4b640c(0xa8),'url':_0x4b640c(0xa1),'body':{'id':_0x51a11f[_0x4b640c(0xc0)],..._0x51a11f['remark']?{'remark':_0x51a11f[_0x4b640c(0xc1)]}:{}},'description':_0x4b640c(0xa7)+_0x51a11f[_0x4b640c(0xc0)]+'.'};},async 'execute'(_0x4774c1){const _0x13f408=a145_0x491c37,_0x53e3ac=readInput(_0x4774c1);await getCustomPageSource(_0x53e3ac[_0x13f408(0xc0)]);const _0x5bc7d2=await publishCustomPage(_0x53e3ac);if(!Number[_0x13f408(0xa6)](_0x5bc7d2)||_0x5bc7d2!==_0x53e3ac[_0x13f408(0xc0)])throw CliErrors[_0x13f408(0xbf)](_0x13f408(0xac));const _0x49429e=await getCustomPageSource(_0x53e3ac[_0x13f408(0xc0)]);if(_0x49429e[_0x13f408(0xae)]!==_0x13f408(0xa3))throw CliErrors[_0x13f408(0xbf)]('Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x49429e['status']??'unknown')+'.');const _0x42cd68=_0x49429e['appCode']?.[_0x13f408(0xbc)](),_0x1c9872=buildCustomPageEditUrl(_0x42cd68,_0x53e3ac[_0x13f408(0xc0)]),_0xfc0054=await resolveCustomPageDevelopmentUrl(_0x42cd68,_0x53e3ac[_0x13f408(0xc0)],_0x4774c1['cookie']),_0x590396=buildMutationData(_0x53e3ac,!![],_0xfc0054,_0x1c9872);_0x42cd68&&!_0xfc0054&&_0x590396[_0x13f408(0xaf)][_0x13f408(0xbd)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x394f17=buildCustomPageRuntimeUrl(_0x49429e['appCode'],_0x49429e[_0x13f408(0xab)]);return _0x394f17?_0x590396[_0x13f408(0xa5)]=_0x394f17:_0x590396[_0x13f408(0xaf)]['push'](_0x13f408(0xa9)),{'ok':!![],'data':_0x590396,'message':_0x13f408(0xbe)+_0x53e3ac[_0x13f408(0xc0)]+'.'};}};function readInput(_0xc683a6){const _0x316499=a145_0x491c37,_0x3a1493=readCustomPageId(_0xc683a6),_0xd209d1=_0xc683a6[_0x316499(0x9f)](_0x316499(0xc1))[_0x316499(0xbc)]();return{'pageId':_0x3a1493,..._0xd209d1?{'remark':_0xd209d1}:{}};}function buildMutationData(_0xdf4d08,_0xf0a2fc=![],_0x1bc879,_0x50f71c){const _0x114325=a145_0x491c37;return{'operation':_0x114325(0xba),'selector':{'pageId':_0xdf4d08[_0x114325(0xc0)]},'before':null,'after':{'pageId':_0xdf4d08[_0x114325(0xc0)],'status':_0x114325(0xa3)},'dryRun':!_0xf0a2fc,'request':_0xdf4d08,..._0x1bc879?{'pageUrl':_0x1bc879}:{},..._0x50f71c?{'editPageUrl':_0x50f71c}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0xd88a0a=a146_0x4427;function a146_0x1959(){const _0x585268=['find','validation','2191002yacFvC','join','2690495SDWSIy','trim','parse','message','length','--page-content\x20must\x20be\x20valid\x20JSON.','898582mHiAKv','--id\x20must\x20be\x20a\x20positive\x20integer.','isInteger','path','object','/pages/','6bQIIBP','isArray','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','map','2699220ueUnQB','7600656Zhplsu','pageId','type','string','num','some','/ide/','flagMissing','217542ghfEuO','11452312qtXwbQ'];a146_0x1959=function(){return _0x585268;};return a146_0x1959();}(function(_0x2562ef,_0x402136){const _0xb47819=a146_0x4427,_0x1c8c70=_0x2562ef();while(!![]){try{const _0x300bf9=parseInt(_0xb47819(0x123))/0x1+-parseInt(_0xb47819(0x117))/0x2+parseInt(_0xb47819(0x11b))/0x3+-parseInt(_0xb47819(0x10e))/0x4+parseInt(_0xb47819(0x11d))/0x5*(-parseInt(_0xb47819(0x10a))/0x6)+-parseInt(_0xb47819(0x10f))/0x7+parseInt(_0xb47819(0x118))/0x8;if(_0x300bf9===_0x402136)break;else _0x1c8c70['push'](_0x1c8c70['shift']());}catch(_0x238858){_0x1c8c70['push'](_0x1c8c70['shift']());}}}(a146_0x1959,0x9f6ac));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':a146_0xd88a0a(0x10c)};function trimOptional(_0x5671cf){const _0x13acf6=a146_0xd88a0a;return _0x5671cf?.[_0x13acf6(0x11e)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x2fb106,_0x4efab2){const _0x69f5ef=trimOptional(_0x2fb106),_0x5232ee=trimOptional(_0x4efab2);if(!_0x69f5ef||!_0x5232ee)return undefined;return getPublishedAppDomain(_0x69f5ef)+'/'+encodeURIComponent(_0x5232ee);}export function buildCustomPageDevelopmentUrl(_0x3f8633,_0x72b1d){const _0x56b2dd=a146_0xd88a0a,_0x570b82=trimOptional(_0x3f8633),_0x4000b2=trimOptional(_0x72b1d);if(!_0x570b82||!_0x4000b2)return undefined;return getAppBaseUrl(_0x570b82)+_0x56b2dd(0x109)+encodeURIComponent(_0x4000b2);}function a146_0x4427(_0x2e57c3,_0x5ac2a4){_0x2e57c3=_0x2e57c3-0x105;const _0x195929=a146_0x1959();let _0x442748=_0x195929[_0x2e57c3];return _0x442748;}export async function resolveCustomPageDevelopmentUrl(_0x56997d,_0x34c38c,_0x68630d){const _0xb4ae7=a146_0xd88a0a,_0x980afc=trimOptional(_0x56997d);if(!_0x980afc)return undefined;try{const _0x215a1a=(await fetchMenuSnapshot(_0x980afc,_0x68630d))['menus'][_0xb4ae7(0x119)](_0x1e1d7e=>_0x1e1d7e[_0xb4ae7(0x111)]==='react'&&_0x1e1d7e[_0xb4ae7(0x110)]===_0x34c38c);return buildCustomPageDevelopmentUrl(_0x980afc,_0x215a1a?.[_0xb4ae7(0x107)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x4e3969,_0x2c8365){const _0x2b8605=a146_0xd88a0a,_0x309c8d=trimOptional(_0x4e3969);if(!_0x309c8d)return;const _0x22aab8=trimOptional(_0x2c8365==null?undefined:String(_0x2c8365));if(!_0x22aab8)return;return getAppBaseUrl(_0x309c8d)+_0x2b8605(0x115)+encodeURIComponent(_0x22aab8);}export function parseCustomPageContent(_0x1ec1d8){const _0x20825c=a146_0xd88a0a;if(!_0x1ec1d8[_0x20825c(0x11e)]())throw CliErrors[_0x20825c(0x116)]('page-content');let _0x1bb0a8;try{_0x1bb0a8=JSON[_0x20825c(0x11f)](_0x1ec1d8);}catch{throw CliErrors['validation'](_0x20825c(0x122));}if(typeof _0x1bb0a8!==_0x20825c(0x108)||_0x1bb0a8===null||Array[_0x20825c(0x10b)](_0x1bb0a8)||Object['values'](_0x1bb0a8)[_0x20825c(0x114)](_0x4814cd=>typeof _0x4814cd!==_0x20825c(0x112)))throw CliErrors['validation']('--page-content\x20must\x20be\x20a\x20JSON\x20object\x20whose\x20values\x20are\x20file\x20content\x20strings.');return _0x1bb0a8;}export async function validateCustomPageContent(_0x2de55c){const _0x213d42=a146_0xd88a0a,_0x30e704=await validateCustomPageSourceFiles(_0x2de55c);if(_0x30e704[_0x213d42(0x121)]>0x0)throw CliErrors[_0x213d42(0x11a)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x30e704[_0x213d42(0x10d)](_0x5ceb5d=>_0x5ceb5d['file']+':\x20'+_0x5ceb5d[_0x213d42(0x120)])[_0x213d42(0x11c)](';\x20'));}export function readCustomPageId(_0x25c9e4){const _0x417d7f=a146_0xd88a0a,_0x1da4be=_0x25c9e4[_0x417d7f(0x113)]('id');if(!Number[_0x417d7f(0x106)](_0x1da4be)||_0x1da4be<=0x0)throw CliErrors[_0x417d7f(0x11a)](_0x417d7f(0x105));return _0x1da4be;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a147_0x5351(_0x50fa72,_0x186270){_0x50fa72=_0x50fa72-0xce;const _0x5ecfec=a147_0x5ecf();let _0x535112=_0x5ecfec[_0x50fa72];return _0x535112;}const a147_0xac55b4=a147_0x5351;(function(_0x53728e,_0x20f189){const _0x1c7221=a147_0x5351,_0x5913a2=_0x53728e();while(!![]){try{const _0x5b18ab=parseInt(_0x1c7221(0xe2))/0x1*(-parseInt(_0x1c7221(0xd9))/0x2)+parseInt(_0x1c7221(0xd1))/0x3+-parseInt(_0x1c7221(0xe5))/0x4+parseInt(_0x1c7221(0xcf))/0x5*(-parseInt(_0x1c7221(0xe4))/0x6)+-parseInt(_0x1c7221(0xd3))/0x7*(parseInt(_0x1c7221(0xdd))/0x8)+parseInt(_0x1c7221(0xd4))/0x9*(parseInt(_0x1c7221(0xdf))/0xa)+parseInt(_0x1c7221(0xd5))/0xb*(parseInt(_0x1c7221(0xd6))/0xc);if(_0x5b18ab===_0x20f189)break;else _0x5913a2['push'](_0x5913a2['shift']());}catch(_0x4e1ea0){_0x5913a2['push'](_0x5913a2['shift']());}}}(a147_0x5ecf,0xc3a89));import{format}from'prettier';const SOURCE_PARSERS={'.js':a147_0xac55b4(0xde),'.jsx':a147_0xac55b4(0xde),'.ts':'typescript','.tsx':a147_0xac55b4(0xda)},CUSTOM_PAGE_EXTENSIONS=['.jsx','.tsx'];export async function validateCustomPageSourceFiles(_0x10186c){const _0x12107f=a147_0xac55b4,_0x1e76a7=Object[_0x12107f(0xd0)](_0x10186c)[_0x12107f(0xe6)](([_0x42e0e5])=>getParser(_0x42e0e5));if(!_0x1e76a7[_0x12107f(0xd7)](([_0x15afac])=>isReactSourceFile(_0x15afac)))return[{'file':_0x12107f(0xdc),'message':_0x12107f(0xdb)}];const _0x41e809=await Promise[_0x12107f(0xd2)](_0x1e76a7[_0x12107f(0xce)](async([_0x51045d,_0x2a9a35])=>{const _0x48177f=_0x12107f;try{return await format(_0x2a9a35,{'parser':getParser(_0x51045d)}),undefined;}catch(_0x574731){return{'file':_0x51045d,'message':_0x574731 instanceof Error?_0x574731[_0x48177f(0xe7)]:String(_0x574731)};}}));return _0x41e809[_0x12107f(0xe6)](_0x536647=>_0x536647!==undefined);}function getParser(_0x24d064){const _0x2d0cb5=a147_0xac55b4,_0x13189e=_0x24d064[_0x2d0cb5(0xe1)]()[_0x2d0cb5(0xe3)]();return Object[_0x2d0cb5(0xd0)](SOURCE_PARSERS)[_0x2d0cb5(0xd8)](([_0x2e629a])=>_0x13189e['endsWith'](_0x2e629a))?.[0x1];}function isReactSourceFile(_0x24b745){const _0x4c654f=a147_0xac55b4,_0x29bf1a=_0x24b745[_0x4c654f(0xe1)]()[_0x4c654f(0xe3)]();return CUSTOM_PAGE_EXTENSIONS[_0x4c654f(0xd7)](_0x3eb63a=>_0x29bf1a[_0x4c654f(0xe0)](_0x3eb63a));}function a147_0x5ecf(){const _0xaaa3c5=['11116882AOvXNP','18vvWFDu','1870319lDJCNR','144eFbnCY','some','find','5076gObRES','typescript','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','page-content','8pXLISL','babel','4439350GRGutX','endsWith','trim','448dJXHDY','toLowerCase','1047498XtJyOX','121040ifGcvT','filter','message','map','5gCozug','entries','2409576TxVAdv','all'];a147_0x5ecf=function(){return _0xaaa3c5;};return a147_0x5ecf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5ac16e,_0x1fb461){const _0x3840d6=a148_0x6682,_0x4d7f15=_0x5ac16e();while(!![]){try{const _0x49d891=parseInt(_0x3840d6(0x1b7))/0x1*(-parseInt(_0x3840d6(0x1c1))/0x2)+parseInt(_0x3840d6(0x1be))/0x3*(-parseInt(_0x3840d6(0x1ba))/0x4)+-parseInt(_0x3840d6(0x1b8))/0x5*(parseInt(_0x3840d6(0x1b0))/0x6)+parseInt(_0x3840d6(0x1c5))/0x7+parseInt(_0x3840d6(0x1c7))/0x8*(parseInt(_0x3840d6(0x1b5))/0x9)+-parseInt(_0x3840d6(0x1bb))/0xa*(parseInt(_0x3840d6(0x1b6))/0xb)+-parseInt(_0x3840d6(0x1c2))/0xc*(-parseInt(_0x3840d6(0x1c4))/0xd);if(_0x49d891===_0x1fb461)break;else _0x4d7f15['push'](_0x4d7f15['shift']());}catch(_0x1b9d74){_0x4d7f15['push'](_0x4d7f15['shift']());}}}(a148_0x4e62,0x2d982));function a148_0x4e62(){const _0x653924=[',\x0a\x20\x20}','8efOUEU','tr-TR','map','6vOsfLO','export\x20const\x20locales\x20=\x20{\x0a','This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.','import\x20React\x20from\x20\x27react\x27;\x0aimport\x20{\x20Card,\x20Typography\x20}\x20from\x20\x27antd\x27;\x0aimport\x20{\x20useSdkClient,\x20useI18n,\x20useNavigate,\x20useLocation\x20}\x20from\x20\x22@/context/app-context\x22;\x0aimport\x20{\x20locales\x20}\x20from\x20\x27../locales\x27;\x0aimport\x20\x27./index.css\x27;\x0a\x0aconst\x20App\x20=\x20()\x20=>\x20{\x0a\x20\x20const\x20client\x20=\x20useSdkClient();\x20//\x20client\x20可以用于获取其他数据集的数据\x0a\x20\x20const\x20$i18n\x20=\x20useI18n();\x20//\x20国际化多语言\x20i18n\x20实例\x0a\x20\x20const\x20navigate\x20=\x20useNavigate();\x20//\x20react-router\x20navigate\x20导航实例\x0a\x20\x20const\x20location\x20=\x20useLocation();\x20//\x20浏览器\x20location\x20实例\x0a\x0a\x20\x20$i18n.addLocale(locales);\x20//\x20添加多语言词包\x0a\x0a\x20\x20return\x20(\x0a\x20\x20\x20\x20<div\x20className=\x22page-container\x22>\x0a\x20\x20\x20\x20\x20\x20<Card>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<Typography>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Title\x20level={2}>{','zh-CN','2491353euzwOf','3774133NpYpSN','1bZjhLk','1848560EYiysY','ja-JP','4kRBdlv','10QkwHvq','id-ID','join','225279sjKJfG','}</Typography.Title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{$i18n.t(\x27pageDescription\x27,\x20\x27这是一个基础页面模板,你可以在此基础上进行开发。\x27)}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</Typography>\x0a\x20\x20\x20\x20\x20\x20</Card>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20);\x0a};\x0a\x0aexport\x20default\x20App;\x0a','\x0a};\x0a','379108cDtWcp','194076IDFKav','stringify','416UKnYDk','2589041rzgvUc'];a148_0x4e62=function(){return _0x653924;};return a148_0x4e62();}function buildIndexFile(_0x31f401){const _0x90b894=a148_0x6682;return _0x90b894(0x1b3)+JSON[_0x90b894(0x1c3)](_0x31f401)+_0x90b894(0x1bf);}function a148_0x6682(_0x90bab4,_0x59a54c){_0x90bab4=_0x90bab4-0x1b0;const _0x4e62ac=a148_0x4e62();let _0x6682ab=_0x4e62ac[_0x90bab4];return _0x6682ab;}function buildStyleFile(){return'.page-container\x20{\x0a\x20\x20padding:\x2024px;\x0a\x20\x20background:\x20#f0f2f5;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a';}function buildLocalesFile(_0xd67f18){const _0x1c4349=a148_0x6682,_0x2591dc=_0xd67f18[_0x1c4349(0x1c9)](_0x5c3947=>{const _0x3fcd4f=_0x1c4349;let _0x35bf00='';switch(_0x5c3947){case _0x3fcd4f(0x1b4):_0x35bf00='这是一个基础页面模板,你可以在此基础上进行开发。';break;case'en-US':_0x35bf00=_0x3fcd4f(0x1b2);break;case _0x3fcd4f(0x1b9):_0x35bf00='これは基本ページテンプレートです。あなたは、これに基づいて開発できます。';break;case _0x3fcd4f(0x1c8):_0x35bf00='Bu\x20bir\x20temel\x20sayfa\x20şablonudur.\x20Bu\x20temaplana\x20dayanarak\x20geliştirilebilir.';break;case _0x3fcd4f(0x1bc):_0x35bf00='Ini\x20adalah\x20sebuah\x20halaman\x20dasar.\x20Anda\x20dapat\x20mengembangkan\x20ini.';break;default:_0x35bf00=_0x3fcd4f(0x1b2);}return'\x20\x20'+JSON[_0x3fcd4f(0x1c3)](_0x5c3947)+':\x20{\x0a\x20\x20\x20\x20'+JSON['stringify']('pageDescription')+':\x20'+JSON['stringify'](_0x35bf00)+_0x3fcd4f(0x1c6);})[_0x1c4349(0x1bd)](',\x0a');return _0x1c4349(0x1b1)+_0x2591dc+_0x1c4349(0x1c0);}export function buildInitialFiles(_0x429292,_0x51d503){return{'src/app/index.jsx':buildIndexFile(_0x429292),'src/app/index.css':buildStyleFile(),'src/locales/index.js':buildLocalesFile(_0x51d503)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a149_0x123941=a149_0x2425;(function(_0x292b17,_0x61d24e){const _0x3afa56=a149_0x2425,_0x159ddf=_0x292b17();while(!![]){try{const _0x1791b5=-parseInt(_0x3afa56(0x1b0))/0x1*(parseInt(_0x3afa56(0x1a7))/0x2)+parseInt(_0x3afa56(0x1b6))/0x3*(parseInt(_0x3afa56(0x1b4))/0x4)+parseInt(_0x3afa56(0x1a2))/0x5+-parseInt(_0x3afa56(0x1ac))/0x6*(-parseInt(_0x3afa56(0x1a8))/0x7)+parseInt(_0x3afa56(0x1a9))/0x8+parseInt(_0x3afa56(0x19f))/0x9+parseInt(_0x3afa56(0x1a1))/0xa*(-parseInt(_0x3afa56(0x1b9))/0xb);if(_0x1791b5===_0x61d24e)break;else _0x159ddf['push'](_0x159ddf['shift']());}catch(_0xebb8b6){_0x159ddf['push'](_0x159ddf['shift']());}}}(a149_0x3bc5,0x6ad02));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';function a149_0x2425(_0x141bed,_0x35b314){_0x141bed=_0x141bed-0x19e;const _0x3bc57a=a149_0x3bc5();let _0x2425d8=_0x3bc57a[_0x141bed];return _0x2425d8;}import{buildCustomPageEditUrl,parseCustomPageContent,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';function a149_0x3bc5(){const _0x5e30b2=['page-content','page','pageId','71532DErWDu','page.custom-update','113310rPdnuv','4326320ScmeFT','number','appcode','appCode','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','293218OqOIuI','211960OUkLLj','5371776veWuvu','pageContent','string','6LaKTmy','validation','cookie','trim','5erzOYm','Custom\x20Page\x20ID','Complete\x20page\x20files\x20as\x20JSON','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','16LTjaVA','/smartapi/webcode/page/update/content','504024KcmPap','newVersion','write','1045PRqeqy','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','str'];a149_0x3bc5=function(){return _0x5e30b2;};return a149_0x3bc5();}export const pageCustomUpdate={'service':a149_0x123941(0x1bd),'command':'custom-update','description':'Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','risk':a149_0x123941(0x1b8),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a149_0x123941(0x1a3),'required':!![],'description':a149_0x123941(0x1b1)},{'name':'page-content','type':a149_0x123941(0x1ab),'required':!![],'description':a149_0x123941(0x1b2)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x591d45){const _0x3c89fb=a149_0x123941;readCustomPageId(_0x591d45),await validateCustomPageContent(parseCustomPageContent(_0x591d45[_0x3c89fb(0x1bb)](_0x3c89fb(0x1bc))));},async 'dryRun'(_0x3997a7){const _0xbc240b=a149_0x123941,_0x3486be=await readInput(_0x3997a7);return{'method':'POST','url':_0xbc240b(0x1b5),'body':{'id':_0x3486be['pageId'],'codeContent':_0x3486be[_0xbc240b(0x1aa)]},'description':_0xbc240b(0x1ba)+_0x3486be['pageId']+'.'};},async 'execute'(_0x2e9b00){const _0x100948=a149_0x123941,_0x581fe5=await readInput(_0x2e9b00),_0x52ed65=await updateCustomPageContent({'pageId':_0x581fe5[_0x100948(0x19e)],'pageContent':_0x581fe5[_0x100948(0x1aa)]});if(!Number['isInteger'](_0x52ed65['newVersion'])||_0x52ed65[_0x100948(0x1b7)]<=0x0)throw CliErrors['apiError'](_0x100948(0x1a6));const _0x2e4be1=buildCustomPageEditUrl(_0x581fe5['appCode'],_0x581fe5[_0x100948(0x19e)]),_0x42d1df=await resolveCustomPageDevelopmentUrl(_0x581fe5['appCode'],_0x581fe5[_0x100948(0x19e)],_0x2e9b00[_0x100948(0x1ae)]);return{'ok':!![],'data':buildMutationData(_0x581fe5,_0x52ed65,_0x42d1df,_0x2e4be1,_0x42d1df?[]:[_0x100948(0x1b3)]),'message':'Updated\x20Custom\x20Page\x20'+_0x581fe5[_0x100948(0x19e)]+'.'};}};async function readInput(_0x6ea462){const _0x2344ca=a149_0x123941,_0x385afd=readCustomPageId(_0x6ea462),_0x5e7520=_0x6ea462['str'](_0x2344ca(0x1a4))['trim']()||(await getCustomPageSource(_0x385afd))['appCode']?.[_0x2344ca(0x1af)]();if(!_0x5e7520)throw CliErrors[_0x2344ca(0x1ad)]('Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20'+_0x385afd+'.');return{'appCode':_0x5e7520,'pageId':_0x385afd,'pageContent':parseCustomPageContent(_0x6ea462[_0x2344ca(0x1bb)](_0x2344ca(0x1bc)))};}function buildMutationData(_0x16b742,_0x2f40bc,_0x4679c1,_0x462470,_0x32b8a5=[]){const _0x35ca89=a149_0x123941;return{'operation':_0x35ca89(0x1a0),'selector':{'appCode':_0x16b742[_0x35ca89(0x1a5)],'pageId':_0x16b742['pageId']},'before':null,'after':{'pageId':_0x2f40bc?.[_0x35ca89(0x19e)]??_0x16b742[_0x35ca89(0x19e)],'version':_0x2f40bc?.['newVersion']??null,'pageContent':_0x16b742['pageContent']},'dryRun':_0x2f40bc===undefined,'request':_0x16b742,..._0x4679c1?{'pageUrl':_0x4679c1}:{},..._0x462470?{'editPageUrl':_0x462470}:{},'warnings':_0x32b8a5};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a150_0x27f260=a150_0x1c08;(function(_0x172149,_0x1a50f){const _0x446f59=a150_0x1c08,_0x2aa471=_0x172149();while(!![]){try{const _0x3f134a=parseInt(_0x446f59(0x76))/0x1*(-parseInt(_0x446f59(0x7e))/0x2)+parseInt(_0x446f59(0x7d))/0x3+-parseInt(_0x446f59(0x88))/0x4+-parseInt(_0x446f59(0x84))/0x5+parseInt(_0x446f59(0x73))/0x6*(parseInt(_0x446f59(0x72))/0x7)+-parseInt(_0x446f59(0x75))/0x8+parseInt(_0x446f59(0x87))/0x9*(parseInt(_0x446f59(0x82))/0xa);if(_0x3f134a===_0x1a50f)break;else _0x2aa471['push'](_0x2aa471['shift']());}catch(_0x11ad6d){_0x2aa471['push'](_0x2aa471['shift']());}}}(a150_0x9e51,0xca84b));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a150_0x1c08(_0xaaecfe,_0x289608){_0xaaecfe=_0xaaecfe-0x71;const _0x9e51aa=a150_0x9e51();let _0x1c0889=_0x9e51aa[_0xaaecfe];return _0x1c0889;}function a150_0x9e51(){const _0x2540d4=['30MVnyWy','code','12600128FWixqj','908461OxrwZw','name','related-pages-fallback','source','nextAction','compress','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','2988165sxgNUm','2EuYhzx','read','appCode','length','142810oVVsKR','relatedPages','3082825qYiZCA','/standard-page-status?appCode=','query-data-list-status','1053UlUtAT','1198520NrDeoD','string','page','2187157TMjvxt'];a150_0x9e51=function(){return _0x2540d4;};return a150_0x9e51();}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a150_0x27f260(0x71),'command':'data-list-status','description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a150_0x27f260(0x7f),'defaultOutputFormat':a150_0x27f260(0x7b),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a150_0x27f260(0x89),'description':a150_0x27f260(0x7c)}],async 'validate'(_0xfb30c6){validateDatasetSelector(_0xfb30c6);},async 'dryRun'(_0x548b98){const _0x33dc52=a150_0x27f260,_0x2260a=await loadDatasetDetailForPage(_0x548b98);return{'method':'GET','url':'/smartapi/lovrabet/dataset/'+_0x2260a['code']+_0x33dc52(0x85)+encodeURIComponent(_0x548b98[_0x33dc52(0x80)]),'description':serializeDryRunDescription({'dataset':{'id':_0x2260a['id'],'code':_0x2260a['code'],'name':_0x2260a[_0x33dc52(0x77)]},'action':_0x33dc52(0x86)})};},async 'execute'(_0x30faa0){const _0x2a2215=a150_0x27f260,_0x2e9726=await loadDatasetDetailForPage(_0x30faa0),_0x49e50f=await loadDataListPageStatusForGenerate(_0x30faa0,_0x2e9726[_0x2a2215(0x74)]),_0x208551=getUndeletedRelatedPages(_0x2e9726),_0x1db428=assessDataListPageState(_0x2e9726['code'],_0x49e50f,{'fallbackUndeletedPages':_0x208551});return{'ok':!![],'data':{'datasetCode':_0x2e9726[_0x2a2215(0x74)],'precheckSource':_0x49e50f?.[_0x2a2215(0x79)]??_0x2a2215(0x78),'status':_0x1db428['status'],'manualResolutionRequired':_0x1db428['manualResolutionRequired'],'nextAction':_0x1db428[_0x2a2215(0x7a)],'dataListPageStatus':_0x49e50f,'relatedPages':{'total':_0x2e9726[_0x2a2215(0x83)][_0x2a2215(0x81)],'undeletedCount':_0x208551[_0x2a2215(0x81)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a151_0x1f7362=a151_0x5f57;(function(_0x5a7481,_0x23a164){const _0x362003=a151_0x5f57,_0x4a084d=_0x5a7481();while(!![]){try{const _0x4a5ee3=-parseInt(_0x362003(0x1c6))/0x1+parseInt(_0x362003(0x1de))/0x2+-parseInt(_0x362003(0x1af))/0x3+parseInt(_0x362003(0x1dd))/0x4+parseInt(_0x362003(0x1c3))/0x5*(-parseInt(_0x362003(0x1da))/0x6)+parseInt(_0x362003(0x1ca))/0x7+-parseInt(_0x362003(0x1b9))/0x8*(-parseInt(_0x362003(0x1bf))/0x9);if(_0x4a5ee3===_0x23a164)break;else _0x4a084d['push'](_0x4a084d['shift']());}catch(_0x40752a){_0x4a084d['push'](_0x4a084d['shift']());}}}(a151_0x4907,0x22c85));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';function a151_0x5f57(_0xb4b6ab,_0x58c685){_0xb4b6ab=_0xb4b6ab-0x1ae;const _0x490723=a151_0x4907();let _0x5f5783=_0x490723[_0xb4b6ab];return _0x5f5783;}import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a151_0x1f7362(0x1be),'command':a151_0x1f7362(0x1b0),'description':'Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':'write','defaultOutputFormat':a151_0x1f7362(0x1c2),'rejectedFlags':[{'name':a151_0x1f7362(0x1c4),'message':a151_0x1f7362(0x1ae),'hint':a151_0x1f7362(0x1d9)},{'name':a151_0x1f7362(0x1c8),'message':a151_0x1f7362(0x1cf),'hint':a151_0x1f7362(0x1df)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a151_0x1f7362(0x1bc),'type':a151_0x1f7362(0x1b7),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a151_0x1f7362(0x1b8),'type':'boolean','description':'Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.'}],async 'validate'(_0x311135){validateDatasetSelector(_0x311135);},async 'dryRun'(_0x27f400){const _0x17c2de=a151_0x1f7362,_0x145fde=await prepare(_0x27f400);return{'method':_0x17c2de(0x1d2),'url':_0x17c2de(0x1c9)+_0x145fde[_0x17c2de(0x1d4)][_0x17c2de(0x1cb)]+_0x17c2de(0x1d5),'body':{'appCode':_0x27f400['appCode'],'clientOperationId':_0x145fde[_0x17c2de(0x1b5)]},'description':serializeDryRunDescription({'dataset':{'id':_0x145fde[_0x17c2de(0x1d4)]['id'],'code':_0x145fde['dataset'][_0x17c2de(0x1cb)],'name':_0x145fde[_0x17c2de(0x1d4)][_0x17c2de(0x1d0)],'fieldCount':_0x145fde[_0x17c2de(0x1d4)][_0x17c2de(0x1db)]},'precheckSource':_0x145fde[_0x17c2de(0x1c5)]?.[_0x17c2de(0x1e0)]??_0x17c2de(0x1b3),'action':_0x17c2de(0x1b0),'clientOperationId':_0x145fde[_0x17c2de(0x1b5)],'plannedStatus':_0x145fde[_0x17c2de(0x1cd)][_0x17c2de(0x1b6)],'reason':_0x145fde[_0x17c2de(0x1cd)][_0x17c2de(0x1ce)]})};},async 'execute'(_0x116224){const _0x4ba90a=a151_0x1f7362;if(!_0x116224['bool']('apply')){const _0x28b13e=await pageGenerateStart['dryRun'](_0x116224);return{'ok':!![],'message':_0x4ba90a(0x1b4),'data':_0x28b13e};}const _0x7872ab=await prepare(_0x116224);if(!_0x7872ab[_0x4ba90a(0x1cd)][_0x4ba90a(0x1dc)])return{'ok':![],'message':_0x7872ab['precheck'][_0x4ba90a(0x1ce)],'data':{'datasetCode':_0x7872ab[_0x4ba90a(0x1d4)][_0x4ba90a(0x1cb)],'pageType':_0x4ba90a(0x1bd),'pagePattern':_0x4ba90a(0x1c0),'clientOperationId':_0x7872ab[_0x4ba90a(0x1b5)],'precheckSource':_0x7872ab['dataListPageStatus']?.[_0x4ba90a(0x1e0)]??_0x4ba90a(0x1b3),'status':_0x7872ab[_0x4ba90a(0x1cd)][_0x4ba90a(0x1b6)],'manualResolutionRequired':_0x7872ab[_0x4ba90a(0x1cd)][_0x4ba90a(0x1d8)],'nextAction':_0x7872ab[_0x4ba90a(0x1cd)][_0x4ba90a(0x1d3)],'query':{'command':buildDataListPageStatusQueryCommand(_0x7872ab['dataset'][_0x4ba90a(0x1cb)],_0x116224[_0x4ba90a(0x1d6)])},'dataListPageStatus':_0x7872ab[_0x4ba90a(0x1c5)]}};const _0x20101c=await startGenerateDataListPages(_0x116224[_0x4ba90a(0x1d6)],_0x7872ab[_0x4ba90a(0x1d4)][_0x4ba90a(0x1cb)],{'clientOperationId':_0x7872ab['clientOperationId']}),_0x26c50f=_0x20101c[_0x4ba90a(0x1b6)]===_0x4ba90a(0x1c7)||_0x20101c[_0x4ba90a(0x1b6)]===_0x4ba90a(0x1d7)?await loadDataListPageStatusForGenerate(_0x116224,_0x7872ab[_0x4ba90a(0x1d4)][_0x4ba90a(0x1cb)]):null,_0x573434=assessGenerateOperationState(_0x7872ab[_0x4ba90a(0x1d4)]['code'],_0x20101c[_0x4ba90a(0x1b6)],_0x26c50f);return{'ok':!![],'message':_0x20101c[_0x4ba90a(0x1ba)]?_0x4ba90a(0x1d1):_0x4ba90a(0x1bb),'data':{'datasetCode':_0x7872ab[_0x4ba90a(0x1d4)]['code'],'appCode':_0x116224[_0x4ba90a(0x1d6)],'pageType':_0x4ba90a(0x1bd),'pagePattern':'CRUD_PAGE_SET','taskId':_0x20101c['taskId']??null,'operationId':_0x20101c['operationId']??null,'clientOperationId':_0x7872ab[_0x4ba90a(0x1b5)],'jobStatus':_0x20101c[_0x4ba90a(0x1b6)]??null,'progressRate':typeof _0x20101c[_0x4ba90a(0x1b2)]===_0x4ba90a(0x1cc)?_0x20101c['progressRate']:null,'currentStep':_0x20101c[_0x4ba90a(0x1b1)]??null,'reused':_0x20101c[_0x4ba90a(0x1ba)]===!![],'status':_0x573434['status'],'manualResolutionRequired':_0x573434[_0x4ba90a(0x1d8)],'nextAction':_0x573434['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x7872ab[_0x4ba90a(0x1d4)][_0x4ba90a(0x1cb)],{'appCode':_0x116224[_0x4ba90a(0x1d6)],'taskId':_0x20101c[_0x4ba90a(0x1e1)],'operationId':_0x20101c[_0x4ba90a(0x1c1)],'clientOperationId':_0x7872ab[_0x4ba90a(0x1b5)]})},'dataListPageStatus':_0x26c50f}};}};function a151_0x4907(){const _0x23f5ad=['309876yZCCcu','640aZlaQU','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','source','taskId','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','535446atRAGR','generate-start','currentStep','progressRate','related-pages-fallback','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','clientOperationId','status','string','apply','506904tEmcPH','reused','Submitted\x20a\x20generate\x20task','alias','DATA_LIST','page','63XPFobs','CRUD_PAGE_SET','operationId','compress','60TRmAjC','page-type','dataListPageStatus','274539JkMTuM','SUCCESS','page-pattern','/smartapi/lovrabet/dataset/','1780212aspEAV','code','number','precheck','message','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','name','Reusing\x20an\x20existing\x20generate\x20task','POST','nextAction','dataset','/generate-standard-pages/start','appCode','PARTIAL_SUCCESS','manualResolutionRequired','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','90078NtQyHR','fieldCount','allowGenerate'];a151_0x4907=function(){return _0x23f5ad;};return a151_0x4907();}async function prepare(_0x282dab){const _0x183c3a=a151_0x1f7362,_0x5d8383=await loadDatasetDetailForPage(_0x282dab),_0x1db3cd=await loadDataListPageStatusForGenerate(_0x282dab,_0x5d8383[_0x183c3a(0x1cb)]),_0x30fc13=getUndeletedRelatedPages(_0x5d8383);return{'dataset':_0x5d8383,'dataListPageStatus':_0x1db3cd,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x5d8383[_0x183c3a(0x1cb)],_0x1db3cd,{'fallbackUndeletedPages':_0x30fc13})};}
|