@lovrabet/rabetbase-cli 2.5.3-beta.4 → 2.5.3
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/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.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 +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a181_0xb8cad6=a181_0x517e;(function(_0x201e6c,_0x13f5a5){const _0x48b80d=a181_0x517e,_0x2d306a=_0x201e6c();while(!![]){try{const _0x166fb4=parseInt(_0x48b80d(0xc6))/0x1+parseInt(_0x48b80d(0xb3))/0x2+-parseInt(_0x48b80d(0x98))/0x3+parseInt(_0x48b80d(0x9f))/0x4*(-parseInt(_0x48b80d(0xe6))/0x5)+-parseInt(_0x48b80d(0xdb))/0x6+parseInt(_0x48b80d(0xd7))/0x7+parseInt(_0x48b80d(0xa5))/0x8*(-parseInt(_0x48b80d(0x9c))/0x9);if(_0x166fb4===_0x13f5a5)break;else _0x2d306a['push'](_0x2d306a['shift']());}catch(_0x1eb6e7){_0x2d306a['push'](_0x2d306a['shift']());}}}(a181_0x4634,0xed89e));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_0xb8cad6(0x104),a181_0xb8cad6(0xb4),a181_0xb8cad6(0xc0),a181_0xb8cad6(0xe4),a181_0xb8cad6(0xff)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0xb8cad6(0xf6),a181_0xb8cad6(0xaa),'endpointUrl',a181_0xb8cad6(0xe7),a181_0xb8cad6(0xd3),a181_0xb8cad6(0xaf),a181_0xb8cad6(0x101)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a181_0xb8cad6(0xec),a181_0xb8cad6(0x112),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a181_0xb8cad6(0xdd),a181_0xb8cad6(0xcf),'ccList',a181_0xb8cad6(0xd2),a181_0xb8cad6(0xf5),a181_0xb8cad6(0xc4),a181_0xb8cad6(0x111),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a181_0xb8cad6(0xc7),'type':a181_0xb8cad6(0xd1),'required':![],'description':a181_0xb8cad6(0xde)},{'name':a181_0xb8cad6(0xcc),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a181_0xb8cad6(0xbb),'type':a181_0xb8cad6(0xd1),'required':![],'description':a181_0xb8cad6(0xb8)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a181_0xb8cad6(0xf8),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x1ddafa,_0x4af5b9,_0x482086){return new CliError(_0x1ddafa,0x1,_0x4af5b9,_0x482086);}export function readNotificationId(_0x1726e8){const _0xdd8e04=a181_0xb8cad6,_0x43b4bd=_0x1726e8[_0xdd8e04(0xcb)]('id');if(!Number[_0xdd8e04(0xb0)](_0x43b4bd)||_0x43b4bd<=0x0)throw notificationError(_0xdd8e04(0xbe),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x43b4bd;}export function requireNotificationExplicitYes(_0x95a550){const _0x1c313e=a181_0xb8cad6;if(_0x95a550[_0x1c313e(0x10b)](_0x1c313e(0xfb))||_0x95a550[_0x1c313e(0x10b)](_0x1c313e(0x9d)))return;throw notificationError(_0x1c313e(0x10a),_0x1c313e(0x103),_0x1c313e(0xc1));}export function readNotificationChannelType(_0x1ff862,_0x48b510=a181_0xb8cad6(0xc2),_0x265095=a181_0xb8cad6(0x104)){const _0x150c91=a181_0xb8cad6,_0x9e9811=_0x1ff862[_0x150c91(0xac)](_0x48b510)['trim']()||_0x265095;if(!NOTIFICATION_CHANNEL_TYPES[_0x150c91(0xfa)](_0x9e9811))throw CliErrors[_0x150c91(0x115)](_0x150c91(0xbd)+_0x48b510+':\x20'+_0x9e9811,_0x150c91(0xa0)+NOTIFICATION_CHANNEL_TYPES[_0x150c91(0xf0)](',\x20')+'.');return _0x9e9811;}export function assertSingleNotificationSource(_0x45c4ff){const _0xfc5987=a181_0xb8cad6,_0x4ea762=[],_0x32a730=_0x45c4ff[_0xfc5987(0xac)]('file')['trim']();if(_0x32a730)_0x4ea762[_0xfc5987(0xd4)]({'kind':_0xfc5987(0xc7),'path':_0x32a730});if(_0x45c4ff[_0xfc5987(0x10b)](_0xfc5987(0xcc)))_0x4ea762[_0xfc5987(0xd4)]({'kind':_0xfc5987(0xcc)});const _0x5b38de=_0x45c4ff[_0xfc5987(0xac)](_0xfc5987(0xbb))[_0xfc5987(0xb5)]();if(_0x5b38de)_0x4ea762[_0xfc5987(0xd4)]({'kind':'env','name':_0x5b38de});if(_0x4ea762[_0xfc5987(0xcd)]===0x0)throw CliErrors[_0xfc5987(0x115)](_0xfc5987(0x95),_0xfc5987(0x100));if(_0x4ea762[_0xfc5987(0xcd)]>0x1)throw CliErrors[_0xfc5987(0x115)](_0xfc5987(0xa8),_0xfc5987(0x100));return _0x4ea762[0x0];}export async function readNotificationDocument(_0x42ab7d,_0xe0b3c8){const _0x364ecf=a181_0xb8cad6,_0x6cb432=assertSingleNotificationSource(_0x42ab7d),_0x566117=_0x6cb432[_0x364ecf(0xc9)]==='file'?'file\x20'+_0x6cb432['path']:_0x6cb432[_0x364ecf(0xc9)]===_0x364ecf(0xee)?_0x364ecf(0xd8)+_0x6cb432[_0x364ecf(0xfd)]:'stdin';let _0x16da46;try{if(_0x6cb432[_0x364ecf(0xc9)]===_0x364ecf(0xc7))_0x16da46=await readFile(_0x6cb432['path'],_0x364ecf(0xca));else{if(_0x6cb432[_0x364ecf(0xc9)]===_0x364ecf(0xee)){if(!(_0x6cb432[_0x364ecf(0xfd)]in process.env))throw notificationError('notification_config_source_unavailable',_0x364ecf(0xd6)+_0x6cb432[_0x364ecf(0xfd)]);_0x16da46=process.env[_0x6cb432.name]??'';}else _0x16da46=await readStdin();}}catch(_0x298898){if(_0x298898 instanceof CliError)throw _0x298898;throw notificationError('notification_config_source_unavailable',_0x364ecf(0xeb)+_0x566117+'.');}let _0xa99652;try{_0xa99652=JSON[_0x364ecf(0x114)](_0x16da46);}catch{throw notificationError(_0x364ecf(0xf2),_0x364ecf(0xf4)+_0x566117+_0x364ecf(0x97),_0x364ecf(0xd9));}if(!isJsonObject(_0xa99652))throw notificationError('notification_config_json_invalid',_0x364ecf(0xf4)+_0x566117+_0x364ecf(0xb2));return validateNotificationDocument(_0xa99652,_0xe0b3c8);}export function projectNotificationListConfig(_0x5c4ccc,_0x3c5431){const _0x1c6d27=a181_0xb8cad6;return{'id':typeof _0x5c4ccc['id']===_0x1c6d27(0xf8)?_0x5c4ccc['id']:null,'configCode':requireResponseString(_0x5c4ccc[_0x1c6d27(0x112)],'configCode',_0x3c5431),'configName':requireResponseString(_0x5c4ccc[_0x1c6d27(0xf6)],_0x1c6d27(0xf6),_0x3c5431),'channelType':requireResponseString(_0x5c4ccc[_0x1c6d27(0xaa)],_0x1c6d27(0xaa),_0x3c5431),'description':normalizeNullableString(_0x5c4ccc['description']),'createTime':normalizeNullableString(_0x5c4ccc[_0x1c6d27(0xce)]),'updateTime':normalizeNullableString(_0x5c4ccc[_0x1c6d27(0x109)])};}export function normalizeExactNotificationConfig(_0x5b9446,_0x12a6f7,_0x2aeae2){const _0x16acb8=a181_0xb8cad6;if(!Number[_0x16acb8(0xb0)](_0x5b9446['id'])||_0x5b9446['id']!==_0x12a6f7)throw notificationError(_0x16acb8(0xb1),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x12a6f7+'.');if(_0x5b9446[_0x16acb8(0xec)]!==_0x2aeae2)throw notificationError('notification_config_response_invalid',_0x16acb8(0xb7)+_0x12a6f7+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x1b67a5=requireExactString(_0x5b9446[_0x16acb8(0xf6)],_0x16acb8(0xf6),_0x12a6f7),_0x56b24d=requireExactString(_0x5b9446[_0x16acb8(0x112)],_0x16acb8(0x112),_0x12a6f7),_0x4e6a63=requireExactString(_0x5b9446['channelType'],_0x16acb8(0xaa),_0x12a6f7);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x4e6a63))throw notificationError(_0x16acb8(0xb1),_0x16acb8(0xb7)+_0x12a6f7+'\x20has\x20an\x20unsupported\x20channelType.');const _0x2bbca2=responseNullableString(_0x5b9446[_0x16acb8(0x105)],_0x16acb8(0x105),_0x12a6f7),_0x1fefca=responseNullableString(_0x5b9446[_0x16acb8(0xe7)],_0x16acb8(0xe7),_0x12a6f7),_0x403db5=responseNullableString(_0x5b9446[_0x16acb8(0xd3)],_0x16acb8(0xd3),_0x12a6f7),_0x132078=responseNullableTimeout(_0x5b9446[_0x16acb8(0xaf)],'connectTimeout',_0x12a6f7),_0x898bca=responseNullableTimeout(_0x5b9446[_0x16acb8(0x101)],'readTimeout',_0x12a6f7);return{'id':_0x12a6f7,'appCode':_0x2aeae2,'configCode':_0x56b24d,'configName':_0x1b67a5,'channelType':_0x4e6a63,'endpointUrl':redactSensitive(_0x2bbca2),'channelConfig':redactSensitive(_0x1fefca),'description':_0x403db5,'connectTimeout':_0x132078,'readTimeout':_0x898bca,'endpointUrlRaw':_0x2bbca2,'channelConfigRaw':_0x1fefca};}export async function requireExactNotificationConfig(_0x41c47e,_0x50dc87,_0x47499d){const _0x54f586=a181_0xb8cad6;let _0x8a615b;try{_0x8a615b=await getNotificationChannelConfig(_0x50dc87,_0x41c47e);}catch{throw safeApiFailure(_0x47499d,'preflight',_0x54f586(0xad)+_0x41c47e+_0x54f586(0x108));}return normalizeExactNotificationConfig(_0x8a615b,_0x50dc87,_0x41c47e);}export function projectNotificationConfig(_0x9fcf1c){const _0x4877bd=a181_0xb8cad6;return{'id':_0x9fcf1c['id']??null,'appCode':_0x9fcf1c['appCode'],'configCode':_0x9fcf1c[_0x4877bd(0x112)]??null,'configName':_0x9fcf1c['configName'],'channelType':_0x9fcf1c[_0x4877bd(0xaa)],'endpointUrl':redactSensitive(_0x9fcf1c['endpointUrl']),'channelConfig':redactSensitive(_0x9fcf1c[_0x4877bd(0xe7)]),'description':_0x9fcf1c[_0x4877bd(0xd3)]??null,'connectTimeout':_0x9fcf1c['connectTimeout']??null,'readTimeout':_0x9fcf1c[_0x4877bd(0x101)]??null};}export function notificationSelector(_0x3acc2b){const _0x2c8426=a181_0xb8cad6;return{'appCode':_0x3acc2b['appCode'],'id':_0x3acc2b['id'],'configCode':_0x3acc2b[_0x2c8426(0x112)],'configName':_0x3acc2b[_0x2c8426(0xf6)],'channelType':_0x3acc2b[_0x2c8426(0xaa)]};}export function createMutationInput(_0x58cdf4,_0x583660){const _0x21af37=a181_0xb8cad6;return{'appCode':_0x58cdf4,'configName':_0x583660[_0x21af37(0xf6)],'channelType':_0x583660[_0x21af37(0xaa)],...hasOwn(_0x583660,_0x21af37(0x105))?{'endpointUrl':_0x583660['endpointUrl']}:{},...hasOwn(_0x583660,_0x21af37(0xe7))?{'channelConfig':serializeChannelConfig(_0x583660[_0x21af37(0xe7)])}:{},...hasOwn(_0x583660,'description')?{'description':_0x583660[_0x21af37(0xd3)]}:{},...hasOwn(_0x583660,_0x21af37(0xaf))?{'connectTimeout':_0x583660[_0x21af37(0xaf)]}:{},...hasOwn(_0x583660,'readTimeout')?{'readTimeout':_0x583660[_0x21af37(0x101)]}:{}};}export function mergeUpdateInput(_0x2eb18a,_0x559fb3){const _0x498ffa=a181_0xb8cad6;return{'id':_0x2eb18a['id'],'appCode':_0x2eb18a[_0x498ffa(0xec)],'configName':_0x559fb3[_0x498ffa(0xf6)]??_0x2eb18a[_0x498ffa(0xf6)],'channelType':_0x559fb3['channelType']??_0x2eb18a[_0x498ffa(0xaa)],'endpointUrl':hasOwn(_0x559fb3,_0x498ffa(0x105))?_0x559fb3[_0x498ffa(0x105)]:_0x2eb18a['endpointUrlRaw'],'channelConfig':hasOwn(_0x559fb3,_0x498ffa(0xe7))?serializeChannelConfig(_0x559fb3[_0x498ffa(0xe7)]):_0x2eb18a[_0x498ffa(0xa7)],'description':hasOwn(_0x559fb3,_0x498ffa(0xd3))?_0x559fb3[_0x498ffa(0xd3)]:_0x2eb18a[_0x498ffa(0xd3)],'connectTimeout':hasOwn(_0x559fb3,_0x498ffa(0xaf))?_0x559fb3['connectTimeout']:_0x2eb18a[_0x498ffa(0xaf)],'readTimeout':hasOwn(_0x559fb3,_0x498ffa(0x101))?_0x559fb3[_0x498ffa(0x101)]:_0x2eb18a['readTimeout']};}export function plannedUpdateProjection(_0x43dc0a,_0x448054){const _0x33a4e7=a181_0xb8cad6;return projectNotificationConfig({'id':_0x43dc0a['id'],'appCode':_0x43dc0a[_0x33a4e7(0xec)],'configCode':_0x43dc0a[_0x33a4e7(0x112)],'configName':_0x448054[_0x33a4e7(0xf6)]??_0x43dc0a[_0x33a4e7(0xf6)],'channelType':_0x448054[_0x33a4e7(0xaa)]??_0x43dc0a[_0x33a4e7(0xaa)],'endpointUrl':hasOwn(_0x448054,_0x33a4e7(0x105))?_0x448054[_0x33a4e7(0x105)]:_0x43dc0a['endpointUrlRaw'],'channelConfig':hasOwn(_0x448054,'channelConfig')?_0x448054[_0x33a4e7(0xe7)]:_0x43dc0a['channelConfigRaw'],'description':hasOwn(_0x448054,_0x33a4e7(0xd3))?_0x448054[_0x33a4e7(0xd3)]:_0x43dc0a[_0x33a4e7(0xd3)],'connectTimeout':hasOwn(_0x448054,'connectTimeout')?_0x448054[_0x33a4e7(0xaf)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x43dc0a[_0x33a4e7(0xaf)],'readTimeout':hasOwn(_0x448054,'readTimeout')?_0x448054[_0x33a4e7(0x101)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x43dc0a[_0x33a4e7(0x101)]});}export function requestedSafeFieldsMatch(_0x533abc,_0x5d997d,_0x3fa87b){const _0x5ec78c=a181_0xb8cad6,_0x2555da=[],_0x3e19a6=[],_0x1d8b90=[];for(const _0x3da772 of[_0x5ec78c(0xf6),_0x5ec78c(0xaa),_0x5ec78c(0xd3)]){if(!hasOwn(_0x3fa87b,_0x3da772))continue;_0x1d8b90[_0x5ec78c(0xd4)](_0x3da772),_0x2555da[_0x5ec78c(0xd4)](_0x5d997d[_0x3da772]===_0x3fa87b[_0x3da772]),_0x3e19a6['push'](_0x533abc[_0x3da772]!==_0x3fa87b[_0x3da772]&&_0x5d997d[_0x3da772]===_0x3fa87b[_0x3da772]);}for(const _0x3e59f3 of[_0x5ec78c(0xaf),_0x5ec78c(0x101)]){if(!hasOwn(_0x3fa87b,_0x3e59f3))continue;const _0x5cbd28=_0x3fa87b[_0x3e59f3]??(_0x3e59f3===_0x5ec78c(0xaf)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x1d8b90['push'](_0x3e59f3),_0x2555da[_0x5ec78c(0xd4)](_0x5d997d[_0x3e59f3]===_0x5cbd28),_0x3e19a6[_0x5ec78c(0xd4)](_0x533abc[_0x3e59f3]!==_0x5cbd28&&_0x5d997d[_0x3e59f3]===_0x5cbd28);}return hasOwn(_0x3fa87b,_0x5ec78c(0x105))&&_0x3fa87b[_0x5ec78c(0x105)]===null&&(_0x1d8b90[_0x5ec78c(0xd4)]('endpointUrl:null'),_0x2555da[_0x5ec78c(0xd4)](_0x5d997d[_0x5ec78c(0xf3)]===null||_0x5d997d['endpointUrlRaw']===''),_0x3e19a6[_0x5ec78c(0xd4)](_0x533abc[_0x5ec78c(0xf3)]!==null&&_0x533abc['endpointUrlRaw']!==''&&(_0x5d997d[_0x5ec78c(0xf3)]===null||_0x5d997d['endpointUrlRaw']===''))),{'allMatch':_0x2555da[_0x5ec78c(0xc5)](Boolean),'provesChange':_0x3e19a6[_0x5ec78c(0xab)](Boolean),'verifiedFields':_0x1d8b90};}export function validateNotificationDeleteReadback(_0xc9ed74,_0x1e3f8f,_0x2cb216){const _0x329b53=a181_0xb8cad6;for(const [_0x4b8aa2,_0x565dcc]of _0xc9ed74[_0x329b53(0xfc)]()){if(!Number[_0x329b53(0xb0)](_0x565dcc['id'])||_0x565dcc['id']<=0x0)throw notificationError(_0x329b53(0xb1),_0x329b53(0x10c)+(_0x4b8aa2+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x565dcc['appCode']!==_0x1e3f8f)throw notificationError('notification_config_response_invalid',_0x329b53(0x10c)+(_0x4b8aa2+0x1)+_0x329b53(0x110));if(_0x565dcc[_0x329b53(0xaa)]!==_0x2cb216)throw notificationError(_0x329b53(0xb1),_0x329b53(0x10c)+(_0x4b8aa2+0x1)+_0x329b53(0x107));}}export function safeApiFailure(_0x2d119f,_0x458c6b,_0x1c4735){const _0x2286c1=a181_0xb8cad6;return notificationError(_0x2286c1(0xe0)+_0x2d119f+'_'+(_0x458c6b===_0x2286c1(0xa2)?_0x2286c1(0xba):_0x458c6b+_0x2286c1(0xda)),'Notification\x20config\x20'+_0x2d119f+'\x20'+_0x458c6b+'\x20failed.',_0x1c4735);}export function notificationLookupCommand(_0x5da0a5,_0x5db676){const _0x14aa31=a181_0xb8cad6;return _0x14aa31(0xa1)+_0x5da0a5+_0x14aa31(0x96)+_0x5db676+'\x20--format\x20compress';}function validateNotificationDocument(_0x14479d,_0x221bea){const _0x5c9c96=a181_0xb8cad6;for(const _0x10161b of Object[_0x5c9c96(0xa6)](_0x14479d)){if(FORBIDDEN_IDENTITY_FIELDS[_0x5c9c96(0xf7)](_0x10161b))throw notificationError(_0x5c9c96(0xe2),_0x5c9c96(0xb6)+_0x10161b+_0x5c9c96(0xe1));if(!ALLOWED_INPUT_FIELDS['has'](_0x10161b))throw notificationError(_0x5c9c96(0xbf),_0x5c9c96(0x102)+_0x10161b+'\x22.');}if(_0x221bea==='update'&&Object[_0x5c9c96(0xa6)](_0x14479d)[_0x5c9c96(0xcd)]===0x0)throw notificationError(_0x5c9c96(0xc8),_0x5c9c96(0xa9));const _0x11b6c5={};if(hasOwn(_0x14479d,'configName'))_0x11b6c5[_0x5c9c96(0xf6)]=validateRequiredString(_0x14479d['configName'],'configName',0x80);else{if(_0x221bea===_0x5c9c96(0xe3))throw notificationError(_0x5c9c96(0xae),'Create\x20JSON\x20requires\x20field\x20'+_0x5c9c96(0xd0));}if(hasOwn(_0x14479d,_0x5c9c96(0xaa))){if(typeof _0x14479d[_0x5c9c96(0xaa)]!==_0x5c9c96(0xd1))throw invalidFieldType(_0x5c9c96(0xaa),_0x5c9c96(0xfe));const _0x916d8b=_0x14479d[_0x5c9c96(0xaa)][_0x5c9c96(0xb5)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x5c9c96(0xfa)](_0x916d8b))throw notificationError(_0x5c9c96(0x106),_0x5c9c96(0x10f),_0x5c9c96(0xa0)+NOTIFICATION_CHANNEL_TYPES[_0x5c9c96(0xf0)](',\x20')+'.');_0x11b6c5['channelType']=_0x916d8b;}else{if(_0x221bea===_0x5c9c96(0xe3))throw notificationError(_0x5c9c96(0xae),_0x5c9c96(0xd5)+_0x5c9c96(0x9b));}for(const [_0x4840c3,_0x328af7]of[[_0x5c9c96(0x105),0x200],['description',0x100]]){if(!hasOwn(_0x14479d,_0x4840c3))continue;const _0x4d073c=_0x14479d[_0x4840c3];if(_0x4d073c!==null&&typeof _0x4d073c!==_0x5c9c96(0xd1))throw invalidFieldType(_0x4840c3,_0x5c9c96(0xe9));if(typeof _0x4d073c===_0x5c9c96(0xd1)&&_0x4d073c[_0x5c9c96(0xcd)]>_0x328af7)throw notificationError('notification_config_field_invalid',_0x5c9c96(0xb6)+_0x4840c3+_0x5c9c96(0xa3)+_0x328af7+'\x20characters.');_0x11b6c5[_0x4840c3]=_0x4d073c;}if(hasOwn(_0x14479d,_0x5c9c96(0xe7))){const _0x31ed28=_0x14479d[_0x5c9c96(0xe7)];if(_0x31ed28===null&&_0x221bea===_0x5c9c96(0xe3))throw invalidFieldType(_0x5c9c96(0xe7),_0x5c9c96(0xe5));if(_0x31ed28!==null&&!isJsonObject(_0x31ed28))throw invalidFieldType(_0x5c9c96(0xe7),_0x221bea==='update'?_0x5c9c96(0xf9):_0x5c9c96(0xe5));_0x31ed28!==null&&validateChannelConfigFields(_0x11b6c5[_0x5c9c96(0xaa)],_0x31ed28),_0x11b6c5[_0x5c9c96(0xe7)]=_0x31ed28;}for(const _0x4d344f of['connectTimeout',_0x5c9c96(0x101)]){if(!hasOwn(_0x14479d,_0x4d344f))continue;const _0x4186c5=_0x14479d[_0x4d344f];if(_0x4186c5!==null&&(!Number['isSafeInteger'](_0x4186c5)||_0x4186c5<0x0))throw notificationError('notification_config_field_invalid',_0x5c9c96(0xb6)+_0x4d344f+_0x5c9c96(0xc3));_0x11b6c5[_0x4d344f]=_0x4186c5;}return _0x11b6c5;}function validateRequiredString(_0x43832c,_0x27420e,_0x2b7b24){const _0x1a59c7=a181_0xb8cad6;if(typeof _0x43832c!==_0x1a59c7(0xd1))throw invalidFieldType(_0x27420e,_0x1a59c7(0xed));const _0x56b7e3=_0x43832c[_0x1a59c7(0xb5)]();if(!_0x56b7e3)throw notificationError(_0x1a59c7(0x106),_0x1a59c7(0xb6)+_0x27420e+_0x1a59c7(0x99));if(_0x56b7e3[_0x1a59c7(0xcd)]>_0x2b7b24)throw notificationError(_0x1a59c7(0x106),'Notification\x20JSON\x20field\x20\x22'+_0x27420e+_0x1a59c7(0xa3)+_0x2b7b24+_0x1a59c7(0xef));return _0x56b7e3;}function validateChannelConfigFields(_0xa8a22e,_0xf2eb2b){const _0x129a9e=a181_0xb8cad6;if(hasOwn(_0xf2eb2b,_0x129a9e(0xdf)))throw forbiddenChannelConfigField(_0x129a9e(0xdf));if(_0xa8a22e===_0x129a9e(0x104))for(const _0x16fc3c of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0xf2eb2b,_0x16fc3c))throw forbiddenChannelConfigField(_0x16fc3c);}}function forbiddenChannelConfigField(_0x66bc14){const _0x38d0d8=a181_0xb8cad6;return notificationError(_0x38d0d8(0x113),_0x38d0d8(0x9e)+_0x66bc14+_0x38d0d8(0x10e));}function invalidFieldType(_0x67fddf,_0x4ca937){const _0x5ee8ab=a181_0xb8cad6;return notificationError('notification_config_field_invalid',_0x5ee8ab(0xb6)+_0x67fddf+_0x5ee8ab(0xdc)+_0x4ca937+'.');}function a181_0x517e(_0x5eba1b,_0x30d530){_0x5eba1b=_0x5eba1b-0x94;const _0x4634d4=a181_0x4634();let _0x517ece=_0x4634d4[_0x5eba1b];return _0x517ece;}function serializeChannelConfig(_0x12ef02){const _0x53623f=a181_0xb8cad6;return _0x12ef02===null||_0x12ef02===undefined?null:JSON[_0x53623f(0x10d)](_0x12ef02);}function redactSensitive(_0x4a90e1){const _0x18a44f=a181_0xb8cad6;return _0x4a90e1===null||_0x4a90e1===undefined||_0x4a90e1===''?null:_0x18a44f(0xea);}function requireResponseString(_0xfe531d,_0x33ace9,_0x5b8caa){const _0x15ccd0=a181_0xb8cad6;if(typeof _0xfe531d!==_0x15ccd0(0xd1)||_0xfe531d[_0x15ccd0(0xb5)]()==='')throw CliErrors[_0x15ccd0(0xb9)]('Invalid\x20notification\x20config\x20response.',_0x15ccd0(0xf1)+(_0x5b8caa+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x33ace9+'\x22.');return _0xfe531d['trim']();}function requireExactString(_0x81abcc,_0xb000d8,_0x86cb26){const _0x51cc70=a181_0xb8cad6;if(typeof _0x81abcc!==_0x51cc70(0xd1)||_0x81abcc[_0x51cc70(0xb5)]()==='')throw notificationError(_0x51cc70(0xb1),_0x51cc70(0xb7)+_0x86cb26+_0x51cc70(0xa4)+_0xb000d8+'\x22.');return _0x81abcc[_0x51cc70(0xb5)]();}function responseNullableString(_0x3bf8ea,_0x160f2c,_0x213ba5){const _0x47ba51=a181_0xb8cad6;if(_0x3bf8ea===undefined||_0x3bf8ea===null)return null;if(typeof _0x3bf8ea!==_0x47ba51(0xd1))throw notificationError(_0x47ba51(0xb1),'Notification\x20config\x20'+_0x213ba5+'\x20has\x20invalid\x20field\x20\x22'+_0x160f2c+'\x22.');return _0x3bf8ea;}function a181_0x4634(){const _0x19c411=['endpointUrlRaw','Notification\x20JSON\x20from\x20','replyTo','configName','has','number','a\x20JSON\x20object\x20or\x20null','includes','dry-run','entries','name','a\x20supported\x20string','WEBHOOK','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','readTimeout','Unknown\x20notification\x20JSON\x20field\x20\x22','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','EMAIL','endpointUrl','notification_config_field_invalid','\x20has\x20an\x20invalid\x20channelType.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','updateTime','notification_config_confirmation_required','bool','Notification\x20config\x20list\x20item\x20','stringify','\x22\x20is\x20forbidden.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20has\x20an\x20invalid\x20appCode.','fromName','configCode','notification_config_channel_field_forbidden','parse','validation','call','Missing\x20notification\x20JSON\x20source.','\x20--type\x20','\x20is\x20invalid.','1169817LdJHhI','\x22\x20must\x20be\x20a\x20non-empty\x20string.','prototype','\x22channelType\x22.','860481faCvBb','yes','Notification\x20JSON\x20channelConfig\x20field\x20\x22','4RczTZY','Allowed\x20values:\x20','rabetbase\x20notification\x20config-list\x20--appcode\x20','mutation','\x22\x20cannot\x20exceed\x20','\x20is\x20missing\x20required\x20field\x20\x22','16bNlfVr','keys','channelConfigRaw','Notification\x20JSON\x20source\x20is\x20ambiguous.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','channelType','some','str','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_required','connectTimeout','isSafeInteger','notification_config_response_invalid','\x20must\x20be\x20an\x20object.','429084HJhKIP','FEISHU','trim','Notification\x20JSON\x20field\x20\x22','Notification\x20config\x20','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','apiError','failed','from-env','isArray','Invalid\x20--','notification_config_id_invalid','notification_config_field_unknown','DINGTALK','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','type','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','subjectPrefix','every','1511222IWevwf','file','notification_config_update_empty','kind','utf8','num','stdin','length','createTime','recipients','\x22configName\x22.','string','bccList','description','push','Create\x20JSON\x20requires\x20field\x20','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','10074652wLHRtP','environment\x20variable\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','_unavailable','5249004hDsfWJ','\x22\x20must\x20be\x20','emailTargets','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','messageTemplate','notification_config_','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','notification_config_field_forbidden','create','WECOM','a\x20JSON\x20object','3680255BlLCbi','channelConfig','hasOwnProperty','a\x20string\x20or\x20null','<redacted>','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','appCode','a\x20non-empty\x20string','env','\x20characters.','join','Item\x20','notification_config_json_invalid'];a181_0x4634=function(){return _0x19c411;};return a181_0x4634();}function responseNullableTimeout(_0xf5d295,_0x1f2d6d,_0x19f980){const _0x2695a4=a181_0xb8cad6;if(_0xf5d295===undefined||_0xf5d295===null)return null;if(!Number[_0x2695a4(0xb0)](_0xf5d295)||_0xf5d295<0x0)throw notificationError(_0x2695a4(0xb1),_0x2695a4(0xb7)+_0x19f980+'\x20has\x20invalid\x20field\x20\x22'+_0x1f2d6d+'\x22.');return _0xf5d295;}function normalizeNullableString(_0x545f73){const _0xc722cd=a181_0xb8cad6;return typeof _0x545f73===_0xc722cd(0xd1)?_0x545f73:null;}function isJsonObject(_0x46b1d7){const _0x18f575=a181_0xb8cad6;return _0x46b1d7!==null&&typeof _0x46b1d7==='object'&&!Array[_0x18f575(0xbc)](_0x46b1d7);}function hasOwn(_0x30ae51,_0x3fc493){const _0x109c1c=a181_0xb8cad6;return Object[_0x109c1c(0x9a)][_0x109c1c(0xe8)][_0x109c1c(0x94)](_0x30ae51,_0x3fc493);}async function readStdin(){const _0x596e0c=a181_0xb8cad6;let _0x5cad9f='';process[_0x596e0c(0xcc)]['setEncoding'](_0x596e0c(0xca));for await(const _0x5b0028 of process[_0x596e0c(0xcc)])_0x5cad9f+=_0x5b0028;return _0x5cad9f;}
|
|
1
|
+
const a181_0x4044c7=a181_0x123b;(function(_0x32eefe,_0x5efefc){const _0x536b76=a181_0x123b,_0x5b74b6=_0x32eefe();while(!![]){try{const _0x533cbe=-parseInt(_0x536b76(0x104))/0x1*(parseInt(_0x536b76(0xd1))/0x2)+parseInt(_0x536b76(0xcc))/0x3+-parseInt(_0x536b76(0x10e))/0x4*(-parseInt(_0x536b76(0x118))/0x5)+-parseInt(_0x536b76(0xc5))/0x6+parseInt(_0x536b76(0x12c))/0x7*(-parseInt(_0x536b76(0xd0))/0x8)+-parseInt(_0x536b76(0xd4))/0x9*(parseInt(_0x536b76(0x131))/0xa)+parseInt(_0x536b76(0xfd))/0xb;if(_0x533cbe===_0x5efefc)break;else _0x5b74b6['push'](_0x5b74b6['shift']());}catch(_0x501762){_0x5b74b6['push'](_0x5b74b6['shift']());}}}(a181_0x2aba,0x8e558));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_0x4044c7(0x109),a181_0x4044c7(0xf8),a181_0x4044c7(0x141),'WECOM',a181_0x4044c7(0xee)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x4044c7(0x140),a181_0x4044c7(0xd3),a181_0x4044c7(0xf9),a181_0x4044c7(0xe5),a181_0x4044c7(0xc6),a181_0x4044c7(0x102),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a181_0x4044c7(0xdd),a181_0x4044c7(0xe9)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x4044c7(0xd7),a181_0x4044c7(0x11d),a181_0x4044c7(0x146),a181_0x4044c7(0x13f),a181_0x4044c7(0x107),'subjectPrefix',a181_0x4044c7(0xf4),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a181_0x4044c7(0xe6),'type':a181_0x4044c7(0x122),'required':![],'description':a181_0x4044c7(0x12b)},{'name':'stdin','type':a181_0x4044c7(0x11c),'required':![],'default':![],'description':a181_0x4044c7(0xc7)},{'name':'from-env','type':a181_0x4044c7(0x122),'required':![],'description':a181_0x4044c7(0x120)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a181_0x4044c7(0x108),'required':!![],'description':a181_0x4044c7(0xef)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a181_0x2aba(){const _0x1be220=['recipients','a\x20JSON\x20object','kind','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','notification_config_field_unknown','string','notification_config_json_invalid','Item\x20','\x20has\x20an\x20unsupported\x20channelType.','Unknown\x20notification\x20JSON\x20field\x20\x22','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','name','endpointUrl:null','trim','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','847rfeEUV','Notification\x20config\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','num','Allowed\x20values:\x20','10uzcIdC','mutation','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','create','channelConfigRaw','push','Notification\x20JSON\x20source\x20is\x20ambiguous.','update','utf8','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','readTimeout','\x22\x20must\x20be\x20','\x22configName\x22.','apiError','bccList','configName','DINGTALK','rabetbase\x20notification\x20config-list\x20--appcode\x20','some','messageTemplate','isSafeInteger','ccList','notification_config_field_forbidden','\x20has\x20an\x20invalid\x20id.','createTime','notification_config_source_unavailable','4659180TYpsFF','description','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','dry-run','keys','environment\x20variable\x20','\x20has\x20an\x20invalid\x20appCode.','2706312BXRdsR','isArray','failed','\x20is\x20missing\x20required\x20field\x20\x22','3136ytFFrg','1392bkHumP','notification_config_response_invalid','channelType','6767433fUjYpU','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Invalid\x20notification\x20config\x20response.','emailTargets','call','notification_config_confirmation_required','object','Notification\x20JSON\x20channelConfig\x20field\x20\x22','endpointUrlRaw','configCode','Notification\x20JSON\x20field\x20\x22','\x20has\x20invalid\x20field\x20\x22','\x20--format\x20compress','join','length','a\x20supported\x20string','stdin','channelConfig','file','notification_config_update_empty','type','channelCode','Missing\x20notification\x20JSON\x20source.','env','yes','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','WEBHOOK','Application-level\x20notification\x20config\x20ID','str','includes','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','hasOwnProperty','fromName','\x20characters.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Create\x20JSON\x20requires\x20field\x20','FEISHU','endpointUrl','validation','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','stringify','9078949OvLZkU','file\x20','<redacted>','\x20has\x20an\x20invalid\x20channelType.','every','connectTimeout','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','863NaQqFb','setEncoding','parse','replyTo','number','EMAIL','\x22\x20is\x20forbidden.','Notification\x20JSON\x20from\x20','appCode','Notification\x20config\x20list\x20item\x20','12kXbALi','\x22\x20cannot\x20exceed\x20','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20is\x20invalid.','path','has','\x20failed.','from-env','notification_config_field_invalid','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','1720140qgipwY','notification_config_id_invalid','notification_config_field_required','bool','boolean'];a181_0x2aba=function(){return _0x1be220;};return a181_0x2aba();}export function notificationError(_0x1b0f52,_0x315a77,_0x9ff90){return new CliError(_0x1b0f52,0x1,_0x315a77,_0x9ff90);}export function readNotificationId(_0x3799d1){const _0x510d88=a181_0x4044c7,_0x1d5f68=_0x3799d1[_0x510d88(0x12f)]('id');if(!Number['isSafeInteger'](_0x1d5f68)||_0x1d5f68<=0x0)throw notificationError(_0x510d88(0x119),_0x510d88(0x12e));return _0x1d5f68;}export function requireNotificationExplicitYes(_0xe982b){const _0x2cf703=a181_0x4044c7;if(_0xe982b['bool'](_0x2cf703(0xc8))||_0xe982b[_0x2cf703(0x11b)](_0x2cf703(0xec)))return;throw notificationError(_0x2cf703(0xd9),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x2cf703(0xfb));}export function readNotificationChannelType(_0x23ccf5,_0x1bb8fe=a181_0x4044c7(0xe8),_0x10525a=a181_0x4044c7(0x109)){const _0x5bf0a9=a181_0x4044c7,_0x1ae38c=_0x23ccf5['str'](_0x1bb8fe)[_0x5bf0a9(0x12a)]()||_0x10525a;if(!NOTIFICATION_CHANNEL_TYPES[_0x5bf0a9(0xf1)](_0x1ae38c))throw CliErrors['validation']('Invalid\x20--'+_0x1bb8fe+':\x20'+_0x1ae38c,_0x5bf0a9(0x130)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1ae38c;}export function assertSingleNotificationSource(_0xe07316){const _0x185780=a181_0x4044c7,_0x463deb=[],_0x312c1c=_0xe07316[_0x185780(0xf0)](_0x185780(0xe6))['trim']();if(_0x312c1c)_0x463deb[_0x185780(0x136)]({'kind':_0x185780(0xe6),'path':_0x312c1c});if(_0xe07316[_0x185780(0x11b)](_0x185780(0xe4)))_0x463deb['push']({'kind':'stdin'});const _0x2477c8=_0xe07316[_0x185780(0xf0)](_0x185780(0x115))[_0x185780(0x12a)]();if(_0x2477c8)_0x463deb['push']({'kind':_0x185780(0xeb),'name':_0x2477c8});if(_0x463deb[_0x185780(0xe2)]===0x0)throw CliErrors[_0x185780(0xfa)](_0x185780(0xea),_0x185780(0x103));if(_0x463deb[_0x185780(0xe2)]>0x1)throw CliErrors[_0x185780(0xfa)](_0x185780(0x137),_0x185780(0x103));return _0x463deb[0x0];}export async function readNotificationDocument(_0x2c44a9,_0x40a9e9){const _0x5d39c9=a181_0x4044c7,_0x36dbb8=assertSingleNotificationSource(_0x2c44a9),_0x3dcf5f=_0x36dbb8[_0x5d39c9(0x11f)]===_0x5d39c9(0xe6)?_0x5d39c9(0xfe)+_0x36dbb8[_0x5d39c9(0x112)]:_0x36dbb8[_0x5d39c9(0x11f)]===_0x5d39c9(0xeb)?_0x5d39c9(0xca)+_0x36dbb8[_0x5d39c9(0x128)]:'stdin';let _0x22384f;try{if(_0x36dbb8[_0x5d39c9(0x11f)]===_0x5d39c9(0xe6))_0x22384f=await readFile(_0x36dbb8['path'],_0x5d39c9(0x139));else{if(_0x36dbb8['kind']===_0x5d39c9(0xeb)){if(!(_0x36dbb8[_0x5d39c9(0x128)]in process.env))throw notificationError('notification_config_source_unavailable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x36dbb8['name']);_0x22384f=process.env[_0x36dbb8.name]??'';}else _0x22384f=await readStdin();}}catch(_0x42e7ca){if(_0x42e7ca instanceof CliError)throw _0x42e7ca;throw notificationError(_0x5d39c9(0xc4),_0x5d39c9(0xf2)+_0x3dcf5f+'.');}let _0x46f675;try{_0x46f675=JSON[_0x5d39c9(0x106)](_0x22384f);}catch{throw notificationError(_0x5d39c9(0x123),_0x5d39c9(0x10b)+_0x3dcf5f+_0x5d39c9(0x111),_0x5d39c9(0x133));}if(!isJsonObject(_0x46f675))throw notificationError(_0x5d39c9(0x123),_0x5d39c9(0x10b)+_0x3dcf5f+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x46f675,_0x40a9e9);}export function projectNotificationListConfig(_0x3b2532,_0x5bb93c){const _0x4fd3e7=a181_0x4044c7;return{'id':typeof _0x3b2532['id']===_0x4fd3e7(0x108)?_0x3b2532['id']:null,'configCode':requireResponseString(_0x3b2532['configCode'],_0x4fd3e7(0xdd),_0x5bb93c),'configName':requireResponseString(_0x3b2532[_0x4fd3e7(0x140)],_0x4fd3e7(0x140),_0x5bb93c),'channelType':requireResponseString(_0x3b2532[_0x4fd3e7(0xd3)],_0x4fd3e7(0xd3),_0x5bb93c),'description':normalizeNullableString(_0x3b2532['description']),'createTime':normalizeNullableString(_0x3b2532[_0x4fd3e7(0xc3)]),'updateTime':normalizeNullableString(_0x3b2532['updateTime'])};}export function normalizeExactNotificationConfig(_0x49f900,_0x2c2e58,_0x21fd65){const _0xd566bb=a181_0x4044c7;if(!Number[_0xd566bb(0x145)](_0x49f900['id'])||_0x49f900['id']!==_0x2c2e58)throw notificationError(_0xd566bb(0xd2),_0xd566bb(0xed)+_0x2c2e58+'.');if(_0x49f900[_0xd566bb(0x10c)]!==_0x21fd65)throw notificationError(_0xd566bb(0xd2),'Notification\x20config\x20'+_0x2c2e58+_0xd566bb(0x13a));const _0x468f7c=requireExactString(_0x49f900[_0xd566bb(0x140)],'configName',_0x2c2e58),_0x145ffd=requireExactString(_0x49f900['configCode'],_0xd566bb(0xdd),_0x2c2e58),_0x2e8dfe=requireExactString(_0x49f900[_0xd566bb(0xd3)],'channelType',_0x2c2e58);if(!NOTIFICATION_CHANNEL_TYPES[_0xd566bb(0xf1)](_0x2e8dfe))throw notificationError(_0xd566bb(0xd2),'Notification\x20config\x20'+_0x2c2e58+_0xd566bb(0x125));const _0x155370=responseNullableString(_0x49f900['endpointUrl'],_0xd566bb(0xf9),_0x2c2e58),_0x23e85b=responseNullableString(_0x49f900[_0xd566bb(0xe5)],_0xd566bb(0xe5),_0x2c2e58),_0x2dd804=responseNullableString(_0x49f900[_0xd566bb(0xc6)],'description',_0x2c2e58),_0x4f8d96=responseNullableTimeout(_0x49f900[_0xd566bb(0x102)],'connectTimeout',_0x2c2e58),_0x175aaa=responseNullableTimeout(_0x49f900[_0xd566bb(0x13b)],_0xd566bb(0x13b),_0x2c2e58);return{'id':_0x2c2e58,'appCode':_0x21fd65,'configCode':_0x145ffd,'configName':_0x468f7c,'channelType':_0x2e8dfe,'endpointUrl':redactSensitive(_0x155370),'channelConfig':redactSensitive(_0x23e85b),'description':_0x2dd804,'connectTimeout':_0x4f8d96,'readTimeout':_0x175aaa,'endpointUrlRaw':_0x155370,'channelConfigRaw':_0x23e85b};}export async function requireExactNotificationConfig(_0x376387,_0x1d445b,_0x2fb2b3){const _0x4df354=a181_0x4044c7;let _0x52305e;try{_0x52305e=await getNotificationChannelConfig(_0x1d445b,_0x376387);}catch{throw safeApiFailure(_0x2fb2b3,'preflight',_0x4df354(0x127)+_0x376387+_0x4df354(0x117));}return normalizeExactNotificationConfig(_0x52305e,_0x1d445b,_0x376387);}export function projectNotificationConfig(_0x4e895a){const _0x211c2f=a181_0x4044c7;return{'id':_0x4e895a['id']??null,'appCode':_0x4e895a[_0x211c2f(0x10c)],'configCode':_0x4e895a['configCode']??null,'configName':_0x4e895a[_0x211c2f(0x140)],'channelType':_0x4e895a[_0x211c2f(0xd3)],'endpointUrl':redactSensitive(_0x4e895a[_0x211c2f(0xf9)]),'channelConfig':redactSensitive(_0x4e895a[_0x211c2f(0xe5)]),'description':_0x4e895a[_0x211c2f(0xc6)]??null,'connectTimeout':_0x4e895a[_0x211c2f(0x102)]??null,'readTimeout':_0x4e895a['readTimeout']??null};}export function notificationSelector(_0x2c553c){const _0x270782=a181_0x4044c7;return{'appCode':_0x2c553c[_0x270782(0x10c)],'id':_0x2c553c['id'],'configCode':_0x2c553c['configCode'],'configName':_0x2c553c[_0x270782(0x140)],'channelType':_0x2c553c[_0x270782(0xd3)]};}export function createMutationInput(_0x5fd967,_0x43e572){const _0x33d2f0=a181_0x4044c7;return{'appCode':_0x5fd967,'configName':_0x43e572[_0x33d2f0(0x140)],'channelType':_0x43e572[_0x33d2f0(0xd3)],...hasOwn(_0x43e572,_0x33d2f0(0xf9))?{'endpointUrl':_0x43e572[_0x33d2f0(0xf9)]}:{},...hasOwn(_0x43e572,_0x33d2f0(0xe5))?{'channelConfig':serializeChannelConfig(_0x43e572[_0x33d2f0(0xe5)])}:{},...hasOwn(_0x43e572,_0x33d2f0(0xc6))?{'description':_0x43e572[_0x33d2f0(0xc6)]}:{},...hasOwn(_0x43e572,'connectTimeout')?{'connectTimeout':_0x43e572[_0x33d2f0(0x102)]}:{},...hasOwn(_0x43e572,'readTimeout')?{'readTimeout':_0x43e572[_0x33d2f0(0x13b)]}:{}};}export function mergeUpdateInput(_0x32ef4e,_0x3abc72){const _0x596347=a181_0x4044c7;return{'id':_0x32ef4e['id'],'appCode':_0x32ef4e[_0x596347(0x10c)],'configName':_0x3abc72[_0x596347(0x140)]??_0x32ef4e[_0x596347(0x140)],'channelType':_0x3abc72[_0x596347(0xd3)]??_0x32ef4e[_0x596347(0xd3)],'endpointUrl':hasOwn(_0x3abc72,'endpointUrl')?_0x3abc72['endpointUrl']:_0x32ef4e[_0x596347(0xdc)],'channelConfig':hasOwn(_0x3abc72,'channelConfig')?serializeChannelConfig(_0x3abc72[_0x596347(0xe5)]):_0x32ef4e[_0x596347(0x135)],'description':hasOwn(_0x3abc72,_0x596347(0xc6))?_0x3abc72[_0x596347(0xc6)]:_0x32ef4e[_0x596347(0xc6)],'connectTimeout':hasOwn(_0x3abc72,'connectTimeout')?_0x3abc72[_0x596347(0x102)]:_0x32ef4e['connectTimeout'],'readTimeout':hasOwn(_0x3abc72,_0x596347(0x13b))?_0x3abc72['readTimeout']:_0x32ef4e[_0x596347(0x13b)]};}export function plannedUpdateProjection(_0x29c72a,_0x518e17){const _0x40aff6=a181_0x4044c7;return projectNotificationConfig({'id':_0x29c72a['id'],'appCode':_0x29c72a[_0x40aff6(0x10c)],'configCode':_0x29c72a[_0x40aff6(0xdd)],'configName':_0x518e17[_0x40aff6(0x140)]??_0x29c72a['configName'],'channelType':_0x518e17[_0x40aff6(0xd3)]??_0x29c72a[_0x40aff6(0xd3)],'endpointUrl':hasOwn(_0x518e17,_0x40aff6(0xf9))?_0x518e17[_0x40aff6(0xf9)]:_0x29c72a[_0x40aff6(0xdc)],'channelConfig':hasOwn(_0x518e17,_0x40aff6(0xe5))?_0x518e17[_0x40aff6(0xe5)]:_0x29c72a[_0x40aff6(0x135)],'description':hasOwn(_0x518e17,'description')?_0x518e17[_0x40aff6(0xc6)]:_0x29c72a[_0x40aff6(0xc6)],'connectTimeout':hasOwn(_0x518e17,_0x40aff6(0x102))?_0x518e17['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x29c72a[_0x40aff6(0x102)],'readTimeout':hasOwn(_0x518e17,_0x40aff6(0x13b))?_0x518e17['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x29c72a[_0x40aff6(0x13b)]});}export function requestedSafeFieldsMatch(_0x462c3e,_0xbe9f9f,_0x4641a7){const _0x11995f=a181_0x4044c7,_0x590612=[],_0x543374=[],_0x4790fa=[];for(const _0x59ace0 of[_0x11995f(0x140),'channelType',_0x11995f(0xc6)]){if(!hasOwn(_0x4641a7,_0x59ace0))continue;_0x4790fa[_0x11995f(0x136)](_0x59ace0),_0x590612['push'](_0xbe9f9f[_0x59ace0]===_0x4641a7[_0x59ace0]),_0x543374[_0x11995f(0x136)](_0x462c3e[_0x59ace0]!==_0x4641a7[_0x59ace0]&&_0xbe9f9f[_0x59ace0]===_0x4641a7[_0x59ace0]);}for(const _0x2c0eac of[_0x11995f(0x102),'readTimeout']){if(!hasOwn(_0x4641a7,_0x2c0eac))continue;const _0x1778c2=_0x4641a7[_0x2c0eac]??(_0x2c0eac===_0x11995f(0x102)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x4790fa['push'](_0x2c0eac),_0x590612[_0x11995f(0x136)](_0xbe9f9f[_0x2c0eac]===_0x1778c2),_0x543374['push'](_0x462c3e[_0x2c0eac]!==_0x1778c2&&_0xbe9f9f[_0x2c0eac]===_0x1778c2);}return hasOwn(_0x4641a7,_0x11995f(0xf9))&&_0x4641a7[_0x11995f(0xf9)]===null&&(_0x4790fa[_0x11995f(0x136)](_0x11995f(0x129)),_0x590612['push'](_0xbe9f9f[_0x11995f(0xdc)]===null||_0xbe9f9f[_0x11995f(0xdc)]===''),_0x543374[_0x11995f(0x136)](_0x462c3e[_0x11995f(0xdc)]!==null&&_0x462c3e[_0x11995f(0xdc)]!==''&&(_0xbe9f9f['endpointUrlRaw']===null||_0xbe9f9f[_0x11995f(0xdc)]===''))),{'allMatch':_0x590612[_0x11995f(0x101)](Boolean),'provesChange':_0x543374[_0x11995f(0x143)](Boolean),'verifiedFields':_0x4790fa};}export function validateNotificationDeleteReadback(_0xad3314,_0x18bc4f,_0x177960){const _0x1121cb=a181_0x4044c7;for(const [_0x544ea8,_0x3e3d03]of _0xad3314['entries']()){if(!Number[_0x1121cb(0x145)](_0x3e3d03['id'])||_0x3e3d03['id']<=0x0)throw notificationError(_0x1121cb(0xd2),_0x1121cb(0x10d)+(_0x544ea8+0x1)+_0x1121cb(0xc2));if(_0x3e3d03[_0x1121cb(0x10c)]!==_0x18bc4f)throw notificationError(_0x1121cb(0xd2),'Notification\x20config\x20list\x20item\x20'+(_0x544ea8+0x1)+_0x1121cb(0xcb));if(_0x3e3d03['channelType']!==_0x177960)throw notificationError(_0x1121cb(0xd2),'Notification\x20config\x20list\x20item\x20'+(_0x544ea8+0x1)+_0x1121cb(0x100));}}export function safeApiFailure(_0xdc3255,_0x2b9f2a,_0x179f70){const _0x4bf033=a181_0x4044c7;return notificationError('notification_config_'+_0xdc3255+'_'+(_0x2b9f2a===_0x4bf033(0x132)?_0x4bf033(0xce):_0x2b9f2a+'_unavailable'),'Notification\x20config\x20'+_0xdc3255+'\x20'+_0x2b9f2a+_0x4bf033(0x114),_0x179f70);}export function notificationLookupCommand(_0x5bacbc,_0x498f90){const _0x561b92=a181_0x4044c7;return _0x561b92(0x142)+_0x5bacbc+'\x20--type\x20'+_0x498f90+_0x561b92(0xe0);}function validateNotificationDocument(_0x12bfec,_0x48bf22){const _0x56aba6=a181_0x4044c7;for(const _0x5cf002 of Object['keys'](_0x12bfec)){if(FORBIDDEN_IDENTITY_FIELDS[_0x56aba6(0x113)](_0x5cf002))throw notificationError(_0x56aba6(0x147),_0x56aba6(0xde)+_0x5cf002+_0x56aba6(0xf6));if(!ALLOWED_INPUT_FIELDS[_0x56aba6(0x113)](_0x5cf002))throw notificationError(_0x56aba6(0x121),_0x56aba6(0x126)+_0x5cf002+'\x22.');}if(_0x48bf22===_0x56aba6(0x138)&&Object[_0x56aba6(0xc9)](_0x12bfec)[_0x56aba6(0xe2)]===0x0)throw notificationError(_0x56aba6(0xe7),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x547d59={};if(hasOwn(_0x12bfec,_0x56aba6(0x140)))_0x547d59[_0x56aba6(0x140)]=validateRequiredString(_0x12bfec[_0x56aba6(0x140)],_0x56aba6(0x140),0x80);else{if(_0x48bf22===_0x56aba6(0x134))throw notificationError(_0x56aba6(0x11a),_0x56aba6(0xf7)+_0x56aba6(0x13d));}if(hasOwn(_0x12bfec,_0x56aba6(0xd3))){if(typeof _0x12bfec[_0x56aba6(0xd3)]!==_0x56aba6(0x122))throw invalidFieldType(_0x56aba6(0xd3),_0x56aba6(0xe3));const _0x2a5f87=_0x12bfec['channelType']['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x56aba6(0xf1)](_0x2a5f87))throw notificationError(_0x56aba6(0x116),_0x56aba6(0x110),_0x56aba6(0x130)+NOTIFICATION_CHANNEL_TYPES[_0x56aba6(0xe1)](',\x20')+'.');_0x547d59['channelType']=_0x2a5f87;}else{if(_0x48bf22===_0x56aba6(0x134))throw notificationError('notification_config_field_required',_0x56aba6(0xf7)+'\x22channelType\x22.');}for(const [_0xcdd2,_0x454cba]of[[_0x56aba6(0xf9),0x200],[_0x56aba6(0xc6),0x100]]){if(!hasOwn(_0x12bfec,_0xcdd2))continue;const _0x4a23c0=_0x12bfec[_0xcdd2];if(_0x4a23c0!==null&&typeof _0x4a23c0!==_0x56aba6(0x122))throw invalidFieldType(_0xcdd2,'a\x20string\x20or\x20null');if(typeof _0x4a23c0===_0x56aba6(0x122)&&_0x4a23c0[_0x56aba6(0xe2)]>_0x454cba)throw notificationError(_0x56aba6(0x116),_0x56aba6(0xde)+_0xcdd2+_0x56aba6(0x10f)+_0x454cba+_0x56aba6(0xf5));_0x547d59[_0xcdd2]=_0x4a23c0;}if(hasOwn(_0x12bfec,'channelConfig')){const _0x12dd19=_0x12bfec[_0x56aba6(0xe5)];if(_0x12dd19===null&&_0x48bf22===_0x56aba6(0x134))throw invalidFieldType(_0x56aba6(0xe5),_0x56aba6(0x11e));if(_0x12dd19!==null&&!isJsonObject(_0x12dd19))throw invalidFieldType(_0x56aba6(0xe5),_0x48bf22===_0x56aba6(0x138)?'a\x20JSON\x20object\x20or\x20null':_0x56aba6(0x11e));_0x12dd19!==null&&validateChannelConfigFields(_0x547d59[_0x56aba6(0xd3)],_0x12dd19),_0x547d59[_0x56aba6(0xe5)]=_0x12dd19;}for(const _0x3c4e35 of[_0x56aba6(0x102),_0x56aba6(0x13b)]){if(!hasOwn(_0x12bfec,_0x3c4e35))continue;const _0x2f3256=_0x12bfec[_0x3c4e35];if(_0x2f3256!==null&&(!Number[_0x56aba6(0x145)](_0x2f3256)||_0x2f3256<0x0))throw notificationError(_0x56aba6(0x116),_0x56aba6(0xde)+_0x3c4e35+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x547d59[_0x3c4e35]=_0x2f3256;}return _0x547d59;}function validateRequiredString(_0xcb083f,_0x50db92,_0x51c155){const _0x267e0a=a181_0x4044c7;if(typeof _0xcb083f!=='string')throw invalidFieldType(_0x50db92,'a\x20non-empty\x20string');const _0x48e8a4=_0xcb083f[_0x267e0a(0x12a)]();if(!_0x48e8a4)throw notificationError(_0x267e0a(0x116),'Notification\x20JSON\x20field\x20\x22'+_0x50db92+_0x267e0a(0xd5));if(_0x48e8a4[_0x267e0a(0xe2)]>_0x51c155)throw notificationError(_0x267e0a(0x116),'Notification\x20JSON\x20field\x20\x22'+_0x50db92+_0x267e0a(0x10f)+_0x51c155+'\x20characters.');return _0x48e8a4;}function validateChannelConfigFields(_0x4b8097,_0xb84a57){const _0x47ae5b=a181_0x4044c7;if(hasOwn(_0xb84a57,_0x47ae5b(0x144)))throw forbiddenChannelConfigField(_0x47ae5b(0x144));if(_0x4b8097===_0x47ae5b(0x109))for(const _0x286bea of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0xb84a57,_0x286bea))throw forbiddenChannelConfigField(_0x286bea);}}function forbiddenChannelConfigField(_0x2f35a5){const _0x3f6bc8=a181_0x4044c7;return notificationError('notification_config_channel_field_forbidden',_0x3f6bc8(0xdb)+_0x2f35a5+_0x3f6bc8(0x10a));}function invalidFieldType(_0x10e060,_0x206182){const _0x3b8f35=a181_0x4044c7;return notificationError(_0x3b8f35(0x116),_0x3b8f35(0xde)+_0x10e060+_0x3b8f35(0x13c)+_0x206182+'.');}function a181_0x123b(_0x2f072c,_0x258f02){_0x2f072c=_0x2f072c-0xc2;const _0x2abae9=a181_0x2aba();let _0x123b24=_0x2abae9[_0x2f072c];return _0x123b24;}function serializeChannelConfig(_0x180c30){const _0x179087=a181_0x4044c7;return _0x180c30===null||_0x180c30===undefined?null:JSON[_0x179087(0xfc)](_0x180c30);}function redactSensitive(_0x34615c){const _0x362829=a181_0x4044c7;return _0x34615c===null||_0x34615c===undefined||_0x34615c===''?null:_0x362829(0xff);}function requireResponseString(_0x42fb8f,_0x1223a9,_0x308693){const _0x3e28b7=a181_0x4044c7;if(typeof _0x42fb8f!==_0x3e28b7(0x122)||_0x42fb8f['trim']()==='')throw CliErrors[_0x3e28b7(0x13e)](_0x3e28b7(0xd6),_0x3e28b7(0x124)+(_0x308693+0x1)+_0x3e28b7(0xcf)+_0x1223a9+'\x22.');return _0x42fb8f[_0x3e28b7(0x12a)]();}function requireExactString(_0x4f1ecc,_0x5dc563,_0x3a0e87){const _0x254454=a181_0x4044c7;if(typeof _0x4f1ecc!==_0x254454(0x122)||_0x4f1ecc['trim']()==='')throw notificationError(_0x254454(0xd2),_0x254454(0x12d)+_0x3a0e87+_0x254454(0xcf)+_0x5dc563+'\x22.');return _0x4f1ecc[_0x254454(0x12a)]();}function responseNullableString(_0x4bdc21,_0x530ca8,_0x4ada4a){const _0x4be9c1=a181_0x4044c7;if(_0x4bdc21===undefined||_0x4bdc21===null)return null;if(typeof _0x4bdc21!==_0x4be9c1(0x122))throw notificationError(_0x4be9c1(0xd2),'Notification\x20config\x20'+_0x4ada4a+_0x4be9c1(0xdf)+_0x530ca8+'\x22.');return _0x4bdc21;}function responseNullableTimeout(_0x3fd9cf,_0x1f133e,_0x48bca4){const _0x357992=a181_0x4044c7;if(_0x3fd9cf===undefined||_0x3fd9cf===null)return null;if(!Number['isSafeInteger'](_0x3fd9cf)||_0x3fd9cf<0x0)throw notificationError(_0x357992(0xd2),_0x357992(0x12d)+_0x48bca4+'\x20has\x20invalid\x20field\x20\x22'+_0x1f133e+'\x22.');return _0x3fd9cf;}function normalizeNullableString(_0x4047f8){return typeof _0x4047f8==='string'?_0x4047f8:null;}function isJsonObject(_0x383fdd){const _0x58ee68=a181_0x4044c7;return _0x383fdd!==null&&typeof _0x383fdd===_0x58ee68(0xda)&&!Array[_0x58ee68(0xcd)](_0x383fdd);}function hasOwn(_0x4b150e,_0x55c561){const _0x30c1bd=a181_0x4044c7;return Object['prototype'][_0x30c1bd(0xf3)][_0x30c1bd(0xd8)](_0x4b150e,_0x55c561);}async function readStdin(){const _0x5b6404=a181_0x4044c7;let _0x970634='';process['stdin'][_0x5b6404(0x105)](_0x5b6404(0x139));for await(const _0x5c068b of process[_0x5b6404(0xe4)])_0x970634+=_0x5c068b;return _0x970634;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x1da133=a182_0x27b4;(function(_0x36622a,_0x46ac42){const _0x5a3663=a182_0x27b4,_0x3196a6=_0x36622a();while(!![]){try{const _0x1cb66f=-parseInt(_0x5a3663(0xbd))/0x1+parseInt(_0x5a3663(0xcb))/0x2*(-parseInt(_0x5a3663(0xc3))/0x3)+-parseInt(_0x5a3663(0xd3))/0x4*(parseInt(_0x5a3663(0xb4))/0x5)+parseInt(_0x5a3663(0xbf))/0x6*(-parseInt(_0x5a3663(0xd9))/0x7)+parseInt(_0x5a3663(0xdb))/0x8*(parseInt(_0x5a3663(0xd7))/0x9)+-parseInt(_0x5a3663(0xdc))/0xa*(parseInt(_0x5a3663(0xae))/0xb)+-parseInt(_0x5a3663(0xb3))/0xc*(-parseInt(_0x5a3663(0xe7))/0xd);if(_0x1cb66f===_0x46ac42)break;else _0x3196a6['push'](_0x3196a6['shift']());}catch(_0x463406){_0x3196a6['push'](_0x3196a6['shift']());}}}(a182_0x4ebf,0x79e33));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a182_0x4ebf(){const _0x467ea7=['str','validation','string','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','filePath','imageUrl','scene','351nwPvvY','1089lkLXgp','\x20OCR','/smartapi/common/uploadFile','idcard','GET','1498140kFyYJe','1765XKpZOm','/smartapi/ocr/recognize-text?','IdCard','form','filter','Table','POST','path','.\x20Supported\x20scenes:\x20','74044tyCQzj','length','2952CRsSZh','/smartapi/common/queryFileUrl','General','ocr','14346PoWqpe','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','invoice','idCard','File\x20URL\x20response\x20missing\x20fileUrl.','join','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','general','330jQCELo','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','File\x20upload\x20response\x20missing\x20filePath.','apiError','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','\x20OCR\x20from\x20URL','Unsupported\x20OCR\x20scene:\x20','count','8724iPgObN','trim','recognize','image-file','7227ikGGNK','appCode','9863XJeTXj','Preview:\x20recognize\x20','520YrHgit','60360CHPcvV','image-url','fileUrl','read'];a182_0x4ebf=function(){return _0x467ea7;};return a182_0x4ebf();}const SUPPORTED_SCENES=['invoice',a182_0x1da133(0xca),a182_0x1da133(0xb7),a182_0x1da133(0xc6)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a182_0x1da133(0xc1),'form':a182_0x1da133(0xb9),'idCard':a182_0x1da133(0xb6)},SCENE_FLAG={'name':a182_0x1da133(0xe6),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a182_0x1da133(0xc9)},IMAGE_FILE_FLAG={'name':a182_0x1da133(0xd6),'type':a182_0x1da133(0xe2),'description':a182_0x1da133(0xc4)},IMAGE_URL_FLAG={'name':a182_0x1da133(0xdd),'type':a182_0x1da133(0xe2),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function a182_0x27b4(_0x3a89a2,_0x1bdb57){_0x3a89a2=_0x3a89a2-0xae;const _0x4ebf95=a182_0x4ebf();let _0x27b472=_0x4ebf95[_0x3a89a2];return _0x27b472;}function normalizeScene(_0x338ae7){const _0x1264a3=a182_0x1da133,_0x22f208=_0x338ae7[_0x1264a3(0xd4)]()['toLowerCase']();if(_0x22f208===_0x1264a3(0xb1))return _0x1264a3(0xc6);if(_0x22f208===_0x1264a3(0xc5)||_0x22f208===_0x1264a3(0xca)||_0x22f208===_0x1264a3(0xb7))return _0x22f208;throw CliErrors['validation'](_0x1264a3(0xd1)+_0x338ae7+_0x1264a3(0xbc)+SUPPORTED_SCENES[_0x1264a3(0xc8)](',\x20'));}function selectedInputs(_0x2ffae0){const _0x2c7096=a182_0x1da133,_0x26d26e=_0x2ffae0[_0x2c7096(0xe0)](_0x2c7096(0xd6))['trim'](),_0xc73d9=_0x2ffae0[_0x2c7096(0xe0)](_0x2c7096(0xdd))[_0x2c7096(0xd4)]();return{'imageFile':_0x26d26e,'imageUrl':_0xc73d9,'count':[_0x26d26e,_0xc73d9][_0x2c7096(0xb8)](Boolean)[_0x2c7096(0xbe)]};}function validateInputSelection(_0x12ceeb){const _0x44e3cb=a182_0x1da133,_0x8e275f=selectedInputs(_0x12ceeb);if(_0x8e275f[_0x44e3cb(0xd2)]!==0x1)throw CliErrors[_0x44e3cb(0xe1)](_0x44e3cb(0xcc));return _0x8e275f;}function withScene(_0x46f6dd,_0x452529,_0x53c874){const _0x25ab91=a182_0x1da133;return{..._0x46f6dd,'scene':_0x452529,..._0x53c874?{'sourceFile':{'fileName':_0x53c874['fileName'],'filePath':_0x53c874[_0x25ab91(0xe4)]}}:{}};}const ocrRecognize={'service':a182_0x1da133(0xc2),'command':a182_0x1da133(0xd5),'description':a182_0x1da133(0xe3),'risk':a182_0x1da133(0xdf),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x14354f){const _0x10c933=a182_0x1da133,_0x3adc9c=normalizeScene(_0x14354f[_0x10c933(0xe0)]('scene')),_0x36c710=SCENE_TO_LEGACY_TYPE[_0x3adc9c],_0x494eb8=validateInputSelection(_0x14354f);if(_0x494eb8[_0x10c933(0xe5)]){const _0x53e0b1=new URLSearchParams({'url':_0x494eb8[_0x10c933(0xe5)],'type':_0x36c710,'appCode':_0x14354f['appCode']});return{'method':_0x10c933(0xb2),'url':_0x10c933(0xb5)+_0x53e0b1['toString'](),'description':_0x10c933(0xda)+_0x3adc9c+_0x10c933(0xd0)};}const _0x32a0b5=requireDevelopmentUploadFile(_0x494eb8['imageFile'],_0x10c933(0xd6));return{'method':_0x10c933(0xba),'url':_0x10c933(0xb0),'body':{'steps':[{'method':'POST','url':_0x10c933(0xb0),'body':{'appCode':_0x14354f['appCode'],'multipart':{'file':_0x32a0b5}}},{'method':'POST','url':_0x10c933(0xc0),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x10c933(0xb2),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x14354f[_0x10c933(0xd8)],'url':_0x10c933(0xcf),'type':_0x36c710}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x3adc9c+_0x10c933(0xaf)};},async 'execute'(_0x1d439b){const _0x3b143a=a182_0x1da133,_0x12f1a6=normalizeScene(_0x1d439b[_0x3b143a(0xe0)](_0x3b143a(0xe6))),_0x228c8a=SCENE_TO_LEGACY_TYPE[_0x12f1a6],_0x22529b=validateInputSelection(_0x1d439b);if(_0x22529b[_0x3b143a(0xe5)]){const _0x1e6476=await recognizeDevelopmentOcr(_0x1d439b['appCode'],{'url':_0x22529b[_0x3b143a(0xe5)],'type':_0x228c8a});return{'ok':!![],'data':withScene(_0x1e6476,_0x12f1a6)};}const _0x22d83a=requireDevelopmentUploadFile(_0x22529b['imageFile'],'image-file'),_0x1257ad=await uploadDevelopmentFile(_0x1d439b['appCode'],_0x22d83a[_0x3b143a(0xbb)]);if(!_0x1257ad[_0x3b143a(0xe4)])throw CliErrors[_0x3b143a(0xce)](_0x3b143a(0xcd));const _0x2869c4=await queryDevelopmentFileUrl(_0x1257ad[_0x3b143a(0xe4)],{'download':![]});if(!_0x2869c4[_0x3b143a(0xde)])throw CliErrors['apiError'](_0x3b143a(0xc7));const _0x35ab86=await recognizeDevelopmentOcr(_0x1d439b[_0x3b143a(0xd8)],{'url':_0x2869c4[_0x3b143a(0xde)],'type':_0x228c8a});return{'ok':!![],'data':withScene(_0x35ab86,_0x12f1a6,_0x1257ad)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a183_0x2b4cd9=a183_0x3d2e;(function(_0x36cb23,_0x2939ef){const _0x45e966=a183_0x3d2e,_0x35f503=_0x36cb23();while(!![]){try{const _0x4347f3=-parseInt(_0x45e966(0x197))/0x1+-parseInt(_0x45e966(0x177))/0x2*(-parseInt(_0x45e966(0x160))/0x3)+-parseInt(_0x45e966(0x16b))/0x4*(-parseInt(_0x45e966(0x196))/0x5)+parseInt(_0x45e966(0x1a0))/0x6+-parseInt(_0x45e966(0x182))/0x7*(parseInt(_0x45e966(0x15d))/0x8)+-parseInt(_0x45e966(0x188))/0x9*(-parseInt(_0x45e966(0x169))/0xa)+-parseInt(_0x45e966(0x198))/0xb*(parseInt(_0x45e966(0x181))/0xc);if(_0x4347f3===_0x2939ef)break;else _0x35f503['push'](_0x35f503['shift']());}catch(_0x11b3a5){_0x35f503['push'](_0x35f503['shift']());}}}(a183_0x36c8,0x58eb7));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';function a183_0x3d2e(_0x48e1f3,_0x113e61){_0x48e1f3=_0x48e1f3-0x15c;const _0x36c850=a183_0x36c8();let _0x3d2ebc=_0x36c850[_0x48e1f3];return _0x3d2ebc;}import{readCustomPageDirectory}from'../../core/page/file-system.js';function a183_0x36c8(){const _0x2701f6=['page.create','parse','\x20and\x20its\x20menu\x20entry.','string','compress','Custom_page_','.json','350772SCGgZX','7QCKWPd','keys','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','num','trim','validation','77166WRkKbN','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','page-pattern','CUSTOM','name','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','Custom\x20Page\x20pattern\x20not\x20found:\x20','toLowerCase','length','isArray','BLANK','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','includes','now','35mbqhxA','144789xLbyFm','242UaDzcp','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','str','isInteger','write','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','page\x20create\x20does\x20not\x20accept\x20--page-type.','Would\x20create\x20Custom\x20Page\x20','1986954mZvwFh','createMenu','menuId','Created\x20Custom\x20Page\x20','3790664HfccNs','/smartapi/webcode/page/create','values','11112zGpkuY','number','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','stringify','page-type','pageId','page-dir','menuPath','790njYFkM','pageName','86120ZMQkah','../../../templates/custom-pages','DASHBOARD','parentMenuId','ONEPAGE','appCode','files','some','POST','utf8','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','Invalid\x20Custom\x20Page\x20pattern:\x20','252PyqoUL','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','page'];a183_0x36c8=function(){return _0x2701f6;};return a183_0x36c8();}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_0x2b4cd9(0x192),a183_0x2b4cd9(0x16f),a183_0x2b4cd9(0x16d)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a183_0x2b4cd9(0x16c));export const pageCreate={'service':a183_0x2b4cd9(0x179),'command':'create','description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':a183_0x2b4cd9(0x19c),'defaultOutputFormat':a183_0x2b4cd9(0x17e),'structuredErrors':!![],'rejectedFlags':[{'name':a183_0x2b4cd9(0x165),'message':a183_0x2b4cd9(0x19e),'hint':a183_0x2b4cd9(0x162)},{'name':'page-content','message':a183_0x2b4cd9(0x19d),'hint':a183_0x2b4cd9(0x175)}],'flags':[{'name':a183_0x2b4cd9(0x18c),'type':a183_0x2b4cd9(0x17d),'description':a183_0x2b4cd9(0x193)},{'name':'parent-menu-id','type':a183_0x2b4cd9(0x161),'description':a183_0x2b4cd9(0x178)},{'name':a183_0x2b4cd9(0x18a),'type':a183_0x2b4cd9(0x17d),'description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x2b4cd9(0x167),'type':a183_0x2b4cd9(0x17d),'description':a183_0x2b4cd9(0x163)},APPCODE_FLAG],async 'validate'(_0x3aeeb1){await readValidatedPageSource(_0x3aeeb1);},async 'dryRun'(_0x52aa7b){const _0x19ecf6=a183_0x2b4cd9,_0x500b85=readInput(_0x52aa7b,await readValidatedPageSource(_0x52aa7b));return{'method':_0x19ecf6(0x173),'url':_0x19ecf6(0x15e),'body':{'appCode':_0x500b85[_0x19ecf6(0x170)],'pageName':_0x500b85[_0x19ecf6(0x16a)],..._0x500b85[_0x19ecf6(0x16e)]!=null?{'parentMenuId':_0x500b85[_0x19ecf6(0x16e)]}:{},'createMenu':_0x500b85[_0x19ecf6(0x1a1)],'codeContent':_0x500b85[_0x19ecf6(0x171)]},'description':_0x19ecf6(0x19f)+JSON[_0x19ecf6(0x164)](_0x500b85[_0x19ecf6(0x16a)])+_0x19ecf6(0x17c)};},async 'execute'(_0x4620bf){const _0x18ffde=a183_0x2b4cd9,_0x3ab9d5=readInput(_0x4620bf,await readValidatedPageSource(_0x4620bf)),_0x1b7f48=await createCustomPage(_0x3ab9d5);if(!Number[_0x18ffde(0x19b)](_0x1b7f48[_0x18ffde(0x166)])||_0x1b7f48[_0x18ffde(0x166)]<=0x0)throw CliErrors['apiError']('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x2e1170=buildCustomPageDevelopmentUrl(_0x3ab9d5[_0x18ffde(0x170)],_0x1b7f48[_0x18ffde(0x168)]),_0x5a6cf1=buildCustomPageEditUrl(_0x3ab9d5[_0x18ffde(0x170)],_0x1b7f48[_0x18ffde(0x166)]);return{'ok':!![],'data':{'operation':_0x18ffde(0x17a),'pageType':_0x18ffde(0x18b),'pagePattern':readPagePattern(_0x4620bf),'selector':{'appCode':_0x3ab9d5[_0x18ffde(0x170)],'pageName':_0x3ab9d5['pageName']},'before':null,'after':{'pageId':_0x1b7f48[_0x18ffde(0x166)],'pageName':_0x1b7f48[_0x18ffde(0x16a)],'appCode':_0x1b7f48[_0x18ffde(0x170)],'version':_0x1b7f48['version'],'menuId':_0x1b7f48[_0x18ffde(0x1a2)],'menuPath':_0x1b7f48['menuPath'],'files':_0x1b7f48[_0x18ffde(0x171)]??Object[_0x18ffde(0x183)](_0x3ab9d5[_0x18ffde(0x171)])},'dryRun':![],'request':_0x3ab9d5,..._0x2e1170?{'pageUrl':_0x2e1170}:{},..._0x5a6cf1?{'editPageUrl':_0x5a6cf1}:{},'warnings':_0x2e1170?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x18ffde(0x15c)+_0x1b7f48['pageId']+'.'};}};function readPagePattern(_0xb9b12b){const _0x1d60e2=a183_0x2b4cd9,_0x594c17=_0xb9b12b[_0x1d60e2(0x19a)](_0x1d60e2(0x18a))[_0x1d60e2(0x186)](),_0x79320f=_0xb9b12b[_0x1d60e2(0x19a)]('page-dir')[_0x1d60e2(0x186)]();if(_0x594c17&&_0x79320f)throw CliErrors[_0x1d60e2(0x187)](_0x1d60e2(0x189));if(_0x79320f)return null;if(!_0x594c17)throw CliErrors[_0x1d60e2(0x187)](_0x1d60e2(0x199));if(!CUSTOM_PAGE_PATTERNS[_0x1d60e2(0x194)](_0x594c17))throw CliErrors[_0x1d60e2(0x187)]('--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.');return _0x594c17;}async function readPageSource(_0x3c2ac7){const _0x2236d0=a183_0x2b4cd9,_0x524eae=_0x3c2ac7[_0x2236d0(0x19a)](_0x2236d0(0x167))[_0x2236d0(0x186)](),_0x465ed3=readPagePattern(_0x3c2ac7);if(_0x465ed3===null){const _0x159720=await readCustomPageDirectory(_0x524eae);if(Object[_0x2236d0(0x183)](_0x159720)[_0x2236d0(0x190)]===0x0)throw CliErrors[_0x2236d0(0x187)](_0x2236d0(0x184));return _0x159720;}let _0x1c2211;try{_0x1c2211=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x465ed3[_0x2236d0(0x18f)]()+_0x2236d0(0x180)),_0x2236d0(0x174));}catch{throw CliErrors['validation'](_0x2236d0(0x18e)+_0x465ed3+'.');}let _0x50c570;try{_0x50c570=JSON[_0x2236d0(0x17b)](_0x1c2211);}catch{throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x465ed3+'.');}if(!_0x50c570||typeof _0x50c570!=='object'||Array[_0x2236d0(0x191)](_0x50c570)||Object[_0x2236d0(0x15f)](_0x50c570)[_0x2236d0(0x172)](_0x383ea3=>typeof _0x383ea3!==_0x2236d0(0x17d)))throw CliErrors[_0x2236d0(0x187)](_0x2236d0(0x176)+_0x465ed3+'.');return _0x50c570;}async function readValidatedPageSource(_0x42640a){const _0x15885c=await readPageSource(_0x42640a);return await validateCustomPageContent(_0x15885c),_0x15885c;}function readInput(_0x363858,_0x4225a6){const _0x46765b=a183_0x2b4cd9,_0x10dc74=_0x363858['str']('name')['trim']()||_0x46765b(0x17f)+Date[_0x46765b(0x195)]();if(_0x10dc74[_0x46765b(0x190)]>0x64)throw CliErrors[_0x46765b(0x187)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x4945e6=_0x363858[_0x46765b(0x185)]('parent-menu-id',NaN),_0x296dab=!Number['isNaN'](_0x4945e6);if(_0x296dab&&(!Number[_0x46765b(0x19b)](_0x4945e6)||_0x4945e6<=0x0))throw CliErrors[_0x46765b(0x187)](_0x46765b(0x18d));return{'appCode':_0x363858[_0x46765b(0x170)],'pageName':_0x10dc74,..._0x296dab?{'parentMenuId':_0x4945e6}:{},'createMenu':!![],'files':_0x4225a6};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a184_0x5da1(_0x1c524d,_0x1fcd03){_0x1c524d=_0x1c524d-0x199;const _0x5e91c9=a184_0x5e91();let _0x5da1d3=_0x5e91c9[_0x1c524d];return _0x5da1d3;}const a184_0xe448b1=a184_0x5da1;function a184_0x5e91(){const _0xdeea96=['2391168BCxaiA','Retrieved\x20Custom\x20Page\x20','getMinutes','63090NzLmNB','appcode','7FFYqSX','1513864CbbKgE','read','getHours','appCode','721076HOENhP','getMonth','5285958unmcIT','cookie','getFullYear','pageCode','443936cGuHGL','getTime','page','trim','padStart','compress','5096585gKYCsE','2VnDwSg','join','Custom\x20Page\x20ID'];a184_0x5e91=function(){return _0xdeea96;};return a184_0x5e91();}(function(_0x1347b8,_0x322c30){const _0x4f69f0=a184_0x5da1,_0x377920=_0x1347b8();while(!![]){try{const _0x3bffdb=-parseInt(_0x4f69f0(0x1af))/0x1*(parseInt(_0x4f69f0(0x1a2))/0x2)+-parseInt(_0x4f69f0(0x1a5))/0x3+parseInt(_0x4f69f0(0x1ab))/0x4+parseInt(_0x4f69f0(0x1a1))/0x5+-parseInt(_0x4f69f0(0x1b1))/0x6*(-parseInt(_0x4f69f0(0x1aa))/0x7)+-parseInt(_0x4f69f0(0x19b))/0x8+parseInt(_0x4f69f0(0x1a8))/0x9;if(_0x3bffdb===_0x322c30)break;else _0x377920['push'](_0x377920['shift']());}catch(_0xe9dd33){_0x377920['push'](_0x377920['shift']());}}}(a184_0x5e91,0xadde2));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a184_0xe448b1(0x19d),'command':'custom-detail','description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a184_0xe448b1(0x1ac),'defaultOutputFormat':a184_0xe448b1(0x1a0),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a184_0xe448b1(0x1a4)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x58bc71){readCustomPageId(_0x58bc71);},async 'execute'(_0x195f57){const _0x72db71=a184_0xe448b1,_0x55f0b1=readCustomPageId(_0x195f57),_0x5a699f=await getCustomPageSource(_0x55f0b1),{bundle:_0x49d9cc,createTime:_0x152fc6,updateTime:_0x483c23,..._0x52caa6}=_0x5a699f,_0xefd2b9=_0x5a699f['id']??_0x55f0b1,_0x113f02=_0x5a699f[_0x72db71(0x1ae)]?.[_0x72db71(0x19e)]()||_0x195f57['str'](_0x72db71(0x1a9))[_0x72db71(0x19e)](),_0x278566=buildCustomPageRuntimeUrl(_0x113f02,_0x5a699f[_0x72db71(0x19a)]),_0x5e8f7b=buildCustomPageEditUrl(_0x113f02,_0xefd2b9),_0x2de902=await resolveCustomPageDevelopmentUrl(_0x113f02,_0xefd2b9,_0x195f57[_0x72db71(0x1b2)]);return{'ok':!![],'data':{..._0x52caa6,..._0x278566?{'runtimePageUrl':_0x278566}:{},..._0x2de902?{'pageUrl':_0x2de902}:{},..._0x5e8f7b?{'editPageUrl':_0x5e8f7b}:{},..._0x152fc6==null?{}:{'createTime':formatTime(_0x152fc6)},..._0x483c23==null?{}:{'updateTime':formatTime(_0x483c23)}},'message':_0x72db71(0x1a6)+_0x55f0b1+'.'};}};function formatTime(_0x52f3e7){const _0xa13798=a184_0xe448b1,_0x27cf5c=new Date(_0x52f3e7);if(Number['isNaN'](_0x27cf5c[_0xa13798(0x19c)]()))return String(_0x52f3e7);const _0x3d73b3=[_0x27cf5c[_0xa13798(0x199)](),String(_0x27cf5c[_0xa13798(0x1b0)]()+0x1)[_0xa13798(0x19f)](0x2,'0'),String(_0x27cf5c['getDate']())[_0xa13798(0x19f)](0x2,'0')]['join']('-'),_0x2da809=[String(_0x27cf5c[_0xa13798(0x1ad)]())[_0xa13798(0x19f)](0x2,'0'),String(_0x27cf5c[_0xa13798(0x1a7)]())[_0xa13798(0x19f)](0x2,'0'),String(_0x27cf5c['getSeconds']())[_0xa13798(0x19f)](0x2,'0')][_0xa13798(0x1a3)](':');return _0x3d73b3+'\x20'+_0x2da809;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a185_0x2f5fd7=a185_0x38af;(function(_0x2920e4,_0x26dd34){const _0x189e20=a185_0x38af,_0x2db11c=_0x2920e4();while(!![]){try{const _0x1b9614=parseInt(_0x189e20(0x18b))/0x1*(-parseInt(_0x189e20(0x192))/0x2)+-parseInt(_0x189e20(0x183))/0x3*(parseInt(_0x189e20(0x197))/0x4)+-parseInt(_0x189e20(0x193))/0x5*(parseInt(_0x189e20(0x195))/0x6)+parseInt(_0x189e20(0x199))/0x7*(parseInt(_0x189e20(0x19b))/0x8)+parseInt(_0x189e20(0x189))/0x9+parseInt(_0x189e20(0x191))/0xa+-parseInt(_0x189e20(0x19c))/0xb*(-parseInt(_0x189e20(0x188))/0xc);if(_0x1b9614===_0x26dd34)break;else _0x2db11c['push'](_0x2db11c['shift']());}catch(_0x5e796f){_0x2db11c['push'](_0x2db11c['shift']());}}}(a185_0x60d3,0x38deb));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';function a185_0x38af(_0x20c7bf,_0x3deeae){_0x20c7bf=_0x20c7bf-0x183;const _0x60d3a=a185_0x60d3();let _0x38af2a=_0x60d3a[_0x20c7bf];return _0x38af2a;}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a185_0x60d3(){const _0x290eb2=['compress','flatMap','appCode','239208ZCzBwV','3442716jAcbPY','page','38evZFft','react','type','Found\x20','length','\x20Custom\x20Page(s).','557490qoEPpc','17506NLqnNg','585gFWQBi','pageId','11406IJGEOl','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','288724rlqBtG','cookie','14qfOfkr','path','491472TkLnny','165XmCQot','3OrLnsf','custom-list'];a185_0x60d3=function(){return _0x290eb2;};return a185_0x60d3();}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a185_0x2f5fd7(0x18a),'command':a185_0x2f5fd7(0x184),'description':a185_0x2f5fd7(0x196),'risk':'read','defaultOutputFormat':a185_0x2f5fd7(0x185),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2372d9){const _0x19d24f=a185_0x2f5fd7,_0x554db9=(await fetchMenuSnapshot(_0x2372d9[_0x19d24f(0x187)],_0x2372d9[_0x19d24f(0x198)]))['menus'][_0x19d24f(0x186)](_0x5e098b=>{const _0x573c09=_0x19d24f;if(_0x5e098b[_0x573c09(0x18d)]!==_0x573c09(0x18c)||_0x5e098b['pageId']==null)return[];const _0x10dd29=buildCustomPageDevelopmentUrl(_0x2372d9[_0x573c09(0x187)],_0x5e098b[_0x573c09(0x19a)]),_0x3d5f83=buildCustomPageEditUrl(_0x2372d9['appCode'],_0x5e098b[_0x573c09(0x194)]);return[{'pageId':_0x5e098b[_0x573c09(0x194)],'label':_0x5e098b['label'],..._0x10dd29?{'pageUrl':_0x10dd29}:{},..._0x3d5f83?{'editPageUrl':_0x3d5f83}:{}}];});return{'ok':!![],'data':{'pages':_0x554db9},'message':_0x554db9['length']===0x0?'No\x20Custom\x20Pages\x20found.':_0x19d24f(0x18e)+_0x554db9[_0x19d24f(0x18f)]+_0x19d24f(0x190)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a186_0xecbf7e=a186_0x291f;function a186_0x291f(_0x421002,_0x165ed2){_0x421002=_0x421002-0x19f;const _0x2ce03b=a186_0x2ce0();let _0x291f5e=_0x2ce03b[_0x421002];return _0x291f5e;}(function(_0x2d5ae3,_0x25f1fb){const _0x5e74c2=a186_0x291f,_0x38912b=_0x2d5ae3();while(!![]){try{const _0x5c7254=parseInt(_0x5e74c2(0x1a6))/0x1+parseInt(_0x5e74c2(0x1c5))/0x2*(-parseInt(_0x5e74c2(0x1a1))/0x3)+-parseInt(_0x5e74c2(0x1c0))/0x4+parseInt(_0x5e74c2(0x1b6))/0x5*(-parseInt(_0x5e74c2(0x1b3))/0x6)+parseInt(_0x5e74c2(0x1aa))/0x7*(-parseInt(_0x5e74c2(0x1c1))/0x8)+parseInt(_0x5e74c2(0x1b1))/0x9+parseInt(_0x5e74c2(0x1c6))/0xa*(parseInt(_0x5e74c2(0x1c4))/0xb);if(_0x5c7254===_0x25f1fb)break;else _0x38912b['push'](_0x38912b['shift']());}catch(_0x4fac95){_0x38912b['push'](_0x38912b['shift']());}}}(a186_0x2ce0,0x4bbf5));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';function a186_0x2ce0(){const _0x727a64=['Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','944112BgLQFR','1256OOYHDs','POST','string','498377aoPXKM','2SIywyz','100oiNwit','Published\x20Custom\x20Page\x20','warnings','123645vInkCj','custom-publish','apiError','unknown','str','593879RZreOS','trim','compress','page.custom-publish','27636nbVFNj','write','/smartapi/webcode/file/publish','cookie','status','page','appCode','4409343BtOIOW','runtimePageUrl','192CszmVl','FORMAL','pageCode','51490oiPXZm','Optional\x20publish\x20remark','push','number','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','Custom\x20Page\x20ID','remark','pageId','Would\x20publish\x20Custom\x20Page\x20'];a186_0x2ce0=function(){return _0x727a64;};return a186_0x2ce0();}export const pageCustomPublish={'service':a186_0xecbf7e(0x1af),'command':a186_0xecbf7e(0x1a2),'description':'Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','risk':a186_0xecbf7e(0x1ab),'defaultOutputFormat':a186_0xecbf7e(0x1a8),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a186_0xecbf7e(0x1b9),'required':!![],'description':a186_0xecbf7e(0x1bb)},{'name':a186_0xecbf7e(0x1bc),'type':a186_0xecbf7e(0x1c3),'description':a186_0xecbf7e(0x1b7)}],async 'validate'(_0x36aedc){readCustomPageId(_0x36aedc);},async 'dryRun'(_0x551551){const _0x53ffc0=a186_0xecbf7e,_0x4d9fe4=readInput(_0x551551);return{'method':_0x53ffc0(0x1c2),'url':_0x53ffc0(0x1ac),'body':{'id':_0x4d9fe4[_0x53ffc0(0x1bd)],..._0x4d9fe4[_0x53ffc0(0x1bc)]?{'remark':_0x4d9fe4[_0x53ffc0(0x1bc)]}:{}},'description':_0x53ffc0(0x1be)+_0x4d9fe4[_0x53ffc0(0x1bd)]+'.'};},async 'execute'(_0x4a3885){const _0x32a7e0=a186_0xecbf7e,_0x20d9c7=readInput(_0x4a3885);await getCustomPageSource(_0x20d9c7[_0x32a7e0(0x1bd)]);const _0x4eaea3=await publishCustomPage(_0x20d9c7);if(!Number['isInteger'](_0x4eaea3)||_0x4eaea3!==_0x20d9c7[_0x32a7e0(0x1bd)])throw CliErrors['apiError'](_0x32a7e0(0x1bf));const _0x2e6df8=await getCustomPageSource(_0x20d9c7[_0x32a7e0(0x1bd)]);if(_0x2e6df8[_0x32a7e0(0x1ae)]!==_0x32a7e0(0x1b4))throw CliErrors[_0x32a7e0(0x1a3)]('Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x2e6df8[_0x32a7e0(0x1ae)]??_0x32a7e0(0x1a4))+'.');const _0x452c0c=_0x2e6df8[_0x32a7e0(0x1b0)]?.['trim'](),_0x464c27=buildCustomPageEditUrl(_0x452c0c,_0x20d9c7[_0x32a7e0(0x1bd)]),_0x27d977=await resolveCustomPageDevelopmentUrl(_0x452c0c,_0x20d9c7['pageId'],_0x4a3885[_0x32a7e0(0x1ad)]),_0x1e660b=buildMutationData(_0x20d9c7,!![],_0x27d977,_0x464c27);_0x452c0c&&!_0x27d977&&_0x1e660b[_0x32a7e0(0x1a0)][_0x32a7e0(0x1b8)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x1160c3=buildCustomPageRuntimeUrl(_0x2e6df8[_0x32a7e0(0x1b0)],_0x2e6df8[_0x32a7e0(0x1b5)]);return _0x1160c3?_0x1e660b[_0x32a7e0(0x1b2)]=_0x1160c3:_0x1e660b[_0x32a7e0(0x1a0)][_0x32a7e0(0x1b8)](_0x32a7e0(0x1ba)),{'ok':!![],'data':_0x1e660b,'message':_0x32a7e0(0x19f)+_0x20d9c7[_0x32a7e0(0x1bd)]+'.'};}};function readInput(_0xc8d560){const _0x2dff0a=a186_0xecbf7e,_0x114e9b=readCustomPageId(_0xc8d560),_0x272d85=_0xc8d560[_0x2dff0a(0x1a5)]('remark')[_0x2dff0a(0x1a7)]();return{'pageId':_0x114e9b,..._0x272d85?{'remark':_0x272d85}:{}};}function buildMutationData(_0x380b9b,_0x2458f2=![],_0x5df069,_0x4b8427){const _0x2e0836=a186_0xecbf7e;return{'operation':_0x2e0836(0x1a9),'selector':{'pageId':_0x380b9b[_0x2e0836(0x1bd)]},'before':null,'after':{'pageId':_0x380b9b[_0x2e0836(0x1bd)],'status':'FORMAL'},'dryRun':!_0x2458f2,'request':_0x380b9b,..._0x5df069?{'pageUrl':_0x5df069}:{},..._0x4b8427?{'editPageUrl':_0x4b8427}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5c399b,_0x19f2e6){const _0x3d3c17=a187_0x199a,_0x5613e3=_0x5c399b();while(!![]){try{const _0x2de144=-parseInt(_0x3d3c17(0x188))/0x1+parseInt(_0x3d3c17(0x187))/0x2*(parseInt(_0x3d3c17(0x18d))/0x3)+-parseInt(_0x3d3c17(0x17f))/0x4*(-parseInt(_0x3d3c17(0x18a))/0x5)+parseInt(_0x3d3c17(0x17d))/0x6*(-parseInt(_0x3d3c17(0x185))/0x7)+-parseInt(_0x3d3c17(0x181))/0x8*(parseInt(_0x3d3c17(0x18c))/0x9)+-parseInt(_0x3d3c17(0x189))/0xa+parseInt(_0x3d3c17(0x18b))/0xb;if(_0x2de144===_0x19f2e6)break;else _0x5613e3['push'](_0x5613e3['shift']());}catch(_0x220f65){_0x5613e3['push'](_0x5613e3['shift']());}}}(a187_0x519a,0x8f094));function a187_0x519a(){const _0x4bc83c=['menus','732NwzQdB','react','80DsCNGc','find','--id\x20must\x20be\x20a\x20positive\x20integer.','validation','238KmcKYv','pageId','654XAjDgQ','800492viaTxF','5448820CzJgRd','7290opeEyF','15700619ywbupI','540747XxHuOE','10371MpUlqO','length','/pages/','path','isInteger','file','map','51618gLUxqG'];a187_0x519a=function(){return _0x4bc83c;};return a187_0x519a();}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';function a187_0x199a(_0x5e3dfe,_0x9a79d5){_0x5e3dfe=_0x5e3dfe-0x177;const _0x519a01=a187_0x519a();let _0x199a97=_0x519a01[_0x5e3dfe];return _0x199a97;}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':'Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted'};function trimOptional(_0x23824f){return _0x23824f?.['trim']()||undefined;}export function buildCustomPageRuntimeUrl(_0x3db848,_0x3205bf){const _0x51bd21=trimOptional(_0x3db848),_0xd28774=trimOptional(_0x3205bf);if(!_0x51bd21||!_0xd28774)return undefined;return getPublishedAppDomain(_0x51bd21)+'/'+encodeURIComponent(_0xd28774);}export function buildCustomPageDevelopmentUrl(_0x3f42a6,_0x2b34c0){const _0x3d4f0d=a187_0x199a,_0x48a84a=trimOptional(_0x3f42a6),_0x48fdb0=trimOptional(_0x2b34c0);if(!_0x48a84a||!_0x48fdb0)return undefined;return getAppBaseUrl(_0x48a84a)+_0x3d4f0d(0x178)+encodeURIComponent(_0x48fdb0);}export async function resolveCustomPageDevelopmentUrl(_0x5547ad,_0x42276a,_0x3ae8bd){const _0x179a75=a187_0x199a,_0x250c99=trimOptional(_0x5547ad);if(!_0x250c99)return undefined;try{const _0x2ffc3e=(await fetchMenuSnapshot(_0x250c99,_0x3ae8bd))[_0x179a75(0x17e)][_0x179a75(0x182)](_0x37a53f=>_0x37a53f['type']===_0x179a75(0x180)&&_0x37a53f[_0x179a75(0x186)]===_0x42276a);return buildCustomPageDevelopmentUrl(_0x250c99,_0x2ffc3e?.[_0x179a75(0x179)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x10e26c,_0x558beb){const _0x3817f5=trimOptional(_0x10e26c);if(!_0x3817f5)return;const _0x5a5f34=trimOptional(String(_0x558beb??''));if(!_0x5a5f34)return;return getAppBaseUrl(_0x3817f5)+'/ide/'+encodeURIComponent(_0x5a5f34);}export async function validateCustomPageContent(_0x4be233){const _0x43aa80=a187_0x199a,_0x3ba4dc=await validateCustomPageSourceFiles(_0x4be233);if(_0x3ba4dc[_0x43aa80(0x177)]>0x0)throw CliErrors[_0x43aa80(0x184)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x3ba4dc[_0x43aa80(0x17c)](_0x508637=>_0x508637[_0x43aa80(0x17b)]+':\x20'+_0x508637['message'])['join'](';\x20'));}export function readCustomPageId(_0x4099e2){const _0x25ebb7=a187_0x199a,_0xdbc419=_0x4099e2['num']('id');if(!Number[_0x25ebb7(0x17a)](_0xdbc419)||_0xdbc419<=0x0)throw CliErrors[_0x25ebb7(0x184)](_0x25ebb7(0x183));return _0xdbc419;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x4dce11=a188_0x475a;function a188_0x44e1(){const _0x3b6305=['Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','40374SsJXVs','2990iXUXPx','905ZPfSSV','8418ZJzPJG','message','entries','88ssTgTh','map','find','some','189849NHtUdO','typescript','3501972UtRUmX','.tsx','.jsx','3332wWYEeG','all','filter','babel','996mWveYn','8071eGnTjA','40546WScbuk','trim','page\x20files','toLowerCase','endsWith','5253120nGVQtG'];a188_0x44e1=function(){return _0x3b6305;};return a188_0x44e1();}(function(_0x322c83,_0x3a0679){const _0x41778a=a188_0x475a,_0x1b01c9=_0x322c83();while(!![]){try{const _0x94980d=-parseInt(_0x41778a(0x1dd))/0x1*(-parseInt(_0x41778a(0x1ec))/0x2)+-parseInt(_0x41778a(0x1e3))/0x3+parseInt(_0x41778a(0x1e6))/0x4*(-parseInt(_0x41778a(0x1d9))/0x5)+-parseInt(_0x41778a(0x1da))/0x6*(parseInt(_0x41778a(0x1eb))/0x7)+-parseInt(_0x41778a(0x1f1))/0x8+parseInt(_0x41778a(0x1d7))/0x9*(parseInt(_0x41778a(0x1d8))/0xa)+-parseInt(_0x41778a(0x1e1))/0xb*(-parseInt(_0x41778a(0x1ea))/0xc);if(_0x94980d===_0x3a0679)break;else _0x1b01c9['push'](_0x1b01c9['shift']());}catch(_0x1efc84){_0x1b01c9['push'](_0x1b01c9['shift']());}}}(a188_0x44e1,0xebb3f));import{format}from'prettier';function a188_0x475a(_0x1e4bb6,_0x496643){_0x1e4bb6=_0x1e4bb6-0x1d7;const _0x44e1ca=a188_0x44e1();let _0x475a08=_0x44e1ca[_0x1e4bb6];return _0x475a08;}const SOURCE_PARSERS={'.js':a188_0x4dce11(0x1e9),'.jsx':a188_0x4dce11(0x1e9),'.ts':'typescript','.tsx':a188_0x4dce11(0x1e2)},CUSTOM_PAGE_EXTENSIONS=[a188_0x4dce11(0x1e5),a188_0x4dce11(0x1e4)];export async function validateCustomPageSourceFiles(_0x4033af){const _0x5b435c=a188_0x4dce11,_0x1522f2=Object['entries'](_0x4033af)['filter'](([_0xe11fb3])=>getParser(_0xe11fb3));if(!_0x1522f2[_0x5b435c(0x1e0)](([_0x1ec505])=>isReactSourceFile(_0x1ec505)))return[{'file':_0x5b435c(0x1ee),'message':_0x5b435c(0x1f2)}];const _0x4fcf07=await Promise[_0x5b435c(0x1e7)](_0x1522f2[_0x5b435c(0x1de)](async([_0x16494b,_0x2cdc16])=>{const _0x35aeb0=_0x5b435c;try{return await format(_0x2cdc16,{'parser':getParser(_0x16494b)}),undefined;}catch(_0x3aa927){return{'file':_0x16494b,'message':_0x3aa927 instanceof Error?_0x3aa927[_0x35aeb0(0x1db)]:String(_0x3aa927)};}}));return _0x4fcf07[_0x5b435c(0x1e8)](_0x3ff09e=>_0x3ff09e!==undefined);}function getParser(_0x1880c8){const _0x1a2684=a188_0x4dce11,_0x43286f=_0x1880c8[_0x1a2684(0x1ed)]()[_0x1a2684(0x1ef)]();return Object[_0x1a2684(0x1dc)](SOURCE_PARSERS)[_0x1a2684(0x1df)](([_0x48852a])=>_0x43286f[_0x1a2684(0x1f0)](_0x48852a))?.[0x1];}function isReactSourceFile(_0x2e11cc){const _0x5997ff=a188_0x4dce11,_0x773a4=_0x2e11cc[_0x5997ff(0x1ed)]()[_0x5997ff(0x1ef)]();return CUSTOM_PAGE_EXTENSIONS['some'](_0x150608=>_0x773a4[_0x5997ff(0x1f0)](_0x150608));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0x34bb87=a189_0xefe9;function a189_0xefe9(_0x22f47d,_0x3b2e0b){_0x22f47d=_0x22f47d-0x78;const _0x4f587a=a189_0x4f58();let _0xefe9f=_0x4f587a[_0x22f47d];return _0xefe9f;}(function(_0x24d575,_0x5aef8f){const _0x4fc423=a189_0xefe9,_0x50880f=_0x24d575();while(!![]){try{const _0xe0d624=parseInt(_0x4fc423(0x7c))/0x1+-parseInt(_0x4fc423(0x94))/0x2+-parseInt(_0x4fc423(0x88))/0x3+parseInt(_0x4fc423(0x98))/0x4*(parseInt(_0x4fc423(0x79))/0x5)+parseInt(_0x4fc423(0x80))/0x6+-parseInt(_0x4fc423(0x8d))/0x7+parseInt(_0x4fc423(0x83))/0x8;if(_0xe0d624===_0x5aef8f)break;else _0x50880f['push'](_0x50880f['shift']());}catch(_0x3572c1){_0x50880f['push'](_0x50880f['shift']());}}}(a189_0x4f58,0x8d153));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';function a189_0x4f58(){const _0x5bd991=['page-dir','isInteger','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','7351568OALnpT','page-content','apiError','appCode','newVersion','page','compress','363648YLPiyq','page.custom-update','str','string','4yGvBNV','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','Directory\x20containing\x20all\x20complete\x20page\x20files','5118235axvHly','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','484252fVjXmD','write','custom-update','POST','4600542wDtPjo','Updated\x20Custom\x20Page\x20','number','3882616TBUkMX','pageId','Custom\x20Page\x20ID','cookie','pageContent','2850180zqjsLd','trim'];a189_0x4f58=function(){return _0x5bd991;};return a189_0x4f58();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a189_0x34bb87(0x92),'command':a189_0x34bb87(0x7e),'description':'Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','risk':a189_0x34bb87(0x7d),'defaultOutputFormat':a189_0x34bb87(0x93),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a189_0x34bb87(0x8e),'message':a189_0x34bb87(0x9a),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'id','type':a189_0x34bb87(0x82),'required':!![],'description':a189_0x34bb87(0x85)},{'name':a189_0x34bb87(0x8a),'type':a189_0x34bb87(0x97),'required':!![],'description':a189_0x34bb87(0x78)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x324341){readCustomPageId(_0x324341),await readValidatedPageContent(_0x324341);},async 'dryRun'(_0x3fab6e){const _0x24074b=a189_0x34bb87,_0x34ec89=await readInput(_0x3fab6e);return{'method':_0x24074b(0x7f),'url':'/smartapi/webcode/page/update/content','body':{'id':_0x34ec89['pageId'],'codeContent':_0x34ec89[_0x24074b(0x87)]},'description':_0x24074b(0x7a)+_0x34ec89[_0x24074b(0x84)]+'.'};},async 'execute'(_0x5562ec){const _0x153f77=a189_0x34bb87,_0x10a5c1=await readInput(_0x5562ec),_0x336f9f=await updateCustomPageContent({'pageId':_0x10a5c1[_0x153f77(0x84)],'pageContent':_0x10a5c1['pageContent']});if(!Number[_0x153f77(0x8b)](_0x336f9f[_0x153f77(0x91)])||_0x336f9f[_0x153f77(0x91)]<=0x0)throw CliErrors[_0x153f77(0x8f)](_0x153f77(0x7b));const _0x3974cc=buildCustomPageEditUrl(_0x10a5c1['appCode'],_0x10a5c1[_0x153f77(0x84)]),_0x342c1c=await resolveCustomPageDevelopmentUrl(_0x10a5c1['appCode'],_0x10a5c1[_0x153f77(0x84)],_0x5562ec[_0x153f77(0x86)]);return{'ok':!![],'data':{'operation':_0x153f77(0x95),'selector':{'appCode':_0x10a5c1[_0x153f77(0x90)],'pageId':_0x10a5c1['pageId']},'before':null,'after':{'pageId':_0x336f9f[_0x153f77(0x84)],'version':_0x336f9f['newVersion'],'pageContent':_0x10a5c1[_0x153f77(0x87)]},'dryRun':![],'request':_0x10a5c1,..._0x342c1c?{'pageUrl':_0x342c1c}:{},..._0x3974cc?{'editPageUrl':_0x3974cc}:{},'warnings':_0x342c1c?[]:[_0x153f77(0x99)]},'message':_0x153f77(0x81)+_0x10a5c1[_0x153f77(0x84)]+'.'};}};async function readInput(_0x157e9f){const _0x4666e5=a189_0x34bb87,_0x4cb2f4=readCustomPageId(_0x157e9f),_0x369828=_0x157e9f[_0x4666e5(0x96)]('appcode')[_0x4666e5(0x89)]()||(await getCustomPageSource(_0x4cb2f4))[_0x4666e5(0x90)]?.[_0x4666e5(0x89)]();if(!_0x369828)throw CliErrors['validation'](_0x4666e5(0x8c)+_0x4cb2f4+'.');return{'appCode':_0x369828,'pageId':_0x4cb2f4,'pageContent':await readValidatedPageContent(_0x157e9f)};}async function readValidatedPageContent(_0x26d405){const _0x232948=await readCustomPageDirectory(_0x26d405['str']('page-dir'));return await validateCustomPageContent(_0x232948),_0x232948;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a190_0xb44837=a190_0x2f19;(function(_0x16411c,_0x5135b3){const _0xad1ab6=a190_0x2f19,_0x1eb584=_0x16411c();while(!![]){try{const _0x4b4a79=-parseInt(_0xad1ab6(0x114))/0x1*(parseInt(_0xad1ab6(0x118))/0x2)+parseInt(_0xad1ab6(0x119))/0x3+-parseInt(_0xad1ab6(0x117))/0x4*(parseInt(_0xad1ab6(0x11b))/0x5)+parseInt(_0xad1ab6(0x113))/0x6+parseInt(_0xad1ab6(0x104))/0x7+parseInt(_0xad1ab6(0x11e))/0x8*(-parseInt(_0xad1ab6(0x109))/0x9)+parseInt(_0xad1ab6(0x115))/0xa;if(_0x4b4a79===_0x5135b3)break;else _0x1eb584['push'](_0x1eb584['shift']());}catch(_0x330b49){_0x1eb584['push'](_0x1eb584['shift']());}}}(a190_0x26cc,0x5d5d0));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a190_0x26cc(){const _0x4ad7fa=['/standard-page-status?appCode=','alias','280HGpFjP','3908667zuXLxN','code','compress','relatedPages','string','102267lRhCLw','page','GET','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','nextAction','appCode','name','related-pages-fallback','length','read','2264430HHjNlw','2bDhEkA','3564400jWXPxQ','/smartapi/lovrabet/dataset/','870008wKfjcI','412358iTQhTi','1658277yMQDVw','manualResolutionRequired','15YZnWtU'];a190_0x26cc=function(){return _0x4ad7fa;};return a190_0x26cc();}function a190_0x2f19(_0x4525dd,_0x3a5e0e){_0x4525dd=_0x4525dd-0x104;const _0x26cc72=a190_0x26cc();let _0x2f194d=_0x26cc72[_0x4525dd];return _0x2f194d;}export const pageDataListStatus={'service':a190_0xb44837(0x10a),'command':'data-list-status','description':a190_0xb44837(0x10c),'risk':a190_0xb44837(0x112),'defaultOutputFormat':a190_0xb44837(0x106),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a190_0xb44837(0x11d),'type':a190_0xb44837(0x108),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x33f4b5){validateDatasetSelector(_0x33f4b5);},async 'dryRun'(_0x45f4d4){const _0x911ad6=a190_0xb44837,_0x5bb103=await loadDatasetDetailForPage(_0x45f4d4);return{'method':_0x911ad6(0x10b),'url':_0x911ad6(0x116)+_0x5bb103['code']+_0x911ad6(0x11c)+encodeURIComponent(_0x45f4d4[_0x911ad6(0x10e)]),'description':serializeDryRunDescription({'dataset':{'id':_0x5bb103['id'],'code':_0x5bb103[_0x911ad6(0x105)],'name':_0x5bb103[_0x911ad6(0x10f)]},'action':'query-data-list-status'})};},async 'execute'(_0x303c8b){const _0x25f1aa=a190_0xb44837,_0x2f8747=await loadDatasetDetailForPage(_0x303c8b),_0x2a4892=await loadDataListPageStatusForGenerate(_0x303c8b,_0x2f8747[_0x25f1aa(0x105)]),_0x174a05=getUndeletedRelatedPages(_0x2f8747),_0x184c0d=assessDataListPageState(_0x2f8747['code'],_0x2a4892,{'fallbackUndeletedPages':_0x174a05});return{'ok':!![],'data':{'datasetCode':_0x2f8747[_0x25f1aa(0x105)],'precheckSource':_0x2a4892?.['source']??_0x25f1aa(0x110),'status':_0x184c0d['status'],'manualResolutionRequired':_0x184c0d[_0x25f1aa(0x11a)],'nextAction':_0x184c0d[_0x25f1aa(0x10d)],'dataListPageStatus':_0x2a4892,'relatedPages':{'total':_0x2f8747[_0x25f1aa(0x107)][_0x25f1aa(0x111)],'undeletedCount':_0x174a05['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a191_0x34604c=a191_0x33bd;(function(_0xdeb7ed,_0x16ad26){const _0x20e48f=a191_0x33bd,_0x239f6d=_0xdeb7ed();while(!![]){try{const _0x302adb=-parseInt(_0x20e48f(0x214))/0x1*(-parseInt(_0x20e48f(0x209))/0x2)+parseInt(_0x20e48f(0x20c))/0x3*(-parseInt(_0x20e48f(0x1f9))/0x4)+-parseInt(_0x20e48f(0x1fa))/0x5+parseInt(_0x20e48f(0x20b))/0x6+parseInt(_0x20e48f(0x213))/0x7*(parseInt(_0x20e48f(0x220))/0x8)+-parseInt(_0x20e48f(0x21d))/0x9*(-parseInt(_0x20e48f(0x1ed))/0xa)+-parseInt(_0x20e48f(0x21b))/0xb;if(_0x302adb===_0x16ad26)break;else _0x239f6d['push'](_0x239f6d['shift']());}catch(_0x2db369){_0x239f6d['push'](_0x239f6d['shift']());}}}(a191_0x3d2e,0xb2161));function a191_0x33bd(_0x1a4f74,_0x2797a9){_0x1a4f74=_0x1a4f74-0x1ed;const _0x3d2e3e=a191_0x3d2e();let _0x33bd19=_0x3d2e3e[_0x1a4f74];return _0x33bd19;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a191_0x3d2e(){const _0x36120e=['page-type','Reusing\x20an\x20existing\x20generate\x20task','compress','/generate-standard-pages/start','code','30WdWAGE','generate-start','7678488TVrebx','92769DejQPT','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','/smartapi/lovrabet/dataset/','related-pages-fallback','message','operationId','clientOperationId','889IEfUmN','57299viaJyV','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','CRUD_PAGE_SET','DATA_LIST','apply','number','PARTIAL_SUCCESS','12692009VexHaT','currentStep','27GBdKlB','appCode','reused','80728QVJmoo','690810xTqQzm','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','nextAction','name','status','page','precheck','dataListPageStatus','dataset','fieldCount','taskId','alias','164WAVKsx','2384650AakfJY','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','manualResolutionRequired','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','dryRun','source','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','allowGenerate','Submitted\x20a\x20generate\x20task','POST'];a191_0x3d2e=function(){return _0x36120e;};return a191_0x3d2e();}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_0x34604c(0x1f2),'command':'generate-start','description':a191_0x34604c(0x20d),'risk':'write','defaultOutputFormat':a191_0x34604c(0x206),'rejectedFlags':[{'name':a191_0x34604c(0x204),'message':a191_0x34604c(0x1ee),'hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':'page-pattern','message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','hint':a191_0x34604c(0x200)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a191_0x34604c(0x1f8),'type':'string','description':a191_0x34604c(0x1fd)},{'name':a191_0x34604c(0x218),'type':'boolean','description':a191_0x34604c(0x215)}],async 'validate'(_0x53101c){validateDatasetSelector(_0x53101c);},async 'dryRun'(_0x5559f3){const _0x1dd00e=a191_0x34604c,_0x349e58=await prepare(_0x5559f3);return{'method':_0x1dd00e(0x203),'url':_0x1dd00e(0x20e)+_0x349e58['dataset'][_0x1dd00e(0x208)]+_0x1dd00e(0x207),'body':{'appCode':_0x5559f3[_0x1dd00e(0x21e)],'clientOperationId':_0x349e58[_0x1dd00e(0x212)]},'description':serializeDryRunDescription({'dataset':{'id':_0x349e58['dataset']['id'],'code':_0x349e58[_0x1dd00e(0x1f5)][_0x1dd00e(0x208)],'name':_0x349e58[_0x1dd00e(0x1f5)][_0x1dd00e(0x1f0)],'fieldCount':_0x349e58[_0x1dd00e(0x1f5)][_0x1dd00e(0x1f6)]},'precheckSource':_0x349e58[_0x1dd00e(0x1f4)]?.[_0x1dd00e(0x1ff)]??_0x1dd00e(0x20f),'action':_0x1dd00e(0x20a),'clientOperationId':_0x349e58[_0x1dd00e(0x212)],'plannedStatus':_0x349e58[_0x1dd00e(0x1f3)][_0x1dd00e(0x1f1)],'reason':_0x349e58[_0x1dd00e(0x1f3)][_0x1dd00e(0x210)]})};},async 'execute'(_0x634a43){const _0x45d4f5=a191_0x34604c;if(!_0x634a43['bool'](_0x45d4f5(0x218))){const _0x1bbca7=await pageGenerateStart[_0x45d4f5(0x1fe)](_0x634a43);return{'ok':!![],'message':_0x45d4f5(0x1fb),'data':_0x1bbca7};}const _0x44e3a6=await prepare(_0x634a43);if(!_0x44e3a6[_0x45d4f5(0x1f3)][_0x45d4f5(0x201)])return{'ok':![],'message':_0x44e3a6[_0x45d4f5(0x1f3)][_0x45d4f5(0x210)],'data':{'datasetCode':_0x44e3a6[_0x45d4f5(0x1f5)][_0x45d4f5(0x208)],'pageType':_0x45d4f5(0x217),'pagePattern':_0x45d4f5(0x216),'clientOperationId':_0x44e3a6['clientOperationId'],'precheckSource':_0x44e3a6[_0x45d4f5(0x1f4)]?.[_0x45d4f5(0x1ff)]??_0x45d4f5(0x20f),'status':_0x44e3a6['precheck']['status'],'manualResolutionRequired':_0x44e3a6['precheck'][_0x45d4f5(0x1fc)],'nextAction':_0x44e3a6[_0x45d4f5(0x1f3)][_0x45d4f5(0x1ef)],'query':{'command':buildDataListPageStatusQueryCommand(_0x44e3a6['dataset'][_0x45d4f5(0x208)],_0x634a43[_0x45d4f5(0x21e)])},'dataListPageStatus':_0x44e3a6['dataListPageStatus']}};const _0x442ccf=await startGenerateDataListPages(_0x634a43['appCode'],_0x44e3a6[_0x45d4f5(0x1f5)][_0x45d4f5(0x208)],{'clientOperationId':_0x44e3a6[_0x45d4f5(0x212)]}),_0x44f528=_0x442ccf[_0x45d4f5(0x1f1)]==='SUCCESS'||_0x442ccf[_0x45d4f5(0x1f1)]===_0x45d4f5(0x21a)?await loadDataListPageStatusForGenerate(_0x634a43,_0x44e3a6[_0x45d4f5(0x1f5)][_0x45d4f5(0x208)]):null,_0xfd3e2f=assessGenerateOperationState(_0x44e3a6[_0x45d4f5(0x1f5)][_0x45d4f5(0x208)],_0x442ccf[_0x45d4f5(0x1f1)],_0x44f528);return{'ok':!![],'message':_0x442ccf[_0x45d4f5(0x21f)]?_0x45d4f5(0x205):_0x45d4f5(0x202),'data':{'datasetCode':_0x44e3a6[_0x45d4f5(0x1f5)]['code'],'appCode':_0x634a43[_0x45d4f5(0x21e)],'pageType':'DATA_LIST','pagePattern':_0x45d4f5(0x216),'taskId':_0x442ccf[_0x45d4f5(0x1f7)]??null,'operationId':_0x442ccf[_0x45d4f5(0x211)]??null,'clientOperationId':_0x44e3a6[_0x45d4f5(0x212)],'jobStatus':_0x442ccf[_0x45d4f5(0x1f1)]??null,'progressRate':typeof _0x442ccf['progressRate']===_0x45d4f5(0x219)?_0x442ccf['progressRate']:null,'currentStep':_0x442ccf[_0x45d4f5(0x21c)]??null,'reused':_0x442ccf[_0x45d4f5(0x21f)]===!![],'status':_0xfd3e2f[_0x45d4f5(0x1f1)],'manualResolutionRequired':_0xfd3e2f[_0x45d4f5(0x1fc)],'nextAction':_0xfd3e2f[_0x45d4f5(0x1ef)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x44e3a6[_0x45d4f5(0x1f5)][_0x45d4f5(0x208)],{'appCode':_0x634a43['appCode'],'taskId':_0x442ccf[_0x45d4f5(0x1f7)],'operationId':_0x442ccf[_0x45d4f5(0x211)],'clientOperationId':_0x44e3a6[_0x45d4f5(0x212)]})},'dataListPageStatus':_0x44f528}};}};async function prepare(_0x376cce){const _0x4857f2=await loadDatasetDetailForPage(_0x376cce),_0x1d53b2=await loadDataListPageStatusForGenerate(_0x376cce,_0x4857f2['code']),_0xb14949=getUndeletedRelatedPages(_0x4857f2);return{'dataset':_0x4857f2,'dataListPageStatus':_0x1d53b2,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x4857f2['code'],_0x1d53b2,{'fallbackUndeletedPages':_0xb14949})};}
|