@lovrabet/rabetbase-cli 2.4.6 → 2.4.7-beta.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/README.md +4 -4
- 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/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.d.ts +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/get.js +1 -1
- package/lib/commands/config/index.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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.d.ts +2 -0
- package/lib/commands/kb/search.js +1 -0
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/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/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +17 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +2 -2
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +1 -1
- package/lib/core/bff/utils.d.ts +2 -2
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.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 +2 -2
- package/sidecar/flags.json +1 -1
- package/skills/rabetbase/SKILL.md +30 -30
- package/skills/rabetbase/guides/backend-function.md +30 -30
- package/skills/rabetbase/guides/best-practices.md +8 -8
- package/skills/rabetbase/guides/bff-creation-workflow.md +16 -16
- package/skills/rabetbase/guides/conflict-detection.md +3 -3
- package/skills/rabetbase/guides/custom-page-workflow.md +8 -8
- package/skills/rabetbase/guides/data-api-guidelines.md +6 -6
- package/skills/rabetbase/guides/legacy-application-blueprint-workflow.md +8 -8
- package/skills/rabetbase/guides/sql-creation-workflow.md +2 -2
- package/skills/rabetbase/guides/troubleshooting.md +6 -6
- package/skills/rabetbase/guides/typescript-sdk.md +10 -10
- package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +1 -1
- package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +10 -10
- package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
- package/skills/rabetbase/references/rabetbase-bff-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-bff-delete.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-detail.md +4 -4
- package/skills/rabetbase/references/rabetbase-bff-list.md +8 -8
- package/skills/rabetbase/references/rabetbase-bff-pull.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +3 -3
- package/skills/rabetbase/references/rabetbase-bff-status.md +1 -1
- package/skills/rabetbase/references/rabetbase-codegen-sql.md +3 -3
- package/skills/rabetbase/references/rabetbase-dataset-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +13 -3
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +3 -3
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/rules/lovrabet_rules.mdc.tpl +7 -7
- package/templates/skill/SKILL.md.tpl +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
const a141_0x2ba8fa=a141_0x1afe;function a141_0x3b4d(){const _0x1e7198=['channelConfig','channelType','from-env','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','FEISHU','length','stringify','30NkqaMR','appCode','validation','\x20--type\x20','notification_config_field_forbidden','Notification\x20config\x20','has','\x20must\x20be\x20an\x20object.','320892EovgpW','\x22\x20cannot\x20exceed\x20','connectTimeout','a\x20supported\x20string','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Invalid\x20--','readTimeout','notification_config_field_unknown','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','description','\x20failed.','notification_config_channel_field_forbidden','Create\x20JSON\x20requires\x20field\x20','endpointUrl:null','name','notification_config_confirmation_required','Item\x20','channelConfigRaw','kind','Notification\x20config\x20list\x20item\x20','create','\x22\x20must\x20be\x20a\x20non-empty\x20string.','stdin','object','3LIBxVj','includes','21241179qMCuig','configCode','environment\x20variable\x20','num','notification_config_source_unavailable','\x20has\x20an\x20invalid\x20channelType.','DINGTALK','_unavailable','update','bccList','replyTo','notification_config_field_invalid','file','yes','\x20--format\x20compress','10suFDvT','Application-level\x20notification\x20config\x20ID','EMAIL','setEncoding','\x20has\x20invalid\x20field\x20\x22','configName','channelCode','3043932YQXUQH','134085qGwNvi','\x20characters.','prototype','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','boolean','a\x20string\x20or\x20null','\x20has\x20an\x20invalid\x20id.','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','emailTargets','a\x20non-empty\x20string','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','notification_config_field_required','isArray','notification_config_response_invalid','dry-run','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','a\x20JSON\x20object\x20or\x20null','Notification\x20JSON\x20from\x20','type','call','4218448kgxIfo','isSafeInteger','notification_config_update_empty','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','updateTime','string','\x20is\x20invalid.','Notification\x20JSON\x20field\x20\x22','str','\x22channelType\x22.','messageTemplate','endpointUrl','\x20has\x20an\x20unsupported\x20channelType.','854553XPbFEq','endpointUrlRaw','trim','push','keys','path','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Missing\x20notification\x20JSON\x20source.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','a\x20JSON\x20object','WECOM','\x20is\x20missing\x20required\x20field\x20\x22','env','number','subjectPrefix','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','notification_config_','Allowed\x20values:\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','bool','\x22\x20is\x20forbidden.','file\x20','Invalid\x20notification\x20config\x20response.','join','utf8','Notification\x20JSON\x20source\x20is\x20ambiguous.','1371574kGeVsD'];a141_0x3b4d=function(){return _0x1e7198;};return a141_0x3b4d();}(function(_0x54632c,_0x2a37a7){const _0x5300c8=a141_0x1afe,_0x29e8c0=_0x54632c();while(!![]){try{const _0x5c7c0f=-parseInt(_0x5300c8(0x1cd))/0x1+-parseInt(_0x5300c8(0x1bd))/0x2*(parseInt(_0x5300c8(0x1e6))/0x3)+-parseInt(_0x5300c8(0x181))/0x4+parseInt(_0x5300c8(0x182))/0x5+parseInt(_0x5300c8(0x1c5))/0x6*(-parseInt(_0x5300c8(0x1a3))/0x7)+parseInt(_0x5300c8(0x196))/0x8+-parseInt(_0x5300c8(0x16b))/0x9*(-parseInt(_0x5300c8(0x17a))/0xa);if(_0x5c7c0f===_0x2a37a7)break;else _0x29e8c0['push'](_0x29e8c0['shift']());}catch(_0x2c99fd){_0x29e8c0['push'](_0x29e8c0['shift']());}}}(a141_0x3b4d,0x82e85));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',a141_0x2ba8fa(0x1c2),a141_0x2ba8fa(0x171),a141_0x2ba8fa(0x1ad),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName',a141_0x2ba8fa(0x1bf),a141_0x2ba8fa(0x1a1),a141_0x2ba8fa(0x1be),'description',a141_0x2ba8fa(0x1cf),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a141_0x2ba8fa(0x1c6),a141_0x2ba8fa(0x16c),a141_0x2ba8fa(0x180)]),EMAIL_RECIPIENT_FIELDS=new Set([a141_0x2ba8fa(0x18a),'recipients','ccList',a141_0x2ba8fa(0x174),a141_0x2ba8fa(0x175),a141_0x2ba8fa(0x1b1),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a141_0x2ba8fa(0x177),'type':a141_0x2ba8fa(0x19b),'required':![],'description':a141_0x2ba8fa(0x199)},{'name':'stdin','type':a141_0x2ba8fa(0x186),'required':![],'default':![],'description':a141_0x2ba8fa(0x1d1)},{'name':a141_0x2ba8fa(0x1c0),'type':'string','required':![],'description':a141_0x2ba8fa(0x1c1)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a141_0x2ba8fa(0x1b0),'required':!![],'description':a141_0x2ba8fa(0x17b)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x47352c,_0x1ef489,_0x31d73d){return new CliError(_0x47352c,0x1,_0x1ef489,_0x31d73d);}export function readNotificationId(_0x4f0b4b){const _0x3811f9=a141_0x2ba8fa,_0x343f35=_0x4f0b4b[_0x3811f9(0x16e)]('id');if(!Number[_0x3811f9(0x197)](_0x343f35)||_0x343f35<=0x0)throw notificationError('notification_config_id_invalid',_0x3811f9(0x1b2));return _0x343f35;}export function requireNotificationExplicitYes(_0x1dd20d){const _0x1c57b6=a141_0x2ba8fa;if(_0x1dd20d[_0x1c57b6(0x1b6)](_0x1c57b6(0x190))||_0x1dd20d[_0x1c57b6(0x1b6)](_0x1c57b6(0x178)))return;throw notificationError(_0x1c57b6(0x1dd),_0x1c57b6(0x1ab),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x47ad9c,_0x13915d=a141_0x2ba8fa(0x194),_0x57eb46=a141_0x2ba8fa(0x17c)){const _0x2907d9=a141_0x2ba8fa,_0x403f0e=_0x47ad9c['str'](_0x13915d)[_0x2907d9(0x1a5)]()||_0x57eb46;if(!NOTIFICATION_CHANNEL_TYPES[_0x2907d9(0x16a)](_0x403f0e))throw CliErrors['validation'](_0x2907d9(0x1d2)+_0x13915d+':\x20'+_0x403f0e,_0x2907d9(0x1b4)+NOTIFICATION_CHANNEL_TYPES[_0x2907d9(0x1ba)](',\x20')+'.');return _0x403f0e;}export function assertSingleNotificationSource(_0x25efb0){const _0x4f90ff=a141_0x2ba8fa,_0xc00181=[],_0x5214d1=_0x25efb0[_0x4f90ff(0x19e)](_0x4f90ff(0x177))[_0x4f90ff(0x1a5)]();if(_0x5214d1)_0xc00181[_0x4f90ff(0x1a6)]({'kind':'file','path':_0x5214d1});if(_0x25efb0[_0x4f90ff(0x1b6)]('stdin'))_0xc00181[_0x4f90ff(0x1a6)]({'kind':_0x4f90ff(0x1e4)});const _0x3dafe9=_0x25efb0[_0x4f90ff(0x19e)]('from-env')[_0x4f90ff(0x1a5)]();if(_0x3dafe9)_0xc00181['push']({'kind':'env','name':_0x3dafe9});if(_0xc00181['length']===0x0)throw CliErrors['validation'](_0x4f90ff(0x1aa),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0xc00181[_0x4f90ff(0x1c3)]>0x1)throw CliErrors[_0x4f90ff(0x1c7)](_0x4f90ff(0x1bc),_0x4f90ff(0x1b5));return _0xc00181[0x0];}export async function readNotificationDocument(_0x1c0933,_0x26767e){const _0x1ed630=a141_0x2ba8fa,_0x57a423=assertSingleNotificationSource(_0x1c0933),_0x397ef7=_0x57a423[_0x1ed630(0x1e0)]===_0x1ed630(0x177)?_0x1ed630(0x1b8)+_0x57a423[_0x1ed630(0x1a8)]:_0x57a423[_0x1ed630(0x1e0)]===_0x1ed630(0x1af)?_0x1ed630(0x16d)+_0x57a423[_0x1ed630(0x1dc)]:'stdin';let _0x5a5d06;try{if(_0x57a423[_0x1ed630(0x1e0)]===_0x1ed630(0x177))_0x5a5d06=await readFile(_0x57a423[_0x1ed630(0x1a8)],_0x1ed630(0x1bb));else{if(_0x57a423['kind']===_0x1ed630(0x1af)){if(!(_0x57a423['name']in process.env))throw notificationError(_0x1ed630(0x16f),_0x1ed630(0x1a9)+_0x57a423['name']);_0x5a5d06=process.env[_0x57a423.name]??'';}else _0x5a5d06=await readStdin();}}catch(_0x57943c){if(_0x57943c instanceof CliError)throw _0x57943c;throw notificationError(_0x1ed630(0x16f),_0x1ed630(0x1d6)+_0x397ef7+'.');}let _0x1241fa;try{_0x1241fa=JSON['parse'](_0x5a5d06);}catch{throw notificationError('notification_config_json_invalid',_0x1ed630(0x193)+_0x397ef7+_0x1ed630(0x19c),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x1241fa))throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0x397ef7+_0x1ed630(0x1cc));return validateNotificationDocument(_0x1241fa,_0x26767e);}export function projectNotificationListConfig(_0x5d15db,_0x55e484){const _0x356dfd=a141_0x2ba8fa;return{'id':typeof _0x5d15db['id']===_0x356dfd(0x1b0)?_0x5d15db['id']:null,'configCode':requireResponseString(_0x5d15db[_0x356dfd(0x16c)],'configCode',_0x55e484),'configName':requireResponseString(_0x5d15db[_0x356dfd(0x17f)],_0x356dfd(0x17f),_0x55e484),'channelType':requireResponseString(_0x5d15db[_0x356dfd(0x1bf)],'channelType',_0x55e484),'description':normalizeNullableString(_0x5d15db[_0x356dfd(0x1d7)]),'createTime':normalizeNullableString(_0x5d15db['createTime']),'updateTime':normalizeNullableString(_0x5d15db[_0x356dfd(0x19a)])};}export function normalizeExactNotificationConfig(_0x310178,_0x2858c5,_0x346a2f){const _0x478554=a141_0x2ba8fa;if(!Number[_0x478554(0x197)](_0x310178['id'])||_0x310178['id']!==_0x2858c5)throw notificationError('notification_config_response_invalid','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x2858c5+'.');if(_0x310178[_0x478554(0x1c6)]!==_0x346a2f)throw notificationError(_0x478554(0x18f),_0x478554(0x1ca)+_0x2858c5+_0x478554(0x18c));const _0x175c9c=requireExactString(_0x310178[_0x478554(0x17f)],_0x478554(0x17f),_0x2858c5),_0x41c265=requireExactString(_0x310178[_0x478554(0x16c)],_0x478554(0x16c),_0x2858c5),_0x4b4439=requireExactString(_0x310178[_0x478554(0x1bf)],_0x478554(0x1bf),_0x2858c5);if(!NOTIFICATION_CHANNEL_TYPES[_0x478554(0x16a)](_0x4b4439))throw notificationError(_0x478554(0x18f),_0x478554(0x1ca)+_0x2858c5+_0x478554(0x1a2));const _0x58850b=responseNullableString(_0x310178[_0x478554(0x1a1)],_0x478554(0x1a1),_0x2858c5),_0x17ab3c=responseNullableString(_0x310178['channelConfig'],_0x478554(0x1be),_0x2858c5),_0x5654a=responseNullableString(_0x310178[_0x478554(0x1d7)],_0x478554(0x1d7),_0x2858c5),_0x1723ee=responseNullableTimeout(_0x310178[_0x478554(0x1cf)],_0x478554(0x1cf),_0x2858c5),_0x435ac3=responseNullableTimeout(_0x310178['readTimeout'],_0x478554(0x1d3),_0x2858c5);return{'id':_0x2858c5,'appCode':_0x346a2f,'configCode':_0x41c265,'configName':_0x175c9c,'channelType':_0x4b4439,'endpointUrl':redactSensitive(_0x58850b),'channelConfig':redactSensitive(_0x17ab3c),'description':_0x5654a,'connectTimeout':_0x1723ee,'readTimeout':_0x435ac3,'endpointUrlRaw':_0x58850b,'channelConfigRaw':_0x17ab3c};}export async function requireExactNotificationConfig(_0x1619af,_0x46e2bb,_0x29bf8a){const _0x8946eb=a141_0x2ba8fa;let _0x5b33f8;try{_0x5b33f8=await getNotificationChannelConfig(_0x46e2bb,_0x1619af);}catch{throw safeApiFailure(_0x29bf8a,'preflight',_0x8946eb(0x189)+_0x1619af+_0x8946eb(0x185));}return normalizeExactNotificationConfig(_0x5b33f8,_0x46e2bb,_0x1619af);}export function projectNotificationConfig(_0x24e77c){const _0xa01e7a=a141_0x2ba8fa;return{'id':_0x24e77c['id']??null,'appCode':_0x24e77c['appCode'],'configCode':_0x24e77c[_0xa01e7a(0x16c)]??null,'configName':_0x24e77c[_0xa01e7a(0x17f)],'channelType':_0x24e77c[_0xa01e7a(0x1bf)],'endpointUrl':redactSensitive(_0x24e77c[_0xa01e7a(0x1a1)]),'channelConfig':redactSensitive(_0x24e77c[_0xa01e7a(0x1be)]),'description':_0x24e77c[_0xa01e7a(0x1d7)]??null,'connectTimeout':_0x24e77c[_0xa01e7a(0x1cf)]??null,'readTimeout':_0x24e77c[_0xa01e7a(0x1d3)]??null};}export function notificationSelector(_0x3e07c8){const _0x57484f=a141_0x2ba8fa;return{'appCode':_0x3e07c8[_0x57484f(0x1c6)],'id':_0x3e07c8['id'],'configCode':_0x3e07c8[_0x57484f(0x16c)],'configName':_0x3e07c8[_0x57484f(0x17f)],'channelType':_0x3e07c8[_0x57484f(0x1bf)]};}export function createMutationInput(_0x3e3618,_0x247457){const _0x53e901=a141_0x2ba8fa;return{'appCode':_0x3e3618,'configName':_0x247457['configName'],'channelType':_0x247457['channelType'],...hasOwn(_0x247457,_0x53e901(0x1a1))?{'endpointUrl':_0x247457['endpointUrl']}:{},...hasOwn(_0x247457,_0x53e901(0x1be))?{'channelConfig':serializeChannelConfig(_0x247457['channelConfig'])}:{},...hasOwn(_0x247457,_0x53e901(0x1d7))?{'description':_0x247457[_0x53e901(0x1d7)]}:{},...hasOwn(_0x247457,_0x53e901(0x1cf))?{'connectTimeout':_0x247457[_0x53e901(0x1cf)]}:{},...hasOwn(_0x247457,'readTimeout')?{'readTimeout':_0x247457['readTimeout']}:{}};}export function mergeUpdateInput(_0x39cebf,_0x51f103){const _0x4eb777=a141_0x2ba8fa;return{'id':_0x39cebf['id'],'appCode':_0x39cebf[_0x4eb777(0x1c6)],'configName':_0x51f103[_0x4eb777(0x17f)]??_0x39cebf[_0x4eb777(0x17f)],'channelType':_0x51f103[_0x4eb777(0x1bf)]??_0x39cebf['channelType'],'endpointUrl':hasOwn(_0x51f103,_0x4eb777(0x1a1))?_0x51f103[_0x4eb777(0x1a1)]:_0x39cebf['endpointUrlRaw'],'channelConfig':hasOwn(_0x51f103,_0x4eb777(0x1be))?serializeChannelConfig(_0x51f103[_0x4eb777(0x1be)]):_0x39cebf[_0x4eb777(0x1df)],'description':hasOwn(_0x51f103,_0x4eb777(0x1d7))?_0x51f103[_0x4eb777(0x1d7)]:_0x39cebf['description'],'connectTimeout':hasOwn(_0x51f103,_0x4eb777(0x1cf))?_0x51f103[_0x4eb777(0x1cf)]:_0x39cebf[_0x4eb777(0x1cf)],'readTimeout':hasOwn(_0x51f103,_0x4eb777(0x1d3))?_0x51f103[_0x4eb777(0x1d3)]:_0x39cebf[_0x4eb777(0x1d3)]};}function a141_0x1afe(_0x406cdf,_0x101123){_0x406cdf=_0x406cdf-0x16a;const _0x3b4d9a=a141_0x3b4d();let _0x1afef2=_0x3b4d9a[_0x406cdf];return _0x1afef2;}export function plannedUpdateProjection(_0xf30271,_0xd4879a){const _0x3b60e8=a141_0x2ba8fa;return projectNotificationConfig({'id':_0xf30271['id'],'appCode':_0xf30271['appCode'],'configCode':_0xf30271['configCode'],'configName':_0xd4879a[_0x3b60e8(0x17f)]??_0xf30271[_0x3b60e8(0x17f)],'channelType':_0xd4879a[_0x3b60e8(0x1bf)]??_0xf30271['channelType'],'endpointUrl':hasOwn(_0xd4879a,_0x3b60e8(0x1a1))?_0xd4879a[_0x3b60e8(0x1a1)]:_0xf30271['endpointUrlRaw'],'channelConfig':hasOwn(_0xd4879a,_0x3b60e8(0x1be))?_0xd4879a['channelConfig']:_0xf30271['channelConfigRaw'],'description':hasOwn(_0xd4879a,_0x3b60e8(0x1d7))?_0xd4879a['description']:_0xf30271[_0x3b60e8(0x1d7)],'connectTimeout':hasOwn(_0xd4879a,_0x3b60e8(0x1cf))?_0xd4879a[_0x3b60e8(0x1cf)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0xf30271['connectTimeout'],'readTimeout':hasOwn(_0xd4879a,_0x3b60e8(0x1d3))?_0xd4879a[_0x3b60e8(0x1d3)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0xf30271[_0x3b60e8(0x1d3)]});}export function requestedSafeFieldsMatch(_0x52e3e9,_0xe96045,_0xf1d603){const _0x480b3e=a141_0x2ba8fa,_0x326301=[],_0x208d67=[],_0x1328a0=[];for(const _0x3d18c4 of[_0x480b3e(0x17f),_0x480b3e(0x1bf),_0x480b3e(0x1d7)]){if(!hasOwn(_0xf1d603,_0x3d18c4))continue;_0x1328a0[_0x480b3e(0x1a6)](_0x3d18c4),_0x326301[_0x480b3e(0x1a6)](_0xe96045[_0x3d18c4]===_0xf1d603[_0x3d18c4]),_0x208d67[_0x480b3e(0x1a6)](_0x52e3e9[_0x3d18c4]!==_0xf1d603[_0x3d18c4]&&_0xe96045[_0x3d18c4]===_0xf1d603[_0x3d18c4]);}for(const _0x181901 of[_0x480b3e(0x1cf),_0x480b3e(0x1d3)]){if(!hasOwn(_0xf1d603,_0x181901))continue;const _0x460330=_0xf1d603[_0x181901]??(_0x181901===_0x480b3e(0x1cf)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x1328a0[_0x480b3e(0x1a6)](_0x181901),_0x326301[_0x480b3e(0x1a6)](_0xe96045[_0x181901]===_0x460330),_0x208d67[_0x480b3e(0x1a6)](_0x52e3e9[_0x181901]!==_0x460330&&_0xe96045[_0x181901]===_0x460330);}return hasOwn(_0xf1d603,_0x480b3e(0x1a1))&&_0xf1d603[_0x480b3e(0x1a1)]===null&&(_0x1328a0[_0x480b3e(0x1a6)](_0x480b3e(0x1db)),_0x326301[_0x480b3e(0x1a6)](_0xe96045[_0x480b3e(0x1a4)]===null||_0xe96045['endpointUrlRaw']===''),_0x208d67[_0x480b3e(0x1a6)](_0x52e3e9[_0x480b3e(0x1a4)]!==null&&_0x52e3e9[_0x480b3e(0x1a4)]!==''&&(_0xe96045[_0x480b3e(0x1a4)]===null||_0xe96045['endpointUrlRaw']===''))),{'allMatch':_0x326301['every'](Boolean),'provesChange':_0x208d67['some'](Boolean),'verifiedFields':_0x1328a0};}export function validateNotificationDeleteReadback(_0x268d19,_0x1060f4,_0x7a1fac){const _0x2d7c02=a141_0x2ba8fa;for(const [_0x4560ec,_0x29732a]of _0x268d19['entries']()){if(!Number[_0x2d7c02(0x197)](_0x29732a['id'])||_0x29732a['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x4560ec+0x1)+_0x2d7c02(0x188));if(_0x29732a['appCode']!==_0x1060f4)throw notificationError(_0x2d7c02(0x18f),_0x2d7c02(0x1e1)+(_0x4560ec+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x29732a['channelType']!==_0x7a1fac)throw notificationError(_0x2d7c02(0x18f),_0x2d7c02(0x1e1)+(_0x4560ec+0x1)+_0x2d7c02(0x170));}}export function safeApiFailure(_0x132e41,_0x2f006f,_0x1ae5a5){const _0x952028=a141_0x2ba8fa;return notificationError(_0x952028(0x1b3)+_0x132e41+'_'+(_0x2f006f==='mutation'?'failed':_0x2f006f+_0x952028(0x172)),_0x952028(0x1ca)+_0x132e41+'\x20'+_0x2f006f+_0x952028(0x1d8),_0x1ae5a5);}export function notificationLookupCommand(_0x1c9bd5,_0x1b78f9){const _0x39e6aa=a141_0x2ba8fa;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x1c9bd5+_0x39e6aa(0x1c8)+_0x1b78f9+_0x39e6aa(0x179);}function validateNotificationDocument(_0xb490b7,_0x492df1){const _0x3260ab=a141_0x2ba8fa;for(const _0x57b697 of Object[_0x3260ab(0x1a7)](_0xb490b7)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x57b697))throw notificationError(_0x3260ab(0x1c9),_0x3260ab(0x19d)+_0x57b697+_0x3260ab(0x1d5));if(!ALLOWED_INPUT_FIELDS[_0x3260ab(0x1cb)](_0x57b697))throw notificationError(_0x3260ab(0x1d4),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x57b697+'\x22.');}if(_0x492df1===_0x3260ab(0x173)&&Object['keys'](_0xb490b7)[_0x3260ab(0x1c3)]===0x0)throw notificationError(_0x3260ab(0x198),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x279888={};if(hasOwn(_0xb490b7,'configName'))_0x279888['configName']=validateRequiredString(_0xb490b7[_0x3260ab(0x17f)],'configName',0x80);else{if(_0x492df1==='create')throw notificationError(_0x3260ab(0x18d),_0x3260ab(0x1da)+'\x22configName\x22.');}if(hasOwn(_0xb490b7,_0x3260ab(0x1bf))){if(typeof _0xb490b7['channelType']!==_0x3260ab(0x19b))throw invalidFieldType(_0x3260ab(0x1bf),_0x3260ab(0x1d0));const _0x7e8b08=_0xb490b7['channelType']['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x3260ab(0x16a)](_0x7e8b08))throw notificationError(_0x3260ab(0x176),_0x3260ab(0x191),_0x3260ab(0x1b4)+NOTIFICATION_CHANNEL_TYPES[_0x3260ab(0x1ba)](',\x20')+'.');_0x279888[_0x3260ab(0x1bf)]=_0x7e8b08;}else{if(_0x492df1===_0x3260ab(0x1e2))throw notificationError('notification_config_field_required',_0x3260ab(0x1da)+_0x3260ab(0x19f));}for(const [_0x17e678,_0x31d774]of[[_0x3260ab(0x1a1),0x200],['description',0x100]]){if(!hasOwn(_0xb490b7,_0x17e678))continue;const _0x586160=_0xb490b7[_0x17e678];if(_0x586160!==null&&typeof _0x586160!==_0x3260ab(0x19b))throw invalidFieldType(_0x17e678,_0x3260ab(0x187));if(typeof _0x586160===_0x3260ab(0x19b)&&_0x586160['length']>_0x31d774)throw notificationError(_0x3260ab(0x176),_0x3260ab(0x19d)+_0x17e678+_0x3260ab(0x1ce)+_0x31d774+'\x20characters.');_0x279888[_0x17e678]=_0x586160;}if(hasOwn(_0xb490b7,_0x3260ab(0x1be))){const _0x116d86=_0xb490b7['channelConfig'];if(_0x116d86===null&&_0x492df1==='create')throw invalidFieldType(_0x3260ab(0x1be),'a\x20JSON\x20object');if(_0x116d86!==null&&!isJsonObject(_0x116d86))throw invalidFieldType(_0x3260ab(0x1be),_0x492df1==='update'?_0x3260ab(0x192):_0x3260ab(0x1ac));_0x116d86!==null&&validateChannelConfigFields(_0x279888[_0x3260ab(0x1bf)],_0x116d86),_0x279888[_0x3260ab(0x1be)]=_0x116d86;}for(const _0x199444 of[_0x3260ab(0x1cf),'readTimeout']){if(!hasOwn(_0xb490b7,_0x199444))continue;const _0x3598e9=_0xb490b7[_0x199444];if(_0x3598e9!==null&&(!Number['isSafeInteger'](_0x3598e9)||_0x3598e9<0x0))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x199444+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x279888[_0x199444]=_0x3598e9;}return _0x279888;}function validateRequiredString(_0x22356c,_0x5330e1,_0x2ce61e){const _0x49d4c4=a141_0x2ba8fa;if(typeof _0x22356c!==_0x49d4c4(0x19b))throw invalidFieldType(_0x5330e1,_0x49d4c4(0x18b));const _0x15e57d=_0x22356c[_0x49d4c4(0x1a5)]();if(!_0x15e57d)throw notificationError(_0x49d4c4(0x176),_0x49d4c4(0x19d)+_0x5330e1+_0x49d4c4(0x1e3));if(_0x15e57d['length']>_0x2ce61e)throw notificationError(_0x49d4c4(0x176),'Notification\x20JSON\x20field\x20\x22'+_0x5330e1+'\x22\x20cannot\x20exceed\x20'+_0x2ce61e+_0x49d4c4(0x183));return _0x15e57d;}function validateChannelConfigFields(_0x1cd30b,_0x53b8ad){const _0x1ba455=a141_0x2ba8fa;if(hasOwn(_0x53b8ad,'messageTemplate'))throw forbiddenChannelConfigField(_0x1ba455(0x1a0));if(_0x1cd30b==='EMAIL')for(const _0x573d03 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x53b8ad,_0x573d03))throw forbiddenChannelConfigField(_0x573d03);}}function forbiddenChannelConfigField(_0x3a0481){const _0x34b3e3=a141_0x2ba8fa;return notificationError(_0x34b3e3(0x1d9),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x3a0481+_0x34b3e3(0x1b7));}function invalidFieldType(_0x2d1ed5,_0x2411cb){const _0x5572ec=a141_0x2ba8fa;return notificationError(_0x5572ec(0x176),_0x5572ec(0x19d)+_0x2d1ed5+'\x22\x20must\x20be\x20'+_0x2411cb+'.');}function serializeChannelConfig(_0x53e99b){const _0x45258d=a141_0x2ba8fa;return _0x53e99b===null||_0x53e99b===undefined?null:JSON[_0x45258d(0x1c4)](_0x53e99b);}function redactSensitive(_0x1bbb9b){return _0x1bbb9b===null||_0x1bbb9b===undefined||_0x1bbb9b===''?null:'<redacted>';}function requireResponseString(_0xd7cd4f,_0x4ab71b,_0xed0e5f){const _0x273e07=a141_0x2ba8fa;if(typeof _0xd7cd4f!==_0x273e07(0x19b)||_0xd7cd4f[_0x273e07(0x1a5)]()==='')throw CliErrors['apiError'](_0x273e07(0x1b9),_0x273e07(0x1de)+(_0xed0e5f+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x4ab71b+'\x22.');return _0xd7cd4f[_0x273e07(0x1a5)]();}function requireExactString(_0x64cfbd,_0x2d8ecf,_0x10b341){const _0x23e193=a141_0x2ba8fa;if(typeof _0x64cfbd!==_0x23e193(0x19b)||_0x64cfbd[_0x23e193(0x1a5)]()==='')throw notificationError(_0x23e193(0x18f),_0x23e193(0x1ca)+_0x10b341+_0x23e193(0x1ae)+_0x2d8ecf+'\x22.');return _0x64cfbd[_0x23e193(0x1a5)]();}function responseNullableString(_0x2ebd90,_0x57e56e,_0x44b37a){const _0x97ebda=a141_0x2ba8fa;if(_0x2ebd90===undefined||_0x2ebd90===null)return null;if(typeof _0x2ebd90!==_0x97ebda(0x19b))throw notificationError('notification_config_response_invalid',_0x97ebda(0x1ca)+_0x44b37a+_0x97ebda(0x17e)+_0x57e56e+'\x22.');return _0x2ebd90;}function responseNullableTimeout(_0x48eefc,_0x2338ef,_0x2da2b6){const _0x33b001=a141_0x2ba8fa;if(_0x48eefc===undefined||_0x48eefc===null)return null;if(!Number[_0x33b001(0x197)](_0x48eefc)||_0x48eefc<0x0)throw notificationError(_0x33b001(0x18f),'Notification\x20config\x20'+_0x2da2b6+_0x33b001(0x17e)+_0x2338ef+'\x22.');return _0x48eefc;}function normalizeNullableString(_0x1b9266){return typeof _0x1b9266==='string'?_0x1b9266:null;}function isJsonObject(_0x11ecde){const _0x5d6d92=a141_0x2ba8fa;return _0x11ecde!==null&&typeof _0x11ecde===_0x5d6d92(0x1e5)&&!Array[_0x5d6d92(0x18e)](_0x11ecde);}function hasOwn(_0x2e4437,_0x3a2a9b){const _0x1aa305=a141_0x2ba8fa;return Object[_0x1aa305(0x184)]['hasOwnProperty'][_0x1aa305(0x195)](_0x2e4437,_0x3a2a9b);}async function readStdin(){const _0x2bcc26=a141_0x2ba8fa;let _0x18a4c1='';process[_0x2bcc26(0x1e4)][_0x2bcc26(0x17d)]('utf8');for await(const _0xec658c of process[_0x2bcc26(0x1e4)])_0x18a4c1+=_0xec658c;return _0x18a4c1;}
|
|
1
|
+
const a142_0x2a45bb=a142_0x4318;(function(_0x29543d,_0x5f3f22){const _0x2752e8=a142_0x4318,_0x50d9fc=_0x29543d();while(!![]){try{const _0x2de38a=parseInt(_0x2752e8(0x16a))/0x1+-parseInt(_0x2752e8(0x163))/0x2+parseInt(_0x2752e8(0x14f))/0x3*(-parseInt(_0x2752e8(0x18f))/0x4)+parseInt(_0x2752e8(0x1b9))/0x5*(parseInt(_0x2752e8(0x1a8))/0x6)+-parseInt(_0x2752e8(0x196))/0x7+-parseInt(_0x2752e8(0x1a7))/0x8+parseInt(_0x2752e8(0x1b1))/0x9;if(_0x2de38a===_0x5f3f22)break;else _0x50d9fc['push'](_0x50d9fc['shift']());}catch(_0x18eef9){_0x50d9fc['push'](_0x50d9fc['shift']());}}}(a142_0x47c9,0x41374));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=[a142_0x2a45bb(0x1ac),'FEISHU',a142_0x2a45bb(0x1ad),a142_0x2a45bb(0x192),a142_0x2a45bb(0x19c)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a142_0x2a45bb(0x199),a142_0x2a45bb(0x161),'endpointUrl',a142_0x2a45bb(0x171),a142_0x2a45bb(0x17f),a142_0x2a45bb(0x184),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a142_0x2a45bb(0x188),a142_0x2a45bb(0x159),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a142_0x2a45bb(0x153),a142_0x2a45bb(0x174),a142_0x2a45bb(0x187),'replyTo','subjectPrefix',a142_0x2a45bb(0x157),'to','cc']);function a142_0x4318(_0x4d58d0,_0x4d65b5){_0x4d58d0=_0x4d58d0-0x142;const _0x47c9e0=a142_0x47c9();let _0x431822=_0x47c9e0[_0x4d58d0];return _0x431822;}export const NOTIFICATION_INPUT_FLAGS=[{'name':a142_0x2a45bb(0x193),'type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a142_0x2a45bb(0x1b2),'required':![],'default':![],'description':a142_0x2a45bb(0x198)},{'name':a142_0x2a45bb(0x149),'type':a142_0x2a45bb(0x178),'required':![],'description':a142_0x2a45bb(0x1bf)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x1e4e8a,_0x3fbae2,_0x3058aa){return new CliError(_0x1e4e8a,0x1,_0x3fbae2,_0x3058aa);}export function readNotificationId(_0x12b1c0){const _0xc323f0=a142_0x2a45bb,_0x484949=_0x12b1c0['num']('id');if(!Number['isSafeInteger'](_0x484949)||_0x484949<=0x0)throw notificationError('notification_config_id_invalid',_0xc323f0(0x14b));return _0x484949;}export function requireNotificationExplicitYes(_0x2cc0a6){const _0x333352=a142_0x2a45bb;if(_0x2cc0a6['bool']('dry-run')||_0x2cc0a6[_0x333352(0x1b0)](_0x333352(0x152)))return;throw notificationError(_0x333352(0x15a),_0x333352(0x15e),_0x333352(0x1a5));}export function readNotificationChannelType(_0x578925,_0x5f437a=a142_0x2a45bb(0x15f),_0x555fa8=a142_0x2a45bb(0x1ac)){const _0x419e99=a142_0x2a45bb,_0x246d65=_0x578925[_0x419e99(0x156)](_0x5f437a)[_0x419e99(0x189)]()||_0x555fa8;if(!NOTIFICATION_CHANNEL_TYPES[_0x419e99(0x19d)](_0x246d65))throw CliErrors[_0x419e99(0x1a4)](_0x419e99(0x1ba)+_0x5f437a+':\x20'+_0x246d65,_0x419e99(0x164)+NOTIFICATION_CHANNEL_TYPES[_0x419e99(0x1a2)](',\x20')+'.');return _0x246d65;}export function assertSingleNotificationSource(_0x4b144e){const _0x59924c=a142_0x2a45bb,_0xad188d=[],_0x16b4bd=_0x4b144e[_0x59924c(0x156)](_0x59924c(0x193))[_0x59924c(0x189)]();if(_0x16b4bd)_0xad188d[_0x59924c(0x1af)]({'kind':_0x59924c(0x193),'path':_0x16b4bd});if(_0x4b144e[_0x59924c(0x1b0)](_0x59924c(0x172)))_0xad188d[_0x59924c(0x1af)]({'kind':_0x59924c(0x172)});const _0x27a80b=_0x4b144e[_0x59924c(0x156)]('from-env')[_0x59924c(0x189)]();if(_0x27a80b)_0xad188d['push']({'kind':_0x59924c(0x191),'name':_0x27a80b});if(_0xad188d[_0x59924c(0x197)]===0x0)throw CliErrors[_0x59924c(0x1a4)](_0x59924c(0x180),_0x59924c(0x19a));if(_0xad188d[_0x59924c(0x197)]>0x1)throw CliErrors[_0x59924c(0x1a4)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x59924c(0x19a));return _0xad188d[0x0];}export async function readNotificationDocument(_0x300340,_0x4098a0){const _0x5a2a95=a142_0x2a45bb,_0x504ce5=assertSingleNotificationSource(_0x300340),_0x29f0ed=_0x504ce5['kind']===_0x5a2a95(0x193)?_0x5a2a95(0x158)+_0x504ce5[_0x5a2a95(0x150)]:_0x504ce5[_0x5a2a95(0x16e)]===_0x5a2a95(0x191)?_0x5a2a95(0x185)+_0x504ce5['name']:_0x5a2a95(0x172);let _0x54812e;try{if(_0x504ce5[_0x5a2a95(0x16e)]==='file')_0x54812e=await readFile(_0x504ce5['path'],_0x5a2a95(0x17d));else{if(_0x504ce5[_0x5a2a95(0x16e)]==='env'){if(!(_0x504ce5[_0x5a2a95(0x1bd)]in process.env))throw notificationError(_0x5a2a95(0x179),_0x5a2a95(0x1c0)+_0x504ce5[_0x5a2a95(0x1bd)]);_0x54812e=process.env[_0x504ce5.name]??'';}else _0x54812e=await readStdin();}}catch(_0x4d15bc){if(_0x4d15bc instanceof CliError)throw _0x4d15bc;throw notificationError('notification_config_source_unavailable',_0x5a2a95(0x1b7)+_0x29f0ed+'.');}let _0x533213;try{_0x533213=JSON[_0x5a2a95(0x194)](_0x54812e);}catch{throw notificationError(_0x5a2a95(0x175),_0x5a2a95(0x1bb)+_0x29f0ed+'\x20is\x20invalid.',_0x5a2a95(0x19f));}if(!isJsonObject(_0x533213))throw notificationError(_0x5a2a95(0x175),_0x5a2a95(0x1bb)+_0x29f0ed+_0x5a2a95(0x168));return validateNotificationDocument(_0x533213,_0x4098a0);}function a142_0x47c9(){const _0x4c9fa9=['Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','call','\x20characters.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','endpointUrlRaw','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','\x20has\x20an\x20invalid\x20id.','notification_config_response_invalid','\x20has\x20an\x20unsupported\x20channelType.','from-env','stringify','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','a\x20non-empty\x20string','some','a\x20string\x20or\x20null','132PMCBQO','path','Notification\x20config\x20','yes','recipients','channelConfigRaw','\x22\x20must\x20be\x20','str','fromName','file\x20','configCode','notification_config_confirmation_required','Item\x20','notification_config_channel_field_forbidden','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','type','readTimeout','channelType','create','968078jrSKZT','Allowed\x20values:\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','notification_config_update_empty','\x20is\x20missing\x20required\x20field\x20\x22','\x20must\x20be\x20an\x20object.','messageTemplate','92532DUcAoB','Invalid\x20notification\x20config\x20response.','rabetbase\x20notification\x20config-list\x20--appcode\x20','keys','kind','object','\x20has\x20invalid\x20field\x20\x22','channelConfig','stdin','prototype','ccList','notification_config_json_invalid','\x20has\x20an\x20invalid\x20channelType.','Create\x20JSON\x20requires\x20field\x20','string','notification_config_source_unavailable','every','<redacted>','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','utf8','number','description','Missing\x20notification\x20JSON\x20source.','_unavailable','endpointUrl:null','a\x20JSON\x20object\x20or\x20null','connectTimeout','environment\x20variable\x20','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','bccList','appCode','trim','isSafeInteger','Unknown\x20notification\x20JSON\x20field\x20\x22','Notification\x20JSON\x20field\x20\x22','update','Notification\x20config\x20list\x20item\x20','9032GdKXrJ','\x22channelType\x22.','env','WECOM','file','parse','hasOwnProperty','3366720jqgtyj','length','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','configName','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','notification_config_field_invalid','WEBHOOK','includes','isArray','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','endpointUrl','a\x20supported\x20string','join','notification_config_field_unknown','validation','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','createTime','1837976HCYoKp','12eAaoBg','notification_config_','failed','mutation','EMAIL','DINGTALK','notification_config_field_required','push','bool','10492794vFDuLu','boolean','preflight','apiError','\x20--type\x20','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','a\x20JSON\x20object','757060RIctej','Invalid\x20--','Notification\x20JSON\x20from\x20','\x22configName\x22.','name','\x22\x20cannot\x20exceed\x20'];a142_0x47c9=function(){return _0x4c9fa9;};return a142_0x47c9();}export function projectNotificationListConfig(_0x11e24f,_0x5d204d){const _0x151428=a142_0x2a45bb;return{'id':typeof _0x11e24f['id']===_0x151428(0x17e)?_0x11e24f['id']:null,'configCode':requireResponseString(_0x11e24f[_0x151428(0x159)],'configCode',_0x5d204d),'configName':requireResponseString(_0x11e24f[_0x151428(0x199)],_0x151428(0x199),_0x5d204d),'channelType':requireResponseString(_0x11e24f[_0x151428(0x161)],_0x151428(0x161),_0x5d204d),'description':normalizeNullableString(_0x11e24f[_0x151428(0x17f)]),'createTime':normalizeNullableString(_0x11e24f[_0x151428(0x1a6)]),'updateTime':normalizeNullableString(_0x11e24f['updateTime'])};}export function normalizeExactNotificationConfig(_0x371279,_0x166435,_0x184f00){const _0x170399=a142_0x2a45bb;if(!Number[_0x170399(0x18a)](_0x371279['id'])||_0x371279['id']!==_0x166435)throw notificationError(_0x170399(0x147),_0x170399(0x145)+_0x166435+'.');if(_0x371279[_0x170399(0x188)]!==_0x184f00)throw notificationError(_0x170399(0x147),_0x170399(0x151)+_0x166435+_0x170399(0x15d));const _0x16d82a=requireExactString(_0x371279[_0x170399(0x199)],_0x170399(0x199),_0x166435),_0x40870e=requireExactString(_0x371279[_0x170399(0x159)],'configCode',_0x166435),_0x154276=requireExactString(_0x371279[_0x170399(0x161)],_0x170399(0x161),_0x166435);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x154276))throw notificationError(_0x170399(0x147),_0x170399(0x151)+_0x166435+_0x170399(0x148));const _0x278ad3=responseNullableString(_0x371279['endpointUrl'],_0x170399(0x1a0),_0x166435),_0x3bf805=responseNullableString(_0x371279[_0x170399(0x171)],'channelConfig',_0x166435),_0x409d02=responseNullableString(_0x371279[_0x170399(0x17f)],'description',_0x166435),_0x201e65=responseNullableTimeout(_0x371279['connectTimeout'],'connectTimeout',_0x166435),_0x586c1a=responseNullableTimeout(_0x371279[_0x170399(0x160)],'readTimeout',_0x166435);return{'id':_0x166435,'appCode':_0x184f00,'configCode':_0x40870e,'configName':_0x16d82a,'channelType':_0x154276,'endpointUrl':redactSensitive(_0x278ad3),'channelConfig':redactSensitive(_0x3bf805),'description':_0x409d02,'connectTimeout':_0x201e65,'readTimeout':_0x586c1a,'endpointUrlRaw':_0x278ad3,'channelConfigRaw':_0x3bf805};}export async function requireExactNotificationConfig(_0x422f45,_0x110608,_0xff7945){const _0x222f16=a142_0x2a45bb;let _0x18fa82;try{_0x18fa82=await getNotificationChannelConfig(_0x110608,_0x422f45);}catch{throw safeApiFailure(_0xff7945,_0x222f16(0x1b3),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x422f45+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x18fa82,_0x110608,_0x422f45);}export function projectNotificationConfig(_0x59e08b){const _0x7f6629=a142_0x2a45bb;return{'id':_0x59e08b['id']??null,'appCode':_0x59e08b[_0x7f6629(0x188)],'configCode':_0x59e08b[_0x7f6629(0x159)]??null,'configName':_0x59e08b[_0x7f6629(0x199)],'channelType':_0x59e08b[_0x7f6629(0x161)],'endpointUrl':redactSensitive(_0x59e08b[_0x7f6629(0x1a0)]),'channelConfig':redactSensitive(_0x59e08b[_0x7f6629(0x171)]),'description':_0x59e08b[_0x7f6629(0x17f)]??null,'connectTimeout':_0x59e08b[_0x7f6629(0x184)]??null,'readTimeout':_0x59e08b[_0x7f6629(0x160)]??null};}export function notificationSelector(_0x551b32){const _0x3c87f9=a142_0x2a45bb;return{'appCode':_0x551b32[_0x3c87f9(0x188)],'id':_0x551b32['id'],'configCode':_0x551b32[_0x3c87f9(0x159)],'configName':_0x551b32[_0x3c87f9(0x199)],'channelType':_0x551b32[_0x3c87f9(0x161)]};}export function createMutationInput(_0x374943,_0x2dd863){const _0xd89e15=a142_0x2a45bb;return{'appCode':_0x374943,'configName':_0x2dd863[_0xd89e15(0x199)],'channelType':_0x2dd863[_0xd89e15(0x161)],...hasOwn(_0x2dd863,_0xd89e15(0x1a0))?{'endpointUrl':_0x2dd863['endpointUrl']}:{},...hasOwn(_0x2dd863,_0xd89e15(0x171))?{'channelConfig':serializeChannelConfig(_0x2dd863[_0xd89e15(0x171)])}:{},...hasOwn(_0x2dd863,'description')?{'description':_0x2dd863[_0xd89e15(0x17f)]}:{},...hasOwn(_0x2dd863,'connectTimeout')?{'connectTimeout':_0x2dd863[_0xd89e15(0x184)]}:{},...hasOwn(_0x2dd863,_0xd89e15(0x160))?{'readTimeout':_0x2dd863[_0xd89e15(0x160)]}:{}};}export function mergeUpdateInput(_0x1db9ef,_0x7bbb6){const _0x492716=a142_0x2a45bb;return{'id':_0x1db9ef['id'],'appCode':_0x1db9ef[_0x492716(0x188)],'configName':_0x7bbb6['configName']??_0x1db9ef['configName'],'channelType':_0x7bbb6['channelType']??_0x1db9ef['channelType'],'endpointUrl':hasOwn(_0x7bbb6,_0x492716(0x1a0))?_0x7bbb6[_0x492716(0x1a0)]:_0x1db9ef[_0x492716(0x144)],'channelConfig':hasOwn(_0x7bbb6,_0x492716(0x171))?serializeChannelConfig(_0x7bbb6[_0x492716(0x171)]):_0x1db9ef[_0x492716(0x154)],'description':hasOwn(_0x7bbb6,_0x492716(0x17f))?_0x7bbb6[_0x492716(0x17f)]:_0x1db9ef[_0x492716(0x17f)],'connectTimeout':hasOwn(_0x7bbb6,'connectTimeout')?_0x7bbb6[_0x492716(0x184)]:_0x1db9ef[_0x492716(0x184)],'readTimeout':hasOwn(_0x7bbb6,_0x492716(0x160))?_0x7bbb6['readTimeout']:_0x1db9ef[_0x492716(0x160)]};}export function plannedUpdateProjection(_0xb1faac,_0x598f34){const _0x3bdca8=a142_0x2a45bb;return projectNotificationConfig({'id':_0xb1faac['id'],'appCode':_0xb1faac['appCode'],'configCode':_0xb1faac['configCode'],'configName':_0x598f34[_0x3bdca8(0x199)]??_0xb1faac[_0x3bdca8(0x199)],'channelType':_0x598f34[_0x3bdca8(0x161)]??_0xb1faac[_0x3bdca8(0x161)],'endpointUrl':hasOwn(_0x598f34,'endpointUrl')?_0x598f34[_0x3bdca8(0x1a0)]:_0xb1faac[_0x3bdca8(0x144)],'channelConfig':hasOwn(_0x598f34,'channelConfig')?_0x598f34[_0x3bdca8(0x171)]:_0xb1faac[_0x3bdca8(0x154)],'description':hasOwn(_0x598f34,'description')?_0x598f34[_0x3bdca8(0x17f)]:_0xb1faac[_0x3bdca8(0x17f)],'connectTimeout':hasOwn(_0x598f34,'connectTimeout')?_0x598f34[_0x3bdca8(0x184)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0xb1faac[_0x3bdca8(0x184)],'readTimeout':hasOwn(_0x598f34,'readTimeout')?_0x598f34[_0x3bdca8(0x160)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0xb1faac[_0x3bdca8(0x160)]});}export function requestedSafeFieldsMatch(_0x1d7480,_0x3cfe98,_0x9f8d00){const _0x25c255=a142_0x2a45bb,_0x2e9784=[],_0x82fae2=[],_0xdd0af2=[];for(const _0x13c08b of[_0x25c255(0x199),_0x25c255(0x161),'description']){if(!hasOwn(_0x9f8d00,_0x13c08b))continue;_0xdd0af2[_0x25c255(0x1af)](_0x13c08b),_0x2e9784[_0x25c255(0x1af)](_0x3cfe98[_0x13c08b]===_0x9f8d00[_0x13c08b]),_0x82fae2[_0x25c255(0x1af)](_0x1d7480[_0x13c08b]!==_0x9f8d00[_0x13c08b]&&_0x3cfe98[_0x13c08b]===_0x9f8d00[_0x13c08b]);}for(const _0x1fe187 of[_0x25c255(0x184),_0x25c255(0x160)]){if(!hasOwn(_0x9f8d00,_0x1fe187))continue;const _0xc4689b=_0x9f8d00[_0x1fe187]??(_0x1fe187===_0x25c255(0x184)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0xdd0af2[_0x25c255(0x1af)](_0x1fe187),_0x2e9784[_0x25c255(0x1af)](_0x3cfe98[_0x1fe187]===_0xc4689b),_0x82fae2[_0x25c255(0x1af)](_0x1d7480[_0x1fe187]!==_0xc4689b&&_0x3cfe98[_0x1fe187]===_0xc4689b);}return hasOwn(_0x9f8d00,'endpointUrl')&&_0x9f8d00[_0x25c255(0x1a0)]===null&&(_0xdd0af2[_0x25c255(0x1af)](_0x25c255(0x182)),_0x2e9784[_0x25c255(0x1af)](_0x3cfe98[_0x25c255(0x144)]===null||_0x3cfe98[_0x25c255(0x144)]===''),_0x82fae2[_0x25c255(0x1af)](_0x1d7480['endpointUrlRaw']!==null&&_0x1d7480[_0x25c255(0x144)]!==''&&(_0x3cfe98['endpointUrlRaw']===null||_0x3cfe98[_0x25c255(0x144)]===''))),{'allMatch':_0x2e9784[_0x25c255(0x17a)](Boolean),'provesChange':_0x82fae2[_0x25c255(0x14d)](Boolean),'verifiedFields':_0xdd0af2};}export function validateNotificationDeleteReadback(_0x378093,_0x3d0861,_0x1e7e11){const _0x47d2ec=a142_0x2a45bb;for(const [_0x30cf18,_0x33a83e]of _0x378093['entries']()){if(!Number[_0x47d2ec(0x18a)](_0x33a83e['id'])||_0x33a83e['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x47d2ec(0x18e)+(_0x30cf18+0x1)+_0x47d2ec(0x146));if(_0x33a83e['appCode']!==_0x3d0861)throw notificationError(_0x47d2ec(0x147),_0x47d2ec(0x18e)+(_0x30cf18+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x33a83e[_0x47d2ec(0x161)]!==_0x1e7e11)throw notificationError(_0x47d2ec(0x147),_0x47d2ec(0x18e)+(_0x30cf18+0x1)+_0x47d2ec(0x176));}}export function safeApiFailure(_0x3ac3c1,_0x38ae9f,_0x22c241){const _0x16e4e4=a142_0x2a45bb;return notificationError(_0x16e4e4(0x1a9)+_0x3ac3c1+'_'+(_0x38ae9f===_0x16e4e4(0x1ab)?_0x16e4e4(0x1aa):_0x38ae9f+_0x16e4e4(0x181)),'Notification\x20config\x20'+_0x3ac3c1+'\x20'+_0x38ae9f+'\x20failed.',_0x22c241);}export function notificationLookupCommand(_0x4815e1,_0x1ca072){const _0x34a3f4=a142_0x2a45bb;return _0x34a3f4(0x16c)+_0x4815e1+_0x34a3f4(0x1b5)+_0x1ca072+'\x20--format\x20compress';}function validateNotificationDocument(_0x5a63a5,_0x55faff){const _0xb0517e=a142_0x2a45bb;for(const _0x4d2cf9 of Object['keys'](_0x5a63a5)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x4d2cf9))throw notificationError('notification_config_field_forbidden',_0xb0517e(0x18c)+_0x4d2cf9+_0xb0517e(0x17c));if(!ALLOWED_INPUT_FIELDS['has'](_0x4d2cf9))throw notificationError(_0xb0517e(0x1a3),_0xb0517e(0x18b)+_0x4d2cf9+'\x22.');}if(_0x55faff===_0xb0517e(0x18d)&&Object[_0xb0517e(0x16d)](_0x5a63a5)[_0xb0517e(0x197)]===0x0)throw notificationError(_0xb0517e(0x166),_0xb0517e(0x186));const _0xc80ff2={};if(hasOwn(_0x5a63a5,_0xb0517e(0x199)))_0xc80ff2[_0xb0517e(0x199)]=validateRequiredString(_0x5a63a5[_0xb0517e(0x199)],_0xb0517e(0x199),0x80);else{if(_0x55faff===_0xb0517e(0x162))throw notificationError(_0xb0517e(0x1ae),_0xb0517e(0x177)+_0xb0517e(0x1bc));}if(hasOwn(_0x5a63a5,_0xb0517e(0x161))){if(typeof _0x5a63a5[_0xb0517e(0x161)]!==_0xb0517e(0x178))throw invalidFieldType('channelType',_0xb0517e(0x1a1));const _0x455efb=_0x5a63a5['channelType'][_0xb0517e(0x189)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x455efb))throw notificationError(_0xb0517e(0x19b),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0xb0517e(0x1a2)](',\x20')+'.');_0xc80ff2['channelType']=_0x455efb;}else{if(_0x55faff===_0xb0517e(0x162))throw notificationError('notification_config_field_required',_0xb0517e(0x177)+_0xb0517e(0x190));}for(const [_0x192642,_0x18d451]of[[_0xb0517e(0x1a0),0x200],['description',0x100]]){if(!hasOwn(_0x5a63a5,_0x192642))continue;const _0x22f6e1=_0x5a63a5[_0x192642];if(_0x22f6e1!==null&&typeof _0x22f6e1!==_0xb0517e(0x178))throw invalidFieldType(_0x192642,_0xb0517e(0x14e));if(typeof _0x22f6e1===_0xb0517e(0x178)&&_0x22f6e1['length']>_0x18d451)throw notificationError(_0xb0517e(0x19b),'Notification\x20JSON\x20field\x20\x22'+_0x192642+_0xb0517e(0x1be)+_0x18d451+_0xb0517e(0x142));_0xc80ff2[_0x192642]=_0x22f6e1;}if(hasOwn(_0x5a63a5,_0xb0517e(0x171))){const _0x3b4edb=_0x5a63a5['channelConfig'];if(_0x3b4edb===null&&_0x55faff===_0xb0517e(0x162))throw invalidFieldType(_0xb0517e(0x171),_0xb0517e(0x1b8));if(_0x3b4edb!==null&&!isJsonObject(_0x3b4edb))throw invalidFieldType(_0xb0517e(0x171),_0x55faff===_0xb0517e(0x18d)?_0xb0517e(0x183):_0xb0517e(0x1b8));_0x3b4edb!==null&&validateChannelConfigFields(_0xc80ff2[_0xb0517e(0x161)],_0x3b4edb),_0xc80ff2['channelConfig']=_0x3b4edb;}for(const _0x5420ab of[_0xb0517e(0x184),_0xb0517e(0x160)]){if(!hasOwn(_0x5a63a5,_0x5420ab))continue;const _0x18299b=_0x5a63a5[_0x5420ab];if(_0x18299b!==null&&(!Number[_0xb0517e(0x18a)](_0x18299b)||_0x18299b<0x0))throw notificationError(_0xb0517e(0x19b),'Notification\x20JSON\x20field\x20\x22'+_0x5420ab+_0xb0517e(0x1b6));_0xc80ff2[_0x5420ab]=_0x18299b;}return _0xc80ff2;}function validateRequiredString(_0x57c773,_0x2f3498,_0x345e7a){const _0x9bb856=a142_0x2a45bb;if(typeof _0x57c773!=='string')throw invalidFieldType(_0x2f3498,_0x9bb856(0x14c));const _0x597182=_0x57c773['trim']();if(!_0x597182)throw notificationError(_0x9bb856(0x19b),'Notification\x20JSON\x20field\x20\x22'+_0x2f3498+_0x9bb856(0x165));if(_0x597182[_0x9bb856(0x197)]>_0x345e7a)throw notificationError(_0x9bb856(0x19b),_0x9bb856(0x18c)+_0x2f3498+'\x22\x20cannot\x20exceed\x20'+_0x345e7a+_0x9bb856(0x142));return _0x597182;}function validateChannelConfigFields(_0x34c8f0,_0x3d1af4){const _0x221730=a142_0x2a45bb;if(hasOwn(_0x3d1af4,_0x221730(0x169)))throw forbiddenChannelConfigField('messageTemplate');if(_0x34c8f0===_0x221730(0x1ac))for(const _0x532bbe of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x3d1af4,_0x532bbe))throw forbiddenChannelConfigField(_0x532bbe);}}function forbiddenChannelConfigField(_0x32d7ca){const _0x3fb9b0=a142_0x2a45bb;return notificationError(_0x3fb9b0(0x15c),_0x3fb9b0(0x143)+_0x32d7ca+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x4031ba,_0x223699){const _0x1ac056=a142_0x2a45bb;return notificationError(_0x1ac056(0x19b),_0x1ac056(0x18c)+_0x4031ba+_0x1ac056(0x155)+_0x223699+'.');}function serializeChannelConfig(_0x159974){const _0x3a55e1=a142_0x2a45bb;return _0x159974===null||_0x159974===undefined?null:JSON[_0x3a55e1(0x14a)](_0x159974);}function redactSensitive(_0xb26577){const _0x58b43f=a142_0x2a45bb;return _0xb26577===null||_0xb26577===undefined||_0xb26577===''?null:_0x58b43f(0x17b);}function requireResponseString(_0x9a808f,_0x484099,_0x48d354){const _0x2b7d34=a142_0x2a45bb;if(typeof _0x9a808f!==_0x2b7d34(0x178)||_0x9a808f['trim']()==='')throw CliErrors[_0x2b7d34(0x1b4)](_0x2b7d34(0x16b),_0x2b7d34(0x15b)+(_0x48d354+0x1)+_0x2b7d34(0x167)+_0x484099+'\x22.');return _0x9a808f['trim']();}function requireExactString(_0x77f8e1,_0x3bfc22,_0x3c714f){const _0x278bd5=a142_0x2a45bb;if(typeof _0x77f8e1!==_0x278bd5(0x178)||_0x77f8e1[_0x278bd5(0x189)]()==='')throw notificationError('notification_config_response_invalid',_0x278bd5(0x151)+_0x3c714f+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x3bfc22+'\x22.');return _0x77f8e1[_0x278bd5(0x189)]();}function responseNullableString(_0xa0629f,_0x345a04,_0x979cf0){const _0xeae1e0=a142_0x2a45bb;if(_0xa0629f===undefined||_0xa0629f===null)return null;if(typeof _0xa0629f!==_0xeae1e0(0x178))throw notificationError(_0xeae1e0(0x147),'Notification\x20config\x20'+_0x979cf0+_0xeae1e0(0x170)+_0x345a04+'\x22.');return _0xa0629f;}function responseNullableTimeout(_0x782c72,_0x134eb2,_0x2fb82f){const _0x355fe1=a142_0x2a45bb;if(_0x782c72===undefined||_0x782c72===null)return null;if(!Number[_0x355fe1(0x18a)](_0x782c72)||_0x782c72<0x0)throw notificationError(_0x355fe1(0x147),'Notification\x20config\x20'+_0x2fb82f+_0x355fe1(0x170)+_0x134eb2+'\x22.');return _0x782c72;}function normalizeNullableString(_0x3abb52){const _0x3219c6=a142_0x2a45bb;return typeof _0x3abb52===_0x3219c6(0x178)?_0x3abb52:null;}function isJsonObject(_0x1a8de4){const _0x16eea7=a142_0x2a45bb;return _0x1a8de4!==null&&typeof _0x1a8de4===_0x16eea7(0x16f)&&!Array[_0x16eea7(0x19e)](_0x1a8de4);}function hasOwn(_0x57667d,_0x2dda96){const _0x31da1b=a142_0x2a45bb;return Object[_0x31da1b(0x173)][_0x31da1b(0x195)][_0x31da1b(0x1c1)](_0x57667d,_0x2dda96);}async function readStdin(){const _0x3a1d06=a142_0x2a45bb;let _0x296db0='';process['stdin']['setEncoding']('utf8');for await(const _0x78b06f of process[_0x3a1d06(0x172)])_0x296db0+=_0x78b06f;return _0x296db0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a143_0xc38d(){const _0x4b52e2=['Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','General','count','/smartapi/ocr/recognize-text','image-url','filter','imageFile','File\x20URL\x20response\x20missing\x20fileUrl.','invoice','POST','str','.\x20Supported\x20scenes:\x20','/smartapi/ocr/recognize-text?','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','trim','512524fhWBmE','apiError','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','Preview:\x20recognize\x20','scene','filePath','form','/smartapi/common/uploadFile','2aKTnMW','855064WzGRGH','idCard','1282115YarimL','2741496iUGBKk','toString','idcard','string','10678940qRrDDM','/smartapi/common/queryFileUrl','general','validation','\x20OCR','1108557ZqGJYj','Table','Publicly\x20accessible\x20image\x20or\x20file\x20URL','\x20OCR\x20from\x20URL','length','image-file','Invoice','fileName','GET','File\x20upload\x20response\x20missing\x20filePath.','Unsupported\x20OCR\x20scene:\x20','24ArKlgj','imageUrl','6lggpeE','read','fileUrl','提取票证类业务材料中的文字与结构化字段;不用于通用图片理解','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','246981SnDwtc','appCode','recognize'];a143_0xc38d=function(){return _0x4b52e2;};return a143_0xc38d();}const a143_0x1ba249=a143_0x47d1;(function(_0x20268a,_0x5cafde){const _0x55f255=a143_0x47d1,_0x1e0e1d=_0x20268a();while(!![]){try{const _0x2be7c3=-parseInt(_0x55f255(0xbf))/0x1*(parseInt(_0x55f255(0xb7))/0x2)+parseInt(_0x55f255(0xd9))/0x3*(-parseInt(_0x55f255(0xc0))/0x4)+parseInt(_0x55f255(0xc2))/0x5+-parseInt(_0x55f255(0xc3))/0x6+-parseInt(_0x55f255(0xa5))/0x7+-parseInt(_0x55f255(0xd7))/0x8*(-parseInt(_0x55f255(0xcc))/0x9)+parseInt(_0x55f255(0xc7))/0xa;if(_0x2be7c3===_0x5cafde)break;else _0x1e0e1d['push'](_0x1e0e1d['shift']());}catch(_0x2a7265){_0x1e0e1d['push'](_0x1e0e1d['shift']());}}}(a143_0xc38d,0x3fdcd));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a143_0x1ba249(0xb0),a143_0x1ba249(0xc9),a143_0x1ba249(0xbd),a143_0x1ba249(0xc1)],SCENE_TO_LEGACY_TYPE={'invoice':a143_0x1ba249(0xd2),'general':a143_0x1ba249(0xa9),'form':a143_0x1ba249(0xcd),'idCard':'IdCard'},SCENE_FLAG={'name':a143_0x1ba249(0xbb),'type':a143_0x1ba249(0xc6),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a143_0x1ba249(0xd1),'type':a143_0x1ba249(0xc6),'description':a143_0x1ba249(0xb5)},IMAGE_URL_FLAG={'name':'image-url','type':'string','description':a143_0x1ba249(0xce)};function normalizeScene(_0x27c85e){const _0x4211f6=a143_0x1ba249,_0x4b6084=_0x27c85e[_0x4211f6(0xb6)]()['toLowerCase']();if(_0x4b6084===_0x4211f6(0xc5))return'idCard';if(_0x4b6084==='invoice'||_0x4b6084==='general'||_0x4b6084==='form')return _0x4b6084;throw CliErrors[_0x4211f6(0xca)](_0x4211f6(0xd6)+_0x27c85e+_0x4211f6(0xb3)+SUPPORTED_SCENES['join'](',\x20'));}function a143_0x47d1(_0x59212d,_0x5991c7){_0x59212d=_0x59212d-0xa1;const _0xc38dd6=a143_0xc38d();let _0x47d162=_0xc38dd6[_0x59212d];return _0x47d162;}function selectedInputs(_0x2e6a00){const _0x4a3c12=a143_0x1ba249,_0x709711=_0x2e6a00[_0x4a3c12(0xb2)](_0x4a3c12(0xd1))[_0x4a3c12(0xb6)](),_0x333a30=_0x2e6a00[_0x4a3c12(0xb2)](_0x4a3c12(0xac))[_0x4a3c12(0xb6)]();return{'imageFile':_0x709711,'imageUrl':_0x333a30,'count':[_0x709711,_0x333a30][_0x4a3c12(0xad)](Boolean)[_0x4a3c12(0xd0)]};}function validateInputSelection(_0x1b183f){const _0x280ad0=a143_0x1ba249,_0x7ab371=selectedInputs(_0x1b183f);if(_0x7ab371[_0x280ad0(0xaa)]!==0x1)throw CliErrors['validation'](_0x280ad0(0xa8));return _0x7ab371;}function withScene(_0x3d772e,_0x8716f7,_0x5b2e93){const _0x383a5b=a143_0x1ba249;return{..._0x3d772e,'scene':_0x8716f7,..._0x5b2e93?{'sourceFile':{'fileName':_0x5b2e93[_0x383a5b(0xd3)],'filePath':_0x5b2e93[_0x383a5b(0xbc)]}}:{}};}const ocrRecognize={'service':'ocr','command':a143_0x1ba249(0xa7),'description':a143_0x1ba249(0xa3),'risk':a143_0x1ba249(0xa1),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x51ea7a){const _0x2a69d9=a143_0x1ba249,_0x5402c3=normalizeScene(_0x51ea7a['str'](_0x2a69d9(0xbb))),_0x3c73c8=SCENE_TO_LEGACY_TYPE[_0x5402c3],_0x477b63=validateInputSelection(_0x51ea7a);if(_0x477b63['imageUrl']){const _0x21d624=new URLSearchParams({'url':_0x477b63[_0x2a69d9(0xd8)],'type':_0x3c73c8,'appCode':_0x51ea7a[_0x2a69d9(0xa6)]});return{'method':'GET','url':_0x2a69d9(0xb4)+_0x21d624[_0x2a69d9(0xc4)](),'description':_0x2a69d9(0xba)+_0x5402c3+_0x2a69d9(0xcf)};}const _0x11e385=requireDevelopmentUploadFile(_0x477b63[_0x2a69d9(0xae)],_0x2a69d9(0xd1));return{'method':_0x2a69d9(0xb1),'url':_0x2a69d9(0xbe),'body':{'steps':[{'method':_0x2a69d9(0xb1),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x51ea7a['appCode'],'multipart':{'file':_0x11e385}}},{'method':_0x2a69d9(0xb1),'url':_0x2a69d9(0xc8),'body':{'filePath':_0x2a69d9(0xb9),'downloadFlag':![]}},{'method':_0x2a69d9(0xd4),'url':_0x2a69d9(0xab),'query':{'appCode':_0x51ea7a[_0x2a69d9(0xa6)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x3c73c8}}]},'description':_0x2a69d9(0xa4)+_0x5402c3+_0x2a69d9(0xcb)};},async 'execute'(_0xf2431){const _0x424d41=a143_0x1ba249,_0x1bbfb1=normalizeScene(_0xf2431['str'](_0x424d41(0xbb))),_0x17a54d=SCENE_TO_LEGACY_TYPE[_0x1bbfb1],_0x1ee37a=validateInputSelection(_0xf2431);if(_0x1ee37a[_0x424d41(0xd8)]){const _0x3ac1a6=await recognizeDevelopmentOcr(_0xf2431[_0x424d41(0xa6)],{'url':_0x1ee37a[_0x424d41(0xd8)],'type':_0x17a54d});return{'ok':!![],'data':withScene(_0x3ac1a6,_0x1bbfb1)};}const _0x3e2a00=requireDevelopmentUploadFile(_0x1ee37a[_0x424d41(0xae)],_0x424d41(0xd1)),_0x55ab5d=await uploadDevelopmentFile(_0xf2431[_0x424d41(0xa6)],_0x3e2a00['path']);if(!_0x55ab5d[_0x424d41(0xbc)])throw CliErrors[_0x424d41(0xb8)](_0x424d41(0xd5));const _0x82b20f=await queryDevelopmentFileUrl(_0x55ab5d[_0x424d41(0xbc)],{'download':![]});if(!_0x82b20f[_0x424d41(0xa2)])throw CliErrors[_0x424d41(0xb8)](_0x424d41(0xaf));const _0x2b07a7=await recognizeDevelopmentOcr(_0xf2431[_0x424d41(0xa6)],{'url':_0x82b20f[_0x424d41(0xa2)],'type':_0x17a54d});return{'ok':!![],'data':withScene(_0x2b07a7,_0x1bbfb1,_0x55ab5d)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a144_0x36e354=a144_0x3699;function a144_0x3699(_0x3f91c4,_0x250d26){_0x3f91c4=_0x3f91c4-0xfe;const _0x26a51a=a144_0x26a5();let _0x369995=_0x26a51a[_0x3f91c4];return _0x369995;}(function(_0x1c1af8,_0xa2ce4){const _0x50d46a=a144_0x3699,_0x17f4b4=_0x1c1af8();while(!![]){try{const _0x540e63=parseInt(_0x50d46a(0x130))/0x1+parseInt(_0x50d46a(0x128))/0x2+parseInt(_0x50d46a(0x11f))/0x3*(-parseInt(_0x50d46a(0x116))/0x4)+-parseInt(_0x50d46a(0x132))/0x5+parseInt(_0x50d46a(0x123))/0x6+parseInt(_0x50d46a(0x115))/0x7*(parseInt(_0x50d46a(0x137))/0x8)+-parseInt(_0x50d46a(0x127))/0x9;if(_0x540e63===_0xa2ce4)break;else _0x17f4b4['push'](_0x17f4b4['shift']());}catch(_0x4411a5){_0x17f4b4['push'](_0x17f4b4['shift']());}}}(a144_0x26a5,0xf2b34));import{APPCODE_FLAG}from'../../commands/common/flags.js';import{buildInitialFiles}from'../../commands/page/custom/template.js';import{createCustomPage,getI18nInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,parseCustomPageContent,validateCustomPageContent}from'./custom/shared.js';const DEFAULT_CUSTOM_PAGE_LANGUAGES=['zh-CN','en-US'];export const pageCreate={'service':a144_0x36e354(0x108),'command':a144_0x36e354(0x103),'description':a144_0x36e354(0x11c),'risk':a144_0x36e354(0xff),'defaultOutputFormat':a144_0x36e354(0x114),'structuredErrors':!![],'rejectedFlags':[{'name':a144_0x36e354(0x10d),'message':a144_0x36e354(0x100),'hint':a144_0x36e354(0x136)}],'flags':[{'name':a144_0x36e354(0x121),'type':a144_0x36e354(0x110),'description':a144_0x36e354(0x11b)},{'name':a144_0x36e354(0x126),'type':a144_0x36e354(0x10f),'description':a144_0x36e354(0x102)},{'name':a144_0x36e354(0x11d),'type':a144_0x36e354(0x110),'description':'Custom\x20Page\x20pattern\x20(currently\x20BLANK;\x20conflicts\x20with\x20--page-content)','enum':[a144_0x36e354(0x109)]},{'name':a144_0x36e354(0x107),'type':a144_0x36e354(0x110),'description':a144_0x36e354(0x131)},APPCODE_FLAG],async 'validate'(_0x59ef26){const _0x394c2e=a144_0x36e354,_0x44bc69=readPagePattern(_0x59ef26);await validateCustomPageContent(readInput(_0x59ef26,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x44bc69)[_0x394c2e(0x133)]);},async 'dryRun'(_0x3dc8a5){const _0x1a553a=a144_0x36e354,{input:_0x29533f}=await prepare(_0x3dc8a5);return{'method':'POST','url':'/smartapi/webcode/page/create','body':{'appCode':_0x29533f['appCode'],'pageName':_0x29533f[_0x1a553a(0x11e)],..._0x29533f[_0x1a553a(0x105)]!=null?{'parentMenuId':_0x29533f[_0x1a553a(0x105)]}:{},'createMenu':_0x29533f['createMenu'],'codeContent':_0x29533f['files']},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x1a553a(0x12f)](_0x29533f[_0x1a553a(0x11e)])+_0x1a553a(0x117)};},async 'execute'(_0x4e1e3b){const _0x157963=a144_0x36e354,_0x182b39=await prepare(_0x4e1e3b),_0x10abf4=await createCustomPage(_0x182b39[_0x157963(0x104)]);if(!Number[_0x157963(0x12d)](_0x10abf4['pageId'])||_0x10abf4[_0x157963(0x12c)]<=0x0)throw CliErrors[_0x157963(0x111)](_0x157963(0x101));return{'ok':!![],'data':buildMutationData(_0x182b39,_0x10abf4),'message':'Created\x20Custom\x20Page\x20'+_0x10abf4[_0x157963(0x12c)]+'.'};}};async function prepare(_0x6965aa){const _0x169d7b=a144_0x36e354,_0x1b4089=readPagePattern(_0x6965aa);if(_0x1b4089===null)return{'input':readInput(_0x6965aa,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x1b4089),'warnings':[],'pagePattern':_0x1b4089};let _0x1eab9f=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x458eaf=[];try{const _0x7f39e6=await getI18nInfo(_0x6965aa[_0x169d7b(0x12e)]);_0x7f39e6[_0x169d7b(0x129)]&&_0x7f39e6[_0x169d7b(0x10e)]?.['length']&&(_0x1eab9f=_0x7f39e6[_0x169d7b(0x10e)]);}catch{_0x458eaf=[_0x169d7b(0x119)];}return{'input':readInput(_0x6965aa,_0x1eab9f,_0x1b4089),'warnings':_0x458eaf,'pagePattern':_0x1b4089};}function readPagePattern(_0x3349dc){const _0x13f963=a144_0x36e354,_0x2dc278=_0x3349dc['str']('page-pattern')['trim'](),_0x30d7c1=_0x3349dc[_0x13f963(0x12a)](_0x13f963(0x107))[_0x13f963(0x106)]()['length']>0x0;if(_0x2dc278&&_0x30d7c1)throw CliErrors[_0x13f963(0x124)](_0x13f963(0x139));if(_0x30d7c1)return null;if(!_0x2dc278)throw CliErrors[_0x13f963(0x124)](_0x13f963(0x122));if(_0x2dc278!==_0x13f963(0x109))throw CliErrors[_0x13f963(0x124)](_0x13f963(0x135));return _0x2dc278;}function readInput(_0x1dca9e,_0x91134e=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x1d04ff=readPagePattern(_0x1dca9e)){const _0x267900=a144_0x36e354,_0x4734b1=_0x1dca9e['str']('name')[_0x267900(0x106)]()||_0x267900(0x125)+Date[_0x267900(0x118)]();if(_0x4734b1[_0x267900(0x10b)]>0x64)throw CliErrors[_0x267900(0x124)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x14679b=_0x1dca9e['num'](_0x267900(0x126),NaN),_0x334d7a=!Number[_0x267900(0x10c)](_0x14679b);if(_0x334d7a&&(!Number[_0x267900(0x12d)](_0x14679b)||_0x14679b<=0x0))throw CliErrors[_0x267900(0x124)](_0x267900(0x120));return{'appCode':_0x1dca9e[_0x267900(0x12e)],'pageName':_0x4734b1,..._0x334d7a?{'parentMenuId':_0x14679b}:{},'createMenu':!![],'files':_0x1d04ff===null?parseCustomPageContent(_0x1dca9e[_0x267900(0x12a)](_0x267900(0x107))):buildInitialFiles(_0x4734b1,_0x91134e)};}function a144_0x26a5(){const _0x47c604=['540480dstWuY','enableI18n','str','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','pageId','isInteger','appCode','stringify','91825FHwLAE','Complete\x20page\x20files\x20as\x20JSON\x20(conflicts\x20with\x20--page-pattern)','1417835rtenLn','files','keys','--page-pattern\x20currently\x20supports\x20only\x20BLANK.','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK\x20or\x20--page-content.','8779016FQVjRn','menuPath','--page-pattern\x20and\x20--page-content\x20cannot\x20be\x20used\x20together.','version','write','page\x20create\x20does\x20not\x20accept\x20--page-type.','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','create','input','parentMenuId','trim','page-content','page','BLANK','CUSTOM','length','isNaN','page-type','langs','number','string','apiError','menuId','warnings','compress','7ttXvIT','241212HwJphh','\x20and\x20its\x20menu\x20entry.','now','Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.','pagePattern','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20complete\x20files','page-pattern','pageName','3CoaklY','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','name','Provide\x20--page-pattern\x20BLANK\x20or\x20--page-content.','928164xSqseq','validation','自定义页面_','parent-menu-id','2485494uEbZba'];a144_0x26a5=function(){return _0x47c604;};return a144_0x26a5();}function buildMutationData(_0x418d4c,_0x32d59d){const _0x41d63d=a144_0x36e354,{input:_0xee8450}=_0x418d4c,_0x35cddb=_0x32d59d&&buildCustomPageDevelopmentUrl(_0xee8450[_0x41d63d(0x12e)],_0x32d59d[_0x41d63d(0x138)]),_0x40d115=_0x32d59d&&buildCustomPageEditUrl(_0xee8450[_0x41d63d(0x12e)],_0x32d59d[_0x41d63d(0x12c)]);return{'operation':'page.create','pageType':_0x41d63d(0x10a),'pagePattern':_0x418d4c[_0x41d63d(0x11a)],'selector':{'appCode':_0xee8450['appCode'],'pageName':_0xee8450[_0x41d63d(0x11e)]},'before':null,'after':{'pageId':_0x32d59d?.[_0x41d63d(0x12c)]??null,'pageName':_0x32d59d?.[_0x41d63d(0x11e)]??_0xee8450[_0x41d63d(0x11e)],'appCode':_0x32d59d?.[_0x41d63d(0x12e)]??_0xee8450[_0x41d63d(0x12e)],'version':_0x32d59d?.[_0x41d63d(0xfe)]??null,'menuId':_0x32d59d?.[_0x41d63d(0x112)]??null,'menuPath':_0x32d59d?.[_0x41d63d(0x138)]??null,'files':_0x32d59d?.[_0x41d63d(0x133)]??Object[_0x41d63d(0x134)](_0xee8450[_0x41d63d(0x133)])},'dryRun':_0x32d59d===undefined,'request':_0xee8450,..._0x35cddb?{'pageUrl':_0x35cddb}:{},..._0x40d115?{'editPageUrl':_0x40d115}:{},'warnings':[..._0x418d4c[_0x41d63d(0x113)],..._0x32d59d&&!_0x35cddb?[_0x41d63d(0x12b)]:[]]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a145_0x2dd5(){const _0x397077=['appcode','634CZSAIk','2043YpqNBQ','7cQDvcD','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','2273034AJZxVX','padStart','4gxXiRY','appCode','273560wvskTc','compress','498924gVbazG','pageCode','2805215hKaHgp','str','100ylXYYr','Retrieved\x20Custom\x20Page\x20','getSeconds','1709649FVOTJi','trim','1177550gsYjIm','read','cookie','getMinutes','page','join','getHours'];a145_0x2dd5=function(){return _0x397077;};return a145_0x2dd5();}function a145_0x389f(_0x25ccba,_0x1f4e59){_0x25ccba=_0x25ccba-0xfe;const _0x2dd555=a145_0x2dd5();let _0x389f12=_0x2dd555[_0x25ccba];return _0x389f12;}const a145_0x19a506=a145_0x389f;(function(_0x35aa1d,_0x341a83){const _0xa48272=a145_0x389f,_0x37a5d0=_0x35aa1d();while(!![]){try{const _0x1804f3=-parseInt(_0xa48272(0x109))/0x1+parseInt(_0xa48272(0xff))/0x2*(-parseInt(_0xa48272(0x100))/0x3)+-parseInt(_0xa48272(0x105))/0x4*(-parseInt(_0xa48272(0x10b))/0x5)+parseInt(_0xa48272(0x103))/0x6*(-parseInt(_0xa48272(0x101))/0x7)+parseInt(_0xa48272(0x107))/0x8+-parseInt(_0xa48272(0x110))/0x9+-parseInt(_0xa48272(0x10d))/0xa*(-parseInt(_0xa48272(0x112))/0xb);if(_0x1804f3===_0x341a83)break;else _0x37a5d0['push'](_0x37a5d0['shift']());}catch(_0x9f6800){_0x37a5d0['push'](_0x37a5d0['shift']());}}}(a145_0x2dd5,0x5d4b9));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a145_0x19a506(0x116),'command':'custom-detail','description':a145_0x19a506(0x102),'risk':a145_0x19a506(0x113),'defaultOutputFormat':a145_0x19a506(0x108),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1d789e){readCustomPageId(_0x1d789e);},async 'execute'(_0x1e9a94){const _0x4757d6=a145_0x19a506,_0x3a7ab4=readCustomPageId(_0x1e9a94),_0x4aa5c8=await getCustomPageSource(_0x3a7ab4),{bundle:_0x2a0a7e,createTime:_0x40607d,updateTime:_0x3a0ade,..._0x45bc57}=_0x4aa5c8,_0x5bbc47=_0x4aa5c8['id']??_0x3a7ab4,_0x1cacd0=_0x4aa5c8[_0x4757d6(0x106)]?.[_0x4757d6(0x111)]()||_0x1e9a94[_0x4757d6(0x10c)](_0x4757d6(0xfe))['trim'](),_0x1a1271=buildCustomPageRuntimeUrl(_0x1cacd0,_0x4aa5c8[_0x4757d6(0x10a)]),_0x37478e=buildCustomPageEditUrl(_0x1cacd0,_0x5bbc47),_0x5e0007=await resolveCustomPageDevelopmentUrl(_0x1cacd0,_0x5bbc47,_0x1e9a94[_0x4757d6(0x114)]);return{'ok':!![],'data':{..._0x45bc57,..._0x1a1271?{'runtimePageUrl':_0x1a1271}:{},..._0x5e0007?{'pageUrl':_0x5e0007}:{},..._0x37478e?{'editPageUrl':_0x37478e}:{},..._0x40607d==null?{}:{'createTime':formatTime(_0x40607d)},..._0x3a0ade==null?{}:{'updateTime':formatTime(_0x3a0ade)}},'message':_0x4757d6(0x10e)+_0x3a7ab4+'.'};}};function formatTime(_0x29f3a2){const _0x26326c=a145_0x19a506,_0x31145e=new Date(_0x29f3a2);if(Number['isNaN'](_0x31145e['getTime']()))return String(_0x29f3a2);const _0x1d981c=[_0x31145e['getFullYear'](),String(_0x31145e['getMonth']()+0x1)['padStart'](0x2,'0'),String(_0x31145e['getDate']())[_0x26326c(0x104)](0x2,'0')][_0x26326c(0x117)]('-'),_0x484cb8=[String(_0x31145e[_0x26326c(0x118)]())[_0x26326c(0x104)](0x2,'0'),String(_0x31145e[_0x26326c(0x115)]())[_0x26326c(0x104)](0x2,'0'),String(_0x31145e[_0x26326c(0x10f)]())[_0x26326c(0x104)](0x2,'0')][_0x26326c(0x117)](':');return _0x1d981c+'\x20'+_0x484cb8;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0x1998b7=a146_0x1cae;function a146_0x1cae(_0x1691fb,_0x29f11f){_0x1691fb=_0x1691fb-0x1f0;const _0x210dc7=a146_0x210d();let _0x1cae19=_0x210dc7[_0x1691fb];return _0x1cae19;}function a146_0x210d(){const _0x59aef2=['length','type','72xBiEaQ','pageId','37982thVnPM','18OaHoWD','4453393sHeIYk','read','react','16fZdsPu','No\x20Custom\x20Pages\x20found.','78ZlqOjA','6424miKYtM','1582785GYsaoY','4850216wECTro','961452LsCKiH','appCode','\x20Custom\x20Page(s).','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','1894960KKeInj','path','cookie','57096NSBgbj','flatMap'];a146_0x210d=function(){return _0x59aef2;};return a146_0x210d();}(function(_0x43edfe,_0x256a52){const _0xcba7d6=a146_0x1cae,_0x8224ff=_0x43edfe();while(!![]){try{const _0x54099e=-parseInt(_0xcba7d6(0x202))/0x1*(-parseInt(_0xcba7d6(0x1f1))/0x2)+-parseInt(_0xcba7d6(0x1f5))/0x3+parseInt(_0xcba7d6(0x1f4))/0x4+parseInt(_0xcba7d6(0x1f3))/0x5*(parseInt(_0xcba7d6(0x203))/0x6)+parseInt(_0xcba7d6(0x204))/0x7*(-parseInt(_0xcba7d6(0x207))/0x8)+parseInt(_0xcba7d6(0x200))/0x9*(parseInt(_0xcba7d6(0x1f9))/0xa)+parseInt(_0xcba7d6(0x1f2))/0xb*(-parseInt(_0xcba7d6(0x1fc))/0xc);if(_0x54099e===_0x256a52)break;else _0x8224ff['push'](_0x8224ff['shift']());}catch(_0x1eb632){_0x8224ff['push'](_0x8224ff['shift']());}}}(a146_0x210d,0xc05e1));import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':'page','command':'custom-list','description':a146_0x1998b7(0x1f8),'risk':a146_0x1998b7(0x205),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[APPCODE_FLAG],async 'execute'(_0x2a3a42){const _0x4e6389=a146_0x1998b7,_0x5db4e2=(await fetchMenuSnapshot(_0x2a3a42[_0x4e6389(0x1f6)],_0x2a3a42[_0x4e6389(0x1fb)]))['menus'][_0x4e6389(0x1fd)](_0x18a4a2=>{const _0x4393b8=_0x4e6389;if(_0x18a4a2[_0x4393b8(0x1ff)]!==_0x4393b8(0x206)||_0x18a4a2['pageId']==null)return[];const _0x39c8eb=buildCustomPageDevelopmentUrl(_0x2a3a42['appCode'],_0x18a4a2[_0x4393b8(0x1fa)]),_0x146603=buildCustomPageEditUrl(_0x2a3a42[_0x4393b8(0x1f6)],_0x18a4a2[_0x4393b8(0x201)]);return[{'pageId':_0x18a4a2[_0x4393b8(0x201)],'label':_0x18a4a2['label'],..._0x39c8eb?{'pageUrl':_0x39c8eb}:{},..._0x146603?{'editPageUrl':_0x146603}:{}}];});return{'ok':!![],'data':{'pages':_0x5db4e2},'message':_0x5db4e2[_0x4e6389(0x1fe)]===0x0?_0x4e6389(0x1f0):'Found\x20'+_0x5db4e2['length']+_0x4e6389(0x1f7)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x8a7c94=a147_0x1e4d;(function(_0x791303,_0xa23252){const _0x440792=a147_0x1e4d,_0x848fa9=_0x791303();while(!![]){try{const _0x20bb05=parseInt(_0x440792(0x129))/0x1+-parseInt(_0x440792(0x123))/0x2*(parseInt(_0x440792(0x117))/0x3)+-parseInt(_0x440792(0x120))/0x4*(parseInt(_0x440792(0x10c))/0x5)+parseInt(_0x440792(0x126))/0x6+-parseInt(_0x440792(0x10b))/0x7+parseInt(_0x440792(0x10f))/0x8+parseInt(_0x440792(0x11d))/0x9;if(_0x20bb05===_0xa23252)break;else _0x848fa9['push'](_0x848fa9['shift']());}catch(_0x3247a7){_0x848fa9['push'](_0x848fa9['shift']());}}}(a147_0x5486,0x2d993));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';function a147_0x1e4d(_0x27cee3,_0x5fe567){_0x27cee3=_0x27cee3-0x109;const _0x548678=a147_0x5486();let _0x1e4da3=_0x548678[_0x27cee3];return _0x1e4da3;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';function a147_0x5486(){const _0x15fa45=['218328FrsEYM','remark','POST','apiError','write','Published\x20Custom\x20Page\x20','unknown','Custom\x20Page\x20ID','9xYHWim','FORMAL','page','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','pageId','pageCode','1470438sFpSPl','warnings','trim','4wZoGSw','Would\x20publish\x20Custom\x20Page\x20','status','70986gyihJM','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','runtimePageUrl','239484wrZjML','push','page.custom-publish','318993YTahOf','str','appCode','compress','isInteger','cookie','Optional\x20publish\x20remark','479857chblzC','938895uXwGSZ','/smartapi/webcode/file/publish','string'];a147_0x5486=function(){return _0x15fa45;};return a147_0x5486();}export const pageCustomPublish={'service':a147_0x8a7c94(0x119),'command':'custom-publish','description':a147_0x8a7c94(0x11a),'risk':a147_0x8a7c94(0x113),'defaultOutputFormat':a147_0x8a7c94(0x12c),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a147_0x8a7c94(0x116)},{'name':a147_0x8a7c94(0x110),'type':a147_0x8a7c94(0x10e),'description':a147_0x8a7c94(0x10a)}],async 'validate'(_0x2b3460){readCustomPageId(_0x2b3460);},async 'dryRun'(_0x19f0f5){const _0x567210=a147_0x8a7c94,_0x567aab=readInput(_0x19f0f5);return{'method':_0x567210(0x111),'url':_0x567210(0x10d),'body':{'id':_0x567aab[_0x567210(0x11b)],..._0x567aab['remark']?{'remark':_0x567aab[_0x567210(0x110)]}:{}},'description':_0x567210(0x121)+_0x567aab['pageId']+'.'};},async 'execute'(_0x10c398){const _0x5a447d=a147_0x8a7c94,_0x4e0f73=readInput(_0x10c398);await getCustomPageSource(_0x4e0f73[_0x5a447d(0x11b)]);const _0x11a2e4=await publishCustomPage(_0x4e0f73);if(!Number[_0x5a447d(0x12d)](_0x11a2e4)||_0x11a2e4!==_0x4e0f73[_0x5a447d(0x11b)])throw CliErrors[_0x5a447d(0x112)]('Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.');const _0x18d97e=await getCustomPageSource(_0x4e0f73['pageId']);if(_0x18d97e['status']!==_0x5a447d(0x118))throw CliErrors[_0x5a447d(0x112)](_0x5a447d(0x124)+(_0x18d97e[_0x5a447d(0x122)]??_0x5a447d(0x115))+'.');const _0x53f4b5=_0x18d97e[_0x5a447d(0x12b)]?.[_0x5a447d(0x11f)](),_0x3cc288=buildCustomPageEditUrl(_0x53f4b5,_0x4e0f73[_0x5a447d(0x11b)]),_0x3ab3e8=await resolveCustomPageDevelopmentUrl(_0x53f4b5,_0x4e0f73[_0x5a447d(0x11b)],_0x10c398[_0x5a447d(0x109)]),_0x2289e9=buildMutationData(_0x4e0f73,!![],_0x3ab3e8,_0x3cc288);_0x53f4b5&&!_0x3ab3e8&&_0x2289e9[_0x5a447d(0x11e)][_0x5a447d(0x127)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x1f742e=buildCustomPageRuntimeUrl(_0x18d97e[_0x5a447d(0x12b)],_0x18d97e[_0x5a447d(0x11c)]);return _0x1f742e?_0x2289e9[_0x5a447d(0x125)]=_0x1f742e:_0x2289e9[_0x5a447d(0x11e)][_0x5a447d(0x127)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'),{'ok':!![],'data':_0x2289e9,'message':_0x5a447d(0x114)+_0x4e0f73[_0x5a447d(0x11b)]+'.'};}};function readInput(_0x3d07a7){const _0x22cec7=a147_0x8a7c94,_0x2234ba=readCustomPageId(_0x3d07a7),_0x4d1284=_0x3d07a7[_0x22cec7(0x12a)](_0x22cec7(0x110))['trim']();return{'pageId':_0x2234ba,..._0x4d1284?{'remark':_0x4d1284}:{}};}function buildMutationData(_0x51ca25,_0xe7a11=![],_0x421571,_0x155de4){const _0x5ee32e=a147_0x8a7c94;return{'operation':_0x5ee32e(0x128),'selector':{'pageId':_0x51ca25[_0x5ee32e(0x11b)]},'before':null,'after':{'pageId':_0x51ca25['pageId'],'status':_0x5ee32e(0x118)},'dryRun':!_0xe7a11,'request':_0x51ca25,..._0x421571?{'pageUrl':_0x421571}:{},..._0x155de4?{'editPageUrl':_0x155de4}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7c04ef,_0x4b5c1b){const _0x5cabfd=a148_0x5689,_0x4831aa=_0x7c04ef();while(!![]){try{const _0x59eef0=parseInt(_0x5cabfd(0xb5))/0x1*(parseInt(_0x5cabfd(0xbc))/0x2)+parseInt(_0x5cabfd(0xbf))/0x3+-parseInt(_0x5cabfd(0xb7))/0x4+parseInt(_0x5cabfd(0xbb))/0x5+-parseInt(_0x5cabfd(0xa7))/0x6*(parseInt(_0x5cabfd(0xa2))/0x7)+-parseInt(_0x5cabfd(0xac))/0x8*(parseInt(_0x5cabfd(0xa1))/0x9)+parseInt(_0x5cabfd(0xba))/0xa;if(_0x59eef0===_0x4b5c1b)break;else _0x4831aa['push'](_0x4831aa['shift']());}catch(_0x4dface){_0x4831aa['push'](_0x4831aa['shift']());}}}(a148_0x34bd,0xe3a0a));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getEnv,isProduction}from'../../../constant/env.js';import{getAppBaseUrl}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':'Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted'};function trimOptional(_0x2a7923){const _0x3b3219=a148_0x5689;return _0x2a7923?.[_0x3b3219(0x9f)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x3b32b0,_0x5035ee){const _0x4bc26c=a148_0x5689,_0x5c2221=trimOptional(_0x3b32b0),_0x50df52=trimOptional(_0x5035ee);if(!_0x5c2221||!_0x50df52)return undefined;const _0x32d670=isProduction(getEnv())?_0x5c2221+'.app.lovrabet.com':_0x5c2221+_0x4bc26c(0xb8);return _0x4bc26c(0xc3)+_0x32d670+'/'+encodeURIComponent(_0x50df52);}function a148_0x5689(_0x199cc9,_0x4d56af){_0x199cc9=_0x199cc9-0x9d;const _0x34bd65=a148_0x34bd();let _0x56897d=_0x34bd65[_0x199cc9];return _0x56897d;}export function buildCustomPageDevelopmentUrl(_0x289d77,_0x4aa461){const _0x5e86cb=a148_0x5689,_0xaa2ef2=trimOptional(_0x289d77),_0x15779b=trimOptional(_0x4aa461);if(!_0xaa2ef2||!_0x15779b)return undefined;return getAppBaseUrl(_0xaa2ef2)+_0x5e86cb(0xbe)+encodeURIComponent(_0x15779b);}export async function resolveCustomPageDevelopmentUrl(_0x521669,_0x37d8f3,_0x13e54c){const _0x5da68c=a148_0x5689,_0x2f77d2=trimOptional(_0x521669);if(!_0x2f77d2)return undefined;try{const _0x1386ed=(await fetchMenuSnapshot(_0x2f77d2,_0x13e54c))[_0x5da68c(0x9d)][_0x5da68c(0xc2)](_0x1a0f78=>_0x1a0f78[_0x5da68c(0xad)]===_0x5da68c(0xb4)&&_0x1a0f78[_0x5da68c(0xa5)]===_0x37d8f3);return buildCustomPageDevelopmentUrl(_0x2f77d2,_0x1386ed?.['path']);}catch{return undefined;}}function a148_0x34bd(){const _0x526cc2=['https://','object','some','menus','isInteger','trim','length','2439fTROvo','7679eoFlDP','join','map','pageId','flagMissing','9852WMdOGr','https://daily.lovrabet.com','/web-app/app','https://app.lovrabet.com','--page-content\x20must\x20be\x20valid\x20JSON.','54704phryiB','type','/app','string','message','page-content','Invalid\x20Custom\x20Page\x20content:\x20','values','react','102077SqdkBL','num','619876bkUpri','.daily.lovrabet.com','--id\x20must\x20be\x20a\x20positive\x20integer.','17166900eIINnC','8251875WGIFNa','18eCNLzu','validation','/pages/','1367835upGaLO','/ide/','--page-content\x20must\x20be\x20a\x20JSON\x20object\x20whose\x20values\x20are\x20file\x20content\x20strings.','find'];a148_0x34bd=function(){return _0x526cc2;};return a148_0x34bd();}export function buildCustomPageEditUrl(_0x4997a3,_0x27c259){const _0x6df656=a148_0x5689,_0x177330=trimOptional(_0x4997a3);if(!_0x177330)return;const _0x18a345=trimOptional(_0x27c259==null?undefined:String(_0x27c259));if(!_0x18a345)return;const _0x59c56a=isProduction(getEnv())?_0x6df656(0xae):_0x6df656(0xa9),_0x2cf600=isProduction(getEnv())?_0x6df656(0xaa):_0x6df656(0xa8);return''+_0x2cf600+_0x59c56a+'/'+encodeURIComponent(_0x177330)+_0x6df656(0xc0)+encodeURIComponent(_0x18a345);}export function parseCustomPageContent(_0x56f8ff){const _0x9d1637=a148_0x5689;if(!_0x56f8ff[_0x9d1637(0x9f)]())throw CliErrors[_0x9d1637(0xa6)](_0x9d1637(0xb1));let _0x325914;try{_0x325914=JSON['parse'](_0x56f8ff);}catch{throw CliErrors[_0x9d1637(0xbd)](_0x9d1637(0xab));}if(typeof _0x325914!==_0x9d1637(0xc4)||_0x325914===null||Array['isArray'](_0x325914)||Object[_0x9d1637(0xb3)](_0x325914)[_0x9d1637(0xc5)](_0x3a38c6=>typeof _0x3a38c6!==_0x9d1637(0xaf)))throw CliErrors[_0x9d1637(0xbd)](_0x9d1637(0xc1));return _0x325914;}export async function validateCustomPageContent(_0x55612c){const _0x27eaee=a148_0x5689,_0x38ab5a=await validateCustomPageSourceFiles(_0x55612c);if(_0x38ab5a[_0x27eaee(0xa0)]>0x0)throw CliErrors[_0x27eaee(0xbd)](_0x27eaee(0xb2)+_0x38ab5a[_0x27eaee(0xa4)](_0xfe1a4f=>_0xfe1a4f['file']+':\x20'+_0xfe1a4f[_0x27eaee(0xb0)])[_0x27eaee(0xa3)](';\x20'));}export function readCustomPageId(_0x2b7af3){const _0x4ff3f4=a148_0x5689,_0x529cd5=_0x2b7af3[_0x4ff3f4(0xb6)]('id');if(!Number[_0x4ff3f4(0x9e)](_0x529cd5)||_0x529cd5<=0x0)throw CliErrors['validation'](_0x4ff3f4(0xb9));return _0x529cd5;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a149_0x447012=a149_0x5583;(function(_0x4c7a37,_0x28b32b){const _0x451ddc=a149_0x5583,_0x11943b=_0x4c7a37();while(!![]){try{const _0x592baf=-parseInt(_0x451ddc(0x1d9))/0x1+-parseInt(_0x451ddc(0x1dd))/0x2*(-parseInt(_0x451ddc(0x1de))/0x3)+parseInt(_0x451ddc(0x1e2))/0x4*(-parseInt(_0x451ddc(0x1d1))/0x5)+parseInt(_0x451ddc(0x1d7))/0x6*(parseInt(_0x451ddc(0x1da))/0x7)+parseInt(_0x451ddc(0x1dc))/0x8+-parseInt(_0x451ddc(0x1d5))/0x9+-parseInt(_0x451ddc(0x1ca))/0xa*(-parseInt(_0x451ddc(0x1d3))/0xb);if(_0x592baf===_0x28b32b)break;else _0x11943b['push'](_0x11943b['shift']());}catch(_0x2eeca9){_0x11943b['push'](_0x11943b['shift']());}}}(a149_0x20e1,0x57e1d));function a149_0x5583(_0x405066,_0x334f6d){_0x405066=_0x405066-0x1ca;const _0x20e108=a149_0x20e1();let _0x55831f=_0x20e108[_0x405066];return _0x55831f;}import{format}from'prettier';const SOURCE_PARSERS={'.js':'babel','.jsx':a149_0x447012(0x1cf),'.ts':'typescript','.tsx':a149_0x447012(0x1cb)},CUSTOM_PAGE_EXTENSIONS=[a149_0x447012(0x1db),a149_0x447012(0x1cd)];export async function validateCustomPageSourceFiles(_0x3605cc){const _0xabd772=a149_0x447012,_0x134ee7=Object['entries'](_0x3605cc)['filter'](([_0x46a613])=>getParser(_0x46a613));if(!_0x134ee7[_0xabd772(0x1cc)](([_0x35e696])=>isReactSourceFile(_0x35e696)))return[{'file':_0xabd772(0x1d4),'message':_0xabd772(0x1d8)}];const _0x36f936=await Promise[_0xabd772(0x1d0)](_0x134ee7[_0xabd772(0x1df)](async([_0x5b0f1f,_0x48059f])=>{const _0x2894bb=_0xabd772;try{return await format(_0x48059f,{'parser':getParser(_0x5b0f1f)}),undefined;}catch(_0x4fd232){return{'file':_0x5b0f1f,'message':_0x4fd232 instanceof Error?_0x4fd232[_0x2894bb(0x1e0)]:String(_0x4fd232)};}}));return _0x36f936[_0xabd772(0x1d6)](_0x3fd74b=>_0x3fd74b!==undefined);}function getParser(_0x2ea53d){const _0x4ca98c=a149_0x447012,_0xd97a8d=_0x2ea53d['trim']()[_0x4ca98c(0x1ce)]();return Object[_0x4ca98c(0x1d2)](SOURCE_PARSERS)[_0x4ca98c(0x1e1)](([_0x3c4af1])=>_0xd97a8d[_0x4ca98c(0x1e3)](_0x3c4af1))?.[0x1];}function isReactSourceFile(_0x81b50f){const _0x4f0b64=a149_0x447012,_0x536e22=_0x81b50f['trim']()[_0x4f0b64(0x1ce)]();return CUSTOM_PAGE_EXTENSIONS['some'](_0x478ba9=>_0x536e22[_0x4f0b64(0x1e3)](_0x478ba9));}function a149_0x20e1(){const _0x1b3373=['page-content','2514744QmwQwf','filter','1074edFrAc','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','236853wEjQgI','5509fHghLz','.jsx','758336eAUtVF','2jQhhrj','1688565npymsn','map','message','find','537932QByEEs','endsWith','2121970qimkqw','typescript','some','.tsx','toLowerCase','babel','all','5JBFPSK','entries','11UoUGGL'];a149_0x20e1=function(){return _0x1b3373;};return a149_0x20e1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x31cdf6,_0x1bb2df){const _0x583af3=a150_0x598c,_0x19bcdf=_0x31cdf6();while(!![]){try{const _0x476146=parseInt(_0x583af3(0x10a))/0x1*(-parseInt(_0x583af3(0x10d))/0x2)+parseInt(_0x583af3(0x102))/0x3+parseInt(_0x583af3(0x108))/0x4*(-parseInt(_0x583af3(0xfd))/0x5)+-parseInt(_0x583af3(0x10c))/0x6+parseInt(_0x583af3(0x109))/0x7+-parseInt(_0x583af3(0x104))/0x8*(-parseInt(_0x583af3(0x114))/0x9)+-parseInt(_0x583af3(0x113))/0xa;if(_0x476146===_0x1bb2df)break;else _0x19bcdf['push'](_0x19bcdf['shift']());}catch(_0x59f088){_0x19bcdf['push'](_0x19bcdf['shift']());}}}(a150_0x18dc,0xe2382));function buildIndexFile(_0x241aba){const _0x52b576=a150_0x598c;return _0x52b576(0x100)+JSON[_0x52b576(0x10e)](_0x241aba)+_0x52b576(0xfb);}function a150_0x598c(_0x15f778,_0x46832b){_0x15f778=_0x15f778-0xfb;const _0x18dc6b=a150_0x18dc();let _0x598c63=_0x18dc6b[_0x15f778];return _0x598c63;}function buildStyleFile(){const _0x3e824f=a150_0x598c;return _0x3e824f(0x10b);}function a150_0x18dc(){const _0x2013d0=[',\x0a\x20\x20}','3649510RlfrHK','2970081RTRkEk','}</Typography.Title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{$i18n.t(\x27pageDescription\x27,\x20\x27这是一个基础页面模板,你可以在此基础上进行开发。\x27)}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</Typography>\x0a\x20\x20\x20\x20\x20\x20</Card>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20);\x0a};\x0a\x0aexport\x20default\x20App;\x0a','这是一个基础页面模板,你可以在此基础上进行开发。','13405mcaNGR','ja-JP','pageDescription','import\x20React\x20from\x20\x27react\x27;\x0aimport\x20{\x20Card,\x20Typography\x20}\x20from\x20\x27antd\x27;\x0aimport\x20{\x20useSdkClient,\x20useI18n,\x20useNavigate,\x20useLocation\x20}\x20from\x20\x22@/context/app-context\x22;\x0aimport\x20{\x20locales\x20}\x20from\x20\x27../locales\x27;\x0aimport\x20\x27./index.css\x27;\x0a\x0aconst\x20App\x20=\x20()\x20=>\x20{\x0a\x20\x20const\x20client\x20=\x20useSdkClient();\x20//\x20client\x20可以用于获取其他数据集的数据\x0a\x20\x20const\x20$i18n\x20=\x20useI18n();\x20//\x20国际化多语言\x20i18n\x20实例\x0a\x20\x20const\x20navigate\x20=\x20useNavigate();\x20//\x20react-router\x20navigate\x20导航实例\x0a\x20\x20const\x20location\x20=\x20useLocation();\x20//\x20浏览器\x20location\x20实例\x0a\x0a\x20\x20$i18n.addLocale(locales);\x20//\x20添加多语言词包\x0a\x0a\x20\x20return\x20(\x0a\x20\x20\x20\x20<div\x20className=\x22page-container\x22>\x0a\x20\x20\x20\x20\x20\x20<Card>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<Typography>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Title\x20level={2}>{','export\x20const\x20locales\x20=\x20{\x0a','4777140RSZXhi','Ini\x20adalah\x20sebuah\x20halaman\x20dasar.\x20Anda\x20dapat\x20mengembangkan\x20ini.','8NZCkQl','\x0a};\x0a','This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.','id-ID','456wctHLQ','9655758OuuJaZ','942gtlVju','.page-container\x20{\x0a\x20\x20padding:\x2024px;\x0a\x20\x20background:\x20#f0f2f5;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a','3936948ZoTKKl','2226IdVEyK','stringify','これは基本ページテンプレートです。あなたは、これに基づいて開発できます。',':\x20{\x0a\x20\x20\x20\x20','en-US'];a150_0x18dc=function(){return _0x2013d0;};return a150_0x18dc();}function buildLocalesFile(_0x527db3){const _0x3ade80=a150_0x598c,_0x322eb0=_0x527db3['map'](_0x494ec1=>{const _0x384c9a=a150_0x598c;let _0x55455e='';switch(_0x494ec1){case'zh-CN':_0x55455e=_0x384c9a(0xfc);break;case _0x384c9a(0x111):_0x55455e=_0x384c9a(0x106);break;case _0x384c9a(0xfe):_0x55455e=_0x384c9a(0x10f);break;case'tr-TR':_0x55455e='Bu\x20bir\x20temel\x20sayfa\x20şablonudur.\x20Bu\x20temaplana\x20dayanarak\x20geliştirilebilir.';break;case _0x384c9a(0x107):_0x55455e=_0x384c9a(0x103);break;default:_0x55455e=_0x384c9a(0x106);}return'\x20\x20'+JSON[_0x384c9a(0x10e)](_0x494ec1)+_0x384c9a(0x110)+JSON[_0x384c9a(0x10e)](_0x384c9a(0xff))+':\x20'+JSON[_0x384c9a(0x10e)](_0x55455e)+_0x384c9a(0x112);})['join'](',\x0a');return _0x3ade80(0x101)+_0x322eb0+_0x3ade80(0x105);}export function buildInitialFiles(_0xdf3d44,_0x3b5c7a){return{'src/app/index.jsx':buildIndexFile(_0xdf3d44),'src/app/index.css':buildStyleFile(),'src/locales/index.js':buildLocalesFile(_0x3b5c7a)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x1bab28=a151_0x1884;(function(_0x4586c7,_0x1d0c94){const _0x1fd45b=a151_0x1884,_0x485b1d=_0x4586c7();while(!![]){try{const _0x819d9d=parseInt(_0x1fd45b(0xb6))/0x1*(parseInt(_0x1fd45b(0xc4))/0x2)+parseInt(_0x1fd45b(0xb7))/0x3+-parseInt(_0x1fd45b(0xc1))/0x4+-parseInt(_0x1fd45b(0xb0))/0x5*(parseInt(_0x1fd45b(0xbd))/0x6)+-parseInt(_0x1fd45b(0xc7))/0x7+parseInt(_0x1fd45b(0xa9))/0x8+parseInt(_0x1fd45b(0xc3))/0x9;if(_0x819d9d===_0x1d0c94)break;else _0x485b1d['push'](_0x485b1d['shift']());}catch(_0x36050c){_0x485b1d['push'](_0x485b1d['shift']());}}}(a151_0x2f0b,0x5efac));function a151_0x2f0b(){const _0x5db92c=['Updated\x20Custom\x20Page\x20','page-content','2069168wmwpuk','number','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','string','pageId','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','isInteger','2365eifbdx','POST','page','write','apiError','cookie','1WQnVDM','939705yNCYBl','newVersion','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','appCode','str','pageContent','9318oDFBSV','compress','Complete\x20page\x20files\x20as\x20JSON','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','1079824RylhBi','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','9355815RvfuRP','78538xqJLHn','validation','/smartapi/webcode/page/update/content','1799868cNwkVK'];a151_0x2f0b=function(){return _0x5db92c;};return a151_0x2f0b();}import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,parseCustomPageContent,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a151_0x1bab28(0xb2),'command':'custom-update','description':a151_0x1bab28(0xab),'risk':a151_0x1bab28(0xb3),'defaultOutputFormat':a151_0x1bab28(0xbe),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a151_0x1bab28(0xaa),'required':!![],'description':'Custom\x20Page\x20ID'},{'name':a151_0x1bab28(0xa8),'type':a151_0x1bab28(0xac),'required':!![],'description':a151_0x1bab28(0xbf)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4f1d4c){const _0x34fc7a=a151_0x1bab28;readCustomPageId(_0x4f1d4c),await validateCustomPageContent(parseCustomPageContent(_0x4f1d4c[_0x34fc7a(0xbb)](_0x34fc7a(0xa8))));},async 'dryRun'(_0x38efb1){const _0x3d7f11=a151_0x1bab28,_0xbe9b04=await readInput(_0x38efb1);return{'method':_0x3d7f11(0xb1),'url':_0x3d7f11(0xc6),'body':{'id':_0xbe9b04[_0x3d7f11(0xad)],'codeContent':_0xbe9b04[_0x3d7f11(0xbc)]},'description':_0x3d7f11(0xc0)+_0xbe9b04[_0x3d7f11(0xad)]+'.'};},async 'execute'(_0x3ed696){const _0x37beda=a151_0x1bab28,_0x2571b2=await readInput(_0x3ed696),_0xf2d73c=await updateCustomPageContent({'pageId':_0x2571b2[_0x37beda(0xad)],'pageContent':_0x2571b2[_0x37beda(0xbc)]});if(!Number[_0x37beda(0xaf)](_0xf2d73c[_0x37beda(0xb8)])||_0xf2d73c[_0x37beda(0xb8)]<=0x0)throw CliErrors[_0x37beda(0xb4)](_0x37beda(0xae));const _0x35a094=buildCustomPageEditUrl(_0x2571b2[_0x37beda(0xba)],_0x2571b2[_0x37beda(0xad)]),_0x490c3a=await resolveCustomPageDevelopmentUrl(_0x2571b2[_0x37beda(0xba)],_0x2571b2['pageId'],_0x3ed696[_0x37beda(0xb5)]);return{'ok':!![],'data':buildMutationData(_0x2571b2,_0xf2d73c,_0x490c3a,_0x35a094,_0x490c3a?[]:[_0x37beda(0xc2)]),'message':_0x37beda(0xa7)+_0x2571b2[_0x37beda(0xad)]+'.'};}};function a151_0x1884(_0x1a1576,_0x42960e){_0x1a1576=_0x1a1576-0xa7;const _0x2f0bf2=a151_0x2f0b();let _0x18846b=_0x2f0bf2[_0x1a1576];return _0x18846b;}async function readInput(_0x238fd9){const _0x10668e=a151_0x1bab28,_0x6f69b8=readCustomPageId(_0x238fd9),_0x32f94b=_0x238fd9[_0x10668e(0xbb)]('appcode')['trim']()||(await getCustomPageSource(_0x6f69b8))['appCode']?.['trim']();if(!_0x32f94b)throw CliErrors[_0x10668e(0xc5)](_0x10668e(0xb9)+_0x6f69b8+'.');return{'appCode':_0x32f94b,'pageId':_0x6f69b8,'pageContent':parseCustomPageContent(_0x238fd9[_0x10668e(0xbb)](_0x10668e(0xa8)))};}function buildMutationData(_0x4856cf,_0x407f0a,_0x21caa8,_0xb9c546,_0x265b7b=[]){const _0xd17770=a151_0x1bab28;return{'operation':'page.custom-update','selector':{'appCode':_0x4856cf['appCode'],'pageId':_0x4856cf['pageId']},'before':null,'after':{'pageId':_0x407f0a?.['pageId']??_0x4856cf[_0xd17770(0xad)],'version':_0x407f0a?.['newVersion']??null,'pageContent':_0x4856cf['pageContent']},'dryRun':_0x407f0a===undefined,'request':_0x4856cf,..._0x21caa8?{'pageUrl':_0x21caa8}:{},..._0xb9c546?{'editPageUrl':_0xb9c546}:{},'warnings':_0x265b7b};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a152_0x1944(){const _0x4a3d4d=['/standard-page-status?appCode=','compress','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','string','2149952ioccDV','source','26409JtQDfS','data-list-status','status','nextAction','name','appCode','165046QuVxWK','GET','page','252283xfdmbZ','relatedPages','manualResolutionRequired','query-data-list-status','2175792rgjvDK','code','read','/smartapi/lovrabet/dataset/','1759555fAcCmF','172gHwfIU','1386945wPcQbK','length'];a152_0x1944=function(){return _0x4a3d4d;};return a152_0x1944();}function a152_0x5951(_0x15f419,_0x353fc5){_0x15f419=_0x15f419-0xa4;const _0x1944ac=a152_0x1944();let _0x59516a=_0x1944ac[_0x15f419];return _0x59516a;}const a152_0x5bbd80=a152_0x5951;(function(_0x3d6138,_0x62b24){const _0x2525a7=a152_0x5951,_0x21e8d6=_0x3d6138();while(!![]){try{const _0x35d8b7=parseInt(_0x2525a7(0xa4))/0x1+parseInt(_0x2525a7(0xbc))/0x2+-parseInt(_0x2525a7(0xb6))/0x3*(-parseInt(_0x2525a7(0xad))/0x4)+parseInt(_0x2525a7(0xac))/0x5+-parseInt(_0x2525a7(0xa8))/0x6+-parseInt(_0x2525a7(0xae))/0x7+-parseInt(_0x2525a7(0xb4))/0x8;if(_0x35d8b7===_0x62b24)break;else _0x21e8d6['push'](_0x21e8d6['shift']());}catch(_0x8dd3e4){_0x21e8d6['push'](_0x21e8d6['shift']());}}}(a152_0x1944,0x398d7));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a152_0x5bbd80(0xbe),'command':a152_0x5bbd80(0xb7),'description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a152_0x5bbd80(0xaa),'defaultOutputFormat':a152_0x5bbd80(0xb1),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a152_0x5bbd80(0xb3),'description':a152_0x5bbd80(0xb2)}],async 'validate'(_0x2e9a96){validateDatasetSelector(_0x2e9a96);},async 'dryRun'(_0x1ad9fd){const _0x8e9fc8=a152_0x5bbd80,_0x2dd8e8=await loadDatasetDetailForPage(_0x1ad9fd);return{'method':_0x8e9fc8(0xbd),'url':_0x8e9fc8(0xab)+_0x2dd8e8['code']+_0x8e9fc8(0xb0)+encodeURIComponent(_0x1ad9fd[_0x8e9fc8(0xbb)]),'description':serializeDryRunDescription({'dataset':{'id':_0x2dd8e8['id'],'code':_0x2dd8e8[_0x8e9fc8(0xa9)],'name':_0x2dd8e8[_0x8e9fc8(0xba)]},'action':_0x8e9fc8(0xa7)})};},async 'execute'(_0x351fbc){const _0x3d15d7=a152_0x5bbd80,_0x233b71=await loadDatasetDetailForPage(_0x351fbc),_0x24bb6a=await loadDataListPageStatusForGenerate(_0x351fbc,_0x233b71[_0x3d15d7(0xa9)]),_0x101237=getUndeletedRelatedPages(_0x233b71),_0x304121=assessDataListPageState(_0x233b71['code'],_0x24bb6a,{'fallbackUndeletedPages':_0x101237});return{'ok':!![],'data':{'datasetCode':_0x233b71[_0x3d15d7(0xa9)],'precheckSource':_0x24bb6a?.[_0x3d15d7(0xb5)]??'related-pages-fallback','status':_0x304121[_0x3d15d7(0xb8)],'manualResolutionRequired':_0x304121[_0x3d15d7(0xa6)],'nextAction':_0x304121[_0x3d15d7(0xb9)],'dataListPageStatus':_0x24bb6a,'relatedPages':{'total':_0x233b71[_0x3d15d7(0xa5)][_0x3d15d7(0xaf)],'undeletedCount':_0x101237['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a153_0x411afb=a153_0x1bc0;(function(_0x3d6894,_0x3ecb70){const _0x10bac8=a153_0x1bc0,_0x1b89b0=_0x3d6894();while(!![]){try{const _0x49fb2e=parseInt(_0x10bac8(0x149))/0x1*(-parseInt(_0x10bac8(0x134))/0x2)+parseInt(_0x10bac8(0x133))/0x3*(-parseInt(_0x10bac8(0x141))/0x4)+-parseInt(_0x10bac8(0x14b))/0x5+parseInt(_0x10bac8(0x14e))/0x6+-parseInt(_0x10bac8(0x139))/0x7+parseInt(_0x10bac8(0x12f))/0x8+parseInt(_0x10bac8(0x150))/0x9*(parseInt(_0x10bac8(0x136))/0xa);if(_0x49fb2e===_0x3ecb70)break;else _0x1b89b0['push'](_0x1b89b0['shift']());}catch(_0x470648){_0x1b89b0['push'](_0x1b89b0['shift']());}}}(a153_0x2046,0x8bbc2));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';function a153_0x2046(){const _0x2fc1c2=['clientOperationId','manualResolutionRequired','apply','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','status','taskId','message','name','page-pattern','source','fieldCount','allowGenerate','page-type','CRUD_PAGE_SET','appCode','7457224yyUYUE','number','dryRun','reused','76797Iafmht','91598hCfLZT','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','5999540ClmEJq','dataset','bool','4058824AjgEPZ','/smartapi/lovrabet/dataset/','已提交生成任务','precheck','page','code','compress','progressRate','52uectCt','DATA_LIST','dataListPageStatus','generate-start','related-pages-fallback','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','boolean','operationId','13iMDbXk','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','2120700rmnGBH','nextAction','string','2234634FCBxzF','alias','18GyyViy'];a153_0x2046=function(){return _0x2fc1c2;};return a153_0x2046();}export const pageGenerateStart={'service':a153_0x411afb(0x13d),'command':a153_0x411afb(0x144),'description':a153_0x411afb(0x122),'risk':'write','defaultOutputFormat':a153_0x411afb(0x13f),'rejectedFlags':[{'name':a153_0x411afb(0x12c),'message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':a153_0x411afb(0x128),'message':a153_0x411afb(0x123),'hint':'DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.'}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a153_0x411afb(0x14f),'type':a153_0x411afb(0x14d),'description':a153_0x411afb(0x14a)},{'name':'apply','type':a153_0x411afb(0x147),'description':a153_0x411afb(0x146)}],async 'validate'(_0xf1bb64){validateDatasetSelector(_0xf1bb64);},async 'dryRun'(_0x227670){const _0x2a6994=a153_0x411afb,_0x5bd730=await prepare(_0x227670);return{'method':'POST','url':_0x2a6994(0x13a)+_0x5bd730[_0x2a6994(0x137)]['code']+'/generate-standard-pages/start','body':{'appCode':_0x227670[_0x2a6994(0x12e)],'clientOperationId':_0x5bd730['clientOperationId']},'description':serializeDryRunDescription({'dataset':{'id':_0x5bd730[_0x2a6994(0x137)]['id'],'code':_0x5bd730[_0x2a6994(0x137)][_0x2a6994(0x13e)],'name':_0x5bd730[_0x2a6994(0x137)][_0x2a6994(0x127)],'fieldCount':_0x5bd730[_0x2a6994(0x137)][_0x2a6994(0x12a)]},'precheckSource':_0x5bd730[_0x2a6994(0x143)]?.[_0x2a6994(0x129)]??_0x2a6994(0x145),'action':'generate-start','clientOperationId':_0x5bd730[_0x2a6994(0x151)],'plannedStatus':_0x5bd730['precheck'][_0x2a6994(0x124)],'reason':_0x5bd730[_0x2a6994(0x13c)]['message']})};},async 'execute'(_0x1a4471){const _0x5c80a8=a153_0x411afb;if(!_0x1a4471[_0x5c80a8(0x138)](_0x5c80a8(0x121))){const _0x1dd50d=await pageGenerateStart[_0x5c80a8(0x131)](_0x1a4471);return{'ok':!![],'message':_0x5c80a8(0x135),'data':_0x1dd50d};}const _0x248a0f=await prepare(_0x1a4471);if(!_0x248a0f[_0x5c80a8(0x13c)][_0x5c80a8(0x12b)])return{'ok':![],'message':_0x248a0f[_0x5c80a8(0x13c)][_0x5c80a8(0x126)],'data':{'datasetCode':_0x248a0f[_0x5c80a8(0x137)][_0x5c80a8(0x13e)],'pageType':_0x5c80a8(0x142),'pagePattern':_0x5c80a8(0x12d),'clientOperationId':_0x248a0f['clientOperationId'],'precheckSource':_0x248a0f['dataListPageStatus']?.[_0x5c80a8(0x129)]??_0x5c80a8(0x145),'status':_0x248a0f[_0x5c80a8(0x13c)][_0x5c80a8(0x124)],'manualResolutionRequired':_0x248a0f[_0x5c80a8(0x13c)]['manualResolutionRequired'],'nextAction':_0x248a0f[_0x5c80a8(0x13c)]['nextAction'],'query':{'command':buildDataListPageStatusQueryCommand(_0x248a0f[_0x5c80a8(0x137)][_0x5c80a8(0x13e)],_0x1a4471[_0x5c80a8(0x12e)])},'dataListPageStatus':_0x248a0f[_0x5c80a8(0x143)]}};const _0xdd740e=await startGenerateDataListPages(_0x1a4471['appCode'],_0x248a0f[_0x5c80a8(0x137)][_0x5c80a8(0x13e)],{'clientOperationId':_0x248a0f[_0x5c80a8(0x151)]}),_0x22a746=_0xdd740e[_0x5c80a8(0x124)]==='SUCCESS'||_0xdd740e[_0x5c80a8(0x124)]==='PARTIAL_SUCCESS'?await loadDataListPageStatusForGenerate(_0x1a4471,_0x248a0f[_0x5c80a8(0x137)][_0x5c80a8(0x13e)]):null,_0x17c38b=assessGenerateOperationState(_0x248a0f['dataset'][_0x5c80a8(0x13e)],_0xdd740e[_0x5c80a8(0x124)],_0x22a746);return{'ok':!![],'message':_0xdd740e[_0x5c80a8(0x132)]?'复用已有生成任务':_0x5c80a8(0x13b),'data':{'datasetCode':_0x248a0f[_0x5c80a8(0x137)][_0x5c80a8(0x13e)],'appCode':_0x1a4471[_0x5c80a8(0x12e)],'pageType':'DATA_LIST','pagePattern':_0x5c80a8(0x12d),'taskId':_0xdd740e[_0x5c80a8(0x125)]??null,'operationId':_0xdd740e['operationId']??null,'clientOperationId':_0x248a0f['clientOperationId'],'jobStatus':_0xdd740e['status']??null,'progressRate':typeof _0xdd740e[_0x5c80a8(0x140)]===_0x5c80a8(0x130)?_0xdd740e[_0x5c80a8(0x140)]:null,'currentStep':_0xdd740e['currentStep']??null,'reused':_0xdd740e[_0x5c80a8(0x132)]===!![],'status':_0x17c38b['status'],'manualResolutionRequired':_0x17c38b[_0x5c80a8(0x120)],'nextAction':_0x17c38b[_0x5c80a8(0x14c)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x248a0f[_0x5c80a8(0x137)][_0x5c80a8(0x13e)],{'appCode':_0x1a4471['appCode'],'taskId':_0xdd740e[_0x5c80a8(0x125)],'operationId':_0xdd740e[_0x5c80a8(0x148)],'clientOperationId':_0x248a0f[_0x5c80a8(0x151)]})},'dataListPageStatus':_0x22a746}};}};function a153_0x1bc0(_0x2563fa,_0x38d177){_0x2563fa=_0x2563fa-0x120;const _0x2046ba=a153_0x2046();let _0x1bc0c0=_0x2046ba[_0x2563fa];return _0x1bc0c0;}async function prepare(_0x2a5f09){const _0x3131f8=a153_0x411afb,_0x1410f4=await loadDatasetDetailForPage(_0x2a5f09),_0x5168e5=await loadDataListPageStatusForGenerate(_0x2a5f09,_0x1410f4[_0x3131f8(0x13e)]),_0x4fe53c=getUndeletedRelatedPages(_0x1410f4);return{'dataset':_0x1410f4,'dataListPageStatus':_0x5168e5,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x1410f4['code'],_0x5168e5,{'fallbackUndeletedPages':_0x4fe53c})};}
|