@lovrabet/rabetbase-cli 2.4.7-beta.2 → 2.5.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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-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_0x2a45bb=a142_0x4318;(function(_0x29543d,_0x5f3f22){const _0x2752e8=a142_0x4318,_0x50d9fc=_0x29543d();while(!![]){try{const _0x2de38a=parseInt(_0x2752e8(0x16a))/0x1+-parseInt(_0x2752e8(0x163))/0x2+parseInt(_0x2752e8(0x14f))/0x3*(-parseInt(_0x2752e8(0x18f))/0x4)+parseInt(_0x2752e8(0x1b9))/0x5*(parseInt(_0x2752e8(0x1a8))/0x6)+-parseInt(_0x2752e8(0x196))/0x7+-parseInt(_0x2752e8(0x1a7))/0x8+parseInt(_0x2752e8(0x1b1))/0x9;if(_0x2de38a===_0x5f3f22)break;else _0x50d9fc['push'](_0x50d9fc['shift']());}catch(_0x18eef9){_0x50d9fc['push'](_0x50d9fc['shift']());}}}(a142_0x47c9,0x41374));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_0x2a45bb(0x1ac),'FEISHU',a142_0x2a45bb(0x1ad),a142_0x2a45bb(0x192),a142_0x2a45bb(0x19c)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a142_0x2a45bb(0x199),a142_0x2a45bb(0x161),'endpointUrl',a142_0x2a45bb(0x171),a142_0x2a45bb(0x17f),a142_0x2a45bb(0x184),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a142_0x2a45bb(0x188),a142_0x2a45bb(0x159),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a142_0x2a45bb(0x153),a142_0x2a45bb(0x174),a142_0x2a45bb(0x187),'replyTo','subjectPrefix',a142_0x2a45bb(0x157),'to','cc']);function a142_0x4318(_0x4d58d0,_0x4d65b5){_0x4d58d0=_0x4d58d0-0x142;const _0x47c9e0=a142_0x47c9();let _0x431822=_0x47c9e0[_0x4d58d0];return _0x431822;}export const NOTIFICATION_INPUT_FLAGS=[{'name':a142_0x2a45bb(0x193),'type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a142_0x2a45bb(0x1b2),'required':![],'default':![],'description':a142_0x2a45bb(0x198)},{'name':a142_0x2a45bb(0x149),'type':a142_0x2a45bb(0x178),'required':![],'description':a142_0x2a45bb(0x1bf)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x1e4e8a,_0x3fbae2,_0x3058aa){return new CliError(_0x1e4e8a,0x1,_0x3fbae2,_0x3058aa);}export function readNotificationId(_0x12b1c0){const _0xc323f0=a142_0x2a45bb,_0x484949=_0x12b1c0['num']('id');if(!Number['isSafeInteger'](_0x484949)||_0x484949<=0x0)throw notificationError('notification_config_id_invalid',_0xc323f0(0x14b));return _0x484949;}export function requireNotificationExplicitYes(_0x2cc0a6){const _0x333352=a142_0x2a45bb;if(_0x2cc0a6['bool']('dry-run')||_0x2cc0a6[_0x333352(0x1b0)](_0x333352(0x152)))return;throw notificationError(_0x333352(0x15a),_0x333352(0x15e),_0x333352(0x1a5));}export function readNotificationChannelType(_0x578925,_0x5f437a=a142_0x2a45bb(0x15f),_0x555fa8=a142_0x2a45bb(0x1ac)){const _0x419e99=a142_0x2a45bb,_0x246d65=_0x578925[_0x419e99(0x156)](_0x5f437a)[_0x419e99(0x189)]()||_0x555fa8;if(!NOTIFICATION_CHANNEL_TYPES[_0x419e99(0x19d)](_0x246d65))throw CliErrors[_0x419e99(0x1a4)](_0x419e99(0x1ba)+_0x5f437a+':\x20'+_0x246d65,_0x419e99(0x164)+NOTIFICATION_CHANNEL_TYPES[_0x419e99(0x1a2)](',\x20')+'.');return _0x246d65;}export function assertSingleNotificationSource(_0x4b144e){const _0x59924c=a142_0x2a45bb,_0xad188d=[],_0x16b4bd=_0x4b144e[_0x59924c(0x156)](_0x59924c(0x193))[_0x59924c(0x189)]();if(_0x16b4bd)_0xad188d[_0x59924c(0x1af)]({'kind':_0x59924c(0x193),'path':_0x16b4bd});if(_0x4b144e[_0x59924c(0x1b0)](_0x59924c(0x172)))_0xad188d[_0x59924c(0x1af)]({'kind':_0x59924c(0x172)});const _0x27a80b=_0x4b144e[_0x59924c(0x156)]('from-env')[_0x59924c(0x189)]();if(_0x27a80b)_0xad188d['push']({'kind':_0x59924c(0x191),'name':_0x27a80b});if(_0xad188d[_0x59924c(0x197)]===0x0)throw CliErrors[_0x59924c(0x1a4)](_0x59924c(0x180),_0x59924c(0x19a));if(_0xad188d[_0x59924c(0x197)]>0x1)throw CliErrors[_0x59924c(0x1a4)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x59924c(0x19a));return _0xad188d[0x0];}export async function readNotificationDocument(_0x300340,_0x4098a0){const _0x5a2a95=a142_0x2a45bb,_0x504ce5=assertSingleNotificationSource(_0x300340),_0x29f0ed=_0x504ce5['kind']===_0x5a2a95(0x193)?_0x5a2a95(0x158)+_0x504ce5[_0x5a2a95(0x150)]:_0x504ce5[_0x5a2a95(0x16e)]===_0x5a2a95(0x191)?_0x5a2a95(0x185)+_0x504ce5['name']:_0x5a2a95(0x172);let _0x54812e;try{if(_0x504ce5[_0x5a2a95(0x16e)]==='file')_0x54812e=await readFile(_0x504ce5['path'],_0x5a2a95(0x17d));else{if(_0x504ce5[_0x5a2a95(0x16e)]==='env'){if(!(_0x504ce5[_0x5a2a95(0x1bd)]in process.env))throw notificationError(_0x5a2a95(0x179),_0x5a2a95(0x1c0)+_0x504ce5[_0x5a2a95(0x1bd)]);_0x54812e=process.env[_0x504ce5.name]??'';}else _0x54812e=await readStdin();}}catch(_0x4d15bc){if(_0x4d15bc instanceof CliError)throw _0x4d15bc;throw notificationError('notification_config_source_unavailable',_0x5a2a95(0x1b7)+_0x29f0ed+'.');}let _0x533213;try{_0x533213=JSON[_0x5a2a95(0x194)](_0x54812e);}catch{throw notificationError(_0x5a2a95(0x175),_0x5a2a95(0x1bb)+_0x29f0ed+'\x20is\x20invalid.',_0x5a2a95(0x19f));}if(!isJsonObject(_0x533213))throw notificationError(_0x5a2a95(0x175),_0x5a2a95(0x1bb)+_0x29f0ed+_0x5a2a95(0x168));return validateNotificationDocument(_0x533213,_0x4098a0);}function a142_0x47c9(){const _0x4c9fa9=['Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','call','\x20characters.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','endpointUrlRaw','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','\x20has\x20an\x20invalid\x20id.','notification_config_response_invalid','\x20has\x20an\x20unsupported\x20channelType.','from-env','stringify','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','a\x20non-empty\x20string','some','a\x20string\x20or\x20null','132PMCBQO','path','Notification\x20config\x20','yes','recipients','channelConfigRaw','\x22\x20must\x20be\x20','str','fromName','file\x20','configCode','notification_config_confirmation_required','Item\x20','notification_config_channel_field_forbidden','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','type','readTimeout','channelType','create','968078jrSKZT','Allowed\x20values:\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','notification_config_update_empty','\x20is\x20missing\x20required\x20field\x20\x22','\x20must\x20be\x20an\x20object.','messageTemplate','92532DUcAoB','Invalid\x20notification\x20config\x20response.','rabetbase\x20notification\x20config-list\x20--appcode\x20','keys','kind','object','\x20has\x20invalid\x20field\x20\x22','channelConfig','stdin','prototype','ccList','notification_config_json_invalid','\x20has\x20an\x20invalid\x20channelType.','Create\x20JSON\x20requires\x20field\x20','string','notification_config_source_unavailable','every','<redacted>','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','utf8','number','description','Missing\x20notification\x20JSON\x20source.','_unavailable','endpointUrl:null','a\x20JSON\x20object\x20or\x20null','connectTimeout','environment\x20variable\x20','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','bccList','appCode','trim','isSafeInteger','Unknown\x20notification\x20JSON\x20field\x20\x22','Notification\x20JSON\x20field\x20\x22','update','Notification\x20config\x20list\x20item\x20','9032GdKXrJ','\x22channelType\x22.','env','WECOM','file','parse','hasOwnProperty','3366720jqgtyj','length','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','configName','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','notification_config_field_invalid','WEBHOOK','includes','isArray','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','endpointUrl','a\x20supported\x20string','join','notification_config_field_unknown','validation','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','createTime','1837976HCYoKp','12eAaoBg','notification_config_','failed','mutation','EMAIL','DINGTALK','notification_config_field_required','push','bool','10492794vFDuLu','boolean','preflight','apiError','\x20--type\x20','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','a\x20JSON\x20object','757060RIctej','Invalid\x20--','Notification\x20JSON\x20from\x20','\x22configName\x22.','name','\x22\x20cannot\x20exceed\x20'];a142_0x47c9=function(){return _0x4c9fa9;};return a142_0x47c9();}export function projectNotificationListConfig(_0x11e24f,_0x5d204d){const _0x151428=a142_0x2a45bb;return{'id':typeof _0x11e24f['id']===_0x151428(0x17e)?_0x11e24f['id']:null,'configCode':requireResponseString(_0x11e24f[_0x151428(0x159)],'configCode',_0x5d204d),'configName':requireResponseString(_0x11e24f[_0x151428(0x199)],_0x151428(0x199),_0x5d204d),'channelType':requireResponseString(_0x11e24f[_0x151428(0x161)],_0x151428(0x161),_0x5d204d),'description':normalizeNullableString(_0x11e24f[_0x151428(0x17f)]),'createTime':normalizeNullableString(_0x11e24f[_0x151428(0x1a6)]),'updateTime':normalizeNullableString(_0x11e24f['updateTime'])};}export function normalizeExactNotificationConfig(_0x371279,_0x166435,_0x184f00){const _0x170399=a142_0x2a45bb;if(!Number[_0x170399(0x18a)](_0x371279['id'])||_0x371279['id']!==_0x166435)throw notificationError(_0x170399(0x147),_0x170399(0x145)+_0x166435+'.');if(_0x371279[_0x170399(0x188)]!==_0x184f00)throw notificationError(_0x170399(0x147),_0x170399(0x151)+_0x166435+_0x170399(0x15d));const _0x16d82a=requireExactString(_0x371279[_0x170399(0x199)],_0x170399(0x199),_0x166435),_0x40870e=requireExactString(_0x371279[_0x170399(0x159)],'configCode',_0x166435),_0x154276=requireExactString(_0x371279[_0x170399(0x161)],_0x170399(0x161),_0x166435);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x154276))throw notificationError(_0x170399(0x147),_0x170399(0x151)+_0x166435+_0x170399(0x148));const _0x278ad3=responseNullableString(_0x371279['endpointUrl'],_0x170399(0x1a0),_0x166435),_0x3bf805=responseNullableString(_0x371279[_0x170399(0x171)],'channelConfig',_0x166435),_0x409d02=responseNullableString(_0x371279[_0x170399(0x17f)],'description',_0x166435),_0x201e65=responseNullableTimeout(_0x371279['connectTimeout'],'connectTimeout',_0x166435),_0x586c1a=responseNullableTimeout(_0x371279[_0x170399(0x160)],'readTimeout',_0x166435);return{'id':_0x166435,'appCode':_0x184f00,'configCode':_0x40870e,'configName':_0x16d82a,'channelType':_0x154276,'endpointUrl':redactSensitive(_0x278ad3),'channelConfig':redactSensitive(_0x3bf805),'description':_0x409d02,'connectTimeout':_0x201e65,'readTimeout':_0x586c1a,'endpointUrlRaw':_0x278ad3,'channelConfigRaw':_0x3bf805};}export async function requireExactNotificationConfig(_0x422f45,_0x110608,_0xff7945){const _0x222f16=a142_0x2a45bb;let _0x18fa82;try{_0x18fa82=await getNotificationChannelConfig(_0x110608,_0x422f45);}catch{throw safeApiFailure(_0xff7945,_0x222f16(0x1b3),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x422f45+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x18fa82,_0x110608,_0x422f45);}export function projectNotificationConfig(_0x59e08b){const _0x7f6629=a142_0x2a45bb;return{'id':_0x59e08b['id']??null,'appCode':_0x59e08b[_0x7f6629(0x188)],'configCode':_0x59e08b[_0x7f6629(0x159)]??null,'configName':_0x59e08b[_0x7f6629(0x199)],'channelType':_0x59e08b[_0x7f6629(0x161)],'endpointUrl':redactSensitive(_0x59e08b[_0x7f6629(0x1a0)]),'channelConfig':redactSensitive(_0x59e08b[_0x7f6629(0x171)]),'description':_0x59e08b[_0x7f6629(0x17f)]??null,'connectTimeout':_0x59e08b[_0x7f6629(0x184)]??null,'readTimeout':_0x59e08b[_0x7f6629(0x160)]??null};}export function notificationSelector(_0x551b32){const _0x3c87f9=a142_0x2a45bb;return{'appCode':_0x551b32[_0x3c87f9(0x188)],'id':_0x551b32['id'],'configCode':_0x551b32[_0x3c87f9(0x159)],'configName':_0x551b32[_0x3c87f9(0x199)],'channelType':_0x551b32[_0x3c87f9(0x161)]};}export function createMutationInput(_0x374943,_0x2dd863){const _0xd89e15=a142_0x2a45bb;return{'appCode':_0x374943,'configName':_0x2dd863[_0xd89e15(0x199)],'channelType':_0x2dd863[_0xd89e15(0x161)],...hasOwn(_0x2dd863,_0xd89e15(0x1a0))?{'endpointUrl':_0x2dd863['endpointUrl']}:{},...hasOwn(_0x2dd863,_0xd89e15(0x171))?{'channelConfig':serializeChannelConfig(_0x2dd863[_0xd89e15(0x171)])}:{},...hasOwn(_0x2dd863,'description')?{'description':_0x2dd863[_0xd89e15(0x17f)]}:{},...hasOwn(_0x2dd863,'connectTimeout')?{'connectTimeout':_0x2dd863[_0xd89e15(0x184)]}:{},...hasOwn(_0x2dd863,_0xd89e15(0x160))?{'readTimeout':_0x2dd863[_0xd89e15(0x160)]}:{}};}export function mergeUpdateInput(_0x1db9ef,_0x7bbb6){const _0x492716=a142_0x2a45bb;return{'id':_0x1db9ef['id'],'appCode':_0x1db9ef[_0x492716(0x188)],'configName':_0x7bbb6['configName']??_0x1db9ef['configName'],'channelType':_0x7bbb6['channelType']??_0x1db9ef['channelType'],'endpointUrl':hasOwn(_0x7bbb6,_0x492716(0x1a0))?_0x7bbb6[_0x492716(0x1a0)]:_0x1db9ef[_0x492716(0x144)],'channelConfig':hasOwn(_0x7bbb6,_0x492716(0x171))?serializeChannelConfig(_0x7bbb6[_0x492716(0x171)]):_0x1db9ef[_0x492716(0x154)],'description':hasOwn(_0x7bbb6,_0x492716(0x17f))?_0x7bbb6[_0x492716(0x17f)]:_0x1db9ef[_0x492716(0x17f)],'connectTimeout':hasOwn(_0x7bbb6,'connectTimeout')?_0x7bbb6[_0x492716(0x184)]:_0x1db9ef[_0x492716(0x184)],'readTimeout':hasOwn(_0x7bbb6,_0x492716(0x160))?_0x7bbb6['readTimeout']:_0x1db9ef[_0x492716(0x160)]};}export function plannedUpdateProjection(_0xb1faac,_0x598f34){const _0x3bdca8=a142_0x2a45bb;return projectNotificationConfig({'id':_0xb1faac['id'],'appCode':_0xb1faac['appCode'],'configCode':_0xb1faac['configCode'],'configName':_0x598f34[_0x3bdca8(0x199)]??_0xb1faac[_0x3bdca8(0x199)],'channelType':_0x598f34[_0x3bdca8(0x161)]??_0xb1faac[_0x3bdca8(0x161)],'endpointUrl':hasOwn(_0x598f34,'endpointUrl')?_0x598f34[_0x3bdca8(0x1a0)]:_0xb1faac[_0x3bdca8(0x144)],'channelConfig':hasOwn(_0x598f34,'channelConfig')?_0x598f34[_0x3bdca8(0x171)]:_0xb1faac[_0x3bdca8(0x154)],'description':hasOwn(_0x598f34,'description')?_0x598f34[_0x3bdca8(0x17f)]:_0xb1faac[_0x3bdca8(0x17f)],'connectTimeout':hasOwn(_0x598f34,'connectTimeout')?_0x598f34[_0x3bdca8(0x184)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0xb1faac[_0x3bdca8(0x184)],'readTimeout':hasOwn(_0x598f34,'readTimeout')?_0x598f34[_0x3bdca8(0x160)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0xb1faac[_0x3bdca8(0x160)]});}export function requestedSafeFieldsMatch(_0x1d7480,_0x3cfe98,_0x9f8d00){const _0x25c255=a142_0x2a45bb,_0x2e9784=[],_0x82fae2=[],_0xdd0af2=[];for(const _0x13c08b of[_0x25c255(0x199),_0x25c255(0x161),'description']){if(!hasOwn(_0x9f8d00,_0x13c08b))continue;_0xdd0af2[_0x25c255(0x1af)](_0x13c08b),_0x2e9784[_0x25c255(0x1af)](_0x3cfe98[_0x13c08b]===_0x9f8d00[_0x13c08b]),_0x82fae2[_0x25c255(0x1af)](_0x1d7480[_0x13c08b]!==_0x9f8d00[_0x13c08b]&&_0x3cfe98[_0x13c08b]===_0x9f8d00[_0x13c08b]);}for(const _0x1fe187 of[_0x25c255(0x184),_0x25c255(0x160)]){if(!hasOwn(_0x9f8d00,_0x1fe187))continue;const _0xc4689b=_0x9f8d00[_0x1fe187]??(_0x1fe187===_0x25c255(0x184)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0xdd0af2[_0x25c255(0x1af)](_0x1fe187),_0x2e9784[_0x25c255(0x1af)](_0x3cfe98[_0x1fe187]===_0xc4689b),_0x82fae2[_0x25c255(0x1af)](_0x1d7480[_0x1fe187]!==_0xc4689b&&_0x3cfe98[_0x1fe187]===_0xc4689b);}return hasOwn(_0x9f8d00,'endpointUrl')&&_0x9f8d00[_0x25c255(0x1a0)]===null&&(_0xdd0af2[_0x25c255(0x1af)](_0x25c255(0x182)),_0x2e9784[_0x25c255(0x1af)](_0x3cfe98[_0x25c255(0x144)]===null||_0x3cfe98[_0x25c255(0x144)]===''),_0x82fae2[_0x25c255(0x1af)](_0x1d7480['endpointUrlRaw']!==null&&_0x1d7480[_0x25c255(0x144)]!==''&&(_0x3cfe98['endpointUrlRaw']===null||_0x3cfe98[_0x25c255(0x144)]===''))),{'allMatch':_0x2e9784[_0x25c255(0x17a)](Boolean),'provesChange':_0x82fae2[_0x25c255(0x14d)](Boolean),'verifiedFields':_0xdd0af2};}export function validateNotificationDeleteReadback(_0x378093,_0x3d0861,_0x1e7e11){const _0x47d2ec=a142_0x2a45bb;for(const [_0x30cf18,_0x33a83e]of _0x378093['entries']()){if(!Number[_0x47d2ec(0x18a)](_0x33a83e['id'])||_0x33a83e['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x47d2ec(0x18e)+(_0x30cf18+0x1)+_0x47d2ec(0x146));if(_0x33a83e['appCode']!==_0x3d0861)throw notificationError(_0x47d2ec(0x147),_0x47d2ec(0x18e)+(_0x30cf18+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x33a83e[_0x47d2ec(0x161)]!==_0x1e7e11)throw notificationError(_0x47d2ec(0x147),_0x47d2ec(0x18e)+(_0x30cf18+0x1)+_0x47d2ec(0x176));}}export function safeApiFailure(_0x3ac3c1,_0x38ae9f,_0x22c241){const _0x16e4e4=a142_0x2a45bb;return notificationError(_0x16e4e4(0x1a9)+_0x3ac3c1+'_'+(_0x38ae9f===_0x16e4e4(0x1ab)?_0x16e4e4(0x1aa):_0x38ae9f+_0x16e4e4(0x181)),'Notification\x20config\x20'+_0x3ac3c1+'\x20'+_0x38ae9f+'\x20failed.',_0x22c241);}export function notificationLookupCommand(_0x4815e1,_0x1ca072){const _0x34a3f4=a142_0x2a45bb;return _0x34a3f4(0x16c)+_0x4815e1+_0x34a3f4(0x1b5)+_0x1ca072+'\x20--format\x20compress';}function validateNotificationDocument(_0x5a63a5,_0x55faff){const _0xb0517e=a142_0x2a45bb;for(const _0x4d2cf9 of Object['keys'](_0x5a63a5)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x4d2cf9))throw notificationError('notification_config_field_forbidden',_0xb0517e(0x18c)+_0x4d2cf9+_0xb0517e(0x17c));if(!ALLOWED_INPUT_FIELDS['has'](_0x4d2cf9))throw notificationError(_0xb0517e(0x1a3),_0xb0517e(0x18b)+_0x4d2cf9+'\x22.');}if(_0x55faff===_0xb0517e(0x18d)&&Object[_0xb0517e(0x16d)](_0x5a63a5)[_0xb0517e(0x197)]===0x0)throw notificationError(_0xb0517e(0x166),_0xb0517e(0x186));const _0xc80ff2={};if(hasOwn(_0x5a63a5,_0xb0517e(0x199)))_0xc80ff2[_0xb0517e(0x199)]=validateRequiredString(_0x5a63a5[_0xb0517e(0x199)],_0xb0517e(0x199),0x80);else{if(_0x55faff===_0xb0517e(0x162))throw notificationError(_0xb0517e(0x1ae),_0xb0517e(0x177)+_0xb0517e(0x1bc));}if(hasOwn(_0x5a63a5,_0xb0517e(0x161))){if(typeof _0x5a63a5[_0xb0517e(0x161)]!==_0xb0517e(0x178))throw invalidFieldType('channelType',_0xb0517e(0x1a1));const _0x455efb=_0x5a63a5['channelType'][_0xb0517e(0x189)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x455efb))throw notificationError(_0xb0517e(0x19b),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0xb0517e(0x1a2)](',\x20')+'.');_0xc80ff2['channelType']=_0x455efb;}else{if(_0x55faff===_0xb0517e(0x162))throw notificationError('notification_config_field_required',_0xb0517e(0x177)+_0xb0517e(0x190));}for(const [_0x192642,_0x18d451]of[[_0xb0517e(0x1a0),0x200],['description',0x100]]){if(!hasOwn(_0x5a63a5,_0x192642))continue;const _0x22f6e1=_0x5a63a5[_0x192642];if(_0x22f6e1!==null&&typeof _0x22f6e1!==_0xb0517e(0x178))throw invalidFieldType(_0x192642,_0xb0517e(0x14e));if(typeof _0x22f6e1===_0xb0517e(0x178)&&_0x22f6e1['length']>_0x18d451)throw notificationError(_0xb0517e(0x19b),'Notification\x20JSON\x20field\x20\x22'+_0x192642+_0xb0517e(0x1be)+_0x18d451+_0xb0517e(0x142));_0xc80ff2[_0x192642]=_0x22f6e1;}if(hasOwn(_0x5a63a5,_0xb0517e(0x171))){const _0x3b4edb=_0x5a63a5['channelConfig'];if(_0x3b4edb===null&&_0x55faff===_0xb0517e(0x162))throw invalidFieldType(_0xb0517e(0x171),_0xb0517e(0x1b8));if(_0x3b4edb!==null&&!isJsonObject(_0x3b4edb))throw invalidFieldType(_0xb0517e(0x171),_0x55faff===_0xb0517e(0x18d)?_0xb0517e(0x183):_0xb0517e(0x1b8));_0x3b4edb!==null&&validateChannelConfigFields(_0xc80ff2[_0xb0517e(0x161)],_0x3b4edb),_0xc80ff2['channelConfig']=_0x3b4edb;}for(const _0x5420ab of[_0xb0517e(0x184),_0xb0517e(0x160)]){if(!hasOwn(_0x5a63a5,_0x5420ab))continue;const _0x18299b=_0x5a63a5[_0x5420ab];if(_0x18299b!==null&&(!Number[_0xb0517e(0x18a)](_0x18299b)||_0x18299b<0x0))throw notificationError(_0xb0517e(0x19b),'Notification\x20JSON\x20field\x20\x22'+_0x5420ab+_0xb0517e(0x1b6));_0xc80ff2[_0x5420ab]=_0x18299b;}return _0xc80ff2;}function validateRequiredString(_0x57c773,_0x2f3498,_0x345e7a){const _0x9bb856=a142_0x2a45bb;if(typeof _0x57c773!=='string')throw invalidFieldType(_0x2f3498,_0x9bb856(0x14c));const _0x597182=_0x57c773['trim']();if(!_0x597182)throw notificationError(_0x9bb856(0x19b),'Notification\x20JSON\x20field\x20\x22'+_0x2f3498+_0x9bb856(0x165));if(_0x597182[_0x9bb856(0x197)]>_0x345e7a)throw notificationError(_0x9bb856(0x19b),_0x9bb856(0x18c)+_0x2f3498+'\x22\x20cannot\x20exceed\x20'+_0x345e7a+_0x9bb856(0x142));return _0x597182;}function validateChannelConfigFields(_0x34c8f0,_0x3d1af4){const _0x221730=a142_0x2a45bb;if(hasOwn(_0x3d1af4,_0x221730(0x169)))throw forbiddenChannelConfigField('messageTemplate');if(_0x34c8f0===_0x221730(0x1ac))for(const _0x532bbe of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x3d1af4,_0x532bbe))throw forbiddenChannelConfigField(_0x532bbe);}}function forbiddenChannelConfigField(_0x32d7ca){const _0x3fb9b0=a142_0x2a45bb;return notificationError(_0x3fb9b0(0x15c),_0x3fb9b0(0x143)+_0x32d7ca+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x4031ba,_0x223699){const _0x1ac056=a142_0x2a45bb;return notificationError(_0x1ac056(0x19b),_0x1ac056(0x18c)+_0x4031ba+_0x1ac056(0x155)+_0x223699+'.');}function serializeChannelConfig(_0x159974){const _0x3a55e1=a142_0x2a45bb;return _0x159974===null||_0x159974===undefined?null:JSON[_0x3a55e1(0x14a)](_0x159974);}function redactSensitive(_0xb26577){const _0x58b43f=a142_0x2a45bb;return _0xb26577===null||_0xb26577===undefined||_0xb26577===''?null:_0x58b43f(0x17b);}function requireResponseString(_0x9a808f,_0x484099,_0x48d354){const _0x2b7d34=a142_0x2a45bb;if(typeof _0x9a808f!==_0x2b7d34(0x178)||_0x9a808f['trim']()==='')throw CliErrors[_0x2b7d34(0x1b4)](_0x2b7d34(0x16b),_0x2b7d34(0x15b)+(_0x48d354+0x1)+_0x2b7d34(0x167)+_0x484099+'\x22.');return _0x9a808f['trim']();}function requireExactString(_0x77f8e1,_0x3bfc22,_0x3c714f){const _0x278bd5=a142_0x2a45bb;if(typeof _0x77f8e1!==_0x278bd5(0x178)||_0x77f8e1[_0x278bd5(0x189)]()==='')throw notificationError('notification_config_response_invalid',_0x278bd5(0x151)+_0x3c714f+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x3bfc22+'\x22.');return _0x77f8e1[_0x278bd5(0x189)]();}function responseNullableString(_0xa0629f,_0x345a04,_0x979cf0){const _0xeae1e0=a142_0x2a45bb;if(_0xa0629f===undefined||_0xa0629f===null)return null;if(typeof _0xa0629f!==_0xeae1e0(0x178))throw notificationError(_0xeae1e0(0x147),'Notification\x20config\x20'+_0x979cf0+_0xeae1e0(0x170)+_0x345a04+'\x22.');return _0xa0629f;}function responseNullableTimeout(_0x782c72,_0x134eb2,_0x2fb82f){const _0x355fe1=a142_0x2a45bb;if(_0x782c72===undefined||_0x782c72===null)return null;if(!Number[_0x355fe1(0x18a)](_0x782c72)||_0x782c72<0x0)throw notificationError(_0x355fe1(0x147),'Notification\x20config\x20'+_0x2fb82f+_0x355fe1(0x170)+_0x134eb2+'\x22.');return _0x782c72;}function normalizeNullableString(_0x3abb52){const _0x3219c6=a142_0x2a45bb;return typeof _0x3abb52===_0x3219c6(0x178)?_0x3abb52:null;}function isJsonObject(_0x1a8de4){const _0x16eea7=a142_0x2a45bb;return _0x1a8de4!==null&&typeof _0x1a8de4===_0x16eea7(0x16f)&&!Array[_0x16eea7(0x19e)](_0x1a8de4);}function hasOwn(_0x57667d,_0x2dda96){const _0x31da1b=a142_0x2a45bb;return Object[_0x31da1b(0x173)][_0x31da1b(0x195)][_0x31da1b(0x1c1)](_0x57667d,_0x2dda96);}async function readStdin(){const _0x3a1d06=a142_0x2a45bb;let _0x296db0='';process['stdin']['setEncoding']('utf8');for await(const _0x78b06f of process[_0x3a1d06(0x172)])_0x296db0+=_0x78b06f;return _0x296db0;}
|
|
1
|
+
const a140_0x8d99eb=a140_0x3db0;(function(_0x2a5018,_0x253130){const _0x4490b1=a140_0x3db0,_0x384898=_0x2a5018();while(!![]){try{const _0x3e0cbd=parseInt(_0x4490b1(0x1af))/0x1+parseInt(_0x4490b1(0x17e))/0x2+parseInt(_0x4490b1(0x157))/0x3*(-parseInt(_0x4490b1(0x159))/0x4)+-parseInt(_0x4490b1(0x13a))/0x5*(parseInt(_0x4490b1(0x15c))/0x6)+parseInt(_0x4490b1(0x1b2))/0x7+-parseInt(_0x4490b1(0x194))/0x8*(parseInt(_0x4490b1(0x16a))/0x9)+parseInt(_0x4490b1(0x199))/0xa*(parseInt(_0x4490b1(0x168))/0xb);if(_0x3e0cbd===_0x253130)break;else _0x384898['push'](_0x384898['shift']());}catch(_0x2d2cbb){_0x384898['push'](_0x384898['shift']());}}}(a140_0x30d3,0xf3479));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=[a140_0x8d99eb(0x137),a140_0x8d99eb(0x1ab),'DINGTALK','WECOM',a140_0x8d99eb(0x17a)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a140_0x8d99eb(0x1ac),a140_0x8d99eb(0x1a5),a140_0x8d99eb(0x1b5),a140_0x8d99eb(0x14d),a140_0x8d99eb(0x185),a140_0x8d99eb(0x1a3),a140_0x8d99eb(0x144)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a140_0x8d99eb(0x18b),'configCode',a140_0x8d99eb(0x17d)]),EMAIL_RECIPIENT_FIELDS=new Set([a140_0x8d99eb(0x193),a140_0x8d99eb(0x16b),a140_0x8d99eb(0x16c),a140_0x8d99eb(0x186),'replyTo',a140_0x8d99eb(0x132),a140_0x8d99eb(0x195),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a140_0x8d99eb(0x17b),'type':a140_0x8d99eb(0x136),'required':![],'description':a140_0x8d99eb(0x17c)},{'name':'stdin','type':a140_0x8d99eb(0x1b1),'required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a140_0x8d99eb(0x14c),'type':a140_0x8d99eb(0x136),'required':![],'description':a140_0x8d99eb(0x158)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a140_0x8d99eb(0x1a9),'required':!![],'description':a140_0x8d99eb(0x192)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a140_0x30d3(){const _0x9b32f=['includes','appCode','str','notification_config_field_forbidden','notification_config_id_invalid','mutation','environment\x20variable\x20','notification_config_source_unavailable','Application-level\x20notification\x20config\x20ID','emailTargets','8aJnTJH','fromName','isSafeInteger','parse','a\x20string\x20or\x20null','48070aKXsrV','Notification\x20config\x20','\x20must\x20be\x20an\x20object.','notification_config_response_invalid','name','rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_','prototype','\x20has\x20an\x20invalid\x20id.','Notification\x20JSON\x20from\x20','connectTimeout','\x20has\x20an\x20invalid\x20channelType.','channelType','\x20is\x20missing\x20required\x20field\x20\x22','validation','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','number','\x20has\x20an\x20invalid\x20appCode.','FEISHU','configName','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x22channelType\x22.','1801426ycTDrB','a\x20JSON\x20object\x20or\x20null','boolean','580048OrFXke','updateTime','\x22\x20must\x20be\x20a\x20non-empty\x20string.','endpointUrl','subjectPrefix','notification_config_field_invalid','\x20--type\x20','apiError','string','EMAIL','create','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','40yClayb','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','push','createTime','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','configCode','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','endpointUrl:null','a\x20supported\x20string','Notification\x20JSON\x20source\x20is\x20ambiguous.','readTimeout','Notification\x20JSON\x20field\x20\x22','env','utf8','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','object','\x20has\x20invalid\x20field\x20\x22','has','from-env','channelConfig','setEncoding','update','join','a\x20JSON\x20object','notification_config_json_invalid','isArray','kind','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Unknown\x20notification\x20JSON\x20field\x20\x22','9WrahWH','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','2146708ZIjDan','\x22\x20must\x20be\x20','notification_config_confirmation_required','562578etHlPW','messageTemplate','_unavailable','Create\x20JSON\x20requires\x20field\x20','\x20characters.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','<redacted>','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','trim','length','call','stringify','4664CxUoUp','entries','5897979PzSLwn','recipients','ccList','Notification\x20config\x20list\x20item\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','type','Notification\x20JSON\x20channelConfig\x20field\x20\x22','some','file\x20','\x20failed.','endpointUrlRaw','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','a\x20non-empty\x20string','stdin','notification_config_field_required','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','WEBHOOK','file','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','channelCode','178962SBiqVq','notification_config_update_empty','num','yes','\x22\x20cannot\x20exceed\x20','Invalid\x20--','keys','description','bccList','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Allowed\x20values:\x20','Invalid\x20notification\x20config\x20response.'];a140_0x30d3=function(){return _0x9b32f;};return a140_0x30d3();}export function notificationError(_0x46a676,_0x1dad98,_0x3c14ec){return new CliError(_0x46a676,0x1,_0x1dad98,_0x3c14ec);}export function readNotificationId(_0x2d8bc3){const _0x56957d=a140_0x8d99eb,_0x1eea3d=_0x2d8bc3[_0x56957d(0x180)]('id');if(!Number[_0x56957d(0x196)](_0x1eea3d)||_0x1eea3d<=0x0)throw notificationError(_0x56957d(0x18e),_0x56957d(0x139));return _0x1eea3d;}export function requireNotificationExplicitYes(_0x11203c){const _0x31ef17=a140_0x8d99eb;if(_0x11203c['bool']('dry-run')||_0x11203c['bool'](_0x31ef17(0x181)))return;throw notificationError(_0x31ef17(0x15b),_0x31ef17(0x148),_0x31ef17(0x13b));}export function readNotificationChannelType(_0x5dde1e,_0x5276ab=a140_0x8d99eb(0x16f),_0xce37fd=a140_0x8d99eb(0x137)){const _0xe43645=a140_0x8d99eb,_0x221620=_0x5dde1e[_0xe43645(0x18c)](_0x5276ab)[_0xe43645(0x164)]()||_0xce37fd;if(!NOTIFICATION_CHANNEL_TYPES[_0xe43645(0x18a)](_0x221620))throw CliErrors[_0xe43645(0x1a7)](_0xe43645(0x183)+_0x5276ab+':\x20'+_0x221620,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0xe43645(0x150)](',\x20')+'.');return _0x221620;}export function assertSingleNotificationSource(_0x3a5ae3){const _0x4584bb=a140_0x8d99eb,_0x528ed7=[],_0x512500=_0x3a5ae3[_0x4584bb(0x18c)]('file')['trim']();if(_0x512500)_0x528ed7[_0x4584bb(0x13c)]({'kind':'file','path':_0x512500});if(_0x3a5ae3['bool']('stdin'))_0x528ed7[_0x4584bb(0x13c)]({'kind':_0x4584bb(0x177)});const _0x2a699e=_0x3a5ae3[_0x4584bb(0x18c)]('from-env')['trim']();if(_0x2a699e)_0x528ed7['push']({'kind':_0x4584bb(0x146),'name':_0x2a699e});if(_0x528ed7[_0x4584bb(0x165)]===0x0)throw CliErrors[_0x4584bb(0x1a7)]('Missing\x20notification\x20JSON\x20source.',_0x4584bb(0x16e));if(_0x528ed7[_0x4584bb(0x165)]>0x1)throw CliErrors[_0x4584bb(0x1a7)](_0x4584bb(0x143),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x528ed7[0x0];}export async function readNotificationDocument(_0x57163c,_0x5a0e04){const _0x132e51=a140_0x8d99eb,_0x1bce88=assertSingleNotificationSource(_0x57163c),_0x36026d=_0x1bce88[_0x132e51(0x154)]===_0x132e51(0x17b)?_0x132e51(0x172)+_0x1bce88['path']:_0x1bce88[_0x132e51(0x154)]===_0x132e51(0x146)?_0x132e51(0x190)+_0x1bce88[_0x132e51(0x19d)]:_0x132e51(0x177);let _0x2eb1a8;try{if(_0x1bce88[_0x132e51(0x154)]===_0x132e51(0x17b))_0x2eb1a8=await readFile(_0x1bce88['path'],_0x132e51(0x147));else{if(_0x1bce88[_0x132e51(0x154)]===_0x132e51(0x146)){if(!(_0x1bce88[_0x132e51(0x19d)]in process.env))throw notificationError(_0x132e51(0x191),_0x132e51(0x175)+_0x1bce88['name']);_0x2eb1a8=process.env[_0x1bce88.name]??'';}else _0x2eb1a8=await readStdin();}}catch(_0x50402c){if(_0x50402c instanceof CliError)throw _0x50402c;throw notificationError('notification_config_source_unavailable',_0x132e51(0x1ad)+_0x36026d+'.');}let _0x2f8f6b;try{_0x2f8f6b=JSON[_0x132e51(0x197)](_0x2eb1a8);}catch{throw notificationError(_0x132e51(0x152),_0x132e51(0x1a2)+_0x36026d+'\x20is\x20invalid.',_0x132e51(0x155));}if(!isJsonObject(_0x2f8f6b))throw notificationError(_0x132e51(0x152),_0x132e51(0x1a2)+_0x36026d+_0x132e51(0x19b));return validateNotificationDocument(_0x2f8f6b,_0x5a0e04);}export function projectNotificationListConfig(_0x16d392,_0x3fa6e9){const _0xb2e954=a140_0x8d99eb;return{'id':typeof _0x16d392['id']===_0xb2e954(0x1a9)?_0x16d392['id']:null,'configCode':requireResponseString(_0x16d392[_0xb2e954(0x13f)],_0xb2e954(0x13f),_0x3fa6e9),'configName':requireResponseString(_0x16d392[_0xb2e954(0x1ac)],_0xb2e954(0x1ac),_0x3fa6e9),'channelType':requireResponseString(_0x16d392[_0xb2e954(0x1a5)],'channelType',_0x3fa6e9),'description':normalizeNullableString(_0x16d392['description']),'createTime':normalizeNullableString(_0x16d392[_0xb2e954(0x13d)]),'updateTime':normalizeNullableString(_0x16d392[_0xb2e954(0x1b3)])};}export function normalizeExactNotificationConfig(_0x3565a1,_0x37aa60,_0x3db4d9){const _0xb49fdf=a140_0x8d99eb;if(!Number[_0xb49fdf(0x196)](_0x3565a1['id'])||_0x3565a1['id']!==_0x37aa60)throw notificationError(_0xb49fdf(0x19c),_0xb49fdf(0x140)+_0x37aa60+'.');if(_0x3565a1[_0xb49fdf(0x18b)]!==_0x3db4d9)throw notificationError(_0xb49fdf(0x19c),'Notification\x20config\x20'+_0x37aa60+_0xb49fdf(0x187));const _0x557511=requireExactString(_0x3565a1[_0xb49fdf(0x1ac)],_0xb49fdf(0x1ac),_0x37aa60),_0x21b08d=requireExactString(_0x3565a1['configCode'],_0xb49fdf(0x13f),_0x37aa60),_0x261662=requireExactString(_0x3565a1[_0xb49fdf(0x1a5)],'channelType',_0x37aa60);if(!NOTIFICATION_CHANNEL_TYPES[_0xb49fdf(0x18a)](_0x261662))throw notificationError(_0xb49fdf(0x19c),_0xb49fdf(0x19a)+_0x37aa60+'\x20has\x20an\x20unsupported\x20channelType.');const _0x2cc65b=responseNullableString(_0x3565a1[_0xb49fdf(0x1b5)],_0xb49fdf(0x1b5),_0x37aa60),_0x431c6d=responseNullableString(_0x3565a1[_0xb49fdf(0x14d)],'channelConfig',_0x37aa60),_0x3c69d3=responseNullableString(_0x3565a1[_0xb49fdf(0x185)],_0xb49fdf(0x185),_0x37aa60),_0x1bfc99=responseNullableTimeout(_0x3565a1[_0xb49fdf(0x1a3)],_0xb49fdf(0x1a3),_0x37aa60),_0x43e604=responseNullableTimeout(_0x3565a1[_0xb49fdf(0x144)],_0xb49fdf(0x144),_0x37aa60);return{'id':_0x37aa60,'appCode':_0x3db4d9,'configCode':_0x21b08d,'configName':_0x557511,'channelType':_0x261662,'endpointUrl':redactSensitive(_0x2cc65b),'channelConfig':redactSensitive(_0x431c6d),'description':_0x3c69d3,'connectTimeout':_0x1bfc99,'readTimeout':_0x43e604,'endpointUrlRaw':_0x2cc65b,'channelConfigRaw':_0x431c6d};}export async function requireExactNotificationConfig(_0x50bb3d,_0x27ab92,_0x51491a){const _0x5a6bfc=a140_0x8d99eb;let _0x472e5b;try{_0x472e5b=await getNotificationChannelConfig(_0x27ab92,_0x50bb3d);}catch{throw safeApiFailure(_0x51491a,'preflight',_0x5a6bfc(0x13e)+_0x50bb3d+_0x5a6bfc(0x179));}return normalizeExactNotificationConfig(_0x472e5b,_0x27ab92,_0x50bb3d);}export function projectNotificationConfig(_0x15c0d9){const _0x3049a8=a140_0x8d99eb;return{'id':_0x15c0d9['id']??null,'appCode':_0x15c0d9[_0x3049a8(0x18b)],'configCode':_0x15c0d9[_0x3049a8(0x13f)]??null,'configName':_0x15c0d9[_0x3049a8(0x1ac)],'channelType':_0x15c0d9[_0x3049a8(0x1a5)],'endpointUrl':redactSensitive(_0x15c0d9['endpointUrl']),'channelConfig':redactSensitive(_0x15c0d9[_0x3049a8(0x14d)]),'description':_0x15c0d9[_0x3049a8(0x185)]??null,'connectTimeout':_0x15c0d9[_0x3049a8(0x1a3)]??null,'readTimeout':_0x15c0d9[_0x3049a8(0x144)]??null};}export function notificationSelector(_0x126b78){const _0x526e89=a140_0x8d99eb;return{'appCode':_0x126b78[_0x526e89(0x18b)],'id':_0x126b78['id'],'configCode':_0x126b78[_0x526e89(0x13f)],'configName':_0x126b78[_0x526e89(0x1ac)],'channelType':_0x126b78[_0x526e89(0x1a5)]};}export function createMutationInput(_0xdf9b0b,_0x5ef1ad){const _0x5c093b=a140_0x8d99eb;return{'appCode':_0xdf9b0b,'configName':_0x5ef1ad[_0x5c093b(0x1ac)],'channelType':_0x5ef1ad[_0x5c093b(0x1a5)],...hasOwn(_0x5ef1ad,_0x5c093b(0x1b5))?{'endpointUrl':_0x5ef1ad['endpointUrl']}:{},...hasOwn(_0x5ef1ad,_0x5c093b(0x14d))?{'channelConfig':serializeChannelConfig(_0x5ef1ad[_0x5c093b(0x14d)])}:{},...hasOwn(_0x5ef1ad,_0x5c093b(0x185))?{'description':_0x5ef1ad[_0x5c093b(0x185)]}:{},...hasOwn(_0x5ef1ad,'connectTimeout')?{'connectTimeout':_0x5ef1ad['connectTimeout']}:{},...hasOwn(_0x5ef1ad,_0x5c093b(0x144))?{'readTimeout':_0x5ef1ad[_0x5c093b(0x144)]}:{}};}export function mergeUpdateInput(_0x4c93a0,_0x554653){const _0x1af4cf=a140_0x8d99eb;return{'id':_0x4c93a0['id'],'appCode':_0x4c93a0[_0x1af4cf(0x18b)],'configName':_0x554653[_0x1af4cf(0x1ac)]??_0x4c93a0['configName'],'channelType':_0x554653[_0x1af4cf(0x1a5)]??_0x4c93a0[_0x1af4cf(0x1a5)],'endpointUrl':hasOwn(_0x554653,_0x1af4cf(0x1b5))?_0x554653['endpointUrl']:_0x4c93a0[_0x1af4cf(0x174)],'channelConfig':hasOwn(_0x554653,_0x1af4cf(0x14d))?serializeChannelConfig(_0x554653[_0x1af4cf(0x14d)]):_0x4c93a0['channelConfigRaw'],'description':hasOwn(_0x554653,_0x1af4cf(0x185))?_0x554653[_0x1af4cf(0x185)]:_0x4c93a0[_0x1af4cf(0x185)],'connectTimeout':hasOwn(_0x554653,_0x1af4cf(0x1a3))?_0x554653[_0x1af4cf(0x1a3)]:_0x4c93a0[_0x1af4cf(0x1a3)],'readTimeout':hasOwn(_0x554653,_0x1af4cf(0x144))?_0x554653[_0x1af4cf(0x144)]:_0x4c93a0[_0x1af4cf(0x144)]};}export function plannedUpdateProjection(_0x4cbc08,_0x4a9a23){const _0x5e8008=a140_0x8d99eb;return projectNotificationConfig({'id':_0x4cbc08['id'],'appCode':_0x4cbc08[_0x5e8008(0x18b)],'configCode':_0x4cbc08[_0x5e8008(0x13f)],'configName':_0x4a9a23[_0x5e8008(0x1ac)]??_0x4cbc08['configName'],'channelType':_0x4a9a23['channelType']??_0x4cbc08[_0x5e8008(0x1a5)],'endpointUrl':hasOwn(_0x4a9a23,_0x5e8008(0x1b5))?_0x4a9a23[_0x5e8008(0x1b5)]:_0x4cbc08[_0x5e8008(0x174)],'channelConfig':hasOwn(_0x4a9a23,_0x5e8008(0x14d))?_0x4a9a23['channelConfig']:_0x4cbc08['channelConfigRaw'],'description':hasOwn(_0x4a9a23,_0x5e8008(0x185))?_0x4a9a23[_0x5e8008(0x185)]:_0x4cbc08['description'],'connectTimeout':hasOwn(_0x4a9a23,_0x5e8008(0x1a3))?_0x4a9a23[_0x5e8008(0x1a3)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x4cbc08['connectTimeout'],'readTimeout':hasOwn(_0x4a9a23,_0x5e8008(0x144))?_0x4a9a23[_0x5e8008(0x144)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x4cbc08['readTimeout']});}function a140_0x3db0(_0x47df75,_0x27ada9){_0x47df75=_0x47df75-0x132;const _0x30d3a8=a140_0x30d3();let _0x3db081=_0x30d3a8[_0x47df75];return _0x3db081;}export function requestedSafeFieldsMatch(_0x2393e3,_0x12fbda,_0x17deae){const _0x15a4a8=a140_0x8d99eb,_0x566102=[],_0x2e6fed=[],_0x59ca4a=[];for(const _0x22dbe0 of[_0x15a4a8(0x1ac),_0x15a4a8(0x1a5),_0x15a4a8(0x185)]){if(!hasOwn(_0x17deae,_0x22dbe0))continue;_0x59ca4a[_0x15a4a8(0x13c)](_0x22dbe0),_0x566102[_0x15a4a8(0x13c)](_0x12fbda[_0x22dbe0]===_0x17deae[_0x22dbe0]),_0x2e6fed['push'](_0x2393e3[_0x22dbe0]!==_0x17deae[_0x22dbe0]&&_0x12fbda[_0x22dbe0]===_0x17deae[_0x22dbe0]);}for(const _0x508f31 of[_0x15a4a8(0x1a3),_0x15a4a8(0x144)]){if(!hasOwn(_0x17deae,_0x508f31))continue;const _0x492fba=_0x17deae[_0x508f31]??(_0x508f31===_0x15a4a8(0x1a3)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x59ca4a[_0x15a4a8(0x13c)](_0x508f31),_0x566102[_0x15a4a8(0x13c)](_0x12fbda[_0x508f31]===_0x492fba),_0x2e6fed[_0x15a4a8(0x13c)](_0x2393e3[_0x508f31]!==_0x492fba&&_0x12fbda[_0x508f31]===_0x492fba);}return hasOwn(_0x17deae,'endpointUrl')&&_0x17deae[_0x15a4a8(0x1b5)]===null&&(_0x59ca4a[_0x15a4a8(0x13c)](_0x15a4a8(0x141)),_0x566102[_0x15a4a8(0x13c)](_0x12fbda[_0x15a4a8(0x174)]===null||_0x12fbda[_0x15a4a8(0x174)]===''),_0x2e6fed['push'](_0x2393e3[_0x15a4a8(0x174)]!==null&&_0x2393e3['endpointUrlRaw']!==''&&(_0x12fbda[_0x15a4a8(0x174)]===null||_0x12fbda[_0x15a4a8(0x174)]===''))),{'allMatch':_0x566102['every'](Boolean),'provesChange':_0x2e6fed[_0x15a4a8(0x171)](Boolean),'verifiedFields':_0x59ca4a};}export function validateNotificationDeleteReadback(_0x1d6586,_0x18fe37,_0x3e306c){const _0x4e1944=a140_0x8d99eb;for(const [_0xa1000c,_0x96f44]of _0x1d6586[_0x4e1944(0x169)]()){if(!Number[_0x4e1944(0x196)](_0x96f44['id'])||_0x96f44['id']<=0x0)throw notificationError(_0x4e1944(0x19c),'Notification\x20config\x20list\x20item\x20'+(_0xa1000c+0x1)+_0x4e1944(0x1a1));if(_0x96f44[_0x4e1944(0x18b)]!==_0x18fe37)throw notificationError('notification_config_response_invalid',_0x4e1944(0x16d)+(_0xa1000c+0x1)+_0x4e1944(0x1aa));if(_0x96f44[_0x4e1944(0x1a5)]!==_0x3e306c)throw notificationError(_0x4e1944(0x19c),_0x4e1944(0x16d)+(_0xa1000c+0x1)+_0x4e1944(0x1a4));}}export function safeApiFailure(_0x17aaf6,_0x3b96e6,_0x1ab196){const _0x912d03=a140_0x8d99eb;return notificationError(_0x912d03(0x19f)+_0x17aaf6+'_'+(_0x3b96e6===_0x912d03(0x18f)?'failed':_0x3b96e6+_0x912d03(0x15e)),_0x912d03(0x19a)+_0x17aaf6+'\x20'+_0x3b96e6+_0x912d03(0x173),_0x1ab196);}export function notificationLookupCommand(_0x58f4a9,_0x125d44){const _0x1a9be7=a140_0x8d99eb;return _0x1a9be7(0x19e)+_0x58f4a9+_0x1a9be7(0x134)+_0x125d44+'\x20--format\x20compress';}function validateNotificationDocument(_0xe51880,_0x5ac18a){const _0x5aec27=a140_0x8d99eb;for(const _0x2d6a99 of Object['keys'](_0xe51880)){if(FORBIDDEN_IDENTITY_FIELDS[_0x5aec27(0x14b)](_0x2d6a99))throw notificationError(_0x5aec27(0x18d),_0x5aec27(0x145)+_0x2d6a99+_0x5aec27(0x1a8));if(!ALLOWED_INPUT_FIELDS[_0x5aec27(0x14b)](_0x2d6a99))throw notificationError('notification_config_field_unknown',_0x5aec27(0x156)+_0x2d6a99+'\x22.');}if(_0x5ac18a===_0x5aec27(0x14f)&&Object[_0x5aec27(0x184)](_0xe51880)['length']===0x0)throw notificationError(_0x5aec27(0x17f),_0x5aec27(0x163));const _0x1ccd6f={};if(hasOwn(_0xe51880,'configName'))_0x1ccd6f[_0x5aec27(0x1ac)]=validateRequiredString(_0xe51880[_0x5aec27(0x1ac)],_0x5aec27(0x1ac),0x80);else{if(_0x5ac18a===_0x5aec27(0x138))throw notificationError(_0x5aec27(0x178),_0x5aec27(0x15f)+'\x22configName\x22.');}if(hasOwn(_0xe51880,_0x5aec27(0x1a5))){if(typeof _0xe51880['channelType']!==_0x5aec27(0x136))throw invalidFieldType(_0x5aec27(0x1a5),_0x5aec27(0x142));const _0x23f755=_0xe51880[_0x5aec27(0x1a5)][_0x5aec27(0x164)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x23f755))throw notificationError(_0x5aec27(0x133),_0x5aec27(0x161),_0x5aec27(0x188)+NOTIFICATION_CHANNEL_TYPES[_0x5aec27(0x150)](',\x20')+'.');_0x1ccd6f[_0x5aec27(0x1a5)]=_0x23f755;}else{if(_0x5ac18a==='create')throw notificationError(_0x5aec27(0x178),_0x5aec27(0x15f)+_0x5aec27(0x1ae));}for(const [_0xaaa8a6,_0xf9a719]of[[_0x5aec27(0x1b5),0x200],['description',0x100]]){if(!hasOwn(_0xe51880,_0xaaa8a6))continue;const _0x4e7429=_0xe51880[_0xaaa8a6];if(_0x4e7429!==null&&typeof _0x4e7429!==_0x5aec27(0x136))throw invalidFieldType(_0xaaa8a6,_0x5aec27(0x198));if(typeof _0x4e7429==='string'&&_0x4e7429['length']>_0xf9a719)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0xaaa8a6+_0x5aec27(0x182)+_0xf9a719+_0x5aec27(0x160));_0x1ccd6f[_0xaaa8a6]=_0x4e7429;}if(hasOwn(_0xe51880,_0x5aec27(0x14d))){const _0xc10b87=_0xe51880[_0x5aec27(0x14d)];if(_0xc10b87===null&&_0x5ac18a===_0x5aec27(0x138))throw invalidFieldType(_0x5aec27(0x14d),_0x5aec27(0x151));if(_0xc10b87!==null&&!isJsonObject(_0xc10b87))throw invalidFieldType('channelConfig',_0x5ac18a==='update'?_0x5aec27(0x1b0):_0x5aec27(0x151));_0xc10b87!==null&&validateChannelConfigFields(_0x1ccd6f['channelType'],_0xc10b87),_0x1ccd6f[_0x5aec27(0x14d)]=_0xc10b87;}for(const _0x7ce526 of['connectTimeout',_0x5aec27(0x144)]){if(!hasOwn(_0xe51880,_0x7ce526))continue;const _0x3d07ed=_0xe51880[_0x7ce526];if(_0x3d07ed!==null&&(!Number['isSafeInteger'](_0x3d07ed)||_0x3d07ed<0x0))throw notificationError(_0x5aec27(0x133),'Notification\x20JSON\x20field\x20\x22'+_0x7ce526+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x1ccd6f[_0x7ce526]=_0x3d07ed;}return _0x1ccd6f;}function validateRequiredString(_0x3402e3,_0x1e26e9,_0x23f8f9){const _0x46e6fc=a140_0x8d99eb;if(typeof _0x3402e3!==_0x46e6fc(0x136))throw invalidFieldType(_0x1e26e9,_0x46e6fc(0x176));const _0x12063b=_0x3402e3[_0x46e6fc(0x164)]();if(!_0x12063b)throw notificationError('notification_config_field_invalid',_0x46e6fc(0x145)+_0x1e26e9+_0x46e6fc(0x1b4));if(_0x12063b[_0x46e6fc(0x165)]>_0x23f8f9)throw notificationError(_0x46e6fc(0x133),_0x46e6fc(0x145)+_0x1e26e9+_0x46e6fc(0x182)+_0x23f8f9+_0x46e6fc(0x160));return _0x12063b;}function validateChannelConfigFields(_0x47548f,_0x27278a){const _0x49dedd=a140_0x8d99eb;if(hasOwn(_0x27278a,_0x49dedd(0x15d)))throw forbiddenChannelConfigField('messageTemplate');if(_0x47548f==='EMAIL')for(const _0x55d924 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x27278a,_0x55d924))throw forbiddenChannelConfigField(_0x55d924);}}function forbiddenChannelConfigField(_0x3c22f8){const _0x40ac51=a140_0x8d99eb;return notificationError('notification_config_channel_field_forbidden',_0x40ac51(0x170)+_0x3c22f8+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x48302e,_0x592669){const _0x459b07=a140_0x8d99eb;return notificationError('notification_config_field_invalid',_0x459b07(0x145)+_0x48302e+_0x459b07(0x15a)+_0x592669+'.');}function serializeChannelConfig(_0x5dce15){const _0x555959=a140_0x8d99eb;return _0x5dce15===null||_0x5dce15===undefined?null:JSON[_0x555959(0x167)](_0x5dce15);}function redactSensitive(_0x75e7ad){const _0x4687ed=a140_0x8d99eb;return _0x75e7ad===null||_0x75e7ad===undefined||_0x75e7ad===''?null:_0x4687ed(0x162);}function requireResponseString(_0x5c8ebe,_0x2bd29f,_0x233f5f){const _0x344272=a140_0x8d99eb;if(typeof _0x5c8ebe!==_0x344272(0x136)||_0x5c8ebe['trim']()==='')throw CliErrors[_0x344272(0x135)](_0x344272(0x189),'Item\x20'+(_0x233f5f+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x2bd29f+'\x22.');return _0x5c8ebe[_0x344272(0x164)]();}function requireExactString(_0x881b27,_0x38a012,_0x186f7f){const _0x2b6a40=a140_0x8d99eb;if(typeof _0x881b27!=='string'||_0x881b27[_0x2b6a40(0x164)]()==='')throw notificationError(_0x2b6a40(0x19c),_0x2b6a40(0x19a)+_0x186f7f+_0x2b6a40(0x1a6)+_0x38a012+'\x22.');return _0x881b27[_0x2b6a40(0x164)]();}function responseNullableString(_0xb66369,_0x5c0336,_0x1bf41d){const _0x54e892=a140_0x8d99eb;if(_0xb66369===undefined||_0xb66369===null)return null;if(typeof _0xb66369!=='string')throw notificationError(_0x54e892(0x19c),_0x54e892(0x19a)+_0x1bf41d+_0x54e892(0x14a)+_0x5c0336+'\x22.');return _0xb66369;}function responseNullableTimeout(_0x1f2e39,_0x45e12f,_0x40920e){const _0x5d3e04=a140_0x8d99eb;if(_0x1f2e39===undefined||_0x1f2e39===null)return null;if(!Number[_0x5d3e04(0x196)](_0x1f2e39)||_0x1f2e39<0x0)throw notificationError('notification_config_response_invalid',_0x5d3e04(0x19a)+_0x40920e+_0x5d3e04(0x14a)+_0x45e12f+'\x22.');return _0x1f2e39;}function normalizeNullableString(_0x3f4aa3){return typeof _0x3f4aa3==='string'?_0x3f4aa3:null;}function isJsonObject(_0xdbb44){const _0xfe04c9=a140_0x8d99eb;return _0xdbb44!==null&&typeof _0xdbb44===_0xfe04c9(0x149)&&!Array[_0xfe04c9(0x153)](_0xdbb44);}function hasOwn(_0x5ae577,_0x2015fc){const _0x3dc866=a140_0x8d99eb;return Object[_0x3dc866(0x1a0)]['hasOwnProperty'][_0x3dc866(0x166)](_0x5ae577,_0x2015fc);}async function readStdin(){const _0x22a18c=a140_0x8d99eb;let _0x2b92a0='';process[_0x22a18c(0x177)][_0x22a18c(0x14e)](_0x22a18c(0x147));for await(const _0x2e2ae9 of process[_0x22a18c(0x177)])_0x2b92a0+=_0x2e2ae9;return _0x2b92a0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a141_0x403006=a141_0x16fe;(function(_0x69726d,_0x140b10){const _0x494903=a141_0x16fe,_0x5b0780=_0x69726d();while(!![]){try{const _0x25a061=-parseInt(_0x494903(0xbb))/0x1*(-parseInt(_0x494903(0xdc))/0x2)+-parseInt(_0x494903(0xbc))/0x3*(-parseInt(_0x494903(0xd8))/0x4)+-parseInt(_0x494903(0xe3))/0x5*(parseInt(_0x494903(0xe6))/0x6)+parseInt(_0x494903(0xe1))/0x7*(-parseInt(_0x494903(0xc6))/0x8)+parseInt(_0x494903(0xc5))/0x9*(-parseInt(_0x494903(0xe7))/0xa)+parseInt(_0x494903(0xe8))/0xb*(-parseInt(_0x494903(0xc4))/0xc)+parseInt(_0x494903(0xb7))/0xd*(parseInt(_0x494903(0xbd))/0xe);if(_0x25a061===_0x140b10)break;else _0x5b0780['push'](_0x5b0780['shift']());}catch(_0x24bb15){_0x5b0780['push'](_0x5b0780['shift']());}}}(a141_0x2f8e,0xef127));function a141_0x2f8e(){const _0x4f0783=['/smartapi/ocr/recognize-text?','155CyZOSh','toString','imageUrl','133746iFJlqN','260buzFWm','4802204YoMnfP','invoice','POST','filePath','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','validation','form','idcard','read','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','File\x20upload\x20response\x20missing\x20filePath.','1651WeKxxa','\x20OCR\x20from\x20URL','count','scene','4NRWEQq','665121TLKheb','19068WjBJfB','/smartapi/common/uploadFile','File\x20URL\x20response\x20missing\x20fileUrl.','IdCard','apiError','appCode','fileUrl','12OUceiU','131643POGJku','77336VuXrnE','image-file','GET','/smartapi/common/queryFileUrl','Table','.\x20Supported\x20scenes:\x20','join','\x20OCR','fileName','toLowerCase','string','Publicly\x20accessible\x20image\x20or\x20file\x20URL','Invoice','image-url','general','imageFile','filter','trim','24mBvzaD','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','str','General','578958jVXQKP','Preview:\x20recognize\x20','recognize','idCard','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','126qkKYxI'];a141_0x2f8e=function(){return _0x4f0783;};return a141_0x2f8e();}import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a141_0x16fe(_0x5694fe,_0x3106af){_0x5694fe=_0x5694fe-0xb5;const _0x2f8e2a=a141_0x2f8e();let _0x16feb8=_0x2f8e2a[_0x5694fe];return _0x16feb8;}import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a141_0x403006(0xe9),'general','form',a141_0x403006(0xdf)],SCENE_TO_LEGACY_TYPE={'invoice':a141_0x403006(0xd2),'general':a141_0x403006(0xdb),'form':a141_0x403006(0xca),'idCard':a141_0x403006(0xc0)},SCENE_FLAG={'name':'scene','type':a141_0x403006(0xd0),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':'image-file','type':'string','description':a141_0x403006(0xe0)},IMAGE_URL_FLAG={'name':'image-url','type':a141_0x403006(0xd0),'description':a141_0x403006(0xd1)};function normalizeScene(_0x649a21){const _0x597bff=a141_0x403006,_0x3263e3=_0x649a21[_0x597bff(0xd7)]()[_0x597bff(0xcf)]();if(_0x3263e3===_0x597bff(0xef))return _0x597bff(0xdf);if(_0x3263e3===_0x597bff(0xe9)||_0x3263e3===_0x597bff(0xd4)||_0x3263e3===_0x597bff(0xee))return _0x3263e3;throw CliErrors[_0x597bff(0xed)]('Unsupported\x20OCR\x20scene:\x20'+_0x649a21+_0x597bff(0xcb)+SUPPORTED_SCENES[_0x597bff(0xcc)](',\x20'));}function selectedInputs(_0xc05525){const _0x331ab8=a141_0x403006,_0x1c7097=_0xc05525[_0x331ab8(0xda)](_0x331ab8(0xc7))[_0x331ab8(0xd7)](),_0x39f3ec=_0xc05525['str'](_0x331ab8(0xd3))['trim']();return{'imageFile':_0x1c7097,'imageUrl':_0x39f3ec,'count':[_0x1c7097,_0x39f3ec][_0x331ab8(0xd6)](Boolean)['length']};}function validateInputSelection(_0x295e9a){const _0xe77564=a141_0x403006,_0x1acd28=selectedInputs(_0x295e9a);if(_0x1acd28[_0xe77564(0xb9)]!==0x1)throw CliErrors[_0xe77564(0xed)](_0xe77564(0xec));return _0x1acd28;}function withScene(_0x5a7791,_0xb50222,_0x44e675){const _0x1b12a3=a141_0x403006;return{..._0x5a7791,'scene':_0xb50222,..._0x44e675?{'sourceFile':{'fileName':_0x44e675[_0x1b12a3(0xce)],'filePath':_0x44e675[_0x1b12a3(0xeb)]}}:{}};}const ocrRecognize={'service':'ocr','command':a141_0x403006(0xde),'description':'Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','risk':a141_0x403006(0xf0),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x35867b){const _0x38b7e8=a141_0x403006,_0xcabd7b=normalizeScene(_0x35867b[_0x38b7e8(0xda)](_0x38b7e8(0xba))),_0x541d77=SCENE_TO_LEGACY_TYPE[_0xcabd7b],_0x47fd83=validateInputSelection(_0x35867b);if(_0x47fd83[_0x38b7e8(0xe5)]){const _0x1798af=new URLSearchParams({'url':_0x47fd83[_0x38b7e8(0xe5)],'type':_0x541d77,'appCode':_0x35867b[_0x38b7e8(0xc2)]});return{'method':_0x38b7e8(0xc8),'url':_0x38b7e8(0xe2)+_0x1798af[_0x38b7e8(0xe4)](),'description':_0x38b7e8(0xdd)+_0xcabd7b+_0x38b7e8(0xb8)};}const _0x29d5a0=requireDevelopmentUploadFile(_0x47fd83['imageFile'],_0x38b7e8(0xc7));return{'method':_0x38b7e8(0xea),'url':_0x38b7e8(0xbe),'body':{'steps':[{'method':_0x38b7e8(0xea),'url':_0x38b7e8(0xbe),'body':{'appCode':_0x35867b[_0x38b7e8(0xc2)],'multipart':{'file':_0x29d5a0}}},{'method':_0x38b7e8(0xea),'url':_0x38b7e8(0xc9),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x38b7e8(0xc8),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x35867b[_0x38b7e8(0xc2)],'url':_0x38b7e8(0xb5),'type':_0x541d77}}]},'description':_0x38b7e8(0xd9)+_0xcabd7b+_0x38b7e8(0xcd)};},async 'execute'(_0x2572bf){const _0x5d5464=a141_0x403006,_0x256543=normalizeScene(_0x2572bf[_0x5d5464(0xda)](_0x5d5464(0xba))),_0x11e765=SCENE_TO_LEGACY_TYPE[_0x256543],_0x46ea6b=validateInputSelection(_0x2572bf);if(_0x46ea6b[_0x5d5464(0xe5)]){const _0x567cfb=await recognizeDevelopmentOcr(_0x2572bf[_0x5d5464(0xc2)],{'url':_0x46ea6b[_0x5d5464(0xe5)],'type':_0x11e765});return{'ok':!![],'data':withScene(_0x567cfb,_0x256543)};}const _0x1ad000=requireDevelopmentUploadFile(_0x46ea6b[_0x5d5464(0xd5)],_0x5d5464(0xc7)),_0x489045=await uploadDevelopmentFile(_0x2572bf[_0x5d5464(0xc2)],_0x1ad000['path']);if(!_0x489045[_0x5d5464(0xeb)])throw CliErrors[_0x5d5464(0xc1)](_0x5d5464(0xb6));const _0x574035=await queryDevelopmentFileUrl(_0x489045['filePath'],{'download':![]});if(!_0x574035[_0x5d5464(0xc3)])throw CliErrors['apiError'](_0x5d5464(0xbf));const _0x3b498e=await recognizeDevelopmentOcr(_0x2572bf['appCode'],{'url':_0x574035[_0x5d5464(0xc3)],'type':_0x11e765});return{'ok':!![],'data':withScene(_0x3b498e,_0x256543,_0x489045)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a142_0x3c34a3=a142_0x466c;(function(_0x20c2cc,_0x4dd2b0){const _0x2d2c97=a142_0x466c,_0x487682=_0x20c2cc();while(!![]){try{const _0x3cff17=parseInt(_0x2d2c97(0x110))/0x1*(parseInt(_0x2d2c97(0x100))/0x2)+parseInt(_0x2d2c97(0x136))/0x3+-parseInt(_0x2d2c97(0x12d))/0x4*(parseInt(_0x2d2c97(0x126))/0x5)+parseInt(_0x2d2c97(0x127))/0x6*(parseInt(_0x2d2c97(0x123))/0x7)+parseInt(_0x2d2c97(0x114))/0x8*(parseInt(_0x2d2c97(0x113))/0x9)+parseInt(_0x2d2c97(0x11b))/0xa*(-parseInt(_0x2d2c97(0x12a))/0xb)+-parseInt(_0x2d2c97(0x11e))/0xc;if(_0x3cff17===_0x4dd2b0)break;else _0x487682['push'](_0x487682['shift']());}catch(_0x38d53b){_0x487682['push'](_0x487682['shift']());}}}(a142_0x5784,0x99a07));function a142_0x5784(){const _0x36f90b=['Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','7156810lDdjcV','/smartapi/webcode/page/create','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','12011640QmaLmQ','page','create','zh-CN','number','357PslxiW','Complete\x20page\x20files\x20as\x20JSON\x20(conflicts\x20with\x20--page-pattern)','isInteger','5MMtWqw','72516WbNWkD','Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.','langs','11FcaHCo','trim','stringify','1018744IzAegW','pageName\x20cannot\x20exceed\x20100\x20characters.','string','version','en-US','pageId','parent-menu-id','input','parentMenuId','1265730XGeDhi','compress','pagePattern','appCode','write','num','--page-pattern\x20currently\x20supports\x20only\x20BLANK.','page-content','Would\x20create\x20Custom\x20Page\x20','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK\x20or\x20--page-content.','page-type','4406CYEUUV','BLANK','page\x20create\x20does\x20not\x20accept\x20--page-type.','str','\x20and\x20its\x20menu\x20entry.','page-pattern','isNaN','menuId','pageName','page.create','Custom\x20Page\x20pattern\x20(currently\x20BLANK;\x20conflicts\x20with\x20--page-content)','enableI18n','menuPath','CUSTOM','Provide\x20--page-pattern\x20BLANK\x20or\x20--page-content.','validation','413uTOblw','files','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','14571ZWNPCR','3224hPwgXU','length','apiError','Created\x20Custom\x20Page\x20','name'];a142_0x5784=function(){return _0x36f90b;};return a142_0x5784();}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_0x3c34a3(0x121),a142_0x3c34a3(0x131)];function a142_0x466c(_0x176e53,_0x28dc82){_0x176e53=_0x176e53-0xfe;const _0x57847c=a142_0x5784();let _0x466c89=_0x57847c[_0x176e53];return _0x466c89;}export const pageCreate={'service':a142_0x3c34a3(0x11f),'command':a142_0x3c34a3(0x120),'description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20complete\x20files','risk':a142_0x3c34a3(0x13a),'defaultOutputFormat':a142_0x3c34a3(0x137),'structuredErrors':!![],'rejectedFlags':[{'name':a142_0x3c34a3(0xff),'message':a142_0x3c34a3(0x102),'hint':a142_0x3c34a3(0xfe)}],'flags':[{'name':a142_0x3c34a3(0x118),'type':a142_0x3c34a3(0x12f),'description':a142_0x3c34a3(0x11d)},{'name':a142_0x3c34a3(0x133),'type':a142_0x3c34a3(0x122),'description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':a142_0x3c34a3(0x105),'type':'string','description':a142_0x3c34a3(0x10a),'enum':[a142_0x3c34a3(0x101)]},{'name':'page-content','type':a142_0x3c34a3(0x12f),'description':a142_0x3c34a3(0x124)},APPCODE_FLAG],async 'validate'(_0x19cc48){const _0x58ffd3=a142_0x3c34a3,_0x39c23a=readPagePattern(_0x19cc48);await validateCustomPageContent(readInput(_0x19cc48,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x39c23a)[_0x58ffd3(0x111)]);},async 'dryRun'(_0x4afe20){const _0x3b4ef2=a142_0x3c34a3,{input:_0x148b0b}=await prepare(_0x4afe20);return{'method':'POST','url':_0x3b4ef2(0x11c),'body':{'appCode':_0x148b0b['appCode'],'pageName':_0x148b0b[_0x3b4ef2(0x108)],..._0x148b0b[_0x3b4ef2(0x135)]!=null?{'parentMenuId':_0x148b0b['parentMenuId']}:{},'createMenu':_0x148b0b['createMenu'],'codeContent':_0x148b0b[_0x3b4ef2(0x111)]},'description':_0x3b4ef2(0x13e)+JSON[_0x3b4ef2(0x12c)](_0x148b0b[_0x3b4ef2(0x108)])+_0x3b4ef2(0x104)};},async 'execute'(_0x46ceb4){const _0x4e3585=a142_0x3c34a3,_0x4f773f=await prepare(_0x46ceb4),_0xb6c869=await createCustomPage(_0x4f773f[_0x4e3585(0x134)]);if(!Number[_0x4e3585(0x125)](_0xb6c869['pageId'])||_0xb6c869['pageId']<=0x0)throw CliErrors[_0x4e3585(0x116)](_0x4e3585(0x119));return{'ok':!![],'data':buildMutationData(_0x4f773f,_0xb6c869),'message':_0x4e3585(0x117)+_0xb6c869['pageId']+'.'};}};async function prepare(_0xbe297b){const _0x55ed9b=a142_0x3c34a3,_0x546856=readPagePattern(_0xbe297b);if(_0x546856===null)return{'input':readInput(_0xbe297b,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x546856),'warnings':[],'pagePattern':_0x546856};let _0x10a3ab=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x4046e9=[];try{const _0x3fe3c3=await getI18nInfo(_0xbe297b[_0x55ed9b(0x139)]);_0x3fe3c3[_0x55ed9b(0x10b)]&&_0x3fe3c3[_0x55ed9b(0x129)]?.['length']&&(_0x10a3ab=_0x3fe3c3['langs']);}catch{_0x4046e9=[_0x55ed9b(0x128)];}return{'input':readInput(_0xbe297b,_0x10a3ab,_0x546856),'warnings':_0x4046e9,'pagePattern':_0x546856};}function readPagePattern(_0x136c91){const _0x20178b=a142_0x3c34a3,_0x3b7fa9=_0x136c91[_0x20178b(0x103)](_0x20178b(0x105))[_0x20178b(0x12b)](),_0x59b950=_0x136c91['str']('page-content')[_0x20178b(0x12b)]()['length']>0x0;if(_0x3b7fa9&&_0x59b950)throw CliErrors['validation']('--page-pattern\x20and\x20--page-content\x20cannot\x20be\x20used\x20together.');if(_0x59b950)return null;if(!_0x3b7fa9)throw CliErrors['validation'](_0x20178b(0x10e));if(_0x3b7fa9!=='BLANK')throw CliErrors[_0x20178b(0x10f)](_0x20178b(0x13c));return _0x3b7fa9;}function readInput(_0x4765e2,_0x2f921d=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x3ca68f=readPagePattern(_0x4765e2)){const _0x5b1847=a142_0x3c34a3,_0x582f1c=_0x4765e2[_0x5b1847(0x103)](_0x5b1847(0x118))[_0x5b1847(0x12b)]()||'Custom_page_'+Date['now']();if(_0x582f1c[_0x5b1847(0x115)]>0x64)throw CliErrors['validation'](_0x5b1847(0x12e));const _0x4931b9=_0x4765e2[_0x5b1847(0x13b)](_0x5b1847(0x133),NaN),_0xa9bfe7=!Number[_0x5b1847(0x106)](_0x4931b9);if(_0xa9bfe7&&(!Number[_0x5b1847(0x125)](_0x4931b9)||_0x4931b9<=0x0))throw CliErrors['validation'](_0x5b1847(0x11a));return{'appCode':_0x4765e2['appCode'],'pageName':_0x582f1c,..._0xa9bfe7?{'parentMenuId':_0x4931b9}:{},'createMenu':!![],'files':_0x3ca68f===null?parseCustomPageContent(_0x4765e2[_0x5b1847(0x103)](_0x5b1847(0x13d))):buildInitialFiles(_0x582f1c,_0x2f921d)};}function buildMutationData(_0x151228,_0x24cc8b){const _0x476892=a142_0x3c34a3,{input:_0x3e038d}=_0x151228,_0x155991=_0x24cc8b&&buildCustomPageDevelopmentUrl(_0x3e038d[_0x476892(0x139)],_0x24cc8b[_0x476892(0x10c)]),_0x4079a2=_0x24cc8b&&buildCustomPageEditUrl(_0x3e038d[_0x476892(0x139)],_0x24cc8b['pageId']);return{'operation':_0x476892(0x109),'pageType':_0x476892(0x10d),'pagePattern':_0x151228[_0x476892(0x138)],'selector':{'appCode':_0x3e038d[_0x476892(0x139)],'pageName':_0x3e038d[_0x476892(0x108)]},'before':null,'after':{'pageId':_0x24cc8b?.[_0x476892(0x132)]??null,'pageName':_0x24cc8b?.['pageName']??_0x3e038d[_0x476892(0x108)],'appCode':_0x24cc8b?.[_0x476892(0x139)]??_0x3e038d[_0x476892(0x139)],'version':_0x24cc8b?.[_0x476892(0x130)]??null,'menuId':_0x24cc8b?.[_0x476892(0x107)]??null,'menuPath':_0x24cc8b?.['menuPath']??null,'files':_0x24cc8b?.['files']??Object['keys'](_0x3e038d[_0x476892(0x111)])},'dryRun':_0x24cc8b===undefined,'request':_0x3e038d,..._0x155991?{'pageUrl':_0x155991}:{},..._0x4079a2?{'editPageUrl':_0x4079a2}:{},'warnings':[..._0x151228['warnings'],..._0x24cc8b&&!_0x155991?[_0x476892(0x112)]:[]]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a143_0x38e1(){const _0x258cd6=['padStart','getMonth','number','Retrieved\x20Custom\x20Page\x20','getDate','pageCode','isNaN','read','908SDiczG','1087442RrknuP','appCode','4751362pBoUci','join','8RxnOLX','page','getFullYear','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','trim','1458186DkzyVJ','cookie','str','getMinutes','getTime','13285710bDWPcI','775691xsyZJP','10053TndCcT','5145715bUFfTH','appcode'];a143_0x38e1=function(){return _0x258cd6;};return a143_0x38e1();}const a143_0x471bc1=a143_0xd35d;(function(_0xfabcf8,_0x21117d){const _0x3dac59=a143_0xd35d,_0x1c2d6a=_0xfabcf8();while(!![]){try{const _0x135ea4=-parseInt(_0x3dac59(0x18e))/0x1+parseInt(_0x3dac59(0x19b))/0x2+-parseInt(_0x3dac59(0x18f))/0x3*(-parseInt(_0x3dac59(0x19a))/0x4)+-parseInt(_0x3dac59(0x190))/0x5+parseInt(_0x3dac59(0x188))/0x6+-parseInt(_0x3dac59(0x19d))/0x7*(parseInt(_0x3dac59(0x19f))/0x8)+parseInt(_0x3dac59(0x18d))/0x9;if(_0x135ea4===_0x21117d)break;else _0x1c2d6a['push'](_0x1c2d6a['shift']());}catch(_0x5a3fdc){_0x1c2d6a['push'](_0x1c2d6a['shift']());}}}(a143_0x38e1,0x83d73));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a143_0x471bc1(0x1a0),'command':'custom-detail','description':a143_0x471bc1(0x1a2),'risk':a143_0x471bc1(0x199),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a143_0x471bc1(0x194),'required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4d68ef){readCustomPageId(_0x4d68ef);},async 'execute'(_0x32f900){const _0x124686=a143_0x471bc1,_0x24ad24=readCustomPageId(_0x32f900),_0x1b72ec=await getCustomPageSource(_0x24ad24),{bundle:_0x1515a6,createTime:_0x41ef3d,updateTime:_0x32c7f8,..._0x5d1aa4}=_0x1b72ec,_0x5c7b92=_0x1b72ec['id']??_0x24ad24,_0x5082e4=_0x1b72ec[_0x124686(0x19c)]?.[_0x124686(0x1a3)]()||_0x32f900[_0x124686(0x18a)](_0x124686(0x191))['trim'](),_0x2f1a89=buildCustomPageRuntimeUrl(_0x5082e4,_0x1b72ec[_0x124686(0x197)]),_0x441ef3=buildCustomPageEditUrl(_0x5082e4,_0x5c7b92),_0x21dcae=await resolveCustomPageDevelopmentUrl(_0x5082e4,_0x5c7b92,_0x32f900[_0x124686(0x189)]);return{'ok':!![],'data':{..._0x5d1aa4,..._0x2f1a89?{'runtimePageUrl':_0x2f1a89}:{},..._0x21dcae?{'pageUrl':_0x21dcae}:{},..._0x441ef3?{'editPageUrl':_0x441ef3}:{},..._0x41ef3d==null?{}:{'createTime':formatTime(_0x41ef3d)},..._0x32c7f8==null?{}:{'updateTime':formatTime(_0x32c7f8)}},'message':_0x124686(0x195)+_0x24ad24+'.'};}};function a143_0xd35d(_0x4074d9,_0x2e75d5){_0x4074d9=_0x4074d9-0x188;const _0x38e14f=a143_0x38e1();let _0xd35d1a=_0x38e14f[_0x4074d9];return _0xd35d1a;}function formatTime(_0xfb31b2){const _0x1dd2dc=a143_0x471bc1,_0x47899b=new Date(_0xfb31b2);if(Number[_0x1dd2dc(0x198)](_0x47899b[_0x1dd2dc(0x18c)]()))return String(_0xfb31b2);const _0x5dae64=[_0x47899b[_0x1dd2dc(0x1a1)](),String(_0x47899b[_0x1dd2dc(0x193)]()+0x1)[_0x1dd2dc(0x192)](0x2,'0'),String(_0x47899b[_0x1dd2dc(0x196)]())[_0x1dd2dc(0x192)](0x2,'0')][_0x1dd2dc(0x19e)]('-'),_0x3e930d=[String(_0x47899b['getHours']())[_0x1dd2dc(0x192)](0x2,'0'),String(_0x47899b[_0x1dd2dc(0x18b)]())[_0x1dd2dc(0x192)](0x2,'0'),String(_0x47899b['getSeconds']())[_0x1dd2dc(0x192)](0x2,'0')][_0x1dd2dc(0x19e)](':');return _0x5dae64+'\x20'+_0x3e930d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a144_0x40e8d6=a144_0x3aa5;function a144_0x3aa5(_0x404f03,_0x5d2d41){_0x404f03=_0x404f03-0x10c;const _0x130ca9=a144_0x130c();let _0x3aa528=_0x130ca9[_0x404f03];return _0x3aa528;}(function(_0x57995b,_0x3160ec){const _0x5d1d47=a144_0x3aa5,_0x43890f=_0x57995b();while(!![]){try{const _0xd7e409=-parseInt(_0x5d1d47(0x11d))/0x1+parseInt(_0x5d1d47(0x120))/0x2+parseInt(_0x5d1d47(0x115))/0x3+parseInt(_0x5d1d47(0x119))/0x4*(parseInt(_0x5d1d47(0x11a))/0x5)+parseInt(_0x5d1d47(0x112))/0x6+parseInt(_0x5d1d47(0x10e))/0x7+parseInt(_0x5d1d47(0x117))/0x8*(-parseInt(_0x5d1d47(0x111))/0x9);if(_0xd7e409===_0x3160ec)break;else _0x43890f['push'](_0x43890f['shift']());}catch(_0x25261e){_0x43890f['push'](_0x43890f['shift']());}}}(a144_0x130c,0x6fa1c));import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';function a144_0x130c(){const _0x1bbfd6=['compress','2386428uqxERB','Found\x20','10875408wEtBOc','cookie','4fYFIxu','2261210cGZLas','\x20Custom\x20Page(s).','appCode','6134IWYBRT','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','flatMap','143818TORHBk','custom-list','path','length','read','2490894TAIptQ','react','No\x20Custom\x20Pages\x20found.','9fKfMlS','884010uhSAtm','pageId'];a144_0x130c=function(){return _0x1bbfd6;};return a144_0x130c();}export const pageCustomList={'service':'page','command':a144_0x40e8d6(0x121),'description':a144_0x40e8d6(0x11e),'risk':a144_0x40e8d6(0x10d),'defaultOutputFormat':a144_0x40e8d6(0x114),'structuredErrors':!![],'flags':[APPCODE_FLAG],async 'execute'(_0x2a7f3e){const _0x1e50ae=a144_0x40e8d6,_0x226dbc=(await fetchMenuSnapshot(_0x2a7f3e[_0x1e50ae(0x11c)],_0x2a7f3e[_0x1e50ae(0x118)]))['menus'][_0x1e50ae(0x11f)](_0x566126=>{const _0x3bb7b9=_0x1e50ae;if(_0x566126['type']!==_0x3bb7b9(0x10f)||_0x566126['pageId']==null)return[];const _0x1a1494=buildCustomPageDevelopmentUrl(_0x2a7f3e[_0x3bb7b9(0x11c)],_0x566126[_0x3bb7b9(0x122)]),_0x10cad0=buildCustomPageEditUrl(_0x2a7f3e['appCode'],_0x566126[_0x3bb7b9(0x113)]);return[{'pageId':_0x566126[_0x3bb7b9(0x113)],'label':_0x566126['label'],..._0x1a1494?{'pageUrl':_0x1a1494}:{},..._0x10cad0?{'editPageUrl':_0x10cad0}:{}}];});return{'ok':!![],'data':{'pages':_0x226dbc},'message':_0x226dbc['length']===0x0?_0x1e50ae(0x110):_0x1e50ae(0x116)+_0x226dbc[_0x1e50ae(0x10c)]+_0x1e50ae(0x11b)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a145_0xa6749c=a145_0x52e4;(function(_0x3cdc48,_0x4f4c2){const _0x5d68e3=a145_0x52e4,_0x18a6d9=_0x3cdc48();while(!![]){try{const _0x44de11=-parseInt(_0x5d68e3(0x1d6))/0x1+parseInt(_0x5d68e3(0x1ea))/0x2*(parseInt(_0x5d68e3(0x1ce))/0x3)+-parseInt(_0x5d68e3(0x1dd))/0x4*(-parseInt(_0x5d68e3(0x1e9))/0x5)+parseInt(_0x5d68e3(0x1d2))/0x6*(parseInt(_0x5d68e3(0x1e0))/0x7)+parseInt(_0x5d68e3(0x1eb))/0x8+-parseInt(_0x5d68e3(0x1ec))/0x9+parseInt(_0x5d68e3(0x1e1))/0xa*(-parseInt(_0x5d68e3(0x1dc))/0xb);if(_0x44de11===_0x4f4c2)break;else _0x18a6d9['push'](_0x18a6d9['shift']());}catch(_0xe4944c){_0x18a6d9['push'](_0x18a6d9['shift']());}}}(a145_0x5a6c,0x42b37));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a145_0x5a6c(){const _0x56d450=['421484GDIfyk','unknown','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','status','Custom\x20Page\x20ID','compress','1243dWqJyR','12gxXaOZ','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','push','34153tYRpNI','19870DQQzKq','trim','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','appCode','apiError','page','custom-publish','isInteger','842955UpckDo','50716RiVyKi','1263648LZUZSg','2528469nDGgQg','remark','pageCode','POST','Published\x20Custom\x20Page\x20','Would\x20publish\x20Custom\x20Page\x20','pageId','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','60JcIWfd','cookie','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','warnings','36YgGlgh','write','page.custom-publish','runtimePageUrl'];a145_0x5a6c=function(){return _0x56d450;};return a145_0x5a6c();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';function a145_0x52e4(_0x1e2d0b,_0x58c32f){_0x1e2d0b=_0x1e2d0b-0x1c7;const _0x5a6c71=a145_0x5a6c();let _0x52e48d=_0x5a6c71[_0x1e2d0b];return _0x52e48d;}export const pageCustomPublish={'service':a145_0xa6749c(0x1e6),'command':a145_0xa6749c(0x1e7),'description':a145_0xa6749c(0x1e3),'risk':a145_0xa6749c(0x1d3),'defaultOutputFormat':a145_0xa6749c(0x1db),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a145_0xa6749c(0x1da)},{'name':'remark','type':'string','description':'Optional\x20publish\x20remark'}],async 'validate'(_0x21e24c){readCustomPageId(_0x21e24c);},async 'dryRun'(_0xddfe73){const _0x58d151=a145_0xa6749c,_0x5719bc=readInput(_0xddfe73);return{'method':_0x58d151(0x1c9),'url':'/smartapi/webcode/file/publish','body':{'id':_0x5719bc[_0x58d151(0x1cc)],..._0x5719bc[_0x58d151(0x1c7)]?{'remark':_0x5719bc[_0x58d151(0x1c7)]}:{}},'description':_0x58d151(0x1cb)+_0x5719bc['pageId']+'.'};},async 'execute'(_0x2fb019){const _0x1b9ed4=a145_0xa6749c,_0x4f163a=readInput(_0x2fb019);await getCustomPageSource(_0x4f163a[_0x1b9ed4(0x1cc)]);const _0x85943a=await publishCustomPage(_0x4f163a);if(!Number[_0x1b9ed4(0x1e8)](_0x85943a)||_0x85943a!==_0x4f163a[_0x1b9ed4(0x1cc)])throw CliErrors[_0x1b9ed4(0x1e5)](_0x1b9ed4(0x1d8));const _0x566d60=await getCustomPageSource(_0x4f163a[_0x1b9ed4(0x1cc)]);if(_0x566d60[_0x1b9ed4(0x1d9)]!=='FORMAL')throw CliErrors[_0x1b9ed4(0x1e5)](_0x1b9ed4(0x1d0)+(_0x566d60[_0x1b9ed4(0x1d9)]??_0x1b9ed4(0x1d7))+'.');const _0x27694e=_0x566d60[_0x1b9ed4(0x1e4)]?.[_0x1b9ed4(0x1e2)](),_0x4c7f08=buildCustomPageEditUrl(_0x27694e,_0x4f163a[_0x1b9ed4(0x1cc)]),_0x53e6bf=await resolveCustomPageDevelopmentUrl(_0x27694e,_0x4f163a[_0x1b9ed4(0x1cc)],_0x2fb019[_0x1b9ed4(0x1cf)]),_0x81d5f1=buildMutationData(_0x4f163a,!![],_0x53e6bf,_0x4c7f08);_0x27694e&&!_0x53e6bf&&_0x81d5f1[_0x1b9ed4(0x1d1)][_0x1b9ed4(0x1df)](_0x1b9ed4(0x1de));const _0x1ad148=buildCustomPageRuntimeUrl(_0x566d60[_0x1b9ed4(0x1e4)],_0x566d60[_0x1b9ed4(0x1c8)]);return _0x1ad148?_0x81d5f1[_0x1b9ed4(0x1d5)]=_0x1ad148:_0x81d5f1[_0x1b9ed4(0x1d1)][_0x1b9ed4(0x1df)](_0x1b9ed4(0x1cd)),{'ok':!![],'data':_0x81d5f1,'message':_0x1b9ed4(0x1ca)+_0x4f163a[_0x1b9ed4(0x1cc)]+'.'};}};function readInput(_0x3cb889){const _0x5e2bd9=a145_0xa6749c,_0x333e10=readCustomPageId(_0x3cb889),_0x425ff8=_0x3cb889['str']('remark')[_0x5e2bd9(0x1e2)]();return{'pageId':_0x333e10,..._0x425ff8?{'remark':_0x425ff8}:{}};}function buildMutationData(_0x55228f,_0x511970=![],_0x173f08,_0x4e70fa){const _0x184cbb=a145_0xa6749c;return{'operation':_0x184cbb(0x1d4),'selector':{'pageId':_0x55228f['pageId']},'before':null,'after':{'pageId':_0x55228f[_0x184cbb(0x1cc)],'status':'FORMAL'},'dryRun':!_0x511970,'request':_0x55228f,..._0x173f08?{'pageUrl':_0x173f08}:{},..._0x4e70fa?{'editPageUrl':_0x4e70fa}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a146_0x5129b0=a146_0x13ed;(function(_0x2504a9,_0x29d872){const _0x1df174=a146_0x13ed,_0x3c8aaa=_0x2504a9();while(!![]){try{const _0x302664=parseInt(_0x1df174(0x177))/0x1*(-parseInt(_0x1df174(0x172))/0x2)+-parseInt(_0x1df174(0x180))/0x3+parseInt(_0x1df174(0x16a))/0x4+parseInt(_0x1df174(0x178))/0x5+parseInt(_0x1df174(0x181))/0x6+parseInt(_0x1df174(0x17f))/0x7*(parseInt(_0x1df174(0x173))/0x8)+parseInt(_0x1df174(0x17d))/0x9*(-parseInt(_0x1df174(0x170))/0xa);if(_0x302664===_0x29d872)break;else _0x3c8aaa['push'](_0x3c8aaa['shift']());}catch(_0x540211){_0x3c8aaa['push'](_0x3c8aaa['shift']());}}}(a146_0x59cf,0x941d9));function a146_0x59cf(){const _0x1f9345=['message','some','flagMissing','menus','3557889XjZhpK','trim','1648409UfrXmP','2836626MqBYvg','7106040beEQZp','values','pageId','--page-content\x20must\x20be\x20valid\x20JSON.','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','file','4777128xtsoMq','validation','/ide/','find','/pages/','parse','30FspaTk','length','12SHUSba','8ZPxvHN','join','isInteger','type','74905kROFSo','2867535AVAvfx'];a146_0x59cf=function(){return _0x1f9345;};return a146_0x59cf();}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';function a146_0x13ed(_0x25f631,_0xa9460){_0x25f631=_0x25f631-0x168;const _0x59cf6=a146_0x59cf();let _0x13edb6=_0x59cf6[_0x25f631];return _0x13edb6;}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a146_0x5129b0(0x168)};function trimOptional(_0x49efcd){const _0x21915e=a146_0x5129b0;return _0x49efcd?.[_0x21915e(0x17e)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x16c079,_0x227804){const _0x4c66a8=trimOptional(_0x16c079),_0x36dfab=trimOptional(_0x227804);if(!_0x4c66a8||!_0x36dfab)return undefined;return getPublishedAppDomain(_0x4c66a8)+'/'+encodeURIComponent(_0x36dfab);}export function buildCustomPageDevelopmentUrl(_0x2f7a95,_0x392dee){const _0x1e7459=a146_0x5129b0,_0x2f0fba=trimOptional(_0x2f7a95),_0x27269f=trimOptional(_0x392dee);if(!_0x2f0fba||!_0x27269f)return undefined;return getAppBaseUrl(_0x2f0fba)+_0x1e7459(0x16e)+encodeURIComponent(_0x27269f);}export async function resolveCustomPageDevelopmentUrl(_0x547ead,_0x2cbcea,_0x237315){const _0x362f81=a146_0x5129b0,_0x5ae22b=trimOptional(_0x547ead);if(!_0x5ae22b)return undefined;try{const _0x1aa9f7=(await fetchMenuSnapshot(_0x5ae22b,_0x237315))[_0x362f81(0x17c)][_0x362f81(0x16d)](_0x3d83c7=>_0x3d83c7[_0x362f81(0x176)]==='react'&&_0x3d83c7[_0x362f81(0x183)]===_0x2cbcea);return buildCustomPageDevelopmentUrl(_0x5ae22b,_0x1aa9f7?.['path']);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x3d62c0,_0x5f2990){const _0x9f7a5d=a146_0x5129b0,_0x27f203=trimOptional(_0x3d62c0);if(!_0x27f203)return;const _0x6d7d5b=trimOptional(_0x5f2990==null?undefined:String(_0x5f2990));if(!_0x6d7d5b)return;return getAppBaseUrl(_0x27f203)+_0x9f7a5d(0x16c)+encodeURIComponent(_0x6d7d5b);}export function parseCustomPageContent(_0x2f5145){const _0x3285bf=a146_0x5129b0;if(!_0x2f5145[_0x3285bf(0x17e)]())throw CliErrors[_0x3285bf(0x17b)]('page-content');let _0x3f6b55;try{_0x3f6b55=JSON[_0x3285bf(0x16f)](_0x2f5145);}catch{throw CliErrors['validation'](_0x3285bf(0x184));}if(typeof _0x3f6b55!=='object'||_0x3f6b55===null||Array['isArray'](_0x3f6b55)||Object[_0x3285bf(0x182)](_0x3f6b55)[_0x3285bf(0x17a)](_0x22b4ea=>typeof _0x22b4ea!=='string'))throw CliErrors[_0x3285bf(0x16b)]('--page-content\x20must\x20be\x20a\x20JSON\x20object\x20whose\x20values\x20are\x20file\x20content\x20strings.');return _0x3f6b55;}export async function validateCustomPageContent(_0xdd4870){const _0x3ecd14=a146_0x5129b0,_0xa436f1=await validateCustomPageSourceFiles(_0xdd4870);if(_0xa436f1[_0x3ecd14(0x171)]>0x0)throw CliErrors[_0x3ecd14(0x16b)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0xa436f1['map'](_0x32a7ab=>_0x32a7ab[_0x3ecd14(0x169)]+':\x20'+_0x32a7ab[_0x3ecd14(0x179)])[_0x3ecd14(0x174)](';\x20'));}export function readCustomPageId(_0x5beb30){const _0x5f1f00=a146_0x5129b0,_0x513b41=_0x5beb30['num']('id');if(!Number[_0x5f1f00(0x175)](_0x513b41)||_0x513b41<=0x0)throw CliErrors[_0x5f1f00(0x16b)]('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x513b41;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x5a7911=a147_0x18d8;(function(_0x2e2adf,_0x5171c0){const _0x47f2b2=a147_0x18d8,_0x142480=_0x2e2adf();while(!![]){try{const _0x314ea8=-parseInt(_0x47f2b2(0xae))/0x1+-parseInt(_0x47f2b2(0xb1))/0x2+-parseInt(_0x47f2b2(0xc2))/0x3+parseInt(_0x47f2b2(0xb3))/0x4*(-parseInt(_0x47f2b2(0xbc))/0x5)+-parseInt(_0x47f2b2(0xb8))/0x6+parseInt(_0x47f2b2(0xb2))/0x7+parseInt(_0x47f2b2(0xac))/0x8*(parseInt(_0x47f2b2(0xc0))/0x9);if(_0x314ea8===_0x5171c0)break;else _0x142480['push'](_0x142480['shift']());}catch(_0x14474f){_0x142480['push'](_0x142480['shift']());}}}(a147_0xd77a,0xb35fd));function a147_0x18d8(_0x365472,_0x5a075d){_0x365472=_0x365472-0xac;const _0xd77a99=a147_0xd77a();let _0x18d8b9=_0xd77a99[_0x365472];return _0x18d8b9;}import{format}from'prettier';const SOURCE_PARSERS={'.js':'babel','.jsx':a147_0x5a7911(0xba),'.ts':a147_0x5a7911(0xb7),'.tsx':a147_0x5a7911(0xb7)},CUSTOM_PAGE_EXTENSIONS=[a147_0x5a7911(0xb0),a147_0x5a7911(0xb9)];export async function validateCustomPageSourceFiles(_0x11464b){const _0x24d8c1=a147_0x5a7911,_0x5c53d6=Object['entries'](_0x11464b)[_0x24d8c1(0xb4)](([_0x41e728])=>getParser(_0x41e728));if(!_0x5c53d6['some'](([_0x10a76e])=>isReactSourceFile(_0x10a76e)))return[{'file':'page-content','message':_0x24d8c1(0xbf)}];const _0x23d4d2=await Promise[_0x24d8c1(0xbe)](_0x5c53d6[_0x24d8c1(0xaf)](async([_0x653457,_0x242fba])=>{const _0x5a35e9=_0x24d8c1;try{return await format(_0x242fba,{'parser':getParser(_0x653457)}),undefined;}catch(_0x560b5b){return{'file':_0x653457,'message':_0x560b5b instanceof Error?_0x560b5b[_0x5a35e9(0xad)]:String(_0x560b5b)};}}));return _0x23d4d2[_0x24d8c1(0xb4)](_0x130c33=>_0x130c33!==undefined);}function getParser(_0x2d1df1){const _0x503064=a147_0x5a7911,_0x3f4553=_0x2d1df1[_0x503064(0xbb)]()['toLowerCase']();return Object[_0x503064(0xbd)](SOURCE_PARSERS)[_0x503064(0xb6)](([_0xb3cf6e])=>_0x3f4553[_0x503064(0xb5)](_0xb3cf6e))?.[0x1];}function isReactSourceFile(_0x1365bd){const _0x4ad8c6=a147_0x5a7911,_0x5f569b=_0x1365bd[_0x4ad8c6(0xbb)]()[_0x4ad8c6(0xc1)]();return CUSTOM_PAGE_EXTENSIONS['some'](_0x3df270=>_0x5f569b[_0x4ad8c6(0xb5)](_0x3df270));}function a147_0xd77a(){const _0x17042e=['6149633mILzVm','8mznQdt','filter','endsWith','find','typescript','2795388CFvghr','.tsx','babel','trim','2192915xbaKsJ','entries','all','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','477dZVeeE','toLowerCase','3062946ZHrUtx','533632KMkLOt','message','95313KlhWTN','map','.jsx','2439510xfdNdM'];a147_0xd77a=function(){return _0x17042e;};return a147_0xd77a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x223124,_0x3d1ce0){const _0x3c5be9=a148_0x5efc,_0x2f7779=_0x223124();while(!![]){try{const _0x1a7da9=-parseInt(_0x3c5be9(0x101))/0x1+-parseInt(_0x3c5be9(0x105))/0x2*(parseInt(_0x3c5be9(0x104))/0x3)+parseInt(_0x3c5be9(0xfd))/0x4+parseInt(_0x3c5be9(0x10f))/0x5*(-parseInt(_0x3c5be9(0x102))/0x6)+-parseInt(_0x3c5be9(0x113))/0x7*(parseInt(_0x3c5be9(0x106))/0x8)+parseInt(_0x3c5be9(0x109))/0x9*(-parseInt(_0x3c5be9(0x112))/0xa)+parseInt(_0x3c5be9(0x10d))/0xb;if(_0x1a7da9===_0x3d1ce0)break;else _0x2f7779['push'](_0x2f7779['shift']());}catch(_0x41acb2){_0x2f7779['push'](_0x2f7779['shift']());}}}(a148_0x5e88,0xbcbae));function a148_0x5e88(){const _0x34b161=['这是一个基础页面模板,你可以在此基础上进行开发。','This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.','52769717EDjAOn','map','4047185lHXKvS','Ini\x20adalah\x20sebuah\x20halaman\x20dasar.\x20Anda\x20dapat\x20mengembangkan\x20ini.','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}>{','10DDKuIk','6313517GgDwis','en-US','2666100zTtBAE',':\x20{\x0a\x20\x20\x20\x20','これは基本ページテンプレートです。あなたは、これに基づいて開発できます。','export\x20const\x20locales\x20=\x20{\x0a','953935UPybwR','6cqRxIw','\x0a};\x0a','6ekcqdm','1023688oVsAmd','8JEHeEv','id-ID',',\x0a\x20\x20}','9015687tGGjap','stringify'];a148_0x5e88=function(){return _0x34b161;};return a148_0x5e88();}function a148_0x5efc(_0x5e43e6,_0x348871){_0x5e43e6=_0x5e43e6-0xfc;const _0x5e88fc=a148_0x5e88();let _0x5efc29=_0x5e88fc[_0x5e43e6];return _0x5efc29;}function buildIndexFile(_0x4442f1){const _0x9ead30=a148_0x5efc;return _0x9ead30(0x111)+JSON[_0x9ead30(0x10a)](_0x4442f1)+'}</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';}function buildStyleFile(){return'.page-container\x20{\x0a\x20\x20padding:\x2024px;\x0a\x20\x20background:\x20#f0f2f5;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a';}function buildLocalesFile(_0x3a34ce){const _0x59b238=a148_0x5efc,_0x3cc69d=_0x3a34ce[_0x59b238(0x10e)](_0x1541c8=>{const _0x17c2a4=_0x59b238;let _0x99704f='';switch(_0x1541c8){case'zh-CN':_0x99704f=_0x17c2a4(0x10b);break;case _0x17c2a4(0xfc):_0x99704f=_0x17c2a4(0x10c);break;case'ja-JP':_0x99704f=_0x17c2a4(0xff);break;case'tr-TR':_0x99704f='Bu\x20bir\x20temel\x20sayfa\x20şablonudur.\x20Bu\x20temaplana\x20dayanarak\x20geliştirilebilir.';break;case _0x17c2a4(0x107):_0x99704f=_0x17c2a4(0x110);break;default:_0x99704f=_0x17c2a4(0x10c);}return'\x20\x20'+JSON[_0x17c2a4(0x10a)](_0x1541c8)+_0x17c2a4(0xfe)+JSON['stringify']('pageDescription')+':\x20'+JSON[_0x17c2a4(0x10a)](_0x99704f)+_0x17c2a4(0x108);})['join'](',\x0a');return _0x59b238(0x100)+_0x3cc69d+_0x59b238(0x103);}export function buildInitialFiles(_0xf8d2ce,_0x5c0d3f){return{'src/app/index.jsx':buildIndexFile(_0xf8d2ce),'src/app/index.css':buildStyleFile(),'src/locales/index.js':buildLocalesFile(_0x5c0d3f)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a149_0x5aabb0=a149_0x43d0;(function(_0x39b22d,_0x54738a){const _0x5dae26=a149_0x43d0,_0x474e41=_0x39b22d();while(!![]){try{const _0x209015=parseInt(_0x5dae26(0xeb))/0x1*(parseInt(_0x5dae26(0xfb))/0x2)+parseInt(_0x5dae26(0xf7))/0x3+-parseInt(_0x5dae26(0xf5))/0x4+parseInt(_0x5dae26(0xea))/0x5+parseInt(_0x5dae26(0xe6))/0x6+parseInt(_0x5dae26(0xef))/0x7*(-parseInt(_0x5dae26(0xf2))/0x8)+-parseInt(_0x5dae26(0xfa))/0x9*(parseInt(_0x5dae26(0xf4))/0xa);if(_0x209015===_0x54738a)break;else _0x474e41['push'](_0x474e41['shift']());}catch(_0x4571a3){_0x474e41['push'](_0x474e41['shift']());}}}(a149_0x4937,0x588a0));function a149_0x43d0(_0x253ed8,_0x461ed8){_0x253ed8=_0x253ed8-0xe4;const _0x4937dd=a149_0x4937();let _0x43d059=_0x4937dd[_0x253ed8];return _0x43d059;}import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,parseCustomPageContent,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a149_0x5aabb0(0x106),'command':a149_0x5aabb0(0x101),'description':a149_0x5aabb0(0xf6),'risk':a149_0x5aabb0(0xe9),'defaultOutputFormat':a149_0x5aabb0(0x108),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a149_0x5aabb0(0xf1),'required':!![],'description':'Custom\x20Page\x20ID'},{'name':'page-content','type':a149_0x5aabb0(0xf8),'required':!![],'description':a149_0x5aabb0(0xf9)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5b80a2){const _0x3b2c30=a149_0x5aabb0;readCustomPageId(_0x5b80a2),await validateCustomPageContent(parseCustomPageContent(_0x5b80a2[_0x3b2c30(0xf3)](_0x3b2c30(0x104))));},async 'dryRun'(_0x163f27){const _0x18588e=a149_0x5aabb0,_0x4e22de=await readInput(_0x163f27);return{'method':_0x18588e(0x102),'url':_0x18588e(0x100),'body':{'id':_0x4e22de[_0x18588e(0x103)],'codeContent':_0x4e22de[_0x18588e(0xfc)]},'description':_0x18588e(0x107)+_0x4e22de['pageId']+'.'};},async 'execute'(_0x2e2a9e){const _0x3e3be6=a149_0x5aabb0,_0x13c11f=await readInput(_0x2e2a9e),_0x3c2368=await updateCustomPageContent({'pageId':_0x13c11f['pageId'],'pageContent':_0x13c11f[_0x3e3be6(0xfc)]});if(!Number[_0x3e3be6(0xed)](_0x3c2368[_0x3e3be6(0xee)])||_0x3c2368[_0x3e3be6(0xee)]<=0x0)throw CliErrors[_0x3e3be6(0xf0)](_0x3e3be6(0xfd));const _0x5dd5db=buildCustomPageEditUrl(_0x13c11f['appCode'],_0x13c11f['pageId']),_0x1b39e6=await resolveCustomPageDevelopmentUrl(_0x13c11f[_0x3e3be6(0xfe)],_0x13c11f['pageId'],_0x2e2a9e[_0x3e3be6(0xe7)]);return{'ok':!![],'data':buildMutationData(_0x13c11f,_0x3c2368,_0x1b39e6,_0x5dd5db,_0x1b39e6?[]:[_0x3e3be6(0xe4)]),'message':_0x3e3be6(0xe5)+_0x13c11f['pageId']+'.'};}};async function readInput(_0x374ba0){const _0x4f804d=a149_0x5aabb0,_0x3125f0=readCustomPageId(_0x374ba0),_0x237e52=_0x374ba0[_0x4f804d(0xf3)]('appcode')[_0x4f804d(0xec)]()||(await getCustomPageSource(_0x3125f0))[_0x4f804d(0xfe)]?.['trim']();if(!_0x237e52)throw CliErrors[_0x4f804d(0xff)](_0x4f804d(0x105)+_0x3125f0+'.');return{'appCode':_0x237e52,'pageId':_0x3125f0,'pageContent':parseCustomPageContent(_0x374ba0[_0x4f804d(0xf3)](_0x4f804d(0x104)))};}function buildMutationData(_0x146647,_0x53875b,_0x258050,_0xb5c4e1,_0x12755e=[]){const _0x508652=a149_0x5aabb0;return{'operation':_0x508652(0xe8),'selector':{'appCode':_0x146647['appCode'],'pageId':_0x146647[_0x508652(0x103)]},'before':null,'after':{'pageId':_0x53875b?.[_0x508652(0x103)]??_0x146647['pageId'],'version':_0x53875b?.['newVersion']??null,'pageContent':_0x146647[_0x508652(0xfc)]},'dryRun':_0x53875b===undefined,'request':_0x146647,..._0x258050?{'pageUrl':_0x258050}:{},..._0xb5c4e1?{'editPageUrl':_0xb5c4e1}:{},'warnings':_0x12755e};}function a149_0x4937(){const _0x5c8119=['3317286gzDqfy','cookie','page.custom-update','write','1827740HGoxgx','2471WeVcEV','trim','isInteger','newVersion','56476XWyCrM','apiError','number','216hguJey','str','269520nHCqkQ','1216888nzktUa','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','1846524awQICc','string','Complete\x20page\x20files\x20as\x20JSON','414XqsCdO','478YyORRn','pageContent','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','appCode','validation','/smartapi/webcode/page/update/content','custom-update','POST','pageId','page-content','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','page','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','compress','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','Updated\x20Custom\x20Page\x20'];a149_0x4937=function(){return _0x5c8119;};return a149_0x4937();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a150_0x20591e=a150_0x1f1f;(function(_0x301320,_0x75e6e9){const _0x22bcbf=a150_0x1f1f,_0x4e208f=_0x301320();while(!![]){try{const _0x3cd898=-parseInt(_0x22bcbf(0xa7))/0x1+-parseInt(_0x22bcbf(0xab))/0x2+-parseInt(_0x22bcbf(0xb8))/0x3+-parseInt(_0x22bcbf(0xb4))/0x4*(-parseInt(_0x22bcbf(0xb7))/0x5)+parseInt(_0x22bcbf(0xb6))/0x6*(parseInt(_0x22bcbf(0xae))/0x7)+parseInt(_0x22bcbf(0xb2))/0x8*(parseInt(_0x22bcbf(0xa4))/0x9)+-parseInt(_0x22bcbf(0x9f))/0xa*(-parseInt(_0x22bcbf(0x9e))/0xb);if(_0x3cd898===_0x75e6e9)break;else _0x4e208f['push'](_0x4e208f['shift']());}catch(_0x1f65c8){_0x4e208f['push'](_0x4e208f['shift']());}}}(a150_0x53cd,0x3f7ef));function a150_0x1f1f(_0x4d759e,_0x20d629){_0x4d759e=_0x4d759e-0x9d;const _0x53cd2c=a150_0x53cd();let _0x1f1fae=_0x53cd2c[_0x4d759e];return _0x1f1fae;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':'page','command':'data-list-status','description':a150_0x20591e(0x9d),'risk':a150_0x20591e(0xb5),'defaultOutputFormat':a150_0x20591e(0xb9),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a150_0x20591e(0xa3),'type':a150_0x20591e(0xa1),'description':a150_0x20591e(0xa8)}],async 'validate'(_0x26b9ee){validateDatasetSelector(_0x26b9ee);},async 'dryRun'(_0x1dba48){const _0x56b34b=a150_0x20591e,_0x198b5a=await loadDatasetDetailForPage(_0x1dba48);return{'method':_0x56b34b(0xb3),'url':_0x56b34b(0xac)+_0x198b5a['code']+_0x56b34b(0xa2)+encodeURIComponent(_0x1dba48[_0x56b34b(0xaa)]),'description':serializeDryRunDescription({'dataset':{'id':_0x198b5a['id'],'code':_0x198b5a[_0x56b34b(0xa5)],'name':_0x198b5a[_0x56b34b(0xa9)]},'action':_0x56b34b(0xba)})};},async 'execute'(_0x199a4a){const _0x21ff46=a150_0x20591e,_0x4cfb36=await loadDatasetDetailForPage(_0x199a4a),_0x3bd840=await loadDataListPageStatusForGenerate(_0x199a4a,_0x4cfb36[_0x21ff46(0xa5)]),_0x257634=getUndeletedRelatedPages(_0x4cfb36),_0x4ba4cd=assessDataListPageState(_0x4cfb36['code'],_0x3bd840,{'fallbackUndeletedPages':_0x257634});return{'ok':!![],'data':{'datasetCode':_0x4cfb36[_0x21ff46(0xa5)],'precheckSource':_0x3bd840?.[_0x21ff46(0xaf)]??_0x21ff46(0xb0),'status':_0x4ba4cd[_0x21ff46(0xa0)],'manualResolutionRequired':_0x4ba4cd[_0x21ff46(0xa6)],'nextAction':_0x4ba4cd['nextAction'],'dataListPageStatus':_0x3bd840,'relatedPages':{'total':_0x4cfb36[_0x21ff46(0xad)][_0x21ff46(0xb1)],'undeletedCount':_0x257634[_0x21ff46(0xb1)]}}};}};function a150_0x53cd(){const _0x1b8fb1=['50965gdvTzV','265320UQxVwY','compress','query-data-list-status','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','14245TCjuaY','1550ZBXWwl','status','string','/standard-page-status?appCode=','alias','603RlCrUT','code','manualResolutionRequired','109982XhLcvX','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','name','appCode','91584buqRqU','/smartapi/lovrabet/dataset/','relatedPages','12474rdZsHA','source','related-pages-fallback','length','5088tpzNwZ','GET','8rNswmX','read','810NtlvJk'];a150_0x53cd=function(){return _0x1b8fb1;};return a150_0x53cd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x227294=a151_0x5f59;(function(_0x530a81,_0x656c35){const _0x47459f=a151_0x5f59,_0x4b19e3=_0x530a81();while(!![]){try{const _0x2393a5=parseInt(_0x47459f(0x83))/0x1*(parseInt(_0x47459f(0x89))/0x2)+parseInt(_0x47459f(0xa5))/0x3+-parseInt(_0x47459f(0x82))/0x4+parseInt(_0x47459f(0x95))/0x5+-parseInt(_0x47459f(0x87))/0x6*(parseInt(_0x47459f(0x90))/0x7)+parseInt(_0x47459f(0x99))/0x8+parseInt(_0x47459f(0x92))/0x9*(-parseInt(_0x47459f(0x88))/0xa);if(_0x2393a5===_0x656c35)break;else _0x4b19e3['push'](_0x4b19e3['shift']());}catch(_0xe9a42d){_0x4b19e3['push'](_0x4b19e3['shift']());}}}(a151_0x2384,0x62565));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';function a151_0x2384(){const _0x397e77=['compress','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','page-type','dataset','2383335IQygPR','precheck','PARTIAL_SUCCESS','/generate-standard-pages/start','source','status','page','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','progressRate','bool','clientOperationId','fieldCount','reused','/smartapi/lovrabet/dataset/','nextAction','2148956hHyMbC','203173qzLOBl','code','message','related-pages-fallback','3031206msbYEf','110wgjwUd','2ZVNIjF','dataListPageStatus','allowGenerate','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','alias','apply','7HUlvwM','SUCCESS','392013CvGykh','boolean','operationId','1873610DjotvM','dryRun','manualResolutionRequired','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','4416128yPJJQf','POST','taskId','appCode','generate-start','currentStep','write','DATA_LIST'];a151_0x2384=function(){return _0x397e77;};return a151_0x2384();}function a151_0x5f59(_0x1d54fd,_0x38e647){_0x1d54fd=_0x1d54fd-0x77;const _0x2384c9=a151_0x2384();let _0x5f597b=_0x2384c9[_0x1d54fd];return _0x5f597b;}export const pageGenerateStart={'service':a151_0x227294(0x79),'command':a151_0x227294(0x9d),'description':a151_0x227294(0x8d),'risk':a151_0x227294(0x9f),'defaultOutputFormat':a151_0x227294(0xa1),'rejectedFlags':[{'name':a151_0x227294(0xa3),'message':a151_0x227294(0x8c),'hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':'page-pattern','message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','hint':a151_0x227294(0x98)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a151_0x227294(0x8e),'type':'string','description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a151_0x227294(0x8f),'type':a151_0x227294(0x93),'description':a151_0x227294(0xa2)}],async 'validate'(_0x15b806){validateDatasetSelector(_0x15b806);},async 'dryRun'(_0x2019f0){const _0xd0445=a151_0x227294,_0x33d14d=await prepare(_0x2019f0);return{'method':_0xd0445(0x9a),'url':_0xd0445(0x80)+_0x33d14d[_0xd0445(0xa4)]['code']+_0xd0445(0xa8),'body':{'appCode':_0x2019f0[_0xd0445(0x9c)],'clientOperationId':_0x33d14d[_0xd0445(0x7d)]},'description':serializeDryRunDescription({'dataset':{'id':_0x33d14d[_0xd0445(0xa4)]['id'],'code':_0x33d14d['dataset'][_0xd0445(0x84)],'name':_0x33d14d['dataset']['name'],'fieldCount':_0x33d14d[_0xd0445(0xa4)][_0xd0445(0x7e)]},'precheckSource':_0x33d14d[_0xd0445(0x8a)]?.[_0xd0445(0x77)]??_0xd0445(0x86),'action':_0xd0445(0x9d),'clientOperationId':_0x33d14d[_0xd0445(0x7d)],'plannedStatus':_0x33d14d[_0xd0445(0xa6)][_0xd0445(0x78)],'reason':_0x33d14d[_0xd0445(0xa6)][_0xd0445(0x85)]})};},async 'execute'(_0xfd0c73){const _0x1f3e21=a151_0x227294;if(!_0xfd0c73[_0x1f3e21(0x7c)](_0x1f3e21(0x8f))){const _0x236999=await pageGenerateStart[_0x1f3e21(0x96)](_0xfd0c73);return{'ok':!![],'message':_0x1f3e21(0x7a),'data':_0x236999};}const _0x358bd9=await prepare(_0xfd0c73);if(!_0x358bd9['precheck'][_0x1f3e21(0x8b)])return{'ok':![],'message':_0x358bd9[_0x1f3e21(0xa6)]['message'],'data':{'datasetCode':_0x358bd9[_0x1f3e21(0xa4)][_0x1f3e21(0x84)],'pageType':_0x1f3e21(0xa0),'pagePattern':'CRUD_PAGE_SET','clientOperationId':_0x358bd9[_0x1f3e21(0x7d)],'precheckSource':_0x358bd9[_0x1f3e21(0x8a)]?.[_0x1f3e21(0x77)]??_0x1f3e21(0x86),'status':_0x358bd9[_0x1f3e21(0xa6)][_0x1f3e21(0x78)],'manualResolutionRequired':_0x358bd9['precheck'][_0x1f3e21(0x97)],'nextAction':_0x358bd9['precheck'][_0x1f3e21(0x81)],'query':{'command':buildDataListPageStatusQueryCommand(_0x358bd9[_0x1f3e21(0xa4)][_0x1f3e21(0x84)],_0xfd0c73[_0x1f3e21(0x9c)])},'dataListPageStatus':_0x358bd9['dataListPageStatus']}};const _0x46f323=await startGenerateDataListPages(_0xfd0c73[_0x1f3e21(0x9c)],_0x358bd9[_0x1f3e21(0xa4)]['code'],{'clientOperationId':_0x358bd9[_0x1f3e21(0x7d)]}),_0xedd5f0=_0x46f323['status']===_0x1f3e21(0x91)||_0x46f323[_0x1f3e21(0x78)]===_0x1f3e21(0xa7)?await loadDataListPageStatusForGenerate(_0xfd0c73,_0x358bd9[_0x1f3e21(0xa4)][_0x1f3e21(0x84)]):null,_0x5a725e=assessGenerateOperationState(_0x358bd9['dataset'][_0x1f3e21(0x84)],_0x46f323[_0x1f3e21(0x78)],_0xedd5f0);return{'ok':!![],'message':_0x46f323[_0x1f3e21(0x7f)]?'Reusing\x20an\x20existing\x20generate\x20task':'Submitted\x20a\x20generate\x20task','data':{'datasetCode':_0x358bd9[_0x1f3e21(0xa4)][_0x1f3e21(0x84)],'appCode':_0xfd0c73[_0x1f3e21(0x9c)],'pageType':_0x1f3e21(0xa0),'pagePattern':'CRUD_PAGE_SET','taskId':_0x46f323[_0x1f3e21(0x9b)]??null,'operationId':_0x46f323['operationId']??null,'clientOperationId':_0x358bd9[_0x1f3e21(0x7d)],'jobStatus':_0x46f323[_0x1f3e21(0x78)]??null,'progressRate':typeof _0x46f323[_0x1f3e21(0x7b)]==='number'?_0x46f323['progressRate']:null,'currentStep':_0x46f323[_0x1f3e21(0x9e)]??null,'reused':_0x46f323[_0x1f3e21(0x7f)]===!![],'status':_0x5a725e[_0x1f3e21(0x78)],'manualResolutionRequired':_0x5a725e[_0x1f3e21(0x97)],'nextAction':_0x5a725e[_0x1f3e21(0x81)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x358bd9[_0x1f3e21(0xa4)]['code'],{'appCode':_0xfd0c73['appCode'],'taskId':_0x46f323[_0x1f3e21(0x9b)],'operationId':_0x46f323[_0x1f3e21(0x94)],'clientOperationId':_0x358bd9['clientOperationId']})},'dataListPageStatus':_0xedd5f0}};}};async function prepare(_0x15b6cd){const _0x29459b=a151_0x227294,_0x5d0ddc=await loadDatasetDetailForPage(_0x15b6cd),_0x4154d9=await loadDataListPageStatusForGenerate(_0x15b6cd,_0x5d0ddc[_0x29459b(0x84)]),_0x300ec2=getUndeletedRelatedPages(_0x5d0ddc);return{'dataset':_0x5d0ddc,'dataListPageStatus':_0x4154d9,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x5d0ddc[_0x29459b(0x84)],_0x4154d9,{'fallbackUndeletedPages':_0x300ec2})};}
|