@lovrabet/rabetbase-cli 2.5.2-beta.6 → 2.5.2
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.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.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
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
|
+
const a157_0x43d0bd=a157_0x3e62;(function(_0x4eaa10,_0x59f345){const _0x5a0650=a157_0x3e62,_0x2065e6=_0x4eaa10();while(!![]){try{const _0x290249=-parseInt(_0x5a0650(0x117))/0x1+parseInt(_0x5a0650(0x160))/0x2*(parseInt(_0x5a0650(0xf6))/0x3)+parseInt(_0x5a0650(0xfc))/0x4*(-parseInt(_0x5a0650(0x128))/0x5)+parseInt(_0x5a0650(0xfe))/0x6+parseInt(_0x5a0650(0x15b))/0x7*(parseInt(_0x5a0650(0x14c))/0x8)+parseInt(_0x5a0650(0x166))/0x9+-parseInt(_0x5a0650(0x131))/0xa;if(_0x290249===_0x59f345)break;else _0x2065e6['push'](_0x2065e6['shift']());}catch(_0x4518f6){_0x2065e6['push'](_0x2065e6['shift']());}}}(a157_0x2cbc,0xd1d03));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=['EMAIL','FEISHU',a157_0x43d0bd(0xf3),a157_0x43d0bd(0xf8),a157_0x43d0bd(0x14f)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a157_0x43d0bd(0x134),'channelType',a157_0x43d0bd(0xfb),'channelConfig','description',a157_0x43d0bd(0xf0),a157_0x43d0bd(0x13b)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a157_0x43d0bd(0x168),a157_0x43d0bd(0x15d),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x43d0bd(0x109),a157_0x43d0bd(0x151),a157_0x43d0bd(0x142),a157_0x43d0bd(0x14a),a157_0x43d0bd(0x16b),a157_0x43d0bd(0xee),a157_0x43d0bd(0x169),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a157_0x43d0bd(0x108),'type':a157_0x43d0bd(0x10b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a157_0x43d0bd(0x156),'required':![],'default':![],'description':a157_0x43d0bd(0x140)},{'name':a157_0x43d0bd(0x10a),'type':a157_0x43d0bd(0x10b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x43d0bd(0x100),'required':!![],'description':a157_0x43d0bd(0x126)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3ee723,_0x43bea4,_0x4d7ccc){return new CliError(_0x3ee723,0x1,_0x43bea4,_0x4d7ccc);}export function readNotificationId(_0x5f01cc){const _0xd9eb6c=a157_0x43d0bd,_0x58643d=_0x5f01cc['num']('id');if(!Number[_0xd9eb6c(0x139)](_0x58643d)||_0x58643d<=0x0)throw notificationError('notification_config_id_invalid',_0xd9eb6c(0x106));return _0x58643d;}export function requireNotificationExplicitYes(_0x2974e7){const _0x4d6b6d=a157_0x43d0bd;if(_0x2974e7[_0x4d6b6d(0x144)](_0x4d6b6d(0x104))||_0x2974e7[_0x4d6b6d(0x144)](_0x4d6b6d(0x10f)))return;throw notificationError('notification_config_confirmation_required',_0x4d6b6d(0x136),_0x4d6b6d(0x145));}export function readNotificationChannelType(_0x45d0dc,_0x15ea5c='type',_0x2a6520=a157_0x43d0bd(0x12f)){const _0x3f437f=a157_0x43d0bd,_0x1016db=_0x45d0dc[_0x3f437f(0x152)](_0x15ea5c)['trim']()||_0x2a6520;if(!NOTIFICATION_CHANNEL_TYPES[_0x3f437f(0x10e)](_0x1016db))throw CliErrors[_0x3f437f(0x15c)](_0x3f437f(0x13f)+_0x15ea5c+':\x20'+_0x1016db,_0x3f437f(0x127)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1016db;}export function assertSingleNotificationSource(_0xc3f528){const _0x174505=a157_0x43d0bd,_0x30dac4=[],_0x4aded8=_0xc3f528[_0x174505(0x152)](_0x174505(0x108))[_0x174505(0x147)]();if(_0x4aded8)_0x30dac4[_0x174505(0x111)]({'kind':'file','path':_0x4aded8});if(_0xc3f528[_0x174505(0x144)](_0x174505(0x14d)))_0x30dac4[_0x174505(0x111)]({'kind':_0x174505(0x14d)});const _0x591f1f=_0xc3f528[_0x174505(0x152)](_0x174505(0x10a))[_0x174505(0x147)]();if(_0x591f1f)_0x30dac4[_0x174505(0x111)]({'kind':'env','name':_0x591f1f});if(_0x30dac4[_0x174505(0x13e)]===0x0)throw CliErrors[_0x174505(0x15c)](_0x174505(0x10c),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x30dac4[_0x174505(0x13e)]>0x1)throw CliErrors[_0x174505(0x15c)](_0x174505(0x155),_0x174505(0xf9));return _0x30dac4[0x0];}export async function readNotificationDocument(_0x27ede7,_0x4ef74f){const _0xb5c43f=a157_0x43d0bd,_0x247a0c=assertSingleNotificationSource(_0x27ede7),_0x46cb22=_0x247a0c['kind']===_0xb5c43f(0x108)?_0xb5c43f(0x146)+_0x247a0c['path']:_0x247a0c['kind']===_0xb5c43f(0x12a)?_0xb5c43f(0xf1)+_0x247a0c[_0xb5c43f(0x157)]:_0xb5c43f(0x14d);let _0x498e05;try{if(_0x247a0c[_0xb5c43f(0x12e)]==='file')_0x498e05=await readFile(_0x247a0c['path'],'utf8');else{if(_0x247a0c[_0xb5c43f(0x12e)]===_0xb5c43f(0x12a)){if(!(_0x247a0c[_0xb5c43f(0x157)]in process.env))throw notificationError(_0xb5c43f(0x153),_0xb5c43f(0x122)+_0x247a0c['name']);_0x498e05=process.env[_0x247a0c.name]??'';}else _0x498e05=await readStdin();}}catch(_0x2d0005){if(_0x2d0005 instanceof CliError)throw _0x2d0005;throw notificationError(_0xb5c43f(0x153),_0xb5c43f(0x15e)+_0x46cb22+'.');}let _0x17521a;try{_0x17521a=JSON[_0xb5c43f(0xfa)](_0x498e05);}catch{throw notificationError('notification_config_json_invalid',_0xb5c43f(0x114)+_0x46cb22+_0xb5c43f(0x11b),_0xb5c43f(0x14e));}if(!isJsonObject(_0x17521a))throw notificationError('notification_config_json_invalid',_0xb5c43f(0x114)+_0x46cb22+_0xb5c43f(0x112));return validateNotificationDocument(_0x17521a,_0x4ef74f);}export function projectNotificationListConfig(_0x1937cd,_0xfc7b9c){const _0x3e53fe=a157_0x43d0bd;return{'id':typeof _0x1937cd['id']===_0x3e53fe(0x100)?_0x1937cd['id']:null,'configCode':requireResponseString(_0x1937cd[_0x3e53fe(0x15d)],'configCode',_0xfc7b9c),'configName':requireResponseString(_0x1937cd['configName'],_0x3e53fe(0x134),_0xfc7b9c),'channelType':requireResponseString(_0x1937cd[_0x3e53fe(0x148)],_0x3e53fe(0x148),_0xfc7b9c),'description':normalizeNullableString(_0x1937cd[_0x3e53fe(0x12c)]),'createTime':normalizeNullableString(_0x1937cd['createTime']),'updateTime':normalizeNullableString(_0x1937cd[_0x3e53fe(0x11a)])};}export function normalizeExactNotificationConfig(_0xd22d4a,_0x8d8b24,_0x22ca36){const _0x5d0790=a157_0x43d0bd;if(!Number['isSafeInteger'](_0xd22d4a['id'])||_0xd22d4a['id']!==_0x8d8b24)throw notificationError(_0x5d0790(0x165),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x8d8b24+'.');if(_0xd22d4a[_0x5d0790(0x168)]!==_0x22ca36)throw notificationError('notification_config_response_invalid',_0x5d0790(0x163)+_0x8d8b24+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x4f22e3=requireExactString(_0xd22d4a[_0x5d0790(0x134)],_0x5d0790(0x134),_0x8d8b24),_0x2670e3=requireExactString(_0xd22d4a['configCode'],_0x5d0790(0x15d),_0x8d8b24),_0x222404=requireExactString(_0xd22d4a[_0x5d0790(0x148)],_0x5d0790(0x148),_0x8d8b24);if(!NOTIFICATION_CHANNEL_TYPES[_0x5d0790(0x10e)](_0x222404))throw notificationError(_0x5d0790(0x165),'Notification\x20config\x20'+_0x8d8b24+_0x5d0790(0x150));const _0x157ffa=responseNullableString(_0xd22d4a[_0x5d0790(0xfb)],_0x5d0790(0xfb),_0x8d8b24),_0x18a0bc=responseNullableString(_0xd22d4a[_0x5d0790(0x121)],_0x5d0790(0x121),_0x8d8b24),_0x335def=responseNullableString(_0xd22d4a[_0x5d0790(0x12c)],_0x5d0790(0x12c),_0x8d8b24),_0x3a45ea=responseNullableTimeout(_0xd22d4a['connectTimeout'],_0x5d0790(0xf0),_0x8d8b24),_0x4d417e=responseNullableTimeout(_0xd22d4a[_0x5d0790(0x13b)],'readTimeout',_0x8d8b24);return{'id':_0x8d8b24,'appCode':_0x22ca36,'configCode':_0x2670e3,'configName':_0x4f22e3,'channelType':_0x222404,'endpointUrl':redactSensitive(_0x157ffa),'channelConfig':redactSensitive(_0x18a0bc),'description':_0x335def,'connectTimeout':_0x3a45ea,'readTimeout':_0x4d417e,'endpointUrlRaw':_0x157ffa,'channelConfigRaw':_0x18a0bc};}export async function requireExactNotificationConfig(_0x522249,_0x564295,_0x2979e0){const _0x3a1636=a157_0x43d0bd;let _0x282623;try{_0x282623=await getNotificationChannelConfig(_0x564295,_0x522249);}catch{throw safeApiFailure(_0x2979e0,'preflight',_0x3a1636(0x161)+_0x522249+_0x3a1636(0x12b));}return normalizeExactNotificationConfig(_0x282623,_0x564295,_0x522249);}export function projectNotificationConfig(_0x47b694){const _0x1c8348=a157_0x43d0bd;return{'id':_0x47b694['id']??null,'appCode':_0x47b694[_0x1c8348(0x168)],'configCode':_0x47b694['configCode']??null,'configName':_0x47b694[_0x1c8348(0x134)],'channelType':_0x47b694[_0x1c8348(0x148)],'endpointUrl':redactSensitive(_0x47b694[_0x1c8348(0xfb)]),'channelConfig':redactSensitive(_0x47b694[_0x1c8348(0x121)]),'description':_0x47b694[_0x1c8348(0x12c)]??null,'connectTimeout':_0x47b694[_0x1c8348(0xf0)]??null,'readTimeout':_0x47b694[_0x1c8348(0x13b)]??null};}export function notificationSelector(_0x1088cd){const _0x4e7d5f=a157_0x43d0bd;return{'appCode':_0x1088cd[_0x4e7d5f(0x168)],'id':_0x1088cd['id'],'configCode':_0x1088cd[_0x4e7d5f(0x15d)],'configName':_0x1088cd[_0x4e7d5f(0x134)],'channelType':_0x1088cd[_0x4e7d5f(0x148)]};}export function createMutationInput(_0x4d2f74,_0x50aa51){const _0x288057=a157_0x43d0bd;return{'appCode':_0x4d2f74,'configName':_0x50aa51[_0x288057(0x134)],'channelType':_0x50aa51['channelType'],...hasOwn(_0x50aa51,_0x288057(0xfb))?{'endpointUrl':_0x50aa51[_0x288057(0xfb)]}:{},...hasOwn(_0x50aa51,_0x288057(0x121))?{'channelConfig':serializeChannelConfig(_0x50aa51[_0x288057(0x121)])}:{},...hasOwn(_0x50aa51,_0x288057(0x12c))?{'description':_0x50aa51[_0x288057(0x12c)]}:{},...hasOwn(_0x50aa51,_0x288057(0xf0))?{'connectTimeout':_0x50aa51['connectTimeout']}:{},...hasOwn(_0x50aa51,_0x288057(0x13b))?{'readTimeout':_0x50aa51[_0x288057(0x13b)]}:{}};}export function mergeUpdateInput(_0x3f5c16,_0x1ee7b6){const _0x256e06=a157_0x43d0bd;return{'id':_0x3f5c16['id'],'appCode':_0x3f5c16[_0x256e06(0x168)],'configName':_0x1ee7b6[_0x256e06(0x134)]??_0x3f5c16[_0x256e06(0x134)],'channelType':_0x1ee7b6['channelType']??_0x3f5c16[_0x256e06(0x148)],'endpointUrl':hasOwn(_0x1ee7b6,_0x256e06(0xfb))?_0x1ee7b6[_0x256e06(0xfb)]:_0x3f5c16[_0x256e06(0xed)],'channelConfig':hasOwn(_0x1ee7b6,_0x256e06(0x121))?serializeChannelConfig(_0x1ee7b6['channelConfig']):_0x3f5c16[_0x256e06(0x13c)],'description':hasOwn(_0x1ee7b6,_0x256e06(0x12c))?_0x1ee7b6[_0x256e06(0x12c)]:_0x3f5c16[_0x256e06(0x12c)],'connectTimeout':hasOwn(_0x1ee7b6,'connectTimeout')?_0x1ee7b6[_0x256e06(0xf0)]:_0x3f5c16[_0x256e06(0xf0)],'readTimeout':hasOwn(_0x1ee7b6,_0x256e06(0x13b))?_0x1ee7b6[_0x256e06(0x13b)]:_0x3f5c16[_0x256e06(0x13b)]};}export function plannedUpdateProjection(_0x15d7e5,_0x81fc32){const _0x3ab044=a157_0x43d0bd;return projectNotificationConfig({'id':_0x15d7e5['id'],'appCode':_0x15d7e5[_0x3ab044(0x168)],'configCode':_0x15d7e5[_0x3ab044(0x15d)],'configName':_0x81fc32[_0x3ab044(0x134)]??_0x15d7e5['configName'],'channelType':_0x81fc32['channelType']??_0x15d7e5[_0x3ab044(0x148)],'endpointUrl':hasOwn(_0x81fc32,_0x3ab044(0xfb))?_0x81fc32[_0x3ab044(0xfb)]:_0x15d7e5['endpointUrlRaw'],'channelConfig':hasOwn(_0x81fc32,_0x3ab044(0x121))?_0x81fc32[_0x3ab044(0x121)]:_0x15d7e5[_0x3ab044(0x13c)],'description':hasOwn(_0x81fc32,_0x3ab044(0x12c))?_0x81fc32['description']:_0x15d7e5[_0x3ab044(0x12c)],'connectTimeout':hasOwn(_0x81fc32,_0x3ab044(0xf0))?_0x81fc32[_0x3ab044(0xf0)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x15d7e5[_0x3ab044(0xf0)],'readTimeout':hasOwn(_0x81fc32,_0x3ab044(0x13b))?_0x81fc32['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x15d7e5[_0x3ab044(0x13b)]});}export function requestedSafeFieldsMatch(_0x5e29cc,_0x2d642d,_0x30fe5e){const _0x4529e0=a157_0x43d0bd,_0x3a3dc2=[],_0x51478d=[],_0x184e1d=[];for(const _0xf58648 of[_0x4529e0(0x134),_0x4529e0(0x148),_0x4529e0(0x12c)]){if(!hasOwn(_0x30fe5e,_0xf58648))continue;_0x184e1d[_0x4529e0(0x111)](_0xf58648),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0xf58648]===_0x30fe5e[_0xf58648]),_0x51478d[_0x4529e0(0x111)](_0x5e29cc[_0xf58648]!==_0x30fe5e[_0xf58648]&&_0x2d642d[_0xf58648]===_0x30fe5e[_0xf58648]);}for(const _0x1e100f of[_0x4529e0(0xf0),_0x4529e0(0x13b)]){if(!hasOwn(_0x30fe5e,_0x1e100f))continue;const _0x2adba2=_0x30fe5e[_0x1e100f]??(_0x1e100f===_0x4529e0(0xf0)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x184e1d['push'](_0x1e100f),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0x1e100f]===_0x2adba2),_0x51478d['push'](_0x5e29cc[_0x1e100f]!==_0x2adba2&&_0x2d642d[_0x1e100f]===_0x2adba2);}return hasOwn(_0x30fe5e,_0x4529e0(0xfb))&&_0x30fe5e[_0x4529e0(0xfb)]===null&&(_0x184e1d[_0x4529e0(0x111)](_0x4529e0(0x133)),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0x4529e0(0xed)]===null||_0x2d642d['endpointUrlRaw']===''),_0x51478d['push'](_0x5e29cc[_0x4529e0(0xed)]!==null&&_0x5e29cc['endpointUrlRaw']!==''&&(_0x2d642d['endpointUrlRaw']===null||_0x2d642d[_0x4529e0(0xed)]===''))),{'allMatch':_0x3a3dc2[_0x4529e0(0xf7)](Boolean),'provesChange':_0x51478d[_0x4529e0(0x159)](Boolean),'verifiedFields':_0x184e1d};}export function validateNotificationDeleteReadback(_0x3e645a,_0x5671e0,_0x5a82c2){const _0x18d168=a157_0x43d0bd;for(const [_0x1904e8,_0x18fa1d]of _0x3e645a[_0x18d168(0x158)]()){if(!Number['isSafeInteger'](_0x18fa1d['id'])||_0x18fa1d['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x18d168(0x119)+(_0x1904e8+0x1)+_0x18d168(0x154));if(_0x18fa1d[_0x18d168(0x168)]!==_0x5671e0)throw notificationError('notification_config_response_invalid',_0x18d168(0x119)+(_0x1904e8+0x1)+_0x18d168(0x138));if(_0x18fa1d[_0x18d168(0x148)]!==_0x5a82c2)throw notificationError(_0x18d168(0x165),'Notification\x20config\x20list\x20item\x20'+(_0x1904e8+0x1)+_0x18d168(0x132));}}export function safeApiFailure(_0xb8039a,_0x482455,_0x28f833){const _0x15cffb=a157_0x43d0bd;return notificationError(_0x15cffb(0x11d)+_0xb8039a+'_'+(_0x482455===_0x15cffb(0xf2)?'failed':_0x482455+'_unavailable'),_0x15cffb(0x163)+_0xb8039a+'\x20'+_0x482455+_0x15cffb(0x15f),_0x28f833);}function a157_0x3e62(_0x1114b5,_0x58f5c8){_0x1114b5=_0x1114b5-0xed;const _0x2cbc2a=a157_0x2cbc();let _0x3e62af=_0x2cbc2a[_0x1114b5];return _0x3e62af;}export function notificationLookupCommand(_0x1726c3,_0x21076b){const _0x5aa1f9=a157_0x43d0bd;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x1726c3+_0x5aa1f9(0x167)+_0x21076b+_0x5aa1f9(0x110);}function validateNotificationDocument(_0x216dc3,_0x2278a7){const _0x20a472=a157_0x43d0bd;for(const _0x4886aa of Object[_0x20a472(0x141)](_0x216dc3)){if(FORBIDDEN_IDENTITY_FIELDS[_0x20a472(0x12d)](_0x4886aa))throw notificationError(_0x20a472(0x135),_0x20a472(0x137)+_0x4886aa+_0x20a472(0x125));if(!ALLOWED_INPUT_FIELDS[_0x20a472(0x12d)](_0x4886aa))throw notificationError(_0x20a472(0x16a),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x4886aa+'\x22.');}if(_0x2278a7==='update'&&Object[_0x20a472(0x141)](_0x216dc3)['length']===0x0)throw notificationError(_0x20a472(0x149),_0x20a472(0x130));const _0xb7e9f={};if(hasOwn(_0x216dc3,_0x20a472(0x134)))_0xb7e9f['configName']=validateRequiredString(_0x216dc3[_0x20a472(0x134)],'configName',0x80);else{if(_0x2278a7===_0x20a472(0xf5))throw notificationError(_0x20a472(0x162),_0x20a472(0x164)+_0x20a472(0x120));}if(hasOwn(_0x216dc3,'channelType')){if(typeof _0x216dc3[_0x20a472(0x148)]!==_0x20a472(0x10b))throw invalidFieldType(_0x20a472(0x148),_0x20a472(0x143));const _0x5a536a=_0x216dc3[_0x20a472(0x148)][_0x20a472(0x147)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x20a472(0x10e)](_0x5a536a))throw notificationError(_0x20a472(0xfd),_0x20a472(0x107),_0x20a472(0x127)+NOTIFICATION_CHANNEL_TYPES[_0x20a472(0xf4)](',\x20')+'.');_0xb7e9f[_0x20a472(0x148)]=_0x5a536a;}else{if(_0x2278a7==='create')throw notificationError(_0x20a472(0x162),_0x20a472(0x164)+_0x20a472(0x118));}for(const [_0xe72660,_0x719837]of[[_0x20a472(0xfb),0x200],[_0x20a472(0x12c),0x100]]){if(!hasOwn(_0x216dc3,_0xe72660))continue;const _0x57644c=_0x216dc3[_0xe72660];if(_0x57644c!==null&&typeof _0x57644c!=='string')throw invalidFieldType(_0xe72660,'a\x20string\x20or\x20null');if(typeof _0x57644c===_0x20a472(0x10b)&&_0x57644c['length']>_0x719837)throw notificationError(_0x20a472(0xfd),_0x20a472(0x137)+_0xe72660+_0x20a472(0x103)+_0x719837+_0x20a472(0x115));_0xb7e9f[_0xe72660]=_0x57644c;}if(hasOwn(_0x216dc3,_0x20a472(0x121))){const _0x56b50e=_0x216dc3[_0x20a472(0x121)];if(_0x56b50e===null&&_0x2278a7==='create')throw invalidFieldType(_0x20a472(0x121),_0x20a472(0x13a));if(_0x56b50e!==null&&!isJsonObject(_0x56b50e))throw invalidFieldType(_0x20a472(0x121),_0x2278a7===_0x20a472(0x113)?_0x20a472(0x11e):_0x20a472(0x13a));_0x56b50e!==null&&validateChannelConfigFields(_0xb7e9f[_0x20a472(0x148)],_0x56b50e),_0xb7e9f[_0x20a472(0x121)]=_0x56b50e;}for(const _0x6013b0 of[_0x20a472(0xf0),_0x20a472(0x13b)]){if(!hasOwn(_0x216dc3,_0x6013b0))continue;const _0x205841=_0x216dc3[_0x6013b0];if(_0x205841!==null&&(!Number[_0x20a472(0x139)](_0x205841)||_0x205841<0x0))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x6013b0+_0x20a472(0x124));_0xb7e9f[_0x6013b0]=_0x205841;}return _0xb7e9f;}function validateRequiredString(_0x110357,_0x26ed33,_0xc2aea4){const _0x13e08e=a157_0x43d0bd;if(typeof _0x110357!==_0x13e08e(0x10b))throw invalidFieldType(_0x26ed33,'a\x20non-empty\x20string');const _0x38c798=_0x110357[_0x13e08e(0x147)]();if(!_0x38c798)throw notificationError('notification_config_field_invalid',_0x13e08e(0x137)+_0x26ed33+_0x13e08e(0x14b));if(_0x38c798[_0x13e08e(0x13e)]>_0xc2aea4)throw notificationError(_0x13e08e(0xfd),'Notification\x20JSON\x20field\x20\x22'+_0x26ed33+'\x22\x20cannot\x20exceed\x20'+_0xc2aea4+'\x20characters.');return _0x38c798;}function validateChannelConfigFields(_0x29de41,_0x46c2dc){const _0x3383e3=a157_0x43d0bd;if(hasOwn(_0x46c2dc,_0x3383e3(0x102)))throw forbiddenChannelConfigField(_0x3383e3(0x102));if(_0x29de41===_0x3383e3(0x12f))for(const _0x116b67 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x46c2dc,_0x116b67))throw forbiddenChannelConfigField(_0x116b67);}}function forbiddenChannelConfigField(_0x3701d7){const _0x73115c=a157_0x43d0bd;return notificationError('notification_config_channel_field_forbidden',_0x73115c(0x13d)+_0x3701d7+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x4dbfae,_0x4fb9cc){const _0x18f030=a157_0x43d0bd;return notificationError(_0x18f030(0xfd),_0x18f030(0x137)+_0x4dbfae+'\x22\x20must\x20be\x20'+_0x4fb9cc+'.');}function serializeChannelConfig(_0xa4f499){const _0x12cb0a=a157_0x43d0bd;return _0xa4f499===null||_0xa4f499===undefined?null:JSON[_0x12cb0a(0xef)](_0xa4f499);}function redactSensitive(_0x389060){const _0x4e522f=a157_0x43d0bd;return _0x389060===null||_0x389060===undefined||_0x389060===''?null:_0x4e522f(0xff);}function requireResponseString(_0x4419e5,_0x1a43d5,_0x11b606){const _0x1674f6=a157_0x43d0bd;if(typeof _0x4419e5!=='string'||_0x4419e5['trim']()==='')throw CliErrors[_0x1674f6(0x11f)](_0x1674f6(0x15a),_0x1674f6(0x10d)+(_0x11b606+0x1)+_0x1674f6(0x129)+_0x1a43d5+'\x22.');return _0x4419e5[_0x1674f6(0x147)]();}function requireExactString(_0x659b58,_0x5261d6,_0x5236c1){const _0x436b33=a157_0x43d0bd;if(typeof _0x659b58!==_0x436b33(0x10b)||_0x659b58[_0x436b33(0x147)]()==='')throw notificationError(_0x436b33(0x165),_0x436b33(0x163)+_0x5236c1+_0x436b33(0x129)+_0x5261d6+'\x22.');return _0x659b58[_0x436b33(0x147)]();}function responseNullableString(_0x4624af,_0x16c98b,_0x81df74){const _0x394417=a157_0x43d0bd;if(_0x4624af===undefined||_0x4624af===null)return null;if(typeof _0x4624af!==_0x394417(0x10b))throw notificationError(_0x394417(0x165),_0x394417(0x163)+_0x81df74+_0x394417(0x11c)+_0x16c98b+'\x22.');return _0x4624af;}function responseNullableTimeout(_0x2d5b9b,_0xccf686,_0x224416){const _0x216422=a157_0x43d0bd;if(_0x2d5b9b===undefined||_0x2d5b9b===null)return null;if(!Number['isSafeInteger'](_0x2d5b9b)||_0x2d5b9b<0x0)throw notificationError('notification_config_response_invalid',_0x216422(0x163)+_0x224416+_0x216422(0x11c)+_0xccf686+'\x22.');return _0x2d5b9b;}function normalizeNullableString(_0x250ffd){const _0x5ce6be=a157_0x43d0bd;return typeof _0x250ffd===_0x5ce6be(0x10b)?_0x250ffd:null;}function a157_0x2cbc(){const _0x35762d=['replyTo','endpointUrlRaw','subjectPrefix','stringify','connectTimeout','environment\x20variable\x20','mutation','DINGTALK','join','create','846093ktmqWm','every','WECOM','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','parse','endpointUrl','22620BeiTOy','notification_config_field_invalid','1109406kqNZGv','<redacted>','number','call','messageTemplate','\x22\x20cannot\x20exceed\x20','dry-run','isArray','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','file','emailTargets','from-env','string','Missing\x20notification\x20JSON\x20source.','Item\x20','includes','yes','\x20--format\x20compress','push','\x20must\x20be\x20an\x20object.','update','Notification\x20JSON\x20from\x20','\x20characters.','object','1243335KoGlzG','\x22channelType\x22.','Notification\x20config\x20list\x20item\x20','updateTime','\x20is\x20invalid.','\x20has\x20invalid\x20field\x20\x22','notification_config_','a\x20JSON\x20object\x20or\x20null','apiError','\x22configName\x22.','channelConfig','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','utf8','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Application-level\x20notification\x20config\x20ID','Allowed\x20values:\x20','575nwXhSy','\x20is\x20missing\x20required\x20field\x20\x22','env','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','description','has','kind','EMAIL','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','20946830FPdAOx','\x20has\x20an\x20invalid\x20channelType.','endpointUrl:null','configName','notification_config_field_forbidden','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Notification\x20JSON\x20field\x20\x22','\x20has\x20an\x20invalid\x20appCode.','isSafeInteger','a\x20JSON\x20object','readTimeout','channelConfigRaw','Notification\x20JSON\x20channelConfig\x20field\x20\x22','length','Invalid\x20--','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','keys','ccList','a\x20supported\x20string','bool','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','file\x20','trim','channelType','notification_config_update_empty','bccList','\x22\x20must\x20be\x20a\x20non-empty\x20string.','6392024aaWhCJ','stdin','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','WEBHOOK','\x20has\x20an\x20unsupported\x20channelType.','recipients','str','notification_config_source_unavailable','\x20has\x20an\x20invalid\x20id.','Notification\x20JSON\x20source\x20is\x20ambiguous.','boolean','name','entries','some','Invalid\x20notification\x20config\x20response.','14koSZQM','validation','configCode','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20failed.','10NJbuIj','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_required','Notification\x20config\x20','Create\x20JSON\x20requires\x20field\x20','notification_config_response_invalid','14892084SAdoRD','\x20--type\x20','appCode','fromName','notification_config_field_unknown'];a157_0x2cbc=function(){return _0x35762d;};return a157_0x2cbc();}function isJsonObject(_0x16ecbb){const _0x165f02=a157_0x43d0bd;return _0x16ecbb!==null&&typeof _0x16ecbb===_0x165f02(0x116)&&!Array[_0x165f02(0x105)](_0x16ecbb);}function hasOwn(_0x43b563,_0x58d2fc){const _0x340663=a157_0x43d0bd;return Object['prototype']['hasOwnProperty'][_0x340663(0x101)](_0x43b563,_0x58d2fc);}async function readStdin(){const _0x332b4b=a157_0x43d0bd;let _0x44f03d='';process[_0x332b4b(0x14d)]['setEncoding'](_0x332b4b(0x123));for await(const _0x7d7242 of process[_0x332b4b(0x14d)])_0x44f03d+=_0x7d7242;return _0x44f03d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x3df950=a158_0xbc1a;(function(_0x5d1d96,_0x163b8a){const _0x51088f=a158_0xbc1a,_0x3a7e30=_0x5d1d96();while(!![]){try{const _0x49fa63=parseInt(_0x51088f(0xfe))/0x1*(parseInt(_0x51088f(0x109))/0x2)+parseInt(_0x51088f(0xf1))/0x3*(-parseInt(_0x51088f(0xf9))/0x4)+parseInt(_0x51088f(0x11a))/0x5*(-parseInt(_0x51088f(0xfd))/0x6)+parseInt(_0x51088f(0x10a))/0x7*(-parseInt(_0x51088f(0x11c))/0x8)+-parseInt(_0x51088f(0xee))/0x9+-parseInt(_0x51088f(0x10c))/0xa*(parseInt(_0x51088f(0xf3))/0xb)+parseInt(_0x51088f(0xfb))/0xc;if(_0x49fa63===_0x163b8a)break;else _0x3a7e30['push'](_0x3a7e30['shift']());}catch(_0x119f66){_0x3a7e30['push'](_0x3a7e30['shift']());}}}(a158_0x4cc7,0x46cd4));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a158_0x4cc7(){const _0x162e02=['filePath','GET','count','/smartapi/common/uploadFile','1660vYUFFe','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','1836824ucpXBB','apiError','length','IdCard','imageFile','trim','path','fileUrl','3921327EIJswG','Table','idCard','12vBtCTn','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','33CTgYyn','form','recognize','File\x20URL\x20response\x20missing\x20fileUrl.','string','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','560684WoJRWW','toLowerCase','19947492oMVMdz','toString','3858dzXeRv','12nOEKns','/smartapi/ocr/recognize-text?','POST','appCode','invoice','ocr','File\x20upload\x20response\x20missing\x20filePath.','scene','idcard','fileName','image-url','26298rcJpAG','7iieULG','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','302030SYSwOj','/smartapi/ocr/recognize-text','image-file','general','imageUrl','Invoice','str','/smartapi/common/queryFileUrl','Preview:\x20recognize\x20','validation'];a158_0x4cc7=function(){return _0x162e02;};return a158_0x4cc7();}import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a158_0x3df950(0x102),a158_0x3df950(0x10f),a158_0x3df950(0xf4),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a158_0x3df950(0x111),'general':'General','form':a158_0x3df950(0xef),'idCard':a158_0x3df950(0x11f)},SCENE_FLAG={'name':a158_0x3df950(0x105),'type':a158_0x3df950(0xf7),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a158_0x3df950(0x11b)},IMAGE_FILE_FLAG={'name':a158_0x3df950(0x10e),'type':a158_0x3df950(0xf7),'description':a158_0x3df950(0x10b)},IMAGE_URL_FLAG={'name':a158_0x3df950(0x108),'type':a158_0x3df950(0xf7),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x4ee540){const _0x3aad2f=a158_0x3df950,_0x228cb0=_0x4ee540['trim']()[_0x3aad2f(0xfa)]();if(_0x228cb0===_0x3aad2f(0x106))return _0x3aad2f(0xf0);if(_0x228cb0===_0x3aad2f(0x102)||_0x228cb0===_0x3aad2f(0x10f)||_0x228cb0===_0x3aad2f(0xf4))return _0x228cb0;throw CliErrors[_0x3aad2f(0x115)]('Unsupported\x20OCR\x20scene:\x20'+_0x4ee540+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x5b3394){const _0x4eeece=a158_0x3df950,_0x3331d6=_0x5b3394[_0x4eeece(0x112)](_0x4eeece(0x10e))['trim'](),_0x6347c2=_0x5b3394['str'](_0x4eeece(0x108))[_0x4eeece(0xeb)]();return{'imageFile':_0x3331d6,'imageUrl':_0x6347c2,'count':[_0x3331d6,_0x6347c2]['filter'](Boolean)[_0x4eeece(0x11e)]};}function a158_0xbc1a(_0x174df2,_0x1b7f6d){_0x174df2=_0x174df2-0xea;const _0x4cc78f=a158_0x4cc7();let _0xbc1a74=_0x4cc78f[_0x174df2];return _0xbc1a74;}function validateInputSelection(_0x441629){const _0x35e3ff=a158_0x3df950,_0x3d0108=selectedInputs(_0x441629);if(_0x3d0108[_0x35e3ff(0x118)]!==0x1)throw CliErrors[_0x35e3ff(0x115)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x3d0108;}function withScene(_0x4dcbcd,_0x475cd2,_0xd80205){const _0x213621=a158_0x3df950;return{..._0x4dcbcd,'scene':_0x475cd2,..._0xd80205?{'sourceFile':{'fileName':_0xd80205[_0x213621(0x107)],'filePath':_0xd80205[_0x213621(0x116)]}}:{}};}const ocrRecognize={'service':a158_0x3df950(0x103),'command':a158_0x3df950(0xf5),'description':a158_0x3df950(0xf2),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3bd7a4){const _0x477728=a158_0x3df950,_0x4eedb1=normalizeScene(_0x3bd7a4[_0x477728(0x112)](_0x477728(0x105))),_0xdc064a=SCENE_TO_LEGACY_TYPE[_0x4eedb1],_0x4107e3=validateInputSelection(_0x3bd7a4);if(_0x4107e3[_0x477728(0x110)]){const _0x4040fd=new URLSearchParams({'url':_0x4107e3[_0x477728(0x110)],'type':_0xdc064a,'appCode':_0x3bd7a4[_0x477728(0x101)]});return{'method':_0x477728(0x117),'url':_0x477728(0xff)+_0x4040fd[_0x477728(0xfc)](),'description':_0x477728(0x114)+_0x4eedb1+'\x20OCR\x20from\x20URL'};}const _0x33d60d=requireDevelopmentUploadFile(_0x4107e3[_0x477728(0xea)],_0x477728(0x10e));return{'method':_0x477728(0x100),'url':_0x477728(0x119),'body':{'steps':[{'method':'POST','url':_0x477728(0x119),'body':{'appCode':_0x3bd7a4[_0x477728(0x101)],'multipart':{'file':_0x33d60d}}},{'method':'POST','url':_0x477728(0x113),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x477728(0x117),'url':_0x477728(0x10d),'query':{'appCode':_0x3bd7a4[_0x477728(0x101)],'url':_0x477728(0xf8),'type':_0xdc064a}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x4eedb1+'\x20OCR'};},async 'execute'(_0x59e373){const _0x505a27=a158_0x3df950,_0x32d0f4=normalizeScene(_0x59e373[_0x505a27(0x112)](_0x505a27(0x105))),_0x5d8fd5=SCENE_TO_LEGACY_TYPE[_0x32d0f4],_0xf4f8bf=validateInputSelection(_0x59e373);if(_0xf4f8bf['imageUrl']){const _0x5209ae=await recognizeDevelopmentOcr(_0x59e373['appCode'],{'url':_0xf4f8bf['imageUrl'],'type':_0x5d8fd5});return{'ok':!![],'data':withScene(_0x5209ae,_0x32d0f4)};}const _0x47ea69=requireDevelopmentUploadFile(_0xf4f8bf[_0x505a27(0xea)],_0x505a27(0x10e)),_0x860fa5=await uploadDevelopmentFile(_0x59e373[_0x505a27(0x101)],_0x47ea69[_0x505a27(0xec)]);if(!_0x860fa5['filePath'])throw CliErrors[_0x505a27(0x11d)](_0x505a27(0x104));const _0x4da50a=await queryDevelopmentFileUrl(_0x860fa5[_0x505a27(0x116)],{'download':![]});if(!_0x4da50a[_0x505a27(0xed)])throw CliErrors[_0x505a27(0x11d)](_0x505a27(0xf6));const _0x53abf7=await recognizeDevelopmentOcr(_0x59e373[_0x505a27(0x101)],{'url':_0x4da50a[_0x505a27(0xed)],'type':_0x5d8fd5});return{'ok':!![],'data':withScene(_0x53abf7,_0x32d0f4,_0x860fa5)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a159_0x3fe597=a159_0x9571;function a159_0x9571(_0x33442f,_0x2d0839){_0x33442f=_0x33442f-0x1d6;const _0x17d522=a159_0x17d5();let _0x957136=_0x17d522[_0x33442f];return _0x957136;}(function(_0x2508b3,_0x325705){const _0x4720d2=a159_0x9571,_0x44f2d1=_0x2508b3();while(!![]){try{const _0x30abcf=parseInt(_0x4720d2(0x209))/0x1*(parseInt(_0x4720d2(0x1ea))/0x2)+-parseInt(_0x4720d2(0x210))/0x3*(parseInt(_0x4720d2(0x20f))/0x4)+-parseInt(_0x4720d2(0x1d9))/0x5+-parseInt(_0x4720d2(0x202))/0x6*(parseInt(_0x4720d2(0x1dd))/0x7)+-parseInt(_0x4720d2(0x215))/0x8*(parseInt(_0x4720d2(0x1ef))/0x9)+parseInt(_0x4720d2(0x1dc))/0xa*(-parseInt(_0x4720d2(0x212))/0xb)+-parseInt(_0x4720d2(0x1db))/0xc*(-parseInt(_0x4720d2(0x200))/0xd);if(_0x30abcf===_0x325705)break;else _0x44f2d1['push'](_0x44f2d1['shift']());}catch(_0x589ddd){_0x44f2d1['push'](_0x44f2d1['shift']());}}}(a159_0x17d5,0x1c379));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';function a159_0x17d5(){const _0x41dce7=['/smartapi/webcode/page/create','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','286twvNZa','parse','30LKGYlN','page\x20create\x20does\x20not\x20accept\x20--page-type.','stringify','page-pattern','pageName','keys','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','20zSvTAU','includes','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','pageId','\x20and\x20its\x20menu\x20entry.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','105816ivVqep','12mJAyTU','Custom_page_','2067439yyIdtu','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','object','1581176UtRoIy','menuPath','appCode','.json','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','validation','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','isNaN','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','361845qIYlId','page-type','258828kEZkwj','10ReXHfy','11284ZUohfJ','some','length','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','string','Would\x20create\x20Custom\x20Page\x20','page-dir','Invalid\x20Custom\x20Page\x20pattern:\x20','apiError','now','DASHBOARD','files','str','21290KecQKD','Created\x20Custom\x20Page\x20','isArray','version','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','9WKKBuk','parentMenuId','../../../templates/custom-pages','trim','page.create','page-content','isInteger','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','utf8','page','BLANK','parent-menu-id','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','values','create'];a159_0x17d5=function(){return _0x41dce7;};return a159_0x17d5();}import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a159_0x3fe597(0x1f9),'ONEPAGE',a159_0x3fe597(0x1e7)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a159_0x3fe597(0x1f1));export const pageCreate={'service':a159_0x3fe597(0x1f8),'command':a159_0x3fe597(0x1fd),'description':a159_0x3fe597(0x1f6),'risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a159_0x3fe597(0x1da),'message':a159_0x3fe597(0x203),'hint':a159_0x3fe597(0x1d6)},{'name':a159_0x3fe597(0x1f4),'message':a159_0x3fe597(0x1d8),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'name','type':a159_0x3fe597(0x1e1),'description':a159_0x3fe597(0x1fb)},{'name':a159_0x3fe597(0x1fa),'type':'number','description':a159_0x3fe597(0x1e0)},{'name':'page-pattern','type':a159_0x3fe597(0x1e1),'description':a159_0x3fe597(0x1ff),'enum':CUSTOM_PAGE_PATTERNS},{'name':a159_0x3fe597(0x1e3),'type':a159_0x3fe597(0x1e1),'description':a159_0x3fe597(0x20e)},APPCODE_FLAG],async 'validate'(_0x3f7b92){await readValidatedPageSource(_0x3f7b92);},async 'dryRun'(_0x551df5){const _0x5ce1e2=a159_0x3fe597,_0x5d86d7=readInput(_0x551df5,await readValidatedPageSource(_0x551df5));return{'method':'POST','url':_0x5ce1e2(0x1fe),'body':{'appCode':_0x5d86d7['appCode'],'pageName':_0x5d86d7[_0x5ce1e2(0x206)],..._0x5d86d7['parentMenuId']!=null?{'parentMenuId':_0x5d86d7[_0x5ce1e2(0x1f0)]}:{},'createMenu':_0x5d86d7['createMenu'],'codeContent':_0x5d86d7[_0x5ce1e2(0x1e8)]},'description':_0x5ce1e2(0x1e2)+JSON[_0x5ce1e2(0x204)](_0x5d86d7['pageName'])+_0x5ce1e2(0x20d)};},async 'execute'(_0x1fa884){const _0x1a4a71=a159_0x3fe597,_0x49747e=readInput(_0x1fa884,await readValidatedPageSource(_0x1fa884)),_0x8dd575=await createCustomPage(_0x49747e);if(!Number[_0x1a4a71(0x1f5)](_0x8dd575[_0x1a4a71(0x20c)])||_0x8dd575[_0x1a4a71(0x20c)]<=0x0)throw CliErrors[_0x1a4a71(0x1e5)](_0x1a4a71(0x20b));const _0x5c009e=buildCustomPageDevelopmentUrl(_0x49747e[_0x1a4a71(0x217)],_0x8dd575[_0x1a4a71(0x216)]),_0x5b83ba=buildCustomPageEditUrl(_0x49747e[_0x1a4a71(0x217)],_0x8dd575['pageId']);return{'ok':!![],'data':{'operation':_0x1a4a71(0x1f3),'pageType':'CUSTOM','pagePattern':readPagePattern(_0x1fa884),'selector':{'appCode':_0x49747e[_0x1a4a71(0x217)],'pageName':_0x49747e[_0x1a4a71(0x206)]},'before':null,'after':{'pageId':_0x8dd575['pageId'],'pageName':_0x8dd575[_0x1a4a71(0x206)],'appCode':_0x8dd575[_0x1a4a71(0x217)],'version':_0x8dd575[_0x1a4a71(0x1ed)],'menuId':_0x8dd575['menuId'],'menuPath':_0x8dd575[_0x1a4a71(0x216)],'files':_0x8dd575[_0x1a4a71(0x1e8)]??Object[_0x1a4a71(0x207)](_0x49747e[_0x1a4a71(0x1e8)])},'dryRun':![],'request':_0x49747e,..._0x5c009e?{'pageUrl':_0x5c009e}:{},..._0x5b83ba?{'editPageUrl':_0x5b83ba}:{},'warnings':_0x5c009e?[]:[_0x1a4a71(0x213)]},'message':_0x1a4a71(0x1eb)+_0x8dd575['pageId']+'.'};}};function readPagePattern(_0x2c38f8){const _0x514b3c=a159_0x3fe597,_0x8300a5=_0x2c38f8[_0x514b3c(0x1e9)](_0x514b3c(0x205))[_0x514b3c(0x1f2)](),_0x3440ad=_0x2c38f8[_0x514b3c(0x1e9)]('page-dir')['trim']();if(_0x8300a5&&_0x3440ad)throw CliErrors[_0x514b3c(0x21a)](_0x514b3c(0x1ee));if(_0x3440ad)return null;if(!_0x8300a5)throw CliErrors[_0x514b3c(0x21a)]('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x514b3c(0x20a)](_0x8300a5))throw CliErrors[_0x514b3c(0x21a)](_0x514b3c(0x219));return _0x8300a5;}async function readPageSource(_0x51f76d){const _0x4019cc=a159_0x3fe597,_0xac43d4=_0x51f76d[_0x4019cc(0x1e9)]('page-dir')['trim'](),_0x2a99f5=readPagePattern(_0x51f76d);if(_0x2a99f5===null){const _0x583c9d=await readCustomPageDirectory(_0xac43d4);if(Object['keys'](_0x583c9d)[_0x4019cc(0x1df)]===0x0)throw CliErrors[_0x4019cc(0x21a)](_0x4019cc(0x208));return _0x583c9d;}let _0x4cae47;try{_0x4cae47=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x2a99f5['toLowerCase']()+_0x4019cc(0x218)),_0x4019cc(0x1f7));}catch{throw CliErrors[_0x4019cc(0x21a)]('Custom\x20Page\x20pattern\x20not\x20found:\x20'+_0x2a99f5+'.');}let _0x1b5592;try{_0x1b5592=JSON[_0x4019cc(0x201)](_0x4cae47);}catch{throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x2a99f5+'.');}if(!_0x1b5592||typeof _0x1b5592!==_0x4019cc(0x214)||Array[_0x4019cc(0x1ec)](_0x1b5592)||Object[_0x4019cc(0x1fc)](_0x1b5592)[_0x4019cc(0x1de)](_0x46a6f7=>typeof _0x46a6f7!==_0x4019cc(0x1e1)))throw CliErrors[_0x4019cc(0x21a)](_0x4019cc(0x1e4)+_0x2a99f5+'.');return _0x1b5592;}async function readValidatedPageSource(_0x2230a0){const _0x2ee6e6=await readPageSource(_0x2230a0);return await validateCustomPageContent(_0x2ee6e6),_0x2ee6e6;}function readInput(_0x5bb56f,_0x932e52){const _0x5e6ff0=a159_0x3fe597,_0x52b95e=_0x5bb56f[_0x5e6ff0(0x1e9)]('name')[_0x5e6ff0(0x1f2)]()||_0x5e6ff0(0x211)+Date[_0x5e6ff0(0x1e6)]();if(_0x52b95e[_0x5e6ff0(0x1df)]>0x64)throw CliErrors[_0x5e6ff0(0x21a)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x300358=_0x5bb56f['num']('parent-menu-id',NaN),_0x2c4105=!Number[_0x5e6ff0(0x1d7)](_0x300358);if(_0x2c4105&&(!Number[_0x5e6ff0(0x1f5)](_0x300358)||_0x300358<=0x0))throw CliErrors[_0x5e6ff0(0x21a)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x5bb56f[_0x5e6ff0(0x217)],'pageName':_0x52b95e,..._0x2c4105?{'parentMenuId':_0x300358}:{},'createMenu':!![],'files':_0x932e52};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a160_0x37fa01=a160_0x151e;(function(_0x1630b3,_0x3387ce){const _0x28b8c6=a160_0x151e,_0x4df038=_0x1630b3();while(!![]){try{const _0x2b718c=-parseInt(_0x28b8c6(0xb9))/0x1+-parseInt(_0x28b8c6(0xa8))/0x2*(-parseInt(_0x28b8c6(0xab))/0x3)+-parseInt(_0x28b8c6(0xae))/0x4+parseInt(_0x28b8c6(0xaa))/0x5*(-parseInt(_0x28b8c6(0xb4))/0x6)+-parseInt(_0x28b8c6(0xad))/0x7*(parseInt(_0x28b8c6(0xb5))/0x8)+-parseInt(_0x28b8c6(0xb6))/0x9+parseInt(_0x28b8c6(0xb0))/0xa;if(_0x2b718c===_0x3387ce)break;else _0x4df038['push'](_0x4df038['shift']());}catch(_0x2d24b7){_0x4df038['push'](_0x4df038['shift']());}}}(a160_0x6773,0xe2221));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a160_0x37fa01(0xbe),'command':a160_0x37fa01(0xbc),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':'read','defaultOutputFormat':a160_0x37fa01(0xbb),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a160_0x37fa01(0xa6),'required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x13fc05){readCustomPageId(_0x13fc05);},async 'execute'(_0x14fcc4){const _0x10e205=a160_0x37fa01,_0x53bd25=readCustomPageId(_0x14fcc4),_0x1e4f00=await getCustomPageSource(_0x53bd25),{bundle:_0x392725,createTime:_0x45de4f,updateTime:_0x506361,..._0x3ecdc2}=_0x1e4f00,_0x380991=_0x1e4f00['id']??_0x53bd25,_0x16b045=_0x1e4f00['appCode']?.[_0x10e205(0xa7)]()||_0x14fcc4[_0x10e205(0xa5)](_0x10e205(0xb1))['trim'](),_0x3ebc46=buildCustomPageRuntimeUrl(_0x16b045,_0x1e4f00[_0x10e205(0xb8)]),_0x110efe=buildCustomPageEditUrl(_0x16b045,_0x380991),_0x469db2=await resolveCustomPageDevelopmentUrl(_0x16b045,_0x380991,_0x14fcc4['cookie']);return{'ok':!![],'data':{..._0x3ecdc2,..._0x3ebc46?{'runtimePageUrl':_0x3ebc46}:{},..._0x469db2?{'pageUrl':_0x469db2}:{},..._0x110efe?{'editPageUrl':_0x110efe}:{},..._0x45de4f==null?{}:{'createTime':formatTime(_0x45de4f)},..._0x506361==null?{}:{'updateTime':formatTime(_0x506361)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0x53bd25+'.'};}};function a160_0x151e(_0x496ce2,_0x5b6edc){_0x496ce2=_0x496ce2-0xa4;const _0x67735e=a160_0x6773();let _0x151e8d=_0x67735e[_0x496ce2];return _0x151e8d;}function formatTime(_0xa7d899){const _0x46b2bc=a160_0x37fa01,_0x565103=new Date(_0xa7d899);if(Number[_0x46b2bc(0xa4)](_0x565103[_0x46b2bc(0xac)]()))return String(_0xa7d899);const _0x18c8eb=[_0x565103['getFullYear'](),String(_0x565103[_0x46b2bc(0xaf)]()+0x1)[_0x46b2bc(0xa9)](0x2,'0'),String(_0x565103[_0x46b2bc(0xbd)]())['padStart'](0x2,'0')][_0x46b2bc(0xba)]('-'),_0x5b37cd=[String(_0x565103[_0x46b2bc(0xb7)]())[_0x46b2bc(0xa9)](0x2,'0'),String(_0x565103[_0x46b2bc(0xb2)]())[_0x46b2bc(0xa9)](0x2,'0'),String(_0x565103[_0x46b2bc(0xb3)]())['padStart'](0x2,'0')]['join'](':');return _0x18c8eb+'\x20'+_0x5b37cd;}function a160_0x6773(){const _0x362320=['1718KaJqPv','padStart','14765KaZYXx','6189ULxxZq','getTime','7VdeObD','7091476JATmXg','getMonth','50745600NDzGkG','appcode','getMinutes','getSeconds','2958ozCmtV','11049544chnwOH','5669442IfRgtg','getHours','pageCode','680607WeKHei','join','compress','custom-detail','getDate','page','isNaN','str','number','trim'];a160_0x6773=function(){return _0x362320;};return a160_0x6773();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x51c3d4=a161_0x3a39;function a161_0x264a(){const _0x3f4e20=['type','314807cCpoMU','Found\x20','502747NApZZE','label','121726dKZVhL','menus','read','compress','pageId','appCode','custom-list','\x20Custom\x20Page(s).','2zkrtXK','70ypylXx','19140TGlbkS','flatMap','No\x20Custom\x20Pages\x20found.','555Ggsxwn','376dshENZ','path','105330nMJvQY','length','page','89937UaoKqh','1706145QfpuxG'];a161_0x264a=function(){return _0x3f4e20;};return a161_0x264a();}(function(_0x3dc4a0,_0x2c29eb){const _0x19227b=a161_0x3a39,_0x1e8e4c=_0x3dc4a0();while(!![]){try{const _0x57aef0=parseInt(_0x19227b(0x186))/0x1*(-parseInt(_0x19227b(0x192))/0x2)+parseInt(_0x19227b(0x184))/0x3+parseInt(_0x19227b(0x17a))/0x4*(parseInt(_0x19227b(0x17d))/0x5)+parseInt(_0x19227b(0x180))/0x6+parseInt(_0x19227b(0x188))/0x7+-parseInt(_0x19227b(0x17e))/0x8*(parseInt(_0x19227b(0x183))/0x9)+parseInt(_0x19227b(0x193))/0xa*(-parseInt(_0x19227b(0x18a))/0xb);if(_0x57aef0===_0x2c29eb)break;else _0x1e8e4c['push'](_0x1e8e4c['shift']());}catch(_0x408bd5){_0x1e8e4c['push'](_0x1e8e4c['shift']());}}}(a161_0x264a,0x4fe76));function a161_0x3a39(_0xefc548,_0x6ba524){_0xefc548=_0xefc548-0x17a;const _0x264a83=a161_0x264a();let _0x3a3988=_0x264a83[_0xefc548];return _0x3a3988;}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a161_0x51c3d4(0x182),'command':a161_0x51c3d4(0x190),'description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':a161_0x51c3d4(0x18c),'defaultOutputFormat':a161_0x51c3d4(0x18d),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1a70c5){const _0x185465=a161_0x51c3d4,_0x115b3d=(await fetchMenuSnapshot(_0x1a70c5['appCode'],_0x1a70c5['cookie']))[_0x185465(0x18b)][_0x185465(0x17b)](_0x16f81a=>{const _0x57757c=_0x185465;if(_0x16f81a[_0x57757c(0x185)]!=='react'||_0x16f81a[_0x57757c(0x18e)]==null)return[];const _0x57a80a=buildCustomPageDevelopmentUrl(_0x1a70c5[_0x57757c(0x18f)],_0x16f81a[_0x57757c(0x17f)]),_0x2b6b6a=buildCustomPageEditUrl(_0x1a70c5[_0x57757c(0x18f)],_0x16f81a['pageId']);return[{'pageId':_0x16f81a['pageId'],'label':_0x16f81a[_0x57757c(0x189)],..._0x57a80a?{'pageUrl':_0x57a80a}:{},..._0x2b6b6a?{'editPageUrl':_0x2b6b6a}:{}}];});return{'ok':!![],'data':{'pages':_0x115b3d},'message':_0x115b3d['length']===0x0?_0x185465(0x17c):_0x185465(0x187)+_0x115b3d[_0x185465(0x181)]+_0x185465(0x191)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a162_0x2a92(_0x740c85,_0x52b8df){_0x740c85=_0x740c85-0x189;const _0x5973e5=a162_0x5973();let _0x2a9235=_0x5973e5[_0x740c85];return _0x2a9235;}const a162_0x108a1a=a162_0x2a92;(function(_0x4ebab9,_0x221de4){const _0x2e82df=a162_0x2a92,_0x250c45=_0x4ebab9();while(!![]){try{const _0x38e8a4=parseInt(_0x2e82df(0x198))/0x1+parseInt(_0x2e82df(0x197))/0x2*(-parseInt(_0x2e82df(0x19d))/0x3)+parseInt(_0x2e82df(0x19f))/0x4+-parseInt(_0x2e82df(0x1a5))/0x5*(parseInt(_0x2e82df(0x1ae))/0x6)+-parseInt(_0x2e82df(0x1b0))/0x7*(-parseInt(_0x2e82df(0x1a8))/0x8)+-parseInt(_0x2e82df(0x1a1))/0x9+-parseInt(_0x2e82df(0x19b))/0xa*(-parseInt(_0x2e82df(0x1ab))/0xb);if(_0x38e8a4===_0x221de4)break;else _0x250c45['push'](_0x250c45['shift']());}catch(_0x50d744){_0x250c45['push'](_0x250c45['shift']());}}}(a162_0x5973,0x59a25));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a162_0x5973(){const _0x16122f=['1130974TnxRBe','215290QpTvnx','Published\x20Custom\x20Page\x20','custom-publish','11350tQPgti','cookie','3lYcWfq','isInteger','1577960SIULPF','pageCode','1850706noQeMX','warnings','FORMAL','apiError','1360tbQRRa','appCode','Would\x20publish\x20Custom\x20Page\x20','8wyTGgG','Custom\x20Page\x20ID','compress','6127vxLqfi','number','page','3858rBJGqN','POST','498281mLcNDV','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','page.custom-publish','remark','string','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','unknown','pageId','status','Optional\x20publish\x20remark','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','push','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','runtimePageUrl','trim'];a162_0x5973=function(){return _0x16122f;};return a162_0x5973();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a162_0x108a1a(0x1ad),'command':a162_0x108a1a(0x19a),'description':a162_0x108a1a(0x194),'risk':'write','defaultOutputFormat':a162_0x108a1a(0x1aa),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a162_0x108a1a(0x1ac),'required':!![],'description':a162_0x108a1a(0x1a9)},{'name':a162_0x108a1a(0x18b),'type':a162_0x108a1a(0x18c),'description':a162_0x108a1a(0x191)}],async 'validate'(_0x1e6a6a){readCustomPageId(_0x1e6a6a);},async 'dryRun'(_0x202563){const _0x3c4b47=a162_0x108a1a,_0x466a31=readInput(_0x202563);return{'method':_0x3c4b47(0x1af),'url':'/smartapi/webcode/file/publish','body':{'id':_0x466a31[_0x3c4b47(0x18f)],..._0x466a31['remark']?{'remark':_0x466a31[_0x3c4b47(0x18b)]}:{}},'description':_0x3c4b47(0x1a7)+_0x466a31[_0x3c4b47(0x18f)]+'.'};},async 'execute'(_0x2b6b1c){const _0x1e5f00=a162_0x108a1a,_0x5af304=readInput(_0x2b6b1c);await getCustomPageSource(_0x5af304['pageId']);const _0xc745bd=await publishCustomPage(_0x5af304);if(!Number[_0x1e5f00(0x19e)](_0xc745bd)||_0xc745bd!==_0x5af304['pageId'])throw CliErrors[_0x1e5f00(0x1a4)](_0x1e5f00(0x189));const _0x32de56=await getCustomPageSource(_0x5af304[_0x1e5f00(0x18f)]);if(_0x32de56[_0x1e5f00(0x190)]!=='FORMAL')throw CliErrors[_0x1e5f00(0x1a4)](_0x1e5f00(0x192)+(_0x32de56[_0x1e5f00(0x190)]??_0x1e5f00(0x18e))+'.');const _0x2c4a16=_0x32de56['appCode']?.[_0x1e5f00(0x196)](),_0x10c988=buildCustomPageEditUrl(_0x2c4a16,_0x5af304['pageId']),_0x4a9ef1=await resolveCustomPageDevelopmentUrl(_0x2c4a16,_0x5af304[_0x1e5f00(0x18f)],_0x2b6b1c[_0x1e5f00(0x19c)]),_0x233cd5=buildMutationData(_0x5af304,!![],_0x4a9ef1,_0x10c988);_0x2c4a16&&!_0x4a9ef1&&_0x233cd5[_0x1e5f00(0x1a2)][_0x1e5f00(0x193)](_0x1e5f00(0x18d));const _0x669aa9=buildCustomPageRuntimeUrl(_0x32de56[_0x1e5f00(0x1a6)],_0x32de56[_0x1e5f00(0x1a0)]);return _0x669aa9?_0x233cd5[_0x1e5f00(0x195)]=_0x669aa9:_0x233cd5['warnings']['push']('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'),{'ok':!![],'data':_0x233cd5,'message':_0x1e5f00(0x199)+_0x5af304['pageId']+'.'};}};function readInput(_0x136510){const _0x5ad328=a162_0x108a1a,_0x38bc2a=readCustomPageId(_0x136510),_0x5e631c=_0x136510['str'](_0x5ad328(0x18b))[_0x5ad328(0x196)]();return{'pageId':_0x38bc2a,..._0x5e631c?{'remark':_0x5e631c}:{}};}function buildMutationData(_0x1aede5,_0xb09930=![],_0x374ded,_0x44468f){const _0x78c174=a162_0x108a1a;return{'operation':_0x78c174(0x18a),'selector':{'pageId':_0x1aede5[_0x78c174(0x18f)]},'before':null,'after':{'pageId':_0x1aede5[_0x78c174(0x18f)],'status':_0x78c174(0x1a3)},'dryRun':!_0xb09930,'request':_0x1aede5,..._0x374ded?{'pageUrl':_0x374ded}:{},..._0x44468f?{'editPageUrl':_0x44468f}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a163_0x49c4b2=a163_0x5acf;(function(_0x4b1cc3,_0x1378ab){const _0x469ee1=a163_0x5acf,_0x558a7e=_0x4b1cc3();while(!![]){try{const _0xa6e692=-parseInt(_0x469ee1(0x1ba))/0x1*(-parseInt(_0x469ee1(0x1bc))/0x2)+-parseInt(_0x469ee1(0x1b1))/0x3+-parseInt(_0x469ee1(0x1af))/0x4*(-parseInt(_0x469ee1(0x1bd))/0x5)+-parseInt(_0x469ee1(0x1c1))/0x6*(parseInt(_0x469ee1(0x1ab))/0x7)+-parseInt(_0x469ee1(0x1b2))/0x8+parseInt(_0x469ee1(0x1bf))/0x9*(-parseInt(_0x469ee1(0x1b0))/0xa)+-parseInt(_0x469ee1(0x1b8))/0xb*(-parseInt(_0x469ee1(0x1c0))/0xc);if(_0xa6e692===_0x1378ab)break;else _0x558a7e['push'](_0x558a7e['shift']());}catch(_0x3e54a6){_0x558a7e['push'](_0x558a7e['shift']());}}}(a163_0x3e80,0xec0a5));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a163_0x5acf(_0x1942fa,_0xfa4bba){_0x1942fa=_0x1942fa-0x1a7;const _0x3e8072=a163_0x3e80();let _0x5acf63=_0x3e8072[_0x1942fa];return _0x5acf63;}import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';function a163_0x3e80(){const _0x1f8433=['isInteger','type','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','21118746gmmBVn','validation','2057NBjzba','menus','698wAjqzn','1340RrkVsq','num','2289339uAxQAo','12rvpYZP','2488902SDcQSU','/ide/','path','pageId','message','/pages/','14NdXihy','file','map','find','21404JUvVOy','20jbdehK','2577873lrKdqH','7258872nfxdLe','trim','length'];a163_0x3e80=function(){return _0x1f8433;};return a163_0x3e80();}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a163_0x49c4b2(0x1b7)};function trimOptional(_0x51fdff){const _0x483aa2=a163_0x49c4b2;return _0x51fdff?.[_0x483aa2(0x1b3)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x1a4382,_0x1688d3){const _0x1c715f=trimOptional(_0x1a4382),_0x3f7abb=trimOptional(_0x1688d3);if(!_0x1c715f||!_0x3f7abb)return undefined;return getPublishedAppDomain(_0x1c715f)+'/'+encodeURIComponent(_0x3f7abb);}export function buildCustomPageDevelopmentUrl(_0x1fd820,_0x40726e){const _0x1ec33e=a163_0x49c4b2,_0x4c0556=trimOptional(_0x1fd820),_0x2e6b70=trimOptional(_0x40726e);if(!_0x4c0556||!_0x2e6b70)return undefined;return getAppBaseUrl(_0x4c0556)+_0x1ec33e(0x1aa)+encodeURIComponent(_0x2e6b70);}export async function resolveCustomPageDevelopmentUrl(_0xf8a319,_0xdfb2fe,_0x4c5b36){const _0x1d59ae=a163_0x49c4b2,_0x28ba8b=trimOptional(_0xf8a319);if(!_0x28ba8b)return undefined;try{const _0x1bb755=(await fetchMenuSnapshot(_0x28ba8b,_0x4c5b36))[_0x1d59ae(0x1bb)][_0x1d59ae(0x1ae)](_0x3d6d05=>_0x3d6d05[_0x1d59ae(0x1b6)]==='react'&&_0x3d6d05[_0x1d59ae(0x1a8)]===_0xdfb2fe);return buildCustomPageDevelopmentUrl(_0x28ba8b,_0x1bb755?.[_0x1d59ae(0x1a7)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x49fd25,_0x4d3cfc){const _0xa2138=a163_0x49c4b2,_0x19c960=trimOptional(_0x49fd25);if(!_0x19c960)return;const _0x3764bb=trimOptional(String(_0x4d3cfc??''));if(!_0x3764bb)return;return getAppBaseUrl(_0x19c960)+_0xa2138(0x1c2)+encodeURIComponent(_0x3764bb);}export async function validateCustomPageContent(_0x65e384){const _0x8ba1f=a163_0x49c4b2,_0x4b6794=await validateCustomPageSourceFiles(_0x65e384);if(_0x4b6794[_0x8ba1f(0x1b4)]>0x0)throw CliErrors[_0x8ba1f(0x1b9)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x4b6794[_0x8ba1f(0x1ad)](_0x4ee79f=>_0x4ee79f[_0x8ba1f(0x1ac)]+':\x20'+_0x4ee79f[_0x8ba1f(0x1a9)])['join'](';\x20'));}export function readCustomPageId(_0x38746e){const _0x52327f=a163_0x49c4b2,_0x214cb3=_0x38746e[_0x52327f(0x1be)]('id');if(!Number[_0x52327f(0x1b5)](_0x214cb3)||_0x214cb3<=0x0)throw CliErrors['validation']('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x214cb3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a164_0x3ada7e=a164_0xe87f;(function(_0x583c22,_0xd70e81){const _0x361c90=a164_0xe87f,_0x369b60=_0x583c22();while(!![]){try{const _0x5a735b=-parseInt(_0x361c90(0x106))/0x1+parseInt(_0x361c90(0x109))/0x2*(-parseInt(_0x361c90(0x119))/0x3)+-parseInt(_0x361c90(0x104))/0x4*(parseInt(_0x361c90(0x114))/0x5)+parseInt(_0x361c90(0x10c))/0x6*(-parseInt(_0x361c90(0x116))/0x7)+-parseInt(_0x361c90(0x118))/0x8*(parseInt(_0x361c90(0x10e))/0x9)+-parseInt(_0x361c90(0x10f))/0xa*(-parseInt(_0x361c90(0x10a))/0xb)+parseInt(_0x361c90(0x111))/0xc;if(_0x5a735b===_0xd70e81)break;else _0x369b60['push'](_0x369b60['shift']());}catch(_0x23bca5){_0x369b60['push'](_0x369b60['shift']());}}}(a164_0x35a9,0x5f447));function a164_0x35a9(){const _0x34642d=['endsWith','.tsx','4pNbHfp','11FmBKYe','some','48jsZOaj','filter','54cxfxGa','1362440RCVXDr','message','21872520ZqRcSD','map','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','1415NZILbb','page\x20files','190071DSNAkQ','entries','765792izkGkr','834294lZoksA','typescript','trim','1556WHuAEx','toLowerCase','110888mReQXQ'];a164_0x35a9=function(){return _0x34642d;};return a164_0x35a9();}import{format}from'prettier';const SOURCE_PARSERS={'.js':'babel','.jsx':'babel','.ts':a164_0x3ada7e(0x102),'.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=['.jsx',a164_0x3ada7e(0x108)];function a164_0xe87f(_0x472e7b,_0x9a6191){_0x472e7b=_0x472e7b-0x102;const _0x35a9bf=a164_0x35a9();let _0xe87f0f=_0x35a9bf[_0x472e7b];return _0xe87f0f;}export async function validateCustomPageSourceFiles(_0x2512aa){const _0x4d76f4=a164_0x3ada7e,_0x4fade8=Object[_0x4d76f4(0x117)](_0x2512aa)[_0x4d76f4(0x10d)](([_0x2c7b8b])=>getParser(_0x2c7b8b));if(!_0x4fade8['some'](([_0x483784])=>isReactSourceFile(_0x483784)))return[{'file':_0x4d76f4(0x115),'message':_0x4d76f4(0x113)}];const _0x37e2a8=await Promise['all'](_0x4fade8[_0x4d76f4(0x112)](async([_0x2c91ed,_0x1188b1])=>{const _0x51a668=_0x4d76f4;try{return await format(_0x1188b1,{'parser':getParser(_0x2c91ed)}),undefined;}catch(_0x24da22){return{'file':_0x2c91ed,'message':_0x24da22 instanceof Error?_0x24da22[_0x51a668(0x110)]:String(_0x24da22)};}}));return _0x37e2a8[_0x4d76f4(0x10d)](_0x52e37f=>_0x52e37f!==undefined);}function getParser(_0x21f944){const _0x624eb3=a164_0x3ada7e,_0x396726=_0x21f944['trim']()['toLowerCase']();return Object[_0x624eb3(0x117)](SOURCE_PARSERS)['find'](([_0xc3c486])=>_0x396726[_0x624eb3(0x107)](_0xc3c486))?.[0x1];}function isReactSourceFile(_0x1cf793){const _0x282149=a164_0x3ada7e,_0x390917=_0x1cf793[_0x282149(0x103)]()[_0x282149(0x105)]();return CUSTOM_PAGE_EXTENSIONS[_0x282149(0x10b)](_0x1298ea=>_0x390917[_0x282149(0x107)](_0x1298ea));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x5c6bd1=a165_0x59c1;(function(_0x3645f7,_0xf4b7a2){const _0x18d967=a165_0x59c1,_0x3f1745=_0x3645f7();while(!![]){try{const _0x411d45=parseInt(_0x18d967(0xa2))/0x1+parseInt(_0x18d967(0xa5))/0x2+parseInt(_0x18d967(0xaa))/0x3*(-parseInt(_0x18d967(0x9d))/0x4)+-parseInt(_0x18d967(0x9e))/0x5+-parseInt(_0x18d967(0xa7))/0x6+-parseInt(_0x18d967(0xa8))/0x7*(-parseInt(_0x18d967(0x9b))/0x8)+-parseInt(_0x18d967(0xb5))/0x9*(parseInt(_0x18d967(0xaf))/0xa);if(_0x411d45===_0xf4b7a2)break;else _0x3f1745['push'](_0x3f1745['shift']());}catch(_0x254cf7){_0x3f1745['push'](_0x3f1745['shift']());}}}(a165_0x9c77,0x81d61));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_0x5c6bd1(0xac),'command':a165_0x5c6bd1(0x9a),'description':a165_0x5c6bd1(0xa9),'risk':a165_0x5c6bd1(0xb3),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a165_0x5c6bd1(0xa1),'message':a165_0x5c6bd1(0x9f),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'id','type':a165_0x5c6bd1(0x99),'required':!![],'description':a165_0x5c6bd1(0xb0)},{'name':'page-dir','type':'string','required':!![],'description':a165_0x5c6bd1(0xb4)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x59300a){readCustomPageId(_0x59300a),await readValidatedPageContent(_0x59300a);},async 'dryRun'(_0x162d6d){const _0x1c32aa=a165_0x5c6bd1,_0x59b28b=await readInput(_0x162d6d);return{'method':_0x1c32aa(0xa3),'url':'/smartapi/webcode/page/update/content','body':{'id':_0x59b28b[_0x1c32aa(0xa0)],'codeContent':_0x59b28b[_0x1c32aa(0xab)]},'description':'Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20'+_0x59b28b[_0x1c32aa(0xa0)]+'.'};},async 'execute'(_0x436312){const _0xfccc8e=a165_0x5c6bd1,_0x38d852=await readInput(_0x436312),_0x1009e1=await updateCustomPageContent({'pageId':_0x38d852[_0xfccc8e(0xa0)],'pageContent':_0x38d852[_0xfccc8e(0xab)]});if(!Number[_0xfccc8e(0xb1)](_0x1009e1[_0xfccc8e(0xae)])||_0x1009e1[_0xfccc8e(0xae)]<=0x0)throw CliErrors['apiError'](_0xfccc8e(0x9c));const _0x138ce1=buildCustomPageEditUrl(_0x38d852[_0xfccc8e(0xb6)],_0x38d852['pageId']),_0x312bc0=await resolveCustomPageDevelopmentUrl(_0x38d852[_0xfccc8e(0xb6)],_0x38d852[_0xfccc8e(0xa0)],_0x436312['cookie']);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x38d852[_0xfccc8e(0xb6)],'pageId':_0x38d852[_0xfccc8e(0xa0)]},'before':null,'after':{'pageId':_0x1009e1['pageId'],'version':_0x1009e1[_0xfccc8e(0xae)],'pageContent':_0x38d852['pageContent']},'dryRun':![],'request':_0x38d852,..._0x312bc0?{'pageUrl':_0x312bc0}:{},..._0x138ce1?{'editPageUrl':_0x138ce1}:{},'warnings':_0x312bc0?[]:[_0xfccc8e(0xad)]},'message':'Updated\x20Custom\x20Page\x20'+_0x38d852[_0xfccc8e(0xa0)]+'.'};}};async function readInput(_0x27d95f){const _0x14f830=a165_0x5c6bd1,_0x2e6d7d=readCustomPageId(_0x27d95f),_0x47a23c=_0x27d95f[_0x14f830(0xb2)](_0x14f830(0x98))['trim']()||(await getCustomPageSource(_0x2e6d7d))['appCode']?.[_0x14f830(0xa6)]();if(!_0x47a23c)throw CliErrors[_0x14f830(0xa4)](_0x14f830(0xb7)+_0x2e6d7d+'.');return{'appCode':_0x47a23c,'pageId':_0x2e6d7d,'pageContent':await readValidatedPageContent(_0x27d95f)};}function a165_0x59c1(_0x255483,_0x2ff091){_0x255483=_0x255483-0x98;const _0x9c77a4=a165_0x9c77();let _0x59c1e8=_0x9c77a4[_0x255483];return _0x59c1e8;}function a165_0x9c77(){const _0x47a6ce=['str','write','Directory\x20containing\x20all\x20complete\x20page\x20files','27unIyeB','appCode','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','appcode','number','custom-update','144616HOBZxm','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','1116tpsHZx','1462745NqAFRr','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','pageId','page-content','939617QxewnY','POST','validation','1325032dcFDFG','trim','1262412kiVncL','196fBWifQ','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','2295rquIEc','pageContent','page','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','newVersion','2866980ZxDwQu','Custom\x20Page\x20ID','isInteger'];a165_0x9c77=function(){return _0x47a6ce;};return a165_0x9c77();}async function readValidatedPageContent(_0x5df85e){const _0x4adea5=a165_0x5c6bd1,_0x3451a7=await readCustomPageDirectory(_0x5df85e[_0x4adea5(0xb2)]('page-dir'));return await validateCustomPageContent(_0x3451a7),_0x3451a7;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a166_0x5d409e=a166_0x40db;(function(_0x133c95,_0x591134){const _0x320713=a166_0x40db,_0x530a10=_0x133c95();while(!![]){try{const _0x130aeb=parseInt(_0x320713(0x119))/0x1+parseInt(_0x320713(0x115))/0x2*(parseInt(_0x320713(0x12e))/0x3)+parseInt(_0x320713(0x113))/0x4*(parseInt(_0x320713(0x127))/0x5)+-parseInt(_0x320713(0x122))/0x6*(parseInt(_0x320713(0x118))/0x7)+parseInt(_0x320713(0x11a))/0x8+parseInt(_0x320713(0x117))/0x9+-parseInt(_0x320713(0x11e))/0xa;if(_0x130aeb===_0x591134)break;else _0x530a10['push'](_0x530a10['shift']());}catch(_0x465052){_0x530a10['push'](_0x530a10['shift']());}}}(a166_0x5e05,0xf1861));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a166_0x40db(_0x20645b,_0x571665){_0x20645b=_0x20645b-0x112;const _0x5e0516=a166_0x5e05();let _0x40db69=_0x5e0516[_0x20645b];return _0x40db69;}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a166_0x5d409e(0x11c),'command':a166_0x5d409e(0x125),'description':a166_0x5d409e(0x12c),'risk':a166_0x5d409e(0x12b),'defaultOutputFormat':a166_0x5d409e(0x123),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a166_0x5d409e(0x121),'type':a166_0x5d409e(0x112),'description':a166_0x5d409e(0x124)}],async 'validate'(_0x327bc0){validateDatasetSelector(_0x327bc0);},async 'dryRun'(_0x202163){const _0x3cc0f9=a166_0x5d409e,_0x50615e=await loadDatasetDetailForPage(_0x202163);return{'method':_0x3cc0f9(0x120),'url':'/smartapi/lovrabet/dataset/'+_0x50615e[_0x3cc0f9(0x128)]+'/standard-page-status?appCode='+encodeURIComponent(_0x202163[_0x3cc0f9(0x11b)]),'description':serializeDryRunDescription({'dataset':{'id':_0x50615e['id'],'code':_0x50615e[_0x3cc0f9(0x128)],'name':_0x50615e['name']},'action':_0x3cc0f9(0x116)})};},async 'execute'(_0x532de7){const _0x2c0318=a166_0x5d409e,_0xed4b14=await loadDatasetDetailForPage(_0x532de7),_0x3bb7a3=await loadDataListPageStatusForGenerate(_0x532de7,_0xed4b14[_0x2c0318(0x128)]),_0x35ca89=getUndeletedRelatedPages(_0xed4b14),_0x38f081=assessDataListPageState(_0xed4b14[_0x2c0318(0x128)],_0x3bb7a3,{'fallbackUndeletedPages':_0x35ca89});return{'ok':!![],'data':{'datasetCode':_0xed4b14[_0x2c0318(0x128)],'precheckSource':_0x3bb7a3?.[_0x2c0318(0x126)]??_0x2c0318(0x11f),'status':_0x38f081[_0x2c0318(0x129)],'manualResolutionRequired':_0x38f081[_0x2c0318(0x12d)],'nextAction':_0x38f081[_0x2c0318(0x114)],'dataListPageStatus':_0x3bb7a3,'relatedPages':{'total':_0xed4b14[_0x2c0318(0x11d)][_0x2c0318(0x12a)],'undeletedCount':_0x35ca89['length']}}};}};function a166_0x5e05(){const _0xff1271=['76872ZRIwgJ','nextAction','98tNwmBw','query-data-list-status','12645603UTgDQf','11879329UfuzeJ','257537GIdHbR','12372992eupaHK','appCode','page','relatedPages','31632050xRuwPF','related-pages-fallback','GET','alias','6TUlmhh','compress','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','data-list-status','source','215qIMAin','code','status','length','read','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','manualResolutionRequired','111057KYyQmX','string'];a166_0x5e05=function(){return _0xff1271;};return a166_0x5e05();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a167_0x173a(){const _0x3cb341=['appCode','137919qKkYGB','412dPvLur','progressRate','10657197dhVJDL','precheck','PARTIAL_SUCCESS','4HkpYYz','code','status','8KLklsD','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','page-pattern','1049880NMQzNb','page','reused','21631214gSoKgi','55485cqMSCH','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','Submitted\x20a\x20generate\x20task','clientOperationId','source','dataListPageStatus','dataset','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','generate-start','bool','dryRun','related-pages-fallback','allowGenerate','manualResolutionRequired','/smartapi/lovrabet/dataset/','name','13174dlcPlf','operationId','apply','CRUD_PAGE_SET','currentStep','3246LfzZms','POST','message','fieldCount','alias','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','Reusing\x20an\x20existing\x20generate\x20task','191823MatknT','number','taskId','nextAction','compress','DATA_LIST','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','boolean'];a167_0x173a=function(){return _0x3cb341;};return a167_0x173a();}const a167_0x1ac45d=a167_0x55d6;(function(_0x480a51,_0x1f4594){const _0x5e87f4=a167_0x55d6,_0x7b1dc3=_0x480a51();while(!![]){try{const _0x30af03=-parseInt(_0x5e87f4(0x1d6))/0x1+-parseInt(_0x5e87f4(0x1dc))/0x2*(parseInt(_0x5e87f4(0x1cd))/0x3)+-parseInt(_0x5e87f4(0x1d7))/0x4*(parseInt(_0x5e87f4(0x1e6))/0x5)+parseInt(_0x5e87f4(0x1fb))/0x6*(-parseInt(_0x5e87f4(0x1f6))/0x7)+parseInt(_0x5e87f4(0x1df))/0x8*(parseInt(_0x5e87f4(0x1d9))/0x9)+parseInt(_0x5e87f4(0x1e2))/0xa+parseInt(_0x5e87f4(0x1e5))/0xb;if(_0x30af03===_0x1f4594)break;else _0x7b1dc3['push'](_0x7b1dc3['shift']());}catch(_0x34fedb){_0x7b1dc3['push'](_0x7b1dc3['shift']());}}}(a167_0x173a,0xca4e1));function a167_0x55d6(_0x530787,_0xb06071){_0x530787=_0x530787-0x1c7;const _0x173a72=a167_0x173a();let _0x55d6f0=_0x173a72[_0x530787];return _0x55d6f0;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a167_0x1ac45d(0x1e3),'command':a167_0x1ac45d(0x1ee),'description':a167_0x1ac45d(0x1cb),'risk':'write','defaultOutputFormat':a167_0x1ac45d(0x1d1),'rejectedFlags':[{'name':'page-type','message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':a167_0x1ac45d(0x1e1),'message':a167_0x1ac45d(0x1e7),'hint':a167_0x1ac45d(0x1d3)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a167_0x1ac45d(0x1ca),'type':'string','description':a167_0x1ac45d(0x1ed)},{'name':a167_0x1ac45d(0x1f8),'type':a167_0x1ac45d(0x1d4),'description':a167_0x1ac45d(0x1e0)}],async 'validate'(_0x3bc54a){validateDatasetSelector(_0x3bc54a);},async 'dryRun'(_0x264ff5){const _0x228ecd=a167_0x1ac45d,_0x37247c=await prepare(_0x264ff5);return{'method':_0x228ecd(0x1c7),'url':_0x228ecd(0x1f4)+_0x37247c[_0x228ecd(0x1ec)][_0x228ecd(0x1dd)]+'/generate-standard-pages/start','body':{'appCode':_0x264ff5[_0x228ecd(0x1d5)],'clientOperationId':_0x37247c[_0x228ecd(0x1e9)]},'description':serializeDryRunDescription({'dataset':{'id':_0x37247c['dataset']['id'],'code':_0x37247c[_0x228ecd(0x1ec)][_0x228ecd(0x1dd)],'name':_0x37247c[_0x228ecd(0x1ec)][_0x228ecd(0x1f5)],'fieldCount':_0x37247c['dataset'][_0x228ecd(0x1c9)]},'precheckSource':_0x37247c['dataListPageStatus']?.[_0x228ecd(0x1ea)]??_0x228ecd(0x1f1),'action':_0x228ecd(0x1ee),'clientOperationId':_0x37247c[_0x228ecd(0x1e9)],'plannedStatus':_0x37247c[_0x228ecd(0x1da)][_0x228ecd(0x1de)],'reason':_0x37247c[_0x228ecd(0x1da)][_0x228ecd(0x1c8)]})};},async 'execute'(_0x54348a){const _0x832e23=a167_0x1ac45d;if(!_0x54348a[_0x832e23(0x1ef)](_0x832e23(0x1f8))){const _0x293fc8=await pageGenerateStart[_0x832e23(0x1f0)](_0x54348a);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x293fc8};}const _0x23c082=await prepare(_0x54348a);if(!_0x23c082[_0x832e23(0x1da)][_0x832e23(0x1f2)])return{'ok':![],'message':_0x23c082[_0x832e23(0x1da)]['message'],'data':{'datasetCode':_0x23c082['dataset'][_0x832e23(0x1dd)],'pageType':_0x832e23(0x1d2),'pagePattern':_0x832e23(0x1f9),'clientOperationId':_0x23c082[_0x832e23(0x1e9)],'precheckSource':_0x23c082[_0x832e23(0x1eb)]?.[_0x832e23(0x1ea)]??_0x832e23(0x1f1),'status':_0x23c082[_0x832e23(0x1da)][_0x832e23(0x1de)],'manualResolutionRequired':_0x23c082[_0x832e23(0x1da)][_0x832e23(0x1f3)],'nextAction':_0x23c082['precheck'][_0x832e23(0x1d0)],'query':{'command':buildDataListPageStatusQueryCommand(_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],_0x54348a[_0x832e23(0x1d5)])},'dataListPageStatus':_0x23c082[_0x832e23(0x1eb)]}};const _0x5e9180=await startGenerateDataListPages(_0x54348a[_0x832e23(0x1d5)],_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],{'clientOperationId':_0x23c082['clientOperationId']}),_0x4c6637=_0x5e9180['status']==='SUCCESS'||_0x5e9180['status']===_0x832e23(0x1db)?await loadDataListPageStatusForGenerate(_0x54348a,_0x23c082[_0x832e23(0x1ec)]['code']):null,_0x318539=assessGenerateOperationState(_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],_0x5e9180['status'],_0x4c6637);return{'ok':!![],'message':_0x5e9180[_0x832e23(0x1e4)]?_0x832e23(0x1cc):_0x832e23(0x1e8),'data':{'datasetCode':_0x23c082[_0x832e23(0x1ec)]['code'],'appCode':_0x54348a[_0x832e23(0x1d5)],'pageType':_0x832e23(0x1d2),'pagePattern':_0x832e23(0x1f9),'taskId':_0x5e9180[_0x832e23(0x1cf)]??null,'operationId':_0x5e9180['operationId']??null,'clientOperationId':_0x23c082[_0x832e23(0x1e9)],'jobStatus':_0x5e9180[_0x832e23(0x1de)]??null,'progressRate':typeof _0x5e9180[_0x832e23(0x1d8)]===_0x832e23(0x1ce)?_0x5e9180[_0x832e23(0x1d8)]:null,'currentStep':_0x5e9180[_0x832e23(0x1fa)]??null,'reused':_0x5e9180[_0x832e23(0x1e4)]===!![],'status':_0x318539[_0x832e23(0x1de)],'manualResolutionRequired':_0x318539[_0x832e23(0x1f3)],'nextAction':_0x318539[_0x832e23(0x1d0)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],{'appCode':_0x54348a['appCode'],'taskId':_0x5e9180[_0x832e23(0x1cf)],'operationId':_0x5e9180[_0x832e23(0x1f7)],'clientOperationId':_0x23c082[_0x832e23(0x1e9)]})},'dataListPageStatus':_0x4c6637}};}};async function prepare(_0x2cd4db){const _0x2e3b65=a167_0x1ac45d,_0x14ab2d=await loadDatasetDetailForPage(_0x2cd4db),_0x2a07e3=await loadDataListPageStatusForGenerate(_0x2cd4db,_0x14ab2d[_0x2e3b65(0x1dd)]),_0x190e0=getUndeletedRelatedPages(_0x14ab2d);return{'dataset':_0x14ab2d,'dataListPageStatus':_0x2a07e3,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x14ab2d['code'],_0x2a07e3,{'fallbackUndeletedPages':_0x190e0})};}
|