@lovrabet/rabetbase-cli 2.5.2-beta.4 → 2.5.2-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/auto-sync.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/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.d.ts +6 -5
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function a159_0x5528(){const _0x18d6cc=['\x22\x20must\x20be\x20a\x20non-empty\x20string.','has','create','failed','connectTimeout','notification_config_json_invalid','updateTime','Unknown\x20notification\x20JSON\x20field\x20\x22','update','5258752DFkIfW','108CsXGzs','validation','notification_config_id_invalid','number','\x22\x20is\x20forbidden.','file\x20','\x20failed.','\x22configName\x22.','parse','a\x20JSON\x20object','\x20--type\x20','bool','file','\x22channelType\x22.','notification_config_update_empty','env','Allowed\x20values:\x20','notification_config_field_unknown','yes','notification_config_','setEncoding','length','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','prototype','join','recipients','num','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','readTimeout','15019552kWPoHj','environment\x20variable\x20','Application-level\x20notification\x20config\x20ID','trim','\x20has\x20an\x20invalid\x20channelType.','endpointUrl','type','\x20has\x20invalid\x20field\x20\x22','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','isArray','description','DINGTALK','createTime','a\x20non-empty\x20string','Notification\x20config\x20','notification_config_confirmation_required','WECOM','Notification\x20JSON\x20field\x20\x22','object','rabetbase\x20notification\x20config-list\x20--appcode\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','path','messageTemplate','\x20is\x20invalid.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','EMAIL','endpointUrl:null','\x20characters.','FEISHU','stdin','notification_config_field_required','Notification\x20config\x20list\x20item\x20','channelCode','bccList','a\x20string\x20or\x20null','kind','217440xHUCqT','Notification\x20JSON\x20from\x20','notification_config_source_unavailable','configName','channelType','<redacted>','configCode','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','push','appCode','1033484ZemqVY','notification_config_response_invalid','keys','\x20has\x20an\x20invalid\x20appCode.','utf8','\x20has\x20an\x20unsupported\x20channelType.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','ccList','Create\x20JSON\x20requires\x20field\x20','notification_config_field_invalid','fromName','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','endpointUrlRaw','str','8828988riBDeB','\x22\x20must\x20be\x20','WEBHOOK','2289194lUwrTa','a\x20supported\x20string','boolean','string','notification_config_field_forbidden','channelConfig','includes','entries','name','from-env','\x20must\x20be\x20an\x20object.','emailTargets','subjectPrefix','every','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','53112tqWGmL','isSafeInteger','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'];a159_0x5528=function(){return _0x18d6cc;};return a159_0x5528();}const a159_0x93c37b=a159_0x15ed;(function(_0xaf14bd,_0x9e84bb){const _0x17bcde=a159_0x15ed,_0x59822a=_0xaf14bd();while(!![]){try{const _0x4b35fc=parseInt(_0x17bcde(0xce))/0x1+parseInt(_0x17bcde(0xdf))/0x2+-parseInt(_0x17bcde(0xee))/0x3+-parseInt(_0x17bcde(0xfa))/0x4+parseInt(_0x17bcde(0xc4))/0x5*(-parseInt(_0x17bcde(0xfb))/0x6)+-parseInt(_0x17bcde(0xdc))/0x7+parseInt(_0x17bcde(0x118))/0x8;if(_0x4b35fc===_0x9e84bb)break;else _0x59822a['push'](_0x59822a['shift']());}catch(_0x2bd4aa){_0x59822a['push'](_0x59822a['shift']());}}}(a159_0x5528,0xa5c99));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=[a159_0x93c37b(0x133),a159_0x93c37b(0x136),a159_0x93c37b(0x124),a159_0x93c37b(0x129),a159_0x93c37b(0xde)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a159_0x93c37b(0xc7),a159_0x93c37b(0xc8),'endpointUrl',a159_0x93c37b(0xe4),a159_0x93c37b(0x123),a159_0x93c37b(0xf5),a159_0x93c37b(0x117)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a159_0x93c37b(0xcd),a159_0x93c37b(0xca),a159_0x93c37b(0xc0)]),EMAIL_RECIPIENT_FIELDS=new Set([a159_0x93c37b(0xea),a159_0x93c37b(0x114),a159_0x93c37b(0xd5),a159_0x93c37b(0xc1),'replyTo',a159_0x93c37b(0xeb),a159_0x93c37b(0xd8),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a159_0x93c37b(0x107),'type':a159_0x93c37b(0xe2),'required':![],'description':a159_0x93c37b(0x12e)},{'name':a159_0x93c37b(0x137),'type':a159_0x93c37b(0xe1),'required':![],'default':![],'description':a159_0x93c37b(0x132)},{'name':a159_0x93c37b(0xe8),'type':a159_0x93c37b(0xe2),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a159_0x93c37b(0xfe),'required':!![],'description':a159_0x93c37b(0x11a)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2f4746,_0x4ed586,_0x4b1620){return new CliError(_0x2f4746,0x1,_0x4ed586,_0x4b1620);}export function readNotificationId(_0x59ea3c){const _0x364e5a=a159_0x93c37b,_0x4daafb=_0x59ea3c[_0x364e5a(0x115)]('id');if(!Number[_0x364e5a(0xef)](_0x4daafb)||_0x4daafb<=0x0)throw notificationError(_0x364e5a(0xfd),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x4daafb;}export function requireNotificationExplicitYes(_0x4ff7b5){const _0x15aaac=a159_0x93c37b;if(_0x4ff7b5['bool']('dry-run')||_0x4ff7b5['bool'](_0x15aaac(0x10d)))return;throw notificationError(_0x15aaac(0x128),_0x15aaac(0xd9),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x3f41fe,_0x59f9da=a159_0x93c37b(0x11e),_0x2fa69c=a159_0x93c37b(0x133)){const _0x308825=a159_0x93c37b,_0x4040e1=_0x3f41fe[_0x308825(0xdb)](_0x59f9da)[_0x308825(0x11b)]()||_0x2fa69c;if(!NOTIFICATION_CHANNEL_TYPES[_0x308825(0xe5)](_0x4040e1))throw CliErrors[_0x308825(0xfc)]('Invalid\x20--'+_0x59f9da+':\x20'+_0x4040e1,_0x308825(0x10b)+NOTIFICATION_CHANNEL_TYPES[_0x308825(0x113)](',\x20')+'.');return _0x4040e1;}export function assertSingleNotificationSource(_0x3b5413){const _0x18370c=a159_0x93c37b,_0x306a88=[],_0x592c4b=_0x3b5413[_0x18370c(0xdb)](_0x18370c(0x107))[_0x18370c(0x11b)]();if(_0x592c4b)_0x306a88[_0x18370c(0xcc)]({'kind':_0x18370c(0x107),'path':_0x592c4b});if(_0x3b5413[_0x18370c(0x106)](_0x18370c(0x137)))_0x306a88[_0x18370c(0xcc)]({'kind':'stdin'});const _0x404a60=_0x3b5413[_0x18370c(0xdb)](_0x18370c(0xe8))[_0x18370c(0x11b)]();if(_0x404a60)_0x306a88['push']({'kind':_0x18370c(0x10a),'name':_0x404a60});if(_0x306a88[_0x18370c(0x110)]===0x0)throw CliErrors[_0x18370c(0xfc)]('Missing\x20notification\x20JSON\x20source.',_0x18370c(0x12d));if(_0x306a88[_0x18370c(0x110)]>0x1)throw CliErrors[_0x18370c(0xfc)]('Notification\x20JSON\x20source\x20is\x20ambiguous.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x306a88[0x0];}export async function readNotificationDocument(_0x160f7a,_0x52c58a){const _0x8db358=a159_0x93c37b,_0x2d36ec=assertSingleNotificationSource(_0x160f7a),_0x1ceb9c=_0x2d36ec[_0x8db358(0xc3)]===_0x8db358(0x107)?_0x8db358(0x100)+_0x2d36ec[_0x8db358(0x12f)]:_0x2d36ec[_0x8db358(0xc3)]===_0x8db358(0x10a)?_0x8db358(0x119)+_0x2d36ec[_0x8db358(0xe7)]:_0x8db358(0x137);let _0x43d1e0;try{if(_0x2d36ec[_0x8db358(0xc3)]===_0x8db358(0x107))_0x43d1e0=await readFile(_0x2d36ec['path'],_0x8db358(0xd2));else{if(_0x2d36ec[_0x8db358(0xc3)]===_0x8db358(0x10a)){if(!(_0x2d36ec[_0x8db358(0xe7)]in process.env))throw notificationError(_0x8db358(0xc6),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x2d36ec['name']);_0x43d1e0=process.env[_0x2d36ec.name]??'';}else _0x43d1e0=await readStdin();}}catch(_0x53537e){if(_0x53537e instanceof CliError)throw _0x53537e;throw notificationError(_0x8db358(0xc6),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x1ceb9c+'.');}let _0x35e4bd;try{_0x35e4bd=JSON[_0x8db358(0x103)](_0x43d1e0);}catch{throw notificationError(_0x8db358(0xf6),_0x8db358(0xc5)+_0x1ceb9c+_0x8db358(0x131),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x35e4bd))throw notificationError(_0x8db358(0xf6),_0x8db358(0xc5)+_0x1ceb9c+_0x8db358(0xe9));return validateNotificationDocument(_0x35e4bd,_0x52c58a);}export function projectNotificationListConfig(_0x2bf1da,_0x41259f){const _0x7a60b1=a159_0x93c37b;return{'id':typeof _0x2bf1da['id']==='number'?_0x2bf1da['id']:null,'configCode':requireResponseString(_0x2bf1da[_0x7a60b1(0xca)],_0x7a60b1(0xca),_0x41259f),'configName':requireResponseString(_0x2bf1da['configName'],'configName',_0x41259f),'channelType':requireResponseString(_0x2bf1da[_0x7a60b1(0xc8)],_0x7a60b1(0xc8),_0x41259f),'description':normalizeNullableString(_0x2bf1da[_0x7a60b1(0x123)]),'createTime':normalizeNullableString(_0x2bf1da[_0x7a60b1(0x125)]),'updateTime':normalizeNullableString(_0x2bf1da[_0x7a60b1(0xf7)])};}export function normalizeExactNotificationConfig(_0x416aa9,_0x68f369,_0x4388e0){const _0x3eed9a=a159_0x93c37b;if(!Number['isSafeInteger'](_0x416aa9['id'])||_0x416aa9['id']!==_0x68f369)throw notificationError('notification_config_response_invalid',_0x3eed9a(0xed)+_0x68f369+'.');if(_0x416aa9['appCode']!==_0x4388e0)throw notificationError(_0x3eed9a(0xcf),_0x3eed9a(0x127)+_0x68f369+_0x3eed9a(0x121));const _0x42f778=requireExactString(_0x416aa9[_0x3eed9a(0xc7)],_0x3eed9a(0xc7),_0x68f369),_0x2a86c1=requireExactString(_0x416aa9[_0x3eed9a(0xca)],_0x3eed9a(0xca),_0x68f369),_0x2611bb=requireExactString(_0x416aa9[_0x3eed9a(0xc8)],_0x3eed9a(0xc8),_0x68f369);if(!NOTIFICATION_CHANNEL_TYPES[_0x3eed9a(0xe5)](_0x2611bb))throw notificationError(_0x3eed9a(0xcf),'Notification\x20config\x20'+_0x68f369+_0x3eed9a(0xd3));const _0x1917d0=responseNullableString(_0x416aa9[_0x3eed9a(0x11d)],_0x3eed9a(0x11d),_0x68f369),_0x4add27=responseNullableString(_0x416aa9['channelConfig'],_0x3eed9a(0xe4),_0x68f369),_0x3aeec9=responseNullableString(_0x416aa9[_0x3eed9a(0x123)],_0x3eed9a(0x123),_0x68f369),_0x1d8c29=responseNullableTimeout(_0x416aa9[_0x3eed9a(0xf5)],_0x3eed9a(0xf5),_0x68f369),_0x2cdf42=responseNullableTimeout(_0x416aa9[_0x3eed9a(0x117)],'readTimeout',_0x68f369);return{'id':_0x68f369,'appCode':_0x4388e0,'configCode':_0x2a86c1,'configName':_0x42f778,'channelType':_0x2611bb,'endpointUrl':redactSensitive(_0x1917d0),'channelConfig':redactSensitive(_0x4add27),'description':_0x3aeec9,'connectTimeout':_0x1d8c29,'readTimeout':_0x2cdf42,'endpointUrlRaw':_0x1917d0,'channelConfigRaw':_0x4add27};}export async function requireExactNotificationConfig(_0x46cb1b,_0x43d8a4,_0x4e141b){const _0x4a2233=a159_0x93c37b;let _0x1b007a;try{_0x1b007a=await getNotificationChannelConfig(_0x43d8a4,_0x46cb1b);}catch{throw safeApiFailure(_0x4e141b,'preflight',_0x4a2233(0xf0)+_0x46cb1b+_0x4a2233(0xcb));}return normalizeExactNotificationConfig(_0x1b007a,_0x43d8a4,_0x46cb1b);}export function projectNotificationConfig(_0x3aaf05){const _0x3f32a3=a159_0x93c37b;return{'id':_0x3aaf05['id']??null,'appCode':_0x3aaf05[_0x3f32a3(0xcd)],'configCode':_0x3aaf05[_0x3f32a3(0xca)]??null,'configName':_0x3aaf05[_0x3f32a3(0xc7)],'channelType':_0x3aaf05[_0x3f32a3(0xc8)],'endpointUrl':redactSensitive(_0x3aaf05[_0x3f32a3(0x11d)]),'channelConfig':redactSensitive(_0x3aaf05[_0x3f32a3(0xe4)]),'description':_0x3aaf05[_0x3f32a3(0x123)]??null,'connectTimeout':_0x3aaf05[_0x3f32a3(0xf5)]??null,'readTimeout':_0x3aaf05[_0x3f32a3(0x117)]??null};}export function notificationSelector(_0x382d4d){const _0x5dd9e0=a159_0x93c37b;return{'appCode':_0x382d4d[_0x5dd9e0(0xcd)],'id':_0x382d4d['id'],'configCode':_0x382d4d[_0x5dd9e0(0xca)],'configName':_0x382d4d[_0x5dd9e0(0xc7)],'channelType':_0x382d4d[_0x5dd9e0(0xc8)]};}export function createMutationInput(_0x5802f6,_0x3f1ed4){const _0x217236=a159_0x93c37b;return{'appCode':_0x5802f6,'configName':_0x3f1ed4['configName'],'channelType':_0x3f1ed4[_0x217236(0xc8)],...hasOwn(_0x3f1ed4,_0x217236(0x11d))?{'endpointUrl':_0x3f1ed4[_0x217236(0x11d)]}:{},...hasOwn(_0x3f1ed4,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x3f1ed4[_0x217236(0xe4)])}:{},...hasOwn(_0x3f1ed4,_0x217236(0x123))?{'description':_0x3f1ed4[_0x217236(0x123)]}:{},...hasOwn(_0x3f1ed4,_0x217236(0xf5))?{'connectTimeout':_0x3f1ed4[_0x217236(0xf5)]}:{},...hasOwn(_0x3f1ed4,_0x217236(0x117))?{'readTimeout':_0x3f1ed4[_0x217236(0x117)]}:{}};}export function mergeUpdateInput(_0x1b3db6,_0x370687){const _0x20679d=a159_0x93c37b;return{'id':_0x1b3db6['id'],'appCode':_0x1b3db6[_0x20679d(0xcd)],'configName':_0x370687[_0x20679d(0xc7)]??_0x1b3db6[_0x20679d(0xc7)],'channelType':_0x370687[_0x20679d(0xc8)]??_0x1b3db6['channelType'],'endpointUrl':hasOwn(_0x370687,_0x20679d(0x11d))?_0x370687[_0x20679d(0x11d)]:_0x1b3db6[_0x20679d(0xda)],'channelConfig':hasOwn(_0x370687,_0x20679d(0xe4))?serializeChannelConfig(_0x370687[_0x20679d(0xe4)]):_0x1b3db6['channelConfigRaw'],'description':hasOwn(_0x370687,_0x20679d(0x123))?_0x370687[_0x20679d(0x123)]:_0x1b3db6['description'],'connectTimeout':hasOwn(_0x370687,'connectTimeout')?_0x370687[_0x20679d(0xf5)]:_0x1b3db6['connectTimeout'],'readTimeout':hasOwn(_0x370687,_0x20679d(0x117))?_0x370687[_0x20679d(0x117)]:_0x1b3db6[_0x20679d(0x117)]};}export function plannedUpdateProjection(_0x3f5045,_0x1eae2b){const _0x2a4ae9=a159_0x93c37b;return projectNotificationConfig({'id':_0x3f5045['id'],'appCode':_0x3f5045['appCode'],'configCode':_0x3f5045[_0x2a4ae9(0xca)],'configName':_0x1eae2b[_0x2a4ae9(0xc7)]??_0x3f5045[_0x2a4ae9(0xc7)],'channelType':_0x1eae2b[_0x2a4ae9(0xc8)]??_0x3f5045[_0x2a4ae9(0xc8)],'endpointUrl':hasOwn(_0x1eae2b,'endpointUrl')?_0x1eae2b['endpointUrl']:_0x3f5045[_0x2a4ae9(0xda)],'channelConfig':hasOwn(_0x1eae2b,_0x2a4ae9(0xe4))?_0x1eae2b[_0x2a4ae9(0xe4)]:_0x3f5045['channelConfigRaw'],'description':hasOwn(_0x1eae2b,_0x2a4ae9(0x123))?_0x1eae2b[_0x2a4ae9(0x123)]:_0x3f5045[_0x2a4ae9(0x123)],'connectTimeout':hasOwn(_0x1eae2b,_0x2a4ae9(0xf5))?_0x1eae2b[_0x2a4ae9(0xf5)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x3f5045[_0x2a4ae9(0xf5)],'readTimeout':hasOwn(_0x1eae2b,_0x2a4ae9(0x117))?_0x1eae2b[_0x2a4ae9(0x117)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x3f5045[_0x2a4ae9(0x117)]});}function a159_0x15ed(_0x54944a,_0x3a76a2){_0x54944a=_0x54944a-0xc0;const _0x5528a2=a159_0x5528();let _0x15ed50=_0x5528a2[_0x54944a];return _0x15ed50;}export function requestedSafeFieldsMatch(_0x590c15,_0x4133b1,_0x24c190){const _0x5e7443=a159_0x93c37b,_0x42514e=[],_0x1ad7df=[],_0x230d5a=[];for(const _0x5c1dfc of[_0x5e7443(0xc7),_0x5e7443(0xc8),_0x5e7443(0x123)]){if(!hasOwn(_0x24c190,_0x5c1dfc))continue;_0x230d5a['push'](_0x5c1dfc),_0x42514e[_0x5e7443(0xcc)](_0x4133b1[_0x5c1dfc]===_0x24c190[_0x5c1dfc]),_0x1ad7df['push'](_0x590c15[_0x5c1dfc]!==_0x24c190[_0x5c1dfc]&&_0x4133b1[_0x5c1dfc]===_0x24c190[_0x5c1dfc]);}for(const _0x4875cd of[_0x5e7443(0xf5),_0x5e7443(0x117)]){if(!hasOwn(_0x24c190,_0x4875cd))continue;const _0x748804=_0x24c190[_0x4875cd]??(_0x4875cd===_0x5e7443(0xf5)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x230d5a['push'](_0x4875cd),_0x42514e['push'](_0x4133b1[_0x4875cd]===_0x748804),_0x1ad7df['push'](_0x590c15[_0x4875cd]!==_0x748804&&_0x4133b1[_0x4875cd]===_0x748804);}return hasOwn(_0x24c190,_0x5e7443(0x11d))&&_0x24c190[_0x5e7443(0x11d)]===null&&(_0x230d5a[_0x5e7443(0xcc)](_0x5e7443(0x134)),_0x42514e[_0x5e7443(0xcc)](_0x4133b1[_0x5e7443(0xda)]===null||_0x4133b1[_0x5e7443(0xda)]===''),_0x1ad7df[_0x5e7443(0xcc)](_0x590c15[_0x5e7443(0xda)]!==null&&_0x590c15[_0x5e7443(0xda)]!==''&&(_0x4133b1[_0x5e7443(0xda)]===null||_0x4133b1[_0x5e7443(0xda)]===''))),{'allMatch':_0x42514e[_0x5e7443(0xec)](Boolean),'provesChange':_0x1ad7df['some'](Boolean),'verifiedFields':_0x230d5a};}export function validateNotificationDeleteReadback(_0x19f2c4,_0x4d1ca9,_0x47ca9e){const _0x4a856c=a159_0x93c37b;for(const [_0x27e6e7,_0x3565e2]of _0x19f2c4[_0x4a856c(0xe6)]()){if(!Number[_0x4a856c(0xef)](_0x3565e2['id'])||_0x3565e2['id']<=0x0)throw notificationError(_0x4a856c(0xcf),_0x4a856c(0x139)+(_0x27e6e7+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x3565e2[_0x4a856c(0xcd)]!==_0x4d1ca9)throw notificationError(_0x4a856c(0xcf),'Notification\x20config\x20list\x20item\x20'+(_0x27e6e7+0x1)+_0x4a856c(0xd1));if(_0x3565e2[_0x4a856c(0xc8)]!==_0x47ca9e)throw notificationError(_0x4a856c(0xcf),'Notification\x20config\x20list\x20item\x20'+(_0x27e6e7+0x1)+_0x4a856c(0x11c));}}export function safeApiFailure(_0x55c589,_0x5cfed5,_0x342a93){const _0x3c9354=a159_0x93c37b;return notificationError(_0x3c9354(0x10e)+_0x55c589+'_'+(_0x5cfed5==='mutation'?_0x3c9354(0xf4):_0x5cfed5+'_unavailable'),'Notification\x20config\x20'+_0x55c589+'\x20'+_0x5cfed5+_0x3c9354(0x101),_0x342a93);}export function notificationLookupCommand(_0x321303,_0x524719){const _0x2867e9=a159_0x93c37b;return _0x2867e9(0x12c)+_0x321303+_0x2867e9(0x105)+_0x524719+'\x20--format\x20compress';}function validateNotificationDocument(_0x3f61fb,_0x1ed0d8){const _0x1e7ed7=a159_0x93c37b;for(const _0x5bb6b6 of Object['keys'](_0x3f61fb)){if(FORBIDDEN_IDENTITY_FIELDS[_0x1e7ed7(0xf2)](_0x5bb6b6))throw notificationError(_0x1e7ed7(0xe3),_0x1e7ed7(0x12a)+_0x5bb6b6+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x1e7ed7(0xf2)](_0x5bb6b6))throw notificationError(_0x1e7ed7(0x10c),_0x1e7ed7(0xf8)+_0x5bb6b6+'\x22.');}if(_0x1ed0d8===_0x1e7ed7(0xf9)&&Object[_0x1e7ed7(0xd0)](_0x3f61fb)[_0x1e7ed7(0x110)]===0x0)throw notificationError(_0x1e7ed7(0x109),_0x1e7ed7(0x116));const _0x3b024c={};if(hasOwn(_0x3f61fb,_0x1e7ed7(0xc7)))_0x3b024c[_0x1e7ed7(0xc7)]=validateRequiredString(_0x3f61fb[_0x1e7ed7(0xc7)],'configName',0x80);else{if(_0x1ed0d8===_0x1e7ed7(0xf3))throw notificationError(_0x1e7ed7(0x138),_0x1e7ed7(0xd6)+_0x1e7ed7(0x102));}if(hasOwn(_0x3f61fb,_0x1e7ed7(0xc8))){if(typeof _0x3f61fb[_0x1e7ed7(0xc8)]!==_0x1e7ed7(0xe2))throw invalidFieldType('channelType',_0x1e7ed7(0xe0));const _0x3db2ec=_0x3f61fb[_0x1e7ed7(0xc8)][_0x1e7ed7(0x11b)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x1e7ed7(0xe5)](_0x3db2ec))throw notificationError(_0x1e7ed7(0xd7),_0x1e7ed7(0x120),_0x1e7ed7(0x10b)+NOTIFICATION_CHANNEL_TYPES[_0x1e7ed7(0x113)](',\x20')+'.');_0x3b024c[_0x1e7ed7(0xc8)]=_0x3db2ec;}else{if(_0x1ed0d8===_0x1e7ed7(0xf3))throw notificationError(_0x1e7ed7(0x138),_0x1e7ed7(0xd6)+_0x1e7ed7(0x108));}for(const [_0x360676,_0x15161a]of[[_0x1e7ed7(0x11d),0x200],[_0x1e7ed7(0x123),0x100]]){if(!hasOwn(_0x3f61fb,_0x360676))continue;const _0x2352ea=_0x3f61fb[_0x360676];if(_0x2352ea!==null&&typeof _0x2352ea!==_0x1e7ed7(0xe2))throw invalidFieldType(_0x360676,_0x1e7ed7(0xc2));if(typeof _0x2352ea==='string'&&_0x2352ea[_0x1e7ed7(0x110)]>_0x15161a)throw notificationError(_0x1e7ed7(0xd7),_0x1e7ed7(0x12a)+_0x360676+'\x22\x20cannot\x20exceed\x20'+_0x15161a+_0x1e7ed7(0x135));_0x3b024c[_0x360676]=_0x2352ea;}if(hasOwn(_0x3f61fb,_0x1e7ed7(0xe4))){const _0x2535d1=_0x3f61fb[_0x1e7ed7(0xe4)];if(_0x2535d1===null&&_0x1ed0d8===_0x1e7ed7(0xf3))throw invalidFieldType(_0x1e7ed7(0xe4),_0x1e7ed7(0x104));if(_0x2535d1!==null&&!isJsonObject(_0x2535d1))throw invalidFieldType(_0x1e7ed7(0xe4),_0x1ed0d8==='update'?'a\x20JSON\x20object\x20or\x20null':'a\x20JSON\x20object');_0x2535d1!==null&&validateChannelConfigFields(_0x3b024c[_0x1e7ed7(0xc8)],_0x2535d1),_0x3b024c[_0x1e7ed7(0xe4)]=_0x2535d1;}for(const _0x419536 of['connectTimeout','readTimeout']){if(!hasOwn(_0x3f61fb,_0x419536))continue;const _0x49432f=_0x3f61fb[_0x419536];if(_0x49432f!==null&&(!Number[_0x1e7ed7(0xef)](_0x49432f)||_0x49432f<0x0))throw notificationError(_0x1e7ed7(0xd7),_0x1e7ed7(0x12a)+_0x419536+_0x1e7ed7(0x111));_0x3b024c[_0x419536]=_0x49432f;}return _0x3b024c;}function validateRequiredString(_0x18fb76,_0x52b38d,_0xbd9188){const _0x9237d9=a159_0x93c37b;if(typeof _0x18fb76!==_0x9237d9(0xe2))throw invalidFieldType(_0x52b38d,_0x9237d9(0x126));const _0x577043=_0x18fb76[_0x9237d9(0x11b)]();if(!_0x577043)throw notificationError(_0x9237d9(0xd7),'Notification\x20JSON\x20field\x20\x22'+_0x52b38d+_0x9237d9(0xf1));if(_0x577043[_0x9237d9(0x110)]>_0xbd9188)throw notificationError(_0x9237d9(0xd7),_0x9237d9(0x12a)+_0x52b38d+'\x22\x20cannot\x20exceed\x20'+_0xbd9188+_0x9237d9(0x135));return _0x577043;}function validateChannelConfigFields(_0xa58b23,_0x1a0144){const _0x5f2005=a159_0x93c37b;if(hasOwn(_0x1a0144,'messageTemplate'))throw forbiddenChannelConfigField(_0x5f2005(0x130));if(_0xa58b23===_0x5f2005(0x133))for(const _0x1e9340 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x1a0144,_0x1e9340))throw forbiddenChannelConfigField(_0x1e9340);}}function forbiddenChannelConfigField(_0x24b0d7){const _0x317746=a159_0x93c37b;return notificationError('notification_config_channel_field_forbidden',_0x317746(0xd4)+_0x24b0d7+_0x317746(0xff));}function invalidFieldType(_0x339a64,_0x4104d3){const _0x151530=a159_0x93c37b;return notificationError('notification_config_field_invalid',_0x151530(0x12a)+_0x339a64+_0x151530(0xdd)+_0x4104d3+'.');}function serializeChannelConfig(_0x537fe8){return _0x537fe8===null||_0x537fe8===undefined?null:JSON['stringify'](_0x537fe8);}function redactSensitive(_0x5758f8){const _0x552ce7=a159_0x93c37b;return _0x5758f8===null||_0x5758f8===undefined||_0x5758f8===''?null:_0x552ce7(0xc9);}function requireResponseString(_0x305ac4,_0x23ecdc,_0x276c82){const _0x38e306=a159_0x93c37b;if(typeof _0x305ac4!==_0x38e306(0xe2)||_0x305ac4[_0x38e306(0x11b)]()==='')throw CliErrors['apiError']('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x276c82+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x23ecdc+'\x22.');return _0x305ac4[_0x38e306(0x11b)]();}function requireExactString(_0x4f7a65,_0x2fa02b,_0x1649df){const _0x5b501f=a159_0x93c37b;if(typeof _0x4f7a65!==_0x5b501f(0xe2)||_0x4f7a65['trim']()==='')throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x1649df+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x2fa02b+'\x22.');return _0x4f7a65[_0x5b501f(0x11b)]();}function responseNullableString(_0x210904,_0x51e5fc,_0x15c78c){const _0x444c9f=a159_0x93c37b;if(_0x210904===undefined||_0x210904===null)return null;if(typeof _0x210904!==_0x444c9f(0xe2))throw notificationError(_0x444c9f(0xcf),_0x444c9f(0x127)+_0x15c78c+'\x20has\x20invalid\x20field\x20\x22'+_0x51e5fc+'\x22.');return _0x210904;}function responseNullableTimeout(_0x2eb9d9,_0x256c2b,_0x3f74f5){const _0x37d8aa=a159_0x93c37b;if(_0x2eb9d9===undefined||_0x2eb9d9===null)return null;if(!Number[_0x37d8aa(0xef)](_0x2eb9d9)||_0x2eb9d9<0x0)throw notificationError(_0x37d8aa(0xcf),_0x37d8aa(0x127)+_0x3f74f5+_0x37d8aa(0x11f)+_0x256c2b+'\x22.');return _0x2eb9d9;}function normalizeNullableString(_0x5bdd60){const _0x431d73=a159_0x93c37b;return typeof _0x5bdd60===_0x431d73(0xe2)?_0x5bdd60:null;}function isJsonObject(_0x310a66){const _0x1b9159=a159_0x93c37b;return _0x310a66!==null&&typeof _0x310a66===_0x1b9159(0x12b)&&!Array[_0x1b9159(0x122)](_0x310a66);}function hasOwn(_0x58c380,_0x13da25){const _0x1b96f3=a159_0x93c37b;return Object[_0x1b96f3(0x112)]['hasOwnProperty']['call'](_0x58c380,_0x13da25);}async function readStdin(){const _0x116a0f=a159_0x93c37b;let _0x332bcc='';process[_0x116a0f(0x137)][_0x116a0f(0x10f)](_0x116a0f(0xd2));for await(const _0x4f464e of process['stdin'])_0x332bcc+=_0x4f464e;return _0x332bcc;}
|
|
1
|
+
const a159_0x1be900=a159_0x234c;(function(_0x53fece,_0x54eacf){const _0x30803e=a159_0x234c,_0x1c4d06=_0x53fece();while(!![]){try{const _0x4172d3=parseInt(_0x30803e(0x1dd))/0x1+parseInt(_0x30803e(0x180))/0x2+-parseInt(_0x30803e(0x1cc))/0x3+-parseInt(_0x30803e(0x1ed))/0x4*(parseInt(_0x30803e(0x1e3))/0x5)+-parseInt(_0x30803e(0x17e))/0x6*(-parseInt(_0x30803e(0x1a2))/0x7)+parseInt(_0x30803e(0x1b6))/0x8+-parseInt(_0x30803e(0x1ee))/0x9*(parseInt(_0x30803e(0x19a))/0xa);if(_0x4172d3===_0x54eacf)break;else _0x1c4d06['push'](_0x1c4d06['shift']());}catch(_0xdd5fec){_0x1c4d06['push'](_0x1c4d06['shift']());}}}(a159_0x554d,0x85678));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=[a159_0x1be900(0x1a9),a159_0x1be900(0x1b2),a159_0x1be900(0x1be),'WECOM',a159_0x1be900(0x1e8)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a159_0x1be900(0x1a4),a159_0x1be900(0x199),a159_0x1be900(0x1f9),a159_0x1be900(0x1ba),a159_0x1be900(0x1b9),'connectTimeout','readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a159_0x1be900(0x1cd),a159_0x1be900(0x1fc),a159_0x1be900(0x18e)]),EMAIL_RECIPIENT_FIELDS=new Set([a159_0x1be900(0x1e9),a159_0x1be900(0x1b5),a159_0x1be900(0x1b3),a159_0x1be900(0x1a6),a159_0x1be900(0x1b7),a159_0x1be900(0x1e7),a159_0x1be900(0x192),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a159_0x1be900(0x1a1),'type':a159_0x1be900(0x195),'required':![],'description':a159_0x1be900(0x1c4)},{'name':a159_0x1be900(0x1ae),'type':a159_0x1be900(0x1f4),'required':![],'default':![],'description':a159_0x1be900(0x1f3)},{'name':a159_0x1be900(0x1f7),'type':a159_0x1be900(0x195),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a159_0x1be900(0x1b4),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2754fa,_0x3ad30f,_0x3f9447){return new CliError(_0x2754fa,0x1,_0x3ad30f,_0x3f9447);}export function readNotificationId(_0x5b97a4){const _0x1ccda2=a159_0x1be900,_0x59971b=_0x5b97a4['num']('id');if(!Number[_0x1ccda2(0x1f5)](_0x59971b)||_0x59971b<=0x0)throw notificationError(_0x1ccda2(0x1f8),_0x1ccda2(0x1d2));return _0x59971b;}export function requireNotificationExplicitYes(_0x1dda07){const _0x2d16aa=a159_0x1be900;if(_0x1dda07[_0x2d16aa(0x1e2)](_0x2d16aa(0x1e1))||_0x1dda07[_0x2d16aa(0x1e2)](_0x2d16aa(0x1c3)))return;throw notificationError(_0x2d16aa(0x181),_0x2d16aa(0x200),_0x2d16aa(0x1e6));}export function readNotificationChannelType(_0x11ce31,_0x5533ff=a159_0x1be900(0x1c2),_0x350933=a159_0x1be900(0x1a9)){const _0x13014a=a159_0x1be900,_0xab3ffe=_0x11ce31[_0x13014a(0x1d3)](_0x5533ff)[_0x13014a(0x1eb)]()||_0x350933;if(!NOTIFICATION_CHANNEL_TYPES[_0x13014a(0x19d)](_0xab3ffe))throw CliErrors['validation'](_0x13014a(0x1b8)+_0x5533ff+':\x20'+_0xab3ffe,_0x13014a(0x1fd)+NOTIFICATION_CHANNEL_TYPES[_0x13014a(0x189)](',\x20')+'.');return _0xab3ffe;}export function assertSingleNotificationSource(_0x458cb4){const _0x8f3d10=a159_0x1be900,_0x86558f=[],_0x44eb51=_0x458cb4['str'](_0x8f3d10(0x1a1))['trim']();if(_0x44eb51)_0x86558f[_0x8f3d10(0x1df)]({'kind':_0x8f3d10(0x1a1),'path':_0x44eb51});if(_0x458cb4[_0x8f3d10(0x1e2)](_0x8f3d10(0x1ae)))_0x86558f[_0x8f3d10(0x1df)]({'kind':_0x8f3d10(0x1ae)});const _0x237d21=_0x458cb4[_0x8f3d10(0x1d3)]('from-env')[_0x8f3d10(0x1eb)]();if(_0x237d21)_0x86558f[_0x8f3d10(0x1df)]({'kind':_0x8f3d10(0x196),'name':_0x237d21});if(_0x86558f[_0x8f3d10(0x19b)]===0x0)throw CliErrors[_0x8f3d10(0x1fe)](_0x8f3d10(0x17d),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x86558f[_0x8f3d10(0x19b)]>0x1)throw CliErrors[_0x8f3d10(0x1fe)](_0x8f3d10(0x1ea),_0x8f3d10(0x193));return _0x86558f[0x0];}export async function readNotificationDocument(_0x2db2ca,_0xe81469){const _0x4d2199=a159_0x1be900,_0x1efc3f=assertSingleNotificationSource(_0x2db2ca),_0x35d1be=_0x1efc3f['kind']===_0x4d2199(0x1a1)?_0x4d2199(0x19c)+_0x1efc3f[_0x4d2199(0x1bc)]:_0x1efc3f[_0x4d2199(0x1e0)]==='env'?_0x4d2199(0x1f2)+_0x1efc3f['name']:'stdin';let _0x41e69b;try{if(_0x1efc3f[_0x4d2199(0x1e0)]===_0x4d2199(0x1a1))_0x41e69b=await readFile(_0x1efc3f[_0x4d2199(0x1bc)],_0x4d2199(0x1d6));else{if(_0x1efc3f[_0x4d2199(0x1e0)]===_0x4d2199(0x196)){if(!(_0x1efc3f[_0x4d2199(0x1c1)]in process.env))throw notificationError(_0x4d2199(0x1ad),_0x4d2199(0x1c7)+_0x1efc3f[_0x4d2199(0x1c1)]);_0x41e69b=process.env[_0x1efc3f.name]??'';}else _0x41e69b=await readStdin();}}catch(_0x36b67e){if(_0x36b67e instanceof CliError)throw _0x36b67e;throw notificationError('notification_config_source_unavailable',_0x4d2199(0x1d9)+_0x35d1be+'.');}let _0x3ed399;try{_0x3ed399=JSON[_0x4d2199(0x191)](_0x41e69b);}catch{throw notificationError(_0x4d2199(0x1c9),_0x4d2199(0x18a)+_0x35d1be+_0x4d2199(0x1ff),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x3ed399))throw notificationError(_0x4d2199(0x1c9),'Notification\x20JSON\x20from\x20'+_0x35d1be+_0x4d2199(0x1d1));return validateNotificationDocument(_0x3ed399,_0xe81469);}export function projectNotificationListConfig(_0x561015,_0x27f51c){const _0x4ce445=a159_0x1be900;return{'id':typeof _0x561015['id']===_0x4ce445(0x1b4)?_0x561015['id']:null,'configCode':requireResponseString(_0x561015[_0x4ce445(0x1fc)],_0x4ce445(0x1fc),_0x27f51c),'configName':requireResponseString(_0x561015[_0x4ce445(0x1a4)],_0x4ce445(0x1a4),_0x27f51c),'channelType':requireResponseString(_0x561015['channelType'],_0x4ce445(0x199),_0x27f51c),'description':normalizeNullableString(_0x561015[_0x4ce445(0x1b9)]),'createTime':normalizeNullableString(_0x561015[_0x4ce445(0x198)]),'updateTime':normalizeNullableString(_0x561015['updateTime'])};}export function normalizeExactNotificationConfig(_0xd996f3,_0x127050,_0x83ffb4){const _0x294854=a159_0x1be900;if(!Number[_0x294854(0x1f5)](_0xd996f3['id'])||_0xd996f3['id']!==_0x127050)throw notificationError(_0x294854(0x1cf),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x127050+'.');if(_0xd996f3[_0x294854(0x1cd)]!==_0x83ffb4)throw notificationError('notification_config_response_invalid',_0x294854(0x17c)+_0x127050+_0x294854(0x1db));const _0xeb8623=requireExactString(_0xd996f3[_0x294854(0x1a4)],_0x294854(0x1a4),_0x127050),_0x367e0d=requireExactString(_0xd996f3['configCode'],_0x294854(0x1fc),_0x127050),_0x191541=requireExactString(_0xd996f3['channelType'],_0x294854(0x199),_0x127050);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x191541))throw notificationError(_0x294854(0x1cf),'Notification\x20config\x20'+_0x127050+_0x294854(0x1de));const _0x30548b=responseNullableString(_0xd996f3[_0x294854(0x1f9)],_0x294854(0x1f9),_0x127050),_0x215813=responseNullableString(_0xd996f3[_0x294854(0x1ba)],_0x294854(0x1ba),_0x127050),_0x3a7af4=responseNullableString(_0xd996f3[_0x294854(0x1b9)],'description',_0x127050),_0x3031ec=responseNullableTimeout(_0xd996f3['connectTimeout'],_0x294854(0x1bd),_0x127050),_0xa415f0=responseNullableTimeout(_0xd996f3[_0x294854(0x1fa)],_0x294854(0x1fa),_0x127050);return{'id':_0x127050,'appCode':_0x83ffb4,'configCode':_0x367e0d,'configName':_0xeb8623,'channelType':_0x191541,'endpointUrl':redactSensitive(_0x30548b),'channelConfig':redactSensitive(_0x215813),'description':_0x3a7af4,'connectTimeout':_0x3031ec,'readTimeout':_0xa415f0,'endpointUrlRaw':_0x30548b,'channelConfigRaw':_0x215813};}export async function requireExactNotificationConfig(_0x5e3f01,_0x32528a,_0x55a4f1){const _0x45431c=a159_0x1be900;let _0x545a82;try{_0x545a82=await getNotificationChannelConfig(_0x32528a,_0x5e3f01);}catch{throw safeApiFailure(_0x55a4f1,_0x45431c(0x1e5),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x5e3f01+_0x45431c(0x1a0));}return normalizeExactNotificationConfig(_0x545a82,_0x32528a,_0x5e3f01);}export function projectNotificationConfig(_0x4bc4f1){const _0x449e42=a159_0x1be900;return{'id':_0x4bc4f1['id']??null,'appCode':_0x4bc4f1['appCode'],'configCode':_0x4bc4f1[_0x449e42(0x1fc)]??null,'configName':_0x4bc4f1[_0x449e42(0x1a4)],'channelType':_0x4bc4f1[_0x449e42(0x199)],'endpointUrl':redactSensitive(_0x4bc4f1[_0x449e42(0x1f9)]),'channelConfig':redactSensitive(_0x4bc4f1[_0x449e42(0x1ba)]),'description':_0x4bc4f1['description']??null,'connectTimeout':_0x4bc4f1[_0x449e42(0x1bd)]??null,'readTimeout':_0x4bc4f1[_0x449e42(0x1fa)]??null};}function a159_0x554d(){const _0x486877=['hasOwnProperty','environment\x20variable\x20','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','boolean','isSafeInteger','\x20has\x20an\x20invalid\x20id.','from-env','notification_config_id_invalid','endpointUrl','readTimeout','\x20has\x20invalid\x20field\x20\x22','configCode','Allowed\x20values:\x20','validation','\x20is\x20invalid.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','create','endpointUrlRaw','Notification\x20config\x20','Missing\x20notification\x20JSON\x20source.','30FmZqXv','a\x20non-empty\x20string','1795680SFTeCy','notification_config_confirmation_required','call','rabetbase\x20notification\x20config-list\x20--appcode\x20','prototype','\x20--format\x20compress','a\x20string\x20or\x20null','stringify','\x22\x20is\x20forbidden.','join','Notification\x20JSON\x20from\x20','apiError','Create\x20JSON\x20requires\x20field\x20','channelConfigRaw','channelCode','Unknown\x20notification\x20JSON\x20field\x20\x22','update','parse','fromName','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','notification_config_field_unknown','string','env','isArray','createTime','channelType','40uQuxCg','length','file\x20','includes','keys','has','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','file','543970OPhmwQ','<redacted>','configName','\x22channelType\x22.','bccList','\x20--type\x20','mutation','EMAIL','\x20is\x20missing\x20required\x20field\x20\x22','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','notification_config_update_empty','notification_config_source_unavailable','stdin','\x22\x20must\x20be\x20','notification_config_field_forbidden','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','FEISHU','ccList','number','recipients','5819128MLZpEW','replyTo','Invalid\x20--','description','channelConfig','a\x20JSON\x20object','path','connectTimeout','DINGTALK','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Invalid\x20notification\x20config\x20response.','name','type','yes','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20field\x20\x22','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','a\x20JSON\x20object\x20or\x20null','notification_config_json_invalid','notification_config_field_required','notification_config_channel_field_forbidden','1746123ZaiGgp','appCode','every','notification_config_response_invalid','\x20has\x20an\x20invalid\x20appCode.','\x20must\x20be\x20an\x20object.','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','str','notification_config_field_invalid','\x22configName\x22.','utf8','endpointUrl:null','failed','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Item\x20','813504cPaVPu','\x20has\x20an\x20unsupported\x20channelType.','push','kind','dry-run','bool','1046770gWJXHM','\x20characters.','preflight','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','subjectPrefix','WEBHOOK','emailTargets','Notification\x20JSON\x20source\x20is\x20ambiguous.','trim','Notification\x20JSON\x20channelConfig\x20field\x20\x22','16ozJgcK','1938159FjJEUp','\x22\x20cannot\x20exceed\x20','messageTemplate'];a159_0x554d=function(){return _0x486877;};return a159_0x554d();}export function notificationSelector(_0x54a510){const _0x1f688f=a159_0x1be900;return{'appCode':_0x54a510[_0x1f688f(0x1cd)],'id':_0x54a510['id'],'configCode':_0x54a510[_0x1f688f(0x1fc)],'configName':_0x54a510[_0x1f688f(0x1a4)],'channelType':_0x54a510['channelType']};}export function createMutationInput(_0x430ed1,_0x1c6a1a){const _0x490eb5=a159_0x1be900;return{'appCode':_0x430ed1,'configName':_0x1c6a1a[_0x490eb5(0x1a4)],'channelType':_0x1c6a1a[_0x490eb5(0x199)],...hasOwn(_0x1c6a1a,'endpointUrl')?{'endpointUrl':_0x1c6a1a[_0x490eb5(0x1f9)]}:{},...hasOwn(_0x1c6a1a,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x1c6a1a[_0x490eb5(0x1ba)])}:{},...hasOwn(_0x1c6a1a,_0x490eb5(0x1b9))?{'description':_0x1c6a1a[_0x490eb5(0x1b9)]}:{},...hasOwn(_0x1c6a1a,_0x490eb5(0x1bd))?{'connectTimeout':_0x1c6a1a[_0x490eb5(0x1bd)]}:{},...hasOwn(_0x1c6a1a,'readTimeout')?{'readTimeout':_0x1c6a1a[_0x490eb5(0x1fa)]}:{}};}export function mergeUpdateInput(_0x1315f7,_0x1a1e12){const _0x313858=a159_0x1be900;return{'id':_0x1315f7['id'],'appCode':_0x1315f7[_0x313858(0x1cd)],'configName':_0x1a1e12[_0x313858(0x1a4)]??_0x1315f7[_0x313858(0x1a4)],'channelType':_0x1a1e12[_0x313858(0x199)]??_0x1315f7['channelType'],'endpointUrl':hasOwn(_0x1a1e12,_0x313858(0x1f9))?_0x1a1e12[_0x313858(0x1f9)]:_0x1315f7[_0x313858(0x17b)],'channelConfig':hasOwn(_0x1a1e12,_0x313858(0x1ba))?serializeChannelConfig(_0x1a1e12[_0x313858(0x1ba)]):_0x1315f7['channelConfigRaw'],'description':hasOwn(_0x1a1e12,_0x313858(0x1b9))?_0x1a1e12[_0x313858(0x1b9)]:_0x1315f7[_0x313858(0x1b9)],'connectTimeout':hasOwn(_0x1a1e12,_0x313858(0x1bd))?_0x1a1e12[_0x313858(0x1bd)]:_0x1315f7['connectTimeout'],'readTimeout':hasOwn(_0x1a1e12,_0x313858(0x1fa))?_0x1a1e12[_0x313858(0x1fa)]:_0x1315f7[_0x313858(0x1fa)]};}export function plannedUpdateProjection(_0x36218e,_0x16dd38){const _0x2948aa=a159_0x1be900;return projectNotificationConfig({'id':_0x36218e['id'],'appCode':_0x36218e['appCode'],'configCode':_0x36218e[_0x2948aa(0x1fc)],'configName':_0x16dd38[_0x2948aa(0x1a4)]??_0x36218e[_0x2948aa(0x1a4)],'channelType':_0x16dd38[_0x2948aa(0x199)]??_0x36218e[_0x2948aa(0x199)],'endpointUrl':hasOwn(_0x16dd38,_0x2948aa(0x1f9))?_0x16dd38[_0x2948aa(0x1f9)]:_0x36218e['endpointUrlRaw'],'channelConfig':hasOwn(_0x16dd38,_0x2948aa(0x1ba))?_0x16dd38['channelConfig']:_0x36218e[_0x2948aa(0x18d)],'description':hasOwn(_0x16dd38,'description')?_0x16dd38['description']:_0x36218e[_0x2948aa(0x1b9)],'connectTimeout':hasOwn(_0x16dd38,_0x2948aa(0x1bd))?_0x16dd38[_0x2948aa(0x1bd)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x36218e[_0x2948aa(0x1bd)],'readTimeout':hasOwn(_0x16dd38,'readTimeout')?_0x16dd38[_0x2948aa(0x1fa)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x36218e[_0x2948aa(0x1fa)]});}export function requestedSafeFieldsMatch(_0x193be4,_0x1ba9a6,_0x1c7ac5){const _0x42a0bc=a159_0x1be900,_0x188741=[],_0x32d726=[],_0x1b76e5=[];for(const _0x14bbc7 of[_0x42a0bc(0x1a4),_0x42a0bc(0x199),_0x42a0bc(0x1b9)]){if(!hasOwn(_0x1c7ac5,_0x14bbc7))continue;_0x1b76e5[_0x42a0bc(0x1df)](_0x14bbc7),_0x188741[_0x42a0bc(0x1df)](_0x1ba9a6[_0x14bbc7]===_0x1c7ac5[_0x14bbc7]),_0x32d726[_0x42a0bc(0x1df)](_0x193be4[_0x14bbc7]!==_0x1c7ac5[_0x14bbc7]&&_0x1ba9a6[_0x14bbc7]===_0x1c7ac5[_0x14bbc7]);}for(const _0x151c38 of['connectTimeout','readTimeout']){if(!hasOwn(_0x1c7ac5,_0x151c38))continue;const _0x559017=_0x1c7ac5[_0x151c38]??(_0x151c38===_0x42a0bc(0x1bd)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x1b76e5['push'](_0x151c38),_0x188741[_0x42a0bc(0x1df)](_0x1ba9a6[_0x151c38]===_0x559017),_0x32d726['push'](_0x193be4[_0x151c38]!==_0x559017&&_0x1ba9a6[_0x151c38]===_0x559017);}return hasOwn(_0x1c7ac5,'endpointUrl')&&_0x1c7ac5[_0x42a0bc(0x1f9)]===null&&(_0x1b76e5[_0x42a0bc(0x1df)](_0x42a0bc(0x1d7)),_0x188741[_0x42a0bc(0x1df)](_0x1ba9a6[_0x42a0bc(0x17b)]===null||_0x1ba9a6[_0x42a0bc(0x17b)]===''),_0x32d726[_0x42a0bc(0x1df)](_0x193be4[_0x42a0bc(0x17b)]!==null&&_0x193be4[_0x42a0bc(0x17b)]!==''&&(_0x1ba9a6[_0x42a0bc(0x17b)]===null||_0x1ba9a6[_0x42a0bc(0x17b)]===''))),{'allMatch':_0x188741[_0x42a0bc(0x1ce)](Boolean),'provesChange':_0x32d726['some'](Boolean),'verifiedFields':_0x1b76e5};}export function validateNotificationDeleteReadback(_0x16cea9,_0x5a1469,_0x3a5b07){const _0x198b1d=a159_0x1be900;for(const [_0x1ca107,_0x4568cf]of _0x16cea9['entries']()){if(!Number[_0x198b1d(0x1f5)](_0x4568cf['id'])||_0x4568cf['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x198b1d(0x1c5)+(_0x1ca107+0x1)+_0x198b1d(0x1f6));if(_0x4568cf[_0x198b1d(0x1cd)]!==_0x5a1469)throw notificationError('notification_config_response_invalid',_0x198b1d(0x1c5)+(_0x1ca107+0x1)+_0x198b1d(0x1d0));if(_0x4568cf[_0x198b1d(0x199)]!==_0x3a5b07)throw notificationError('notification_config_response_invalid',_0x198b1d(0x1c5)+(_0x1ca107+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x30ae3b,_0x1e5f99,_0x5854e7){const _0x2abcc8=a159_0x1be900;return notificationError('notification_config_'+_0x30ae3b+'_'+(_0x1e5f99===_0x2abcc8(0x1a8)?_0x2abcc8(0x1d8):_0x1e5f99+'_unavailable'),_0x2abcc8(0x17c)+_0x30ae3b+'\x20'+_0x1e5f99+'\x20failed.',_0x5854e7);}export function notificationLookupCommand(_0x50e02c,_0x13673d){const _0x4959c2=a159_0x1be900;return _0x4959c2(0x183)+_0x50e02c+_0x4959c2(0x1a7)+_0x13673d+_0x4959c2(0x185);}function validateNotificationDocument(_0x96169e,_0x3b8efd){const _0x59ed55=a159_0x1be900;for(const _0x1b5567 of Object[_0x59ed55(0x19e)](_0x96169e)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x1b5567))throw notificationError(_0x59ed55(0x1b0),_0x59ed55(0x1c6)+_0x1b5567+_0x59ed55(0x1bf));if(!ALLOWED_INPUT_FIELDS[_0x59ed55(0x19f)](_0x1b5567))throw notificationError(_0x59ed55(0x194),_0x59ed55(0x18f)+_0x1b5567+'\x22.');}if(_0x3b8efd===_0x59ed55(0x190)&&Object[_0x59ed55(0x19e)](_0x96169e)[_0x59ed55(0x19b)]===0x0)throw notificationError(_0x59ed55(0x1ac),_0x59ed55(0x1b1));const _0x41fc61={};if(hasOwn(_0x96169e,_0x59ed55(0x1a4)))_0x41fc61['configName']=validateRequiredString(_0x96169e[_0x59ed55(0x1a4)],_0x59ed55(0x1a4),0x80);else{if(_0x3b8efd===_0x59ed55(0x17a))throw notificationError(_0x59ed55(0x1ca),_0x59ed55(0x18c)+_0x59ed55(0x1d5));}if(hasOwn(_0x96169e,_0x59ed55(0x199))){if(typeof _0x96169e[_0x59ed55(0x199)]!==_0x59ed55(0x195))throw invalidFieldType(_0x59ed55(0x199),'a\x20supported\x20string');const _0x5afbe4=_0x96169e['channelType'][_0x59ed55(0x1eb)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x59ed55(0x19d)](_0x5afbe4))throw notificationError(_0x59ed55(0x1d4),_0x59ed55(0x1da),_0x59ed55(0x1fd)+NOTIFICATION_CHANNEL_TYPES[_0x59ed55(0x189)](',\x20')+'.');_0x41fc61[_0x59ed55(0x199)]=_0x5afbe4;}else{if(_0x3b8efd==='create')throw notificationError('notification_config_field_required',_0x59ed55(0x18c)+_0x59ed55(0x1a5));}for(const [_0x15ceb6,_0x10a8c4]of[['endpointUrl',0x200],[_0x59ed55(0x1b9),0x100]]){if(!hasOwn(_0x96169e,_0x15ceb6))continue;const _0x2effb6=_0x96169e[_0x15ceb6];if(_0x2effb6!==null&&typeof _0x2effb6!==_0x59ed55(0x195))throw invalidFieldType(_0x15ceb6,_0x59ed55(0x186));if(typeof _0x2effb6===_0x59ed55(0x195)&&_0x2effb6[_0x59ed55(0x19b)]>_0x10a8c4)throw notificationError('notification_config_field_invalid',_0x59ed55(0x1c6)+_0x15ceb6+_0x59ed55(0x1ef)+_0x10a8c4+_0x59ed55(0x1e4));_0x41fc61[_0x15ceb6]=_0x2effb6;}if(hasOwn(_0x96169e,_0x59ed55(0x1ba))){const _0x55dd23=_0x96169e[_0x59ed55(0x1ba)];if(_0x55dd23===null&&_0x3b8efd===_0x59ed55(0x17a))throw invalidFieldType(_0x59ed55(0x1ba),_0x59ed55(0x1bb));if(_0x55dd23!==null&&!isJsonObject(_0x55dd23))throw invalidFieldType('channelConfig',_0x3b8efd===_0x59ed55(0x190)?_0x59ed55(0x1c8):_0x59ed55(0x1bb));_0x55dd23!==null&&validateChannelConfigFields(_0x41fc61['channelType'],_0x55dd23),_0x41fc61[_0x59ed55(0x1ba)]=_0x55dd23;}for(const _0x197d02 of[_0x59ed55(0x1bd),_0x59ed55(0x1fa)]){if(!hasOwn(_0x96169e,_0x197d02))continue;const _0x17f5c7=_0x96169e[_0x197d02];if(_0x17f5c7!==null&&(!Number[_0x59ed55(0x1f5)](_0x17f5c7)||_0x17f5c7<0x0))throw notificationError(_0x59ed55(0x1d4),'Notification\x20JSON\x20field\x20\x22'+_0x197d02+_0x59ed55(0x1ab));_0x41fc61[_0x197d02]=_0x17f5c7;}return _0x41fc61;}function validateRequiredString(_0x245f18,_0x192aa6,_0x568ce8){const _0x4f3613=a159_0x1be900;if(typeof _0x245f18!==_0x4f3613(0x195))throw invalidFieldType(_0x192aa6,_0x4f3613(0x17f));const _0x311cf9=_0x245f18[_0x4f3613(0x1eb)]();if(!_0x311cf9)throw notificationError(_0x4f3613(0x1d4),'Notification\x20JSON\x20field\x20\x22'+_0x192aa6+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x311cf9[_0x4f3613(0x19b)]>_0x568ce8)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x192aa6+_0x4f3613(0x1ef)+_0x568ce8+_0x4f3613(0x1e4));return _0x311cf9;}function validateChannelConfigFields(_0x21fe5d,_0x140d81){const _0x4e8448=a159_0x1be900;if(hasOwn(_0x140d81,_0x4e8448(0x1f0)))throw forbiddenChannelConfigField(_0x4e8448(0x1f0));if(_0x21fe5d==='EMAIL')for(const _0x532bfb of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x140d81,_0x532bfb))throw forbiddenChannelConfigField(_0x532bfb);}}function forbiddenChannelConfigField(_0x19aa6a){const _0xde944=a159_0x1be900;return notificationError(_0xde944(0x1cb),_0xde944(0x1ec)+_0x19aa6a+_0xde944(0x188));}function invalidFieldType(_0x256d33,_0xfc786){const _0x38fbbd=a159_0x1be900;return notificationError(_0x38fbbd(0x1d4),_0x38fbbd(0x1c6)+_0x256d33+_0x38fbbd(0x1af)+_0xfc786+'.');}function serializeChannelConfig(_0x5f219b){const _0x2ba3e0=a159_0x1be900;return _0x5f219b===null||_0x5f219b===undefined?null:JSON[_0x2ba3e0(0x187)](_0x5f219b);}function redactSensitive(_0x4bd774){const _0x53603a=a159_0x1be900;return _0x4bd774===null||_0x4bd774===undefined||_0x4bd774===''?null:_0x53603a(0x1a3);}function requireResponseString(_0x33e614,_0x1306dd,_0x1da656){const _0x960ac5=a159_0x1be900;if(typeof _0x33e614!=='string'||_0x33e614[_0x960ac5(0x1eb)]()==='')throw CliErrors[_0x960ac5(0x18b)](_0x960ac5(0x1c0),_0x960ac5(0x1dc)+(_0x1da656+0x1)+_0x960ac5(0x1aa)+_0x1306dd+'\x22.');return _0x33e614['trim']();}function requireExactString(_0x33da3e,_0x58de10,_0x3b1e4a){const _0x2800f8=a159_0x1be900;if(typeof _0x33da3e!==_0x2800f8(0x195)||_0x33da3e[_0x2800f8(0x1eb)]()==='')throw notificationError(_0x2800f8(0x1cf),_0x2800f8(0x17c)+_0x3b1e4a+_0x2800f8(0x1aa)+_0x58de10+'\x22.');return _0x33da3e[_0x2800f8(0x1eb)]();}function responseNullableString(_0x95ad55,_0x319ec8,_0x5b92f1){const _0x5d0833=a159_0x1be900;if(_0x95ad55===undefined||_0x95ad55===null)return null;if(typeof _0x95ad55!==_0x5d0833(0x195))throw notificationError('notification_config_response_invalid',_0x5d0833(0x17c)+_0x5b92f1+'\x20has\x20invalid\x20field\x20\x22'+_0x319ec8+'\x22.');return _0x95ad55;}function a159_0x234c(_0x20b65e,_0x34836a){_0x20b65e=_0x20b65e-0x17a;const _0x554dc6=a159_0x554d();let _0x234c40=_0x554dc6[_0x20b65e];return _0x234c40;}function responseNullableTimeout(_0x1e7bec,_0x160b95,_0x2871e6){const _0x4170da=a159_0x1be900;if(_0x1e7bec===undefined||_0x1e7bec===null)return null;if(!Number[_0x4170da(0x1f5)](_0x1e7bec)||_0x1e7bec<0x0)throw notificationError(_0x4170da(0x1cf),_0x4170da(0x17c)+_0x2871e6+_0x4170da(0x1fb)+_0x160b95+'\x22.');return _0x1e7bec;}function normalizeNullableString(_0xbdeab5){return typeof _0xbdeab5==='string'?_0xbdeab5:null;}function isJsonObject(_0x5c47c4){const _0x200534=a159_0x1be900;return _0x5c47c4!==null&&typeof _0x5c47c4==='object'&&!Array[_0x200534(0x197)](_0x5c47c4);}function hasOwn(_0x3395fa,_0x5a6b04){const _0x1f4d20=a159_0x1be900;return Object[_0x1f4d20(0x184)][_0x1f4d20(0x1f1)][_0x1f4d20(0x182)](_0x3395fa,_0x5a6b04);}async function readStdin(){const _0x217f8c=a159_0x1be900;let _0x15f9fc='';process[_0x217f8c(0x1ae)]['setEncoding'](_0x217f8c(0x1d6));for await(const _0x5e90f0 of process[_0x217f8c(0x1ae)])_0x15f9fc+=_0x5e90f0;return _0x15f9fc;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a160_0x203187=a160_0x5d81;(function(_0x52b8c4,_0x5931e5){const _0x2e58e6=a160_0x5d81,_0x2c4bf2=_0x52b8c4();while(!![]){try{const _0x592a95=parseInt(_0x2e58e6(0x21d))/0x1+-parseInt(_0x2e58e6(0x20d))/0x2*(-parseInt(_0x2e58e6(0x224))/0x3)+parseInt(_0x2e58e6(0x220))/0x4*(-parseInt(_0x2e58e6(0x218))/0x5)+-parseInt(_0x2e58e6(0x1ff))/0x6*(-parseInt(_0x2e58e6(0x1f4))/0x7)+-parseInt(_0x2e58e6(0x1fd))/0x8+-parseInt(_0x2e58e6(0x202))/0x9+parseInt(_0x2e58e6(0x216))/0xa*(parseInt(_0x2e58e6(0x1f6))/0xb);if(_0x592a95===_0x5931e5)break;else _0x2c4bf2['push'](_0x2c4bf2['shift']());}catch(_0x102e89){_0x2c4bf2['push'](_0x2c4bf2['shift']());}}}(a160_0x148b,0xaef81));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a160_0x5d81(_0x1c4731,_0x35c67b){_0x1c4731=_0x1c4731-0x1f1;const _0x148b49=a160_0x148b();let _0x5d8147=_0x148b49[_0x1c4731];return _0x5d8147;}const SUPPORTED_SCENES=['invoice',a160_0x203187(0x1f5),a160_0x203187(0x1fe),a160_0x203187(0x1f1)],SCENE_TO_LEGACY_TYPE={'invoice':a160_0x203187(0x209),'general':a160_0x203187(0x20c),'form':'Table','idCard':a160_0x203187(0x211)},SCENE_FLAG={'name':a160_0x203187(0x1fc),'type':a160_0x203187(0x1f7),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':'image-file','type':'string','description':a160_0x203187(0x212)},IMAGE_URL_FLAG={'name':a160_0x203187(0x1f8),'type':a160_0x203187(0x1f7),'description':a160_0x203187(0x210)};function normalizeScene(_0x270cf2){const _0x2d3d1e=a160_0x203187,_0x357349=_0x270cf2[_0x2d3d1e(0x20b)]()['toLowerCase']();if(_0x357349==='idcard')return _0x2d3d1e(0x1f1);if(_0x357349===_0x2d3d1e(0x217)||_0x357349===_0x2d3d1e(0x1f5)||_0x357349===_0x2d3d1e(0x1fe))return _0x357349;throw CliErrors[_0x2d3d1e(0x21e)](_0x2d3d1e(0x20e)+_0x270cf2+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x2d3d1e(0x213)](',\x20'));}function a160_0x148b(){const _0x36a812=['read','fileName','/smartapi/common/queryFileUrl','Invoice','appCode','trim','General','11204SOWTYl','Unsupported\x20OCR\x20scene:\x20','File\x20URL\x20response\x20missing\x20fileUrl.','Publicly\x20accessible\x20image\x20or\x20file\x20URL','IdCard','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','join','imageFile','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','1540oywLgk','invoice','207960iQoLeK','/smartapi/common/uploadFile','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','/smartapi/ocr/recognize-text','POST','375353oSqgmx','validation','\x20OCR\x20from\x20URL','36WkStmv','ocr','count','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','558WiutpH','imageUrl','filter','idCard','length','filePath','7RHOKhI','general','48466NUFMYP','string','image-url','GET','image-file','fileUrl','scene','5227424RXMVzl','form','6159174wPBmUL','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','apiError','12401541JQKFPr','\x20OCR','File\x20upload\x20response\x20missing\x20filePath.','str'];a160_0x148b=function(){return _0x36a812;};return a160_0x148b();}function selectedInputs(_0x6e3889){const _0xe21e7e=a160_0x203187,_0x5e921d=_0x6e3889[_0xe21e7e(0x205)](_0xe21e7e(0x1fa))[_0xe21e7e(0x20b)](),_0x478d1d=_0x6e3889[_0xe21e7e(0x205)](_0xe21e7e(0x1f8))[_0xe21e7e(0x20b)]();return{'imageFile':_0x5e921d,'imageUrl':_0x478d1d,'count':[_0x5e921d,_0x478d1d][_0xe21e7e(0x226)](Boolean)[_0xe21e7e(0x1f2)]};}function validateInputSelection(_0x23e174){const _0xce0125=a160_0x203187,_0x437b67=selectedInputs(_0x23e174);if(_0x437b67[_0xce0125(0x222)]!==0x1)throw CliErrors[_0xce0125(0x21e)](_0xce0125(0x21a));return _0x437b67;}function withScene(_0x589dca,_0x3e4597,_0x2bfd62){const _0x4d5f9a=a160_0x203187;return{..._0x589dca,'scene':_0x3e4597,..._0x2bfd62?{'sourceFile':{'fileName':_0x2bfd62[_0x4d5f9a(0x207)],'filePath':_0x2bfd62[_0x4d5f9a(0x1f3)]}}:{}};}const ocrRecognize={'service':a160_0x203187(0x221),'command':'recognize','description':a160_0x203187(0x200),'risk':a160_0x203187(0x206),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x1b9536){const _0x56e408=a160_0x203187,_0x2d083d=normalizeScene(_0x1b9536[_0x56e408(0x205)]('scene')),_0x3ebc66=SCENE_TO_LEGACY_TYPE[_0x2d083d],_0x364fa9=validateInputSelection(_0x1b9536);if(_0x364fa9[_0x56e408(0x225)]){const _0x14e7c0=new URLSearchParams({'url':_0x364fa9['imageUrl'],'type':_0x3ebc66,'appCode':_0x1b9536['appCode']});return{'method':_0x56e408(0x1f9),'url':'/smartapi/ocr/recognize-text?'+_0x14e7c0['toString'](),'description':'Preview:\x20recognize\x20'+_0x2d083d+_0x56e408(0x21f)};}const _0x2c1eb2=requireDevelopmentUploadFile(_0x364fa9[_0x56e408(0x214)],_0x56e408(0x1fa));return{'method':_0x56e408(0x21c),'url':_0x56e408(0x219),'body':{'steps':[{'method':_0x56e408(0x21c),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x1b9536[_0x56e408(0x20a)],'multipart':{'file':_0x2c1eb2}}},{'method':'POST','url':_0x56e408(0x208),'body':{'filePath':_0x56e408(0x215),'downloadFlag':![]}},{'method':'GET','url':_0x56e408(0x21b),'query':{'appCode':_0x1b9536[_0x56e408(0x20a)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x3ebc66}}]},'description':_0x56e408(0x223)+_0x2d083d+_0x56e408(0x203)};},async 'execute'(_0x3b9cdc){const _0x3de4d1=a160_0x203187,_0x232dde=normalizeScene(_0x3b9cdc[_0x3de4d1(0x205)](_0x3de4d1(0x1fc))),_0x1582b0=SCENE_TO_LEGACY_TYPE[_0x232dde],_0x5f4ba7=validateInputSelection(_0x3b9cdc);if(_0x5f4ba7[_0x3de4d1(0x225)]){const _0x412982=await recognizeDevelopmentOcr(_0x3b9cdc[_0x3de4d1(0x20a)],{'url':_0x5f4ba7[_0x3de4d1(0x225)],'type':_0x1582b0});return{'ok':!![],'data':withScene(_0x412982,_0x232dde)};}const _0x4c34c0=requireDevelopmentUploadFile(_0x5f4ba7[_0x3de4d1(0x214)],_0x3de4d1(0x1fa)),_0x98b80b=await uploadDevelopmentFile(_0x3b9cdc[_0x3de4d1(0x20a)],_0x4c34c0['path']);if(!_0x98b80b[_0x3de4d1(0x1f3)])throw CliErrors['apiError'](_0x3de4d1(0x204));const _0x6d62c=await queryDevelopmentFileUrl(_0x98b80b[_0x3de4d1(0x1f3)],{'download':![]});if(!_0x6d62c[_0x3de4d1(0x1fb)])throw CliErrors[_0x3de4d1(0x201)](_0x3de4d1(0x20f));const _0x41cb87=await recognizeDevelopmentOcr(_0x3b9cdc['appCode'],{'url':_0x6d62c[_0x3de4d1(0x1fb)],'type':_0x1582b0});return{'ok':!![],'data':withScene(_0x41cb87,_0x232dde,_0x98b80b)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x4190c3=a161_0x48cc;(function(_0x3f7239,_0x142d07){const _0x36499d=a161_0x48cc,_0x4e93a6=_0x3f7239();while(!![]){try{const _0x1b03a3=-parseInt(_0x36499d(0x125))/0x1*(parseInt(_0x36499d(0x112))/0x2)+parseInt(_0x36499d(0x107))/0x3*(-parseInt(_0x36499d(0x102))/0x4)+-parseInt(_0x36499d(0x105))/0x5*(parseInt(_0x36499d(0x108))/0x6)+-parseInt(_0x36499d(0x130))/0x7*(parseInt(_0x36499d(0x11e))/0x8)+-parseInt(_0x36499d(0x11c))/0x9*(-parseInt(_0x36499d(0x136))/0xa)+parseInt(_0x36499d(0x123))/0xb+parseInt(_0x36499d(0x135))/0xc*(parseInt(_0x36499d(0x100))/0xd);if(_0x1b03a3===_0x142d07)break;else _0x4e93a6['push'](_0x4e93a6['shift']());}catch(_0x5c34d1){_0x4e93a6['push'](_0x4e93a6['shift']());}}}(a161_0x1fbf,0x42b63));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 a161_0x1fbf(){const _0xa49662=['6952QsfAvl','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','keys','toLowerCase','write','2594152ySKFdx','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','1gaxftC','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','stringify','values','.json','page.create','object','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','trim','Custom\x20Page\x20pattern\x20not\x20found:\x20','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','623iVjKER','page-type','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','str','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','10404xQddUu','1560ydTseH','page-pattern','pageName','Invalid\x20Custom\x20Page\x20pattern:\x20','parse','isNaN','CUSTOM','Custom_page_','includes','page\x20create\x20does\x20not\x20accept\x20--page-type.','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','name','apiError','pageName\x20cannot\x20exceed\x20100\x20characters.','pageId','DASHBOARD','../../../templates/custom-pages','1781eHyRpA','appCode','8DzbKMP','/smartapi/webcode/page/create','\x20and\x20its\x20menu\x20entry.','6145aejIrb','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','49551rEmqjP','1284GeoztQ','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','create','files','string','BLANK','validation','Would\x20create\x20Custom\x20Page\x20','Created\x20Custom\x20Page\x20','parent-menu-id','195022QCCPIY','length','isArray','parentMenuId','page-dir','now','isInteger','menuPath','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','num','22473dHANdY','utf8'];a161_0x1fbf=function(){return _0xa49662;};return a161_0x1fbf();}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a161_0x4190c3(0x10d),'ONEPAGE',a161_0x4190c3(0xfe)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a161_0x4190c3(0xff));export const pageCreate={'service':'page','command':a161_0x4190c3(0x10a),'description':a161_0x4190c3(0x109),'risk':a161_0x4190c3(0x122),'defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a161_0x4190c3(0x131),'message':a161_0x4190c3(0xf8),'hint':a161_0x4190c3(0xf9)},{'name':'page-content','message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a161_0x4190c3(0x134)}],'flags':[{'name':a161_0x4190c3(0xfa),'type':'string','description':'Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)'},{'name':a161_0x4190c3(0x111),'type':'number','description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':a161_0x4190c3(0x137),'type':a161_0x4190c3(0x10c),'description':a161_0x4190c3(0x132),'enum':CUSTOM_PAGE_PATTERNS},{'name':a161_0x4190c3(0x116),'type':'string','description':a161_0x4190c3(0x11a)},APPCODE_FLAG],async 'validate'(_0x24b1fb){await readValidatedPageSource(_0x24b1fb);},async 'dryRun'(_0xe634bd){const _0x266dd2=a161_0x4190c3,_0x3144a7=readInput(_0xe634bd,await readValidatedPageSource(_0xe634bd));return{'method':'POST','url':_0x266dd2(0x103),'body':{'appCode':_0x3144a7[_0x266dd2(0x101)],'pageName':_0x3144a7[_0x266dd2(0x138)],..._0x3144a7['parentMenuId']!=null?{'parentMenuId':_0x3144a7[_0x266dd2(0x115)]}:{},'createMenu':_0x3144a7['createMenu'],'codeContent':_0x3144a7[_0x266dd2(0x10b)]},'description':_0x266dd2(0x10f)+JSON[_0x266dd2(0x127)](_0x3144a7[_0x266dd2(0x138)])+_0x266dd2(0x104)};},async 'execute'(_0x1213de){const _0x108cef=a161_0x4190c3,_0x26c8cb=readInput(_0x1213de,await readValidatedPageSource(_0x1213de)),_0x4dc84b=await createCustomPage(_0x26c8cb);if(!Number[_0x108cef(0x118)](_0x4dc84b[_0x108cef(0xfd)])||_0x4dc84b[_0x108cef(0xfd)]<=0x0)throw CliErrors[_0x108cef(0xfb)](_0x108cef(0x12c));const _0x2a88ad=buildCustomPageDevelopmentUrl(_0x26c8cb[_0x108cef(0x101)],_0x4dc84b['menuPath']),_0x5f4ed6=buildCustomPageEditUrl(_0x26c8cb['appCode'],_0x4dc84b[_0x108cef(0xfd)]);return{'ok':!![],'data':{'operation':_0x108cef(0x12a),'pageType':_0x108cef(0xf5),'pagePattern':readPagePattern(_0x1213de),'selector':{'appCode':_0x26c8cb[_0x108cef(0x101)],'pageName':_0x26c8cb['pageName']},'before':null,'after':{'pageId':_0x4dc84b[_0x108cef(0xfd)],'pageName':_0x4dc84b[_0x108cef(0x138)],'appCode':_0x4dc84b[_0x108cef(0x101)],'version':_0x4dc84b['version'],'menuId':_0x4dc84b['menuId'],'menuPath':_0x4dc84b[_0x108cef(0x119)],'files':_0x4dc84b[_0x108cef(0x10b)]??Object[_0x108cef(0x120)](_0x26c8cb[_0x108cef(0x10b)])},'dryRun':![],'request':_0x26c8cb,..._0x2a88ad?{'pageUrl':_0x2a88ad}:{},..._0x5f4ed6?{'editPageUrl':_0x5f4ed6}:{},'warnings':_0x2a88ad?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x108cef(0x110)+_0x4dc84b[_0x108cef(0xfd)]+'.'};}};function readPagePattern(_0x24dfc4){const _0x44c744=a161_0x4190c3,_0x228285=_0x24dfc4[_0x44c744(0x133)](_0x44c744(0x137))[_0x44c744(0x12d)](),_0x272abb=_0x24dfc4['str'](_0x44c744(0x116))['trim']();if(_0x228285&&_0x272abb)throw CliErrors[_0x44c744(0x10e)](_0x44c744(0x124));if(_0x272abb)return null;if(!_0x228285)throw CliErrors[_0x44c744(0x10e)](_0x44c744(0x126));if(!CUSTOM_PAGE_PATTERNS[_0x44c744(0xf7)](_0x228285))throw CliErrors[_0x44c744(0x10e)](_0x44c744(0x106));return _0x228285;}async function readPageSource(_0x1a118e){const _0x4be621=a161_0x4190c3,_0x37d5e3=_0x1a118e['str']('page-dir')['trim'](),_0x1dc230=readPagePattern(_0x1a118e);if(_0x1dc230===null){const _0xa86b1b=await readCustomPageDirectory(_0x37d5e3);if(Object['keys'](_0xa86b1b)[_0x4be621(0x113)]===0x0)throw CliErrors[_0x4be621(0x10e)](_0x4be621(0x11f));return _0xa86b1b;}let _0x4bd169;try{_0x4bd169=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x1dc230[_0x4be621(0x121)]()+_0x4be621(0x129)),_0x4be621(0x11d));}catch{throw CliErrors['validation'](_0x4be621(0x12e)+_0x1dc230+'.');}let _0x4742fd;try{_0x4742fd=JSON[_0x4be621(0xf3)](_0x4bd169);}catch{throw CliErrors[_0x4be621(0x10e)](_0x4be621(0xf2)+_0x1dc230+'.');}if(!_0x4742fd||typeof _0x4742fd!==_0x4be621(0x12b)||Array[_0x4be621(0x114)](_0x4742fd)||Object[_0x4be621(0x128)](_0x4742fd)['some'](_0x4cd06d=>typeof _0x4cd06d!==_0x4be621(0x10c)))throw CliErrors['validation'](_0x4be621(0xf2)+_0x1dc230+'.');return _0x4742fd;}function a161_0x48cc(_0x1eb892,_0x2d3aff){_0x1eb892=_0x1eb892-0xf2;const _0x1fbf38=a161_0x1fbf();let _0x48cc1f=_0x1fbf38[_0x1eb892];return _0x48cc1f;}async function readValidatedPageSource(_0xcb292d){const _0x187134=await readPageSource(_0xcb292d);return await validateCustomPageContent(_0x187134),_0x187134;}function readInput(_0x48f41a,_0x1aa2e6){const _0x3ed28d=a161_0x4190c3,_0x23a889=_0x48f41a[_0x3ed28d(0x133)](_0x3ed28d(0xfa))['trim']()||_0x3ed28d(0xf6)+Date[_0x3ed28d(0x117)]();if(_0x23a889['length']>0x64)throw CliErrors[_0x3ed28d(0x10e)](_0x3ed28d(0xfc));const _0x4d34b5=_0x48f41a[_0x3ed28d(0x11b)](_0x3ed28d(0x111),NaN),_0x3486d5=!Number[_0x3ed28d(0xf4)](_0x4d34b5);if(_0x3486d5&&(!Number[_0x3ed28d(0x118)](_0x4d34b5)||_0x4d34b5<=0x0))throw CliErrors[_0x3ed28d(0x10e)](_0x3ed28d(0x12f));return{'appCode':_0x48f41a[_0x3ed28d(0x101)],'pageName':_0x23a889,..._0x3486d5?{'parentMenuId':_0x4d34b5}:{},'createMenu':!![],'files':_0x1aa2e6};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a162_0x1d47(_0x1b7e46,_0x517d66){_0x1b7e46=_0x1b7e46-0xba;const _0xe04211=a162_0xe042();let _0x1d47a5=_0xe04211[_0x1b7e46];return _0x1d47a5;}const a162_0x566be1=a162_0x1d47;(function(_0x5adbe9,_0x1e35a9){const _0x193dd7=a162_0x1d47,_0x4956ff=_0x5adbe9();while(!![]){try{const _0x5480ac=-parseInt(_0x193dd7(0xbd))/0x1*(-parseInt(_0x193dd7(0xcd))/0x2)+parseInt(_0x193dd7(0xd3))/0x3+-parseInt(_0x193dd7(0xc0))/0x4+-parseInt(_0x193dd7(0xba))/0x5+parseInt(_0x193dd7(0xc2))/0x6*(-parseInt(_0x193dd7(0xc6))/0x7)+-parseInt(_0x193dd7(0xca))/0x8+-parseInt(_0x193dd7(0xbe))/0x9*(-parseInt(_0x193dd7(0xcc))/0xa);if(_0x5480ac===_0x1e35a9)break;else _0x4956ff['push'](_0x4956ff['shift']());}catch(_0x3ddebf){_0x4956ff['push'](_0x4956ff['shift']());}}}(a162_0xe042,0x481c5));import{getCustomPageSource}from'../../../core/api-client.js';function a162_0xe042(){const _0x575148=['9ZezqIm','trim','2176660nHqytm','Custom\x20Page\x20ID','918906HGkDSN','getMinutes','getSeconds','str','21jcfJrl','appCode','join','read','2716136rcULBn','getMonth','10157800iUjzdD','595328PySrWh','number','cookie','appcode','getFullYear','custom-detail','1601430CuwNTz','pageCode','getTime','page','1043770xTipTQ','Retrieved\x20Custom\x20Page\x20','padStart','1nqfcGv'];a162_0xe042=function(){return _0x575148;};return a162_0xe042();}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a162_0x566be1(0xd6),'command':a162_0x566be1(0xd2),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a162_0x566be1(0xc9),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a162_0x566be1(0xce),'required':!![],'description':a162_0x566be1(0xc1)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1b8b7e){readCustomPageId(_0x1b8b7e);},async 'execute'(_0x4a3629){const _0x597217=a162_0x566be1,_0x4eb581=readCustomPageId(_0x4a3629),_0x43b1e5=await getCustomPageSource(_0x4eb581),{bundle:_0x28b67c,createTime:_0x3a0592,updateTime:_0x2c9313,..._0x57faad}=_0x43b1e5,_0x5f08e0=_0x43b1e5['id']??_0x4eb581,_0x410382=_0x43b1e5[_0x597217(0xc7)]?.[_0x597217(0xbf)]()||_0x4a3629[_0x597217(0xc5)](_0x597217(0xd0))[_0x597217(0xbf)](),_0x43a81d=buildCustomPageRuntimeUrl(_0x410382,_0x43b1e5[_0x597217(0xd4)]),_0x37b3d9=buildCustomPageEditUrl(_0x410382,_0x5f08e0),_0xd1b406=await resolveCustomPageDevelopmentUrl(_0x410382,_0x5f08e0,_0x4a3629[_0x597217(0xcf)]);return{'ok':!![],'data':{..._0x57faad,..._0x43a81d?{'runtimePageUrl':_0x43a81d}:{},..._0xd1b406?{'pageUrl':_0xd1b406}:{},..._0x37b3d9?{'editPageUrl':_0x37b3d9}:{},..._0x3a0592==null?{}:{'createTime':formatTime(_0x3a0592)},..._0x2c9313==null?{}:{'updateTime':formatTime(_0x2c9313)}},'message':_0x597217(0xbb)+_0x4eb581+'.'};}};function formatTime(_0x41f3e4){const _0x1d9686=a162_0x566be1,_0x2cb8db=new Date(_0x41f3e4);if(Number['isNaN'](_0x2cb8db[_0x1d9686(0xd5)]()))return String(_0x41f3e4);const _0x26454c=[_0x2cb8db[_0x1d9686(0xd1)](),String(_0x2cb8db[_0x1d9686(0xcb)]()+0x1)[_0x1d9686(0xbc)](0x2,'0'),String(_0x2cb8db['getDate']())['padStart'](0x2,'0')][_0x1d9686(0xc8)]('-'),_0x49d512=[String(_0x2cb8db['getHours']())[_0x1d9686(0xbc)](0x2,'0'),String(_0x2cb8db[_0x1d9686(0xc3)]())[_0x1d9686(0xbc)](0x2,'0'),String(_0x2cb8db[_0x1d9686(0xc4)]())[_0x1d9686(0xbc)](0x2,'0')][_0x1d9686(0xc8)](':');return _0x26454c+'\x20'+_0x49d512;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a163_0x8b8f9=a163_0x3104;(function(_0x5de3ae,_0x54feef){const _0x26e3c4=a163_0x3104,_0x4c45ea=_0x5de3ae();while(!![]){try{const _0x328422=-parseInt(_0x26e3c4(0x7c))/0x1+parseInt(_0x26e3c4(0x83))/0x2+-parseInt(_0x26e3c4(0x74))/0x3+-parseInt(_0x26e3c4(0x75))/0x4+parseInt(_0x26e3c4(0x85))/0x5*(parseInt(_0x26e3c4(0x7d))/0x6)+parseInt(_0x26e3c4(0x81))/0x7*(-parseInt(_0x26e3c4(0x86))/0x8)+parseInt(_0x26e3c4(0x80))/0x9;if(_0x328422===_0x54feef)break;else _0x4c45ea['push'](_0x4c45ea['shift']());}catch(_0x3ff6c6){_0x4c45ea['push'](_0x4c45ea['shift']());}}}(a163_0xd1a3,0xe8982));function a163_0xd1a3(){const _0xe2126a=['flatMap','label','28702809jvkFRw','3020143WSJsnf','pageId','2004458vpfIaE','appCode','4650CeoMyw','24KUShly','Found\x20','\x20Custom\x20Page(s).','No\x20Custom\x20Pages\x20found.','custom-list','length','575985rIRkLL','4485304jXJcBR','cookie','react','menus','page','path','read','863556YLAUED','1500IXSgSt'];a163_0xd1a3=function(){return _0xe2126a;};return a163_0xd1a3();}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a163_0x3104(_0x24813d,_0x553d69){_0x24813d=_0x24813d-0x70;const _0xd1a3ce=a163_0xd1a3();let _0x310411=_0xd1a3ce[_0x24813d];return _0x310411;}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a163_0x8b8f9(0x79),'command':a163_0x8b8f9(0x72),'description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':a163_0x8b8f9(0x7b),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2ffe5c){const _0x23c5cb=a163_0x8b8f9,_0x3a53e7=(await fetchMenuSnapshot(_0x2ffe5c['appCode'],_0x2ffe5c[_0x23c5cb(0x76)]))[_0x23c5cb(0x78)][_0x23c5cb(0x7e)](_0x4e3224=>{const _0x3a6247=_0x23c5cb;if(_0x4e3224['type']!==_0x3a6247(0x77)||_0x4e3224[_0x3a6247(0x82)]==null)return[];const _0xb3a8db=buildCustomPageDevelopmentUrl(_0x2ffe5c[_0x3a6247(0x84)],_0x4e3224[_0x3a6247(0x7a)]),_0x13e212=buildCustomPageEditUrl(_0x2ffe5c[_0x3a6247(0x84)],_0x4e3224['pageId']);return[{'pageId':_0x4e3224[_0x3a6247(0x82)],'label':_0x4e3224[_0x3a6247(0x7f)],..._0xb3a8db?{'pageUrl':_0xb3a8db}:{},..._0x13e212?{'editPageUrl':_0x13e212}:{}}];});return{'ok':!![],'data':{'pages':_0x3a53e7},'message':_0x3a53e7[_0x23c5cb(0x73)]===0x0?_0x23c5cb(0x71):_0x23c5cb(0x87)+_0x3a53e7[_0x23c5cb(0x73)]+_0x23c5cb(0x70)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a164_0x46c959=a164_0x11d0;(function(_0x56634f,_0x162198){const _0x5878c0=a164_0x11d0,_0x3425dc=_0x56634f();while(!![]){try{const _0x99b8d7=-parseInt(_0x5878c0(0xa6))/0x1+parseInt(_0x5878c0(0x9c))/0x2*(parseInt(_0x5878c0(0x99))/0x3)+parseInt(_0x5878c0(0xbb))/0x4+-parseInt(_0x5878c0(0xbd))/0x5*(-parseInt(_0x5878c0(0x97))/0x6)+parseInt(_0x5878c0(0x98))/0x7*(parseInt(_0x5878c0(0xa4))/0x8)+-parseInt(_0x5878c0(0xa8))/0x9+parseInt(_0x5878c0(0x9f))/0xa*(-parseInt(_0x5878c0(0xa5))/0xb);if(_0x99b8d7===_0x162198)break;else _0x3425dc['push'](_0x3425dc['shift']());}catch(_0x5ad3e7){_0x3425dc['push'](_0x3425dc['shift']());}}}(a164_0xd823,0xda6cf));function a164_0x11d0(_0xc7fa0b,_0x105ff6){_0xc7fa0b=_0xc7fa0b-0x96;const _0xd8238b=a164_0xd823();let _0x11d074=_0xd8238b[_0xc7fa0b];return _0x11d074;}import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a164_0xd823(){const _0x330ff1=['1446gUpjgR','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','write','40806910xvotfw','Optional\x20publish\x20remark','remark','warnings','page.custom-publish','1256yvWCbx','11mlAgBv','40025SzwcxZ','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','12198087ZzxblK','unknown','cookie','FORMAL','runtimePageUrl','number','pageId','compress','/smartapi/webcode/file/publish','Custom\x20Page\x20ID','str','trim','apiError','push','appCode','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','Would\x20publish\x20Custom\x20Page\x20','5022568xuOYED','isInteger','147165RgJAjF','Published\x20Custom\x20Page\x20','336DhwbNs','77497LjNxhH','7173ZBMSYz','custom-publish','status'];a164_0xd823=function(){return _0x330ff1;};return a164_0xd823();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':'page','command':a164_0x46c959(0x9a),'description':a164_0x46c959(0xa7),'risk':a164_0x46c959(0x9e),'defaultOutputFormat':a164_0x46c959(0xaf),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a164_0x46c959(0xad),'required':!![],'description':a164_0x46c959(0xb1)},{'name':a164_0x46c959(0xa1),'type':'string','description':a164_0x46c959(0xa0)}],async 'validate'(_0x4a7891){readCustomPageId(_0x4a7891);},async 'dryRun'(_0xb09bfe){const _0x11c9a6=a164_0x46c959,_0x53914f=readInput(_0xb09bfe);return{'method':'POST','url':_0x11c9a6(0xb0),'body':{'id':_0x53914f[_0x11c9a6(0xae)],..._0x53914f['remark']?{'remark':_0x53914f['remark']}:{}},'description':_0x11c9a6(0xba)+_0x53914f['pageId']+'.'};},async 'execute'(_0xe82772){const _0x46417c=a164_0x46c959,_0x18bb0d=readInput(_0xe82772);await getCustomPageSource(_0x18bb0d[_0x46417c(0xae)]);const _0x5d3e76=await publishCustomPage(_0x18bb0d);if(!Number[_0x46417c(0xbc)](_0x5d3e76)||_0x5d3e76!==_0x18bb0d[_0x46417c(0xae)])throw CliErrors[_0x46417c(0xb4)](_0x46417c(0x9d));const _0x427442=await getCustomPageSource(_0x18bb0d[_0x46417c(0xae)]);if(_0x427442['status']!=='FORMAL')throw CliErrors[_0x46417c(0xb4)](_0x46417c(0xb7)+(_0x427442[_0x46417c(0x9b)]??_0x46417c(0xa9))+'.');const _0x47a049=_0x427442[_0x46417c(0xb6)]?.[_0x46417c(0xb3)](),_0x9b3272=buildCustomPageEditUrl(_0x47a049,_0x18bb0d[_0x46417c(0xae)]),_0x40be75=await resolveCustomPageDevelopmentUrl(_0x47a049,_0x18bb0d[_0x46417c(0xae)],_0xe82772[_0x46417c(0xaa)]),_0x13638a=buildMutationData(_0x18bb0d,!![],_0x40be75,_0x9b3272);_0x47a049&&!_0x40be75&&_0x13638a['warnings']['push'](_0x46417c(0xb9));const _0x5149d3=buildCustomPageRuntimeUrl(_0x427442[_0x46417c(0xb6)],_0x427442['pageCode']);return _0x5149d3?_0x13638a[_0x46417c(0xac)]=_0x5149d3:_0x13638a[_0x46417c(0xa2)][_0x46417c(0xb5)](_0x46417c(0xb8)),{'ok':!![],'data':_0x13638a,'message':_0x46417c(0x96)+_0x18bb0d[_0x46417c(0xae)]+'.'};}};function readInput(_0x146994){const _0x4ee11b=a164_0x46c959,_0x355869=readCustomPageId(_0x146994),_0x3a4953=_0x146994[_0x4ee11b(0xb2)](_0x4ee11b(0xa1))[_0x4ee11b(0xb3)]();return{'pageId':_0x355869,..._0x3a4953?{'remark':_0x3a4953}:{}};}function buildMutationData(_0x36dcf1,_0x3f8342=![],_0x22074a,_0x3bff37){const _0x27aa09=a164_0x46c959;return{'operation':_0x27aa09(0xa3),'selector':{'pageId':_0x36dcf1['pageId']},'before':null,'after':{'pageId':_0x36dcf1[_0x27aa09(0xae)],'status':_0x27aa09(0xab)},'dryRun':!_0x3f8342,'request':_0x36dcf1,..._0x22074a?{'pageUrl':_0x22074a}:{},..._0x3bff37?{'editPageUrl':_0x3bff37}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a165_0x11d16f=a165_0x1821;(function(_0x2551ea,_0x257e00){const _0x309a04=a165_0x1821,_0x36606e=_0x2551ea();while(!![]){try{const _0xc6e415=parseInt(_0x309a04(0x1ab))/0x1+-parseInt(_0x309a04(0x1a4))/0x2+-parseInt(_0x309a04(0x19e))/0x3*(-parseInt(_0x309a04(0x1a2))/0x4)+parseInt(_0x309a04(0x19d))/0x5*(-parseInt(_0x309a04(0x19f))/0x6)+-parseInt(_0x309a04(0x1b0))/0x7*(-parseInt(_0x309a04(0x1a0))/0x8)+-parseInt(_0x309a04(0x1aa))/0x9+parseInt(_0x309a04(0x1a5))/0xa;if(_0xc6e415===_0x257e00)break;else _0x36606e['push'](_0x36606e['shift']());}catch(_0x41db2b){_0x36606e['push'](_0x36606e['shift']());}}}(a165_0x48af,0x9427b));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a165_0x11d16f(0x1a6)};function trimOptional(_0x293d33){const _0x232b6c=a165_0x11d16f;return _0x293d33?.[_0x232b6c(0x1b1)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x6b1e46,_0x33d43b){const _0x4508a5=trimOptional(_0x6b1e46),_0x29ec93=trimOptional(_0x33d43b);if(!_0x4508a5||!_0x29ec93)return undefined;return getPublishedAppDomain(_0x4508a5)+'/'+encodeURIComponent(_0x29ec93);}function a165_0x1821(_0x32b526,_0x23bfc2){_0x32b526=_0x32b526-0x19c;const _0x48af16=a165_0x48af();let _0x182157=_0x48af16[_0x32b526];return _0x182157;}export function buildCustomPageDevelopmentUrl(_0x567dd8,_0x1d2bab){const _0x1a6232=trimOptional(_0x567dd8),_0x1e7f4c=trimOptional(_0x1d2bab);if(!_0x1a6232||!_0x1e7f4c)return undefined;return getAppBaseUrl(_0x1a6232)+'/pages/'+encodeURIComponent(_0x1e7f4c);}export async function resolveCustomPageDevelopmentUrl(_0x199230,_0x636c2f,_0x5172b3){const _0x3ffb5b=a165_0x11d16f,_0x1f978e=trimOptional(_0x199230);if(!_0x1f978e)return undefined;try{const _0x3c7b6d=(await fetchMenuSnapshot(_0x1f978e,_0x5172b3))[_0x3ffb5b(0x1a3)]['find'](_0x5c0de9=>_0x5c0de9[_0x3ffb5b(0x1ad)]==='react'&&_0x5c0de9[_0x3ffb5b(0x1ae)]===_0x636c2f);return buildCustomPageDevelopmentUrl(_0x1f978e,_0x3c7b6d?.[_0x3ffb5b(0x1af)]);}catch{return undefined;}}function a165_0x48af(){const _0x4d9926=['file','join','length','4334220EdnnMz','55403FADcwa','Invalid\x20Custom\x20Page\x20content:\x20','type','pageId','path','1723379hAFjfX','trim','isInteger','validation','/ide/','725ZjsslA','57SFSHQM','1974zDhNQB','16ZMJCWm','--id\x20must\x20be\x20a\x20positive\x20integer.','108980ERoemH','menus','2329084AGFfjt','12352180ImUVWz','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted'];a165_0x48af=function(){return _0x4d9926;};return a165_0x48af();}export function buildCustomPageEditUrl(_0x55e1df,_0x501c11){const _0x482b19=a165_0x11d16f,_0x121374=trimOptional(_0x55e1df);if(!_0x121374)return;const _0x51afe9=trimOptional(String(_0x501c11??''));if(!_0x51afe9)return;return getAppBaseUrl(_0x121374)+_0x482b19(0x19c)+encodeURIComponent(_0x51afe9);}export async function validateCustomPageContent(_0x1c05ea){const _0x30a846=a165_0x11d16f,_0x2c3c82=await validateCustomPageSourceFiles(_0x1c05ea);if(_0x2c3c82[_0x30a846(0x1a9)]>0x0)throw CliErrors['validation'](_0x30a846(0x1ac)+_0x2c3c82['map'](_0x1b27f2=>_0x1b27f2[_0x30a846(0x1a7)]+':\x20'+_0x1b27f2['message'])[_0x30a846(0x1a8)](';\x20'));}export function readCustomPageId(_0xafdbad){const _0x1f8c00=a165_0x11d16f,_0x44defc=_0xafdbad['num']('id');if(!Number[_0x1f8c00(0x1b2)](_0x44defc)||_0x44defc<=0x0)throw CliErrors[_0x1f8c00(0x1b3)](_0x1f8c00(0x1a1));return _0x44defc;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a166_0x371b0c=a166_0x5811;(function(_0x1f4a56,_0xe3f3da){const _0x460169=a166_0x5811,_0x3146a9=_0x1f4a56();while(!![]){try{const _0x1e55de=parseInt(_0x460169(0x18b))/0x1+-parseInt(_0x460169(0x17b))/0x2+-parseInt(_0x460169(0x188))/0x3*(-parseInt(_0x460169(0x184))/0x4)+parseInt(_0x460169(0x179))/0x5*(parseInt(_0x460169(0x18d))/0x6)+parseInt(_0x460169(0x180))/0x7*(-parseInt(_0x460169(0x18c))/0x8)+-parseInt(_0x460169(0x18a))/0x9+-parseInt(_0x460169(0x18f))/0xa*(-parseInt(_0x460169(0x17c))/0xb);if(_0x1e55de===_0xe3f3da)break;else _0x3146a9['push'](_0x3146a9['shift']());}catch(_0x5a7a0f){_0x3146a9['push'](_0x3146a9['shift']());}}}(a166_0xc10c,0xc50c9));import{format}from'prettier';function a166_0xc10c(){const _0x1af8ab=['5307dfWsLe','endsWith','9947259hkxXYc','371498USyIDo','89896LZgKRy','7221168nBwHRk','toLowerCase','14173550dZkTrd','.jsx','page\x20files','5GHBtkn','filter','1895624KbjKko','22zCXnpC','message','entries','trim','973KajxKq','map','typescript','find','28WRfhsK','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','babel','some'];a166_0xc10c=function(){return _0x1af8ab;};return a166_0xc10c();}const SOURCE_PARSERS={'.js':a166_0x371b0c(0x186),'.jsx':a166_0x371b0c(0x186),'.ts':a166_0x371b0c(0x182),'.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=[a166_0x371b0c(0x177),'.tsx'];export async function validateCustomPageSourceFiles(_0x3e896e){const _0x4e5bec=a166_0x371b0c,_0x31ee63=Object[_0x4e5bec(0x17e)](_0x3e896e)[_0x4e5bec(0x17a)](([_0x357fe4])=>getParser(_0x357fe4));if(!_0x31ee63[_0x4e5bec(0x187)](([_0x47a6ea])=>isReactSourceFile(_0x47a6ea)))return[{'file':_0x4e5bec(0x178),'message':_0x4e5bec(0x185)}];const _0x2d4dd9=await Promise['all'](_0x31ee63[_0x4e5bec(0x181)](async([_0x4b94df,_0x56f144])=>{const _0x57155b=_0x4e5bec;try{return await format(_0x56f144,{'parser':getParser(_0x4b94df)}),undefined;}catch(_0x5c6589){return{'file':_0x4b94df,'message':_0x5c6589 instanceof Error?_0x5c6589[_0x57155b(0x17d)]:String(_0x5c6589)};}}));return _0x2d4dd9[_0x4e5bec(0x17a)](_0x2c75a9=>_0x2c75a9!==undefined);}function getParser(_0x351d74){const _0x40d885=a166_0x371b0c,_0x15aea6=_0x351d74[_0x40d885(0x17f)]()[_0x40d885(0x18e)]();return Object[_0x40d885(0x17e)](SOURCE_PARSERS)[_0x40d885(0x183)](([_0x197d4f])=>_0x15aea6['endsWith'](_0x197d4f))?.[0x1];}function a166_0x5811(_0x49470b,_0x346450){_0x49470b=_0x49470b-0x177;const _0xc10c5d=a166_0xc10c();let _0x581146=_0xc10c5d[_0x49470b];return _0x581146;}function isReactSourceFile(_0x3cdd7b){const _0x4ab121=a166_0x371b0c,_0x1f7a1c=_0x3cdd7b[_0x4ab121(0x17f)]()[_0x4ab121(0x18e)]();return CUSTOM_PAGE_EXTENSIONS['some'](_0x2f377e=>_0x1f7a1c[_0x4ab121(0x189)](_0x2f377e));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a167_0x3cd29b=a167_0x1461;(function(_0x1406e3,_0x1ac3b9){const _0x4d8517=a167_0x1461,_0xa2e28d=_0x1406e3();while(!![]){try{const _0x541053=parseInt(_0x4d8517(0x124))/0x1*(parseInt(_0x4d8517(0x12c))/0x2)+parseInt(_0x4d8517(0x135))/0x3+parseInt(_0x4d8517(0x134))/0x4*(-parseInt(_0x4d8517(0x13e))/0x5)+parseInt(_0x4d8517(0x129))/0x6*(-parseInt(_0x4d8517(0x143))/0x7)+parseInt(_0x4d8517(0x149))/0x8+-parseInt(_0x4d8517(0x14a))/0x9*(parseInt(_0x4d8517(0x142))/0xa)+parseInt(_0x4d8517(0x13f))/0xb;if(_0x541053===_0x1ac3b9)break;else _0xa2e28d['push'](_0xa2e28d['shift']());}catch(_0xedb496){_0xa2e28d['push'](_0xa2e28d['shift']());}}}(a167_0x48d0,0xd438e));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';function a167_0x48d0(){const _0x3e5a12=['2739966ESiQIp','appCode','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','string','number','pageContent','page-content','newVersion','Custom\x20Page\x20ID','895TZcfKj','39761040gtxeHI','write','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','40Uzzeqo','7MkAmdg','appcode','apiError','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','Directory\x20containing\x20all\x20complete\x20page\x20files','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','3560088wviVxY','2555649Akphil','/smartapi/webcode/page/update/content','197146GNqOfa','POST','Updated\x20Custom\x20Page\x20','pageId','page-dir','10172538FFgQTz','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','str','2uemYuv','page.custom-update','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','validation','cookie','trim','page','custom-update','32840IQwInU'];a167_0x48d0=function(){return _0x3e5a12;};return a167_0x48d0();}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':a167_0x3cd29b(0x132),'command':a167_0x3cd29b(0x133),'description':'Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','risk':a167_0x3cd29b(0x140),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a167_0x3cd29b(0x13b),'message':a167_0x3cd29b(0x148),'hint':a167_0x3cd29b(0x12a)}],'flags':[{'name':'id','type':a167_0x3cd29b(0x139),'required':!![],'description':a167_0x3cd29b(0x13d)},{'name':'page-dir','type':a167_0x3cd29b(0x138),'required':!![],'description':a167_0x3cd29b(0x147)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x34c4c9){readCustomPageId(_0x34c4c9),await readValidatedPageContent(_0x34c4c9);},async 'dryRun'(_0x57049d){const _0x202c5b=a167_0x3cd29b,_0x467c2d=await readInput(_0x57049d);return{'method':_0x202c5b(0x125),'url':_0x202c5b(0x14b),'body':{'id':_0x467c2d[_0x202c5b(0x127)],'codeContent':_0x467c2d[_0x202c5b(0x13a)]},'description':_0x202c5b(0x12e)+_0x467c2d[_0x202c5b(0x127)]+'.'};},async 'execute'(_0x1210f8){const _0x4675da=a167_0x3cd29b,_0x1e51e1=await readInput(_0x1210f8),_0x400675=await updateCustomPageContent({'pageId':_0x1e51e1[_0x4675da(0x127)],'pageContent':_0x1e51e1[_0x4675da(0x13a)]});if(!Number['isInteger'](_0x400675[_0x4675da(0x13c)])||_0x400675[_0x4675da(0x13c)]<=0x0)throw CliErrors[_0x4675da(0x145)](_0x4675da(0x141));const _0x45ed32=buildCustomPageEditUrl(_0x1e51e1[_0x4675da(0x136)],_0x1e51e1['pageId']),_0x15e798=await resolveCustomPageDevelopmentUrl(_0x1e51e1[_0x4675da(0x136)],_0x1e51e1[_0x4675da(0x127)],_0x1210f8[_0x4675da(0x130)]);return{'ok':!![],'data':{'operation':_0x4675da(0x12d),'selector':{'appCode':_0x1e51e1[_0x4675da(0x136)],'pageId':_0x1e51e1[_0x4675da(0x127)]},'before':null,'after':{'pageId':_0x400675[_0x4675da(0x127)],'version':_0x400675[_0x4675da(0x13c)],'pageContent':_0x1e51e1['pageContent']},'dryRun':![],'request':_0x1e51e1,..._0x15e798?{'pageUrl':_0x15e798}:{},..._0x45ed32?{'editPageUrl':_0x45ed32}:{},'warnings':_0x15e798?[]:[_0x4675da(0x137)]},'message':_0x4675da(0x126)+_0x1e51e1[_0x4675da(0x127)]+'.'};}};function a167_0x1461(_0x49e9a9,_0x536acb){_0x49e9a9=_0x49e9a9-0x124;const _0x48d041=a167_0x48d0();let _0x146140=_0x48d041[_0x49e9a9];return _0x146140;}async function readInput(_0x44bf16){const _0x53f37e=a167_0x3cd29b,_0x47c749=readCustomPageId(_0x44bf16),_0xcddfe6=_0x44bf16[_0x53f37e(0x12b)](_0x53f37e(0x144))[_0x53f37e(0x131)]()||(await getCustomPageSource(_0x47c749))['appCode']?.[_0x53f37e(0x131)]();if(!_0xcddfe6)throw CliErrors[_0x53f37e(0x12f)](_0x53f37e(0x146)+_0x47c749+'.');return{'appCode':_0xcddfe6,'pageId':_0x47c749,'pageContent':await readValidatedPageContent(_0x44bf16)};}async function readValidatedPageContent(_0x505730){const _0x569bc9=a167_0x3cd29b,_0x46d8aa=await readCustomPageDirectory(_0x505730[_0x569bc9(0x12b)](_0x569bc9(0x128)));return await validateCustomPageContent(_0x46d8aa),_0x46d8aa;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a168_0x52a7e5=a168_0x1a11;(function(_0x17902b,_0x4ff015){const _0x1bc3a3=a168_0x1a11,_0x965a35=_0x17902b();while(!![]){try{const _0x451d0d=parseInt(_0x1bc3a3(0xa1))/0x1*(parseInt(_0x1bc3a3(0x90))/0x2)+parseInt(_0x1bc3a3(0x96))/0x3*(parseInt(_0x1bc3a3(0x92))/0x4)+parseInt(_0x1bc3a3(0x89))/0x5+-parseInt(_0x1bc3a3(0x99))/0x6*(parseInt(_0x1bc3a3(0x91))/0x7)+parseInt(_0x1bc3a3(0x8c))/0x8*(-parseInt(_0x1bc3a3(0x93))/0x9)+-parseInt(_0x1bc3a3(0x8f))/0xa*(-parseInt(_0x1bc3a3(0x9e))/0xb)+-parseInt(_0x1bc3a3(0xa0))/0xc*(-parseInt(_0x1bc3a3(0x9d))/0xd);if(_0x451d0d===_0x4ff015)break;else _0x965a35['push'](_0x965a35['shift']());}catch(_0x1429fe){_0x965a35['push'](_0x965a35['shift']());}}}(a168_0x10b1,0x3d245));function a168_0x10b1(){const _0x596099=['8hxHqYy','77049GuzngP','length','nextAction','38157xtxUqG','manualResolutionRequired','string','810342YeGinb','compress','related-pages-fallback','appCode','91QRBKvN','22RormVi','code','644796uoyvoX','144422wroMoq','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','query-data-list-status','GET','alias','736030SoXdHB','name','source','312Wlkxph','/standard-page-status?appCode=','read','1481450fEsSvg','2KSOHwv','21HhbKYp'];a168_0x10b1=function(){return _0x596099;};return a168_0x10b1();}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 a168_0x1a11(_0x4ddaec,_0x484699){_0x4ddaec=_0x4ddaec-0x87;const _0x10b1a0=a168_0x10b1();let _0x1a1107=_0x10b1a0[_0x4ddaec];return _0x1a1107;}export const pageDataListStatus={'service':'page','command':'data-list-status','description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a168_0x52a7e5(0x8e),'defaultOutputFormat':a168_0x52a7e5(0x9a),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a168_0x52a7e5(0x88),'type':a168_0x52a7e5(0x98),'description':a168_0x52a7e5(0xa2)}],async 'validate'(_0x40d586){validateDatasetSelector(_0x40d586);},async 'dryRun'(_0x31c4e5){const _0x343790=a168_0x52a7e5,_0x5919f3=await loadDatasetDetailForPage(_0x31c4e5);return{'method':_0x343790(0x87),'url':'/smartapi/lovrabet/dataset/'+_0x5919f3['code']+_0x343790(0x8d)+encodeURIComponent(_0x31c4e5[_0x343790(0x9c)]),'description':serializeDryRunDescription({'dataset':{'id':_0x5919f3['id'],'code':_0x5919f3[_0x343790(0x9f)],'name':_0x5919f3[_0x343790(0x8a)]},'action':_0x343790(0xa3)})};},async 'execute'(_0x41a1c3){const _0x254c77=a168_0x52a7e5,_0x265a29=await loadDatasetDetailForPage(_0x41a1c3),_0x518dc0=await loadDataListPageStatusForGenerate(_0x41a1c3,_0x265a29['code']),_0x31eccd=getUndeletedRelatedPages(_0x265a29),_0x431db5=assessDataListPageState(_0x265a29['code'],_0x518dc0,{'fallbackUndeletedPages':_0x31eccd});return{'ok':!![],'data':{'datasetCode':_0x265a29[_0x254c77(0x9f)],'precheckSource':_0x518dc0?.[_0x254c77(0x8b)]??_0x254c77(0x9b),'status':_0x431db5['status'],'manualResolutionRequired':_0x431db5[_0x254c77(0x97)],'nextAction':_0x431db5[_0x254c77(0x95)],'dataListPageStatus':_0x518dc0,'relatedPages':{'total':_0x265a29['relatedPages'][_0x254c77(0x94)],'undeletedCount':_0x31eccd[_0x254c77(0x94)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a169_0x4db297=a169_0xd2fe;(function(_0x1e0bd0,_0x2f931d){const _0x1a2518=a169_0xd2fe,_0x4f225a=_0x1e0bd0();while(!![]){try{const _0x5a57c2=parseInt(_0x1a2518(0x17e))/0x1+-parseInt(_0x1a2518(0x179))/0x2+-parseInt(_0x1a2518(0x17c))/0x3+parseInt(_0x1a2518(0x198))/0x4+parseInt(_0x1a2518(0x188))/0x5+-parseInt(_0x1a2518(0x196))/0x6+-parseInt(_0x1a2518(0x1a5))/0x7*(parseInt(_0x1a2518(0x189))/0x8);if(_0x5a57c2===_0x2f931d)break;else _0x4f225a['push'](_0x4f225a['shift']());}catch(_0x42d91f){_0x4f225a['push'](_0x4f225a['shift']());}}}(a169_0x5c97,0x7575e));function a169_0xd2fe(_0x2dd2e7,_0x49a9d6){_0x2dd2e7=_0x2dd2e7-0x178;const _0x5c970d=a169_0x5c97();let _0xd2fed5=_0x5c970d[_0x2dd2e7];return _0xd2fed5;}function a169_0x5c97(){const _0x38054c=['2856585kbORap','fieldCount','406936xSZGDD','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','progressRate','code','nextAction','DATA_LIST','bool','status','page-type','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','4643705dYaSpn','16inUixn','Submitted\x20a\x20generate\x20task','reused','name','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','message','CRUD_PAGE_SET','taskId','clientOperationId','related-pages-fallback','allowGenerate','page-pattern','795876YFCShV','source','3715504puKeKz','manualResolutionRequired','precheck','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','compress','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','operationId','dataset','write','appCode','boolean','SUCCESS','string','2038162DvJUvq','generate-start','PARTIAL_SUCCESS','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','apply','/generate-standard-pages/start','232524HOMwHC','dataListPageStatus','POST'];a169_0x5c97=function(){return _0x38054c;};return a169_0x5c97();}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':'page','command':'generate-start','description':a169_0x4db297(0x19b),'risk':a169_0x4db297(0x1a0),'defaultOutputFormat':a169_0x4db297(0x19c),'rejectedFlags':[{'name':a169_0x4db297(0x186),'message':a169_0x4db297(0x1a8),'hint':a169_0x4db297(0x187)},{'name':a169_0x4db297(0x195),'message':a169_0x4db297(0x18e),'hint':'DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.'}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a169_0x4db297(0x1a4),'description':a169_0x4db297(0x18d)},{'name':a169_0x4db297(0x1a9),'type':a169_0x4db297(0x1a2),'description':a169_0x4db297(0x17f)}],async 'validate'(_0x55ec14){validateDatasetSelector(_0x55ec14);},async 'dryRun'(_0x37ab47){const _0x5063d0=a169_0x4db297,_0x330e8e=await prepare(_0x37ab47);return{'method':_0x5063d0(0x17b),'url':'/smartapi/lovrabet/dataset/'+_0x330e8e[_0x5063d0(0x19f)][_0x5063d0(0x181)]+_0x5063d0(0x178),'body':{'appCode':_0x37ab47[_0x5063d0(0x1a1)],'clientOperationId':_0x330e8e[_0x5063d0(0x192)]},'description':serializeDryRunDescription({'dataset':{'id':_0x330e8e[_0x5063d0(0x19f)]['id'],'code':_0x330e8e[_0x5063d0(0x19f)][_0x5063d0(0x181)],'name':_0x330e8e[_0x5063d0(0x19f)][_0x5063d0(0x18c)],'fieldCount':_0x330e8e[_0x5063d0(0x19f)][_0x5063d0(0x17d)]},'precheckSource':_0x330e8e[_0x5063d0(0x17a)]?.[_0x5063d0(0x197)]??'related-pages-fallback','action':_0x5063d0(0x1a6),'clientOperationId':_0x330e8e['clientOperationId'],'plannedStatus':_0x330e8e[_0x5063d0(0x19a)][_0x5063d0(0x185)],'reason':_0x330e8e[_0x5063d0(0x19a)][_0x5063d0(0x18f)]})};},async 'execute'(_0x53e4de){const _0x5f2af9=a169_0x4db297;if(!_0x53e4de[_0x5f2af9(0x184)](_0x5f2af9(0x1a9))){const _0x5571c9=await pageGenerateStart['dryRun'](_0x53e4de);return{'ok':!![],'message':_0x5f2af9(0x19d),'data':_0x5571c9};}const _0x4d7259=await prepare(_0x53e4de);if(!_0x4d7259[_0x5f2af9(0x19a)][_0x5f2af9(0x194)])return{'ok':![],'message':_0x4d7259[_0x5f2af9(0x19a)][_0x5f2af9(0x18f)],'data':{'datasetCode':_0x4d7259['dataset'][_0x5f2af9(0x181)],'pageType':'DATA_LIST','pagePattern':_0x5f2af9(0x190),'clientOperationId':_0x4d7259[_0x5f2af9(0x192)],'precheckSource':_0x4d7259[_0x5f2af9(0x17a)]?.[_0x5f2af9(0x197)]??_0x5f2af9(0x193),'status':_0x4d7259[_0x5f2af9(0x19a)][_0x5f2af9(0x185)],'manualResolutionRequired':_0x4d7259[_0x5f2af9(0x19a)][_0x5f2af9(0x199)],'nextAction':_0x4d7259[_0x5f2af9(0x19a)][_0x5f2af9(0x182)],'query':{'command':buildDataListPageStatusQueryCommand(_0x4d7259[_0x5f2af9(0x19f)]['code'],_0x53e4de[_0x5f2af9(0x1a1)])},'dataListPageStatus':_0x4d7259[_0x5f2af9(0x17a)]}};const _0x21d931=await startGenerateDataListPages(_0x53e4de[_0x5f2af9(0x1a1)],_0x4d7259[_0x5f2af9(0x19f)][_0x5f2af9(0x181)],{'clientOperationId':_0x4d7259[_0x5f2af9(0x192)]}),_0x17a7c5=_0x21d931[_0x5f2af9(0x185)]===_0x5f2af9(0x1a3)||_0x21d931[_0x5f2af9(0x185)]===_0x5f2af9(0x1a7)?await loadDataListPageStatusForGenerate(_0x53e4de,_0x4d7259['dataset']['code']):null,_0x244550=assessGenerateOperationState(_0x4d7259[_0x5f2af9(0x19f)][_0x5f2af9(0x181)],_0x21d931[_0x5f2af9(0x185)],_0x17a7c5);return{'ok':!![],'message':_0x21d931['reused']?'Reusing\x20an\x20existing\x20generate\x20task':_0x5f2af9(0x18a),'data':{'datasetCode':_0x4d7259[_0x5f2af9(0x19f)][_0x5f2af9(0x181)],'appCode':_0x53e4de[_0x5f2af9(0x1a1)],'pageType':_0x5f2af9(0x183),'pagePattern':_0x5f2af9(0x190),'taskId':_0x21d931[_0x5f2af9(0x191)]??null,'operationId':_0x21d931[_0x5f2af9(0x19e)]??null,'clientOperationId':_0x4d7259[_0x5f2af9(0x192)],'jobStatus':_0x21d931['status']??null,'progressRate':typeof _0x21d931[_0x5f2af9(0x180)]==='number'?_0x21d931[_0x5f2af9(0x180)]:null,'currentStep':_0x21d931['currentStep']??null,'reused':_0x21d931[_0x5f2af9(0x18b)]===!![],'status':_0x244550[_0x5f2af9(0x185)],'manualResolutionRequired':_0x244550[_0x5f2af9(0x199)],'nextAction':_0x244550[_0x5f2af9(0x182)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x4d7259[_0x5f2af9(0x19f)][_0x5f2af9(0x181)],{'appCode':_0x53e4de[_0x5f2af9(0x1a1)],'taskId':_0x21d931[_0x5f2af9(0x191)],'operationId':_0x21d931['operationId'],'clientOperationId':_0x4d7259[_0x5f2af9(0x192)]})},'dataListPageStatus':_0x17a7c5}};}};async function prepare(_0x4abf76){const _0x1cc6b2=a169_0x4db297,_0x3fc6e1=await loadDatasetDetailForPage(_0x4abf76),_0xbabe6=await loadDataListPageStatusForGenerate(_0x4abf76,_0x3fc6e1[_0x1cc6b2(0x181)]),_0x3d4246=getUndeletedRelatedPages(_0x3fc6e1);return{'dataset':_0x3fc6e1,'dataListPageStatus':_0xbabe6,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x3fc6e1['code'],_0xbabe6,{'fallbackUndeletedPages':_0x3d4246})};}
|