@lovrabet/rabetbase-cli 2.5.4-beta.4 → 2.5.4-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/detail.d.ts +2 -0
- package/lib/commands/app/detail.js +1 -0
- 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/logs.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/batch-design.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/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.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/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.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.d.ts +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +3 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.d.ts +2 -0
- package/lib/commands/menu/shared/path.js +1 -0
- package/lib/commands/menu/shared/service.d.ts +6 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.d.ts +28 -0
- package/lib/commands/menu/shared/subapp-assets.js +1 -0
- package/lib/commands/menu/shared/sync-core.d.ts +2 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +14 -4
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-status.js +1 -0
- package/lib/commands/menu/subapp-assets-update.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-update.js +1 -0
- 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/api-architecture-upgrade.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/feishu-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.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +15 -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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.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.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +21 -12
- package/skills/rabetbase/guides/backend-function.md +2 -7
- package/skills/rabetbase/guides/bff-creation-workflow.md +24 -23
- package/skills/rabetbase/guides/host-frontend-integration.md +62 -0
- package/skills/rabetbase/guides/independent-deployment.md +45 -0
- package/skills/rabetbase/guides/troubleshooting.md +9 -1
- package/skills/rabetbase/references/rabetbase-app-detail.md +31 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +2 -2
- package/skills/rabetbase/references/rabetbase-data-list-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +5 -1
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -7
- package/skills/rabetbase/references/rabetbase-menu-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-status.md +19 -0
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-update.md +27 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +40 -14
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -3
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +1 -0
- package/skills/rabetbase.manifest.json +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x52a442=a182_0x1304;(function(_0x5f36ad,_0x57d627){const _0x96c578=a182_0x1304,_0x28aecb=_0x5f36ad();while(!![]){try{const _0x30e249=-parseInt(_0x96c578(0x91))/0x1+-parseInt(_0x96c578(0x81))/0x2*(-parseInt(_0x96c578(0x7a))/0x3)+-parseInt(_0x96c578(0x89))/0x4+-parseInt(_0x96c578(0x90))/0x5+-parseInt(_0x96c578(0x8f))/0x6*(parseInt(_0x96c578(0x8b))/0x7)+-parseInt(_0x96c578(0x79))/0x8+parseInt(_0x96c578(0x8d))/0x9;if(_0x30e249===_0x57d627)break;else _0x28aecb['push'](_0x28aecb['shift']());}catch(_0x1316f1){_0x28aecb['push'](_0x28aecb['shift']());}}}(a182_0x2d8a,0xe106b));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a182_0x1304(_0x2d9e4d,_0x2b927d){_0x2d9e4d=_0x2d9e4d-0x79;const _0x2d8a40=a182_0x2d8a();let _0x13042e=_0x2d8a40[_0x2d9e4d];return _0x13042e;}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH='/notification/channel-config/delete',REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x4a0278){const _0x4a000b=a182_0x1304,_0x4b9d58=readNotificationId(_0x4a0278),_0xfac836=await requireExactNotificationConfig(_0x4a0278['appCode'],_0x4b9d58,_0x4a000b(0x88));return{'id':_0x4b9d58,'before':_0xfac836};}export const notificationConfigDelete={'service':'notification','command':a182_0x52a442(0x84),'description':a182_0x52a442(0x7c),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x23ef42){readNotificationId(_0x23ef42),requireNotificationExplicitYes(_0x23ef42);},async 'dryRun'(_0x11b9c6){const _0x328d15=a182_0x52a442,_0x19d4d3=await prepareDelete(_0x11b9c6),_0x2b9fa3=notificationLookupCommand(_0x11b9c6[_0x328d15(0x85)],_0x19d4d3[_0x328d15(0x8a)]['channelType']);return asDryRunResult({'operation':_0x328d15(0x88),'selector':notificationSelector(_0x19d4d3[_0x328d15(0x8a)]),'before':projectNotificationConfig(_0x19d4d3[_0x328d15(0x8a)]),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x2b9fa3}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x76924a){const _0x548975=a182_0x52a442;requireNotificationExplicitYes(_0x76924a);const _0x2a23c5=await prepareDelete(_0x76924a),_0x57c1e0=notificationLookupCommand(_0x76924a[_0x548975(0x85)],_0x2a23c5['before'][_0x548975(0x7d)]);let _0x1852ea=![];try{await deleteNotificationChannelConfig(_0x2a23c5['id'],_0x76924a[_0x548975(0x85)]);}catch(_0x4d408a){if(!isPlatformTransportFailure(_0x4d408a))throw safeApiFailure('delete',_0x548975(0x87),_0x548975(0x80)+_0x57c1e0+_0x548975(0x8e));_0x1852ea=!![];}let _0x3cadc4;try{_0x3cadc4=await listNotificationChannelConfigs(_0x76924a['appCode'],_0x2a23c5[_0x548975(0x8a)][_0x548975(0x7d)]),validateNotificationDeleteReadback(_0x3cadc4,_0x76924a[_0x548975(0x85)],_0x2a23c5[_0x548975(0x8a)][_0x548975(0x7d)]);}catch{throw notificationError(_0x1852ea?_0x548975(0x86):'notification_config_delete_verification_unavailable','Notification\x20config\x20'+_0x2a23c5['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x548975(0x80)+_0x57c1e0+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x3cadc4[_0x548975(0x7f)](_0x231597=>_0x231597['id']===_0x2a23c5['id']))throw notificationError(_0x1852ea?_0x548975(0x86):_0x548975(0x8c),'Notification\x20config\x20'+_0x2a23c5['id']+'\x20remains\x20present\x20after\x20delete.',_0x548975(0x80)+_0x57c1e0+_0x548975(0x82));const _0x5cb903=[REFERENCE_WARNING];return _0x1852ea&&_0x5cb903[_0x548975(0x7e)](_0x548975(0x83)),{'ok':!![],'data':{'operation':_0x548975(0x88),'selector':notificationSelector(_0x2a23c5['before']),'before':projectNotificationConfig(_0x2a23c5['before']),'after':null,'dryRun':![],'backend':{'method':_0x548975(0x7b),'path':DELETE_PATH},'warnings':_0x5cb903,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1852ea,'lookupCommand':_0x57c1e0}},'message':'Deleted\x20notification\x20config\x20'+_0x2a23c5['id']};}};function a182_0x2d8a(){const _0x1c9bfe=['11274fDlcxA','335440NUJUNT','400606CZkELA','5397328jQpDqk','1613583lEtbyi','POST','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','channelType','unshift','some','Inspect\x20with\x20','6mGZXYX',';\x20do\x20not\x20resubmit\x20automatically.','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','config-delete','appCode','notification_config_delete_outcome_unknown','mutation','delete','4850360TijjRh','before','1141EZraZE','notification_config_delete_verification_failed','17724159eUoFzP',';\x20no\x20automatic\x20retry\x20was\x20attempted.'];a182_0x2d8a=function(){return _0x1c9bfe;};return a182_0x2d8a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a183_0x4a4c(_0x5b0271,_0x2b3a59){_0x5b0271=_0x5b0271-0x1b2;const _0x58bc10=a183_0x58bc();let _0x4a4c1a=_0x58bc10[_0x5b0271];return _0x4a4c1a;}const a183_0x30cabb=a183_0x4a4c;(function(_0x160a65,_0x23cb75){const _0x2ed61a=a183_0x4a4c,_0x2373d1=_0x160a65();while(!![]){try{const _0x46fe75=parseInt(_0x2ed61a(0x1b5))/0x1+parseInt(_0x2ed61a(0x1b4))/0x2*(parseInt(_0x2ed61a(0x1c5))/0x3)+-parseInt(_0x2ed61a(0x1b8))/0x4+parseInt(_0x2ed61a(0x1cb))/0x5+parseInt(_0x2ed61a(0x1b3))/0x6+parseInt(_0x2ed61a(0x1bd))/0x7+-parseInt(_0x2ed61a(0x1b9))/0x8*(parseInt(_0x2ed61a(0x1ba))/0x9);if(_0x46fe75===_0x23cb75)break;else _0x2373d1['push'](_0x2373d1['shift']());}catch(_0x1ff554){_0x2373d1['push'](_0x2373d1['shift']());}}}(a183_0x58bc,0x58829));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a183_0x58bc(){const _0x2bb2ab=['config-list','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','appCode','type','length','2556020bmDebG','bool','3340698tNnxKI','42bLfKjZ','550365OmrtCE','all','Found\x20','35484elWWiS','24rvRInR','5749470hjxBhO','str','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','4664184aAasGQ','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','map','notification','Notification\x20channel\x20type','validation','\x20notification\x20config(s)','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','462takvmJ'];a183_0x58bc=function(){return _0x2bb2ab;};return a183_0x58bc();}export const notificationConfigList={'service':a183_0x30cabb(0x1c0),'command':a183_0x30cabb(0x1c6),'description':a183_0x30cabb(0x1c4),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a183_0x30cabb(0x1c9),'type':'string','description':a183_0x30cabb(0x1c1),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':'boolean','default':![],'description':a183_0x30cabb(0x1c7)}],async 'validate'(_0xd37d17){const _0xff2fc9=a183_0x30cabb;if(_0xd37d17[_0xff2fc9(0x1b2)](_0xff2fc9(0x1b6))&&_0xd37d17[_0xff2fc9(0x1bb)](_0xff2fc9(0x1c9))['trim']())throw CliErrors[_0xff2fc9(0x1c2)](_0xff2fc9(0x1bc),_0xff2fc9(0x1be));if(_0xd37d17['bool'](_0xff2fc9(0x1b6)))return;readNotificationChannelType(_0xd37d17);},async 'execute'(_0x3e103f){const _0xc75b8=a183_0x30cabb;if(_0x3e103f['bool'](_0xc75b8(0x1b6))){const _0x378d86=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0xc75b8(0x1bf)](_0x120754=>listNotificationChannelConfigs(_0x3e103f[_0xc75b8(0x1c8)],_0x120754))),_0x5a9e80=_0x378d86['flat']()[_0xc75b8(0x1bf)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3e103f[_0xc75b8(0x1c8)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x5a9e80[_0xc75b8(0x1ca)],'configs':_0x5a9e80},'message':_0xc75b8(0x1b7)+_0x5a9e80['length']+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x1ca068=readNotificationChannelType(_0x3e103f),_0xd0fc87=await listNotificationChannelConfigs(_0x3e103f['appCode'],_0x1ca068),_0x2a18f1=_0xd0fc87[_0xc75b8(0x1bf)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3e103f[_0xc75b8(0x1c8)],'channelType':_0x1ca068,'count':_0x2a18f1[_0xc75b8(0x1ca)],'configs':_0x2a18f1},'message':_0xc75b8(0x1b7)+_0x2a18f1[_0xc75b8(0x1ca)]+'\x20'+_0x1ca068+_0xc75b8(0x1c3)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x35fbcc=a184_0x11f9;(function(_0x231179,_0x393bb1){const _0x5ad826=a184_0x11f9,_0x47b99c=_0x231179();while(!![]){try{const _0x2617ee=parseInt(_0x5ad826(0xf5))/0x1*(-parseInt(_0x5ad826(0xf3))/0x2)+parseInt(_0x5ad826(0x109))/0x3+-parseInt(_0x5ad826(0xfa))/0x4*(parseInt(_0x5ad826(0x10c))/0x5)+parseInt(_0x5ad826(0xfc))/0x6*(-parseInt(_0x5ad826(0x10f))/0x7)+-parseInt(_0x5ad826(0x107))/0x8*(parseInt(_0x5ad826(0xfb))/0x9)+-parseInt(_0x5ad826(0xf4))/0xa+parseInt(_0x5ad826(0x10e))/0xb;if(_0x2617ee===_0x393bb1)break;else _0x47b99c['push'](_0x47b99c['shift']());}catch(_0x33a17e){_0x47b99c['push'](_0x47b99c['shift']());}}}(a184_0x542b,0xb02d2));import{asDryRunResult}from'../../commands/common/dry-run.js';function a184_0x542b(){const _0x73b0b=['153256TlaFPK','notification_config_update_verification_failed','128937lLyhoV','notification_config_update_outcome_unknown','planned','18345BPKYVm','notification','21093743osROEL','35161hGtSef','Notification\x20config\x20','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','/notification/channel-config/update','POST','allMatch','provesChange','14278rQHFeb','1350200mnAWzc','50yWVTze','before','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.',';\x20do\x20not\x20resubmit\x20automatically.','appCode','156zMwUZR','279KbGnrN','12rjICEx','update','\x20via\x20','high-risk-write','verified','Inspect\x20with\x20--id\x20','mutation','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','channelType','verifiedFields'];a184_0x542b=function(){return _0x73b0b;};return a184_0x542b();}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=a184_0x35fbcc(0xef);async function prepareUpdate(_0x3fb942){const _0x2cbbf8=a184_0x35fbcc,_0xa102d4=readNotificationId(_0x3fb942),_0x30387c=await readNotificationDocument(_0x3fb942,_0x2cbbf8(0xfd)),_0x10f73a=await requireExactNotificationConfig(_0x3fb942[_0x2cbbf8(0xf9)],_0xa102d4,_0x2cbbf8(0xfd));return{'id':_0xa102d4,'patch':_0x30387c,'before':_0x10f73a,'payload':mergeUpdateInput(_0x10f73a,_0x30387c),'planned':plannedUpdateProjection(_0x10f73a,_0x30387c)};}function a184_0x11f9(_0x22768d,_0x34e722){_0x22768d=_0x22768d-0xee;const _0x542bb9=a184_0x542b();let _0x11f969=_0x542bb9[_0x22768d];return _0x11f969;}export const notificationConfigUpdate={'service':a184_0x35fbcc(0x10d),'command':'config-update','description':a184_0x35fbcc(0xee),'risk':a184_0x35fbcc(0xff),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x24f765){readNotificationId(_0x24f765),assertSingleNotificationSource(_0x24f765),requireNotificationExplicitYes(_0x24f765);},async 'dryRun'(_0x23c827){const _0x1abcd9=a184_0x35fbcc,_0xb92d69=await prepareUpdate(_0x23c827),_0x1bac03=notificationLookupCommand(_0x23c827[_0x1abcd9(0xf9)],_0xb92d69[_0x1abcd9(0xf6)][_0x1abcd9(0x105)]);return asDryRunResult({'operation':_0x1abcd9(0xfd),'selector':notificationSelector(_0xb92d69[_0x1abcd9(0xf6)]),'before':projectNotificationConfig(_0xb92d69[_0x1abcd9(0xf6)]),'after':_0xb92d69[_0x1abcd9(0x10b)],'dryRun':!![],'backend':{'method':_0x1abcd9(0xf0),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x1abcd9(0x10b),'lookupCommand':_0x1bac03}},{'method':_0x1abcd9(0xf0),'url':UPDATE_PATH});},async 'execute'(_0x233142){const _0x3d872c=a184_0x35fbcc;requireNotificationExplicitYes(_0x233142);const _0x24f97a=await prepareUpdate(_0x233142),_0x4522d5=notificationLookupCommand(_0x233142[_0x3d872c(0xf9)],_0x24f97a[_0x3d872c(0xf6)][_0x3d872c(0x105)]);let _0x4038fd=![];try{await updateNotificationChannelConfig(_0x24f97a['payload']);}catch(_0x496fde){if(!isPlatformTransportFailure(_0x496fde))throw safeApiFailure('update',_0x3d872c(0x102),'Inspect\x20ID\x20'+_0x24f97a['id']+'\x20with\x20'+_0x4522d5+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x4038fd=!![];}let _0x1459a6;try{const _0x32eb76=await getNotificationChannelConfig(_0x24f97a['id'],_0x233142['appCode']);_0x1459a6=normalizeExactNotificationConfig(_0x32eb76,_0x24f97a['id'],_0x233142['appCode']);}catch{throw notificationError(_0x4038fd?'notification_config_update_outcome_unknown':'notification_config_update_verification_unavailable','Notification\x20config\x20'+_0x24f97a['id']+_0x3d872c(0x104),_0x3d872c(0x101)+_0x24f97a['id']+_0x3d872c(0xfe)+_0x4522d5+_0x3d872c(0xf8));}const _0x454031=requestedSafeFieldsMatch(_0x24f97a[_0x3d872c(0xf6)],_0x1459a6,_0x24f97a['patch']);if(!_0x454031[_0x3d872c(0xf1)]||_0x4038fd&&!_0x454031[_0x3d872c(0xf2)])throw notificationError(_0x4038fd?_0x3d872c(0x10a):_0x3d872c(0x108),_0x3d872c(0x110)+_0x24f97a['id']+_0x3d872c(0x103),'Inspect\x20with\x20--id\x20'+_0x24f97a['id']+_0x3d872c(0xfe)+_0x4522d5+_0x3d872c(0xf8));const _0xe5e6ac=_0x4038fd?[_0x3d872c(0xf7)]:[];return{'ok':!![],'data':{'operation':_0x3d872c(0xfd),'selector':notificationSelector(_0x1459a6),'before':projectNotificationConfig(_0x24f97a[_0x3d872c(0xf6)]),'after':projectNotificationConfig(_0x1459a6),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0xe5e6ac,'verification':{'status':_0x3d872c(0x100),'recoveredAfterUnknownResponse':_0x4038fd,'verifiedFields':_0x454031[_0x3d872c(0x106)],'lookupCommand':_0x4522d5}},'message':'Updated\x20notification\x20config\x20'+_0x1459a6['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1f1219,_0x361025){const _0x7c4e1c=a185_0x2c25,_0x441560=_0x1f1219();while(!![]){try{const _0x5c11ea=-parseInt(_0x7c4e1c(0xaf))/0x1*(-parseInt(_0x7c4e1c(0xae))/0x2)+parseInt(_0x7c4e1c(0xb4))/0x3+-parseInt(_0x7c4e1c(0xac))/0x4+parseInt(_0x7c4e1c(0xad))/0x5+parseInt(_0x7c4e1c(0xb0))/0x6*(parseInt(_0x7c4e1c(0xb3))/0x7)+-parseInt(_0x7c4e1c(0xb2))/0x8+-parseInt(_0x7c4e1c(0xb1))/0x9;if(_0x5c11ea===_0x361025)break;else _0x441560['push'](_0x441560['shift']());}catch(_0x3031b3){_0x441560['push'](_0x441560['shift']());}}}(a185_0x1f94,0xa95c5));function a185_0x1f94(){const _0xe9a1ce=['94phIuia','247MKdksA','24OwEWhW','7598520ohHqxn','7763216MZJJbN','317541EtyaBe','3974442fEXdaW','923828EPDmwm','6107325HMLgxe'];a185_0x1f94=function(){return _0xe9a1ce;};return a185_0x1f94();}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a185_0x2c25(_0x226eb,_0x375666){_0x226eb=_0x226eb-0xac;const _0x1f94b1=a185_0x1f94();let _0x2c2544=_0x1f94b1[_0x226eb];return _0x2c2544;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a181_0x47f2aa=a181_0x3230;(function(_0xa392ce,_0x4a27de){const _0x183e09=a181_0x3230,_0x5c5c37=_0xa392ce();while(!![]){try{const _0x567153=-parseInt(_0x183e09(0xe1))/0x1*(-parseInt(_0x183e09(0x95))/0x2)+parseInt(_0x183e09(0xb5))/0x3*(parseInt(_0x183e09(0x9b))/0x4)+parseInt(_0x183e09(0x9c))/0x5+-parseInt(_0x183e09(0xd9))/0x6+parseInt(_0x183e09(0xb1))/0x7+parseInt(_0x183e09(0xc5))/0x8+parseInt(_0x183e09(0xe3))/0x9*(-parseInt(_0x183e09(0x9e))/0xa);if(_0x567153===_0x4a27de)break;else _0x5c5c37['push'](_0x5c5c37['shift']());}catch(_0x58e907){_0x5c5c37['push'](_0x5c5c37['shift']());}}}(a181_0x5c5c,0xefbd2));function a181_0x5c5c(){const _0x1df7b3=['endpointUrl','name','\x20has\x20an\x20invalid\x20channelType.','keys','notification_config_update_empty','notification_config_response_invalid','a\x20string\x20or\x20null','parse','fromName','notification_config_json_invalid','utf8','Notification\x20JSON\x20from\x20','channelConfig','prototype','readTimeout','boolean','Notification\x20config\x20','11547300eSyYtw','\x20is\x20invalid.','apiError','replyTo','\x22\x20must\x20be\x20','has','ccList','configCode','625694CCsRuz','endpointUrlRaw','29630979nAjNoU','file\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','\x22\x20cannot\x20exceed\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Item\x20','stringify','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','appCode','a\x20supported\x20string','path','mutation','description','call','str','channelConfigRaw','number','\x20has\x20invalid\x20field\x20\x22','failed','channelType','includes','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','stdin','validation','\x20--format\x20compress','EMAIL','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','hasOwnProperty','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Unknown\x20notification\x20JSON\x20field\x20\x22','<redacted>','length','setEncoding','string','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','kind','notification_config_id_invalid','Invalid\x20notification\x20config\x20response.','\x20has\x20an\x20unsupported\x20channelType.','Notification\x20JSON\x20field\x20\x22','trim','FEISHU','notification_config_field_unknown','WEBHOOK','notification_config_field_invalid','env','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','from-env','Create\x20JSON\x20requires\x20field\x20','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','4lNMvug','notification_config_confirmation_required','connectTimeout','yes','every','Application-level\x20notification\x20config\x20ID','297988voVbTC','5263995dOOmrZ','createTime','10VitPDw','bool','Allowed\x20values:\x20','create','preflight','subjectPrefix','environment\x20variable\x20','Missing\x20notification\x20JSON\x20source.','messageTemplate','\x22channelType\x22.','Notification\x20config\x20list\x20item\x20','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','notification_config_field_forbidden','update','channelCode','bccList','join','file','recipients','5410111xDeOCn','notification_config_field_required','object','Notification\x20JSON\x20channelConfig\x20field\x20\x22','66EoPwIv','\x20is\x20missing\x20required\x20field\x20\x22','rabetbase\x20notification\x20config-list\x20--appcode\x20','emailTargets','configName','isSafeInteger','\x20--type\x20','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20failed.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x20characters.','a\x20JSON\x20object\x20or\x20null','notification_config_source_unavailable','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','a\x20JSON\x20object','num','11862856yJdrlH','entries','push'];a181_0x5c5c=function(){return _0x1df7b3;};return a181_0x5c5c();}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=[a181_0x47f2aa(0xfd),a181_0x47f2aa(0x10d),'DINGTALK','WECOM',a181_0x47f2aa(0x8d)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x47f2aa(0xb9),a181_0x47f2aa(0xf6),a181_0x47f2aa(0xc8),a181_0x47f2aa(0xd4),a181_0x47f2aa(0xef),'connectTimeout','readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a181_0x47f2aa(0xeb),a181_0x47f2aa(0xe0),a181_0x47f2aa(0xac)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x47f2aa(0xb8),a181_0x47f2aa(0xb0),a181_0x47f2aa(0xdf),a181_0x47f2aa(0xad),a181_0x47f2aa(0xdc),a181_0x47f2aa(0xa3),a181_0x47f2aa(0xd0),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a181_0x47f2aa(0x105),'required':![],'description':a181_0x47f2aa(0xbe)},{'name':'stdin','type':a181_0x47f2aa(0xd7),'required':![],'default':![],'description':a181_0x47f2aa(0x94)},{'name':a181_0x47f2aa(0x91),'type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a181_0x47f2aa(0xf3),'required':!![],'description':a181_0x47f2aa(0x9a)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2c1440,_0x57c8a7,_0x10ecfb){return new CliError(_0x2c1440,0x1,_0x57c8a7,_0x10ecfb);}export function readNotificationId(_0x56de4b){const _0x1b3bd0=a181_0x47f2aa,_0x4f0c62=_0x56de4b[_0x1b3bd0(0xc4)]('id');if(!Number[_0x1b3bd0(0xba)](_0x4f0c62)||_0x4f0c62<=0x0)throw notificationError(_0x1b3bd0(0x108),_0x1b3bd0(0x90));return _0x4f0c62;}function a181_0x3230(_0x4164aa,_0xff7c68){_0x4164aa=_0x4164aa-0x8c;const _0x5c5cda=a181_0x5c5c();let _0x323019=_0x5c5cda[_0x4164aa];return _0x323019;}export function requireNotificationExplicitYes(_0x4ad712){const _0x20da64=a181_0x47f2aa;if(_0x4ad712['bool']('dry-run')||_0x4ad712[_0x20da64(0x9f)](_0x20da64(0x98)))return;throw notificationError(_0x20da64(0x96),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x20da64(0xfe));}export function readNotificationChannelType(_0x562e13,_0x1874bb='type',_0x46808f='EMAIL'){const _0x86b812=a181_0x47f2aa,_0x4afe4a=_0x562e13['str'](_0x1874bb)[_0x86b812(0x10c)]()||_0x46808f;if(!NOTIFICATION_CHANNEL_TYPES[_0x86b812(0xf7)](_0x4afe4a))throw CliErrors[_0x86b812(0xfb)]('Invalid\x20--'+_0x1874bb+':\x20'+_0x4afe4a,_0x86b812(0xa0)+NOTIFICATION_CHANNEL_TYPES[_0x86b812(0xae)](',\x20')+'.');return _0x4afe4a;}export function assertSingleNotificationSource(_0x37e44e){const _0x43b372=a181_0x47f2aa,_0x511b5b=[],_0xd8a868=_0x37e44e[_0x43b372(0xf1)](_0x43b372(0xaf))[_0x43b372(0x10c)]();if(_0xd8a868)_0x511b5b[_0x43b372(0xc7)]({'kind':_0x43b372(0xaf),'path':_0xd8a868});if(_0x37e44e[_0x43b372(0x9f)](_0x43b372(0xfa)))_0x511b5b[_0x43b372(0xc7)]({'kind':_0x43b372(0xfa)});const _0x23830a=_0x37e44e[_0x43b372(0xf1)](_0x43b372(0x91))[_0x43b372(0x10c)]();if(_0x23830a)_0x511b5b[_0x43b372(0xc7)]({'kind':_0x43b372(0x8f),'name':_0x23830a});if(_0x511b5b['length']===0x0)throw CliErrors[_0x43b372(0xfb)](_0x43b372(0xa5),_0x43b372(0xe7));if(_0x511b5b[_0x43b372(0x103)]>0x1)throw CliErrors['validation']('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x43b372(0xe7));return _0x511b5b[0x0];}export async function readNotificationDocument(_0x4d3a32,_0x1f1ae3){const _0x10d3ab=a181_0x47f2aa,_0x2fec6e=assertSingleNotificationSource(_0x4d3a32),_0x298bcf=_0x2fec6e[_0x10d3ab(0x107)]===_0x10d3ab(0xaf)?_0x10d3ab(0xe4)+_0x2fec6e[_0x10d3ab(0xed)]:_0x2fec6e[_0x10d3ab(0x107)]===_0x10d3ab(0x8f)?_0x10d3ab(0xa4)+_0x2fec6e[_0x10d3ab(0xc9)]:'stdin';let _0x5c881c;try{if(_0x2fec6e[_0x10d3ab(0x107)]==='file')_0x5c881c=await readFile(_0x2fec6e[_0x10d3ab(0xed)],_0x10d3ab(0xd2));else{if(_0x2fec6e[_0x10d3ab(0x107)]==='env'){if(!(_0x2fec6e[_0x10d3ab(0xc9)]in process.env))throw notificationError('notification_config_source_unavailable',_0x10d3ab(0xf9)+_0x2fec6e[_0x10d3ab(0xc9)]);_0x5c881c=process.env[_0x2fec6e.name]??'';}else _0x5c881c=await readStdin();}}catch(_0x885ed4){if(_0x885ed4 instanceof CliError)throw _0x885ed4;throw notificationError(_0x10d3ab(0xc1),_0x10d3ab(0xea)+_0x298bcf+'.');}let _0x340395;try{_0x340395=JSON[_0x10d3ab(0xcf)](_0x5c881c);}catch{throw notificationError(_0x10d3ab(0xd1),_0x10d3ab(0xd3)+_0x298bcf+_0x10d3ab(0xda),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x340395))throw notificationError(_0x10d3ab(0xd1),'Notification\x20JSON\x20from\x20'+_0x298bcf+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x340395,_0x1f1ae3);}export function projectNotificationListConfig(_0x716440,_0x181ff1){const _0xc48bba=a181_0x47f2aa;return{'id':typeof _0x716440['id']===_0xc48bba(0xf3)?_0x716440['id']:null,'configCode':requireResponseString(_0x716440['configCode'],_0xc48bba(0xe0),_0x181ff1),'configName':requireResponseString(_0x716440['configName'],_0xc48bba(0xb9),_0x181ff1),'channelType':requireResponseString(_0x716440[_0xc48bba(0xf6)],_0xc48bba(0xf6),_0x181ff1),'description':normalizeNullableString(_0x716440[_0xc48bba(0xef)]),'createTime':normalizeNullableString(_0x716440[_0xc48bba(0x9d)]),'updateTime':normalizeNullableString(_0x716440['updateTime'])};}export function normalizeExactNotificationConfig(_0x242c52,_0x51b08,_0x459df3){const _0x26a53b=a181_0x47f2aa;if(!Number[_0x26a53b(0xba)](_0x242c52['id'])||_0x242c52['id']!==_0x51b08)throw notificationError(_0x26a53b(0xcd),_0x26a53b(0x106)+_0x51b08+'.');if(_0x242c52['appCode']!==_0x459df3)throw notificationError(_0x26a53b(0xcd),_0x26a53b(0xd8)+_0x51b08+_0x26a53b(0x100));const _0x47f9c6=requireExactString(_0x242c52[_0x26a53b(0xb9)],_0x26a53b(0xb9),_0x51b08),_0x417d03=requireExactString(_0x242c52[_0x26a53b(0xe0)],'configCode',_0x51b08),_0x58a83b=requireExactString(_0x242c52[_0x26a53b(0xf6)],'channelType',_0x51b08);if(!NOTIFICATION_CHANNEL_TYPES[_0x26a53b(0xf7)](_0x58a83b))throw notificationError(_0x26a53b(0xcd),_0x26a53b(0xd8)+_0x51b08+_0x26a53b(0x10a));const _0x2cb5c9=responseNullableString(_0x242c52[_0x26a53b(0xc8)],_0x26a53b(0xc8),_0x51b08),_0x1af265=responseNullableString(_0x242c52[_0x26a53b(0xd4)],_0x26a53b(0xd4),_0x51b08),_0x34c060=responseNullableString(_0x242c52[_0x26a53b(0xef)],_0x26a53b(0xef),_0x51b08),_0x5c3cf8=responseNullableTimeout(_0x242c52[_0x26a53b(0x97)],_0x26a53b(0x97),_0x51b08),_0x4f5f2c=responseNullableTimeout(_0x242c52[_0x26a53b(0xd6)],_0x26a53b(0xd6),_0x51b08);return{'id':_0x51b08,'appCode':_0x459df3,'configCode':_0x417d03,'configName':_0x47f9c6,'channelType':_0x58a83b,'endpointUrl':redactSensitive(_0x2cb5c9),'channelConfig':redactSensitive(_0x1af265),'description':_0x34c060,'connectTimeout':_0x5c3cf8,'readTimeout':_0x4f5f2c,'endpointUrlRaw':_0x2cb5c9,'channelConfigRaw':_0x1af265};}export async function requireExactNotificationConfig(_0x5e3ef6,_0x19182d,_0x1f0a9d){const _0x5f291b=a181_0x47f2aa;let _0x2c409c;try{_0x2c409c=await getNotificationChannelConfig(_0x19182d,_0x5e3ef6);}catch{throw safeApiFailure(_0x1f0a9d,_0x5f291b(0xa2),_0x5f291b(0xbc)+_0x5e3ef6+_0x5f291b(0x93));}return normalizeExactNotificationConfig(_0x2c409c,_0x19182d,_0x5e3ef6);}export function projectNotificationConfig(_0x519f62){const _0x521f65=a181_0x47f2aa;return{'id':_0x519f62['id']??null,'appCode':_0x519f62[_0x521f65(0xeb)],'configCode':_0x519f62['configCode']??null,'configName':_0x519f62['configName'],'channelType':_0x519f62[_0x521f65(0xf6)],'endpointUrl':redactSensitive(_0x519f62[_0x521f65(0xc8)]),'channelConfig':redactSensitive(_0x519f62[_0x521f65(0xd4)]),'description':_0x519f62[_0x521f65(0xef)]??null,'connectTimeout':_0x519f62[_0x521f65(0x97)]??null,'readTimeout':_0x519f62[_0x521f65(0xd6)]??null};}export function notificationSelector(_0x4f97c9){const _0x504b07=a181_0x47f2aa;return{'appCode':_0x4f97c9[_0x504b07(0xeb)],'id':_0x4f97c9['id'],'configCode':_0x4f97c9['configCode'],'configName':_0x4f97c9[_0x504b07(0xb9)],'channelType':_0x4f97c9['channelType']};}export function createMutationInput(_0x5ed0c6,_0x5254a8){const _0x448745=a181_0x47f2aa;return{'appCode':_0x5ed0c6,'configName':_0x5254a8[_0x448745(0xb9)],'channelType':_0x5254a8[_0x448745(0xf6)],...hasOwn(_0x5254a8,_0x448745(0xc8))?{'endpointUrl':_0x5254a8[_0x448745(0xc8)]}:{},...hasOwn(_0x5254a8,_0x448745(0xd4))?{'channelConfig':serializeChannelConfig(_0x5254a8[_0x448745(0xd4)])}:{},...hasOwn(_0x5254a8,_0x448745(0xef))?{'description':_0x5254a8[_0x448745(0xef)]}:{},...hasOwn(_0x5254a8,_0x448745(0x97))?{'connectTimeout':_0x5254a8['connectTimeout']}:{},...hasOwn(_0x5254a8,_0x448745(0xd6))?{'readTimeout':_0x5254a8['readTimeout']}:{}};}export function mergeUpdateInput(_0x151fbb,_0x21cc12){const _0xe1cae5=a181_0x47f2aa;return{'id':_0x151fbb['id'],'appCode':_0x151fbb[_0xe1cae5(0xeb)],'configName':_0x21cc12[_0xe1cae5(0xb9)]??_0x151fbb[_0xe1cae5(0xb9)],'channelType':_0x21cc12[_0xe1cae5(0xf6)]??_0x151fbb[_0xe1cae5(0xf6)],'endpointUrl':hasOwn(_0x21cc12,_0xe1cae5(0xc8))?_0x21cc12['endpointUrl']:_0x151fbb[_0xe1cae5(0xe2)],'channelConfig':hasOwn(_0x21cc12,_0xe1cae5(0xd4))?serializeChannelConfig(_0x21cc12[_0xe1cae5(0xd4)]):_0x151fbb['channelConfigRaw'],'description':hasOwn(_0x21cc12,_0xe1cae5(0xef))?_0x21cc12[_0xe1cae5(0xef)]:_0x151fbb[_0xe1cae5(0xef)],'connectTimeout':hasOwn(_0x21cc12,'connectTimeout')?_0x21cc12[_0xe1cae5(0x97)]:_0x151fbb[_0xe1cae5(0x97)],'readTimeout':hasOwn(_0x21cc12,_0xe1cae5(0xd6))?_0x21cc12[_0xe1cae5(0xd6)]:_0x151fbb[_0xe1cae5(0xd6)]};}export function plannedUpdateProjection(_0x486eb0,_0x520598){const _0x563bea=a181_0x47f2aa;return projectNotificationConfig({'id':_0x486eb0['id'],'appCode':_0x486eb0[_0x563bea(0xeb)],'configCode':_0x486eb0['configCode'],'configName':_0x520598[_0x563bea(0xb9)]??_0x486eb0['configName'],'channelType':_0x520598[_0x563bea(0xf6)]??_0x486eb0[_0x563bea(0xf6)],'endpointUrl':hasOwn(_0x520598,_0x563bea(0xc8))?_0x520598[_0x563bea(0xc8)]:_0x486eb0[_0x563bea(0xe2)],'channelConfig':hasOwn(_0x520598,_0x563bea(0xd4))?_0x520598[_0x563bea(0xd4)]:_0x486eb0[_0x563bea(0xf2)],'description':hasOwn(_0x520598,'description')?_0x520598['description']:_0x486eb0[_0x563bea(0xef)],'connectTimeout':hasOwn(_0x520598,_0x563bea(0x97))?_0x520598[_0x563bea(0x97)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x486eb0['connectTimeout'],'readTimeout':hasOwn(_0x520598,_0x563bea(0xd6))?_0x520598[_0x563bea(0xd6)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x486eb0[_0x563bea(0xd6)]});}export function requestedSafeFieldsMatch(_0x380750,_0x366355,_0x57d06d){const _0x54fbee=a181_0x47f2aa,_0x46144c=[],_0x1b9711=[],_0x30f2bf=[];for(const _0x967b55 of[_0x54fbee(0xb9),_0x54fbee(0xf6),_0x54fbee(0xef)]){if(!hasOwn(_0x57d06d,_0x967b55))continue;_0x30f2bf['push'](_0x967b55),_0x46144c[_0x54fbee(0xc7)](_0x366355[_0x967b55]===_0x57d06d[_0x967b55]),_0x1b9711[_0x54fbee(0xc7)](_0x380750[_0x967b55]!==_0x57d06d[_0x967b55]&&_0x366355[_0x967b55]===_0x57d06d[_0x967b55]);}for(const _0x5d3e82 of[_0x54fbee(0x97),'readTimeout']){if(!hasOwn(_0x57d06d,_0x5d3e82))continue;const _0x41f0e3=_0x57d06d[_0x5d3e82]??(_0x5d3e82===_0x54fbee(0x97)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x30f2bf['push'](_0x5d3e82),_0x46144c['push'](_0x366355[_0x5d3e82]===_0x41f0e3),_0x1b9711[_0x54fbee(0xc7)](_0x380750[_0x5d3e82]!==_0x41f0e3&&_0x366355[_0x5d3e82]===_0x41f0e3);}return hasOwn(_0x57d06d,_0x54fbee(0xc8))&&_0x57d06d[_0x54fbee(0xc8)]===null&&(_0x30f2bf['push']('endpointUrl:null'),_0x46144c['push'](_0x366355['endpointUrlRaw']===null||_0x366355[_0x54fbee(0xe2)]===''),_0x1b9711[_0x54fbee(0xc7)](_0x380750[_0x54fbee(0xe2)]!==null&&_0x380750['endpointUrlRaw']!==''&&(_0x366355[_0x54fbee(0xe2)]===null||_0x366355[_0x54fbee(0xe2)]===''))),{'allMatch':_0x46144c[_0x54fbee(0x99)](Boolean),'provesChange':_0x1b9711['some'](Boolean),'verifiedFields':_0x30f2bf};}export function validateNotificationDeleteReadback(_0x4957d3,_0x1cc278,_0x439c75){const _0x4b7a92=a181_0x47f2aa;for(const [_0x2d36fa,_0x3a6c76]of _0x4957d3[_0x4b7a92(0xc6)]()){if(!Number['isSafeInteger'](_0x3a6c76['id'])||_0x3a6c76['id']<=0x0)throw notificationError(_0x4b7a92(0xcd),'Notification\x20config\x20list\x20item\x20'+(_0x2d36fa+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x3a6c76['appCode']!==_0x1cc278)throw notificationError('notification_config_response_invalid',_0x4b7a92(0xa8)+(_0x2d36fa+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x3a6c76[_0x4b7a92(0xf6)]!==_0x439c75)throw notificationError('notification_config_response_invalid',_0x4b7a92(0xa8)+(_0x2d36fa+0x1)+_0x4b7a92(0xca));}}export function safeApiFailure(_0x493cfc,_0x4e27b5,_0x3939fa){const _0x2019ba=a181_0x47f2aa;return notificationError('notification_config_'+_0x493cfc+'_'+(_0x4e27b5===_0x2019ba(0xee)?_0x2019ba(0xf5):_0x4e27b5+'_unavailable'),_0x2019ba(0xd8)+_0x493cfc+'\x20'+_0x4e27b5+_0x2019ba(0xbd),_0x3939fa);}export function notificationLookupCommand(_0x2e22fc,_0x2abb18){const _0x3d252a=a181_0x47f2aa;return _0x3d252a(0xb7)+_0x2e22fc+_0x3d252a(0xbb)+_0x2abb18+_0x3d252a(0xfc);}function validateNotificationDocument(_0x89123f,_0x58b200){const _0xde5299=a181_0x47f2aa;for(const _0x5861eb of Object[_0xde5299(0xcb)](_0x89123f)){if(FORBIDDEN_IDENTITY_FIELDS[_0xde5299(0xde)](_0x5861eb))throw notificationError(_0xde5299(0xaa),_0xde5299(0x10b)+_0x5861eb+_0xde5299(0xf8));if(!ALLOWED_INPUT_FIELDS[_0xde5299(0xde)](_0x5861eb))throw notificationError(_0xde5299(0x8c),_0xde5299(0x101)+_0x5861eb+'\x22.');}if(_0x58b200==='update'&&Object[_0xde5299(0xcb)](_0x89123f)[_0xde5299(0x103)]===0x0)throw notificationError(_0xde5299(0xcc),_0xde5299(0xa9));const _0x450f42={};if(hasOwn(_0x89123f,_0xde5299(0xb9)))_0x450f42['configName']=validateRequiredString(_0x89123f[_0xde5299(0xb9)],_0xde5299(0xb9),0x80);else{if(_0x58b200===_0xde5299(0xa1))throw notificationError(_0xde5299(0xb2),_0xde5299(0x92)+'\x22configName\x22.');}if(hasOwn(_0x89123f,_0xde5299(0xf6))){if(typeof _0x89123f[_0xde5299(0xf6)]!==_0xde5299(0x105))throw invalidFieldType('channelType',_0xde5299(0xec));const _0x51842f=_0x89123f[_0xde5299(0xf6)][_0xde5299(0x10c)]();if(!NOTIFICATION_CHANNEL_TYPES[_0xde5299(0xf7)](_0x51842f))throw notificationError(_0xde5299(0x8e),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0xde5299(0xa0)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x450f42[_0xde5299(0xf6)]=_0x51842f;}else{if(_0x58b200===_0xde5299(0xa1))throw notificationError(_0xde5299(0xb2),_0xde5299(0x92)+_0xde5299(0xa7));}for(const [_0x35aa34,_0x2fb94c]of[[_0xde5299(0xc8),0x200],[_0xde5299(0xef),0x100]]){if(!hasOwn(_0x89123f,_0x35aa34))continue;const _0x5c7e91=_0x89123f[_0x35aa34];if(_0x5c7e91!==null&&typeof _0x5c7e91!==_0xde5299(0x105))throw invalidFieldType(_0x35aa34,_0xde5299(0xce));if(typeof _0x5c7e91==='string'&&_0x5c7e91[_0xde5299(0x103)]>_0x2fb94c)throw notificationError(_0xde5299(0x8e),_0xde5299(0x10b)+_0x35aa34+_0xde5299(0xe6)+_0x2fb94c+_0xde5299(0xbf));_0x450f42[_0x35aa34]=_0x5c7e91;}if(hasOwn(_0x89123f,_0xde5299(0xd4))){const _0xdc7585=_0x89123f[_0xde5299(0xd4)];if(_0xdc7585===null&&_0x58b200===_0xde5299(0xa1))throw invalidFieldType(_0xde5299(0xd4),_0xde5299(0xc3));if(_0xdc7585!==null&&!isJsonObject(_0xdc7585))throw invalidFieldType(_0xde5299(0xd4),_0x58b200===_0xde5299(0xab)?_0xde5299(0xc0):'a\x20JSON\x20object');_0xdc7585!==null&&validateChannelConfigFields(_0x450f42['channelType'],_0xdc7585),_0x450f42[_0xde5299(0xd4)]=_0xdc7585;}for(const _0x4c6286 of['connectTimeout',_0xde5299(0xd6)]){if(!hasOwn(_0x89123f,_0x4c6286))continue;const _0x218268=_0x89123f[_0x4c6286];if(_0x218268!==null&&(!Number['isSafeInteger'](_0x218268)||_0x218268<0x0))throw notificationError(_0xde5299(0x8e),_0xde5299(0x10b)+_0x4c6286+_0xde5299(0xc2));_0x450f42[_0x4c6286]=_0x218268;}return _0x450f42;}function validateRequiredString(_0x152237,_0x3f0732,_0x177ddb){const _0x2d92dd=a181_0x47f2aa;if(typeof _0x152237!==_0x2d92dd(0x105))throw invalidFieldType(_0x3f0732,'a\x20non-empty\x20string');const _0x40fd8b=_0x152237[_0x2d92dd(0x10c)]();if(!_0x40fd8b)throw notificationError('notification_config_field_invalid',_0x2d92dd(0x10b)+_0x3f0732+_0x2d92dd(0xe5));if(_0x40fd8b[_0x2d92dd(0x103)]>_0x177ddb)throw notificationError(_0x2d92dd(0x8e),_0x2d92dd(0x10b)+_0x3f0732+'\x22\x20cannot\x20exceed\x20'+_0x177ddb+_0x2d92dd(0xbf));return _0x40fd8b;}function validateChannelConfigFields(_0x4acfaa,_0x325ced){const _0x1b5537=a181_0x47f2aa;if(hasOwn(_0x325ced,_0x1b5537(0xa6)))throw forbiddenChannelConfigField(_0x1b5537(0xa6));if(_0x4acfaa===_0x1b5537(0xfd))for(const _0x7a3eb4 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x325ced,_0x7a3eb4))throw forbiddenChannelConfigField(_0x7a3eb4);}}function forbiddenChannelConfigField(_0x5e8c0c){const _0x5159da=a181_0x47f2aa;return notificationError('notification_config_channel_field_forbidden',_0x5159da(0xb4)+_0x5e8c0c+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x36f4c5,_0x4a93c4){const _0x473ef7=a181_0x47f2aa;return notificationError('notification_config_field_invalid',_0x473ef7(0x10b)+_0x36f4c5+_0x473ef7(0xdd)+_0x4a93c4+'.');}function serializeChannelConfig(_0x2faa94){const _0x3f1bf0=a181_0x47f2aa;return _0x2faa94===null||_0x2faa94===undefined?null:JSON[_0x3f1bf0(0xe9)](_0x2faa94);}function redactSensitive(_0x4af543){const _0x202dca=a181_0x47f2aa;return _0x4af543===null||_0x4af543===undefined||_0x4af543===''?null:_0x202dca(0x102);}function requireResponseString(_0x10e143,_0x1a4fa5,_0x45a998){const _0x427072=a181_0x47f2aa;if(typeof _0x10e143!==_0x427072(0x105)||_0x10e143[_0x427072(0x10c)]()==='')throw CliErrors[_0x427072(0xdb)](_0x427072(0x109),_0x427072(0xe8)+(_0x45a998+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x1a4fa5+'\x22.');return _0x10e143['trim']();}function requireExactString(_0x3cd457,_0x1e5104,_0x40c8f7){const _0x2a256b=a181_0x47f2aa;if(typeof _0x3cd457!==_0x2a256b(0x105)||_0x3cd457[_0x2a256b(0x10c)]()==='')throw notificationError(_0x2a256b(0xcd),_0x2a256b(0xd8)+_0x40c8f7+_0x2a256b(0xb6)+_0x1e5104+'\x22.');return _0x3cd457[_0x2a256b(0x10c)]();}function responseNullableString(_0x2723f2,_0x4361c8,_0x24b406){const _0x1d853f=a181_0x47f2aa;if(_0x2723f2===undefined||_0x2723f2===null)return null;if(typeof _0x2723f2!==_0x1d853f(0x105))throw notificationError(_0x1d853f(0xcd),'Notification\x20config\x20'+_0x24b406+_0x1d853f(0xf4)+_0x4361c8+'\x22.');return _0x2723f2;}function responseNullableTimeout(_0x588cfa,_0x397aea,_0x18aef0){const _0x464e49=a181_0x47f2aa;if(_0x588cfa===undefined||_0x588cfa===null)return null;if(!Number[_0x464e49(0xba)](_0x588cfa)||_0x588cfa<0x0)throw notificationError('notification_config_response_invalid',_0x464e49(0xd8)+_0x18aef0+'\x20has\x20invalid\x20field\x20\x22'+_0x397aea+'\x22.');return _0x588cfa;}function normalizeNullableString(_0x1fb2f1){const _0x54d7c9=a181_0x47f2aa;return typeof _0x1fb2f1===_0x54d7c9(0x105)?_0x1fb2f1:null;}function isJsonObject(_0x22ff7e){const _0x2f1d9f=a181_0x47f2aa;return _0x22ff7e!==null&&typeof _0x22ff7e===_0x2f1d9f(0xb3)&&!Array['isArray'](_0x22ff7e);}function hasOwn(_0x1cbcf1,_0x346bf2){const _0x16db0a=a181_0x47f2aa;return Object[_0x16db0a(0xd5)][_0x16db0a(0xff)][_0x16db0a(0xf0)](_0x1cbcf1,_0x346bf2);}async function readStdin(){const _0x1f2ce8=a181_0x47f2aa;let _0x19ded0='';process['stdin'][_0x1f2ce8(0x104)]('utf8');for await(const _0x5757e4 of process[_0x1f2ce8(0xfa)])_0x19ded0+=_0x5757e4;return _0x19ded0;}
|
|
1
|
+
function a186_0x524f(){const _0x29815f=['\x20characters.','rabetbase\x20notification\x20config-list\x20--appcode\x20','every','boolean','5070968dGrqJc','a\x20string\x20or\x20null','notification_config_source_unavailable','13291443fCMbLm','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Create\x20JSON\x20requires\x20field\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','length','appCode','utf8','DINGTALK','notification_config_update_empty','prototype','882472NRBBjp','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','path','create','4858032pFYzfd','type','\x20is\x20invalid.','description','\x22\x20is\x20forbidden.','Notification\x20config\x20','file','\x22\x20must\x20be\x20a\x20non-empty\x20string.','7TfmdZw','file\x20','notification_config_field_forbidden','push','updateTime','2bxnRzM','Missing\x20notification\x20JSON\x20source.','number','configCode','Unknown\x20notification\x20JSON\x20field\x20\x22','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','name','WEBHOOK','\x22\x20cannot\x20exceed\x20','yes','replyTo','num','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','mutation','connectTimeout','1511070tjjryI','emailTargets','\x20has\x20an\x20unsupported\x20channelType.','\x20has\x20an\x20invalid\x20id.','setEncoding','call','endpointUrlRaw','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','bool','EMAIL','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','has','recipients','\x20--format\x20compress','<redacted>','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','string','readTimeout','kind','Item\x20','stdin','some','endpointUrl','keys','fromName','update','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x22channelType\x22.','str','env','Allowed\x20values:\x20','bccList','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','notification_config_confirmation_required','\x20has\x20an\x20invalid\x20appCode.','isSafeInteger','join','notification_config_channel_field_forbidden','Application-level\x20notification\x20config\x20ID','parse','11898HTIYoW','a\x20JSON\x20object','a\x20JSON\x20object\x20or\x20null','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20field\x20\x22','configName','\x20has\x20invalid\x20field\x20\x22','notification_config_field_unknown','\x20must\x20be\x20an\x20object.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','endpointUrl:null','channelType','\x20is\x20missing\x20required\x20field\x20\x22','\x20--type\x20','from-env','notification_config_response_invalid','channelConfig','1485zZLEkO','environment\x20variable\x20','validation','includes','stringify','notification_config_json_invalid','Invalid\x20notification\x20config\x20response.','notification_config_field_required','createTime','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','ccList','notification_config_id_invalid','trim','channelCode','notification_config_field_invalid','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Notification\x20JSON\x20from\x20','isArray','1335762nhHaVQ','object'];a186_0x524f=function(){return _0x29815f;};return a186_0x524f();}const a186_0x24a8d0=a186_0x4be6;(function(_0x4de708,_0x215510){const _0x2d846d=a186_0x4be6,_0x509a7e=_0x4de708();while(!![]){try{const _0x514a44=parseInt(_0x2d846d(0x1f0))/0x1*(parseInt(_0x2d846d(0x201))/0x2)+parseInt(_0x2d846d(0x1dc))/0x3+parseInt(_0x2d846d(0x1f4))/0x4+-parseInt(_0x2d846d(0x1ca))/0x5*(parseInt(_0x2d846d(0x1b9))/0x6)+-parseInt(_0x2d846d(0x1fc))/0x7*(-parseInt(_0x2d846d(0x1e2))/0x8)+-parseInt(_0x2d846d(0x1e5))/0x9+-parseInt(_0x2d846d(0x210))/0xa;if(_0x514a44===_0x215510)break;else _0x509a7e['push'](_0x509a7e['shift']());}catch(_0x14e065){_0x509a7e['push'](_0x509a7e['shift']());}}}(a186_0x524f,0xea2f4));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=[a186_0x24a8d0(0x219),'FEISHU',a186_0x24a8d0(0x1ed),'WECOM',a186_0x24a8d0(0x208)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a186_0x24a8d0(0x1be),a186_0x24a8d0(0x1c4),a186_0x24a8d0(0x1a7),a186_0x24a8d0(0x1c9),a186_0x24a8d0(0x1f7),a186_0x24a8d0(0x20f),a186_0x24a8d0(0x1a2)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode','configCode',a186_0x24a8d0(0x1d7)]),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x24a8d0(0x211),a186_0x24a8d0(0x19d),a186_0x24a8d0(0x1d4),a186_0x24a8d0(0x1b0),a186_0x24a8d0(0x20b),'subjectPrefix',a186_0x24a8d0(0x1a9),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':'string','required':![],'description':a186_0x24a8d0(0x20d)},{'name':'stdin','type':a186_0x24a8d0(0x1e1),'required':![],'default':![],'description':a186_0x24a8d0(0x1f1)},{'name':a186_0x24a8d0(0x1c7),'type':a186_0x24a8d0(0x1a1),'required':![],'description':a186_0x24a8d0(0x1e6)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a186_0x24a8d0(0x203),'required':!![],'description':a186_0x24a8d0(0x1b7)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2f70ef,_0x39927d,_0x2e2306){return new CliError(_0x2f70ef,0x1,_0x39927d,_0x2e2306);}export function readNotificationId(_0x44f0ab){const _0x87576e=a186_0x24a8d0,_0xc47c0=_0x44f0ab[_0x87576e(0x20c)]('id');if(!Number['isSafeInteger'](_0xc47c0)||_0xc47c0<=0x0)throw notificationError(_0x87576e(0x1d5),_0x87576e(0x1d3));return _0xc47c0;}export function requireNotificationExplicitYes(_0x5c6962){const _0x423e06=a186_0x24a8d0;if(_0x5c6962[_0x423e06(0x218)]('dry-run')||_0x5c6962[_0x423e06(0x218)](_0x423e06(0x20a)))return;throw notificationError(_0x423e06(0x1b2),_0x423e06(0x1b1),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x3ebbc4,_0x43d12f=a186_0x24a8d0(0x1f5),_0x4fe89d=a186_0x24a8d0(0x219)){const _0x30dc5e=a186_0x24a8d0,_0x6cce8e=_0x3ebbc4[_0x30dc5e(0x1ad)](_0x43d12f)['trim']()||_0x4fe89d;if(!NOTIFICATION_CHANNEL_TYPES[_0x30dc5e(0x1cd)](_0x6cce8e))throw CliErrors[_0x30dc5e(0x1cc)]('Invalid\x20--'+_0x43d12f+':\x20'+_0x6cce8e,_0x30dc5e(0x1af)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x6cce8e;}export function assertSingleNotificationSource(_0x58bbd1){const _0x247445=a186_0x24a8d0,_0x9bfec9=[],_0x484a44=_0x58bbd1[_0x247445(0x1ad)]('file')[_0x247445(0x1d6)]();if(_0x484a44)_0x9bfec9[_0x247445(0x1ff)]({'kind':'file','path':_0x484a44});if(_0x58bbd1['bool'](_0x247445(0x1a5)))_0x9bfec9[_0x247445(0x1ff)]({'kind':_0x247445(0x1a5)});const _0x56c555=_0x58bbd1['str']('from-env')[_0x247445(0x1d6)]();if(_0x56c555)_0x9bfec9[_0x247445(0x1ff)]({'kind':_0x247445(0x1ae),'name':_0x56c555});if(_0x9bfec9[_0x247445(0x1ea)]===0x0)throw CliErrors['validation'](_0x247445(0x202),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x9bfec9['length']>0x1)throw CliErrors['validation']('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x247445(0x1e9));return _0x9bfec9[0x0];}export async function readNotificationDocument(_0x44d1ea,_0x993e1e){const _0x332295=a186_0x24a8d0,_0x5b1df5=assertSingleNotificationSource(_0x44d1ea),_0x245a82=_0x5b1df5[_0x332295(0x1a3)]===_0x332295(0x1fa)?_0x332295(0x1fd)+_0x5b1df5[_0x332295(0x1f2)]:_0x5b1df5['kind']===_0x332295(0x1ae)?_0x332295(0x1cb)+_0x5b1df5[_0x332295(0x207)]:'stdin';let _0x37e051;try{if(_0x5b1df5[_0x332295(0x1a3)]===_0x332295(0x1fa))_0x37e051=await readFile(_0x5b1df5[_0x332295(0x1f2)],_0x332295(0x1ec));else{if(_0x5b1df5[_0x332295(0x1a3)]===_0x332295(0x1ae)){if(!(_0x5b1df5[_0x332295(0x207)]in process.env))throw notificationError('notification_config_source_unavailable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x5b1df5['name']);_0x37e051=process.env[_0x5b1df5.name]??'';}else _0x37e051=await readStdin();}}catch(_0x7bb10e){if(_0x7bb10e instanceof CliError)throw _0x7bb10e;throw notificationError(_0x332295(0x1e4),_0x332295(0x1c2)+_0x245a82+'.');}let _0x99a934;try{_0x99a934=JSON[_0x332295(0x1b8)](_0x37e051);}catch{throw notificationError(_0x332295(0x1cf),_0x332295(0x1da)+_0x245a82+_0x332295(0x1f6),_0x332295(0x1d9));}if(!isJsonObject(_0x99a934))throw notificationError(_0x332295(0x1cf),_0x332295(0x1da)+_0x245a82+_0x332295(0x1c1));return validateNotificationDocument(_0x99a934,_0x993e1e);}export function projectNotificationListConfig(_0x2d2ad6,_0x1d4317){const _0x17c42f=a186_0x24a8d0;return{'id':typeof _0x2d2ad6['id']===_0x17c42f(0x203)?_0x2d2ad6['id']:null,'configCode':requireResponseString(_0x2d2ad6['configCode'],_0x17c42f(0x204),_0x1d4317),'configName':requireResponseString(_0x2d2ad6['configName'],_0x17c42f(0x1be),_0x1d4317),'channelType':requireResponseString(_0x2d2ad6[_0x17c42f(0x1c4)],_0x17c42f(0x1c4),_0x1d4317),'description':normalizeNullableString(_0x2d2ad6[_0x17c42f(0x1f7)]),'createTime':normalizeNullableString(_0x2d2ad6[_0x17c42f(0x1d2)]),'updateTime':normalizeNullableString(_0x2d2ad6[_0x17c42f(0x200)])};}export function normalizeExactNotificationConfig(_0x5da4dc,_0x3677f0,_0x93fd16){const _0x137028=a186_0x24a8d0;if(!Number['isSafeInteger'](_0x5da4dc['id'])||_0x5da4dc['id']!==_0x3677f0)throw notificationError('notification_config_response_invalid',_0x137028(0x1e7)+_0x3677f0+'.');if(_0x5da4dc[_0x137028(0x1eb)]!==_0x93fd16)throw notificationError(_0x137028(0x1c8),_0x137028(0x1f9)+_0x3677f0+_0x137028(0x217));const _0x415fb6=requireExactString(_0x5da4dc[_0x137028(0x1be)],'configName',_0x3677f0),_0x3b79dc=requireExactString(_0x5da4dc[_0x137028(0x204)],_0x137028(0x204),_0x3677f0),_0xb76d9e=requireExactString(_0x5da4dc['channelType'],_0x137028(0x1c4),_0x3677f0);if(!NOTIFICATION_CHANNEL_TYPES[_0x137028(0x1cd)](_0xb76d9e))throw notificationError('notification_config_response_invalid',_0x137028(0x1f9)+_0x3677f0+_0x137028(0x212));const _0x5b1e50=responseNullableString(_0x5da4dc[_0x137028(0x1a7)],_0x137028(0x1a7),_0x3677f0),_0x452b50=responseNullableString(_0x5da4dc[_0x137028(0x1c9)],_0x137028(0x1c9),_0x3677f0),_0x38690a=responseNullableString(_0x5da4dc[_0x137028(0x1f7)],'description',_0x3677f0),_0x43a2e2=responseNullableTimeout(_0x5da4dc[_0x137028(0x20f)],_0x137028(0x20f),_0x3677f0),_0x5d7bd6=responseNullableTimeout(_0x5da4dc[_0x137028(0x1a2)],_0x137028(0x1a2),_0x3677f0);return{'id':_0x3677f0,'appCode':_0x93fd16,'configCode':_0x3b79dc,'configName':_0x415fb6,'channelType':_0xb76d9e,'endpointUrl':redactSensitive(_0x5b1e50),'channelConfig':redactSensitive(_0x452b50),'description':_0x38690a,'connectTimeout':_0x43a2e2,'readTimeout':_0x5d7bd6,'endpointUrlRaw':_0x5b1e50,'channelConfigRaw':_0x452b50};}export async function requireExactNotificationConfig(_0x344f3f,_0x51241d,_0x3b28df){const _0x36c17c=a186_0x24a8d0;let _0x4175d7;try{_0x4175d7=await getNotificationChannelConfig(_0x51241d,_0x344f3f);}catch{throw safeApiFailure(_0x3b28df,'preflight',_0x36c17c(0x1ab)+_0x344f3f+_0x36c17c(0x206));}return normalizeExactNotificationConfig(_0x4175d7,_0x51241d,_0x344f3f);}export function projectNotificationConfig(_0x475f9a){const _0x1ecab3=a186_0x24a8d0;return{'id':_0x475f9a['id']??null,'appCode':_0x475f9a[_0x1ecab3(0x1eb)],'configCode':_0x475f9a[_0x1ecab3(0x204)]??null,'configName':_0x475f9a[_0x1ecab3(0x1be)],'channelType':_0x475f9a[_0x1ecab3(0x1c4)],'endpointUrl':redactSensitive(_0x475f9a[_0x1ecab3(0x1a7)]),'channelConfig':redactSensitive(_0x475f9a[_0x1ecab3(0x1c9)]),'description':_0x475f9a['description']??null,'connectTimeout':_0x475f9a[_0x1ecab3(0x20f)]??null,'readTimeout':_0x475f9a[_0x1ecab3(0x1a2)]??null};}export function notificationSelector(_0x1b5c73){const _0x181445=a186_0x24a8d0;return{'appCode':_0x1b5c73['appCode'],'id':_0x1b5c73['id'],'configCode':_0x1b5c73[_0x181445(0x204)],'configName':_0x1b5c73[_0x181445(0x1be)],'channelType':_0x1b5c73[_0x181445(0x1c4)]};}export function createMutationInput(_0x2b8d8b,_0x1c7f6a){const _0x5b7f39=a186_0x24a8d0;return{'appCode':_0x2b8d8b,'configName':_0x1c7f6a['configName'],'channelType':_0x1c7f6a['channelType'],...hasOwn(_0x1c7f6a,_0x5b7f39(0x1a7))?{'endpointUrl':_0x1c7f6a[_0x5b7f39(0x1a7)]}:{},...hasOwn(_0x1c7f6a,_0x5b7f39(0x1c9))?{'channelConfig':serializeChannelConfig(_0x1c7f6a['channelConfig'])}:{},...hasOwn(_0x1c7f6a,_0x5b7f39(0x1f7))?{'description':_0x1c7f6a[_0x5b7f39(0x1f7)]}:{},...hasOwn(_0x1c7f6a,_0x5b7f39(0x20f))?{'connectTimeout':_0x1c7f6a['connectTimeout']}:{},...hasOwn(_0x1c7f6a,_0x5b7f39(0x1a2))?{'readTimeout':_0x1c7f6a['readTimeout']}:{}};}export function mergeUpdateInput(_0x4bc771,_0x21832b){const _0x4ecbe6=a186_0x24a8d0;return{'id':_0x4bc771['id'],'appCode':_0x4bc771[_0x4ecbe6(0x1eb)],'configName':_0x21832b['configName']??_0x4bc771[_0x4ecbe6(0x1be)],'channelType':_0x21832b['channelType']??_0x4bc771[_0x4ecbe6(0x1c4)],'endpointUrl':hasOwn(_0x21832b,_0x4ecbe6(0x1a7))?_0x21832b[_0x4ecbe6(0x1a7)]:_0x4bc771[_0x4ecbe6(0x216)],'channelConfig':hasOwn(_0x21832b,_0x4ecbe6(0x1c9))?serializeChannelConfig(_0x21832b[_0x4ecbe6(0x1c9)]):_0x4bc771['channelConfigRaw'],'description':hasOwn(_0x21832b,_0x4ecbe6(0x1f7))?_0x21832b['description']:_0x4bc771[_0x4ecbe6(0x1f7)],'connectTimeout':hasOwn(_0x21832b,_0x4ecbe6(0x20f))?_0x21832b[_0x4ecbe6(0x20f)]:_0x4bc771[_0x4ecbe6(0x20f)],'readTimeout':hasOwn(_0x21832b,_0x4ecbe6(0x1a2))?_0x21832b[_0x4ecbe6(0x1a2)]:_0x4bc771[_0x4ecbe6(0x1a2)]};}export function plannedUpdateProjection(_0x2476d4,_0x5dcde6){const _0x3cf652=a186_0x24a8d0;return projectNotificationConfig({'id':_0x2476d4['id'],'appCode':_0x2476d4[_0x3cf652(0x1eb)],'configCode':_0x2476d4[_0x3cf652(0x204)],'configName':_0x5dcde6['configName']??_0x2476d4[_0x3cf652(0x1be)],'channelType':_0x5dcde6[_0x3cf652(0x1c4)]??_0x2476d4['channelType'],'endpointUrl':hasOwn(_0x5dcde6,_0x3cf652(0x1a7))?_0x5dcde6[_0x3cf652(0x1a7)]:_0x2476d4[_0x3cf652(0x216)],'channelConfig':hasOwn(_0x5dcde6,_0x3cf652(0x1c9))?_0x5dcde6[_0x3cf652(0x1c9)]:_0x2476d4['channelConfigRaw'],'description':hasOwn(_0x5dcde6,'description')?_0x5dcde6['description']:_0x2476d4[_0x3cf652(0x1f7)],'connectTimeout':hasOwn(_0x5dcde6,_0x3cf652(0x20f))?_0x5dcde6[_0x3cf652(0x20f)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2476d4[_0x3cf652(0x20f)],'readTimeout':hasOwn(_0x5dcde6,_0x3cf652(0x1a2))?_0x5dcde6['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2476d4['readTimeout']});}export function requestedSafeFieldsMatch(_0x3153f2,_0x20914e,_0x455202){const _0x3fcab1=a186_0x24a8d0,_0x198490=[],_0x525b14=[],_0x170c1d=[];for(const _0x1d9a4c of[_0x3fcab1(0x1be),_0x3fcab1(0x1c4),'description']){if(!hasOwn(_0x455202,_0x1d9a4c))continue;_0x170c1d[_0x3fcab1(0x1ff)](_0x1d9a4c),_0x198490[_0x3fcab1(0x1ff)](_0x20914e[_0x1d9a4c]===_0x455202[_0x1d9a4c]),_0x525b14[_0x3fcab1(0x1ff)](_0x3153f2[_0x1d9a4c]!==_0x455202[_0x1d9a4c]&&_0x20914e[_0x1d9a4c]===_0x455202[_0x1d9a4c]);}for(const _0xb2cd82 of['connectTimeout',_0x3fcab1(0x1a2)]){if(!hasOwn(_0x455202,_0xb2cd82))continue;const _0x1c905a=_0x455202[_0xb2cd82]??(_0xb2cd82===_0x3fcab1(0x20f)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x170c1d[_0x3fcab1(0x1ff)](_0xb2cd82),_0x198490['push'](_0x20914e[_0xb2cd82]===_0x1c905a),_0x525b14[_0x3fcab1(0x1ff)](_0x3153f2[_0xb2cd82]!==_0x1c905a&&_0x20914e[_0xb2cd82]===_0x1c905a);}return hasOwn(_0x455202,_0x3fcab1(0x1a7))&&_0x455202[_0x3fcab1(0x1a7)]===null&&(_0x170c1d[_0x3fcab1(0x1ff)](_0x3fcab1(0x1c3)),_0x198490['push'](_0x20914e[_0x3fcab1(0x216)]===null||_0x20914e['endpointUrlRaw']===''),_0x525b14['push'](_0x3153f2['endpointUrlRaw']!==null&&_0x3153f2[_0x3fcab1(0x216)]!==''&&(_0x20914e[_0x3fcab1(0x216)]===null||_0x20914e[_0x3fcab1(0x216)]===''))),{'allMatch':_0x198490[_0x3fcab1(0x1e0)](Boolean),'provesChange':_0x525b14[_0x3fcab1(0x1a6)](Boolean),'verifiedFields':_0x170c1d};}export function validateNotificationDeleteReadback(_0x87acbf,_0x1cf0b3,_0x1a66f7){const _0x5e1abe=a186_0x24a8d0;for(const [_0x2ebd1b,_0x436496]of _0x87acbf['entries']()){if(!Number['isSafeInteger'](_0x436496['id'])||_0x436496['id']<=0x0)throw notificationError(_0x5e1abe(0x1c8),_0x5e1abe(0x1bc)+(_0x2ebd1b+0x1)+_0x5e1abe(0x213));if(_0x436496[_0x5e1abe(0x1eb)]!==_0x1cf0b3)throw notificationError('notification_config_response_invalid',_0x5e1abe(0x1bc)+(_0x2ebd1b+0x1)+_0x5e1abe(0x1b3));if(_0x436496[_0x5e1abe(0x1c4)]!==_0x1a66f7)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x2ebd1b+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x21d087,_0x2211b0,_0x214a32){const _0x3e4819=a186_0x24a8d0;return notificationError('notification_config_'+_0x21d087+'_'+(_0x2211b0===_0x3e4819(0x20e)?'failed':_0x2211b0+'_unavailable'),'Notification\x20config\x20'+_0x21d087+'\x20'+_0x2211b0+'\x20failed.',_0x214a32);}export function notificationLookupCommand(_0x2eee51,_0x4a817d){const _0x323936=a186_0x24a8d0;return _0x323936(0x1df)+_0x2eee51+_0x323936(0x1c6)+_0x4a817d+_0x323936(0x19e);}function validateNotificationDocument(_0x12ade0,_0x2aa91e){const _0x10b3a2=a186_0x24a8d0;for(const _0x257abc of Object[_0x10b3a2(0x1a8)](_0x12ade0)){if(FORBIDDEN_IDENTITY_FIELDS[_0x10b3a2(0x19c)](_0x257abc))throw notificationError(_0x10b3a2(0x1fe),_0x10b3a2(0x1bd)+_0x257abc+_0x10b3a2(0x1a0));if(!ALLOWED_INPUT_FIELDS[_0x10b3a2(0x19c)](_0x257abc))throw notificationError(_0x10b3a2(0x1c0),_0x10b3a2(0x205)+_0x257abc+'\x22.');}if(_0x2aa91e===_0x10b3a2(0x1aa)&&Object['keys'](_0x12ade0)[_0x10b3a2(0x1ea)]===0x0)throw notificationError(_0x10b3a2(0x1ee),_0x10b3a2(0x19b));const _0x2ed31e={};if(hasOwn(_0x12ade0,_0x10b3a2(0x1be)))_0x2ed31e['configName']=validateRequiredString(_0x12ade0[_0x10b3a2(0x1be)],_0x10b3a2(0x1be),0x80);else{if(_0x2aa91e==='create')throw notificationError(_0x10b3a2(0x1d1),'Create\x20JSON\x20requires\x20field\x20'+'\x22configName\x22.');}if(hasOwn(_0x12ade0,'channelType')){if(typeof _0x12ade0[_0x10b3a2(0x1c4)]!==_0x10b3a2(0x1a1))throw invalidFieldType(_0x10b3a2(0x1c4),'a\x20supported\x20string');const _0x243e61=_0x12ade0[_0x10b3a2(0x1c4)][_0x10b3a2(0x1d6)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x10b3a2(0x1cd)](_0x243e61))throw notificationError(_0x10b3a2(0x1d8),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x10b3a2(0x1af)+NOTIFICATION_CHANNEL_TYPES[_0x10b3a2(0x1b5)](',\x20')+'.');_0x2ed31e[_0x10b3a2(0x1c4)]=_0x243e61;}else{if(_0x2aa91e===_0x10b3a2(0x1f3))throw notificationError(_0x10b3a2(0x1d1),_0x10b3a2(0x1e8)+_0x10b3a2(0x1ac));}for(const [_0x52a0ff,_0x296bf6]of[[_0x10b3a2(0x1a7),0x200],['description',0x100]]){if(!hasOwn(_0x12ade0,_0x52a0ff))continue;const _0x3b77b1=_0x12ade0[_0x52a0ff];if(_0x3b77b1!==null&&typeof _0x3b77b1!==_0x10b3a2(0x1a1))throw invalidFieldType(_0x52a0ff,_0x10b3a2(0x1e3));if(typeof _0x3b77b1==='string'&&_0x3b77b1[_0x10b3a2(0x1ea)]>_0x296bf6)throw notificationError('notification_config_field_invalid',_0x10b3a2(0x1bd)+_0x52a0ff+_0x10b3a2(0x209)+_0x296bf6+_0x10b3a2(0x1de));_0x2ed31e[_0x52a0ff]=_0x3b77b1;}if(hasOwn(_0x12ade0,'channelConfig')){const _0x4dce48=_0x12ade0['channelConfig'];if(_0x4dce48===null&&_0x2aa91e===_0x10b3a2(0x1f3))throw invalidFieldType('channelConfig',_0x10b3a2(0x1ba));if(_0x4dce48!==null&&!isJsonObject(_0x4dce48))throw invalidFieldType(_0x10b3a2(0x1c9),_0x2aa91e==='update'?_0x10b3a2(0x1bb):_0x10b3a2(0x1ba));_0x4dce48!==null&&validateChannelConfigFields(_0x2ed31e[_0x10b3a2(0x1c4)],_0x4dce48),_0x2ed31e[_0x10b3a2(0x1c9)]=_0x4dce48;}for(const _0x18d720 of['connectTimeout','readTimeout']){if(!hasOwn(_0x12ade0,_0x18d720))continue;const _0x112d63=_0x12ade0[_0x18d720];if(_0x112d63!==null&&(!Number[_0x10b3a2(0x1b4)](_0x112d63)||_0x112d63<0x0))throw notificationError(_0x10b3a2(0x1d8),_0x10b3a2(0x1bd)+_0x18d720+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x2ed31e[_0x18d720]=_0x112d63;}return _0x2ed31e;}function validateRequiredString(_0x28dc89,_0x37f5d9,_0xa5e3af){const _0x353b8c=a186_0x24a8d0;if(typeof _0x28dc89!=='string')throw invalidFieldType(_0x37f5d9,'a\x20non-empty\x20string');const _0x47575c=_0x28dc89['trim']();if(!_0x47575c)throw notificationError('notification_config_field_invalid',_0x353b8c(0x1bd)+_0x37f5d9+_0x353b8c(0x1fb));if(_0x47575c[_0x353b8c(0x1ea)]>_0xa5e3af)throw notificationError(_0x353b8c(0x1d8),_0x353b8c(0x1bd)+_0x37f5d9+'\x22\x20cannot\x20exceed\x20'+_0xa5e3af+_0x353b8c(0x1de));return _0x47575c;}function validateChannelConfigFields(_0xc6ef5b,_0x401376){const _0x38d600=a186_0x24a8d0;if(hasOwn(_0x401376,'messageTemplate'))throw forbiddenChannelConfigField('messageTemplate');if(_0xc6ef5b===_0x38d600(0x219))for(const _0x35c5d2 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x401376,_0x35c5d2))throw forbiddenChannelConfigField(_0x35c5d2);}}function forbiddenChannelConfigField(_0x43e777){const _0x3f5de0=a186_0x24a8d0;return notificationError(_0x3f5de0(0x1b6),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x43e777+_0x3f5de0(0x1f8));}function invalidFieldType(_0x301346,_0x2ef3f){const _0x43d5ad=a186_0x24a8d0;return notificationError(_0x43d5ad(0x1d8),'Notification\x20JSON\x20field\x20\x22'+_0x301346+'\x22\x20must\x20be\x20'+_0x2ef3f+'.');}function serializeChannelConfig(_0xd539ab){const _0x1a3b3d=a186_0x24a8d0;return _0xd539ab===null||_0xd539ab===undefined?null:JSON[_0x1a3b3d(0x1ce)](_0xd539ab);}function redactSensitive(_0x206de8){const _0x205611=a186_0x24a8d0;return _0x206de8===null||_0x206de8===undefined||_0x206de8===''?null:_0x205611(0x19f);}function requireResponseString(_0x53373e,_0x319819,_0x1640fb){const _0x43ac29=a186_0x24a8d0;if(typeof _0x53373e!==_0x43ac29(0x1a1)||_0x53373e[_0x43ac29(0x1d6)]()==='')throw CliErrors['apiError'](_0x43ac29(0x1d0),_0x43ac29(0x1a4)+(_0x1640fb+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x319819+'\x22.');return _0x53373e['trim']();}function requireExactString(_0x18a471,_0x49c032,_0x4cd65c){const _0x1b8354=a186_0x24a8d0;if(typeof _0x18a471!==_0x1b8354(0x1a1)||_0x18a471[_0x1b8354(0x1d6)]()==='')throw notificationError(_0x1b8354(0x1c8),_0x1b8354(0x1f9)+_0x4cd65c+_0x1b8354(0x1c5)+_0x49c032+'\x22.');return _0x18a471[_0x1b8354(0x1d6)]();}function responseNullableString(_0xc7bfe5,_0x21c2fd,_0x16959d){const _0xf94a3a=a186_0x24a8d0;if(_0xc7bfe5===undefined||_0xc7bfe5===null)return null;if(typeof _0xc7bfe5!==_0xf94a3a(0x1a1))throw notificationError(_0xf94a3a(0x1c8),_0xf94a3a(0x1f9)+_0x16959d+_0xf94a3a(0x1bf)+_0x21c2fd+'\x22.');return _0xc7bfe5;}function a186_0x4be6(_0x10ec79,_0x2d8789){_0x10ec79=_0x10ec79-0x19b;const _0x524f19=a186_0x524f();let _0x4be621=_0x524f19[_0x10ec79];return _0x4be621;}function responseNullableTimeout(_0x1515ae,_0x184208,_0x4942c2){const _0x16a723=a186_0x24a8d0;if(_0x1515ae===undefined||_0x1515ae===null)return null;if(!Number['isSafeInteger'](_0x1515ae)||_0x1515ae<0x0)throw notificationError(_0x16a723(0x1c8),'Notification\x20config\x20'+_0x4942c2+'\x20has\x20invalid\x20field\x20\x22'+_0x184208+'\x22.');return _0x1515ae;}function normalizeNullableString(_0x4939bd){const _0x2a5c38=a186_0x24a8d0;return typeof _0x4939bd===_0x2a5c38(0x1a1)?_0x4939bd:null;}function isJsonObject(_0x22654c){const _0x45097b=a186_0x24a8d0;return _0x22654c!==null&&typeof _0x22654c===_0x45097b(0x1dd)&&!Array[_0x45097b(0x1db)](_0x22654c);}function hasOwn(_0x35793a,_0x2ca999){const _0x46539e=a186_0x24a8d0;return Object[_0x46539e(0x1ef)]['hasOwnProperty'][_0x46539e(0x215)](_0x35793a,_0x2ca999);}async function readStdin(){const _0x528f8a=a186_0x24a8d0;let _0x331569='';process[_0x528f8a(0x1a5)][_0x528f8a(0x214)](_0x528f8a(0x1ec));for await(const _0x346c6f of process[_0x528f8a(0x1a5)])_0x331569+=_0x346c6f;return _0x331569;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a187_0x123583=a187_0x1a32;(function(_0x484d3b,_0x59216e){const _0x2c35d5=a187_0x1a32,_0xcc8053=_0x484d3b();while(!![]){try{const _0x2bcc94=-parseInt(_0x2c35d5(0x196))/0x1*(parseInt(_0x2c35d5(0x198))/0x2)+-parseInt(_0x2c35d5(0x193))/0x3+-parseInt(_0x2c35d5(0x1b0))/0x4*(-parseInt(_0x2c35d5(0x18c))/0x5)+-parseInt(_0x2c35d5(0x184))/0x6*(-parseInt(_0x2c35d5(0x1aa))/0x7)+parseInt(_0x2c35d5(0x18f))/0x8*(-parseInt(_0x2c35d5(0x1a3))/0x9)+-parseInt(_0x2c35d5(0x19f))/0xa+parseInt(_0x2c35d5(0x1a9))/0xb;if(_0x2bcc94===_0x59216e)break;else _0xcc8053['push'](_0xcc8053['shift']());}catch(_0x537371){_0xcc8053['push'](_0xcc8053['shift']());}}}(a187_0x377c,0x228e2));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a187_0x377c(){const _0xcfdcbc=['count','POST','823878eYCbIL','File\x20upload\x20response\x20missing\x20filePath.','form','272305AYcQnS','join','2SUsgBx','invoice','fileUrl','/smartapi/common/uploadFile','\x20OCR','apiError','image-file','798970oQlPis','imageFile','general','ocr','554661ztuJdR','string','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','GET','imageUrl','toLowerCase','3461304aJCXpR','1705088ZgMgWG','.\x20Supported\x20scenes:\x20','read','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Table','\x20OCR\x20from\x20URL','4sHaVgM','validation','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','path','scene','appCode','/smartapi/ocr/recognize-text?','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','6erQlhF','str','File\x20URL\x20response\x20missing\x20fileUrl.','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','General','Preview:\x20recognize\x20','filePath','trim','1358735svGZmh','/smartapi/ocr/recognize-text','idCard','8GmepJL','image-url'];a187_0x377c=function(){return _0xcfdcbc;};return a187_0x377c();}const SUPPORTED_SCENES=[a187_0x123583(0x199),a187_0x123583(0x1a1),'form',a187_0x123583(0x18e)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a187_0x123583(0x188),'form':a187_0x123583(0x1ae),'idCard':'IdCard'},SCENE_FLAG={'name':'scene','type':a187_0x123583(0x1a4),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a187_0x123583(0x1ad)},IMAGE_FILE_FLAG={'name':a187_0x123583(0x19e),'type':a187_0x123583(0x1a4),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a187_0x123583(0x190),'type':a187_0x123583(0x1a4),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x47da6e){const _0x3dc2a0=a187_0x123583,_0x22836d=_0x47da6e['trim']()[_0x3dc2a0(0x1a8)]();if(_0x22836d==='idcard')return'idCard';if(_0x22836d===_0x3dc2a0(0x199)||_0x22836d===_0x3dc2a0(0x1a1)||_0x22836d===_0x3dc2a0(0x195))return _0x22836d;throw CliErrors[_0x3dc2a0(0x1b1)]('Unsupported\x20OCR\x20scene:\x20'+_0x47da6e+_0x3dc2a0(0x1ab)+SUPPORTED_SCENES[_0x3dc2a0(0x197)](',\x20'));}function selectedInputs(_0x1298f9){const _0xe5f43c=a187_0x123583,_0xd27c09=_0x1298f9[_0xe5f43c(0x185)](_0xe5f43c(0x19e))[_0xe5f43c(0x18b)](),_0x3dade5=_0x1298f9[_0xe5f43c(0x185)](_0xe5f43c(0x190))[_0xe5f43c(0x18b)]();return{'imageFile':_0xd27c09,'imageUrl':_0x3dade5,'count':[_0xd27c09,_0x3dade5]['filter'](Boolean)['length']};}function validateInputSelection(_0x5ec995){const _0x51e362=a187_0x123583,_0x3abcbd=selectedInputs(_0x5ec995);if(_0x3abcbd[_0x51e362(0x191)]!==0x1)throw CliErrors[_0x51e362(0x1b1)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x3abcbd;}function a187_0x1a32(_0x4377a1,_0x5dc463){_0x4377a1=_0x4377a1-0x184;const _0x377cee=a187_0x377c();let _0x1a3252=_0x377cee[_0x4377a1];return _0x1a3252;}function withScene(_0x24a272,_0x4bca95,_0x31c0b9){const _0x502c91=a187_0x123583;return{..._0x24a272,'scene':_0x4bca95,..._0x31c0b9?{'sourceFile':{'fileName':_0x31c0b9['fileName'],'filePath':_0x31c0b9[_0x502c91(0x18a)]}}:{}};}const ocrRecognize={'service':a187_0x123583(0x1a2),'command':'recognize','description':a187_0x123583(0x1b7),'risk':a187_0x123583(0x1ac),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x2a01c1){const _0x559005=a187_0x123583,_0x43c93f=normalizeScene(_0x2a01c1[_0x559005(0x185)](_0x559005(0x1b4))),_0x39ac11=SCENE_TO_LEGACY_TYPE[_0x43c93f],_0x3387cb=validateInputSelection(_0x2a01c1);if(_0x3387cb[_0x559005(0x1a7)]){const _0x1759bd=new URLSearchParams({'url':_0x3387cb[_0x559005(0x1a7)],'type':_0x39ac11,'appCode':_0x2a01c1[_0x559005(0x1b5)]});return{'method':_0x559005(0x1a6),'url':_0x559005(0x1b6)+_0x1759bd['toString'](),'description':_0x559005(0x189)+_0x43c93f+_0x559005(0x1af)};}const _0x5da3ea=requireDevelopmentUploadFile(_0x3387cb[_0x559005(0x1a0)],'image-file');return{'method':_0x559005(0x192),'url':_0x559005(0x19b),'body':{'steps':[{'method':'POST','url':'/smartapi/common/uploadFile','body':{'appCode':_0x2a01c1[_0x559005(0x1b5)],'multipart':{'file':_0x5da3ea}}},{'method':_0x559005(0x192),'url':'/smartapi/common/queryFileUrl','body':{'filePath':_0x559005(0x187),'downloadFlag':![]}},{'method':'GET','url':_0x559005(0x18d),'query':{'appCode':_0x2a01c1[_0x559005(0x1b5)],'url':_0x559005(0x1b2),'type':_0x39ac11}}]},'description':_0x559005(0x1a5)+_0x43c93f+_0x559005(0x19c)};},async 'execute'(_0x2b2d3c){const _0x42dd17=a187_0x123583,_0x5a6c34=normalizeScene(_0x2b2d3c[_0x42dd17(0x185)](_0x42dd17(0x1b4))),_0x362d0b=SCENE_TO_LEGACY_TYPE[_0x5a6c34],_0x2a9bd8=validateInputSelection(_0x2b2d3c);if(_0x2a9bd8['imageUrl']){const _0x4f58b6=await recognizeDevelopmentOcr(_0x2b2d3c['appCode'],{'url':_0x2a9bd8[_0x42dd17(0x1a7)],'type':_0x362d0b});return{'ok':!![],'data':withScene(_0x4f58b6,_0x5a6c34)};}const _0x1b3149=requireDevelopmentUploadFile(_0x2a9bd8['imageFile'],'image-file'),_0x1680b9=await uploadDevelopmentFile(_0x2b2d3c[_0x42dd17(0x1b5)],_0x1b3149[_0x42dd17(0x1b3)]);if(!_0x1680b9[_0x42dd17(0x18a)])throw CliErrors[_0x42dd17(0x19d)](_0x42dd17(0x194));const _0x543c8b=await queryDevelopmentFileUrl(_0x1680b9[_0x42dd17(0x18a)],{'download':![]});if(!_0x543c8b[_0x42dd17(0x19a)])throw CliErrors[_0x42dd17(0x19d)](_0x42dd17(0x186));const _0x11ba42=await recognizeDevelopmentOcr(_0x2b2d3c[_0x42dd17(0x1b5)],{'url':_0x543c8b['fileUrl'],'type':_0x362d0b});return{'ok':!![],'data':withScene(_0x11ba42,_0x5a6c34,_0x1680b9)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x3e596a=a188_0x4b60;(function(_0x5b793f,_0x1c332d){const _0x5a32f3=a188_0x4b60,_0x352dba=_0x5b793f();while(!![]){try{const _0x2e579b=parseInt(_0x5a32f3(0xdd))/0x1*(-parseInt(_0x5a32f3(0xfd))/0x2)+-parseInt(_0x5a32f3(0xe6))/0x3+-parseInt(_0x5a32f3(0xe4))/0x4+-parseInt(_0x5a32f3(0x10d))/0x5+-parseInt(_0x5a32f3(0xe3))/0x6*(parseInt(_0x5a32f3(0xd5))/0x7)+-parseInt(_0x5a32f3(0x100))/0x8*(-parseInt(_0x5a32f3(0xd6))/0x9)+parseInt(_0x5a32f3(0xf2))/0xa;if(_0x2e579b===_0x1c332d)break;else _0x352dba['push'](_0x352dba['shift']());}catch(_0x241cbe){_0x352dba['push'](_0x352dba['shift']());}}}(a188_0x4414,0x7d054));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';function a188_0x4b60(_0x2faf15,_0x5a6634){_0x2faf15=_0x2faf15-0xd1;const _0x441442=a188_0x4414();let _0x4b6029=_0x441442[_0x2faf15];return _0x4b6029;}import{readCustomPageDirectory}from'../../core/page/file-system.js';function a188_0x4414(){const _0x56b032=['toLowerCase','length','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','str','Custom\x20Page\x20pattern\x20not\x20found:\x20','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','16853BFDFFz','CUSTOM','menuId','files','isInteger','Custom_page_','384NLifBh','1256204KijUud','trim','282546hurUtn','../../../templates/custom-pages','BLANK','/smartapi/webcode/page/create','apiError','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','parentMenuId','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','keys','some','parse','validation','16754610rNSwmg','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','name','string','Created\x20Custom\x20Page\x20','Would\x20create\x20Custom\x20Page\x20','object','page-type','isNaN','page\x20create\x20does\x20not\x20accept\x20--page-type.','write','10YLCaGp','pageName','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','49496kRGVyB','pageId','POST','now','version','appCode','values','createMenu','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','page-dir','\x20and\x20its\x20menu\x20entry.','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','ONEPAGE','2985570fefNej','compress','Invalid\x20Custom\x20Page\x20pattern:\x20','includes','page-pattern','.json','menuPath','num','pageName\x20cannot\x20exceed\x20100\x20characters.','19572YeNSMr','153WeQEIw'];a188_0x4414=function(){return _0x56b032;};return a188_0x4414();}import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a188_0x3e596a(0xe8),a188_0x3e596a(0x10c),'DASHBOARD'],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a188_0x3e596a(0xe7));export const pageCreate={'service':'page','command':'create','description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':a188_0x3e596a(0xfc),'defaultOutputFormat':a188_0x3e596a(0x10e),'structuredErrors':!![],'rejectedFlags':[{'name':a188_0x3e596a(0xf9),'message':a188_0x3e596a(0xfb),'hint':a188_0x3e596a(0xed)},{'name':'page-content','message':a188_0x3e596a(0xdc),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'name','type':'string','description':a188_0x3e596a(0x10b)},{'name':'parent-menu-id','type':'number','description':a188_0x3e596a(0xeb)},{'name':a188_0x3e596a(0x111),'type':a188_0x3e596a(0xf5),'description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':a188_0x3e596a(0x109),'type':a188_0x3e596a(0xf5),'description':'Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0x3a226b){await readValidatedPageSource(_0x3a226b);},async 'dryRun'(_0x28840c){const _0x590af6=a188_0x3e596a,_0xdf8189=readInput(_0x28840c,await readValidatedPageSource(_0x28840c));return{'method':_0x590af6(0x102),'url':_0x590af6(0xe9),'body':{'appCode':_0xdf8189['appCode'],'pageName':_0xdf8189[_0x590af6(0xfe)],..._0xdf8189[_0x590af6(0xec)]!=null?{'parentMenuId':_0xdf8189['parentMenuId']}:{},'createMenu':_0xdf8189[_0x590af6(0x107)],'codeContent':_0xdf8189[_0x590af6(0xe0)]},'description':_0x590af6(0xf7)+JSON['stringify'](_0xdf8189['pageName'])+_0x590af6(0x10a)};},async 'execute'(_0x581db5){const _0x11963f=a188_0x3e596a,_0x5ba32c=readInput(_0x581db5,await readValidatedPageSource(_0x581db5)),_0x2041cf=await createCustomPage(_0x5ba32c);if(!Number['isInteger'](_0x2041cf[_0x11963f(0x101)])||_0x2041cf[_0x11963f(0x101)]<=0x0)throw CliErrors[_0x11963f(0xea)](_0x11963f(0x108));const _0xaff437=buildCustomPageDevelopmentUrl(_0x5ba32c[_0x11963f(0x105)],_0x2041cf[_0x11963f(0xd2)]),_0x498e2e=buildCustomPageEditUrl(_0x5ba32c[_0x11963f(0x105)],_0x2041cf['pageId']);return{'ok':!![],'data':{'operation':'page.create','pageType':_0x11963f(0xde),'pagePattern':readPagePattern(_0x581db5),'selector':{'appCode':_0x5ba32c[_0x11963f(0x105)],'pageName':_0x5ba32c['pageName']},'before':null,'after':{'pageId':_0x2041cf['pageId'],'pageName':_0x2041cf[_0x11963f(0xfe)],'appCode':_0x2041cf['appCode'],'version':_0x2041cf[_0x11963f(0x104)],'menuId':_0x2041cf[_0x11963f(0xdf)],'menuPath':_0x2041cf[_0x11963f(0xd2)],'files':_0x2041cf[_0x11963f(0xe0)]??Object[_0x11963f(0xee)](_0x5ba32c[_0x11963f(0xe0)])},'dryRun':![],'request':_0x5ba32c,..._0xaff437?{'pageUrl':_0xaff437}:{},..._0x498e2e?{'editPageUrl':_0x498e2e}:{},'warnings':_0xaff437?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x11963f(0xf6)+_0x2041cf[_0x11963f(0x101)]+'.'};}};function readPagePattern(_0x4b6b7c){const _0x523462=a188_0x3e596a,_0x505c5a=_0x4b6b7c[_0x523462(0xda)](_0x523462(0x111))[_0x523462(0xe5)](),_0xd9b022=_0x4b6b7c[_0x523462(0xda)](_0x523462(0x109))[_0x523462(0xe5)]();if(_0x505c5a&&_0xd9b022)throw CliErrors[_0x523462(0xf1)](_0x523462(0xff));if(_0xd9b022)return null;if(!_0x505c5a)throw CliErrors['validation']('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x523462(0x110)](_0x505c5a))throw CliErrors['validation'](_0x523462(0xf3));return _0x505c5a;}async function readPageSource(_0x30f265){const _0x10b653=a188_0x3e596a,_0x2594ef=_0x30f265[_0x10b653(0xda)](_0x10b653(0x109))[_0x10b653(0xe5)](),_0x746899=readPagePattern(_0x30f265);if(_0x746899===null){const _0x348f89=await readCustomPageDirectory(_0x2594ef);if(Object['keys'](_0x348f89)[_0x10b653(0xd8)]===0x0)throw CliErrors['validation']('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x348f89;}let _0xf6e040;try{_0xf6e040=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x746899[_0x10b653(0xd7)]()+_0x10b653(0xd1)),'utf8');}catch{throw CliErrors[_0x10b653(0xf1)](_0x10b653(0xdb)+_0x746899+'.');}let _0x50c838;try{_0x50c838=JSON[_0x10b653(0xf0)](_0xf6e040);}catch{throw CliErrors[_0x10b653(0xf1)](_0x10b653(0x10f)+_0x746899+'.');}if(!_0x50c838||typeof _0x50c838!==_0x10b653(0xf8)||Array['isArray'](_0x50c838)||Object[_0x10b653(0x106)](_0x50c838)[_0x10b653(0xef)](_0x2f9912=>typeof _0x2f9912!==_0x10b653(0xf5)))throw CliErrors['validation'](_0x10b653(0x10f)+_0x746899+'.');return _0x50c838;}async function readValidatedPageSource(_0x1d977b){const _0x1e0b7d=await readPageSource(_0x1d977b);return await validateCustomPageContent(_0x1e0b7d),_0x1e0b7d;}function readInput(_0xaee314,_0x490bfa){const _0x39d595=a188_0x3e596a,_0x28d308=_0xaee314['str'](_0x39d595(0xf4))[_0x39d595(0xe5)]()||_0x39d595(0xe2)+Date[_0x39d595(0x103)]();if(_0x28d308[_0x39d595(0xd8)]>0x64)throw CliErrors['validation'](_0x39d595(0xd4));const _0x41a865=_0xaee314[_0x39d595(0xd3)]('parent-menu-id',NaN),_0x11c526=!Number[_0x39d595(0xfa)](_0x41a865);if(_0x11c526&&(!Number[_0x39d595(0xe1)](_0x41a865)||_0x41a865<=0x0))throw CliErrors[_0x39d595(0xf1)](_0x39d595(0xd9));return{'appCode':_0xaee314[_0x39d595(0x105)],'pageName':_0x28d308,..._0x11c526?{'parentMenuId':_0x41a865}:{},'createMenu':!![],'files':_0x490bfa};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0x1c8dbb=a189_0x4e04;(function(_0x25af46,_0x206e89){const _0x58a1e1=a189_0x4e04,_0x134ad0=_0x25af46();while(!![]){try{const _0x391e81=parseInt(_0x58a1e1(0x181))/0x1+-parseInt(_0x58a1e1(0x187))/0x2*(-parseInt(_0x58a1e1(0x18f))/0x3)+parseInt(_0x58a1e1(0x17d))/0x4+parseInt(_0x58a1e1(0x194))/0x5*(-parseInt(_0x58a1e1(0x18c))/0x6)+-parseInt(_0x58a1e1(0x177))/0x7+parseInt(_0x58a1e1(0x178))/0x8*(-parseInt(_0x58a1e1(0x17e))/0x9)+-parseInt(_0x58a1e1(0x179))/0xa*(-parseInt(_0x58a1e1(0x183))/0xb);if(_0x391e81===_0x206e89)break;else _0x134ad0['push'](_0x134ad0['shift']());}catch(_0x28b389){_0x134ad0['push'](_0x134ad0['shift']());}}}(a189_0x5458,0x8f45a));function a189_0x5458(){const _0x549c91=['50oBjody','read','Custom\x20Page\x20ID','getFullYear','573024IAhJpO','27Eozgtu','compress','padStart','819449duMgSW','pageCode','1904507KGrqpj','getMonth','custom-detail','join','293866uQNLZJ','cookie','isNaN','number','appCode','42gfliat','getDate','getTime','3gExbbj','appcode','trim','str','Retrieved\x20Custom\x20Page\x20','30105mNDqnc','getSeconds','6766179gEKmtv','1012632PwAULN'];a189_0x5458=function(){return _0x549c91;};return a189_0x5458();}import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';function a189_0x4e04(_0x55f2fd,_0x1691b7){_0x55f2fd=_0x55f2fd-0x176;const _0x5458bb=a189_0x5458();let _0x4e0460=_0x5458bb[_0x55f2fd];return _0x4e0460;}export const pageCustomDetail={'service':'page','command':a189_0x1c8dbb(0x185),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a189_0x1c8dbb(0x17a),'defaultOutputFormat':a189_0x1c8dbb(0x17f),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a189_0x1c8dbb(0x18a),'required':!![],'description':a189_0x1c8dbb(0x17b)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3d8fb4){readCustomPageId(_0x3d8fb4);},async 'execute'(_0x2732d9){const _0x5cce71=a189_0x1c8dbb,_0x24d79d=readCustomPageId(_0x2732d9),_0x4cf929=await getCustomPageSource(_0x24d79d),{bundle:_0x4ea24a,createTime:_0x10f04c,updateTime:_0x453d79,..._0x2a3e80}=_0x4cf929,_0x5bd1b0=_0x4cf929['id']??_0x24d79d,_0x365fd1=_0x4cf929[_0x5cce71(0x18b)]?.[_0x5cce71(0x191)]()||_0x2732d9[_0x5cce71(0x192)](_0x5cce71(0x190))[_0x5cce71(0x191)](),_0x275881=buildCustomPageRuntimeUrl(_0x365fd1,_0x4cf929[_0x5cce71(0x182)]),_0x202bde=buildCustomPageEditUrl(_0x365fd1,_0x5bd1b0),_0x374899=await resolveCustomPageDevelopmentUrl(_0x365fd1,_0x5bd1b0,_0x2732d9[_0x5cce71(0x188)]);return{'ok':!![],'data':{..._0x2a3e80,..._0x275881?{'runtimePageUrl':_0x275881}:{},..._0x374899?{'pageUrl':_0x374899}:{},..._0x202bde?{'editPageUrl':_0x202bde}:{},..._0x10f04c==null?{}:{'createTime':formatTime(_0x10f04c)},..._0x453d79==null?{}:{'updateTime':formatTime(_0x453d79)}},'message':_0x5cce71(0x193)+_0x24d79d+'.'};}};function formatTime(_0x1adf4b){const _0x8cd06d=a189_0x1c8dbb,_0x1295b6=new Date(_0x1adf4b);if(Number[_0x8cd06d(0x189)](_0x1295b6[_0x8cd06d(0x18e)]()))return String(_0x1adf4b);const _0xb40e92=[_0x1295b6[_0x8cd06d(0x17c)](),String(_0x1295b6[_0x8cd06d(0x184)]()+0x1)['padStart'](0x2,'0'),String(_0x1295b6[_0x8cd06d(0x18d)]())[_0x8cd06d(0x180)](0x2,'0')]['join']('-'),_0xcd91a3=[String(_0x1295b6['getHours']())[_0x8cd06d(0x180)](0x2,'0'),String(_0x1295b6['getMinutes']())[_0x8cd06d(0x180)](0x2,'0'),String(_0x1295b6[_0x8cd06d(0x176)]())[_0x8cd06d(0x180)](0x2,'0')][_0x8cd06d(0x186)](':');return _0xb40e92+'\x20'+_0xcd91a3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a190_0x37ae7f=a190_0x1fe3;(function(_0x2cdd9f,_0x48dadd){const _0x9ce512=a190_0x1fe3,_0x48d1d6=_0x2cdd9f();while(!![]){try{const _0xe860ed=parseInt(_0x9ce512(0x13c))/0x1*(parseInt(_0x9ce512(0x147))/0x2)+parseInt(_0x9ce512(0x133))/0x3+parseInt(_0x9ce512(0x138))/0x4+-parseInt(_0x9ce512(0x144))/0x5+parseInt(_0x9ce512(0x13d))/0x6*(parseInt(_0x9ce512(0x145))/0x7)+parseInt(_0x9ce512(0x136))/0x8+-parseInt(_0x9ce512(0x13b))/0x9;if(_0xe860ed===_0x48dadd)break;else _0x48d1d6['push'](_0x48d1d6['shift']());}catch(_0x2db56c){_0x48d1d6['push'](_0x48d1d6['shift']());}}}(a190_0x7e82,0x4b06b));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';function a190_0x7e82(){const _0x39a91c=['3339378XJEebz','page','pageId','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','Found\x20','path','No\x20Custom\x20Pages\x20found.','2561755ndLGKv','7qloGHP','compress','562510ogTnzr','appCode','\x20Custom\x20Page(s).','365547UVwaZX','cookie','read','2907064zJKYUd','custom-list','510188JJzLIJ','length','flatMap','5678451xYGdvs','1ldbgMp'];a190_0x7e82=function(){return _0x39a91c;};return a190_0x7e82();}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';function a190_0x1fe3(_0x456460,_0x4d0168){_0x456460=_0x456460-0x132;const _0x7e82c5=a190_0x7e82();let _0x1fe3bf=_0x7e82c5[_0x456460];return _0x1fe3bf;}export const pageCustomList={'service':a190_0x37ae7f(0x13e),'command':a190_0x37ae7f(0x137),'description':a190_0x37ae7f(0x140),'risk':a190_0x37ae7f(0x135),'defaultOutputFormat':a190_0x37ae7f(0x146),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2cf228){const _0x4a018c=a190_0x37ae7f,_0x1b2174=(await fetchMenuSnapshot(_0x2cf228['appCode'],_0x2cf228[_0x4a018c(0x134)]))['menus'][_0x4a018c(0x13a)](_0x5c263e=>{const _0x3324a2=_0x4a018c;if(_0x5c263e['type']!=='react'||_0x5c263e[_0x3324a2(0x13f)]==null)return[];const _0x556a20=buildCustomPageDevelopmentUrl(_0x2cf228[_0x3324a2(0x148)],_0x5c263e[_0x3324a2(0x142)]),_0x2ebc46=buildCustomPageRuntimeUrl(_0x2cf228[_0x3324a2(0x148)],_0x5c263e['path']),_0x3bf052=buildCustomPageEditUrl(_0x2cf228[_0x3324a2(0x148)],_0x5c263e['pageId']);return[{'pageId':_0x5c263e[_0x3324a2(0x13f)],'label':_0x5c263e['label'],'path':_0x5c263e[_0x3324a2(0x142)],..._0x556a20?{'pageUrl':_0x556a20}:{},..._0x2ebc46?{'runtimePageUrl':_0x2ebc46}:{},..._0x3bf052?{'editPageUrl':_0x3bf052}:{}}];});return{'ok':!![],'data':{'pages':_0x1b2174},'message':_0x1b2174['length']===0x0?_0x4a018c(0x143):_0x4a018c(0x141)+_0x1b2174[_0x4a018c(0x139)]+_0x4a018c(0x132)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a191_0x19a1(){const _0x3a2253=['2888TSWZix','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','pageCode','push','FORMAL','Custom\x20Page\x20ID','8547mYaAzK','string','310icQYvM','1843820TlCWlg','trim','isInteger','remark','apiError','custom-publish','35853554CWiucZ','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','12CAcAoU','24ynsboH','cookie','pageId','warnings','779160qZzDOp','page.custom-publish','Would\x20publish\x20Custom\x20Page\x20','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','page','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','status','233379rLzdzn','281943EbVbIp','number','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','appCode','unknown','1477090OMRTNa','write'];a191_0x19a1=function(){return _0x3a2253;};return a191_0x19a1();}const a191_0x4edebf=a191_0x1418;function a191_0x1418(_0x17e8be,_0x1657af){_0x17e8be=_0x17e8be-0x8a;const _0x19a1d5=a191_0x19a1();let _0x141831=_0x19a1d5[_0x17e8be];return _0x141831;}(function(_0x3004d2,_0x21e00b){const _0x58b3b6=a191_0x1418,_0x1b631b=_0x3004d2();while(!![]){try{const _0x4adaf6=-parseInt(_0x58b3b6(0x8c))/0x1+parseInt(_0x58b3b6(0xa4))/0x2+parseInt(_0x58b3b6(0x94))/0x3*(-parseInt(_0x58b3b6(0xac))/0x4)+-parseInt(_0x58b3b6(0x99))/0x5*(parseInt(_0x58b3b6(0xad))/0x6)+-parseInt(_0x58b3b6(0xa1))/0x7*(parseInt(_0x58b3b6(0x9b))/0x8)+-parseInt(_0x58b3b6(0x93))/0x9*(parseInt(_0x58b3b6(0xa3))/0xa)+parseInt(_0x58b3b6(0xaa))/0xb;if(_0x4adaf6===_0x21e00b)break;else _0x1b631b['push'](_0x1b631b['shift']());}catch(_0x5d86f0){_0x1b631b['push'](_0x1b631b['shift']());}}}(a191_0x19a1,0xa9693));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a191_0x4edebf(0x90),'command':a191_0x4edebf(0xa9),'description':a191_0x4edebf(0x91),'risk':a191_0x4edebf(0x9a),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a191_0x4edebf(0x95),'required':!![],'description':a191_0x4edebf(0xa0)},{'name':'remark','type':a191_0x4edebf(0xa2),'description':'Optional\x20publish\x20remark'}],async 'validate'(_0x546fe8){readCustomPageId(_0x546fe8);},async 'dryRun'(_0x160c2b){const _0x1e1753=a191_0x4edebf,_0x19ef0b=readInput(_0x160c2b);return{'method':'POST','url':'/smartapi/webcode/file/publish','body':{'id':_0x19ef0b['pageId'],..._0x19ef0b[_0x1e1753(0xa7)]?{'remark':_0x19ef0b[_0x1e1753(0xa7)]}:{}},'description':_0x1e1753(0x8e)+_0x19ef0b[_0x1e1753(0x8a)]+'.'};},async 'execute'(_0x3fd2ef){const _0x4de395=a191_0x4edebf,_0x8bc3ed=readInput(_0x3fd2ef);await getCustomPageSource(_0x8bc3ed[_0x4de395(0x8a)]);const _0x24b83c=await publishCustomPage(_0x8bc3ed);if(!Number[_0x4de395(0xa6)](_0x24b83c)||_0x24b83c!==_0x8bc3ed[_0x4de395(0x8a)])throw CliErrors['apiError'](_0x4de395(0x9c));const _0x821045=await getCustomPageSource(_0x8bc3ed[_0x4de395(0x8a)]);if(_0x821045[_0x4de395(0x92)]!==_0x4de395(0x9f))throw CliErrors[_0x4de395(0xa8)](_0x4de395(0xab)+(_0x821045[_0x4de395(0x92)]??_0x4de395(0x98))+'.');const _0x2aa3b5=_0x821045[_0x4de395(0x97)]?.['trim'](),_0xb2f2ad=buildCustomPageEditUrl(_0x2aa3b5,_0x8bc3ed[_0x4de395(0x8a)]),_0x2c5297=await resolveCustomPageDevelopmentUrl(_0x2aa3b5,_0x8bc3ed[_0x4de395(0x8a)],_0x3fd2ef[_0x4de395(0xae)]),_0x1202ff=buildMutationData(_0x8bc3ed,!![],_0x2c5297,_0xb2f2ad);_0x2aa3b5&&!_0x2c5297&&_0x1202ff['warnings'][_0x4de395(0x9e)](_0x4de395(0x96));const _0x326187=buildCustomPageRuntimeUrl(_0x821045[_0x4de395(0x97)],_0x821045[_0x4de395(0x9d)]);return _0x326187?_0x1202ff['runtimePageUrl']=_0x326187:_0x1202ff[_0x4de395(0x8b)]['push'](_0x4de395(0x8f)),{'ok':!![],'data':_0x1202ff,'message':'Published\x20Custom\x20Page\x20'+_0x8bc3ed['pageId']+'.'};}};function readInput(_0x51d11b){const _0xc27afa=a191_0x4edebf,_0xe6f906=readCustomPageId(_0x51d11b),_0x1daf56=_0x51d11b['str'](_0xc27afa(0xa7))[_0xc27afa(0xa5)]();return{'pageId':_0xe6f906,..._0x1daf56?{'remark':_0x1daf56}:{}};}function buildMutationData(_0x42d7ec,_0x5dd6f6=![],_0x5ae8db,_0xb763ef){const _0x3033bf=a191_0x4edebf;return{'operation':_0x3033bf(0x8d),'selector':{'pageId':_0x42d7ec[_0x3033bf(0x8a)]},'before':null,'after':{'pageId':_0x42d7ec[_0x3033bf(0x8a)],'status':_0x3033bf(0x9f)},'dryRun':!_0x5dd6f6,'request':_0x42d7ec,..._0x5ae8db?{'pageUrl':_0x5ae8db}:{},..._0xb763ef?{'editPageUrl':_0xb763ef}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a192_0x406386=a192_0x1725;(function(_0x2ca4dc,_0x4fdea4){const _0x1d5a0e=a192_0x1725,_0xec76dd=_0x2ca4dc();while(!![]){try{const _0x4264d6=-parseInt(_0x1d5a0e(0x142))/0x1*(-parseInt(_0x1d5a0e(0x143))/0x2)+parseInt(_0x1d5a0e(0x141))/0x3*(-parseInt(_0x1d5a0e(0x131))/0x4)+parseInt(_0x1d5a0e(0x13f))/0x5+parseInt(_0x1d5a0e(0x145))/0x6*(parseInt(_0x1d5a0e(0x146))/0x7)+-parseInt(_0x1d5a0e(0x133))/0x8+-parseInt(_0x1d5a0e(0x140))/0x9+-parseInt(_0x1d5a0e(0x13a))/0xa*(-parseInt(_0x1d5a0e(0x134))/0xb);if(_0x4264d6===_0x4fdea4)break;else _0xec76dd['push'](_0xec76dd['shift']());}catch(_0x2a1646){_0xec76dd['push'](_0xec76dd['shift']());}}}(a192_0x1a69,0xb63a1));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':a192_0x406386(0x130)};function trimOptional(_0x445fd2){const _0x15896f=a192_0x406386;return _0x445fd2?.[_0x15896f(0x136)]()||undefined;}function a192_0x1725(_0x19a922,_0x14686f){_0x19a922=_0x19a922-0x130;const _0x1a6986=a192_0x1a69();let _0x172580=_0x1a6986[_0x19a922];return _0x172580;}export function buildCustomPageRuntimeUrl(_0x3eb6d6,_0xf19432){const _0x23dd64=trimOptional(_0x3eb6d6),_0x20b4a8=trimOptional(_0xf19432);if(!_0x23dd64||!_0x20b4a8)return undefined;return getPublishedAppDomain(_0x23dd64)+'/'+encodeURIComponent(_0x20b4a8);}export function buildCustomPageDevelopmentUrl(_0x4a8779,_0x4db4ce){const _0x22ddc5=trimOptional(_0x4a8779),_0x55b0bd=trimOptional(_0x4db4ce);if(!_0x22ddc5||!_0x55b0bd)return undefined;return getAppBaseUrl(_0x22ddc5)+'/pages/'+encodeURIComponent(_0x55b0bd);}export async function resolveCustomPageDevelopmentUrl(_0x24c38f,_0x484e37,_0x28920d){const _0x4dee67=a192_0x406386,_0x3e374d=trimOptional(_0x24c38f);if(!_0x3e374d)return undefined;try{const _0x3d1f11=(await fetchMenuSnapshot(_0x3e374d,_0x28920d))[_0x4dee67(0x149)][_0x4dee67(0x13e)](_0x368958=>_0x368958[_0x4dee67(0x147)]===_0x4dee67(0x138)&&_0x368958[_0x4dee67(0x132)]===_0x484e37);return buildCustomPageDevelopmentUrl(_0x3e374d,_0x3d1f11?.['path']);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x510749,_0x326b87){const _0x1654c8=a192_0x406386,_0xd60ee0=trimOptional(_0x510749);if(!_0xd60ee0)return;const _0x33d427=trimOptional(String(_0x326b87??''));if(!_0x33d427)return;return getAppBaseUrl(_0xd60ee0)+_0x1654c8(0x148)+encodeURIComponent(_0x33d427);}export async function validateCustomPageContent(_0x49d7e1){const _0x3d2144=a192_0x406386,_0x190c6c=await validateCustomPageSourceFiles(_0x49d7e1);if(_0x190c6c[_0x3d2144(0x137)]>0x0)throw CliErrors[_0x3d2144(0x139)](_0x3d2144(0x144)+_0x190c6c[_0x3d2144(0x135)](_0x345df9=>_0x345df9[_0x3d2144(0x13d)]+':\x20'+_0x345df9[_0x3d2144(0x13c)])['join'](';\x20'));}export function readCustomPageId(_0x1dc2c0){const _0x445d93=a192_0x406386,_0x4689e5=_0x1dc2c0[_0x445d93(0x13b)]('id');if(!Number[_0x445d93(0x14a)](_0x4689e5)||_0x4689e5<=0x0)throw CliErrors[_0x445d93(0x139)]('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x4689e5;}function a192_0x1a69(){const _0x5ee8ac=['pageId','8788728RZerXu','2454254eFVUsq','map','trim','length','react','validation','100RrDsis','num','message','file','find','1079265yVQPWw','6837048wCcefZ','15ZGTenm','1IaDsFI','986362XHTWwS','Invalid\x20Custom\x20Page\x20content:\x20','240QxRVRa','137928WTijxJ','type','/ide/','menus','isInteger','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','898936HQyXNi'];a192_0x1a69=function(){return _0x5ee8ac;};return a192_0x1a69();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a193_0x331469=a193_0x1211;(function(_0x13ada2,_0x32a8d7){const _0x5d6b70=a193_0x1211,_0x339b5d=_0x13ada2();while(!![]){try{const _0x416965=parseInt(_0x5d6b70(0xf3))/0x1*(-parseInt(_0x5d6b70(0xf5))/0x2)+parseInt(_0x5d6b70(0xe5))/0x3*(parseInt(_0x5d6b70(0xef))/0x4)+-parseInt(_0x5d6b70(0xe0))/0x5*(-parseInt(_0x5d6b70(0xf2))/0x6)+parseInt(_0x5d6b70(0xeb))/0x7*(parseInt(_0x5d6b70(0xe6))/0x8)+parseInt(_0x5d6b70(0xdd))/0x9+parseInt(_0x5d6b70(0xdf))/0xa*(parseInt(_0x5d6b70(0xf4))/0xb)+-parseInt(_0x5d6b70(0xde))/0xc;if(_0x416965===_0x32a8d7)break;else _0x339b5d['push'](_0x339b5d['shift']());}catch(_0x4ee0ff){_0x339b5d['push'](_0x339b5d['shift']());}}}(a193_0x4569,0x8177a));import{format}from'prettier';const SOURCE_PARSERS={'.js':a193_0x331469(0xec),'.jsx':a193_0x331469(0xec),'.ts':'typescript','.tsx':a193_0x331469(0xe2)},CUSTOM_PAGE_EXTENSIONS=[a193_0x331469(0xe8),'.tsx'];export async function validateCustomPageSourceFiles(_0x4f0de0){const _0xb3f8ea=a193_0x331469,_0x35cc85=Object[_0xb3f8ea(0xea)](_0x4f0de0)[_0xb3f8ea(0xed)](([_0x51d06d])=>getParser(_0x51d06d));if(!_0x35cc85[_0xb3f8ea(0xf0)](([_0xdc0234])=>isReactSourceFile(_0xdc0234)))return[{'file':_0xb3f8ea(0xe3),'message':_0xb3f8ea(0xe7)}];const _0x1e6700=await Promise[_0xb3f8ea(0xe9)](_0x35cc85[_0xb3f8ea(0xe4)](async([_0x4d13ba,_0x566441])=>{const _0x100bb3=_0xb3f8ea;try{return await format(_0x566441,{'parser':getParser(_0x4d13ba)}),undefined;}catch(_0x5c1657){return{'file':_0x4d13ba,'message':_0x5c1657 instanceof Error?_0x5c1657[_0x100bb3(0xee)]:String(_0x5c1657)};}}));return _0x1e6700[_0xb3f8ea(0xed)](_0x194388=>_0x194388!==undefined);}function a193_0x1211(_0x3c1be9,_0x34638e){_0x3c1be9=_0x3c1be9-0xdd;const _0x456942=a193_0x4569();let _0x1211a6=_0x456942[_0x3c1be9];return _0x1211a6;}function getParser(_0x4d9335){const _0x1d45d0=a193_0x331469,_0x308a72=_0x4d9335['trim']()['toLowerCase']();return Object[_0x1d45d0(0xea)](SOURCE_PARSERS)[_0x1d45d0(0xe1)](([_0x73247d])=>_0x308a72['endsWith'](_0x73247d))?.[0x1];}function a193_0x4569(){const _0x3e8d94=['endsWith','6145470WcxOwl','5605812mHqRIo','18910riKQKQ','142340zVYKFm','find','typescript','page\x20files','map','125088NFVhXl','344prFKvH','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','.jsx','all','entries','11725kKtIIG','babel','filter','message','24bWpImm','some','trim','72TqNVjC','40311xuJgcv','2893UWjFPK','42JjErka'];a193_0x4569=function(){return _0x3e8d94;};return a193_0x4569();}function isReactSourceFile(_0x362313){const _0x5a6d56=a193_0x331469,_0x1cf69d=_0x362313[_0x5a6d56(0xf1)]()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS[_0x5a6d56(0xf0)](_0x283a71=>_0x1cf69d[_0x5a6d56(0xf6)](_0x283a71));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x348813=a194_0x5484;(function(_0x54bb66,_0x46629e){const _0x1ae431=a194_0x5484,_0x48334a=_0x54bb66();while(!![]){try{const _0x1d67e5=parseInt(_0x1ae431(0xae))/0x1+-parseInt(_0x1ae431(0xc1))/0x2*(-parseInt(_0x1ae431(0xc4))/0x3)+-parseInt(_0x1ae431(0xb7))/0x4+parseInt(_0x1ae431(0xcc))/0x5*(parseInt(_0x1ae431(0xc7))/0x6)+-parseInt(_0x1ae431(0xc3))/0x7+parseInt(_0x1ae431(0xd0))/0x8+parseInt(_0x1ae431(0xba))/0x9*(-parseInt(_0x1ae431(0xb2))/0xa);if(_0x1d67e5===_0x46629e)break;else _0x48334a['push'](_0x48334a['shift']());}catch(_0x3cb9cf){_0x48334a['push'](_0x48334a['shift']());}}}(a194_0x584f,0xd115b));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';function a194_0x584f(){const _0x263547=['POST','pageContent','number','appcode','1423515tdvJRZ','apiError','appCode','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','11822048qKhAhI','custom-update','page','string','write','1204406trGqjb','Custom\x20Page\x20ID','validation','Directory\x20containing\x20all\x20complete\x20page\x20files','25986750pPwmYn','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','/smartapi/webcode/page/update/content','page-dir','newVersion','4994772secckw','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','Updated\x20Custom\x20Page\x20','9BxVgHi','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','compress','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','trim','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','str','2cabzsA','pageId','7808108vqjUAo','4286529qHFtyZ','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','cookie','36SXyinh'];a194_0x584f=function(){return _0x263547;};return a194_0x584f();}import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a194_0x348813(0xd2),'command':a194_0x348813(0xd1),'description':a194_0x348813(0xbf),'risk':a194_0x348813(0xd4),'defaultOutputFormat':a194_0x348813(0xbc),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':'page-content','message':a194_0x348813(0xb8),'hint':a194_0x348813(0xbb)}],'flags':[{'name':'id','type':a194_0x348813(0xca),'required':!![],'description':a194_0x348813(0xaf)},{'name':a194_0x348813(0xb5),'type':a194_0x348813(0xd3),'required':!![],'description':a194_0x348813(0xb1)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1ac8a8){readCustomPageId(_0x1ac8a8),await readValidatedPageContent(_0x1ac8a8);},async 'dryRun'(_0x33c440){const _0x3d80fa=a194_0x348813,_0x2c0de1=await readInput(_0x33c440);return{'method':_0x3d80fa(0xc8),'url':_0x3d80fa(0xb4),'body':{'id':_0x2c0de1[_0x3d80fa(0xc2)],'codeContent':_0x2c0de1[_0x3d80fa(0xc9)]},'description':_0x3d80fa(0xc5)+_0x2c0de1[_0x3d80fa(0xc2)]+'.'};},async 'execute'(_0x51a0b1){const _0x2c9a8a=a194_0x348813,_0x2f904e=await readInput(_0x51a0b1),_0x1e4010=await updateCustomPageContent({'pageId':_0x2f904e['pageId'],'pageContent':_0x2f904e[_0x2c9a8a(0xc9)]});if(!Number['isInteger'](_0x1e4010['newVersion'])||_0x1e4010['newVersion']<=0x0)throw CliErrors[_0x2c9a8a(0xcd)](_0x2c9a8a(0xb3));const _0x5f55d0=buildCustomPageEditUrl(_0x2f904e['appCode'],_0x2f904e[_0x2c9a8a(0xc2)]),_0x4f497f=await resolveCustomPageDevelopmentUrl(_0x2f904e['appCode'],_0x2f904e[_0x2c9a8a(0xc2)],_0x51a0b1[_0x2c9a8a(0xc6)]);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x2f904e[_0x2c9a8a(0xce)],'pageId':_0x2f904e[_0x2c9a8a(0xc2)]},'before':null,'after':{'pageId':_0x1e4010[_0x2c9a8a(0xc2)],'version':_0x1e4010[_0x2c9a8a(0xb6)],'pageContent':_0x2f904e[_0x2c9a8a(0xc9)]},'dryRun':![],'request':_0x2f904e,..._0x4f497f?{'pageUrl':_0x4f497f}:{},..._0x5f55d0?{'editPageUrl':_0x5f55d0}:{},'warnings':_0x4f497f?[]:[_0x2c9a8a(0xcf)]},'message':_0x2c9a8a(0xb9)+_0x2f904e[_0x2c9a8a(0xc2)]+'.'};}};async function readInput(_0x5e7de7){const _0x2980fd=a194_0x348813,_0x3fa6c8=readCustomPageId(_0x5e7de7),_0x35e7e9=_0x5e7de7[_0x2980fd(0xc0)](_0x2980fd(0xcb))['trim']()||(await getCustomPageSource(_0x3fa6c8))[_0x2980fd(0xce)]?.[_0x2980fd(0xbe)]();if(!_0x35e7e9)throw CliErrors[_0x2980fd(0xb0)](_0x2980fd(0xbd)+_0x3fa6c8+'.');return{'appCode':_0x35e7e9,'pageId':_0x3fa6c8,'pageContent':await readValidatedPageContent(_0x5e7de7)};}function a194_0x5484(_0x159ca8,_0x23c12c){_0x159ca8=_0x159ca8-0xae;const _0x584fe6=a194_0x584f();let _0x54842e=_0x584fe6[_0x159ca8];return _0x54842e;}async function readValidatedPageContent(_0x28325b){const _0x40aa54=a194_0x348813,_0x336c38=await readCustomPageDirectory(_0x28325b[_0x40aa54(0xc0)](_0x40aa54(0xb5)));return await validateCustomPageContent(_0x336c38),_0x336c38;}
|