@lovrabet/rabetbase-cli 2.5.4-beta.2 → 2.5.4-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/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.d.ts +2 -0
- package/lib/commands/user-account/feishu-bind.js +1 -0
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +3 -2
- package/skills/rabetbase/references/rabetbase-user-account.md +20 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a181_0x4756dc=a181_0x293b;(function(_0x218807,_0x104cbe){const _0x26d292=a181_0x293b,_0x4b2825=_0x218807();while(!![]){try{const _0x5afc13=parseInt(_0x26d292(0x16a))/0x1+parseInt(_0x26d292(0x186))/0x2+-parseInt(_0x26d292(0x151))/0x3*(parseInt(_0x26d292(0x156))/0x4)+parseInt(_0x26d292(0x194))/0x5*(-parseInt(_0x26d292(0x1a2))/0x6)+parseInt(_0x26d292(0x15e))/0x7*(parseInt(_0x26d292(0x17f))/0x8)+parseInt(_0x26d292(0x164))/0x9*(parseInt(_0x26d292(0x17c))/0xa)+parseInt(_0x26d292(0x183))/0xb;if(_0x5afc13===_0x104cbe)break;else _0x4b2825['push'](_0x4b2825['shift']());}catch(_0x573558){_0x4b2825['push'](_0x4b2825['shift']());}}}(a181_0x2802,0x83b4a));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a181_0x4756dc(0x19c),a181_0x4756dc(0x142),a181_0x4756dc(0x182),'WECOM',a181_0x4756dc(0x150)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;function a181_0x2802(){const _0x82310=['\x22channelType\x22.','320HLYzxC','messageTemplate','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','configName','call','push','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_channel_field_forbidden','16681DwaedI','\x22configName\x22.','\x20failed.','Application-level\x20notification\x20config\x20ID','\x22\x20must\x20be\x20','\x20must\x20be\x20an\x20object.','9LJHUsC','isSafeInteger','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','readTimeout','isArray','\x20has\x20an\x20invalid\x20appCode.','181548piWBMJ','a\x20supported\x20string','notification_config_response_invalid','parse','yes','\x20has\x20an\x20invalid\x20id.','configCode','_unavailable','validation','Create\x20JSON\x20requires\x20field\x20','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','replyTo','a\x20string\x20or\x20null','stringify','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','channelType','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','mutation','9626850BOJTkH','update','Notification\x20config\x20','152mwWCYV','appCode','<redacted>','DINGTALK','1714240EtJrEi','a\x20non-empty\x20string','name','1763244JLvVYS','every','includes','channelConfigRaw','notification_config_source_unavailable','Notification\x20JSON\x20channelConfig\x20field\x20\x22','endpointUrl','emailTargets','preflight','num','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20field\x20\x22','hasOwnProperty','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','87070orkwCg','\x22\x20must\x20be\x20a\x20non-empty\x20string.','endpointUrl:null','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','join','channelConfig','str','file','EMAIL','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Item\x20','file\x20','utf8','prototype','354iisPWd','\x20has\x20an\x20invalid\x20channelType.','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_field_invalid','has','Allowed\x20values:\x20','\x20is\x20invalid.','\x20characters.','string','\x20--format\x20compress','createTime','Unknown\x20notification\x20JSON\x20field\x20\x22','setEncoding','trim','updateTime','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','path','notification_config_confirmation_required','apiError','channelCode','create','env','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','description','FEISHU','\x20--type\x20','a\x20JSON\x20object\x20or\x20null','stdin','bool','notification_config_json_invalid','endpointUrlRaw','Notification\x20JSON\x20from\x20','kind','\x20has\x20invalid\x20field\x20\x22','type','failed','connectTimeout','keys','WEBHOOK','24753rBPSri','bccList','a\x20JSON\x20object','length'];a181_0x2802=function(){return _0x82310;};return a181_0x2802();}export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x4756dc(0x159),a181_0x4756dc(0x179),'endpointUrl',a181_0x4756dc(0x199),a181_0x4756dc(0x141),'connectTimeout',a181_0x4756dc(0x167)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a181_0x4756dc(0x170),a181_0x4756dc(0x1b8)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x4756dc(0x18d),'recipients','ccList',a181_0x4756dc(0x152),a181_0x4756dc(0x175),'subjectPrefix','fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a181_0x4756dc(0x19b),'type':a181_0x4756dc(0x1ab),'required':![],'description':a181_0x4756dc(0x197)},{'name':a181_0x4756dc(0x145),'type':'boolean','required':![],'default':![],'description':a181_0x4756dc(0x17a)},{'name':'from-env','type':a181_0x4756dc(0x1ab),'required':![],'description':a181_0x4756dc(0x1bb)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a181_0x4756dc(0x161)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x40a013,_0x1d5e72,_0x5abbdb){return new CliError(_0x40a013,0x1,_0x1d5e72,_0x5abbdb);}export function readNotificationId(_0x491d18){const _0x2e53de=a181_0x4756dc,_0x1bf133=_0x491d18[_0x2e53de(0x18f)]('id');if(!Number[_0x2e53de(0x165)](_0x1bf133)||_0x1bf133<=0x0)throw notificationError('notification_config_id_invalid',_0x2e53de(0x190));return _0x1bf133;}export function requireNotificationExplicitYes(_0x49f367){const _0xe02806=a181_0x4756dc;if(_0x49f367['bool']('dry-run')||_0x49f367[_0xe02806(0x146)](_0xe02806(0x16e)))return;throw notificationError(_0xe02806(0x1b6),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x2693b1,_0x118138=a181_0x4756dc(0x14c),_0x240ea7=a181_0x4756dc(0x19c)){const _0x3f965a=a181_0x4756dc,_0x1b487e=_0x2693b1[_0x3f965a(0x19a)](_0x118138)[_0x3f965a(0x1b0)]()||_0x240ea7;if(!NOTIFICATION_CHANNEL_TYPES[_0x3f965a(0x188)](_0x1b487e))throw CliErrors['validation']('Invalid\x20--'+_0x118138+':\x20'+_0x1b487e,_0x3f965a(0x1a8)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1b487e;}export function assertSingleNotificationSource(_0x4cb9b4){const _0x5791d4=a181_0x4756dc,_0x161ed8=[],_0xd701bb=_0x4cb9b4[_0x5791d4(0x19a)]('file')[_0x5791d4(0x1b0)]();if(_0xd701bb)_0x161ed8[_0x5791d4(0x15b)]({'kind':_0x5791d4(0x19b),'path':_0xd701bb});if(_0x4cb9b4[_0x5791d4(0x146)](_0x5791d4(0x145)))_0x161ed8[_0x5791d4(0x15b)]({'kind':_0x5791d4(0x145)});const _0x13abfb=_0x4cb9b4[_0x5791d4(0x19a)]('from-env')[_0x5791d4(0x1b0)]();if(_0x13abfb)_0x161ed8['push']({'kind':'env','name':_0x13abfb});if(_0x161ed8['length']===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x5791d4(0x158));if(_0x161ed8[_0x5791d4(0x154)]>0x1)throw CliErrors[_0x5791d4(0x172)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x5791d4(0x158));return _0x161ed8[0x0];}export async function readNotificationDocument(_0xca6865,_0x38ddf8){const _0x3e2666=a181_0x4756dc,_0x4e62c9=assertSingleNotificationSource(_0xca6865),_0x2f5e85=_0x4e62c9[_0x3e2666(0x14a)]===_0x3e2666(0x19b)?_0x3e2666(0x19f)+_0x4e62c9[_0x3e2666(0x1b5)]:_0x4e62c9['kind']===_0x3e2666(0x1ba)?'environment\x20variable\x20'+_0x4e62c9['name']:_0x3e2666(0x145);let _0x23855a;try{if(_0x4e62c9[_0x3e2666(0x14a)]===_0x3e2666(0x19b))_0x23855a=await readFile(_0x4e62c9[_0x3e2666(0x1b5)],_0x3e2666(0x1a0));else{if(_0x4e62c9['kind']==='env'){if(!(_0x4e62c9[_0x3e2666(0x185)]in process.env))throw notificationError(_0x3e2666(0x18a),_0x3e2666(0x1a5)+_0x4e62c9[_0x3e2666(0x185)]);_0x23855a=process.env[_0x4e62c9.name]??'';}else _0x23855a=await readStdin();}}catch(_0x3b7229){if(_0x3b7229 instanceof CliError)throw _0x3b7229;throw notificationError(_0x3e2666(0x18a),_0x3e2666(0x174)+_0x2f5e85+'.');}let _0x37ee64;try{_0x37ee64=JSON[_0x3e2666(0x16d)](_0x23855a);}catch{throw notificationError('notification_config_json_invalid',_0x3e2666(0x149)+_0x2f5e85+_0x3e2666(0x1a9),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x37ee64))throw notificationError(_0x3e2666(0x147),_0x3e2666(0x149)+_0x2f5e85+_0x3e2666(0x163));return validateNotificationDocument(_0x37ee64,_0x38ddf8);}export function projectNotificationListConfig(_0x5e7c82,_0x258110){const _0x193994=a181_0x4756dc;return{'id':typeof _0x5e7c82['id']==='number'?_0x5e7c82['id']:null,'configCode':requireResponseString(_0x5e7c82[_0x193994(0x170)],_0x193994(0x170),_0x258110),'configName':requireResponseString(_0x5e7c82['configName'],_0x193994(0x159),_0x258110),'channelType':requireResponseString(_0x5e7c82[_0x193994(0x179)],_0x193994(0x179),_0x258110),'description':normalizeNullableString(_0x5e7c82['description']),'createTime':normalizeNullableString(_0x5e7c82[_0x193994(0x1ad)]),'updateTime':normalizeNullableString(_0x5e7c82[_0x193994(0x1b1)])};}export function normalizeExactNotificationConfig(_0x227439,_0x5ea9e8,_0x4e2dd7){const _0x4f1b87=a181_0x4756dc;if(!Number[_0x4f1b87(0x165)](_0x227439['id'])||_0x227439['id']!==_0x5ea9e8)throw notificationError('notification_config_response_invalid',_0x4f1b87(0x166)+_0x5ea9e8+'.');if(_0x227439[_0x4f1b87(0x180)]!==_0x4e2dd7)throw notificationError(_0x4f1b87(0x16c),'Notification\x20config\x20'+_0x5ea9e8+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x5a32c5=requireExactString(_0x227439['configName'],_0x4f1b87(0x159),_0x5ea9e8),_0x3cf6ca=requireExactString(_0x227439['configCode'],'configCode',_0x5ea9e8),_0x4aea23=requireExactString(_0x227439[_0x4f1b87(0x179)],_0x4f1b87(0x179),_0x5ea9e8);if(!NOTIFICATION_CHANNEL_TYPES[_0x4f1b87(0x188)](_0x4aea23))throw notificationError(_0x4f1b87(0x16c),_0x4f1b87(0x17e)+_0x5ea9e8+'\x20has\x20an\x20unsupported\x20channelType.');const _0x503c12=responseNullableString(_0x227439[_0x4f1b87(0x18c)],_0x4f1b87(0x18c),_0x5ea9e8),_0x507746=responseNullableString(_0x227439[_0x4f1b87(0x199)],_0x4f1b87(0x199),_0x5ea9e8),_0x414fc7=responseNullableString(_0x227439[_0x4f1b87(0x141)],_0x4f1b87(0x141),_0x5ea9e8),_0x2377ac=responseNullableTimeout(_0x227439[_0x4f1b87(0x14e)],_0x4f1b87(0x14e),_0x5ea9e8),_0x5b206a=responseNullableTimeout(_0x227439[_0x4f1b87(0x167)],_0x4f1b87(0x167),_0x5ea9e8);return{'id':_0x5ea9e8,'appCode':_0x4e2dd7,'configCode':_0x3cf6ca,'configName':_0x5a32c5,'channelType':_0x4aea23,'endpointUrl':redactSensitive(_0x503c12),'channelConfig':redactSensitive(_0x507746),'description':_0x414fc7,'connectTimeout':_0x2377ac,'readTimeout':_0x5b206a,'endpointUrlRaw':_0x503c12,'channelConfigRaw':_0x507746};}export async function requireExactNotificationConfig(_0x1c10fa,_0x994f64,_0x28d3c9){const _0x4e8ce4=a181_0x4756dc;let _0x2aa920;try{_0x2aa920=await getNotificationChannelConfig(_0x994f64,_0x1c10fa);}catch{throw safeApiFailure(_0x28d3c9,_0x4e8ce4(0x18e),_0x4e8ce4(0x19d)+_0x1c10fa+_0x4e8ce4(0x1b4));}return normalizeExactNotificationConfig(_0x2aa920,_0x994f64,_0x1c10fa);}export function projectNotificationConfig(_0x49c680){const _0x2a791f=a181_0x4756dc;return{'id':_0x49c680['id']??null,'appCode':_0x49c680[_0x2a791f(0x180)],'configCode':_0x49c680['configCode']??null,'configName':_0x49c680[_0x2a791f(0x159)],'channelType':_0x49c680[_0x2a791f(0x179)],'endpointUrl':redactSensitive(_0x49c680[_0x2a791f(0x18c)]),'channelConfig':redactSensitive(_0x49c680[_0x2a791f(0x199)]),'description':_0x49c680[_0x2a791f(0x141)]??null,'connectTimeout':_0x49c680[_0x2a791f(0x14e)]??null,'readTimeout':_0x49c680['readTimeout']??null};}export function notificationSelector(_0x57cecf){const _0x1f6d41=a181_0x4756dc;return{'appCode':_0x57cecf[_0x1f6d41(0x180)],'id':_0x57cecf['id'],'configCode':_0x57cecf[_0x1f6d41(0x170)],'configName':_0x57cecf[_0x1f6d41(0x159)],'channelType':_0x57cecf[_0x1f6d41(0x179)]};}export function createMutationInput(_0x30e1dc,_0x52d088){const _0x340c4e=a181_0x4756dc;return{'appCode':_0x30e1dc,'configName':_0x52d088[_0x340c4e(0x159)],'channelType':_0x52d088['channelType'],...hasOwn(_0x52d088,_0x340c4e(0x18c))?{'endpointUrl':_0x52d088['endpointUrl']}:{},...hasOwn(_0x52d088,_0x340c4e(0x199))?{'channelConfig':serializeChannelConfig(_0x52d088[_0x340c4e(0x199)])}:{},...hasOwn(_0x52d088,_0x340c4e(0x141))?{'description':_0x52d088[_0x340c4e(0x141)]}:{},...hasOwn(_0x52d088,'connectTimeout')?{'connectTimeout':_0x52d088[_0x340c4e(0x14e)]}:{},...hasOwn(_0x52d088,_0x340c4e(0x167))?{'readTimeout':_0x52d088[_0x340c4e(0x167)]}:{}};}export function mergeUpdateInput(_0x1e0230,_0x651850){const _0x1c4d71=a181_0x4756dc;return{'id':_0x1e0230['id'],'appCode':_0x1e0230[_0x1c4d71(0x180)],'configName':_0x651850[_0x1c4d71(0x159)]??_0x1e0230[_0x1c4d71(0x159)],'channelType':_0x651850[_0x1c4d71(0x179)]??_0x1e0230[_0x1c4d71(0x179)],'endpointUrl':hasOwn(_0x651850,_0x1c4d71(0x18c))?_0x651850[_0x1c4d71(0x18c)]:_0x1e0230[_0x1c4d71(0x148)],'channelConfig':hasOwn(_0x651850,_0x1c4d71(0x199))?serializeChannelConfig(_0x651850[_0x1c4d71(0x199)]):_0x1e0230[_0x1c4d71(0x189)],'description':hasOwn(_0x651850,_0x1c4d71(0x141))?_0x651850[_0x1c4d71(0x141)]:_0x1e0230[_0x1c4d71(0x141)],'connectTimeout':hasOwn(_0x651850,_0x1c4d71(0x14e))?_0x651850[_0x1c4d71(0x14e)]:_0x1e0230['connectTimeout'],'readTimeout':hasOwn(_0x651850,_0x1c4d71(0x167))?_0x651850[_0x1c4d71(0x167)]:_0x1e0230[_0x1c4d71(0x167)]};}function a181_0x293b(_0x441f48,_0x378457){_0x441f48=_0x441f48-0x141;const _0x2802f3=a181_0x2802();let _0x293bae=_0x2802f3[_0x441f48];return _0x293bae;}export function plannedUpdateProjection(_0x2fff5b,_0x58fe2b){const _0x5e07ef=a181_0x4756dc;return projectNotificationConfig({'id':_0x2fff5b['id'],'appCode':_0x2fff5b[_0x5e07ef(0x180)],'configCode':_0x2fff5b[_0x5e07ef(0x170)],'configName':_0x58fe2b[_0x5e07ef(0x159)]??_0x2fff5b[_0x5e07ef(0x159)],'channelType':_0x58fe2b[_0x5e07ef(0x179)]??_0x2fff5b[_0x5e07ef(0x179)],'endpointUrl':hasOwn(_0x58fe2b,'endpointUrl')?_0x58fe2b[_0x5e07ef(0x18c)]:_0x2fff5b['endpointUrlRaw'],'channelConfig':hasOwn(_0x58fe2b,_0x5e07ef(0x199))?_0x58fe2b[_0x5e07ef(0x199)]:_0x2fff5b[_0x5e07ef(0x189)],'description':hasOwn(_0x58fe2b,_0x5e07ef(0x141))?_0x58fe2b[_0x5e07ef(0x141)]:_0x2fff5b[_0x5e07ef(0x141)],'connectTimeout':hasOwn(_0x58fe2b,_0x5e07ef(0x14e))?_0x58fe2b[_0x5e07ef(0x14e)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2fff5b[_0x5e07ef(0x14e)],'readTimeout':hasOwn(_0x58fe2b,_0x5e07ef(0x167))?_0x58fe2b[_0x5e07ef(0x167)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2fff5b['readTimeout']});}export function requestedSafeFieldsMatch(_0x5c931f,_0x52aec9,_0x1a0321){const _0x342d04=a181_0x4756dc,_0x73d00=[],_0x2b281a=[],_0x50d74c=[];for(const _0x2f319f of[_0x342d04(0x159),_0x342d04(0x179),_0x342d04(0x141)]){if(!hasOwn(_0x1a0321,_0x2f319f))continue;_0x50d74c[_0x342d04(0x15b)](_0x2f319f),_0x73d00[_0x342d04(0x15b)](_0x52aec9[_0x2f319f]===_0x1a0321[_0x2f319f]),_0x2b281a[_0x342d04(0x15b)](_0x5c931f[_0x2f319f]!==_0x1a0321[_0x2f319f]&&_0x52aec9[_0x2f319f]===_0x1a0321[_0x2f319f]);}for(const _0xfa5cc1 of['connectTimeout',_0x342d04(0x167)]){if(!hasOwn(_0x1a0321,_0xfa5cc1))continue;const _0x1f99ef=_0x1a0321[_0xfa5cc1]??(_0xfa5cc1===_0x342d04(0x14e)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x50d74c[_0x342d04(0x15b)](_0xfa5cc1),_0x73d00[_0x342d04(0x15b)](_0x52aec9[_0xfa5cc1]===_0x1f99ef),_0x2b281a['push'](_0x5c931f[_0xfa5cc1]!==_0x1f99ef&&_0x52aec9[_0xfa5cc1]===_0x1f99ef);}return hasOwn(_0x1a0321,_0x342d04(0x18c))&&_0x1a0321[_0x342d04(0x18c)]===null&&(_0x50d74c[_0x342d04(0x15b)](_0x342d04(0x196)),_0x73d00[_0x342d04(0x15b)](_0x52aec9[_0x342d04(0x148)]===null||_0x52aec9[_0x342d04(0x148)]===''),_0x2b281a[_0x342d04(0x15b)](_0x5c931f[_0x342d04(0x148)]!==null&&_0x5c931f[_0x342d04(0x148)]!==''&&(_0x52aec9[_0x342d04(0x148)]===null||_0x52aec9[_0x342d04(0x148)]===''))),{'allMatch':_0x73d00[_0x342d04(0x187)](Boolean),'provesChange':_0x2b281a['some'](Boolean),'verifiedFields':_0x50d74c};}export function validateNotificationDeleteReadback(_0x21ad30,_0x153c02,_0x4be26f){const _0x32c742=a181_0x4756dc;for(const [_0x3ea404,_0x1d76ff]of _0x21ad30['entries']()){if(!Number['isSafeInteger'](_0x1d76ff['id'])||_0x1d76ff['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x3ea404+0x1)+_0x32c742(0x16f));if(_0x1d76ff[_0x32c742(0x180)]!==_0x153c02)throw notificationError(_0x32c742(0x16c),_0x32c742(0x1a4)+(_0x3ea404+0x1)+_0x32c742(0x169));if(_0x1d76ff[_0x32c742(0x179)]!==_0x4be26f)throw notificationError(_0x32c742(0x16c),_0x32c742(0x1a4)+(_0x3ea404+0x1)+_0x32c742(0x1a3));}}export function safeApiFailure(_0x1dbd5a,_0x2d654f,_0x3e78fe){const _0x5418a5=a181_0x4756dc;return notificationError('notification_config_'+_0x1dbd5a+'_'+(_0x2d654f===_0x5418a5(0x17b)?_0x5418a5(0x14d):_0x2d654f+_0x5418a5(0x171)),_0x5418a5(0x17e)+_0x1dbd5a+'\x20'+_0x2d654f+_0x5418a5(0x160),_0x3e78fe);}export function notificationLookupCommand(_0x4d3506,_0x2b93ac){const _0x54091b=a181_0x4756dc;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x4d3506+_0x54091b(0x143)+_0x2b93ac+_0x54091b(0x1ac);}function validateNotificationDocument(_0x113162,_0x27d063){const _0x305e50=a181_0x4756dc;for(const _0x2223b7 of Object[_0x305e50(0x14f)](_0x113162)){if(FORBIDDEN_IDENTITY_FIELDS[_0x305e50(0x1a7)](_0x2223b7))throw notificationError('notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22'+_0x2223b7+_0x305e50(0x1b2));if(!ALLOWED_INPUT_FIELDS['has'](_0x2223b7))throw notificationError('notification_config_field_unknown',_0x305e50(0x1ae)+_0x2223b7+'\x22.');}if(_0x27d063==='update'&&Object[_0x305e50(0x14f)](_0x113162)[_0x305e50(0x154)]===0x0)throw notificationError('notification_config_update_empty',_0x305e50(0x178));const _0x5adc={};if(hasOwn(_0x113162,_0x305e50(0x159)))_0x5adc['configName']=validateRequiredString(_0x113162[_0x305e50(0x159)],'configName',0x80);else{if(_0x27d063===_0x305e50(0x1b9))throw notificationError('notification_config_field_required',_0x305e50(0x173)+_0x305e50(0x15f));}if(hasOwn(_0x113162,_0x305e50(0x179))){if(typeof _0x113162[_0x305e50(0x179)]!=='string')throw invalidFieldType('channelType',_0x305e50(0x16b));const _0x2a7b0e=_0x113162[_0x305e50(0x179)][_0x305e50(0x1b0)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x305e50(0x188)](_0x2a7b0e))throw notificationError(_0x305e50(0x1a6),_0x305e50(0x193),_0x305e50(0x1a8)+NOTIFICATION_CHANNEL_TYPES[_0x305e50(0x198)](',\x20')+'.');_0x5adc[_0x305e50(0x179)]=_0x2a7b0e;}else{if(_0x27d063==='create')throw notificationError('notification_config_field_required',_0x305e50(0x173)+_0x305e50(0x155));}for(const [_0x29594a,_0x52de97]of[[_0x305e50(0x18c),0x200],[_0x305e50(0x141),0x100]]){if(!hasOwn(_0x113162,_0x29594a))continue;const _0x5a6f4f=_0x113162[_0x29594a];if(_0x5a6f4f!==null&&typeof _0x5a6f4f!=='string')throw invalidFieldType(_0x29594a,_0x305e50(0x176));if(typeof _0x5a6f4f===_0x305e50(0x1ab)&&_0x5a6f4f[_0x305e50(0x154)]>_0x52de97)throw notificationError(_0x305e50(0x1a6),_0x305e50(0x191)+_0x29594a+'\x22\x20cannot\x20exceed\x20'+_0x52de97+_0x305e50(0x1aa));_0x5adc[_0x29594a]=_0x5a6f4f;}if(hasOwn(_0x113162,_0x305e50(0x199))){const _0x27b527=_0x113162[_0x305e50(0x199)];if(_0x27b527===null&&_0x27d063===_0x305e50(0x1b9))throw invalidFieldType('channelConfig',_0x305e50(0x153));if(_0x27b527!==null&&!isJsonObject(_0x27b527))throw invalidFieldType(_0x305e50(0x199),_0x27d063===_0x305e50(0x17d)?_0x305e50(0x144):_0x305e50(0x153));_0x27b527!==null&&validateChannelConfigFields(_0x5adc['channelType'],_0x27b527),_0x5adc[_0x305e50(0x199)]=_0x27b527;}for(const _0x149e15 of[_0x305e50(0x14e),_0x305e50(0x167)]){if(!hasOwn(_0x113162,_0x149e15))continue;const _0x5f2c73=_0x113162[_0x149e15];if(_0x5f2c73!==null&&(!Number['isSafeInteger'](_0x5f2c73)||_0x5f2c73<0x0))throw notificationError(_0x305e50(0x1a6),_0x305e50(0x191)+_0x149e15+_0x305e50(0x1b3));_0x5adc[_0x149e15]=_0x5f2c73;}return _0x5adc;}function validateRequiredString(_0x5a9834,_0x597bdd,_0x5c11db){const _0x422937=a181_0x4756dc;if(typeof _0x5a9834!==_0x422937(0x1ab))throw invalidFieldType(_0x597bdd,_0x422937(0x184));const _0x582834=_0x5a9834[_0x422937(0x1b0)]();if(!_0x582834)throw notificationError(_0x422937(0x1a6),_0x422937(0x191)+_0x597bdd+_0x422937(0x195));if(_0x582834[_0x422937(0x154)]>_0x5c11db)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x597bdd+'\x22\x20cannot\x20exceed\x20'+_0x5c11db+_0x422937(0x1aa));return _0x582834;}function validateChannelConfigFields(_0x5e9eea,_0x4b583e){const _0x59b003=a181_0x4756dc;if(hasOwn(_0x4b583e,_0x59b003(0x157)))throw forbiddenChannelConfigField(_0x59b003(0x157));if(_0x5e9eea===_0x59b003(0x19c))for(const _0x3af0a0 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4b583e,_0x3af0a0))throw forbiddenChannelConfigField(_0x3af0a0);}}function forbiddenChannelConfigField(_0x4a4371){const _0x3aa51b=a181_0x4756dc;return notificationError(_0x3aa51b(0x15d),_0x3aa51b(0x18b)+_0x4a4371+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x57b5da,_0x335dcf){const _0x4b65ab=a181_0x4756dc;return notificationError(_0x4b65ab(0x1a6),_0x4b65ab(0x191)+_0x57b5da+_0x4b65ab(0x162)+_0x335dcf+'.');}function serializeChannelConfig(_0x5093c5){const _0x1ba9e0=a181_0x4756dc;return _0x5093c5===null||_0x5093c5===undefined?null:JSON[_0x1ba9e0(0x177)](_0x5093c5);}function redactSensitive(_0x53804b){const _0x3df55c=a181_0x4756dc;return _0x53804b===null||_0x53804b===undefined||_0x53804b===''?null:_0x3df55c(0x181);}function requireResponseString(_0x1e3446,_0x187b32,_0x2b198c){const _0x37755a=a181_0x4756dc;if(typeof _0x1e3446!=='string'||_0x1e3446['trim']()==='')throw CliErrors[_0x37755a(0x1b7)]('Invalid\x20notification\x20config\x20response.',_0x37755a(0x19e)+(_0x2b198c+0x1)+_0x37755a(0x15c)+_0x187b32+'\x22.');return _0x1e3446['trim']();}function requireExactString(_0x3bf8a6,_0x30190c,_0x599210){const _0x36f088=a181_0x4756dc;if(typeof _0x3bf8a6!==_0x36f088(0x1ab)||_0x3bf8a6[_0x36f088(0x1b0)]()==='')throw notificationError(_0x36f088(0x16c),_0x36f088(0x17e)+_0x599210+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x30190c+'\x22.');return _0x3bf8a6[_0x36f088(0x1b0)]();}function responseNullableString(_0x4f59e2,_0x39e493,_0x55fe3c){const _0x3d641f=a181_0x4756dc;if(_0x4f59e2===undefined||_0x4f59e2===null)return null;if(typeof _0x4f59e2!==_0x3d641f(0x1ab))throw notificationError(_0x3d641f(0x16c),_0x3d641f(0x17e)+_0x55fe3c+_0x3d641f(0x14b)+_0x39e493+'\x22.');return _0x4f59e2;}function responseNullableTimeout(_0x58e849,_0x561986,_0x4341e0){const _0x53bff8=a181_0x4756dc;if(_0x58e849===undefined||_0x58e849===null)return null;if(!Number['isSafeInteger'](_0x58e849)||_0x58e849<0x0)throw notificationError(_0x53bff8(0x16c),_0x53bff8(0x17e)+_0x4341e0+_0x53bff8(0x14b)+_0x561986+'\x22.');return _0x58e849;}function normalizeNullableString(_0x19c8c5){const _0x85958c=a181_0x4756dc;return typeof _0x19c8c5===_0x85958c(0x1ab)?_0x19c8c5:null;}function isJsonObject(_0xeafb7a){const _0x961894=a181_0x4756dc;return _0xeafb7a!==null&&typeof _0xeafb7a==='object'&&!Array[_0x961894(0x168)](_0xeafb7a);}function hasOwn(_0x4a6e36,_0x6a76c){const _0x4106bc=a181_0x4756dc;return Object[_0x4106bc(0x1a1)][_0x4106bc(0x192)][_0x4106bc(0x15a)](_0x4a6e36,_0x6a76c);}async function readStdin(){const _0x287e58=a181_0x4756dc;let _0x52cac3='';process[_0x287e58(0x145)][_0x287e58(0x1af)](_0x287e58(0x1a0));for await(const _0x2d645b of process[_0x287e58(0x145)])_0x52cac3+=_0x2d645b;return _0x52cac3;}
|
|
1
|
+
const a181_0x1fbea3=a181_0x5936;(function(_0x3c3bcb,_0x92c4e5){const _0x1faa46=a181_0x5936,_0x2ea2b7=_0x3c3bcb();while(!![]){try{const _0x17f871=-parseInt(_0x1faa46(0x89))/0x1*(-parseInt(_0x1faa46(0xa6))/0x2)+parseInt(_0x1faa46(0xe8))/0x3+parseInt(_0x1faa46(0xe9))/0x4+-parseInt(_0x1faa46(0xb4))/0x5+-parseInt(_0x1faa46(0x9c))/0x6*(-parseInt(_0x1faa46(0xb8))/0x7)+parseInt(_0x1faa46(0xed))/0x8*(parseInt(_0x1faa46(0xbf))/0x9)+parseInt(_0x1faa46(0xe7))/0xa*(-parseInt(_0x1faa46(0x85))/0xb);if(_0x17f871===_0x92c4e5)break;else _0x2ea2b7['push'](_0x2ea2b7['shift']());}catch(_0x11819b){_0x2ea2b7['push'](_0x2ea2b7['shift']());}}}(a181_0x4113,0x2302d));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a181_0x1fbea3(0xc9),a181_0x1fbea3(0xcb),a181_0x1fbea3(0xa8),a181_0x1fbea3(0xe3),a181_0x1fbea3(0xe5)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x1fbea3(0x8c),a181_0x1fbea3(0xaf),a181_0x1fbea3(0x83),a181_0x1fbea3(0x9d),a181_0x1fbea3(0xc6),a181_0x1fbea3(0x81),a181_0x1fbea3(0xab)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a181_0x1fbea3(0xe2),a181_0x1fbea3(0xa9),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x1fbea3(0xd2),a181_0x1fbea3(0xcf),a181_0x1fbea3(0xde),a181_0x1fbea3(0xad),a181_0x1fbea3(0x8f),a181_0x1fbea3(0x84),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a181_0x1fbea3(0x8d),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a181_0x1fbea3(0x86),'type':a181_0x1fbea3(0xf0),'required':![],'default':![],'description':a181_0x1fbea3(0xb3)},{'name':a181_0x1fbea3(0x92),'type':a181_0x1fbea3(0x8d),'required':![],'description':a181_0x1fbea3(0x8b)}];function a181_0x5936(_0x1f8891,_0x6e9ad2){_0x1f8891=_0x1f8891-0x7f;const _0x4113c4=a181_0x4113();let _0x59367f=_0x4113c4[_0x1f8891];return _0x59367f;}export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a181_0x1fbea3(0xe6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0xd3f86b,_0xdc2f08,_0x459cba){return new CliError(_0xd3f86b,0x1,_0xdc2f08,_0x459cba);}export function readNotificationId(_0xfe4a78){const _0x535a16=a181_0x1fbea3,_0x1a637c=_0xfe4a78[_0x535a16(0xb5)]('id');if(!Number['isSafeInteger'](_0x1a637c)||_0x1a637c<=0x0)throw notificationError('notification_config_id_invalid','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x1a637c;}export function requireNotificationExplicitYes(_0x3d02f5){const _0x1e98ab=a181_0x1fbea3;if(_0x3d02f5[_0x1e98ab(0xf5)](_0x1e98ab(0xd7))||_0x3d02f5[_0x1e98ab(0xf5)](_0x1e98ab(0x8a)))return;throw notificationError('notification_config_confirmation_required',_0x1e98ab(0xb1),_0x1e98ab(0xcd));}export function readNotificationChannelType(_0x3d6b4b,_0x3280c1=a181_0x1fbea3(0x80),_0x1a9f08=a181_0x1fbea3(0xc9)){const _0x302f9b=a181_0x1fbea3,_0x12be4c=_0x3d6b4b[_0x302f9b(0x7f)](_0x3280c1)[_0x302f9b(0xc4)]()||_0x1a9f08;if(!NOTIFICATION_CHANNEL_TYPES[_0x302f9b(0xb9)](_0x12be4c))throw CliErrors['validation']('Invalid\x20--'+_0x3280c1+':\x20'+_0x12be4c,_0x302f9b(0xa5)+NOTIFICATION_CHANNEL_TYPES[_0x302f9b(0xb0)](',\x20')+'.');return _0x12be4c;}export function assertSingleNotificationSource(_0x27f882){const _0x44ae11=a181_0x1fbea3,_0x28f0ca=[],_0x3a8b29=_0x27f882[_0x44ae11(0x7f)](_0x44ae11(0xd0))[_0x44ae11(0xc4)]();if(_0x3a8b29)_0x28f0ca[_0x44ae11(0xcc)]({'kind':_0x44ae11(0xd0),'path':_0x3a8b29});if(_0x27f882[_0x44ae11(0xf5)](_0x44ae11(0x86)))_0x28f0ca[_0x44ae11(0xcc)]({'kind':'stdin'});const _0x543912=_0x27f882[_0x44ae11(0x7f)](_0x44ae11(0x92))[_0x44ae11(0xc4)]();if(_0x543912)_0x28f0ca[_0x44ae11(0xcc)]({'kind':_0x44ae11(0xc5),'name':_0x543912});if(_0x28f0ca['length']===0x0)throw CliErrors[_0x44ae11(0x9a)](_0x44ae11(0xbd),_0x44ae11(0xd1));if(_0x28f0ca[_0x44ae11(0xf1)]>0x1)throw CliErrors[_0x44ae11(0x9a)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x44ae11(0xd1));return _0x28f0ca[0x0];}export async function readNotificationDocument(_0x34fb5f,_0x2526bc){const _0x4fcbc0=a181_0x1fbea3,_0x4ecd11=assertSingleNotificationSource(_0x34fb5f),_0x53204b=_0x4ecd11['kind']===_0x4fcbc0(0xd0)?'file\x20'+_0x4ecd11[_0x4fcbc0(0x96)]:_0x4ecd11[_0x4fcbc0(0xfa)]===_0x4fcbc0(0xc5)?_0x4fcbc0(0xaa)+_0x4ecd11[_0x4fcbc0(0xb2)]:_0x4fcbc0(0x86);let _0x28894e;try{if(_0x4ecd11['kind']==='file')_0x28894e=await readFile(_0x4ecd11['path'],_0x4fcbc0(0xe0));else{if(_0x4ecd11[_0x4fcbc0(0xfa)]===_0x4fcbc0(0xc5)){if(!(_0x4ecd11[_0x4fcbc0(0xb2)]in process.env))throw notificationError(_0x4fcbc0(0xda),_0x4fcbc0(0xe1)+_0x4ecd11[_0x4fcbc0(0xb2)]);_0x28894e=process.env[_0x4ecd11.name]??'';}else _0x28894e=await readStdin();}}catch(_0x261c9c){if(_0x261c9c instanceof CliError)throw _0x261c9c;throw notificationError(_0x4fcbc0(0xda),_0x4fcbc0(0xdf)+_0x53204b+'.');}let _0x2b7707;try{_0x2b7707=JSON[_0x4fcbc0(0xfb)](_0x28894e);}catch{throw notificationError(_0x4fcbc0(0x9e),'Notification\x20JSON\x20from\x20'+_0x53204b+_0x4fcbc0(0xca),_0x4fcbc0(0x90));}if(!isJsonObject(_0x2b7707))throw notificationError('notification_config_json_invalid',_0x4fcbc0(0xc2)+_0x53204b+_0x4fcbc0(0xec));return validateNotificationDocument(_0x2b7707,_0x2526bc);}export function projectNotificationListConfig(_0x5f374f,_0x1c6564){const _0x568b36=a181_0x1fbea3;return{'id':typeof _0x5f374f['id']===_0x568b36(0x94)?_0x5f374f['id']:null,'configCode':requireResponseString(_0x5f374f[_0x568b36(0xa9)],'configCode',_0x1c6564),'configName':requireResponseString(_0x5f374f[_0x568b36(0x8c)],'configName',_0x1c6564),'channelType':requireResponseString(_0x5f374f[_0x568b36(0xaf)],_0x568b36(0xaf),_0x1c6564),'description':normalizeNullableString(_0x5f374f[_0x568b36(0xc6)]),'createTime':normalizeNullableString(_0x5f374f['createTime']),'updateTime':normalizeNullableString(_0x5f374f[_0x568b36(0xeb)])};}export function normalizeExactNotificationConfig(_0x1886a7,_0x4aeea2,_0x217d76){const _0x2f5a66=a181_0x1fbea3;if(!Number[_0x2f5a66(0xe4)](_0x1886a7['id'])||_0x1886a7['id']!==_0x4aeea2)throw notificationError('notification_config_response_invalid','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x4aeea2+'.');if(_0x1886a7[_0x2f5a66(0xe2)]!==_0x217d76)throw notificationError(_0x2f5a66(0xbb),_0x2f5a66(0xa4)+_0x4aeea2+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x5e32de=requireExactString(_0x1886a7[_0x2f5a66(0x8c)],_0x2f5a66(0x8c),_0x4aeea2),_0x20b7b0=requireExactString(_0x1886a7[_0x2f5a66(0xa9)],_0x2f5a66(0xa9),_0x4aeea2),_0x50cdc4=requireExactString(_0x1886a7[_0x2f5a66(0xaf)],_0x2f5a66(0xaf),_0x4aeea2);if(!NOTIFICATION_CHANNEL_TYPES[_0x2f5a66(0xb9)](_0x50cdc4))throw notificationError(_0x2f5a66(0xbb),_0x2f5a66(0xa4)+_0x4aeea2+_0x2f5a66(0xa0));const _0x1fe313=responseNullableString(_0x1886a7[_0x2f5a66(0x83)],'endpointUrl',_0x4aeea2),_0x31788f=responseNullableString(_0x1886a7[_0x2f5a66(0x9d)],_0x2f5a66(0x9d),_0x4aeea2),_0x3a8ec0=responseNullableString(_0x1886a7['description'],_0x2f5a66(0xc6),_0x4aeea2),_0x46846a=responseNullableTimeout(_0x1886a7[_0x2f5a66(0x81)],'connectTimeout',_0x4aeea2),_0x4c7d09=responseNullableTimeout(_0x1886a7['readTimeout'],_0x2f5a66(0xab),_0x4aeea2);return{'id':_0x4aeea2,'appCode':_0x217d76,'configCode':_0x20b7b0,'configName':_0x5e32de,'channelType':_0x50cdc4,'endpointUrl':redactSensitive(_0x1fe313),'channelConfig':redactSensitive(_0x31788f),'description':_0x3a8ec0,'connectTimeout':_0x46846a,'readTimeout':_0x4c7d09,'endpointUrlRaw':_0x1fe313,'channelConfigRaw':_0x31788f};}function a181_0x4113(){const _0x148320=['notification_config_field_unknown','recipients','file','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','emailTargets','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','isArray','failed','\x20failed.','dry-run','\x20--type\x20','channelConfigRaw','notification_config_source_unavailable','Invalid\x20notification\x20config\x20response.','mutation','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','ccList','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','utf8','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','appCode','WECOM','isSafeInteger','WEBHOOK','Application-level\x20notification\x20config\x20ID','410aowWZF','627777NvMIAF','650196WIYHDH','every','updateTime','\x20must\x20be\x20an\x20object.','316264sSUbAw','\x22\x20must\x20be\x20a\x20non-empty\x20string.','rabetbase\x20notification\x20config-list\x20--appcode\x20','boolean','length','call','Unknown\x20notification\x20JSON\x20field\x20\x22','preflight','bool','a\x20non-empty\x20string','create','notification_config_field_invalid','Item\x20','kind','parse','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Notification\x20config\x20list\x20item\x20','str','type','connectTimeout','endpointUrlRaw','endpointUrl','subjectPrefix','166298QbIQjN','stdin','prototype','a\x20supported\x20string','91hJvlnA','yes','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','configName','string','\x20characters.','replyTo','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','has','from-env','Notification\x20JSON\x20field\x20\x22','number','object','path','\x20has\x20an\x20invalid\x20id.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','\x20has\x20invalid\x20field\x20\x22','validation','<redacted>','1063872fXDkVM','channelConfig','notification_config_json_invalid','\x20has\x20an\x20invalid\x20appCode.','\x20has\x20an\x20unsupported\x20channelType.','Create\x20JSON\x20requires\x20field\x20','some','stringify','Notification\x20config\x20','Allowed\x20values:\x20','1642PpeRXc','\x20--format\x20compress','DINGTALK','configCode','environment\x20variable\x20','readTimeout','notification_config_field_required','bccList','a\x20JSON\x20object\x20or\x20null','channelType','join','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','name','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','488930cdutaF','num','notification_config_','endpointUrl:null','7rFVAkg','includes','setEncoding','notification_config_response_invalid','update','Missing\x20notification\x20JSON\x20source.','messageTemplate','54TjFxSB','a\x20JSON\x20object','keys','Notification\x20JSON\x20from\x20','\x22channelType\x22.','trim','env','description','a\x20string\x20or\x20null','apiError','EMAIL','\x20is\x20invalid.','FEISHU','push','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.'];a181_0x4113=function(){return _0x148320;};return a181_0x4113();}export async function requireExactNotificationConfig(_0x50e01b,_0x3bfd2b,_0x570943){const _0x50f277=a181_0x1fbea3;let _0x18c723;try{_0x18c723=await getNotificationChannelConfig(_0x3bfd2b,_0x50e01b);}catch{throw safeApiFailure(_0x570943,_0x50f277(0xf4),_0x50f277(0xfc)+_0x50e01b+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x18c723,_0x3bfd2b,_0x50e01b);}export function projectNotificationConfig(_0x42e72b){const _0xdf806a=a181_0x1fbea3;return{'id':_0x42e72b['id']??null,'appCode':_0x42e72b[_0xdf806a(0xe2)],'configCode':_0x42e72b['configCode']??null,'configName':_0x42e72b[_0xdf806a(0x8c)],'channelType':_0x42e72b[_0xdf806a(0xaf)],'endpointUrl':redactSensitive(_0x42e72b[_0xdf806a(0x83)]),'channelConfig':redactSensitive(_0x42e72b[_0xdf806a(0x9d)]),'description':_0x42e72b[_0xdf806a(0xc6)]??null,'connectTimeout':_0x42e72b[_0xdf806a(0x81)]??null,'readTimeout':_0x42e72b[_0xdf806a(0xab)]??null};}export function notificationSelector(_0x1e0abe){const _0x57c50a=a181_0x1fbea3;return{'appCode':_0x1e0abe[_0x57c50a(0xe2)],'id':_0x1e0abe['id'],'configCode':_0x1e0abe[_0x57c50a(0xa9)],'configName':_0x1e0abe[_0x57c50a(0x8c)],'channelType':_0x1e0abe[_0x57c50a(0xaf)]};}export function createMutationInput(_0x3bf05b,_0x508e15){const _0x1d5198=a181_0x1fbea3;return{'appCode':_0x3bf05b,'configName':_0x508e15['configName'],'channelType':_0x508e15[_0x1d5198(0xaf)],...hasOwn(_0x508e15,_0x1d5198(0x83))?{'endpointUrl':_0x508e15[_0x1d5198(0x83)]}:{},...hasOwn(_0x508e15,_0x1d5198(0x9d))?{'channelConfig':serializeChannelConfig(_0x508e15['channelConfig'])}:{},...hasOwn(_0x508e15,_0x1d5198(0xc6))?{'description':_0x508e15[_0x1d5198(0xc6)]}:{},...hasOwn(_0x508e15,_0x1d5198(0x81))?{'connectTimeout':_0x508e15[_0x1d5198(0x81)]}:{},...hasOwn(_0x508e15,_0x1d5198(0xab))?{'readTimeout':_0x508e15[_0x1d5198(0xab)]}:{}};}export function mergeUpdateInput(_0x3892f0,_0x2c5ad5){const _0x4d42c6=a181_0x1fbea3;return{'id':_0x3892f0['id'],'appCode':_0x3892f0[_0x4d42c6(0xe2)],'configName':_0x2c5ad5[_0x4d42c6(0x8c)]??_0x3892f0[_0x4d42c6(0x8c)],'channelType':_0x2c5ad5[_0x4d42c6(0xaf)]??_0x3892f0[_0x4d42c6(0xaf)],'endpointUrl':hasOwn(_0x2c5ad5,_0x4d42c6(0x83))?_0x2c5ad5[_0x4d42c6(0x83)]:_0x3892f0[_0x4d42c6(0x82)],'channelConfig':hasOwn(_0x2c5ad5,_0x4d42c6(0x9d))?serializeChannelConfig(_0x2c5ad5[_0x4d42c6(0x9d)]):_0x3892f0[_0x4d42c6(0xd9)],'description':hasOwn(_0x2c5ad5,'description')?_0x2c5ad5[_0x4d42c6(0xc6)]:_0x3892f0[_0x4d42c6(0xc6)],'connectTimeout':hasOwn(_0x2c5ad5,_0x4d42c6(0x81))?_0x2c5ad5[_0x4d42c6(0x81)]:_0x3892f0[_0x4d42c6(0x81)],'readTimeout':hasOwn(_0x2c5ad5,_0x4d42c6(0xab))?_0x2c5ad5['readTimeout']:_0x3892f0[_0x4d42c6(0xab)]};}export function plannedUpdateProjection(_0x60491d,_0x1a2734){const _0x5c6905=a181_0x1fbea3;return projectNotificationConfig({'id':_0x60491d['id'],'appCode':_0x60491d[_0x5c6905(0xe2)],'configCode':_0x60491d[_0x5c6905(0xa9)],'configName':_0x1a2734['configName']??_0x60491d['configName'],'channelType':_0x1a2734[_0x5c6905(0xaf)]??_0x60491d[_0x5c6905(0xaf)],'endpointUrl':hasOwn(_0x1a2734,_0x5c6905(0x83))?_0x1a2734[_0x5c6905(0x83)]:_0x60491d[_0x5c6905(0x82)],'channelConfig':hasOwn(_0x1a2734,'channelConfig')?_0x1a2734[_0x5c6905(0x9d)]:_0x60491d[_0x5c6905(0xd9)],'description':hasOwn(_0x1a2734,_0x5c6905(0xc6))?_0x1a2734[_0x5c6905(0xc6)]:_0x60491d['description'],'connectTimeout':hasOwn(_0x1a2734,_0x5c6905(0x81))?_0x1a2734[_0x5c6905(0x81)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x60491d['connectTimeout'],'readTimeout':hasOwn(_0x1a2734,_0x5c6905(0xab))?_0x1a2734['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x60491d[_0x5c6905(0xab)]});}export function requestedSafeFieldsMatch(_0x1d95ff,_0x388984,_0x2ee1e7){const _0x441aee=a181_0x1fbea3,_0x52ac72=[],_0x4049b0=[],_0x7fe1f4=[];for(const _0x5f04d2 of[_0x441aee(0x8c),'channelType',_0x441aee(0xc6)]){if(!hasOwn(_0x2ee1e7,_0x5f04d2))continue;_0x7fe1f4[_0x441aee(0xcc)](_0x5f04d2),_0x52ac72[_0x441aee(0xcc)](_0x388984[_0x5f04d2]===_0x2ee1e7[_0x5f04d2]),_0x4049b0[_0x441aee(0xcc)](_0x1d95ff[_0x5f04d2]!==_0x2ee1e7[_0x5f04d2]&&_0x388984[_0x5f04d2]===_0x2ee1e7[_0x5f04d2]);}for(const _0x3d76a9 of[_0x441aee(0x81),_0x441aee(0xab)]){if(!hasOwn(_0x2ee1e7,_0x3d76a9))continue;const _0x49f197=_0x2ee1e7[_0x3d76a9]??(_0x3d76a9===_0x441aee(0x81)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x7fe1f4['push'](_0x3d76a9),_0x52ac72[_0x441aee(0xcc)](_0x388984[_0x3d76a9]===_0x49f197),_0x4049b0['push'](_0x1d95ff[_0x3d76a9]!==_0x49f197&&_0x388984[_0x3d76a9]===_0x49f197);}return hasOwn(_0x2ee1e7,_0x441aee(0x83))&&_0x2ee1e7['endpointUrl']===null&&(_0x7fe1f4['push'](_0x441aee(0xb7)),_0x52ac72[_0x441aee(0xcc)](_0x388984[_0x441aee(0x82)]===null||_0x388984[_0x441aee(0x82)]===''),_0x4049b0[_0x441aee(0xcc)](_0x1d95ff[_0x441aee(0x82)]!==null&&_0x1d95ff[_0x441aee(0x82)]!==''&&(_0x388984[_0x441aee(0x82)]===null||_0x388984[_0x441aee(0x82)]===''))),{'allMatch':_0x52ac72[_0x441aee(0xea)](Boolean),'provesChange':_0x4049b0[_0x441aee(0xa2)](Boolean),'verifiedFields':_0x7fe1f4};}export function validateNotificationDeleteReadback(_0xd352f4,_0x10f563,_0x4377ec){const _0xf9edeb=a181_0x1fbea3;for(const [_0x52e963,_0x10d3db]of _0xd352f4['entries']()){if(!Number['isSafeInteger'](_0x10d3db['id'])||_0x10d3db['id']<=0x0)throw notificationError('notification_config_response_invalid',_0xf9edeb(0xfd)+(_0x52e963+0x1)+_0xf9edeb(0x97));if(_0x10d3db[_0xf9edeb(0xe2)]!==_0x10f563)throw notificationError(_0xf9edeb(0xbb),_0xf9edeb(0xfd)+(_0x52e963+0x1)+_0xf9edeb(0x9f));if(_0x10d3db[_0xf9edeb(0xaf)]!==_0x4377ec)throw notificationError('notification_config_response_invalid',_0xf9edeb(0xfd)+(_0x52e963+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x18d1ba,_0x199889,_0x17e7c8){const _0x301240=a181_0x1fbea3;return notificationError(_0x301240(0xb6)+_0x18d1ba+'_'+(_0x199889===_0x301240(0xdc)?_0x301240(0xd5):_0x199889+'_unavailable'),_0x301240(0xa4)+_0x18d1ba+'\x20'+_0x199889+_0x301240(0xd6),_0x17e7c8);}export function notificationLookupCommand(_0x5b3d53,_0xe8ac21){const _0x500c97=a181_0x1fbea3;return _0x500c97(0xef)+_0x5b3d53+_0x500c97(0xd8)+_0xe8ac21+_0x500c97(0xa7);}function validateNotificationDocument(_0x1ec33c,_0x41fcfd){const _0x1500fe=a181_0x1fbea3;for(const _0x2c14de of Object[_0x1500fe(0xc1)](_0x1ec33c)){if(FORBIDDEN_IDENTITY_FIELDS[_0x1500fe(0x91)](_0x2c14de))throw notificationError('notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22'+_0x2c14de+_0x1500fe(0xd3));if(!ALLOWED_INPUT_FIELDS['has'](_0x2c14de))throw notificationError(_0x1500fe(0xce),_0x1500fe(0xf3)+_0x2c14de+'\x22.');}if(_0x41fcfd==='update'&&Object[_0x1500fe(0xc1)](_0x1ec33c)[_0x1500fe(0xf1)]===0x0)throw notificationError('notification_config_update_empty',_0x1500fe(0x98));const _0xff5585={};if(hasOwn(_0x1ec33c,_0x1500fe(0x8c)))_0xff5585[_0x1500fe(0x8c)]=validateRequiredString(_0x1ec33c[_0x1500fe(0x8c)],'configName',0x80);else{if(_0x41fcfd==='create')throw notificationError('notification_config_field_required',_0x1500fe(0xa1)+'\x22configName\x22.');}if(hasOwn(_0x1ec33c,'channelType')){if(typeof _0x1ec33c[_0x1500fe(0xaf)]!==_0x1500fe(0x8d))throw invalidFieldType(_0x1500fe(0xaf),_0x1500fe(0x88));const _0x124754=_0x1ec33c[_0x1500fe(0xaf)][_0x1500fe(0xc4)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x1500fe(0xb9)](_0x124754))throw notificationError(_0x1500fe(0xf8),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x1500fe(0xb0)](',\x20')+'.');_0xff5585[_0x1500fe(0xaf)]=_0x124754;}else{if(_0x41fcfd===_0x1500fe(0xf7))throw notificationError(_0x1500fe(0xac),_0x1500fe(0xa1)+_0x1500fe(0xc3));}for(const [_0x5e8e29,_0x3fbddd]of[[_0x1500fe(0x83),0x200],['description',0x100]]){if(!hasOwn(_0x1ec33c,_0x5e8e29))continue;const _0x3a106a=_0x1ec33c[_0x5e8e29];if(_0x3a106a!==null&&typeof _0x3a106a!==_0x1500fe(0x8d))throw invalidFieldType(_0x5e8e29,_0x1500fe(0xc7));if(typeof _0x3a106a===_0x1500fe(0x8d)&&_0x3a106a[_0x1500fe(0xf1)]>_0x3fbddd)throw notificationError(_0x1500fe(0xf8),'Notification\x20JSON\x20field\x20\x22'+_0x5e8e29+'\x22\x20cannot\x20exceed\x20'+_0x3fbddd+_0x1500fe(0x8e));_0xff5585[_0x5e8e29]=_0x3a106a;}if(hasOwn(_0x1ec33c,_0x1500fe(0x9d))){const _0x4b7b00=_0x1ec33c[_0x1500fe(0x9d)];if(_0x4b7b00===null&&_0x41fcfd===_0x1500fe(0xf7))throw invalidFieldType('channelConfig',_0x1500fe(0xc0));if(_0x4b7b00!==null&&!isJsonObject(_0x4b7b00))throw invalidFieldType(_0x1500fe(0x9d),_0x41fcfd===_0x1500fe(0xbc)?_0x1500fe(0xae):_0x1500fe(0xc0));_0x4b7b00!==null&&validateChannelConfigFields(_0xff5585[_0x1500fe(0xaf)],_0x4b7b00),_0xff5585[_0x1500fe(0x9d)]=_0x4b7b00;}for(const _0x2e39d7 of[_0x1500fe(0x81),_0x1500fe(0xab)]){if(!hasOwn(_0x1ec33c,_0x2e39d7))continue;const _0x1de916=_0x1ec33c[_0x2e39d7];if(_0x1de916!==null&&(!Number[_0x1500fe(0xe4)](_0x1de916)||_0x1de916<0x0))throw notificationError('notification_config_field_invalid',_0x1500fe(0x93)+_0x2e39d7+_0x1500fe(0xdd));_0xff5585[_0x2e39d7]=_0x1de916;}return _0xff5585;}function validateRequiredString(_0x22f68c,_0x2df928,_0x11369f){const _0x158a3f=a181_0x1fbea3;if(typeof _0x22f68c!=='string')throw invalidFieldType(_0x2df928,_0x158a3f(0xf6));const _0x42f52a=_0x22f68c['trim']();if(!_0x42f52a)throw notificationError(_0x158a3f(0xf8),_0x158a3f(0x93)+_0x2df928+_0x158a3f(0xee));if(_0x42f52a[_0x158a3f(0xf1)]>_0x11369f)throw notificationError(_0x158a3f(0xf8),_0x158a3f(0x93)+_0x2df928+'\x22\x20cannot\x20exceed\x20'+_0x11369f+_0x158a3f(0x8e));return _0x42f52a;}function validateChannelConfigFields(_0x15283e,_0x410f79){const _0x1577c7=a181_0x1fbea3;if(hasOwn(_0x410f79,_0x1577c7(0xbe)))throw forbiddenChannelConfigField(_0x1577c7(0xbe));if(_0x15283e===_0x1577c7(0xc9))for(const _0x2e8e0a of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x410f79,_0x2e8e0a))throw forbiddenChannelConfigField(_0x2e8e0a);}}function forbiddenChannelConfigField(_0x569542){return notificationError('notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x569542+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x441a4d,_0x347ff1){const _0x39eb24=a181_0x1fbea3;return notificationError(_0x39eb24(0xf8),_0x39eb24(0x93)+_0x441a4d+'\x22\x20must\x20be\x20'+_0x347ff1+'.');}function serializeChannelConfig(_0x312c77){const _0x4586fa=a181_0x1fbea3;return _0x312c77===null||_0x312c77===undefined?null:JSON[_0x4586fa(0xa3)](_0x312c77);}function redactSensitive(_0x5731c7){const _0x169783=a181_0x1fbea3;return _0x5731c7===null||_0x5731c7===undefined||_0x5731c7===''?null:_0x169783(0x9b);}function requireResponseString(_0x59e8d0,_0x3ac716,_0xe9098f){const _0x5670db=a181_0x1fbea3;if(typeof _0x59e8d0!==_0x5670db(0x8d)||_0x59e8d0['trim']()==='')throw CliErrors[_0x5670db(0xc8)](_0x5670db(0xdb),_0x5670db(0xf9)+(_0xe9098f+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x3ac716+'\x22.');return _0x59e8d0[_0x5670db(0xc4)]();}function requireExactString(_0x15c098,_0x386ca3,_0x43bd5d){const _0x1c9814=a181_0x1fbea3;if(typeof _0x15c098!==_0x1c9814(0x8d)||_0x15c098[_0x1c9814(0xc4)]()==='')throw notificationError(_0x1c9814(0xbb),'Notification\x20config\x20'+_0x43bd5d+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x386ca3+'\x22.');return _0x15c098[_0x1c9814(0xc4)]();}function responseNullableString(_0x508ab2,_0x40d518,_0x4c6c36){const _0x2ad010=a181_0x1fbea3;if(_0x508ab2===undefined||_0x508ab2===null)return null;if(typeof _0x508ab2!==_0x2ad010(0x8d))throw notificationError(_0x2ad010(0xbb),'Notification\x20config\x20'+_0x4c6c36+_0x2ad010(0x99)+_0x40d518+'\x22.');return _0x508ab2;}function responseNullableTimeout(_0x64192b,_0x2c9815,_0x2dda02){const _0x144591=a181_0x1fbea3;if(_0x64192b===undefined||_0x64192b===null)return null;if(!Number[_0x144591(0xe4)](_0x64192b)||_0x64192b<0x0)throw notificationError(_0x144591(0xbb),_0x144591(0xa4)+_0x2dda02+_0x144591(0x99)+_0x2c9815+'\x22.');return _0x64192b;}function normalizeNullableString(_0x5a4f02){return typeof _0x5a4f02==='string'?_0x5a4f02:null;}function isJsonObject(_0x578452){const _0x2257be=a181_0x1fbea3;return _0x578452!==null&&typeof _0x578452===_0x2257be(0x95)&&!Array[_0x2257be(0xd4)](_0x578452);}function hasOwn(_0xc7158d,_0x51d492){const _0x344b07=a181_0x1fbea3;return Object[_0x344b07(0x87)]['hasOwnProperty'][_0x344b07(0xf2)](_0xc7158d,_0x51d492);}async function readStdin(){const _0x1cad08=a181_0x1fbea3;let _0xf9a33c='';process[_0x1cad08(0x86)][_0x1cad08(0xba)](_0x1cad08(0xe0));for await(const _0x17f117 of process['stdin'])_0xf9a33c+=_0x17f117;return _0xf9a33c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x2c208d=a182_0x4173;(function(_0x48d6a8,_0x5e0316){const _0x236ae1=a182_0x4173,_0x4dd3a1=_0x48d6a8();while(!![]){try{const _0xe37f6=-parseInt(_0x236ae1(0x81))/0x1*(parseInt(_0x236ae1(0x7b))/0x2)+-parseInt(_0x236ae1(0x97))/0x3+-parseInt(_0x236ae1(0x92))/0x4+parseInt(_0x236ae1(0x87))/0x5+-parseInt(_0x236ae1(0x72))/0x6+-parseInt(_0x236ae1(0x7e))/0x7+-parseInt(_0x236ae1(0x93))/0x8*(-parseInt(_0x236ae1(0xa3))/0x9);if(_0xe37f6===_0x5e0316)break;else _0x4dd3a1['push'](_0x4dd3a1['shift']());}catch(_0x4ca2f1){_0x4dd3a1['push'](_0x4dd3a1['shift']());}}}(a182_0x14c8,0xdcaf3));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a182_0x14c8(){const _0x2d7699=['2016880TDruIj','scene','/smartapi/ocr/recognize-text?','POST','2201943WeoeLT','appCode','trim','invoice','Invoice','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','fileUrl','filter','/smartapi/common/uploadFile','GET','/smartapi/common/queryFileUrl','.\x20Supported\x20scenes:\x20','117ikBaow','idcard','\x20OCR','imageFile','path','read','general','4647522GGrkbU','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','string','apiError','ocr','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','toLowerCase','Preview:\x20recognize\x20','34TlXbYy','idCard','\x20OCR\x20from\x20URL','2375401gxkSRP','toString','validation','23089vsZtEb','filePath','str','image-url','IdCard','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','6510760GErNvz','form','join','Unsupported\x20OCR\x20scene:\x20','File\x20upload\x20response\x20missing\x20filePath.','image-file','Table','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','imageUrl','Publicly\x20accessible\x20image\x20or\x20file\x20URL','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','5740940RfAnNg'];a182_0x14c8=function(){return _0x2d7699;};return a182_0x14c8();}import{CliErrors}from'../../errors.js';function a182_0x4173(_0x1bf084,_0x9baf35){_0x1bf084=_0x1bf084-0x6f;const _0x14c803=a182_0x14c8();let _0x417344=_0x14c803[_0x1bf084];return _0x417344;}const SUPPORTED_SCENES=[a182_0x2c208d(0x9a),a182_0x2c208d(0x71),a182_0x2c208d(0x88),a182_0x2c208d(0x7c)],SCENE_TO_LEGACY_TYPE={'invoice':a182_0x2c208d(0x9b),'general':'General','form':a182_0x2c208d(0x8d),'idCard':a182_0x2c208d(0x85)},SCENE_FLAG={'name':'scene','type':a182_0x2c208d(0x74),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a182_0x2c208d(0x73)},IMAGE_FILE_FLAG={'name':a182_0x2c208d(0x8c),'type':'string','description':a182_0x2c208d(0x8e)},IMAGE_URL_FLAG={'name':a182_0x2c208d(0x84),'type':a182_0x2c208d(0x74),'description':a182_0x2c208d(0x90)};function normalizeScene(_0x3504c4){const _0x54ecdb=a182_0x2c208d,_0x47fab3=_0x3504c4[_0x54ecdb(0x99)]()[_0x54ecdb(0x79)]();if(_0x47fab3===_0x54ecdb(0xa4))return _0x54ecdb(0x7c);if(_0x47fab3===_0x54ecdb(0x9a)||_0x47fab3===_0x54ecdb(0x71)||_0x47fab3===_0x54ecdb(0x88))return _0x47fab3;throw CliErrors[_0x54ecdb(0x80)](_0x54ecdb(0x8a)+_0x3504c4+_0x54ecdb(0xa2)+SUPPORTED_SCENES[_0x54ecdb(0x89)](',\x20'));}function selectedInputs(_0xba097a){const _0x412507=a182_0x2c208d,_0x42cbb5=_0xba097a['str'](_0x412507(0x8c))[_0x412507(0x99)](),_0x45954d=_0xba097a[_0x412507(0x83)](_0x412507(0x84))[_0x412507(0x99)]();return{'imageFile':_0x42cbb5,'imageUrl':_0x45954d,'count':[_0x42cbb5,_0x45954d][_0x412507(0x9e)](Boolean)['length']};}function validateInputSelection(_0x542b96){const _0x9f1a18=a182_0x2c208d,_0x26742e=selectedInputs(_0x542b96);if(_0x26742e['count']!==0x1)throw CliErrors[_0x9f1a18(0x80)](_0x9f1a18(0x9c));return _0x26742e;}function withScene(_0x36fed2,_0xbbc754,_0x47dfd7){const _0x21b8d1=a182_0x2c208d;return{..._0x36fed2,'scene':_0xbbc754,..._0x47dfd7?{'sourceFile':{'fileName':_0x47dfd7['fileName'],'filePath':_0x47dfd7[_0x21b8d1(0x82)]}}:{}};}const ocrRecognize={'service':a182_0x2c208d(0x76),'command':'recognize','description':a182_0x2c208d(0x91),'risk':a182_0x2c208d(0x70),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x19f775){const _0x311a01=a182_0x2c208d,_0x5e49da=normalizeScene(_0x19f775[_0x311a01(0x83)](_0x311a01(0x94))),_0x5dedad=SCENE_TO_LEGACY_TYPE[_0x5e49da],_0xb10626=validateInputSelection(_0x19f775);if(_0xb10626['imageUrl']){const _0x4a3acc=new URLSearchParams({'url':_0xb10626[_0x311a01(0x8f)],'type':_0x5dedad,'appCode':_0x19f775[_0x311a01(0x98)]});return{'method':_0x311a01(0xa0),'url':_0x311a01(0x95)+_0x4a3acc[_0x311a01(0x7f)](),'description':_0x311a01(0x7a)+_0x5e49da+_0x311a01(0x7d)};}const _0x2d6af6=requireDevelopmentUploadFile(_0xb10626['imageFile'],'image-file');return{'method':_0x311a01(0x96),'url':_0x311a01(0x9f),'body':{'steps':[{'method':_0x311a01(0x96),'url':_0x311a01(0x9f),'body':{'appCode':_0x19f775[_0x311a01(0x98)],'multipart':{'file':_0x2d6af6}}},{'method':'POST','url':_0x311a01(0xa1),'body':{'filePath':_0x311a01(0x86),'downloadFlag':![]}},{'method':_0x311a01(0xa0),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x19f775[_0x311a01(0x98)],'url':_0x311a01(0x77),'type':_0x5dedad}}]},'description':_0x311a01(0x78)+_0x5e49da+_0x311a01(0xa5)};},async 'execute'(_0x58bb63){const _0x2fce38=a182_0x2c208d,_0x13d508=normalizeScene(_0x58bb63[_0x2fce38(0x83)]('scene')),_0xe4dad2=SCENE_TO_LEGACY_TYPE[_0x13d508],_0x1262d9=validateInputSelection(_0x58bb63);if(_0x1262d9['imageUrl']){const _0xc02f51=await recognizeDevelopmentOcr(_0x58bb63[_0x2fce38(0x98)],{'url':_0x1262d9['imageUrl'],'type':_0xe4dad2});return{'ok':!![],'data':withScene(_0xc02f51,_0x13d508)};}const _0x59ca1d=requireDevelopmentUploadFile(_0x1262d9[_0x2fce38(0xa6)],_0x2fce38(0x8c)),_0x4b7edc=await uploadDevelopmentFile(_0x58bb63[_0x2fce38(0x98)],_0x59ca1d[_0x2fce38(0x6f)]);if(!_0x4b7edc['filePath'])throw CliErrors['apiError'](_0x2fce38(0x8b));const _0x3cd856=await queryDevelopmentFileUrl(_0x4b7edc[_0x2fce38(0x82)],{'download':![]});if(!_0x3cd856[_0x2fce38(0x9d)])throw CliErrors[_0x2fce38(0x75)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x3066e0=await recognizeDevelopmentOcr(_0x58bb63[_0x2fce38(0x98)],{'url':_0x3cd856[_0x2fce38(0x9d)],'type':_0xe4dad2});return{'ok':!![],'data':withScene(_0x3066e0,_0x13d508,_0x4b7edc)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a183_0x524e(_0x272565,_0x478c1d){_0x272565=_0x272565-0x1ec;const _0x298e1d=a183_0x298e();let _0x524e28=_0x298e1d[_0x272565];return _0x524e28;}const a183_0x169251=a183_0x524e;(function(_0x1b4f40,_0x628a34){const _0x42240b=a183_0x524e,_0x512a87=_0x1b4f40();while(!![]){try{const _0x3e94a0=parseInt(_0x42240b(0x22d))/0x1+parseInt(_0x42240b(0x20f))/0x2*(-parseInt(_0x42240b(0x1f1))/0x3)+-parseInt(_0x42240b(0x20b))/0x4*(parseInt(_0x42240b(0x1f6))/0x5)+parseInt(_0x42240b(0x22b))/0x6+parseInt(_0x42240b(0x211))/0x7*(parseInt(_0x42240b(0x221))/0x8)+-parseInt(_0x42240b(0x216))/0x9*(-parseInt(_0x42240b(0x1f4))/0xa)+-parseInt(_0x42240b(0x228))/0xb*(parseInt(_0x42240b(0x204))/0xc);if(_0x3e94a0===_0x628a34)break;else _0x512a87['push'](_0x512a87['shift']());}catch(_0x3e7c65){_0x512a87['push'](_0x512a87['shift']());}}}(a183_0x298e,0xe739f));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a183_0x298e(){const _0x816497=['72032qBznOt','appCode','create','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','4918TseGny','includes','2212105QwgsTl','files','length','Created\x20Custom\x20Page\x20','page-pattern','279Ufqduj','trim','apiError','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','.json','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','validation','page-dir','BLANK','pageName\x20cannot\x20exceed\x20100\x20characters.','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','24HorNbx','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','createMenu','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','CUSTOM','string','/smartapi/webcode/page/create','1744798mbdBBS','stringify','page\x20create\x20does\x20not\x20accept\x20--page-type.','4092906rCZXvj','POST','505261RniFKa','isInteger','num','DASHBOARD','parentMenuId','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','now','Custom_page_','keys','pageName','isArray','page','Invalid\x20Custom\x20Page\x20pattern:\x20','Would\x20create\x20Custom\x20Page\x20','compress','591poMENw','write','object','282130WrDwaz','page-content','130RXYfyu','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','some','number','menuId','page.create','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','parse','utf8','parent-menu-id','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','name','Custom\x20Page\x20pattern\x20not\x20found:\x20','menuPath','84UZmDUK','\x20and\x20its\x20menu\x20entry.','str','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','ONEPAGE','pageId','values'];a183_0x298e=function(){return _0x816497;};return a183_0x298e();}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a183_0x169251(0x21e),a183_0x169251(0x208),a183_0x169251(0x230)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),'../../../templates/custom-pages');export const pageCreate={'service':a183_0x169251(0x1ed),'command':a183_0x169251(0x20d),'description':a183_0x169251(0x200),'risk':a183_0x169251(0x1f2),'defaultOutputFormat':a183_0x169251(0x1f0),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':a183_0x169251(0x22a),'hint':a183_0x169251(0x207)},{'name':a183_0x169251(0x1f5),'message':a183_0x169251(0x219),'hint':a183_0x169251(0x232)}],'flags':[{'name':a183_0x169251(0x201),'type':a183_0x169251(0x226),'description':a183_0x169251(0x1fc)},{'name':'parent-menu-id','type':a183_0x169251(0x1f9),'description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':'page-pattern','type':a183_0x169251(0x226),'description':a183_0x169251(0x21b),'enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x169251(0x21d),'type':'string','description':a183_0x169251(0x1f7)},APPCODE_FLAG],async 'validate'(_0x2992d1){await readValidatedPageSource(_0x2992d1);},async 'dryRun'(_0x206cfd){const _0x5e5ec4=a183_0x169251,_0x43869b=readInput(_0x206cfd,await readValidatedPageSource(_0x206cfd));return{'method':_0x5e5ec4(0x22c),'url':_0x5e5ec4(0x227),'body':{'appCode':_0x43869b[_0x5e5ec4(0x20c)],'pageName':_0x43869b['pageName'],..._0x43869b[_0x5e5ec4(0x231)]!=null?{'parentMenuId':_0x43869b['parentMenuId']}:{},'createMenu':_0x43869b[_0x5e5ec4(0x223)],'codeContent':_0x43869b[_0x5e5ec4(0x212)]},'description':_0x5e5ec4(0x1ef)+JSON[_0x5e5ec4(0x229)](_0x43869b[_0x5e5ec4(0x236)])+_0x5e5ec4(0x205)};},async 'execute'(_0xc6a3bf){const _0xa7e091=a183_0x169251,_0x10f493=readInput(_0xc6a3bf,await readValidatedPageSource(_0xc6a3bf)),_0x118cdd=await createCustomPage(_0x10f493);if(!Number['isInteger'](_0x118cdd[_0xa7e091(0x209)])||_0x118cdd['pageId']<=0x0)throw CliErrors[_0xa7e091(0x218)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x5a5e8e=buildCustomPageDevelopmentUrl(_0x10f493['appCode'],_0x118cdd[_0xa7e091(0x203)]),_0x310604=buildCustomPageEditUrl(_0x10f493['appCode'],_0x118cdd['pageId']);return{'ok':!![],'data':{'operation':_0xa7e091(0x1fb),'pageType':_0xa7e091(0x225),'pagePattern':readPagePattern(_0xc6a3bf),'selector':{'appCode':_0x10f493[_0xa7e091(0x20c)],'pageName':_0x10f493['pageName']},'before':null,'after':{'pageId':_0x118cdd[_0xa7e091(0x209)],'pageName':_0x118cdd[_0xa7e091(0x236)],'appCode':_0x118cdd['appCode'],'version':_0x118cdd['version'],'menuId':_0x118cdd[_0xa7e091(0x1fa)],'menuPath':_0x118cdd['menuPath'],'files':_0x118cdd[_0xa7e091(0x212)]??Object['keys'](_0x10f493[_0xa7e091(0x212)])},'dryRun':![],'request':_0x10f493,..._0x5a5e8e?{'pageUrl':_0x5a5e8e}:{},..._0x310604?{'editPageUrl':_0x310604}:{},'warnings':_0x5a5e8e?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0xa7e091(0x214)+_0x118cdd[_0xa7e091(0x209)]+'.'};}};function readPagePattern(_0x452cb3){const _0x1fdb22=a183_0x169251,_0x18f6a7=_0x452cb3[_0x1fdb22(0x206)](_0x1fdb22(0x215))[_0x1fdb22(0x217)](),_0x187cce=_0x452cb3[_0x1fdb22(0x206)](_0x1fdb22(0x21d))[_0x1fdb22(0x217)]();if(_0x18f6a7&&_0x187cce)throw CliErrors[_0x1fdb22(0x21c)](_0x1fdb22(0x224));if(_0x187cce)return null;if(!_0x18f6a7)throw CliErrors[_0x1fdb22(0x21c)](_0x1fdb22(0x222));if(!CUSTOM_PAGE_PATTERNS[_0x1fdb22(0x210)](_0x18f6a7))throw CliErrors[_0x1fdb22(0x21c)](_0x1fdb22(0x220));return _0x18f6a7;}async function readPageSource(_0x154cbd){const _0x562f89=a183_0x169251,_0x12543e=_0x154cbd[_0x562f89(0x206)](_0x562f89(0x21d))[_0x562f89(0x217)](),_0x36dd4a=readPagePattern(_0x154cbd);if(_0x36dd4a===null){const _0x274bdb=await readCustomPageDirectory(_0x12543e);if(Object[_0x562f89(0x235)](_0x274bdb)[_0x562f89(0x213)]===0x0)throw CliErrors[_0x562f89(0x21c)]('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x274bdb;}let _0x5ad614;try{_0x5ad614=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x36dd4a['toLowerCase']()+_0x562f89(0x21a)),_0x562f89(0x1fe));}catch{throw CliErrors['validation'](_0x562f89(0x202)+_0x36dd4a+'.');}let _0x23a121;try{_0x23a121=JSON[_0x562f89(0x1fd)](_0x5ad614);}catch{throw CliErrors[_0x562f89(0x21c)](_0x562f89(0x1ee)+_0x36dd4a+'.');}if(!_0x23a121||typeof _0x23a121!==_0x562f89(0x1f3)||Array[_0x562f89(0x1ec)](_0x23a121)||Object[_0x562f89(0x20a)](_0x23a121)[_0x562f89(0x1f8)](_0x12f3ed=>typeof _0x12f3ed!=='string'))throw CliErrors[_0x562f89(0x21c)](_0x562f89(0x1ee)+_0x36dd4a+'.');return _0x23a121;}async function readValidatedPageSource(_0x1f51cf){const _0x489d75=await readPageSource(_0x1f51cf);return await validateCustomPageContent(_0x489d75),_0x489d75;}function readInput(_0x24014e,_0x1244b8){const _0x2526fd=a183_0x169251,_0x18188f=_0x24014e[_0x2526fd(0x206)]('name')['trim']()||_0x2526fd(0x234)+Date[_0x2526fd(0x233)]();if(_0x18188f[_0x2526fd(0x213)]>0x64)throw CliErrors[_0x2526fd(0x21c)](_0x2526fd(0x21f));const _0xf3a0c4=_0x24014e[_0x2526fd(0x22f)](_0x2526fd(0x1ff),NaN),_0xf6617a=!Number['isNaN'](_0xf3a0c4);if(_0xf6617a&&(!Number[_0x2526fd(0x22e)](_0xf3a0c4)||_0xf3a0c4<=0x0))throw CliErrors[_0x2526fd(0x21c)](_0x2526fd(0x20e));return{'appCode':_0x24014e[_0x2526fd(0x20c)],'pageName':_0x18188f,..._0xf6617a?{'parentMenuId':_0xf3a0c4}:{},'createMenu':!![],'files':_0x1244b8};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a184_0x1ec5f6=a184_0x5cde;function a184_0x91ad(){const _0x113e66=['custom-detail','read','184XwCIPX','padStart','85180JbbuQU','trim','1822194nGjnPT','1234520ymSHTL','pageCode','5337jSCVhJ','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getMonth','982932lqhCIs','2hJGeZR','str','getDate','getMinutes','27752UMaZIn','49nbnnfm','getHours','isNaN','cookie','page','appCode','118032ygmJyW','number'];a184_0x91ad=function(){return _0x113e66;};return a184_0x91ad();}(function(_0x2aa3eb,_0x27233d){const _0x4d26f8=a184_0x5cde,_0x2a18e1=_0x2aa3eb();while(!![]){try{const _0x1035a0=-parseInt(_0x4d26f8(0x11e))/0x1*(-parseInt(_0x4d26f8(0x113))/0x2)+parseInt(_0x4d26f8(0x10f))/0x3*(parseInt(_0x4d26f8(0x108))/0x4)+parseInt(_0x4d26f8(0x10a))/0x5+-parseInt(_0x4d26f8(0x112))/0x6+parseInt(_0x4d26f8(0x118))/0x7*(-parseInt(_0x4d26f8(0x117))/0x8)+parseInt(_0x4d26f8(0x10c))/0x9+-parseInt(_0x4d26f8(0x10d))/0xa;if(_0x1035a0===_0x27233d)break;else _0x2a18e1['push'](_0x2a18e1['shift']());}catch(_0x3e5795){_0x2a18e1['push'](_0x2a18e1['shift']());}}}(a184_0x91ad,0x1a523));import{getCustomPageSource}from'../../../core/api-client.js';function a184_0x5cde(_0x400f74,_0x1df620){_0x400f74=_0x400f74-0x108;const _0x91adbd=a184_0x91ad();let _0x5cdee5=_0x91adbd[_0x400f74];return _0x5cdee5;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a184_0x1ec5f6(0x11c),'command':a184_0x1ec5f6(0x120),'description':a184_0x1ec5f6(0x110),'risk':a184_0x1ec5f6(0x121),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a184_0x1ec5f6(0x11f),'required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x25d24a){readCustomPageId(_0x25d24a);},async 'execute'(_0x393a14){const _0x27fd42=a184_0x1ec5f6,_0xbf9ca5=readCustomPageId(_0x393a14),_0x1d6107=await getCustomPageSource(_0xbf9ca5),{bundle:_0x19cf72,createTime:_0x1005d3,updateTime:_0x14abdd,..._0x17e642}=_0x1d6107,_0x3cc395=_0x1d6107['id']??_0xbf9ca5,_0x453524=_0x1d6107[_0x27fd42(0x11d)]?.[_0x27fd42(0x10b)]()||_0x393a14[_0x27fd42(0x114)]('appcode')[_0x27fd42(0x10b)](),_0x124a98=buildCustomPageRuntimeUrl(_0x453524,_0x1d6107[_0x27fd42(0x10e)]),_0x28e1de=buildCustomPageEditUrl(_0x453524,_0x3cc395),_0x20d726=await resolveCustomPageDevelopmentUrl(_0x453524,_0x3cc395,_0x393a14[_0x27fd42(0x11b)]);return{'ok':!![],'data':{..._0x17e642,..._0x124a98?{'runtimePageUrl':_0x124a98}:{},..._0x20d726?{'pageUrl':_0x20d726}:{},..._0x28e1de?{'editPageUrl':_0x28e1de}:{},..._0x1005d3==null?{}:{'createTime':formatTime(_0x1005d3)},..._0x14abdd==null?{}:{'updateTime':formatTime(_0x14abdd)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0xbf9ca5+'.'};}};function formatTime(_0x547c87){const _0x333229=a184_0x1ec5f6,_0x527fca=new Date(_0x547c87);if(Number[_0x333229(0x11a)](_0x527fca['getTime']()))return String(_0x547c87);const _0x1bf769=[_0x527fca['getFullYear'](),String(_0x527fca[_0x333229(0x111)]()+0x1)[_0x333229(0x109)](0x2,'0'),String(_0x527fca[_0x333229(0x115)]())[_0x333229(0x109)](0x2,'0')]['join']('-'),_0x213e5d=[String(_0x527fca[_0x333229(0x119)]())[_0x333229(0x109)](0x2,'0'),String(_0x527fca[_0x333229(0x116)]())[_0x333229(0x109)](0x2,'0'),String(_0x527fca['getSeconds']())[_0x333229(0x109)](0x2,'0')]['join'](':');return _0x1bf769+'\x20'+_0x213e5d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a185_0x504065=a185_0x15b9;(function(_0x143c7a,_0x1a39a6){const _0x48853c=a185_0x15b9,_0x12be35=_0x143c7a();while(!![]){try{const _0x59e70b=parseInt(_0x48853c(0x191))/0x1+-parseInt(_0x48853c(0x190))/0x2*(parseInt(_0x48853c(0x187))/0x3)+parseInt(_0x48853c(0x181))/0x4*(parseInt(_0x48853c(0x180))/0x5)+-parseInt(_0x48853c(0x189))/0x6+parseInt(_0x48853c(0x17b))/0x7+-parseInt(_0x48853c(0x184))/0x8*(parseInt(_0x48853c(0x186))/0x9)+parseInt(_0x48853c(0x18b))/0xa;if(_0x59e70b===_0x1a39a6)break;else _0x12be35['push'](_0x12be35['shift']());}catch(_0x5e895f){_0x12be35['push'](_0x12be35['shift']());}}}(a185_0x19c9,0x859b9));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';function a185_0x15b9(_0xb87303,_0x205867){_0xb87303=_0xb87303-0x179;const _0x19c9b9=a185_0x19c9();let _0x15b953=_0x19c9b9[_0xb87303];return _0x15b953;}export const pageCustomList={'service':'page','command':a185_0x504065(0x18c),'description':a185_0x504065(0x188),'risk':a185_0x504065(0x17a),'defaultOutputFormat':a185_0x504065(0x185),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x29a1d5){const _0x5fc298=a185_0x504065,_0x3bb03c=(await fetchMenuSnapshot(_0x29a1d5[_0x5fc298(0x17c)],_0x29a1d5[_0x5fc298(0x17e)]))[_0x5fc298(0x17d)][_0x5fc298(0x183)](_0x3cac93=>{const _0x14a6a3=_0x5fc298;if(_0x3cac93[_0x14a6a3(0x179)]!=='react'||_0x3cac93[_0x14a6a3(0x18f)]==null)return[];const _0x7628c8=buildCustomPageDevelopmentUrl(_0x29a1d5[_0x14a6a3(0x17c)],_0x3cac93[_0x14a6a3(0x17f)]),_0x474eb1=buildCustomPageRuntimeUrl(_0x29a1d5[_0x14a6a3(0x17c)],_0x3cac93['path']),_0x32cb5e=buildCustomPageEditUrl(_0x29a1d5[_0x14a6a3(0x17c)],_0x3cac93[_0x14a6a3(0x18f)]);return[{'pageId':_0x3cac93[_0x14a6a3(0x18f)],'label':_0x3cac93[_0x14a6a3(0x18d)],'path':_0x3cac93['path'],..._0x7628c8?{'pageUrl':_0x7628c8}:{},..._0x474eb1?{'runtimePageUrl':_0x474eb1}:{},..._0x32cb5e?{'editPageUrl':_0x32cb5e}:{}}];});return{'ok':!![],'data':{'pages':_0x3bb03c},'message':_0x3bb03c['length']===0x0?'No\x20Custom\x20Pages\x20found.':_0x5fc298(0x182)+_0x3bb03c[_0x5fc298(0x18a)]+_0x5fc298(0x18e)};}};function a185_0x19c9(){const _0x98bb71=['2815hTqiwR','292SSgncG','Found\x20','flatMap','162896bOfDwI','compress','63MwgHFm','3077022fVeIqr','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','5322324bRwRzt','length','17820460jgQvhd','custom-list','label','\x20Custom\x20Page(s).','pageId','2hUuGID','517536tgrTcF','type','read','1832866jXdtuU','appCode','menus','cookie','path'];a185_0x19c9=function(){return _0x98bb71;};return a185_0x19c9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a186_0x136907=a186_0x4e68;(function(_0x123b7f,_0x2259b3){const _0x4dbfe6=a186_0x4e68,_0x194419=_0x123b7f();while(!![]){try{const _0x4cd1f1=parseInt(_0x4dbfe6(0x9b))/0x1*(-parseInt(_0x4dbfe6(0xa8))/0x2)+-parseInt(_0x4dbfe6(0xa6))/0x3+parseInt(_0x4dbfe6(0x8e))/0x4*(parseInt(_0x4dbfe6(0x94))/0x5)+parseInt(_0x4dbfe6(0x85))/0x6*(parseInt(_0x4dbfe6(0x91))/0x7)+parseInt(_0x4dbfe6(0x93))/0x8+-parseInt(_0x4dbfe6(0x90))/0x9+-parseInt(_0x4dbfe6(0x99))/0xa*(parseInt(_0x4dbfe6(0xa2))/0xb);if(_0x4cd1f1===_0x2259b3)break;else _0x194419['push'](_0x194419['shift']());}catch(_0xadf00f){_0x194419['push'](_0x194419['shift']());}}}(a186_0x11da,0x68b18));function a186_0x11da(){const _0x1df0a3=['125377mWraVP','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','6058320ruWGvK','65SWbOuU','cookie','remark','pageId','string','20IYmiOF','appCode','24551PIvOan','custom-publish','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','/smartapi/webcode/file/publish','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','isInteger','Published\x20Custom\x20Page\x20','866833DWQnIb','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','write','pageCode','953100lqzwRh','trim','10HLCsIN','POST','186rnfcWc','Optional\x20publish\x20remark','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','apiError','status','Custom\x20Page\x20ID','page.custom-publish','page','FORMAL','81364omIMmC','push','4950711fpdzyY'];a186_0x11da=function(){return _0x1df0a3;};return a186_0x11da();}import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a186_0x4e68(_0x3abbe6,_0x17ae1d){_0x3abbe6=_0x3abbe6-0x84;const _0x11da6b=a186_0x11da();let _0x4e6872=_0x11da6b[_0x3abbe6];return _0x4e6872;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a186_0x136907(0x8c),'command':a186_0x136907(0x9c),'description':a186_0x136907(0x9d),'risk':a186_0x136907(0xa4),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a186_0x136907(0x8a)},{'name':a186_0x136907(0x96),'type':a186_0x136907(0x98),'description':a186_0x136907(0x86)}],async 'validate'(_0x39d50e){readCustomPageId(_0x39d50e);},async 'dryRun'(_0x1461e9){const _0x15830c=a186_0x136907,_0x5b4da5=readInput(_0x1461e9);return{'method':_0x15830c(0x84),'url':_0x15830c(0x9e),'body':{'id':_0x5b4da5[_0x15830c(0x97)],..._0x5b4da5[_0x15830c(0x96)]?{'remark':_0x5b4da5[_0x15830c(0x96)]}:{}},'description':'Would\x20publish\x20Custom\x20Page\x20'+_0x5b4da5[_0x15830c(0x97)]+'.'};},async 'execute'(_0x4c1b2b){const _0x5b16c4=a186_0x136907,_0x9d4b0e=readInput(_0x4c1b2b);await getCustomPageSource(_0x9d4b0e[_0x5b16c4(0x97)]);const _0x430560=await publishCustomPage(_0x9d4b0e);if(!Number[_0x5b16c4(0xa0)](_0x430560)||_0x430560!==_0x9d4b0e[_0x5b16c4(0x97)])throw CliErrors['apiError'](_0x5b16c4(0x9f));const _0x4bfd76=await getCustomPageSource(_0x9d4b0e['pageId']);if(_0x4bfd76['status']!==_0x5b16c4(0x8d))throw CliErrors[_0x5b16c4(0x88)](_0x5b16c4(0xa3)+(_0x4bfd76[_0x5b16c4(0x89)]??'unknown')+'.');const _0x28858a=_0x4bfd76[_0x5b16c4(0x9a)]?.[_0x5b16c4(0xa7)](),_0x8ecbb5=buildCustomPageEditUrl(_0x28858a,_0x9d4b0e[_0x5b16c4(0x97)]),_0x526b6d=await resolveCustomPageDevelopmentUrl(_0x28858a,_0x9d4b0e['pageId'],_0x4c1b2b[_0x5b16c4(0x95)]),_0x14923d=buildMutationData(_0x9d4b0e,!![],_0x526b6d,_0x8ecbb5);_0x28858a&&!_0x526b6d&&_0x14923d['warnings'][_0x5b16c4(0x8f)](_0x5b16c4(0x87));const _0x100e81=buildCustomPageRuntimeUrl(_0x4bfd76['appCode'],_0x4bfd76[_0x5b16c4(0xa5)]);return _0x100e81?_0x14923d['runtimePageUrl']=_0x100e81:_0x14923d['warnings'][_0x5b16c4(0x8f)](_0x5b16c4(0x92)),{'ok':!![],'data':_0x14923d,'message':_0x5b16c4(0xa1)+_0x9d4b0e[_0x5b16c4(0x97)]+'.'};}};function readInput(_0x2e8064){const _0x459e86=a186_0x136907,_0x3e04e1=readCustomPageId(_0x2e8064),_0x54ad46=_0x2e8064['str'](_0x459e86(0x96))[_0x459e86(0xa7)]();return{'pageId':_0x3e04e1,..._0x54ad46?{'remark':_0x54ad46}:{}};}function buildMutationData(_0x22eb59,_0x24854b=![],_0xe71b56,_0x96dda9){const _0x1d2152=a186_0x136907;return{'operation':_0x1d2152(0x8b),'selector':{'pageId':_0x22eb59['pageId']},'before':null,'after':{'pageId':_0x22eb59[_0x1d2152(0x97)],'status':_0x1d2152(0x8d)},'dryRun':!_0x24854b,'request':_0x22eb59,..._0xe71b56?{'pageUrl':_0xe71b56}:{},..._0x96dda9?{'editPageUrl':_0x96dda9}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a187_0x2df7(){const _0x2be452=['find','128584LyVrzf','type','length','5250080wuqQIg','1020952KTogQt','5BUBdCt','1718970ArJnNv','/ide/','/pages/','message','react','validation','3kIlKYI','4031862tHBdWH','Invalid\x20Custom\x20Page\x20content:\x20','join','2120230dRlHRK','isInteger','410695kInnjv','menus','map','trim','108ZMSjFw'];a187_0x2df7=function(){return _0x2be452;};return a187_0x2df7();}(function(_0x47099a,_0x250abe){const _0x1057bc=a187_0x1098,_0x546e02=_0x47099a();while(!![]){try{const _0x209168=parseInt(_0x1057bc(0x1ab))/0x1+-parseInt(_0x1057bc(0x19f))/0x2+-parseInt(_0x1057bc(0x1a5))/0x3*(-parseInt(_0x1057bc(0x19d))/0x4)+parseInt(_0x1057bc(0x19e))/0x5*(parseInt(_0x1057bc(0x1a6))/0x6)+-parseInt(_0x1057bc(0x1a9))/0x7+parseInt(_0x1057bc(0x199))/0x8*(-parseInt(_0x1057bc(0x197))/0x9)+parseInt(_0x1057bc(0x19c))/0xa;if(_0x209168===_0x250abe)break;else _0x546e02['push'](_0x546e02['shift']());}catch(_0x571dab){_0x546e02['push'](_0x546e02['shift']());}}}(a187_0x2df7,0x7bf13));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';function a187_0x1098(_0x37ba38,_0x2fcbf2){_0x37ba38=_0x37ba38-0x194;const _0x2df7f4=a187_0x2df7();let _0x10983b=_0x2df7f4[_0x37ba38];return _0x10983b;}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':'Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted'};function trimOptional(_0x28b914){const _0x2ae6d8=a187_0x1098;return _0x28b914?.[_0x2ae6d8(0x196)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x230c78,_0x1ab4bb){const _0x3d431d=trimOptional(_0x230c78),_0x3c90b6=trimOptional(_0x1ab4bb);if(!_0x3d431d||!_0x3c90b6)return undefined;return getPublishedAppDomain(_0x3d431d)+'/'+encodeURIComponent(_0x3c90b6);}export function buildCustomPageDevelopmentUrl(_0x4044be,_0x357f14){const _0x323d84=a187_0x1098,_0x430435=trimOptional(_0x4044be),_0x9adb44=trimOptional(_0x357f14);if(!_0x430435||!_0x9adb44)return undefined;return getAppBaseUrl(_0x430435)+_0x323d84(0x1a1)+encodeURIComponent(_0x9adb44);}export async function resolveCustomPageDevelopmentUrl(_0x418655,_0x362229,_0xcbb7ba){const _0x445cd1=a187_0x1098,_0xa9a230=trimOptional(_0x418655);if(!_0xa9a230)return undefined;try{const _0x2294b4=(await fetchMenuSnapshot(_0xa9a230,_0xcbb7ba))[_0x445cd1(0x194)][_0x445cd1(0x198)](_0x2a0ca6=>_0x2a0ca6[_0x445cd1(0x19a)]===_0x445cd1(0x1a3)&&_0x2a0ca6['pageId']===_0x362229);return buildCustomPageDevelopmentUrl(_0xa9a230,_0x2294b4?.['path']);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x553b0c,_0x433080){const _0xfc57a5=a187_0x1098,_0x56bffe=trimOptional(_0x553b0c);if(!_0x56bffe)return;const _0x2805aa=trimOptional(String(_0x433080??''));if(!_0x2805aa)return;return getAppBaseUrl(_0x56bffe)+_0xfc57a5(0x1a0)+encodeURIComponent(_0x2805aa);}export async function validateCustomPageContent(_0x4ad62c){const _0xf7bf71=a187_0x1098,_0x3f6056=await validateCustomPageSourceFiles(_0x4ad62c);if(_0x3f6056[_0xf7bf71(0x19b)]>0x0)throw CliErrors[_0xf7bf71(0x1a4)](_0xf7bf71(0x1a7)+_0x3f6056[_0xf7bf71(0x195)](_0x3d8689=>_0x3d8689['file']+':\x20'+_0x3d8689[_0xf7bf71(0x1a2)])[_0xf7bf71(0x1a8)](';\x20'));}export function readCustomPageId(_0x1c6e2a){const _0x4b044f=a187_0x1098,_0xdbc953=_0x1c6e2a['num']('id');if(!Number[_0x4b044f(0x1aa)](_0xdbc953)||_0xdbc953<=0x0)throw CliErrors[_0x4b044f(0x1a4)]('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0xdbc953;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a188_0x44192a=a188_0x1206;(function(_0x1c2180,_0x597576){const _0x4df24a=a188_0x1206,_0x1084ac=_0x1c2180();while(!![]){try{const _0x5cfbde=-parseInt(_0x4df24a(0x18b))/0x1+parseInt(_0x4df24a(0x182))/0x2*(-parseInt(_0x4df24a(0x17b))/0x3)+-parseInt(_0x4df24a(0x18a))/0x4+parseInt(_0x4df24a(0x186))/0x5*(parseInt(_0x4df24a(0x181))/0x6)+parseInt(_0x4df24a(0x180))/0x7*(-parseInt(_0x4df24a(0x187))/0x8)+parseInt(_0x4df24a(0x18f))/0x9*(parseInt(_0x4df24a(0x189))/0xa)+parseInt(_0x4df24a(0x179))/0xb;if(_0x5cfbde===_0x597576)break;else _0x1084ac['push'](_0x1084ac['shift']());}catch(_0x29c64a){_0x1084ac['push'](_0x1084ac['shift']());}}}(a188_0x50b7,0xee2f6));import{format}from'prettier';const SOURCE_PARSERS={'.js':a188_0x44192a(0x18d),'.jsx':'babel','.ts':a188_0x44192a(0x17f),'.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=[a188_0x44192a(0x17d),a188_0x44192a(0x184)];function a188_0x50b7(){const _0x4065cd=['1772830WpEQww','799364sdkWDY','1334571PqtxUY','message','babel','filter','63IihaYk','39357791RAXZHN','toLowerCase','169737YggqAV','some','.jsx','map','typescript','7OGFwXT','6oyfAqA','54upFZOp','trim','.tsx','find','2532765rblsPJ','10302912GxFqQT','all'];a188_0x50b7=function(){return _0x4065cd;};return a188_0x50b7();}export async function validateCustomPageSourceFiles(_0x2ebf02){const _0x420973=a188_0x44192a,_0x1a497a=Object['entries'](_0x2ebf02)[_0x420973(0x18e)](([_0x55cbff])=>getParser(_0x55cbff));if(!_0x1a497a[_0x420973(0x17c)](([_0x53f844])=>isReactSourceFile(_0x53f844)))return[{'file':'page\x20files','message':'Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx'}];const _0x18671f=await Promise[_0x420973(0x188)](_0x1a497a[_0x420973(0x17e)](async([_0x4e589c,_0x2ae26c])=>{const _0xbea60f=_0x420973;try{return await format(_0x2ae26c,{'parser':getParser(_0x4e589c)}),undefined;}catch(_0x23069b){return{'file':_0x4e589c,'message':_0x23069b instanceof Error?_0x23069b[_0xbea60f(0x18c)]:String(_0x23069b)};}}));return _0x18671f[_0x420973(0x18e)](_0x174c77=>_0x174c77!==undefined);}function getParser(_0x2e9d6f){const _0x3ccec4=a188_0x44192a,_0x498a99=_0x2e9d6f['trim']()[_0x3ccec4(0x17a)]();return Object['entries'](SOURCE_PARSERS)[_0x3ccec4(0x185)](([_0x492781])=>_0x498a99['endsWith'](_0x492781))?.[0x1];}function a188_0x1206(_0x50ce2e,_0x371e35){_0x50ce2e=_0x50ce2e-0x179;const _0x50b737=a188_0x50b7();let _0x120635=_0x50b737[_0x50ce2e];return _0x120635;}function isReactSourceFile(_0x3f66d0){const _0x2e71b0=a188_0x44192a,_0x207e7f=_0x3f66d0[_0x2e71b0(0x183)]()[_0x2e71b0(0x17a)]();return CUSTOM_PAGE_EXTENSIONS[_0x2e71b0(0x17c)](_0x19389b=>_0x207e7f['endsWith'](_0x19389b));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0x19a9e3=a189_0x404d;function a189_0x1e6e(){const _0x1b82d6=['pageContent','4MZxAXk','page-dir','2061684SmqvIe','149336CXgAAl','compress','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','newVersion','str','848069GJIugj','cookie','page','5973380EmxQPF','2066696DolcgM','/smartapi/webcode/page/update/content','appCode','414EDJtbp','trim','appcode','write','page-content','page.custom-update','13884390WgrwZl','string','pageId','77476lLoopD','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','81UTvMHU','validation','Custom\x20Page\x20ID','isInteger','POST','Directory\x20containing\x20all\x20complete\x20page\x20files'];a189_0x1e6e=function(){return _0x1b82d6;};return a189_0x1e6e();}(function(_0x5bdeeb,_0x4e8188){const _0x5ddbf5=a189_0x404d,_0x2af32c=_0x5bdeeb();while(!![]){try{const _0x2c2100=-parseInt(_0x5ddbf5(0xce))/0x1+-parseInt(_0x5ddbf5(0xae))/0x2+-parseInt(_0x5ddbf5(0xc8))/0x3+parseInt(_0x5ddbf5(0xc6))/0x4*(parseInt(_0x5ddbf5(0xad))/0x5)+parseInt(_0x5ddbf5(0xb1))/0x6*(parseInt(_0x5ddbf5(0xba))/0x7)+-parseInt(_0x5ddbf5(0xc9))/0x8*(parseInt(_0x5ddbf5(0xbf))/0x9)+parseInt(_0x5ddbf5(0xb7))/0xa;if(_0x2c2100===_0x4e8188)break;else _0x2af32c['push'](_0x2af32c['shift']());}catch(_0x212afa){_0x2af32c['push'](_0x2af32c['shift']());}}}(a189_0x1e6e,0x94f6f));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a189_0x19a9e3(0xac),'command':'custom-update','description':a189_0x19a9e3(0xbb),'risk':a189_0x19a9e3(0xb4),'defaultOutputFormat':a189_0x19a9e3(0xca),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a189_0x19a9e3(0xb5),'message':'page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'id','type':'number','required':!![],'description':a189_0x19a9e3(0xc1)},{'name':'page-dir','type':a189_0x19a9e3(0xb8),'required':!![],'description':a189_0x19a9e3(0xc4)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x51f349){readCustomPageId(_0x51f349),await readValidatedPageContent(_0x51f349);},async 'dryRun'(_0x42418f){const _0x4a6a04=a189_0x19a9e3,_0x1e5b44=await readInput(_0x42418f);return{'method':_0x4a6a04(0xc3),'url':_0x4a6a04(0xaf),'body':{'id':_0x1e5b44[_0x4a6a04(0xb9)],'codeContent':_0x1e5b44['pageContent']},'description':_0x4a6a04(0xbd)+_0x1e5b44['pageId']+'.'};},async 'execute'(_0x1ca5d7){const _0x234db9=a189_0x19a9e3,_0x352dde=await readInput(_0x1ca5d7),_0x5bb5c0=await updateCustomPageContent({'pageId':_0x352dde['pageId'],'pageContent':_0x352dde['pageContent']});if(!Number[_0x234db9(0xc2)](_0x5bb5c0[_0x234db9(0xcc)])||_0x5bb5c0[_0x234db9(0xcc)]<=0x0)throw CliErrors['apiError'](_0x234db9(0xbe));const _0x3a3095=buildCustomPageEditUrl(_0x352dde[_0x234db9(0xb0)],_0x352dde[_0x234db9(0xb9)]),_0xc368ce=await resolveCustomPageDevelopmentUrl(_0x352dde[_0x234db9(0xb0)],_0x352dde[_0x234db9(0xb9)],_0x1ca5d7[_0x234db9(0xcf)]);return{'ok':!![],'data':{'operation':_0x234db9(0xb6),'selector':{'appCode':_0x352dde[_0x234db9(0xb0)],'pageId':_0x352dde[_0x234db9(0xb9)]},'before':null,'after':{'pageId':_0x5bb5c0[_0x234db9(0xb9)],'version':_0x5bb5c0[_0x234db9(0xcc)],'pageContent':_0x352dde[_0x234db9(0xc5)]},'dryRun':![],'request':_0x352dde,..._0xc368ce?{'pageUrl':_0xc368ce}:{},..._0x3a3095?{'editPageUrl':_0x3a3095}:{},'warnings':_0xc368ce?[]:[_0x234db9(0xbc)]},'message':'Updated\x20Custom\x20Page\x20'+_0x352dde['pageId']+'.'};}};function a189_0x404d(_0x19680e,_0x402e04){_0x19680e=_0x19680e-0xac;const _0x1e6ee0=a189_0x1e6e();let _0x404db8=_0x1e6ee0[_0x19680e];return _0x404db8;}async function readInput(_0x2b59f6){const _0xe9fe7e=a189_0x19a9e3,_0x1b84d4=readCustomPageId(_0x2b59f6),_0x3d7bb3=_0x2b59f6[_0xe9fe7e(0xcd)](_0xe9fe7e(0xb3))['trim']()||(await getCustomPageSource(_0x1b84d4))[_0xe9fe7e(0xb0)]?.[_0xe9fe7e(0xb2)]();if(!_0x3d7bb3)throw CliErrors[_0xe9fe7e(0xc0)](_0xe9fe7e(0xcb)+_0x1b84d4+'.');return{'appCode':_0x3d7bb3,'pageId':_0x1b84d4,'pageContent':await readValidatedPageContent(_0x2b59f6)};}async function readValidatedPageContent(_0x5c71c1){const _0x125c4f=a189_0x19a9e3,_0x34c0a8=await readCustomPageDirectory(_0x5c71c1[_0x125c4f(0xcd)](_0x125c4f(0xc7)));return await validateCustomPageContent(_0x34c0a8),_0x34c0a8;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a190_0x1dae54=a190_0x471c;(function(_0x12f453,_0x4bb44c){const _0x2b9b7d=a190_0x471c,_0x5dd1af=_0x12f453();while(!![]){try{const _0x18a2fc=parseInt(_0x2b9b7d(0x11b))/0x1*(-parseInt(_0x2b9b7d(0x119))/0x2)+-parseInt(_0x2b9b7d(0x10c))/0x3*(-parseInt(_0x2b9b7d(0x10d))/0x4)+parseInt(_0x2b9b7d(0x110))/0x5*(parseInt(_0x2b9b7d(0x111))/0x6)+parseInt(_0x2b9b7d(0x10e))/0x7*(parseInt(_0x2b9b7d(0x123))/0x8)+-parseInt(_0x2b9b7d(0x11f))/0x9*(parseInt(_0x2b9b7d(0x124))/0xa)+parseInt(_0x2b9b7d(0x10f))/0xb+-parseInt(_0x2b9b7d(0x121))/0xc*(parseInt(_0x2b9b7d(0x127))/0xd);if(_0x18a2fc===_0x4bb44c)break;else _0x5dd1af['push'](_0x5dd1af['shift']());}catch(_0x19ec1f){_0x5dd1af['push'](_0x5dd1af['shift']());}}}(a190_0x5b5c,0xa13d8));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a190_0x471c(_0x285a13,_0x56f0fe){_0x285a13=_0x285a13-0x10c;const _0x5b5c32=a190_0x5b5c();let _0x471c3e=_0x5b5c32[_0x285a13];return _0x471c3e;}function a190_0x5b5c(){const _0x270ffd=['481020iphjBT','60ZPxQJN','nextAction','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','compress','read','alias','manualResolutionRequired','page','190LZXIDr','related-pages-fallback','11915aMUzZw','string','code','status','5832uxbfVS','length','312gBbKol','query-data-list-status','24Zhgmse','5410pDTCKH','source','relatedPages','351741SRdtrm','GET','15567yIEXgy','852ijoZbN','819602EEhWsQ','4706460NsFyya'];a190_0x5b5c=function(){return _0x270ffd;};return a190_0x5b5c();}export const pageDataListStatus={'service':a190_0x1dae54(0x118),'command':'data-list-status','description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a190_0x1dae54(0x115),'defaultOutputFormat':a190_0x1dae54(0x114),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a190_0x1dae54(0x116),'type':a190_0x1dae54(0x11c),'description':a190_0x1dae54(0x113)}],async 'validate'(_0x421c6a){validateDatasetSelector(_0x421c6a);},async 'dryRun'(_0x45ac89){const _0x5ffbe5=a190_0x1dae54,_0x4df1f6=await loadDatasetDetailForPage(_0x45ac89);return{'method':_0x5ffbe5(0x128),'url':'/smartapi/lovrabet/dataset/'+_0x4df1f6[_0x5ffbe5(0x11d)]+'/standard-page-status?appCode='+encodeURIComponent(_0x45ac89['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x4df1f6['id'],'code':_0x4df1f6[_0x5ffbe5(0x11d)],'name':_0x4df1f6['name']},'action':_0x5ffbe5(0x122)})};},async 'execute'(_0xdc99b6){const _0x2d6406=a190_0x1dae54,_0x498bad=await loadDatasetDetailForPage(_0xdc99b6),_0x45662a=await loadDataListPageStatusForGenerate(_0xdc99b6,_0x498bad['code']),_0x1ac9bc=getUndeletedRelatedPages(_0x498bad),_0x4df902=assessDataListPageState(_0x498bad[_0x2d6406(0x11d)],_0x45662a,{'fallbackUndeletedPages':_0x1ac9bc});return{'ok':!![],'data':{'datasetCode':_0x498bad['code'],'precheckSource':_0x45662a?.[_0x2d6406(0x125)]??_0x2d6406(0x11a),'status':_0x4df902[_0x2d6406(0x11e)],'manualResolutionRequired':_0x4df902[_0x2d6406(0x117)],'nextAction':_0x4df902[_0x2d6406(0x112)],'dataListPageStatus':_0x45662a,'relatedPages':{'total':_0x498bad[_0x2d6406(0x126)][_0x2d6406(0x120)],'undeletedCount':_0x1ac9bc['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a191_0x21d3ae=a191_0x3b50;(function(_0x5b93c5,_0x10bf20){const _0x14e72e=a191_0x3b50,_0x5433f4=_0x5b93c5();while(!![]){try{const _0x46f6b6=parseInt(_0x14e72e(0x85))/0x1*(parseInt(_0x14e72e(0x7a))/0x2)+parseInt(_0x14e72e(0x87))/0x3+-parseInt(_0x14e72e(0xa1))/0x4+parseInt(_0x14e72e(0x78))/0x5*(-parseInt(_0x14e72e(0x94))/0x6)+-parseInt(_0x14e72e(0x98))/0x7+parseInt(_0x14e72e(0x9d))/0x8*(parseInt(_0x14e72e(0x77))/0x9)+-parseInt(_0x14e72e(0x80))/0xa;if(_0x46f6b6===_0x10bf20)break;else _0x5433f4['push'](_0x5433f4['shift']());}catch(_0x24fc35){_0x5433f4['push'](_0x5433f4['shift']());}}}(a191_0x1e7c,0x5ddb4));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a191_0x3b50(_0x7ba543,_0x31c7c9){_0x7ba543=_0x7ba543-0x76;const _0x1e7c3d=a191_0x1e7c();let _0x3b5020=_0x1e7c3d[_0x7ba543];return _0x3b5020;}function a191_0x1e7c(){const _0x3e0a94=['apply','appCode','source','precheck','dataset','SUCCESS','status','progressRate','204BHqTLV','code','page-pattern','bool','2718653MpnqIl','currentStep','nextAction','number','dataListPageStatus','232720ilUmAf','compress','write','clientOperationId','470656lwYYIg','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','page','string','boolean','/generate-standard-pages/start','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','dryRun','name','fieldCount','171MzfRIe','41025BbBnho','manualResolutionRequired','606406jsFGOi','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','message','CRUD_PAGE_SET','DATA_LIST','Reusing\x20an\x20existing\x20generate\x20task','4009180TpGMTh','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','POST','reused','allowGenerate','1hrblJO','operationId','2143362xdlPhV','related-pages-fallback','taskId','alias','generate-start'];a191_0x1e7c=function(){return _0x3e0a94;};return a191_0x1e7c();}import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a191_0x21d3ae(0xa3),'command':'generate-start','description':'Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':a191_0x21d3ae(0x9f),'defaultOutputFormat':a191_0x21d3ae(0x9e),'rejectedFlags':[{'name':'page-type','message':a191_0x21d3ae(0x7b),'hint':a191_0x21d3ae(0xa2)},{'name':a191_0x21d3ae(0x96),'message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','hint':'DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.'}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a191_0x21d3ae(0x8a),'type':a191_0x21d3ae(0xa4),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':'apply','type':a191_0x21d3ae(0xa5),'description':a191_0x21d3ae(0xa7)}],async 'validate'(_0xf769f0){validateDatasetSelector(_0xf769f0);},async 'dryRun'(_0x1554c9){const _0x987c44=a191_0x21d3ae,_0x1ec63f=await prepare(_0x1554c9);return{'method':_0x987c44(0x82),'url':'/smartapi/lovrabet/dataset/'+_0x1ec63f[_0x987c44(0x90)]['code']+_0x987c44(0xa6),'body':{'appCode':_0x1554c9[_0x987c44(0x8d)],'clientOperationId':_0x1ec63f[_0x987c44(0xa0)]},'description':serializeDryRunDescription({'dataset':{'id':_0x1ec63f[_0x987c44(0x90)]['id'],'code':_0x1ec63f[_0x987c44(0x90)][_0x987c44(0x95)],'name':_0x1ec63f[_0x987c44(0x90)][_0x987c44(0xa9)],'fieldCount':_0x1ec63f[_0x987c44(0x90)][_0x987c44(0x76)]},'precheckSource':_0x1ec63f[_0x987c44(0x9c)]?.[_0x987c44(0x8e)]??'related-pages-fallback','action':_0x987c44(0x8b),'clientOperationId':_0x1ec63f[_0x987c44(0xa0)],'plannedStatus':_0x1ec63f['precheck']['status'],'reason':_0x1ec63f[_0x987c44(0x8f)][_0x987c44(0x7c)]})};},async 'execute'(_0x4053bd){const _0x578637=a191_0x21d3ae;if(!_0x4053bd[_0x578637(0x97)](_0x578637(0x8c))){const _0x3d03b0=await pageGenerateStart[_0x578637(0xa8)](_0x4053bd);return{'ok':!![],'message':_0x578637(0x81),'data':_0x3d03b0};}const _0x3a42bb=await prepare(_0x4053bd);if(!_0x3a42bb['precheck'][_0x578637(0x84)])return{'ok':![],'message':_0x3a42bb[_0x578637(0x8f)][_0x578637(0x7c)],'data':{'datasetCode':_0x3a42bb[_0x578637(0x90)][_0x578637(0x95)],'pageType':_0x578637(0x7e),'pagePattern':'CRUD_PAGE_SET','clientOperationId':_0x3a42bb[_0x578637(0xa0)],'precheckSource':_0x3a42bb['dataListPageStatus']?.[_0x578637(0x8e)]??_0x578637(0x88),'status':_0x3a42bb[_0x578637(0x8f)]['status'],'manualResolutionRequired':_0x3a42bb[_0x578637(0x8f)][_0x578637(0x79)],'nextAction':_0x3a42bb[_0x578637(0x8f)][_0x578637(0x9a)],'query':{'command':buildDataListPageStatusQueryCommand(_0x3a42bb[_0x578637(0x90)][_0x578637(0x95)],_0x4053bd['appCode'])},'dataListPageStatus':_0x3a42bb[_0x578637(0x9c)]}};const _0xd2aa35=await startGenerateDataListPages(_0x4053bd[_0x578637(0x8d)],_0x3a42bb[_0x578637(0x90)][_0x578637(0x95)],{'clientOperationId':_0x3a42bb[_0x578637(0xa0)]}),_0x34d48d=_0xd2aa35[_0x578637(0x92)]===_0x578637(0x91)||_0xd2aa35[_0x578637(0x92)]==='PARTIAL_SUCCESS'?await loadDataListPageStatusForGenerate(_0x4053bd,_0x3a42bb[_0x578637(0x90)][_0x578637(0x95)]):null,_0x3314c2=assessGenerateOperationState(_0x3a42bb[_0x578637(0x90)]['code'],_0xd2aa35['status'],_0x34d48d);return{'ok':!![],'message':_0xd2aa35[_0x578637(0x83)]?_0x578637(0x7f):'Submitted\x20a\x20generate\x20task','data':{'datasetCode':_0x3a42bb[_0x578637(0x90)][_0x578637(0x95)],'appCode':_0x4053bd['appCode'],'pageType':_0x578637(0x7e),'pagePattern':_0x578637(0x7d),'taskId':_0xd2aa35['taskId']??null,'operationId':_0xd2aa35[_0x578637(0x86)]??null,'clientOperationId':_0x3a42bb[_0x578637(0xa0)],'jobStatus':_0xd2aa35[_0x578637(0x92)]??null,'progressRate':typeof _0xd2aa35[_0x578637(0x93)]===_0x578637(0x9b)?_0xd2aa35[_0x578637(0x93)]:null,'currentStep':_0xd2aa35[_0x578637(0x99)]??null,'reused':_0xd2aa35[_0x578637(0x83)]===!![],'status':_0x3314c2[_0x578637(0x92)],'manualResolutionRequired':_0x3314c2[_0x578637(0x79)],'nextAction':_0x3314c2[_0x578637(0x9a)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x3a42bb[_0x578637(0x90)][_0x578637(0x95)],{'appCode':_0x4053bd['appCode'],'taskId':_0xd2aa35[_0x578637(0x89)],'operationId':_0xd2aa35[_0x578637(0x86)],'clientOperationId':_0x3a42bb['clientOperationId']})},'dataListPageStatus':_0x34d48d}};}};async function prepare(_0x1f004d){const _0x2fd810=a191_0x21d3ae,_0x1902d1=await loadDatasetDetailForPage(_0x1f004d),_0x468465=await loadDataListPageStatusForGenerate(_0x1f004d,_0x1902d1['code']),_0x3444fd=getUndeletedRelatedPages(_0x1902d1);return{'dataset':_0x1902d1,'dataListPageStatus':_0x468465,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x1902d1[_0x2fd810(0x95)],_0x468465,{'fallbackUndeletedPages':_0x3444fd})};}
|