@lovrabet/rabetbase-cli 2.5.2-beta.7 → 2.5.3-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.d.ts +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +2 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.d.ts +23 -0
- package/lib/config/region-config.js +1 -0
- package/lib/config/schema.d.ts +15 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +6 -0
- 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.d.ts +13 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -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/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.d.ts +6 -0
- package/lib/core/page/lr-smart-jsx.js +1 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +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.d.ts +2 -8
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.d.ts +2 -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 +6 -5
- package/skills/rabetbase/guides/page-development-workflow.md +3 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +5 -5
- package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
- package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
- package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-pull.md +2 -0
- package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +10 -9
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
- package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/generate-api/client.ts.tpl +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a155_0x36b166=a155_0x49f7;function a155_0x7311(){const _0x4dfbbe=['Inspect\x20ID\x20','update','447426gQZTlk','1830356WfTQsb','32rXfngv','5hlNuUg','config-update','1208604oOyKnY','verified','\x20with\x20','notification_config_update_outcome_unknown',';\x20do\x20not\x20resubmit\x20automatically.','before','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','2526582gyEOmE','channelType','patch','187958dJRDkc','appCode','5DZzgtL','Inspect\x20with\x20--id\x20','mutation','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','verifiedFields','planned','allMatch','\x20via\x20','high-risk-write','notification_config_update_verification_unavailable','41228sfVPgN','POST','1435791oTOsYC','330IXEWQj'];a155_0x7311=function(){return _0x4dfbbe;};return a155_0x7311();}(function(_0x516cbe,_0x436301){const _0x31869f=a155_0x49f7,_0x264b00=_0x516cbe();while(!![]){try{const _0x438cda=parseInt(_0x31869f(0xf6))/0x1*(-parseInt(_0x31869f(0xf4))/0x2)+-parseInt(_0x31869f(0xea))/0x3+parseInt(_0x31869f(0x107))/0x4+-parseInt(_0x31869f(0xe8))/0x5*(-parseInt(_0x31869f(0xf1))/0x6)+parseInt(_0x31869f(0x102))/0x7+parseInt(_0x31869f(0xe7))/0x8*(parseInt(_0x31869f(0x106))/0x9)+parseInt(_0x31869f(0x103))/0xa*(-parseInt(_0x31869f(0x100))/0xb);if(_0x438cda===_0x436301)break;else _0x264b00['push'](_0x264b00['shift']());}catch(_0x1d645e){_0x264b00['push'](_0x264b00['shift']());}}}(a155_0x7311,0x45e00));import{asDryRunResult}from'../../commands/common/dry-run.js';function a155_0x49f7(_0x8f5c68,_0x555b41){_0x8f5c68=_0x8f5c68-0xe7;const _0x731131=a155_0x7311();let _0x49f721=_0x731131[_0x8f5c68];return _0x49f721;}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH='/notification/channel-config/update';async function prepareUpdate(_0x511e57){const _0x48f06f=a155_0x49f7,_0x46fd22=readNotificationId(_0x511e57),_0x2f93b4=await readNotificationDocument(_0x511e57,_0x48f06f(0x105)),_0xde2398=await requireExactNotificationConfig(_0x511e57['appCode'],_0x46fd22,_0x48f06f(0x105));return{'id':_0x46fd22,'patch':_0x2f93b4,'before':_0xde2398,'payload':mergeUpdateInput(_0xde2398,_0x2f93b4),'planned':plannedUpdateProjection(_0xde2398,_0x2f93b4)};}export const notificationConfigUpdate={'service':'notification','command':a155_0x36b166(0xe9),'description':a155_0x36b166(0xf0),'risk':a155_0x36b166(0xfe),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2bd65e){readNotificationId(_0x2bd65e),assertSingleNotificationSource(_0x2bd65e),requireNotificationExplicitYes(_0x2bd65e);},async 'dryRun'(_0xf07a01){const _0xf0421=a155_0x36b166,_0x481331=await prepareUpdate(_0xf07a01),_0x1dd3fa=notificationLookupCommand(_0xf07a01[_0xf0421(0xf5)],_0x481331['before'][_0xf0421(0xf2)]);return asDryRunResult({'operation':_0xf0421(0x105),'selector':notificationSelector(_0x481331[_0xf0421(0xef)]),'before':projectNotificationConfig(_0x481331[_0xf0421(0xef)]),'after':_0x481331[_0xf0421(0xfb)],'dryRun':!![],'backend':{'method':_0xf0421(0x101),'path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x1dd3fa}},{'method':_0xf0421(0x101),'url':UPDATE_PATH});},async 'execute'(_0x30a288){const _0x4b3a07=a155_0x36b166;requireNotificationExplicitYes(_0x30a288);const _0xf4a094=await prepareUpdate(_0x30a288),_0x138413=notificationLookupCommand(_0x30a288[_0x4b3a07(0xf5)],_0xf4a094['before'][_0x4b3a07(0xf2)]);let _0x3adc65=![];try{await updateNotificationChannelConfig(_0xf4a094['payload']);}catch(_0x11e64c){if(!isPlatformTransportFailure(_0x11e64c))throw safeApiFailure('update',_0x4b3a07(0xf8),_0x4b3a07(0x104)+_0xf4a094['id']+_0x4b3a07(0xec)+_0x138413+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x3adc65=!![];}let _0xc6b917;try{const _0x383c6b=await getNotificationChannelConfig(_0xf4a094['id'],_0x30a288['appCode']);_0xc6b917=normalizeExactNotificationConfig(_0x383c6b,_0xf4a094['id'],_0x30a288['appCode']);}catch{throw notificationError(_0x3adc65?'notification_config_update_outcome_unknown':_0x4b3a07(0xff),'Notification\x20config\x20'+_0xf4a094['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x4b3a07(0xf7)+_0xf4a094['id']+_0x4b3a07(0xfd)+_0x138413+';\x20do\x20not\x20resubmit\x20automatically.');}const _0x116848=requestedSafeFieldsMatch(_0xf4a094[_0x4b3a07(0xef)],_0xc6b917,_0xf4a094[_0x4b3a07(0xf3)]);if(!_0x116848[_0x4b3a07(0xfc)]||_0x3adc65&&!_0x116848['provesChange'])throw notificationError(_0x3adc65?_0x4b3a07(0xed):'notification_config_update_verification_failed','Notification\x20config\x20'+_0xf4a094['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x4b3a07(0xf7)+_0xf4a094['id']+_0x4b3a07(0xfd)+_0x138413+_0x4b3a07(0xee));const _0x4e73c0=_0x3adc65?[_0x4b3a07(0xf9)]:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0xc6b917),'before':projectNotificationConfig(_0xf4a094[_0x4b3a07(0xef)]),'after':projectNotificationConfig(_0xc6b917),'dryRun':![],'backend':{'method':_0x4b3a07(0x101),'path':UPDATE_PATH},'warnings':_0x4e73c0,'verification':{'status':_0x4b3a07(0xeb),'recoveredAfterUnknownResponse':_0x3adc65,'verifiedFields':_0x116848[_0x4b3a07(0xfa)],'lookupCommand':_0x138413}},'message':'Updated\x20notification\x20config\x20'+_0xc6b917['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a2228,_0x4f5da0){const _0x4ad5f2=a156_0x3c92,_0x2fd9f2=_0x4a2228();while(!![]){try{const _0x453ae9=parseInt(_0x4ad5f2(0x136))/0x1*(-parseInt(_0x4ad5f2(0x135))/0x2)+parseInt(_0x4ad5f2(0x12e))/0x3*(-parseInt(_0x4ad5f2(0x12d))/0x4)+parseInt(_0x4ad5f2(0x132))/0x5+parseInt(_0x4ad5f2(0x12c))/0x6*(parseInt(_0x4ad5f2(0x131))/0x7)+parseInt(_0x4ad5f2(0x133))/0x8+parseInt(_0x4ad5f2(0x130))/0x9*(-parseInt(_0x4ad5f2(0x134))/0xa)+-parseInt(_0x4ad5f2(0x12f))/0xb;if(_0x453ae9===_0x4f5da0)break;else _0x2fd9f2['push'](_0x2fd9f2['shift']());}catch(_0x3924ee){_0x2fd9f2['push'](_0x2fd9f2['shift']());}}}(a156_0x165c,0x739c3));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a156_0x165c(){const _0x3257dc=['109710AwWIYP','3343632HZkENn','16370jumsXV','1646qohOaF','94dGieqU','6RrLHso','576412OFINus','6eZuvwN','2837879HPTzCZ','873KCpvRc','5711923AMmVko'];a156_0x165c=function(){return _0x3257dc;};return a156_0x165c();}function a156_0x3c92(_0xb0b440,_0x483dd2){_0xb0b440=_0xb0b440-0x12c;const _0x165c9a=a156_0x165c();let _0x3c923a=_0x165c9a[_0xb0b440];return _0x3c923a;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a157_0x37a4f8=a157_0xd6b1;(function(_0xa425d7,_0x48ef0c){const _0x528709=a157_0xd6b1,_0x2c5188=_0xa425d7();while(!![]){try{const _0x4514e0=parseInt(_0x528709(0xb4))/0x1*(-parseInt(_0x528709(0x12b))/0x2)+-parseInt(_0x528709(0xec))/0x3*(parseInt(_0x528709(0x11e))/0x4)+parseInt(_0x528709(0xf9))/0x5+parseInt(_0x528709(0xe1))/0x6+parseInt(_0x528709(0xd8))/0x7+-parseInt(_0x528709(0xc0))/0x8+parseInt(_0x528709(0xdb))/0x9;if(_0x4514e0===_0x48ef0c)break;else _0x2c5188['push'](_0x2c5188['shift']());}catch(_0x106a5f){_0x2c5188['push'](_0x2c5188['shift']());}}}(a157_0x542b,0xca40f));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a157_0x37a4f8(0x129),a157_0x37a4f8(0xda),'DINGTALK',a157_0x37a4f8(0xf1),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType','endpointUrl',a157_0x37a4f8(0xd5),a157_0x37a4f8(0x10d),'connectTimeout',a157_0x37a4f8(0x109)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a157_0x37a4f8(0xbc),'configCode',a157_0x37a4f8(0x114)]),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x37a4f8(0xf4),a157_0x37a4f8(0xb9),a157_0x37a4f8(0xcd),'bccList',a157_0x37a4f8(0xc1),a157_0x37a4f8(0x103),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a157_0x37a4f8(0xe2),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a157_0x37a4f8(0x122),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a157_0x37a4f8(0xb1),'type':a157_0x37a4f8(0xe2),'required':![],'description':a157_0x37a4f8(0xc9)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x37a4f8(0xf6),'required':!![],'description':a157_0x37a4f8(0x11d)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5b422,_0x4d4f3e,_0x5cd0d8){return new CliError(_0x5b422,0x1,_0x4d4f3e,_0x5cd0d8);}export function readNotificationId(_0x320749){const _0x59a197=a157_0x37a4f8,_0x111b58=_0x320749[_0x59a197(0x134)]('id');if(!Number['isSafeInteger'](_0x111b58)||_0x111b58<=0x0)throw notificationError(_0x59a197(0xc3),_0x59a197(0x10e));return _0x111b58;}export function requireNotificationExplicitYes(_0x52b00f){const _0x1ea112=a157_0x37a4f8;if(_0x52b00f[_0x1ea112(0xe9)]('dry-run')||_0x52b00f[_0x1ea112(0xe9)](_0x1ea112(0x104)))return;throw notificationError(_0x1ea112(0xcc),_0x1ea112(0xb8),_0x1ea112(0x112));}export function readNotificationChannelType(_0xeb3f6c,_0x1213b2=a157_0x37a4f8(0x117),_0x42c3ba='EMAIL'){const _0xb4d90e=a157_0x37a4f8,_0x17a387=_0xeb3f6c[_0xb4d90e(0xbd)](_0x1213b2)['trim']()||_0x42c3ba;if(!NOTIFICATION_CHANNEL_TYPES[_0xb4d90e(0x102)](_0x17a387))throw CliErrors[_0xb4d90e(0xc5)](_0xb4d90e(0x116)+_0x1213b2+':\x20'+_0x17a387,_0xb4d90e(0x128)+NOTIFICATION_CHANNEL_TYPES[_0xb4d90e(0xcf)](',\x20')+'.');return _0x17a387;}function a157_0x542b(){const _0x19a60c=['setEncoding','file','_unavailable','object','a\x20non-empty\x20string','<redacted>','every','Notification\x20JSON\x20field\x20\x22','num','from-env','Notification\x20config\x20list\x20item\x20','some','2113vgwjeh','notification_config_field_invalid','\x20has\x20an\x20unsupported\x20channelType.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','recipients','notification_config_json_invalid','messageTemplate','appCode','str','length','preflight','7844760GoGyrl','replyTo','notification_config_field_unknown','notification_config_id_invalid','push','validation','\x20characters.','channelType','Missing\x20notification\x20JSON\x20source.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','\x20has\x20an\x20invalid\x20id.','notification_config_update_empty','notification_config_confirmation_required','ccList','\x20--format\x20compress','join','keys','Notification\x20JSON\x20source\x20is\x20ambiguous.','update','Notification\x20JSON\x20channelConfig\x20field\x20\x22','channelConfigRaw','channelConfig','\x22\x20cannot\x20exceed\x20','a\x20supported\x20string','1910076OpsYoG','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','FEISHU','5325849gOypRV','stringify','file\x20','entries','\x20must\x20be\x20an\x20object.','a\x20JSON\x20object','9671184QboKxO','string','connectTimeout','isSafeInteger','configCode','isArray','parse','\x20has\x20invalid\x20field\x20\x22','bool','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','\x20--type\x20','176811InMCuN','Invalid\x20notification\x20config\x20response.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','endpointUrl','a\x20string\x20or\x20null','WECOM','\x22channelType\x22.','\x22\x20is\x20forbidden.','emailTargets','notification_config_response_invalid','number','path','Notification\x20JSON\x20from\x20','2130795MajjiV','hasOwnProperty','kind','endpointUrl:null','configName','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x22configName\x22.','env','notification_config_field_required','includes','subjectPrefix','yes','notification_config_source_unavailable','a\x20JSON\x20object\x20or\x20null','utf8','prototype','readTimeout','updateTime','Unknown\x20notification\x20JSON\x20field\x20\x22','\x20is\x20missing\x20required\x20field\x20\x22','description','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','endpointUrlRaw','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','name','channelCode','mutation','Invalid\x20--','type','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','has','create','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Application-level\x20notification\x20config\x20ID','16YbIXpi','trim','apiError','createTime','stdin','notification_config_field_forbidden','Create\x20JSON\x20requires\x20field\x20','\x20failed.','\x20has\x20an\x20invalid\x20channelType.','Notification\x20config\x20','Allowed\x20values:\x20','EMAIL','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','812mXXzGG'];a157_0x542b=function(){return _0x19a60c;};return a157_0x542b();}export function assertSingleNotificationSource(_0x544194){const _0x121bb8=a157_0x37a4f8,_0x445b94=[],_0x5a52e4=_0x544194[_0x121bb8(0xbd)](_0x121bb8(0x12d))[_0x121bb8(0x11f)]();if(_0x5a52e4)_0x445b94[_0x121bb8(0xc4)]({'kind':'file','path':_0x5a52e4});if(_0x544194[_0x121bb8(0xe9)]('stdin'))_0x445b94[_0x121bb8(0xc4)]({'kind':_0x121bb8(0x122)});const _0x4f8691=_0x544194['str'](_0x121bb8(0xb1))['trim']();if(_0x4f8691)_0x445b94[_0x121bb8(0xc4)]({'kind':_0x121bb8(0x100),'name':_0x4f8691});if(_0x445b94[_0x121bb8(0xbe)]===0x0)throw CliErrors[_0x121bb8(0xc5)](_0x121bb8(0xc8),_0x121bb8(0x11c));if(_0x445b94[_0x121bb8(0xbe)]>0x1)throw CliErrors[_0x121bb8(0xc5)](_0x121bb8(0xd1),_0x121bb8(0x11c));return _0x445b94[0x0];}export async function readNotificationDocument(_0x54e135,_0x5e00cc){const _0x2eb17f=a157_0x37a4f8,_0x5e1b17=assertSingleNotificationSource(_0x54e135),_0xe56845=_0x5e1b17['kind']===_0x2eb17f(0x12d)?_0x2eb17f(0xdd)+_0x5e1b17[_0x2eb17f(0xf7)]:_0x5e1b17[_0x2eb17f(0xfb)]===_0x2eb17f(0x100)?'environment\x20variable\x20'+_0x5e1b17[_0x2eb17f(0x113)]:_0x2eb17f(0x122);let _0x4b0c2f;try{if(_0x5e1b17[_0x2eb17f(0xfb)]==='file')_0x4b0c2f=await readFile(_0x5e1b17[_0x2eb17f(0xf7)],'utf8');else{if(_0x5e1b17['kind']===_0x2eb17f(0x100)){if(!(_0x5e1b17[_0x2eb17f(0x113)]in process.env))throw notificationError(_0x2eb17f(0x105),_0x2eb17f(0xea)+_0x5e1b17['name']);_0x4b0c2f=process.env[_0x5e1b17.name]??'';}else _0x4b0c2f=await readStdin();}}catch(_0x56f569){if(_0x56f569 instanceof CliError)throw _0x56f569;throw notificationError(_0x2eb17f(0x105),_0x2eb17f(0xfe)+_0xe56845+'.');}let _0x548dc7;try{_0x548dc7=JSON[_0x2eb17f(0xe7)](_0x4b0c2f);}catch{throw notificationError(_0x2eb17f(0xba),_0x2eb17f(0xf8)+_0xe56845+'\x20is\x20invalid.',_0x2eb17f(0x110));}if(!isJsonObject(_0x548dc7))throw notificationError(_0x2eb17f(0xba),_0x2eb17f(0xf8)+_0xe56845+_0x2eb17f(0xdf));return validateNotificationDocument(_0x548dc7,_0x5e00cc);}export function projectNotificationListConfig(_0x16aa57,_0x56772f){const _0x260df3=a157_0x37a4f8;return{'id':typeof _0x16aa57['id']===_0x260df3(0xf6)?_0x16aa57['id']:null,'configCode':requireResponseString(_0x16aa57[_0x260df3(0xe5)],_0x260df3(0xe5),_0x56772f),'configName':requireResponseString(_0x16aa57[_0x260df3(0xfd)],'configName',_0x56772f),'channelType':requireResponseString(_0x16aa57[_0x260df3(0xc7)],_0x260df3(0xc7),_0x56772f),'description':normalizeNullableString(_0x16aa57['description']),'createTime':normalizeNullableString(_0x16aa57[_0x260df3(0x121)]),'updateTime':normalizeNullableString(_0x16aa57[_0x260df3(0x10a)])};}export function normalizeExactNotificationConfig(_0x46d097,_0x34f7d3,_0x47003c){const _0x45a7ef=a157_0x37a4f8;if(!Number[_0x45a7ef(0xe4)](_0x46d097['id'])||_0x46d097['id']!==_0x34f7d3)throw notificationError(_0x45a7ef(0xf5),_0x45a7ef(0xb7)+_0x34f7d3+'.');if(_0x46d097['appCode']!==_0x47003c)throw notificationError(_0x45a7ef(0xf5),_0x45a7ef(0x127)+_0x34f7d3+_0x45a7ef(0x111));const _0x2c329d=requireExactString(_0x46d097['configName'],'configName',_0x34f7d3),_0x1362fe=requireExactString(_0x46d097[_0x45a7ef(0xe5)],_0x45a7ef(0xe5),_0x34f7d3),_0x5c1520=requireExactString(_0x46d097[_0x45a7ef(0xc7)],_0x45a7ef(0xc7),_0x34f7d3);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5c1520))throw notificationError(_0x45a7ef(0xf5),_0x45a7ef(0x127)+_0x34f7d3+_0x45a7ef(0xb6));const _0x587b82=responseNullableString(_0x46d097[_0x45a7ef(0xef)],_0x45a7ef(0xef),_0x34f7d3),_0x5a8ec8=responseNullableString(_0x46d097[_0x45a7ef(0xd5)],_0x45a7ef(0xd5),_0x34f7d3),_0x4c2acb=responseNullableString(_0x46d097[_0x45a7ef(0x10d)],_0x45a7ef(0x10d),_0x34f7d3),_0x4e8295=responseNullableTimeout(_0x46d097[_0x45a7ef(0xe3)],'connectTimeout',_0x34f7d3),_0x49e461=responseNullableTimeout(_0x46d097['readTimeout'],'readTimeout',_0x34f7d3);return{'id':_0x34f7d3,'appCode':_0x47003c,'configCode':_0x1362fe,'configName':_0x2c329d,'channelType':_0x5c1520,'endpointUrl':redactSensitive(_0x587b82),'channelConfig':redactSensitive(_0x5a8ec8),'description':_0x4c2acb,'connectTimeout':_0x4e8295,'readTimeout':_0x49e461,'endpointUrlRaw':_0x587b82,'channelConfigRaw':_0x5a8ec8};}export async function requireExactNotificationConfig(_0x4f249b,_0x2758d5,_0x5d9cfa){const _0x2d929e=a157_0x37a4f8;let _0x5cb28f;try{_0x5cb28f=await getNotificationChannelConfig(_0x2758d5,_0x4f249b);}catch{throw safeApiFailure(_0x5d9cfa,_0x2d929e(0xbf),_0x2d929e(0x118)+_0x4f249b+_0x2d929e(0x11b));}return normalizeExactNotificationConfig(_0x5cb28f,_0x2758d5,_0x4f249b);}export function projectNotificationConfig(_0x17b97c){const _0x50e6f9=a157_0x37a4f8;return{'id':_0x17b97c['id']??null,'appCode':_0x17b97c[_0x50e6f9(0xbc)],'configCode':_0x17b97c['configCode']??null,'configName':_0x17b97c['configName'],'channelType':_0x17b97c[_0x50e6f9(0xc7)],'endpointUrl':redactSensitive(_0x17b97c[_0x50e6f9(0xef)]),'channelConfig':redactSensitive(_0x17b97c['channelConfig']),'description':_0x17b97c[_0x50e6f9(0x10d)]??null,'connectTimeout':_0x17b97c[_0x50e6f9(0xe3)]??null,'readTimeout':_0x17b97c[_0x50e6f9(0x109)]??null};}export function notificationSelector(_0x30859b){const _0x39f4e5=a157_0x37a4f8;return{'appCode':_0x30859b[_0x39f4e5(0xbc)],'id':_0x30859b['id'],'configCode':_0x30859b[_0x39f4e5(0xe5)],'configName':_0x30859b[_0x39f4e5(0xfd)],'channelType':_0x30859b[_0x39f4e5(0xc7)]};}export function createMutationInput(_0x1854ca,_0x4794dd){const _0x10ccf0=a157_0x37a4f8;return{'appCode':_0x1854ca,'configName':_0x4794dd[_0x10ccf0(0xfd)],'channelType':_0x4794dd['channelType'],...hasOwn(_0x4794dd,_0x10ccf0(0xef))?{'endpointUrl':_0x4794dd[_0x10ccf0(0xef)]}:{},...hasOwn(_0x4794dd,_0x10ccf0(0xd5))?{'channelConfig':serializeChannelConfig(_0x4794dd[_0x10ccf0(0xd5)])}:{},...hasOwn(_0x4794dd,_0x10ccf0(0x10d))?{'description':_0x4794dd[_0x10ccf0(0x10d)]}:{},...hasOwn(_0x4794dd,_0x10ccf0(0xe3))?{'connectTimeout':_0x4794dd[_0x10ccf0(0xe3)]}:{},...hasOwn(_0x4794dd,'readTimeout')?{'readTimeout':_0x4794dd['readTimeout']}:{}};}export function mergeUpdateInput(_0x20a42f,_0x5ed855){const _0x5b9ac0=a157_0x37a4f8;return{'id':_0x20a42f['id'],'appCode':_0x20a42f[_0x5b9ac0(0xbc)],'configName':_0x5ed855[_0x5b9ac0(0xfd)]??_0x20a42f[_0x5b9ac0(0xfd)],'channelType':_0x5ed855[_0x5b9ac0(0xc7)]??_0x20a42f[_0x5b9ac0(0xc7)],'endpointUrl':hasOwn(_0x5ed855,_0x5b9ac0(0xef))?_0x5ed855['endpointUrl']:_0x20a42f['endpointUrlRaw'],'channelConfig':hasOwn(_0x5ed855,_0x5b9ac0(0xd5))?serializeChannelConfig(_0x5ed855[_0x5b9ac0(0xd5)]):_0x20a42f[_0x5b9ac0(0xd4)],'description':hasOwn(_0x5ed855,_0x5b9ac0(0x10d))?_0x5ed855[_0x5b9ac0(0x10d)]:_0x20a42f[_0x5b9ac0(0x10d)],'connectTimeout':hasOwn(_0x5ed855,'connectTimeout')?_0x5ed855[_0x5b9ac0(0xe3)]:_0x20a42f[_0x5b9ac0(0xe3)],'readTimeout':hasOwn(_0x5ed855,_0x5b9ac0(0x109))?_0x5ed855[_0x5b9ac0(0x109)]:_0x20a42f[_0x5b9ac0(0x109)]};}export function plannedUpdateProjection(_0x2d6464,_0x4ec200){const _0x1999e3=a157_0x37a4f8;return projectNotificationConfig({'id':_0x2d6464['id'],'appCode':_0x2d6464[_0x1999e3(0xbc)],'configCode':_0x2d6464[_0x1999e3(0xe5)],'configName':_0x4ec200[_0x1999e3(0xfd)]??_0x2d6464[_0x1999e3(0xfd)],'channelType':_0x4ec200[_0x1999e3(0xc7)]??_0x2d6464['channelType'],'endpointUrl':hasOwn(_0x4ec200,_0x1999e3(0xef))?_0x4ec200[_0x1999e3(0xef)]:_0x2d6464[_0x1999e3(0x10f)],'channelConfig':hasOwn(_0x4ec200,_0x1999e3(0xd5))?_0x4ec200['channelConfig']:_0x2d6464[_0x1999e3(0xd4)],'description':hasOwn(_0x4ec200,_0x1999e3(0x10d))?_0x4ec200[_0x1999e3(0x10d)]:_0x2d6464['description'],'connectTimeout':hasOwn(_0x4ec200,'connectTimeout')?_0x4ec200[_0x1999e3(0xe3)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2d6464[_0x1999e3(0xe3)],'readTimeout':hasOwn(_0x4ec200,_0x1999e3(0x109))?_0x4ec200[_0x1999e3(0x109)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2d6464['readTimeout']});}export function requestedSafeFieldsMatch(_0xaf5a4d,_0x203a6e,_0xd657bf){const _0x2e1575=a157_0x37a4f8,_0x29e9c9=[],_0x7f0c8d=[],_0x411c98=[];for(const _0x4f0fba of[_0x2e1575(0xfd),_0x2e1575(0xc7),'description']){if(!hasOwn(_0xd657bf,_0x4f0fba))continue;_0x411c98[_0x2e1575(0xc4)](_0x4f0fba),_0x29e9c9[_0x2e1575(0xc4)](_0x203a6e[_0x4f0fba]===_0xd657bf[_0x4f0fba]),_0x7f0c8d[_0x2e1575(0xc4)](_0xaf5a4d[_0x4f0fba]!==_0xd657bf[_0x4f0fba]&&_0x203a6e[_0x4f0fba]===_0xd657bf[_0x4f0fba]);}for(const _0x5ca010 of[_0x2e1575(0xe3),_0x2e1575(0x109)]){if(!hasOwn(_0xd657bf,_0x5ca010))continue;const _0x27e2d8=_0xd657bf[_0x5ca010]??(_0x5ca010===_0x2e1575(0xe3)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x411c98[_0x2e1575(0xc4)](_0x5ca010),_0x29e9c9[_0x2e1575(0xc4)](_0x203a6e[_0x5ca010]===_0x27e2d8),_0x7f0c8d[_0x2e1575(0xc4)](_0xaf5a4d[_0x5ca010]!==_0x27e2d8&&_0x203a6e[_0x5ca010]===_0x27e2d8);}return hasOwn(_0xd657bf,_0x2e1575(0xef))&&_0xd657bf['endpointUrl']===null&&(_0x411c98[_0x2e1575(0xc4)](_0x2e1575(0xfc)),_0x29e9c9[_0x2e1575(0xc4)](_0x203a6e[_0x2e1575(0x10f)]===null||_0x203a6e[_0x2e1575(0x10f)]===''),_0x7f0c8d[_0x2e1575(0xc4)](_0xaf5a4d[_0x2e1575(0x10f)]!==null&&_0xaf5a4d[_0x2e1575(0x10f)]!==''&&(_0x203a6e[_0x2e1575(0x10f)]===null||_0x203a6e[_0x2e1575(0x10f)]===''))),{'allMatch':_0x29e9c9[_0x2e1575(0x132)](Boolean),'provesChange':_0x7f0c8d[_0x2e1575(0xb3)](Boolean),'verifiedFields':_0x411c98};}export function validateNotificationDeleteReadback(_0x1ff2c9,_0x22db7a,_0xc3e318){const _0x456b1b=a157_0x37a4f8;for(const [_0x12d7e0,_0x158d48]of _0x1ff2c9[_0x456b1b(0xde)]()){if(!Number[_0x456b1b(0xe4)](_0x158d48['id'])||_0x158d48['id']<=0x0)throw notificationError(_0x456b1b(0xf5),_0x456b1b(0xb2)+(_0x12d7e0+0x1)+_0x456b1b(0xca));if(_0x158d48[_0x456b1b(0xbc)]!==_0x22db7a)throw notificationError(_0x456b1b(0xf5),_0x456b1b(0xb2)+(_0x12d7e0+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x158d48['channelType']!==_0xc3e318)throw notificationError(_0x456b1b(0xf5),_0x456b1b(0xb2)+(_0x12d7e0+0x1)+_0x456b1b(0x126));}}export function safeApiFailure(_0x2bf42e,_0x101322,_0x45629a){const _0x369184=a157_0x37a4f8;return notificationError('notification_config_'+_0x2bf42e+'_'+(_0x101322===_0x369184(0x115)?'failed':_0x101322+_0x369184(0x12e)),_0x369184(0x127)+_0x2bf42e+'\x20'+_0x101322+_0x369184(0x125),_0x45629a);}export function notificationLookupCommand(_0x318c4b,_0x3dda76){const _0x5d6435=a157_0x37a4f8;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x318c4b+_0x5d6435(0xeb)+_0x3dda76+_0x5d6435(0xce);}function validateNotificationDocument(_0x10aef2,_0x2a39c4){const _0x56934b=a157_0x37a4f8;for(const _0x7d91c6 of Object[_0x56934b(0xd0)](_0x10aef2)){if(FORBIDDEN_IDENTITY_FIELDS[_0x56934b(0x119)](_0x7d91c6))throw notificationError(_0x56934b(0x123),'Notification\x20JSON\x20field\x20\x22'+_0x7d91c6+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x56934b(0x119)](_0x7d91c6))throw notificationError(_0x56934b(0xc2),_0x56934b(0x10b)+_0x7d91c6+'\x22.');}if(_0x2a39c4==='update'&&Object[_0x56934b(0xd0)](_0x10aef2)[_0x56934b(0xbe)]===0x0)throw notificationError(_0x56934b(0xcb),_0x56934b(0x12a));const _0x32bef9={};if(hasOwn(_0x10aef2,_0x56934b(0xfd)))_0x32bef9['configName']=validateRequiredString(_0x10aef2[_0x56934b(0xfd)],_0x56934b(0xfd),0x80);else{if(_0x2a39c4===_0x56934b(0x11a))throw notificationError(_0x56934b(0x101),_0x56934b(0x124)+_0x56934b(0xff));}if(hasOwn(_0x10aef2,'channelType')){if(typeof _0x10aef2[_0x56934b(0xc7)]!==_0x56934b(0xe2))throw invalidFieldType(_0x56934b(0xc7),_0x56934b(0xd7));const _0x5ca6aa=_0x10aef2[_0x56934b(0xc7)][_0x56934b(0x11f)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x56934b(0x102)](_0x5ca6aa))throw notificationError('notification_config_field_invalid',_0x56934b(0xd9),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x32bef9[_0x56934b(0xc7)]=_0x5ca6aa;}else{if(_0x2a39c4===_0x56934b(0x11a))throw notificationError(_0x56934b(0x101),_0x56934b(0x124)+_0x56934b(0xf2));}for(const [_0x47e109,_0x3e9f5f]of[[_0x56934b(0xef),0x200],[_0x56934b(0x10d),0x100]]){if(!hasOwn(_0x10aef2,_0x47e109))continue;const _0x46eb7c=_0x10aef2[_0x47e109];if(_0x46eb7c!==null&&typeof _0x46eb7c!=='string')throw invalidFieldType(_0x47e109,_0x56934b(0xf0));if(typeof _0x46eb7c===_0x56934b(0xe2)&&_0x46eb7c['length']>_0x3e9f5f)throw notificationError(_0x56934b(0xb5),_0x56934b(0x133)+_0x47e109+_0x56934b(0xd6)+_0x3e9f5f+_0x56934b(0xc6));_0x32bef9[_0x47e109]=_0x46eb7c;}if(hasOwn(_0x10aef2,_0x56934b(0xd5))){const _0x4d1bbf=_0x10aef2[_0x56934b(0xd5)];if(_0x4d1bbf===null&&_0x2a39c4===_0x56934b(0x11a))throw invalidFieldType(_0x56934b(0xd5),_0x56934b(0xe0));if(_0x4d1bbf!==null&&!isJsonObject(_0x4d1bbf))throw invalidFieldType('channelConfig',_0x2a39c4===_0x56934b(0xd2)?_0x56934b(0x106):_0x56934b(0xe0));_0x4d1bbf!==null&&validateChannelConfigFields(_0x32bef9['channelType'],_0x4d1bbf),_0x32bef9[_0x56934b(0xd5)]=_0x4d1bbf;}for(const _0x5ed19f of[_0x56934b(0xe3),_0x56934b(0x109)]){if(!hasOwn(_0x10aef2,_0x5ed19f))continue;const _0x333a2e=_0x10aef2[_0x5ed19f];if(_0x333a2e!==null&&(!Number[_0x56934b(0xe4)](_0x333a2e)||_0x333a2e<0x0))throw notificationError('notification_config_field_invalid',_0x56934b(0x133)+_0x5ed19f+_0x56934b(0xee));_0x32bef9[_0x5ed19f]=_0x333a2e;}return _0x32bef9;}function validateRequiredString(_0x53cd78,_0x4b9622,_0x3332be){const _0x523413=a157_0x37a4f8;if(typeof _0x53cd78!==_0x523413(0xe2))throw invalidFieldType(_0x4b9622,_0x523413(0x130));const _0x40eee0=_0x53cd78['trim']();if(!_0x40eee0)throw notificationError(_0x523413(0xb5),_0x523413(0x133)+_0x4b9622+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x40eee0[_0x523413(0xbe)]>_0x3332be)throw notificationError(_0x523413(0xb5),_0x523413(0x133)+_0x4b9622+_0x523413(0xd6)+_0x3332be+_0x523413(0xc6));return _0x40eee0;}function validateChannelConfigFields(_0x5ac20f,_0xfbd027){const _0x33aeb4=a157_0x37a4f8;if(hasOwn(_0xfbd027,_0x33aeb4(0xbb)))throw forbiddenChannelConfigField(_0x33aeb4(0xbb));if(_0x5ac20f===_0x33aeb4(0x129))for(const _0x300df0 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0xfbd027,_0x300df0))throw forbiddenChannelConfigField(_0x300df0);}}function forbiddenChannelConfigField(_0x49d594){const _0x482c35=a157_0x37a4f8;return notificationError('notification_config_channel_field_forbidden',_0x482c35(0xd3)+_0x49d594+_0x482c35(0xf3));}function invalidFieldType(_0x4fdfd7,_0x40877b){const _0x23cf96=a157_0x37a4f8;return notificationError(_0x23cf96(0xb5),_0x23cf96(0x133)+_0x4fdfd7+'\x22\x20must\x20be\x20'+_0x40877b+'.');}function serializeChannelConfig(_0x30ffee){const _0x42d83e=a157_0x37a4f8;return _0x30ffee===null||_0x30ffee===undefined?null:JSON[_0x42d83e(0xdc)](_0x30ffee);}function redactSensitive(_0x1b882f){const _0x1ea55c=a157_0x37a4f8;return _0x1b882f===null||_0x1b882f===undefined||_0x1b882f===''?null:_0x1ea55c(0x131);}function requireResponseString(_0x1f900a,_0x4e8e69,_0x270ea1){const _0x32a5ae=a157_0x37a4f8;if(typeof _0x1f900a!=='string'||_0x1f900a[_0x32a5ae(0x11f)]()==='')throw CliErrors[_0x32a5ae(0x120)](_0x32a5ae(0xed),'Item\x20'+(_0x270ea1+0x1)+_0x32a5ae(0x10c)+_0x4e8e69+'\x22.');return _0x1f900a[_0x32a5ae(0x11f)]();}function requireExactString(_0x4d6880,_0x44e26a,_0x1d16aa){const _0x420240=a157_0x37a4f8;if(typeof _0x4d6880!==_0x420240(0xe2)||_0x4d6880[_0x420240(0x11f)]()==='')throw notificationError(_0x420240(0xf5),_0x420240(0x127)+_0x1d16aa+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x44e26a+'\x22.');return _0x4d6880[_0x420240(0x11f)]();}function responseNullableString(_0x22b343,_0x237a51,_0x4e5098){const _0x467376=a157_0x37a4f8;if(_0x22b343===undefined||_0x22b343===null)return null;if(typeof _0x22b343!==_0x467376(0xe2))throw notificationError('notification_config_response_invalid',_0x467376(0x127)+_0x4e5098+_0x467376(0xe8)+_0x237a51+'\x22.');return _0x22b343;}function responseNullableTimeout(_0x47f6bb,_0x4d1e24,_0x6509fc){const _0x30a3c2=a157_0x37a4f8;if(_0x47f6bb===undefined||_0x47f6bb===null)return null;if(!Number['isSafeInteger'](_0x47f6bb)||_0x47f6bb<0x0)throw notificationError(_0x30a3c2(0xf5),_0x30a3c2(0x127)+_0x6509fc+_0x30a3c2(0xe8)+_0x4d1e24+'\x22.');return _0x47f6bb;}function normalizeNullableString(_0xf73874){return typeof _0xf73874==='string'?_0xf73874:null;}function a157_0xd6b1(_0xd6ac8d,_0x23b785){_0xd6ac8d=_0xd6ac8d-0xb1;const _0x542b82=a157_0x542b();let _0xd6b1ca=_0x542b82[_0xd6ac8d];return _0xd6b1ca;}function isJsonObject(_0x15f47c){const _0x504b16=a157_0x37a4f8;return _0x15f47c!==null&&typeof _0x15f47c===_0x504b16(0x12f)&&!Array[_0x504b16(0xe6)](_0x15f47c);}function hasOwn(_0x5e2f6c,_0x1c74c6){const _0x105e7c=a157_0x37a4f8;return Object[_0x105e7c(0x108)][_0x105e7c(0xfa)]['call'](_0x5e2f6c,_0x1c74c6);}async function readStdin(){const _0x429056=a157_0x37a4f8;let _0x48c78e='';process[_0x429056(0x122)][_0x429056(0x12c)](_0x429056(0x107));for await(const _0x9753ba of process[_0x429056(0x122)])_0x48c78e+=_0x9753ba;return _0x48c78e;}
|
|
1
|
+
const a157_0x959504=a157_0x19c8;(function(_0x15a06a,_0x56c516){const _0x2fbef2=a157_0x19c8,_0x187767=_0x15a06a();while(!![]){try{const _0x5a82ef=-parseInt(_0x2fbef2(0x228))/0x1*(-parseInt(_0x2fbef2(0x225))/0x2)+-parseInt(_0x2fbef2(0x21b))/0x3+parseInt(_0x2fbef2(0x1f2))/0x4+-parseInt(_0x2fbef2(0x1d6))/0x5+-parseInt(_0x2fbef2(0x1e9))/0x6+-parseInt(_0x2fbef2(0x23d))/0x7*(parseInt(_0x2fbef2(0x1f0))/0x8)+parseInt(_0x2fbef2(0x220))/0x9*(parseInt(_0x2fbef2(0x1dc))/0xa);if(_0x5a82ef===_0x56c516)break;else _0x187767['push'](_0x187767['shift']());}catch(_0x15e209){_0x187767['push'](_0x187767['shift']());}}}(a157_0x1fc0,0x542e1));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL','FEISHU',a157_0x959504(0x21a),a157_0x959504(0x1d8),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType',a157_0x959504(0x224),a157_0x959504(0x205),a157_0x959504(0x21f),a157_0x959504(0x22e),a157_0x959504(0x22a)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode','configCode','channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x959504(0x234),'recipients',a157_0x959504(0x1db),'bccList','replyTo',a157_0x959504(0x22f),a157_0x959504(0x209),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a157_0x959504(0x204),'type':'string','required':![],'description':a157_0x959504(0x1f1)},{'name':a157_0x959504(0x20f),'type':a157_0x959504(0x1d1),'required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a157_0x959504(0x1d0),'type':a157_0x959504(0x20b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x959504(0x23b),'required':!![],'description':a157_0x959504(0x1e6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2588f8,_0x2057d0,_0xa0b41a){return new CliError(_0x2588f8,0x1,_0x2057d0,_0xa0b41a);}export function readNotificationId(_0x2be0b4){const _0x4c3b2f=a157_0x959504,_0x398358=_0x2be0b4[_0x4c3b2f(0x1da)]('id');if(!Number[_0x4c3b2f(0x23e)](_0x398358)||_0x398358<=0x0)throw notificationError(_0x4c3b2f(0x229),_0x4c3b2f(0x1ed));return _0x398358;}export function requireNotificationExplicitYes(_0x20f0ef){const _0x28100a=a157_0x959504;if(_0x20f0ef[_0x28100a(0x230)](_0x28100a(0x1ce))||_0x20f0ef[_0x28100a(0x230)](_0x28100a(0x227)))return;throw notificationError(_0x28100a(0x223),_0x28100a(0x1d2),_0x28100a(0x22b));}export function readNotificationChannelType(_0x55068b,_0x144f09=a157_0x959504(0x1cc),_0x5a2abd='EMAIL'){const _0x95a55b=a157_0x959504,_0x4c0fc=_0x55068b[_0x95a55b(0x1cd)](_0x144f09)['trim']()||_0x5a2abd;if(!NOTIFICATION_CHANNEL_TYPES[_0x95a55b(0x1ee)](_0x4c0fc))throw CliErrors['validation'](_0x95a55b(0x1c9)+_0x144f09+':\x20'+_0x4c0fc,_0x95a55b(0x21d)+NOTIFICATION_CHANNEL_TYPES[_0x95a55b(0x221)](',\x20')+'.');return _0x4c0fc;}export function assertSingleNotificationSource(_0x371a24){const _0x1437ff=a157_0x959504,_0x1267e3=[],_0x33da40=_0x371a24[_0x1437ff(0x1cd)](_0x1437ff(0x204))[_0x1437ff(0x241)]();if(_0x33da40)_0x1267e3[_0x1437ff(0x242)]({'kind':_0x1437ff(0x204),'path':_0x33da40});if(_0x371a24['bool'](_0x1437ff(0x20f)))_0x1267e3['push']({'kind':_0x1437ff(0x20f)});const _0x5f27a4=_0x371a24[_0x1437ff(0x1cd)]('from-env')[_0x1437ff(0x241)]();if(_0x5f27a4)_0x1267e3[_0x1437ff(0x242)]({'kind':_0x1437ff(0x232),'name':_0x5f27a4});if(_0x1267e3[_0x1437ff(0x240)]===0x0)throw CliErrors['validation'](_0x1437ff(0x1ea),_0x1437ff(0x1e8));if(_0x1267e3[_0x1437ff(0x240)]>0x1)throw CliErrors[_0x1437ff(0x23f)](_0x1437ff(0x1f4),_0x1437ff(0x1e8));return _0x1267e3[0x0];}export async function readNotificationDocument(_0x3d7d31,_0x33b83d){const _0x468b01=a157_0x959504,_0x5605f4=assertSingleNotificationSource(_0x3d7d31),_0x3ccb36=_0x5605f4[_0x468b01(0x1fc)]===_0x468b01(0x204)?_0x468b01(0x239)+_0x5605f4[_0x468b01(0x20a)]:_0x5605f4['kind']===_0x468b01(0x232)?_0x468b01(0x237)+_0x5605f4[_0x468b01(0x211)]:_0x468b01(0x20f);let _0x4bf735;try{if(_0x5605f4[_0x468b01(0x1fc)]===_0x468b01(0x204))_0x4bf735=await readFile(_0x5605f4[_0x468b01(0x20a)],_0x468b01(0x1e2));else{if(_0x5605f4['kind']===_0x468b01(0x232)){if(!(_0x5605f4[_0x468b01(0x211)]in process.env))throw notificationError(_0x468b01(0x21e),_0x468b01(0x1f6)+_0x5605f4['name']);_0x4bf735=process.env[_0x5605f4.name]??'';}else _0x4bf735=await readStdin();}}catch(_0x438a8d){if(_0x438a8d instanceof CliError)throw _0x438a8d;throw notificationError(_0x468b01(0x21e),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x3ccb36+'.');}let _0x2ab1f5;try{_0x2ab1f5=JSON[_0x468b01(0x236)](_0x4bf735);}catch{throw notificationError(_0x468b01(0x217),_0x468b01(0x22d)+_0x3ccb36+_0x468b01(0x1de),_0x468b01(0x1e4));}if(!isJsonObject(_0x2ab1f5))throw notificationError(_0x468b01(0x217),_0x468b01(0x22d)+_0x3ccb36+_0x468b01(0x238));return validateNotificationDocument(_0x2ab1f5,_0x33b83d);}export function projectNotificationListConfig(_0x2a0782,_0xbd4dea){const _0x219997=a157_0x959504;return{'id':typeof _0x2a0782['id']==='number'?_0x2a0782['id']:null,'configCode':requireResponseString(_0x2a0782['configCode'],_0x219997(0x1c7),_0xbd4dea),'configName':requireResponseString(_0x2a0782[_0x219997(0x200)],_0x219997(0x200),_0xbd4dea),'channelType':requireResponseString(_0x2a0782[_0x219997(0x1d9)],_0x219997(0x1d9),_0xbd4dea),'description':normalizeNullableString(_0x2a0782[_0x219997(0x21f)]),'createTime':normalizeNullableString(_0x2a0782[_0x219997(0x214)]),'updateTime':normalizeNullableString(_0x2a0782[_0x219997(0x213)])};}export function normalizeExactNotificationConfig(_0x1853ff,_0x484a1c,_0x423c12){const _0x15a774=a157_0x959504;if(!Number[_0x15a774(0x23e)](_0x1853ff['id'])||_0x1853ff['id']!==_0x484a1c)throw notificationError('notification_config_response_invalid',_0x15a774(0x1e3)+_0x484a1c+'.');if(_0x1853ff[_0x15a774(0x1f8)]!==_0x423c12)throw notificationError('notification_config_response_invalid',_0x15a774(0x1fd)+_0x484a1c+_0x15a774(0x1ca));const _0x39db79=requireExactString(_0x1853ff['configName'],_0x15a774(0x200),_0x484a1c),_0x32b83d=requireExactString(_0x1853ff[_0x15a774(0x1c7)],_0x15a774(0x1c7),_0x484a1c),_0x13ba85=requireExactString(_0x1853ff[_0x15a774(0x1d9)],'channelType',_0x484a1c);if(!NOTIFICATION_CHANNEL_TYPES[_0x15a774(0x1ee)](_0x13ba85))throw notificationError(_0x15a774(0x1d5),_0x15a774(0x1fd)+_0x484a1c+_0x15a774(0x1c8));const _0x20fb20=responseNullableString(_0x1853ff[_0x15a774(0x224)],_0x15a774(0x224),_0x484a1c),_0xbbe7cb=responseNullableString(_0x1853ff[_0x15a774(0x205)],_0x15a774(0x205),_0x484a1c),_0x5858de=responseNullableString(_0x1853ff['description'],'description',_0x484a1c),_0x2aeea1=responseNullableTimeout(_0x1853ff[_0x15a774(0x22e)],_0x15a774(0x22e),_0x484a1c),_0x749ace=responseNullableTimeout(_0x1853ff[_0x15a774(0x22a)],_0x15a774(0x22a),_0x484a1c);return{'id':_0x484a1c,'appCode':_0x423c12,'configCode':_0x32b83d,'configName':_0x39db79,'channelType':_0x13ba85,'endpointUrl':redactSensitive(_0x20fb20),'channelConfig':redactSensitive(_0xbbe7cb),'description':_0x5858de,'connectTimeout':_0x2aeea1,'readTimeout':_0x749ace,'endpointUrlRaw':_0x20fb20,'channelConfigRaw':_0xbbe7cb};}export async function requireExactNotificationConfig(_0x2ba4aa,_0x17fa21,_0x19fc2f){const _0x19da52=a157_0x959504;let _0x1588ef;try{_0x1588ef=await getNotificationChannelConfig(_0x17fa21,_0x2ba4aa);}catch{throw safeApiFailure(_0x19fc2f,'preflight',_0x19da52(0x208)+_0x2ba4aa+_0x19da52(0x1dd));}return normalizeExactNotificationConfig(_0x1588ef,_0x17fa21,_0x2ba4aa);}export function projectNotificationConfig(_0x84259c){const _0x379a4b=a157_0x959504;return{'id':_0x84259c['id']??null,'appCode':_0x84259c[_0x379a4b(0x1f8)],'configCode':_0x84259c[_0x379a4b(0x1c7)]??null,'configName':_0x84259c[_0x379a4b(0x200)],'channelType':_0x84259c['channelType'],'endpointUrl':redactSensitive(_0x84259c['endpointUrl']),'channelConfig':redactSensitive(_0x84259c[_0x379a4b(0x205)]),'description':_0x84259c[_0x379a4b(0x21f)]??null,'connectTimeout':_0x84259c[_0x379a4b(0x22e)]??null,'readTimeout':_0x84259c[_0x379a4b(0x22a)]??null};}export function notificationSelector(_0x3660c7){const _0x18b479=a157_0x959504;return{'appCode':_0x3660c7[_0x18b479(0x1f8)],'id':_0x3660c7['id'],'configCode':_0x3660c7[_0x18b479(0x1c7)],'configName':_0x3660c7[_0x18b479(0x200)],'channelType':_0x3660c7[_0x18b479(0x1d9)]};}export function createMutationInput(_0x54c000,_0x53a29e){const _0x307032=a157_0x959504;return{'appCode':_0x54c000,'configName':_0x53a29e[_0x307032(0x200)],'channelType':_0x53a29e[_0x307032(0x1d9)],...hasOwn(_0x53a29e,'endpointUrl')?{'endpointUrl':_0x53a29e[_0x307032(0x224)]}:{},...hasOwn(_0x53a29e,_0x307032(0x205))?{'channelConfig':serializeChannelConfig(_0x53a29e[_0x307032(0x205)])}:{},...hasOwn(_0x53a29e,_0x307032(0x21f))?{'description':_0x53a29e['description']}:{},...hasOwn(_0x53a29e,_0x307032(0x22e))?{'connectTimeout':_0x53a29e['connectTimeout']}:{},...hasOwn(_0x53a29e,_0x307032(0x22a))?{'readTimeout':_0x53a29e[_0x307032(0x22a)]}:{}};}export function mergeUpdateInput(_0x2ba735,_0x304083){const _0x10037d=a157_0x959504;return{'id':_0x2ba735['id'],'appCode':_0x2ba735['appCode'],'configName':_0x304083[_0x10037d(0x200)]??_0x2ba735[_0x10037d(0x200)],'channelType':_0x304083['channelType']??_0x2ba735[_0x10037d(0x1d9)],'endpointUrl':hasOwn(_0x304083,'endpointUrl')?_0x304083[_0x10037d(0x224)]:_0x2ba735[_0x10037d(0x1d3)],'channelConfig':hasOwn(_0x304083,_0x10037d(0x205))?serializeChannelConfig(_0x304083['channelConfig']):_0x2ba735[_0x10037d(0x219)],'description':hasOwn(_0x304083,'description')?_0x304083[_0x10037d(0x21f)]:_0x2ba735[_0x10037d(0x21f)],'connectTimeout':hasOwn(_0x304083,_0x10037d(0x22e))?_0x304083[_0x10037d(0x22e)]:_0x2ba735[_0x10037d(0x22e)],'readTimeout':hasOwn(_0x304083,_0x10037d(0x22a))?_0x304083[_0x10037d(0x22a)]:_0x2ba735[_0x10037d(0x22a)]};}export function plannedUpdateProjection(_0x458152,_0xbd697e){const _0x4de80d=a157_0x959504;return projectNotificationConfig({'id':_0x458152['id'],'appCode':_0x458152[_0x4de80d(0x1f8)],'configCode':_0x458152[_0x4de80d(0x1c7)],'configName':_0xbd697e['configName']??_0x458152[_0x4de80d(0x200)],'channelType':_0xbd697e[_0x4de80d(0x1d9)]??_0x458152[_0x4de80d(0x1d9)],'endpointUrl':hasOwn(_0xbd697e,_0x4de80d(0x224))?_0xbd697e[_0x4de80d(0x224)]:_0x458152[_0x4de80d(0x1d3)],'channelConfig':hasOwn(_0xbd697e,_0x4de80d(0x205))?_0xbd697e[_0x4de80d(0x205)]:_0x458152[_0x4de80d(0x219)],'description':hasOwn(_0xbd697e,_0x4de80d(0x21f))?_0xbd697e[_0x4de80d(0x21f)]:_0x458152[_0x4de80d(0x21f)],'connectTimeout':hasOwn(_0xbd697e,_0x4de80d(0x22e))?_0xbd697e[_0x4de80d(0x22e)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x458152[_0x4de80d(0x22e)],'readTimeout':hasOwn(_0xbd697e,_0x4de80d(0x22a))?_0xbd697e['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x458152['readTimeout']});}export function requestedSafeFieldsMatch(_0xf3030d,_0x8cb5c,_0x3791da){const _0x28c998=a157_0x959504,_0x3bf6a2=[],_0x466a11=[],_0x38bae6=[];for(const _0x187c51 of[_0x28c998(0x200),'channelType',_0x28c998(0x21f)]){if(!hasOwn(_0x3791da,_0x187c51))continue;_0x38bae6[_0x28c998(0x242)](_0x187c51),_0x3bf6a2[_0x28c998(0x242)](_0x8cb5c[_0x187c51]===_0x3791da[_0x187c51]),_0x466a11['push'](_0xf3030d[_0x187c51]!==_0x3791da[_0x187c51]&&_0x8cb5c[_0x187c51]===_0x3791da[_0x187c51]);}for(const _0x4dd592 of['connectTimeout','readTimeout']){if(!hasOwn(_0x3791da,_0x4dd592))continue;const _0x30c49e=_0x3791da[_0x4dd592]??(_0x4dd592===_0x28c998(0x22e)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x38bae6[_0x28c998(0x242)](_0x4dd592),_0x3bf6a2[_0x28c998(0x242)](_0x8cb5c[_0x4dd592]===_0x30c49e),_0x466a11[_0x28c998(0x242)](_0xf3030d[_0x4dd592]!==_0x30c49e&&_0x8cb5c[_0x4dd592]===_0x30c49e);}return hasOwn(_0x3791da,_0x28c998(0x224))&&_0x3791da[_0x28c998(0x224)]===null&&(_0x38bae6['push'](_0x28c998(0x22c)),_0x3bf6a2[_0x28c998(0x242)](_0x8cb5c[_0x28c998(0x1d3)]===null||_0x8cb5c['endpointUrlRaw']===''),_0x466a11[_0x28c998(0x242)](_0xf3030d['endpointUrlRaw']!==null&&_0xf3030d[_0x28c998(0x1d3)]!==''&&(_0x8cb5c[_0x28c998(0x1d3)]===null||_0x8cb5c['endpointUrlRaw']===''))),{'allMatch':_0x3bf6a2[_0x28c998(0x207)](Boolean),'provesChange':_0x466a11[_0x28c998(0x20d)](Boolean),'verifiedFields':_0x38bae6};}export function validateNotificationDeleteReadback(_0xeb700b,_0x3c7bf5,_0x405326){const _0x4cf8c4=a157_0x959504;for(const [_0x219331,_0x4034ad]of _0xeb700b[_0x4cf8c4(0x1cf)]()){if(!Number[_0x4cf8c4(0x23e)](_0x4034ad['id'])||_0x4034ad['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x219331+0x1)+_0x4cf8c4(0x202));if(_0x4034ad[_0x4cf8c4(0x1f8)]!==_0x3c7bf5)throw notificationError('notification_config_response_invalid',_0x4cf8c4(0x1e0)+(_0x219331+0x1)+_0x4cf8c4(0x23c));if(_0x4034ad[_0x4cf8c4(0x1d9)]!==_0x405326)throw notificationError('notification_config_response_invalid',_0x4cf8c4(0x1e0)+(_0x219331+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x5bae07,_0x45206b,_0x42082f){const _0x5b0168=a157_0x959504;return notificationError(_0x5b0168(0x1ec)+_0x5bae07+'_'+(_0x45206b===_0x5b0168(0x1e1)?'failed':_0x45206b+'_unavailable'),_0x5b0168(0x1fd)+_0x5bae07+'\x20'+_0x45206b+_0x5b0168(0x20c),_0x42082f);}export function notificationLookupCommand(_0x4a33b5,_0x536b95){const _0x3b6d40=a157_0x959504;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x4a33b5+_0x3b6d40(0x1f7)+_0x536b95+_0x3b6d40(0x203);}function validateNotificationDocument(_0x1f2ab7,_0x2e1b86){const _0x51c2aa=a157_0x959504;for(const _0x4aac41 of Object['keys'](_0x1f2ab7)){if(FORBIDDEN_IDENTITY_FIELDS[_0x51c2aa(0x244)](_0x4aac41))throw notificationError(_0x51c2aa(0x1d7),'Notification\x20JSON\x20field\x20\x22'+_0x4aac41+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x51c2aa(0x244)](_0x4aac41))throw notificationError(_0x51c2aa(0x1df),_0x51c2aa(0x20e)+_0x4aac41+'\x22.');}if(_0x2e1b86===_0x51c2aa(0x245)&&Object['keys'](_0x1f2ab7)[_0x51c2aa(0x240)]===0x0)throw notificationError(_0x51c2aa(0x233),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x19cdf6={};if(hasOwn(_0x1f2ab7,'configName'))_0x19cdf6[_0x51c2aa(0x200)]=validateRequiredString(_0x1f2ab7['configName'],'configName',0x80);else{if(_0x2e1b86===_0x51c2aa(0x1fa))throw notificationError(_0x51c2aa(0x1f5),_0x51c2aa(0x235)+_0x51c2aa(0x222));}if(hasOwn(_0x1f2ab7,_0x51c2aa(0x1d9))){if(typeof _0x1f2ab7[_0x51c2aa(0x1d9)]!==_0x51c2aa(0x20b))throw invalidFieldType(_0x51c2aa(0x1d9),_0x51c2aa(0x210));const _0x348665=_0x1f2ab7[_0x51c2aa(0x1d9)][_0x51c2aa(0x241)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x348665))throw notificationError(_0x51c2aa(0x215),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x51c2aa(0x21d)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x19cdf6['channelType']=_0x348665;}else{if(_0x2e1b86==='create')throw notificationError(_0x51c2aa(0x1f5),'Create\x20JSON\x20requires\x20field\x20'+'\x22channelType\x22.');}for(const [_0x1b99b1,_0x307447]of[[_0x51c2aa(0x224),0x200],[_0x51c2aa(0x21f),0x100]]){if(!hasOwn(_0x1f2ab7,_0x1b99b1))continue;const _0x36b285=_0x1f2ab7[_0x1b99b1];if(_0x36b285!==null&&typeof _0x36b285!==_0x51c2aa(0x20b))throw invalidFieldType(_0x1b99b1,_0x51c2aa(0x243));if(typeof _0x36b285===_0x51c2aa(0x20b)&&_0x36b285[_0x51c2aa(0x240)]>_0x307447)throw notificationError(_0x51c2aa(0x215),_0x51c2aa(0x226)+_0x1b99b1+'\x22\x20cannot\x20exceed\x20'+_0x307447+'\x20characters.');_0x19cdf6[_0x1b99b1]=_0x36b285;}if(hasOwn(_0x1f2ab7,_0x51c2aa(0x205))){const _0x398b95=_0x1f2ab7[_0x51c2aa(0x205)];if(_0x398b95===null&&_0x2e1b86===_0x51c2aa(0x1fa))throw invalidFieldType(_0x51c2aa(0x205),_0x51c2aa(0x1d4));if(_0x398b95!==null&&!isJsonObject(_0x398b95))throw invalidFieldType(_0x51c2aa(0x205),_0x2e1b86==='update'?'a\x20JSON\x20object\x20or\x20null':_0x51c2aa(0x1d4));_0x398b95!==null&&validateChannelConfigFields(_0x19cdf6[_0x51c2aa(0x1d9)],_0x398b95),_0x19cdf6['channelConfig']=_0x398b95;}for(const _0x3dc52f of[_0x51c2aa(0x22e),_0x51c2aa(0x22a)]){if(!hasOwn(_0x1f2ab7,_0x3dc52f))continue;const _0xadc9ed=_0x1f2ab7[_0x3dc52f];if(_0xadc9ed!==null&&(!Number[_0x51c2aa(0x23e)](_0xadc9ed)||_0xadc9ed<0x0))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x3dc52f+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x19cdf6[_0x3dc52f]=_0xadc9ed;}return _0x19cdf6;}function validateRequiredString(_0x4ff3a4,_0x51e389,_0x5a564c){const _0xa527e1=a157_0x959504;if(typeof _0x4ff3a4!==_0xa527e1(0x20b))throw invalidFieldType(_0x51e389,_0xa527e1(0x1fe));const _0x445dc3=_0x4ff3a4[_0xa527e1(0x241)]();if(!_0x445dc3)throw notificationError(_0xa527e1(0x215),'Notification\x20JSON\x20field\x20\x22'+_0x51e389+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x445dc3[_0xa527e1(0x240)]>_0x5a564c)throw notificationError('notification_config_field_invalid',_0xa527e1(0x226)+_0x51e389+_0xa527e1(0x216)+_0x5a564c+_0xa527e1(0x1ef));return _0x445dc3;}function validateChannelConfigFields(_0xe7c1ab,_0x2bd387){const _0xce902b=a157_0x959504;if(hasOwn(_0x2bd387,_0xce902b(0x23a)))throw forbiddenChannelConfigField('messageTemplate');if(_0xe7c1ab==='EMAIL')for(const _0x2cbbc1 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x2bd387,_0x2cbbc1))throw forbiddenChannelConfigField(_0x2cbbc1);}}function forbiddenChannelConfigField(_0x5a92aa){const _0x19cb94=a157_0x959504;return notificationError('notification_config_channel_field_forbidden',_0x19cb94(0x1fb)+_0x5a92aa+_0x19cb94(0x1f9));}function invalidFieldType(_0x80fde4,_0x26a079){const _0x30ede2=a157_0x959504;return notificationError(_0x30ede2(0x215),_0x30ede2(0x226)+_0x80fde4+_0x30ede2(0x206)+_0x26a079+'.');}function serializeChannelConfig(_0x177c9a){const _0x1bdc6b=a157_0x959504;return _0x177c9a===null||_0x177c9a===undefined?null:JSON[_0x1bdc6b(0x201)](_0x177c9a);}function redactSensitive(_0x1d64ac){return _0x1d64ac===null||_0x1d64ac===undefined||_0x1d64ac===''?null:'<redacted>';}function requireResponseString(_0x517159,_0x24ccd1,_0x4a1cd0){const _0x24227d=a157_0x959504;if(typeof _0x517159!=='string'||_0x517159[_0x24227d(0x241)]()==='')throw CliErrors[_0x24227d(0x231)](_0x24227d(0x1eb),'Item\x20'+(_0x4a1cd0+0x1)+_0x24227d(0x1e7)+_0x24ccd1+'\x22.');return _0x517159[_0x24227d(0x241)]();}function requireExactString(_0x4f07b7,_0x22b6cc,_0x3d79f8){const _0x3962eb=a157_0x959504;if(typeof _0x4f07b7!==_0x3962eb(0x20b)||_0x4f07b7[_0x3962eb(0x241)]()==='')throw notificationError(_0x3962eb(0x1d5),'Notification\x20config\x20'+_0x3d79f8+_0x3962eb(0x1e7)+_0x22b6cc+'\x22.');return _0x4f07b7[_0x3962eb(0x241)]();}function responseNullableString(_0x469a60,_0x6e9d34,_0x2a20fc){const _0x3265cb=a157_0x959504;if(_0x469a60===undefined||_0x469a60===null)return null;if(typeof _0x469a60!==_0x3265cb(0x20b))throw notificationError(_0x3265cb(0x1d5),'Notification\x20config\x20'+_0x2a20fc+_0x3265cb(0x1e5)+_0x6e9d34+'\x22.');return _0x469a60;}function responseNullableTimeout(_0x2e28cf,_0x446c3b,_0x4d8af4){const _0x1d7ce7=a157_0x959504;if(_0x2e28cf===undefined||_0x2e28cf===null)return null;if(!Number[_0x1d7ce7(0x23e)](_0x2e28cf)||_0x2e28cf<0x0)throw notificationError(_0x1d7ce7(0x1d5),_0x1d7ce7(0x1fd)+_0x4d8af4+_0x1d7ce7(0x1e5)+_0x446c3b+'\x22.');return _0x2e28cf;}function a157_0x19c8(_0x4de368,_0x3b8639){_0x4de368=_0x4de368-0x1c7;const _0x1fc0f0=a157_0x1fc0();let _0x19c87b=_0x1fc0f0[_0x4de368];return _0x19c87b;}function normalizeNullableString(_0x385ec6){const _0xf7e520=a157_0x959504;return typeof _0x385ec6===_0xf7e520(0x20b)?_0x385ec6:null;}function isJsonObject(_0xbaa64d){const _0x133c34=a157_0x959504;return _0xbaa64d!==null&&typeof _0xbaa64d===_0x133c34(0x1f3)&&!Array[_0x133c34(0x1cb)](_0xbaa64d);}function hasOwn(_0x3fe4a7,_0x2e318f){const _0x31f9bc=a157_0x959504;return Object[_0x31f9bc(0x212)][_0x31f9bc(0x21c)][_0x31f9bc(0x218)](_0x3fe4a7,_0x2e318f);}async function readStdin(){const _0x31ef1d=a157_0x959504;let _0x3227a9='';process[_0x31ef1d(0x20f)][_0x31ef1d(0x1ff)](_0x31ef1d(0x1e2));for await(const _0x2377e4 of process[_0x31ef1d(0x20f)])_0x3227a9+=_0x2377e4;return _0x3227a9;}function a157_0x1fc0(){const _0x275463=['Notification\x20JSON\x20field\x20\x22','yes','347731SDmIFV','notification_config_id_invalid','readTimeout','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','endpointUrl:null','Notification\x20JSON\x20from\x20','connectTimeout','subjectPrefix','bool','apiError','env','notification_config_update_empty','emailTargets','Create\x20JSON\x20requires\x20field\x20','parse','environment\x20variable\x20','\x20must\x20be\x20an\x20object.','file\x20','messageTemplate','number','\x20has\x20an\x20invalid\x20appCode.','1129751PlZGPf','isSafeInteger','validation','length','trim','push','a\x20string\x20or\x20null','has','update','configCode','\x20has\x20an\x20unsupported\x20channelType.','Invalid\x20--','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','isArray','type','str','dry-run','entries','from-env','boolean','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','endpointUrlRaw','a\x20JSON\x20object','notification_config_response_invalid','1454370DtkAwL','notification_config_field_forbidden','WECOM','channelType','num','ccList','162110iomuLt','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20is\x20invalid.','notification_config_field_unknown','Notification\x20config\x20list\x20item\x20','mutation','utf8','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x20has\x20invalid\x20field\x20\x22','Application-level\x20notification\x20config\x20ID','\x20is\x20missing\x20required\x20field\x20\x22','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','1263582HldKGP','Missing\x20notification\x20JSON\x20source.','Invalid\x20notification\x20config\x20response.','notification_config_','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','includes','\x20characters.','8TvETYX','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','718784JoZQWC','object','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_field_required','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','\x20--type\x20','appCode','\x22\x20is\x20forbidden.','create','Notification\x20JSON\x20channelConfig\x20field\x20\x22','kind','Notification\x20config\x20','a\x20non-empty\x20string','setEncoding','configName','stringify','\x20has\x20an\x20invalid\x20id.','\x20--format\x20compress','file','channelConfig','\x22\x20must\x20be\x20','every','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','fromName','path','string','\x20failed.','some','Unknown\x20notification\x20JSON\x20field\x20\x22','stdin','a\x20supported\x20string','name','prototype','updateTime','createTime','notification_config_field_invalid','\x22\x20cannot\x20exceed\x20','notification_config_json_invalid','call','channelConfigRaw','DINGTALK','1623165uhrrsu','hasOwnProperty','Allowed\x20values:\x20','notification_config_source_unavailable','description','567hWXFpR','join','\x22configName\x22.','notification_config_confirmation_required','endpointUrl','2ZCDPpS'];a157_0x1fc0=function(){return _0x275463;};return a157_0x1fc0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x49ddc7=a158_0x592f;(function(_0x3397b4,_0x34d9ee){const _0x2c6cc=a158_0x592f,_0xf7db4c=_0x3397b4();while(!![]){try{const _0x5515f4=-parseInt(_0x2c6cc(0x1d1))/0x1*(-parseInt(_0x2c6cc(0x1d0))/0x2)+parseInt(_0x2c6cc(0x1f0))/0x3+-parseInt(_0x2c6cc(0x1d3))/0x4*(parseInt(_0x2c6cc(0x1d4))/0x5)+parseInt(_0x2c6cc(0x1c1))/0x6+parseInt(_0x2c6cc(0x1c7))/0x7*(-parseInt(_0x2c6cc(0x1f1))/0x8)+-parseInt(_0x2c6cc(0x1da))/0x9+parseInt(_0x2c6cc(0x1df))/0xa;if(_0x5515f4===_0x34d9ee)break;else _0xf7db4c['push'](_0xf7db4c['shift']());}catch(_0x57737e){_0xf7db4c['push'](_0xf7db4c['shift']());}}}(a158_0x1be4,0x88a5e));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a158_0x592f(_0x3b8853,_0x4f3e64){_0x3b8853=_0x3b8853-0x1bd;const _0x1be421=a158_0x1be4();let _0x592f6a=_0x1be421[_0x3b8853];return _0x592f6a;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a158_0x49ddc7(0x1be),a158_0x49ddc7(0x1c0),a158_0x49ddc7(0x1cd),a158_0x49ddc7(0x1c4)],SCENE_TO_LEGACY_TYPE={'invoice':a158_0x49ddc7(0x1cb),'general':a158_0x49ddc7(0x1c9),'form':'Table','idCard':a158_0x49ddc7(0x1e6)},SCENE_FLAG={'name':a158_0x49ddc7(0x1e5),'type':a158_0x49ddc7(0x1ec),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a158_0x49ddc7(0x1d7)},IMAGE_FILE_FLAG={'name':a158_0x49ddc7(0x1db),'type':a158_0x49ddc7(0x1ec),'description':a158_0x49ddc7(0x1e4)},IMAGE_URL_FLAG={'name':a158_0x49ddc7(0x1dd),'type':a158_0x49ddc7(0x1ec),'description':a158_0x49ddc7(0x1e3)};function normalizeScene(_0x508df4){const _0x5403de=a158_0x49ddc7,_0x417b99=_0x508df4[_0x5403de(0x1c6)]()[_0x5403de(0x1ef)]();if(_0x417b99===_0x5403de(0x1e1))return'idCard';if(_0x417b99===_0x5403de(0x1be)||_0x417b99===_0x5403de(0x1c0)||_0x417b99==='form')return _0x417b99;throw CliErrors[_0x5403de(0x1cc)](_0x5403de(0x1bd)+_0x508df4+_0x5403de(0x1dc)+SUPPORTED_SCENES[_0x5403de(0x1ee)](',\x20'));}function a158_0x1be4(){const _0x410d2=['idcard','apiError','Publicly\x20accessible\x20image\x20or\x20file\x20URL','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','scene','IdCard','\x20OCR','/smartapi/common/uploadFile','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','toString','recognize','string','File\x20URL\x20response\x20missing\x20fileUrl.','join','toLowerCase','796929HWvaLf','8lkWiYC','/smartapi/ocr/recognize-text?','Unsupported\x20OCR\x20scene:\x20','invoice','appCode','general','5131656jZysGa','Preview:\x20recognize\x20','GET','idCard','fileName','trim','2000838HaKTuB','/smartapi/common/queryFileUrl','General','fileUrl','Invoice','validation','form','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','POST','8GbZzsh','76753XutMlp','path','4FiWeYH','3036065oeEcTO','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','filePath','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','str','imageUrl','122229vTYDTB','image-file','.\x20Supported\x20scenes:\x20','image-url','\x20OCR\x20from\x20URL','384070DQCAnh','imageFile'];a158_0x1be4=function(){return _0x410d2;};return a158_0x1be4();}function selectedInputs(_0x4e767a){const _0x214605=a158_0x49ddc7,_0x44dfb6=_0x4e767a['str'](_0x214605(0x1db))['trim'](),_0x12d921=_0x4e767a[_0x214605(0x1d8)]('image-url')['trim']();return{'imageFile':_0x44dfb6,'imageUrl':_0x12d921,'count':[_0x44dfb6,_0x12d921]['filter'](Boolean)['length']};}function validateInputSelection(_0x4ceb1a){const _0x546436=a158_0x49ddc7,_0x5d3b1d=selectedInputs(_0x4ceb1a);if(_0x5d3b1d['count']!==0x1)throw CliErrors[_0x546436(0x1cc)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x5d3b1d;}function withScene(_0x259f0a,_0x1fa70a,_0x339080){const _0x3ee604=a158_0x49ddc7;return{..._0x259f0a,'scene':_0x1fa70a,..._0x339080?{'sourceFile':{'fileName':_0x339080[_0x3ee604(0x1c5)],'filePath':_0x339080['filePath']}}:{}};}const ocrRecognize={'service':'ocr','command':a158_0x49ddc7(0x1eb),'description':a158_0x49ddc7(0x1e9),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3b0ab3){const _0x761f90=a158_0x49ddc7,_0x200566=normalizeScene(_0x3b0ab3['str']('scene')),_0x2d4b89=SCENE_TO_LEGACY_TYPE[_0x200566],_0x335d56=validateInputSelection(_0x3b0ab3);if(_0x335d56['imageUrl']){const _0x88f95c=new URLSearchParams({'url':_0x335d56['imageUrl'],'type':_0x2d4b89,'appCode':_0x3b0ab3[_0x761f90(0x1bf)]});return{'method':'GET','url':_0x761f90(0x1f2)+_0x88f95c[_0x761f90(0x1ea)](),'description':_0x761f90(0x1c2)+_0x200566+_0x761f90(0x1de)};}const _0x939bc8=requireDevelopmentUploadFile(_0x335d56[_0x761f90(0x1e0)],_0x761f90(0x1db));return{'method':'POST','url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x761f90(0x1cf),'url':_0x761f90(0x1e8),'body':{'appCode':_0x3b0ab3[_0x761f90(0x1bf)],'multipart':{'file':_0x939bc8}}},{'method':_0x761f90(0x1cf),'url':_0x761f90(0x1c8),'body':{'filePath':_0x761f90(0x1d5),'downloadFlag':![]}},{'method':_0x761f90(0x1c3),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x3b0ab3[_0x761f90(0x1bf)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x2d4b89}}]},'description':_0x761f90(0x1ce)+_0x200566+_0x761f90(0x1e7)};},async 'execute'(_0x4becb8){const _0x555c2d=a158_0x49ddc7,_0xf9049c=normalizeScene(_0x4becb8[_0x555c2d(0x1d8)]('scene')),_0x5e0fb5=SCENE_TO_LEGACY_TYPE[_0xf9049c],_0x20003c=validateInputSelection(_0x4becb8);if(_0x20003c[_0x555c2d(0x1d9)]){const _0x3dbac2=await recognizeDevelopmentOcr(_0x4becb8[_0x555c2d(0x1bf)],{'url':_0x20003c[_0x555c2d(0x1d9)],'type':_0x5e0fb5});return{'ok':!![],'data':withScene(_0x3dbac2,_0xf9049c)};}const _0x5f42ab=requireDevelopmentUploadFile(_0x20003c[_0x555c2d(0x1e0)],_0x555c2d(0x1db)),_0x467df1=await uploadDevelopmentFile(_0x4becb8[_0x555c2d(0x1bf)],_0x5f42ab[_0x555c2d(0x1d2)]);if(!_0x467df1[_0x555c2d(0x1d6)])throw CliErrors[_0x555c2d(0x1e2)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x4c27d2=await queryDevelopmentFileUrl(_0x467df1[_0x555c2d(0x1d6)],{'download':![]});if(!_0x4c27d2[_0x555c2d(0x1ca)])throw CliErrors[_0x555c2d(0x1e2)](_0x555c2d(0x1ed));const _0x4a25cf=await recognizeDevelopmentOcr(_0x4becb8[_0x555c2d(0x1bf)],{'url':_0x4c27d2[_0x555c2d(0x1ca)],'type':_0x5e0fb5});return{'ok':!![],'data':withScene(_0x4a25cf,_0xf9049c,_0x467df1)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a159_0x6f91(_0x23ecb9,_0x4371ae){_0x23ecb9=_0x23ecb9-0xe6;const _0x1a75f5=a159_0x1a75();let _0x6f91ee=_0x1a75f5[_0x23ecb9];return _0x6f91ee;}const a159_0x1f8526=a159_0x6f91;(function(_0x535cc6,_0x19ba75){const _0x261654=a159_0x6f91,_0x351881=_0x535cc6();while(!![]){try{const _0x55bc59=parseInt(_0x261654(0x101))/0x1*(-parseInt(_0x261654(0x124))/0x2)+parseInt(_0x261654(0x116))/0x3+parseInt(_0x261654(0x100))/0x4+-parseInt(_0x261654(0xf9))/0x5*(-parseInt(_0x261654(0xfe))/0x6)+parseInt(_0x261654(0xf7))/0x7+parseInt(_0x261654(0xfd))/0x8+-parseInt(_0x261654(0x10e))/0x9;if(_0x55bc59===_0x19ba75)break;else _0x351881['push'](_0x351881['shift']());}catch(_0x1e747a){_0x351881['push'](_0x351881['shift']());}}}(a159_0x1a75,0xa3da6));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a159_0x1f8526(0xfa),a159_0x1f8526(0x102),'DASHBOARD'],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a159_0x1f8526(0xee));export const pageCreate={'service':'page','command':'create','description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':a159_0x1f8526(0x105),'defaultOutputFormat':a159_0x1f8526(0x122),'structuredErrors':!![],'rejectedFlags':[{'name':a159_0x1f8526(0xfb),'message':a159_0x1f8526(0x11c),'hint':a159_0x1f8526(0xf6)},{'name':a159_0x1f8526(0xff),'message':a159_0x1f8526(0x121),'hint':a159_0x1f8526(0xe8)}],'flags':[{'name':a159_0x1f8526(0x115),'type':a159_0x1f8526(0xeb),'description':'Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)'},{'name':a159_0x1f8526(0x11e),'type':a159_0x1f8526(0x110),'description':a159_0x1f8526(0xea)},{'name':a159_0x1f8526(0xf8),'type':a159_0x1f8526(0xeb),'description':a159_0x1f8526(0xf4),'enum':CUSTOM_PAGE_PATTERNS},{'name':a159_0x1f8526(0x11b),'type':a159_0x1f8526(0xeb),'description':'Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0x545b48){await readValidatedPageSource(_0x545b48);},async 'dryRun'(_0x56a037){const _0xcb7b2e=a159_0x1f8526,_0x43f06d=readInput(_0x56a037,await readValidatedPageSource(_0x56a037));return{'method':_0xcb7b2e(0x10a),'url':_0xcb7b2e(0x109),'body':{'appCode':_0x43f06d[_0xcb7b2e(0x104)],'pageName':_0x43f06d[_0xcb7b2e(0xec)],..._0x43f06d[_0xcb7b2e(0x126)]!=null?{'parentMenuId':_0x43f06d['parentMenuId']}:{},'createMenu':_0x43f06d[_0xcb7b2e(0xf1)],'codeContent':_0x43f06d[_0xcb7b2e(0x111)]},'description':_0xcb7b2e(0x125)+JSON['stringify'](_0x43f06d[_0xcb7b2e(0xec)])+'\x20and\x20its\x20menu\x20entry.'};},async 'execute'(_0x44ecc8){const _0x358597=a159_0x1f8526,_0x18df6a=readInput(_0x44ecc8,await readValidatedPageSource(_0x44ecc8)),_0x1c453f=await createCustomPage(_0x18df6a);if(!Number[_0x358597(0xf0)](_0x1c453f['pageId'])||_0x1c453f[_0x358597(0x11f)]<=0x0)throw CliErrors['apiError'](_0x358597(0xe7));const _0x11e572=buildCustomPageDevelopmentUrl(_0x18df6a[_0x358597(0x104)],_0x1c453f[_0x358597(0x10f)]),_0x51c880=buildCustomPageEditUrl(_0x18df6a[_0x358597(0x104)],_0x1c453f[_0x358597(0x11f)]);return{'ok':!![],'data':{'operation':'page.create','pageType':'CUSTOM','pagePattern':readPagePattern(_0x44ecc8),'selector':{'appCode':_0x18df6a[_0x358597(0x104)],'pageName':_0x18df6a[_0x358597(0xec)]},'before':null,'after':{'pageId':_0x1c453f[_0x358597(0x11f)],'pageName':_0x1c453f[_0x358597(0xec)],'appCode':_0x1c453f[_0x358597(0x104)],'version':_0x1c453f[_0x358597(0xfc)],'menuId':_0x1c453f['menuId'],'menuPath':_0x1c453f[_0x358597(0x10f)],'files':_0x1c453f[_0x358597(0x111)]??Object['keys'](_0x18df6a['files'])},'dryRun':![],'request':_0x18df6a,..._0x11e572?{'pageUrl':_0x11e572}:{},..._0x51c880?{'editPageUrl':_0x51c880}:{},'warnings':_0x11e572?[]:[_0x358597(0x118)]},'message':_0x358597(0x108)+_0x1c453f[_0x358597(0x11f)]+'.'};}};function readPagePattern(_0x82c989){const _0x595f21=a159_0x1f8526,_0x2ace44=_0x82c989[_0x595f21(0x103)](_0x595f21(0xf8))['trim'](),_0x105e84=_0x82c989[_0x595f21(0x103)](_0x595f21(0x11b))[_0x595f21(0xf3)]();if(_0x2ace44&&_0x105e84)throw CliErrors[_0x595f21(0x114)]('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x105e84)return null;if(!_0x2ace44)throw CliErrors['validation'](_0x595f21(0x123));if(!CUSTOM_PAGE_PATTERNS[_0x595f21(0xf5)](_0x2ace44))throw CliErrors[_0x595f21(0x114)](_0x595f21(0xf2));return _0x2ace44;}async function readPageSource(_0x269cb1){const _0x51092f=a159_0x1f8526,_0xe2b3c0=_0x269cb1[_0x51092f(0x103)]('page-dir')['trim'](),_0x320cc3=readPagePattern(_0x269cb1);if(_0x320cc3===null){const _0xf0584f=await readCustomPageDirectory(_0xe2b3c0);if(Object['keys'](_0xf0584f)[_0x51092f(0xed)]===0x0)throw CliErrors[_0x51092f(0x114)](_0x51092f(0x117));return _0xf0584f;}let _0x242f12;try{_0x242f12=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x320cc3[_0x51092f(0xe6)]()+_0x51092f(0xef)),_0x51092f(0x11a));}catch{throw CliErrors['validation'](_0x51092f(0x10d)+_0x320cc3+'.');}let _0x10683d;try{_0x10683d=JSON['parse'](_0x242f12);}catch{throw CliErrors['validation'](_0x51092f(0xe9)+_0x320cc3+'.');}if(!_0x10683d||typeof _0x10683d!==_0x51092f(0x10c)||Array[_0x51092f(0x10b)](_0x10683d)||Object[_0x51092f(0x120)](_0x10683d)[_0x51092f(0x106)](_0x494e92=>typeof _0x494e92!==_0x51092f(0xeb)))throw CliErrors[_0x51092f(0x114)](_0x51092f(0xe9)+_0x320cc3+'.');return _0x10683d;}async function readValidatedPageSource(_0x3d2051){const _0x2b3471=await readPageSource(_0x3d2051);return await validateCustomPageContent(_0x2b3471),_0x2b3471;}function a159_0x1a75(){const _0xe75df0=['4751240RlWpZa','70362HkjzJp','page-content','5281844OpVmad','128TrDefb','ONEPAGE','str','appCode','write','some','Custom_page_','Created\x20Custom\x20Page\x20','/smartapi/webcode/page/create','POST','isArray','object','Custom\x20Page\x20pattern\x20not\x20found:\x20','25561458bjPFqv','menuPath','number','files','isNaN','num','validation','name','3905013GXyQrI','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','pageName\x20cannot\x20exceed\x20100\x20characters.','utf8','page-dir','page\x20create\x20does\x20not\x20accept\x20--page-type.','now','parent-menu-id','pageId','values','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','compress','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','2328ECynZJ','Would\x20create\x20Custom\x20Page\x20','parentMenuId','toLowerCase','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','Invalid\x20Custom\x20Page\x20pattern:\x20','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','string','pageName','length','../../../templates/custom-pages','.json','isInteger','createMenu','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','trim','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','includes','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','1878478tSRMmb','page-pattern','75EBVJzP','BLANK','page-type','version'];a159_0x1a75=function(){return _0xe75df0;};return a159_0x1a75();}function readInput(_0x3dd68f,_0x441b1e){const _0x53a915=a159_0x1f8526,_0x552028=_0x3dd68f[_0x53a915(0x103)](_0x53a915(0x115))[_0x53a915(0xf3)]()||_0x53a915(0x107)+Date[_0x53a915(0x11d)]();if(_0x552028[_0x53a915(0xed)]>0x64)throw CliErrors[_0x53a915(0x114)](_0x53a915(0x119));const _0x3ab24f=_0x3dd68f[_0x53a915(0x113)](_0x53a915(0x11e),NaN),_0xefa2ff=!Number[_0x53a915(0x112)](_0x3ab24f);if(_0xefa2ff&&(!Number['isInteger'](_0x3ab24f)||_0x3ab24f<=0x0))throw CliErrors[_0x53a915(0x114)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x3dd68f[_0x53a915(0x104)],'pageName':_0x552028,..._0xefa2ff?{'parentMenuId':_0x3ab24f}:{},'createMenu':!![],'files':_0x441b1e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a160_0x7c24b6=a160_0x1df4;function a160_0x1df4(_0x22bbdb,_0x555480){_0x22bbdb=_0x22bbdb-0xf9;const _0x55c769=a160_0x55c7();let _0x1df41f=_0x55c769[_0x22bbdb];return _0x1df41f;}(function(_0x5af976,_0x22c217){const _0x34473c=a160_0x1df4,_0x375f36=_0x5af976();while(!![]){try{const _0x98b72f=-parseInt(_0x34473c(0x107))/0x1*(-parseInt(_0x34473c(0x10d))/0x2)+parseInt(_0x34473c(0x104))/0x3+parseInt(_0x34473c(0x10a))/0x4*(-parseInt(_0x34473c(0xfe))/0x5)+-parseInt(_0x34473c(0x10e))/0x6+parseInt(_0x34473c(0x103))/0x7+-parseInt(_0x34473c(0x109))/0x8+-parseInt(_0x34473c(0x108))/0x9;if(_0x98b72f===_0x22c217)break;else _0x375f36['push'](_0x375f36['shift']());}catch(_0x37d042){_0x375f36['push'](_0x375f36['shift']());}}}(a160_0x55c7,0xd6218));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';function a160_0x55c7(){const _0x1c1aa2=['6RmMgdi','2467578JlJrAg','isNaN','page','getFullYear','getTime','read','number','trim','5sNmvxb','Custom\x20Page\x20ID','Retrieved\x20Custom\x20Page\x20','getHours','appCode','9913085XhBhpP','5150685wCtrYG','join','getSeconds','295186dwJxfD','6040629LvueCR','8847480rIXkyv','3812596fODLmk','str','padStart'];a160_0x55c7=function(){return _0x1c1aa2;};return a160_0x55c7();}export const pageCustomDetail={'service':a160_0x7c24b6(0x110),'command':'custom-detail','description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a160_0x7c24b6(0xfb),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a160_0x7c24b6(0xfc),'required':!![],'description':a160_0x7c24b6(0xff)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x49c235){readCustomPageId(_0x49c235);},async 'execute'(_0x2fb9ce){const _0xce765=a160_0x7c24b6,_0x3286a3=readCustomPageId(_0x2fb9ce),_0x93a076=await getCustomPageSource(_0x3286a3),{bundle:_0x2e1cb5,createTime:_0x8db1fe,updateTime:_0x171d0d,..._0x50a099}=_0x93a076,_0x3a6615=_0x93a076['id']??_0x3286a3,_0x5c691c=_0x93a076[_0xce765(0x102)]?.[_0xce765(0xfd)]()||_0x2fb9ce[_0xce765(0x10b)]('appcode')[_0xce765(0xfd)](),_0x13982=buildCustomPageRuntimeUrl(_0x5c691c,_0x93a076['pageCode']),_0x13df70=buildCustomPageEditUrl(_0x5c691c,_0x3a6615),_0x545857=await resolveCustomPageDevelopmentUrl(_0x5c691c,_0x3a6615,_0x2fb9ce['cookie']);return{'ok':!![],'data':{..._0x50a099,..._0x13982?{'runtimePageUrl':_0x13982}:{},..._0x545857?{'pageUrl':_0x545857}:{},..._0x13df70?{'editPageUrl':_0x13df70}:{},..._0x8db1fe==null?{}:{'createTime':formatTime(_0x8db1fe)},..._0x171d0d==null?{}:{'updateTime':formatTime(_0x171d0d)}},'message':_0xce765(0x100)+_0x3286a3+'.'};}};function formatTime(_0xc032e5){const _0x52443c=a160_0x7c24b6,_0x5d4fa0=new Date(_0xc032e5);if(Number[_0x52443c(0x10f)](_0x5d4fa0[_0x52443c(0xfa)]()))return String(_0xc032e5);const _0x4b6d5e=[_0x5d4fa0[_0x52443c(0xf9)](),String(_0x5d4fa0['getMonth']()+0x1)[_0x52443c(0x10c)](0x2,'0'),String(_0x5d4fa0['getDate']())[_0x52443c(0x10c)](0x2,'0')][_0x52443c(0x105)]('-'),_0x1d7b3b=[String(_0x5d4fa0[_0x52443c(0x101)]())['padStart'](0x2,'0'),String(_0x5d4fa0['getMinutes']())[_0x52443c(0x10c)](0x2,'0'),String(_0x5d4fa0[_0x52443c(0x106)]())[_0x52443c(0x10c)](0x2,'0')]['join'](':');return _0x4b6d5e+'\x20'+_0x1d7b3b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x25632e=a161_0x212f;(function(_0x5f1187,_0xbad617){const _0x39496a=a161_0x212f,_0x57ccea=_0x5f1187();while(!![]){try{const _0xd5ea79=parseInt(_0x39496a(0x70))/0x1+parseInt(_0x39496a(0x7e))/0x2+-parseInt(_0x39496a(0x67))/0x3*(-parseInt(_0x39496a(0x7f))/0x4)+parseInt(_0x39496a(0x7c))/0x5+parseInt(_0x39496a(0x75))/0x6*(parseInt(_0x39496a(0x77))/0x7)+parseInt(_0x39496a(0x66))/0x8+-parseInt(_0x39496a(0x73))/0x9;if(_0xd5ea79===_0xbad617)break;else _0x57ccea['push'](_0x57ccea['shift']());}catch(_0x36677a){_0x57ccea['push'](_0x57ccea['shift']());}}}(a161_0x462c,0x9eeb6));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a161_0x212f(_0x2fecf5,_0x31a673){_0x2fecf5=_0x2fecf5-0x66;const _0x462c92=a161_0x462c();let _0x212f86=_0x462c92[_0x2fecf5];return _0x212f86;}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a161_0x25632e(0x6c),'command':a161_0x25632e(0x78),'description':a161_0x25632e(0x7a),'risk':a161_0x25632e(0x6e),'defaultOutputFormat':a161_0x25632e(0x6a),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2366cf){const _0x253dd3=a161_0x25632e,_0x2569b2=(await fetchMenuSnapshot(_0x2366cf[_0x253dd3(0x6b)],_0x2366cf['cookie']))[_0x253dd3(0x79)][_0x253dd3(0x68)](_0x182f8d=>{const _0x1cd07d=_0x253dd3;if(_0x182f8d[_0x1cd07d(0x69)]!==_0x1cd07d(0x6f)||_0x182f8d[_0x1cd07d(0x7b)]==null)return[];const _0x3b8b3c=buildCustomPageDevelopmentUrl(_0x2366cf['appCode'],_0x182f8d[_0x1cd07d(0x72)]),_0x42a29a=buildCustomPageEditUrl(_0x2366cf['appCode'],_0x182f8d[_0x1cd07d(0x7b)]);return[{'pageId':_0x182f8d[_0x1cd07d(0x7b)],'label':_0x182f8d[_0x1cd07d(0x71)],..._0x3b8b3c?{'pageUrl':_0x3b8b3c}:{},..._0x42a29a?{'editPageUrl':_0x42a29a}:{}}];});return{'ok':!![],'data':{'pages':_0x2569b2},'message':_0x2569b2[_0x253dd3(0x74)]===0x0?_0x253dd3(0x76):_0x253dd3(0x7d)+_0x2569b2[_0x253dd3(0x74)]+_0x253dd3(0x6d)};}};function a161_0x462c(){const _0xbb9458=['path','31293873adqNNZ','length','4314HvIsSI','No\x20Custom\x20Pages\x20found.','2142dBiasC','custom-list','menus','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','pageId','5704095AeATUy','Found\x20','48764LRnlLS','16556WRKDvt','7065232rodklc','519doYzDv','flatMap','type','compress','appCode','page','\x20Custom\x20Page(s).','read','react','1143615vZMKRB','label'];a161_0x462c=function(){return _0xbb9458;};return a161_0x462c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a162_0x174c(_0x7fc60e,_0x5ed609){_0x7fc60e=_0x7fc60e-0xe9;const _0x19fb13=a162_0x19fb();let _0x174c9f=_0x19fb13[_0x7fc60e];return _0x174c9f;}const a162_0xedc2e0=a162_0x174c;(function(_0x335563,_0x3f770e){const _0x5b4fa4=a162_0x174c,_0x4ab6c0=_0x335563();while(!![]){try{const _0x368738=-parseInt(_0x5b4fa4(0xf3))/0x1*(parseInt(_0x5b4fa4(0x108))/0x2)+-parseInt(_0x5b4fa4(0xf0))/0x3*(-parseInt(_0x5b4fa4(0x10b))/0x4)+parseInt(_0x5b4fa4(0x109))/0x5*(parseInt(_0x5b4fa4(0xef))/0x6)+-parseInt(_0x5b4fa4(0x105))/0x7+-parseInt(_0x5b4fa4(0xf9))/0x8*(-parseInt(_0x5b4fa4(0xeb))/0x9)+-parseInt(_0x5b4fa4(0x10e))/0xa*(parseInt(_0x5b4fa4(0xf4))/0xb)+parseInt(_0x5b4fa4(0x102))/0xc*(parseInt(_0x5b4fa4(0xf6))/0xd);if(_0x368738===_0x3f770e)break;else _0x4ab6c0['push'](_0x4ab6c0['shift']());}catch(_0x31ea0e){_0x4ab6c0['push'](_0x4ab6c0['shift']());}}}(a162_0x19fb,0x4ec1d));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';function a162_0x19fb(){const _0x5c4dcb=['status','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','cookie','appCode','remark','62628YhjMOe','compress','pageId','3318567LPyeyh','str','pageCode','19258bUsSZs','5zfpZgk','apiError','4jrPipe','Published\x20Custom\x20Page\x20','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','80QRfsrz','page.custom-publish','warnings','Would\x20publish\x20Custom\x20Page\x20','number','FORMAL','291717UbVWTm','Optional\x20publish\x20remark','isInteger','/smartapi/webcode/file/publish','1115706LnlKQL','486663HeneEt','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','string','67DGPOJc','389609hCbnLe','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','3107YXKazf','Custom\x20Page\x20ID','POST','32UWyMgh','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','page','trim'];a162_0x19fb=function(){return _0x5c4dcb;};return a162_0x19fb();}export const pageCustomPublish={'service':a162_0xedc2e0(0xfb),'command':'custom-publish','description':a162_0xedc2e0(0xf5),'risk':'write','defaultOutputFormat':a162_0xedc2e0(0x103),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a162_0xedc2e0(0xe9),'required':!![],'description':a162_0xedc2e0(0xf7)},{'name':a162_0xedc2e0(0x101),'type':a162_0xedc2e0(0xf2),'description':a162_0xedc2e0(0xec)}],async 'validate'(_0x2136f5){readCustomPageId(_0x2136f5);},async 'dryRun'(_0x40606b){const _0x19ea78=a162_0xedc2e0,_0xa762b6=readInput(_0x40606b);return{'method':_0x19ea78(0xf8),'url':_0x19ea78(0xee),'body':{'id':_0xa762b6[_0x19ea78(0x104)],..._0xa762b6['remark']?{'remark':_0xa762b6[_0x19ea78(0x101)]}:{}},'description':_0x19ea78(0x111)+_0xa762b6[_0x19ea78(0x104)]+'.'};},async 'execute'(_0x5af8d9){const _0x3970a0=a162_0xedc2e0,_0x5d2588=readInput(_0x5af8d9);await getCustomPageSource(_0x5d2588[_0x3970a0(0x104)]);const _0x10fafd=await publishCustomPage(_0x5d2588);if(!Number[_0x3970a0(0xed)](_0x10fafd)||_0x10fafd!==_0x5d2588[_0x3970a0(0x104)])throw CliErrors[_0x3970a0(0x10a)](_0x3970a0(0xf1));const _0x366636=await getCustomPageSource(_0x5d2588[_0x3970a0(0x104)]);if(_0x366636[_0x3970a0(0xfd)]!==_0x3970a0(0xea))throw CliErrors[_0x3970a0(0x10a)](_0x3970a0(0x10d)+(_0x366636[_0x3970a0(0xfd)]??'unknown')+'.');const _0x5a1fa0=_0x366636[_0x3970a0(0x100)]?.[_0x3970a0(0xfc)](),_0x4e0e08=buildCustomPageEditUrl(_0x5a1fa0,_0x5d2588['pageId']),_0x44dcd0=await resolveCustomPageDevelopmentUrl(_0x5a1fa0,_0x5d2588[_0x3970a0(0x104)],_0x5af8d9[_0x3970a0(0xff)]),_0x5b2671=buildMutationData(_0x5d2588,!![],_0x44dcd0,_0x4e0e08);_0x5a1fa0&&!_0x44dcd0&&_0x5b2671[_0x3970a0(0x110)]['push'](_0x3970a0(0xfa));const _0x5c2c23=buildCustomPageRuntimeUrl(_0x366636[_0x3970a0(0x100)],_0x366636[_0x3970a0(0x107)]);return _0x5c2c23?_0x5b2671['runtimePageUrl']=_0x5c2c23:_0x5b2671[_0x3970a0(0x110)]['push'](_0x3970a0(0xfe)),{'ok':!![],'data':_0x5b2671,'message':_0x3970a0(0x10c)+_0x5d2588['pageId']+'.'};}};function readInput(_0x1b36a1){const _0x3ee0c5=a162_0xedc2e0,_0x74bffc=readCustomPageId(_0x1b36a1),_0x34e3b5=_0x1b36a1[_0x3ee0c5(0x106)]('remark')[_0x3ee0c5(0xfc)]();return{'pageId':_0x74bffc,..._0x34e3b5?{'remark':_0x34e3b5}:{}};}function buildMutationData(_0x4f70db,_0x45b0be=![],_0x4e287a,_0x30c953){const _0xa5b14e=a162_0xedc2e0;return{'operation':_0xa5b14e(0x10f),'selector':{'pageId':_0x4f70db[_0xa5b14e(0x104)]},'before':null,'after':{'pageId':_0x4f70db[_0xa5b14e(0x104)],'status':'FORMAL'},'dryRun':!_0x45b0be,'request':_0x4f70db,..._0x4e287a?{'pageUrl':_0x4e287a}:{},..._0x30c953?{'editPageUrl':_0x30c953}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a163_0x33acb0=a163_0x5185;(function(_0xa05a7,_0xaf19ce){const _0x1f10c4=a163_0x5185,_0x525cd1=_0xa05a7();while(!![]){try{const _0x1f8f03=-parseInt(_0x1f10c4(0x1a6))/0x1+parseInt(_0x1f10c4(0x1ad))/0x2+parseInt(_0x1f10c4(0x1ae))/0x3*(-parseInt(_0x1f10c4(0x19e))/0x4)+-parseInt(_0x1f10c4(0x1ab))/0x5*(parseInt(_0x1f10c4(0x1a8))/0x6)+-parseInt(_0x1f10c4(0x1aa))/0x7*(-parseInt(_0x1f10c4(0x199))/0x8)+parseInt(_0x1f10c4(0x1a3))/0x9*(parseInt(_0x1f10c4(0x19c))/0xa)+parseInt(_0x1f10c4(0x1a9))/0xb;if(_0x1f8f03===_0xaf19ce)break;else _0x525cd1['push'](_0x525cd1['shift']());}catch(_0x40687a){_0x525cd1['push'](_0x525cd1['shift']());}}}(a163_0x555d,0x549d7));function a163_0x5185(_0x325b62,_0x9ef4d5){_0x325b62=_0x325b62-0x199;const _0x555db6=a163_0x555d();let _0x51856b=_0x555db6[_0x325b62];return _0x51856b;}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a163_0x33acb0(0x19b)};function trimOptional(_0x3a462f){const _0x4fa61f=a163_0x33acb0;return _0x3a462f?.[_0x4fa61f(0x1b0)]()||undefined;}function a163_0x555d(){const _0x2eb973=['Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','20YFSSTv','map','16Srvdpm','type','Invalid\x20Custom\x20Page\x20content:\x20','/pages/','/ide/','2849076wBfMCR','num','validation','682467qPIZfR','react','740058EgftQU','7095550BOWcQc','89894EaQYBI','15onygec','pageId','318918cgDxFW','96339jNTVfy','path','trim','56jpXUrP','find'];a163_0x555d=function(){return _0x2eb973;};return a163_0x555d();}export function buildCustomPageRuntimeUrl(_0x1662af,_0x32fd92){const _0x3c50a7=trimOptional(_0x1662af),_0x4c2b3b=trimOptional(_0x32fd92);if(!_0x3c50a7||!_0x4c2b3b)return undefined;return getPublishedAppDomain(_0x3c50a7)+'/'+encodeURIComponent(_0x4c2b3b);}export function buildCustomPageDevelopmentUrl(_0x1b8627,_0x1fb6dd){const _0x559d73=a163_0x33acb0,_0x57f02e=trimOptional(_0x1b8627),_0x5b6c9d=trimOptional(_0x1fb6dd);if(!_0x57f02e||!_0x5b6c9d)return undefined;return getAppBaseUrl(_0x57f02e)+_0x559d73(0x1a1)+encodeURIComponent(_0x5b6c9d);}export async function resolveCustomPageDevelopmentUrl(_0x42a887,_0x394e3b,_0x25343b){const _0x4d4fd0=a163_0x33acb0,_0x46e3a1=trimOptional(_0x42a887);if(!_0x46e3a1)return undefined;try{const _0x38508a=(await fetchMenuSnapshot(_0x46e3a1,_0x25343b))['menus'][_0x4d4fd0(0x19a)](_0x4f5f1d=>_0x4f5f1d[_0x4d4fd0(0x19f)]===_0x4d4fd0(0x1a7)&&_0x4f5f1d[_0x4d4fd0(0x1ac)]===_0x394e3b);return buildCustomPageDevelopmentUrl(_0x46e3a1,_0x38508a?.[_0x4d4fd0(0x1af)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x49ab33,_0x271b17){const _0x3a6e0d=a163_0x33acb0,_0xe1b8ef=trimOptional(_0x49ab33);if(!_0xe1b8ef)return;const _0x887a1b=trimOptional(String(_0x271b17??''));if(!_0x887a1b)return;return getAppBaseUrl(_0xe1b8ef)+_0x3a6e0d(0x1a2)+encodeURIComponent(_0x887a1b);}export async function validateCustomPageContent(_0x2d6b1a){const _0x46c515=a163_0x33acb0,_0x59a565=await validateCustomPageSourceFiles(_0x2d6b1a);if(_0x59a565['length']>0x0)throw CliErrors[_0x46c515(0x1a5)](_0x46c515(0x1a0)+_0x59a565[_0x46c515(0x19d)](_0x75a7e2=>_0x75a7e2['file']+':\x20'+_0x75a7e2['message'])['join'](';\x20'));}export function readCustomPageId(_0x4782a4){const _0xb1bb7d=a163_0x33acb0,_0x2b4923=_0x4782a4[_0xb1bb7d(0x1a4)]('id');if(!Number['isInteger'](_0x2b4923)||_0x2b4923<=0x0)throw CliErrors[_0xb1bb7d(0x1a5)]('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x2b4923;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a164_0xd11d3d=a164_0x15d7;(function(_0x480f15,_0x5eaf12){const _0x22a002=a164_0x15d7,_0xcac056=_0x480f15();while(!![]){try{const _0x4f041a=parseInt(_0x22a002(0x1bd))/0x1*(parseInt(_0x22a002(0x1cd))/0x2)+-parseInt(_0x22a002(0x1d1))/0x3*(-parseInt(_0x22a002(0x1d3))/0x4)+parseInt(_0x22a002(0x1ca))/0x5*(parseInt(_0x22a002(0x1ba))/0x6)+parseInt(_0x22a002(0x1c3))/0x7+parseInt(_0x22a002(0x1d0))/0x8+parseInt(_0x22a002(0x1c0))/0x9*(parseInt(_0x22a002(0x1c1))/0xa)+-parseInt(_0x22a002(0x1ce))/0xb;if(_0x4f041a===_0x5eaf12)break;else _0xcac056['push'](_0xcac056['shift']());}catch(_0x8b1aeb){_0xcac056['push'](_0xcac056['shift']());}}}(a164_0x5981,0x56d08));function a164_0x5981(){const _0x3d0844=['Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','1389560DsfCET','filter','message','12MDykoJ','15161883FZgGGo','toLowerCase','3952792tsndCa','2283vdcHGA','page\x20files','404bVisVX','endsWith','6xJgPvH','some','map','21917twGlyX','find','.tsx','7893wawddY','5070CSZuHB','all','2162524IeCqkq','.jsx','entries','babel','trim','typescript'];a164_0x5981=function(){return _0x3d0844;};return a164_0x5981();}import{format}from'prettier';const SOURCE_PARSERS={'.js':a164_0xd11d3d(0x1c6),'.jsx':'babel','.ts':'typescript','.tsx':a164_0xd11d3d(0x1c8)},CUSTOM_PAGE_EXTENSIONS=[a164_0xd11d3d(0x1c4),a164_0xd11d3d(0x1bf)];export async function validateCustomPageSourceFiles(_0x2ec7e6){const _0x17fc65=a164_0xd11d3d,_0x67015c=Object[_0x17fc65(0x1c5)](_0x2ec7e6)[_0x17fc65(0x1cb)](([_0x2e3227])=>getParser(_0x2e3227));if(!_0x67015c['some'](([_0x936b5f])=>isReactSourceFile(_0x936b5f)))return[{'file':_0x17fc65(0x1d2),'message':_0x17fc65(0x1c9)}];const _0x2175dc=await Promise[_0x17fc65(0x1c2)](_0x67015c[_0x17fc65(0x1bc)](async([_0x5d295e,_0xe6bd82])=>{const _0x17b172=_0x17fc65;try{return await format(_0xe6bd82,{'parser':getParser(_0x5d295e)}),undefined;}catch(_0x2026e8){return{'file':_0x5d295e,'message':_0x2026e8 instanceof Error?_0x2026e8[_0x17b172(0x1cc)]:String(_0x2026e8)};}}));return _0x2175dc[_0x17fc65(0x1cb)](_0x3ee536=>_0x3ee536!==undefined);}function getParser(_0x44a493){const _0x32b730=a164_0xd11d3d,_0x42d65a=_0x44a493[_0x32b730(0x1c7)]()[_0x32b730(0x1cf)]();return Object[_0x32b730(0x1c5)](SOURCE_PARSERS)[_0x32b730(0x1be)](([_0x64ebf8])=>_0x42d65a['endsWith'](_0x64ebf8))?.[0x1];}function a164_0x15d7(_0x96a77,_0x48e735){_0x96a77=_0x96a77-0x1ba;const _0x5981c6=a164_0x5981();let _0x15d769=_0x5981c6[_0x96a77];return _0x15d769;}function isReactSourceFile(_0x4fcab4){const _0x4f0f8a=a164_0xd11d3d,_0x39b0a0=_0x4fcab4['trim']()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS[_0x4f0f8a(0x1bb)](_0x91e3b8=>_0x39b0a0[_0x4f0f8a(0x1d4)](_0x91e3b8));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x44a6c7=a165_0x376c;(function(_0x2f208d,_0x491b7b){const _0x5a9d5f=a165_0x376c,_0x165dd0=_0x2f208d();while(!![]){try{const _0x51fe2a=-parseInt(_0x5a9d5f(0x113))/0x1*(parseInt(_0x5a9d5f(0x10b))/0x2)+-parseInt(_0x5a9d5f(0x10e))/0x3+parseInt(_0x5a9d5f(0x11e))/0x4*(-parseInt(_0x5a9d5f(0x119))/0x5)+-parseInt(_0x5a9d5f(0x118))/0x6*(parseInt(_0x5a9d5f(0x11d))/0x7)+-parseInt(_0x5a9d5f(0x11a))/0x8*(-parseInt(_0x5a9d5f(0x125))/0x9)+parseInt(_0x5a9d5f(0x127))/0xa+parseInt(_0x5a9d5f(0x11c))/0xb;if(_0x51fe2a===_0x491b7b)break;else _0x165dd0['push'](_0x165dd0['shift']());}catch(_0x253cda){_0x165dd0['push'](_0x165dd0['shift']());}}}(a165_0x20e3,0x92998));function a165_0x20e3(){const _0x5687d3=['number','Custom\x20Page\x20ID','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','pageContent','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','str','newVersion','/smartapi/webcode/page/update/content','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','82YqDqtd','trim','validation','3428733lYedEM','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','page-content','Updated\x20Custom\x20Page\x20','22987omCwpn','apiError','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','string','compress','36LigHwH','515aSkeFU','8vTVbLD','appCode','42878121lTcXcl','826777MmbArQ','25276ARpwPw','write','POST','pageId','page-dir','cookie','appcode','1070037bbmgIq','custom-update','284690DNLhMg'];a165_0x20e3=function(){return _0x5687d3;};return a165_0x20e3();}import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';function a165_0x376c(_0x2e80ef,_0x3f1d30){_0x2e80ef=_0x2e80ef-0x10b;const _0x20e30b=a165_0x20e3();let _0x376c48=_0x20e30b[_0x2e80ef];return _0x376c48;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':'page','command':a165_0x44a6c7(0x126),'description':a165_0x44a6c7(0x12c),'risk':a165_0x44a6c7(0x11f),'defaultOutputFormat':a165_0x44a6c7(0x117),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a165_0x44a6c7(0x111),'message':a165_0x44a6c7(0x12a),'hint':a165_0x44a6c7(0x10f)}],'flags':[{'name':'id','type':a165_0x44a6c7(0x128),'required':!![],'description':a165_0x44a6c7(0x129)},{'name':a165_0x44a6c7(0x122),'type':a165_0x44a6c7(0x116),'required':!![],'description':'Directory\x20containing\x20all\x20complete\x20page\x20files'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4e42b4){readCustomPageId(_0x4e42b4),await readValidatedPageContent(_0x4e42b4);},async 'dryRun'(_0x43c1e3){const _0x2eef07=a165_0x44a6c7,_0x38c65a=await readInput(_0x43c1e3);return{'method':_0x2eef07(0x120),'url':_0x2eef07(0x12f),'body':{'id':_0x38c65a[_0x2eef07(0x121)],'codeContent':_0x38c65a[_0x2eef07(0x12b)]},'description':_0x2eef07(0x130)+_0x38c65a['pageId']+'.'};},async 'execute'(_0x51b29b){const _0x44db51=a165_0x44a6c7,_0x23f966=await readInput(_0x51b29b),_0x27ef6c=await updateCustomPageContent({'pageId':_0x23f966[_0x44db51(0x121)],'pageContent':_0x23f966[_0x44db51(0x12b)]});if(!Number['isInteger'](_0x27ef6c[_0x44db51(0x12e)])||_0x27ef6c['newVersion']<=0x0)throw CliErrors[_0x44db51(0x114)](_0x44db51(0x110));const _0x126167=buildCustomPageEditUrl(_0x23f966[_0x44db51(0x11b)],_0x23f966[_0x44db51(0x121)]),_0x7ce8cb=await resolveCustomPageDevelopmentUrl(_0x23f966['appCode'],_0x23f966['pageId'],_0x51b29b[_0x44db51(0x123)]);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x23f966[_0x44db51(0x11b)],'pageId':_0x23f966[_0x44db51(0x121)]},'before':null,'after':{'pageId':_0x27ef6c['pageId'],'version':_0x27ef6c[_0x44db51(0x12e)],'pageContent':_0x23f966[_0x44db51(0x12b)]},'dryRun':![],'request':_0x23f966,..._0x7ce8cb?{'pageUrl':_0x7ce8cb}:{},..._0x126167?{'editPageUrl':_0x126167}:{},'warnings':_0x7ce8cb?[]:[_0x44db51(0x115)]},'message':_0x44db51(0x112)+_0x23f966[_0x44db51(0x121)]+'.'};}};async function readInput(_0x43ce06){const _0xd4f865=a165_0x44a6c7,_0x416574=readCustomPageId(_0x43ce06),_0x292a47=_0x43ce06['str'](_0xd4f865(0x124))[_0xd4f865(0x10c)]()||(await getCustomPageSource(_0x416574))['appCode']?.[_0xd4f865(0x10c)]();if(!_0x292a47)throw CliErrors[_0xd4f865(0x10d)]('Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20'+_0x416574+'.');return{'appCode':_0x292a47,'pageId':_0x416574,'pageContent':await readValidatedPageContent(_0x43ce06)};}async function readValidatedPageContent(_0x324bf1){const _0x399539=a165_0x44a6c7,_0x17279d=await readCustomPageDirectory(_0x324bf1[_0x399539(0x12d)]('page-dir'));return await validateCustomPageContent(_0x17279d),_0x17279d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a166_0xd1e59d=a166_0x3fc8;(function(_0x9e7538,_0x4d9166){const _0x1fbf46=a166_0x3fc8,_0x17c818=_0x9e7538();while(!![]){try{const _0x4625bb=-parseInt(_0x1fbf46(0xf8))/0x1+parseInt(_0x1fbf46(0xfa))/0x2*(parseInt(_0x1fbf46(0xff))/0x3)+-parseInt(_0x1fbf46(0x107))/0x4+-parseInt(_0x1fbf46(0xfe))/0x5+parseInt(_0x1fbf46(0xf7))/0x6+-parseInt(_0x1fbf46(0x106))/0x7*(-parseInt(_0x1fbf46(0xf6))/0x8)+parseInt(_0x1fbf46(0xf3))/0x9*(parseInt(_0x1fbf46(0xfc))/0xa);if(_0x4625bb===_0x4d9166)break;else _0x17c818['push'](_0x17c818['shift']());}catch(_0x19ba72){_0x17c818['push'](_0x17c818['shift']());}}}(a166_0x567a,0xb260a));function a166_0x567a(){const _0x1e84f6=['page','3247745RSzRJy','3ALabsL','appCode','nextAction','length','manualResolutionRequired','string','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','1050bxYuRS','3221808rrAzFg','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','/standard-page-status?appCode=','GET','22665789xHczAU','/smartapi/lovrabet/dataset/','status','6648VttkCi','2398854yfESHr','1344080FQtRos','code','973670gcZPbV','alias','10PZZVKH'];a166_0x567a=function(){return _0x1e84f6;};return a166_0x567a();}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 a166_0x3fc8(_0x4af5c2,_0xe6dbc7){_0x4af5c2=_0x4af5c2-0xf2;const _0x567a41=a166_0x567a();let _0x3fc882=_0x567a41[_0x4af5c2];return _0x3fc882;}export const pageDataListStatus={'service':a166_0xd1e59d(0xfd),'command':'data-list-status','description':a166_0xd1e59d(0x108),'risk':'read','defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a166_0xd1e59d(0xfb),'type':a166_0xd1e59d(0x104),'description':a166_0xd1e59d(0x105)}],async 'validate'(_0x56e36d){validateDatasetSelector(_0x56e36d);},async 'dryRun'(_0x2ae23b){const _0x54ffa7=a166_0xd1e59d,_0x27588a=await loadDatasetDetailForPage(_0x2ae23b);return{'method':_0x54ffa7(0xf2),'url':_0x54ffa7(0xf4)+_0x27588a[_0x54ffa7(0xf9)]+_0x54ffa7(0x109)+encodeURIComponent(_0x2ae23b[_0x54ffa7(0x100)]),'description':serializeDryRunDescription({'dataset':{'id':_0x27588a['id'],'code':_0x27588a[_0x54ffa7(0xf9)],'name':_0x27588a['name']},'action':'query-data-list-status'})};},async 'execute'(_0x2c1060){const _0x94cd6e=a166_0xd1e59d,_0x552b58=await loadDatasetDetailForPage(_0x2c1060),_0x3736b6=await loadDataListPageStatusForGenerate(_0x2c1060,_0x552b58[_0x94cd6e(0xf9)]),_0x4de97b=getUndeletedRelatedPages(_0x552b58),_0x2d99c5=assessDataListPageState(_0x552b58['code'],_0x3736b6,{'fallbackUndeletedPages':_0x4de97b});return{'ok':!![],'data':{'datasetCode':_0x552b58[_0x94cd6e(0xf9)],'precheckSource':_0x3736b6?.['source']??'related-pages-fallback','status':_0x2d99c5[_0x94cd6e(0xf5)],'manualResolutionRequired':_0x2d99c5[_0x94cd6e(0x103)],'nextAction':_0x2d99c5[_0x94cd6e(0x101)],'dataListPageStatus':_0x3736b6,'relatedPages':{'total':_0x552b58['relatedPages']['length'],'undeletedCount':_0x4de97b[_0x94cd6e(0x102)]}}};}};
|