@lovrabet/rabetbase-cli 2.5.4-beta.3 → 2.5.4-beta.4
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/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.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/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-user-account.md +8 -8
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a181_0x1fbea3=a181_0x5936;(function(_0x3c3bcb,_0x92c4e5){const _0x1faa46=a181_0x5936,_0x2ea2b7=_0x3c3bcb();while(!![]){try{const _0x17f871=-parseInt(_0x1faa46(0x89))/0x1*(-parseInt(_0x1faa46(0xa6))/0x2)+parseInt(_0x1faa46(0xe8))/0x3+parseInt(_0x1faa46(0xe9))/0x4+-parseInt(_0x1faa46(0xb4))/0x5+-parseInt(_0x1faa46(0x9c))/0x6*(-parseInt(_0x1faa46(0xb8))/0x7)+parseInt(_0x1faa46(0xed))/0x8*(parseInt(_0x1faa46(0xbf))/0x9)+parseInt(_0x1faa46(0xe7))/0xa*(-parseInt(_0x1faa46(0x85))/0xb);if(_0x17f871===_0x92c4e5)break;else _0x2ea2b7['push'](_0x2ea2b7['shift']());}catch(_0x11819b){_0x2ea2b7['push'](_0x2ea2b7['shift']());}}}(a181_0x4113,0x2302d));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a181_0x1fbea3(0xc9),a181_0x1fbea3(0xcb),a181_0x1fbea3(0xa8),a181_0x1fbea3(0xe3),a181_0x1fbea3(0xe5)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x1fbea3(0x8c),a181_0x1fbea3(0xaf),a181_0x1fbea3(0x83),a181_0x1fbea3(0x9d),a181_0x1fbea3(0xc6),a181_0x1fbea3(0x81),a181_0x1fbea3(0xab)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a181_0x1fbea3(0xe2),a181_0x1fbea3(0xa9),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x1fbea3(0xd2),a181_0x1fbea3(0xcf),a181_0x1fbea3(0xde),a181_0x1fbea3(0xad),a181_0x1fbea3(0x8f),a181_0x1fbea3(0x84),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a181_0x1fbea3(0x8d),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a181_0x1fbea3(0x86),'type':a181_0x1fbea3(0xf0),'required':![],'default':![],'description':a181_0x1fbea3(0xb3)},{'name':a181_0x1fbea3(0x92),'type':a181_0x1fbea3(0x8d),'required':![],'description':a181_0x1fbea3(0x8b)}];function a181_0x5936(_0x1f8891,_0x6e9ad2){_0x1f8891=_0x1f8891-0x7f;const _0x4113c4=a181_0x4113();let _0x59367f=_0x4113c4[_0x1f8891];return _0x59367f;}export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a181_0x1fbea3(0xe6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0xd3f86b,_0xdc2f08,_0x459cba){return new CliError(_0xd3f86b,0x1,_0xdc2f08,_0x459cba);}export function readNotificationId(_0xfe4a78){const _0x535a16=a181_0x1fbea3,_0x1a637c=_0xfe4a78[_0x535a16(0xb5)]('id');if(!Number['isSafeInteger'](_0x1a637c)||_0x1a637c<=0x0)throw notificationError('notification_config_id_invalid','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x1a637c;}export function requireNotificationExplicitYes(_0x3d02f5){const _0x1e98ab=a181_0x1fbea3;if(_0x3d02f5[_0x1e98ab(0xf5)](_0x1e98ab(0xd7))||_0x3d02f5[_0x1e98ab(0xf5)](_0x1e98ab(0x8a)))return;throw notificationError('notification_config_confirmation_required',_0x1e98ab(0xb1),_0x1e98ab(0xcd));}export function readNotificationChannelType(_0x3d6b4b,_0x3280c1=a181_0x1fbea3(0x80),_0x1a9f08=a181_0x1fbea3(0xc9)){const _0x302f9b=a181_0x1fbea3,_0x12be4c=_0x3d6b4b[_0x302f9b(0x7f)](_0x3280c1)[_0x302f9b(0xc4)]()||_0x1a9f08;if(!NOTIFICATION_CHANNEL_TYPES[_0x302f9b(0xb9)](_0x12be4c))throw CliErrors['validation']('Invalid\x20--'+_0x3280c1+':\x20'+_0x12be4c,_0x302f9b(0xa5)+NOTIFICATION_CHANNEL_TYPES[_0x302f9b(0xb0)](',\x20')+'.');return _0x12be4c;}export function assertSingleNotificationSource(_0x27f882){const _0x44ae11=a181_0x1fbea3,_0x28f0ca=[],_0x3a8b29=_0x27f882[_0x44ae11(0x7f)](_0x44ae11(0xd0))[_0x44ae11(0xc4)]();if(_0x3a8b29)_0x28f0ca[_0x44ae11(0xcc)]({'kind':_0x44ae11(0xd0),'path':_0x3a8b29});if(_0x27f882[_0x44ae11(0xf5)](_0x44ae11(0x86)))_0x28f0ca[_0x44ae11(0xcc)]({'kind':'stdin'});const _0x543912=_0x27f882[_0x44ae11(0x7f)](_0x44ae11(0x92))[_0x44ae11(0xc4)]();if(_0x543912)_0x28f0ca[_0x44ae11(0xcc)]({'kind':_0x44ae11(0xc5),'name':_0x543912});if(_0x28f0ca['length']===0x0)throw CliErrors[_0x44ae11(0x9a)](_0x44ae11(0xbd),_0x44ae11(0xd1));if(_0x28f0ca[_0x44ae11(0xf1)]>0x1)throw CliErrors[_0x44ae11(0x9a)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x44ae11(0xd1));return _0x28f0ca[0x0];}export async function readNotificationDocument(_0x34fb5f,_0x2526bc){const _0x4fcbc0=a181_0x1fbea3,_0x4ecd11=assertSingleNotificationSource(_0x34fb5f),_0x53204b=_0x4ecd11['kind']===_0x4fcbc0(0xd0)?'file\x20'+_0x4ecd11[_0x4fcbc0(0x96)]:_0x4ecd11[_0x4fcbc0(0xfa)]===_0x4fcbc0(0xc5)?_0x4fcbc0(0xaa)+_0x4ecd11[_0x4fcbc0(0xb2)]:_0x4fcbc0(0x86);let _0x28894e;try{if(_0x4ecd11['kind']==='file')_0x28894e=await readFile(_0x4ecd11['path'],_0x4fcbc0(0xe0));else{if(_0x4ecd11[_0x4fcbc0(0xfa)]===_0x4fcbc0(0xc5)){if(!(_0x4ecd11[_0x4fcbc0(0xb2)]in process.env))throw notificationError(_0x4fcbc0(0xda),_0x4fcbc0(0xe1)+_0x4ecd11[_0x4fcbc0(0xb2)]);_0x28894e=process.env[_0x4ecd11.name]??'';}else _0x28894e=await readStdin();}}catch(_0x261c9c){if(_0x261c9c instanceof CliError)throw _0x261c9c;throw notificationError(_0x4fcbc0(0xda),_0x4fcbc0(0xdf)+_0x53204b+'.');}let _0x2b7707;try{_0x2b7707=JSON[_0x4fcbc0(0xfb)](_0x28894e);}catch{throw notificationError(_0x4fcbc0(0x9e),'Notification\x20JSON\x20from\x20'+_0x53204b+_0x4fcbc0(0xca),_0x4fcbc0(0x90));}if(!isJsonObject(_0x2b7707))throw notificationError('notification_config_json_invalid',_0x4fcbc0(0xc2)+_0x53204b+_0x4fcbc0(0xec));return validateNotificationDocument(_0x2b7707,_0x2526bc);}export function projectNotificationListConfig(_0x5f374f,_0x1c6564){const _0x568b36=a181_0x1fbea3;return{'id':typeof _0x5f374f['id']===_0x568b36(0x94)?_0x5f374f['id']:null,'configCode':requireResponseString(_0x5f374f[_0x568b36(0xa9)],'configCode',_0x1c6564),'configName':requireResponseString(_0x5f374f[_0x568b36(0x8c)],'configName',_0x1c6564),'channelType':requireResponseString(_0x5f374f[_0x568b36(0xaf)],_0x568b36(0xaf),_0x1c6564),'description':normalizeNullableString(_0x5f374f[_0x568b36(0xc6)]),'createTime':normalizeNullableString(_0x5f374f['createTime']),'updateTime':normalizeNullableString(_0x5f374f[_0x568b36(0xeb)])};}export function normalizeExactNotificationConfig(_0x1886a7,_0x4aeea2,_0x217d76){const _0x2f5a66=a181_0x1fbea3;if(!Number[_0x2f5a66(0xe4)](_0x1886a7['id'])||_0x1886a7['id']!==_0x4aeea2)throw notificationError('notification_config_response_invalid','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x4aeea2+'.');if(_0x1886a7[_0x2f5a66(0xe2)]!==_0x217d76)throw notificationError(_0x2f5a66(0xbb),_0x2f5a66(0xa4)+_0x4aeea2+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x5e32de=requireExactString(_0x1886a7[_0x2f5a66(0x8c)],_0x2f5a66(0x8c),_0x4aeea2),_0x20b7b0=requireExactString(_0x1886a7[_0x2f5a66(0xa9)],_0x2f5a66(0xa9),_0x4aeea2),_0x50cdc4=requireExactString(_0x1886a7[_0x2f5a66(0xaf)],_0x2f5a66(0xaf),_0x4aeea2);if(!NOTIFICATION_CHANNEL_TYPES[_0x2f5a66(0xb9)](_0x50cdc4))throw notificationError(_0x2f5a66(0xbb),_0x2f5a66(0xa4)+_0x4aeea2+_0x2f5a66(0xa0));const _0x1fe313=responseNullableString(_0x1886a7[_0x2f5a66(0x83)],'endpointUrl',_0x4aeea2),_0x31788f=responseNullableString(_0x1886a7[_0x2f5a66(0x9d)],_0x2f5a66(0x9d),_0x4aeea2),_0x3a8ec0=responseNullableString(_0x1886a7['description'],_0x2f5a66(0xc6),_0x4aeea2),_0x46846a=responseNullableTimeout(_0x1886a7[_0x2f5a66(0x81)],'connectTimeout',_0x4aeea2),_0x4c7d09=responseNullableTimeout(_0x1886a7['readTimeout'],_0x2f5a66(0xab),_0x4aeea2);return{'id':_0x4aeea2,'appCode':_0x217d76,'configCode':_0x20b7b0,'configName':_0x5e32de,'channelType':_0x50cdc4,'endpointUrl':redactSensitive(_0x1fe313),'channelConfig':redactSensitive(_0x31788f),'description':_0x3a8ec0,'connectTimeout':_0x46846a,'readTimeout':_0x4c7d09,'endpointUrlRaw':_0x1fe313,'channelConfigRaw':_0x31788f};}function a181_0x4113(){const _0x148320=['notification_config_field_unknown','recipients','file','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','emailTargets','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','isArray','failed','\x20failed.','dry-run','\x20--type\x20','channelConfigRaw','notification_config_source_unavailable','Invalid\x20notification\x20config\x20response.','mutation','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','ccList','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','utf8','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','appCode','WECOM','isSafeInteger','WEBHOOK','Application-level\x20notification\x20config\x20ID','410aowWZF','627777NvMIAF','650196WIYHDH','every','updateTime','\x20must\x20be\x20an\x20object.','316264sSUbAw','\x22\x20must\x20be\x20a\x20non-empty\x20string.','rabetbase\x20notification\x20config-list\x20--appcode\x20','boolean','length','call','Unknown\x20notification\x20JSON\x20field\x20\x22','preflight','bool','a\x20non-empty\x20string','create','notification_config_field_invalid','Item\x20','kind','parse','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Notification\x20config\x20list\x20item\x20','str','type','connectTimeout','endpointUrlRaw','endpointUrl','subjectPrefix','166298QbIQjN','stdin','prototype','a\x20supported\x20string','91hJvlnA','yes','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','configName','string','\x20characters.','replyTo','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','has','from-env','Notification\x20JSON\x20field\x20\x22','number','object','path','\x20has\x20an\x20invalid\x20id.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','\x20has\x20invalid\x20field\x20\x22','validation','<redacted>','1063872fXDkVM','channelConfig','notification_config_json_invalid','\x20has\x20an\x20invalid\x20appCode.','\x20has\x20an\x20unsupported\x20channelType.','Create\x20JSON\x20requires\x20field\x20','some','stringify','Notification\x20config\x20','Allowed\x20values:\x20','1642PpeRXc','\x20--format\x20compress','DINGTALK','configCode','environment\x20variable\x20','readTimeout','notification_config_field_required','bccList','a\x20JSON\x20object\x20or\x20null','channelType','join','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','name','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','488930cdutaF','num','notification_config_','endpointUrl:null','7rFVAkg','includes','setEncoding','notification_config_response_invalid','update','Missing\x20notification\x20JSON\x20source.','messageTemplate','54TjFxSB','a\x20JSON\x20object','keys','Notification\x20JSON\x20from\x20','\x22channelType\x22.','trim','env','description','a\x20string\x20or\x20null','apiError','EMAIL','\x20is\x20invalid.','FEISHU','push','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.'];a181_0x4113=function(){return _0x148320;};return a181_0x4113();}export async function requireExactNotificationConfig(_0x50e01b,_0x3bfd2b,_0x570943){const _0x50f277=a181_0x1fbea3;let _0x18c723;try{_0x18c723=await getNotificationChannelConfig(_0x3bfd2b,_0x50e01b);}catch{throw safeApiFailure(_0x570943,_0x50f277(0xf4),_0x50f277(0xfc)+_0x50e01b+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x18c723,_0x3bfd2b,_0x50e01b);}export function projectNotificationConfig(_0x42e72b){const _0xdf806a=a181_0x1fbea3;return{'id':_0x42e72b['id']??null,'appCode':_0x42e72b[_0xdf806a(0xe2)],'configCode':_0x42e72b['configCode']??null,'configName':_0x42e72b[_0xdf806a(0x8c)],'channelType':_0x42e72b[_0xdf806a(0xaf)],'endpointUrl':redactSensitive(_0x42e72b[_0xdf806a(0x83)]),'channelConfig':redactSensitive(_0x42e72b[_0xdf806a(0x9d)]),'description':_0x42e72b[_0xdf806a(0xc6)]??null,'connectTimeout':_0x42e72b[_0xdf806a(0x81)]??null,'readTimeout':_0x42e72b[_0xdf806a(0xab)]??null};}export function notificationSelector(_0x1e0abe){const _0x57c50a=a181_0x1fbea3;return{'appCode':_0x1e0abe[_0x57c50a(0xe2)],'id':_0x1e0abe['id'],'configCode':_0x1e0abe[_0x57c50a(0xa9)],'configName':_0x1e0abe[_0x57c50a(0x8c)],'channelType':_0x1e0abe[_0x57c50a(0xaf)]};}export function createMutationInput(_0x3bf05b,_0x508e15){const _0x1d5198=a181_0x1fbea3;return{'appCode':_0x3bf05b,'configName':_0x508e15['configName'],'channelType':_0x508e15[_0x1d5198(0xaf)],...hasOwn(_0x508e15,_0x1d5198(0x83))?{'endpointUrl':_0x508e15[_0x1d5198(0x83)]}:{},...hasOwn(_0x508e15,_0x1d5198(0x9d))?{'channelConfig':serializeChannelConfig(_0x508e15['channelConfig'])}:{},...hasOwn(_0x508e15,_0x1d5198(0xc6))?{'description':_0x508e15[_0x1d5198(0xc6)]}:{},...hasOwn(_0x508e15,_0x1d5198(0x81))?{'connectTimeout':_0x508e15[_0x1d5198(0x81)]}:{},...hasOwn(_0x508e15,_0x1d5198(0xab))?{'readTimeout':_0x508e15[_0x1d5198(0xab)]}:{}};}export function mergeUpdateInput(_0x3892f0,_0x2c5ad5){const _0x4d42c6=a181_0x1fbea3;return{'id':_0x3892f0['id'],'appCode':_0x3892f0[_0x4d42c6(0xe2)],'configName':_0x2c5ad5[_0x4d42c6(0x8c)]??_0x3892f0[_0x4d42c6(0x8c)],'channelType':_0x2c5ad5[_0x4d42c6(0xaf)]??_0x3892f0[_0x4d42c6(0xaf)],'endpointUrl':hasOwn(_0x2c5ad5,_0x4d42c6(0x83))?_0x2c5ad5[_0x4d42c6(0x83)]:_0x3892f0[_0x4d42c6(0x82)],'channelConfig':hasOwn(_0x2c5ad5,_0x4d42c6(0x9d))?serializeChannelConfig(_0x2c5ad5[_0x4d42c6(0x9d)]):_0x3892f0[_0x4d42c6(0xd9)],'description':hasOwn(_0x2c5ad5,'description')?_0x2c5ad5[_0x4d42c6(0xc6)]:_0x3892f0[_0x4d42c6(0xc6)],'connectTimeout':hasOwn(_0x2c5ad5,_0x4d42c6(0x81))?_0x2c5ad5[_0x4d42c6(0x81)]:_0x3892f0[_0x4d42c6(0x81)],'readTimeout':hasOwn(_0x2c5ad5,_0x4d42c6(0xab))?_0x2c5ad5['readTimeout']:_0x3892f0[_0x4d42c6(0xab)]};}export function plannedUpdateProjection(_0x60491d,_0x1a2734){const _0x5c6905=a181_0x1fbea3;return projectNotificationConfig({'id':_0x60491d['id'],'appCode':_0x60491d[_0x5c6905(0xe2)],'configCode':_0x60491d[_0x5c6905(0xa9)],'configName':_0x1a2734['configName']??_0x60491d['configName'],'channelType':_0x1a2734[_0x5c6905(0xaf)]??_0x60491d[_0x5c6905(0xaf)],'endpointUrl':hasOwn(_0x1a2734,_0x5c6905(0x83))?_0x1a2734[_0x5c6905(0x83)]:_0x60491d[_0x5c6905(0x82)],'channelConfig':hasOwn(_0x1a2734,'channelConfig')?_0x1a2734[_0x5c6905(0x9d)]:_0x60491d[_0x5c6905(0xd9)],'description':hasOwn(_0x1a2734,_0x5c6905(0xc6))?_0x1a2734[_0x5c6905(0xc6)]:_0x60491d['description'],'connectTimeout':hasOwn(_0x1a2734,_0x5c6905(0x81))?_0x1a2734[_0x5c6905(0x81)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x60491d['connectTimeout'],'readTimeout':hasOwn(_0x1a2734,_0x5c6905(0xab))?_0x1a2734['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x60491d[_0x5c6905(0xab)]});}export function requestedSafeFieldsMatch(_0x1d95ff,_0x388984,_0x2ee1e7){const _0x441aee=a181_0x1fbea3,_0x52ac72=[],_0x4049b0=[],_0x7fe1f4=[];for(const _0x5f04d2 of[_0x441aee(0x8c),'channelType',_0x441aee(0xc6)]){if(!hasOwn(_0x2ee1e7,_0x5f04d2))continue;_0x7fe1f4[_0x441aee(0xcc)](_0x5f04d2),_0x52ac72[_0x441aee(0xcc)](_0x388984[_0x5f04d2]===_0x2ee1e7[_0x5f04d2]),_0x4049b0[_0x441aee(0xcc)](_0x1d95ff[_0x5f04d2]!==_0x2ee1e7[_0x5f04d2]&&_0x388984[_0x5f04d2]===_0x2ee1e7[_0x5f04d2]);}for(const _0x3d76a9 of[_0x441aee(0x81),_0x441aee(0xab)]){if(!hasOwn(_0x2ee1e7,_0x3d76a9))continue;const _0x49f197=_0x2ee1e7[_0x3d76a9]??(_0x3d76a9===_0x441aee(0x81)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x7fe1f4['push'](_0x3d76a9),_0x52ac72[_0x441aee(0xcc)](_0x388984[_0x3d76a9]===_0x49f197),_0x4049b0['push'](_0x1d95ff[_0x3d76a9]!==_0x49f197&&_0x388984[_0x3d76a9]===_0x49f197);}return hasOwn(_0x2ee1e7,_0x441aee(0x83))&&_0x2ee1e7['endpointUrl']===null&&(_0x7fe1f4['push'](_0x441aee(0xb7)),_0x52ac72[_0x441aee(0xcc)](_0x388984[_0x441aee(0x82)]===null||_0x388984[_0x441aee(0x82)]===''),_0x4049b0[_0x441aee(0xcc)](_0x1d95ff[_0x441aee(0x82)]!==null&&_0x1d95ff[_0x441aee(0x82)]!==''&&(_0x388984[_0x441aee(0x82)]===null||_0x388984[_0x441aee(0x82)]===''))),{'allMatch':_0x52ac72[_0x441aee(0xea)](Boolean),'provesChange':_0x4049b0[_0x441aee(0xa2)](Boolean),'verifiedFields':_0x7fe1f4};}export function validateNotificationDeleteReadback(_0xd352f4,_0x10f563,_0x4377ec){const _0xf9edeb=a181_0x1fbea3;for(const [_0x52e963,_0x10d3db]of _0xd352f4['entries']()){if(!Number['isSafeInteger'](_0x10d3db['id'])||_0x10d3db['id']<=0x0)throw notificationError('notification_config_response_invalid',_0xf9edeb(0xfd)+(_0x52e963+0x1)+_0xf9edeb(0x97));if(_0x10d3db[_0xf9edeb(0xe2)]!==_0x10f563)throw notificationError(_0xf9edeb(0xbb),_0xf9edeb(0xfd)+(_0x52e963+0x1)+_0xf9edeb(0x9f));if(_0x10d3db[_0xf9edeb(0xaf)]!==_0x4377ec)throw notificationError('notification_config_response_invalid',_0xf9edeb(0xfd)+(_0x52e963+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x18d1ba,_0x199889,_0x17e7c8){const _0x301240=a181_0x1fbea3;return notificationError(_0x301240(0xb6)+_0x18d1ba+'_'+(_0x199889===_0x301240(0xdc)?_0x301240(0xd5):_0x199889+'_unavailable'),_0x301240(0xa4)+_0x18d1ba+'\x20'+_0x199889+_0x301240(0xd6),_0x17e7c8);}export function notificationLookupCommand(_0x5b3d53,_0xe8ac21){const _0x500c97=a181_0x1fbea3;return _0x500c97(0xef)+_0x5b3d53+_0x500c97(0xd8)+_0xe8ac21+_0x500c97(0xa7);}function validateNotificationDocument(_0x1ec33c,_0x41fcfd){const _0x1500fe=a181_0x1fbea3;for(const _0x2c14de of Object[_0x1500fe(0xc1)](_0x1ec33c)){if(FORBIDDEN_IDENTITY_FIELDS[_0x1500fe(0x91)](_0x2c14de))throw notificationError('notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22'+_0x2c14de+_0x1500fe(0xd3));if(!ALLOWED_INPUT_FIELDS['has'](_0x2c14de))throw notificationError(_0x1500fe(0xce),_0x1500fe(0xf3)+_0x2c14de+'\x22.');}if(_0x41fcfd==='update'&&Object[_0x1500fe(0xc1)](_0x1ec33c)[_0x1500fe(0xf1)]===0x0)throw notificationError('notification_config_update_empty',_0x1500fe(0x98));const _0xff5585={};if(hasOwn(_0x1ec33c,_0x1500fe(0x8c)))_0xff5585[_0x1500fe(0x8c)]=validateRequiredString(_0x1ec33c[_0x1500fe(0x8c)],'configName',0x80);else{if(_0x41fcfd==='create')throw notificationError('notification_config_field_required',_0x1500fe(0xa1)+'\x22configName\x22.');}if(hasOwn(_0x1ec33c,'channelType')){if(typeof _0x1ec33c[_0x1500fe(0xaf)]!==_0x1500fe(0x8d))throw invalidFieldType(_0x1500fe(0xaf),_0x1500fe(0x88));const _0x124754=_0x1ec33c[_0x1500fe(0xaf)][_0x1500fe(0xc4)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x1500fe(0xb9)](_0x124754))throw notificationError(_0x1500fe(0xf8),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x1500fe(0xb0)](',\x20')+'.');_0xff5585[_0x1500fe(0xaf)]=_0x124754;}else{if(_0x41fcfd===_0x1500fe(0xf7))throw notificationError(_0x1500fe(0xac),_0x1500fe(0xa1)+_0x1500fe(0xc3));}for(const [_0x5e8e29,_0x3fbddd]of[[_0x1500fe(0x83),0x200],['description',0x100]]){if(!hasOwn(_0x1ec33c,_0x5e8e29))continue;const _0x3a106a=_0x1ec33c[_0x5e8e29];if(_0x3a106a!==null&&typeof _0x3a106a!==_0x1500fe(0x8d))throw invalidFieldType(_0x5e8e29,_0x1500fe(0xc7));if(typeof _0x3a106a===_0x1500fe(0x8d)&&_0x3a106a[_0x1500fe(0xf1)]>_0x3fbddd)throw notificationError(_0x1500fe(0xf8),'Notification\x20JSON\x20field\x20\x22'+_0x5e8e29+'\x22\x20cannot\x20exceed\x20'+_0x3fbddd+_0x1500fe(0x8e));_0xff5585[_0x5e8e29]=_0x3a106a;}if(hasOwn(_0x1ec33c,_0x1500fe(0x9d))){const _0x4b7b00=_0x1ec33c[_0x1500fe(0x9d)];if(_0x4b7b00===null&&_0x41fcfd===_0x1500fe(0xf7))throw invalidFieldType('channelConfig',_0x1500fe(0xc0));if(_0x4b7b00!==null&&!isJsonObject(_0x4b7b00))throw invalidFieldType(_0x1500fe(0x9d),_0x41fcfd===_0x1500fe(0xbc)?_0x1500fe(0xae):_0x1500fe(0xc0));_0x4b7b00!==null&&validateChannelConfigFields(_0xff5585[_0x1500fe(0xaf)],_0x4b7b00),_0xff5585[_0x1500fe(0x9d)]=_0x4b7b00;}for(const _0x2e39d7 of[_0x1500fe(0x81),_0x1500fe(0xab)]){if(!hasOwn(_0x1ec33c,_0x2e39d7))continue;const _0x1de916=_0x1ec33c[_0x2e39d7];if(_0x1de916!==null&&(!Number[_0x1500fe(0xe4)](_0x1de916)||_0x1de916<0x0))throw notificationError('notification_config_field_invalid',_0x1500fe(0x93)+_0x2e39d7+_0x1500fe(0xdd));_0xff5585[_0x2e39d7]=_0x1de916;}return _0xff5585;}function validateRequiredString(_0x22f68c,_0x2df928,_0x11369f){const _0x158a3f=a181_0x1fbea3;if(typeof _0x22f68c!=='string')throw invalidFieldType(_0x2df928,_0x158a3f(0xf6));const _0x42f52a=_0x22f68c['trim']();if(!_0x42f52a)throw notificationError(_0x158a3f(0xf8),_0x158a3f(0x93)+_0x2df928+_0x158a3f(0xee));if(_0x42f52a[_0x158a3f(0xf1)]>_0x11369f)throw notificationError(_0x158a3f(0xf8),_0x158a3f(0x93)+_0x2df928+'\x22\x20cannot\x20exceed\x20'+_0x11369f+_0x158a3f(0x8e));return _0x42f52a;}function validateChannelConfigFields(_0x15283e,_0x410f79){const _0x1577c7=a181_0x1fbea3;if(hasOwn(_0x410f79,_0x1577c7(0xbe)))throw forbiddenChannelConfigField(_0x1577c7(0xbe));if(_0x15283e===_0x1577c7(0xc9))for(const _0x2e8e0a of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x410f79,_0x2e8e0a))throw forbiddenChannelConfigField(_0x2e8e0a);}}function forbiddenChannelConfigField(_0x569542){return notificationError('notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x569542+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x441a4d,_0x347ff1){const _0x39eb24=a181_0x1fbea3;return notificationError(_0x39eb24(0xf8),_0x39eb24(0x93)+_0x441a4d+'\x22\x20must\x20be\x20'+_0x347ff1+'.');}function serializeChannelConfig(_0x312c77){const _0x4586fa=a181_0x1fbea3;return _0x312c77===null||_0x312c77===undefined?null:JSON[_0x4586fa(0xa3)](_0x312c77);}function redactSensitive(_0x5731c7){const _0x169783=a181_0x1fbea3;return _0x5731c7===null||_0x5731c7===undefined||_0x5731c7===''?null:_0x169783(0x9b);}function requireResponseString(_0x59e8d0,_0x3ac716,_0xe9098f){const _0x5670db=a181_0x1fbea3;if(typeof _0x59e8d0!==_0x5670db(0x8d)||_0x59e8d0['trim']()==='')throw CliErrors[_0x5670db(0xc8)](_0x5670db(0xdb),_0x5670db(0xf9)+(_0xe9098f+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x3ac716+'\x22.');return _0x59e8d0[_0x5670db(0xc4)]();}function requireExactString(_0x15c098,_0x386ca3,_0x43bd5d){const _0x1c9814=a181_0x1fbea3;if(typeof _0x15c098!==_0x1c9814(0x8d)||_0x15c098[_0x1c9814(0xc4)]()==='')throw notificationError(_0x1c9814(0xbb),'Notification\x20config\x20'+_0x43bd5d+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x386ca3+'\x22.');return _0x15c098[_0x1c9814(0xc4)]();}function responseNullableString(_0x508ab2,_0x40d518,_0x4c6c36){const _0x2ad010=a181_0x1fbea3;if(_0x508ab2===undefined||_0x508ab2===null)return null;if(typeof _0x508ab2!==_0x2ad010(0x8d))throw notificationError(_0x2ad010(0xbb),'Notification\x20config\x20'+_0x4c6c36+_0x2ad010(0x99)+_0x40d518+'\x22.');return _0x508ab2;}function responseNullableTimeout(_0x64192b,_0x2c9815,_0x2dda02){const _0x144591=a181_0x1fbea3;if(_0x64192b===undefined||_0x64192b===null)return null;if(!Number[_0x144591(0xe4)](_0x64192b)||_0x64192b<0x0)throw notificationError(_0x144591(0xbb),_0x144591(0xa4)+_0x2dda02+_0x144591(0x99)+_0x2c9815+'\x22.');return _0x64192b;}function normalizeNullableString(_0x5a4f02){return typeof _0x5a4f02==='string'?_0x5a4f02:null;}function isJsonObject(_0x578452){const _0x2257be=a181_0x1fbea3;return _0x578452!==null&&typeof _0x578452===_0x2257be(0x95)&&!Array[_0x2257be(0xd4)](_0x578452);}function hasOwn(_0xc7158d,_0x51d492){const _0x344b07=a181_0x1fbea3;return Object[_0x344b07(0x87)]['hasOwnProperty'][_0x344b07(0xf2)](_0xc7158d,_0x51d492);}async function readStdin(){const _0x1cad08=a181_0x1fbea3;let _0xf9a33c='';process[_0x1cad08(0x86)][_0x1cad08(0xba)](_0x1cad08(0xe0));for await(const _0x17f117 of process['stdin'])_0xf9a33c+=_0x17f117;return _0xf9a33c;}
|
|
1
|
+
const a181_0x47f2aa=a181_0x3230;(function(_0xa392ce,_0x4a27de){const _0x183e09=a181_0x3230,_0x5c5c37=_0xa392ce();while(!![]){try{const _0x567153=-parseInt(_0x183e09(0xe1))/0x1*(-parseInt(_0x183e09(0x95))/0x2)+parseInt(_0x183e09(0xb5))/0x3*(parseInt(_0x183e09(0x9b))/0x4)+parseInt(_0x183e09(0x9c))/0x5+-parseInt(_0x183e09(0xd9))/0x6+parseInt(_0x183e09(0xb1))/0x7+parseInt(_0x183e09(0xc5))/0x8+parseInt(_0x183e09(0xe3))/0x9*(-parseInt(_0x183e09(0x9e))/0xa);if(_0x567153===_0x4a27de)break;else _0x5c5c37['push'](_0x5c5c37['shift']());}catch(_0x58e907){_0x5c5c37['push'](_0x5c5c37['shift']());}}}(a181_0x5c5c,0xefbd2));function a181_0x5c5c(){const _0x1df7b3=['endpointUrl','name','\x20has\x20an\x20invalid\x20channelType.','keys','notification_config_update_empty','notification_config_response_invalid','a\x20string\x20or\x20null','parse','fromName','notification_config_json_invalid','utf8','Notification\x20JSON\x20from\x20','channelConfig','prototype','readTimeout','boolean','Notification\x20config\x20','11547300eSyYtw','\x20is\x20invalid.','apiError','replyTo','\x22\x20must\x20be\x20','has','ccList','configCode','625694CCsRuz','endpointUrlRaw','29630979nAjNoU','file\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','\x22\x20cannot\x20exceed\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Item\x20','stringify','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','appCode','a\x20supported\x20string','path','mutation','description','call','str','channelConfigRaw','number','\x20has\x20invalid\x20field\x20\x22','failed','channelType','includes','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','stdin','validation','\x20--format\x20compress','EMAIL','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','hasOwnProperty','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Unknown\x20notification\x20JSON\x20field\x20\x22','<redacted>','length','setEncoding','string','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','kind','notification_config_id_invalid','Invalid\x20notification\x20config\x20response.','\x20has\x20an\x20unsupported\x20channelType.','Notification\x20JSON\x20field\x20\x22','trim','FEISHU','notification_config_field_unknown','WEBHOOK','notification_config_field_invalid','env','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','from-env','Create\x20JSON\x20requires\x20field\x20','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','4lNMvug','notification_config_confirmation_required','connectTimeout','yes','every','Application-level\x20notification\x20config\x20ID','297988voVbTC','5263995dOOmrZ','createTime','10VitPDw','bool','Allowed\x20values:\x20','create','preflight','subjectPrefix','environment\x20variable\x20','Missing\x20notification\x20JSON\x20source.','messageTemplate','\x22channelType\x22.','Notification\x20config\x20list\x20item\x20','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','notification_config_field_forbidden','update','channelCode','bccList','join','file','recipients','5410111xDeOCn','notification_config_field_required','object','Notification\x20JSON\x20channelConfig\x20field\x20\x22','66EoPwIv','\x20is\x20missing\x20required\x20field\x20\x22','rabetbase\x20notification\x20config-list\x20--appcode\x20','emailTargets','configName','isSafeInteger','\x20--type\x20','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20failed.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x20characters.','a\x20JSON\x20object\x20or\x20null','notification_config_source_unavailable','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','a\x20JSON\x20object','num','11862856yJdrlH','entries','push'];a181_0x5c5c=function(){return _0x1df7b3;};return a181_0x5c5c();}import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a181_0x47f2aa(0xfd),a181_0x47f2aa(0x10d),'DINGTALK','WECOM',a181_0x47f2aa(0x8d)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x47f2aa(0xb9),a181_0x47f2aa(0xf6),a181_0x47f2aa(0xc8),a181_0x47f2aa(0xd4),a181_0x47f2aa(0xef),'connectTimeout','readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a181_0x47f2aa(0xeb),a181_0x47f2aa(0xe0),a181_0x47f2aa(0xac)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x47f2aa(0xb8),a181_0x47f2aa(0xb0),a181_0x47f2aa(0xdf),a181_0x47f2aa(0xad),a181_0x47f2aa(0xdc),a181_0x47f2aa(0xa3),a181_0x47f2aa(0xd0),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a181_0x47f2aa(0x105),'required':![],'description':a181_0x47f2aa(0xbe)},{'name':'stdin','type':a181_0x47f2aa(0xd7),'required':![],'default':![],'description':a181_0x47f2aa(0x94)},{'name':a181_0x47f2aa(0x91),'type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a181_0x47f2aa(0xf3),'required':!![],'description':a181_0x47f2aa(0x9a)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2c1440,_0x57c8a7,_0x10ecfb){return new CliError(_0x2c1440,0x1,_0x57c8a7,_0x10ecfb);}export function readNotificationId(_0x56de4b){const _0x1b3bd0=a181_0x47f2aa,_0x4f0c62=_0x56de4b[_0x1b3bd0(0xc4)]('id');if(!Number[_0x1b3bd0(0xba)](_0x4f0c62)||_0x4f0c62<=0x0)throw notificationError(_0x1b3bd0(0x108),_0x1b3bd0(0x90));return _0x4f0c62;}function a181_0x3230(_0x4164aa,_0xff7c68){_0x4164aa=_0x4164aa-0x8c;const _0x5c5cda=a181_0x5c5c();let _0x323019=_0x5c5cda[_0x4164aa];return _0x323019;}export function requireNotificationExplicitYes(_0x4ad712){const _0x20da64=a181_0x47f2aa;if(_0x4ad712['bool']('dry-run')||_0x4ad712[_0x20da64(0x9f)](_0x20da64(0x98)))return;throw notificationError(_0x20da64(0x96),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x20da64(0xfe));}export function readNotificationChannelType(_0x562e13,_0x1874bb='type',_0x46808f='EMAIL'){const _0x86b812=a181_0x47f2aa,_0x4afe4a=_0x562e13['str'](_0x1874bb)[_0x86b812(0x10c)]()||_0x46808f;if(!NOTIFICATION_CHANNEL_TYPES[_0x86b812(0xf7)](_0x4afe4a))throw CliErrors[_0x86b812(0xfb)]('Invalid\x20--'+_0x1874bb+':\x20'+_0x4afe4a,_0x86b812(0xa0)+NOTIFICATION_CHANNEL_TYPES[_0x86b812(0xae)](',\x20')+'.');return _0x4afe4a;}export function assertSingleNotificationSource(_0x37e44e){const _0x43b372=a181_0x47f2aa,_0x511b5b=[],_0xd8a868=_0x37e44e[_0x43b372(0xf1)](_0x43b372(0xaf))[_0x43b372(0x10c)]();if(_0xd8a868)_0x511b5b[_0x43b372(0xc7)]({'kind':_0x43b372(0xaf),'path':_0xd8a868});if(_0x37e44e[_0x43b372(0x9f)](_0x43b372(0xfa)))_0x511b5b[_0x43b372(0xc7)]({'kind':_0x43b372(0xfa)});const _0x23830a=_0x37e44e[_0x43b372(0xf1)](_0x43b372(0x91))[_0x43b372(0x10c)]();if(_0x23830a)_0x511b5b[_0x43b372(0xc7)]({'kind':_0x43b372(0x8f),'name':_0x23830a});if(_0x511b5b['length']===0x0)throw CliErrors[_0x43b372(0xfb)](_0x43b372(0xa5),_0x43b372(0xe7));if(_0x511b5b[_0x43b372(0x103)]>0x1)throw CliErrors['validation']('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x43b372(0xe7));return _0x511b5b[0x0];}export async function readNotificationDocument(_0x4d3a32,_0x1f1ae3){const _0x10d3ab=a181_0x47f2aa,_0x2fec6e=assertSingleNotificationSource(_0x4d3a32),_0x298bcf=_0x2fec6e[_0x10d3ab(0x107)]===_0x10d3ab(0xaf)?_0x10d3ab(0xe4)+_0x2fec6e[_0x10d3ab(0xed)]:_0x2fec6e[_0x10d3ab(0x107)]===_0x10d3ab(0x8f)?_0x10d3ab(0xa4)+_0x2fec6e[_0x10d3ab(0xc9)]:'stdin';let _0x5c881c;try{if(_0x2fec6e[_0x10d3ab(0x107)]==='file')_0x5c881c=await readFile(_0x2fec6e[_0x10d3ab(0xed)],_0x10d3ab(0xd2));else{if(_0x2fec6e[_0x10d3ab(0x107)]==='env'){if(!(_0x2fec6e[_0x10d3ab(0xc9)]in process.env))throw notificationError('notification_config_source_unavailable',_0x10d3ab(0xf9)+_0x2fec6e[_0x10d3ab(0xc9)]);_0x5c881c=process.env[_0x2fec6e.name]??'';}else _0x5c881c=await readStdin();}}catch(_0x885ed4){if(_0x885ed4 instanceof CliError)throw _0x885ed4;throw notificationError(_0x10d3ab(0xc1),_0x10d3ab(0xea)+_0x298bcf+'.');}let _0x340395;try{_0x340395=JSON[_0x10d3ab(0xcf)](_0x5c881c);}catch{throw notificationError(_0x10d3ab(0xd1),_0x10d3ab(0xd3)+_0x298bcf+_0x10d3ab(0xda),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x340395))throw notificationError(_0x10d3ab(0xd1),'Notification\x20JSON\x20from\x20'+_0x298bcf+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x340395,_0x1f1ae3);}export function projectNotificationListConfig(_0x716440,_0x181ff1){const _0xc48bba=a181_0x47f2aa;return{'id':typeof _0x716440['id']===_0xc48bba(0xf3)?_0x716440['id']:null,'configCode':requireResponseString(_0x716440['configCode'],_0xc48bba(0xe0),_0x181ff1),'configName':requireResponseString(_0x716440['configName'],_0xc48bba(0xb9),_0x181ff1),'channelType':requireResponseString(_0x716440[_0xc48bba(0xf6)],_0xc48bba(0xf6),_0x181ff1),'description':normalizeNullableString(_0x716440[_0xc48bba(0xef)]),'createTime':normalizeNullableString(_0x716440[_0xc48bba(0x9d)]),'updateTime':normalizeNullableString(_0x716440['updateTime'])};}export function normalizeExactNotificationConfig(_0x242c52,_0x51b08,_0x459df3){const _0x26a53b=a181_0x47f2aa;if(!Number[_0x26a53b(0xba)](_0x242c52['id'])||_0x242c52['id']!==_0x51b08)throw notificationError(_0x26a53b(0xcd),_0x26a53b(0x106)+_0x51b08+'.');if(_0x242c52['appCode']!==_0x459df3)throw notificationError(_0x26a53b(0xcd),_0x26a53b(0xd8)+_0x51b08+_0x26a53b(0x100));const _0x47f9c6=requireExactString(_0x242c52[_0x26a53b(0xb9)],_0x26a53b(0xb9),_0x51b08),_0x417d03=requireExactString(_0x242c52[_0x26a53b(0xe0)],'configCode',_0x51b08),_0x58a83b=requireExactString(_0x242c52[_0x26a53b(0xf6)],'channelType',_0x51b08);if(!NOTIFICATION_CHANNEL_TYPES[_0x26a53b(0xf7)](_0x58a83b))throw notificationError(_0x26a53b(0xcd),_0x26a53b(0xd8)+_0x51b08+_0x26a53b(0x10a));const _0x2cb5c9=responseNullableString(_0x242c52[_0x26a53b(0xc8)],_0x26a53b(0xc8),_0x51b08),_0x1af265=responseNullableString(_0x242c52[_0x26a53b(0xd4)],_0x26a53b(0xd4),_0x51b08),_0x34c060=responseNullableString(_0x242c52[_0x26a53b(0xef)],_0x26a53b(0xef),_0x51b08),_0x5c3cf8=responseNullableTimeout(_0x242c52[_0x26a53b(0x97)],_0x26a53b(0x97),_0x51b08),_0x4f5f2c=responseNullableTimeout(_0x242c52[_0x26a53b(0xd6)],_0x26a53b(0xd6),_0x51b08);return{'id':_0x51b08,'appCode':_0x459df3,'configCode':_0x417d03,'configName':_0x47f9c6,'channelType':_0x58a83b,'endpointUrl':redactSensitive(_0x2cb5c9),'channelConfig':redactSensitive(_0x1af265),'description':_0x34c060,'connectTimeout':_0x5c3cf8,'readTimeout':_0x4f5f2c,'endpointUrlRaw':_0x2cb5c9,'channelConfigRaw':_0x1af265};}export async function requireExactNotificationConfig(_0x5e3ef6,_0x19182d,_0x1f0a9d){const _0x5f291b=a181_0x47f2aa;let _0x2c409c;try{_0x2c409c=await getNotificationChannelConfig(_0x19182d,_0x5e3ef6);}catch{throw safeApiFailure(_0x1f0a9d,_0x5f291b(0xa2),_0x5f291b(0xbc)+_0x5e3ef6+_0x5f291b(0x93));}return normalizeExactNotificationConfig(_0x2c409c,_0x19182d,_0x5e3ef6);}export function projectNotificationConfig(_0x519f62){const _0x521f65=a181_0x47f2aa;return{'id':_0x519f62['id']??null,'appCode':_0x519f62[_0x521f65(0xeb)],'configCode':_0x519f62['configCode']??null,'configName':_0x519f62['configName'],'channelType':_0x519f62[_0x521f65(0xf6)],'endpointUrl':redactSensitive(_0x519f62[_0x521f65(0xc8)]),'channelConfig':redactSensitive(_0x519f62[_0x521f65(0xd4)]),'description':_0x519f62[_0x521f65(0xef)]??null,'connectTimeout':_0x519f62[_0x521f65(0x97)]??null,'readTimeout':_0x519f62[_0x521f65(0xd6)]??null};}export function notificationSelector(_0x4f97c9){const _0x504b07=a181_0x47f2aa;return{'appCode':_0x4f97c9[_0x504b07(0xeb)],'id':_0x4f97c9['id'],'configCode':_0x4f97c9['configCode'],'configName':_0x4f97c9[_0x504b07(0xb9)],'channelType':_0x4f97c9['channelType']};}export function createMutationInput(_0x5ed0c6,_0x5254a8){const _0x448745=a181_0x47f2aa;return{'appCode':_0x5ed0c6,'configName':_0x5254a8[_0x448745(0xb9)],'channelType':_0x5254a8[_0x448745(0xf6)],...hasOwn(_0x5254a8,_0x448745(0xc8))?{'endpointUrl':_0x5254a8[_0x448745(0xc8)]}:{},...hasOwn(_0x5254a8,_0x448745(0xd4))?{'channelConfig':serializeChannelConfig(_0x5254a8[_0x448745(0xd4)])}:{},...hasOwn(_0x5254a8,_0x448745(0xef))?{'description':_0x5254a8[_0x448745(0xef)]}:{},...hasOwn(_0x5254a8,_0x448745(0x97))?{'connectTimeout':_0x5254a8['connectTimeout']}:{},...hasOwn(_0x5254a8,_0x448745(0xd6))?{'readTimeout':_0x5254a8['readTimeout']}:{}};}export function mergeUpdateInput(_0x151fbb,_0x21cc12){const _0xe1cae5=a181_0x47f2aa;return{'id':_0x151fbb['id'],'appCode':_0x151fbb[_0xe1cae5(0xeb)],'configName':_0x21cc12[_0xe1cae5(0xb9)]??_0x151fbb[_0xe1cae5(0xb9)],'channelType':_0x21cc12[_0xe1cae5(0xf6)]??_0x151fbb[_0xe1cae5(0xf6)],'endpointUrl':hasOwn(_0x21cc12,_0xe1cae5(0xc8))?_0x21cc12['endpointUrl']:_0x151fbb[_0xe1cae5(0xe2)],'channelConfig':hasOwn(_0x21cc12,_0xe1cae5(0xd4))?serializeChannelConfig(_0x21cc12[_0xe1cae5(0xd4)]):_0x151fbb['channelConfigRaw'],'description':hasOwn(_0x21cc12,_0xe1cae5(0xef))?_0x21cc12[_0xe1cae5(0xef)]:_0x151fbb[_0xe1cae5(0xef)],'connectTimeout':hasOwn(_0x21cc12,'connectTimeout')?_0x21cc12[_0xe1cae5(0x97)]:_0x151fbb[_0xe1cae5(0x97)],'readTimeout':hasOwn(_0x21cc12,_0xe1cae5(0xd6))?_0x21cc12[_0xe1cae5(0xd6)]:_0x151fbb[_0xe1cae5(0xd6)]};}export function plannedUpdateProjection(_0x486eb0,_0x520598){const _0x563bea=a181_0x47f2aa;return projectNotificationConfig({'id':_0x486eb0['id'],'appCode':_0x486eb0[_0x563bea(0xeb)],'configCode':_0x486eb0['configCode'],'configName':_0x520598[_0x563bea(0xb9)]??_0x486eb0['configName'],'channelType':_0x520598[_0x563bea(0xf6)]??_0x486eb0[_0x563bea(0xf6)],'endpointUrl':hasOwn(_0x520598,_0x563bea(0xc8))?_0x520598[_0x563bea(0xc8)]:_0x486eb0[_0x563bea(0xe2)],'channelConfig':hasOwn(_0x520598,_0x563bea(0xd4))?_0x520598[_0x563bea(0xd4)]:_0x486eb0[_0x563bea(0xf2)],'description':hasOwn(_0x520598,'description')?_0x520598['description']:_0x486eb0[_0x563bea(0xef)],'connectTimeout':hasOwn(_0x520598,_0x563bea(0x97))?_0x520598[_0x563bea(0x97)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x486eb0['connectTimeout'],'readTimeout':hasOwn(_0x520598,_0x563bea(0xd6))?_0x520598[_0x563bea(0xd6)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x486eb0[_0x563bea(0xd6)]});}export function requestedSafeFieldsMatch(_0x380750,_0x366355,_0x57d06d){const _0x54fbee=a181_0x47f2aa,_0x46144c=[],_0x1b9711=[],_0x30f2bf=[];for(const _0x967b55 of[_0x54fbee(0xb9),_0x54fbee(0xf6),_0x54fbee(0xef)]){if(!hasOwn(_0x57d06d,_0x967b55))continue;_0x30f2bf['push'](_0x967b55),_0x46144c[_0x54fbee(0xc7)](_0x366355[_0x967b55]===_0x57d06d[_0x967b55]),_0x1b9711[_0x54fbee(0xc7)](_0x380750[_0x967b55]!==_0x57d06d[_0x967b55]&&_0x366355[_0x967b55]===_0x57d06d[_0x967b55]);}for(const _0x5d3e82 of[_0x54fbee(0x97),'readTimeout']){if(!hasOwn(_0x57d06d,_0x5d3e82))continue;const _0x41f0e3=_0x57d06d[_0x5d3e82]??(_0x5d3e82===_0x54fbee(0x97)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x30f2bf['push'](_0x5d3e82),_0x46144c['push'](_0x366355[_0x5d3e82]===_0x41f0e3),_0x1b9711[_0x54fbee(0xc7)](_0x380750[_0x5d3e82]!==_0x41f0e3&&_0x366355[_0x5d3e82]===_0x41f0e3);}return hasOwn(_0x57d06d,_0x54fbee(0xc8))&&_0x57d06d[_0x54fbee(0xc8)]===null&&(_0x30f2bf['push']('endpointUrl:null'),_0x46144c['push'](_0x366355['endpointUrlRaw']===null||_0x366355[_0x54fbee(0xe2)]===''),_0x1b9711[_0x54fbee(0xc7)](_0x380750[_0x54fbee(0xe2)]!==null&&_0x380750['endpointUrlRaw']!==''&&(_0x366355[_0x54fbee(0xe2)]===null||_0x366355[_0x54fbee(0xe2)]===''))),{'allMatch':_0x46144c[_0x54fbee(0x99)](Boolean),'provesChange':_0x1b9711['some'](Boolean),'verifiedFields':_0x30f2bf};}export function validateNotificationDeleteReadback(_0x4957d3,_0x1cc278,_0x439c75){const _0x4b7a92=a181_0x47f2aa;for(const [_0x2d36fa,_0x3a6c76]of _0x4957d3[_0x4b7a92(0xc6)]()){if(!Number['isSafeInteger'](_0x3a6c76['id'])||_0x3a6c76['id']<=0x0)throw notificationError(_0x4b7a92(0xcd),'Notification\x20config\x20list\x20item\x20'+(_0x2d36fa+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x3a6c76['appCode']!==_0x1cc278)throw notificationError('notification_config_response_invalid',_0x4b7a92(0xa8)+(_0x2d36fa+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x3a6c76[_0x4b7a92(0xf6)]!==_0x439c75)throw notificationError('notification_config_response_invalid',_0x4b7a92(0xa8)+(_0x2d36fa+0x1)+_0x4b7a92(0xca));}}export function safeApiFailure(_0x493cfc,_0x4e27b5,_0x3939fa){const _0x2019ba=a181_0x47f2aa;return notificationError('notification_config_'+_0x493cfc+'_'+(_0x4e27b5===_0x2019ba(0xee)?_0x2019ba(0xf5):_0x4e27b5+'_unavailable'),_0x2019ba(0xd8)+_0x493cfc+'\x20'+_0x4e27b5+_0x2019ba(0xbd),_0x3939fa);}export function notificationLookupCommand(_0x2e22fc,_0x2abb18){const _0x3d252a=a181_0x47f2aa;return _0x3d252a(0xb7)+_0x2e22fc+_0x3d252a(0xbb)+_0x2abb18+_0x3d252a(0xfc);}function validateNotificationDocument(_0x89123f,_0x58b200){const _0xde5299=a181_0x47f2aa;for(const _0x5861eb of Object[_0xde5299(0xcb)](_0x89123f)){if(FORBIDDEN_IDENTITY_FIELDS[_0xde5299(0xde)](_0x5861eb))throw notificationError(_0xde5299(0xaa),_0xde5299(0x10b)+_0x5861eb+_0xde5299(0xf8));if(!ALLOWED_INPUT_FIELDS[_0xde5299(0xde)](_0x5861eb))throw notificationError(_0xde5299(0x8c),_0xde5299(0x101)+_0x5861eb+'\x22.');}if(_0x58b200==='update'&&Object[_0xde5299(0xcb)](_0x89123f)[_0xde5299(0x103)]===0x0)throw notificationError(_0xde5299(0xcc),_0xde5299(0xa9));const _0x450f42={};if(hasOwn(_0x89123f,_0xde5299(0xb9)))_0x450f42['configName']=validateRequiredString(_0x89123f[_0xde5299(0xb9)],_0xde5299(0xb9),0x80);else{if(_0x58b200===_0xde5299(0xa1))throw notificationError(_0xde5299(0xb2),_0xde5299(0x92)+'\x22configName\x22.');}if(hasOwn(_0x89123f,_0xde5299(0xf6))){if(typeof _0x89123f[_0xde5299(0xf6)]!==_0xde5299(0x105))throw invalidFieldType('channelType',_0xde5299(0xec));const _0x51842f=_0x89123f[_0xde5299(0xf6)][_0xde5299(0x10c)]();if(!NOTIFICATION_CHANNEL_TYPES[_0xde5299(0xf7)](_0x51842f))throw notificationError(_0xde5299(0x8e),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0xde5299(0xa0)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x450f42[_0xde5299(0xf6)]=_0x51842f;}else{if(_0x58b200===_0xde5299(0xa1))throw notificationError(_0xde5299(0xb2),_0xde5299(0x92)+_0xde5299(0xa7));}for(const [_0x35aa34,_0x2fb94c]of[[_0xde5299(0xc8),0x200],[_0xde5299(0xef),0x100]]){if(!hasOwn(_0x89123f,_0x35aa34))continue;const _0x5c7e91=_0x89123f[_0x35aa34];if(_0x5c7e91!==null&&typeof _0x5c7e91!==_0xde5299(0x105))throw invalidFieldType(_0x35aa34,_0xde5299(0xce));if(typeof _0x5c7e91==='string'&&_0x5c7e91[_0xde5299(0x103)]>_0x2fb94c)throw notificationError(_0xde5299(0x8e),_0xde5299(0x10b)+_0x35aa34+_0xde5299(0xe6)+_0x2fb94c+_0xde5299(0xbf));_0x450f42[_0x35aa34]=_0x5c7e91;}if(hasOwn(_0x89123f,_0xde5299(0xd4))){const _0xdc7585=_0x89123f[_0xde5299(0xd4)];if(_0xdc7585===null&&_0x58b200===_0xde5299(0xa1))throw invalidFieldType(_0xde5299(0xd4),_0xde5299(0xc3));if(_0xdc7585!==null&&!isJsonObject(_0xdc7585))throw invalidFieldType(_0xde5299(0xd4),_0x58b200===_0xde5299(0xab)?_0xde5299(0xc0):'a\x20JSON\x20object');_0xdc7585!==null&&validateChannelConfigFields(_0x450f42['channelType'],_0xdc7585),_0x450f42[_0xde5299(0xd4)]=_0xdc7585;}for(const _0x4c6286 of['connectTimeout',_0xde5299(0xd6)]){if(!hasOwn(_0x89123f,_0x4c6286))continue;const _0x218268=_0x89123f[_0x4c6286];if(_0x218268!==null&&(!Number['isSafeInteger'](_0x218268)||_0x218268<0x0))throw notificationError(_0xde5299(0x8e),_0xde5299(0x10b)+_0x4c6286+_0xde5299(0xc2));_0x450f42[_0x4c6286]=_0x218268;}return _0x450f42;}function validateRequiredString(_0x152237,_0x3f0732,_0x177ddb){const _0x2d92dd=a181_0x47f2aa;if(typeof _0x152237!==_0x2d92dd(0x105))throw invalidFieldType(_0x3f0732,'a\x20non-empty\x20string');const _0x40fd8b=_0x152237[_0x2d92dd(0x10c)]();if(!_0x40fd8b)throw notificationError('notification_config_field_invalid',_0x2d92dd(0x10b)+_0x3f0732+_0x2d92dd(0xe5));if(_0x40fd8b[_0x2d92dd(0x103)]>_0x177ddb)throw notificationError(_0x2d92dd(0x8e),_0x2d92dd(0x10b)+_0x3f0732+'\x22\x20cannot\x20exceed\x20'+_0x177ddb+_0x2d92dd(0xbf));return _0x40fd8b;}function validateChannelConfigFields(_0x4acfaa,_0x325ced){const _0x1b5537=a181_0x47f2aa;if(hasOwn(_0x325ced,_0x1b5537(0xa6)))throw forbiddenChannelConfigField(_0x1b5537(0xa6));if(_0x4acfaa===_0x1b5537(0xfd))for(const _0x7a3eb4 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x325ced,_0x7a3eb4))throw forbiddenChannelConfigField(_0x7a3eb4);}}function forbiddenChannelConfigField(_0x5e8c0c){const _0x5159da=a181_0x47f2aa;return notificationError('notification_config_channel_field_forbidden',_0x5159da(0xb4)+_0x5e8c0c+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x36f4c5,_0x4a93c4){const _0x473ef7=a181_0x47f2aa;return notificationError('notification_config_field_invalid',_0x473ef7(0x10b)+_0x36f4c5+_0x473ef7(0xdd)+_0x4a93c4+'.');}function serializeChannelConfig(_0x2faa94){const _0x3f1bf0=a181_0x47f2aa;return _0x2faa94===null||_0x2faa94===undefined?null:JSON[_0x3f1bf0(0xe9)](_0x2faa94);}function redactSensitive(_0x4af543){const _0x202dca=a181_0x47f2aa;return _0x4af543===null||_0x4af543===undefined||_0x4af543===''?null:_0x202dca(0x102);}function requireResponseString(_0x10e143,_0x1a4fa5,_0x45a998){const _0x427072=a181_0x47f2aa;if(typeof _0x10e143!==_0x427072(0x105)||_0x10e143[_0x427072(0x10c)]()==='')throw CliErrors[_0x427072(0xdb)](_0x427072(0x109),_0x427072(0xe8)+(_0x45a998+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x1a4fa5+'\x22.');return _0x10e143['trim']();}function requireExactString(_0x3cd457,_0x1e5104,_0x40c8f7){const _0x2a256b=a181_0x47f2aa;if(typeof _0x3cd457!==_0x2a256b(0x105)||_0x3cd457[_0x2a256b(0x10c)]()==='')throw notificationError(_0x2a256b(0xcd),_0x2a256b(0xd8)+_0x40c8f7+_0x2a256b(0xb6)+_0x1e5104+'\x22.');return _0x3cd457[_0x2a256b(0x10c)]();}function responseNullableString(_0x2723f2,_0x4361c8,_0x24b406){const _0x1d853f=a181_0x47f2aa;if(_0x2723f2===undefined||_0x2723f2===null)return null;if(typeof _0x2723f2!==_0x1d853f(0x105))throw notificationError(_0x1d853f(0xcd),'Notification\x20config\x20'+_0x24b406+_0x1d853f(0xf4)+_0x4361c8+'\x22.');return _0x2723f2;}function responseNullableTimeout(_0x588cfa,_0x397aea,_0x18aef0){const _0x464e49=a181_0x47f2aa;if(_0x588cfa===undefined||_0x588cfa===null)return null;if(!Number[_0x464e49(0xba)](_0x588cfa)||_0x588cfa<0x0)throw notificationError('notification_config_response_invalid',_0x464e49(0xd8)+_0x18aef0+'\x20has\x20invalid\x20field\x20\x22'+_0x397aea+'\x22.');return _0x588cfa;}function normalizeNullableString(_0x1fb2f1){const _0x54d7c9=a181_0x47f2aa;return typeof _0x1fb2f1===_0x54d7c9(0x105)?_0x1fb2f1:null;}function isJsonObject(_0x22ff7e){const _0x2f1d9f=a181_0x47f2aa;return _0x22ff7e!==null&&typeof _0x22ff7e===_0x2f1d9f(0xb3)&&!Array['isArray'](_0x22ff7e);}function hasOwn(_0x1cbcf1,_0x346bf2){const _0x16db0a=a181_0x47f2aa;return Object[_0x16db0a(0xd5)][_0x16db0a(0xff)][_0x16db0a(0xf0)](_0x1cbcf1,_0x346bf2);}async function readStdin(){const _0x1f2ce8=a181_0x47f2aa;let _0x19ded0='';process['stdin'][_0x1f2ce8(0x104)]('utf8');for await(const _0x5757e4 of process[_0x1f2ce8(0xfa)])_0x19ded0+=_0x5757e4;return _0x19ded0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x31b3e6=a182_0x1663;(function(_0x4caee6,_0x240ef7){const _0x5770c1=a182_0x1663,_0x4236a4=_0x4caee6();while(!![]){try{const _0x43aaba=-parseInt(_0x5770c1(0x17a))/0x1*(parseInt(_0x5770c1(0x17f))/0x2)+parseInt(_0x5770c1(0x156))/0x3+-parseInt(_0x5770c1(0x166))/0x4*(-parseInt(_0x5770c1(0x165))/0x5)+-parseInt(_0x5770c1(0x164))/0x6+parseInt(_0x5770c1(0x16d))/0x7+parseInt(_0x5770c1(0x14f))/0x8*(-parseInt(_0x5770c1(0x150))/0x9)+parseInt(_0x5770c1(0x159))/0xa*(parseInt(_0x5770c1(0x161))/0xb);if(_0x43aaba===_0x240ef7)break;else _0x4236a4['push'](_0x4236a4['shift']());}catch(_0x2ce60f){_0x4236a4['push'](_0x4236a4['shift']());}}}(a182_0x2316,0xdbca7));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a182_0x31b3e6(0x179),a182_0x31b3e6(0x175),a182_0x31b3e6(0x155),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a182_0x31b3e6(0x15d),'general':'General','form':'Table','idCard':a182_0x31b3e6(0x16a)},SCENE_FLAG={'name':a182_0x31b3e6(0x17d),'type':a182_0x31b3e6(0x154),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a182_0x31b3e6(0x181)},IMAGE_FILE_FLAG={'name':a182_0x31b3e6(0x17c),'type':a182_0x31b3e6(0x154),'description':a182_0x31b3e6(0x16e)},IMAGE_URL_FLAG={'name':a182_0x31b3e6(0x160),'type':'string','description':a182_0x31b3e6(0x178)};function normalizeScene(_0x203867){const _0x1ede8f=a182_0x31b3e6,_0x56e184=_0x203867[_0x1ede8f(0x167)]()[_0x1ede8f(0x172)]();if(_0x56e184==='idcard')return _0x1ede8f(0x152);if(_0x56e184==='invoice'||_0x56e184===_0x1ede8f(0x175)||_0x56e184==='form')return _0x56e184;throw CliErrors['validation'](_0x1ede8f(0x16c)+_0x203867+_0x1ede8f(0x17e)+SUPPORTED_SCENES[_0x1ede8f(0x180)](',\x20'));}function a182_0x2316(){const _0x43d047=['Publicly\x20accessible\x20image\x20or\x20file\x20URL','invoice','1TVrtQm','filter','image-file','scene','.\x20Supported\x20scenes:\x20','233806dcUdQv','join','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','POST','47888dCjAfq','1926YdNCzi','/smartapi/common/queryFileUrl','idCard','filePath','string','form','4314987UlnhEs','path','validation','10UGifJY','appCode','fileName','imageFile','Invoice','\x20OCR','/smartapi/common/uploadFile','image-url','9063538FFWSxA','read','GET','8349864UkeAeC','175GPCorI','122920FxZTIF','trim','toString','length','IdCard','imageUrl','Unsupported\x20OCR\x20scene:\x20','2463839biuxfE','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','\x20OCR\x20from\x20URL','ocr','toLowerCase','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','apiError','general','str','fileUrl'];a182_0x2316=function(){return _0x43d047;};return a182_0x2316();}function a182_0x1663(_0xe11007,_0x23c3d4){_0xe11007=_0xe11007-0x14e;const _0x231658=a182_0x2316();let _0x1663b5=_0x231658[_0xe11007];return _0x1663b5;}function selectedInputs(_0x5fced6){const _0x28761f=a182_0x31b3e6,_0x2c1b05=_0x5fced6['str'](_0x28761f(0x17c))[_0x28761f(0x167)](),_0x6cf243=_0x5fced6['str'](_0x28761f(0x160))[_0x28761f(0x167)]();return{'imageFile':_0x2c1b05,'imageUrl':_0x6cf243,'count':[_0x2c1b05,_0x6cf243][_0x28761f(0x17b)](Boolean)[_0x28761f(0x169)]};}function validateInputSelection(_0x5cbcfb){const _0x53ec28=a182_0x31b3e6,_0x10f400=selectedInputs(_0x5cbcfb);if(_0x10f400['count']!==0x1)throw CliErrors[_0x53ec28(0x158)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x10f400;}function withScene(_0x14cfb8,_0x276c87,_0x5e724f){const _0x5ad263=a182_0x31b3e6;return{..._0x14cfb8,'scene':_0x276c87,..._0x5e724f?{'sourceFile':{'fileName':_0x5e724f[_0x5ad263(0x15b)],'filePath':_0x5e724f['filePath']}}:{}};}const ocrRecognize={'service':a182_0x31b3e6(0x171),'command':'recognize','description':a182_0x31b3e6(0x16f),'risk':a182_0x31b3e6(0x162),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x175cb6){const _0x4c3a8d=a182_0x31b3e6,_0x4497c8=normalizeScene(_0x175cb6['str']('scene')),_0x20981e=SCENE_TO_LEGACY_TYPE[_0x4497c8],_0x1f69bb=validateInputSelection(_0x175cb6);if(_0x1f69bb[_0x4c3a8d(0x16b)]){const _0x28e568=new URLSearchParams({'url':_0x1f69bb[_0x4c3a8d(0x16b)],'type':_0x20981e,'appCode':_0x175cb6['appCode']});return{'method':_0x4c3a8d(0x163),'url':'/smartapi/ocr/recognize-text?'+_0x28e568[_0x4c3a8d(0x168)](),'description':'Preview:\x20recognize\x20'+_0x4497c8+_0x4c3a8d(0x170)};}const _0xfb9d03=requireDevelopmentUploadFile(_0x1f69bb[_0x4c3a8d(0x15c)],_0x4c3a8d(0x17c));return{'method':'POST','url':_0x4c3a8d(0x15f),'body':{'steps':[{'method':_0x4c3a8d(0x14e),'url':_0x4c3a8d(0x15f),'body':{'appCode':_0x175cb6[_0x4c3a8d(0x15a)],'multipart':{'file':_0xfb9d03}}},{'method':_0x4c3a8d(0x14e),'url':_0x4c3a8d(0x151),'body':{'filePath':_0x4c3a8d(0x173),'downloadFlag':![]}},{'method':_0x4c3a8d(0x163),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x175cb6[_0x4c3a8d(0x15a)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x20981e}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x4497c8+_0x4c3a8d(0x15e)};},async 'execute'(_0x455ff1){const _0x22e744=a182_0x31b3e6,_0x4a70a8=normalizeScene(_0x455ff1[_0x22e744(0x176)](_0x22e744(0x17d))),_0x2a8e23=SCENE_TO_LEGACY_TYPE[_0x4a70a8],_0x259091=validateInputSelection(_0x455ff1);if(_0x259091[_0x22e744(0x16b)]){const _0x302dc2=await recognizeDevelopmentOcr(_0x455ff1['appCode'],{'url':_0x259091[_0x22e744(0x16b)],'type':_0x2a8e23});return{'ok':!![],'data':withScene(_0x302dc2,_0x4a70a8)};}const _0x4ae622=requireDevelopmentUploadFile(_0x259091[_0x22e744(0x15c)],'image-file'),_0xcfd2a9=await uploadDevelopmentFile(_0x455ff1[_0x22e744(0x15a)],_0x4ae622[_0x22e744(0x157)]);if(!_0xcfd2a9[_0x22e744(0x153)])throw CliErrors[_0x22e744(0x174)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x2ac296=await queryDevelopmentFileUrl(_0xcfd2a9[_0x22e744(0x153)],{'download':![]});if(!_0x2ac296[_0x22e744(0x177)])throw CliErrors[_0x22e744(0x174)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x5dff4b=await recognizeDevelopmentOcr(_0x455ff1[_0x22e744(0x15a)],{'url':_0x2ac296[_0x22e744(0x177)],'type':_0x2a8e23});return{'ok':!![],'data':withScene(_0x5dff4b,_0x4a70a8,_0xcfd2a9)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a183_0x5e3e22=a183_0x38f9;(function(_0x3c2ade,_0x3421c4){const _0x404b85=a183_0x38f9,_0x3e560a=_0x3c2ade();while(!![]){try{const _0x19434e=-parseInt(_0x404b85(0x10d))/0x1*(parseInt(_0x404b85(0x128))/0x2)+parseInt(_0x404b85(0x124))/0x3+parseInt(_0x404b85(0x134))/0x4+parseInt(_0x404b85(0x113))/0x5*(parseInt(_0x404b85(0x10c))/0x6)+-parseInt(_0x404b85(0x117))/0x7*(parseInt(_0x404b85(0x12e))/0x8)+parseInt(_0x404b85(0x11f))/0x9*(parseInt(_0x404b85(0x11b))/0xa)+-parseInt(_0x404b85(0x12b))/0xb*(parseInt(_0x404b85(0xff))/0xc);if(_0x19434e===_0x3421c4)break;else _0x3e560a['push'](_0x3e560a['shift']());}catch(_0x2ce207){_0x3e560a['push'](_0x3e560a['shift']());}}}(a183_0x2fd2,0xa7131));import{readFile}from'node:fs/promises';function a183_0x38f9(_0x52b671,_0x4a6c68){_0x52b671=_0x52b671-0xfc;const _0x2fd2c2=a183_0x2fd2();let _0x38f949=_0x2fd2c2[_0x52b671];return _0x38f949;}import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a183_0x5e3e22(0x13a),a183_0x5e3e22(0xfd),'DASHBOARD'],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),'../../../templates/custom-pages');export const pageCreate={'service':a183_0x5e3e22(0x129),'command':a183_0x5e3e22(0xfe),'description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':'write','defaultOutputFormat':a183_0x5e3e22(0x10f),'structuredErrors':!![],'rejectedFlags':[{'name':a183_0x5e3e22(0x114),'message':a183_0x5e3e22(0x135),'hint':a183_0x5e3e22(0x11c)},{'name':'page-content','message':a183_0x5e3e22(0x103),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':a183_0x5e3e22(0x11d),'type':a183_0x5e3e22(0x110),'description':a183_0x5e3e22(0x137)},{'name':a183_0x5e3e22(0x102),'type':'number','description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':a183_0x5e3e22(0x131),'type':a183_0x5e3e22(0x110),'description':a183_0x5e3e22(0x121),'enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x5e3e22(0x115),'type':'string','description':'Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0x329a6c){await readValidatedPageSource(_0x329a6c);},async 'dryRun'(_0x3eceb8){const _0x209cde=a183_0x5e3e22,_0xb54f44=readInput(_0x3eceb8,await readValidatedPageSource(_0x3eceb8));return{'method':_0x209cde(0x13c),'url':_0x209cde(0x112),'body':{'appCode':_0xb54f44[_0x209cde(0x108)],'pageName':_0xb54f44[_0x209cde(0x109)],..._0xb54f44[_0x209cde(0x106)]!=null?{'parentMenuId':_0xb54f44[_0x209cde(0x106)]}:{},'createMenu':_0xb54f44[_0x209cde(0x126)],'codeContent':_0xb54f44[_0x209cde(0x118)]},'description':_0x209cde(0x10b)+JSON[_0x209cde(0x120)](_0xb54f44[_0x209cde(0x109)])+'\x20and\x20its\x20menu\x20entry.'};},async 'execute'(_0x388f40){const _0x19b99d=a183_0x5e3e22,_0x36d8eb=readInput(_0x388f40,await readValidatedPageSource(_0x388f40)),_0x1fead1=await createCustomPage(_0x36d8eb);if(!Number[_0x19b99d(0x130)](_0x1fead1[_0x19b99d(0x101)])||_0x1fead1[_0x19b99d(0x101)]<=0x0)throw CliErrors[_0x19b99d(0x122)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x76f1eb=buildCustomPageDevelopmentUrl(_0x36d8eb['appCode'],_0x1fead1[_0x19b99d(0x123)]),_0x236e95=buildCustomPageEditUrl(_0x36d8eb['appCode'],_0x1fead1[_0x19b99d(0x101)]);return{'ok':!![],'data':{'operation':_0x19b99d(0x11a),'pageType':'CUSTOM','pagePattern':readPagePattern(_0x388f40),'selector':{'appCode':_0x36d8eb[_0x19b99d(0x108)],'pageName':_0x36d8eb[_0x19b99d(0x109)]},'before':null,'after':{'pageId':_0x1fead1[_0x19b99d(0x101)],'pageName':_0x1fead1[_0x19b99d(0x109)],'appCode':_0x1fead1['appCode'],'version':_0x1fead1[_0x19b99d(0x119)],'menuId':_0x1fead1[_0x19b99d(0x11e)],'menuPath':_0x1fead1[_0x19b99d(0x123)],'files':_0x1fead1['files']??Object[_0x19b99d(0x105)](_0x36d8eb[_0x19b99d(0x118)])},'dryRun':![],'request':_0x36d8eb,..._0x76f1eb?{'pageUrl':_0x76f1eb}:{},..._0x236e95?{'editPageUrl':_0x236e95}:{},'warnings':_0x76f1eb?[]:[_0x19b99d(0x125)]},'message':_0x19b99d(0x127)+_0x1fead1[_0x19b99d(0x101)]+'.'};}};function readPagePattern(_0x13af20){const _0x241faa=a183_0x5e3e22,_0x542d52=_0x13af20['str'](_0x241faa(0x131))[_0x241faa(0x116)](),_0x52f01b=_0x13af20[_0x241faa(0x12d)](_0x241faa(0x115))[_0x241faa(0x116)]();if(_0x542d52&&_0x52f01b)throw CliErrors['validation'](_0x241faa(0x133));if(_0x52f01b)return null;if(!_0x542d52)throw CliErrors[_0x241faa(0x136)](_0x241faa(0x12c));if(!CUSTOM_PAGE_PATTERNS[_0x241faa(0x100)](_0x542d52))throw CliErrors[_0x241faa(0x136)]('--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.');return _0x542d52;}async function readPageSource(_0x5e4d21){const _0x459b7e=a183_0x5e3e22,_0xf0029d=_0x5e4d21[_0x459b7e(0x12d)]('page-dir')[_0x459b7e(0x116)](),_0x1b6fbd=readPagePattern(_0x5e4d21);if(_0x1b6fbd===null){const _0x3fee31=await readCustomPageDirectory(_0xf0029d);if(Object[_0x459b7e(0x105)](_0x3fee31)[_0x459b7e(0x10e)]===0x0)throw CliErrors[_0x459b7e(0x136)]('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x3fee31;}let _0x3da7ba;try{_0x3da7ba=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x1b6fbd['toLowerCase']()+_0x459b7e(0x104)),_0x459b7e(0x13b));}catch{throw CliErrors['validation'](_0x459b7e(0xfc)+_0x1b6fbd+'.');}let _0x3e463a;try{_0x3e463a=JSON['parse'](_0x3da7ba);}catch{throw CliErrors[_0x459b7e(0x136)](_0x459b7e(0x139)+_0x1b6fbd+'.');}if(!_0x3e463a||typeof _0x3e463a!=='object'||Array[_0x459b7e(0x107)](_0x3e463a)||Object[_0x459b7e(0x111)](_0x3e463a)[_0x459b7e(0x12f)](_0xdce53=>typeof _0xdce53!=='string'))throw CliErrors[_0x459b7e(0x136)](_0x459b7e(0x139)+_0x1b6fbd+'.');return _0x3e463a;}async function readValidatedPageSource(_0x14ff60){const _0x38735e=await readPageSource(_0x14ff60);return await validateCustomPageContent(_0x38735e),_0x38735e;}function readInput(_0x2bf07b,_0xe4d781){const _0xe1ba42=a183_0x5e3e22,_0x1a1e94=_0x2bf07b[_0xe1ba42(0x12d)](_0xe1ba42(0x11d))[_0xe1ba42(0x116)]()||_0xe1ba42(0x12a)+Date[_0xe1ba42(0x138)]();if(_0x1a1e94[_0xe1ba42(0x10e)]>0x64)throw CliErrors[_0xe1ba42(0x136)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x14be3a=_0x2bf07b['num'](_0xe1ba42(0x102),NaN),_0x59b319=!Number[_0xe1ba42(0x10a)](_0x14be3a);if(_0x59b319&&(!Number[_0xe1ba42(0x130)](_0x14be3a)||_0x14be3a<=0x0))throw CliErrors['validation'](_0xe1ba42(0x132));return{'appCode':_0x2bf07b[_0xe1ba42(0x108)],'pageName':_0x1a1e94,..._0x59b319?{'parentMenuId':_0x14be3a}:{},'createMenu':!![],'files':_0xe4d781};}function a183_0x2fd2(){const _0x4e5ed0=['3826536QUVLLM','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','createMenu','Created\x20Custom\x20Page\x20','2202788VHkrmC','page','Custom_page_','121FjPPzK','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','str','8kNAsCI','some','isInteger','page-pattern','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','597928HIGISx','page\x20create\x20does\x20not\x20accept\x20--page-type.','validation','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','now','Invalid\x20Custom\x20Page\x20pattern:\x20','BLANK','utf8','POST','Custom\x20Page\x20pattern\x20not\x20found:\x20','ONEPAGE','create','1079724REYAVZ','includes','pageId','parent-menu-id','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','.json','keys','parentMenuId','isArray','appCode','pageName','isNaN','Would\x20create\x20Custom\x20Page\x20','415146moNkFc','1MKcnKR','length','compress','string','values','/smartapi/webcode/page/create','65mSvZAk','page-type','page-dir','trim','4513103blCCiA','files','version','page.create','10yBsovi','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','name','menuId','9861570kcWcpk','stringify','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','apiError','menuPath'];a183_0x2fd2=function(){return _0x4e5ed0;};return a183_0x2fd2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x32fd9a=a184_0x4c4d;(function(_0xd85ec2,_0x197b79){const _0x463a80=a184_0x4c4d,_0x3ce2cf=_0xd85ec2();while(!![]){try{const _0x1128f0=parseInt(_0x463a80(0xea))/0x1*(-parseInt(_0x463a80(0xdb))/0x2)+parseInt(_0x463a80(0xef))/0x3+-parseInt(_0x463a80(0xed))/0x4*(-parseInt(_0x463a80(0xe6))/0x5)+parseInt(_0x463a80(0xe0))/0x6+-parseInt(_0x463a80(0xe7))/0x7+-parseInt(_0x463a80(0xee))/0x8*(-parseInt(_0x463a80(0xe2))/0x9)+-parseInt(_0x463a80(0xf1))/0xa;if(_0x1128f0===_0x197b79)break;else _0x3ce2cf['push'](_0x3ce2cf['shift']());}catch(_0x2727b1){_0x3ce2cf['push'](_0x3ce2cf['shift']());}}}(a184_0x3496,0xe48fd));function a184_0x3496(){const _0x49640d=['getMinutes','isNaN','compress','padStart','pageCode','1410VSJZcd','str','getTime','getDate','getSeconds','11125158HbCSsM','appcode','729iwljJd','Retrieved\x20Custom\x20Page\x20','trim','number','414385DNrevX','4328940sCtQrg','getHours','join','468cgfFMt','getFullYear','appCode','28FmaiPJ','153120TZALIr','3534603BUMvKW','cookie','32783240orxDzH','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files'];a184_0x3496=function(){return _0x49640d;};return a184_0x3496();}import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':'custom-detail','description':a184_0x32fd9a(0xf2),'risk':'read','defaultOutputFormat':a184_0x32fd9a(0xf5),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a184_0x32fd9a(0xe5),'required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x378b3e){readCustomPageId(_0x378b3e);},async 'execute'(_0x135b0a){const _0x3b7fb9=a184_0x32fd9a,_0x2fae05=readCustomPageId(_0x135b0a),_0x3f8c73=await getCustomPageSource(_0x2fae05),{bundle:_0x149278,createTime:_0x222d64,updateTime:_0x5408a7,..._0x291643}=_0x3f8c73,_0x5e81d1=_0x3f8c73['id']??_0x2fae05,_0x27ca18=_0x3f8c73[_0x3b7fb9(0xec)]?.[_0x3b7fb9(0xe4)]()||_0x135b0a[_0x3b7fb9(0xdc)](_0x3b7fb9(0xe1))[_0x3b7fb9(0xe4)](),_0x380e4a=buildCustomPageRuntimeUrl(_0x27ca18,_0x3f8c73[_0x3b7fb9(0xda)]),_0x4319a7=buildCustomPageEditUrl(_0x27ca18,_0x5e81d1),_0x5fae5a=await resolveCustomPageDevelopmentUrl(_0x27ca18,_0x5e81d1,_0x135b0a[_0x3b7fb9(0xf0)]);return{'ok':!![],'data':{..._0x291643,..._0x380e4a?{'runtimePageUrl':_0x380e4a}:{},..._0x5fae5a?{'pageUrl':_0x5fae5a}:{},..._0x4319a7?{'editPageUrl':_0x4319a7}:{},..._0x222d64==null?{}:{'createTime':formatTime(_0x222d64)},..._0x5408a7==null?{}:{'updateTime':formatTime(_0x5408a7)}},'message':_0x3b7fb9(0xe3)+_0x2fae05+'.'};}};function a184_0x4c4d(_0x20a17c,_0x520231){_0x20a17c=_0x20a17c-0xda;const _0x3496f3=a184_0x3496();let _0x4c4dca=_0x3496f3[_0x20a17c];return _0x4c4dca;}function formatTime(_0x42228c){const _0x4860c3=a184_0x32fd9a,_0x31f423=new Date(_0x42228c);if(Number[_0x4860c3(0xf4)](_0x31f423[_0x4860c3(0xdd)]()))return String(_0x42228c);const _0x340698=[_0x31f423[_0x4860c3(0xeb)](),String(_0x31f423['getMonth']()+0x1)[_0x4860c3(0xf6)](0x2,'0'),String(_0x31f423[_0x4860c3(0xde)]())[_0x4860c3(0xf6)](0x2,'0')][_0x4860c3(0xe9)]('-'),_0xef4fd2=[String(_0x31f423[_0x4860c3(0xe8)]())[_0x4860c3(0xf6)](0x2,'0'),String(_0x31f423[_0x4860c3(0xf3)]())[_0x4860c3(0xf6)](0x2,'0'),String(_0x31f423[_0x4860c3(0xdf)]())[_0x4860c3(0xf6)](0x2,'0')]['join'](':');return _0x340698+'\x20'+_0xef4fd2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a185_0x3f2ac1=a185_0x2748;(function(_0x2741ba,_0x4c211c){const _0x504884=a185_0x2748,_0x1fdc9d=_0x2741ba();while(!![]){try{const _0x58db7a=-parseInt(_0x504884(0x161))/0x1*(parseInt(_0x504884(0x164))/0x2)+-parseInt(_0x504884(0x162))/0x3+parseInt(_0x504884(0x165))/0x4+-parseInt(_0x504884(0x166))/0x5*(parseInt(_0x504884(0x14e))/0x6)+parseInt(_0x504884(0x15f))/0x7+parseInt(_0x504884(0x15b))/0x8*(-parseInt(_0x504884(0x14f))/0x9)+-parseInt(_0x504884(0x163))/0xa*(-parseInt(_0x504884(0x158))/0xb);if(_0x58db7a===_0x4c211c)break;else _0x1fdc9d['push'](_0x1fdc9d['shift']());}catch(_0x4dd787){_0x1fdc9d['push'](_0x1fdc9d['shift']());}}}(a185_0x65c5,0x2d639));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a185_0x2748(_0x1b7270,_0x25e8c5){_0x1b7270=_0x1b7270-0x14c;const _0x65c55c=a185_0x65c5();let _0x27485c=_0x65c55c[_0x1b7270];return _0x27485c;}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';export const pageCustomList={'service':a185_0x3f2ac1(0x15d),'command':'custom-list','description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':a185_0x3f2ac1(0x152),'defaultOutputFormat':a185_0x3f2ac1(0x157),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x19e7ad){const _0x102d63=a185_0x3f2ac1,_0x186911=(await fetchMenuSnapshot(_0x19e7ad['appCode'],_0x19e7ad[_0x102d63(0x15a)]))[_0x102d63(0x14c)][_0x102d63(0x150)](_0x39e2d5=>{const _0x3c72a1=_0x102d63;if(_0x39e2d5[_0x3c72a1(0x153)]!==_0x3c72a1(0x155)||_0x39e2d5[_0x3c72a1(0x151)]==null)return[];const _0x205d34=buildCustomPageDevelopmentUrl(_0x19e7ad[_0x3c72a1(0x156)],_0x39e2d5[_0x3c72a1(0x154)]),_0x31edc2=buildCustomPageRuntimeUrl(_0x19e7ad['appCode'],_0x39e2d5[_0x3c72a1(0x154)]),_0x3fa97e=buildCustomPageEditUrl(_0x19e7ad[_0x3c72a1(0x156)],_0x39e2d5[_0x3c72a1(0x151)]);return[{'pageId':_0x39e2d5[_0x3c72a1(0x151)],'label':_0x39e2d5[_0x3c72a1(0x160)],'path':_0x39e2d5[_0x3c72a1(0x154)],..._0x205d34?{'pageUrl':_0x205d34}:{},..._0x31edc2?{'runtimePageUrl':_0x31edc2}:{},..._0x3fa97e?{'editPageUrl':_0x3fa97e}:{}}];});return{'ok':!![],'data':{'pages':_0x186911},'message':_0x186911[_0x102d63(0x14d)]===0x0?_0x102d63(0x159):_0x102d63(0x15e)+_0x186911[_0x102d63(0x14d)]+_0x102d63(0x15c)};}};function a185_0x65c5(){const _0x959a17=['compress','1898941esbjkW','No\x20Custom\x20Pages\x20found.','cookie','370312POdGYJ','\x20Custom\x20Page(s).','page','Found\x20','1576519ykZdBd','label','44434oIeGLv','1112505SFhrSa','10RDDjEM','2eaCXaX','1138808vEzcby','58465rBihwt','menus','length','18ZUolyb','9mMbpax','flatMap','pageId','read','type','path','react','appCode'];a185_0x65c5=function(){return _0x959a17;};return a185_0x65c5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a186_0x443e9f=a186_0x30d0;(function(_0x5dd3b4,_0x45e19d){const _0x5a6c20=a186_0x30d0,_0x54c5bc=_0x5dd3b4();while(!![]){try{const _0x1b7940=-parseInt(_0x5a6c20(0x17a))/0x1*(parseInt(_0x5a6c20(0x173))/0x2)+parseInt(_0x5a6c20(0x186))/0x3+-parseInt(_0x5a6c20(0x172))/0x4+parseInt(_0x5a6c20(0x174))/0x5*(parseInt(_0x5a6c20(0x170))/0x6)+-parseInt(_0x5a6c20(0x192))/0x7+parseInt(_0x5a6c20(0x184))/0x8+parseInt(_0x5a6c20(0x175))/0x9*(parseInt(_0x5a6c20(0x187))/0xa);if(_0x1b7940===_0x45e19d)break;else _0x54c5bc['push'](_0x54c5bc['shift']());}catch(_0x265780){_0x54c5bc['push'](_0x54c5bc['shift']());}}}(a186_0x4720,0xbadb2));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';function a186_0x4720(){const _0x1b7437=['pageCode','POST','2629XnvGQw','str','Custom\x20Page\x20ID','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','custom-publish','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','remark','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','trim','push','2247560itfhjP','write','3406473wYeApU','3910110ClGRhd','unknown','FORMAL','isInteger','Would\x20publish\x20Custom\x20Page\x20','warnings','/smartapi/webcode/file/publish','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','pageId','number','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','303597yKiSwX','appCode','string','apiError','72OTcSPv','status','1190660jgsLco','594dVTMxU','33235QlRPAQ','9qwkVUn','compress','Published\x20Custom\x20Page\x20'];a186_0x4720=function(){return _0x1b7437;};return a186_0x4720();}export const pageCustomPublish={'service':'page','command':a186_0x443e9f(0x17e),'description':a186_0x443e9f(0x191),'risk':a186_0x443e9f(0x185),'defaultOutputFormat':a186_0x443e9f(0x176),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a186_0x443e9f(0x190),'required':!![],'description':a186_0x443e9f(0x17c)},{'name':a186_0x443e9f(0x180),'type':a186_0x443e9f(0x16e),'description':'Optional\x20publish\x20remark'}],async 'validate'(_0x4a20a1){readCustomPageId(_0x4a20a1);},async 'dryRun'(_0x3a494d){const _0x3ef85e=a186_0x443e9f,_0x169278=readInput(_0x3a494d);return{'method':_0x3ef85e(0x179),'url':_0x3ef85e(0x18d),'body':{'id':_0x169278[_0x3ef85e(0x18f)],..._0x169278[_0x3ef85e(0x180)]?{'remark':_0x169278['remark']}:{}},'description':_0x3ef85e(0x18b)+_0x169278[_0x3ef85e(0x18f)]+'.'};},async 'execute'(_0x5511c6){const _0x34a149=a186_0x443e9f,_0x60f94d=readInput(_0x5511c6);await getCustomPageSource(_0x60f94d[_0x34a149(0x18f)]);const _0x39920b=await publishCustomPage(_0x60f94d);if(!Number[_0x34a149(0x18a)](_0x39920b)||_0x39920b!==_0x60f94d[_0x34a149(0x18f)])throw CliErrors[_0x34a149(0x16f)](_0x34a149(0x181));const _0x280116=await getCustomPageSource(_0x60f94d[_0x34a149(0x18f)]);if(_0x280116[_0x34a149(0x171)]!==_0x34a149(0x189))throw CliErrors['apiError'](_0x34a149(0x17d)+(_0x280116[_0x34a149(0x171)]??_0x34a149(0x188))+'.');const _0x338558=_0x280116[_0x34a149(0x16d)]?.[_0x34a149(0x182)](),_0x4f012d=buildCustomPageEditUrl(_0x338558,_0x60f94d[_0x34a149(0x18f)]),_0x58735d=await resolveCustomPageDevelopmentUrl(_0x338558,_0x60f94d[_0x34a149(0x18f)],_0x5511c6['cookie']),_0x104cf7=buildMutationData(_0x60f94d,!![],_0x58735d,_0x4f012d);_0x338558&&!_0x58735d&&_0x104cf7[_0x34a149(0x18c)]['push'](_0x34a149(0x18e));const _0x286f92=buildCustomPageRuntimeUrl(_0x280116[_0x34a149(0x16d)],_0x280116[_0x34a149(0x178)]);return _0x286f92?_0x104cf7['runtimePageUrl']=_0x286f92:_0x104cf7[_0x34a149(0x18c)][_0x34a149(0x183)](_0x34a149(0x17f)),{'ok':!![],'data':_0x104cf7,'message':_0x34a149(0x177)+_0x60f94d[_0x34a149(0x18f)]+'.'};}};function a186_0x30d0(_0x32ee47,_0x31c58a){_0x32ee47=_0x32ee47-0x16d;const _0x472036=a186_0x4720();let _0x30d013=_0x472036[_0x32ee47];return _0x30d013;}function readInput(_0x5e1cfb){const _0x186169=a186_0x443e9f,_0x264633=readCustomPageId(_0x5e1cfb),_0x4d3129=_0x5e1cfb[_0x186169(0x17b)](_0x186169(0x180))[_0x186169(0x182)]();return{'pageId':_0x264633,..._0x4d3129?{'remark':_0x4d3129}:{}};}function buildMutationData(_0x194d84,_0x2f7c1e=![],_0x59f709,_0x2d5cda){const _0x4a61c6=a186_0x443e9f;return{'operation':'page.custom-publish','selector':{'pageId':_0x194d84[_0x4a61c6(0x18f)]},'before':null,'after':{'pageId':_0x194d84[_0x4a61c6(0x18f)],'status':_0x4a61c6(0x189)},'dryRun':!_0x2f7c1e,'request':_0x194d84,..._0x59f709?{'pageUrl':_0x59f709}:{},..._0x2d5cda?{'editPageUrl':_0x2d5cda}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a187_0x357df1=a187_0x1050;(function(_0x4f673a,_0xd3fdef){const _0x22fe6a=a187_0x1050,_0x2e1e65=_0x4f673a();while(!![]){try{const _0x3de8cd=-parseInt(_0x22fe6a(0x19d))/0x1*(-parseInt(_0x22fe6a(0x183))/0x2)+-parseInt(_0x22fe6a(0x195))/0x3*(-parseInt(_0x22fe6a(0x189))/0x4)+parseInt(_0x22fe6a(0x188))/0x5+-parseInt(_0x22fe6a(0x184))/0x6*(parseInt(_0x22fe6a(0x186))/0x7)+-parseInt(_0x22fe6a(0x193))/0x8+parseInt(_0x22fe6a(0x192))/0x9*(-parseInt(_0x22fe6a(0x19a))/0xa)+-parseInt(_0x22fe6a(0x18d))/0xb*(-parseInt(_0x22fe6a(0x19c))/0xc);if(_0x3de8cd===_0xd3fdef)break;else _0x2e1e65['push'](_0x2e1e65['shift']());}catch(_0x487d8d){_0x2e1e65['push'](_0x2e1e65['shift']());}}}(a187_0x4907,0x1a6f9));function a187_0x4907(){const _0x24fc07=['num','12IDlgWR','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','pageId','validation','message','10KfHsqL','join','34200YLSJlV','31RJmRfx','path','8546KJpghu','12bOeeVT','find','108668widxqw','type','957375rNpdeo','23252gwtOwp','/ide/','length','--id\x20must\x20be\x20a\x20positive\x20integer.','528kPTJcp','react','trim','/pages/','map','1806291xOCRsN','1151696JQCSiY'];a187_0x4907=function(){return _0x24fc07;};return a187_0x4907();}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';function a187_0x1050(_0x15f272,_0x4b51e8){_0x15f272=_0x15f272-0x183;const _0x490733=a187_0x4907();let _0x1050a9=_0x490733[_0x15f272];return _0x1050a9;}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a187_0x357df1(0x196)};function trimOptional(_0x212871){const _0x3e81a0=a187_0x357df1;return _0x212871?.[_0x3e81a0(0x18f)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x2911b5,_0x185310){const _0x59021b=trimOptional(_0x2911b5),_0x2a6e0e=trimOptional(_0x185310);if(!_0x59021b||!_0x2a6e0e)return undefined;return getPublishedAppDomain(_0x59021b)+'/'+encodeURIComponent(_0x2a6e0e);}export function buildCustomPageDevelopmentUrl(_0x3a01bc,_0xcf74c9){const _0x2f4491=a187_0x357df1,_0x2ecafa=trimOptional(_0x3a01bc),_0x3e3fc0=trimOptional(_0xcf74c9);if(!_0x2ecafa||!_0x3e3fc0)return undefined;return getAppBaseUrl(_0x2ecafa)+_0x2f4491(0x190)+encodeURIComponent(_0x3e3fc0);}export async function resolveCustomPageDevelopmentUrl(_0x4f795b,_0x16ea8b,_0x222c08){const _0x3cc800=a187_0x357df1,_0x2a9c6d=trimOptional(_0x4f795b);if(!_0x2a9c6d)return undefined;try{const _0x248952=(await fetchMenuSnapshot(_0x2a9c6d,_0x222c08))['menus'][_0x3cc800(0x185)](_0x30c62a=>_0x30c62a[_0x3cc800(0x187)]===_0x3cc800(0x18e)&&_0x30c62a[_0x3cc800(0x197)]===_0x16ea8b);return buildCustomPageDevelopmentUrl(_0x2a9c6d,_0x248952?.[_0x3cc800(0x19e)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x30a404,_0x30aabe){const _0x32e799=a187_0x357df1,_0x2b8704=trimOptional(_0x30a404);if(!_0x2b8704)return;const _0x193463=trimOptional(String(_0x30aabe??''));if(!_0x193463)return;return getAppBaseUrl(_0x2b8704)+_0x32e799(0x18a)+encodeURIComponent(_0x193463);}export async function validateCustomPageContent(_0x1d40e4){const _0x5140d0=a187_0x357df1,_0x1275d9=await validateCustomPageSourceFiles(_0x1d40e4);if(_0x1275d9[_0x5140d0(0x18b)]>0x0)throw CliErrors[_0x5140d0(0x198)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x1275d9[_0x5140d0(0x191)](_0x168b0e=>_0x168b0e['file']+':\x20'+_0x168b0e[_0x5140d0(0x199)])[_0x5140d0(0x19b)](';\x20'));}export function readCustomPageId(_0x180ada){const _0xb31068=a187_0x357df1,_0x408638=_0x180ada[_0xb31068(0x194)]('id');if(!Number['isInteger'](_0x408638)||_0x408638<=0x0)throw CliErrors['validation'](_0xb31068(0x18c));return _0x408638;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x286fcc=a188_0x4a92;function a188_0x3d5f(){const _0x2709c5=['85YQMQbP','toLowerCase','88MoBBYM','26hSEKoi','560650WcGelg','page\x20files','trim','filter','915vPBmGD','map','all','endsWith','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','9064404GCiOiB','441VwrWNE','6195696POeJWa','146128gXlEGf','babel','entries','some','.jsx','173190fmMiwc','2281908bLOLVF','typescript'];a188_0x3d5f=function(){return _0x2709c5;};return a188_0x3d5f();}(function(_0x1bd96e,_0x46cd10){const _0x2da29e=a188_0x4a92,_0x18778e=_0x1bd96e();while(!![]){try{const _0x5a00ba=parseInt(_0x2da29e(0x209))/0x1*(parseInt(_0x2da29e(0x204))/0x2)+-parseInt(_0x2da29e(0x1ff))/0x3+parseInt(_0x2da29e(0x1f8))/0x4+-parseInt(_0x2da29e(0x201))/0x5*(parseInt(_0x2da29e(0x1fe))/0x6)+-parseInt(_0x2da29e(0x1f7))/0x7*(-parseInt(_0x2da29e(0x1f9))/0x8)+-parseInt(_0x2da29e(0x1f6))/0x9+parseInt(_0x2da29e(0x205))/0xa*(parseInt(_0x2da29e(0x203))/0xb);if(_0x5a00ba===_0x46cd10)break;else _0x18778e['push'](_0x18778e['shift']());}catch(_0x2d56c0){_0x18778e['push'](_0x18778e['shift']());}}}(a188_0x3d5f,0xdc1e0));import{format}from'prettier';const SOURCE_PARSERS={'.js':a188_0x286fcc(0x1fa),'.jsx':'babel','.ts':a188_0x286fcc(0x200),'.tsx':a188_0x286fcc(0x200)},CUSTOM_PAGE_EXTENSIONS=[a188_0x286fcc(0x1fd),'.tsx'];export async function validateCustomPageSourceFiles(_0x36e41e){const _0x4e775a=a188_0x286fcc,_0x5066fb=Object['entries'](_0x36e41e)[_0x4e775a(0x208)](([_0x1188d9])=>getParser(_0x1188d9));if(!_0x5066fb[_0x4e775a(0x1fc)](([_0x445c6b])=>isReactSourceFile(_0x445c6b)))return[{'file':_0x4e775a(0x206),'message':_0x4e775a(0x1f5)}];const _0x20d489=await Promise[_0x4e775a(0x20b)](_0x5066fb[_0x4e775a(0x20a)](async([_0x3b0ccc,_0xa70f5b])=>{try{return await format(_0xa70f5b,{'parser':getParser(_0x3b0ccc)}),undefined;}catch(_0x10ce61){return{'file':_0x3b0ccc,'message':_0x10ce61 instanceof Error?_0x10ce61['message']:String(_0x10ce61)};}}));return _0x20d489[_0x4e775a(0x208)](_0x5ee67a=>_0x5ee67a!==undefined);}function getParser(_0x211595){const _0x25d284=a188_0x286fcc,_0x231cb1=_0x211595[_0x25d284(0x207)]()[_0x25d284(0x202)]();return Object[_0x25d284(0x1fb)](SOURCE_PARSERS)['find'](([_0x2e407a])=>_0x231cb1[_0x25d284(0x1f4)](_0x2e407a))?.[0x1];}function a188_0x4a92(_0xc42041,_0x57d8c3){_0xc42041=_0xc42041-0x1f4;const _0x3d5feb=a188_0x3d5f();let _0x4a9230=_0x3d5feb[_0xc42041];return _0x4a9230;}function isReactSourceFile(_0x45b083){const _0x5bbf5d=a188_0x286fcc,_0x331516=_0x45b083[_0x5bbf5d(0x207)]()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS[_0x5bbf5d(0x1fc)](_0xf5ec2b=>_0x331516[_0x5bbf5d(0x1f4)](_0xf5ec2b));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0x27c6eb=a189_0x2eee;(function(_0x502bf3,_0x2fe9a3){const _0x2cb390=a189_0x2eee,_0x2fa24a=_0x502bf3();while(!![]){try{const _0x386194=-parseInt(_0x2cb390(0xc9))/0x1+-parseInt(_0x2cb390(0xc1))/0x2+parseInt(_0x2cb390(0xb6))/0x3*(-parseInt(_0x2cb390(0xb1))/0x4)+parseInt(_0x2cb390(0xc3))/0x5+parseInt(_0x2cb390(0xcd))/0x6*(-parseInt(_0x2cb390(0xb2))/0x7)+parseInt(_0x2cb390(0xc7))/0x8+-parseInt(_0x2cb390(0xcc))/0x9*(-parseInt(_0x2cb390(0xaf))/0xa);if(_0x386194===_0x2fe9a3)break;else _0x2fa24a['push'](_0x2fa24a['shift']());}catch(_0x330053){_0x2fa24a['push'](_0x2fa24a['shift']());}}}(a189_0xb358,0xe847c));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a189_0x27c6eb(0xb9),'command':a189_0x27c6eb(0xae),'description':a189_0x27c6eb(0xce),'risk':a189_0x27c6eb(0xc8),'defaultOutputFormat':a189_0x27c6eb(0xb0),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a189_0x27c6eb(0xbe),'message':'page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','hint':a189_0x27c6eb(0xb7)}],'flags':[{'name':'id','type':a189_0x27c6eb(0xc6),'required':!![],'description':'Custom\x20Page\x20ID'},{'name':a189_0x27c6eb(0xad),'type':a189_0x27c6eb(0xc0),'required':!![],'description':'Directory\x20containing\x20all\x20complete\x20page\x20files'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x17e027){readCustomPageId(_0x17e027),await readValidatedPageContent(_0x17e027);},async 'dryRun'(_0x3ba4f0){const _0x1f2cf0=a189_0x27c6eb,_0x3e7981=await readInput(_0x3ba4f0);return{'method':_0x1f2cf0(0xba),'url':_0x1f2cf0(0xbf),'body':{'id':_0x3e7981['pageId'],'codeContent':_0x3e7981[_0x1f2cf0(0xca)]},'description':_0x1f2cf0(0xb4)+_0x3e7981[_0x1f2cf0(0xbb)]+'.'};},async 'execute'(_0x5ed0ad){const _0x4a4e3b=a189_0x27c6eb,_0x4ce361=await readInput(_0x5ed0ad),_0x8a7a8f=await updateCustomPageContent({'pageId':_0x4ce361[_0x4a4e3b(0xbb)],'pageContent':_0x4ce361[_0x4a4e3b(0xca)]});if(!Number[_0x4a4e3b(0xb8)](_0x8a7a8f[_0x4a4e3b(0xbd)])||_0x8a7a8f['newVersion']<=0x0)throw CliErrors[_0x4a4e3b(0xd0)](_0x4a4e3b(0xcf));const _0x25eb5c=buildCustomPageEditUrl(_0x4ce361[_0x4a4e3b(0xc2)],_0x4ce361[_0x4a4e3b(0xbb)]),_0xc7e696=await resolveCustomPageDevelopmentUrl(_0x4ce361[_0x4a4e3b(0xc2)],_0x4ce361[_0x4a4e3b(0xbb)],_0x5ed0ad[_0x4a4e3b(0xc5)]);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x4ce361[_0x4a4e3b(0xc2)],'pageId':_0x4ce361[_0x4a4e3b(0xbb)]},'before':null,'after':{'pageId':_0x8a7a8f[_0x4a4e3b(0xbb)],'version':_0x8a7a8f[_0x4a4e3b(0xbd)],'pageContent':_0x4ce361[_0x4a4e3b(0xca)]},'dryRun':![],'request':_0x4ce361,..._0xc7e696?{'pageUrl':_0xc7e696}:{},..._0x25eb5c?{'editPageUrl':_0x25eb5c}:{},'warnings':_0xc7e696?[]:[_0x4a4e3b(0xb3)]},'message':'Updated\x20Custom\x20Page\x20'+_0x4ce361[_0x4a4e3b(0xbb)]+'.'};}};async function readInput(_0x98a41b){const _0xb369a2=a189_0x27c6eb,_0x2f8a8d=readCustomPageId(_0x98a41b),_0x340acb=_0x98a41b['str']('appcode')['trim']()||(await getCustomPageSource(_0x2f8a8d))[_0xb369a2(0xc2)]?.[_0xb369a2(0xcb)]();if(!_0x340acb)throw CliErrors[_0xb369a2(0xb5)](_0xb369a2(0xc4)+_0x2f8a8d+'.');return{'appCode':_0x340acb,'pageId':_0x2f8a8d,'pageContent':await readValidatedPageContent(_0x98a41b)};}function a189_0x2eee(_0x3d3954,_0x5bc6b2){_0x3d3954=_0x3d3954-0xad;const _0xb3581c=a189_0xb358();let _0x2eeea3=_0xb3581c[_0x3d3954];return _0x2eeea3;}async function readValidatedPageContent(_0x1e62bd){const _0x17f596=a189_0x27c6eb,_0x406446=await readCustomPageDirectory(_0x1e62bd[_0x17f596(0xbc)](_0x17f596(0xad)));return await validateCustomPageContent(_0x406446),_0x406446;}function a189_0xb358(){const _0x2463b2=['isInteger','page','POST','pageId','str','newVersion','page-content','/smartapi/webcode/page/update/content','string','1565258FSgQKZ','appCode','1254360kvPedV','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','cookie','number','72544xIRkGz','write','1143422GPIoWf','pageContent','trim','1143GEtACr','66kmhxFe','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','apiError','page-dir','custom-update','369470XbvppK','compress','7407116YmEniO','141883XNjaGn','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','validation','3rfXcMG','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'];a189_0xb358=function(){return _0x2463b2;};return a189_0xb358();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a190_0x4645(_0x4b0e17,_0x4bd6c7){_0x4b0e17=_0x4b0e17-0x148;const _0x4c9283=a190_0x4c92();let _0x464525=_0x4c9283[_0x4b0e17];return _0x464525;}const a190_0x642fe8=a190_0x4645;(function(_0x157514,_0x2e469b){const _0x4759df=a190_0x4645,_0x3f4291=_0x157514();while(!![]){try{const _0x40439d=parseInt(_0x4759df(0x14c))/0x1*(-parseInt(_0x4759df(0x14f))/0x2)+parseInt(_0x4759df(0x15b))/0x3*(parseInt(_0x4759df(0x150))/0x4)+parseInt(_0x4759df(0x151))/0x5*(-parseInt(_0x4759df(0x15e))/0x6)+parseInt(_0x4759df(0x155))/0x7+-parseInt(_0x4759df(0x153))/0x8+-parseInt(_0x4759df(0x15c))/0x9*(parseInt(_0x4759df(0x14e))/0xa)+parseInt(_0x4759df(0x14d))/0xb;if(_0x40439d===_0x2e469b)break;else _0x3f4291['push'](_0x3f4291['shift']());}catch(_0x548be5){_0x3f4291['push'](_0x3f4291['shift']());}}}(a190_0x4c92,0xef9cb));function a190_0x4c92(){const _0x5bdb43=['related-pages-fallback','data-list-status','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','nextAction','3lkFSaW','81NTDSgv','code','357768pDZdZR','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','string','relatedPages','name','manualResolutionRequired','/smartapi/lovrabet/dataset/','read','compress','170857sMVggL','28143951xiMgDI','508550Feaglz','20gcbKju','6374600wfPxqJ','20ePYPxx','alias','11346696DrIyqu','status','4566618TTLIWu','length'];a190_0x4c92=function(){return _0x5bdb43;};return a190_0x4c92();}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':a190_0x642fe8(0x158),'description':a190_0x642fe8(0x159),'risk':a190_0x642fe8(0x14a),'defaultOutputFormat':a190_0x642fe8(0x14b),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a190_0x642fe8(0x152),'type':a190_0x642fe8(0x160),'description':a190_0x642fe8(0x15f)}],async 'validate'(_0x160a5b){validateDatasetSelector(_0x160a5b);},async 'dryRun'(_0x5e92c3){const _0x4a1af6=a190_0x642fe8,_0x288764=await loadDatasetDetailForPage(_0x5e92c3);return{'method':'GET','url':_0x4a1af6(0x149)+_0x288764[_0x4a1af6(0x15d)]+'/standard-page-status?appCode='+encodeURIComponent(_0x5e92c3['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x288764['id'],'code':_0x288764['code'],'name':_0x288764[_0x4a1af6(0x162)]},'action':'query-data-list-status'})};},async 'execute'(_0x44e47a){const _0x323344=a190_0x642fe8,_0x4e0a1a=await loadDatasetDetailForPage(_0x44e47a),_0x24260e=await loadDataListPageStatusForGenerate(_0x44e47a,_0x4e0a1a[_0x323344(0x15d)]),_0x54357c=getUndeletedRelatedPages(_0x4e0a1a),_0x5d4042=assessDataListPageState(_0x4e0a1a[_0x323344(0x15d)],_0x24260e,{'fallbackUndeletedPages':_0x54357c});return{'ok':!![],'data':{'datasetCode':_0x4e0a1a[_0x323344(0x15d)],'precheckSource':_0x24260e?.['source']??_0x323344(0x157),'status':_0x5d4042[_0x323344(0x154)],'manualResolutionRequired':_0x5d4042[_0x323344(0x148)],'nextAction':_0x5d4042[_0x323344(0x15a)],'dataListPageStatus':_0x24260e,'relatedPages':{'total':_0x4e0a1a[_0x323344(0x161)][_0x323344(0x156)],'undeletedCount':_0x54357c[_0x323344(0x156)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a191_0x4965a8=a191_0x5ec2;(function(_0x2a047b,_0x1adb9c){const _0xe8f6a5=a191_0x5ec2,_0x159565=_0x2a047b();while(!![]){try{const _0x599f6b=-parseInt(_0xe8f6a5(0x20e))/0x1+parseInt(_0xe8f6a5(0x206))/0x2+parseInt(_0xe8f6a5(0x20f))/0x3*(parseInt(_0xe8f6a5(0x1f5))/0x4)+-parseInt(_0xe8f6a5(0x1f4))/0x5+-parseInt(_0xe8f6a5(0x21b))/0x6+-parseInt(_0xe8f6a5(0x202))/0x7+parseInt(_0xe8f6a5(0x21a))/0x8*(parseInt(_0xe8f6a5(0x1f2))/0x9);if(_0x599f6b===_0x1adb9c)break;else _0x159565['push'](_0x159565['shift']());}catch(_0x3cc3e5){_0x159565['push'](_0x159565['shift']());}}}(a191_0x2c00,0xab4b0));function a191_0x2c00(){const _0x3698da=['DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','Submitted\x20a\x20generate\x20task','boolean','DATA_LIST','5386115ErlUbW','page-pattern','alias','dataListPageStatus','1804324nZXnmV','operationId','code','currentStep','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','apply','write','progressRate','687441YHknWN','21EAplmM','status','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','nextAction','clientOperationId','manualResolutionRequired','source','PARTIAL_SUCCESS','/generate-standard-pages/start','allowGenerate','dataset','8044424GEbaRZ','3960624NVWqIN','SUCCESS','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','POST','/smartapi/lovrabet/dataset/','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','CRUD_PAGE_SET','precheck','appCode','taskId','18wynRGA','generate-start','3077555MAxXqh','297628slBDpq','number','bool','message','page','reused','dryRun','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','fieldCount'];a191_0x2c00=function(){return _0x3698da;};return a191_0x2c00();}function a191_0x5ec2(_0x502c4c,_0x15b0dd){_0x502c4c=_0x502c4c-0x1ee;const _0x2c00e8=a191_0x2c00();let _0x5ec206=_0x2c00e8[_0x502c4c];return _0x5ec206;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a191_0x4965a8(0x1f9),'command':a191_0x4965a8(0x1f3),'description':a191_0x4965a8(0x211),'risk':a191_0x4965a8(0x20c),'defaultOutputFormat':'compress','rejectedFlags':[{'name':'page-type','message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','hint':a191_0x4965a8(0x220)},{'name':a191_0x4965a8(0x203),'message':a191_0x4965a8(0x20a),'hint':a191_0x4965a8(0x1fe)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a191_0x4965a8(0x204),'type':'string','description':a191_0x4965a8(0x1fc)},{'name':a191_0x4965a8(0x20b),'type':a191_0x4965a8(0x200),'description':a191_0x4965a8(0x21d)}],async 'validate'(_0x2e9753){validateDatasetSelector(_0x2e9753);},async 'dryRun'(_0x3014de){const _0x4d6c2c=a191_0x4965a8,_0x446698=await prepare(_0x3014de);return{'method':_0x4d6c2c(0x21e),'url':_0x4d6c2c(0x21f)+_0x446698[_0x4d6c2c(0x219)][_0x4d6c2c(0x208)]+_0x4d6c2c(0x217),'body':{'appCode':_0x3014de[_0x4d6c2c(0x1f0)],'clientOperationId':_0x446698[_0x4d6c2c(0x213)]},'description':serializeDryRunDescription({'dataset':{'id':_0x446698[_0x4d6c2c(0x219)]['id'],'code':_0x446698['dataset'][_0x4d6c2c(0x208)],'name':_0x446698[_0x4d6c2c(0x219)]['name'],'fieldCount':_0x446698[_0x4d6c2c(0x219)][_0x4d6c2c(0x1fd)]},'precheckSource':_0x446698[_0x4d6c2c(0x205)]?.[_0x4d6c2c(0x215)]??'related-pages-fallback','action':'generate-start','clientOperationId':_0x446698[_0x4d6c2c(0x213)],'plannedStatus':_0x446698['precheck'][_0x4d6c2c(0x210)],'reason':_0x446698['precheck'][_0x4d6c2c(0x1f8)]})};},async 'execute'(_0x5d49a9){const _0x6fa1ea=a191_0x4965a8;if(!_0x5d49a9[_0x6fa1ea(0x1f7)](_0x6fa1ea(0x20b))){const _0x1473b2=await pageGenerateStart[_0x6fa1ea(0x1fb)](_0x5d49a9);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x1473b2};}const _0x870442=await prepare(_0x5d49a9);if(!_0x870442[_0x6fa1ea(0x1ef)][_0x6fa1ea(0x218)])return{'ok':![],'message':_0x870442[_0x6fa1ea(0x1ef)][_0x6fa1ea(0x1f8)],'data':{'datasetCode':_0x870442[_0x6fa1ea(0x219)][_0x6fa1ea(0x208)],'pageType':_0x6fa1ea(0x201),'pagePattern':_0x6fa1ea(0x1ee),'clientOperationId':_0x870442[_0x6fa1ea(0x213)],'precheckSource':_0x870442[_0x6fa1ea(0x205)]?.['source']??'related-pages-fallback','status':_0x870442['precheck'][_0x6fa1ea(0x210)],'manualResolutionRequired':_0x870442[_0x6fa1ea(0x1ef)][_0x6fa1ea(0x214)],'nextAction':_0x870442[_0x6fa1ea(0x1ef)][_0x6fa1ea(0x212)],'query':{'command':buildDataListPageStatusQueryCommand(_0x870442[_0x6fa1ea(0x219)][_0x6fa1ea(0x208)],_0x5d49a9[_0x6fa1ea(0x1f0)])},'dataListPageStatus':_0x870442['dataListPageStatus']}};const _0x31a368=await startGenerateDataListPages(_0x5d49a9[_0x6fa1ea(0x1f0)],_0x870442[_0x6fa1ea(0x219)][_0x6fa1ea(0x208)],{'clientOperationId':_0x870442[_0x6fa1ea(0x213)]}),_0x3361c1=_0x31a368[_0x6fa1ea(0x210)]===_0x6fa1ea(0x21c)||_0x31a368[_0x6fa1ea(0x210)]===_0x6fa1ea(0x216)?await loadDataListPageStatusForGenerate(_0x5d49a9,_0x870442[_0x6fa1ea(0x219)][_0x6fa1ea(0x208)]):null,_0x54f864=assessGenerateOperationState(_0x870442['dataset'][_0x6fa1ea(0x208)],_0x31a368['status'],_0x3361c1);return{'ok':!![],'message':_0x31a368[_0x6fa1ea(0x1fa)]?'Reusing\x20an\x20existing\x20generate\x20task':_0x6fa1ea(0x1ff),'data':{'datasetCode':_0x870442[_0x6fa1ea(0x219)]['code'],'appCode':_0x5d49a9[_0x6fa1ea(0x1f0)],'pageType':_0x6fa1ea(0x201),'pagePattern':_0x6fa1ea(0x1ee),'taskId':_0x31a368[_0x6fa1ea(0x1f1)]??null,'operationId':_0x31a368[_0x6fa1ea(0x207)]??null,'clientOperationId':_0x870442[_0x6fa1ea(0x213)],'jobStatus':_0x31a368['status']??null,'progressRate':typeof _0x31a368[_0x6fa1ea(0x20d)]===_0x6fa1ea(0x1f6)?_0x31a368[_0x6fa1ea(0x20d)]:null,'currentStep':_0x31a368[_0x6fa1ea(0x209)]??null,'reused':_0x31a368['reused']===!![],'status':_0x54f864[_0x6fa1ea(0x210)],'manualResolutionRequired':_0x54f864[_0x6fa1ea(0x214)],'nextAction':_0x54f864[_0x6fa1ea(0x212)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x870442[_0x6fa1ea(0x219)][_0x6fa1ea(0x208)],{'appCode':_0x5d49a9[_0x6fa1ea(0x1f0)],'taskId':_0x31a368['taskId'],'operationId':_0x31a368[_0x6fa1ea(0x207)],'clientOperationId':_0x870442[_0x6fa1ea(0x213)]})},'dataListPageStatus':_0x3361c1}};}};async function prepare(_0x355826){const _0x3ee0ca=a191_0x4965a8,_0xb4b566=await loadDatasetDetailForPage(_0x355826),_0x14e490=await loadDataListPageStatusForGenerate(_0x355826,_0xb4b566['code']),_0x137390=getUndeletedRelatedPages(_0xb4b566);return{'dataset':_0xb4b566,'dataListPageStatus':_0x14e490,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0xb4b566[_0x3ee0ca(0x208)],_0x14e490,{'fallbackUndeletedPages':_0x137390})};}
|