@lovrabet/rabetbase-cli 2.5.0-beta.2 → 2.5.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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/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.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 +1 -1
- package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +5 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a140_0x44f68b=a140_0x49a1;(function(_0x4d0292,_0x4203df){const _0xc808c8=a140_0x49a1,_0x380491=_0x4d0292();while(!![]){try{const _0x37025c=-parseInt(_0xc808c8(0x196))/0x1+parseInt(_0xc808c8(0x1d8))/0x2+parseInt(_0xc808c8(0x200))/0x3*(-parseInt(_0xc808c8(0x19c))/0x4)+-parseInt(_0xc808c8(0x1a6))/0x5+parseInt(_0xc808c8(0x1fd))/0x6+parseInt(_0xc808c8(0x193))/0x7*(-parseInt(_0xc808c8(0x1bf))/0x8)+parseInt(_0xc808c8(0x1c7))/0x9*(parseInt(_0xc808c8(0x1e5))/0xa);if(_0x37025c===_0x4203df)break;else _0x380491['push'](_0x380491['shift']());}catch(_0x13d8eb){_0x380491['push'](_0x380491['shift']());}}}(a140_0x5f46,0xdd11b));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';function a140_0x49a1(_0x31e9d3,_0x292937){_0x31e9d3=_0x31e9d3-0x193;const _0x5f46bc=a140_0x5f46();let _0x49a18a=_0x5f46bc[_0x31e9d3];return _0x49a18a;}export const NOTIFICATION_CHANNEL_TYPES=[a140_0x44f68b(0x1be),a140_0x44f68b(0x1b1),a140_0x44f68b(0x1c5),a140_0x44f68b(0x202),a140_0x44f68b(0x1b7)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a140_0x44f68b(0x19d),'channelType',a140_0x44f68b(0x19e),a140_0x44f68b(0x1c9),a140_0x44f68b(0x20b),a140_0x44f68b(0x1eb),a140_0x44f68b(0x1e7)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a140_0x44f68b(0x1cf),a140_0x44f68b(0x19a),a140_0x44f68b(0x1c1)]),EMAIL_RECIPIENT_FIELDS=new Set([a140_0x44f68b(0x1f8),a140_0x44f68b(0x199),a140_0x44f68b(0x1dc),a140_0x44f68b(0x1b8),'replyTo',a140_0x44f68b(0x212),a140_0x44f68b(0x1b9),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a140_0x44f68b(0x208),'type':'string','required':![],'description':a140_0x44f68b(0x1ba)},{'name':a140_0x44f68b(0x1e8),'type':a140_0x44f68b(0x1c0),'required':![],'default':![],'description':a140_0x44f68b(0x1cd)},{'name':a140_0x44f68b(0x20d),'type':'string','required':![],'description':a140_0x44f68b(0x1c3)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a140_0x44f68b(0x1c2),'required':!![],'description':a140_0x44f68b(0x1a4)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x4fb839,_0x2329a5,_0x2b0e0a){return new CliError(_0x4fb839,0x1,_0x2329a5,_0x2b0e0a);}export function readNotificationId(_0x344b66){const _0x2f0b50=a140_0x44f68b,_0x1f05be=_0x344b66['num']('id');if(!Number[_0x2f0b50(0x1d4)](_0x1f05be)||_0x1f05be<=0x0)throw notificationError(_0x2f0b50(0x1c8),_0x2f0b50(0x213));return _0x1f05be;}export function requireNotificationExplicitYes(_0x5bd2f3){const _0x5a67dc=a140_0x44f68b;if(_0x5bd2f3[_0x5a67dc(0x1a5)](_0x5a67dc(0x1d5))||_0x5bd2f3[_0x5a67dc(0x1a5)](_0x5a67dc(0x1e4)))return;throw notificationError(_0x5a67dc(0x1bc),_0x5a67dc(0x19f),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x5a439b,_0x513557='type',_0x184ac5=a140_0x44f68b(0x1be)){const _0x24d7a8=a140_0x44f68b,_0x4854ff=_0x5a439b[_0x24d7a8(0x1de)](_0x513557)['trim']()||_0x184ac5;if(!NOTIFICATION_CHANNEL_TYPES[_0x24d7a8(0x197)](_0x4854ff))throw CliErrors[_0x24d7a8(0x217)](_0x24d7a8(0x1e6)+_0x513557+':\x20'+_0x4854ff,_0x24d7a8(0x1b3)+NOTIFICATION_CHANNEL_TYPES[_0x24d7a8(0x195)](',\x20')+'.');return _0x4854ff;}function a140_0x5f46(){const _0x31ecb8=['str','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','preflight','failed','updateTime','notification_config_source_unavailable','yes','4160mQShXN','Invalid\x20--','readTimeout','stdin','notification_config_update_empty','channelType','connectTimeout','notification_config_json_invalid','string','isArray','name','Notification\x20JSON\x20from\x20','endpointUrl:null','\x20characters.','path','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','every','\x20has\x20an\x20invalid\x20channelType.','emailTargets','\x22\x20must\x20be\x20a\x20non-empty\x20string.','prototype','\x20has\x20an\x20unsupported\x20channelType.','\x22\x20is\x20forbidden.','2904150IUCdKP','Notification\x20JSON\x20source\x20is\x20ambiguous.','\x22configName\x22.','22668UPiOZD','\x20--type\x20','WECOM','some','Notification\x20JSON\x20channelConfig\x20field\x20\x22','object','notification_config_field_invalid','keys','file','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','messageTemplate','description','a\x20JSON\x20object','from-env','\x20failed.','\x20has\x20an\x20invalid\x20id.','kind','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','subjectPrefix','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','a\x20non-empty\x20string','length','Unknown\x20notification\x20JSON\x20field\x20\x22','validation','createTime','3409tXWTNk','Notification\x20JSON\x20field\x20\x22','join','289886IVGxVK','includes','environment\x20variable\x20','recipients','configCode','setEncoding','544wJRODN','configName','endpointUrl','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','\x20has\x20an\x20invalid\x20appCode.','push','utf8','Notification\x20config\x20','Application-level\x20notification\x20config\x20ID','bool','3038535GFRjMB','has','notification_config_field_unknown','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','notification_config_response_invalid','Create\x20JSON\x20requires\x20field\x20','update','_unavailable','trim','entries','env','FEISHU','channelConfigRaw','Allowed\x20values:\x20','apiError','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','notification_config_','WEBHOOK','bccList','fromName','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','notification_config_field_required','notification_config_confirmation_required','\x22channelType\x22.','EMAIL','26792WBouhO','boolean','channelCode','number','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','DINGTALK','file\x20','85383VfxbkC','notification_config_id_invalid','channelConfig','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Missing\x20notification\x20JSON\x20source.','endpointUrlRaw','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Notification\x20config\x20list\x20item\x20','appCode','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','hasOwnProperty','a\x20string\x20or\x20null','Invalid\x20notification\x20config\x20response.','isSafeInteger','dry-run','\x20is\x20missing\x20required\x20field\x20\x22','\x22\x20cannot\x20exceed\x20','62108HAZkAK','notification_config_field_forbidden','a\x20JSON\x20object\x20or\x20null','\x20has\x20invalid\x20field\x20\x22','ccList','parse'];a140_0x5f46=function(){return _0x31ecb8;};return a140_0x5f46();}export function assertSingleNotificationSource(_0xed34a7){const _0x3e9861=a140_0x44f68b,_0x530957=[],_0x4018e2=_0xed34a7[_0x3e9861(0x1de)](_0x3e9861(0x208))[_0x3e9861(0x1ae)]();if(_0x4018e2)_0x530957[_0x3e9861(0x1a1)]({'kind':'file','path':_0x4018e2});if(_0xed34a7[_0x3e9861(0x1a5)](_0x3e9861(0x1e8)))_0x530957[_0x3e9861(0x1a1)]({'kind':_0x3e9861(0x1e8)});const _0x4c72ef=_0xed34a7['str'](_0x3e9861(0x20d))[_0x3e9861(0x1ae)]();if(_0x4c72ef)_0x530957[_0x3e9861(0x1a1)]({'kind':_0x3e9861(0x1b0),'name':_0x4c72ef});if(_0x530957['length']===0x0)throw CliErrors[_0x3e9861(0x217)](_0x3e9861(0x1cb),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x530957[_0x3e9861(0x215)]>0x1)throw CliErrors[_0x3e9861(0x217)](_0x3e9861(0x1fe),_0x3e9861(0x1b5));return _0x530957[0x0];}export async function readNotificationDocument(_0x1cc23c,_0x5c2167){const _0x20b60a=a140_0x44f68b,_0x226e06=assertSingleNotificationSource(_0x1cc23c),_0xc1c038=_0x226e06['kind']===_0x20b60a(0x208)?_0x20b60a(0x1c6)+_0x226e06[_0x20b60a(0x1f3)]:_0x226e06[_0x20b60a(0x210)]===_0x20b60a(0x1b0)?_0x20b60a(0x198)+_0x226e06['name']:_0x20b60a(0x1e8);let _0x53b199;try{if(_0x226e06[_0x20b60a(0x210)]===_0x20b60a(0x208))_0x53b199=await readFile(_0x226e06[_0x20b60a(0x1f3)],_0x20b60a(0x1a2));else{if(_0x226e06[_0x20b60a(0x210)]===_0x20b60a(0x1b0)){if(!(_0x226e06[_0x20b60a(0x1ef)]in process.env))throw notificationError(_0x20b60a(0x1e3),_0x20b60a(0x209)+_0x226e06['name']);_0x53b199=process.env[_0x226e06.name]??'';}else _0x53b199=await readStdin();}}catch(_0x59bf7e){if(_0x59bf7e instanceof CliError)throw _0x59bf7e;throw notificationError(_0x20b60a(0x1e3),_0x20b60a(0x1f5)+_0xc1c038+'.');}let _0x265acb;try{_0x265acb=JSON[_0x20b60a(0x1dd)](_0x53b199);}catch{throw notificationError(_0x20b60a(0x1ec),_0x20b60a(0x1f0)+_0xc1c038+'\x20is\x20invalid.',_0x20b60a(0x1d0));}if(!isJsonObject(_0x265acb))throw notificationError(_0x20b60a(0x1ec),_0x20b60a(0x1f0)+_0xc1c038+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x265acb,_0x5c2167);}export function projectNotificationListConfig(_0x197cc4,_0x37aea4){const _0x11c78d=a140_0x44f68b;return{'id':typeof _0x197cc4['id']===_0x11c78d(0x1c2)?_0x197cc4['id']:null,'configCode':requireResponseString(_0x197cc4[_0x11c78d(0x19a)],'configCode',_0x37aea4),'configName':requireResponseString(_0x197cc4[_0x11c78d(0x19d)],_0x11c78d(0x19d),_0x37aea4),'channelType':requireResponseString(_0x197cc4[_0x11c78d(0x1ea)],_0x11c78d(0x1ea),_0x37aea4),'description':normalizeNullableString(_0x197cc4[_0x11c78d(0x20b)]),'createTime':normalizeNullableString(_0x197cc4[_0x11c78d(0x218)]),'updateTime':normalizeNullableString(_0x197cc4[_0x11c78d(0x1e2)])};}export function normalizeExactNotificationConfig(_0x121367,_0x546d71,_0x2951c0){const _0x5c6f3a=a140_0x44f68b;if(!Number[_0x5c6f3a(0x1d4)](_0x121367['id'])||_0x121367['id']!==_0x546d71)throw notificationError(_0x5c6f3a(0x1aa),_0x5c6f3a(0x211)+_0x546d71+'.');if(_0x121367[_0x5c6f3a(0x1cf)]!==_0x2951c0)throw notificationError(_0x5c6f3a(0x1aa),_0x5c6f3a(0x1a3)+_0x546d71+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x524c22=requireExactString(_0x121367[_0x5c6f3a(0x19d)],_0x5c6f3a(0x19d),_0x546d71),_0x1b86d6=requireExactString(_0x121367['configCode'],_0x5c6f3a(0x19a),_0x546d71),_0x313d66=requireExactString(_0x121367[_0x5c6f3a(0x1ea)],'channelType',_0x546d71);if(!NOTIFICATION_CHANNEL_TYPES[_0x5c6f3a(0x197)](_0x313d66))throw notificationError(_0x5c6f3a(0x1aa),_0x5c6f3a(0x1a3)+_0x546d71+_0x5c6f3a(0x1fb));const _0x1d725c=responseNullableString(_0x121367[_0x5c6f3a(0x19e)],_0x5c6f3a(0x19e),_0x546d71),_0x25d7f8=responseNullableString(_0x121367['channelConfig'],_0x5c6f3a(0x1c9),_0x546d71),_0x10d214=responseNullableString(_0x121367[_0x5c6f3a(0x20b)],'description',_0x546d71),_0x379427=responseNullableTimeout(_0x121367['connectTimeout'],_0x5c6f3a(0x1eb),_0x546d71),_0x7941d9=responseNullableTimeout(_0x121367[_0x5c6f3a(0x1e7)],'readTimeout',_0x546d71);return{'id':_0x546d71,'appCode':_0x2951c0,'configCode':_0x1b86d6,'configName':_0x524c22,'channelType':_0x313d66,'endpointUrl':redactSensitive(_0x1d725c),'channelConfig':redactSensitive(_0x25d7f8),'description':_0x10d214,'connectTimeout':_0x379427,'readTimeout':_0x7941d9,'endpointUrlRaw':_0x1d725c,'channelConfigRaw':_0x25d7f8};}export async function requireExactNotificationConfig(_0x725001,_0x5b8e0d,_0x17a880){const _0x19a6cd=a140_0x44f68b;let _0x233e58;try{_0x233e58=await getNotificationChannelConfig(_0x5b8e0d,_0x725001);}catch{throw safeApiFailure(_0x17a880,_0x19a6cd(0x1e0),_0x19a6cd(0x1df)+_0x725001+_0x19a6cd(0x1ca));}return normalizeExactNotificationConfig(_0x233e58,_0x5b8e0d,_0x725001);}export function projectNotificationConfig(_0x41be3f){const _0x56f654=a140_0x44f68b;return{'id':_0x41be3f['id']??null,'appCode':_0x41be3f[_0x56f654(0x1cf)],'configCode':_0x41be3f[_0x56f654(0x19a)]??null,'configName':_0x41be3f[_0x56f654(0x19d)],'channelType':_0x41be3f[_0x56f654(0x1ea)],'endpointUrl':redactSensitive(_0x41be3f[_0x56f654(0x19e)]),'channelConfig':redactSensitive(_0x41be3f[_0x56f654(0x1c9)]),'description':_0x41be3f[_0x56f654(0x20b)]??null,'connectTimeout':_0x41be3f['connectTimeout']??null,'readTimeout':_0x41be3f[_0x56f654(0x1e7)]??null};}export function notificationSelector(_0x276c2c){const _0x2806cb=a140_0x44f68b;return{'appCode':_0x276c2c['appCode'],'id':_0x276c2c['id'],'configCode':_0x276c2c[_0x2806cb(0x19a)],'configName':_0x276c2c[_0x2806cb(0x19d)],'channelType':_0x276c2c['channelType']};}export function createMutationInput(_0x289c4a,_0xc74100){const _0x257d4a=a140_0x44f68b;return{'appCode':_0x289c4a,'configName':_0xc74100[_0x257d4a(0x19d)],'channelType':_0xc74100[_0x257d4a(0x1ea)],...hasOwn(_0xc74100,'endpointUrl')?{'endpointUrl':_0xc74100[_0x257d4a(0x19e)]}:{},...hasOwn(_0xc74100,_0x257d4a(0x1c9))?{'channelConfig':serializeChannelConfig(_0xc74100[_0x257d4a(0x1c9)])}:{},...hasOwn(_0xc74100,_0x257d4a(0x20b))?{'description':_0xc74100['description']}:{},...hasOwn(_0xc74100,_0x257d4a(0x1eb))?{'connectTimeout':_0xc74100['connectTimeout']}:{},...hasOwn(_0xc74100,_0x257d4a(0x1e7))?{'readTimeout':_0xc74100['readTimeout']}:{}};}export function mergeUpdateInput(_0x3c4d77,_0x7372cc){const _0xfb4f8e=a140_0x44f68b;return{'id':_0x3c4d77['id'],'appCode':_0x3c4d77[_0xfb4f8e(0x1cf)],'configName':_0x7372cc[_0xfb4f8e(0x19d)]??_0x3c4d77['configName'],'channelType':_0x7372cc[_0xfb4f8e(0x1ea)]??_0x3c4d77[_0xfb4f8e(0x1ea)],'endpointUrl':hasOwn(_0x7372cc,_0xfb4f8e(0x19e))?_0x7372cc[_0xfb4f8e(0x19e)]:_0x3c4d77[_0xfb4f8e(0x1cc)],'channelConfig':hasOwn(_0x7372cc,_0xfb4f8e(0x1c9))?serializeChannelConfig(_0x7372cc[_0xfb4f8e(0x1c9)]):_0x3c4d77[_0xfb4f8e(0x1b2)],'description':hasOwn(_0x7372cc,'description')?_0x7372cc[_0xfb4f8e(0x20b)]:_0x3c4d77[_0xfb4f8e(0x20b)],'connectTimeout':hasOwn(_0x7372cc,_0xfb4f8e(0x1eb))?_0x7372cc[_0xfb4f8e(0x1eb)]:_0x3c4d77[_0xfb4f8e(0x1eb)],'readTimeout':hasOwn(_0x7372cc,_0xfb4f8e(0x1e7))?_0x7372cc[_0xfb4f8e(0x1e7)]:_0x3c4d77[_0xfb4f8e(0x1e7)]};}export function plannedUpdateProjection(_0x227d22,_0x4a7157){const _0x193341=a140_0x44f68b;return projectNotificationConfig({'id':_0x227d22['id'],'appCode':_0x227d22['appCode'],'configCode':_0x227d22['configCode'],'configName':_0x4a7157[_0x193341(0x19d)]??_0x227d22[_0x193341(0x19d)],'channelType':_0x4a7157['channelType']??_0x227d22[_0x193341(0x1ea)],'endpointUrl':hasOwn(_0x4a7157,_0x193341(0x19e))?_0x4a7157[_0x193341(0x19e)]:_0x227d22[_0x193341(0x1cc)],'channelConfig':hasOwn(_0x4a7157,_0x193341(0x1c9))?_0x4a7157[_0x193341(0x1c9)]:_0x227d22['channelConfigRaw'],'description':hasOwn(_0x4a7157,_0x193341(0x20b))?_0x4a7157[_0x193341(0x20b)]:_0x227d22[_0x193341(0x20b)],'connectTimeout':hasOwn(_0x4a7157,_0x193341(0x1eb))?_0x4a7157[_0x193341(0x1eb)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x227d22[_0x193341(0x1eb)],'readTimeout':hasOwn(_0x4a7157,_0x193341(0x1e7))?_0x4a7157[_0x193341(0x1e7)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x227d22[_0x193341(0x1e7)]});}export function requestedSafeFieldsMatch(_0x4ec6d6,_0x11a844,_0x8abafe){const _0x251781=a140_0x44f68b,_0x5dbf13=[],_0xe656fb=[],_0x400ca1=[];for(const _0x1b901c of[_0x251781(0x19d),'channelType',_0x251781(0x20b)]){if(!hasOwn(_0x8abafe,_0x1b901c))continue;_0x400ca1[_0x251781(0x1a1)](_0x1b901c),_0x5dbf13[_0x251781(0x1a1)](_0x11a844[_0x1b901c]===_0x8abafe[_0x1b901c]),_0xe656fb[_0x251781(0x1a1)](_0x4ec6d6[_0x1b901c]!==_0x8abafe[_0x1b901c]&&_0x11a844[_0x1b901c]===_0x8abafe[_0x1b901c]);}for(const _0x549d37 of[_0x251781(0x1eb),_0x251781(0x1e7)]){if(!hasOwn(_0x8abafe,_0x549d37))continue;const _0x4fc70f=_0x8abafe[_0x549d37]??(_0x549d37===_0x251781(0x1eb)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x400ca1['push'](_0x549d37),_0x5dbf13[_0x251781(0x1a1)](_0x11a844[_0x549d37]===_0x4fc70f),_0xe656fb[_0x251781(0x1a1)](_0x4ec6d6[_0x549d37]!==_0x4fc70f&&_0x11a844[_0x549d37]===_0x4fc70f);}return hasOwn(_0x8abafe,_0x251781(0x19e))&&_0x8abafe[_0x251781(0x19e)]===null&&(_0x400ca1[_0x251781(0x1a1)](_0x251781(0x1f1)),_0x5dbf13['push'](_0x11a844['endpointUrlRaw']===null||_0x11a844[_0x251781(0x1cc)]===''),_0xe656fb[_0x251781(0x1a1)](_0x4ec6d6[_0x251781(0x1cc)]!==null&&_0x4ec6d6['endpointUrlRaw']!==''&&(_0x11a844[_0x251781(0x1cc)]===null||_0x11a844['endpointUrlRaw']===''))),{'allMatch':_0x5dbf13[_0x251781(0x1f6)](Boolean),'provesChange':_0xe656fb[_0x251781(0x203)](Boolean),'verifiedFields':_0x400ca1};}export function validateNotificationDeleteReadback(_0x5db92b,_0x5a8cbb,_0x15b108){const _0x3753a1=a140_0x44f68b;for(const [_0x17d30c,_0x2d2ca1]of _0x5db92b[_0x3753a1(0x1af)]()){if(!Number['isSafeInteger'](_0x2d2ca1['id'])||_0x2d2ca1['id']<=0x0)throw notificationError(_0x3753a1(0x1aa),_0x3753a1(0x1ce)+(_0x17d30c+0x1)+_0x3753a1(0x20f));if(_0x2d2ca1[_0x3753a1(0x1cf)]!==_0x5a8cbb)throw notificationError(_0x3753a1(0x1aa),_0x3753a1(0x1ce)+(_0x17d30c+0x1)+_0x3753a1(0x1a0));if(_0x2d2ca1[_0x3753a1(0x1ea)]!==_0x15b108)throw notificationError(_0x3753a1(0x1aa),'Notification\x20config\x20list\x20item\x20'+(_0x17d30c+0x1)+_0x3753a1(0x1f7));}}export function safeApiFailure(_0x53286e,_0x26178b,_0x4886eb){const _0x15e3ca=a140_0x44f68b;return notificationError(_0x15e3ca(0x1b6)+_0x53286e+'_'+(_0x26178b==='mutation'?_0x15e3ca(0x1e1):_0x26178b+_0x15e3ca(0x1ad)),_0x15e3ca(0x1a3)+_0x53286e+'\x20'+_0x26178b+_0x15e3ca(0x20e),_0x4886eb);}export function notificationLookupCommand(_0x1c5ca9,_0x1b2d81){const _0x31d6ce=a140_0x44f68b;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x1c5ca9+_0x31d6ce(0x201)+_0x1b2d81+'\x20--format\x20compress';}function validateNotificationDocument(_0x13766b,_0xafc204){const _0x7e0f8b=a140_0x44f68b;for(const _0x4342a3 of Object[_0x7e0f8b(0x207)](_0x13766b)){if(FORBIDDEN_IDENTITY_FIELDS[_0x7e0f8b(0x1a7)](_0x4342a3))throw notificationError(_0x7e0f8b(0x1d9),_0x7e0f8b(0x194)+_0x4342a3+_0x7e0f8b(0x1a9));if(!ALLOWED_INPUT_FIELDS[_0x7e0f8b(0x1a7)](_0x4342a3))throw notificationError(_0x7e0f8b(0x1a8),_0x7e0f8b(0x216)+_0x4342a3+'\x22.');}if(_0xafc204===_0x7e0f8b(0x1ac)&&Object[_0x7e0f8b(0x207)](_0x13766b)[_0x7e0f8b(0x215)]===0x0)throw notificationError(_0x7e0f8b(0x1e9),_0x7e0f8b(0x1f4));const _0x1eb247={};if(hasOwn(_0x13766b,_0x7e0f8b(0x19d)))_0x1eb247[_0x7e0f8b(0x19d)]=validateRequiredString(_0x13766b['configName'],'configName',0x80);else{if(_0xafc204==='create')throw notificationError(_0x7e0f8b(0x1bb),'Create\x20JSON\x20requires\x20field\x20'+_0x7e0f8b(0x1ff));}if(hasOwn(_0x13766b,'channelType')){if(typeof _0x13766b[_0x7e0f8b(0x1ea)]!==_0x7e0f8b(0x1ed))throw invalidFieldType(_0x7e0f8b(0x1ea),'a\x20supported\x20string');const _0x2a1d4b=_0x13766b[_0x7e0f8b(0x1ea)][_0x7e0f8b(0x1ae)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x2a1d4b))throw notificationError('notification_config_field_invalid',_0x7e0f8b(0x1c4),_0x7e0f8b(0x1b3)+NOTIFICATION_CHANNEL_TYPES[_0x7e0f8b(0x195)](',\x20')+'.');_0x1eb247[_0x7e0f8b(0x1ea)]=_0x2a1d4b;}else{if(_0xafc204==='create')throw notificationError(_0x7e0f8b(0x1bb),_0x7e0f8b(0x1ab)+_0x7e0f8b(0x1bd));}for(const [_0x4d59df,_0x4c764c]of[[_0x7e0f8b(0x19e),0x200],[_0x7e0f8b(0x20b),0x100]]){if(!hasOwn(_0x13766b,_0x4d59df))continue;const _0x30f782=_0x13766b[_0x4d59df];if(_0x30f782!==null&&typeof _0x30f782!==_0x7e0f8b(0x1ed))throw invalidFieldType(_0x4d59df,_0x7e0f8b(0x1d2));if(typeof _0x30f782==='string'&&_0x30f782[_0x7e0f8b(0x215)]>_0x4c764c)throw notificationError(_0x7e0f8b(0x206),_0x7e0f8b(0x194)+_0x4d59df+_0x7e0f8b(0x1d7)+_0x4c764c+_0x7e0f8b(0x1f2));_0x1eb247[_0x4d59df]=_0x30f782;}if(hasOwn(_0x13766b,_0x7e0f8b(0x1c9))){const _0xbc2670=_0x13766b[_0x7e0f8b(0x1c9)];if(_0xbc2670===null&&_0xafc204==='create')throw invalidFieldType(_0x7e0f8b(0x1c9),_0x7e0f8b(0x20c));if(_0xbc2670!==null&&!isJsonObject(_0xbc2670))throw invalidFieldType(_0x7e0f8b(0x1c9),_0xafc204===_0x7e0f8b(0x1ac)?_0x7e0f8b(0x1da):_0x7e0f8b(0x20c));_0xbc2670!==null&&validateChannelConfigFields(_0x1eb247['channelType'],_0xbc2670),_0x1eb247['channelConfig']=_0xbc2670;}for(const _0x398caf of[_0x7e0f8b(0x1eb),'readTimeout']){if(!hasOwn(_0x13766b,_0x398caf))continue;const _0x5bcb76=_0x13766b[_0x398caf];if(_0x5bcb76!==null&&(!Number[_0x7e0f8b(0x1d4)](_0x5bcb76)||_0x5bcb76<0x0))throw notificationError('notification_config_field_invalid',_0x7e0f8b(0x194)+_0x398caf+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x1eb247[_0x398caf]=_0x5bcb76;}return _0x1eb247;}function validateRequiredString(_0x30b755,_0x8e6df4,_0x560c2f){const _0x459737=a140_0x44f68b;if(typeof _0x30b755!=='string')throw invalidFieldType(_0x8e6df4,_0x459737(0x214));const _0x5cc003=_0x30b755[_0x459737(0x1ae)]();if(!_0x5cc003)throw notificationError(_0x459737(0x206),_0x459737(0x194)+_0x8e6df4+_0x459737(0x1f9));if(_0x5cc003[_0x459737(0x215)]>_0x560c2f)throw notificationError('notification_config_field_invalid',_0x459737(0x194)+_0x8e6df4+_0x459737(0x1d7)+_0x560c2f+_0x459737(0x1f2));return _0x5cc003;}function validateChannelConfigFields(_0x1faa68,_0x1bd492){const _0x425849=a140_0x44f68b;if(hasOwn(_0x1bd492,_0x425849(0x20a)))throw forbiddenChannelConfigField(_0x425849(0x20a));if(_0x1faa68===_0x425849(0x1be))for(const _0x4ae7b6 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x1bd492,_0x4ae7b6))throw forbiddenChannelConfigField(_0x4ae7b6);}}function forbiddenChannelConfigField(_0x418709){const _0x1b1eac=a140_0x44f68b;return notificationError('notification_config_channel_field_forbidden',_0x1b1eac(0x204)+_0x418709+_0x1b1eac(0x1fc));}function invalidFieldType(_0x5d0a87,_0x5e8bcf){return notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x5d0a87+'\x22\x20must\x20be\x20'+_0x5e8bcf+'.');}function serializeChannelConfig(_0x4f29e3){return _0x4f29e3===null||_0x4f29e3===undefined?null:JSON['stringify'](_0x4f29e3);}function redactSensitive(_0x563e99){return _0x563e99===null||_0x563e99===undefined||_0x563e99===''?null:'<redacted>';}function requireResponseString(_0x150572,_0x2e6b3a,_0x407725){const _0x455c6a=a140_0x44f68b;if(typeof _0x150572!==_0x455c6a(0x1ed)||_0x150572[_0x455c6a(0x1ae)]()==='')throw CliErrors[_0x455c6a(0x1b4)](_0x455c6a(0x1d3),'Item\x20'+(_0x407725+0x1)+_0x455c6a(0x1d6)+_0x2e6b3a+'\x22.');return _0x150572[_0x455c6a(0x1ae)]();}function requireExactString(_0x3c2528,_0x11d0d6,_0x2fd26e){const _0x31094a=a140_0x44f68b;if(typeof _0x3c2528!==_0x31094a(0x1ed)||_0x3c2528[_0x31094a(0x1ae)]()==='')throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x2fd26e+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x11d0d6+'\x22.');return _0x3c2528[_0x31094a(0x1ae)]();}function responseNullableString(_0x377842,_0x2bda90,_0x3ec668){const _0x3fea37=a140_0x44f68b;if(_0x377842===undefined||_0x377842===null)return null;if(typeof _0x377842!==_0x3fea37(0x1ed))throw notificationError('notification_config_response_invalid',_0x3fea37(0x1a3)+_0x3ec668+_0x3fea37(0x1db)+_0x2bda90+'\x22.');return _0x377842;}function responseNullableTimeout(_0x27ae9e,_0x5d4c9b,_0x2a5b02){const _0x1c4e88=a140_0x44f68b;if(_0x27ae9e===undefined||_0x27ae9e===null)return null;if(!Number['isSafeInteger'](_0x27ae9e)||_0x27ae9e<0x0)throw notificationError(_0x1c4e88(0x1aa),_0x1c4e88(0x1a3)+_0x2a5b02+_0x1c4e88(0x1db)+_0x5d4c9b+'\x22.');return _0x27ae9e;}function normalizeNullableString(_0x2af64){const _0x490a86=a140_0x44f68b;return typeof _0x2af64===_0x490a86(0x1ed)?_0x2af64:null;}function isJsonObject(_0x279a6b){const _0x1f6026=a140_0x44f68b;return _0x279a6b!==null&&typeof _0x279a6b===_0x1f6026(0x205)&&!Array[_0x1f6026(0x1ee)](_0x279a6b);}function hasOwn(_0xb870b5,_0x2407ab){const _0x4f9aae=a140_0x44f68b;return Object[_0x4f9aae(0x1fa)][_0x4f9aae(0x1d1)]['call'](_0xb870b5,_0x2407ab);}async function readStdin(){const _0x126e98=a140_0x44f68b;let _0x2e50e6='';process[_0x126e98(0x1e8)][_0x126e98(0x19b)](_0x126e98(0x1a2));for await(const _0x5a5aec of process[_0x126e98(0x1e8)])_0x2e50e6+=_0x5a5aec;return _0x2e50e6;}
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a141_0x436d5a=a141_0x1b5f;(function(_0x5ec0df,_0x2f05fb){const _0xeb3026=a141_0x1b5f,_0x6f2cd3=_0x5ec0df();while(!![]){try{const _0x2711b1=-parseInt(_0xeb3026(0x1ea))/0x1+-parseInt(_0xeb3026(0x1f6))/0x2+parseInt(_0xeb3026(0x206))/0x3+-parseInt(_0xeb3026(0x1e1))/0x4*(parseInt(_0xeb3026(0x1e7))/0x5)+parseInt(_0xeb3026(0x1fc))/0x6*(-parseInt(_0xeb3026(0x1e8))/0x7)+-parseInt(_0xeb3026(0x211))/0x8+parseInt(_0xeb3026(0x1ff))/0x9;if(_0x2711b1===_0x2f05fb)break;else _0x6f2cd3['push'](_0x6f2cd3['shift']());}catch(_0x537d14){_0x6f2cd3['push'](_0x6f2cd3['shift']());}}}(a141_0x35c8,0x2dac2));function a141_0x35c8(){const _0x167656=['imageUrl','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','recognize','fileName','721880rGgFVM','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','imageFile','apiError','appCode','51928Xwoqdl','invoice','general','string','image-url','\x20OCR\x20from\x20URL','90QEIIks','7WNzqeL','.\x20Supported\x20scenes:\x20','170700hyQUUh','filePath','join','IdCard','/smartapi/common/uploadFile','length','fileUrl','Unsupported\x20OCR\x20scene:\x20','General','read','\x20OCR','image-file','368676AKHZGd','File\x20URL\x20response\x20missing\x20fileUrl.','count','/smartapi/ocr/recognize-text','trim','/smartapi/ocr/recognize-text?','1648758hilSBK','str','Preview:\x20recognize\x20','8300160jCLtYO','toLowerCase','Table','filter','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','GET','scene','655728CGLRBV','POST','ocr','idCard','idcard','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','form'];a141_0x35c8=function(){return _0x167656;};return a141_0x35c8();}import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a141_0x436d5a(0x1e2),a141_0x436d5a(0x1e3),a141_0x436d5a(0x20c),a141_0x436d5a(0x209)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a141_0x436d5a(0x1f2),'form':a141_0x436d5a(0x201),'idCard':a141_0x436d5a(0x1ed)},SCENE_FLAG={'name':a141_0x436d5a(0x205),'type':a141_0x436d5a(0x1e4),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a141_0x436d5a(0x1f5),'type':a141_0x436d5a(0x1e4),'description':a141_0x436d5a(0x203)},IMAGE_URL_FLAG={'name':a141_0x436d5a(0x1e5),'type':a141_0x436d5a(0x1e4),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x34dcc4){const _0x2c1f68=a141_0x436d5a,_0x399b6e=_0x34dcc4[_0x2c1f68(0x1fa)]()[_0x2c1f68(0x200)]();if(_0x399b6e===_0x2c1f68(0x20a))return _0x2c1f68(0x209);if(_0x399b6e===_0x2c1f68(0x1e2)||_0x399b6e==='general'||_0x399b6e===_0x2c1f68(0x20c))return _0x399b6e;throw CliErrors['validation'](_0x2c1f68(0x1f1)+_0x34dcc4+_0x2c1f68(0x1e9)+SUPPORTED_SCENES[_0x2c1f68(0x1ec)](',\x20'));}function selectedInputs(_0x58196d){const _0x37ff46=a141_0x436d5a,_0x2da9df=_0x58196d[_0x37ff46(0x1fd)](_0x37ff46(0x1f5))['trim'](),_0x4fbc37=_0x58196d[_0x37ff46(0x1fd)]('image-url')[_0x37ff46(0x1fa)]();return{'imageFile':_0x2da9df,'imageUrl':_0x4fbc37,'count':[_0x2da9df,_0x4fbc37][_0x37ff46(0x202)](Boolean)[_0x37ff46(0x1ef)]};}function a141_0x1b5f(_0x113b86,_0x218f60){_0x113b86=_0x113b86-0x1de;const _0x35c85c=a141_0x35c8();let _0x1b5f37=_0x35c85c[_0x113b86];return _0x1b5f37;}function validateInputSelection(_0x291b89){const _0x18921b=a141_0x436d5a,_0x3f0b05=selectedInputs(_0x291b89);if(_0x3f0b05[_0x18921b(0x1f8)]!==0x1)throw CliErrors['validation']('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x3f0b05;}function withScene(_0x211572,_0x16414e,_0x334b7a){const _0xcf1853=a141_0x436d5a;return{..._0x211572,'scene':_0x16414e,..._0x334b7a?{'sourceFile':{'fileName':_0x334b7a[_0xcf1853(0x210)],'filePath':_0x334b7a[_0xcf1853(0x1eb)]}}:{}};}const ocrRecognize={'service':a141_0x436d5a(0x208),'command':a141_0x436d5a(0x20f),'description':a141_0x436d5a(0x212),'risk':a141_0x436d5a(0x1f3),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x192635){const _0x369cdc=a141_0x436d5a,_0x2a3d8b=normalizeScene(_0x192635['str'](_0x369cdc(0x205))),_0x41df36=SCENE_TO_LEGACY_TYPE[_0x2a3d8b],_0x234f4a=validateInputSelection(_0x192635);if(_0x234f4a['imageUrl']){const _0x3a8b4e=new URLSearchParams({'url':_0x234f4a[_0x369cdc(0x20d)],'type':_0x41df36,'appCode':_0x192635[_0x369cdc(0x1e0)]});return{'method':_0x369cdc(0x204),'url':_0x369cdc(0x1fb)+_0x3a8b4e['toString'](),'description':_0x369cdc(0x1fe)+_0x2a3d8b+_0x369cdc(0x1e6)};}const _0x4b9465=requireDevelopmentUploadFile(_0x234f4a[_0x369cdc(0x1de)],_0x369cdc(0x1f5));return{'method':_0x369cdc(0x207),'url':_0x369cdc(0x1ee),'body':{'steps':[{'method':_0x369cdc(0x207),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x192635[_0x369cdc(0x1e0)],'multipart':{'file':_0x4b9465}}},{'method':_0x369cdc(0x207),'url':'/smartapi/common/queryFileUrl','body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':'GET','url':_0x369cdc(0x1f9),'query':{'appCode':_0x192635['appCode'],'url':_0x369cdc(0x20e),'type':_0x41df36}}]},'description':_0x369cdc(0x20b)+_0x2a3d8b+_0x369cdc(0x1f4)};},async 'execute'(_0x531106){const _0xcb8ab9=a141_0x436d5a,_0x36043f=normalizeScene(_0x531106['str']('scene')),_0x5d7d83=SCENE_TO_LEGACY_TYPE[_0x36043f],_0x52e75d=validateInputSelection(_0x531106);if(_0x52e75d[_0xcb8ab9(0x20d)]){const _0x244bb8=await recognizeDevelopmentOcr(_0x531106['appCode'],{'url':_0x52e75d[_0xcb8ab9(0x20d)],'type':_0x5d7d83});return{'ok':!![],'data':withScene(_0x244bb8,_0x36043f)};}const _0x3cef21=requireDevelopmentUploadFile(_0x52e75d[_0xcb8ab9(0x1de)],_0xcb8ab9(0x1f5)),_0x23a49c=await uploadDevelopmentFile(_0x531106[_0xcb8ab9(0x1e0)],_0x3cef21['path']);if(!_0x23a49c[_0xcb8ab9(0x1eb)])throw CliErrors[_0xcb8ab9(0x1df)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x2b328f=await queryDevelopmentFileUrl(_0x23a49c[_0xcb8ab9(0x1eb)],{'download':![]});if(!_0x2b328f[_0xcb8ab9(0x1f0)])throw CliErrors[_0xcb8ab9(0x1df)](_0xcb8ab9(0x1f7));const _0x5b5d92=await recognizeDevelopmentOcr(_0x531106[_0xcb8ab9(0x1e0)],{'url':_0x2b328f[_0xcb8ab9(0x1f0)],'type':_0x5d7d83});return{'ok':!![],'data':withScene(_0x5b5d92,_0x36043f,_0x23a49c)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a142_0x2f14e8=a142_0xbab2;(function(_0xdc2de5,_0x12f386){const _0x56ce05=a142_0xbab2,_0x75cafd=_0xdc2de5();while(!![]){try{const _0x4b8fcb=parseInt(_0x56ce05(0x12f))/0x1+parseInt(_0x56ce05(0x147))/0x2+parseInt(_0x56ce05(0x14a))/0x3+parseInt(_0x56ce05(0x13f))/0x4*(parseInt(_0x56ce05(0x13c))/0x5)+parseInt(_0x56ce05(0x137))/0x6*(-parseInt(_0x56ce05(0x155))/0x7)+-parseInt(_0x56ce05(0x139))/0x8+-parseInt(_0x56ce05(0x125))/0x9;if(_0x4b8fcb===_0x12f386)break;else _0x75cafd['push'](_0x75cafd['shift']());}catch(_0x402d7e){_0x75cafd['push'](_0x75cafd['shift']());}}}(a142_0xc2c1,0xacdb6));import{APPCODE_FLAG}from'../../commands/common/flags.js';import{buildInitialFiles}from'../../commands/page/custom/template.js';import{createCustomPage,getI18nInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,parseCustomPageContent,validateCustomPageContent}from'./custom/shared.js';const DEFAULT_CUSTOM_PAGE_LANGUAGES=[a142_0x2f14e8(0x143),a142_0x2f14e8(0x140)];function a142_0xc2c1(){const _0x4b7d71=['\x20and\x20its\x20menu\x20entry.','page','parent-menu-id','files','page.create','7179876eSmIqS','trim','/smartapi/webcode/page/create','appCode','name','langs','keys','pageName','pageId','string','1052953CTpFsc','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK\x20or\x20--page-content.','enableI18n','num','parentMenuId','Complete\x20page\x20files\x20as\x20JSON\x20(conflicts\x20with\x20--page-pattern)','number','stringify','2984736kXSUHw','now','5487120OjOQyP','Created\x20Custom\x20Page\x20','page-type','50yErOyr','version','isNaN','46536pLaYRD','en-US','menuPath','isInteger','zh-CN','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','page\x20create\x20does\x20not\x20accept\x20--page-type.','Custom\x20Page\x20pattern\x20(currently\x20BLANK;\x20conflicts\x20with\x20--page-content)','2084218Oijkbp','validation','input','1433190ynQOsa','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20complete\x20files','write','str','Custom_page_','page-pattern','pagePattern','POST','length','CUSTOM','BLANK','7MYXgGv','createMenu','warnings','compress'];a142_0xc2c1=function(){return _0x4b7d71;};return a142_0xc2c1();}export const pageCreate={'service':a142_0x2f14e8(0x121),'command':'create','description':a142_0x2f14e8(0x14b),'risk':a142_0x2f14e8(0x14c),'defaultOutputFormat':a142_0x2f14e8(0x158),'structuredErrors':!![],'rejectedFlags':[{'name':a142_0x2f14e8(0x13b),'message':a142_0x2f14e8(0x145),'hint':a142_0x2f14e8(0x130)}],'flags':[{'name':a142_0x2f14e8(0x129),'type':a142_0x2f14e8(0x12e),'description':'Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)'},{'name':a142_0x2f14e8(0x122),'type':a142_0x2f14e8(0x135),'description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':a142_0x2f14e8(0x14f),'type':a142_0x2f14e8(0x12e),'description':a142_0x2f14e8(0x146),'enum':[a142_0x2f14e8(0x154)]},{'name':'page-content','type':a142_0x2f14e8(0x12e),'description':a142_0x2f14e8(0x134)},APPCODE_FLAG],async 'validate'(_0x33a65e){const _0x1af9b2=a142_0x2f14e8,_0x433900=readPagePattern(_0x33a65e);await validateCustomPageContent(readInput(_0x33a65e,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x433900)[_0x1af9b2(0x123)]);},async 'dryRun'(_0x53d845){const _0x2feb90=a142_0x2f14e8,{input:_0x263ad1}=await prepare(_0x53d845);return{'method':_0x2feb90(0x151),'url':_0x2feb90(0x127),'body':{'appCode':_0x263ad1[_0x2feb90(0x128)],'pageName':_0x263ad1['pageName'],..._0x263ad1[_0x2feb90(0x133)]!=null?{'parentMenuId':_0x263ad1['parentMenuId']}:{},'createMenu':_0x263ad1[_0x2feb90(0x156)],'codeContent':_0x263ad1['files']},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x2feb90(0x136)](_0x263ad1[_0x2feb90(0x12c)])+_0x2feb90(0x120)};},async 'execute'(_0x737494){const _0x1c2aa5=a142_0x2f14e8,_0x531bfc=await prepare(_0x737494),_0x1261ca=await createCustomPage(_0x531bfc[_0x1c2aa5(0x149)]);if(!Number[_0x1c2aa5(0x142)](_0x1261ca['pageId'])||_0x1261ca[_0x1c2aa5(0x12d)]<=0x0)throw CliErrors['apiError'](_0x1c2aa5(0x144));return{'ok':!![],'data':buildMutationData(_0x531bfc,_0x1261ca),'message':_0x1c2aa5(0x13a)+_0x1261ca[_0x1c2aa5(0x12d)]+'.'};}};async function prepare(_0x55fc77){const _0x29bc26=a142_0x2f14e8,_0x1a3d31=readPagePattern(_0x55fc77);if(_0x1a3d31===null)return{'input':readInput(_0x55fc77,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x1a3d31),'warnings':[],'pagePattern':_0x1a3d31};let _0x28ed2e=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x1cf54d=[];try{const _0x3aaf7b=await getI18nInfo(_0x55fc77[_0x29bc26(0x128)]);_0x3aaf7b[_0x29bc26(0x131)]&&_0x3aaf7b[_0x29bc26(0x12a)]?.[_0x29bc26(0x152)]&&(_0x28ed2e=_0x3aaf7b[_0x29bc26(0x12a)]);}catch{_0x1cf54d=['Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.'];}return{'input':readInput(_0x55fc77,_0x28ed2e,_0x1a3d31),'warnings':_0x1cf54d,'pagePattern':_0x1a3d31};}function a142_0xbab2(_0x9a55ca,_0x5e9fcc){_0x9a55ca=_0x9a55ca-0x120;const _0xc2c129=a142_0xc2c1();let _0xbab21=_0xc2c129[_0x9a55ca];return _0xbab21;}function readPagePattern(_0x401832){const _0x2d263e=a142_0x2f14e8,_0x341172=_0x401832[_0x2d263e(0x14d)](_0x2d263e(0x14f))[_0x2d263e(0x126)](),_0x500a83=_0x401832[_0x2d263e(0x14d)]('page-content')[_0x2d263e(0x126)]()[_0x2d263e(0x152)]>0x0;if(_0x341172&&_0x500a83)throw CliErrors[_0x2d263e(0x148)]('--page-pattern\x20and\x20--page-content\x20cannot\x20be\x20used\x20together.');if(_0x500a83)return null;if(!_0x341172)throw CliErrors[_0x2d263e(0x148)]('Provide\x20--page-pattern\x20BLANK\x20or\x20--page-content.');if(_0x341172!=='BLANK')throw CliErrors[_0x2d263e(0x148)]('--page-pattern\x20currently\x20supports\x20only\x20BLANK.');return _0x341172;}function readInput(_0x1b8e2c,_0x2f6c27=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x3f27cb=readPagePattern(_0x1b8e2c)){const _0x2bbb2e=a142_0x2f14e8,_0x5eda05=_0x1b8e2c[_0x2bbb2e(0x14d)](_0x2bbb2e(0x129))[_0x2bbb2e(0x126)]()||_0x2bbb2e(0x14e)+Date[_0x2bbb2e(0x138)]();if(_0x5eda05['length']>0x64)throw CliErrors[_0x2bbb2e(0x148)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x47c3c0=_0x1b8e2c[_0x2bbb2e(0x132)]('parent-menu-id',NaN),_0x31d9f0=!Number[_0x2bbb2e(0x13e)](_0x47c3c0);if(_0x31d9f0&&(!Number[_0x2bbb2e(0x142)](_0x47c3c0)||_0x47c3c0<=0x0))throw CliErrors[_0x2bbb2e(0x148)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x1b8e2c[_0x2bbb2e(0x128)],'pageName':_0x5eda05,..._0x31d9f0?{'parentMenuId':_0x47c3c0}:{},'createMenu':!![],'files':_0x3f27cb===null?parseCustomPageContent(_0x1b8e2c[_0x2bbb2e(0x14d)]('page-content')):buildInitialFiles(_0x5eda05,_0x2f6c27)};}function buildMutationData(_0x58fb1a,_0x562015){const _0x556175=a142_0x2f14e8,{input:_0x3a693c}=_0x58fb1a,_0x2a0e97=_0x562015&&buildCustomPageDevelopmentUrl(_0x3a693c[_0x556175(0x128)],_0x562015['menuPath']),_0x509b6d=_0x562015&&buildCustomPageEditUrl(_0x3a693c['appCode'],_0x562015[_0x556175(0x12d)]);return{'operation':_0x556175(0x124),'pageType':_0x556175(0x153),'pagePattern':_0x58fb1a[_0x556175(0x150)],'selector':{'appCode':_0x3a693c['appCode'],'pageName':_0x3a693c[_0x556175(0x12c)]},'before':null,'after':{'pageId':_0x562015?.[_0x556175(0x12d)]??null,'pageName':_0x562015?.[_0x556175(0x12c)]??_0x3a693c['pageName'],'appCode':_0x562015?.['appCode']??_0x3a693c[_0x556175(0x128)],'version':_0x562015?.[_0x556175(0x13d)]??null,'menuId':_0x562015?.['menuId']??null,'menuPath':_0x562015?.[_0x556175(0x141)]??null,'files':_0x562015?.[_0x556175(0x123)]??Object[_0x556175(0x12b)](_0x3a693c[_0x556175(0x123)])},'dryRun':_0x562015===undefined,'request':_0x3a693c,..._0x2a0e97?{'pageUrl':_0x2a0e97}:{},..._0x509b6d?{'editPageUrl':_0x509b6d}:{},'warnings':[..._0x58fb1a[_0x556175(0x157)],..._0x562015&&!_0x2a0e97?['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']:[]]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x335bb7=a143_0x4748;function a143_0x3c1d(){const _0x26ccd1=['str','495FjzQmx','161232gjaiWP','custom-detail','page','130376tiyCEn','compress','getTime','appCode','getDate','number','Custom\x20Page\x20ID','trim','getFullYear','978369GqVwoy','84ddImGi','isNaN','getMinutes','join','cookie','getMonth','8622243yEEXQn','80170sQPRII','720988kPqazj','padStart','pageCode','Retrieved\x20Custom\x20Page\x20','getHours','32VhGibg','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','756105uYVfet','appcode','1aJIIwA','getSeconds'];a143_0x3c1d=function(){return _0x26ccd1;};return a143_0x3c1d();}(function(_0x573594,_0x324690){const _0x735e14=a143_0x4748,_0x4c3ab3=_0x573594();while(!![]){try{const _0x312e0e=parseInt(_0x735e14(0xc5))/0x1*(parseInt(_0x735e14(0xbc))/0x2)+parseInt(_0x735e14(0xd6))/0x3*(parseInt(_0x735e14(0xcc))/0x4)+parseInt(_0x735e14(0xc3))/0x5+-parseInt(_0x735e14(0xc9))/0x6+-parseInt(_0x735e14(0xd5))/0x7*(-parseInt(_0x735e14(0xc1))/0x8)+-parseInt(_0x735e14(0xdc))/0x9+parseInt(_0x735e14(0xdd))/0xa*(-parseInt(_0x735e14(0xc8))/0xb);if(_0x312e0e===_0x324690)break;else _0x4c3ab3['push'](_0x4c3ab3['shift']());}catch(_0x4b8c9a){_0x4c3ab3['push'](_0x4c3ab3['shift']());}}}(a143_0x3c1d,0x9bb37));import{getCustomPageSource}from'../../../core/api-client.js';function a143_0x4748(_0x55b8e8,_0x4ff4c4){_0x55b8e8=_0x55b8e8-0xbc;const _0x3c1d0c=a143_0x3c1d();let _0x4748f6=_0x3c1d0c[_0x55b8e8];return _0x4748f6;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a143_0x335bb7(0xcb),'command':a143_0x335bb7(0xca),'description':a143_0x335bb7(0xc2),'risk':'read','defaultOutputFormat':a143_0x335bb7(0xcd),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a143_0x335bb7(0xd1),'required':!![],'description':a143_0x335bb7(0xd2)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x36b218){readCustomPageId(_0x36b218);},async 'execute'(_0x3d9e87){const _0x29cf01=a143_0x335bb7,_0x452cfe=readCustomPageId(_0x3d9e87),_0xe79c8f=await getCustomPageSource(_0x452cfe),{bundle:_0x201d2d,createTime:_0x495a1e,updateTime:_0x38511e,..._0x3e2093}=_0xe79c8f,_0x4f5262=_0xe79c8f['id']??_0x452cfe,_0x4924be=_0xe79c8f[_0x29cf01(0xcf)]?.[_0x29cf01(0xd3)]()||_0x3d9e87[_0x29cf01(0xc7)](_0x29cf01(0xc4))['trim'](),_0xf50646=buildCustomPageRuntimeUrl(_0x4924be,_0xe79c8f[_0x29cf01(0xbe)]),_0x2f9899=buildCustomPageEditUrl(_0x4924be,_0x4f5262),_0x5257ff=await resolveCustomPageDevelopmentUrl(_0x4924be,_0x4f5262,_0x3d9e87[_0x29cf01(0xda)]);return{'ok':!![],'data':{..._0x3e2093,..._0xf50646?{'runtimePageUrl':_0xf50646}:{},..._0x5257ff?{'pageUrl':_0x5257ff}:{},..._0x2f9899?{'editPageUrl':_0x2f9899}:{},..._0x495a1e==null?{}:{'createTime':formatTime(_0x495a1e)},..._0x38511e==null?{}:{'updateTime':formatTime(_0x38511e)}},'message':_0x29cf01(0xbf)+_0x452cfe+'.'};}};function formatTime(_0x2a8b38){const _0x43c410=a143_0x335bb7,_0x3a9b4d=new Date(_0x2a8b38);if(Number[_0x43c410(0xd7)](_0x3a9b4d[_0x43c410(0xce)]()))return String(_0x2a8b38);const _0x1ee6e5=[_0x3a9b4d[_0x43c410(0xd4)](),String(_0x3a9b4d[_0x43c410(0xdb)]()+0x1)[_0x43c410(0xbd)](0x2,'0'),String(_0x3a9b4d[_0x43c410(0xd0)]())[_0x43c410(0xbd)](0x2,'0')][_0x43c410(0xd9)]('-'),_0x24c8f6=[String(_0x3a9b4d[_0x43c410(0xc0)]())['padStart'](0x2,'0'),String(_0x3a9b4d[_0x43c410(0xd8)]())[_0x43c410(0xbd)](0x2,'0'),String(_0x3a9b4d[_0x43c410(0xc6)]())[_0x43c410(0xbd)](0x2,'0')]['join'](':');return _0x1ee6e5+'\x20'+_0x24c8f6;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a144_0x3d1e(_0x286afd,_0x9005f9){_0x286afd=_0x286afd-0x159;const _0x3cd558=a144_0x3cd5();let _0x3d1e03=_0x3cd558[_0x286afd];return _0x3d1e03;}const a144_0x186a91=a144_0x3d1e;(function(_0x5cb87d,_0x719fa5){const _0x4712f9=a144_0x3d1e,_0x13d4fe=_0x5cb87d();while(!![]){try{const _0x2a9320=-parseInt(_0x4712f9(0x167))/0x1+parseInt(_0x4712f9(0x15a))/0x2*(-parseInt(_0x4712f9(0x165))/0x3)+parseInt(_0x4712f9(0x166))/0x4+-parseInt(_0x4712f9(0x164))/0x5+parseInt(_0x4712f9(0x162))/0x6+-parseInt(_0x4712f9(0x169))/0x7+parseInt(_0x4712f9(0x15e))/0x8;if(_0x2a9320===_0x719fa5)break;else _0x13d4fe['push'](_0x13d4fe['shift']());}catch(_0x23d38e){_0x13d4fe['push'](_0x13d4fe['shift']());}}}(a144_0x3cd5,0x2c0ab));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':'page','command':a144_0x186a91(0x15f),'description':a144_0x186a91(0x163),'risk':'read','defaultOutputFormat':a144_0x186a91(0x160),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x316f27){const _0x44a31c=a144_0x186a91,_0x4d53f3=(await fetchMenuSnapshot(_0x316f27['appCode'],_0x316f27[_0x44a31c(0x15d)]))[_0x44a31c(0x15c)]['flatMap'](_0x24213a=>{const _0x445cb0=_0x44a31c;if(_0x24213a[_0x445cb0(0x15b)]!=='react'||_0x24213a[_0x445cb0(0x159)]==null)return[];const _0x5293f7=buildCustomPageDevelopmentUrl(_0x316f27['appCode'],_0x24213a[_0x445cb0(0x16a)]),_0x2f33ca=buildCustomPageEditUrl(_0x316f27['appCode'],_0x24213a[_0x445cb0(0x159)]);return[{'pageId':_0x24213a[_0x445cb0(0x159)],'label':_0x24213a['label'],..._0x5293f7?{'pageUrl':_0x5293f7}:{},..._0x2f33ca?{'editPageUrl':_0x2f33ca}:{}}];});return{'ok':!![],'data':{'pages':_0x4d53f3},'message':_0x4d53f3['length']===0x0?_0x44a31c(0x161):'Found\x20'+_0x4d53f3[_0x44a31c(0x168)]+'\x20Custom\x20Page(s).'};}};function a144_0x3cd5(){const _0x42e636=['custom-list','compress','No\x20Custom\x20Pages\x20found.','4794ffykbm','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','769640FHGdve','2463NRJHyh','857524NGtGPS','235034yBupKZ','length','1204140SzsDTJ','path','pageId','340eQkzmZ','type','menus','cookie','5326136okPXXq'];a144_0x3cd5=function(){return _0x42e636;};return a144_0x3cd5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a145_0x4d92ff=a145_0x27c2;(function(_0x4c1ea6,_0x2982e9){const _0x1f5db3=a145_0x27c2,_0x5004f1=_0x4c1ea6();while(!![]){try{const _0x43f0d0=-parseInt(_0x1f5db3(0x17d))/0x1+parseInt(_0x1f5db3(0x18c))/0x2+-parseInt(_0x1f5db3(0x189))/0x3+parseInt(_0x1f5db3(0x194))/0x4*(-parseInt(_0x1f5db3(0x17e))/0x5)+-parseInt(_0x1f5db3(0x185))/0x6*(-parseInt(_0x1f5db3(0x190))/0x7)+parseInt(_0x1f5db3(0x18e))/0x8+parseInt(_0x1f5db3(0x197))/0x9;if(_0x43f0d0===_0x2982e9)break;else _0x5004f1['push'](_0x5004f1['shift']());}catch(_0x3eb891){_0x5004f1['push'](_0x5004f1['shift']());}}}(a145_0x1466,0xa2cb9));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a145_0x4d92ff(0x18b),'command':a145_0x4d92ff(0x19b),'description':a145_0x4d92ff(0x17c),'risk':'write','defaultOutputFormat':a145_0x4d92ff(0x195),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a145_0x4d92ff(0x180)},{'name':a145_0x4d92ff(0x17a),'type':a145_0x4d92ff(0x192),'description':'Optional\x20publish\x20remark'}],async 'validate'(_0x22bbc9){readCustomPageId(_0x22bbc9);},async 'dryRun'(_0x50ada3){const _0x2d2fc5=a145_0x4d92ff,_0x451d29=readInput(_0x50ada3);return{'method':_0x2d2fc5(0x18d),'url':'/smartapi/webcode/file/publish','body':{'id':_0x451d29['pageId'],..._0x451d29[_0x2d2fc5(0x17a)]?{'remark':_0x451d29['remark']}:{}},'description':_0x2d2fc5(0x19c)+_0x451d29['pageId']+'.'};},async 'execute'(_0x278085){const _0x1e9649=a145_0x4d92ff,_0x53e877=readInput(_0x278085);await getCustomPageSource(_0x53e877['pageId']);const _0x186ee7=await publishCustomPage(_0x53e877);if(!Number[_0x1e9649(0x182)](_0x186ee7)||_0x186ee7!==_0x53e877['pageId'])throw CliErrors[_0x1e9649(0x188)]('Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.');const _0x5ac06e=await getCustomPageSource(_0x53e877[_0x1e9649(0x184)]);if(_0x5ac06e['status']!=='FORMAL')throw CliErrors[_0x1e9649(0x188)](_0x1e9649(0x198)+(_0x5ac06e[_0x1e9649(0x17f)]??'unknown')+'.');const _0x30e737=_0x5ac06e[_0x1e9649(0x181)]?.['trim'](),_0xa57327=buildCustomPageEditUrl(_0x30e737,_0x53e877['pageId']),_0x23f49f=await resolveCustomPageDevelopmentUrl(_0x30e737,_0x53e877[_0x1e9649(0x184)],_0x278085[_0x1e9649(0x183)]),_0x31152d=buildMutationData(_0x53e877,!![],_0x23f49f,_0xa57327);_0x30e737&&!_0x23f49f&&_0x31152d[_0x1e9649(0x19a)][_0x1e9649(0x17b)](_0x1e9649(0x179));const _0x47957d=buildCustomPageRuntimeUrl(_0x5ac06e['appCode'],_0x5ac06e[_0x1e9649(0x196)]);return _0x47957d?_0x31152d[_0x1e9649(0x18a)]=_0x47957d:_0x31152d['warnings'][_0x1e9649(0x17b)](_0x1e9649(0x187)),{'ok':!![],'data':_0x31152d,'message':_0x1e9649(0x199)+_0x53e877[_0x1e9649(0x184)]+'.'};}};function readInput(_0x152ed3){const _0x2b50f7=a145_0x4d92ff,_0x125f89=readCustomPageId(_0x152ed3),_0x4e9e59=_0x152ed3[_0x2b50f7(0x18f)]('remark')[_0x2b50f7(0x186)]();return{'pageId':_0x125f89,..._0x4e9e59?{'remark':_0x4e9e59}:{}};}function a145_0x27c2(_0x195e01,_0x32d568){_0x195e01=_0x195e01-0x179;const _0x146659=a145_0x1466();let _0x27c2f9=_0x146659[_0x195e01];return _0x27c2f9;}function a145_0x1466(){const _0x3bcbda=['Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','apiError','3700182nudUQA','runtimePageUrl','page','1019804FNVATH','POST','10327832wkOKvS','str','7hYHzAQ','page.custom-publish','string','FORMAL','2583516StufME','compress','pageCode','12150819SBGvkq','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','Published\x20Custom\x20Page\x20','warnings','custom-publish','Would\x20publish\x20Custom\x20Page\x20','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','remark','push','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','157618rxaeRd','10LShLnd','status','Custom\x20Page\x20ID','appCode','isInteger','cookie','pageId','1191642LlrCWR','trim'];a145_0x1466=function(){return _0x3bcbda;};return a145_0x1466();}function buildMutationData(_0xea4813,_0x31ab9d=![],_0x4b0a5b,_0xed2fe1){const _0x346f90=a145_0x4d92ff;return{'operation':_0x346f90(0x191),'selector':{'pageId':_0xea4813[_0x346f90(0x184)]},'before':null,'after':{'pageId':_0xea4813[_0x346f90(0x184)],'status':_0x346f90(0x193)},'dryRun':!_0x31ab9d,'request':_0xea4813,..._0x4b0a5b?{'pageUrl':_0x4b0a5b}:{},..._0xed2fe1?{'editPageUrl':_0xed2fe1}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0x2235f5=a146_0x1044;(function(_0x2f9852,_0x522d0b){const _0x346269=a146_0x1044,_0x3481a5=_0x2f9852();while(!![]){try{const _0x38eacc=parseInt(_0x346269(0x15c))/0x1+-parseInt(_0x346269(0x146))/0x2*(parseInt(_0x346269(0x145))/0x3)+-parseInt(_0x346269(0x15f))/0x4*(parseInt(_0x346269(0x15e))/0x5)+parseInt(_0x346269(0x14b))/0x6+parseInt(_0x346269(0x14d))/0x7+parseInt(_0x346269(0x151))/0x8+-parseInt(_0x346269(0x154))/0x9*(-parseInt(_0x346269(0x152))/0xa);if(_0x38eacc===_0x522d0b)break;else _0x3481a5['push'](_0x3481a5['shift']());}catch(_0x281ff0){_0x3481a5['push'](_0x3481a5['shift']());}}}(a146_0x2a92,0xbc256));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';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a146_0x2235f5(0x14a)};function a146_0x1044(_0x4172be,_0x2baba4){_0x4172be=_0x4172be-0x144;const _0x2a92b9=a146_0x2a92();let _0x1044da=_0x2a92b9[_0x4172be];return _0x1044da;}function trimOptional(_0x85d03a){const _0x77b423=a146_0x2235f5;return _0x85d03a?.[_0x77b423(0x160)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x473cae,_0x3cbdf4){const _0x27b167=trimOptional(_0x473cae),_0x4ebf75=trimOptional(_0x3cbdf4);if(!_0x27b167||!_0x4ebf75)return undefined;return getPublishedAppDomain(_0x27b167)+'/'+encodeURIComponent(_0x4ebf75);}function a146_0x2a92(){const _0x3fcbfc=['flagMissing','string','179364JHSRtc','28IOUGuY','map','isArray','page-content','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','5021052BhZNkr','file','720776xEBKCn','some','values','pageId','2875624wRMZOv','1770RVNlbg','validation','52497ZwLyVv','object','parse','react','find','--id\x20must\x20be\x20a\x20positive\x20integer.','length','/ide/','729469xfmdZq','isInteger','3725TVVVUK','7804ldNRTt','trim'];a146_0x2a92=function(){return _0x3fcbfc;};return a146_0x2a92();}export function buildCustomPageDevelopmentUrl(_0x49117c,_0x4eb8a2){const _0x550eb9=trimOptional(_0x49117c),_0x52aea5=trimOptional(_0x4eb8a2);if(!_0x550eb9||!_0x52aea5)return undefined;return getAppBaseUrl(_0x550eb9)+'/pages/'+encodeURIComponent(_0x52aea5);}export async function resolveCustomPageDevelopmentUrl(_0x48e2b1,_0x499d7b,_0xe049dc){const _0x320aff=a146_0x2235f5,_0x3ffb66=trimOptional(_0x48e2b1);if(!_0x3ffb66)return undefined;try{const _0x53520c=(await fetchMenuSnapshot(_0x3ffb66,_0xe049dc))['menus'][_0x320aff(0x158)](_0x4a9ed6=>_0x4a9ed6['type']===_0x320aff(0x157)&&_0x4a9ed6[_0x320aff(0x150)]===_0x499d7b);return buildCustomPageDevelopmentUrl(_0x3ffb66,_0x53520c?.['path']);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x5ee0a2,_0xcfe25c){const _0x2172f1=a146_0x2235f5,_0x21aff5=trimOptional(_0x5ee0a2);if(!_0x21aff5)return;const _0xcfdc37=trimOptional(_0xcfe25c==null?undefined:String(_0xcfe25c));if(!_0xcfdc37)return;return getAppBaseUrl(_0x21aff5)+_0x2172f1(0x15b)+encodeURIComponent(_0xcfdc37);}export function parseCustomPageContent(_0x5d2604){const _0x50b2fb=a146_0x2235f5;if(!_0x5d2604[_0x50b2fb(0x160)]())throw CliErrors[_0x50b2fb(0x161)](_0x50b2fb(0x149));let _0x144629;try{_0x144629=JSON[_0x50b2fb(0x156)](_0x5d2604);}catch{throw CliErrors[_0x50b2fb(0x153)]('--page-content\x20must\x20be\x20valid\x20JSON.');}if(typeof _0x144629!==_0x50b2fb(0x155)||_0x144629===null||Array[_0x50b2fb(0x148)](_0x144629)||Object[_0x50b2fb(0x14f)](_0x144629)[_0x50b2fb(0x14e)](_0x32634b=>typeof _0x32634b!==_0x50b2fb(0x144)))throw CliErrors['validation']('--page-content\x20must\x20be\x20a\x20JSON\x20object\x20whose\x20values\x20are\x20file\x20content\x20strings.');return _0x144629;}export async function validateCustomPageContent(_0x673fb5){const _0x5b9cc9=a146_0x2235f5,_0x3706a4=await validateCustomPageSourceFiles(_0x673fb5);if(_0x3706a4[_0x5b9cc9(0x15a)]>0x0)throw CliErrors[_0x5b9cc9(0x153)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x3706a4[_0x5b9cc9(0x147)](_0x2a474e=>_0x2a474e[_0x5b9cc9(0x14c)]+':\x20'+_0x2a474e['message'])['join'](';\x20'));}export function readCustomPageId(_0x299ee4){const _0x5677e6=a146_0x2235f5,_0xaf9aff=_0x299ee4['num']('id');if(!Number[_0x5677e6(0x15d)](_0xaf9aff)||_0xaf9aff<=0x0)throw CliErrors[_0x5677e6(0x153)](_0x5677e6(0x159));return _0xaf9aff;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a147_0x5633c1=a147_0x4ba0;(function(_0x1a63e3,_0x2503e3){const _0x5008fb=a147_0x4ba0,_0x4513f8=_0x1a63e3();while(!![]){try{const _0x3ba9aa=parseInt(_0x5008fb(0x1ec))/0x1+parseInt(_0x5008fb(0x1db))/0x2+-parseInt(_0x5008fb(0x1f0))/0x3*(-parseInt(_0x5008fb(0x1e2))/0x4)+parseInt(_0x5008fb(0x1ef))/0x5+parseInt(_0x5008fb(0x1d8))/0x6*(parseInt(_0x5008fb(0x1f1))/0x7)+parseInt(_0x5008fb(0x1e4))/0x8*(-parseInt(_0x5008fb(0x1df))/0x9)+-parseInt(_0x5008fb(0x1e3))/0xa*(parseInt(_0x5008fb(0x1dd))/0xb);if(_0x3ba9aa===_0x2503e3)break;else _0x4513f8['push'](_0x4513f8['shift']());}catch(_0x4df4cd){_0x4513f8['push'](_0x4513f8['shift']());}}}(a147_0xd297,0x80b9f));import{format}from'prettier';const SOURCE_PARSERS={'.js':a147_0x5633c1(0x1ed),'.jsx':a147_0x5633c1(0x1ed),'.ts':a147_0x5633c1(0x1d9),'.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=[a147_0x5633c1(0x1e1),a147_0x5633c1(0x1da)];function a147_0x4ba0(_0x448793,_0x277e1b){_0x448793=_0x448793-0x1d8;const _0xd297c5=a147_0xd297();let _0x4ba0ce=_0xd297c5[_0x448793];return _0x4ba0ce;}export async function validateCustomPageSourceFiles(_0x232a01){const _0x55cf8f=a147_0x5633c1,_0x38be07=Object[_0x55cf8f(0x1e6)](_0x232a01)[_0x55cf8f(0x1de)](([_0x428d92])=>getParser(_0x428d92));if(!_0x38be07[_0x55cf8f(0x1e8)](([_0x3f98d1])=>isReactSourceFile(_0x3f98d1)))return[{'file':_0x55cf8f(0x1e7),'message':_0x55cf8f(0x1eb)}];const _0x35283b=await Promise['all'](_0x38be07[_0x55cf8f(0x1ee)](async([_0x3bf0ab,_0x455d06])=>{const _0x4b8142=_0x55cf8f;try{return await format(_0x455d06,{'parser':getParser(_0x3bf0ab)}),undefined;}catch(_0x453053){return{'file':_0x3bf0ab,'message':_0x453053 instanceof Error?_0x453053[_0x4b8142(0x1e0)]:String(_0x453053)};}}));return _0x35283b[_0x55cf8f(0x1de)](_0x1f657b=>_0x1f657b!==undefined);}function getParser(_0x31ea81){const _0x14c490=a147_0x5633c1,_0x5d7bff=_0x31ea81[_0x14c490(0x1ea)]()[_0x14c490(0x1e5)]();return Object[_0x14c490(0x1e6)](SOURCE_PARSERS)[_0x14c490(0x1e9)](([_0x35dd1f])=>_0x5d7bff[_0x14c490(0x1dc)](_0x35dd1f))?.[0x1];}function isReactSourceFile(_0x171b7b){const _0x1e94ef=a147_0x5633c1,_0xebd4f6=_0x171b7b['trim']()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS[_0x1e94ef(0x1e8)](_0x22ac72=>_0xebd4f6[_0x1e94ef(0x1dc)](_0x22ac72));}function a147_0xd297(){const _0x442bd9=['toLowerCase','entries','page-content','some','find','trim','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','406450QrPAOZ','babel','map','3873985RsLSrt','38217oslOjw','1602237gretGy','6QLNnLK','typescript','.tsx','455498iSZGVt','endsWith','686708Kafbcj','filter','369pXUkeS','message','.jsx','68xsSzFj','180wqCcfY','39704fzOGoD'];a147_0xd297=function(){return _0x442bd9;};return a147_0xd297();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37fc27,_0x4ca79a){const _0x5a3326=a148_0x474b,_0xa63934=_0x37fc27();while(!![]){try{const _0x50ecfd=-parseInt(_0x5a3326(0xd4))/0x1*(-parseInt(_0x5a3326(0xc7))/0x2)+-parseInt(_0x5a3326(0xd3))/0x3+parseInt(_0x5a3326(0xbe))/0x4*(parseInt(_0x5a3326(0xd1))/0x5)+-parseInt(_0x5a3326(0xbf))/0x6*(parseInt(_0x5a3326(0xcd))/0x7)+parseInt(_0x5a3326(0xc8))/0x8+parseInt(_0x5a3326(0xc5))/0x9+parseInt(_0x5a3326(0xbd))/0xa*(-parseInt(_0x5a3326(0xc1))/0xb);if(_0x50ecfd===_0x4ca79a)break;else _0xa63934['push'](_0xa63934['shift']());}catch(_0x916041){_0xa63934['push'](_0xa63934['shift']());}}}(a148_0x2998,0xb0cdf));function a148_0x474b(_0x27f265,_0x1f1877){_0x27f265=_0x27f265-0xbd;const _0x299839=a148_0x2998();let _0x474b4c=_0x299839[_0x27f265];return _0x474b4c;}function buildIndexFile(_0x287697){const _0x3ac16f=a148_0x474b;return'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}>{'+JSON['stringify'](_0x287697)+_0x3ac16f(0xc0);}function buildStyleFile(){return'.page-container\x20{\x0a\x20\x20padding:\x2024px;\x0a\x20\x20background:\x20#f0f2f5;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a';}function buildLocalesFile(_0x2727cd){const _0x154a7f=a148_0x474b,_0x16d386=_0x2727cd[_0x154a7f(0xd0)](_0x52d779=>{const _0x4bd70a=_0x154a7f;let _0x1d0d75='';switch(_0x52d779){case'zh-CN':_0x1d0d75=_0x4bd70a(0xc4);break;case _0x4bd70a(0xca):_0x1d0d75=_0x4bd70a(0xc3);break;case _0x4bd70a(0xc6):_0x1d0d75='これは基本ページテンプレートです。あなたは、これに基づいて開発できます。';break;case'tr-TR':_0x1d0d75=_0x4bd70a(0xcf);break;case _0x4bd70a(0xc2):_0x1d0d75=_0x4bd70a(0xcc);break;default:_0x1d0d75='This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.';}return'\x20\x20'+JSON[_0x4bd70a(0xc9)](_0x52d779)+':\x20{\x0a\x20\x20\x20\x20'+JSON[_0x4bd70a(0xc9)]('pageDescription')+':\x20'+JSON[_0x4bd70a(0xc9)](_0x1d0d75)+_0x4bd70a(0xd5);})[_0x154a7f(0xce)](',\x0a');return _0x154a7f(0xd2)+_0x16d386+_0x154a7f(0xcb);}export function buildInitialFiles(_0x44ea0f,_0x43fdc1){return{'src/app/index.jsx':buildIndexFile(_0x44ea0f),'src/app/index.css':buildStyleFile(),'src/locales/index.js':buildLocalesFile(_0x43fdc1)};}function a148_0x2998(){const _0x165aad=['Bu\x20bir\x20temel\x20sayfa\x20şablonudur.\x20Bu\x20temaplana\x20dayanarak\x20geliştirilebilir.','map','1819385ugNqMz','export\x20const\x20locales\x20=\x20{\x0a','4024968Rttumd','439EYZryZ',',\x0a\x20\x20}','50ZKIetW','12KfaHnx','178632rvHhli','}</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','1081443RZzZpL','id-ID','This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.','这是一个基础页面模板,你可以在此基础上进行开发。','8788590huIDSD','ja-JP','1098hPeUBy','2224256gzcMrt','stringify','en-US','\x0a};\x0a','Ini\x20adalah\x20sebuah\x20halaman\x20dasar.\x20Anda\x20dapat\x20mengembangkan\x20ini.','7aOVDCF','join'];a148_0x2998=function(){return _0x165aad;};return a148_0x2998();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a149_0x359ef1=a149_0x33fb;(function(_0x291dbf,_0x2a5468){const _0x145d1e=a149_0x33fb,_0x2838ee=_0x291dbf();while(!![]){try{const _0x159f45=parseInt(_0x145d1e(0xe3))/0x1*(-parseInt(_0x145d1e(0xf6))/0x2)+parseInt(_0x145d1e(0xe0))/0x3*(-parseInt(_0x145d1e(0x102))/0x4)+parseInt(_0x145d1e(0xf1))/0x5+parseInt(_0x145d1e(0xe9))/0x6*(parseInt(_0x145d1e(0xec))/0x7)+-parseInt(_0x145d1e(0xe1))/0x8*(-parseInt(_0x145d1e(0xf9))/0x9)+-parseInt(_0x145d1e(0xf4))/0xa+-parseInt(_0x145d1e(0xf5))/0xb;if(_0x159f45===_0x2a5468)break;else _0x2838ee['push'](_0x2838ee['shift']());}catch(_0x16f1e7){_0x2838ee['push'](_0x2838ee['shift']());}}}(a149_0x5fd4,0x5a2b3));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';function a149_0x5fd4(){const _0x2aa880=['3487660tsAZeR','page-content','custom-update','76430FoxyEa','4153886ejBiMf','1078NQhloP','POST','write','9756HjYldR','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','compress','Complete\x20page\x20files\x20as\x20JSON','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','appCode','number','appcode','4ZVzNkq','/smartapi/webcode/page/update/content','1538325Jvshvw','1816UQusru','page','543bGSTaW','page.custom-update','trim','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','Updated\x20Custom\x20Page\x20','newVersion','924678ztDsyS','pageContent','cookie','28GnzTCq','apiError','Custom\x20Page\x20ID','pageId','str'];a149_0x5fd4=function(){return _0x2aa880;};return a149_0x5fd4();}import{CliErrors}from'../../../errors.js';function a149_0x33fb(_0x582154,_0xdb0b0a){_0x582154=_0x582154-0xdf;const _0x5fd41e=a149_0x5fd4();let _0x33fbb4=_0x5fd41e[_0x582154];return _0x33fbb4;}import{buildCustomPageEditUrl,parseCustomPageContent,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a149_0x359ef1(0xe2),'command':a149_0x359ef1(0xf3),'description':a149_0x359ef1(0xe6),'risk':a149_0x359ef1(0xf8),'defaultOutputFormat':a149_0x359ef1(0xfc),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a149_0x359ef1(0x100),'required':!![],'description':a149_0x359ef1(0xee)},{'name':'page-content','type':'string','required':!![],'description':a149_0x359ef1(0xfd)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5b08be){const _0x42e99b=a149_0x359ef1;readCustomPageId(_0x5b08be),await validateCustomPageContent(parseCustomPageContent(_0x5b08be['str'](_0x42e99b(0xf2))));},async 'dryRun'(_0xed6d25){const _0x53604d=a149_0x359ef1,_0x22e9f9=await readInput(_0xed6d25);return{'method':_0x53604d(0xf7),'url':_0x53604d(0xdf),'body':{'id':_0x22e9f9[_0x53604d(0xef)],'codeContent':_0x22e9f9[_0x53604d(0xea)]},'description':_0x53604d(0xfa)+_0x22e9f9['pageId']+'.'};},async 'execute'(_0x4e6471){const _0x10ac64=a149_0x359ef1,_0xa1acf4=await readInput(_0x4e6471),_0x3c28e3=await updateCustomPageContent({'pageId':_0xa1acf4[_0x10ac64(0xef)],'pageContent':_0xa1acf4[_0x10ac64(0xea)]});if(!Number['isInteger'](_0x3c28e3['newVersion'])||_0x3c28e3[_0x10ac64(0xe8)]<=0x0)throw CliErrors[_0x10ac64(0xed)](_0x10ac64(0xfb));const _0x27cad1=buildCustomPageEditUrl(_0xa1acf4[_0x10ac64(0xff)],_0xa1acf4['pageId']),_0x24f33c=await resolveCustomPageDevelopmentUrl(_0xa1acf4[_0x10ac64(0xff)],_0xa1acf4[_0x10ac64(0xef)],_0x4e6471[_0x10ac64(0xeb)]);return{'ok':!![],'data':buildMutationData(_0xa1acf4,_0x3c28e3,_0x24f33c,_0x27cad1,_0x24f33c?[]:['Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']),'message':_0x10ac64(0xe7)+_0xa1acf4[_0x10ac64(0xef)]+'.'};}};async function readInput(_0xb5bd5e){const _0x5db569=a149_0x359ef1,_0x515507=readCustomPageId(_0xb5bd5e),_0x237666=_0xb5bd5e[_0x5db569(0xf0)](_0x5db569(0x101))[_0x5db569(0xe5)]()||(await getCustomPageSource(_0x515507))[_0x5db569(0xff)]?.['trim']();if(!_0x237666)throw CliErrors['validation'](_0x5db569(0xfe)+_0x515507+'.');return{'appCode':_0x237666,'pageId':_0x515507,'pageContent':parseCustomPageContent(_0xb5bd5e[_0x5db569(0xf0)]('page-content'))};}function buildMutationData(_0x14ff93,_0x1b11b9,_0x2fe369,_0x348bb8,_0x8835b0=[]){const _0x580f6c=a149_0x359ef1;return{'operation':_0x580f6c(0xe4),'selector':{'appCode':_0x14ff93[_0x580f6c(0xff)],'pageId':_0x14ff93[_0x580f6c(0xef)]},'before':null,'after':{'pageId':_0x1b11b9?.[_0x580f6c(0xef)]??_0x14ff93[_0x580f6c(0xef)],'version':_0x1b11b9?.[_0x580f6c(0xe8)]??null,'pageContent':_0x14ff93[_0x580f6c(0xea)]},'dryRun':_0x1b11b9===undefined,'request':_0x14ff93,..._0x2fe369?{'pageUrl':_0x2fe369}:{},..._0x348bb8?{'editPageUrl':_0x348bb8}:{},'warnings':_0x8835b0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a150_0x2eb6(_0x9e8ef9,_0x2eacfc){_0x9e8ef9=_0x9e8ef9-0xe5;const _0x46afe5=a150_0x46af();let _0x2eb679=_0x46afe5[_0x9e8ef9];return _0x2eb679;}const a150_0x53d6e7=a150_0x2eb6;function a150_0x46af(){const _0x33ab78=['2136PbYtVR','3152058kNgnxx','1372776VuPwGU','name','relatedPages','manualResolutionRequired','nextAction','1132200HdPfJk','compress','page','code','data-list-status','4908oneGub','read','637327WYRXGY','397092GarDpw','string','status','query-data-list-status','/smartapi/lovrabet/dataset/','/standard-page-status?appCode=','3765IdBGCI','2808CztbTi','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','related-pages-fallback','appCode','length','GET'];a150_0x46af=function(){return _0x33ab78;};return a150_0x46af();}(function(_0x4e3e94,_0x3d0652){const _0x549a2f=a150_0x2eb6,_0x3e240a=_0x4e3e94();while(!![]){try{const _0x5d7cfc=-parseInt(_0x549a2f(0xfb))/0x1+parseInt(_0x549a2f(0xf4))/0x2+-parseInt(_0x549a2f(0xef))/0x3+-parseInt(_0x549a2f(0xfc))/0x4+-parseInt(_0x549a2f(0xe6))/0x5*(-parseInt(_0x549a2f(0xf9))/0x6)+parseInt(_0x549a2f(0xee))/0x7+-parseInt(_0x549a2f(0xed))/0x8*(parseInt(_0x549a2f(0xe7))/0x9);if(_0x5d7cfc===_0x3d0652)break;else _0x3e240a['push'](_0x3e240a['shift']());}catch(_0x3cf809){_0x3e240a['push'](_0x3e240a['shift']());}}}(a150_0x46af,0x56a24));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a150_0x53d6e7(0xf6),'command':a150_0x53d6e7(0xf8),'description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a150_0x53d6e7(0xfa),'defaultOutputFormat':a150_0x53d6e7(0xf5),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a150_0x53d6e7(0xfd),'description':a150_0x53d6e7(0xe8)}],async 'validate'(_0x3ce2f7){validateDatasetSelector(_0x3ce2f7);},async 'dryRun'(_0x503716){const _0x4875e3=a150_0x53d6e7,_0x4d19ec=await loadDatasetDetailForPage(_0x503716);return{'method':_0x4875e3(0xec),'url':_0x4875e3(0x100)+_0x4d19ec['code']+_0x4875e3(0xe5)+encodeURIComponent(_0x503716[_0x4875e3(0xea)]),'description':serializeDryRunDescription({'dataset':{'id':_0x4d19ec['id'],'code':_0x4d19ec['code'],'name':_0x4d19ec[_0x4875e3(0xf0)]},'action':_0x4875e3(0xff)})};},async 'execute'(_0x30d24e){const _0x4e6fdc=a150_0x53d6e7,_0xe1723b=await loadDatasetDetailForPage(_0x30d24e),_0x13584a=await loadDataListPageStatusForGenerate(_0x30d24e,_0xe1723b['code']),_0x3e74ec=getUndeletedRelatedPages(_0xe1723b),_0x50c9a1=assessDataListPageState(_0xe1723b[_0x4e6fdc(0xf7)],_0x13584a,{'fallbackUndeletedPages':_0x3e74ec});return{'ok':!![],'data':{'datasetCode':_0xe1723b[_0x4e6fdc(0xf7)],'precheckSource':_0x13584a?.['source']??_0x4e6fdc(0xe9),'status':_0x50c9a1[_0x4e6fdc(0xfe)],'manualResolutionRequired':_0x50c9a1[_0x4e6fdc(0xf2)],'nextAction':_0x50c9a1[_0x4e6fdc(0xf3)],'dataListPageStatus':_0x13584a,'relatedPages':{'total':_0xe1723b[_0x4e6fdc(0xf1)]['length'],'undeletedCount':_0x3e74ec[_0x4e6fdc(0xeb)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x20dc43=a151_0x2c09;function a151_0x2c09(_0x5a8e45,_0x4b47ed){_0x5a8e45=_0x5a8e45-0x67;const _0x588ced=a151_0x588c();let _0x2c0905=_0x588ced[_0x5a8e45];return _0x2c0905;}(function(_0x5a7e60,_0x1d9430){const _0x1b5395=a151_0x2c09,_0x3da4e1=_0x5a7e60();while(!![]){try{const _0x18043c=parseInt(_0x1b5395(0x95))/0x1+parseInt(_0x1b5395(0x6b))/0x2+-parseInt(_0x1b5395(0x71))/0x3*(-parseInt(_0x1b5395(0x6e))/0x4)+-parseInt(_0x1b5395(0x7a))/0x5+-parseInt(_0x1b5395(0x80))/0x6*(-parseInt(_0x1b5395(0x73))/0x7)+parseInt(_0x1b5395(0x76))/0x8*(-parseInt(_0x1b5395(0x7e))/0x9)+-parseInt(_0x1b5395(0x89))/0xa;if(_0x18043c===_0x1d9430)break;else _0x3da4e1['push'](_0x3da4e1['shift']());}catch(_0x2ab009){_0x3da4e1['push'](_0x3da4e1['shift']());}}}(a151_0x588c,0xbd28f));function a151_0x588c(){const _0x56ae0d=['DATA_LIST','132652jGFLig','operationId','dataListPageStatus','30lWjHem','apply','6398PbpPQi','appCode','related-pages-fallback','16cDziFV','page-pattern','taskId','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','1398020DhIekQ','alias','reused','number','2194713vDQlNz','code','8886YeFOxa','string','dataset','status','/generate-standard-pages/start','manualResolutionRequired','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','precheck','SUCCESS','20000070anOOdM','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','currentStep','name','fieldCount','page','page-type','message','clientOperationId','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','nextAction','source','1249980YTXWaR','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','CRUD_PAGE_SET','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','boolean','progressRate','1213760HQFXrW','generate-start'];a151_0x588c=function(){return _0x56ae0d;};return a151_0x588c();}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':a151_0x20dc43(0x8e),'command':a151_0x20dc43(0x6c),'description':a151_0x20dc43(0x92),'risk':'write','defaultOutputFormat':'compress','rejectedFlags':[{'name':a151_0x20dc43(0x8f),'message':a151_0x20dc43(0x68),'hint':a151_0x20dc43(0x86)},{'name':a151_0x20dc43(0x77),'message':a151_0x20dc43(0x96),'hint':'DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.'}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a151_0x20dc43(0x7b),'type':a151_0x20dc43(0x81),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':'apply','type':a151_0x20dc43(0x69),'description':a151_0x20dc43(0x79)}],async 'validate'(_0x1e78c5){validateDatasetSelector(_0x1e78c5);},async 'dryRun'(_0x204cae){const _0x50777a=a151_0x20dc43,_0x4ad21b=await prepare(_0x204cae);return{'method':'POST','url':'/smartapi/lovrabet/dataset/'+_0x4ad21b['dataset'][_0x50777a(0x7f)]+_0x50777a(0x84),'body':{'appCode':_0x204cae[_0x50777a(0x74)],'clientOperationId':_0x4ad21b[_0x50777a(0x91)]},'description':serializeDryRunDescription({'dataset':{'id':_0x4ad21b[_0x50777a(0x82)]['id'],'code':_0x4ad21b['dataset'][_0x50777a(0x7f)],'name':_0x4ad21b['dataset'][_0x50777a(0x8c)],'fieldCount':_0x4ad21b['dataset'][_0x50777a(0x8d)]},'precheckSource':_0x4ad21b[_0x50777a(0x70)]?.[_0x50777a(0x94)]??_0x50777a(0x75),'action':_0x50777a(0x6c),'clientOperationId':_0x4ad21b[_0x50777a(0x91)],'plannedStatus':_0x4ad21b[_0x50777a(0x87)][_0x50777a(0x83)],'reason':_0x4ad21b['precheck'][_0x50777a(0x90)]})};},async 'execute'(_0x148c8f){const _0x5e1702=a151_0x20dc43;if(!_0x148c8f['bool'](_0x5e1702(0x72))){const _0x44789f=await pageGenerateStart['dryRun'](_0x148c8f);return{'ok':!![],'message':_0x5e1702(0x8a),'data':_0x44789f};}const _0x2338e6=await prepare(_0x148c8f);if(!_0x2338e6[_0x5e1702(0x87)]['allowGenerate'])return{'ok':![],'message':_0x2338e6[_0x5e1702(0x87)][_0x5e1702(0x90)],'data':{'datasetCode':_0x2338e6[_0x5e1702(0x82)][_0x5e1702(0x7f)],'pageType':'DATA_LIST','pagePattern':_0x5e1702(0x67),'clientOperationId':_0x2338e6[_0x5e1702(0x91)],'precheckSource':_0x2338e6['dataListPageStatus']?.['source']??_0x5e1702(0x75),'status':_0x2338e6[_0x5e1702(0x87)][_0x5e1702(0x83)],'manualResolutionRequired':_0x2338e6[_0x5e1702(0x87)][_0x5e1702(0x85)],'nextAction':_0x2338e6[_0x5e1702(0x87)][_0x5e1702(0x93)],'query':{'command':buildDataListPageStatusQueryCommand(_0x2338e6[_0x5e1702(0x82)]['code'],_0x148c8f[_0x5e1702(0x74)])},'dataListPageStatus':_0x2338e6[_0x5e1702(0x70)]}};const _0x2384eb=await startGenerateDataListPages(_0x148c8f[_0x5e1702(0x74)],_0x2338e6[_0x5e1702(0x82)]['code'],{'clientOperationId':_0x2338e6['clientOperationId']}),_0x128dbd=_0x2384eb[_0x5e1702(0x83)]===_0x5e1702(0x88)||_0x2384eb[_0x5e1702(0x83)]==='PARTIAL_SUCCESS'?await loadDataListPageStatusForGenerate(_0x148c8f,_0x2338e6[_0x5e1702(0x82)][_0x5e1702(0x7f)]):null,_0x53f4cf=assessGenerateOperationState(_0x2338e6[_0x5e1702(0x82)][_0x5e1702(0x7f)],_0x2384eb[_0x5e1702(0x83)],_0x128dbd);return{'ok':!![],'message':_0x2384eb[_0x5e1702(0x7c)]?'Reusing\x20an\x20existing\x20generate\x20task':'Submitted\x20a\x20generate\x20task','data':{'datasetCode':_0x2338e6[_0x5e1702(0x82)][_0x5e1702(0x7f)],'appCode':_0x148c8f[_0x5e1702(0x74)],'pageType':_0x5e1702(0x6d),'pagePattern':_0x5e1702(0x67),'taskId':_0x2384eb[_0x5e1702(0x78)]??null,'operationId':_0x2384eb[_0x5e1702(0x6f)]??null,'clientOperationId':_0x2338e6[_0x5e1702(0x91)],'jobStatus':_0x2384eb[_0x5e1702(0x83)]??null,'progressRate':typeof _0x2384eb[_0x5e1702(0x6a)]===_0x5e1702(0x7d)?_0x2384eb[_0x5e1702(0x6a)]:null,'currentStep':_0x2384eb[_0x5e1702(0x8b)]??null,'reused':_0x2384eb[_0x5e1702(0x7c)]===!![],'status':_0x53f4cf[_0x5e1702(0x83)],'manualResolutionRequired':_0x53f4cf[_0x5e1702(0x85)],'nextAction':_0x53f4cf[_0x5e1702(0x93)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x2338e6[_0x5e1702(0x82)][_0x5e1702(0x7f)],{'appCode':_0x148c8f['appCode'],'taskId':_0x2384eb[_0x5e1702(0x78)],'operationId':_0x2384eb[_0x5e1702(0x6f)],'clientOperationId':_0x2338e6[_0x5e1702(0x91)]})},'dataListPageStatus':_0x128dbd}};}};async function prepare(_0x3fcae2){const _0x342fe4=a151_0x20dc43,_0x523a45=await loadDatasetDetailForPage(_0x3fcae2),_0x5c638b=await loadDataListPageStatusForGenerate(_0x3fcae2,_0x523a45[_0x342fe4(0x7f)]),_0xa0e5a8=getUndeletedRelatedPages(_0x523a45);return{'dataset':_0x523a45,'dataListPageStatus':_0x5c638b,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x523a45[_0x342fe4(0x7f)],_0x5c638b,{'fallbackUndeletedPages':_0xa0e5a8})};}
|