@lovrabet/rabetbase-cli 2.4.6 → 2.4.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/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 +16 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- 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 +1 -1
- package/skills/rabetbase/SKILL.md +4 -4
- package/skills/rabetbase/references/rabetbase-kb.md +13 -3
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -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_0x394649=a142_0x32f2;(function(_0x105864,_0x4d4aa8){const _0x1a9f18=a142_0x32f2,_0x1416dc=_0x105864();while(!![]){try{const _0x389b3e=-parseInt(_0x1a9f18(0xe3))/0x1+parseInt(_0x1a9f18(0xeb))/0x2*(-parseInt(_0x1a9f18(0x13b))/0x3)+parseInt(_0x1a9f18(0x12c))/0x4*(-parseInt(_0x1a9f18(0x151))/0x5)+-parseInt(_0x1a9f18(0x117))/0x6+parseInt(_0x1a9f18(0x110))/0x7+parseInt(_0x1a9f18(0x154))/0x8+parseInt(_0x1a9f18(0x135))/0x9;if(_0x389b3e===_0x4d4aa8)break;else _0x1416dc['push'](_0x1416dc['shift']());}catch(_0x11e08e){_0x1416dc['push'](_0x1416dc['shift']());}}}(a142_0x3d86,0x7c787));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_0x394649(0x14a),a142_0x394649(0x11a),a142_0x394649(0x120),a142_0x394649(0x101),a142_0x394649(0xfc)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a142_0x394649(0x105),'channelType',a142_0x394649(0x130),a142_0x394649(0xef),'description',a142_0x394649(0x147),a142_0x394649(0x13e)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode','configCode',a142_0x394649(0x13d)]),EMAIL_RECIPIENT_FIELDS=new Set([a142_0x394649(0x146),'recipients',a142_0x394649(0xf6),a142_0x394649(0x132),a142_0x394649(0x129),a142_0x394649(0x125),a142_0x394649(0x11b),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':'string','required':![],'description':a142_0x394649(0x111)},{'name':a142_0x394649(0x103),'type':a142_0x394649(0xd5),'required':![],'default':![],'description':a142_0x394649(0x136)},{'name':a142_0x394649(0x12f),'type':a142_0x394649(0x119),'required':![],'description':a142_0x394649(0x142)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a142_0x394649(0xfd),'required':!![],'description':a142_0x394649(0x14c)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x180f40,_0x212ee8,_0x4d831d){return new CliError(_0x180f40,0x1,_0x212ee8,_0x4d831d);}export function readNotificationId(_0x121858){const _0x101835=a142_0x394649,_0x515973=_0x121858[_0x101835(0xff)]('id');if(!Number[_0x101835(0x100)](_0x515973)||_0x515973<=0x0)throw notificationError(_0x101835(0xed),_0x101835(0xdb));return _0x515973;}export function requireNotificationExplicitYes(_0x5ceac2){const _0x7bfcc2=a142_0x394649;if(_0x5ceac2[_0x7bfcc2(0xd9)](_0x7bfcc2(0x10c))||_0x5ceac2[_0x7bfcc2(0xd9)](_0x7bfcc2(0x14b)))return;throw notificationError(_0x7bfcc2(0xdd),_0x7bfcc2(0xf8),_0x7bfcc2(0xd7));}export function readNotificationChannelType(_0x2f6251,_0x240372=a142_0x394649(0xec),_0x32c3cf=a142_0x394649(0x14a)){const _0x50c6ef=a142_0x394649,_0x4e0c86=_0x2f6251[_0x50c6ef(0x13f)](_0x240372)[_0x50c6ef(0xf1)]()||_0x32c3cf;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x4e0c86))throw CliErrors[_0x50c6ef(0xf5)]('Invalid\x20--'+_0x240372+':\x20'+_0x4e0c86,_0x50c6ef(0x11d)+NOTIFICATION_CHANNEL_TYPES[_0x50c6ef(0x138)](',\x20')+'.');return _0x4e0c86;}export function assertSingleNotificationSource(_0x15e367){const _0x4c38b0=a142_0x394649,_0xcc302e=[],_0x1b1a6a=_0x15e367[_0x4c38b0(0x13f)]('file')[_0x4c38b0(0xf1)]();if(_0x1b1a6a)_0xcc302e[_0x4c38b0(0x14f)]({'kind':'file','path':_0x1b1a6a});if(_0x15e367[_0x4c38b0(0xd9)]('stdin'))_0xcc302e[_0x4c38b0(0x14f)]({'kind':'stdin'});const _0x5cc468=_0x15e367[_0x4c38b0(0x13f)](_0x4c38b0(0x12f))['trim']();if(_0x5cc468)_0xcc302e[_0x4c38b0(0x14f)]({'kind':_0x4c38b0(0x11e),'name':_0x5cc468});if(_0xcc302e['length']===0x0)throw CliErrors[_0x4c38b0(0xf5)]('Missing\x20notification\x20JSON\x20source.',_0x4c38b0(0x13a));if(_0xcc302e[_0x4c38b0(0x116)]>0x1)throw CliErrors[_0x4c38b0(0xf5)](_0x4c38b0(0x123),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0xcc302e[0x0];}export async function readNotificationDocument(_0x78609e,_0x3a0201){const _0x359a8c=a142_0x394649,_0x52b1a8=assertSingleNotificationSource(_0x78609e),_0x389043=_0x52b1a8[_0x359a8c(0xdc)]==='file'?_0x359a8c(0x112)+_0x52b1a8[_0x359a8c(0xe4)]:_0x52b1a8[_0x359a8c(0xdc)]===_0x359a8c(0x11e)?'environment\x20variable\x20'+_0x52b1a8[_0x359a8c(0x128)]:_0x359a8c(0x103);let _0xe8ec9b;try{if(_0x52b1a8[_0x359a8c(0xdc)]===_0x359a8c(0xda))_0xe8ec9b=await readFile(_0x52b1a8['path'],_0x359a8c(0x152));else{if(_0x52b1a8[_0x359a8c(0xdc)]==='env'){if(!(_0x52b1a8['name']in process.env))throw notificationError('notification_config_source_unavailable',_0x359a8c(0xe1)+_0x52b1a8[_0x359a8c(0x128)]);_0xe8ec9b=process.env[_0x52b1a8.name]??'';}else _0xe8ec9b=await readStdin();}}catch(_0x10fe79){if(_0x10fe79 instanceof CliError)throw _0x10fe79;throw notificationError(_0x359a8c(0x10e),_0x359a8c(0x118)+_0x389043+'.');}let _0x4e3b06;try{_0x4e3b06=JSON[_0x359a8c(0x156)](_0xe8ec9b);}catch{throw notificationError(_0x359a8c(0x14d),'Notification\x20JSON\x20from\x20'+_0x389043+_0x359a8c(0x143),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x4e3b06))throw notificationError(_0x359a8c(0x14d),_0x359a8c(0x107)+_0x389043+_0x359a8c(0x155));return validateNotificationDocument(_0x4e3b06,_0x3a0201);}export function projectNotificationListConfig(_0x3ccc8b,_0x544fef){const _0x5a2e2f=a142_0x394649;return{'id':typeof _0x3ccc8b['id']===_0x5a2e2f(0xfd)?_0x3ccc8b['id']:null,'configCode':requireResponseString(_0x3ccc8b[_0x5a2e2f(0x150)],_0x5a2e2f(0x150),_0x544fef),'configName':requireResponseString(_0x3ccc8b[_0x5a2e2f(0x105)],_0x5a2e2f(0x105),_0x544fef),'channelType':requireResponseString(_0x3ccc8b[_0x5a2e2f(0xd6)],'channelType',_0x544fef),'description':normalizeNullableString(_0x3ccc8b[_0x5a2e2f(0xe5)]),'createTime':normalizeNullableString(_0x3ccc8b[_0x5a2e2f(0x12b)]),'updateTime':normalizeNullableString(_0x3ccc8b[_0x5a2e2f(0xde)])};}export function normalizeExactNotificationConfig(_0x23cc9e,_0x5e52a7,_0x5e8fc9){const _0x5d05e4=a142_0x394649;if(!Number[_0x5d05e4(0x100)](_0x23cc9e['id'])||_0x23cc9e['id']!==_0x5e52a7)throw notificationError(_0x5d05e4(0x104),_0x5d05e4(0x149)+_0x5e52a7+'.');if(_0x23cc9e[_0x5d05e4(0xf9)]!==_0x5e8fc9)throw notificationError('notification_config_response_invalid',_0x5d05e4(0x140)+_0x5e52a7+_0x5d05e4(0x126));const _0x534f9f=requireExactString(_0x23cc9e[_0x5d05e4(0x105)],'configName',_0x5e52a7),_0x58cd97=requireExactString(_0x23cc9e[_0x5d05e4(0x150)],_0x5d05e4(0x150),_0x5e52a7),_0x33919e=requireExactString(_0x23cc9e[_0x5d05e4(0xd6)],_0x5d05e4(0xd6),_0x5e52a7);if(!NOTIFICATION_CHANNEL_TYPES[_0x5d05e4(0xfe)](_0x33919e))throw notificationError(_0x5d05e4(0x104),_0x5d05e4(0x140)+_0x5e52a7+_0x5d05e4(0x153));const _0x58b1d6=responseNullableString(_0x23cc9e[_0x5d05e4(0x130)],'endpointUrl',_0x5e52a7),_0x4d0890=responseNullableString(_0x23cc9e[_0x5d05e4(0xef)],_0x5d05e4(0xef),_0x5e52a7),_0x250aac=responseNullableString(_0x23cc9e[_0x5d05e4(0xe5)],_0x5d05e4(0xe5),_0x5e52a7),_0x5c8a51=responseNullableTimeout(_0x23cc9e[_0x5d05e4(0x147)],_0x5d05e4(0x147),_0x5e52a7),_0x5de5c8=responseNullableTimeout(_0x23cc9e['readTimeout'],_0x5d05e4(0x13e),_0x5e52a7);return{'id':_0x5e52a7,'appCode':_0x5e8fc9,'configCode':_0x58cd97,'configName':_0x534f9f,'channelType':_0x33919e,'endpointUrl':redactSensitive(_0x58b1d6),'channelConfig':redactSensitive(_0x4d0890),'description':_0x250aac,'connectTimeout':_0x5c8a51,'readTimeout':_0x5de5c8,'endpointUrlRaw':_0x58b1d6,'channelConfigRaw':_0x4d0890};}export async function requireExactNotificationConfig(_0x21df61,_0x1f2f12,_0x4b1424){const _0x23776c=a142_0x394649;let _0x150e4c;try{_0x150e4c=await getNotificationChannelConfig(_0x1f2f12,_0x21df61);}catch{throw safeApiFailure(_0x4b1424,_0x23776c(0x12e),_0x23776c(0xee)+_0x21df61+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x150e4c,_0x1f2f12,_0x21df61);}export function projectNotificationConfig(_0x1435ea){const _0x2e6d29=a142_0x394649;return{'id':_0x1435ea['id']??null,'appCode':_0x1435ea[_0x2e6d29(0xf9)],'configCode':_0x1435ea['configCode']??null,'configName':_0x1435ea['configName'],'channelType':_0x1435ea[_0x2e6d29(0xd6)],'endpointUrl':redactSensitive(_0x1435ea[_0x2e6d29(0x130)]),'channelConfig':redactSensitive(_0x1435ea[_0x2e6d29(0xef)]),'description':_0x1435ea[_0x2e6d29(0xe5)]??null,'connectTimeout':_0x1435ea[_0x2e6d29(0x147)]??null,'readTimeout':_0x1435ea[_0x2e6d29(0x13e)]??null};}export function notificationSelector(_0xe1dcb2){const _0x2d0172=a142_0x394649;return{'appCode':_0xe1dcb2['appCode'],'id':_0xe1dcb2['id'],'configCode':_0xe1dcb2[_0x2d0172(0x150)],'configName':_0xe1dcb2[_0x2d0172(0x105)],'channelType':_0xe1dcb2[_0x2d0172(0xd6)]};}export function createMutationInput(_0x5226b7,_0x59568a){const _0x454ddc=a142_0x394649;return{'appCode':_0x5226b7,'configName':_0x59568a[_0x454ddc(0x105)],'channelType':_0x59568a[_0x454ddc(0xd6)],...hasOwn(_0x59568a,_0x454ddc(0x130))?{'endpointUrl':_0x59568a[_0x454ddc(0x130)]}:{},...hasOwn(_0x59568a,_0x454ddc(0xef))?{'channelConfig':serializeChannelConfig(_0x59568a[_0x454ddc(0xef)])}:{},...hasOwn(_0x59568a,'description')?{'description':_0x59568a[_0x454ddc(0xe5)]}:{},...hasOwn(_0x59568a,_0x454ddc(0x147))?{'connectTimeout':_0x59568a[_0x454ddc(0x147)]}:{},...hasOwn(_0x59568a,'readTimeout')?{'readTimeout':_0x59568a[_0x454ddc(0x13e)]}:{}};}export function mergeUpdateInput(_0x42a3df,_0x46e1a6){const _0x31cb19=a142_0x394649;return{'id':_0x42a3df['id'],'appCode':_0x42a3df[_0x31cb19(0xf9)],'configName':_0x46e1a6[_0x31cb19(0x105)]??_0x42a3df[_0x31cb19(0x105)],'channelType':_0x46e1a6['channelType']??_0x42a3df[_0x31cb19(0xd6)],'endpointUrl':hasOwn(_0x46e1a6,_0x31cb19(0x130))?_0x46e1a6[_0x31cb19(0x130)]:_0x42a3df[_0x31cb19(0xe0)],'channelConfig':hasOwn(_0x46e1a6,_0x31cb19(0xef))?serializeChannelConfig(_0x46e1a6[_0x31cb19(0xef)]):_0x42a3df[_0x31cb19(0x102)],'description':hasOwn(_0x46e1a6,_0x31cb19(0xe5))?_0x46e1a6[_0x31cb19(0xe5)]:_0x42a3df['description'],'connectTimeout':hasOwn(_0x46e1a6,_0x31cb19(0x147))?_0x46e1a6[_0x31cb19(0x147)]:_0x42a3df['connectTimeout'],'readTimeout':hasOwn(_0x46e1a6,_0x31cb19(0x13e))?_0x46e1a6[_0x31cb19(0x13e)]:_0x42a3df[_0x31cb19(0x13e)]};}export function plannedUpdateProjection(_0x437054,_0x1f0d9d){const _0x18bdfc=a142_0x394649;return projectNotificationConfig({'id':_0x437054['id'],'appCode':_0x437054[_0x18bdfc(0xf9)],'configCode':_0x437054[_0x18bdfc(0x150)],'configName':_0x1f0d9d['configName']??_0x437054[_0x18bdfc(0x105)],'channelType':_0x1f0d9d[_0x18bdfc(0xd6)]??_0x437054[_0x18bdfc(0xd6)],'endpointUrl':hasOwn(_0x1f0d9d,_0x18bdfc(0x130))?_0x1f0d9d[_0x18bdfc(0x130)]:_0x437054[_0x18bdfc(0xe0)],'channelConfig':hasOwn(_0x1f0d9d,_0x18bdfc(0xef))?_0x1f0d9d['channelConfig']:_0x437054['channelConfigRaw'],'description':hasOwn(_0x1f0d9d,_0x18bdfc(0xe5))?_0x1f0d9d[_0x18bdfc(0xe5)]:_0x437054[_0x18bdfc(0xe5)],'connectTimeout':hasOwn(_0x1f0d9d,_0x18bdfc(0x147))?_0x1f0d9d[_0x18bdfc(0x147)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x437054[_0x18bdfc(0x147)],'readTimeout':hasOwn(_0x1f0d9d,'readTimeout')?_0x1f0d9d['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x437054[_0x18bdfc(0x13e)]});}export function requestedSafeFieldsMatch(_0x34d0fc,_0x526557,_0x4b4f77){const _0x3a8e0e=a142_0x394649,_0xd6bb2b=[],_0x167e9f=[],_0x40ff64=[];for(const _0x552126 of[_0x3a8e0e(0x105),'channelType','description']){if(!hasOwn(_0x4b4f77,_0x552126))continue;_0x40ff64[_0x3a8e0e(0x14f)](_0x552126),_0xd6bb2b[_0x3a8e0e(0x14f)](_0x526557[_0x552126]===_0x4b4f77[_0x552126]),_0x167e9f[_0x3a8e0e(0x14f)](_0x34d0fc[_0x552126]!==_0x4b4f77[_0x552126]&&_0x526557[_0x552126]===_0x4b4f77[_0x552126]);}for(const _0x27c2b5 of['connectTimeout','readTimeout']){if(!hasOwn(_0x4b4f77,_0x27c2b5))continue;const _0x4809d1=_0x4b4f77[_0x27c2b5]??(_0x27c2b5===_0x3a8e0e(0x147)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x40ff64[_0x3a8e0e(0x14f)](_0x27c2b5),_0xd6bb2b[_0x3a8e0e(0x14f)](_0x526557[_0x27c2b5]===_0x4809d1),_0x167e9f[_0x3a8e0e(0x14f)](_0x34d0fc[_0x27c2b5]!==_0x4809d1&&_0x526557[_0x27c2b5]===_0x4809d1);}return hasOwn(_0x4b4f77,_0x3a8e0e(0x130))&&_0x4b4f77[_0x3a8e0e(0x130)]===null&&(_0x40ff64[_0x3a8e0e(0x14f)](_0x3a8e0e(0xf4)),_0xd6bb2b[_0x3a8e0e(0x14f)](_0x526557[_0x3a8e0e(0xe0)]===null||_0x526557['endpointUrlRaw']===''),_0x167e9f[_0x3a8e0e(0x14f)](_0x34d0fc[_0x3a8e0e(0xe0)]!==null&&_0x34d0fc[_0x3a8e0e(0xe0)]!==''&&(_0x526557[_0x3a8e0e(0xe0)]===null||_0x526557[_0x3a8e0e(0xe0)]===''))),{'allMatch':_0xd6bb2b[_0x3a8e0e(0x139)](Boolean),'provesChange':_0x167e9f['some'](Boolean),'verifiedFields':_0x40ff64};}export function validateNotificationDeleteReadback(_0x2b009b,_0x1466b0,_0x20f4b3){const _0x4fcd9b=a142_0x394649;for(const [_0x3a0b6d,_0xf53afb]of _0x2b009b['entries']()){if(!Number['isSafeInteger'](_0xf53afb['id'])||_0xf53afb['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x4fcd9b(0x145)+(_0x3a0b6d+0x1)+_0x4fcd9b(0x108));if(_0xf53afb[_0x4fcd9b(0xf9)]!==_0x1466b0)throw notificationError('notification_config_response_invalid',_0x4fcd9b(0x145)+(_0x3a0b6d+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0xf53afb[_0x4fcd9b(0xd6)]!==_0x20f4b3)throw notificationError(_0x4fcd9b(0x104),_0x4fcd9b(0x145)+(_0x3a0b6d+0x1)+_0x4fcd9b(0x141));}}export function safeApiFailure(_0x26d1f7,_0x238d94,_0xd23fe){const _0x57e511=a142_0x394649;return notificationError('notification_config_'+_0x26d1f7+'_'+(_0x238d94===_0x57e511(0xf2)?_0x57e511(0x114):_0x238d94+_0x57e511(0xf3)),_0x57e511(0x140)+_0x26d1f7+'\x20'+_0x238d94+_0x57e511(0xea),_0xd23fe);}export function notificationLookupCommand(_0x31ad18,_0x5785db){return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x31ad18+'\x20--type\x20'+_0x5785db+'\x20--format\x20compress';}function validateNotificationDocument(_0x30d25c,_0x3f0cc5){const _0x541dd6=a142_0x394649;for(const _0x5e34bb of Object[_0x541dd6(0xe6)](_0x30d25c)){if(FORBIDDEN_IDENTITY_FIELDS[_0x541dd6(0x106)](_0x5e34bb))throw notificationError(_0x541dd6(0x157),_0x541dd6(0xf0)+_0x5e34bb+_0x541dd6(0x11c));if(!ALLOWED_INPUT_FIELDS[_0x541dd6(0x106)](_0x5e34bb))throw notificationError(_0x541dd6(0x144),_0x541dd6(0x14e)+_0x5e34bb+'\x22.');}if(_0x3f0cc5===_0x541dd6(0xfa)&&Object[_0x541dd6(0xe6)](_0x30d25c)[_0x541dd6(0x116)]===0x0)throw notificationError('notification_config_update_empty',_0x541dd6(0x10f));const _0x59884c={};if(hasOwn(_0x30d25c,'configName'))_0x59884c['configName']=validateRequiredString(_0x30d25c[_0x541dd6(0x105)],_0x541dd6(0x105),0x80);else{if(_0x3f0cc5===_0x541dd6(0x12d))throw notificationError(_0x541dd6(0x10b),_0x541dd6(0x115)+_0x541dd6(0x113));}if(hasOwn(_0x30d25c,_0x541dd6(0xd6))){if(typeof _0x30d25c[_0x541dd6(0xd6)]!==_0x541dd6(0x119))throw invalidFieldType('channelType','a\x20supported\x20string');const _0xe22e08=_0x30d25c[_0x541dd6(0xd6)][_0x541dd6(0xf1)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0xe22e08))throw notificationError(_0x541dd6(0x137),_0x541dd6(0xfb),_0x541dd6(0x11d)+NOTIFICATION_CHANNEL_TYPES[_0x541dd6(0x138)](',\x20')+'.');_0x59884c[_0x541dd6(0xd6)]=_0xe22e08;}else{if(_0x3f0cc5===_0x541dd6(0x12d))throw notificationError(_0x541dd6(0x10b),'Create\x20JSON\x20requires\x20field\x20'+_0x541dd6(0x148));}for(const [_0x578531,_0xaa4c5b]of[[_0x541dd6(0x130),0x200],['description',0x100]]){if(!hasOwn(_0x30d25c,_0x578531))continue;const _0x282cb2=_0x30d25c[_0x578531];if(_0x282cb2!==null&&typeof _0x282cb2!==_0x541dd6(0x119))throw invalidFieldType(_0x578531,_0x541dd6(0x124));if(typeof _0x282cb2===_0x541dd6(0x119)&&_0x282cb2[_0x541dd6(0x116)]>_0xaa4c5b)throw notificationError(_0x541dd6(0x137),'Notification\x20JSON\x20field\x20\x22'+_0x578531+_0x541dd6(0x127)+_0xaa4c5b+_0x541dd6(0x133));_0x59884c[_0x578531]=_0x282cb2;}if(hasOwn(_0x30d25c,_0x541dd6(0xef))){const _0x139bb7=_0x30d25c[_0x541dd6(0xef)];if(_0x139bb7===null&&_0x3f0cc5===_0x541dd6(0x12d))throw invalidFieldType('channelConfig','a\x20JSON\x20object');if(_0x139bb7!==null&&!isJsonObject(_0x139bb7))throw invalidFieldType(_0x541dd6(0xef),_0x3f0cc5===_0x541dd6(0xfa)?_0x541dd6(0x11f):_0x541dd6(0x13c));_0x139bb7!==null&&validateChannelConfigFields(_0x59884c[_0x541dd6(0xd6)],_0x139bb7),_0x59884c[_0x541dd6(0xef)]=_0x139bb7;}for(const _0x277d39 of[_0x541dd6(0x147),'readTimeout']){if(!hasOwn(_0x30d25c,_0x277d39))continue;const _0x4ebb24=_0x30d25c[_0x277d39];if(_0x4ebb24!==null&&(!Number['isSafeInteger'](_0x4ebb24)||_0x4ebb24<0x0))throw notificationError(_0x541dd6(0x137),'Notification\x20JSON\x20field\x20\x22'+_0x277d39+_0x541dd6(0xd8));_0x59884c[_0x277d39]=_0x4ebb24;}return _0x59884c;}function validateRequiredString(_0x1db56e,_0x347743,_0x481d20){const _0xc293a9=a142_0x394649;if(typeof _0x1db56e!=='string')throw invalidFieldType(_0x347743,'a\x20non-empty\x20string');const _0x4ddb24=_0x1db56e['trim']();if(!_0x4ddb24)throw notificationError('notification_config_field_invalid',_0xc293a9(0xf0)+_0x347743+_0xc293a9(0x122));if(_0x4ddb24[_0xc293a9(0x116)]>_0x481d20)throw notificationError('notification_config_field_invalid',_0xc293a9(0xf0)+_0x347743+'\x22\x20cannot\x20exceed\x20'+_0x481d20+'\x20characters.');return _0x4ddb24;}function validateChannelConfigFields(_0xd875bd,_0x2cf7eb){const _0x16f225=a142_0x394649;if(hasOwn(_0x2cf7eb,'messageTemplate'))throw forbiddenChannelConfigField('messageTemplate');if(_0xd875bd===_0x16f225(0x14a))for(const _0x5df01d of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x2cf7eb,_0x5df01d))throw forbiddenChannelConfigField(_0x5df01d);}}function forbiddenChannelConfigField(_0x4d605b){const _0x46211f=a142_0x394649;return notificationError(_0x46211f(0x134),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x4d605b+'\x22\x20is\x20forbidden.');}function a142_0x3d86(){const _0x131bf9=['parse','notification_config_field_forbidden','boolean','channelType','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','bool','file','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','kind','notification_config_confirmation_required','updateTime','setEncoding','endpointUrlRaw','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','apiError','761770tuWprY','path','description','keys','\x20has\x20invalid\x20field\x20\x22','object','hasOwnProperty','\x20failed.','397266xnwbJs','type','notification_config_id_invalid','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','channelConfig','Notification\x20JSON\x20field\x20\x22','trim','mutation','_unavailable','endpointUrl:null','validation','ccList','stringify','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','appCode','update','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','WEBHOOK','number','includes','num','isSafeInteger','WECOM','channelConfigRaw','stdin','notification_config_response_invalid','configName','has','Notification\x20JSON\x20from\x20','\x20has\x20an\x20invalid\x20id.','Item\x20','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_field_required','dry-run','prototype','notification_config_source_unavailable','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','1529248Upjzep','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','file\x20','\x22configName\x22.','failed','Create\x20JSON\x20requires\x20field\x20','length','3629496TypYRJ','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','string','FEISHU','fromName','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Allowed\x20values:\x20','env','a\x20JSON\x20object\x20or\x20null','DINGTALK','call','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20JSON\x20source\x20is\x20ambiguous.','a\x20string\x20or\x20null','subjectPrefix','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x22\x20cannot\x20exceed\x20','name','replyTo','\x22\x20must\x20be\x20','createTime','44984optmGf','create','preflight','from-env','endpointUrl','isArray','bccList','\x20characters.','notification_config_channel_field_forbidden','23666103GsROsC','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','notification_config_field_invalid','join','every','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','6wygwkA','a\x20JSON\x20object','channelCode','readTimeout','str','Notification\x20config\x20','\x20has\x20an\x20invalid\x20channelType.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','\x20is\x20invalid.','notification_config_field_unknown','Notification\x20config\x20list\x20item\x20','emailTargets','connectTimeout','\x22channelType\x22.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','EMAIL','yes','Application-level\x20notification\x20config\x20ID','notification_config_json_invalid','Unknown\x20notification\x20JSON\x20field\x20\x22','push','configCode','320qGdfWU','utf8','\x20has\x20an\x20unsupported\x20channelType.','1163968KZWIJX','\x20must\x20be\x20an\x20object.'];a142_0x3d86=function(){return _0x131bf9;};return a142_0x3d86();}function invalidFieldType(_0x55d99f,_0x517d4f){const _0x23d0ce=a142_0x394649;return notificationError(_0x23d0ce(0x137),'Notification\x20JSON\x20field\x20\x22'+_0x55d99f+_0x23d0ce(0x12a)+_0x517d4f+'.');}function serializeChannelConfig(_0x3da2c7){const _0x3de74d=a142_0x394649;return _0x3da2c7===null||_0x3da2c7===undefined?null:JSON[_0x3de74d(0xf7)](_0x3da2c7);}function redactSensitive(_0x9afa6f){return _0x9afa6f===null||_0x9afa6f===undefined||_0x9afa6f===''?null:'<redacted>';}function requireResponseString(_0x1ede58,_0x5a5bb4,_0x23fc6e){const _0x3237ce=a142_0x394649;if(typeof _0x1ede58!==_0x3237ce(0x119)||_0x1ede58[_0x3237ce(0xf1)]()==='')throw CliErrors[_0x3237ce(0xe2)]('Invalid\x20notification\x20config\x20response.',_0x3237ce(0x109)+(_0x23fc6e+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x5a5bb4+'\x22.');return _0x1ede58[_0x3237ce(0xf1)]();}function requireExactString(_0x17c9d9,_0x3be288,_0x247fa5){const _0x576241=a142_0x394649;if(typeof _0x17c9d9!==_0x576241(0x119)||_0x17c9d9[_0x576241(0xf1)]()==='')throw notificationError(_0x576241(0x104),_0x576241(0x140)+_0x247fa5+_0x576241(0x10a)+_0x3be288+'\x22.');return _0x17c9d9[_0x576241(0xf1)]();}function responseNullableString(_0x783141,_0x787daf,_0x35ef87){const _0x5d910d=a142_0x394649;if(_0x783141===undefined||_0x783141===null)return null;if(typeof _0x783141!==_0x5d910d(0x119))throw notificationError(_0x5d910d(0x104),_0x5d910d(0x140)+_0x35ef87+'\x20has\x20invalid\x20field\x20\x22'+_0x787daf+'\x22.');return _0x783141;}function a142_0x32f2(_0x1e7a43,_0x3e682b){_0x1e7a43=_0x1e7a43-0xd5;const _0x3d86cd=a142_0x3d86();let _0x32f26b=_0x3d86cd[_0x1e7a43];return _0x32f26b;}function responseNullableTimeout(_0x307661,_0x562e54,_0xdbee8d){const _0x385f71=a142_0x394649;if(_0x307661===undefined||_0x307661===null)return null;if(!Number['isSafeInteger'](_0x307661)||_0x307661<0x0)throw notificationError(_0x385f71(0x104),'Notification\x20config\x20'+_0xdbee8d+_0x385f71(0xe7)+_0x562e54+'\x22.');return _0x307661;}function normalizeNullableString(_0x500b42){const _0x470fcf=a142_0x394649;return typeof _0x500b42===_0x470fcf(0x119)?_0x500b42:null;}function isJsonObject(_0x42d901){const _0x4e0b62=a142_0x394649;return _0x42d901!==null&&typeof _0x42d901===_0x4e0b62(0xe8)&&!Array[_0x4e0b62(0x131)](_0x42d901);}function hasOwn(_0x218c91,_0x1eacdd){const _0x54fce2=a142_0x394649;return Object[_0x54fce2(0x10d)][_0x54fce2(0xe9)][_0x54fce2(0x121)](_0x218c91,_0x1eacdd);}async function readStdin(){const _0x55f080=a142_0x394649;let _0x371d4f='';process[_0x55f080(0x103)][_0x55f080(0xdf)]('utf8');for await(const _0x2722df of process['stdin'])_0x371d4f+=_0x2722df;return _0x371d4f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x483cbf=a143_0x3523;(function(_0x42790b,_0x222a6c){const _0x334b85=a143_0x3523,_0x150e27=_0x42790b();while(!![]){try{const _0xec3f63=-parseInt(_0x334b85(0x1de))/0x1+-parseInt(_0x334b85(0x1ea))/0x2*(-parseInt(_0x334b85(0x1d1))/0x3)+parseInt(_0x334b85(0x1f9))/0x4+parseInt(_0x334b85(0x202))/0x5*(-parseInt(_0x334b85(0x1e9))/0x6)+parseInt(_0x334b85(0x1ed))/0x7*(parseInt(_0x334b85(0x1d7))/0x8)+parseInt(_0x334b85(0x1f6))/0x9+parseInt(_0x334b85(0x1d3))/0xa*(-parseInt(_0x334b85(0x1ec))/0xb);if(_0xec3f63===_0x222a6c)break;else _0x150e27['push'](_0x150e27['shift']());}catch(_0x12551f){_0x150e27['push'](_0x150e27['shift']());}}}(a143_0xa474,0x70878));function a143_0x3523(_0x5d73c4,_0x48c8c0){_0x5d73c4=_0x5d73c4-0x1cf;const _0xa47464=a143_0xa474();let _0x3523ae=_0xa47464[_0x5d73c4];return _0x3523ae;}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_0x483cbf(0x204),a143_0x483cbf(0x1eb),a143_0x483cbf(0x1db),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a143_0x483cbf(0x1f3),'form':a143_0x483cbf(0x1e8),'idCard':a143_0x483cbf(0x1e4)},SCENE_FLAG={'name':a143_0x483cbf(0x1df),'type':a143_0x483cbf(0x1e7),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a143_0x483cbf(0x1f8)},IMAGE_FILE_FLAG={'name':'image-file','type':a143_0x483cbf(0x1e7),'description':a143_0x483cbf(0x1f0)},IMAGE_URL_FLAG={'name':a143_0x483cbf(0x1e2),'type':a143_0x483cbf(0x1e7),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x2885c3){const _0x2e2f0f=a143_0x483cbf,_0x38ea2b=_0x2885c3[_0x2e2f0f(0x1fd)]()[_0x2e2f0f(0x1d0)]();if(_0x38ea2b===_0x2e2f0f(0x1f7))return _0x2e2f0f(0x203);if(_0x38ea2b==='invoice'||_0x38ea2b===_0x2e2f0f(0x1eb)||_0x38ea2b===_0x2e2f0f(0x1db))return _0x38ea2b;throw CliErrors[_0x2e2f0f(0x200)](_0x2e2f0f(0x201)+_0x2885c3+_0x2e2f0f(0x1d4)+SUPPORTED_SCENES[_0x2e2f0f(0x1e3)](',\x20'));}function selectedInputs(_0xdba2a8){const _0x336f70=a143_0x483cbf,_0x1ef8c4=_0xdba2a8[_0x336f70(0x1e1)](_0x336f70(0x1dd))[_0x336f70(0x1fd)](),_0x2a2593=_0xdba2a8[_0x336f70(0x1e1)]('image-url')[_0x336f70(0x1fd)]();return{'imageFile':_0x1ef8c4,'imageUrl':_0x2a2593,'count':[_0x1ef8c4,_0x2a2593]['filter'](Boolean)['length']};}function a143_0xa474(){const _0xc01d14=['invoice','ocr','/smartapi/ocr/recognize-text?','toLowerCase','30738uvXigL','fileName','2752990KpznKF','.\x20Supported\x20scenes:\x20','GET','appCode','344FQlssz','toString','read','fileUrl','form','recognize','image-file','739232XEHxNY','scene','imageUrl','str','image-url','join','IdCard','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','imageFile','string','Table','12cHGmss','170iTUFGF','general','44RFPixN','81676TUdGkV','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','File\x20URL\x20response\x20missing\x20fileUrl.','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','Preview:\x20recognize\x20','/smartapi/common/uploadFile','General','count','apiError','6544422nTbtHU','idcard','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','868344dUlZKd','/smartapi/common/queryFileUrl','filePath','/smartapi/ocr/recognize-text','trim','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','POST','validation','Unsupported\x20OCR\x20scene:\x20','38825XOvQVb','idCard'];a143_0xa474=function(){return _0xc01d14;};return a143_0xa474();}function validateInputSelection(_0x4f4631){const _0x27df0d=a143_0x483cbf,_0x41af30=selectedInputs(_0x4f4631);if(_0x41af30[_0x27df0d(0x1f4)]!==0x1)throw CliErrors[_0x27df0d(0x200)](_0x27df0d(0x1fe));return _0x41af30;}function withScene(_0x4986a3,_0xf1c9b7,_0x21f32d){const _0x31bcd0=a143_0x483cbf;return{..._0x4986a3,'scene':_0xf1c9b7,..._0x21f32d?{'sourceFile':{'fileName':_0x21f32d[_0x31bcd0(0x1d2)],'filePath':_0x21f32d['filePath']}}:{}};}const ocrRecognize={'service':a143_0x483cbf(0x205),'command':a143_0x483cbf(0x1dc),'description':'提取票证类业务材料中的文字与结构化字段;不用于通用图片理解','risk':a143_0x483cbf(0x1d9),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x4785e5){const _0x316ea5=a143_0x483cbf,_0x5ae236=normalizeScene(_0x4785e5[_0x316ea5(0x1e1)](_0x316ea5(0x1df))),_0x2649f1=SCENE_TO_LEGACY_TYPE[_0x5ae236],_0x34258b=validateInputSelection(_0x4785e5);if(_0x34258b[_0x316ea5(0x1e0)]){const _0x144cd2=new URLSearchParams({'url':_0x34258b[_0x316ea5(0x1e0)],'type':_0x2649f1,'appCode':_0x4785e5[_0x316ea5(0x1d6)]});return{'method':_0x316ea5(0x1d5),'url':_0x316ea5(0x1cf)+_0x144cd2[_0x316ea5(0x1d8)](),'description':_0x316ea5(0x1f1)+_0x5ae236+'\x20OCR\x20from\x20URL'};}const _0x2195f3=requireDevelopmentUploadFile(_0x34258b['imageFile'],_0x316ea5(0x1dd));return{'method':_0x316ea5(0x1ff),'url':_0x316ea5(0x1f2),'body':{'steps':[{'method':_0x316ea5(0x1ff),'url':_0x316ea5(0x1f2),'body':{'appCode':_0x4785e5[_0x316ea5(0x1d6)],'multipart':{'file':_0x2195f3}}},{'method':_0x316ea5(0x1ff),'url':_0x316ea5(0x1fa),'body':{'filePath':_0x316ea5(0x1e5),'downloadFlag':![]}},{'method':_0x316ea5(0x1d5),'url':_0x316ea5(0x1fc),'query':{'appCode':_0x4785e5[_0x316ea5(0x1d6)],'url':_0x316ea5(0x1ee),'type':_0x2649f1}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x5ae236+'\x20OCR'};},async 'execute'(_0x44bc26){const _0xfa640=a143_0x483cbf,_0x163fe0=normalizeScene(_0x44bc26[_0xfa640(0x1e1)](_0xfa640(0x1df))),_0x215821=SCENE_TO_LEGACY_TYPE[_0x163fe0],_0xe7898f=validateInputSelection(_0x44bc26);if(_0xe7898f[_0xfa640(0x1e0)]){const _0x4b3dab=await recognizeDevelopmentOcr(_0x44bc26[_0xfa640(0x1d6)],{'url':_0xe7898f[_0xfa640(0x1e0)],'type':_0x215821});return{'ok':!![],'data':withScene(_0x4b3dab,_0x163fe0)};}const _0x43d3b8=requireDevelopmentUploadFile(_0xe7898f[_0xfa640(0x1e6)],_0xfa640(0x1dd)),_0x12f592=await uploadDevelopmentFile(_0x44bc26['appCode'],_0x43d3b8['path']);if(!_0x12f592[_0xfa640(0x1fb)])throw CliErrors['apiError']('File\x20upload\x20response\x20missing\x20filePath.');const _0x185c2a=await queryDevelopmentFileUrl(_0x12f592['filePath'],{'download':![]});if(!_0x185c2a[_0xfa640(0x1da)])throw CliErrors[_0xfa640(0x1f5)](_0xfa640(0x1ef));const _0x39e428=await recognizeDevelopmentOcr(_0x44bc26[_0xfa640(0x1d6)],{'url':_0x185c2a[_0xfa640(0x1da)],'type':_0x215821});return{'ok':!![],'data':withScene(_0x39e428,_0x163fe0,_0x12f592)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a144_0xd59aea=a144_0x4e09;(function(_0x51d72c,_0x4baac8){const _0x56feaf=a144_0x4e09,_0x2c0143=_0x51d72c();while(!![]){try{const _0x3b72f3=-parseInt(_0x56feaf(0x1b2))/0x1*(-parseInt(_0x56feaf(0x1b7))/0x2)+parseInt(_0x56feaf(0x1ac))/0x3*(parseInt(_0x56feaf(0x1aa))/0x4)+-parseInt(_0x56feaf(0x1bc))/0x5*(-parseInt(_0x56feaf(0x1a3))/0x6)+parseInt(_0x56feaf(0x18b))/0x7+parseInt(_0x56feaf(0x1b9))/0x8+-parseInt(_0x56feaf(0x190))/0x9*(parseInt(_0x56feaf(0x1c1))/0xa)+-parseInt(_0x56feaf(0x199))/0xb;if(_0x3b72f3===_0x4baac8)break;else _0x2c0143['push'](_0x2c0143['shift']());}catch(_0x3194ee){_0x2c0143['push'](_0x2c0143['shift']());}}}(a144_0x5ca3,0x94a5d));function a144_0x5ca3(){const _0x34d05c=['Provide\x20--page-pattern\x20BLANK\x20or\x20--page-content.','page-pattern','pagePattern','page.create','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','page-content','3718631OEAKll','pageName\x20cannot\x20exceed\x20100\x20characters.','BLANK','version','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','6879609qmtlcU','\x20and\x20its\x20menu\x20entry.','string','apiError','num','page','name','stringify','isInteger','12707794iiKmqp','input','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK\x20or\x20--page-content.','Would\x20create\x20Custom\x20Page\x20','number','menuPath','warnings','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20complete\x20files','pageName','menuId','68844mbstTu','write','isNaN','validation','parentMenuId','create','compress','834812tyNRlw','createMenu','6wJMzyt','parent-menu-id','page-type','Custom\x20Page\x20pattern\x20(currently\x20BLANK;\x20conflicts\x20with\x20--page-content)','Created\x20Custom\x20Page\x20','enableI18n','12694OsHoTN','trim','pageId','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','str','186IGtTOd','--page-pattern\x20currently\x20supports\x20only\x20BLANK.','2919304AzlEJX','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','files','15KaMJne','keys','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','CUSTOM','POST','10XpUysL','appCode','length','Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.'];a144_0x5ca3=function(){return _0x34d05c;};return a144_0x5ca3();}function a144_0x4e09(_0xb03242,_0x49390a){_0xb03242=_0xb03242-0x189;const _0x5ca3cc=a144_0x5ca3();let _0x4e09f0=_0x5ca3cc[_0xb03242];return _0x4e09f0;}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_0xd59aea(0x195),'command':a144_0xd59aea(0x1a8),'description':a144_0xd59aea(0x1a0),'risk':a144_0xd59aea(0x1a4),'defaultOutputFormat':a144_0xd59aea(0x1a9),'structuredErrors':!![],'rejectedFlags':[{'name':a144_0xd59aea(0x1ae),'message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':a144_0xd59aea(0x19b)}],'flags':[{'name':a144_0xd59aea(0x196),'type':a144_0xd59aea(0x192),'description':a144_0xd59aea(0x189)},{'name':a144_0xd59aea(0x1ad),'type':a144_0xd59aea(0x19d),'description':a144_0xd59aea(0x1be)},{'name':a144_0xd59aea(0x1c6),'type':a144_0xd59aea(0x192),'description':a144_0xd59aea(0x1af),'enum':[a144_0xd59aea(0x18d)]},{'name':'page-content','type':'string','description':'Complete\x20page\x20files\x20as\x20JSON\x20(conflicts\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0x3d78ba){const _0x1d01e5=a144_0xd59aea,_0x1fb948=readPagePattern(_0x3d78ba);await validateCustomPageContent(readInput(_0x3d78ba,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x1fb948)[_0x1d01e5(0x1bb)]);},async 'dryRun'(_0x4906c0){const _0x43d7e2=a144_0xd59aea,{input:_0x22c590}=await prepare(_0x4906c0);return{'method':_0x43d7e2(0x1c0),'url':'/smartapi/webcode/page/create','body':{'appCode':_0x22c590[_0x43d7e2(0x1c2)],'pageName':_0x22c590[_0x43d7e2(0x1a1)],..._0x22c590[_0x43d7e2(0x1a7)]!=null?{'parentMenuId':_0x22c590[_0x43d7e2(0x1a7)]}:{},'createMenu':_0x22c590[_0x43d7e2(0x1ab)],'codeContent':_0x22c590[_0x43d7e2(0x1bb)]},'description':_0x43d7e2(0x19c)+JSON[_0x43d7e2(0x197)](_0x22c590[_0x43d7e2(0x1a1)])+_0x43d7e2(0x191)};},async 'execute'(_0xbc17ae){const _0xe4f0a6=a144_0xd59aea,_0x3aa2d8=await prepare(_0xbc17ae),_0x1632ee=await createCustomPage(_0x3aa2d8[_0xe4f0a6(0x19a)]);if(!Number[_0xe4f0a6(0x198)](_0x1632ee['pageId'])||_0x1632ee['pageId']<=0x0)throw CliErrors[_0xe4f0a6(0x193)](_0xe4f0a6(0x1b5));return{'ok':!![],'data':buildMutationData(_0x3aa2d8,_0x1632ee),'message':_0xe4f0a6(0x1b0)+_0x1632ee[_0xe4f0a6(0x1b4)]+'.'};}};async function prepare(_0x465a7e){const _0x5e150e=a144_0xd59aea,_0x258356=readPagePattern(_0x465a7e);if(_0x258356===null)return{'input':readInput(_0x465a7e,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x258356),'warnings':[],'pagePattern':_0x258356};let _0x30907b=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x3fc979=[];try{const _0x2463f0=await getI18nInfo(_0x465a7e[_0x5e150e(0x1c2)]);_0x2463f0[_0x5e150e(0x1b1)]&&_0x2463f0['langs']?.['length']&&(_0x30907b=_0x2463f0['langs']);}catch{_0x3fc979=[_0x5e150e(0x1c4)];}return{'input':readInput(_0x465a7e,_0x30907b,_0x258356),'warnings':_0x3fc979,'pagePattern':_0x258356};}function readPagePattern(_0x4a678c){const _0x44b692=a144_0xd59aea,_0x6e159d=_0x4a678c[_0x44b692(0x1b6)](_0x44b692(0x1c6))['trim'](),_0x505f9a=_0x4a678c[_0x44b692(0x1b6)](_0x44b692(0x18a))[_0x44b692(0x1b3)]()[_0x44b692(0x1c3)]>0x0;if(_0x6e159d&&_0x505f9a)throw CliErrors[_0x44b692(0x1a6)]('--page-pattern\x20and\x20--page-content\x20cannot\x20be\x20used\x20together.');if(_0x505f9a)return null;if(!_0x6e159d)throw CliErrors['validation'](_0x44b692(0x1c5));if(_0x6e159d!==_0x44b692(0x18d))throw CliErrors[_0x44b692(0x1a6)](_0x44b692(0x1b8));return _0x6e159d;}function readInput(_0x53d604,_0x266b85=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x1e3f9f=readPagePattern(_0x53d604)){const _0x152937=a144_0xd59aea,_0x5c2fe2=_0x53d604[_0x152937(0x1b6)]('name')['trim']()||'自定义页面_'+Date['now']();if(_0x5c2fe2[_0x152937(0x1c3)]>0x64)throw CliErrors[_0x152937(0x1a6)](_0x152937(0x18c));const _0x549b22=_0x53d604[_0x152937(0x194)](_0x152937(0x1ad),NaN),_0xf76e28=!Number[_0x152937(0x1a5)](_0x549b22);if(_0xf76e28&&(!Number['isInteger'](_0x549b22)||_0x549b22<=0x0))throw CliErrors['validation'](_0x152937(0x1ba));return{'appCode':_0x53d604[_0x152937(0x1c2)],'pageName':_0x5c2fe2,..._0xf76e28?{'parentMenuId':_0x549b22}:{},'createMenu':!![],'files':_0x1e3f9f===null?parseCustomPageContent(_0x53d604[_0x152937(0x1b6)](_0x152937(0x18a))):buildInitialFiles(_0x5c2fe2,_0x266b85)};}function buildMutationData(_0x250d24,_0x19b1ed){const _0x270dec=a144_0xd59aea,{input:_0x4b9af6}=_0x250d24,_0x1bae3a=_0x19b1ed&&buildCustomPageDevelopmentUrl(_0x4b9af6[_0x270dec(0x1c2)],_0x19b1ed[_0x270dec(0x19e)]),_0x32f2fc=_0x19b1ed&&buildCustomPageEditUrl(_0x4b9af6['appCode'],_0x19b1ed[_0x270dec(0x1b4)]);return{'operation':_0x270dec(0x1c8),'pageType':_0x270dec(0x1bf),'pagePattern':_0x250d24[_0x270dec(0x1c7)],'selector':{'appCode':_0x4b9af6[_0x270dec(0x1c2)],'pageName':_0x4b9af6[_0x270dec(0x1a1)]},'before':null,'after':{'pageId':_0x19b1ed?.[_0x270dec(0x1b4)]??null,'pageName':_0x19b1ed?.[_0x270dec(0x1a1)]??_0x4b9af6['pageName'],'appCode':_0x19b1ed?.['appCode']??_0x4b9af6[_0x270dec(0x1c2)],'version':_0x19b1ed?.[_0x270dec(0x18e)]??null,'menuId':_0x19b1ed?.[_0x270dec(0x1a2)]??null,'menuPath':_0x19b1ed?.[_0x270dec(0x19e)]??null,'files':_0x19b1ed?.[_0x270dec(0x1bb)]??Object[_0x270dec(0x1bd)](_0x4b9af6[_0x270dec(0x1bb)])},'dryRun':_0x19b1ed===undefined,'request':_0x4b9af6,..._0x1bae3a?{'pageUrl':_0x1bae3a}:{},..._0x32f2fc?{'editPageUrl':_0x32f2fc}:{},'warnings':[..._0x250d24[_0x270dec(0x19f)],..._0x19b1ed&&!_0x1bae3a?[_0x270dec(0x18f)]:[]]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a145_0x3128ca=a145_0x59a4;(function(_0x5ec132,_0x5793f3){const _0x4733bf=a145_0x59a4,_0x4b4ee1=_0x5ec132();while(!![]){try{const _0x818978=-parseInt(_0x4733bf(0x147))/0x1+parseInt(_0x4733bf(0x141))/0x2*(-parseInt(_0x4733bf(0x157))/0x3)+-parseInt(_0x4733bf(0x156))/0x4*(parseInt(_0x4733bf(0x155))/0x5)+parseInt(_0x4733bf(0x146))/0x6*(parseInt(_0x4733bf(0x158))/0x7)+-parseInt(_0x4733bf(0x149))/0x8*(parseInt(_0x4733bf(0x13f))/0x9)+parseInt(_0x4733bf(0x14b))/0xa+parseInt(_0x4733bf(0x13d))/0xb;if(_0x818978===_0x5793f3)break;else _0x4b4ee1['push'](_0x4b4ee1['shift']());}catch(_0x486a3e){_0x4b4ee1['push'](_0x4b4ee1['shift']());}}}(a145_0xf3b4,0x3f853));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';function a145_0x59a4(_0x1caf06,_0x5e7025){_0x1caf06=_0x1caf06-0x13d;const _0xf3b451=a145_0xf3b4();let _0x59a48b=_0xf3b451[_0x1caf06];return _0x59a48b;}export const pageCustomDetail={'service':a145_0x3128ca(0x14d),'command':a145_0x3128ca(0x153),'description':a145_0x3128ca(0x151),'risk':a145_0x3128ca(0x142),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a145_0x3128ca(0x159),'required':!![],'description':a145_0x3128ca(0x14c)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x47afae){readCustomPageId(_0x47afae);},async 'execute'(_0xc77d29){const _0x2cbfd9=a145_0x3128ca,_0x58d19c=readCustomPageId(_0xc77d29),_0x116a7b=await getCustomPageSource(_0x58d19c),{bundle:_0x3a54cd,createTime:_0x40c2fa,updateTime:_0x5ba549,..._0x25c589}=_0x116a7b,_0x347695=_0x116a7b['id']??_0x58d19c,_0x4afcd9=_0x116a7b[_0x2cbfd9(0x148)]?.[_0x2cbfd9(0x152)]()||_0xc77d29['str'](_0x2cbfd9(0x140))['trim'](),_0x2e9d46=buildCustomPageRuntimeUrl(_0x4afcd9,_0x116a7b['pageCode']),_0x22c26d=buildCustomPageEditUrl(_0x4afcd9,_0x347695),_0x19776b=await resolveCustomPageDevelopmentUrl(_0x4afcd9,_0x347695,_0xc77d29[_0x2cbfd9(0x13e)]);return{'ok':!![],'data':{..._0x25c589,..._0x2e9d46?{'runtimePageUrl':_0x2e9d46}:{},..._0x19776b?{'pageUrl':_0x19776b}:{},..._0x22c26d?{'editPageUrl':_0x22c26d}:{},..._0x40c2fa==null?{}:{'createTime':formatTime(_0x40c2fa)},..._0x5ba549==null?{}:{'updateTime':formatTime(_0x5ba549)}},'message':_0x2cbfd9(0x14e)+_0x58d19c+'.'};}};function a145_0xf3b4(){const _0x5a142a=['read','join','padStart','getDate','53226ZfkWYT','134478OKSdhL','appCode','8lWGJRf','getHours','1292880KJjMQd','Custom\x20Page\x20ID','page','Retrieved\x20Custom\x20Page\x20','getFullYear','getSeconds','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','trim','custom-detail','getMonth','2435moTlPO','3848mubMwn','73617AGvAPn','315DRGTlJ','number','9000552hkScCO','cookie','2806119NEtLSV','appcode','14wXImsV'];a145_0xf3b4=function(){return _0x5a142a;};return a145_0xf3b4();}function formatTime(_0x48176f){const _0x448123=a145_0x3128ca,_0x311593=new Date(_0x48176f);if(Number['isNaN'](_0x311593['getTime']()))return String(_0x48176f);const _0x42013c=[_0x311593[_0x448123(0x14f)](),String(_0x311593[_0x448123(0x154)]()+0x1)[_0x448123(0x144)](0x2,'0'),String(_0x311593[_0x448123(0x145)]())[_0x448123(0x144)](0x2,'0')]['join']('-'),_0x32cd4a=[String(_0x311593[_0x448123(0x14a)]())[_0x448123(0x144)](0x2,'0'),String(_0x311593['getMinutes']())[_0x448123(0x144)](0x2,'0'),String(_0x311593[_0x448123(0x150)]())[_0x448123(0x144)](0x2,'0')][_0x448123(0x143)](':');return _0x42013c+'\x20'+_0x32cd4a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a146_0x1b4f(){const _0x17f217=['Found\x20','167382ngtrib','\x20Custom\x20Page(s).','length','27GNRAoE','pageId','cookie','15902ijHtwr','896810TSNasy','1848880GYDPDr','compress','path','654871UZFVqn','appCode','8HPBxsJ','114mQJScR','4iYNXTk','read','page','custom-list','1937990qlaXwq','flatMap','menus','3224796JnlGqE','type','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app'];a146_0x1b4f=function(){return _0x17f217;};return a146_0x1b4f();}const a146_0x257085=a146_0x9835;(function(_0x3b3e53,_0x26065d){const _0x53fa8f=a146_0x9835,_0x292388=_0x3b3e53();while(!![]){try{const _0x59d083=parseInt(_0x53fa8f(0x17b))/0x1+-parseInt(_0x53fa8f(0x181))/0x2*(parseInt(_0x53fa8f(0x189))/0x3)+parseInt(_0x53fa8f(0x18a))/0x4*(-parseInt(_0x53fa8f(0x18e))/0x5)+parseInt(_0x53fa8f(0x191))/0x6+-parseInt(_0x53fa8f(0x186))/0x7*(parseInt(_0x53fa8f(0x188))/0x8)+parseInt(_0x53fa8f(0x17e))/0x9*(parseInt(_0x53fa8f(0x182))/0xa)+parseInt(_0x53fa8f(0x183))/0xb;if(_0x59d083===_0x26065d)break;else _0x292388['push'](_0x292388['shift']());}catch(_0x3e5765){_0x292388['push'](_0x292388['shift']());}}}(a146_0x1b4f,0x5791a));import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';function a146_0x9835(_0x530544,_0x2b7516){_0x530544=_0x530544-0x17b;const _0x1b4ff6=a146_0x1b4f();let _0x9835e2=_0x1b4ff6[_0x530544];return _0x9835e2;}export const pageCustomList={'service':a146_0x257085(0x18c),'command':a146_0x257085(0x18d),'description':a146_0x257085(0x193),'risk':a146_0x257085(0x18b),'defaultOutputFormat':a146_0x257085(0x184),'structuredErrors':!![],'flags':[APPCODE_FLAG],async 'execute'(_0x191323){const _0x26fa25=a146_0x257085,_0xe74170=(await fetchMenuSnapshot(_0x191323[_0x26fa25(0x187)],_0x191323[_0x26fa25(0x180)]))[_0x26fa25(0x190)][_0x26fa25(0x18f)](_0x5101ad=>{const _0x3fcaec=_0x26fa25;if(_0x5101ad[_0x3fcaec(0x192)]!=='react'||_0x5101ad[_0x3fcaec(0x17f)]==null)return[];const _0x5158fa=buildCustomPageDevelopmentUrl(_0x191323[_0x3fcaec(0x187)],_0x5101ad[_0x3fcaec(0x185)]),_0x1be645=buildCustomPageEditUrl(_0x191323[_0x3fcaec(0x187)],_0x5101ad[_0x3fcaec(0x17f)]);return[{'pageId':_0x5101ad[_0x3fcaec(0x17f)],'label':_0x5101ad['label'],..._0x5158fa?{'pageUrl':_0x5158fa}:{},..._0x1be645?{'editPageUrl':_0x1be645}:{}}];});return{'ok':!![],'data':{'pages':_0xe74170},'message':_0xe74170[_0x26fa25(0x17d)]===0x0?'No\x20Custom\x20Pages\x20found.':_0x26fa25(0x194)+_0xe74170[_0x26fa25(0x17d)]+_0x26fa25(0x17c)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a147_0x115e(_0x2a29ec,_0x3839f6){_0x2a29ec=_0x2a29ec-0x80;const _0x45ee96=a147_0x45ee();let _0x115ea0=_0x45ee96[_0x2a29ec];return _0x115ea0;}const a147_0x41a378=a147_0x115e;function a147_0x45ee(){const _0x2b7044=['Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','Would\x20publish\x20Custom\x20Page\x20','pageCode','unknown','str','page','status','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','cookie','/smartapi/webcode/file/publish','push','5472AlgNYQ','603596Sxcwkc','Optional\x20publish\x20remark','pageId','remark','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','1054152WEphbD','2304BTtubB','trim','4733380ACaxrZ','apiError','Custom\x20Page\x20ID','compress','POST','write','12TPuEPS','FORMAL','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','5IVUneS','66HLoHMb','228203gcqOpo','custom-publish','string','2eJraLx','page.custom-publish','runtimePageUrl','252141NlBnfy','appCode','number','warnings','2392680QJiIAG'];a147_0x45ee=function(){return _0x2b7044;};return a147_0x45ee();}(function(_0x31fb75,_0x8f567f){const _0x580906=a147_0x115e,_0x5271c0=_0x31fb75();while(!![]){try{const _0x53bccc=parseInt(_0x580906(0x87))/0x1+parseInt(_0x580906(0x8a))/0x2*(-parseInt(_0x580906(0x8d))/0x3)+-parseInt(_0x580906(0xa3))/0x4*(parseInt(_0x580906(0x85))/0x5)+-parseInt(_0x580906(0x82))/0x6*(parseInt(_0x580906(0x9e))/0x7)+parseInt(_0x580906(0x9d))/0x8*(-parseInt(_0x580906(0xa4))/0x9)+-parseInt(_0x580906(0xa6))/0xa+parseInt(_0x580906(0x86))/0xb*(parseInt(_0x580906(0x91))/0xc);if(_0x53bccc===_0x8f567f)break;else _0x5271c0['push'](_0x5271c0['shift']());}catch(_0x23681a){_0x5271c0['push'](_0x5271c0['shift']());}}}(a147_0x45ee,0x3e83c));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a147_0x41a378(0x97),'command':a147_0x41a378(0x88),'description':a147_0x41a378(0x84),'risk':a147_0x41a378(0x81),'defaultOutputFormat':a147_0x41a378(0xa9),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a147_0x41a378(0x8f),'required':!![],'description':a147_0x41a378(0xa8)},{'name':a147_0x41a378(0xa1),'type':a147_0x41a378(0x89),'description':a147_0x41a378(0x9f)}],async 'validate'(_0x3bca0c){readCustomPageId(_0x3bca0c);},async 'dryRun'(_0x32f236){const _0x4ffcfa=a147_0x41a378,_0x518ba7=readInput(_0x32f236);return{'method':_0x4ffcfa(0x80),'url':_0x4ffcfa(0x9b),'body':{'id':_0x518ba7[_0x4ffcfa(0xa0)],..._0x518ba7[_0x4ffcfa(0xa1)]?{'remark':_0x518ba7[_0x4ffcfa(0xa1)]}:{}},'description':_0x4ffcfa(0x93)+_0x518ba7[_0x4ffcfa(0xa0)]+'.'};},async 'execute'(_0x43c558){const _0x38af0f=a147_0x41a378,_0x56b5f7=readInput(_0x43c558);await getCustomPageSource(_0x56b5f7[_0x38af0f(0xa0)]);const _0x55ab54=await publishCustomPage(_0x56b5f7);if(!Number['isInteger'](_0x55ab54)||_0x55ab54!==_0x56b5f7[_0x38af0f(0xa0)])throw CliErrors[_0x38af0f(0xa7)](_0x38af0f(0x99));const _0x518ded=await getCustomPageSource(_0x56b5f7[_0x38af0f(0xa0)]);if(_0x518ded['status']!==_0x38af0f(0x83))throw CliErrors[_0x38af0f(0xa7)](_0x38af0f(0x92)+(_0x518ded[_0x38af0f(0x98)]??_0x38af0f(0x95))+'.');const _0x39a278=_0x518ded['appCode']?.[_0x38af0f(0xa5)](),_0x3d9ae2=buildCustomPageEditUrl(_0x39a278,_0x56b5f7['pageId']),_0x4ac13a=await resolveCustomPageDevelopmentUrl(_0x39a278,_0x56b5f7[_0x38af0f(0xa0)],_0x43c558[_0x38af0f(0x9a)]),_0xa0a3ff=buildMutationData(_0x56b5f7,!![],_0x4ac13a,_0x3d9ae2);_0x39a278&&!_0x4ac13a&&_0xa0a3ff[_0x38af0f(0x90)][_0x38af0f(0x9c)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x48a35e=buildCustomPageRuntimeUrl(_0x518ded[_0x38af0f(0x8e)],_0x518ded[_0x38af0f(0x94)]);return _0x48a35e?_0xa0a3ff[_0x38af0f(0x8c)]=_0x48a35e:_0xa0a3ff[_0x38af0f(0x90)]['push'](_0x38af0f(0xa2)),{'ok':!![],'data':_0xa0a3ff,'message':'Published\x20Custom\x20Page\x20'+_0x56b5f7[_0x38af0f(0xa0)]+'.'};}};function readInput(_0x1e2426){const _0x5bf23d=a147_0x41a378,_0x21dbcd=readCustomPageId(_0x1e2426),_0x381021=_0x1e2426[_0x5bf23d(0x96)](_0x5bf23d(0xa1))[_0x5bf23d(0xa5)]();return{'pageId':_0x21dbcd,..._0x381021?{'remark':_0x381021}:{}};}function buildMutationData(_0x443a91,_0x142f5b=![],_0x2bcbca,_0x440859){const _0x567459=a147_0x41a378;return{'operation':_0x567459(0x8b),'selector':{'pageId':_0x443a91[_0x567459(0xa0)]},'before':null,'after':{'pageId':_0x443a91['pageId'],'status':_0x567459(0x83)},'dryRun':!_0x142f5b,'request':_0x443a91,..._0x2bcbca?{'pageUrl':_0x2bcbca}:{},..._0x440859?{'editPageUrl':_0x440859}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x217d4f,_0x311ca8){const _0x1b515c=a148_0x4b3e,_0x2a551e=_0x217d4f();while(!![]){try{const _0x299f72=parseInt(_0x1b515c(0xa4))/0x1*(parseInt(_0x1b515c(0xa6))/0x2)+parseInt(_0x1b515c(0x9c))/0x3+-parseInt(_0x1b515c(0xb5))/0x4*(parseInt(_0x1b515c(0xa9))/0x5)+parseInt(_0x1b515c(0xb0))/0x6+-parseInt(_0x1b515c(0xaa))/0x7+parseInt(_0x1b515c(0xad))/0x8+parseInt(_0x1b515c(0xb6))/0x9*(parseInt(_0x1b515c(0xa1))/0xa);if(_0x299f72===_0x311ca8)break;else _0x2a551e['push'](_0x2a551e['shift']());}catch(_0x41a1f8){_0x2a551e['push'](_0x2a551e['shift']());}}}(a148_0x4668,0x4dea9));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';function a148_0x4b3e(_0x8935ee,_0x36854b){_0x8935ee=_0x8935ee-0x91;const _0x4668d2=a148_0x4668();let _0x4b3ef4=_0x4668d2[_0x8935ee];return _0x4b3ef4;}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(_0x4d2c4a){const _0x12d078=a148_0x4b3e;return _0x4d2c4a?.[_0x12d078(0x9d)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x3c71c0,_0x3276e4){const _0x8ae729=a148_0x4b3e,_0x434a6f=trimOptional(_0x3c71c0),_0x347c59=trimOptional(_0x3276e4);if(!_0x434a6f||!_0x347c59)return undefined;const _0xd46863=isProduction(getEnv())?_0x434a6f+_0x8ae729(0x91):_0x434a6f+_0x8ae729(0xaf);return _0x8ae729(0x9f)+_0xd46863+'/'+encodeURIComponent(_0x347c59);}export function buildCustomPageDevelopmentUrl(_0x56b092,_0xb0f280){const _0x1a4aee=a148_0x4b3e,_0x4722bb=trimOptional(_0x56b092),_0x5f2102=trimOptional(_0xb0f280);if(!_0x4722bb||!_0x5f2102)return undefined;return getAppBaseUrl(_0x4722bb)+_0x1a4aee(0x98)+encodeURIComponent(_0x5f2102);}function a148_0x4668(){const _0x423a50=['https://app.lovrabet.com','8110dnnSKE','type','--page-content\x20must\x20be\x20a\x20JSON\x20object\x20whose\x20values\x20are\x20file\x20content\x20strings.','128661CflVsD','file','2EkOluj','validation','message','1045295tQxuIX','4445035tapkTx','menus','values','4047416oCutil','path','.daily.lovrabet.com','2723514JVAanZ','map','join','object','isInteger','8VbXlRj','90RvJAhQ','.app.lovrabet.com','https://daily.lovrabet.com','string','Invalid\x20Custom\x20Page\x20content:\x20','/ide/','--page-content\x20must\x20be\x20valid\x20JSON.','parse','/pages/','find','page-content','/web-app/app','826953aVtBba','trim','isArray','https://'];a148_0x4668=function(){return _0x423a50;};return a148_0x4668();}export async function resolveCustomPageDevelopmentUrl(_0x22b8dd,_0x43cd95,_0x5cc832){const _0x573ae7=a148_0x4b3e,_0x38a409=trimOptional(_0x22b8dd);if(!_0x38a409)return undefined;try{const _0x691431=(await fetchMenuSnapshot(_0x38a409,_0x5cc832))[_0x573ae7(0xab)][_0x573ae7(0x99)](_0x287619=>_0x287619[_0x573ae7(0xa2)]==='react'&&_0x287619['pageId']===_0x43cd95);return buildCustomPageDevelopmentUrl(_0x38a409,_0x691431?.[_0x573ae7(0xae)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x3a568d,_0x29dc87){const _0x3e5f17=a148_0x4b3e,_0x578791=trimOptional(_0x3a568d);if(!_0x578791)return;const _0xa75c26=trimOptional(_0x29dc87==null?undefined:String(_0x29dc87));if(!_0xa75c26)return;const _0x32f0c1=isProduction(getEnv())?'/app':_0x3e5f17(0x9b),_0x2a95b4=isProduction(getEnv())?_0x3e5f17(0xa0):_0x3e5f17(0x92);return''+_0x2a95b4+_0x32f0c1+'/'+encodeURIComponent(_0x578791)+_0x3e5f17(0x95)+encodeURIComponent(_0xa75c26);}export function parseCustomPageContent(_0x5d5391){const _0x4eb6ed=a148_0x4b3e;if(!_0x5d5391[_0x4eb6ed(0x9d)]())throw CliErrors['flagMissing'](_0x4eb6ed(0x9a));let _0x5a9de5;try{_0x5a9de5=JSON[_0x4eb6ed(0x97)](_0x5d5391);}catch{throw CliErrors[_0x4eb6ed(0xa7)](_0x4eb6ed(0x96));}if(typeof _0x5a9de5!==_0x4eb6ed(0xb3)||_0x5a9de5===null||Array[_0x4eb6ed(0x9e)](_0x5a9de5)||Object[_0x4eb6ed(0xac)](_0x5a9de5)['some'](_0x3c1e6f=>typeof _0x3c1e6f!==_0x4eb6ed(0x93)))throw CliErrors[_0x4eb6ed(0xa7)](_0x4eb6ed(0xa3));return _0x5a9de5;}export async function validateCustomPageContent(_0x1acfca){const _0x420cfb=a148_0x4b3e,_0x1ebcb4=await validateCustomPageSourceFiles(_0x1acfca);if(_0x1ebcb4['length']>0x0)throw CliErrors[_0x420cfb(0xa7)](_0x420cfb(0x94)+_0x1ebcb4[_0x420cfb(0xb1)](_0xef8bf5=>_0xef8bf5[_0x420cfb(0xa5)]+':\x20'+_0xef8bf5[_0x420cfb(0xa8)])[_0x420cfb(0xb2)](';\x20'));}export function readCustomPageId(_0x56cac1){const _0x553af6=a148_0x4b3e,_0x1fcafd=_0x56cac1['num']('id');if(!Number[_0x553af6(0xb4)](_0x1fcafd)||_0x1fcafd<=0x0)throw CliErrors[_0x553af6(0xa7)]('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x1fcafd;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a149_0xc482(_0x1f3604,_0xeb72b6){_0x1f3604=_0x1f3604-0xae;const _0xe48b86=a149_0xe48b();let _0xc4828f=_0xe48b86[_0x1f3604];return _0xc4828f;}const a149_0x30acf4=a149_0xc482;(function(_0x1cc7ec,_0x30943d){const _0x554055=a149_0xc482,_0x2444cd=_0x1cc7ec();while(!![]){try{const _0x795dac=-parseInt(_0x554055(0xae))/0x1*(parseInt(_0x554055(0xc4))/0x2)+parseInt(_0x554055(0xbd))/0x3+parseInt(_0x554055(0xaf))/0x4+-parseInt(_0x554055(0xbb))/0x5+parseInt(_0x554055(0xb4))/0x6*(parseInt(_0x554055(0xb6))/0x7)+parseInt(_0x554055(0xc0))/0x8*(-parseInt(_0x554055(0xbe))/0x9)+-parseInt(_0x554055(0xbf))/0xa;if(_0x795dac===_0x30943d)break;else _0x2444cd['push'](_0x2444cd['shift']());}catch(_0x1fe446){_0x2444cd['push'](_0x2444cd['shift']());}}}(a149_0xe48b,0x70f46));import{format}from'prettier';const SOURCE_PARSERS={'.js':'babel','.jsx':a149_0x30acf4(0xc2),'.ts':a149_0x30acf4(0xb2),'.tsx':a149_0x30acf4(0xb2)},CUSTOM_PAGE_EXTENSIONS=['.jsx',a149_0x30acf4(0xbc)];export async function validateCustomPageSourceFiles(_0x312949){const _0x2cc0cb=a149_0x30acf4,_0x2a1c8c=Object['entries'](_0x312949)[_0x2cc0cb(0xc3)](([_0x4f71e5])=>getParser(_0x4f71e5));if(!_0x2a1c8c[_0x2cc0cb(0xb3)](([_0xce1f9])=>isReactSourceFile(_0xce1f9)))return[{'file':'page-content','message':_0x2cc0cb(0xb9)}];const _0x2403dd=await Promise[_0x2cc0cb(0xb8)](_0x2a1c8c[_0x2cc0cb(0xb5)](async([_0x2b0bef,_0x56ea34])=>{const _0x4a312a=_0x2cc0cb;try{return await format(_0x56ea34,{'parser':getParser(_0x2b0bef)}),undefined;}catch(_0x287909){return{'file':_0x2b0bef,'message':_0x287909 instanceof Error?_0x287909[_0x4a312a(0xb0)]:String(_0x287909)};}}));return _0x2403dd[_0x2cc0cb(0xc3)](_0x4e6b8b=>_0x4e6b8b!==undefined);}function getParser(_0x414530){const _0x749a8a=a149_0x30acf4,_0x39b197=_0x414530[_0x749a8a(0xb1)]()[_0x749a8a(0xb7)]();return Object[_0x749a8a(0xba)](SOURCE_PARSERS)[_0x749a8a(0xc1)](([_0x3a2f67])=>_0x39b197[_0x749a8a(0xc5)](_0x3a2f67))?.[0x1];}function isReactSourceFile(_0x4dd470){const _0x4cca11=a149_0x30acf4,_0x24f42d=_0x4dd470['trim']()[_0x4cca11(0xb7)]();return CUSTOM_PAGE_EXTENSIONS[_0x4cca11(0xb3)](_0x4f664b=>_0x24f42d[_0x4cca11(0xc5)](_0x4f664b));}function a149_0xe48b(){const _0x3c5a04=['some','2550378qIDFcT','map','7HhBERw','toLowerCase','all','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','entries','93830YpvJjI','.tsx','2268090QVMajo','95814XjyQWd','4087640QwxgDY','152fOLhxo','find','babel','filter','82514RbQhJN','endsWith','6EJlSBk','635660vnnbSo','message','trim','typescript'];a149_0xe48b=function(){return _0x3c5a04;};return a149_0xe48b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a150_0x3cc2(){const _0x46669f=['312012oCvAvC','.page-container\x20{\x0a\x20\x20padding:\x2024px;\x0a\x20\x20background:\x20#f0f2f5;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a','12SMcaLB','906VCRBAr','stringify','20bodVLY','3595vcSDvr','id-ID','51JTbgdr','8396eUrcAF','941675CmyQLL','Ini\x20adalah\x20sebuah\x20halaman\x20dasar.\x20Anda\x20dapat\x20mengembangkan\x20ini.','1602728qCObol',',\x0a\x20\x20}','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}>{','ja-JP','tr-TR','join','map','\x0a};\x0a','zh-CN','pageDescription','这是一个基础页面模板,你可以在此基础上进行开发。','Bu\x20bir\x20temel\x20sayfa\x20şablonudur.\x20Bu\x20temaplana\x20dayanarak\x20geliştirilebilir.','1260490qypSQU','12799EusDtP','This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.'];a150_0x3cc2=function(){return _0x46669f;};return a150_0x3cc2();}(function(_0x2683e0,_0x474a53){const _0xdce549=a150_0x418f,_0x272c83=_0x2683e0();while(!![]){try{const _0x4103fd=parseInt(_0xdce549(0x181))/0x1*(parseInt(_0xdce549(0x185))/0x2)+parseInt(_0xdce549(0x18b))/0x3*(parseInt(_0xdce549(0x18c))/0x4)+parseInt(_0xdce549(0x189))/0x5*(-parseInt(_0xdce549(0x186))/0x6)+parseInt(_0xdce549(0x18d))/0x7+-parseInt(_0xdce549(0x174))/0x8+parseInt(_0xdce549(0x183))/0x9*(parseInt(_0xdce549(0x188))/0xa)+parseInt(_0xdce549(0x180))/0xb;if(_0x4103fd===_0x474a53)break;else _0x272c83['push'](_0x272c83['shift']());}catch(_0x481620){_0x272c83['push'](_0x272c83['shift']());}}}(a150_0x3cc2,0x1dca2));function buildIndexFile(_0x193441){const _0x24aa8d=a150_0x418f;return _0x24aa8d(0x176)+JSON[_0x24aa8d(0x187)](_0x193441)+'}</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';}function a150_0x418f(_0x1e2b1e,_0x394148){_0x1e2b1e=_0x1e2b1e-0x173;const _0x3cc2b0=a150_0x3cc2();let _0x418f14=_0x3cc2b0[_0x1e2b1e];return _0x418f14;}function buildStyleFile(){const _0x4974ce=a150_0x418f;return _0x4974ce(0x184);}function buildLocalesFile(_0x24d215){const _0x1c1673=a150_0x418f,_0x1ebd6e=_0x24d215[_0x1c1673(0x17a)](_0x543cf3=>{const _0x4245e8=_0x1c1673;let _0x2516be='';switch(_0x543cf3){case _0x4245e8(0x17c):_0x2516be=_0x4245e8(0x17e);break;case'en-US':_0x2516be=_0x4245e8(0x182);break;case _0x4245e8(0x177):_0x2516be='これは基本ページテンプレートです。あなたは、これに基づいて開発できます。';break;case _0x4245e8(0x178):_0x2516be=_0x4245e8(0x17f);break;case _0x4245e8(0x18a):_0x2516be=_0x4245e8(0x173);break;default:_0x2516be=_0x4245e8(0x182);}return'\x20\x20'+JSON[_0x4245e8(0x187)](_0x543cf3)+':\x20{\x0a\x20\x20\x20\x20'+JSON[_0x4245e8(0x187)](_0x4245e8(0x17d))+':\x20'+JSON[_0x4245e8(0x187)](_0x2516be)+_0x4245e8(0x175);})[_0x1c1673(0x179)](',\x0a');return'export\x20const\x20locales\x20=\x20{\x0a'+_0x1ebd6e+_0x1c1673(0x17b);}export function buildInitialFiles(_0x323f86,_0x48666e){return{'src/app/index.jsx':buildIndexFile(_0x323f86),'src/app/index.css':buildStyleFile(),'src/locales/index.js':buildLocalesFile(_0x48666e)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a151_0x221a(){const _0x3f0f6d=['page.custom-update','appCode','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','custom-update','7747691wCJGVp','27040xwGBwk','pageContent','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','string','3101298FlLPVc','/smartapi/webcode/page/update/content','Complete\x20page\x20files\x20as\x20JSON','write','validation','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','20beCLpV','Custom\x20Page\x20ID','isInteger','15ZPLIGP','appcode','pageId','8JVffuz','6191658Xgaixm','number','newVersion','POST','apiError','555558cxyfVP','str','page-content','28232340sTgeBT','33526WqYkiw','trim'];a151_0x221a=function(){return _0x3f0f6d;};return a151_0x221a();}const a151_0x3417f2=a151_0x5199;function a151_0x5199(_0x5d492e,_0x1c742f){_0x5d492e=_0x5d492e-0x18f;const _0x221a15=a151_0x221a();let _0x519987=_0x221a15[_0x5d492e];return _0x519987;}(function(_0x48d526,_0x510370){const _0x53a058=a151_0x5199,_0x486e47=_0x48d526();while(!![]){try{const _0x56ebca=parseInt(_0x53a058(0x1ab))/0x1*(parseInt(_0x53a058(0x19a))/0x2)+parseInt(_0x53a058(0x1a5))/0x3+parseInt(_0x53a058(0x1a1))/0x4+-parseInt(_0x53a058(0x1ae))/0x5*(-parseInt(_0x53a058(0x196))/0x6)+-parseInt(_0x53a058(0x1a0))/0x7*(-parseInt(_0x53a058(0x190))/0x8)+parseInt(_0x53a058(0x191))/0x9+-parseInt(_0x53a058(0x199))/0xa;if(_0x56ebca===_0x510370)break;else _0x486e47['push'](_0x486e47['shift']());}catch(_0x2fb52a){_0x486e47['push'](_0x486e47['shift']());}}}(a151_0x221a,0x989d2));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':'page','command':a151_0x3417f2(0x19f),'description':'Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','risk':a151_0x3417f2(0x1a8),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a151_0x3417f2(0x192),'required':!![],'description':a151_0x3417f2(0x1ac)},{'name':a151_0x3417f2(0x198),'type':a151_0x3417f2(0x1a4),'required':!![],'description':a151_0x3417f2(0x1a7)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x23fbb4){const _0x225c11=a151_0x3417f2;readCustomPageId(_0x23fbb4),await validateCustomPageContent(parseCustomPageContent(_0x23fbb4[_0x225c11(0x197)](_0x225c11(0x198))));},async 'dryRun'(_0x2ca4b0){const _0x41315a=a151_0x3417f2,_0x551c27=await readInput(_0x2ca4b0);return{'method':_0x41315a(0x194),'url':_0x41315a(0x1a6),'body':{'id':_0x551c27['pageId'],'codeContent':_0x551c27['pageContent']},'description':_0x41315a(0x19e)+_0x551c27['pageId']+'.'};},async 'execute'(_0x128e90){const _0x6285e6=a151_0x3417f2,_0x4579a5=await readInput(_0x128e90),_0x3170ba=await updateCustomPageContent({'pageId':_0x4579a5[_0x6285e6(0x18f)],'pageContent':_0x4579a5[_0x6285e6(0x1a2)]});if(!Number[_0x6285e6(0x1ad)](_0x3170ba[_0x6285e6(0x193)])||_0x3170ba['newVersion']<=0x0)throw CliErrors[_0x6285e6(0x195)]('Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0x22307a=buildCustomPageEditUrl(_0x4579a5[_0x6285e6(0x19d)],_0x4579a5[_0x6285e6(0x18f)]),_0x2a0f3c=await resolveCustomPageDevelopmentUrl(_0x4579a5['appCode'],_0x4579a5[_0x6285e6(0x18f)],_0x128e90['cookie']);return{'ok':!![],'data':buildMutationData(_0x4579a5,_0x3170ba,_0x2a0f3c,_0x22307a,_0x2a0f3c?[]:[_0x6285e6(0x1a3)]),'message':'Updated\x20Custom\x20Page\x20'+_0x4579a5[_0x6285e6(0x18f)]+'.'};}};async function readInput(_0x18b213){const _0x397624=a151_0x3417f2,_0x1235ef=readCustomPageId(_0x18b213),_0x29215b=_0x18b213[_0x397624(0x197)](_0x397624(0x1af))[_0x397624(0x19b)]()||(await getCustomPageSource(_0x1235ef))[_0x397624(0x19d)]?.[_0x397624(0x19b)]();if(!_0x29215b)throw CliErrors[_0x397624(0x1a9)](_0x397624(0x1aa)+_0x1235ef+'.');return{'appCode':_0x29215b,'pageId':_0x1235ef,'pageContent':parseCustomPageContent(_0x18b213[_0x397624(0x197)]('page-content'))};}function buildMutationData(_0x14e6a0,_0x491f6b,_0x75337c,_0x5de2fb,_0x1bbbcf=[]){const _0x554929=a151_0x3417f2;return{'operation':_0x554929(0x19c),'selector':{'appCode':_0x14e6a0[_0x554929(0x19d)],'pageId':_0x14e6a0[_0x554929(0x18f)]},'before':null,'after':{'pageId':_0x491f6b?.[_0x554929(0x18f)]??_0x14e6a0[_0x554929(0x18f)],'version':_0x491f6b?.['newVersion']??null,'pageContent':_0x14e6a0[_0x554929(0x1a2)]},'dryRun':_0x491f6b===undefined,'request':_0x14e6a0,..._0x75337c?{'pageUrl':_0x75337c}:{},..._0x5de2fb?{'editPageUrl':_0x5de2fb}:{},'warnings':_0x1bbbcf};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a152_0x2820(){const _0x1ea43f=['8048028byRLfq','39894kJWhMV','/smartapi/lovrabet/dataset/','451720clODeG','source','/standard-page-status?appCode=','manualResolutionRequired','4ZlElJL','status','9deVneo','relatedPages','alias','string','appCode','code','319503AbCIFD','892275yMfKpO','2192729fyqHEh','GET','data-list-status','page','nextAction','compress','length','10zXBlEf','497LdGDkD','query-data-list-status','4BsOFxs','473636ClhoCE','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','read'];a152_0x2820=function(){return _0x1ea43f;};return a152_0x2820();}const a152_0x596b3f=a152_0xe489;(function(_0xa2f01a,_0x47e6a1){const _0xb704c9=a152_0xe489,_0x2e0ae6=_0xa2f01a();while(!![]){try{const _0xef7160=-parseInt(_0xb704c9(0x12a))/0x1+-parseInt(_0xb704c9(0x129))/0x2*(-parseInt(_0xb704c9(0x11d))/0x3)+-parseInt(_0xb704c9(0x134))/0x4*(-parseInt(_0xb704c9(0x11e))/0x5)+-parseInt(_0xb704c9(0x12e))/0x6*(parseInt(_0xb704c9(0x127))/0x7)+-parseInt(_0xb704c9(0x130))/0x8*(parseInt(_0xb704c9(0x136))/0x9)+parseInt(_0xb704c9(0x126))/0xa*(parseInt(_0xb704c9(0x11f))/0xb)+parseInt(_0xb704c9(0x12d))/0xc;if(_0xef7160===_0x47e6a1)break;else _0x2e0ae6['push'](_0x2e0ae6['shift']());}catch(_0x5af427){_0x2e0ae6['push'](_0x2e0ae6['shift']());}}}(a152_0x2820,0x3f4d5));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a152_0xe489(_0x3f7d0b,_0x5c4859){_0x3f7d0b=_0x3f7d0b-0x11d;const _0x2820e5=a152_0x2820();let _0xe48999=_0x2820e5[_0x3f7d0b];return _0xe48999;}export const pageDataListStatus={'service':a152_0x596b3f(0x122),'command':a152_0x596b3f(0x121),'description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a152_0x596b3f(0x12c),'defaultOutputFormat':a152_0x596b3f(0x124),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a152_0x596b3f(0x138),'type':a152_0x596b3f(0x139),'description':a152_0x596b3f(0x12b)}],async 'validate'(_0x635053){validateDatasetSelector(_0x635053);},async 'dryRun'(_0x231fb8){const _0x3caf5a=a152_0x596b3f,_0x3d5255=await loadDatasetDetailForPage(_0x231fb8);return{'method':_0x3caf5a(0x120),'url':_0x3caf5a(0x12f)+_0x3d5255[_0x3caf5a(0x13b)]+_0x3caf5a(0x132)+encodeURIComponent(_0x231fb8[_0x3caf5a(0x13a)]),'description':serializeDryRunDescription({'dataset':{'id':_0x3d5255['id'],'code':_0x3d5255['code'],'name':_0x3d5255['name']},'action':_0x3caf5a(0x128)})};},async 'execute'(_0x7bb0a8){const _0x9e5396=a152_0x596b3f,_0x41f96e=await loadDatasetDetailForPage(_0x7bb0a8),_0x283dec=await loadDataListPageStatusForGenerate(_0x7bb0a8,_0x41f96e[_0x9e5396(0x13b)]),_0x255a03=getUndeletedRelatedPages(_0x41f96e),_0x463f7d=assessDataListPageState(_0x41f96e[_0x9e5396(0x13b)],_0x283dec,{'fallbackUndeletedPages':_0x255a03});return{'ok':!![],'data':{'datasetCode':_0x41f96e[_0x9e5396(0x13b)],'precheckSource':_0x283dec?.[_0x9e5396(0x131)]??'related-pages-fallback','status':_0x463f7d[_0x9e5396(0x135)],'manualResolutionRequired':_0x463f7d[_0x9e5396(0x133)],'nextAction':_0x463f7d[_0x9e5396(0x123)],'dataListPageStatus':_0x283dec,'relatedPages':{'total':_0x41f96e[_0x9e5396(0x137)]['length'],'undeletedCount':_0x255a03[_0x9e5396(0x125)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a153_0x11d1ec=a153_0x8a2d;function a153_0x8a2d(_0x5b968e,_0x16f9cd){_0x5b968e=_0x5b968e-0x1d7;const _0x58630f=a153_0x5863();let _0x8a2d88=_0x58630f[_0x5b968e];return _0x8a2d88;}(function(_0xa0e116,_0x692b6e){const _0xdba9df=a153_0x8a2d,_0x5006bd=_0xa0e116();while(!![]){try{const _0x154b42=-parseInt(_0xdba9df(0x1dc))/0x1*(-parseInt(_0xdba9df(0x1ec))/0x2)+parseInt(_0xdba9df(0x1ff))/0x3+-parseInt(_0xdba9df(0x1e0))/0x4*(-parseInt(_0xdba9df(0x1f6))/0x5)+-parseInt(_0xdba9df(0x1e3))/0x6+-parseInt(_0xdba9df(0x1e1))/0x7*(parseInt(_0xdba9df(0x1ef))/0x8)+-parseInt(_0xdba9df(0x1f8))/0x9*(-parseInt(_0xdba9df(0x1f1))/0xa)+parseInt(_0xdba9df(0x205))/0xb*(-parseInt(_0xdba9df(0x1fc))/0xc);if(_0x154b42===_0x692b6e)break;else _0x5006bd['push'](_0x5006bd['shift']());}catch(_0x5a7abf){_0x5006bd['push'](_0x5006bd['shift']());}}}(a153_0x5863,0x2b0a0));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_0x5863(){const _0x1d7900=['1655960UpMtuF','write','message','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','bool','713170RkSAPV','operationId','9QSbIyl','manualResolutionRequired','generate-start','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','3744QEOLAO','appCode','precheck','136641EymOou','taskId','CRUD_PAGE_SET','DATA_LIST','dryRun','page','11506tfBJXV','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','nextAction','dataset','related-pages-fallback','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','alias','clientOperationId','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','allowGenerate','progressRate','1mNmvUk','复用已有生成任务','boolean','string','4wsUqpm','166957SFwLmQ','reused','909144VJdmzn','status','fieldCount','source','dataListPageStatus','apply','已提交生成任务','page-pattern','code','648476rcPsbO','compress','/generate-standard-pages/start','8HdaIit','PARTIAL_SUCCESS'];a153_0x5863=function(){return _0x1d7900;};return a153_0x5863();}export const pageGenerateStart={'service':a153_0x11d1ec(0x204),'command':a153_0x11d1ec(0x1fa),'description':'Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':a153_0x11d1ec(0x1f2),'defaultOutputFormat':a153_0x11d1ec(0x1ed),'rejectedFlags':[{'name':'page-type','message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':a153_0x11d1ec(0x1ea),'message':a153_0x11d1ec(0x1f4),'hint':a153_0x11d1ec(0x206)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a153_0x11d1ec(0x1d7),'type':a153_0x11d1ec(0x1df),'description':a153_0x11d1ec(0x1d9)},{'name':a153_0x11d1ec(0x1e8),'type':a153_0x11d1ec(0x1de),'description':a153_0x11d1ec(0x20a)}],async 'validate'(_0xaa2f00){validateDatasetSelector(_0xaa2f00);},async 'dryRun'(_0x295c98){const _0x35918d=a153_0x11d1ec,_0x3b3cb5=await prepare(_0x295c98);return{'method':'POST','url':'/smartapi/lovrabet/dataset/'+_0x3b3cb5[_0x35918d(0x208)][_0x35918d(0x1eb)]+_0x35918d(0x1ee),'body':{'appCode':_0x295c98[_0x35918d(0x1fd)],'clientOperationId':_0x3b3cb5[_0x35918d(0x1d8)]},'description':serializeDryRunDescription({'dataset':{'id':_0x3b3cb5[_0x35918d(0x208)]['id'],'code':_0x3b3cb5[_0x35918d(0x208)][_0x35918d(0x1eb)],'name':_0x3b3cb5['dataset']['name'],'fieldCount':_0x3b3cb5['dataset'][_0x35918d(0x1e5)]},'precheckSource':_0x3b3cb5[_0x35918d(0x1e7)]?.['source']??_0x35918d(0x209),'action':_0x35918d(0x1fa),'clientOperationId':_0x3b3cb5[_0x35918d(0x1d8)],'plannedStatus':_0x3b3cb5[_0x35918d(0x1fe)]['status'],'reason':_0x3b3cb5[_0x35918d(0x1fe)][_0x35918d(0x1f3)]})};},async 'execute'(_0x23a334){const _0x135da8=a153_0x11d1ec;if(!_0x23a334[_0x135da8(0x1f5)](_0x135da8(0x1e8))){const _0x539b48=await pageGenerateStart[_0x135da8(0x203)](_0x23a334);return{'ok':!![],'message':_0x135da8(0x1fb),'data':_0x539b48};}const _0x40b89a=await prepare(_0x23a334);if(!_0x40b89a[_0x135da8(0x1fe)][_0x135da8(0x1da)])return{'ok':![],'message':_0x40b89a['precheck']['message'],'data':{'datasetCode':_0x40b89a[_0x135da8(0x208)]['code'],'pageType':_0x135da8(0x202),'pagePattern':_0x135da8(0x201),'clientOperationId':_0x40b89a[_0x135da8(0x1d8)],'precheckSource':_0x40b89a[_0x135da8(0x1e7)]?.[_0x135da8(0x1e6)]??_0x135da8(0x209),'status':_0x40b89a[_0x135da8(0x1fe)][_0x135da8(0x1e4)],'manualResolutionRequired':_0x40b89a[_0x135da8(0x1fe)]['manualResolutionRequired'],'nextAction':_0x40b89a[_0x135da8(0x1fe)]['nextAction'],'query':{'command':buildDataListPageStatusQueryCommand(_0x40b89a['dataset'][_0x135da8(0x1eb)],_0x23a334['appCode'])},'dataListPageStatus':_0x40b89a[_0x135da8(0x1e7)]}};const _0x36debe=await startGenerateDataListPages(_0x23a334['appCode'],_0x40b89a[_0x135da8(0x208)][_0x135da8(0x1eb)],{'clientOperationId':_0x40b89a['clientOperationId']}),_0x17eac6=_0x36debe[_0x135da8(0x1e4)]==='SUCCESS'||_0x36debe['status']===_0x135da8(0x1f0)?await loadDataListPageStatusForGenerate(_0x23a334,_0x40b89a[_0x135da8(0x208)][_0x135da8(0x1eb)]):null,_0x288729=assessGenerateOperationState(_0x40b89a['dataset']['code'],_0x36debe[_0x135da8(0x1e4)],_0x17eac6);return{'ok':!![],'message':_0x36debe[_0x135da8(0x1e2)]?_0x135da8(0x1dd):_0x135da8(0x1e9),'data':{'datasetCode':_0x40b89a[_0x135da8(0x208)][_0x135da8(0x1eb)],'appCode':_0x23a334[_0x135da8(0x1fd)],'pageType':_0x135da8(0x202),'pagePattern':_0x135da8(0x201),'taskId':_0x36debe[_0x135da8(0x200)]??null,'operationId':_0x36debe[_0x135da8(0x1f7)]??null,'clientOperationId':_0x40b89a[_0x135da8(0x1d8)],'jobStatus':_0x36debe[_0x135da8(0x1e4)]??null,'progressRate':typeof _0x36debe['progressRate']==='number'?_0x36debe[_0x135da8(0x1db)]:null,'currentStep':_0x36debe['currentStep']??null,'reused':_0x36debe[_0x135da8(0x1e2)]===!![],'status':_0x288729[_0x135da8(0x1e4)],'manualResolutionRequired':_0x288729[_0x135da8(0x1f9)],'nextAction':_0x288729[_0x135da8(0x207)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x40b89a[_0x135da8(0x208)]['code'],{'appCode':_0x23a334[_0x135da8(0x1fd)],'taskId':_0x36debe[_0x135da8(0x200)],'operationId':_0x36debe[_0x135da8(0x1f7)],'clientOperationId':_0x40b89a[_0x135da8(0x1d8)]})},'dataListPageStatus':_0x17eac6}};}};async function prepare(_0x37774e){const _0xaf9596=a153_0x11d1ec,_0x43f8cc=await loadDatasetDetailForPage(_0x37774e),_0x2698e4=await loadDataListPageStatusForGenerate(_0x37774e,_0x43f8cc['code']),_0x4bad28=getUndeletedRelatedPages(_0x43f8cc);return{'dataset':_0x43f8cc,'dataListPageStatus':_0x2698e4,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x43f8cc[_0xaf9596(0x1eb)],_0x2698e4,{'fallbackUndeletedPages':_0x4bad28})};}
|