@lovrabet/rabetbase-cli 2.5.0-beta.3 → 2.5.0-beta.5
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/README.md +28 -0
- 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-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.d.ts +13 -0
- package/lib/commands/db/table-diff-shared.js +1 -0
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.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/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/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/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/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1 -7
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.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/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/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 +6 -6
- package/skills/rabetbase/guides/database-connection-workflow.md +9 -9
- package/skills/rabetbase/references/rabetbase-config.md +2 -3
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -3
- package/skills/rabetbase/references/rabetbase-db-diff.md +7 -22
- package/skills/rabetbase/references/rabetbase-db-tables.md +14 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a140_0x3d464b=a140_0x50c3;(function(_0x380e03,_0xed9b92){const _0x82e66b=a140_0x50c3,_0x2833a9=_0x380e03();while(!![]){try{const _0x416245=parseInt(_0x82e66b(0xcd))/0x1+-parseInt(_0x82e66b(0x106))/0x2*(-parseInt(_0x82e66b(0xa1))/0x3)+parseInt(_0x82e66b(0xc7))/0x4+-parseInt(_0x82e66b(0xfb))/0x5+parseInt(_0x82e66b(0xdf))/0x6*(-parseInt(_0x82e66b(0xe0))/0x7)+parseInt(_0x82e66b(0xad))/0x8*(-parseInt(_0x82e66b(0xb8))/0x9)+-parseInt(_0x82e66b(0xec))/0xa;if(_0x416245===_0xed9b92)break;else _0x2833a9['push'](_0x2833a9['shift']());}catch(_0x46179d){_0x2833a9['push'](_0x2833a9['shift']());}}}(a140_0x460b,0xe50ac));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a140_0x3d464b(0xf6),a140_0x3d464b(0xf1),a140_0x3d464b(0x91),a140_0x3d464b(0xd7),a140_0x3d464b(0xa9)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a140_0x3d464b(0xf7),a140_0x3d464b(0xd5),a140_0x3d464b(0xcc),'channelConfig',a140_0x3d464b(0xd0),a140_0x3d464b(0xa7),a140_0x3d464b(0xea)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a140_0x3d464b(0x87),a140_0x3d464b(0x95),a140_0x3d464b(0xab)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a140_0x3d464b(0xc0),a140_0x3d464b(0xb2),a140_0x3d464b(0xae),a140_0x3d464b(0x8f),a140_0x3d464b(0x89),a140_0x3d464b(0x9c),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a140_0x3d464b(0xe5),'type':a140_0x3d464b(0xb7),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a140_0x3d464b(0xd9),'type':'boolean','required':![],'default':![],'description':a140_0x3d464b(0xb6)},{'name':a140_0x3d464b(0x101),'type':a140_0x3d464b(0xb7),'required':![],'description':a140_0x3d464b(0xa4)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a140_0x3d464b(0xe7),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3c9077,_0x35f125,_0x31899a){return new CliError(_0x3c9077,0x1,_0x35f125,_0x31899a);}export function readNotificationId(_0x208efc){const _0x939096=a140_0x3d464b,_0x1899b3=_0x208efc[_0x939096(0x9a)]('id');if(!Number[_0x939096(0x97)](_0x1899b3)||_0x1899b3<=0x0)throw notificationError(_0x939096(0xf5),_0x939096(0x8e));return _0x1899b3;}export function requireNotificationExplicitYes(_0x2f3333){const _0x4b5788=a140_0x3d464b;if(_0x2f3333['bool'](_0x4b5788(0xfe))||_0x2f3333[_0x4b5788(0x9f)](_0x4b5788(0xed)))return;throw notificationError(_0x4b5788(0x104),_0x4b5788(0x9b),_0x4b5788(0x8b));}export function readNotificationChannelType(_0x582d79,_0x108ce4=a140_0x3d464b(0xef),_0x5db31c=a140_0x3d464b(0xf6)){const _0xf637c5=a140_0x3d464b,_0x4668db=_0x582d79['str'](_0x108ce4)['trim']()||_0x5db31c;if(!NOTIFICATION_CHANNEL_TYPES[_0xf637c5(0xfd)](_0x4668db))throw CliErrors[_0xf637c5(0x103)](_0xf637c5(0x96)+_0x108ce4+':\x20'+_0x4668db,_0xf637c5(0xbb)+NOTIFICATION_CHANNEL_TYPES[_0xf637c5(0x102)](',\x20')+'.');return _0x4668db;}export function assertSingleNotificationSource(_0x5bffe8){const _0x26bc4b=a140_0x3d464b,_0x573a57=[],_0x430a0f=_0x5bffe8[_0x26bc4b(0xbe)](_0x26bc4b(0xe5))[_0x26bc4b(0xf8)]();if(_0x430a0f)_0x573a57['push']({'kind':'file','path':_0x430a0f});if(_0x5bffe8[_0x26bc4b(0x9f)](_0x26bc4b(0xd9)))_0x573a57[_0x26bc4b(0xfc)]({'kind':_0x26bc4b(0xd9)});const _0x1fd01a=_0x5bffe8[_0x26bc4b(0xbe)](_0x26bc4b(0x101))[_0x26bc4b(0xf8)]();if(_0x1fd01a)_0x573a57[_0x26bc4b(0xfc)]({'kind':_0x26bc4b(0xe1),'name':_0x1fd01a});if(_0x573a57[_0x26bc4b(0xdc)]===0x0)throw CliErrors[_0x26bc4b(0x103)](_0x26bc4b(0xf9),_0x26bc4b(0x8a));if(_0x573a57[_0x26bc4b(0xdc)]>0x1)throw CliErrors['validation']('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x26bc4b(0x8a));return _0x573a57[0x0];}export async function readNotificationDocument(_0x31f971,_0x448e39){const _0x5b556f=a140_0x3d464b,_0x4a3985=assertSingleNotificationSource(_0x31f971),_0x8d44b6=_0x4a3985[_0x5b556f(0xf3)]===_0x5b556f(0xe5)?'file\x20'+_0x4a3985['path']:_0x4a3985[_0x5b556f(0xf3)]===_0x5b556f(0xe1)?_0x5b556f(0xd1)+_0x4a3985[_0x5b556f(0xd2)]:_0x5b556f(0xd9);let _0x519162;try{if(_0x4a3985[_0x5b556f(0xf3)]===_0x5b556f(0xe5))_0x519162=await readFile(_0x4a3985[_0x5b556f(0xde)],_0x5b556f(0xee));else{if(_0x4a3985[_0x5b556f(0xf3)]==='env'){if(!(_0x4a3985[_0x5b556f(0xd2)]in process.env))throw notificationError('notification_config_source_unavailable',_0x5b556f(0xb4)+_0x4a3985[_0x5b556f(0xd2)]);_0x519162=process.env[_0x4a3985.name]??'';}else _0x519162=await readStdin();}}catch(_0x28303f){if(_0x28303f instanceof CliError)throw _0x28303f;throw notificationError(_0x5b556f(0xac),_0x5b556f(0xe8)+_0x8d44b6+'.');}let _0x57e50b;try{_0x57e50b=JSON[_0x5b556f(0xcf)](_0x519162);}catch{throw notificationError(_0x5b556f(0xc2),_0x5b556f(0xb5)+_0x8d44b6+_0x5b556f(0xdd),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x57e50b))throw notificationError(_0x5b556f(0xc2),'Notification\x20JSON\x20from\x20'+_0x8d44b6+_0x5b556f(0xc8));return validateNotificationDocument(_0x57e50b,_0x448e39);}export function projectNotificationListConfig(_0x4d50be,_0x29654e){const _0x3422dd=a140_0x3d464b;return{'id':typeof _0x4d50be['id']===_0x3422dd(0xe7)?_0x4d50be['id']:null,'configCode':requireResponseString(_0x4d50be[_0x3422dd(0x95)],_0x3422dd(0x95),_0x29654e),'configName':requireResponseString(_0x4d50be['configName'],'configName',_0x29654e),'channelType':requireResponseString(_0x4d50be['channelType'],'channelType',_0x29654e),'description':normalizeNullableString(_0x4d50be[_0x3422dd(0xd0)]),'createTime':normalizeNullableString(_0x4d50be['createTime']),'updateTime':normalizeNullableString(_0x4d50be[_0x3422dd(0x86)])};}export function normalizeExactNotificationConfig(_0xe1c797,_0x585005,_0x105886){const _0x21461d=a140_0x3d464b;if(!Number[_0x21461d(0x97)](_0xe1c797['id'])||_0xe1c797['id']!==_0x585005)throw notificationError(_0x21461d(0xd6),_0x21461d(0x8d)+_0x585005+'.');if(_0xe1c797[_0x21461d(0x87)]!==_0x105886)throw notificationError('notification_config_response_invalid',_0x21461d(0x85)+_0x585005+_0x21461d(0xc6));const _0x2096ee=requireExactString(_0xe1c797[_0x21461d(0xf7)],_0x21461d(0xf7),_0x585005),_0x1bb874=requireExactString(_0xe1c797[_0x21461d(0x95)],_0x21461d(0x95),_0x585005),_0x297237=requireExactString(_0xe1c797[_0x21461d(0xd5)],'channelType',_0x585005);if(!NOTIFICATION_CHANNEL_TYPES[_0x21461d(0xfd)](_0x297237))throw notificationError(_0x21461d(0xd6),'Notification\x20config\x20'+_0x585005+_0x21461d(0xa8));const _0x2c326d=responseNullableString(_0xe1c797[_0x21461d(0xcc)],_0x21461d(0xcc),_0x585005),_0x1399d2=responseNullableString(_0xe1c797[_0x21461d(0xa6)],_0x21461d(0xa6),_0x585005),_0x2fd79f=responseNullableString(_0xe1c797[_0x21461d(0xd0)],'description',_0x585005),_0x319890=responseNullableTimeout(_0xe1c797[_0x21461d(0xa7)],'connectTimeout',_0x585005),_0x20e7c2=responseNullableTimeout(_0xe1c797['readTimeout'],_0x21461d(0xea),_0x585005);return{'id':_0x585005,'appCode':_0x105886,'configCode':_0x1bb874,'configName':_0x2096ee,'channelType':_0x297237,'endpointUrl':redactSensitive(_0x2c326d),'channelConfig':redactSensitive(_0x1399d2),'description':_0x2fd79f,'connectTimeout':_0x319890,'readTimeout':_0x20e7c2,'endpointUrlRaw':_0x2c326d,'channelConfigRaw':_0x1399d2};}export async function requireExactNotificationConfig(_0x1da4cf,_0x46b850,_0x22bb77){const _0x171c25=a140_0x3d464b;let _0x3a5acb;try{_0x3a5acb=await getNotificationChannelConfig(_0x46b850,_0x1da4cf);}catch{throw safeApiFailure(_0x22bb77,_0x171c25(0xa2),_0x171c25(0xf0)+_0x1da4cf+_0x171c25(0xcb));}return normalizeExactNotificationConfig(_0x3a5acb,_0x46b850,_0x1da4cf);}export function projectNotificationConfig(_0x1fe516){const _0x677e64=a140_0x3d464b;return{'id':_0x1fe516['id']??null,'appCode':_0x1fe516[_0x677e64(0x87)],'configCode':_0x1fe516['configCode']??null,'configName':_0x1fe516[_0x677e64(0xf7)],'channelType':_0x1fe516['channelType'],'endpointUrl':redactSensitive(_0x1fe516['endpointUrl']),'channelConfig':redactSensitive(_0x1fe516[_0x677e64(0xa6)]),'description':_0x1fe516[_0x677e64(0xd0)]??null,'connectTimeout':_0x1fe516[_0x677e64(0xa7)]??null,'readTimeout':_0x1fe516['readTimeout']??null};}export function notificationSelector(_0x3539ac){const _0x20ffba=a140_0x3d464b;return{'appCode':_0x3539ac[_0x20ffba(0x87)],'id':_0x3539ac['id'],'configCode':_0x3539ac['configCode'],'configName':_0x3539ac[_0x20ffba(0xf7)],'channelType':_0x3539ac[_0x20ffba(0xd5)]};}export function createMutationInput(_0x5691d9,_0x496144){const _0x2af96e=a140_0x3d464b;return{'appCode':_0x5691d9,'configName':_0x496144[_0x2af96e(0xf7)],'channelType':_0x496144[_0x2af96e(0xd5)],...hasOwn(_0x496144,_0x2af96e(0xcc))?{'endpointUrl':_0x496144[_0x2af96e(0xcc)]}:{},...hasOwn(_0x496144,_0x2af96e(0xa6))?{'channelConfig':serializeChannelConfig(_0x496144[_0x2af96e(0xa6)])}:{},...hasOwn(_0x496144,_0x2af96e(0xd0))?{'description':_0x496144[_0x2af96e(0xd0)]}:{},...hasOwn(_0x496144,_0x2af96e(0xa7))?{'connectTimeout':_0x496144[_0x2af96e(0xa7)]}:{},...hasOwn(_0x496144,'readTimeout')?{'readTimeout':_0x496144[_0x2af96e(0xea)]}:{}};}export function mergeUpdateInput(_0x474e1b,_0xf2e3d3){const _0x1d03d3=a140_0x3d464b;return{'id':_0x474e1b['id'],'appCode':_0x474e1b[_0x1d03d3(0x87)],'configName':_0xf2e3d3[_0x1d03d3(0xf7)]??_0x474e1b[_0x1d03d3(0xf7)],'channelType':_0xf2e3d3[_0x1d03d3(0xd5)]??_0x474e1b[_0x1d03d3(0xd5)],'endpointUrl':hasOwn(_0xf2e3d3,_0x1d03d3(0xcc))?_0xf2e3d3[_0x1d03d3(0xcc)]:_0x474e1b[_0x1d03d3(0xda)],'channelConfig':hasOwn(_0xf2e3d3,'channelConfig')?serializeChannelConfig(_0xf2e3d3[_0x1d03d3(0xa6)]):_0x474e1b[_0x1d03d3(0xb3)],'description':hasOwn(_0xf2e3d3,'description')?_0xf2e3d3[_0x1d03d3(0xd0)]:_0x474e1b[_0x1d03d3(0xd0)],'connectTimeout':hasOwn(_0xf2e3d3,_0x1d03d3(0xa7))?_0xf2e3d3[_0x1d03d3(0xa7)]:_0x474e1b[_0x1d03d3(0xa7)],'readTimeout':hasOwn(_0xf2e3d3,_0x1d03d3(0xea))?_0xf2e3d3['readTimeout']:_0x474e1b[_0x1d03d3(0xea)]};}export function plannedUpdateProjection(_0x5dda02,_0x44ecf6){const _0x4d4451=a140_0x3d464b;return projectNotificationConfig({'id':_0x5dda02['id'],'appCode':_0x5dda02[_0x4d4451(0x87)],'configCode':_0x5dda02[_0x4d4451(0x95)],'configName':_0x44ecf6['configName']??_0x5dda02[_0x4d4451(0xf7)],'channelType':_0x44ecf6['channelType']??_0x5dda02[_0x4d4451(0xd5)],'endpointUrl':hasOwn(_0x44ecf6,_0x4d4451(0xcc))?_0x44ecf6[_0x4d4451(0xcc)]:_0x5dda02[_0x4d4451(0xda)],'channelConfig':hasOwn(_0x44ecf6,_0x4d4451(0xa6))?_0x44ecf6[_0x4d4451(0xa6)]:_0x5dda02[_0x4d4451(0xb3)],'description':hasOwn(_0x44ecf6,_0x4d4451(0xd0))?_0x44ecf6[_0x4d4451(0xd0)]:_0x5dda02['description'],'connectTimeout':hasOwn(_0x44ecf6,'connectTimeout')?_0x44ecf6[_0x4d4451(0xa7)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x5dda02['connectTimeout'],'readTimeout':hasOwn(_0x44ecf6,_0x4d4451(0xea))?_0x44ecf6[_0x4d4451(0xea)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x5dda02[_0x4d4451(0xea)]});}export function requestedSafeFieldsMatch(_0x399b56,_0x3e33f9,_0x2cb3d2){const _0x2c0e1c=a140_0x3d464b,_0x5ccf31=[],_0x365dda=[],_0x2f533d=[];for(const _0x563aa3 of[_0x2c0e1c(0xf7),_0x2c0e1c(0xd5),_0x2c0e1c(0xd0)]){if(!hasOwn(_0x2cb3d2,_0x563aa3))continue;_0x2f533d[_0x2c0e1c(0xfc)](_0x563aa3),_0x5ccf31[_0x2c0e1c(0xfc)](_0x3e33f9[_0x563aa3]===_0x2cb3d2[_0x563aa3]),_0x365dda[_0x2c0e1c(0xfc)](_0x399b56[_0x563aa3]!==_0x2cb3d2[_0x563aa3]&&_0x3e33f9[_0x563aa3]===_0x2cb3d2[_0x563aa3]);}for(const _0x1cbce5 of[_0x2c0e1c(0xa7),_0x2c0e1c(0xea)]){if(!hasOwn(_0x2cb3d2,_0x1cbce5))continue;const _0x192def=_0x2cb3d2[_0x1cbce5]??(_0x1cbce5===_0x2c0e1c(0xa7)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x2f533d['push'](_0x1cbce5),_0x5ccf31['push'](_0x3e33f9[_0x1cbce5]===_0x192def),_0x365dda[_0x2c0e1c(0xfc)](_0x399b56[_0x1cbce5]!==_0x192def&&_0x3e33f9[_0x1cbce5]===_0x192def);}return hasOwn(_0x2cb3d2,_0x2c0e1c(0xcc))&&_0x2cb3d2[_0x2c0e1c(0xcc)]===null&&(_0x2f533d[_0x2c0e1c(0xfc)](_0x2c0e1c(0x88)),_0x5ccf31['push'](_0x3e33f9['endpointUrlRaw']===null||_0x3e33f9[_0x2c0e1c(0xda)]===''),_0x365dda[_0x2c0e1c(0xfc)](_0x399b56[_0x2c0e1c(0xda)]!==null&&_0x399b56[_0x2c0e1c(0xda)]!==''&&(_0x3e33f9[_0x2c0e1c(0xda)]===null||_0x3e33f9[_0x2c0e1c(0xda)]===''))),{'allMatch':_0x5ccf31['every'](Boolean),'provesChange':_0x365dda['some'](Boolean),'verifiedFields':_0x2f533d};}export function validateNotificationDeleteReadback(_0x58a864,_0x3ad5f6,_0x3b9eef){const _0x467bea=a140_0x3d464b;for(const [_0xa65f0b,_0x2c350c]of _0x58a864[_0x467bea(0xdb)]()){if(!Number[_0x467bea(0x97)](_0x2c350c['id'])||_0x2c350c['id']<=0x0)throw notificationError(_0x467bea(0xd6),'Notification\x20config\x20list\x20item\x20'+(_0xa65f0b+0x1)+_0x467bea(0xb9));if(_0x2c350c[_0x467bea(0x87)]!==_0x3ad5f6)throw notificationError(_0x467bea(0xd6),_0x467bea(0xd8)+(_0xa65f0b+0x1)+_0x467bea(0xfa));if(_0x2c350c[_0x467bea(0xd5)]!==_0x3b9eef)throw notificationError('notification_config_response_invalid',_0x467bea(0xd8)+(_0xa65f0b+0x1)+_0x467bea(0xc9));}}export function safeApiFailure(_0x466fa9,_0x2a2d06,_0x415fbd){const _0xa57cd1=a140_0x3d464b;return notificationError('notification_config_'+_0x466fa9+'_'+(_0x2a2d06===_0xa57cd1(0x93)?_0xa57cd1(0xbc):_0x2a2d06+_0xa57cd1(0x9e)),_0xa57cd1(0x85)+_0x466fa9+'\x20'+_0x2a2d06+_0xa57cd1(0xd3),_0x415fbd);}export function notificationLookupCommand(_0x45851c,_0x428a10){const _0x1c4c31=a140_0x3d464b;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x45851c+'\x20--type\x20'+_0x428a10+_0x1c4c31(0x105);}function validateNotificationDocument(_0x5bcf39,_0x34d722){const _0x3fc40c=a140_0x3d464b;for(const _0x1ca63f of Object['keys'](_0x5bcf39)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x1ca63f))throw notificationError('notification_config_field_forbidden',_0x3fc40c(0xaa)+_0x1ca63f+_0x3fc40c(0xca));if(!ALLOWED_INPUT_FIELDS['has'](_0x1ca63f))throw notificationError('notification_config_field_unknown',_0x3fc40c(0x100)+_0x1ca63f+'\x22.');}if(_0x34d722===_0x3fc40c(0xa3)&&Object[_0x3fc40c(0xc5)](_0x5bcf39)[_0x3fc40c(0xdc)]===0x0)throw notificationError(_0x3fc40c(0xe6),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x4d6488={};if(hasOwn(_0x5bcf39,_0x3fc40c(0xf7)))_0x4d6488['configName']=validateRequiredString(_0x5bcf39[_0x3fc40c(0xf7)],_0x3fc40c(0xf7),0x80);else{if(_0x34d722==='create')throw notificationError(_0x3fc40c(0xba),_0x3fc40c(0xd4)+_0x3fc40c(0xc1));}if(hasOwn(_0x5bcf39,_0x3fc40c(0xd5))){if(typeof _0x5bcf39[_0x3fc40c(0xd5)]!=='string')throw invalidFieldType(_0x3fc40c(0xd5),_0x3fc40c(0xe3));const _0x13ad2a=_0x5bcf39[_0x3fc40c(0xd5)][_0x3fc40c(0xf8)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x3fc40c(0xfd)](_0x13ad2a))throw notificationError('notification_config_field_invalid',_0x3fc40c(0xc4),_0x3fc40c(0xbb)+NOTIFICATION_CHANNEL_TYPES[_0x3fc40c(0x102)](',\x20')+'.');_0x4d6488['channelType']=_0x13ad2a;}else{if(_0x34d722===_0x3fc40c(0x98))throw notificationError(_0x3fc40c(0xba),'Create\x20JSON\x20requires\x20field\x20'+_0x3fc40c(0x92));}for(const [_0x173108,_0x597850]of[[_0x3fc40c(0xcc),0x200],[_0x3fc40c(0xd0),0x100]]){if(!hasOwn(_0x5bcf39,_0x173108))continue;const _0x1add33=_0x5bcf39[_0x173108];if(_0x1add33!==null&&typeof _0x1add33!==_0x3fc40c(0xb7))throw invalidFieldType(_0x173108,_0x3fc40c(0x90));if(typeof _0x1add33===_0x3fc40c(0xb7)&&_0x1add33[_0x3fc40c(0xdc)]>_0x597850)throw notificationError('notification_config_field_invalid',_0x3fc40c(0xaa)+_0x173108+_0x3fc40c(0xeb)+_0x597850+'\x20characters.');_0x4d6488[_0x173108]=_0x1add33;}if(hasOwn(_0x5bcf39,'channelConfig')){const _0x57860e=_0x5bcf39[_0x3fc40c(0xa6)];if(_0x57860e===null&&_0x34d722==='create')throw invalidFieldType(_0x3fc40c(0xa6),_0x3fc40c(0x9d));if(_0x57860e!==null&&!isJsonObject(_0x57860e))throw invalidFieldType('channelConfig',_0x34d722===_0x3fc40c(0xa3)?_0x3fc40c(0xf4):_0x3fc40c(0x9d));_0x57860e!==null&&validateChannelConfigFields(_0x4d6488[_0x3fc40c(0xd5)],_0x57860e),_0x4d6488[_0x3fc40c(0xa6)]=_0x57860e;}for(const _0xbab614 of['connectTimeout',_0x3fc40c(0xea)]){if(!hasOwn(_0x5bcf39,_0xbab614))continue;const _0x3145d9=_0x5bcf39[_0xbab614];if(_0x3145d9!==null&&(!Number[_0x3fc40c(0x97)](_0x3145d9)||_0x3145d9<0x0))throw notificationError(_0x3fc40c(0xe2),_0x3fc40c(0xaa)+_0xbab614+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x4d6488[_0xbab614]=_0x3145d9;}return _0x4d6488;}function a140_0x460b(){const _0x3d3893=['parse','description','environment\x20variable\x20','name','\x20failed.','Create\x20JSON\x20requires\x20field\x20','channelType','notification_config_response_invalid','WECOM','Notification\x20config\x20list\x20item\x20','stdin','endpointUrlRaw','entries','length','\x20is\x20invalid.','path','6CLGnyN','210399igNSvu','env','notification_config_field_invalid','a\x20supported\x20string','a\x20non-empty\x20string','file','notification_config_update_empty','number','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','Item\x20','readTimeout','\x22\x20cannot\x20exceed\x20','13175800ebTELc','yes','utf8','type','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','FEISHU','\x22\x20must\x20be\x20a\x20non-empty\x20string.','kind','a\x20JSON\x20object\x20or\x20null','notification_config_id_invalid','EMAIL','configName','trim','Missing\x20notification\x20JSON\x20source.','\x20has\x20an\x20invalid\x20appCode.','9245815cbNqjc','push','includes','dry-run','isArray','Unknown\x20notification\x20JSON\x20field\x20\x22','from-env','join','validation','notification_config_confirmation_required','\x20--format\x20compress','242038sdmxKl','Notification\x20config\x20','updateTime','appCode','endpointUrl:null','subjectPrefix','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','replyTo','a\x20string\x20or\x20null','DINGTALK','\x22channelType\x22.','mutation','prototype','configCode','Invalid\x20--','isSafeInteger','create','stringify','num','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','fromName','a\x20JSON\x20object','_unavailable','bool','\x20is\x20missing\x20required\x20field\x20\x22','39caxfkY','preflight','update','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','setEncoding','channelConfig','connectTimeout','\x20has\x20an\x20unsupported\x20channelType.','WEBHOOK','Notification\x20JSON\x20field\x20\x22','channelCode','notification_config_source_unavailable','174216qBjMyu','bccList','messageTemplate','Invalid\x20notification\x20config\x20response.','<redacted>','ccList','channelConfigRaw','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Notification\x20JSON\x20from\x20','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','string','63VEZvRv','\x20has\x20an\x20invalid\x20id.','notification_config_field_required','Allowed\x20values:\x20','failed','\x20characters.','str','\x20has\x20invalid\x20field\x20\x22','recipients','\x22configName\x22.','notification_config_json_invalid','apiError','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','keys','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','5177076qTLwbn','\x20must\x20be\x20an\x20object.','\x20has\x20an\x20invalid\x20channelType.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','endpointUrl','1419879TwkOpR','\x22\x20must\x20be\x20'];a140_0x460b=function(){return _0x3d3893;};return a140_0x460b();}function validateRequiredString(_0x508e34,_0x5637f7,_0x4b2373){const _0x4b91b3=a140_0x3d464b;if(typeof _0x508e34!==_0x4b91b3(0xb7))throw invalidFieldType(_0x5637f7,_0x4b91b3(0xe4));const _0x4bc46b=_0x508e34[_0x4b91b3(0xf8)]();if(!_0x4bc46b)throw notificationError(_0x4b91b3(0xe2),'Notification\x20JSON\x20field\x20\x22'+_0x5637f7+_0x4b91b3(0xf2));if(_0x4bc46b[_0x4b91b3(0xdc)]>_0x4b2373)throw notificationError(_0x4b91b3(0xe2),_0x4b91b3(0xaa)+_0x5637f7+_0x4b91b3(0xeb)+_0x4b2373+_0x4b91b3(0xbd));return _0x4bc46b;}function validateChannelConfigFields(_0x5c3fd8,_0x4bfbe4){const _0x59d1dc=a140_0x3d464b;if(hasOwn(_0x4bfbe4,_0x59d1dc(0xaf)))throw forbiddenChannelConfigField('messageTemplate');if(_0x5c3fd8==='EMAIL')for(const _0x3ff948 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4bfbe4,_0x3ff948))throw forbiddenChannelConfigField(_0x3ff948);}}function forbiddenChannelConfigField(_0x33b3dc){const _0x3eeec9=a140_0x3d464b;return notificationError('notification_config_channel_field_forbidden',_0x3eeec9(0x8c)+_0x33b3dc+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x4b37eb,_0x4050a4){const _0x43a1f6=a140_0x3d464b;return notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x4b37eb+_0x43a1f6(0xce)+_0x4050a4+'.');}function serializeChannelConfig(_0x3c4230){const _0x29e92f=a140_0x3d464b;return _0x3c4230===null||_0x3c4230===undefined?null:JSON[_0x29e92f(0x99)](_0x3c4230);}function redactSensitive(_0x4405e9){const _0x32ae26=a140_0x3d464b;return _0x4405e9===null||_0x4405e9===undefined||_0x4405e9===''?null:_0x32ae26(0xb1);}function requireResponseString(_0x80e1b5,_0x2af416,_0x1abb0d){const _0x31d0b9=a140_0x3d464b;if(typeof _0x80e1b5!==_0x31d0b9(0xb7)||_0x80e1b5['trim']()==='')throw CliErrors[_0x31d0b9(0xc3)](_0x31d0b9(0xb0),_0x31d0b9(0xe9)+(_0x1abb0d+0x1)+_0x31d0b9(0xa0)+_0x2af416+'\x22.');return _0x80e1b5[_0x31d0b9(0xf8)]();}function requireExactString(_0x27c657,_0x16f2b8,_0x14b2f6){const _0x43a5da=a140_0x3d464b;if(typeof _0x27c657!=='string'||_0x27c657[_0x43a5da(0xf8)]()==='')throw notificationError('notification_config_response_invalid',_0x43a5da(0x85)+_0x14b2f6+_0x43a5da(0xa0)+_0x16f2b8+'\x22.');return _0x27c657[_0x43a5da(0xf8)]();}function responseNullableString(_0x32ba89,_0x1cdac6,_0x1d04fe){const _0x106947=a140_0x3d464b;if(_0x32ba89===undefined||_0x32ba89===null)return null;if(typeof _0x32ba89!=='string')throw notificationError(_0x106947(0xd6),'Notification\x20config\x20'+_0x1d04fe+_0x106947(0xbf)+_0x1cdac6+'\x22.');return _0x32ba89;}function responseNullableTimeout(_0x2f2637,_0x532975,_0xfeee4d){const _0x387f40=a140_0x3d464b;if(_0x2f2637===undefined||_0x2f2637===null)return null;if(!Number[_0x387f40(0x97)](_0x2f2637)||_0x2f2637<0x0)throw notificationError(_0x387f40(0xd6),_0x387f40(0x85)+_0xfeee4d+_0x387f40(0xbf)+_0x532975+'\x22.');return _0x2f2637;}function a140_0x50c3(_0x48d51e,_0x3cc82e){_0x48d51e=_0x48d51e-0x85;const _0x460b36=a140_0x460b();let _0x50c301=_0x460b36[_0x48d51e];return _0x50c301;}function normalizeNullableString(_0x1dedc1){const _0x180204=a140_0x3d464b;return typeof _0x1dedc1===_0x180204(0xb7)?_0x1dedc1:null;}function isJsonObject(_0x8af03a){const _0x415302=a140_0x3d464b;return _0x8af03a!==null&&typeof _0x8af03a==='object'&&!Array[_0x415302(0xff)](_0x8af03a);}function hasOwn(_0x9c9b18,_0x15caec){const _0x253f47=a140_0x3d464b;return Object[_0x253f47(0x94)]['hasOwnProperty']['call'](_0x9c9b18,_0x15caec);}async function readStdin(){const _0x379354=a140_0x3d464b;let _0x1b50ea='';process[_0x379354(0xd9)][_0x379354(0xa5)]('utf8');for await(const _0x52a8e9 of process[_0x379354(0xd9)])_0x1b50ea+=_0x52a8e9;return _0x1b50ea;}
|
|
1
|
+
const a141_0x56e1dc=a141_0xb74d;(function(_0x2ce96e,_0x3134fc){const _0x553483=a141_0xb74d,_0x4e005e=_0x2ce96e();while(!![]){try{const _0x4d0bfb=parseInt(_0x553483(0x14b))/0x1*(-parseInt(_0x553483(0x12b))/0x2)+-parseInt(_0x553483(0x122))/0x3+parseInt(_0x553483(0x125))/0x4+parseInt(_0x553483(0x14c))/0x5+parseInt(_0x553483(0x103))/0x6+-parseInt(_0x553483(0x107))/0x7*(parseInt(_0x553483(0xe0))/0x8)+parseInt(_0x553483(0x11a))/0x9;if(_0x4d0bfb===_0x3134fc)break;else _0x4e005e['push'](_0x4e005e['shift']());}catch(_0x501266){_0x4e005e['push'](_0x4e005e['shift']());}}}(a141_0x6eba,0x74b82));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=[a141_0x56e1dc(0xf2),a141_0x56e1dc(0x119),a141_0x56e1dc(0xf6),a141_0x56e1dc(0x110),a141_0x56e1dc(0x134)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType',a141_0x56e1dc(0x152),'channelConfig',a141_0x56e1dc(0x157),a141_0x56e1dc(0xf3),a141_0x56e1dc(0xec)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a141_0x56e1dc(0x105),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a141_0x56e1dc(0x11f),a141_0x56e1dc(0x10d),a141_0x56e1dc(0x138),a141_0x56e1dc(0x140),a141_0x56e1dc(0xdd),'subjectPrefix','fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a141_0x56e1dc(0xfb),'type':a141_0x56e1dc(0x115),'required':![],'description':a141_0x56e1dc(0xf7)},{'name':a141_0x56e1dc(0x109),'type':a141_0x56e1dc(0x104),'required':![],'default':![],'description':a141_0x56e1dc(0x142)},{'name':a141_0x56e1dc(0x156),'type':a141_0x56e1dc(0x115),'required':![],'description':a141_0x56e1dc(0x135)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a141_0x56e1dc(0x129)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x1ead4b,_0xfa0cf7,_0x88fc0c){return new CliError(_0x1ead4b,0x1,_0xfa0cf7,_0x88fc0c);}export function readNotificationId(_0x64892){const _0x4552dd=a141_0x56e1dc,_0x473d71=_0x64892[_0x4552dd(0x112)]('id');if(!Number['isSafeInteger'](_0x473d71)||_0x473d71<=0x0)throw notificationError(_0x4552dd(0xeb),_0x4552dd(0x11e));return _0x473d71;}export function requireNotificationExplicitYes(_0x42ea01){const _0x4ab63d=a141_0x56e1dc;if(_0x42ea01[_0x4ab63d(0xe8)](_0x4ab63d(0x121))||_0x42ea01[_0x4ab63d(0xe8)](_0x4ab63d(0x143)))return;throw notificationError(_0x4ab63d(0xde),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x4ab63d(0x10c));}export function readNotificationChannelType(_0x51ed67,_0x1079f4='type',_0x344ea8=a141_0x56e1dc(0xf2)){const _0x37923f=a141_0x56e1dc,_0x5deabe=_0x51ed67['str'](_0x1079f4)['trim']()||_0x344ea8;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5deabe))throw CliErrors[_0x37923f(0x159)](_0x37923f(0x13a)+_0x1079f4+':\x20'+_0x5deabe,_0x37923f(0x113)+NOTIFICATION_CHANNEL_TYPES[_0x37923f(0x14f)](',\x20')+'.');return _0x5deabe;}export function assertSingleNotificationSource(_0x2fde07){const _0x5017f4=a141_0x56e1dc,_0x4fb726=[],_0x26da94=_0x2fde07[_0x5017f4(0x100)](_0x5017f4(0xfb))['trim']();if(_0x26da94)_0x4fb726[_0x5017f4(0x137)]({'kind':_0x5017f4(0xfb),'path':_0x26da94});if(_0x2fde07[_0x5017f4(0xe8)](_0x5017f4(0x109)))_0x4fb726[_0x5017f4(0x137)]({'kind':_0x5017f4(0x109)});const _0x28f219=_0x2fde07[_0x5017f4(0x100)](_0x5017f4(0x156))[_0x5017f4(0x120)]();if(_0x28f219)_0x4fb726[_0x5017f4(0x137)]({'kind':_0x5017f4(0x108),'name':_0x28f219});if(_0x4fb726[_0x5017f4(0xef)]===0x0)throw CliErrors[_0x5017f4(0x159)](_0x5017f4(0xe5),_0x5017f4(0x154));if(_0x4fb726[_0x5017f4(0xef)]>0x1)throw CliErrors[_0x5017f4(0x159)](_0x5017f4(0x123),_0x5017f4(0x154));return _0x4fb726[0x0];}export async function readNotificationDocument(_0x3d73c9,_0x5c7f7c){const _0x476ca9=a141_0x56e1dc,_0x15f605=assertSingleNotificationSource(_0x3d73c9),_0x176f75=_0x15f605['kind']==='file'?_0x476ca9(0xf0)+_0x15f605[_0x476ca9(0x133)]:_0x15f605[_0x476ca9(0x139)]===_0x476ca9(0x108)?_0x476ca9(0xf1)+_0x15f605['name']:'stdin';let _0xf92630;try{if(_0x15f605[_0x476ca9(0x139)]===_0x476ca9(0xfb))_0xf92630=await readFile(_0x15f605[_0x476ca9(0x133)],_0x476ca9(0x11c));else{if(_0x15f605['kind']===_0x476ca9(0x108)){if(!(_0x15f605[_0x476ca9(0x12e)]in process.env))throw notificationError(_0x476ca9(0x144),_0x476ca9(0x13e)+_0x15f605[_0x476ca9(0x12e)]);_0xf92630=process.env[_0x15f605.name]??'';}else _0xf92630=await readStdin();}}catch(_0x329e05){if(_0x329e05 instanceof CliError)throw _0x329e05;throw notificationError(_0x476ca9(0x144),_0x476ca9(0xfd)+_0x176f75+'.');}let _0x4b466c;try{_0x4b466c=JSON[_0x476ca9(0x15c)](_0xf92630);}catch{throw notificationError(_0x476ca9(0x13c),'Notification\x20JSON\x20from\x20'+_0x176f75+_0x476ca9(0x12d),_0x476ca9(0x15a));}if(!isJsonObject(_0x4b466c))throw notificationError(_0x476ca9(0x13c),_0x476ca9(0x12f)+_0x176f75+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x4b466c,_0x5c7f7c);}export function projectNotificationListConfig(_0x32071b,_0x5071e7){const _0xdf8045=a141_0x56e1dc;return{'id':typeof _0x32071b['id']===_0xdf8045(0x155)?_0x32071b['id']:null,'configCode':requireResponseString(_0x32071b[_0xdf8045(0x105)],_0xdf8045(0x105),_0x5071e7),'configName':requireResponseString(_0x32071b[_0xdf8045(0xfe)],_0xdf8045(0xfe),_0x5071e7),'channelType':requireResponseString(_0x32071b[_0xdf8045(0x132)],_0xdf8045(0x132),_0x5071e7),'description':normalizeNullableString(_0x32071b[_0xdf8045(0x157)]),'createTime':normalizeNullableString(_0x32071b[_0xdf8045(0x102)]),'updateTime':normalizeNullableString(_0x32071b[_0xdf8045(0x13f)])};}export function normalizeExactNotificationConfig(_0x468a0,_0x5f394e,_0x1dd539){const _0x21d222=a141_0x56e1dc;if(!Number[_0x21d222(0xe6)](_0x468a0['id'])||_0x468a0['id']!==_0x5f394e)throw notificationError(_0x21d222(0x13d),_0x21d222(0x148)+_0x5f394e+'.');if(_0x468a0['appCode']!==_0x1dd539)throw notificationError(_0x21d222(0x13d),_0x21d222(0xdf)+_0x5f394e+_0x21d222(0x151));const _0x3d811b=requireExactString(_0x468a0[_0x21d222(0xfe)],_0x21d222(0xfe),_0x5f394e),_0x17b2f4=requireExactString(_0x468a0['configCode'],_0x21d222(0x105),_0x5f394e),_0x4d9825=requireExactString(_0x468a0[_0x21d222(0x132)],_0x21d222(0x132),_0x5f394e);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x4d9825))throw notificationError(_0x21d222(0x13d),_0x21d222(0xdf)+_0x5f394e+_0x21d222(0xe3));const _0x4e4ee1=responseNullableString(_0x468a0[_0x21d222(0x152)],'endpointUrl',_0x5f394e),_0x4a417c=responseNullableString(_0x468a0['channelConfig'],_0x21d222(0x149),_0x5f394e),_0x21609f=responseNullableString(_0x468a0[_0x21d222(0x157)],_0x21d222(0x157),_0x5f394e),_0x2277c0=responseNullableTimeout(_0x468a0[_0x21d222(0xf3)],_0x21d222(0xf3),_0x5f394e),_0x196ee5=responseNullableTimeout(_0x468a0[_0x21d222(0xec)],_0x21d222(0xec),_0x5f394e);return{'id':_0x5f394e,'appCode':_0x1dd539,'configCode':_0x17b2f4,'configName':_0x3d811b,'channelType':_0x4d9825,'endpointUrl':redactSensitive(_0x4e4ee1),'channelConfig':redactSensitive(_0x4a417c),'description':_0x21609f,'connectTimeout':_0x2277c0,'readTimeout':_0x196ee5,'endpointUrlRaw':_0x4e4ee1,'channelConfigRaw':_0x4a417c};}export async function requireExactNotificationConfig(_0x1c315c,_0x1c0f11,_0x59ec35){const _0x22dbac=a141_0x56e1dc;let _0x176d25;try{_0x176d25=await getNotificationChannelConfig(_0x1c0f11,_0x1c315c);}catch{throw safeApiFailure(_0x59ec35,_0x22dbac(0xf9),_0x22dbac(0x124)+_0x1c315c+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x176d25,_0x1c0f11,_0x1c315c);}export function projectNotificationConfig(_0x1d7d9c){const _0x103137=a141_0x56e1dc;return{'id':_0x1d7d9c['id']??null,'appCode':_0x1d7d9c['appCode'],'configCode':_0x1d7d9c['configCode']??null,'configName':_0x1d7d9c['configName'],'channelType':_0x1d7d9c[_0x103137(0x132)],'endpointUrl':redactSensitive(_0x1d7d9c['endpointUrl']),'channelConfig':redactSensitive(_0x1d7d9c['channelConfig']),'description':_0x1d7d9c[_0x103137(0x157)]??null,'connectTimeout':_0x1d7d9c['connectTimeout']??null,'readTimeout':_0x1d7d9c[_0x103137(0xec)]??null};}export function notificationSelector(_0x80d774){const _0x2f9f61=a141_0x56e1dc;return{'appCode':_0x80d774[_0x2f9f61(0x12a)],'id':_0x80d774['id'],'configCode':_0x80d774[_0x2f9f61(0x105)],'configName':_0x80d774['configName'],'channelType':_0x80d774[_0x2f9f61(0x132)]};}export function createMutationInput(_0x2a7d4d,_0xae0687){const _0x14a437=a141_0x56e1dc;return{'appCode':_0x2a7d4d,'configName':_0xae0687['configName'],'channelType':_0xae0687['channelType'],...hasOwn(_0xae0687,_0x14a437(0x152))?{'endpointUrl':_0xae0687[_0x14a437(0x152)]}:{},...hasOwn(_0xae0687,'channelConfig')?{'channelConfig':serializeChannelConfig(_0xae0687[_0x14a437(0x149)])}:{},...hasOwn(_0xae0687,_0x14a437(0x157))?{'description':_0xae0687['description']}:{},...hasOwn(_0xae0687,'connectTimeout')?{'connectTimeout':_0xae0687[_0x14a437(0xf3)]}:{},...hasOwn(_0xae0687,_0x14a437(0xec))?{'readTimeout':_0xae0687['readTimeout']}:{}};}export function mergeUpdateInput(_0x26e704,_0x1a1dff){const _0x535e00=a141_0x56e1dc;return{'id':_0x26e704['id'],'appCode':_0x26e704[_0x535e00(0x12a)],'configName':_0x1a1dff[_0x535e00(0xfe)]??_0x26e704[_0x535e00(0xfe)],'channelType':_0x1a1dff[_0x535e00(0x132)]??_0x26e704[_0x535e00(0x132)],'endpointUrl':hasOwn(_0x1a1dff,_0x535e00(0x152))?_0x1a1dff['endpointUrl']:_0x26e704['endpointUrlRaw'],'channelConfig':hasOwn(_0x1a1dff,_0x535e00(0x149))?serializeChannelConfig(_0x1a1dff[_0x535e00(0x149)]):_0x26e704[_0x535e00(0xfc)],'description':hasOwn(_0x1a1dff,_0x535e00(0x157))?_0x1a1dff[_0x535e00(0x157)]:_0x26e704[_0x535e00(0x157)],'connectTimeout':hasOwn(_0x1a1dff,'connectTimeout')?_0x1a1dff['connectTimeout']:_0x26e704[_0x535e00(0xf3)],'readTimeout':hasOwn(_0x1a1dff,'readTimeout')?_0x1a1dff[_0x535e00(0xec)]:_0x26e704[_0x535e00(0xec)]};}export function plannedUpdateProjection(_0x40fa81,_0x316c47){const _0x188603=a141_0x56e1dc;return projectNotificationConfig({'id':_0x40fa81['id'],'appCode':_0x40fa81['appCode'],'configCode':_0x40fa81[_0x188603(0x105)],'configName':_0x316c47[_0x188603(0xfe)]??_0x40fa81[_0x188603(0xfe)],'channelType':_0x316c47[_0x188603(0x132)]??_0x40fa81[_0x188603(0x132)],'endpointUrl':hasOwn(_0x316c47,_0x188603(0x152))?_0x316c47[_0x188603(0x152)]:_0x40fa81[_0x188603(0xf4)],'channelConfig':hasOwn(_0x316c47,_0x188603(0x149))?_0x316c47[_0x188603(0x149)]:_0x40fa81['channelConfigRaw'],'description':hasOwn(_0x316c47,_0x188603(0x157))?_0x316c47['description']:_0x40fa81[_0x188603(0x157)],'connectTimeout':hasOwn(_0x316c47,_0x188603(0xf3))?_0x316c47[_0x188603(0xf3)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x40fa81[_0x188603(0xf3)],'readTimeout':hasOwn(_0x316c47,_0x188603(0xec))?_0x316c47[_0x188603(0xec)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x40fa81['readTimeout']});}export function requestedSafeFieldsMatch(_0x3b5810,_0xd0dd27,_0x33460a){const _0x233281=a141_0x56e1dc,_0x25cca6=[],_0x51ac45=[],_0x4e28ff=[];for(const _0x5d9633 of[_0x233281(0xfe),_0x233281(0x132),_0x233281(0x157)]){if(!hasOwn(_0x33460a,_0x5d9633))continue;_0x4e28ff['push'](_0x5d9633),_0x25cca6[_0x233281(0x137)](_0xd0dd27[_0x5d9633]===_0x33460a[_0x5d9633]),_0x51ac45[_0x233281(0x137)](_0x3b5810[_0x5d9633]!==_0x33460a[_0x5d9633]&&_0xd0dd27[_0x5d9633]===_0x33460a[_0x5d9633]);}for(const _0x2437a of[_0x233281(0xf3),'readTimeout']){if(!hasOwn(_0x33460a,_0x2437a))continue;const _0xae6e44=_0x33460a[_0x2437a]??(_0x2437a===_0x233281(0xf3)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x4e28ff[_0x233281(0x137)](_0x2437a),_0x25cca6['push'](_0xd0dd27[_0x2437a]===_0xae6e44),_0x51ac45['push'](_0x3b5810[_0x2437a]!==_0xae6e44&&_0xd0dd27[_0x2437a]===_0xae6e44);}return hasOwn(_0x33460a,_0x233281(0x152))&&_0x33460a[_0x233281(0x152)]===null&&(_0x4e28ff[_0x233281(0x137)](_0x233281(0x146)),_0x25cca6[_0x233281(0x137)](_0xd0dd27['endpointUrlRaw']===null||_0xd0dd27['endpointUrlRaw']===''),_0x51ac45[_0x233281(0x137)](_0x3b5810[_0x233281(0xf4)]!==null&&_0x3b5810[_0x233281(0xf4)]!==''&&(_0xd0dd27[_0x233281(0xf4)]===null||_0xd0dd27[_0x233281(0xf4)]===''))),{'allMatch':_0x25cca6['every'](Boolean),'provesChange':_0x51ac45['some'](Boolean),'verifiedFields':_0x4e28ff};}export function validateNotificationDeleteReadback(_0x1aaee8,_0x5367d7,_0x52ee9b){const _0xc118f0=a141_0x56e1dc;for(const [_0x51452b,_0x130cf6]of _0x1aaee8[_0xc118f0(0x15d)]()){if(!Number[_0xc118f0(0xe6)](_0x130cf6['id'])||_0x130cf6['id']<=0x0)throw notificationError(_0xc118f0(0x13d),_0xc118f0(0xf5)+(_0x51452b+0x1)+_0xc118f0(0xe2));if(_0x130cf6[_0xc118f0(0x12a)]!==_0x5367d7)throw notificationError(_0xc118f0(0x13d),'Notification\x20config\x20list\x20item\x20'+(_0x51452b+0x1)+_0xc118f0(0x101));if(_0x130cf6[_0xc118f0(0x132)]!==_0x52ee9b)throw notificationError(_0xc118f0(0x13d),'Notification\x20config\x20list\x20item\x20'+(_0x51452b+0x1)+_0xc118f0(0xff));}}export function safeApiFailure(_0x2fd01a,_0x4d1991,_0x337e8f){const _0x41f672=a141_0x56e1dc;return notificationError(_0x41f672(0xfa)+_0x2fd01a+'_'+(_0x4d1991===_0x41f672(0xe4)?_0x41f672(0x153):_0x4d1991+_0x41f672(0x10b)),_0x41f672(0xdf)+_0x2fd01a+'\x20'+_0x4d1991+'\x20failed.',_0x337e8f);}export function notificationLookupCommand(_0x36ad63,_0x36f1a3){const _0xcbcd2c=a141_0x56e1dc;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x36ad63+_0xcbcd2c(0x14d)+_0x36f1a3+_0xcbcd2c(0x130);}function validateNotificationDocument(_0x1297f4,_0x3035e5){const _0x33be91=a141_0x56e1dc;for(const _0x330289 of Object[_0x33be91(0x15f)](_0x1297f4)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x330289))throw notificationError(_0x33be91(0x158),'Notification\x20JSON\x20field\x20\x22'+_0x330289+_0x33be91(0x145));if(!ALLOWED_INPUT_FIELDS[_0x33be91(0x116)](_0x330289))throw notificationError(_0x33be91(0x15e),_0x33be91(0x10e)+_0x330289+'\x22.');}if(_0x3035e5===_0x33be91(0x111)&&Object['keys'](_0x1297f4)[_0x33be91(0xef)]===0x0)throw notificationError(_0x33be91(0x14a),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x4b209d={};if(hasOwn(_0x1297f4,'configName'))_0x4b209d['configName']=validateRequiredString(_0x1297f4[_0x33be91(0xfe)],'configName',0x80);else{if(_0x3035e5===_0x33be91(0x131))throw notificationError('notification_config_field_required',_0x33be91(0x12c)+_0x33be91(0x136));}if(hasOwn(_0x1297f4,'channelType')){if(typeof _0x1297f4[_0x33be91(0x132)]!==_0x33be91(0x115))throw invalidFieldType('channelType',_0x33be91(0x127));const _0x18ae4a=_0x1297f4[_0x33be91(0x132)][_0x33be91(0x120)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x33be91(0x10a)](_0x18ae4a))throw notificationError(_0x33be91(0x11d),_0x33be91(0x10f),_0x33be91(0x113)+NOTIFICATION_CHANNEL_TYPES[_0x33be91(0x14f)](',\x20')+'.');_0x4b209d['channelType']=_0x18ae4a;}else{if(_0x3035e5===_0x33be91(0x131))throw notificationError('notification_config_field_required','Create\x20JSON\x20requires\x20field\x20'+'\x22channelType\x22.');}for(const [_0x5a7d89,_0x3b24fe]of[[_0x33be91(0x152),0x200],[_0x33be91(0x157),0x100]]){if(!hasOwn(_0x1297f4,_0x5a7d89))continue;const _0x17cfcb=_0x1297f4[_0x5a7d89];if(_0x17cfcb!==null&&typeof _0x17cfcb!==_0x33be91(0x115))throw invalidFieldType(_0x5a7d89,_0x33be91(0x114));if(typeof _0x17cfcb===_0x33be91(0x115)&&_0x17cfcb['length']>_0x3b24fe)throw notificationError(_0x33be91(0x11d),'Notification\x20JSON\x20field\x20\x22'+_0x5a7d89+_0x33be91(0xe9)+_0x3b24fe+_0x33be91(0x126));_0x4b209d[_0x5a7d89]=_0x17cfcb;}if(hasOwn(_0x1297f4,_0x33be91(0x149))){const _0x496246=_0x1297f4[_0x33be91(0x149)];if(_0x496246===null&&_0x3035e5===_0x33be91(0x131))throw invalidFieldType(_0x33be91(0x149),_0x33be91(0x15b));if(_0x496246!==null&&!isJsonObject(_0x496246))throw invalidFieldType(_0x33be91(0x149),_0x3035e5==='update'?_0x33be91(0x147):_0x33be91(0x15b));_0x496246!==null&&validateChannelConfigFields(_0x4b209d[_0x33be91(0x132)],_0x496246),_0x4b209d[_0x33be91(0x149)]=_0x496246;}for(const _0x39f86e of['connectTimeout',_0x33be91(0xec)]){if(!hasOwn(_0x1297f4,_0x39f86e))continue;const _0x4a7596=_0x1297f4[_0x39f86e];if(_0x4a7596!==null&&(!Number[_0x33be91(0xe6)](_0x4a7596)||_0x4a7596<0x0))throw notificationError('notification_config_field_invalid',_0x33be91(0xf8)+_0x39f86e+_0x33be91(0x117));_0x4b209d[_0x39f86e]=_0x4a7596;}return _0x4b209d;}function a141_0x6eba(){const _0x3fe126=['environment\x20variable\x20','EMAIL','connectTimeout','endpointUrlRaw','Notification\x20config\x20list\x20item\x20','DINGTALK','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Notification\x20JSON\x20field\x20\x22','preflight','notification_config_','file','channelConfigRaw','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','configName','\x20has\x20an\x20invalid\x20channelType.','str','\x20has\x20an\x20invalid\x20appCode.','createTime','2397870NpFdMF','boolean','configCode','<redacted>','10983fUFIcm','env','stdin','includes','_unavailable','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','recipients','Unknown\x20notification\x20JSON\x20field\x20\x22','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','WECOM','update','num','Allowed\x20values:\x20','a\x20string\x20or\x20null','string','has','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','Invalid\x20notification\x20config\x20response.','FEISHU','8292690RbkdPF','call','utf8','notification_config_field_invalid','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','emailTargets','trim','dry-run','1793103OlJxtF','Notification\x20JSON\x20source\x20is\x20ambiguous.','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','1070752cuSRkL','\x20characters.','a\x20supported\x20string','\x20has\x20invalid\x20field\x20\x22','Application-level\x20notification\x20config\x20ID','appCode','118418pgzxvw','Create\x20JSON\x20requires\x20field\x20','\x20is\x20invalid.','name','Notification\x20JSON\x20from\x20','\x20--format\x20compress','create','channelType','path','WEBHOOK','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','\x22configName\x22.','push','ccList','kind','Invalid\x20--','setEncoding','notification_config_json_invalid','notification_config_response_invalid','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','updateTime','bccList','\x20is\x20missing\x20required\x20field\x20\x22','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','yes','notification_config_source_unavailable','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','endpointUrl:null','a\x20JSON\x20object\x20or\x20null','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','channelConfig','notification_config_update_empty','7AzQYSQ','3830110ZJTxUz','\x20--type\x20','stringify','join','prototype','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','endpointUrl','failed','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','number','from-env','description','notification_config_field_forbidden','validation','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','a\x20JSON\x20object','parse','entries','notification_config_field_unknown','keys','Notification\x20JSON\x20channelConfig\x20field\x20\x22','replyTo','notification_config_confirmation_required','Notification\x20config\x20','4408KSIBLQ','apiError','\x20has\x20an\x20invalid\x20id.','\x20has\x20an\x20unsupported\x20channelType.','mutation','Missing\x20notification\x20JSON\x20source.','isSafeInteger','hasOwnProperty','bool','\x22\x20cannot\x20exceed\x20','\x22\x20is\x20forbidden.','notification_config_id_invalid','readTimeout','messageTemplate','object','length','file\x20'];a141_0x6eba=function(){return _0x3fe126;};return a141_0x6eba();}function validateRequiredString(_0x364199,_0x1e9c85,_0x2e8321){const _0x2ca095=a141_0x56e1dc;if(typeof _0x364199!=='string')throw invalidFieldType(_0x1e9c85,'a\x20non-empty\x20string');const _0x2165c4=_0x364199[_0x2ca095(0x120)]();if(!_0x2165c4)throw notificationError(_0x2ca095(0x11d),_0x2ca095(0xf8)+_0x1e9c85+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x2165c4[_0x2ca095(0xef)]>_0x2e8321)throw notificationError('notification_config_field_invalid',_0x2ca095(0xf8)+_0x1e9c85+'\x22\x20cannot\x20exceed\x20'+_0x2e8321+_0x2ca095(0x126));return _0x2165c4;}function validateChannelConfigFields(_0x17deca,_0x58e929){const _0x437fe8=a141_0x56e1dc;if(hasOwn(_0x58e929,'messageTemplate'))throw forbiddenChannelConfigField(_0x437fe8(0xed));if(_0x17deca===_0x437fe8(0xf2))for(const _0x355b68 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x58e929,_0x355b68))throw forbiddenChannelConfigField(_0x355b68);}}function forbiddenChannelConfigField(_0x2681e3){const _0x477c9a=a141_0x56e1dc;return notificationError('notification_config_channel_field_forbidden',_0x477c9a(0xdc)+_0x2681e3+_0x477c9a(0xea));}function invalidFieldType(_0x287207,_0x30ee41){const _0x4ac787=a141_0x56e1dc;return notificationError(_0x4ac787(0x11d),_0x4ac787(0xf8)+_0x287207+'\x22\x20must\x20be\x20'+_0x30ee41+'.');}function serializeChannelConfig(_0x58dfcd){const _0x19c078=a141_0x56e1dc;return _0x58dfcd===null||_0x58dfcd===undefined?null:JSON[_0x19c078(0x14e)](_0x58dfcd);}function redactSensitive(_0xaede08){const _0x269c18=a141_0x56e1dc;return _0xaede08===null||_0xaede08===undefined||_0xaede08===''?null:_0x269c18(0x106);}function requireResponseString(_0x46fe80,_0x5e7e44,_0x209209){const _0x10630b=a141_0x56e1dc;if(typeof _0x46fe80!==_0x10630b(0x115)||_0x46fe80[_0x10630b(0x120)]()==='')throw CliErrors[_0x10630b(0xe1)](_0x10630b(0x118),'Item\x20'+(_0x209209+0x1)+_0x10630b(0x141)+_0x5e7e44+'\x22.');return _0x46fe80[_0x10630b(0x120)]();}function requireExactString(_0x1ec96b,_0x224374,_0x1f1619){const _0x406067=a141_0x56e1dc;if(typeof _0x1ec96b!==_0x406067(0x115)||_0x1ec96b['trim']()==='')throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x1f1619+_0x406067(0x141)+_0x224374+'\x22.');return _0x1ec96b['trim']();}function responseNullableString(_0x358915,_0x1056b2,_0x5dd6f8){const _0x270100=a141_0x56e1dc;if(_0x358915===undefined||_0x358915===null)return null;if(typeof _0x358915!==_0x270100(0x115))throw notificationError('notification_config_response_invalid',_0x270100(0xdf)+_0x5dd6f8+_0x270100(0x128)+_0x1056b2+'\x22.');return _0x358915;}function a141_0xb74d(_0x21e65a,_0xca09d7){_0x21e65a=_0x21e65a-0xdc;const _0x6eba94=a141_0x6eba();let _0xb74d85=_0x6eba94[_0x21e65a];return _0xb74d85;}function responseNullableTimeout(_0x33369a,_0x309a80,_0x164115){const _0x252bf4=a141_0x56e1dc;if(_0x33369a===undefined||_0x33369a===null)return null;if(!Number[_0x252bf4(0xe6)](_0x33369a)||_0x33369a<0x0)throw notificationError(_0x252bf4(0x13d),_0x252bf4(0xdf)+_0x164115+_0x252bf4(0x128)+_0x309a80+'\x22.');return _0x33369a;}function normalizeNullableString(_0x4f96a5){return typeof _0x4f96a5==='string'?_0x4f96a5:null;}function isJsonObject(_0x18067c){const _0x20d78e=a141_0x56e1dc;return _0x18067c!==null&&typeof _0x18067c===_0x20d78e(0xee)&&!Array['isArray'](_0x18067c);}function hasOwn(_0x1879ee,_0x589195){const _0x2ee319=a141_0x56e1dc;return Object[_0x2ee319(0x150)][_0x2ee319(0xe7)][_0x2ee319(0x11b)](_0x1879ee,_0x589195);}async function readStdin(){const _0x22bc89=a141_0x56e1dc;let _0x3cd5da='';process[_0x22bc89(0x109)][_0x22bc89(0x13b)](_0x22bc89(0x11c));for await(const _0x54c1a8 of process[_0x22bc89(0x109)])_0x3cd5da+=_0x54c1a8;return _0x3cd5da;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a142_0x26b493=a142_0x216c;(function(_0x12641b,_0xe241ab){const _0x5d2aec=a142_0x216c,_0x1486ff=_0x12641b();while(!![]){try{const _0x42cf10=-parseInt(_0x5d2aec(0xe6))/0x1*(parseInt(_0x5d2aec(0xbc))/0x2)+-parseInt(_0x5d2aec(0xc6))/0x3+-parseInt(_0x5d2aec(0xd6))/0x4*(parseInt(_0x5d2aec(0xcc))/0x5)+-parseInt(_0x5d2aec(0xe3))/0x6*(parseInt(_0x5d2aec(0xea))/0x7)+parseInt(_0x5d2aec(0xb5))/0x8*(parseInt(_0x5d2aec(0xc1))/0x9)+parseInt(_0x5d2aec(0xb9))/0xa+parseInt(_0x5d2aec(0xc7))/0xb*(parseInt(_0x5d2aec(0xd2))/0xc);if(_0x42cf10===_0xe241ab)break;else _0x1486ff['push'](_0x1486ff['shift']());}catch(_0xb28975){_0x1486ff['push'](_0x1486ff['shift']());}}}(a142_0x2f61,0x50c6c));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a142_0x2f61(){const _0x5eb566=['invoice','str','4CJDAyp','Table','GET','File\x20upload\x20response\x20missing\x20filePath.','IdCard','General','read','File\x20URL\x20response\x20missing\x20fileUrl.','idCard','toString','\x20OCR','filePath','trim','54KomsfZ','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','general','13991eERQkd','form','/smartapi/ocr/recognize-text?','ocr','67571gUpPom','count','recognize','string','image-file','path','60152pWfEEi','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','Publicly\x20accessible\x20image\x20or\x20file\x20URL','scene','5818580uhsMWB','/smartapi/ocr/recognize-text','POST','60OAwlFu','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','appCode','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','/smartapi/common/queryFileUrl','108ynMxTp','/smartapi/common/uploadFile','toLowerCase','image-url','imageUrl','1779642CvQAwr','11sKxOra','Unsupported\x20OCR\x20scene:\x20','idcard','validation','length','1582915fvSKCV','join','fileUrl','fileName','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','apiError','12902136zsHniD','imageFile'];a142_0x2f61=function(){return _0x5eb566;};return a142_0x2f61();}import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a142_0x26b493(0xd4),'general',a142_0x26b493(0xe7),a142_0x26b493(0xde)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a142_0x26b493(0xdb),'form':a142_0x26b493(0xd7),'idCard':a142_0x26b493(0xda)},SCENE_FLAG={'name':a142_0x26b493(0xb8),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a142_0x26b493(0xee),'type':'string','description':a142_0x26b493(0xe4)},IMAGE_URL_FLAG={'name':a142_0x26b493(0xc4),'type':a142_0x26b493(0xed),'description':a142_0x26b493(0xb7)};function normalizeScene(_0x34eef6){const _0x3300b1=a142_0x26b493,_0x3ca4ef=_0x34eef6[_0x3300b1(0xe2)]()[_0x3300b1(0xc3)]();if(_0x3ca4ef===_0x3300b1(0xc9))return _0x3300b1(0xde);if(_0x3ca4ef===_0x3300b1(0xd4)||_0x3ca4ef===_0x3300b1(0xe5)||_0x3ca4ef==='form')return _0x3ca4ef;throw CliErrors[_0x3300b1(0xca)](_0x3300b1(0xc8)+_0x34eef6+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x3300b1(0xcd)](',\x20'));}function a142_0x216c(_0x3061b7,_0x20c33b){_0x3061b7=_0x3061b7-0xb4;const _0x2f61ab=a142_0x2f61();let _0x216c21=_0x2f61ab[_0x3061b7];return _0x216c21;}function selectedInputs(_0x1bf9ae){const _0x31e19a=a142_0x26b493,_0xb4822c=_0x1bf9ae[_0x31e19a(0xd5)](_0x31e19a(0xee))[_0x31e19a(0xe2)](),_0x1f7665=_0x1bf9ae[_0x31e19a(0xd5)](_0x31e19a(0xc4))[_0x31e19a(0xe2)]();return{'imageFile':_0xb4822c,'imageUrl':_0x1f7665,'count':[_0xb4822c,_0x1f7665]['filter'](Boolean)[_0x31e19a(0xcb)]};}function validateInputSelection(_0x447dea){const _0xaa799a=a142_0x26b493,_0x3b60e5=selectedInputs(_0x447dea);if(_0x3b60e5[_0xaa799a(0xeb)]!==0x1)throw CliErrors[_0xaa799a(0xca)](_0xaa799a(0xbf));return _0x3b60e5;}function withScene(_0x1a8f1a,_0x182bb6,_0x123121){const _0x1985e5=a142_0x26b493;return{..._0x1a8f1a,'scene':_0x182bb6,..._0x123121?{'sourceFile':{'fileName':_0x123121[_0x1985e5(0xcf)],'filePath':_0x123121[_0x1985e5(0xe1)]}}:{}};}const ocrRecognize={'service':a142_0x26b493(0xe9),'command':a142_0x26b493(0xec),'description':a142_0x26b493(0xbd),'risk':a142_0x26b493(0xdc),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x4fe8b8){const _0x843395=a142_0x26b493,_0x17f419=normalizeScene(_0x4fe8b8[_0x843395(0xd5)](_0x843395(0xb8))),_0x180088=SCENE_TO_LEGACY_TYPE[_0x17f419],_0x56c8f4=validateInputSelection(_0x4fe8b8);if(_0x56c8f4[_0x843395(0xc5)]){const _0x1de76d=new URLSearchParams({'url':_0x56c8f4[_0x843395(0xc5)],'type':_0x180088,'appCode':_0x4fe8b8['appCode']});return{'method':_0x843395(0xd8),'url':_0x843395(0xe8)+_0x1de76d[_0x843395(0xdf)](),'description':'Preview:\x20recognize\x20'+_0x17f419+'\x20OCR\x20from\x20URL'};}const _0x2eba53=requireDevelopmentUploadFile(_0x56c8f4[_0x843395(0xd3)],_0x843395(0xee));return{'method':_0x843395(0xbb),'url':_0x843395(0xc2),'body':{'steps':[{'method':'POST','url':_0x843395(0xc2),'body':{'appCode':_0x4fe8b8['appCode'],'multipart':{'file':_0x2eba53}}},{'method':_0x843395(0xbb),'url':_0x843395(0xc0),'body':{'filePath':_0x843395(0xd0),'downloadFlag':![]}},{'method':_0x843395(0xd8),'url':_0x843395(0xba),'query':{'appCode':_0x4fe8b8['appCode'],'url':_0x843395(0xb6),'type':_0x180088}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x17f419+_0x843395(0xe0)};},async 'execute'(_0x4a3086){const _0x107097=a142_0x26b493,_0xb47021=normalizeScene(_0x4a3086[_0x107097(0xd5)](_0x107097(0xb8))),_0x27a16d=SCENE_TO_LEGACY_TYPE[_0xb47021],_0x13fc47=validateInputSelection(_0x4a3086);if(_0x13fc47[_0x107097(0xc5)]){const _0x535547=await recognizeDevelopmentOcr(_0x4a3086[_0x107097(0xbe)],{'url':_0x13fc47[_0x107097(0xc5)],'type':_0x27a16d});return{'ok':!![],'data':withScene(_0x535547,_0xb47021)};}const _0x160c4f=requireDevelopmentUploadFile(_0x13fc47[_0x107097(0xd3)],_0x107097(0xee)),_0x453f52=await uploadDevelopmentFile(_0x4a3086['appCode'],_0x160c4f[_0x107097(0xb4)]);if(!_0x453f52[_0x107097(0xe1)])throw CliErrors[_0x107097(0xd1)](_0x107097(0xd9));const _0x215627=await queryDevelopmentFileUrl(_0x453f52[_0x107097(0xe1)],{'download':![]});if(!_0x215627[_0x107097(0xce)])throw CliErrors[_0x107097(0xd1)](_0x107097(0xdd));const _0x351263=await recognizeDevelopmentOcr(_0x4a3086[_0x107097(0xbe)],{'url':_0x215627[_0x107097(0xce)],'type':_0x27a16d});return{'ok':!![],'data':withScene(_0x351263,_0xb47021,_0x453f52)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a143_0x497d(){const _0x223e3e=['\x20and\x20its\x20menu\x20entry.','1121874TkdLri','page-pattern','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','length','parentMenuId','now','trim','isNaN','Custom\x20Page\x20pattern\x20(currently\x20BLANK;\x20conflicts\x20with\x20--page-content)','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','number','isInteger','createMenu','warnings','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20complete\x20files','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK\x20or\x20--page-content.','Would\x20create\x20Custom\x20Page\x20','create','keys','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','page\x20create\x20does\x20not\x20accept\x20--page-type.','menuPath','version','Provide\x20--page-pattern\x20BLANK\x20or\x20--page-content.','1500618EVYfyL','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','files','pageId','/smartapi/webcode/page/create','789972XNZdDC','page','POST','55028havkIu','en-US','9509864sQdcKG','str','Created\x20Custom\x20Page\x20','input','CUSTOM','page-type','parent-menu-id','stringify','name','pageName','page-content','string','enableI18n','Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.','validation','Complete\x20page\x20files\x20as\x20JSON\x20(conflicts\x20with\x20--page-pattern)','1082900cpHLOj','--page-pattern\x20currently\x20supports\x20only\x20BLANK.','BLANK','195ruXkAk','Custom_page_','appCode','write','612302YOwRNY'];a143_0x497d=function(){return _0x223e3e;};return a143_0x497d();}const a143_0x11be1c=a143_0x3c3c;(function(_0x1c5544,_0x5341f9){const _0x160bc2=a143_0x3c3c,_0x153576=_0x1c5544();while(!![]){try{const _0xe1da91=-parseInt(_0x160bc2(0x138))/0x1+parseInt(_0x160bc2(0x13a))/0x2+-parseInt(_0x160bc2(0x117))/0x3+parseInt(_0x160bc2(0x11f))/0x4*(-parseInt(_0x160bc2(0x134))/0x5)+parseInt(_0x160bc2(0x11c))/0x6+parseInt(_0x160bc2(0x131))/0x7+parseInt(_0x160bc2(0x121))/0x8;if(_0xe1da91===_0x5341f9)break;else _0x153576['push'](_0x153576['shift']());}catch(_0x119da5){_0x153576['push'](_0x153576['shift']());}}}(a143_0x497d,0x5e7b9));import{APPCODE_FLAG}from'../../commands/common/flags.js';import{buildInitialFiles}from'../../commands/page/custom/template.js';import{createCustomPage,getI18nInfo}from'../../core/api-client.js';function a143_0x3c3c(_0x1edd1a,_0x394782){_0x1edd1a=_0x1edd1a-0x115;const _0x497d87=a143_0x497d();let _0x3c3c11=_0x497d87[_0x1edd1a];return _0x3c3c11;}import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,parseCustomPageContent,validateCustomPageContent}from'./custom/shared.js';const DEFAULT_CUSTOM_PAGE_LANGUAGES=['zh-CN',a143_0x11be1c(0x120)];export const pageCreate={'service':a143_0x11be1c(0x11d),'command':a143_0x11be1c(0x14b),'description':a143_0x11be1c(0x148),'risk':a143_0x11be1c(0x137),'defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a143_0x11be1c(0x126),'message':a143_0x11be1c(0x14e),'hint':a143_0x11be1c(0x149)}],'flags':[{'name':a143_0x11be1c(0x129),'type':a143_0x11be1c(0x12c),'description':a143_0x11be1c(0x143)},{'name':'parent-menu-id','type':a143_0x11be1c(0x144),'description':a143_0x11be1c(0x118)},{'name':'page-pattern','type':a143_0x11be1c(0x12c),'description':a143_0x11be1c(0x142),'enum':[a143_0x11be1c(0x133)]},{'name':a143_0x11be1c(0x12b),'type':'string','description':a143_0x11be1c(0x130)},APPCODE_FLAG],async 'validate'(_0xd7e7d7){const _0x47fd66=a143_0x11be1c,_0x2a4a4d=readPagePattern(_0xd7e7d7);await validateCustomPageContent(readInput(_0xd7e7d7,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x2a4a4d)[_0x47fd66(0x119)]);},async 'dryRun'(_0x4bd26c){const _0x3f1808=a143_0x11be1c,{input:_0x10d586}=await prepare(_0x4bd26c);return{'method':_0x3f1808(0x11e),'url':_0x3f1808(0x11b),'body':{'appCode':_0x10d586[_0x3f1808(0x136)],'pageName':_0x10d586[_0x3f1808(0x12a)],..._0x10d586[_0x3f1808(0x13e)]!=null?{'parentMenuId':_0x10d586['parentMenuId']}:{},'createMenu':_0x10d586[_0x3f1808(0x146)],'codeContent':_0x10d586[_0x3f1808(0x119)]},'description':_0x3f1808(0x14a)+JSON[_0x3f1808(0x128)](_0x10d586['pageName'])+_0x3f1808(0x139)};},async 'execute'(_0x34f82d){const _0x59814d=a143_0x11be1c,_0x5a6a0a=await prepare(_0x34f82d),_0x349ee0=await createCustomPage(_0x5a6a0a[_0x59814d(0x124)]);if(!Number[_0x59814d(0x145)](_0x349ee0['pageId'])||_0x349ee0['pageId']<=0x0)throw CliErrors['apiError'](_0x59814d(0x14d));return{'ok':!![],'data':buildMutationData(_0x5a6a0a,_0x349ee0),'message':_0x59814d(0x123)+_0x349ee0[_0x59814d(0x11a)]+'.'};}};async function prepare(_0x4a635e){const _0x44c2db=a143_0x11be1c,_0x5d7010=readPagePattern(_0x4a635e);if(_0x5d7010===null)return{'input':readInput(_0x4a635e,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x5d7010),'warnings':[],'pagePattern':_0x5d7010};let _0x5288b1=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x201386=[];try{const _0x269f2f=await getI18nInfo(_0x4a635e[_0x44c2db(0x136)]);_0x269f2f[_0x44c2db(0x12d)]&&_0x269f2f['langs']?.['length']&&(_0x5288b1=_0x269f2f['langs']);}catch{_0x201386=[_0x44c2db(0x12e)];}return{'input':readInput(_0x4a635e,_0x5288b1,_0x5d7010),'warnings':_0x201386,'pagePattern':_0x5d7010};}function readPagePattern(_0x305621){const _0x3fce11=a143_0x11be1c,_0x3a4bf2=_0x305621[_0x3fce11(0x122)](_0x3fce11(0x13b))[_0x3fce11(0x140)](),_0x383849=_0x305621[_0x3fce11(0x122)]('page-content')[_0x3fce11(0x140)]()['length']>0x0;if(_0x3a4bf2&&_0x383849)throw CliErrors[_0x3fce11(0x12f)]('--page-pattern\x20and\x20--page-content\x20cannot\x20be\x20used\x20together.');if(_0x383849)return null;if(!_0x3a4bf2)throw CliErrors[_0x3fce11(0x12f)](_0x3fce11(0x116));if(_0x3a4bf2!=='BLANK')throw CliErrors[_0x3fce11(0x12f)](_0x3fce11(0x132));return _0x3a4bf2;}function readInput(_0x82d9fd,_0x4aa23a=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x3202da=readPagePattern(_0x82d9fd)){const _0x141ab7=a143_0x11be1c,_0x4419fb=_0x82d9fd[_0x141ab7(0x122)]('name')['trim']()||_0x141ab7(0x135)+Date[_0x141ab7(0x13f)]();if(_0x4419fb[_0x141ab7(0x13d)]>0x64)throw CliErrors['validation']('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x34ba94=_0x82d9fd['num'](_0x141ab7(0x127),NaN),_0x1748d3=!Number[_0x141ab7(0x141)](_0x34ba94);if(_0x1748d3&&(!Number[_0x141ab7(0x145)](_0x34ba94)||_0x34ba94<=0x0))throw CliErrors['validation'](_0x141ab7(0x13c));return{'appCode':_0x82d9fd['appCode'],'pageName':_0x4419fb,..._0x1748d3?{'parentMenuId':_0x34ba94}:{},'createMenu':!![],'files':_0x3202da===null?parseCustomPageContent(_0x82d9fd[_0x141ab7(0x122)](_0x141ab7(0x12b))):buildInitialFiles(_0x4419fb,_0x4aa23a)};}function buildMutationData(_0x12abfe,_0x4d916b){const _0x34f884=a143_0x11be1c,{input:_0x5cfe68}=_0x12abfe,_0x71cd6e=_0x4d916b&&buildCustomPageDevelopmentUrl(_0x5cfe68[_0x34f884(0x136)],_0x4d916b[_0x34f884(0x14f)]),_0x28d96c=_0x4d916b&&buildCustomPageEditUrl(_0x5cfe68['appCode'],_0x4d916b[_0x34f884(0x11a)]);return{'operation':'page.create','pageType':_0x34f884(0x125),'pagePattern':_0x12abfe['pagePattern'],'selector':{'appCode':_0x5cfe68['appCode'],'pageName':_0x5cfe68[_0x34f884(0x12a)]},'before':null,'after':{'pageId':_0x4d916b?.[_0x34f884(0x11a)]??null,'pageName':_0x4d916b?.['pageName']??_0x5cfe68[_0x34f884(0x12a)],'appCode':_0x4d916b?.[_0x34f884(0x136)]??_0x5cfe68[_0x34f884(0x136)],'version':_0x4d916b?.[_0x34f884(0x115)]??null,'menuId':_0x4d916b?.['menuId']??null,'menuPath':_0x4d916b?.[_0x34f884(0x14f)]??null,'files':_0x4d916b?.['files']??Object[_0x34f884(0x14c)](_0x5cfe68[_0x34f884(0x119)])},'dryRun':_0x4d916b===undefined,'request':_0x5cfe68,..._0x71cd6e?{'pageUrl':_0x71cd6e}:{},..._0x28d96c?{'editPageUrl':_0x28d96c}:{},'warnings':[..._0x12abfe[_0x34f884(0x147)],..._0x4d916b&&!_0x71cd6e?['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']:[]]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a144_0x2275(_0x182399,_0x5d1e2c){_0x182399=_0x182399-0x1ed;const _0x3e3a9e=a144_0x3e3a();let _0x227568=_0x3e3a9e[_0x182399];return _0x227568;}const a144_0x43bd82=a144_0x2275;(function(_0x3ce387,_0x24047f){const _0x4b0a4d=a144_0x2275,_0x464b53=_0x3ce387();while(!![]){try{const _0x563243=parseInt(_0x4b0a4d(0x207))/0x1*(-parseInt(_0x4b0a4d(0x1f8))/0x2)+parseInt(_0x4b0a4d(0x1ff))/0x3+-parseInt(_0x4b0a4d(0x208))/0x4+-parseInt(_0x4b0a4d(0x1ed))/0x5*(-parseInt(_0x4b0a4d(0x1f6))/0x6)+-parseInt(_0x4b0a4d(0x1fb))/0x7+parseInt(_0x4b0a4d(0x1fa))/0x8+-parseInt(_0x4b0a4d(0x204))/0x9;if(_0x563243===_0x24047f)break;else _0x464b53['push'](_0x464b53['shift']());}catch(_0x276aa7){_0x464b53['push'](_0x464b53['shift']());}}}(a144_0x3e3a,0x40a3f));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a144_0x43bd82(0x1f4),'command':a144_0x43bd82(0x200),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a144_0x43bd82(0x1f5),'defaultOutputFormat':a144_0x43bd82(0x205),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a144_0x43bd82(0x1fe),'required':!![],'description':a144_0x43bd82(0x1f7)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x41c918){readCustomPageId(_0x41c918);},async 'execute'(_0xb1a734){const _0xa93183=a144_0x43bd82,_0x1e7858=readCustomPageId(_0xb1a734),_0x2e3a9a=await getCustomPageSource(_0x1e7858),{bundle:_0x151ff0,createTime:_0x6b5837,updateTime:_0x122f20,..._0x33f5ea}=_0x2e3a9a,_0x319478=_0x2e3a9a['id']??_0x1e7858,_0x1b2f5a=_0x2e3a9a[_0xa93183(0x1f3)]?.['trim']()||_0xb1a734[_0xa93183(0x1f0)]('appcode')[_0xa93183(0x1fc)](),_0x350e4b=buildCustomPageRuntimeUrl(_0x1b2f5a,_0x2e3a9a[_0xa93183(0x1fd)]),_0x26ac9f=buildCustomPageEditUrl(_0x1b2f5a,_0x319478),_0x438682=await resolveCustomPageDevelopmentUrl(_0x1b2f5a,_0x319478,_0xb1a734['cookie']);return{'ok':!![],'data':{..._0x33f5ea,..._0x350e4b?{'runtimePageUrl':_0x350e4b}:{},..._0x438682?{'pageUrl':_0x438682}:{},..._0x26ac9f?{'editPageUrl':_0x26ac9f}:{},..._0x6b5837==null?{}:{'createTime':formatTime(_0x6b5837)},..._0x122f20==null?{}:{'updateTime':formatTime(_0x122f20)}},'message':_0xa93183(0x209)+_0x1e7858+'.'};}};function a144_0x3e3a(){const _0x2a59bc=['365958zYfAjC','custom-detail','getHours','getDate','getSeconds','438498FGYatw','compress','getMinutes','84229zMOkyV','836936btCNfm','Retrieved\x20Custom\x20Page\x20','2370515ITEnsK','getTime','isNaN','str','getFullYear','join','appCode','page','read','6pDQfbG','Custom\x20Page\x20ID','4oIBOcp','padStart','2541616Kaoctk','1558270HsuwDI','trim','pageCode','number'];a144_0x3e3a=function(){return _0x2a59bc;};return a144_0x3e3a();}function formatTime(_0x156085){const _0x251b50=a144_0x43bd82,_0x2eb480=new Date(_0x156085);if(Number[_0x251b50(0x1ef)](_0x2eb480[_0x251b50(0x1ee)]()))return String(_0x156085);const _0x3fc512=[_0x2eb480[_0x251b50(0x1f1)](),String(_0x2eb480['getMonth']()+0x1)[_0x251b50(0x1f9)](0x2,'0'),String(_0x2eb480[_0x251b50(0x202)]())[_0x251b50(0x1f9)](0x2,'0')][_0x251b50(0x1f2)]('-'),_0x35fb8f=[String(_0x2eb480[_0x251b50(0x201)]())[_0x251b50(0x1f9)](0x2,'0'),String(_0x2eb480[_0x251b50(0x206)]())[_0x251b50(0x1f9)](0x2,'0'),String(_0x2eb480[_0x251b50(0x203)]())[_0x251b50(0x1f9)](0x2,'0')][_0x251b50(0x1f2)](':');return _0x3fc512+'\x20'+_0x35fb8f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a145_0x1171(){const _0x122b2a=['538HPgcBl','20NTualk','183OatJXO','4408747YDcyYB','length','No\x20Custom\x20Pages\x20found.','\x20Custom\x20Page(s).','read','1718IHdKYX','appCode','cookie','253MMBLMa','path','page','Found\x20','34090PBwwAz','6787890kfrYfV','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','900400QOmavZ','415056mMfnSv','react','pageId','6940ZIiRQT'];a145_0x1171=function(){return _0x122b2a;};return a145_0x1171();}function a145_0x2839(_0x4301f2,_0x4d55a3){_0x4301f2=_0x4301f2-0x11d;const _0x1171d7=a145_0x1171();let _0x283924=_0x1171d7[_0x4301f2];return _0x283924;}const a145_0x4a35a8=a145_0x2839;(function(_0x48d58a,_0x5c0433){const _0x5d426f=a145_0x2839,_0x3af6d2=_0x48d58a();while(!![]){try{const _0x2b8358=parseInt(_0x5d426f(0x129))/0x1*(parseInt(_0x5d426f(0x121))/0x2)+parseInt(_0x5d426f(0x123))/0x3*(parseInt(_0x5d426f(0x120))/0x4)+-parseInt(_0x5d426f(0x122))/0x5*(-parseInt(_0x5d426f(0x11d))/0x6)+parseInt(_0x5d426f(0x124))/0x7+-parseInt(_0x5d426f(0x133))/0x8+-parseInt(_0x5d426f(0x131))/0x9+-parseInt(_0x5d426f(0x130))/0xa*(parseInt(_0x5d426f(0x12c))/0xb);if(_0x2b8358===_0x5c0433)break;else _0x3af6d2['push'](_0x3af6d2['shift']());}catch(_0x3b8628){_0x3af6d2['push'](_0x3af6d2['shift']());}}}(a145_0x1171,0x813b7));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':a145_0x4a35a8(0x12e),'command':'custom-list','description':a145_0x4a35a8(0x132),'risk':a145_0x4a35a8(0x128),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5c307e){const _0x2617e7=a145_0x4a35a8,_0x5af11f=(await fetchMenuSnapshot(_0x5c307e['appCode'],_0x5c307e[_0x2617e7(0x12b)]))['menus']['flatMap'](_0x2df19c=>{const _0x5913ab=_0x2617e7;if(_0x2df19c['type']!==_0x5913ab(0x11e)||_0x2df19c[_0x5913ab(0x11f)]==null)return[];const _0xebffed=buildCustomPageDevelopmentUrl(_0x5c307e['appCode'],_0x2df19c[_0x5913ab(0x12d)]),_0x4e4cd2=buildCustomPageEditUrl(_0x5c307e[_0x5913ab(0x12a)],_0x2df19c['pageId']);return[{'pageId':_0x2df19c[_0x5913ab(0x11f)],'label':_0x2df19c['label'],..._0xebffed?{'pageUrl':_0xebffed}:{},..._0x4e4cd2?{'editPageUrl':_0x4e4cd2}:{}}];});return{'ok':!![],'data':{'pages':_0x5af11f},'message':_0x5af11f[_0x2617e7(0x125)]===0x0?_0x2617e7(0x126):_0x2617e7(0x12f)+_0x5af11f[_0x2617e7(0x125)]+_0x2617e7(0x127)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0x582438=a146_0x683f;(function(_0x20fbec,_0x31b328){const _0x3807e2=a146_0x683f,_0x53ba08=_0x20fbec();while(!![]){try{const _0x1b0c6a=parseInt(_0x3807e2(0x1c9))/0x1+parseInt(_0x3807e2(0x1bd))/0x2*(parseInt(_0x3807e2(0x1b2))/0x3)+parseInt(_0x3807e2(0x1c7))/0x4*(-parseInt(_0x3807e2(0x1b9))/0x5)+parseInt(_0x3807e2(0x1ae))/0x6+parseInt(_0x3807e2(0x1c3))/0x7+parseInt(_0x3807e2(0x1c0))/0x8+parseInt(_0x3807e2(0x1ca))/0x9*(-parseInt(_0x3807e2(0x1be))/0xa);if(_0x1b0c6a===_0x31b328)break;else _0x53ba08['push'](_0x53ba08['shift']());}catch(_0x3a9c60){_0x53ba08['push'](_0x53ba08['shift']());}}}(a146_0x5307,0x252a0));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a146_0x5307(){const _0x355e49=['apiError','Optional\x20publish\x20remark','appCode','unknown','377555oIELDM','number','page','str','34dxScry','5752830lJKjgP','POST','1070800QueIJY','Custom\x20Page\x20ID','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','736127MrtclL','pageCode','write','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','12VhFWAy','/smartapi/webcode/file/publish','232237AoMsdt','9qsBawa','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','cookie','Published\x20Custom\x20Page\x20','string','status','pageId','Would\x20publish\x20Custom\x20Page\x20','warnings','remark','push','1551372vhpXMa','trim','FORMAL','runtimePageUrl','39570JPSBGq','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','custom-publish'];a146_0x5307=function(){return _0x355e49;};return a146_0x5307();}function a146_0x683f(_0x25eb82,_0x56ed5c){_0x25eb82=_0x25eb82-0x1ab;const _0x5307f9=a146_0x5307();let _0x683f87=_0x5307f9[_0x25eb82];return _0x683f87;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a146_0x582438(0x1bb),'command':a146_0x582438(0x1b4),'description':a146_0x582438(0x1c2),'risk':a146_0x582438(0x1c5),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a146_0x582438(0x1ba),'required':!![],'description':a146_0x582438(0x1c1)},{'name':a146_0x582438(0x1ac),'type':a146_0x582438(0x1ce),'description':a146_0x582438(0x1b6)}],async 'validate'(_0x5926ab){readCustomPageId(_0x5926ab);},async 'dryRun'(_0x5572a9){const _0x4d4169=a146_0x582438,_0x5534a5=readInput(_0x5572a9);return{'method':_0x4d4169(0x1bf),'url':_0x4d4169(0x1c8),'body':{'id':_0x5534a5[_0x4d4169(0x1d0)],..._0x5534a5[_0x4d4169(0x1ac)]?{'remark':_0x5534a5[_0x4d4169(0x1ac)]}:{}},'description':_0x4d4169(0x1d1)+_0x5534a5[_0x4d4169(0x1d0)]+'.'};},async 'execute'(_0x53ad36){const _0x131c84=a146_0x582438,_0x31408c=readInput(_0x53ad36);await getCustomPageSource(_0x31408c[_0x131c84(0x1d0)]);const _0x4e850e=await publishCustomPage(_0x31408c);if(!Number['isInteger'](_0x4e850e)||_0x4e850e!==_0x31408c[_0x131c84(0x1d0)])throw CliErrors[_0x131c84(0x1b5)](_0x131c84(0x1c6));const _0x4cf491=await getCustomPageSource(_0x31408c['pageId']);if(_0x4cf491[_0x131c84(0x1cf)]!=='FORMAL')throw CliErrors[_0x131c84(0x1b5)]('Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x4cf491[_0x131c84(0x1cf)]??_0x131c84(0x1b8))+'.');const _0x428e84=_0x4cf491[_0x131c84(0x1b7)]?.[_0x131c84(0x1af)](),_0xb59364=buildCustomPageEditUrl(_0x428e84,_0x31408c['pageId']),_0x436cb0=await resolveCustomPageDevelopmentUrl(_0x428e84,_0x31408c[_0x131c84(0x1d0)],_0x53ad36[_0x131c84(0x1cc)]),_0xd8cc4f=buildMutationData(_0x31408c,!![],_0x436cb0,_0xb59364);_0x428e84&&!_0x436cb0&&_0xd8cc4f[_0x131c84(0x1ab)][_0x131c84(0x1ad)](_0x131c84(0x1cb));const _0x153f26=buildCustomPageRuntimeUrl(_0x4cf491[_0x131c84(0x1b7)],_0x4cf491[_0x131c84(0x1c4)]);return _0x153f26?_0xd8cc4f[_0x131c84(0x1b1)]=_0x153f26:_0xd8cc4f[_0x131c84(0x1ab)][_0x131c84(0x1ad)](_0x131c84(0x1b3)),{'ok':!![],'data':_0xd8cc4f,'message':_0x131c84(0x1cd)+_0x31408c[_0x131c84(0x1d0)]+'.'};}};function readInput(_0x7019ee){const _0x40808b=a146_0x582438,_0x2f8b03=readCustomPageId(_0x7019ee),_0x42258b=_0x7019ee[_0x40808b(0x1bc)](_0x40808b(0x1ac))[_0x40808b(0x1af)]();return{'pageId':_0x2f8b03,..._0x42258b?{'remark':_0x42258b}:{}};}function buildMutationData(_0x51917b,_0x15765c=![],_0x2da03e,_0x2f00e1){const _0x588418=a146_0x582438;return{'operation':'page.custom-publish','selector':{'pageId':_0x51917b[_0x588418(0x1d0)]},'before':null,'after':{'pageId':_0x51917b[_0x588418(0x1d0)],'status':_0x588418(0x1b0)},'dryRun':!_0x15765c,'request':_0x51917b,..._0x2da03e?{'pageUrl':_0x2da03e}:{},..._0x2f00e1?{'editPageUrl':_0x2f00e1}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x705ed=a147_0x3ce7;(function(_0x3c342d,_0x5d39f9){const _0x41d85f=a147_0x3ce7,_0x24ac58=_0x3c342d();while(!![]){try{const _0x989fd5=-parseInt(_0x41d85f(0x18c))/0x1+-parseInt(_0x41d85f(0x188))/0x2+-parseInt(_0x41d85f(0x194))/0x3+-parseInt(_0x41d85f(0x18e))/0x4+parseInt(_0x41d85f(0x193))/0x5*(parseInt(_0x41d85f(0x19f))/0x6)+-parseInt(_0x41d85f(0x19a))/0x7+parseInt(_0x41d85f(0x198))/0x8;if(_0x989fd5===_0x5d39f9)break;else _0x24ac58['push'](_0x24ac58['shift']());}catch(_0x3497a8){_0x24ac58['push'](_0x24ac58['shift']());}}}(a147_0x4b21,0x8a631));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';function a147_0x4b21(){const _0x25f12e=['validation','/ide/','--id\x20must\x20be\x20a\x20positive\x20integer.','1015519bhSvIM','page-content','4310572asNpqs','--page-content\x20must\x20be\x20a\x20JSON\x20object\x20whose\x20values\x20are\x20file\x20content\x20strings.','trim','object','find','89260nsYwQX','1704009uKHCrP','string','isArray','num','24021520sUZTAF','isInteger','2919168WyBAHd','some','--page-content\x20must\x20be\x20valid\x20JSON.','parse','message','276MxqdzF','menus','/pages/','Invalid\x20Custom\x20Page\x20content:\x20','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','path','file','join','357720ePBMgz'];a147_0x4b21=function(){return _0x25f12e;};return a147_0x4b21();}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a147_0x705ed(0x184)};function trimOptional(_0x5001e7){const _0xb45894=a147_0x705ed;return _0x5001e7?.[_0xb45894(0x190)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x159b6f,_0x2e239d){const _0x46246d=trimOptional(_0x159b6f),_0x221a91=trimOptional(_0x2e239d);if(!_0x46246d||!_0x221a91)return undefined;return getPublishedAppDomain(_0x46246d)+'/'+encodeURIComponent(_0x221a91);}export function buildCustomPageDevelopmentUrl(_0x28dd0a,_0x2dfdb2){const _0x43ec04=a147_0x705ed,_0x29df80=trimOptional(_0x28dd0a),_0x465185=trimOptional(_0x2dfdb2);if(!_0x29df80||!_0x465185)return undefined;return getAppBaseUrl(_0x29df80)+_0x43ec04(0x1a1)+encodeURIComponent(_0x465185);}export async function resolveCustomPageDevelopmentUrl(_0x11520d,_0x2d04a8,_0x5d9bc3){const _0x42f361=a147_0x705ed,_0x21c3a0=trimOptional(_0x11520d);if(!_0x21c3a0)return undefined;try{const _0x266596=(await fetchMenuSnapshot(_0x21c3a0,_0x5d9bc3))[_0x42f361(0x1a0)][_0x42f361(0x192)](_0x27b45c=>_0x27b45c['type']==='react'&&_0x27b45c['pageId']===_0x2d04a8);return buildCustomPageDevelopmentUrl(_0x21c3a0,_0x266596?.[_0x42f361(0x185)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0xdcf6d2,_0x52228a){const _0x3e70e3=a147_0x705ed,_0x7ee487=trimOptional(_0xdcf6d2);if(!_0x7ee487)return;const _0x5db2c5=trimOptional(_0x52228a==null?undefined:String(_0x52228a));if(!_0x5db2c5)return;return getAppBaseUrl(_0x7ee487)+_0x3e70e3(0x18a)+encodeURIComponent(_0x5db2c5);}function a147_0x3ce7(_0x4211bc,_0x4f4b2e){_0x4211bc=_0x4211bc-0x183;const _0x4b2190=a147_0x4b21();let _0x3ce763=_0x4b2190[_0x4211bc];return _0x3ce763;}export function parseCustomPageContent(_0x3dc7f4){const _0x5f3690=a147_0x705ed;if(!_0x3dc7f4[_0x5f3690(0x190)]())throw CliErrors['flagMissing'](_0x5f3690(0x18d));let _0x85009b;try{_0x85009b=JSON[_0x5f3690(0x19d)](_0x3dc7f4);}catch{throw CliErrors['validation'](_0x5f3690(0x19c));}if(typeof _0x85009b!==_0x5f3690(0x191)||_0x85009b===null||Array[_0x5f3690(0x196)](_0x85009b)||Object['values'](_0x85009b)[_0x5f3690(0x19b)](_0x27ddeb=>typeof _0x27ddeb!==_0x5f3690(0x195)))throw CliErrors[_0x5f3690(0x189)](_0x5f3690(0x18f));return _0x85009b;}export async function validateCustomPageContent(_0x5b4bfd){const _0x12b3ad=a147_0x705ed,_0x5a142e=await validateCustomPageSourceFiles(_0x5b4bfd);if(_0x5a142e['length']>0x0)throw CliErrors[_0x12b3ad(0x189)](_0x12b3ad(0x183)+_0x5a142e['map'](_0x24a26f=>_0x24a26f[_0x12b3ad(0x186)]+':\x20'+_0x24a26f[_0x12b3ad(0x19e)])[_0x12b3ad(0x187)](';\x20'));}export function readCustomPageId(_0x2ab58a){const _0x56fd3b=a147_0x705ed,_0x2f70d3=_0x2ab58a[_0x56fd3b(0x197)]('id');if(!Number[_0x56fd3b(0x199)](_0x2f70d3)||_0x2f70d3<=0x0)throw CliErrors[_0x56fd3b(0x189)](_0x56fd3b(0x18b));return _0x2f70d3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a148_0x4cb4(_0x5672f9,_0x1c3cfe){_0x5672f9=_0x5672f9-0xc2;const _0x25f652=a148_0x25f6();let _0x4cb45b=_0x25f652[_0x5672f9];return _0x4cb45b;}const a148_0x59911b=a148_0x4cb4;function a148_0x25f6(){const _0x23aa23=['3085zyIJgY','trim','58005332OKzfrD','some','1251cxZNZU','.tsx','endsWith','6072KhKFaj','filter','all','92390arNXDH','page-content','6546DtAotK','2jgaBSa','5162402cItdqN','.jsx','2586IKPQzP','499760krxFEh','babel','toLowerCase','typescript','find','message','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','1669010ygIXxI'];a148_0x25f6=function(){return _0x23aa23;};return a148_0x25f6();}(function(_0x30c258,_0x163d85){const _0x57ad34=a148_0x4cb4,_0x5e78b7=_0x30c258();while(!![]){try{const _0x11367c=-parseInt(_0x57ad34(0xd5))/0x1*(parseInt(_0x57ad34(0xc7))/0x2)+parseInt(_0x57ad34(0xd8))/0x3*(-parseInt(_0x57ad34(0xcf))/0x4)+parseInt(_0x57ad34(0xc8))/0x5*(parseInt(_0x57ad34(0xd4))/0x6)+-parseInt(_0x57ad34(0xd6))/0x7+-parseInt(_0x57ad34(0xd9))/0x8+-parseInt(_0x57ad34(0xcc))/0x9*(parseInt(_0x57ad34(0xd2))/0xa)+parseInt(_0x57ad34(0xca))/0xb;if(_0x11367c===_0x163d85)break;else _0x5e78b7['push'](_0x5e78b7['shift']());}catch(_0xc670c){_0x5e78b7['push'](_0x5e78b7['shift']());}}}(a148_0x25f6,0xd7fb0));import{format}from'prettier';const SOURCE_PARSERS={'.js':a148_0x59911b(0xda),'.jsx':'babel','.ts':a148_0x59911b(0xc3),'.tsx':a148_0x59911b(0xc3)},CUSTOM_PAGE_EXTENSIONS=[a148_0x59911b(0xd7),a148_0x59911b(0xcd)];export async function validateCustomPageSourceFiles(_0x3b312b){const _0x29e153=a148_0x59911b,_0xbef5f5=Object['entries'](_0x3b312b)[_0x29e153(0xd0)](([_0x5b148e])=>getParser(_0x5b148e));if(!_0xbef5f5[_0x29e153(0xcb)](([_0x2c9f28])=>isReactSourceFile(_0x2c9f28)))return[{'file':_0x29e153(0xd3),'message':_0x29e153(0xc6)}];const _0x2e9ffa=await Promise[_0x29e153(0xd1)](_0xbef5f5['map'](async([_0x133fd0,_0x563b17])=>{const _0x523747=_0x29e153;try{return await format(_0x563b17,{'parser':getParser(_0x133fd0)}),undefined;}catch(_0x132b04){return{'file':_0x133fd0,'message':_0x132b04 instanceof Error?_0x132b04[_0x523747(0xc5)]:String(_0x132b04)};}}));return _0x2e9ffa[_0x29e153(0xd0)](_0x50c61d=>_0x50c61d!==undefined);}function getParser(_0x49855a){const _0x1c04c8=a148_0x59911b,_0x4f3dd7=_0x49855a['trim']()[_0x1c04c8(0xc2)]();return Object['entries'](SOURCE_PARSERS)[_0x1c04c8(0xc4)](([_0x12964a])=>_0x4f3dd7[_0x1c04c8(0xce)](_0x12964a))?.[0x1];}function isReactSourceFile(_0x25bf26){const _0xb6176b=a148_0x59911b,_0x515af6=_0x25bf26[_0xb6176b(0xc9)]()[_0xb6176b(0xc2)]();return CUSTOM_PAGE_EXTENSIONS[_0xb6176b(0xcb)](_0x3c17c0=>_0x515af6[_0xb6176b(0xce)](_0x3c17c0));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28e3f5,_0xfc43de){const _0x53b3c5=a149_0x4f1a,_0x39e7a5=_0x28e3f5();while(!![]){try{const _0x37c938=parseInt(_0x53b3c5(0x19d))/0x1*(parseInt(_0x53b3c5(0x18b))/0x2)+-parseInt(_0x53b3c5(0x188))/0x3*(parseInt(_0x53b3c5(0x18d))/0x4)+-parseInt(_0x53b3c5(0x19a))/0x5*(parseInt(_0x53b3c5(0x196))/0x6)+parseInt(_0x53b3c5(0x185))/0x7+-parseInt(_0x53b3c5(0x184))/0x8+parseInt(_0x53b3c5(0x198))/0x9+parseInt(_0x53b3c5(0x187))/0xa*(parseInt(_0x53b3c5(0x194))/0xb);if(_0x37c938===_0xfc43de)break;else _0x39e7a5['push'](_0x39e7a5['shift']());}catch(_0x497584){_0x39e7a5['push'](_0x39e7a5['shift']());}}}(a149_0x1a9e,0xcd300));function buildIndexFile(_0x498645){const _0x9592c8=a149_0x4f1a;return _0x9592c8(0x195)+JSON[_0x9592c8(0x189)](_0x498645)+_0x9592c8(0x190);}function a149_0x4f1a(_0x33b9e5,_0x4a9293){_0x33b9e5=_0x33b9e5-0x184;const _0x1a9e11=a149_0x1a9e();let _0x4f1aa8=_0x1a9e11[_0x33b9e5];return _0x4f1aa8;}function a149_0x1a9e(){const _0x217c1b=['export\x20const\x20locales\x20=\x20{\x0a','}</Typography.Title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{$i18n.t(\x27pageDescription\x27,\x20\x27这是一个基础页面模板,你可以在此基础上进行开发。\x27)}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</Typography>\x0a\x20\x20\x20\x20\x20\x20</Card>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20);\x0a};\x0a\x0aexport\x20default\x20App;\x0a','Bu\x20bir\x20temel\x20sayfa\x20şablonudur.\x20Bu\x20temaplana\x20dayanarak\x20geliştirilebilir.','id-ID','join','34463mJakJH','import\x20React\x20from\x20\x27react\x27;\x0aimport\x20{\x20Card,\x20Typography\x20}\x20from\x20\x27antd\x27;\x0aimport\x20{\x20useSdkClient,\x20useI18n,\x20useNavigate,\x20useLocation\x20}\x20from\x20\x22@/context/app-context\x22;\x0aimport\x20{\x20locales\x20}\x20from\x20\x27../locales\x27;\x0aimport\x20\x27./index.css\x27;\x0a\x0aconst\x20App\x20=\x20()\x20=>\x20{\x0a\x20\x20const\x20client\x20=\x20useSdkClient();\x20//\x20client\x20可以用于获取其他数据集的数据\x0a\x20\x20const\x20$i18n\x20=\x20useI18n();\x20//\x20国际化多语言\x20i18n\x20实例\x0a\x20\x20const\x20navigate\x20=\x20useNavigate();\x20//\x20react-router\x20navigate\x20导航实例\x0a\x20\x20const\x20location\x20=\x20useLocation();\x20//\x20浏览器\x20location\x20实例\x0a\x0a\x20\x20$i18n.addLocale(locales);\x20//\x20添加多语言词包\x0a\x0a\x20\x20return\x20(\x0a\x20\x20\x20\x20<div\x20className=\x22page-container\x22>\x0a\x20\x20\x20\x20\x20\x20<Card>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<Typography>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Title\x20level={2}>{','8508FKvgsV',',\x0a\x20\x20}','5084334LEWurh','ja-JP','5385bWTepc','This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.','tr-TR','91947EAUWIN','9009736hZbjYk','8639960nqStcF',':\x20{\x0a\x20\x20\x20\x20','6260dFtklg','180ChmPqv','stringify','map','2ulRmmq','en-US','23904PcKySD','这是一个基础页面模板,你可以在此基础上进行开发。'];a149_0x1a9e=function(){return _0x217c1b;};return a149_0x1a9e();}function buildStyleFile(){return'.page-container\x20{\x0a\x20\x20padding:\x2024px;\x0a\x20\x20background:\x20#f0f2f5;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a';}function buildLocalesFile(_0x431c8c){const _0x46be50=a149_0x4f1a,_0x4541bd=_0x431c8c[_0x46be50(0x18a)](_0x27e961=>{const _0x50a12f=_0x46be50;let _0x18021f='';switch(_0x27e961){case'zh-CN':_0x18021f=_0x50a12f(0x18e);break;case _0x50a12f(0x18c):_0x18021f=_0x50a12f(0x19b);break;case _0x50a12f(0x199):_0x18021f='これは基本ページテンプレートです。あなたは、これに基づいて開発できます。';break;case _0x50a12f(0x19c):_0x18021f=_0x50a12f(0x191);break;case _0x50a12f(0x192):_0x18021f='Ini\x20adalah\x20sebuah\x20halaman\x20dasar.\x20Anda\x20dapat\x20mengembangkan\x20ini.';break;default:_0x18021f=_0x50a12f(0x19b);}return'\x20\x20'+JSON[_0x50a12f(0x189)](_0x27e961)+_0x50a12f(0x186)+JSON[_0x50a12f(0x189)]('pageDescription')+':\x20'+JSON[_0x50a12f(0x189)](_0x18021f)+_0x50a12f(0x197);})[_0x46be50(0x193)](',\x0a');return _0x46be50(0x18f)+_0x4541bd+'\x0a};\x0a';}export function buildInitialFiles(_0x2baef7,_0x34bc0a){return{'src/app/index.jsx':buildIndexFile(_0x2baef7),'src/app/index.css':buildStyleFile(),'src/locales/index.js':buildLocalesFile(_0x34bc0a)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a150_0x4748af=a150_0x31ca;function a150_0x1fd9(){const _0x4c34ed=['/smartapi/webcode/page/update/content','newVersion','Updated\x20Custom\x20Page\x20','12aaVDvo','2lPouJp','page-content','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','cookie','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','page.custom-update','isInteger','pageContent','string','9725837xViSPA','1211802BvBMxW','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','919191YoQuhQ','16KfqKwC','1888270OLPvSH','number','apiError','str','trim','custom-update','appCode','21NEHzlt','18QaHAZZ','page','Custom\x20Page\x20ID','289169BdMpll','pageId','POST','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','1240230LqBBlg','appcode','165556WtwTTF','validation'];a150_0x1fd9=function(){return _0x4c34ed;};return a150_0x1fd9();}function a150_0x31ca(_0x109aa0,_0x1d72cf){_0x109aa0=_0x109aa0-0x149;const _0x1fd906=a150_0x1fd9();let _0x31cafe=_0x1fd906[_0x109aa0];return _0x31cafe;}(function(_0x43c7fc,_0x262ef6){const _0x3515a5=a150_0x31ca,_0x412efe=_0x43c7fc();while(!![]){try{const _0x970b07=parseInt(_0x3515a5(0x14b))/0x1*(parseInt(_0x3515a5(0x157))/0x2)+-parseInt(_0x3515a5(0x16c))/0x3*(parseInt(_0x3515a5(0x151))/0x4)+-parseInt(_0x3515a5(0x14f))/0x5+parseInt(_0x3515a5(0x161))/0x6+-parseInt(_0x3515a5(0x163))/0x7*(parseInt(_0x3515a5(0x164))/0x8)+parseInt(_0x3515a5(0x16d))/0x9*(-parseInt(_0x3515a5(0x165))/0xa)+parseInt(_0x3515a5(0x160))/0xb*(parseInt(_0x3515a5(0x156))/0xc);if(_0x970b07===_0x262ef6)break;else _0x412efe['push'](_0x412efe['shift']());}catch(_0x35b646){_0x412efe['push'](_0x412efe['shift']());}}}(a150_0x1fd9,0x30286));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,parseCustomPageContent,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a150_0x4748af(0x149),'command':a150_0x4748af(0x16a),'description':'Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a150_0x4748af(0x166),'required':!![],'description':a150_0x4748af(0x14a)},{'name':a150_0x4748af(0x158),'type':a150_0x4748af(0x15f),'required':!![],'description':'Complete\x20page\x20files\x20as\x20JSON'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2ce504){const _0x1a2873=a150_0x4748af;readCustomPageId(_0x2ce504),await validateCustomPageContent(parseCustomPageContent(_0x2ce504['str'](_0x1a2873(0x158))));},async 'dryRun'(_0x4b4a71){const _0x134405=a150_0x4748af,_0x40f657=await readInput(_0x4b4a71);return{'method':_0x134405(0x14d),'url':_0x134405(0x153),'body':{'id':_0x40f657['pageId'],'codeContent':_0x40f657[_0x134405(0x15e)]},'description':_0x134405(0x14e)+_0x40f657[_0x134405(0x14c)]+'.'};},async 'execute'(_0xfaf84c){const _0x44f806=a150_0x4748af,_0x137fef=await readInput(_0xfaf84c),_0x2035d5=await updateCustomPageContent({'pageId':_0x137fef['pageId'],'pageContent':_0x137fef[_0x44f806(0x15e)]});if(!Number[_0x44f806(0x15d)](_0x2035d5['newVersion'])||_0x2035d5[_0x44f806(0x154)]<=0x0)throw CliErrors[_0x44f806(0x167)](_0x44f806(0x15b));const _0x4d4583=buildCustomPageEditUrl(_0x137fef[_0x44f806(0x16b)],_0x137fef['pageId']),_0x52f67c=await resolveCustomPageDevelopmentUrl(_0x137fef[_0x44f806(0x16b)],_0x137fef[_0x44f806(0x14c)],_0xfaf84c[_0x44f806(0x15a)]);return{'ok':!![],'data':buildMutationData(_0x137fef,_0x2035d5,_0x52f67c,_0x4d4583,_0x52f67c?[]:[_0x44f806(0x162)]),'message':_0x44f806(0x155)+_0x137fef[_0x44f806(0x14c)]+'.'};}};async function readInput(_0x41407c){const _0x45d4f7=a150_0x4748af,_0x420e08=readCustomPageId(_0x41407c),_0x4c50d0=_0x41407c[_0x45d4f7(0x168)](_0x45d4f7(0x150))[_0x45d4f7(0x169)]()||(await getCustomPageSource(_0x420e08))[_0x45d4f7(0x16b)]?.['trim']();if(!_0x4c50d0)throw CliErrors[_0x45d4f7(0x152)](_0x45d4f7(0x159)+_0x420e08+'.');return{'appCode':_0x4c50d0,'pageId':_0x420e08,'pageContent':parseCustomPageContent(_0x41407c[_0x45d4f7(0x168)](_0x45d4f7(0x158)))};}function buildMutationData(_0x47e7d4,_0x7042af,_0x1552b6,_0x324582,_0x337a5d=[]){const _0x361336=a150_0x4748af;return{'operation':_0x361336(0x15c),'selector':{'appCode':_0x47e7d4['appCode'],'pageId':_0x47e7d4[_0x361336(0x14c)]},'before':null,'after':{'pageId':_0x7042af?.['pageId']??_0x47e7d4['pageId'],'version':_0x7042af?.[_0x361336(0x154)]??null,'pageContent':_0x47e7d4[_0x361336(0x15e)]},'dryRun':_0x7042af===undefined,'request':_0x47e7d4,..._0x1552b6?{'pageUrl':_0x1552b6}:{},..._0x324582?{'editPageUrl':_0x324582}:{},'warnings':_0x337a5d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a151_0x38cbd8=a151_0x3fd7;function a151_0x3fd7(_0xc8ac61,_0x327471){_0xc8ac61=_0xc8ac61-0xbe;const _0x5ebb88=a151_0x5ebb();let _0x3fd7f1=_0x5ebb88[_0xc8ac61];return _0x3fd7f1;}(function(_0x5c30fe,_0x4a2882){const _0x44a7a2=a151_0x3fd7,_0x181ba0=_0x5c30fe();while(!![]){try{const _0x1b41e7=parseInt(_0x44a7a2(0xcd))/0x1*(-parseInt(_0x44a7a2(0xd0))/0x2)+-parseInt(_0x44a7a2(0xc4))/0x3+parseInt(_0x44a7a2(0xc2))/0x4+parseInt(_0x44a7a2(0xd5))/0x5*(parseInt(_0x44a7a2(0xcc))/0x6)+-parseInt(_0x44a7a2(0xc0))/0x7+-parseInt(_0x44a7a2(0xc1))/0x8+parseInt(_0x44a7a2(0xc3))/0x9*(parseInt(_0x44a7a2(0xc7))/0xa);if(_0x1b41e7===_0x4a2882)break;else _0x181ba0['push'](_0x181ba0['shift']());}catch(_0x4f2cf3){_0x181ba0['push'](_0x181ba0['shift']());}}}(a151_0x5ebb,0xcd887));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a151_0x5ebb(){const _0x3bc980=['nextAction','1314446qKyCWY','12544752GcCVSv','5737992Ffayyf','748971OzYclm','351594pEMyzY','GET','name','170oyaXjV','length','code','string','manualResolutionRequired','18LThILs','8221yUWLXa','read','source','94WZaRAI','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','compress','/standard-page-status?appCode=','query-data-list-status','420165PJLnRF','data-list-status','page'];a151_0x5ebb=function(){return _0x3bc980;};return a151_0x5ebb();}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a151_0x38cbd8(0xbe),'command':a151_0x38cbd8(0xd6),'description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a151_0x38cbd8(0xce),'defaultOutputFormat':a151_0x38cbd8(0xd2),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a151_0x38cbd8(0xca),'description':a151_0x38cbd8(0xd1)}],async 'validate'(_0x4ddce6){validateDatasetSelector(_0x4ddce6);},async 'dryRun'(_0x48bd2){const _0x268ff2=a151_0x38cbd8,_0x5a28fc=await loadDatasetDetailForPage(_0x48bd2);return{'method':_0x268ff2(0xc5),'url':'/smartapi/lovrabet/dataset/'+_0x5a28fc[_0x268ff2(0xc9)]+_0x268ff2(0xd3)+encodeURIComponent(_0x48bd2['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x5a28fc['id'],'code':_0x5a28fc[_0x268ff2(0xc9)],'name':_0x5a28fc[_0x268ff2(0xc6)]},'action':_0x268ff2(0xd4)})};},async 'execute'(_0x2494c4){const _0x44f91c=a151_0x38cbd8,_0x3298a6=await loadDatasetDetailForPage(_0x2494c4),_0x1c6768=await loadDataListPageStatusForGenerate(_0x2494c4,_0x3298a6[_0x44f91c(0xc9)]),_0x11aac3=getUndeletedRelatedPages(_0x3298a6),_0x343596=assessDataListPageState(_0x3298a6[_0x44f91c(0xc9)],_0x1c6768,{'fallbackUndeletedPages':_0x11aac3});return{'ok':!![],'data':{'datasetCode':_0x3298a6[_0x44f91c(0xc9)],'precheckSource':_0x1c6768?.[_0x44f91c(0xcf)]??'related-pages-fallback','status':_0x343596['status'],'manualResolutionRequired':_0x343596[_0x44f91c(0xcb)],'nextAction':_0x343596[_0x44f91c(0xbf)],'dataListPageStatus':_0x1c6768,'relatedPages':{'total':_0x3298a6['relatedPages']['length'],'undeletedCount':_0x11aac3[_0x44f91c(0xc8)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a152_0xe25fc4=a152_0x18e2;function a152_0x98bf(){const _0x1b2fa3=['operationId','80140MBzzsr','CRUD_PAGE_SET','apply','20vubpMs','dataset','PARTIAL_SUCCESS','name','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','593368tLKLIx','appCode','213648FjpQrL','manualResolutionRequired','code','page','page-pattern','source','string','allowGenerate','boolean','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','reused','132636XvFttf','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','precheck','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','55zqDvPZ','Reusing\x20an\x20existing\x20generate\x20task','/generate-standard-pages/start','POST','2702088YBAOyS','currentStep','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','related-pages-fallback','clientOperationId','bool','page-type','generate-start','1623279FiZBJJ','dataListPageStatus','927SnVQTY','status','dryRun','DATA_LIST','27219ONIQLp','nextAction','progressRate','alias','fieldCount'];a152_0x98bf=function(){return _0x1b2fa3;};return a152_0x98bf();}(function(_0xe4a334,_0x28abd3){const _0x4125f1=a152_0x18e2,_0x5cfd7a=_0xe4a334();while(!![]){try{const _0x48deb3=parseInt(_0x4125f1(0x158))/0x1*(parseInt(_0x4125f1(0x161))/0x2)+parseInt(_0x4125f1(0x168))/0x3+-parseInt(_0x4125f1(0x166))/0x4+parseInt(_0x4125f1(0x146))/0x5*(-parseInt(_0x4125f1(0x141))/0x6)+-parseInt(_0x4125f1(0x152))/0x7+-parseInt(_0x4125f1(0x14a))/0x8+-parseInt(_0x4125f1(0x154))/0x9*(-parseInt(_0x4125f1(0x15e))/0xa);if(_0x48deb3===_0x28abd3)break;else _0x5cfd7a['push'](_0x5cfd7a['shift']());}catch(_0x5350cd){_0x5cfd7a['push'](_0x5cfd7a['shift']());}}}(a152_0x98bf,0x32b42));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':a152_0xe25fc4(0x16b),'command':a152_0xe25fc4(0x151),'description':a152_0xe25fc4(0x14c),'risk':'write','defaultOutputFormat':'compress','rejectedFlags':[{'name':a152_0xe25fc4(0x150),'message':a152_0xe25fc4(0x145),'hint':a152_0xe25fc4(0x142)},{'name':a152_0xe25fc4(0x16c),'message':a152_0xe25fc4(0x13f),'hint':a152_0xe25fc4(0x165)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a152_0xe25fc4(0x15b),'type':a152_0xe25fc4(0x16e),'description':a152_0xe25fc4(0x13e)},{'name':a152_0xe25fc4(0x160),'type':a152_0xe25fc4(0x13d),'description':a152_0xe25fc4(0x143)}],async 'validate'(_0x31034c){validateDatasetSelector(_0x31034c);},async 'dryRun'(_0x29bb48){const _0x1046de=a152_0xe25fc4,_0x31eb1a=await prepare(_0x29bb48);return{'method':_0x1046de(0x149),'url':'/smartapi/lovrabet/dataset/'+_0x31eb1a['dataset']['code']+_0x1046de(0x148),'body':{'appCode':_0x29bb48['appCode'],'clientOperationId':_0x31eb1a['clientOperationId']},'description':serializeDryRunDescription({'dataset':{'id':_0x31eb1a[_0x1046de(0x162)]['id'],'code':_0x31eb1a[_0x1046de(0x162)]['code'],'name':_0x31eb1a['dataset'][_0x1046de(0x164)],'fieldCount':_0x31eb1a[_0x1046de(0x162)][_0x1046de(0x15c)]},'precheckSource':_0x31eb1a[_0x1046de(0x153)]?.[_0x1046de(0x16d)]??_0x1046de(0x14d),'action':_0x1046de(0x151),'clientOperationId':_0x31eb1a[_0x1046de(0x14e)],'plannedStatus':_0x31eb1a[_0x1046de(0x144)]['status'],'reason':_0x31eb1a['precheck']['message']})};},async 'execute'(_0x148941){const _0x62edee=a152_0xe25fc4;if(!_0x148941[_0x62edee(0x14f)](_0x62edee(0x160))){const _0x1db5a0=await pageGenerateStart[_0x62edee(0x156)](_0x148941);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x1db5a0};}const _0x5a58b8=await prepare(_0x148941);if(!_0x5a58b8[_0x62edee(0x144)][_0x62edee(0x13c)])return{'ok':![],'message':_0x5a58b8[_0x62edee(0x144)]['message'],'data':{'datasetCode':_0x5a58b8['dataset'][_0x62edee(0x16a)],'pageType':_0x62edee(0x157),'pagePattern':'CRUD_PAGE_SET','clientOperationId':_0x5a58b8[_0x62edee(0x14e)],'precheckSource':_0x5a58b8['dataListPageStatus']?.[_0x62edee(0x16d)]??'related-pages-fallback','status':_0x5a58b8[_0x62edee(0x144)][_0x62edee(0x155)],'manualResolutionRequired':_0x5a58b8[_0x62edee(0x144)][_0x62edee(0x169)],'nextAction':_0x5a58b8[_0x62edee(0x144)]['nextAction'],'query':{'command':buildDataListPageStatusQueryCommand(_0x5a58b8[_0x62edee(0x162)][_0x62edee(0x16a)],_0x148941[_0x62edee(0x167)])},'dataListPageStatus':_0x5a58b8[_0x62edee(0x153)]}};const _0x4c80fd=await startGenerateDataListPages(_0x148941[_0x62edee(0x167)],_0x5a58b8[_0x62edee(0x162)][_0x62edee(0x16a)],{'clientOperationId':_0x5a58b8['clientOperationId']}),_0x5e25d3=_0x4c80fd[_0x62edee(0x155)]==='SUCCESS'||_0x4c80fd[_0x62edee(0x155)]===_0x62edee(0x163)?await loadDataListPageStatusForGenerate(_0x148941,_0x5a58b8[_0x62edee(0x162)]['code']):null,_0x896166=assessGenerateOperationState(_0x5a58b8['dataset'][_0x62edee(0x16a)],_0x4c80fd[_0x62edee(0x155)],_0x5e25d3);return{'ok':!![],'message':_0x4c80fd['reused']?_0x62edee(0x147):'Submitted\x20a\x20generate\x20task','data':{'datasetCode':_0x5a58b8['dataset'][_0x62edee(0x16a)],'appCode':_0x148941[_0x62edee(0x167)],'pageType':_0x62edee(0x157),'pagePattern':_0x62edee(0x15f),'taskId':_0x4c80fd['taskId']??null,'operationId':_0x4c80fd[_0x62edee(0x15d)]??null,'clientOperationId':_0x5a58b8[_0x62edee(0x14e)],'jobStatus':_0x4c80fd[_0x62edee(0x155)]??null,'progressRate':typeof _0x4c80fd[_0x62edee(0x15a)]==='number'?_0x4c80fd[_0x62edee(0x15a)]:null,'currentStep':_0x4c80fd[_0x62edee(0x14b)]??null,'reused':_0x4c80fd[_0x62edee(0x140)]===!![],'status':_0x896166['status'],'manualResolutionRequired':_0x896166[_0x62edee(0x169)],'nextAction':_0x896166[_0x62edee(0x159)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x5a58b8[_0x62edee(0x162)]['code'],{'appCode':_0x148941[_0x62edee(0x167)],'taskId':_0x4c80fd['taskId'],'operationId':_0x4c80fd[_0x62edee(0x15d)],'clientOperationId':_0x5a58b8[_0x62edee(0x14e)]})},'dataListPageStatus':_0x5e25d3}};}};function a152_0x18e2(_0x1d8933,_0x5be638){_0x1d8933=_0x1d8933-0x13c;const _0x98bfd6=a152_0x98bf();let _0x18e24a=_0x98bfd6[_0x1d8933];return _0x18e24a;}async function prepare(_0xba6d7){const _0x15dffc=a152_0xe25fc4,_0x1f2440=await loadDatasetDetailForPage(_0xba6d7),_0x334854=await loadDataListPageStatusForGenerate(_0xba6d7,_0x1f2440[_0x15dffc(0x16a)]),_0xcca077=getUndeletedRelatedPages(_0x1f2440);return{'dataset':_0x1f2440,'dataListPageStatus':_0x334854,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x1f2440[_0x15dffc(0x16a)],_0x334854,{'fallbackUndeletedPages':_0xcca077})};}
|