@lovrabet/rabetbase-cli 2.5.2-beta.7 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.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/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/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-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/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/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/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/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.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/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 a157_0x37a4f8=a157_0xd6b1;(function(_0xa425d7,_0x48ef0c){const _0x528709=a157_0xd6b1,_0x2c5188=_0xa425d7();while(!![]){try{const _0x4514e0=parseInt(_0x528709(0xb4))/0x1*(-parseInt(_0x528709(0x12b))/0x2)+-parseInt(_0x528709(0xec))/0x3*(parseInt(_0x528709(0x11e))/0x4)+parseInt(_0x528709(0xf9))/0x5+parseInt(_0x528709(0xe1))/0x6+parseInt(_0x528709(0xd8))/0x7+-parseInt(_0x528709(0xc0))/0x8+parseInt(_0x528709(0xdb))/0x9;if(_0x4514e0===_0x48ef0c)break;else _0x2c5188['push'](_0x2c5188['shift']());}catch(_0x106a5f){_0x2c5188['push'](_0x2c5188['shift']());}}}(a157_0x542b,0xca40f));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=[a157_0x37a4f8(0x129),a157_0x37a4f8(0xda),'DINGTALK',a157_0x37a4f8(0xf1),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType','endpointUrl',a157_0x37a4f8(0xd5),a157_0x37a4f8(0x10d),'connectTimeout',a157_0x37a4f8(0x109)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a157_0x37a4f8(0xbc),'configCode',a157_0x37a4f8(0x114)]),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x37a4f8(0xf4),a157_0x37a4f8(0xb9),a157_0x37a4f8(0xcd),'bccList',a157_0x37a4f8(0xc1),a157_0x37a4f8(0x103),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a157_0x37a4f8(0xe2),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a157_0x37a4f8(0x122),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a157_0x37a4f8(0xb1),'type':a157_0x37a4f8(0xe2),'required':![],'description':a157_0x37a4f8(0xc9)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x37a4f8(0xf6),'required':!![],'description':a157_0x37a4f8(0x11d)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5b422,_0x4d4f3e,_0x5cd0d8){return new CliError(_0x5b422,0x1,_0x4d4f3e,_0x5cd0d8);}export function readNotificationId(_0x320749){const _0x59a197=a157_0x37a4f8,_0x111b58=_0x320749[_0x59a197(0x134)]('id');if(!Number['isSafeInteger'](_0x111b58)||_0x111b58<=0x0)throw notificationError(_0x59a197(0xc3),_0x59a197(0x10e));return _0x111b58;}export function requireNotificationExplicitYes(_0x52b00f){const _0x1ea112=a157_0x37a4f8;if(_0x52b00f[_0x1ea112(0xe9)]('dry-run')||_0x52b00f[_0x1ea112(0xe9)](_0x1ea112(0x104)))return;throw notificationError(_0x1ea112(0xcc),_0x1ea112(0xb8),_0x1ea112(0x112));}export function readNotificationChannelType(_0xeb3f6c,_0x1213b2=a157_0x37a4f8(0x117),_0x42c3ba='EMAIL'){const _0xb4d90e=a157_0x37a4f8,_0x17a387=_0xeb3f6c[_0xb4d90e(0xbd)](_0x1213b2)['trim']()||_0x42c3ba;if(!NOTIFICATION_CHANNEL_TYPES[_0xb4d90e(0x102)](_0x17a387))throw CliErrors[_0xb4d90e(0xc5)](_0xb4d90e(0x116)+_0x1213b2+':\x20'+_0x17a387,_0xb4d90e(0x128)+NOTIFICATION_CHANNEL_TYPES[_0xb4d90e(0xcf)](',\x20')+'.');return _0x17a387;}function a157_0x542b(){const _0x19a60c=['setEncoding','file','_unavailable','object','a\x20non-empty\x20string','<redacted>','every','Notification\x20JSON\x20field\x20\x22','num','from-env','Notification\x20config\x20list\x20item\x20','some','2113vgwjeh','notification_config_field_invalid','\x20has\x20an\x20unsupported\x20channelType.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','recipients','notification_config_json_invalid','messageTemplate','appCode','str','length','preflight','7844760GoGyrl','replyTo','notification_config_field_unknown','notification_config_id_invalid','push','validation','\x20characters.','channelType','Missing\x20notification\x20JSON\x20source.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','\x20has\x20an\x20invalid\x20id.','notification_config_update_empty','notification_config_confirmation_required','ccList','\x20--format\x20compress','join','keys','Notification\x20JSON\x20source\x20is\x20ambiguous.','update','Notification\x20JSON\x20channelConfig\x20field\x20\x22','channelConfigRaw','channelConfig','\x22\x20cannot\x20exceed\x20','a\x20supported\x20string','1910076OpsYoG','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','FEISHU','5325849gOypRV','stringify','file\x20','entries','\x20must\x20be\x20an\x20object.','a\x20JSON\x20object','9671184QboKxO','string','connectTimeout','isSafeInteger','configCode','isArray','parse','\x20has\x20invalid\x20field\x20\x22','bool','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','\x20--type\x20','176811InMCuN','Invalid\x20notification\x20config\x20response.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','endpointUrl','a\x20string\x20or\x20null','WECOM','\x22channelType\x22.','\x22\x20is\x20forbidden.','emailTargets','notification_config_response_invalid','number','path','Notification\x20JSON\x20from\x20','2130795MajjiV','hasOwnProperty','kind','endpointUrl:null','configName','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x22configName\x22.','env','notification_config_field_required','includes','subjectPrefix','yes','notification_config_source_unavailable','a\x20JSON\x20object\x20or\x20null','utf8','prototype','readTimeout','updateTime','Unknown\x20notification\x20JSON\x20field\x20\x22','\x20is\x20missing\x20required\x20field\x20\x22','description','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','endpointUrlRaw','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','name','channelCode','mutation','Invalid\x20--','type','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','has','create','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Application-level\x20notification\x20config\x20ID','16YbIXpi','trim','apiError','createTime','stdin','notification_config_field_forbidden','Create\x20JSON\x20requires\x20field\x20','\x20failed.','\x20has\x20an\x20invalid\x20channelType.','Notification\x20config\x20','Allowed\x20values:\x20','EMAIL','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','812mXXzGG'];a157_0x542b=function(){return _0x19a60c;};return a157_0x542b();}export function assertSingleNotificationSource(_0x544194){const _0x121bb8=a157_0x37a4f8,_0x445b94=[],_0x5a52e4=_0x544194[_0x121bb8(0xbd)](_0x121bb8(0x12d))[_0x121bb8(0x11f)]();if(_0x5a52e4)_0x445b94[_0x121bb8(0xc4)]({'kind':'file','path':_0x5a52e4});if(_0x544194[_0x121bb8(0xe9)]('stdin'))_0x445b94[_0x121bb8(0xc4)]({'kind':_0x121bb8(0x122)});const _0x4f8691=_0x544194['str'](_0x121bb8(0xb1))['trim']();if(_0x4f8691)_0x445b94[_0x121bb8(0xc4)]({'kind':_0x121bb8(0x100),'name':_0x4f8691});if(_0x445b94[_0x121bb8(0xbe)]===0x0)throw CliErrors[_0x121bb8(0xc5)](_0x121bb8(0xc8),_0x121bb8(0x11c));if(_0x445b94[_0x121bb8(0xbe)]>0x1)throw CliErrors[_0x121bb8(0xc5)](_0x121bb8(0xd1),_0x121bb8(0x11c));return _0x445b94[0x0];}export async function readNotificationDocument(_0x54e135,_0x5e00cc){const _0x2eb17f=a157_0x37a4f8,_0x5e1b17=assertSingleNotificationSource(_0x54e135),_0xe56845=_0x5e1b17['kind']===_0x2eb17f(0x12d)?_0x2eb17f(0xdd)+_0x5e1b17[_0x2eb17f(0xf7)]:_0x5e1b17[_0x2eb17f(0xfb)]===_0x2eb17f(0x100)?'environment\x20variable\x20'+_0x5e1b17[_0x2eb17f(0x113)]:_0x2eb17f(0x122);let _0x4b0c2f;try{if(_0x5e1b17[_0x2eb17f(0xfb)]==='file')_0x4b0c2f=await readFile(_0x5e1b17[_0x2eb17f(0xf7)],'utf8');else{if(_0x5e1b17['kind']===_0x2eb17f(0x100)){if(!(_0x5e1b17[_0x2eb17f(0x113)]in process.env))throw notificationError(_0x2eb17f(0x105),_0x2eb17f(0xea)+_0x5e1b17['name']);_0x4b0c2f=process.env[_0x5e1b17.name]??'';}else _0x4b0c2f=await readStdin();}}catch(_0x56f569){if(_0x56f569 instanceof CliError)throw _0x56f569;throw notificationError(_0x2eb17f(0x105),_0x2eb17f(0xfe)+_0xe56845+'.');}let _0x548dc7;try{_0x548dc7=JSON[_0x2eb17f(0xe7)](_0x4b0c2f);}catch{throw notificationError(_0x2eb17f(0xba),_0x2eb17f(0xf8)+_0xe56845+'\x20is\x20invalid.',_0x2eb17f(0x110));}if(!isJsonObject(_0x548dc7))throw notificationError(_0x2eb17f(0xba),_0x2eb17f(0xf8)+_0xe56845+_0x2eb17f(0xdf));return validateNotificationDocument(_0x548dc7,_0x5e00cc);}export function projectNotificationListConfig(_0x16aa57,_0x56772f){const _0x260df3=a157_0x37a4f8;return{'id':typeof _0x16aa57['id']===_0x260df3(0xf6)?_0x16aa57['id']:null,'configCode':requireResponseString(_0x16aa57[_0x260df3(0xe5)],_0x260df3(0xe5),_0x56772f),'configName':requireResponseString(_0x16aa57[_0x260df3(0xfd)],'configName',_0x56772f),'channelType':requireResponseString(_0x16aa57[_0x260df3(0xc7)],_0x260df3(0xc7),_0x56772f),'description':normalizeNullableString(_0x16aa57['description']),'createTime':normalizeNullableString(_0x16aa57[_0x260df3(0x121)]),'updateTime':normalizeNullableString(_0x16aa57[_0x260df3(0x10a)])};}export function normalizeExactNotificationConfig(_0x46d097,_0x34f7d3,_0x47003c){const _0x45a7ef=a157_0x37a4f8;if(!Number[_0x45a7ef(0xe4)](_0x46d097['id'])||_0x46d097['id']!==_0x34f7d3)throw notificationError(_0x45a7ef(0xf5),_0x45a7ef(0xb7)+_0x34f7d3+'.');if(_0x46d097['appCode']!==_0x47003c)throw notificationError(_0x45a7ef(0xf5),_0x45a7ef(0x127)+_0x34f7d3+_0x45a7ef(0x111));const _0x2c329d=requireExactString(_0x46d097['configName'],'configName',_0x34f7d3),_0x1362fe=requireExactString(_0x46d097[_0x45a7ef(0xe5)],_0x45a7ef(0xe5),_0x34f7d3),_0x5c1520=requireExactString(_0x46d097[_0x45a7ef(0xc7)],_0x45a7ef(0xc7),_0x34f7d3);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5c1520))throw notificationError(_0x45a7ef(0xf5),_0x45a7ef(0x127)+_0x34f7d3+_0x45a7ef(0xb6));const _0x587b82=responseNullableString(_0x46d097[_0x45a7ef(0xef)],_0x45a7ef(0xef),_0x34f7d3),_0x5a8ec8=responseNullableString(_0x46d097[_0x45a7ef(0xd5)],_0x45a7ef(0xd5),_0x34f7d3),_0x4c2acb=responseNullableString(_0x46d097[_0x45a7ef(0x10d)],_0x45a7ef(0x10d),_0x34f7d3),_0x4e8295=responseNullableTimeout(_0x46d097[_0x45a7ef(0xe3)],'connectTimeout',_0x34f7d3),_0x49e461=responseNullableTimeout(_0x46d097['readTimeout'],'readTimeout',_0x34f7d3);return{'id':_0x34f7d3,'appCode':_0x47003c,'configCode':_0x1362fe,'configName':_0x2c329d,'channelType':_0x5c1520,'endpointUrl':redactSensitive(_0x587b82),'channelConfig':redactSensitive(_0x5a8ec8),'description':_0x4c2acb,'connectTimeout':_0x4e8295,'readTimeout':_0x49e461,'endpointUrlRaw':_0x587b82,'channelConfigRaw':_0x5a8ec8};}export async function requireExactNotificationConfig(_0x4f249b,_0x2758d5,_0x5d9cfa){const _0x2d929e=a157_0x37a4f8;let _0x5cb28f;try{_0x5cb28f=await getNotificationChannelConfig(_0x2758d5,_0x4f249b);}catch{throw safeApiFailure(_0x5d9cfa,_0x2d929e(0xbf),_0x2d929e(0x118)+_0x4f249b+_0x2d929e(0x11b));}return normalizeExactNotificationConfig(_0x5cb28f,_0x2758d5,_0x4f249b);}export function projectNotificationConfig(_0x17b97c){const _0x50e6f9=a157_0x37a4f8;return{'id':_0x17b97c['id']??null,'appCode':_0x17b97c[_0x50e6f9(0xbc)],'configCode':_0x17b97c['configCode']??null,'configName':_0x17b97c['configName'],'channelType':_0x17b97c[_0x50e6f9(0xc7)],'endpointUrl':redactSensitive(_0x17b97c[_0x50e6f9(0xef)]),'channelConfig':redactSensitive(_0x17b97c['channelConfig']),'description':_0x17b97c[_0x50e6f9(0x10d)]??null,'connectTimeout':_0x17b97c[_0x50e6f9(0xe3)]??null,'readTimeout':_0x17b97c[_0x50e6f9(0x109)]??null};}export function notificationSelector(_0x30859b){const _0x39f4e5=a157_0x37a4f8;return{'appCode':_0x30859b[_0x39f4e5(0xbc)],'id':_0x30859b['id'],'configCode':_0x30859b[_0x39f4e5(0xe5)],'configName':_0x30859b[_0x39f4e5(0xfd)],'channelType':_0x30859b[_0x39f4e5(0xc7)]};}export function createMutationInput(_0x1854ca,_0x4794dd){const _0x10ccf0=a157_0x37a4f8;return{'appCode':_0x1854ca,'configName':_0x4794dd[_0x10ccf0(0xfd)],'channelType':_0x4794dd['channelType'],...hasOwn(_0x4794dd,_0x10ccf0(0xef))?{'endpointUrl':_0x4794dd[_0x10ccf0(0xef)]}:{},...hasOwn(_0x4794dd,_0x10ccf0(0xd5))?{'channelConfig':serializeChannelConfig(_0x4794dd[_0x10ccf0(0xd5)])}:{},...hasOwn(_0x4794dd,_0x10ccf0(0x10d))?{'description':_0x4794dd[_0x10ccf0(0x10d)]}:{},...hasOwn(_0x4794dd,_0x10ccf0(0xe3))?{'connectTimeout':_0x4794dd[_0x10ccf0(0xe3)]}:{},...hasOwn(_0x4794dd,'readTimeout')?{'readTimeout':_0x4794dd['readTimeout']}:{}};}export function mergeUpdateInput(_0x20a42f,_0x5ed855){const _0x5b9ac0=a157_0x37a4f8;return{'id':_0x20a42f['id'],'appCode':_0x20a42f[_0x5b9ac0(0xbc)],'configName':_0x5ed855[_0x5b9ac0(0xfd)]??_0x20a42f[_0x5b9ac0(0xfd)],'channelType':_0x5ed855[_0x5b9ac0(0xc7)]??_0x20a42f[_0x5b9ac0(0xc7)],'endpointUrl':hasOwn(_0x5ed855,_0x5b9ac0(0xef))?_0x5ed855['endpointUrl']:_0x20a42f['endpointUrlRaw'],'channelConfig':hasOwn(_0x5ed855,_0x5b9ac0(0xd5))?serializeChannelConfig(_0x5ed855[_0x5b9ac0(0xd5)]):_0x20a42f[_0x5b9ac0(0xd4)],'description':hasOwn(_0x5ed855,_0x5b9ac0(0x10d))?_0x5ed855[_0x5b9ac0(0x10d)]:_0x20a42f[_0x5b9ac0(0x10d)],'connectTimeout':hasOwn(_0x5ed855,'connectTimeout')?_0x5ed855[_0x5b9ac0(0xe3)]:_0x20a42f[_0x5b9ac0(0xe3)],'readTimeout':hasOwn(_0x5ed855,_0x5b9ac0(0x109))?_0x5ed855[_0x5b9ac0(0x109)]:_0x20a42f[_0x5b9ac0(0x109)]};}export function plannedUpdateProjection(_0x2d6464,_0x4ec200){const _0x1999e3=a157_0x37a4f8;return projectNotificationConfig({'id':_0x2d6464['id'],'appCode':_0x2d6464[_0x1999e3(0xbc)],'configCode':_0x2d6464[_0x1999e3(0xe5)],'configName':_0x4ec200[_0x1999e3(0xfd)]??_0x2d6464[_0x1999e3(0xfd)],'channelType':_0x4ec200[_0x1999e3(0xc7)]??_0x2d6464['channelType'],'endpointUrl':hasOwn(_0x4ec200,_0x1999e3(0xef))?_0x4ec200[_0x1999e3(0xef)]:_0x2d6464[_0x1999e3(0x10f)],'channelConfig':hasOwn(_0x4ec200,_0x1999e3(0xd5))?_0x4ec200['channelConfig']:_0x2d6464[_0x1999e3(0xd4)],'description':hasOwn(_0x4ec200,_0x1999e3(0x10d))?_0x4ec200[_0x1999e3(0x10d)]:_0x2d6464['description'],'connectTimeout':hasOwn(_0x4ec200,'connectTimeout')?_0x4ec200[_0x1999e3(0xe3)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2d6464[_0x1999e3(0xe3)],'readTimeout':hasOwn(_0x4ec200,_0x1999e3(0x109))?_0x4ec200[_0x1999e3(0x109)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2d6464['readTimeout']});}export function requestedSafeFieldsMatch(_0xaf5a4d,_0x203a6e,_0xd657bf){const _0x2e1575=a157_0x37a4f8,_0x29e9c9=[],_0x7f0c8d=[],_0x411c98=[];for(const _0x4f0fba of[_0x2e1575(0xfd),_0x2e1575(0xc7),'description']){if(!hasOwn(_0xd657bf,_0x4f0fba))continue;_0x411c98[_0x2e1575(0xc4)](_0x4f0fba),_0x29e9c9[_0x2e1575(0xc4)](_0x203a6e[_0x4f0fba]===_0xd657bf[_0x4f0fba]),_0x7f0c8d[_0x2e1575(0xc4)](_0xaf5a4d[_0x4f0fba]!==_0xd657bf[_0x4f0fba]&&_0x203a6e[_0x4f0fba]===_0xd657bf[_0x4f0fba]);}for(const _0x5ca010 of[_0x2e1575(0xe3),_0x2e1575(0x109)]){if(!hasOwn(_0xd657bf,_0x5ca010))continue;const _0x27e2d8=_0xd657bf[_0x5ca010]??(_0x5ca010===_0x2e1575(0xe3)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x411c98[_0x2e1575(0xc4)](_0x5ca010),_0x29e9c9[_0x2e1575(0xc4)](_0x203a6e[_0x5ca010]===_0x27e2d8),_0x7f0c8d[_0x2e1575(0xc4)](_0xaf5a4d[_0x5ca010]!==_0x27e2d8&&_0x203a6e[_0x5ca010]===_0x27e2d8);}return hasOwn(_0xd657bf,_0x2e1575(0xef))&&_0xd657bf['endpointUrl']===null&&(_0x411c98[_0x2e1575(0xc4)](_0x2e1575(0xfc)),_0x29e9c9[_0x2e1575(0xc4)](_0x203a6e[_0x2e1575(0x10f)]===null||_0x203a6e[_0x2e1575(0x10f)]===''),_0x7f0c8d[_0x2e1575(0xc4)](_0xaf5a4d[_0x2e1575(0x10f)]!==null&&_0xaf5a4d[_0x2e1575(0x10f)]!==''&&(_0x203a6e[_0x2e1575(0x10f)]===null||_0x203a6e[_0x2e1575(0x10f)]===''))),{'allMatch':_0x29e9c9[_0x2e1575(0x132)](Boolean),'provesChange':_0x7f0c8d[_0x2e1575(0xb3)](Boolean),'verifiedFields':_0x411c98};}export function validateNotificationDeleteReadback(_0x1ff2c9,_0x22db7a,_0xc3e318){const _0x456b1b=a157_0x37a4f8;for(const [_0x12d7e0,_0x158d48]of _0x1ff2c9[_0x456b1b(0xde)]()){if(!Number[_0x456b1b(0xe4)](_0x158d48['id'])||_0x158d48['id']<=0x0)throw notificationError(_0x456b1b(0xf5),_0x456b1b(0xb2)+(_0x12d7e0+0x1)+_0x456b1b(0xca));if(_0x158d48[_0x456b1b(0xbc)]!==_0x22db7a)throw notificationError(_0x456b1b(0xf5),_0x456b1b(0xb2)+(_0x12d7e0+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x158d48['channelType']!==_0xc3e318)throw notificationError(_0x456b1b(0xf5),_0x456b1b(0xb2)+(_0x12d7e0+0x1)+_0x456b1b(0x126));}}export function safeApiFailure(_0x2bf42e,_0x101322,_0x45629a){const _0x369184=a157_0x37a4f8;return notificationError('notification_config_'+_0x2bf42e+'_'+(_0x101322===_0x369184(0x115)?'failed':_0x101322+_0x369184(0x12e)),_0x369184(0x127)+_0x2bf42e+'\x20'+_0x101322+_0x369184(0x125),_0x45629a);}export function notificationLookupCommand(_0x318c4b,_0x3dda76){const _0x5d6435=a157_0x37a4f8;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x318c4b+_0x5d6435(0xeb)+_0x3dda76+_0x5d6435(0xce);}function validateNotificationDocument(_0x10aef2,_0x2a39c4){const _0x56934b=a157_0x37a4f8;for(const _0x7d91c6 of Object[_0x56934b(0xd0)](_0x10aef2)){if(FORBIDDEN_IDENTITY_FIELDS[_0x56934b(0x119)](_0x7d91c6))throw notificationError(_0x56934b(0x123),'Notification\x20JSON\x20field\x20\x22'+_0x7d91c6+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x56934b(0x119)](_0x7d91c6))throw notificationError(_0x56934b(0xc2),_0x56934b(0x10b)+_0x7d91c6+'\x22.');}if(_0x2a39c4==='update'&&Object[_0x56934b(0xd0)](_0x10aef2)[_0x56934b(0xbe)]===0x0)throw notificationError(_0x56934b(0xcb),_0x56934b(0x12a));const _0x32bef9={};if(hasOwn(_0x10aef2,_0x56934b(0xfd)))_0x32bef9['configName']=validateRequiredString(_0x10aef2[_0x56934b(0xfd)],_0x56934b(0xfd),0x80);else{if(_0x2a39c4===_0x56934b(0x11a))throw notificationError(_0x56934b(0x101),_0x56934b(0x124)+_0x56934b(0xff));}if(hasOwn(_0x10aef2,'channelType')){if(typeof _0x10aef2[_0x56934b(0xc7)]!==_0x56934b(0xe2))throw invalidFieldType(_0x56934b(0xc7),_0x56934b(0xd7));const _0x5ca6aa=_0x10aef2[_0x56934b(0xc7)][_0x56934b(0x11f)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x56934b(0x102)](_0x5ca6aa))throw notificationError('notification_config_field_invalid',_0x56934b(0xd9),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x32bef9[_0x56934b(0xc7)]=_0x5ca6aa;}else{if(_0x2a39c4===_0x56934b(0x11a))throw notificationError(_0x56934b(0x101),_0x56934b(0x124)+_0x56934b(0xf2));}for(const [_0x47e109,_0x3e9f5f]of[[_0x56934b(0xef),0x200],[_0x56934b(0x10d),0x100]]){if(!hasOwn(_0x10aef2,_0x47e109))continue;const _0x46eb7c=_0x10aef2[_0x47e109];if(_0x46eb7c!==null&&typeof _0x46eb7c!=='string')throw invalidFieldType(_0x47e109,_0x56934b(0xf0));if(typeof _0x46eb7c===_0x56934b(0xe2)&&_0x46eb7c['length']>_0x3e9f5f)throw notificationError(_0x56934b(0xb5),_0x56934b(0x133)+_0x47e109+_0x56934b(0xd6)+_0x3e9f5f+_0x56934b(0xc6));_0x32bef9[_0x47e109]=_0x46eb7c;}if(hasOwn(_0x10aef2,_0x56934b(0xd5))){const _0x4d1bbf=_0x10aef2[_0x56934b(0xd5)];if(_0x4d1bbf===null&&_0x2a39c4===_0x56934b(0x11a))throw invalidFieldType(_0x56934b(0xd5),_0x56934b(0xe0));if(_0x4d1bbf!==null&&!isJsonObject(_0x4d1bbf))throw invalidFieldType('channelConfig',_0x2a39c4===_0x56934b(0xd2)?_0x56934b(0x106):_0x56934b(0xe0));_0x4d1bbf!==null&&validateChannelConfigFields(_0x32bef9['channelType'],_0x4d1bbf),_0x32bef9[_0x56934b(0xd5)]=_0x4d1bbf;}for(const _0x5ed19f of[_0x56934b(0xe3),_0x56934b(0x109)]){if(!hasOwn(_0x10aef2,_0x5ed19f))continue;const _0x333a2e=_0x10aef2[_0x5ed19f];if(_0x333a2e!==null&&(!Number[_0x56934b(0xe4)](_0x333a2e)||_0x333a2e<0x0))throw notificationError('notification_config_field_invalid',_0x56934b(0x133)+_0x5ed19f+_0x56934b(0xee));_0x32bef9[_0x5ed19f]=_0x333a2e;}return _0x32bef9;}function validateRequiredString(_0x53cd78,_0x4b9622,_0x3332be){const _0x523413=a157_0x37a4f8;if(typeof _0x53cd78!==_0x523413(0xe2))throw invalidFieldType(_0x4b9622,_0x523413(0x130));const _0x40eee0=_0x53cd78['trim']();if(!_0x40eee0)throw notificationError(_0x523413(0xb5),_0x523413(0x133)+_0x4b9622+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x40eee0[_0x523413(0xbe)]>_0x3332be)throw notificationError(_0x523413(0xb5),_0x523413(0x133)+_0x4b9622+_0x523413(0xd6)+_0x3332be+_0x523413(0xc6));return _0x40eee0;}function validateChannelConfigFields(_0x5ac20f,_0xfbd027){const _0x33aeb4=a157_0x37a4f8;if(hasOwn(_0xfbd027,_0x33aeb4(0xbb)))throw forbiddenChannelConfigField(_0x33aeb4(0xbb));if(_0x5ac20f===_0x33aeb4(0x129))for(const _0x300df0 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0xfbd027,_0x300df0))throw forbiddenChannelConfigField(_0x300df0);}}function forbiddenChannelConfigField(_0x49d594){const _0x482c35=a157_0x37a4f8;return notificationError('notification_config_channel_field_forbidden',_0x482c35(0xd3)+_0x49d594+_0x482c35(0xf3));}function invalidFieldType(_0x4fdfd7,_0x40877b){const _0x23cf96=a157_0x37a4f8;return notificationError(_0x23cf96(0xb5),_0x23cf96(0x133)+_0x4fdfd7+'\x22\x20must\x20be\x20'+_0x40877b+'.');}function serializeChannelConfig(_0x30ffee){const _0x42d83e=a157_0x37a4f8;return _0x30ffee===null||_0x30ffee===undefined?null:JSON[_0x42d83e(0xdc)](_0x30ffee);}function redactSensitive(_0x1b882f){const _0x1ea55c=a157_0x37a4f8;return _0x1b882f===null||_0x1b882f===undefined||_0x1b882f===''?null:_0x1ea55c(0x131);}function requireResponseString(_0x1f900a,_0x4e8e69,_0x270ea1){const _0x32a5ae=a157_0x37a4f8;if(typeof _0x1f900a!=='string'||_0x1f900a[_0x32a5ae(0x11f)]()==='')throw CliErrors[_0x32a5ae(0x120)](_0x32a5ae(0xed),'Item\x20'+(_0x270ea1+0x1)+_0x32a5ae(0x10c)+_0x4e8e69+'\x22.');return _0x1f900a[_0x32a5ae(0x11f)]();}function requireExactString(_0x4d6880,_0x44e26a,_0x1d16aa){const _0x420240=a157_0x37a4f8;if(typeof _0x4d6880!==_0x420240(0xe2)||_0x4d6880[_0x420240(0x11f)]()==='')throw notificationError(_0x420240(0xf5),_0x420240(0x127)+_0x1d16aa+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x44e26a+'\x22.');return _0x4d6880[_0x420240(0x11f)]();}function responseNullableString(_0x22b343,_0x237a51,_0x4e5098){const _0x467376=a157_0x37a4f8;if(_0x22b343===undefined||_0x22b343===null)return null;if(typeof _0x22b343!==_0x467376(0xe2))throw notificationError('notification_config_response_invalid',_0x467376(0x127)+_0x4e5098+_0x467376(0xe8)+_0x237a51+'\x22.');return _0x22b343;}function responseNullableTimeout(_0x47f6bb,_0x4d1e24,_0x6509fc){const _0x30a3c2=a157_0x37a4f8;if(_0x47f6bb===undefined||_0x47f6bb===null)return null;if(!Number['isSafeInteger'](_0x47f6bb)||_0x47f6bb<0x0)throw notificationError(_0x30a3c2(0xf5),_0x30a3c2(0x127)+_0x6509fc+_0x30a3c2(0xe8)+_0x4d1e24+'\x22.');return _0x47f6bb;}function normalizeNullableString(_0xf73874){return typeof _0xf73874==='string'?_0xf73874:null;}function a157_0xd6b1(_0xd6ac8d,_0x23b785){_0xd6ac8d=_0xd6ac8d-0xb1;const _0x542b82=a157_0x542b();let _0xd6b1ca=_0x542b82[_0xd6ac8d];return _0xd6b1ca;}function isJsonObject(_0x15f47c){const _0x504b16=a157_0x37a4f8;return _0x15f47c!==null&&typeof _0x15f47c===_0x504b16(0x12f)&&!Array[_0x504b16(0xe6)](_0x15f47c);}function hasOwn(_0x5e2f6c,_0x1c74c6){const _0x105e7c=a157_0x37a4f8;return Object[_0x105e7c(0x108)][_0x105e7c(0xfa)]['call'](_0x5e2f6c,_0x1c74c6);}async function readStdin(){const _0x429056=a157_0x37a4f8;let _0x48c78e='';process[_0x429056(0x122)][_0x429056(0x12c)](_0x429056(0x107));for await(const _0x9753ba of process[_0x429056(0x122)])_0x48c78e+=_0x9753ba;return _0x48c78e;}
|
|
1
|
+
const a157_0x43d0bd=a157_0x3e62;(function(_0x4eaa10,_0x59f345){const _0x5a0650=a157_0x3e62,_0x2065e6=_0x4eaa10();while(!![]){try{const _0x290249=-parseInt(_0x5a0650(0x117))/0x1+parseInt(_0x5a0650(0x160))/0x2*(parseInt(_0x5a0650(0xf6))/0x3)+parseInt(_0x5a0650(0xfc))/0x4*(-parseInt(_0x5a0650(0x128))/0x5)+parseInt(_0x5a0650(0xfe))/0x6+parseInt(_0x5a0650(0x15b))/0x7*(parseInt(_0x5a0650(0x14c))/0x8)+parseInt(_0x5a0650(0x166))/0x9+-parseInt(_0x5a0650(0x131))/0xa;if(_0x290249===_0x59f345)break;else _0x2065e6['push'](_0x2065e6['shift']());}catch(_0x4518f6){_0x2065e6['push'](_0x2065e6['shift']());}}}(a157_0x2cbc,0xd1d03));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=['EMAIL','FEISHU',a157_0x43d0bd(0xf3),a157_0x43d0bd(0xf8),a157_0x43d0bd(0x14f)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a157_0x43d0bd(0x134),'channelType',a157_0x43d0bd(0xfb),'channelConfig','description',a157_0x43d0bd(0xf0),a157_0x43d0bd(0x13b)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a157_0x43d0bd(0x168),a157_0x43d0bd(0x15d),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x43d0bd(0x109),a157_0x43d0bd(0x151),a157_0x43d0bd(0x142),a157_0x43d0bd(0x14a),a157_0x43d0bd(0x16b),a157_0x43d0bd(0xee),a157_0x43d0bd(0x169),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a157_0x43d0bd(0x108),'type':a157_0x43d0bd(0x10b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a157_0x43d0bd(0x156),'required':![],'default':![],'description':a157_0x43d0bd(0x140)},{'name':a157_0x43d0bd(0x10a),'type':a157_0x43d0bd(0x10b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x43d0bd(0x100),'required':!![],'description':a157_0x43d0bd(0x126)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3ee723,_0x43bea4,_0x4d7ccc){return new CliError(_0x3ee723,0x1,_0x43bea4,_0x4d7ccc);}export function readNotificationId(_0x5f01cc){const _0xd9eb6c=a157_0x43d0bd,_0x58643d=_0x5f01cc['num']('id');if(!Number[_0xd9eb6c(0x139)](_0x58643d)||_0x58643d<=0x0)throw notificationError('notification_config_id_invalid',_0xd9eb6c(0x106));return _0x58643d;}export function requireNotificationExplicitYes(_0x2974e7){const _0x4d6b6d=a157_0x43d0bd;if(_0x2974e7[_0x4d6b6d(0x144)](_0x4d6b6d(0x104))||_0x2974e7[_0x4d6b6d(0x144)](_0x4d6b6d(0x10f)))return;throw notificationError('notification_config_confirmation_required',_0x4d6b6d(0x136),_0x4d6b6d(0x145));}export function readNotificationChannelType(_0x45d0dc,_0x15ea5c='type',_0x2a6520=a157_0x43d0bd(0x12f)){const _0x3f437f=a157_0x43d0bd,_0x1016db=_0x45d0dc[_0x3f437f(0x152)](_0x15ea5c)['trim']()||_0x2a6520;if(!NOTIFICATION_CHANNEL_TYPES[_0x3f437f(0x10e)](_0x1016db))throw CliErrors[_0x3f437f(0x15c)](_0x3f437f(0x13f)+_0x15ea5c+':\x20'+_0x1016db,_0x3f437f(0x127)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1016db;}export function assertSingleNotificationSource(_0xc3f528){const _0x174505=a157_0x43d0bd,_0x30dac4=[],_0x4aded8=_0xc3f528[_0x174505(0x152)](_0x174505(0x108))[_0x174505(0x147)]();if(_0x4aded8)_0x30dac4[_0x174505(0x111)]({'kind':'file','path':_0x4aded8});if(_0xc3f528[_0x174505(0x144)](_0x174505(0x14d)))_0x30dac4[_0x174505(0x111)]({'kind':_0x174505(0x14d)});const _0x591f1f=_0xc3f528[_0x174505(0x152)](_0x174505(0x10a))[_0x174505(0x147)]();if(_0x591f1f)_0x30dac4[_0x174505(0x111)]({'kind':'env','name':_0x591f1f});if(_0x30dac4[_0x174505(0x13e)]===0x0)throw CliErrors[_0x174505(0x15c)](_0x174505(0x10c),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x30dac4[_0x174505(0x13e)]>0x1)throw CliErrors[_0x174505(0x15c)](_0x174505(0x155),_0x174505(0xf9));return _0x30dac4[0x0];}export async function readNotificationDocument(_0x27ede7,_0x4ef74f){const _0xb5c43f=a157_0x43d0bd,_0x247a0c=assertSingleNotificationSource(_0x27ede7),_0x46cb22=_0x247a0c['kind']===_0xb5c43f(0x108)?_0xb5c43f(0x146)+_0x247a0c['path']:_0x247a0c['kind']===_0xb5c43f(0x12a)?_0xb5c43f(0xf1)+_0x247a0c[_0xb5c43f(0x157)]:_0xb5c43f(0x14d);let _0x498e05;try{if(_0x247a0c[_0xb5c43f(0x12e)]==='file')_0x498e05=await readFile(_0x247a0c['path'],'utf8');else{if(_0x247a0c[_0xb5c43f(0x12e)]===_0xb5c43f(0x12a)){if(!(_0x247a0c[_0xb5c43f(0x157)]in process.env))throw notificationError(_0xb5c43f(0x153),_0xb5c43f(0x122)+_0x247a0c['name']);_0x498e05=process.env[_0x247a0c.name]??'';}else _0x498e05=await readStdin();}}catch(_0x2d0005){if(_0x2d0005 instanceof CliError)throw _0x2d0005;throw notificationError(_0xb5c43f(0x153),_0xb5c43f(0x15e)+_0x46cb22+'.');}let _0x17521a;try{_0x17521a=JSON[_0xb5c43f(0xfa)](_0x498e05);}catch{throw notificationError('notification_config_json_invalid',_0xb5c43f(0x114)+_0x46cb22+_0xb5c43f(0x11b),_0xb5c43f(0x14e));}if(!isJsonObject(_0x17521a))throw notificationError('notification_config_json_invalid',_0xb5c43f(0x114)+_0x46cb22+_0xb5c43f(0x112));return validateNotificationDocument(_0x17521a,_0x4ef74f);}export function projectNotificationListConfig(_0x1937cd,_0xfc7b9c){const _0x3e53fe=a157_0x43d0bd;return{'id':typeof _0x1937cd['id']===_0x3e53fe(0x100)?_0x1937cd['id']:null,'configCode':requireResponseString(_0x1937cd[_0x3e53fe(0x15d)],'configCode',_0xfc7b9c),'configName':requireResponseString(_0x1937cd['configName'],_0x3e53fe(0x134),_0xfc7b9c),'channelType':requireResponseString(_0x1937cd[_0x3e53fe(0x148)],_0x3e53fe(0x148),_0xfc7b9c),'description':normalizeNullableString(_0x1937cd[_0x3e53fe(0x12c)]),'createTime':normalizeNullableString(_0x1937cd['createTime']),'updateTime':normalizeNullableString(_0x1937cd[_0x3e53fe(0x11a)])};}export function normalizeExactNotificationConfig(_0xd22d4a,_0x8d8b24,_0x22ca36){const _0x5d0790=a157_0x43d0bd;if(!Number['isSafeInteger'](_0xd22d4a['id'])||_0xd22d4a['id']!==_0x8d8b24)throw notificationError(_0x5d0790(0x165),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x8d8b24+'.');if(_0xd22d4a[_0x5d0790(0x168)]!==_0x22ca36)throw notificationError('notification_config_response_invalid',_0x5d0790(0x163)+_0x8d8b24+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x4f22e3=requireExactString(_0xd22d4a[_0x5d0790(0x134)],_0x5d0790(0x134),_0x8d8b24),_0x2670e3=requireExactString(_0xd22d4a['configCode'],_0x5d0790(0x15d),_0x8d8b24),_0x222404=requireExactString(_0xd22d4a[_0x5d0790(0x148)],_0x5d0790(0x148),_0x8d8b24);if(!NOTIFICATION_CHANNEL_TYPES[_0x5d0790(0x10e)](_0x222404))throw notificationError(_0x5d0790(0x165),'Notification\x20config\x20'+_0x8d8b24+_0x5d0790(0x150));const _0x157ffa=responseNullableString(_0xd22d4a[_0x5d0790(0xfb)],_0x5d0790(0xfb),_0x8d8b24),_0x18a0bc=responseNullableString(_0xd22d4a[_0x5d0790(0x121)],_0x5d0790(0x121),_0x8d8b24),_0x335def=responseNullableString(_0xd22d4a[_0x5d0790(0x12c)],_0x5d0790(0x12c),_0x8d8b24),_0x3a45ea=responseNullableTimeout(_0xd22d4a['connectTimeout'],_0x5d0790(0xf0),_0x8d8b24),_0x4d417e=responseNullableTimeout(_0xd22d4a[_0x5d0790(0x13b)],'readTimeout',_0x8d8b24);return{'id':_0x8d8b24,'appCode':_0x22ca36,'configCode':_0x2670e3,'configName':_0x4f22e3,'channelType':_0x222404,'endpointUrl':redactSensitive(_0x157ffa),'channelConfig':redactSensitive(_0x18a0bc),'description':_0x335def,'connectTimeout':_0x3a45ea,'readTimeout':_0x4d417e,'endpointUrlRaw':_0x157ffa,'channelConfigRaw':_0x18a0bc};}export async function requireExactNotificationConfig(_0x522249,_0x564295,_0x2979e0){const _0x3a1636=a157_0x43d0bd;let _0x282623;try{_0x282623=await getNotificationChannelConfig(_0x564295,_0x522249);}catch{throw safeApiFailure(_0x2979e0,'preflight',_0x3a1636(0x161)+_0x522249+_0x3a1636(0x12b));}return normalizeExactNotificationConfig(_0x282623,_0x564295,_0x522249);}export function projectNotificationConfig(_0x47b694){const _0x1c8348=a157_0x43d0bd;return{'id':_0x47b694['id']??null,'appCode':_0x47b694[_0x1c8348(0x168)],'configCode':_0x47b694['configCode']??null,'configName':_0x47b694[_0x1c8348(0x134)],'channelType':_0x47b694[_0x1c8348(0x148)],'endpointUrl':redactSensitive(_0x47b694[_0x1c8348(0xfb)]),'channelConfig':redactSensitive(_0x47b694[_0x1c8348(0x121)]),'description':_0x47b694[_0x1c8348(0x12c)]??null,'connectTimeout':_0x47b694[_0x1c8348(0xf0)]??null,'readTimeout':_0x47b694[_0x1c8348(0x13b)]??null};}export function notificationSelector(_0x1088cd){const _0x4e7d5f=a157_0x43d0bd;return{'appCode':_0x1088cd[_0x4e7d5f(0x168)],'id':_0x1088cd['id'],'configCode':_0x1088cd[_0x4e7d5f(0x15d)],'configName':_0x1088cd[_0x4e7d5f(0x134)],'channelType':_0x1088cd[_0x4e7d5f(0x148)]};}export function createMutationInput(_0x4d2f74,_0x50aa51){const _0x288057=a157_0x43d0bd;return{'appCode':_0x4d2f74,'configName':_0x50aa51[_0x288057(0x134)],'channelType':_0x50aa51['channelType'],...hasOwn(_0x50aa51,_0x288057(0xfb))?{'endpointUrl':_0x50aa51[_0x288057(0xfb)]}:{},...hasOwn(_0x50aa51,_0x288057(0x121))?{'channelConfig':serializeChannelConfig(_0x50aa51[_0x288057(0x121)])}:{},...hasOwn(_0x50aa51,_0x288057(0x12c))?{'description':_0x50aa51[_0x288057(0x12c)]}:{},...hasOwn(_0x50aa51,_0x288057(0xf0))?{'connectTimeout':_0x50aa51['connectTimeout']}:{},...hasOwn(_0x50aa51,_0x288057(0x13b))?{'readTimeout':_0x50aa51[_0x288057(0x13b)]}:{}};}export function mergeUpdateInput(_0x3f5c16,_0x1ee7b6){const _0x256e06=a157_0x43d0bd;return{'id':_0x3f5c16['id'],'appCode':_0x3f5c16[_0x256e06(0x168)],'configName':_0x1ee7b6[_0x256e06(0x134)]??_0x3f5c16[_0x256e06(0x134)],'channelType':_0x1ee7b6['channelType']??_0x3f5c16[_0x256e06(0x148)],'endpointUrl':hasOwn(_0x1ee7b6,_0x256e06(0xfb))?_0x1ee7b6[_0x256e06(0xfb)]:_0x3f5c16[_0x256e06(0xed)],'channelConfig':hasOwn(_0x1ee7b6,_0x256e06(0x121))?serializeChannelConfig(_0x1ee7b6['channelConfig']):_0x3f5c16[_0x256e06(0x13c)],'description':hasOwn(_0x1ee7b6,_0x256e06(0x12c))?_0x1ee7b6[_0x256e06(0x12c)]:_0x3f5c16[_0x256e06(0x12c)],'connectTimeout':hasOwn(_0x1ee7b6,'connectTimeout')?_0x1ee7b6[_0x256e06(0xf0)]:_0x3f5c16[_0x256e06(0xf0)],'readTimeout':hasOwn(_0x1ee7b6,_0x256e06(0x13b))?_0x1ee7b6[_0x256e06(0x13b)]:_0x3f5c16[_0x256e06(0x13b)]};}export function plannedUpdateProjection(_0x15d7e5,_0x81fc32){const _0x3ab044=a157_0x43d0bd;return projectNotificationConfig({'id':_0x15d7e5['id'],'appCode':_0x15d7e5[_0x3ab044(0x168)],'configCode':_0x15d7e5[_0x3ab044(0x15d)],'configName':_0x81fc32[_0x3ab044(0x134)]??_0x15d7e5['configName'],'channelType':_0x81fc32['channelType']??_0x15d7e5[_0x3ab044(0x148)],'endpointUrl':hasOwn(_0x81fc32,_0x3ab044(0xfb))?_0x81fc32[_0x3ab044(0xfb)]:_0x15d7e5['endpointUrlRaw'],'channelConfig':hasOwn(_0x81fc32,_0x3ab044(0x121))?_0x81fc32[_0x3ab044(0x121)]:_0x15d7e5[_0x3ab044(0x13c)],'description':hasOwn(_0x81fc32,_0x3ab044(0x12c))?_0x81fc32['description']:_0x15d7e5[_0x3ab044(0x12c)],'connectTimeout':hasOwn(_0x81fc32,_0x3ab044(0xf0))?_0x81fc32[_0x3ab044(0xf0)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x15d7e5[_0x3ab044(0xf0)],'readTimeout':hasOwn(_0x81fc32,_0x3ab044(0x13b))?_0x81fc32['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x15d7e5[_0x3ab044(0x13b)]});}export function requestedSafeFieldsMatch(_0x5e29cc,_0x2d642d,_0x30fe5e){const _0x4529e0=a157_0x43d0bd,_0x3a3dc2=[],_0x51478d=[],_0x184e1d=[];for(const _0xf58648 of[_0x4529e0(0x134),_0x4529e0(0x148),_0x4529e0(0x12c)]){if(!hasOwn(_0x30fe5e,_0xf58648))continue;_0x184e1d[_0x4529e0(0x111)](_0xf58648),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0xf58648]===_0x30fe5e[_0xf58648]),_0x51478d[_0x4529e0(0x111)](_0x5e29cc[_0xf58648]!==_0x30fe5e[_0xf58648]&&_0x2d642d[_0xf58648]===_0x30fe5e[_0xf58648]);}for(const _0x1e100f of[_0x4529e0(0xf0),_0x4529e0(0x13b)]){if(!hasOwn(_0x30fe5e,_0x1e100f))continue;const _0x2adba2=_0x30fe5e[_0x1e100f]??(_0x1e100f===_0x4529e0(0xf0)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x184e1d['push'](_0x1e100f),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0x1e100f]===_0x2adba2),_0x51478d['push'](_0x5e29cc[_0x1e100f]!==_0x2adba2&&_0x2d642d[_0x1e100f]===_0x2adba2);}return hasOwn(_0x30fe5e,_0x4529e0(0xfb))&&_0x30fe5e[_0x4529e0(0xfb)]===null&&(_0x184e1d[_0x4529e0(0x111)](_0x4529e0(0x133)),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0x4529e0(0xed)]===null||_0x2d642d['endpointUrlRaw']===''),_0x51478d['push'](_0x5e29cc[_0x4529e0(0xed)]!==null&&_0x5e29cc['endpointUrlRaw']!==''&&(_0x2d642d['endpointUrlRaw']===null||_0x2d642d[_0x4529e0(0xed)]===''))),{'allMatch':_0x3a3dc2[_0x4529e0(0xf7)](Boolean),'provesChange':_0x51478d[_0x4529e0(0x159)](Boolean),'verifiedFields':_0x184e1d};}export function validateNotificationDeleteReadback(_0x3e645a,_0x5671e0,_0x5a82c2){const _0x18d168=a157_0x43d0bd;for(const [_0x1904e8,_0x18fa1d]of _0x3e645a[_0x18d168(0x158)]()){if(!Number['isSafeInteger'](_0x18fa1d['id'])||_0x18fa1d['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x18d168(0x119)+(_0x1904e8+0x1)+_0x18d168(0x154));if(_0x18fa1d[_0x18d168(0x168)]!==_0x5671e0)throw notificationError('notification_config_response_invalid',_0x18d168(0x119)+(_0x1904e8+0x1)+_0x18d168(0x138));if(_0x18fa1d[_0x18d168(0x148)]!==_0x5a82c2)throw notificationError(_0x18d168(0x165),'Notification\x20config\x20list\x20item\x20'+(_0x1904e8+0x1)+_0x18d168(0x132));}}export function safeApiFailure(_0xb8039a,_0x482455,_0x28f833){const _0x15cffb=a157_0x43d0bd;return notificationError(_0x15cffb(0x11d)+_0xb8039a+'_'+(_0x482455===_0x15cffb(0xf2)?'failed':_0x482455+'_unavailable'),_0x15cffb(0x163)+_0xb8039a+'\x20'+_0x482455+_0x15cffb(0x15f),_0x28f833);}function a157_0x3e62(_0x1114b5,_0x58f5c8){_0x1114b5=_0x1114b5-0xed;const _0x2cbc2a=a157_0x2cbc();let _0x3e62af=_0x2cbc2a[_0x1114b5];return _0x3e62af;}export function notificationLookupCommand(_0x1726c3,_0x21076b){const _0x5aa1f9=a157_0x43d0bd;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x1726c3+_0x5aa1f9(0x167)+_0x21076b+_0x5aa1f9(0x110);}function validateNotificationDocument(_0x216dc3,_0x2278a7){const _0x20a472=a157_0x43d0bd;for(const _0x4886aa of Object[_0x20a472(0x141)](_0x216dc3)){if(FORBIDDEN_IDENTITY_FIELDS[_0x20a472(0x12d)](_0x4886aa))throw notificationError(_0x20a472(0x135),_0x20a472(0x137)+_0x4886aa+_0x20a472(0x125));if(!ALLOWED_INPUT_FIELDS[_0x20a472(0x12d)](_0x4886aa))throw notificationError(_0x20a472(0x16a),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x4886aa+'\x22.');}if(_0x2278a7==='update'&&Object[_0x20a472(0x141)](_0x216dc3)['length']===0x0)throw notificationError(_0x20a472(0x149),_0x20a472(0x130));const _0xb7e9f={};if(hasOwn(_0x216dc3,_0x20a472(0x134)))_0xb7e9f['configName']=validateRequiredString(_0x216dc3[_0x20a472(0x134)],'configName',0x80);else{if(_0x2278a7===_0x20a472(0xf5))throw notificationError(_0x20a472(0x162),_0x20a472(0x164)+_0x20a472(0x120));}if(hasOwn(_0x216dc3,'channelType')){if(typeof _0x216dc3[_0x20a472(0x148)]!==_0x20a472(0x10b))throw invalidFieldType(_0x20a472(0x148),_0x20a472(0x143));const _0x5a536a=_0x216dc3[_0x20a472(0x148)][_0x20a472(0x147)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x20a472(0x10e)](_0x5a536a))throw notificationError(_0x20a472(0xfd),_0x20a472(0x107),_0x20a472(0x127)+NOTIFICATION_CHANNEL_TYPES[_0x20a472(0xf4)](',\x20')+'.');_0xb7e9f[_0x20a472(0x148)]=_0x5a536a;}else{if(_0x2278a7==='create')throw notificationError(_0x20a472(0x162),_0x20a472(0x164)+_0x20a472(0x118));}for(const [_0xe72660,_0x719837]of[[_0x20a472(0xfb),0x200],[_0x20a472(0x12c),0x100]]){if(!hasOwn(_0x216dc3,_0xe72660))continue;const _0x57644c=_0x216dc3[_0xe72660];if(_0x57644c!==null&&typeof _0x57644c!=='string')throw invalidFieldType(_0xe72660,'a\x20string\x20or\x20null');if(typeof _0x57644c===_0x20a472(0x10b)&&_0x57644c['length']>_0x719837)throw notificationError(_0x20a472(0xfd),_0x20a472(0x137)+_0xe72660+_0x20a472(0x103)+_0x719837+_0x20a472(0x115));_0xb7e9f[_0xe72660]=_0x57644c;}if(hasOwn(_0x216dc3,_0x20a472(0x121))){const _0x56b50e=_0x216dc3[_0x20a472(0x121)];if(_0x56b50e===null&&_0x2278a7==='create')throw invalidFieldType(_0x20a472(0x121),_0x20a472(0x13a));if(_0x56b50e!==null&&!isJsonObject(_0x56b50e))throw invalidFieldType(_0x20a472(0x121),_0x2278a7===_0x20a472(0x113)?_0x20a472(0x11e):_0x20a472(0x13a));_0x56b50e!==null&&validateChannelConfigFields(_0xb7e9f[_0x20a472(0x148)],_0x56b50e),_0xb7e9f[_0x20a472(0x121)]=_0x56b50e;}for(const _0x6013b0 of[_0x20a472(0xf0),_0x20a472(0x13b)]){if(!hasOwn(_0x216dc3,_0x6013b0))continue;const _0x205841=_0x216dc3[_0x6013b0];if(_0x205841!==null&&(!Number[_0x20a472(0x139)](_0x205841)||_0x205841<0x0))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x6013b0+_0x20a472(0x124));_0xb7e9f[_0x6013b0]=_0x205841;}return _0xb7e9f;}function validateRequiredString(_0x110357,_0x26ed33,_0xc2aea4){const _0x13e08e=a157_0x43d0bd;if(typeof _0x110357!==_0x13e08e(0x10b))throw invalidFieldType(_0x26ed33,'a\x20non-empty\x20string');const _0x38c798=_0x110357[_0x13e08e(0x147)]();if(!_0x38c798)throw notificationError('notification_config_field_invalid',_0x13e08e(0x137)+_0x26ed33+_0x13e08e(0x14b));if(_0x38c798[_0x13e08e(0x13e)]>_0xc2aea4)throw notificationError(_0x13e08e(0xfd),'Notification\x20JSON\x20field\x20\x22'+_0x26ed33+'\x22\x20cannot\x20exceed\x20'+_0xc2aea4+'\x20characters.');return _0x38c798;}function validateChannelConfigFields(_0x29de41,_0x46c2dc){const _0x3383e3=a157_0x43d0bd;if(hasOwn(_0x46c2dc,_0x3383e3(0x102)))throw forbiddenChannelConfigField(_0x3383e3(0x102));if(_0x29de41===_0x3383e3(0x12f))for(const _0x116b67 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x46c2dc,_0x116b67))throw forbiddenChannelConfigField(_0x116b67);}}function forbiddenChannelConfigField(_0x3701d7){const _0x73115c=a157_0x43d0bd;return notificationError('notification_config_channel_field_forbidden',_0x73115c(0x13d)+_0x3701d7+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x4dbfae,_0x4fb9cc){const _0x18f030=a157_0x43d0bd;return notificationError(_0x18f030(0xfd),_0x18f030(0x137)+_0x4dbfae+'\x22\x20must\x20be\x20'+_0x4fb9cc+'.');}function serializeChannelConfig(_0xa4f499){const _0x12cb0a=a157_0x43d0bd;return _0xa4f499===null||_0xa4f499===undefined?null:JSON[_0x12cb0a(0xef)](_0xa4f499);}function redactSensitive(_0x389060){const _0x4e522f=a157_0x43d0bd;return _0x389060===null||_0x389060===undefined||_0x389060===''?null:_0x4e522f(0xff);}function requireResponseString(_0x4419e5,_0x1a43d5,_0x11b606){const _0x1674f6=a157_0x43d0bd;if(typeof _0x4419e5!=='string'||_0x4419e5['trim']()==='')throw CliErrors[_0x1674f6(0x11f)](_0x1674f6(0x15a),_0x1674f6(0x10d)+(_0x11b606+0x1)+_0x1674f6(0x129)+_0x1a43d5+'\x22.');return _0x4419e5[_0x1674f6(0x147)]();}function requireExactString(_0x659b58,_0x5261d6,_0x5236c1){const _0x436b33=a157_0x43d0bd;if(typeof _0x659b58!==_0x436b33(0x10b)||_0x659b58[_0x436b33(0x147)]()==='')throw notificationError(_0x436b33(0x165),_0x436b33(0x163)+_0x5236c1+_0x436b33(0x129)+_0x5261d6+'\x22.');return _0x659b58[_0x436b33(0x147)]();}function responseNullableString(_0x4624af,_0x16c98b,_0x81df74){const _0x394417=a157_0x43d0bd;if(_0x4624af===undefined||_0x4624af===null)return null;if(typeof _0x4624af!==_0x394417(0x10b))throw notificationError(_0x394417(0x165),_0x394417(0x163)+_0x81df74+_0x394417(0x11c)+_0x16c98b+'\x22.');return _0x4624af;}function responseNullableTimeout(_0x2d5b9b,_0xccf686,_0x224416){const _0x216422=a157_0x43d0bd;if(_0x2d5b9b===undefined||_0x2d5b9b===null)return null;if(!Number['isSafeInteger'](_0x2d5b9b)||_0x2d5b9b<0x0)throw notificationError('notification_config_response_invalid',_0x216422(0x163)+_0x224416+_0x216422(0x11c)+_0xccf686+'\x22.');return _0x2d5b9b;}function normalizeNullableString(_0x250ffd){const _0x5ce6be=a157_0x43d0bd;return typeof _0x250ffd===_0x5ce6be(0x10b)?_0x250ffd:null;}function a157_0x2cbc(){const _0x35762d=['replyTo','endpointUrlRaw','subjectPrefix','stringify','connectTimeout','environment\x20variable\x20','mutation','DINGTALK','join','create','846093ktmqWm','every','WECOM','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','parse','endpointUrl','22620BeiTOy','notification_config_field_invalid','1109406kqNZGv','<redacted>','number','call','messageTemplate','\x22\x20cannot\x20exceed\x20','dry-run','isArray','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','file','emailTargets','from-env','string','Missing\x20notification\x20JSON\x20source.','Item\x20','includes','yes','\x20--format\x20compress','push','\x20must\x20be\x20an\x20object.','update','Notification\x20JSON\x20from\x20','\x20characters.','object','1243335KoGlzG','\x22channelType\x22.','Notification\x20config\x20list\x20item\x20','updateTime','\x20is\x20invalid.','\x20has\x20invalid\x20field\x20\x22','notification_config_','a\x20JSON\x20object\x20or\x20null','apiError','\x22configName\x22.','channelConfig','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','utf8','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Application-level\x20notification\x20config\x20ID','Allowed\x20values:\x20','575nwXhSy','\x20is\x20missing\x20required\x20field\x20\x22','env','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','description','has','kind','EMAIL','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','20946830FPdAOx','\x20has\x20an\x20invalid\x20channelType.','endpointUrl:null','configName','notification_config_field_forbidden','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Notification\x20JSON\x20field\x20\x22','\x20has\x20an\x20invalid\x20appCode.','isSafeInteger','a\x20JSON\x20object','readTimeout','channelConfigRaw','Notification\x20JSON\x20channelConfig\x20field\x20\x22','length','Invalid\x20--','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','keys','ccList','a\x20supported\x20string','bool','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','file\x20','trim','channelType','notification_config_update_empty','bccList','\x22\x20must\x20be\x20a\x20non-empty\x20string.','6392024aaWhCJ','stdin','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','WEBHOOK','\x20has\x20an\x20unsupported\x20channelType.','recipients','str','notification_config_source_unavailable','\x20has\x20an\x20invalid\x20id.','Notification\x20JSON\x20source\x20is\x20ambiguous.','boolean','name','entries','some','Invalid\x20notification\x20config\x20response.','14koSZQM','validation','configCode','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20failed.','10NJbuIj','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_required','Notification\x20config\x20','Create\x20JSON\x20requires\x20field\x20','notification_config_response_invalid','14892084SAdoRD','\x20--type\x20','appCode','fromName','notification_config_field_unknown'];a157_0x2cbc=function(){return _0x35762d;};return a157_0x2cbc();}function isJsonObject(_0x16ecbb){const _0x165f02=a157_0x43d0bd;return _0x16ecbb!==null&&typeof _0x16ecbb===_0x165f02(0x116)&&!Array[_0x165f02(0x105)](_0x16ecbb);}function hasOwn(_0x43b563,_0x58d2fc){const _0x340663=a157_0x43d0bd;return Object['prototype']['hasOwnProperty'][_0x340663(0x101)](_0x43b563,_0x58d2fc);}async function readStdin(){const _0x332b4b=a157_0x43d0bd;let _0x44f03d='';process[_0x332b4b(0x14d)]['setEncoding'](_0x332b4b(0x123));for await(const _0x7d7242 of process[_0x332b4b(0x14d)])_0x44f03d+=_0x7d7242;return _0x44f03d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x3df950=a158_0xbc1a;(function(_0x5d1d96,_0x163b8a){const _0x51088f=a158_0xbc1a,_0x3a7e30=_0x5d1d96();while(!![]){try{const _0x49fa63=parseInt(_0x51088f(0xfe))/0x1*(parseInt(_0x51088f(0x109))/0x2)+parseInt(_0x51088f(0xf1))/0x3*(-parseInt(_0x51088f(0xf9))/0x4)+parseInt(_0x51088f(0x11a))/0x5*(-parseInt(_0x51088f(0xfd))/0x6)+parseInt(_0x51088f(0x10a))/0x7*(-parseInt(_0x51088f(0x11c))/0x8)+-parseInt(_0x51088f(0xee))/0x9+-parseInt(_0x51088f(0x10c))/0xa*(parseInt(_0x51088f(0xf3))/0xb)+parseInt(_0x51088f(0xfb))/0xc;if(_0x49fa63===_0x163b8a)break;else _0x3a7e30['push'](_0x3a7e30['shift']());}catch(_0x119f66){_0x3a7e30['push'](_0x3a7e30['shift']());}}}(a158_0x4cc7,0x46cd4));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a158_0x4cc7(){const _0x162e02=['filePath','GET','count','/smartapi/common/uploadFile','1660vYUFFe','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','1836824ucpXBB','apiError','length','IdCard','imageFile','trim','path','fileUrl','3921327EIJswG','Table','idCard','12vBtCTn','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','33CTgYyn','form','recognize','File\x20URL\x20response\x20missing\x20fileUrl.','string','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','560684WoJRWW','toLowerCase','19947492oMVMdz','toString','3858dzXeRv','12nOEKns','/smartapi/ocr/recognize-text?','POST','appCode','invoice','ocr','File\x20upload\x20response\x20missing\x20filePath.','scene','idcard','fileName','image-url','26298rcJpAG','7iieULG','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','302030SYSwOj','/smartapi/ocr/recognize-text','image-file','general','imageUrl','Invoice','str','/smartapi/common/queryFileUrl','Preview:\x20recognize\x20','validation'];a158_0x4cc7=function(){return _0x162e02;};return a158_0x4cc7();}import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a158_0x3df950(0x102),a158_0x3df950(0x10f),a158_0x3df950(0xf4),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a158_0x3df950(0x111),'general':'General','form':a158_0x3df950(0xef),'idCard':a158_0x3df950(0x11f)},SCENE_FLAG={'name':a158_0x3df950(0x105),'type':a158_0x3df950(0xf7),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a158_0x3df950(0x11b)},IMAGE_FILE_FLAG={'name':a158_0x3df950(0x10e),'type':a158_0x3df950(0xf7),'description':a158_0x3df950(0x10b)},IMAGE_URL_FLAG={'name':a158_0x3df950(0x108),'type':a158_0x3df950(0xf7),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x4ee540){const _0x3aad2f=a158_0x3df950,_0x228cb0=_0x4ee540['trim']()[_0x3aad2f(0xfa)]();if(_0x228cb0===_0x3aad2f(0x106))return _0x3aad2f(0xf0);if(_0x228cb0===_0x3aad2f(0x102)||_0x228cb0===_0x3aad2f(0x10f)||_0x228cb0===_0x3aad2f(0xf4))return _0x228cb0;throw CliErrors[_0x3aad2f(0x115)]('Unsupported\x20OCR\x20scene:\x20'+_0x4ee540+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x5b3394){const _0x4eeece=a158_0x3df950,_0x3331d6=_0x5b3394[_0x4eeece(0x112)](_0x4eeece(0x10e))['trim'](),_0x6347c2=_0x5b3394['str'](_0x4eeece(0x108))[_0x4eeece(0xeb)]();return{'imageFile':_0x3331d6,'imageUrl':_0x6347c2,'count':[_0x3331d6,_0x6347c2]['filter'](Boolean)[_0x4eeece(0x11e)]};}function a158_0xbc1a(_0x174df2,_0x1b7f6d){_0x174df2=_0x174df2-0xea;const _0x4cc78f=a158_0x4cc7();let _0xbc1a74=_0x4cc78f[_0x174df2];return _0xbc1a74;}function validateInputSelection(_0x441629){const _0x35e3ff=a158_0x3df950,_0x3d0108=selectedInputs(_0x441629);if(_0x3d0108[_0x35e3ff(0x118)]!==0x1)throw CliErrors[_0x35e3ff(0x115)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x3d0108;}function withScene(_0x4dcbcd,_0x475cd2,_0xd80205){const _0x213621=a158_0x3df950;return{..._0x4dcbcd,'scene':_0x475cd2,..._0xd80205?{'sourceFile':{'fileName':_0xd80205[_0x213621(0x107)],'filePath':_0xd80205[_0x213621(0x116)]}}:{}};}const ocrRecognize={'service':a158_0x3df950(0x103),'command':a158_0x3df950(0xf5),'description':a158_0x3df950(0xf2),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3bd7a4){const _0x477728=a158_0x3df950,_0x4eedb1=normalizeScene(_0x3bd7a4[_0x477728(0x112)](_0x477728(0x105))),_0xdc064a=SCENE_TO_LEGACY_TYPE[_0x4eedb1],_0x4107e3=validateInputSelection(_0x3bd7a4);if(_0x4107e3[_0x477728(0x110)]){const _0x4040fd=new URLSearchParams({'url':_0x4107e3[_0x477728(0x110)],'type':_0xdc064a,'appCode':_0x3bd7a4[_0x477728(0x101)]});return{'method':_0x477728(0x117),'url':_0x477728(0xff)+_0x4040fd[_0x477728(0xfc)](),'description':_0x477728(0x114)+_0x4eedb1+'\x20OCR\x20from\x20URL'};}const _0x33d60d=requireDevelopmentUploadFile(_0x4107e3[_0x477728(0xea)],_0x477728(0x10e));return{'method':_0x477728(0x100),'url':_0x477728(0x119),'body':{'steps':[{'method':'POST','url':_0x477728(0x119),'body':{'appCode':_0x3bd7a4[_0x477728(0x101)],'multipart':{'file':_0x33d60d}}},{'method':'POST','url':_0x477728(0x113),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x477728(0x117),'url':_0x477728(0x10d),'query':{'appCode':_0x3bd7a4[_0x477728(0x101)],'url':_0x477728(0xf8),'type':_0xdc064a}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x4eedb1+'\x20OCR'};},async 'execute'(_0x59e373){const _0x505a27=a158_0x3df950,_0x32d0f4=normalizeScene(_0x59e373[_0x505a27(0x112)](_0x505a27(0x105))),_0x5d8fd5=SCENE_TO_LEGACY_TYPE[_0x32d0f4],_0xf4f8bf=validateInputSelection(_0x59e373);if(_0xf4f8bf['imageUrl']){const _0x5209ae=await recognizeDevelopmentOcr(_0x59e373['appCode'],{'url':_0xf4f8bf['imageUrl'],'type':_0x5d8fd5});return{'ok':!![],'data':withScene(_0x5209ae,_0x32d0f4)};}const _0x47ea69=requireDevelopmentUploadFile(_0xf4f8bf[_0x505a27(0xea)],_0x505a27(0x10e)),_0x860fa5=await uploadDevelopmentFile(_0x59e373[_0x505a27(0x101)],_0x47ea69[_0x505a27(0xec)]);if(!_0x860fa5['filePath'])throw CliErrors[_0x505a27(0x11d)](_0x505a27(0x104));const _0x4da50a=await queryDevelopmentFileUrl(_0x860fa5[_0x505a27(0x116)],{'download':![]});if(!_0x4da50a[_0x505a27(0xed)])throw CliErrors[_0x505a27(0x11d)](_0x505a27(0xf6));const _0x53abf7=await recognizeDevelopmentOcr(_0x59e373[_0x505a27(0x101)],{'url':_0x4da50a[_0x505a27(0xed)],'type':_0x5d8fd5});return{'ok':!![],'data':withScene(_0x53abf7,_0x32d0f4,_0x860fa5)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a159_0x3fe597=a159_0x9571;function a159_0x9571(_0x33442f,_0x2d0839){_0x33442f=_0x33442f-0x1d6;const _0x17d522=a159_0x17d5();let _0x957136=_0x17d522[_0x33442f];return _0x957136;}(function(_0x2508b3,_0x325705){const _0x4720d2=a159_0x9571,_0x44f2d1=_0x2508b3();while(!![]){try{const _0x30abcf=parseInt(_0x4720d2(0x209))/0x1*(parseInt(_0x4720d2(0x1ea))/0x2)+-parseInt(_0x4720d2(0x210))/0x3*(parseInt(_0x4720d2(0x20f))/0x4)+-parseInt(_0x4720d2(0x1d9))/0x5+-parseInt(_0x4720d2(0x202))/0x6*(parseInt(_0x4720d2(0x1dd))/0x7)+-parseInt(_0x4720d2(0x215))/0x8*(parseInt(_0x4720d2(0x1ef))/0x9)+parseInt(_0x4720d2(0x1dc))/0xa*(-parseInt(_0x4720d2(0x212))/0xb)+-parseInt(_0x4720d2(0x1db))/0xc*(-parseInt(_0x4720d2(0x200))/0xd);if(_0x30abcf===_0x325705)break;else _0x44f2d1['push'](_0x44f2d1['shift']());}catch(_0x589ddd){_0x44f2d1['push'](_0x44f2d1['shift']());}}}(a159_0x17d5,0x1c379));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';function a159_0x17d5(){const _0x41dce7=['/smartapi/webcode/page/create','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','286twvNZa','parse','30LKGYlN','page\x20create\x20does\x20not\x20accept\x20--page-type.','stringify','page-pattern','pageName','keys','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','20zSvTAU','includes','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','pageId','\x20and\x20its\x20menu\x20entry.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','105816ivVqep','12mJAyTU','Custom_page_','2067439yyIdtu','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','object','1581176UtRoIy','menuPath','appCode','.json','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','validation','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','isNaN','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','361845qIYlId','page-type','258828kEZkwj','10ReXHfy','11284ZUohfJ','some','length','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','string','Would\x20create\x20Custom\x20Page\x20','page-dir','Invalid\x20Custom\x20Page\x20pattern:\x20','apiError','now','DASHBOARD','files','str','21290KecQKD','Created\x20Custom\x20Page\x20','isArray','version','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','9WKKBuk','parentMenuId','../../../templates/custom-pages','trim','page.create','page-content','isInteger','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','utf8','page','BLANK','parent-menu-id','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','values','create'];a159_0x17d5=function(){return _0x41dce7;};return a159_0x17d5();}import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a159_0x3fe597(0x1f9),'ONEPAGE',a159_0x3fe597(0x1e7)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a159_0x3fe597(0x1f1));export const pageCreate={'service':a159_0x3fe597(0x1f8),'command':a159_0x3fe597(0x1fd),'description':a159_0x3fe597(0x1f6),'risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a159_0x3fe597(0x1da),'message':a159_0x3fe597(0x203),'hint':a159_0x3fe597(0x1d6)},{'name':a159_0x3fe597(0x1f4),'message':a159_0x3fe597(0x1d8),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'name','type':a159_0x3fe597(0x1e1),'description':a159_0x3fe597(0x1fb)},{'name':a159_0x3fe597(0x1fa),'type':'number','description':a159_0x3fe597(0x1e0)},{'name':'page-pattern','type':a159_0x3fe597(0x1e1),'description':a159_0x3fe597(0x1ff),'enum':CUSTOM_PAGE_PATTERNS},{'name':a159_0x3fe597(0x1e3),'type':a159_0x3fe597(0x1e1),'description':a159_0x3fe597(0x20e)},APPCODE_FLAG],async 'validate'(_0x3f7b92){await readValidatedPageSource(_0x3f7b92);},async 'dryRun'(_0x551df5){const _0x5ce1e2=a159_0x3fe597,_0x5d86d7=readInput(_0x551df5,await readValidatedPageSource(_0x551df5));return{'method':'POST','url':_0x5ce1e2(0x1fe),'body':{'appCode':_0x5d86d7['appCode'],'pageName':_0x5d86d7[_0x5ce1e2(0x206)],..._0x5d86d7['parentMenuId']!=null?{'parentMenuId':_0x5d86d7[_0x5ce1e2(0x1f0)]}:{},'createMenu':_0x5d86d7['createMenu'],'codeContent':_0x5d86d7[_0x5ce1e2(0x1e8)]},'description':_0x5ce1e2(0x1e2)+JSON[_0x5ce1e2(0x204)](_0x5d86d7['pageName'])+_0x5ce1e2(0x20d)};},async 'execute'(_0x1fa884){const _0x1a4a71=a159_0x3fe597,_0x49747e=readInput(_0x1fa884,await readValidatedPageSource(_0x1fa884)),_0x8dd575=await createCustomPage(_0x49747e);if(!Number[_0x1a4a71(0x1f5)](_0x8dd575[_0x1a4a71(0x20c)])||_0x8dd575[_0x1a4a71(0x20c)]<=0x0)throw CliErrors[_0x1a4a71(0x1e5)](_0x1a4a71(0x20b));const _0x5c009e=buildCustomPageDevelopmentUrl(_0x49747e[_0x1a4a71(0x217)],_0x8dd575[_0x1a4a71(0x216)]),_0x5b83ba=buildCustomPageEditUrl(_0x49747e[_0x1a4a71(0x217)],_0x8dd575['pageId']);return{'ok':!![],'data':{'operation':_0x1a4a71(0x1f3),'pageType':'CUSTOM','pagePattern':readPagePattern(_0x1fa884),'selector':{'appCode':_0x49747e[_0x1a4a71(0x217)],'pageName':_0x49747e[_0x1a4a71(0x206)]},'before':null,'after':{'pageId':_0x8dd575['pageId'],'pageName':_0x8dd575[_0x1a4a71(0x206)],'appCode':_0x8dd575[_0x1a4a71(0x217)],'version':_0x8dd575[_0x1a4a71(0x1ed)],'menuId':_0x8dd575['menuId'],'menuPath':_0x8dd575[_0x1a4a71(0x216)],'files':_0x8dd575[_0x1a4a71(0x1e8)]??Object[_0x1a4a71(0x207)](_0x49747e[_0x1a4a71(0x1e8)])},'dryRun':![],'request':_0x49747e,..._0x5c009e?{'pageUrl':_0x5c009e}:{},..._0x5b83ba?{'editPageUrl':_0x5b83ba}:{},'warnings':_0x5c009e?[]:[_0x1a4a71(0x213)]},'message':_0x1a4a71(0x1eb)+_0x8dd575['pageId']+'.'};}};function readPagePattern(_0x2c38f8){const _0x514b3c=a159_0x3fe597,_0x8300a5=_0x2c38f8[_0x514b3c(0x1e9)](_0x514b3c(0x205))[_0x514b3c(0x1f2)](),_0x3440ad=_0x2c38f8[_0x514b3c(0x1e9)]('page-dir')['trim']();if(_0x8300a5&&_0x3440ad)throw CliErrors[_0x514b3c(0x21a)](_0x514b3c(0x1ee));if(_0x3440ad)return null;if(!_0x8300a5)throw CliErrors[_0x514b3c(0x21a)]('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x514b3c(0x20a)](_0x8300a5))throw CliErrors[_0x514b3c(0x21a)](_0x514b3c(0x219));return _0x8300a5;}async function readPageSource(_0x51f76d){const _0x4019cc=a159_0x3fe597,_0xac43d4=_0x51f76d[_0x4019cc(0x1e9)]('page-dir')['trim'](),_0x2a99f5=readPagePattern(_0x51f76d);if(_0x2a99f5===null){const _0x583c9d=await readCustomPageDirectory(_0xac43d4);if(Object['keys'](_0x583c9d)[_0x4019cc(0x1df)]===0x0)throw CliErrors[_0x4019cc(0x21a)](_0x4019cc(0x208));return _0x583c9d;}let _0x4cae47;try{_0x4cae47=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x2a99f5['toLowerCase']()+_0x4019cc(0x218)),_0x4019cc(0x1f7));}catch{throw CliErrors[_0x4019cc(0x21a)]('Custom\x20Page\x20pattern\x20not\x20found:\x20'+_0x2a99f5+'.');}let _0x1b5592;try{_0x1b5592=JSON[_0x4019cc(0x201)](_0x4cae47);}catch{throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x2a99f5+'.');}if(!_0x1b5592||typeof _0x1b5592!==_0x4019cc(0x214)||Array[_0x4019cc(0x1ec)](_0x1b5592)||Object[_0x4019cc(0x1fc)](_0x1b5592)[_0x4019cc(0x1de)](_0x46a6f7=>typeof _0x46a6f7!==_0x4019cc(0x1e1)))throw CliErrors[_0x4019cc(0x21a)](_0x4019cc(0x1e4)+_0x2a99f5+'.');return _0x1b5592;}async function readValidatedPageSource(_0x2230a0){const _0x2ee6e6=await readPageSource(_0x2230a0);return await validateCustomPageContent(_0x2ee6e6),_0x2ee6e6;}function readInput(_0x5bb56f,_0x932e52){const _0x5e6ff0=a159_0x3fe597,_0x52b95e=_0x5bb56f[_0x5e6ff0(0x1e9)]('name')[_0x5e6ff0(0x1f2)]()||_0x5e6ff0(0x211)+Date[_0x5e6ff0(0x1e6)]();if(_0x52b95e[_0x5e6ff0(0x1df)]>0x64)throw CliErrors[_0x5e6ff0(0x21a)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x300358=_0x5bb56f['num']('parent-menu-id',NaN),_0x2c4105=!Number[_0x5e6ff0(0x1d7)](_0x300358);if(_0x2c4105&&(!Number[_0x5e6ff0(0x1f5)](_0x300358)||_0x300358<=0x0))throw CliErrors[_0x5e6ff0(0x21a)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x5bb56f[_0x5e6ff0(0x217)],'pageName':_0x52b95e,..._0x2c4105?{'parentMenuId':_0x300358}:{},'createMenu':!![],'files':_0x932e52};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a160_0x37fa01=a160_0x151e;(function(_0x1630b3,_0x3387ce){const _0x28b8c6=a160_0x151e,_0x4df038=_0x1630b3();while(!![]){try{const _0x2b718c=-parseInt(_0x28b8c6(0xb9))/0x1+-parseInt(_0x28b8c6(0xa8))/0x2*(-parseInt(_0x28b8c6(0xab))/0x3)+-parseInt(_0x28b8c6(0xae))/0x4+parseInt(_0x28b8c6(0xaa))/0x5*(-parseInt(_0x28b8c6(0xb4))/0x6)+-parseInt(_0x28b8c6(0xad))/0x7*(parseInt(_0x28b8c6(0xb5))/0x8)+-parseInt(_0x28b8c6(0xb6))/0x9+parseInt(_0x28b8c6(0xb0))/0xa;if(_0x2b718c===_0x3387ce)break;else _0x4df038['push'](_0x4df038['shift']());}catch(_0x2d24b7){_0x4df038['push'](_0x4df038['shift']());}}}(a160_0x6773,0xe2221));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a160_0x37fa01(0xbe),'command':a160_0x37fa01(0xbc),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':'read','defaultOutputFormat':a160_0x37fa01(0xbb),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a160_0x37fa01(0xa6),'required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x13fc05){readCustomPageId(_0x13fc05);},async 'execute'(_0x14fcc4){const _0x10e205=a160_0x37fa01,_0x53bd25=readCustomPageId(_0x14fcc4),_0x1e4f00=await getCustomPageSource(_0x53bd25),{bundle:_0x392725,createTime:_0x45de4f,updateTime:_0x506361,..._0x3ecdc2}=_0x1e4f00,_0x380991=_0x1e4f00['id']??_0x53bd25,_0x16b045=_0x1e4f00['appCode']?.[_0x10e205(0xa7)]()||_0x14fcc4[_0x10e205(0xa5)](_0x10e205(0xb1))['trim'](),_0x3ebc46=buildCustomPageRuntimeUrl(_0x16b045,_0x1e4f00[_0x10e205(0xb8)]),_0x110efe=buildCustomPageEditUrl(_0x16b045,_0x380991),_0x469db2=await resolveCustomPageDevelopmentUrl(_0x16b045,_0x380991,_0x14fcc4['cookie']);return{'ok':!![],'data':{..._0x3ecdc2,..._0x3ebc46?{'runtimePageUrl':_0x3ebc46}:{},..._0x469db2?{'pageUrl':_0x469db2}:{},..._0x110efe?{'editPageUrl':_0x110efe}:{},..._0x45de4f==null?{}:{'createTime':formatTime(_0x45de4f)},..._0x506361==null?{}:{'updateTime':formatTime(_0x506361)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0x53bd25+'.'};}};function a160_0x151e(_0x496ce2,_0x5b6edc){_0x496ce2=_0x496ce2-0xa4;const _0x67735e=a160_0x6773();let _0x151e8d=_0x67735e[_0x496ce2];return _0x151e8d;}function formatTime(_0xa7d899){const _0x46b2bc=a160_0x37fa01,_0x565103=new Date(_0xa7d899);if(Number[_0x46b2bc(0xa4)](_0x565103[_0x46b2bc(0xac)]()))return String(_0xa7d899);const _0x18c8eb=[_0x565103['getFullYear'](),String(_0x565103[_0x46b2bc(0xaf)]()+0x1)[_0x46b2bc(0xa9)](0x2,'0'),String(_0x565103[_0x46b2bc(0xbd)]())['padStart'](0x2,'0')][_0x46b2bc(0xba)]('-'),_0x5b37cd=[String(_0x565103[_0x46b2bc(0xb7)]())[_0x46b2bc(0xa9)](0x2,'0'),String(_0x565103[_0x46b2bc(0xb2)]())[_0x46b2bc(0xa9)](0x2,'0'),String(_0x565103[_0x46b2bc(0xb3)]())['padStart'](0x2,'0')]['join'](':');return _0x18c8eb+'\x20'+_0x5b37cd;}function a160_0x6773(){const _0x362320=['1718KaJqPv','padStart','14765KaZYXx','6189ULxxZq','getTime','7VdeObD','7091476JATmXg','getMonth','50745600NDzGkG','appcode','getMinutes','getSeconds','2958ozCmtV','11049544chnwOH','5669442IfRgtg','getHours','pageCode','680607WeKHei','join','compress','custom-detail','getDate','page','isNaN','str','number','trim'];a160_0x6773=function(){return _0x362320;};return a160_0x6773();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x51c3d4=a161_0x3a39;function a161_0x264a(){const _0x3f4e20=['type','314807cCpoMU','Found\x20','502747NApZZE','label','121726dKZVhL','menus','read','compress','pageId','appCode','custom-list','\x20Custom\x20Page(s).','2zkrtXK','70ypylXx','19140TGlbkS','flatMap','No\x20Custom\x20Pages\x20found.','555Ggsxwn','376dshENZ','path','105330nMJvQY','length','page','89937UaoKqh','1706145QfpuxG'];a161_0x264a=function(){return _0x3f4e20;};return a161_0x264a();}(function(_0x3dc4a0,_0x2c29eb){const _0x19227b=a161_0x3a39,_0x1e8e4c=_0x3dc4a0();while(!![]){try{const _0x57aef0=parseInt(_0x19227b(0x186))/0x1*(-parseInt(_0x19227b(0x192))/0x2)+parseInt(_0x19227b(0x184))/0x3+parseInt(_0x19227b(0x17a))/0x4*(parseInt(_0x19227b(0x17d))/0x5)+parseInt(_0x19227b(0x180))/0x6+parseInt(_0x19227b(0x188))/0x7+-parseInt(_0x19227b(0x17e))/0x8*(parseInt(_0x19227b(0x183))/0x9)+parseInt(_0x19227b(0x193))/0xa*(-parseInt(_0x19227b(0x18a))/0xb);if(_0x57aef0===_0x2c29eb)break;else _0x1e8e4c['push'](_0x1e8e4c['shift']());}catch(_0x408bd5){_0x1e8e4c['push'](_0x1e8e4c['shift']());}}}(a161_0x264a,0x4fe76));function a161_0x3a39(_0xefc548,_0x6ba524){_0xefc548=_0xefc548-0x17a;const _0x264a83=a161_0x264a();let _0x3a3988=_0x264a83[_0xefc548];return _0x3a3988;}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a161_0x51c3d4(0x182),'command':a161_0x51c3d4(0x190),'description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':a161_0x51c3d4(0x18c),'defaultOutputFormat':a161_0x51c3d4(0x18d),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1a70c5){const _0x185465=a161_0x51c3d4,_0x115b3d=(await fetchMenuSnapshot(_0x1a70c5['appCode'],_0x1a70c5['cookie']))[_0x185465(0x18b)][_0x185465(0x17b)](_0x16f81a=>{const _0x57757c=_0x185465;if(_0x16f81a[_0x57757c(0x185)]!=='react'||_0x16f81a[_0x57757c(0x18e)]==null)return[];const _0x57a80a=buildCustomPageDevelopmentUrl(_0x1a70c5[_0x57757c(0x18f)],_0x16f81a[_0x57757c(0x17f)]),_0x2b6b6a=buildCustomPageEditUrl(_0x1a70c5[_0x57757c(0x18f)],_0x16f81a['pageId']);return[{'pageId':_0x16f81a['pageId'],'label':_0x16f81a[_0x57757c(0x189)],..._0x57a80a?{'pageUrl':_0x57a80a}:{},..._0x2b6b6a?{'editPageUrl':_0x2b6b6a}:{}}];});return{'ok':!![],'data':{'pages':_0x115b3d},'message':_0x115b3d['length']===0x0?_0x185465(0x17c):_0x185465(0x187)+_0x115b3d[_0x185465(0x181)]+_0x185465(0x191)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a162_0x2a92(_0x740c85,_0x52b8df){_0x740c85=_0x740c85-0x189;const _0x5973e5=a162_0x5973();let _0x2a9235=_0x5973e5[_0x740c85];return _0x2a9235;}const a162_0x108a1a=a162_0x2a92;(function(_0x4ebab9,_0x221de4){const _0x2e82df=a162_0x2a92,_0x250c45=_0x4ebab9();while(!![]){try{const _0x38e8a4=parseInt(_0x2e82df(0x198))/0x1+parseInt(_0x2e82df(0x197))/0x2*(-parseInt(_0x2e82df(0x19d))/0x3)+parseInt(_0x2e82df(0x19f))/0x4+-parseInt(_0x2e82df(0x1a5))/0x5*(parseInt(_0x2e82df(0x1ae))/0x6)+-parseInt(_0x2e82df(0x1b0))/0x7*(-parseInt(_0x2e82df(0x1a8))/0x8)+-parseInt(_0x2e82df(0x1a1))/0x9+-parseInt(_0x2e82df(0x19b))/0xa*(-parseInt(_0x2e82df(0x1ab))/0xb);if(_0x38e8a4===_0x221de4)break;else _0x250c45['push'](_0x250c45['shift']());}catch(_0x50d744){_0x250c45['push'](_0x250c45['shift']());}}}(a162_0x5973,0x59a25));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a162_0x5973(){const _0x16122f=['1130974TnxRBe','215290QpTvnx','Published\x20Custom\x20Page\x20','custom-publish','11350tQPgti','cookie','3lYcWfq','isInteger','1577960SIULPF','pageCode','1850706noQeMX','warnings','FORMAL','apiError','1360tbQRRa','appCode','Would\x20publish\x20Custom\x20Page\x20','8wyTGgG','Custom\x20Page\x20ID','compress','6127vxLqfi','number','page','3858rBJGqN','POST','498281mLcNDV','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','page.custom-publish','remark','string','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','unknown','pageId','status','Optional\x20publish\x20remark','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','push','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','runtimePageUrl','trim'];a162_0x5973=function(){return _0x16122f;};return a162_0x5973();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a162_0x108a1a(0x1ad),'command':a162_0x108a1a(0x19a),'description':a162_0x108a1a(0x194),'risk':'write','defaultOutputFormat':a162_0x108a1a(0x1aa),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a162_0x108a1a(0x1ac),'required':!![],'description':a162_0x108a1a(0x1a9)},{'name':a162_0x108a1a(0x18b),'type':a162_0x108a1a(0x18c),'description':a162_0x108a1a(0x191)}],async 'validate'(_0x1e6a6a){readCustomPageId(_0x1e6a6a);},async 'dryRun'(_0x202563){const _0x3c4b47=a162_0x108a1a,_0x466a31=readInput(_0x202563);return{'method':_0x3c4b47(0x1af),'url':'/smartapi/webcode/file/publish','body':{'id':_0x466a31[_0x3c4b47(0x18f)],..._0x466a31['remark']?{'remark':_0x466a31[_0x3c4b47(0x18b)]}:{}},'description':_0x3c4b47(0x1a7)+_0x466a31[_0x3c4b47(0x18f)]+'.'};},async 'execute'(_0x2b6b1c){const _0x1e5f00=a162_0x108a1a,_0x5af304=readInput(_0x2b6b1c);await getCustomPageSource(_0x5af304['pageId']);const _0xc745bd=await publishCustomPage(_0x5af304);if(!Number[_0x1e5f00(0x19e)](_0xc745bd)||_0xc745bd!==_0x5af304['pageId'])throw CliErrors[_0x1e5f00(0x1a4)](_0x1e5f00(0x189));const _0x32de56=await getCustomPageSource(_0x5af304[_0x1e5f00(0x18f)]);if(_0x32de56[_0x1e5f00(0x190)]!=='FORMAL')throw CliErrors[_0x1e5f00(0x1a4)](_0x1e5f00(0x192)+(_0x32de56[_0x1e5f00(0x190)]??_0x1e5f00(0x18e))+'.');const _0x2c4a16=_0x32de56['appCode']?.[_0x1e5f00(0x196)](),_0x10c988=buildCustomPageEditUrl(_0x2c4a16,_0x5af304['pageId']),_0x4a9ef1=await resolveCustomPageDevelopmentUrl(_0x2c4a16,_0x5af304[_0x1e5f00(0x18f)],_0x2b6b1c[_0x1e5f00(0x19c)]),_0x233cd5=buildMutationData(_0x5af304,!![],_0x4a9ef1,_0x10c988);_0x2c4a16&&!_0x4a9ef1&&_0x233cd5[_0x1e5f00(0x1a2)][_0x1e5f00(0x193)](_0x1e5f00(0x18d));const _0x669aa9=buildCustomPageRuntimeUrl(_0x32de56[_0x1e5f00(0x1a6)],_0x32de56[_0x1e5f00(0x1a0)]);return _0x669aa9?_0x233cd5[_0x1e5f00(0x195)]=_0x669aa9:_0x233cd5['warnings']['push']('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'),{'ok':!![],'data':_0x233cd5,'message':_0x1e5f00(0x199)+_0x5af304['pageId']+'.'};}};function readInput(_0x136510){const _0x5ad328=a162_0x108a1a,_0x38bc2a=readCustomPageId(_0x136510),_0x5e631c=_0x136510['str'](_0x5ad328(0x18b))[_0x5ad328(0x196)]();return{'pageId':_0x38bc2a,..._0x5e631c?{'remark':_0x5e631c}:{}};}function buildMutationData(_0x1aede5,_0xb09930=![],_0x374ded,_0x44468f){const _0x78c174=a162_0x108a1a;return{'operation':_0x78c174(0x18a),'selector':{'pageId':_0x1aede5[_0x78c174(0x18f)]},'before':null,'after':{'pageId':_0x1aede5[_0x78c174(0x18f)],'status':_0x78c174(0x1a3)},'dryRun':!_0xb09930,'request':_0x1aede5,..._0x374ded?{'pageUrl':_0x374ded}:{},..._0x44468f?{'editPageUrl':_0x44468f}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a163_0x49c4b2=a163_0x5acf;(function(_0x4b1cc3,_0x1378ab){const _0x469ee1=a163_0x5acf,_0x558a7e=_0x4b1cc3();while(!![]){try{const _0xa6e692=-parseInt(_0x469ee1(0x1ba))/0x1*(-parseInt(_0x469ee1(0x1bc))/0x2)+-parseInt(_0x469ee1(0x1b1))/0x3+-parseInt(_0x469ee1(0x1af))/0x4*(-parseInt(_0x469ee1(0x1bd))/0x5)+-parseInt(_0x469ee1(0x1c1))/0x6*(parseInt(_0x469ee1(0x1ab))/0x7)+-parseInt(_0x469ee1(0x1b2))/0x8+parseInt(_0x469ee1(0x1bf))/0x9*(-parseInt(_0x469ee1(0x1b0))/0xa)+-parseInt(_0x469ee1(0x1b8))/0xb*(-parseInt(_0x469ee1(0x1c0))/0xc);if(_0xa6e692===_0x1378ab)break;else _0x558a7e['push'](_0x558a7e['shift']());}catch(_0x3e54a6){_0x558a7e['push'](_0x558a7e['shift']());}}}(a163_0x3e80,0xec0a5));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a163_0x5acf(_0x1942fa,_0xfa4bba){_0x1942fa=_0x1942fa-0x1a7;const _0x3e8072=a163_0x3e80();let _0x5acf63=_0x3e8072[_0x1942fa];return _0x5acf63;}import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';function a163_0x3e80(){const _0x1f8433=['isInteger','type','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','21118746gmmBVn','validation','2057NBjzba','menus','698wAjqzn','1340RrkVsq','num','2289339uAxQAo','12rvpYZP','2488902SDcQSU','/ide/','path','pageId','message','/pages/','14NdXihy','file','map','find','21404JUvVOy','20jbdehK','2577873lrKdqH','7258872nfxdLe','trim','length'];a163_0x3e80=function(){return _0x1f8433;};return a163_0x3e80();}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a163_0x49c4b2(0x1b7)};function trimOptional(_0x51fdff){const _0x483aa2=a163_0x49c4b2;return _0x51fdff?.[_0x483aa2(0x1b3)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x1a4382,_0x1688d3){const _0x1c715f=trimOptional(_0x1a4382),_0x3f7abb=trimOptional(_0x1688d3);if(!_0x1c715f||!_0x3f7abb)return undefined;return getPublishedAppDomain(_0x1c715f)+'/'+encodeURIComponent(_0x3f7abb);}export function buildCustomPageDevelopmentUrl(_0x1fd820,_0x40726e){const _0x1ec33e=a163_0x49c4b2,_0x4c0556=trimOptional(_0x1fd820),_0x2e6b70=trimOptional(_0x40726e);if(!_0x4c0556||!_0x2e6b70)return undefined;return getAppBaseUrl(_0x4c0556)+_0x1ec33e(0x1aa)+encodeURIComponent(_0x2e6b70);}export async function resolveCustomPageDevelopmentUrl(_0xf8a319,_0xdfb2fe,_0x4c5b36){const _0x1d59ae=a163_0x49c4b2,_0x28ba8b=trimOptional(_0xf8a319);if(!_0x28ba8b)return undefined;try{const _0x1bb755=(await fetchMenuSnapshot(_0x28ba8b,_0x4c5b36))[_0x1d59ae(0x1bb)][_0x1d59ae(0x1ae)](_0x3d6d05=>_0x3d6d05[_0x1d59ae(0x1b6)]==='react'&&_0x3d6d05[_0x1d59ae(0x1a8)]===_0xdfb2fe);return buildCustomPageDevelopmentUrl(_0x28ba8b,_0x1bb755?.[_0x1d59ae(0x1a7)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x49fd25,_0x4d3cfc){const _0xa2138=a163_0x49c4b2,_0x19c960=trimOptional(_0x49fd25);if(!_0x19c960)return;const _0x3764bb=trimOptional(String(_0x4d3cfc??''));if(!_0x3764bb)return;return getAppBaseUrl(_0x19c960)+_0xa2138(0x1c2)+encodeURIComponent(_0x3764bb);}export async function validateCustomPageContent(_0x65e384){const _0x8ba1f=a163_0x49c4b2,_0x4b6794=await validateCustomPageSourceFiles(_0x65e384);if(_0x4b6794[_0x8ba1f(0x1b4)]>0x0)throw CliErrors[_0x8ba1f(0x1b9)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x4b6794[_0x8ba1f(0x1ad)](_0x4ee79f=>_0x4ee79f[_0x8ba1f(0x1ac)]+':\x20'+_0x4ee79f[_0x8ba1f(0x1a9)])['join'](';\x20'));}export function readCustomPageId(_0x38746e){const _0x52327f=a163_0x49c4b2,_0x214cb3=_0x38746e[_0x52327f(0x1be)]('id');if(!Number[_0x52327f(0x1b5)](_0x214cb3)||_0x214cb3<=0x0)throw CliErrors['validation']('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x214cb3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a164_0x3ada7e=a164_0xe87f;(function(_0x583c22,_0xd70e81){const _0x361c90=a164_0xe87f,_0x369b60=_0x583c22();while(!![]){try{const _0x5a735b=-parseInt(_0x361c90(0x106))/0x1+parseInt(_0x361c90(0x109))/0x2*(-parseInt(_0x361c90(0x119))/0x3)+-parseInt(_0x361c90(0x104))/0x4*(parseInt(_0x361c90(0x114))/0x5)+parseInt(_0x361c90(0x10c))/0x6*(-parseInt(_0x361c90(0x116))/0x7)+-parseInt(_0x361c90(0x118))/0x8*(parseInt(_0x361c90(0x10e))/0x9)+-parseInt(_0x361c90(0x10f))/0xa*(-parseInt(_0x361c90(0x10a))/0xb)+parseInt(_0x361c90(0x111))/0xc;if(_0x5a735b===_0xd70e81)break;else _0x369b60['push'](_0x369b60['shift']());}catch(_0x23bca5){_0x369b60['push'](_0x369b60['shift']());}}}(a164_0x35a9,0x5f447));function a164_0x35a9(){const _0x34642d=['endsWith','.tsx','4pNbHfp','11FmBKYe','some','48jsZOaj','filter','54cxfxGa','1362440RCVXDr','message','21872520ZqRcSD','map','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','1415NZILbb','page\x20files','190071DSNAkQ','entries','765792izkGkr','834294lZoksA','typescript','trim','1556WHuAEx','toLowerCase','110888mReQXQ'];a164_0x35a9=function(){return _0x34642d;};return a164_0x35a9();}import{format}from'prettier';const SOURCE_PARSERS={'.js':'babel','.jsx':'babel','.ts':a164_0x3ada7e(0x102),'.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=['.jsx',a164_0x3ada7e(0x108)];function a164_0xe87f(_0x472e7b,_0x9a6191){_0x472e7b=_0x472e7b-0x102;const _0x35a9bf=a164_0x35a9();let _0xe87f0f=_0x35a9bf[_0x472e7b];return _0xe87f0f;}export async function validateCustomPageSourceFiles(_0x2512aa){const _0x4d76f4=a164_0x3ada7e,_0x4fade8=Object[_0x4d76f4(0x117)](_0x2512aa)[_0x4d76f4(0x10d)](([_0x2c7b8b])=>getParser(_0x2c7b8b));if(!_0x4fade8['some'](([_0x483784])=>isReactSourceFile(_0x483784)))return[{'file':_0x4d76f4(0x115),'message':_0x4d76f4(0x113)}];const _0x37e2a8=await Promise['all'](_0x4fade8[_0x4d76f4(0x112)](async([_0x2c91ed,_0x1188b1])=>{const _0x51a668=_0x4d76f4;try{return await format(_0x1188b1,{'parser':getParser(_0x2c91ed)}),undefined;}catch(_0x24da22){return{'file':_0x2c91ed,'message':_0x24da22 instanceof Error?_0x24da22[_0x51a668(0x110)]:String(_0x24da22)};}}));return _0x37e2a8[_0x4d76f4(0x10d)](_0x52e37f=>_0x52e37f!==undefined);}function getParser(_0x21f944){const _0x624eb3=a164_0x3ada7e,_0x396726=_0x21f944['trim']()['toLowerCase']();return Object[_0x624eb3(0x117)](SOURCE_PARSERS)['find'](([_0xc3c486])=>_0x396726[_0x624eb3(0x107)](_0xc3c486))?.[0x1];}function isReactSourceFile(_0x1cf793){const _0x282149=a164_0x3ada7e,_0x390917=_0x1cf793[_0x282149(0x103)]()[_0x282149(0x105)]();return CUSTOM_PAGE_EXTENSIONS[_0x282149(0x10b)](_0x1298ea=>_0x390917[_0x282149(0x107)](_0x1298ea));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x5c6bd1=a165_0x59c1;(function(_0x3645f7,_0xf4b7a2){const _0x18d967=a165_0x59c1,_0x3f1745=_0x3645f7();while(!![]){try{const _0x411d45=parseInt(_0x18d967(0xa2))/0x1+parseInt(_0x18d967(0xa5))/0x2+parseInt(_0x18d967(0xaa))/0x3*(-parseInt(_0x18d967(0x9d))/0x4)+-parseInt(_0x18d967(0x9e))/0x5+-parseInt(_0x18d967(0xa7))/0x6+-parseInt(_0x18d967(0xa8))/0x7*(-parseInt(_0x18d967(0x9b))/0x8)+-parseInt(_0x18d967(0xb5))/0x9*(parseInt(_0x18d967(0xaf))/0xa);if(_0x411d45===_0xf4b7a2)break;else _0x3f1745['push'](_0x3f1745['shift']());}catch(_0x254cf7){_0x3f1745['push'](_0x3f1745['shift']());}}}(a165_0x9c77,0x81d61));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a165_0x5c6bd1(0xac),'command':a165_0x5c6bd1(0x9a),'description':a165_0x5c6bd1(0xa9),'risk':a165_0x5c6bd1(0xb3),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a165_0x5c6bd1(0xa1),'message':a165_0x5c6bd1(0x9f),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'id','type':a165_0x5c6bd1(0x99),'required':!![],'description':a165_0x5c6bd1(0xb0)},{'name':'page-dir','type':'string','required':!![],'description':a165_0x5c6bd1(0xb4)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x59300a){readCustomPageId(_0x59300a),await readValidatedPageContent(_0x59300a);},async 'dryRun'(_0x162d6d){const _0x1c32aa=a165_0x5c6bd1,_0x59b28b=await readInput(_0x162d6d);return{'method':_0x1c32aa(0xa3),'url':'/smartapi/webcode/page/update/content','body':{'id':_0x59b28b[_0x1c32aa(0xa0)],'codeContent':_0x59b28b[_0x1c32aa(0xab)]},'description':'Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20'+_0x59b28b[_0x1c32aa(0xa0)]+'.'};},async 'execute'(_0x436312){const _0xfccc8e=a165_0x5c6bd1,_0x38d852=await readInput(_0x436312),_0x1009e1=await updateCustomPageContent({'pageId':_0x38d852[_0xfccc8e(0xa0)],'pageContent':_0x38d852[_0xfccc8e(0xab)]});if(!Number[_0xfccc8e(0xb1)](_0x1009e1[_0xfccc8e(0xae)])||_0x1009e1[_0xfccc8e(0xae)]<=0x0)throw CliErrors['apiError'](_0xfccc8e(0x9c));const _0x138ce1=buildCustomPageEditUrl(_0x38d852[_0xfccc8e(0xb6)],_0x38d852['pageId']),_0x312bc0=await resolveCustomPageDevelopmentUrl(_0x38d852[_0xfccc8e(0xb6)],_0x38d852[_0xfccc8e(0xa0)],_0x436312['cookie']);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x38d852[_0xfccc8e(0xb6)],'pageId':_0x38d852[_0xfccc8e(0xa0)]},'before':null,'after':{'pageId':_0x1009e1['pageId'],'version':_0x1009e1[_0xfccc8e(0xae)],'pageContent':_0x38d852['pageContent']},'dryRun':![],'request':_0x38d852,..._0x312bc0?{'pageUrl':_0x312bc0}:{},..._0x138ce1?{'editPageUrl':_0x138ce1}:{},'warnings':_0x312bc0?[]:[_0xfccc8e(0xad)]},'message':'Updated\x20Custom\x20Page\x20'+_0x38d852[_0xfccc8e(0xa0)]+'.'};}};async function readInput(_0x27d95f){const _0x14f830=a165_0x5c6bd1,_0x2e6d7d=readCustomPageId(_0x27d95f),_0x47a23c=_0x27d95f[_0x14f830(0xb2)](_0x14f830(0x98))['trim']()||(await getCustomPageSource(_0x2e6d7d))['appCode']?.[_0x14f830(0xa6)]();if(!_0x47a23c)throw CliErrors[_0x14f830(0xa4)](_0x14f830(0xb7)+_0x2e6d7d+'.');return{'appCode':_0x47a23c,'pageId':_0x2e6d7d,'pageContent':await readValidatedPageContent(_0x27d95f)};}function a165_0x59c1(_0x255483,_0x2ff091){_0x255483=_0x255483-0x98;const _0x9c77a4=a165_0x9c77();let _0x59c1e8=_0x9c77a4[_0x255483];return _0x59c1e8;}function a165_0x9c77(){const _0x47a6ce=['str','write','Directory\x20containing\x20all\x20complete\x20page\x20files','27unIyeB','appCode','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','appcode','number','custom-update','144616HOBZxm','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','1116tpsHZx','1462745NqAFRr','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','pageId','page-content','939617QxewnY','POST','validation','1325032dcFDFG','trim','1262412kiVncL','196fBWifQ','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','2295rquIEc','pageContent','page','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','newVersion','2866980ZxDwQu','Custom\x20Page\x20ID','isInteger'];a165_0x9c77=function(){return _0x47a6ce;};return a165_0x9c77();}async function readValidatedPageContent(_0x5df85e){const _0x4adea5=a165_0x5c6bd1,_0x3451a7=await readCustomPageDirectory(_0x5df85e[_0x4adea5(0xb2)]('page-dir'));return await validateCustomPageContent(_0x3451a7),_0x3451a7;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a166_0x5d409e=a166_0x40db;(function(_0x133c95,_0x591134){const _0x320713=a166_0x40db,_0x530a10=_0x133c95();while(!![]){try{const _0x130aeb=parseInt(_0x320713(0x119))/0x1+parseInt(_0x320713(0x115))/0x2*(parseInt(_0x320713(0x12e))/0x3)+parseInt(_0x320713(0x113))/0x4*(parseInt(_0x320713(0x127))/0x5)+-parseInt(_0x320713(0x122))/0x6*(parseInt(_0x320713(0x118))/0x7)+parseInt(_0x320713(0x11a))/0x8+parseInt(_0x320713(0x117))/0x9+-parseInt(_0x320713(0x11e))/0xa;if(_0x130aeb===_0x591134)break;else _0x530a10['push'](_0x530a10['shift']());}catch(_0x465052){_0x530a10['push'](_0x530a10['shift']());}}}(a166_0x5e05,0xf1861));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a166_0x40db(_0x20645b,_0x571665){_0x20645b=_0x20645b-0x112;const _0x5e0516=a166_0x5e05();let _0x40db69=_0x5e0516[_0x20645b];return _0x40db69;}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a166_0x5d409e(0x11c),'command':a166_0x5d409e(0x125),'description':a166_0x5d409e(0x12c),'risk':a166_0x5d409e(0x12b),'defaultOutputFormat':a166_0x5d409e(0x123),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a166_0x5d409e(0x121),'type':a166_0x5d409e(0x112),'description':a166_0x5d409e(0x124)}],async 'validate'(_0x327bc0){validateDatasetSelector(_0x327bc0);},async 'dryRun'(_0x202163){const _0x3cc0f9=a166_0x5d409e,_0x50615e=await loadDatasetDetailForPage(_0x202163);return{'method':_0x3cc0f9(0x120),'url':'/smartapi/lovrabet/dataset/'+_0x50615e[_0x3cc0f9(0x128)]+'/standard-page-status?appCode='+encodeURIComponent(_0x202163[_0x3cc0f9(0x11b)]),'description':serializeDryRunDescription({'dataset':{'id':_0x50615e['id'],'code':_0x50615e[_0x3cc0f9(0x128)],'name':_0x50615e['name']},'action':_0x3cc0f9(0x116)})};},async 'execute'(_0x532de7){const _0x2c0318=a166_0x5d409e,_0xed4b14=await loadDatasetDetailForPage(_0x532de7),_0x3bb7a3=await loadDataListPageStatusForGenerate(_0x532de7,_0xed4b14[_0x2c0318(0x128)]),_0x35ca89=getUndeletedRelatedPages(_0xed4b14),_0x38f081=assessDataListPageState(_0xed4b14[_0x2c0318(0x128)],_0x3bb7a3,{'fallbackUndeletedPages':_0x35ca89});return{'ok':!![],'data':{'datasetCode':_0xed4b14[_0x2c0318(0x128)],'precheckSource':_0x3bb7a3?.[_0x2c0318(0x126)]??_0x2c0318(0x11f),'status':_0x38f081[_0x2c0318(0x129)],'manualResolutionRequired':_0x38f081[_0x2c0318(0x12d)],'nextAction':_0x38f081[_0x2c0318(0x114)],'dataListPageStatus':_0x3bb7a3,'relatedPages':{'total':_0xed4b14[_0x2c0318(0x11d)][_0x2c0318(0x12a)],'undeletedCount':_0x35ca89['length']}}};}};function a166_0x5e05(){const _0xff1271=['76872ZRIwgJ','nextAction','98tNwmBw','query-data-list-status','12645603UTgDQf','11879329UfuzeJ','257537GIdHbR','12372992eupaHK','appCode','page','relatedPages','31632050xRuwPF','related-pages-fallback','GET','alias','6TUlmhh','compress','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','data-list-status','source','215qIMAin','code','status','length','read','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','manualResolutionRequired','111057KYyQmX','string'];a166_0x5e05=function(){return _0xff1271;};return a166_0x5e05();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a167_0x173a(){const _0x3cb341=['appCode','137919qKkYGB','412dPvLur','progressRate','10657197dhVJDL','precheck','PARTIAL_SUCCESS','4HkpYYz','code','status','8KLklsD','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','page-pattern','1049880NMQzNb','page','reused','21631214gSoKgi','55485cqMSCH','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','Submitted\x20a\x20generate\x20task','clientOperationId','source','dataListPageStatus','dataset','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','generate-start','bool','dryRun','related-pages-fallback','allowGenerate','manualResolutionRequired','/smartapi/lovrabet/dataset/','name','13174dlcPlf','operationId','apply','CRUD_PAGE_SET','currentStep','3246LfzZms','POST','message','fieldCount','alias','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','Reusing\x20an\x20existing\x20generate\x20task','191823MatknT','number','taskId','nextAction','compress','DATA_LIST','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','boolean'];a167_0x173a=function(){return _0x3cb341;};return a167_0x173a();}const a167_0x1ac45d=a167_0x55d6;(function(_0x480a51,_0x1f4594){const _0x5e87f4=a167_0x55d6,_0x7b1dc3=_0x480a51();while(!![]){try{const _0x30af03=-parseInt(_0x5e87f4(0x1d6))/0x1+-parseInt(_0x5e87f4(0x1dc))/0x2*(parseInt(_0x5e87f4(0x1cd))/0x3)+-parseInt(_0x5e87f4(0x1d7))/0x4*(parseInt(_0x5e87f4(0x1e6))/0x5)+parseInt(_0x5e87f4(0x1fb))/0x6*(-parseInt(_0x5e87f4(0x1f6))/0x7)+parseInt(_0x5e87f4(0x1df))/0x8*(parseInt(_0x5e87f4(0x1d9))/0x9)+parseInt(_0x5e87f4(0x1e2))/0xa+parseInt(_0x5e87f4(0x1e5))/0xb;if(_0x30af03===_0x1f4594)break;else _0x7b1dc3['push'](_0x7b1dc3['shift']());}catch(_0x34fedb){_0x7b1dc3['push'](_0x7b1dc3['shift']());}}}(a167_0x173a,0xca4e1));function a167_0x55d6(_0x530787,_0xb06071){_0x530787=_0x530787-0x1c7;const _0x173a72=a167_0x173a();let _0x55d6f0=_0x173a72[_0x530787];return _0x55d6f0;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a167_0x1ac45d(0x1e3),'command':a167_0x1ac45d(0x1ee),'description':a167_0x1ac45d(0x1cb),'risk':'write','defaultOutputFormat':a167_0x1ac45d(0x1d1),'rejectedFlags':[{'name':'page-type','message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':a167_0x1ac45d(0x1e1),'message':a167_0x1ac45d(0x1e7),'hint':a167_0x1ac45d(0x1d3)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a167_0x1ac45d(0x1ca),'type':'string','description':a167_0x1ac45d(0x1ed)},{'name':a167_0x1ac45d(0x1f8),'type':a167_0x1ac45d(0x1d4),'description':a167_0x1ac45d(0x1e0)}],async 'validate'(_0x3bc54a){validateDatasetSelector(_0x3bc54a);},async 'dryRun'(_0x264ff5){const _0x228ecd=a167_0x1ac45d,_0x37247c=await prepare(_0x264ff5);return{'method':_0x228ecd(0x1c7),'url':_0x228ecd(0x1f4)+_0x37247c[_0x228ecd(0x1ec)][_0x228ecd(0x1dd)]+'/generate-standard-pages/start','body':{'appCode':_0x264ff5[_0x228ecd(0x1d5)],'clientOperationId':_0x37247c[_0x228ecd(0x1e9)]},'description':serializeDryRunDescription({'dataset':{'id':_0x37247c['dataset']['id'],'code':_0x37247c[_0x228ecd(0x1ec)][_0x228ecd(0x1dd)],'name':_0x37247c[_0x228ecd(0x1ec)][_0x228ecd(0x1f5)],'fieldCount':_0x37247c['dataset'][_0x228ecd(0x1c9)]},'precheckSource':_0x37247c['dataListPageStatus']?.[_0x228ecd(0x1ea)]??_0x228ecd(0x1f1),'action':_0x228ecd(0x1ee),'clientOperationId':_0x37247c[_0x228ecd(0x1e9)],'plannedStatus':_0x37247c[_0x228ecd(0x1da)][_0x228ecd(0x1de)],'reason':_0x37247c[_0x228ecd(0x1da)][_0x228ecd(0x1c8)]})};},async 'execute'(_0x54348a){const _0x832e23=a167_0x1ac45d;if(!_0x54348a[_0x832e23(0x1ef)](_0x832e23(0x1f8))){const _0x293fc8=await pageGenerateStart[_0x832e23(0x1f0)](_0x54348a);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x293fc8};}const _0x23c082=await prepare(_0x54348a);if(!_0x23c082[_0x832e23(0x1da)][_0x832e23(0x1f2)])return{'ok':![],'message':_0x23c082[_0x832e23(0x1da)]['message'],'data':{'datasetCode':_0x23c082['dataset'][_0x832e23(0x1dd)],'pageType':_0x832e23(0x1d2),'pagePattern':_0x832e23(0x1f9),'clientOperationId':_0x23c082[_0x832e23(0x1e9)],'precheckSource':_0x23c082[_0x832e23(0x1eb)]?.[_0x832e23(0x1ea)]??_0x832e23(0x1f1),'status':_0x23c082[_0x832e23(0x1da)][_0x832e23(0x1de)],'manualResolutionRequired':_0x23c082[_0x832e23(0x1da)][_0x832e23(0x1f3)],'nextAction':_0x23c082['precheck'][_0x832e23(0x1d0)],'query':{'command':buildDataListPageStatusQueryCommand(_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],_0x54348a[_0x832e23(0x1d5)])},'dataListPageStatus':_0x23c082[_0x832e23(0x1eb)]}};const _0x5e9180=await startGenerateDataListPages(_0x54348a[_0x832e23(0x1d5)],_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],{'clientOperationId':_0x23c082['clientOperationId']}),_0x4c6637=_0x5e9180['status']==='SUCCESS'||_0x5e9180['status']===_0x832e23(0x1db)?await loadDataListPageStatusForGenerate(_0x54348a,_0x23c082[_0x832e23(0x1ec)]['code']):null,_0x318539=assessGenerateOperationState(_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],_0x5e9180['status'],_0x4c6637);return{'ok':!![],'message':_0x5e9180[_0x832e23(0x1e4)]?_0x832e23(0x1cc):_0x832e23(0x1e8),'data':{'datasetCode':_0x23c082[_0x832e23(0x1ec)]['code'],'appCode':_0x54348a[_0x832e23(0x1d5)],'pageType':_0x832e23(0x1d2),'pagePattern':_0x832e23(0x1f9),'taskId':_0x5e9180[_0x832e23(0x1cf)]??null,'operationId':_0x5e9180['operationId']??null,'clientOperationId':_0x23c082[_0x832e23(0x1e9)],'jobStatus':_0x5e9180[_0x832e23(0x1de)]??null,'progressRate':typeof _0x5e9180[_0x832e23(0x1d8)]===_0x832e23(0x1ce)?_0x5e9180[_0x832e23(0x1d8)]:null,'currentStep':_0x5e9180[_0x832e23(0x1fa)]??null,'reused':_0x5e9180[_0x832e23(0x1e4)]===!![],'status':_0x318539[_0x832e23(0x1de)],'manualResolutionRequired':_0x318539[_0x832e23(0x1f3)],'nextAction':_0x318539[_0x832e23(0x1d0)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],{'appCode':_0x54348a['appCode'],'taskId':_0x5e9180[_0x832e23(0x1cf)],'operationId':_0x5e9180[_0x832e23(0x1f7)],'clientOperationId':_0x23c082[_0x832e23(0x1e9)]})},'dataListPageStatus':_0x4c6637}};}};async function prepare(_0x2cd4db){const _0x2e3b65=a167_0x1ac45d,_0x14ab2d=await loadDatasetDetailForPage(_0x2cd4db),_0x2a07e3=await loadDataListPageStatusForGenerate(_0x2cd4db,_0x14ab2d[_0x2e3b65(0x1dd)]),_0x190e0=getUndeletedRelatedPages(_0x14ab2d);return{'dataset':_0x14ab2d,'dataListPageStatus':_0x2a07e3,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x14ab2d['code'],_0x2a07e3,{'fallbackUndeletedPages':_0x190e0})};}
|