@lovrabet/rabetbase-cli 2.5.2-beta.4 → 2.5.2-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -17
- 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 +5 -6
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +56 -0
- package/skills/rabetbase.manifest.json +4 -4
- package/lib/commands/deployment/auto-sync.d.ts +0 -20
- package/lib/commands/deployment/auto-sync.js +0 -1
- package/lib/commands/deployment/sync.d.ts +0 -2
- package/lib/commands/deployment/sync.js +0 -1
- package/skills/rabetbase/references/rabetbase-deployment-sync.md +0 -100
|
@@ -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 a157_0x7f9c85=a157_0x4f94;(function(_0x42b9d1,_0x249dee){const _0x543fd6=a157_0x4f94,_0x5e89ef=_0x42b9d1();while(!![]){try{const _0x316a4e=-parseInt(_0x543fd6(0x188))/0x1*(parseInt(_0x543fd6(0x170))/0x2)+-parseInt(_0x543fd6(0x17f))/0x3+parseInt(_0x543fd6(0x159))/0x4+parseInt(_0x543fd6(0x185))/0x5+-parseInt(_0x543fd6(0x145))/0x6*(-parseInt(_0x543fd6(0x187))/0x7)+-parseInt(_0x543fd6(0x137))/0x8+-parseInt(_0x543fd6(0x193))/0x9*(-parseInt(_0x543fd6(0x14c))/0xa);if(_0x316a4e===_0x249dee)break;else _0x5e89ef['push'](_0x5e89ef['shift']());}catch(_0x437766){_0x5e89ef['push'](_0x5e89ef['shift']());}}}(a157_0x5dd9,0x475ec));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a157_0x7f9c85(0x15b),a157_0x7f9c85(0x149),a157_0x7f9c85(0x19c),a157_0x7f9c85(0x134),a157_0x7f9c85(0x18f)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;function a157_0x5dd9(){const _0x3409cc=['has','1332256FtjMQv','validation','\x20has\x20an\x20invalid\x20id.','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_response_invalid','includes','Notification\x20JSON\x20from\x20','recipients','createTime','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','description','string','\x22\x20must\x20be\x20','Allowed\x20values:\x20','306HeBjUg','boolean','preflight','Notification\x20config\x20list\x20item\x20','FEISHU','utf8','\x20failed.','49430yvwXZt','_unavailable','\x20characters.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','length','\x22\x20must\x20be\x20a\x20non-empty\x20string.','\x20must\x20be\x20an\x20object.','kind','readTimeout','hasOwnProperty','a\x20JSON\x20object','channelType','\x20has\x20an\x20invalid\x20channelType.','371000UKNEWs','entries','EMAIL','Create\x20JSON\x20requires\x20field\x20','update','<redacted>','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','emailTargets','\x20--type\x20','type','channelConfigRaw','some','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','messageTemplate','notification_config_field_unknown','connectTimeout','Application-level\x20notification\x20config\x20ID','notification_config_confirmation_required','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','\x20is\x20invalid.','notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22','551058FgGPaF','endpointUrlRaw','Notification\x20JSON\x20channelConfig\x20field\x20\x22','\x20has\x20an\x20invalid\x20appCode.','parse','\x20has\x20an\x20unsupported\x20channelType.','str','\x20has\x20invalid\x20field\x20\x22','bccList','channelCode','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','notification_config_source_unavailable','a\x20non-empty\x20string','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','rabetbase\x20notification\x20config-list\x20--appcode\x20','1617816eWzOtf','file','keys','call','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','env','1117770djcLvW','updateTime','68131SHwhLD','2YWcAVW','notification_config_','name','every','notification_config_json_invalid','bool','stdin','WEBHOOK','object','notification_config_field_invalid','Unknown\x20notification\x20JSON\x20field\x20\x22','1341XSqWQO','create','a\x20string\x20or\x20null','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','subjectPrefix','environment\x20variable\x20','isSafeInteger','stringify','notification_config_id_invalid','DINGTALK','configCode','Missing\x20notification\x20JSON\x20source.','notification_config_update_empty','join','\x20is\x20missing\x20required\x20field\x20\x22','appCode','trim','path','number','a\x20JSON\x20object\x20or\x20null','configName','Notification\x20config\x20','ccList','failed','channelConfig','from-env','dry-run','endpointUrl','push','WECOM','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.'];a157_0x5dd9=function(){return _0x3409cc;};return a157_0x5dd9();}export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a157_0x7f9c85(0x1a7),a157_0x7f9c85(0x157),'endpointUrl',a157_0x7f9c85(0x12f),a157_0x7f9c85(0x141),a157_0x7f9c85(0x169),a157_0x7f9c85(0x154)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a157_0x7f9c85(0x1a2),a157_0x7f9c85(0x19d),a157_0x7f9c85(0x179)]),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x7f9c85(0x161),a157_0x7f9c85(0x13e),a157_0x7f9c85(0x12d),a157_0x7f9c85(0x178),'replyTo',a157_0x7f9c85(0x197),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a157_0x7f9c85(0x180),'type':a157_0x7f9c85(0x142),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a157_0x7f9c85(0x18e),'type':a157_0x7f9c85(0x146),'required':![],'default':![],'description':a157_0x7f9c85(0x16c)},{'name':a157_0x7f9c85(0x130),'type':'string','required':![],'description':a157_0x7f9c85(0x140)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x7f9c85(0x1a5),'required':!![],'description':a157_0x7f9c85(0x16a)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x45ce67,_0x1811d2,_0x1385f9){return new CliError(_0x45ce67,0x1,_0x1811d2,_0x1385f9);}export function readNotificationId(_0x5ba78b){const _0x52317d=a157_0x7f9c85,_0x2f1a3e=_0x5ba78b['num']('id');if(!Number['isSafeInteger'](_0x2f1a3e)||_0x2f1a3e<=0x0)throw notificationError(_0x52317d(0x19b),_0x52317d(0x183));return _0x2f1a3e;}export function requireNotificationExplicitYes(_0x3d9870){const _0x18a95f=a157_0x7f9c85;if(_0x3d9870['bool'](_0x18a95f(0x131))||_0x3d9870[_0x18a95f(0x18d)]('yes'))return;throw notificationError(_0x18a95f(0x16b),_0x18a95f(0x14f),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x3f6363,_0x542f28=a157_0x7f9c85(0x163),_0x547be4='EMAIL'){const _0x4925df=a157_0x7f9c85,_0x56cae9=_0x3f6363[_0x4925df(0x176)](_0x542f28)[_0x4925df(0x1a3)]()||_0x547be4;if(!NOTIFICATION_CHANNEL_TYPES[_0x4925df(0x13c)](_0x56cae9))throw CliErrors[_0x4925df(0x138)]('Invalid\x20--'+_0x542f28+':\x20'+_0x56cae9,_0x4925df(0x144)+NOTIFICATION_CHANNEL_TYPES[_0x4925df(0x1a0)](',\x20')+'.');return _0x56cae9;}function a157_0x4f94(_0x36add0,_0x28489a){_0x36add0=_0x36add0-0x12c;const _0x5dd984=a157_0x5dd9();let _0x4f9421=_0x5dd984[_0x36add0];return _0x4f9421;}export function assertSingleNotificationSource(_0x52f278){const _0x373cb9=a157_0x7f9c85,_0x1dc3cf=[],_0x3f949f=_0x52f278['str']('file')[_0x373cb9(0x1a3)]();if(_0x3f949f)_0x1dc3cf[_0x373cb9(0x133)]({'kind':'file','path':_0x3f949f});if(_0x52f278[_0x373cb9(0x18d)](_0x373cb9(0x18e)))_0x1dc3cf[_0x373cb9(0x133)]({'kind':_0x373cb9(0x18e)});const _0x52bf88=_0x52f278[_0x373cb9(0x176)](_0x373cb9(0x130))[_0x373cb9(0x1a3)]();if(_0x52bf88)_0x1dc3cf[_0x373cb9(0x133)]({'kind':'env','name':_0x52bf88});if(_0x1dc3cf['length']===0x0)throw CliErrors[_0x373cb9(0x138)](_0x373cb9(0x19e),_0x373cb9(0x15f));if(_0x1dc3cf[_0x373cb9(0x150)]>0x1)throw CliErrors[_0x373cb9(0x138)](_0x373cb9(0x13a),_0x373cb9(0x15f));return _0x1dc3cf[0x0];}export async function readNotificationDocument(_0x1fd917,_0x161f21){const _0x383773=a157_0x7f9c85,_0x4b6ff8=assertSingleNotificationSource(_0x1fd917),_0x2007ba=_0x4b6ff8[_0x383773(0x153)]===_0x383773(0x180)?'file\x20'+_0x4b6ff8['path']:_0x4b6ff8[_0x383773(0x153)]==='env'?_0x383773(0x198)+_0x4b6ff8['name']:_0x383773(0x18e);let _0x25899d;try{if(_0x4b6ff8[_0x383773(0x153)]==='file')_0x25899d=await readFile(_0x4b6ff8[_0x383773(0x1a4)],_0x383773(0x14a));else{if(_0x4b6ff8[_0x383773(0x153)]===_0x383773(0x184)){if(!(_0x4b6ff8['name']in process.env))throw notificationError(_0x383773(0x17b),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x4b6ff8[_0x383773(0x18a)]);_0x25899d=process.env[_0x4b6ff8.name]??'';}else _0x25899d=await readStdin();}}catch(_0x49fe63){if(_0x49fe63 instanceof CliError)throw _0x49fe63;throw notificationError(_0x383773(0x17b),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x2007ba+'.');}let _0x3a856b;try{_0x3a856b=JSON[_0x383773(0x174)](_0x25899d);}catch{throw notificationError(_0x383773(0x18c),_0x383773(0x13d)+_0x2007ba+_0x383773(0x16d),_0x383773(0x135));}if(!isJsonObject(_0x3a856b))throw notificationError(_0x383773(0x18c),'Notification\x20JSON\x20from\x20'+_0x2007ba+_0x383773(0x152));return validateNotificationDocument(_0x3a856b,_0x161f21);}export function projectNotificationListConfig(_0x138c14,_0x4e7846){const _0x3d22fb=a157_0x7f9c85;return{'id':typeof _0x138c14['id']===_0x3d22fb(0x1a5)?_0x138c14['id']:null,'configCode':requireResponseString(_0x138c14[_0x3d22fb(0x19d)],_0x3d22fb(0x19d),_0x4e7846),'configName':requireResponseString(_0x138c14[_0x3d22fb(0x1a7)],_0x3d22fb(0x1a7),_0x4e7846),'channelType':requireResponseString(_0x138c14[_0x3d22fb(0x157)],_0x3d22fb(0x157),_0x4e7846),'description':normalizeNullableString(_0x138c14['description']),'createTime':normalizeNullableString(_0x138c14[_0x3d22fb(0x13f)]),'updateTime':normalizeNullableString(_0x138c14[_0x3d22fb(0x186)])};}export function normalizeExactNotificationConfig(_0x52ce6b,_0x5132ed,_0x3dba0f){const _0x59374d=a157_0x7f9c85;if(!Number[_0x59374d(0x199)](_0x52ce6b['id'])||_0x52ce6b['id']!==_0x5132ed)throw notificationError(_0x59374d(0x13b),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x5132ed+'.');if(_0x52ce6b[_0x59374d(0x1a2)]!==_0x3dba0f)throw notificationError('notification_config_response_invalid',_0x59374d(0x12c)+_0x5132ed+_0x59374d(0x17a));const _0x2ede6f=requireExactString(_0x52ce6b['configName'],'configName',_0x5132ed),_0x2eac85=requireExactString(_0x52ce6b['configCode'],_0x59374d(0x19d),_0x5132ed),_0x407394=requireExactString(_0x52ce6b[_0x59374d(0x157)],_0x59374d(0x157),_0x5132ed);if(!NOTIFICATION_CHANNEL_TYPES[_0x59374d(0x13c)](_0x407394))throw notificationError(_0x59374d(0x13b),_0x59374d(0x12c)+_0x5132ed+_0x59374d(0x175));const _0x41b8d7=responseNullableString(_0x52ce6b[_0x59374d(0x132)],_0x59374d(0x132),_0x5132ed),_0x24a79b=responseNullableString(_0x52ce6b['channelConfig'],_0x59374d(0x12f),_0x5132ed),_0x258c9a=responseNullableString(_0x52ce6b[_0x59374d(0x141)],_0x59374d(0x141),_0x5132ed),_0x11495c=responseNullableTimeout(_0x52ce6b[_0x59374d(0x169)],_0x59374d(0x169),_0x5132ed),_0x1fbce8=responseNullableTimeout(_0x52ce6b['readTimeout'],_0x59374d(0x154),_0x5132ed);return{'id':_0x5132ed,'appCode':_0x3dba0f,'configCode':_0x2eac85,'configName':_0x2ede6f,'channelType':_0x407394,'endpointUrl':redactSensitive(_0x41b8d7),'channelConfig':redactSensitive(_0x24a79b),'description':_0x258c9a,'connectTimeout':_0x11495c,'readTimeout':_0x1fbce8,'endpointUrlRaw':_0x41b8d7,'channelConfigRaw':_0x24a79b};}export async function requireExactNotificationConfig(_0x598a1d,_0x30b522,_0x1a4d4d){const _0x2d7bb6=a157_0x7f9c85;let _0x4962b9;try{_0x4962b9=await getNotificationChannelConfig(_0x30b522,_0x598a1d);}catch{throw safeApiFailure(_0x1a4d4d,_0x2d7bb6(0x147),_0x2d7bb6(0x17d)+_0x598a1d+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x4962b9,_0x30b522,_0x598a1d);}export function projectNotificationConfig(_0x126f25){const _0x55fc0f=a157_0x7f9c85;return{'id':_0x126f25['id']??null,'appCode':_0x126f25[_0x55fc0f(0x1a2)],'configCode':_0x126f25[_0x55fc0f(0x19d)]??null,'configName':_0x126f25[_0x55fc0f(0x1a7)],'channelType':_0x126f25['channelType'],'endpointUrl':redactSensitive(_0x126f25[_0x55fc0f(0x132)]),'channelConfig':redactSensitive(_0x126f25[_0x55fc0f(0x12f)]),'description':_0x126f25['description']??null,'connectTimeout':_0x126f25[_0x55fc0f(0x169)]??null,'readTimeout':_0x126f25[_0x55fc0f(0x154)]??null};}export function notificationSelector(_0x3f123f){const _0x43f112=a157_0x7f9c85;return{'appCode':_0x3f123f[_0x43f112(0x1a2)],'id':_0x3f123f['id'],'configCode':_0x3f123f[_0x43f112(0x19d)],'configName':_0x3f123f[_0x43f112(0x1a7)],'channelType':_0x3f123f[_0x43f112(0x157)]};}export function createMutationInput(_0x4b87dc,_0x517ef7){const _0x2a8097=a157_0x7f9c85;return{'appCode':_0x4b87dc,'configName':_0x517ef7['configName'],'channelType':_0x517ef7[_0x2a8097(0x157)],...hasOwn(_0x517ef7,_0x2a8097(0x132))?{'endpointUrl':_0x517ef7['endpointUrl']}:{},...hasOwn(_0x517ef7,_0x2a8097(0x12f))?{'channelConfig':serializeChannelConfig(_0x517ef7[_0x2a8097(0x12f)])}:{},...hasOwn(_0x517ef7,_0x2a8097(0x141))?{'description':_0x517ef7['description']}:{},...hasOwn(_0x517ef7,_0x2a8097(0x169))?{'connectTimeout':_0x517ef7[_0x2a8097(0x169)]}:{},...hasOwn(_0x517ef7,'readTimeout')?{'readTimeout':_0x517ef7[_0x2a8097(0x154)]}:{}};}export function mergeUpdateInput(_0x505422,_0x365284){const _0x220be1=a157_0x7f9c85;return{'id':_0x505422['id'],'appCode':_0x505422['appCode'],'configName':_0x365284['configName']??_0x505422[_0x220be1(0x1a7)],'channelType':_0x365284[_0x220be1(0x157)]??_0x505422[_0x220be1(0x157)],'endpointUrl':hasOwn(_0x365284,_0x220be1(0x132))?_0x365284[_0x220be1(0x132)]:_0x505422[_0x220be1(0x171)],'channelConfig':hasOwn(_0x365284,_0x220be1(0x12f))?serializeChannelConfig(_0x365284['channelConfig']):_0x505422[_0x220be1(0x164)],'description':hasOwn(_0x365284,_0x220be1(0x141))?_0x365284[_0x220be1(0x141)]:_0x505422['description'],'connectTimeout':hasOwn(_0x365284,_0x220be1(0x169))?_0x365284[_0x220be1(0x169)]:_0x505422['connectTimeout'],'readTimeout':hasOwn(_0x365284,_0x220be1(0x154))?_0x365284['readTimeout']:_0x505422[_0x220be1(0x154)]};}export function plannedUpdateProjection(_0x967874,_0x2edb9d){const _0x27c882=a157_0x7f9c85;return projectNotificationConfig({'id':_0x967874['id'],'appCode':_0x967874[_0x27c882(0x1a2)],'configCode':_0x967874['configCode'],'configName':_0x2edb9d['configName']??_0x967874['configName'],'channelType':_0x2edb9d[_0x27c882(0x157)]??_0x967874[_0x27c882(0x157)],'endpointUrl':hasOwn(_0x2edb9d,_0x27c882(0x132))?_0x2edb9d[_0x27c882(0x132)]:_0x967874[_0x27c882(0x171)],'channelConfig':hasOwn(_0x2edb9d,_0x27c882(0x12f))?_0x2edb9d[_0x27c882(0x12f)]:_0x967874['channelConfigRaw'],'description':hasOwn(_0x2edb9d,_0x27c882(0x141))?_0x2edb9d['description']:_0x967874[_0x27c882(0x141)],'connectTimeout':hasOwn(_0x2edb9d,_0x27c882(0x169))?_0x2edb9d[_0x27c882(0x169)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x967874[_0x27c882(0x169)],'readTimeout':hasOwn(_0x2edb9d,'readTimeout')?_0x2edb9d[_0x27c882(0x154)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x967874[_0x27c882(0x154)]});}export function requestedSafeFieldsMatch(_0x249149,_0x1f6e34,_0x5d0956){const _0x2a6405=a157_0x7f9c85,_0x3c5c76=[],_0x10427d=[],_0x39a022=[];for(const _0xf03a38 of[_0x2a6405(0x1a7),_0x2a6405(0x157),_0x2a6405(0x141)]){if(!hasOwn(_0x5d0956,_0xf03a38))continue;_0x39a022[_0x2a6405(0x133)](_0xf03a38),_0x3c5c76[_0x2a6405(0x133)](_0x1f6e34[_0xf03a38]===_0x5d0956[_0xf03a38]),_0x10427d['push'](_0x249149[_0xf03a38]!==_0x5d0956[_0xf03a38]&&_0x1f6e34[_0xf03a38]===_0x5d0956[_0xf03a38]);}for(const _0x2273c4 of[_0x2a6405(0x169),_0x2a6405(0x154)]){if(!hasOwn(_0x5d0956,_0x2273c4))continue;const _0x4cd578=_0x5d0956[_0x2273c4]??(_0x2273c4==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x39a022[_0x2a6405(0x133)](_0x2273c4),_0x3c5c76[_0x2a6405(0x133)](_0x1f6e34[_0x2273c4]===_0x4cd578),_0x10427d[_0x2a6405(0x133)](_0x249149[_0x2273c4]!==_0x4cd578&&_0x1f6e34[_0x2273c4]===_0x4cd578);}return hasOwn(_0x5d0956,_0x2a6405(0x132))&&_0x5d0956[_0x2a6405(0x132)]===null&&(_0x39a022[_0x2a6405(0x133)]('endpointUrl:null'),_0x3c5c76[_0x2a6405(0x133)](_0x1f6e34[_0x2a6405(0x171)]===null||_0x1f6e34[_0x2a6405(0x171)]===''),_0x10427d[_0x2a6405(0x133)](_0x249149['endpointUrlRaw']!==null&&_0x249149['endpointUrlRaw']!==''&&(_0x1f6e34[_0x2a6405(0x171)]===null||_0x1f6e34['endpointUrlRaw']===''))),{'allMatch':_0x3c5c76[_0x2a6405(0x18b)](Boolean),'provesChange':_0x10427d[_0x2a6405(0x165)](Boolean),'verifiedFields':_0x39a022};}export function validateNotificationDeleteReadback(_0x18a362,_0x2a5b09,_0x4d5aab){const _0x459730=a157_0x7f9c85;for(const [_0x3e26f7,_0x5b5baf]of _0x18a362[_0x459730(0x15a)]()){if(!Number[_0x459730(0x199)](_0x5b5baf['id'])||_0x5b5baf['id']<=0x0)throw notificationError(_0x459730(0x13b),_0x459730(0x148)+(_0x3e26f7+0x1)+_0x459730(0x139));if(_0x5b5baf['appCode']!==_0x2a5b09)throw notificationError(_0x459730(0x13b),_0x459730(0x148)+(_0x3e26f7+0x1)+_0x459730(0x173));if(_0x5b5baf[_0x459730(0x157)]!==_0x4d5aab)throw notificationError(_0x459730(0x13b),_0x459730(0x148)+(_0x3e26f7+0x1)+_0x459730(0x158));}}export function safeApiFailure(_0x4c96fc,_0x1b264c,_0x57f16d){const _0x2879bf=a157_0x7f9c85;return notificationError(_0x2879bf(0x189)+_0x4c96fc+'_'+(_0x1b264c==='mutation'?_0x2879bf(0x12e):_0x1b264c+_0x2879bf(0x14d)),_0x2879bf(0x12c)+_0x4c96fc+'\x20'+_0x1b264c+_0x2879bf(0x14b),_0x57f16d);}export function notificationLookupCommand(_0x266456,_0x7adc9b){const _0x4e83d5=a157_0x7f9c85;return _0x4e83d5(0x17e)+_0x266456+_0x4e83d5(0x162)+_0x7adc9b+'\x20--format\x20compress';}function validateNotificationDocument(_0xd5b018,_0x71969b){const _0x184c18=a157_0x7f9c85;for(const _0x302b3f of Object[_0x184c18(0x181)](_0xd5b018)){if(FORBIDDEN_IDENTITY_FIELDS[_0x184c18(0x136)](_0x302b3f))throw notificationError(_0x184c18(0x16e),_0x184c18(0x16f)+_0x302b3f+_0x184c18(0x160));if(!ALLOWED_INPUT_FIELDS['has'](_0x302b3f))throw notificationError(_0x184c18(0x168),_0x184c18(0x192)+_0x302b3f+'\x22.');}if(_0x71969b===_0x184c18(0x15d)&&Object[_0x184c18(0x181)](_0xd5b018)[_0x184c18(0x150)]===0x0)throw notificationError(_0x184c18(0x19f),_0x184c18(0x166));const _0x2e95de={};if(hasOwn(_0xd5b018,_0x184c18(0x1a7)))_0x2e95de['configName']=validateRequiredString(_0xd5b018[_0x184c18(0x1a7)],_0x184c18(0x1a7),0x80);else{if(_0x71969b===_0x184c18(0x194))throw notificationError('notification_config_field_required',_0x184c18(0x15c)+'\x22configName\x22.');}if(hasOwn(_0xd5b018,'channelType')){if(typeof _0xd5b018[_0x184c18(0x157)]!==_0x184c18(0x142))throw invalidFieldType(_0x184c18(0x157),'a\x20supported\x20string');const _0x323f1e=_0xd5b018['channelType']['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x184c18(0x13c)](_0x323f1e))throw notificationError(_0x184c18(0x191),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x184c18(0x144)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x2e95de[_0x184c18(0x157)]=_0x323f1e;}else{if(_0x71969b===_0x184c18(0x194))throw notificationError('notification_config_field_required',_0x184c18(0x15c)+'\x22channelType\x22.');}for(const [_0x59b68a,_0xb0ec4a]of[['endpointUrl',0x200],['description',0x100]]){if(!hasOwn(_0xd5b018,_0x59b68a))continue;const _0x569287=_0xd5b018[_0x59b68a];if(_0x569287!==null&&typeof _0x569287!==_0x184c18(0x142))throw invalidFieldType(_0x59b68a,_0x184c18(0x195));if(typeof _0x569287===_0x184c18(0x142)&&_0x569287[_0x184c18(0x150)]>_0xb0ec4a)throw notificationError(_0x184c18(0x191),'Notification\x20JSON\x20field\x20\x22'+_0x59b68a+'\x22\x20cannot\x20exceed\x20'+_0xb0ec4a+_0x184c18(0x14e));_0x2e95de[_0x59b68a]=_0x569287;}if(hasOwn(_0xd5b018,'channelConfig')){const _0x1aaef0=_0xd5b018[_0x184c18(0x12f)];if(_0x1aaef0===null&&_0x71969b==='create')throw invalidFieldType(_0x184c18(0x12f),_0x184c18(0x156));if(_0x1aaef0!==null&&!isJsonObject(_0x1aaef0))throw invalidFieldType(_0x184c18(0x12f),_0x71969b===_0x184c18(0x15d)?_0x184c18(0x1a6):'a\x20JSON\x20object');_0x1aaef0!==null&&validateChannelConfigFields(_0x2e95de['channelType'],_0x1aaef0),_0x2e95de[_0x184c18(0x12f)]=_0x1aaef0;}for(const _0x342f43 of[_0x184c18(0x169),'readTimeout']){if(!hasOwn(_0xd5b018,_0x342f43))continue;const _0x103a54=_0xd5b018[_0x342f43];if(_0x103a54!==null&&(!Number[_0x184c18(0x199)](_0x103a54)||_0x103a54<0x0))throw notificationError(_0x184c18(0x191),_0x184c18(0x16f)+_0x342f43+_0x184c18(0x196));_0x2e95de[_0x342f43]=_0x103a54;}return _0x2e95de;}function validateRequiredString(_0x5384bb,_0x1718da,_0x59ed06){const _0xa7c3dc=a157_0x7f9c85;if(typeof _0x5384bb!==_0xa7c3dc(0x142))throw invalidFieldType(_0x1718da,_0xa7c3dc(0x17c));const _0x520e6f=_0x5384bb[_0xa7c3dc(0x1a3)]();if(!_0x520e6f)throw notificationError(_0xa7c3dc(0x191),'Notification\x20JSON\x20field\x20\x22'+_0x1718da+_0xa7c3dc(0x151));if(_0x520e6f[_0xa7c3dc(0x150)]>_0x59ed06)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x1718da+'\x22\x20cannot\x20exceed\x20'+_0x59ed06+'\x20characters.');return _0x520e6f;}function validateChannelConfigFields(_0x46fd46,_0x32c315){const _0x4ea3c6=a157_0x7f9c85;if(hasOwn(_0x32c315,_0x4ea3c6(0x167)))throw forbiddenChannelConfigField('messageTemplate');if(_0x46fd46===_0x4ea3c6(0x15b))for(const _0x27a88e of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x32c315,_0x27a88e))throw forbiddenChannelConfigField(_0x27a88e);}}function forbiddenChannelConfigField(_0x1f15fa){const _0x2b0d3b=a157_0x7f9c85;return notificationError('notification_config_channel_field_forbidden',_0x2b0d3b(0x172)+_0x1f15fa+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x4f11f0,_0x19a9cf){const _0x42b450=a157_0x7f9c85;return notificationError(_0x42b450(0x191),_0x42b450(0x16f)+_0x4f11f0+_0x42b450(0x143)+_0x19a9cf+'.');}function serializeChannelConfig(_0x3f3e5f){const _0x37128b=a157_0x7f9c85;return _0x3f3e5f===null||_0x3f3e5f===undefined?null:JSON[_0x37128b(0x19a)](_0x3f3e5f);}function redactSensitive(_0xd36e80){const _0x1bdd61=a157_0x7f9c85;return _0xd36e80===null||_0xd36e80===undefined||_0xd36e80===''?null:_0x1bdd61(0x15e);}function requireResponseString(_0x36fe7f,_0x128338,_0xa6c2a9){const _0x38c53a=a157_0x7f9c85;if(typeof _0x36fe7f!==_0x38c53a(0x142)||_0x36fe7f['trim']()==='')throw CliErrors['apiError']('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0xa6c2a9+0x1)+_0x38c53a(0x1a1)+_0x128338+'\x22.');return _0x36fe7f[_0x38c53a(0x1a3)]();}function requireExactString(_0x447c21,_0x3d766b,_0x4e9ad6){const _0x3cb2ec=a157_0x7f9c85;if(typeof _0x447c21!==_0x3cb2ec(0x142)||_0x447c21['trim']()==='')throw notificationError(_0x3cb2ec(0x13b),'Notification\x20config\x20'+_0x4e9ad6+_0x3cb2ec(0x1a1)+_0x3d766b+'\x22.');return _0x447c21[_0x3cb2ec(0x1a3)]();}function responseNullableString(_0x564280,_0x48dfe4,_0x1e41be){const _0x3f084f=a157_0x7f9c85;if(_0x564280===undefined||_0x564280===null)return null;if(typeof _0x564280!=='string')throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x1e41be+_0x3f084f(0x177)+_0x48dfe4+'\x22.');return _0x564280;}function responseNullableTimeout(_0x4cf80c,_0x500355,_0x115e25){const _0x38dfd7=a157_0x7f9c85;if(_0x4cf80c===undefined||_0x4cf80c===null)return null;if(!Number[_0x38dfd7(0x199)](_0x4cf80c)||_0x4cf80c<0x0)throw notificationError(_0x38dfd7(0x13b),_0x38dfd7(0x12c)+_0x115e25+_0x38dfd7(0x177)+_0x500355+'\x22.');return _0x4cf80c;}function normalizeNullableString(_0x35078a){const _0x34f19f=a157_0x7f9c85;return typeof _0x35078a===_0x34f19f(0x142)?_0x35078a:null;}function isJsonObject(_0x2aea7e){const _0x3dc43a=a157_0x7f9c85;return _0x2aea7e!==null&&typeof _0x2aea7e===_0x3dc43a(0x190)&&!Array['isArray'](_0x2aea7e);}function hasOwn(_0x3c8de5,_0x19a415){const _0x3a0149=a157_0x7f9c85;return Object['prototype'][_0x3a0149(0x155)][_0x3a0149(0x182)](_0x3c8de5,_0x19a415);}async function readStdin(){const _0x1bee27=a157_0x7f9c85;let _0x5ea544='';process[_0x1bee27(0x18e)]['setEncoding']('utf8');for await(const _0x316828 of process[_0x1bee27(0x18e)])_0x5ea544+=_0x316828;return _0x5ea544;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x3111c7=a158_0x5666;(function(_0x36fe2e,_0x30647b){const _0x2d1acb=a158_0x5666,_0x561e5e=_0x36fe2e();while(!![]){try{const _0xfb4a03=-parseInt(_0x2d1acb(0x1af))/0x1+-parseInt(_0x2d1acb(0x1a0))/0x2*(-parseInt(_0x2d1acb(0x199))/0x3)+parseInt(_0x2d1acb(0x1a1))/0x4+parseInt(_0x2d1acb(0x19c))/0x5*(-parseInt(_0x2d1acb(0x19a))/0x6)+parseInt(_0x2d1acb(0x1bf))/0x7*(parseInt(_0x2d1acb(0x1a7))/0x8)+-parseInt(_0x2d1acb(0x19d))/0x9+parseInt(_0x2d1acb(0x1be))/0xa;if(_0xfb4a03===_0x30647b)break;else _0x561e5e['push'](_0x561e5e['shift']());}catch(_0x1123d5){_0x561e5e['push'](_0x561e5e['shift']());}}}(a158_0x28bc,0x9fe9c));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a158_0x28bc(){const _0x13861e=['8561MCZWFE','validation','fileName','Publicly\x20accessible\x20image\x20or\x20file\x20URL','File\x20upload\x20response\x20missing\x20filePath.','image-url','image-file','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','\x20OCR\x20from\x20URL','toString','path','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','/smartapi/ocr/recognize-text','filePath','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','IdCard','390CouOtB','12nxtzDs','filter','2952180TJuwbx','10275633WLqqrE','appCode','\x20OCR','11654pSEPUL','1992608wxzahi','Preview:\x20recognize\x20','idcard','/smartapi/ocr/recognize-text?','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','POST','6216hewUCf','Invoice','form','scene','read','trim','imageUrl','Table','48468wbTcdD','invoice','/smartapi/common/uploadFile','GET','idCard','general','apiError','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','string','fileUrl','str','imageFile','General','/smartapi/common/queryFileUrl','8201480ymPvHu'];a158_0x28bc=function(){return _0x13861e;};return a158_0x28bc();}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a158_0x3111c7(0x1b0),a158_0x3111c7(0x1b4),a158_0x3111c7(0x1a9),a158_0x3111c7(0x1b3)],SCENE_TO_LEGACY_TYPE={'invoice':a158_0x3111c7(0x1a8),'general':a158_0x3111c7(0x1bc),'form':a158_0x3111c7(0x1ae),'idCard':a158_0x3111c7(0x198)},SCENE_FLAG={'name':'scene','type':a158_0x3111c7(0x1b8),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a158_0x3111c7(0x194)},IMAGE_FILE_FLAG={'name':a158_0x3111c7(0x1c5),'type':a158_0x3111c7(0x1b8),'description':a158_0x3111c7(0x1b6)},IMAGE_URL_FLAG={'name':a158_0x3111c7(0x1c4),'type':a158_0x3111c7(0x1b8),'description':a158_0x3111c7(0x1c2)};function normalizeScene(_0x570ce2){const _0x58368d=a158_0x3111c7,_0x371380=_0x570ce2[_0x58368d(0x1ac)]()['toLowerCase']();if(_0x371380===_0x58368d(0x1a3))return'idCard';if(_0x371380==='invoice'||_0x371380==='general'||_0x371380===_0x58368d(0x1a9))return _0x371380;throw CliErrors[_0x58368d(0x1c0)]('Unsupported\x20OCR\x20scene:\x20'+_0x570ce2+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x441f08){const _0x2d83f7=a158_0x3111c7,_0xdbd5f6=_0x441f08[_0x2d83f7(0x1ba)]('image-file')[_0x2d83f7(0x1ac)](),_0x1a8ebf=_0x441f08[_0x2d83f7(0x1ba)](_0x2d83f7(0x1c4))['trim']();return{'imageFile':_0xdbd5f6,'imageUrl':_0x1a8ebf,'count':[_0xdbd5f6,_0x1a8ebf][_0x2d83f7(0x19b)](Boolean)['length']};}function validateInputSelection(_0x12bd5e){const _0x2dbf89=a158_0x3111c7,_0x5352b1=selectedInputs(_0x12bd5e);if(_0x5352b1['count']!==0x1)throw CliErrors[_0x2dbf89(0x1c0)](_0x2dbf89(0x1b7));return _0x5352b1;}function withScene(_0x539170,_0x2fe774,_0xe4341e){const _0x4d5c4c=a158_0x3111c7;return{..._0x539170,'scene':_0x2fe774,..._0xe4341e?{'sourceFile':{'fileName':_0xe4341e[_0x4d5c4c(0x1c1)],'filePath':_0xe4341e[_0x4d5c4c(0x196)]}}:{}};}function a158_0x5666(_0x1d42ac,_0x544f47){_0x1d42ac=_0x1d42ac-0x194;const _0x28bc0b=a158_0x28bc();let _0x56666f=_0x28bc0b[_0x1d42ac];return _0x56666f;}const ocrRecognize={'service':'ocr','command':'recognize','description':a158_0x3111c7(0x197),'risk':a158_0x3111c7(0x1ab),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x37acfa){const _0x459ca9=a158_0x3111c7,_0x449ebc=normalizeScene(_0x37acfa['str'](_0x459ca9(0x1aa))),_0x5870bb=SCENE_TO_LEGACY_TYPE[_0x449ebc],_0x585254=validateInputSelection(_0x37acfa);if(_0x585254[_0x459ca9(0x1ad)]){const _0x44ac85=new URLSearchParams({'url':_0x585254['imageUrl'],'type':_0x5870bb,'appCode':_0x37acfa[_0x459ca9(0x19e)]});return{'method':_0x459ca9(0x1b2),'url':_0x459ca9(0x1a4)+_0x44ac85[_0x459ca9(0x1c8)](),'description':_0x459ca9(0x1a2)+_0x449ebc+_0x459ca9(0x1c7)};}const _0x5b3cb1=requireDevelopmentUploadFile(_0x585254[_0x459ca9(0x1bb)],_0x459ca9(0x1c5));return{'method':_0x459ca9(0x1a6),'url':_0x459ca9(0x1b1),'body':{'steps':[{'method':_0x459ca9(0x1a6),'url':_0x459ca9(0x1b1),'body':{'appCode':_0x37acfa[_0x459ca9(0x19e)],'multipart':{'file':_0x5b3cb1}}},{'method':_0x459ca9(0x1a6),'url':_0x459ca9(0x1bd),'body':{'filePath':_0x459ca9(0x1a5),'downloadFlag':![]}},{'method':_0x459ca9(0x1b2),'url':_0x459ca9(0x195),'query':{'appCode':_0x37acfa[_0x459ca9(0x19e)],'url':_0x459ca9(0x1c6),'type':_0x5870bb}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x449ebc+_0x459ca9(0x19f)};},async 'execute'(_0x15757d){const _0x5f3a81=a158_0x3111c7,_0x8afc8a=normalizeScene(_0x15757d['str'](_0x5f3a81(0x1aa))),_0x17676c=SCENE_TO_LEGACY_TYPE[_0x8afc8a],_0x39188c=validateInputSelection(_0x15757d);if(_0x39188c[_0x5f3a81(0x1ad)]){const _0x3f41f7=await recognizeDevelopmentOcr(_0x15757d['appCode'],{'url':_0x39188c[_0x5f3a81(0x1ad)],'type':_0x17676c});return{'ok':!![],'data':withScene(_0x3f41f7,_0x8afc8a)};}const _0x6b83c7=requireDevelopmentUploadFile(_0x39188c[_0x5f3a81(0x1bb)],_0x5f3a81(0x1c5)),_0xbe52a1=await uploadDevelopmentFile(_0x15757d[_0x5f3a81(0x19e)],_0x6b83c7[_0x5f3a81(0x1c9)]);if(!_0xbe52a1['filePath'])throw CliErrors[_0x5f3a81(0x1b5)](_0x5f3a81(0x1c3));const _0x2ea3b7=await queryDevelopmentFileUrl(_0xbe52a1[_0x5f3a81(0x196)],{'download':![]});if(!_0x2ea3b7[_0x5f3a81(0x1b9)])throw CliErrors['apiError']('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x108dfc=await recognizeDevelopmentOcr(_0x15757d[_0x5f3a81(0x19e)],{'url':_0x2ea3b7[_0x5f3a81(0x1b9)],'type':_0x17676c});return{'ok':!![],'data':withScene(_0x108dfc,_0x8afc8a,_0xbe52a1)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a159_0x2c30b7=a159_0x4c85;function a159_0x278f(){const _0x28fd06=['isInteger','number','93240FpMIrg','2628440wRMJqP','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','parent-menu-id','length','toLowerCase','18WdyfPy','pageName\x20cannot\x20exceed\x20100\x20characters.','BLANK','ONEPAGE','page-content','CUSTOM','validation','Created\x20Custom\x20Page\x20','includes','createMenu','isArray','page\x20create\x20does\x20not\x20accept\x20--page-type.','220cfdiUU','page-dir','object','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','compress','appCode','Invalid\x20Custom\x20Page\x20pattern:\x20','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','create','10148256OLTnAW','isNaN','370253kSDnUT','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','/smartapi/webcode/page/create','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','parentMenuId','pageName','menuPath','17709nkVEVs','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','stringify','page-pattern','string','apiError','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','str','utf8','keys','.json','write','version','3605562pRNeYh','files','page-type','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','pageId','name','num','178739IWpdpY','430iUwBTR','7XhMdCo','POST','parse','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','trim','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','DASHBOARD','now'];a159_0x278f=function(){return _0x28fd06;};return a159_0x278f();}(function(_0x359af2,_0x44ee0b){const _0x1c192e=a159_0x4c85,_0x2fa630=_0x359af2();while(!![]){try{const _0x535020=-parseInt(_0x1c192e(0x13d))/0x1+-parseInt(_0x1c192e(0x10a))/0x2+parseInt(_0x1c192e(0x144))/0x3*(-parseInt(_0x1c192e(0x131))/0x4)+parseInt(_0x1c192e(0x11e))/0x5*(parseInt(_0x1c192e(0x125))/0x6)+-parseInt(_0x1c192e(0x113))/0x7*(-parseInt(_0x1c192e(0x11d))/0x8)+parseInt(_0x1c192e(0x13b))/0x9+parseInt(_0x1c192e(0x112))/0xa*(parseInt(_0x1c192e(0x111))/0xb);if(_0x535020===_0x44ee0b)break;else _0x2fa630['push'](_0x2fa630['shift']());}catch(_0x591420){_0x2fa630['push'](_0x2fa630['shift']());}}}(a159_0x278f,0xdff3f));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';function a159_0x4c85(_0x119b08,_0x16fb50){_0x119b08=_0x119b08-0x100;const _0x278f2b=a159_0x278f();let _0x4c8528=_0x278f2b[_0x119b08];return _0x4c8528;}import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a159_0x2c30b7(0x127),a159_0x2c30b7(0x128),a159_0x2c30b7(0x119)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),'../../../templates/custom-pages');export const pageCreate={'service':'page','command':a159_0x2c30b7(0x13a),'description':a159_0x2c30b7(0x145),'risk':a159_0x2c30b7(0x108),'defaultOutputFormat':a159_0x2c30b7(0x135),'structuredErrors':!![],'rejectedFlags':[{'name':a159_0x2c30b7(0x10c),'message':a159_0x2c30b7(0x130),'hint':a159_0x2c30b7(0x120)},{'name':a159_0x2c30b7(0x129),'message':a159_0x2c30b7(0x118),'hint':a159_0x2c30b7(0x116)}],'flags':[{'name':'name','type':'string','description':a159_0x2c30b7(0x134)},{'name':a159_0x2c30b7(0x122),'type':a159_0x2c30b7(0x11c),'description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':a159_0x2c30b7(0x100),'type':a159_0x2c30b7(0x101),'description':a159_0x2c30b7(0x103),'enum':CUSTOM_PAGE_PATTERNS},{'name':'page-dir','type':a159_0x2c30b7(0x101),'description':a159_0x2c30b7(0x11f)},APPCODE_FLAG],async 'validate'(_0x18c843){await readValidatedPageSource(_0x18c843);},async 'dryRun'(_0x5b846b){const _0x89bbf3=a159_0x2c30b7,_0x258d77=readInput(_0x5b846b,await readValidatedPageSource(_0x5b846b));return{'method':_0x89bbf3(0x114),'url':_0x89bbf3(0x13f),'body':{'appCode':_0x258d77[_0x89bbf3(0x136)],'pageName':_0x258d77[_0x89bbf3(0x142)],..._0x258d77[_0x89bbf3(0x141)]!=null?{'parentMenuId':_0x258d77[_0x89bbf3(0x141)]}:{},'createMenu':_0x258d77[_0x89bbf3(0x12e)],'codeContent':_0x258d77[_0x89bbf3(0x10b)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x89bbf3(0x146)](_0x258d77[_0x89bbf3(0x142)])+'\x20and\x20its\x20menu\x20entry.'};},async 'execute'(_0x5e4b8c){const _0x5b40cb=a159_0x2c30b7,_0x558428=readInput(_0x5e4b8c,await readValidatedPageSource(_0x5e4b8c)),_0x12a4ab=await createCustomPage(_0x558428);if(!Number[_0x5b40cb(0x11b)](_0x12a4ab[_0x5b40cb(0x10e)])||_0x12a4ab['pageId']<=0x0)throw CliErrors[_0x5b40cb(0x102)](_0x5b40cb(0x140));const _0x5b68e7=buildCustomPageDevelopmentUrl(_0x558428[_0x5b40cb(0x136)],_0x12a4ab[_0x5b40cb(0x143)]),_0x288f80=buildCustomPageEditUrl(_0x558428[_0x5b40cb(0x136)],_0x12a4ab['pageId']);return{'ok':!![],'data':{'operation':'page.create','pageType':_0x5b40cb(0x12a),'pagePattern':readPagePattern(_0x5e4b8c),'selector':{'appCode':_0x558428[_0x5b40cb(0x136)],'pageName':_0x558428[_0x5b40cb(0x142)]},'before':null,'after':{'pageId':_0x12a4ab[_0x5b40cb(0x10e)],'pageName':_0x12a4ab[_0x5b40cb(0x142)],'appCode':_0x12a4ab[_0x5b40cb(0x136)],'version':_0x12a4ab[_0x5b40cb(0x109)],'menuId':_0x12a4ab['menuId'],'menuPath':_0x12a4ab[_0x5b40cb(0x143)],'files':_0x12a4ab[_0x5b40cb(0x10b)]??Object['keys'](_0x558428[_0x5b40cb(0x10b)])},'dryRun':![],'request':_0x558428,..._0x5b68e7?{'pageUrl':_0x5b68e7}:{},..._0x288f80?{'editPageUrl':_0x288f80}:{},'warnings':_0x5b68e7?[]:[_0x5b40cb(0x139)]},'message':_0x5b40cb(0x12c)+_0x12a4ab[_0x5b40cb(0x10e)]+'.'};}};function readPagePattern(_0x256060){const _0x1e5220=a159_0x2c30b7,_0x40d4cb=_0x256060[_0x1e5220(0x104)](_0x1e5220(0x100))[_0x1e5220(0x117)](),_0x193556=_0x256060[_0x1e5220(0x104)](_0x1e5220(0x132))[_0x1e5220(0x117)]();if(_0x40d4cb&&_0x193556)throw CliErrors['validation'](_0x1e5220(0x138));if(_0x193556)return null;if(!_0x40d4cb)throw CliErrors['validation']('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x1e5220(0x12d)](_0x40d4cb))throw CliErrors['validation'](_0x1e5220(0x121));return _0x40d4cb;}async function readPageSource(_0x203786){const _0x154290=a159_0x2c30b7,_0x123e3d=_0x203786[_0x154290(0x104)](_0x154290(0x132))[_0x154290(0x117)](),_0x5944d4=readPagePattern(_0x203786);if(_0x5944d4===null){const _0x1267dd=await readCustomPageDirectory(_0x123e3d);if(Object[_0x154290(0x106)](_0x1267dd)[_0x154290(0x123)]===0x0)throw CliErrors[_0x154290(0x12b)](_0x154290(0x10d));return _0x1267dd;}let _0x28a4e3;try{_0x28a4e3=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x5944d4[_0x154290(0x124)]()+_0x154290(0x107)),_0x154290(0x105));}catch{throw CliErrors['validation']('Custom\x20Page\x20pattern\x20not\x20found:\x20'+_0x5944d4+'.');}let _0x1f5a66;try{_0x1f5a66=JSON[_0x154290(0x115)](_0x28a4e3);}catch{throw CliErrors[_0x154290(0x12b)](_0x154290(0x137)+_0x5944d4+'.');}if(!_0x1f5a66||typeof _0x1f5a66!==_0x154290(0x133)||Array[_0x154290(0x12f)](_0x1f5a66)||Object['values'](_0x1f5a66)['some'](_0x10c8aa=>typeof _0x10c8aa!==_0x154290(0x101)))throw CliErrors[_0x154290(0x12b)](_0x154290(0x137)+_0x5944d4+'.');return _0x1f5a66;}async function readValidatedPageSource(_0x216967){const _0x40c50f=await readPageSource(_0x216967);return await validateCustomPageContent(_0x40c50f),_0x40c50f;}function readInput(_0x360a82,_0x4cdd92){const _0x38aa9a=a159_0x2c30b7,_0x349285=_0x360a82[_0x38aa9a(0x104)](_0x38aa9a(0x10f))['trim']()||'Custom_page_'+Date[_0x38aa9a(0x11a)]();if(_0x349285[_0x38aa9a(0x123)]>0x64)throw CliErrors[_0x38aa9a(0x12b)](_0x38aa9a(0x126));const _0x49842f=_0x360a82[_0x38aa9a(0x110)](_0x38aa9a(0x122),NaN),_0x143d97=!Number[_0x38aa9a(0x13c)](_0x49842f);if(_0x143d97&&(!Number['isInteger'](_0x49842f)||_0x49842f<=0x0))throw CliErrors['validation'](_0x38aa9a(0x13e));return{'appCode':_0x360a82['appCode'],'pageName':_0x349285,..._0x143d97?{'parentMenuId':_0x49842f}:{},'createMenu':!![],'files':_0x4cdd92};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a160_0x3e665f=a160_0x5626;(function(_0x4cdf68,_0x15aac9){const _0x10bd99=a160_0x5626,_0x15878f=_0x4cdf68();while(!![]){try{const _0x44f44e=-parseInt(_0x10bd99(0xa8))/0x1*(parseInt(_0x10bd99(0xb8))/0x2)+-parseInt(_0x10bd99(0xbb))/0x3*(-parseInt(_0x10bd99(0xbc))/0x4)+parseInt(_0x10bd99(0xab))/0x5*(parseInt(_0x10bd99(0xc3))/0x6)+parseInt(_0x10bd99(0xc1))/0x7*(-parseInt(_0x10bd99(0xb1))/0x8)+parseInt(_0x10bd99(0xbf))/0x9*(parseInt(_0x10bd99(0xb7))/0xa)+parseInt(_0x10bd99(0xa3))/0xb+-parseInt(_0x10bd99(0xaf))/0xc*(parseInt(_0x10bd99(0xa9))/0xd);if(_0x44f44e===_0x15aac9)break;else _0x15878f['push'](_0x15878f['shift']());}catch(_0x11b57a){_0x15878f['push'](_0x15878f['shift']());}}}(a160_0x2c89,0xce542));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';function a160_0x5626(_0x20a4de,_0x7804e2){_0x20a4de=_0x20a4de-0xa2;const _0x2c89ab=a160_0x2c89();let _0x56268f=_0x2c89ab[_0x20a4de];return _0x56268f;}export const pageCustomDetail={'service':a160_0x3e665f(0xb5),'command':a160_0x3e665f(0xb2),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':'read','defaultOutputFormat':a160_0x3e665f(0xa7),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a160_0x3e665f(0xb3),'required':!![],'description':a160_0x3e665f(0xa4)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0xad9461){readCustomPageId(_0xad9461);},async 'execute'(_0x31044e){const _0x35bc67=a160_0x3e665f,_0xd95a07=readCustomPageId(_0x31044e),_0x1e779b=await getCustomPageSource(_0xd95a07),{bundle:_0x3fce48,createTime:_0x3e060e,updateTime:_0x4bf86c,..._0x25591b}=_0x1e779b,_0x19b66d=_0x1e779b['id']??_0xd95a07,_0x1edbdc=_0x1e779b[_0x35bc67(0xba)]?.['trim']()||_0x31044e[_0x35bc67(0xb6)](_0x35bc67(0xb4))[_0x35bc67(0xad)](),_0x49bcd6=buildCustomPageRuntimeUrl(_0x1edbdc,_0x1e779b[_0x35bc67(0xbe)]),_0x306457=buildCustomPageEditUrl(_0x1edbdc,_0x19b66d),_0xf04122=await resolveCustomPageDevelopmentUrl(_0x1edbdc,_0x19b66d,_0x31044e[_0x35bc67(0xc0)]);return{'ok':!![],'data':{..._0x25591b,..._0x49bcd6?{'runtimePageUrl':_0x49bcd6}:{},..._0xf04122?{'pageUrl':_0xf04122}:{},..._0x306457?{'editPageUrl':_0x306457}:{},..._0x3e060e==null?{}:{'createTime':formatTime(_0x3e060e)},..._0x4bf86c==null?{}:{'updateTime':formatTime(_0x4bf86c)}},'message':_0x35bc67(0xa6)+_0xd95a07+'.'};}};function formatTime(_0x5d9173){const _0xd3a810=a160_0x3e665f,_0x8b6979=new Date(_0x5d9173);if(Number[_0xd3a810(0xa5)](_0x8b6979[_0xd3a810(0xae)]()))return String(_0x5d9173);const _0x13295d=[_0x8b6979['getFullYear'](),String(_0x8b6979[_0xd3a810(0xac)]()+0x1)[_0xd3a810(0xb0)](0x2,'0'),String(_0x8b6979[_0xd3a810(0xaa)]())[_0xd3a810(0xb0)](0x2,'0')][_0xd3a810(0xc2)]('-'),_0x14e90f=[String(_0x8b6979[_0xd3a810(0xbd)]())['padStart'](0x2,'0'),String(_0x8b6979[_0xd3a810(0xa2)]())[_0xd3a810(0xb0)](0x2,'0'),String(_0x8b6979[_0xd3a810(0xb9)]())[_0xd3a810(0xb0)](0x2,'0')][_0xd3a810(0xc2)](':');return _0x13295d+'\x20'+_0x14e90f;}function a160_0x2c89(){const _0x1cc1e7=['number','appcode','page','str','211910PDCLnt','243944yzvCfj','getSeconds','appCode','36gvGxjX','198236lrXslX','getHours','pageCode','603Tczlqa','cookie','14xYaPIR','join','59532pRCQVC','getMinutes','18198972ywDcpV','Custom\x20Page\x20ID','isNaN','Retrieved\x20Custom\x20Page\x20','compress','1WoTTCp','400647OcrRcn','getDate','465GnQfBn','getMonth','trim','getTime','1308DrpGZL','padStart','1061352CGMABw','custom-detail'];a160_0x2c89=function(){return _0x1cc1e7;};return a160_0x2c89();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a161_0x1cf8a1=a161_0x267a;(function(_0x2ebf64,_0x3371ee){const _0x52c893=a161_0x267a,_0x129c21=_0x2ebf64();while(!![]){try{const _0x13936f=-parseInt(_0x52c893(0xd2))/0x1*(parseInt(_0x52c893(0xd6))/0x2)+parseInt(_0x52c893(0xdf))/0x3+parseInt(_0x52c893(0xe0))/0x4*(parseInt(_0x52c893(0xd0))/0x5)+parseInt(_0x52c893(0xd3))/0x6*(parseInt(_0x52c893(0xd9))/0x7)+parseInt(_0x52c893(0xe6))/0x8+-parseInt(_0x52c893(0xe1))/0x9+parseInt(_0x52c893(0xcf))/0xa*(-parseInt(_0x52c893(0xde))/0xb);if(_0x13936f===_0x3371ee)break;else _0x129c21['push'](_0x129c21['shift']());}catch(_0x345bbf){_0x129c21['push'](_0x129c21['shift']());}}}(a161_0x31be,0x69229));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';function a161_0x267a(_0xdd70e4,_0x5b4f6b){_0xdd70e4=_0xdd70e4-0xcf;const _0x31bea9=a161_0x31be();let _0x267abd=_0x31bea9[_0xdd70e4];return _0x267abd;}function a161_0x31be(){const _0x3afa3b=['593830WsUVnL','length','1bSBXMy','6tyJZdO','compress','flatMap','133324KMqtiP','Found\x20','pageId','146874uVmNxF','\x20Custom\x20Page(s).','page','react','menus','19701gXAjwD','1000602zpPFzU','12SzWFih','93861dkcpNx','No\x20Custom\x20Pages\x20found.','label','custom-list','cookie','2773976FBZgTK','appCode','3070QZhnyi'];a161_0x31be=function(){return _0x3afa3b;};return a161_0x31be();}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a161_0x1cf8a1(0xdb),'command':a161_0x1cf8a1(0xe4),'description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':'read','defaultOutputFormat':a161_0x1cf8a1(0xd4),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2f2c7a){const _0x37efc6=a161_0x1cf8a1,_0x1321bb=(await fetchMenuSnapshot(_0x2f2c7a[_0x37efc6(0xe7)],_0x2f2c7a[_0x37efc6(0xe5)]))[_0x37efc6(0xdd)][_0x37efc6(0xd5)](_0x1eba8b=>{const _0x1f51a2=_0x37efc6;if(_0x1eba8b['type']!==_0x1f51a2(0xdc)||_0x1eba8b[_0x1f51a2(0xd8)]==null)return[];const _0x11ad86=buildCustomPageDevelopmentUrl(_0x2f2c7a['appCode'],_0x1eba8b['path']),_0x522446=buildCustomPageEditUrl(_0x2f2c7a[_0x1f51a2(0xe7)],_0x1eba8b[_0x1f51a2(0xd8)]);return[{'pageId':_0x1eba8b[_0x1f51a2(0xd8)],'label':_0x1eba8b[_0x1f51a2(0xe3)],..._0x11ad86?{'pageUrl':_0x11ad86}:{},..._0x522446?{'editPageUrl':_0x522446}:{}}];});return{'ok':!![],'data':{'pages':_0x1321bb},'message':_0x1321bb['length']===0x0?_0x37efc6(0xe2):_0x37efc6(0xd7)+_0x1321bb[_0x37efc6(0xd1)]+_0x37efc6(0xda)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a162_0x3f4533=a162_0x1ec3;(function(_0x2354b0,_0x58b6d5){const _0x521fcb=a162_0x1ec3,_0x45c96e=_0x2354b0();while(!![]){try{const _0x37a821=-parseInt(_0x521fcb(0x7a))/0x1*(parseInt(_0x521fcb(0x83))/0x2)+-parseInt(_0x521fcb(0x76))/0x3*(parseInt(_0x521fcb(0x8e))/0x4)+-parseInt(_0x521fcb(0x79))/0x5+parseInt(_0x521fcb(0x82))/0x6*(-parseInt(_0x521fcb(0x9a))/0x7)+-parseInt(_0x521fcb(0x94))/0x8+parseInt(_0x521fcb(0x84))/0x9+parseInt(_0x521fcb(0x88))/0xa*(parseInt(_0x521fcb(0x95))/0xb);if(_0x37a821===_0x58b6d5)break;else _0x45c96e['push'](_0x45c96e['shift']());}catch(_0x4394ad){_0x45c96e['push'](_0x45c96e['shift']());}}}(a162_0x53d1,0x8a7fb));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a162_0x3f4533(0x93),'command':'custom-publish','description':a162_0x3f4533(0x87),'risk':'write','defaultOutputFormat':a162_0x3f4533(0x7c),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a162_0x3f4533(0x89),'required':!![],'description':a162_0x3f4533(0x78)},{'name':a162_0x3f4533(0x7d),'type':'string','description':a162_0x3f4533(0x8b)}],async 'validate'(_0x2427d2){readCustomPageId(_0x2427d2);},async 'dryRun'(_0x31d5c1){const _0x2a13d4=a162_0x3f4533,_0x1378f9=readInput(_0x31d5c1);return{'method':_0x2a13d4(0x7f),'url':_0x2a13d4(0x7b),'body':{'id':_0x1378f9[_0x2a13d4(0x97)],..._0x1378f9[_0x2a13d4(0x7d)]?{'remark':_0x1378f9[_0x2a13d4(0x7d)]}:{}},'description':_0x2a13d4(0x8a)+_0x1378f9[_0x2a13d4(0x97)]+'.'};},async 'execute'(_0x75e3e3){const _0x28eff4=a162_0x3f4533,_0x3a6113=readInput(_0x75e3e3);await getCustomPageSource(_0x3a6113['pageId']);const _0x5a0a2d=await publishCustomPage(_0x3a6113);if(!Number[_0x28eff4(0x81)](_0x5a0a2d)||_0x5a0a2d!==_0x3a6113['pageId'])throw CliErrors['apiError']('Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.');const _0x1bf19c=await getCustomPageSource(_0x3a6113[_0x28eff4(0x97)]);if(_0x1bf19c[_0x28eff4(0x99)]!==_0x28eff4(0x96))throw CliErrors[_0x28eff4(0x8f)](_0x28eff4(0x92)+(_0x1bf19c[_0x28eff4(0x99)]??_0x28eff4(0x90))+'.');const _0x1cd955=_0x1bf19c[_0x28eff4(0x8c)]?.[_0x28eff4(0x91)](),_0x3c5c68=buildCustomPageEditUrl(_0x1cd955,_0x3a6113[_0x28eff4(0x97)]),_0x384ed8=await resolveCustomPageDevelopmentUrl(_0x1cd955,_0x3a6113[_0x28eff4(0x97)],_0x75e3e3['cookie']),_0x5b6c95=buildMutationData(_0x3a6113,!![],_0x384ed8,_0x3c5c68);_0x1cd955&&!_0x384ed8&&_0x5b6c95[_0x28eff4(0x77)]['push'](_0x28eff4(0x98));const _0x50bbb1=buildCustomPageRuntimeUrl(_0x1bf19c[_0x28eff4(0x8c)],_0x1bf19c[_0x28eff4(0x80)]);return _0x50bbb1?_0x5b6c95[_0x28eff4(0x8d)]=_0x50bbb1:_0x5b6c95[_0x28eff4(0x77)][_0x28eff4(0x85)](_0x28eff4(0x86)),{'ok':!![],'data':_0x5b6c95,'message':'Published\x20Custom\x20Page\x20'+_0x3a6113[_0x28eff4(0x97)]+'.'};}};function a162_0x53d1(){const _0x3f7880=['warnings','Custom\x20Page\x20ID','689850mITjqG','1ylTuEP','/smartapi/webcode/file/publish','compress','remark','page.custom-publish','POST','pageCode','isInteger','39954TCWQCA','1631316fgAZMt','1235952izOGAt','push','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','20PozxcU','number','Would\x20publish\x20Custom\x20Page\x20','Optional\x20publish\x20remark','appCode','runtimePageUrl','8QtQxWV','apiError','unknown','trim','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','page','2594640KjsMFD','15562151EcNgrO','FORMAL','pageId','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','status','343THoOMU','1192905CGveZv'];a162_0x53d1=function(){return _0x3f7880;};return a162_0x53d1();}function readInput(_0x42467d){const _0x53f68a=a162_0x3f4533,_0x20936c=readCustomPageId(_0x42467d),_0x3d27d6=_0x42467d['str'](_0x53f68a(0x7d))[_0x53f68a(0x91)]();return{'pageId':_0x20936c,..._0x3d27d6?{'remark':_0x3d27d6}:{}};}function a162_0x1ec3(_0x523d9d,_0x2ec54c){_0x523d9d=_0x523d9d-0x76;const _0x53d199=a162_0x53d1();let _0x1ec3fd=_0x53d199[_0x523d9d];return _0x1ec3fd;}function buildMutationData(_0xdaaa58,_0x2a7e2d=![],_0x573dfe,_0x2446da){const _0x3bb6c4=a162_0x3f4533;return{'operation':_0x3bb6c4(0x7e),'selector':{'pageId':_0xdaaa58['pageId']},'before':null,'after':{'pageId':_0xdaaa58[_0x3bb6c4(0x97)],'status':_0x3bb6c4(0x96)},'dryRun':!_0x2a7e2d,'request':_0xdaaa58,..._0x573dfe?{'pageUrl':_0x573dfe}:{},..._0x2446da?{'editPageUrl':_0x2446da}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a163_0x5f082d=a163_0x8bb3;(function(_0x490c3e,_0x19b0d4){const _0x35da4c=a163_0x8bb3,_0x19e9e3=_0x490c3e();while(!![]){try{const _0x29d3e7=parseInt(_0x35da4c(0xb5))/0x1+-parseInt(_0x35da4c(0xc2))/0x2+parseInt(_0x35da4c(0xba))/0x3+-parseInt(_0x35da4c(0xb0))/0x4+parseInt(_0x35da4c(0xb1))/0x5+-parseInt(_0x35da4c(0xad))/0x6*(parseInt(_0x35da4c(0xb6))/0x7)+parseInt(_0x35da4c(0xc1))/0x8;if(_0x29d3e7===_0x19b0d4)break;else _0x19e9e3['push'](_0x19e9e3['shift']());}catch(_0x34a23c){_0x19e9e3['push'](_0x19e9e3['shift']());}}}(a163_0x462a,0x54225));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';function a163_0x8bb3(_0x44cc48,_0x174a81){_0x44cc48=_0x44cc48-0xad;const _0x462a00=a163_0x462a();let _0x8bb3bd=_0x462a00[_0x44cc48];return _0x8bb3bd;}import{CliErrors}from'../../../errors.js';function a163_0x462a(){const _0x1f815e=['37107lzIWNH','pageId','map','--id\x20must\x20be\x20a\x20positive\x20integer.','num','Invalid\x20Custom\x20Page\x20content:\x20','menus','8669032uDElfi','1366708gvMOXY','react','message','7188GXbUYZ','find','isInteger','225044AYinHH','1035395WsPxsA','/ide/','join','type','448437rGOpET','3899NrrVnN','/pages/','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','path'];a163_0x462a=function(){return _0x1f815e;};return a163_0x462a();}import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a163_0x5f082d(0xb8)};function trimOptional(_0x386c25){return _0x386c25?.['trim']()||undefined;}export function buildCustomPageRuntimeUrl(_0x2b2c3a,_0xe7e0e3){const _0x5ca320=trimOptional(_0x2b2c3a),_0x1f1a8a=trimOptional(_0xe7e0e3);if(!_0x5ca320||!_0x1f1a8a)return undefined;return getPublishedAppDomain(_0x5ca320)+'/'+encodeURIComponent(_0x1f1a8a);}export function buildCustomPageDevelopmentUrl(_0x552db2,_0x126be1){const _0x233676=a163_0x5f082d,_0x434188=trimOptional(_0x552db2),_0x3e6b94=trimOptional(_0x126be1);if(!_0x434188||!_0x3e6b94)return undefined;return getAppBaseUrl(_0x434188)+_0x233676(0xb7)+encodeURIComponent(_0x3e6b94);}export async function resolveCustomPageDevelopmentUrl(_0x4b4174,_0x3f4441,_0x308765){const _0x386c1a=a163_0x5f082d,_0x1c7f09=trimOptional(_0x4b4174);if(!_0x1c7f09)return undefined;try{const _0x57c3d1=(await fetchMenuSnapshot(_0x1c7f09,_0x308765))[_0x386c1a(0xc0)][_0x386c1a(0xae)](_0x3084d0=>_0x3084d0[_0x386c1a(0xb4)]===_0x386c1a(0xc3)&&_0x3084d0[_0x386c1a(0xbb)]===_0x3f4441);return buildCustomPageDevelopmentUrl(_0x1c7f09,_0x57c3d1?.[_0x386c1a(0xb9)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x758f1f,_0x31451c){const _0x3e2f46=a163_0x5f082d,_0x215f1b=trimOptional(_0x758f1f);if(!_0x215f1b)return;const _0x46d136=trimOptional(String(_0x31451c??''));if(!_0x46d136)return;return getAppBaseUrl(_0x215f1b)+_0x3e2f46(0xb2)+encodeURIComponent(_0x46d136);}export async function validateCustomPageContent(_0x22b17d){const _0x12b692=a163_0x5f082d,_0x569803=await validateCustomPageSourceFiles(_0x22b17d);if(_0x569803['length']>0x0)throw CliErrors['validation'](_0x12b692(0xbf)+_0x569803[_0x12b692(0xbc)](_0xb0b8b6=>_0xb0b8b6['file']+':\x20'+_0xb0b8b6[_0x12b692(0xc4)])[_0x12b692(0xb3)](';\x20'));}export function readCustomPageId(_0x2784cb){const _0x4cbc03=a163_0x5f082d,_0x5305f0=_0x2784cb[_0x4cbc03(0xbe)]('id');if(!Number[_0x4cbc03(0xaf)](_0x5305f0)||_0x5305f0<=0x0)throw CliErrors['validation'](_0x4cbc03(0xbd));return _0x5305f0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a164_0x1843(){const _0x2ae9b1=['Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','4shaGwB','map','.jsx','endsWith','5VPQdNm','page\x20files','some','message','492846HlfgaF','214632USaBdG','filter','10671542rdQeDd','117fyFSrC','typescript','entries','10786160MLzvQH','3383468hsAuAW','babel','trim','all','2405510OGQKQE','toLowerCase','1326090mEcaEM'];a164_0x1843=function(){return _0x2ae9b1;};return a164_0x1843();}const a164_0x2b060e=a164_0x8f82;function a164_0x8f82(_0x58938a,_0x2eabfe){_0x58938a=_0x58938a-0x129;const _0x1843ec=a164_0x1843();let _0x8f82c7=_0x1843ec[_0x58938a];return _0x8f82c7;}(function(_0x591291,_0x5a034c){const _0xeb327=a164_0x8f82,_0x2d8d1f=_0x591291();while(!![]){try{const _0x4f6c67=parseInt(_0xeb327(0x12f))/0x1+parseInt(_0xeb327(0x13e))/0x2*(parseInt(_0xeb327(0x12e))/0x3)+parseInt(_0xeb327(0x136))/0x4+parseInt(_0xeb327(0x12a))/0x5*(-parseInt(_0xeb327(0x13c))/0x6)+parseInt(_0xeb327(0x131))/0x7+parseInt(_0xeb327(0x135))/0x8+-parseInt(_0xeb327(0x132))/0x9*(parseInt(_0xeb327(0x13a))/0xa);if(_0x4f6c67===_0x5a034c)break;else _0x2d8d1f['push'](_0x2d8d1f['shift']());}catch(_0x299c95){_0x2d8d1f['push'](_0x2d8d1f['shift']());}}}(a164_0x1843,0xdf0fd));import{format}from'prettier';const SOURCE_PARSERS={'.js':a164_0x2b060e(0x137),'.jsx':a164_0x2b060e(0x137),'.ts':a164_0x2b060e(0x133),'.tsx':a164_0x2b060e(0x133)},CUSTOM_PAGE_EXTENSIONS=[a164_0x2b060e(0x140),'.tsx'];export async function validateCustomPageSourceFiles(_0x5186dc){const _0x39c447=a164_0x2b060e,_0x4dd14e=Object[_0x39c447(0x134)](_0x5186dc)[_0x39c447(0x130)](([_0x15e48e])=>getParser(_0x15e48e));if(!_0x4dd14e[_0x39c447(0x12c)](([_0x1d22da])=>isReactSourceFile(_0x1d22da)))return[{'file':_0x39c447(0x12b),'message':_0x39c447(0x13d)}];const _0x2cffb3=await Promise[_0x39c447(0x139)](_0x4dd14e[_0x39c447(0x13f)](async([_0x570222,_0x739b4b])=>{const _0x4dde7b=_0x39c447;try{return await format(_0x739b4b,{'parser':getParser(_0x570222)}),undefined;}catch(_0x3e82bf){return{'file':_0x570222,'message':_0x3e82bf instanceof Error?_0x3e82bf[_0x4dde7b(0x12d)]:String(_0x3e82bf)};}}));return _0x2cffb3[_0x39c447(0x130)](_0x240430=>_0x240430!==undefined);}function getParser(_0x134d00){const _0x5448f4=a164_0x2b060e,_0x15017f=_0x134d00[_0x5448f4(0x138)]()['toLowerCase']();return Object['entries'](SOURCE_PARSERS)['find'](([_0x4bdeae])=>_0x15017f[_0x5448f4(0x129)](_0x4bdeae))?.[0x1];}function isReactSourceFile(_0x22c57c){const _0x25f89f=a164_0x2b060e,_0x5acc8e=_0x22c57c[_0x25f89f(0x138)]()[_0x25f89f(0x13b)]();return CUSTOM_PAGE_EXTENSIONS['some'](_0x503a8f=>_0x5acc8e['endsWith'](_0x503a8f));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x295349=a165_0x282a;(function(_0xcd159c,_0x20b9cc){const _0xa1b973=a165_0x282a,_0x978a3f=_0xcd159c();while(!![]){try{const _0x2c7b2c=parseInt(_0xa1b973(0x166))/0x1*(parseInt(_0xa1b973(0x181))/0x2)+parseInt(_0xa1b973(0x169))/0x3*(-parseInt(_0xa1b973(0x170))/0x4)+-parseInt(_0xa1b973(0x176))/0x5+-parseInt(_0xa1b973(0x185))/0x6+parseInt(_0xa1b973(0x183))/0x7*(parseInt(_0xa1b973(0x178))/0x8)+-parseInt(_0xa1b973(0x167))/0x9*(parseInt(_0xa1b973(0x188))/0xa)+parseInt(_0xa1b973(0x16e))/0xb*(parseInt(_0xa1b973(0x179))/0xc);if(_0x2c7b2c===_0x20b9cc)break;else _0x978a3f['push'](_0x978a3f['shift']());}catch(_0x5e0fc2){_0x978a3f['push'](_0x978a3f['shift']());}}}(a165_0x4238,0x3b32b));function a165_0x282a(_0x5cdc80,_0x5194c2){_0x5cdc80=_0x5cdc80-0x162;const _0x42384c=a165_0x4238();let _0x282ae5=_0x42384c[_0x5cdc80];return _0x282ae5;}import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a165_0x295349(0x16a),'command':a165_0x295349(0x175),'description':a165_0x295349(0x177),'risk':a165_0x295349(0x164),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a165_0x295349(0x17b),'message':a165_0x295349(0x182),'hint':a165_0x295349(0x17d)}],'flags':[{'name':'id','type':a165_0x295349(0x165),'required':!![],'description':a165_0x295349(0x168)},{'name':'page-dir','type':a165_0x295349(0x174),'required':!![],'description':a165_0x295349(0x16b)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x34deda){readCustomPageId(_0x34deda),await readValidatedPageContent(_0x34deda);},async 'dryRun'(_0x977e07){const _0x405211=a165_0x295349,_0xcd2d27=await readInput(_0x977e07);return{'method':'POST','url':_0x405211(0x162),'body':{'id':_0xcd2d27['pageId'],'codeContent':_0xcd2d27[_0x405211(0x16f)]},'description':_0x405211(0x172)+_0xcd2d27[_0x405211(0x17e)]+'.'};},async 'execute'(_0x22013a){const _0x3c8d4c=a165_0x295349,_0x49da42=await readInput(_0x22013a),_0x4bd9b4=await updateCustomPageContent({'pageId':_0x49da42[_0x3c8d4c(0x17e)],'pageContent':_0x49da42[_0x3c8d4c(0x16f)]});if(!Number[_0x3c8d4c(0x186)](_0x4bd9b4[_0x3c8d4c(0x16c)])||_0x4bd9b4[_0x3c8d4c(0x16c)]<=0x0)throw CliErrors[_0x3c8d4c(0x173)]('Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0x53b920=buildCustomPageEditUrl(_0x49da42[_0x3c8d4c(0x171)],_0x49da42[_0x3c8d4c(0x17e)]),_0x19c359=await resolveCustomPageDevelopmentUrl(_0x49da42[_0x3c8d4c(0x171)],_0x49da42[_0x3c8d4c(0x17e)],_0x22013a[_0x3c8d4c(0x17c)]);return{'ok':!![],'data':{'operation':_0x3c8d4c(0x16d),'selector':{'appCode':_0x49da42[_0x3c8d4c(0x171)],'pageId':_0x49da42[_0x3c8d4c(0x17e)]},'before':null,'after':{'pageId':_0x4bd9b4['pageId'],'version':_0x4bd9b4[_0x3c8d4c(0x16c)],'pageContent':_0x49da42[_0x3c8d4c(0x16f)]},'dryRun':![],'request':_0x49da42,..._0x19c359?{'pageUrl':_0x19c359}:{},..._0x53b920?{'editPageUrl':_0x53b920}:{},'warnings':_0x19c359?[]:['Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':'Updated\x20Custom\x20Page\x20'+_0x49da42[_0x3c8d4c(0x17e)]+'.'};}};async function readInput(_0x452011){const _0xbbb2b3=a165_0x295349,_0x35da3f=readCustomPageId(_0x452011),_0x3116c1=_0x452011[_0xbbb2b3(0x17f)](_0xbbb2b3(0x184))[_0xbbb2b3(0x180)]()||(await getCustomPageSource(_0x35da3f))[_0xbbb2b3(0x171)]?.[_0xbbb2b3(0x180)]();if(!_0x3116c1)throw CliErrors[_0xbbb2b3(0x163)](_0xbbb2b3(0x17a)+_0x35da3f+'.');return{'appCode':_0x3116c1,'pageId':_0x35da3f,'pageContent':await readValidatedPageContent(_0x452011)};}async function readValidatedPageContent(_0x40237c){const _0x314648=a165_0x295349,_0x4bf94a=await readCustomPageDirectory(_0x40237c['str'](_0x314648(0x187)));return await validateCustomPageContent(_0x4bf94a),_0x4bf94a;}function a165_0x4238(){const _0x5b7927=['2591649kHbiQD','Custom\x20Page\x20ID','461454bBZLAU','page','Directory\x20containing\x20all\x20complete\x20page\x20files','newVersion','page.custom-update','9613538RmeKbI','pageContent','4BERgqZ','appCode','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','apiError','string','custom-update','1115265aVlJKz','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','3243128aGCFNh','12BGXhGK','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','page-content','cookie','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','pageId','str','trim','103310XBHQIb','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','7iTjrVy','appcode','2852112WWoqLA','isInteger','page-dir','10WtKDmD','/smartapi/webcode/page/update/content','validation','write','number','2iKStfp'];a165_0x4238=function(){return _0x5b7927;};return a165_0x4238();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a166_0xb2746=a166_0x18b0;function a166_0x3d0a(){const _0x30be48=['4843624eAgYut','code','page','1230729RinCKq','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','status','nextAction','manualResolutionRequired','15295DjqNku','compress','104997xiHLfT','2094745KvmNmk','alias','length','16jSVMXQ','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','string','6849396QVqRlv','data-list-status','2921072vAIWbH','3396FvADdq'];a166_0x3d0a=function(){return _0x30be48;};return a166_0x3d0a();}function a166_0x18b0(_0x5ea31a,_0x17b153){_0x5ea31a=_0x5ea31a-0x158;const _0x3d0aa9=a166_0x3d0a();let _0x18b07d=_0x3d0aa9[_0x5ea31a];return _0x18b07d;}(function(_0x11ce59,_0xb5ee8d){const _0x397e65=a166_0x18b0,_0x2329b1=_0x11ce59();while(!![]){try{const _0x4cee65=parseInt(_0x397e65(0x162))/0x1+-parseInt(_0x397e65(0x15d))/0x2+-parseInt(_0x397e65(0x169))/0x3+parseInt(_0x397e65(0x15f))/0x4+-parseInt(_0x397e65(0x16a))/0x5+-parseInt(_0x397e65(0x15e))/0x6*(parseInt(_0x397e65(0x167))/0x7)+parseInt(_0x397e65(0x158))/0x8*(parseInt(_0x397e65(0x15b))/0x9);if(_0x4cee65===_0xb5ee8d)break;else _0x2329b1['push'](_0x2329b1['shift']());}catch(_0x1fc519){_0x2329b1['push'](_0x2329b1['shift']());}}}(a166_0x3d0a,0xc65f1));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a166_0xb2746(0x161),'command':a166_0xb2746(0x15c),'description':a166_0xb2746(0x163),'risk':'read','defaultOutputFormat':a166_0xb2746(0x168),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a166_0xb2746(0x16b),'type':a166_0xb2746(0x15a),'description':a166_0xb2746(0x159)}],async 'validate'(_0x1310fc){validateDatasetSelector(_0x1310fc);},async 'dryRun'(_0x788e94){const _0x622726=a166_0xb2746,_0x347a54=await loadDatasetDetailForPage(_0x788e94);return{'method':'GET','url':'/smartapi/lovrabet/dataset/'+_0x347a54[_0x622726(0x160)]+'/standard-page-status?appCode='+encodeURIComponent(_0x788e94['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x347a54['id'],'code':_0x347a54[_0x622726(0x160)],'name':_0x347a54['name']},'action':'query-data-list-status'})};},async 'execute'(_0x19ff21){const _0x276c19=a166_0xb2746,_0x34029f=await loadDatasetDetailForPage(_0x19ff21),_0x5ebe14=await loadDataListPageStatusForGenerate(_0x19ff21,_0x34029f['code']),_0x461ee2=getUndeletedRelatedPages(_0x34029f),_0x4b4de2=assessDataListPageState(_0x34029f[_0x276c19(0x160)],_0x5ebe14,{'fallbackUndeletedPages':_0x461ee2});return{'ok':!![],'data':{'datasetCode':_0x34029f['code'],'precheckSource':_0x5ebe14?.['source']??'related-pages-fallback','status':_0x4b4de2[_0x276c19(0x164)],'manualResolutionRequired':_0x4b4de2[_0x276c19(0x166)],'nextAction':_0x4b4de2[_0x276c19(0x165)],'dataListPageStatus':_0x5ebe14,'relatedPages':{'total':_0x34029f['relatedPages'][_0x276c19(0x16c)],'undeletedCount':_0x461ee2[_0x276c19(0x16c)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a167_0x4e7339=a167_0x5f31;(function(_0x3adb1a,_0x5ede44){const _0x4a1ef9=a167_0x5f31,_0x123dae=_0x3adb1a();while(!![]){try{const _0x5580be=-parseInt(_0x4a1ef9(0x9b))/0x1+-parseInt(_0x4a1ef9(0xa0))/0x2+-parseInt(_0x4a1ef9(0xb1))/0x3+-parseInt(_0x4a1ef9(0x90))/0x4+parseInt(_0x4a1ef9(0x9c))/0x5*(-parseInt(_0x4a1ef9(0xa5))/0x6)+parseInt(_0x4a1ef9(0xa8))/0x7*(parseInt(_0x4a1ef9(0xb5))/0x8)+parseInt(_0x4a1ef9(0x98))/0x9;if(_0x5580be===_0x5ede44)break;else _0x123dae['push'](_0x123dae['shift']());}catch(_0x3c4f30){_0x123dae['push'](_0x123dae['shift']());}}}(a167_0x23bd,0xcabba));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';function a167_0x23bd(){const _0x2a969c=['/generate-standard-pages/start','page-pattern','41361579EwnbuV','status','dataset','1518240uQspIf','5dUVurM','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','taskId','1616096brswuo','reused','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','code','Submitted\x20a\x20generate\x20task','1249998JFneWy','source','PARTIAL_SUCCESS','3143KeEbFP','apply','clientOperationId','DATA_LIST','/smartapi/lovrabet/dataset/','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','alias','SUCCESS','string','1469682oStaBz','dryRun','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','currentStep','104JOWCIy','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','appCode','message','fieldCount','operationId','page','related-pages-fallback','POST','page-type','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','progressRate','number','2986636KzWDej','bool','nextAction','precheck','dataListPageStatus','name'];a167_0x23bd=function(){return _0x2a969c;};return a167_0x23bd();}export const pageGenerateStart={'service':a167_0x4e7339(0xbb),'command':'generate-start','description':a167_0x4e7339(0xad),'risk':'write','defaultOutputFormat':'compress','rejectedFlags':[{'name':a167_0x4e7339(0x8c),'message':a167_0x4e7339(0x9d),'hint':a167_0x4e7339(0xb6)},{'name':a167_0x4e7339(0x97),'message':a167_0x4e7339(0x9e),'hint':'DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.'}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a167_0x4e7339(0xae),'type':a167_0x4e7339(0xb0),'description':a167_0x4e7339(0xb3)},{'name':a167_0x4e7339(0xa9),'type':'boolean','description':a167_0x4e7339(0xa2)}],async 'validate'(_0x2d972f){validateDatasetSelector(_0x2d972f);},async 'dryRun'(_0x48c4a5){const _0x3c02e0=a167_0x4e7339,_0x202aaa=await prepare(_0x48c4a5);return{'method':_0x3c02e0(0x8b),'url':_0x3c02e0(0xac)+_0x202aaa[_0x3c02e0(0x9a)]['code']+_0x3c02e0(0x96),'body':{'appCode':_0x48c4a5['appCode'],'clientOperationId':_0x202aaa['clientOperationId']},'description':serializeDryRunDescription({'dataset':{'id':_0x202aaa[_0x3c02e0(0x9a)]['id'],'code':_0x202aaa[_0x3c02e0(0x9a)][_0x3c02e0(0xa3)],'name':_0x202aaa['dataset'][_0x3c02e0(0x95)],'fieldCount':_0x202aaa[_0x3c02e0(0x9a)][_0x3c02e0(0xb9)]},'precheckSource':_0x202aaa['dataListPageStatus']?.[_0x3c02e0(0xa6)]??_0x3c02e0(0xbc),'action':'generate-start','clientOperationId':_0x202aaa[_0x3c02e0(0xaa)],'plannedStatus':_0x202aaa['precheck'][_0x3c02e0(0x99)],'reason':_0x202aaa[_0x3c02e0(0x93)][_0x3c02e0(0xb8)]})};},async 'execute'(_0x2194dd){const _0x2300d7=a167_0x4e7339;if(!_0x2194dd[_0x2300d7(0x91)](_0x2300d7(0xa9))){const _0x1e7195=await pageGenerateStart[_0x2300d7(0xb2)](_0x2194dd);return{'ok':!![],'message':_0x2300d7(0x8d),'data':_0x1e7195};}const _0x3d0916=await prepare(_0x2194dd);if(!_0x3d0916['precheck']['allowGenerate'])return{'ok':![],'message':_0x3d0916[_0x2300d7(0x93)][_0x2300d7(0xb8)],'data':{'datasetCode':_0x3d0916[_0x2300d7(0x9a)][_0x2300d7(0xa3)],'pageType':_0x2300d7(0xab),'pagePattern':'CRUD_PAGE_SET','clientOperationId':_0x3d0916['clientOperationId'],'precheckSource':_0x3d0916['dataListPageStatus']?.[_0x2300d7(0xa6)]??_0x2300d7(0xbc),'status':_0x3d0916[_0x2300d7(0x93)][_0x2300d7(0x99)],'manualResolutionRequired':_0x3d0916[_0x2300d7(0x93)]['manualResolutionRequired'],'nextAction':_0x3d0916[_0x2300d7(0x93)][_0x2300d7(0x92)],'query':{'command':buildDataListPageStatusQueryCommand(_0x3d0916[_0x2300d7(0x9a)][_0x2300d7(0xa3)],_0x2194dd['appCode'])},'dataListPageStatus':_0x3d0916[_0x2300d7(0x94)]}};const _0x5b8774=await startGenerateDataListPages(_0x2194dd['appCode'],_0x3d0916[_0x2300d7(0x9a)][_0x2300d7(0xa3)],{'clientOperationId':_0x3d0916[_0x2300d7(0xaa)]}),_0xc10990=_0x5b8774['status']===_0x2300d7(0xaf)||_0x5b8774[_0x2300d7(0x99)]===_0x2300d7(0xa7)?await loadDataListPageStatusForGenerate(_0x2194dd,_0x3d0916[_0x2300d7(0x9a)]['code']):null,_0x37c0c7=assessGenerateOperationState(_0x3d0916[_0x2300d7(0x9a)][_0x2300d7(0xa3)],_0x5b8774[_0x2300d7(0x99)],_0xc10990);return{'ok':!![],'message':_0x5b8774[_0x2300d7(0xa1)]?'Reusing\x20an\x20existing\x20generate\x20task':_0x2300d7(0xa4),'data':{'datasetCode':_0x3d0916[_0x2300d7(0x9a)]['code'],'appCode':_0x2194dd[_0x2300d7(0xb7)],'pageType':_0x2300d7(0xab),'pagePattern':'CRUD_PAGE_SET','taskId':_0x5b8774[_0x2300d7(0x9f)]??null,'operationId':_0x5b8774[_0x2300d7(0xba)]??null,'clientOperationId':_0x3d0916['clientOperationId'],'jobStatus':_0x5b8774[_0x2300d7(0x99)]??null,'progressRate':typeof _0x5b8774[_0x2300d7(0x8e)]===_0x2300d7(0x8f)?_0x5b8774[_0x2300d7(0x8e)]:null,'currentStep':_0x5b8774[_0x2300d7(0xb4)]??null,'reused':_0x5b8774[_0x2300d7(0xa1)]===!![],'status':_0x37c0c7[_0x2300d7(0x99)],'manualResolutionRequired':_0x37c0c7['manualResolutionRequired'],'nextAction':_0x37c0c7[_0x2300d7(0x92)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x3d0916[_0x2300d7(0x9a)]['code'],{'appCode':_0x2194dd[_0x2300d7(0xb7)],'taskId':_0x5b8774[_0x2300d7(0x9f)],'operationId':_0x5b8774['operationId'],'clientOperationId':_0x3d0916[_0x2300d7(0xaa)]})},'dataListPageStatus':_0xc10990}};}};function a167_0x5f31(_0x1f08ed,_0x177c5a){_0x1f08ed=_0x1f08ed-0x8b;const _0x23bd3d=a167_0x23bd();let _0x5f31d=_0x23bd3d[_0x1f08ed];return _0x5f31d;}async function prepare(_0x571b21){const _0x398f58=a167_0x4e7339,_0x6ae8b8=await loadDatasetDetailForPage(_0x571b21),_0x23279c=await loadDataListPageStatusForGenerate(_0x571b21,_0x6ae8b8[_0x398f58(0xa3)]),_0x1611d4=getUndeletedRelatedPages(_0x6ae8b8);return{'dataset':_0x6ae8b8,'dataListPageStatus':_0x23279c,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x6ae8b8[_0x398f58(0xa3)],_0x23279c,{'fallbackUndeletedPages':_0x1611d4})};}
|