@lovrabet/rabetbase-cli 2.5.4-beta.1 → 2.5.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- 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/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.d.ts +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.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/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/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.d.ts +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.d.ts +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.d.ts +4 -0
- 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.d.ts +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +14 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +1 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/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.d.ts +15 -3
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +2 -2
- 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.d.ts +5 -0
- 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 +2 -2
- package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
- package/skills/rabetbase/guides/sql-mybatis.md +12 -8
- package/skills/rabetbase/references/rabetbase-config.md +6 -4
- package/skills/rabetbase/references/rabetbase-init.md +7 -5
- package/skills/rabetbase/references/rabetbase-kb.md +8 -6
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a181_0xc65655=a181_0x5673;(function(_0x82156a,_0x1d4874){const _0x334b23=a181_0x5673,_0x7544=_0x82156a();while(!![]){try{const _0x335fd4=-parseInt(_0x334b23(0x114))/0x1*(-parseInt(_0x334b23(0x129))/0x2)+-parseInt(_0x334b23(0x100))/0x3*(parseInt(_0x334b23(0x16f))/0x4)+parseInt(_0x334b23(0x147))/0x5*(-parseInt(_0x334b23(0x15d))/0x6)+parseInt(_0x334b23(0x175))/0x7*(parseInt(_0x334b23(0x16d))/0x8)+-parseInt(_0x334b23(0x139))/0x9*(-parseInt(_0x334b23(0x164))/0xa)+parseInt(_0x334b23(0x117))/0xb+-parseInt(_0x334b23(0x12a))/0xc;if(_0x335fd4===_0x1d4874)break;else _0x7544['push'](_0x7544['shift']());}catch(_0x5ea72b){_0x7544['push'](_0x7544['shift']());}}}(a181_0x37f6,0xbb287));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a181_0xc65655(0x159),a181_0xc65655(0x15b),a181_0xc65655(0x153),a181_0xc65655(0x14b)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0xc65655(0x169),'channelType',a181_0xc65655(0x14e),a181_0xc65655(0x135),'description',a181_0xc65655(0x12c),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode','configCode',a181_0xc65655(0x105)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0xc65655(0x126),a181_0xc65655(0x107),'ccList','bccList',a181_0xc65655(0x10e),a181_0xc65655(0x122),a181_0xc65655(0x123),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a181_0xc65655(0x151),'required':![],'description':a181_0xc65655(0x156)},{'name':a181_0xc65655(0x13a),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a181_0xc65655(0x144),'type':a181_0xc65655(0x151),'required':![],'description':a181_0xc65655(0x152)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a181_0xc65655(0x136)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3c2da5,_0x2ace7a,_0x3c8b4f){return new CliError(_0x3c2da5,0x1,_0x2ace7a,_0x3c8b4f);}export function readNotificationId(_0x1bbd6d){const _0x4f0b32=a181_0xc65655,_0x3a8285=_0x1bbd6d[_0x4f0b32(0x10f)]('id');if(!Number['isSafeInteger'](_0x3a8285)||_0x3a8285<=0x0)throw notificationError(_0x4f0b32(0x11d),_0x4f0b32(0x106));return _0x3a8285;}export function requireNotificationExplicitYes(_0x30138b){const _0x22c0dc=a181_0xc65655;if(_0x30138b['bool'](_0x22c0dc(0x148))||_0x30138b[_0x22c0dc(0x118)](_0x22c0dc(0xfe)))return;throw notificationError('notification_config_confirmation_required',_0x22c0dc(0x16a),_0x22c0dc(0x133));}function a181_0x37f6(){const _0x93cf11=['Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','\x22\x20is\x20forbidden.','from-env','number','appCode','5UKfpJr','dry-run','env','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','WEBHOOK','Allowed\x20values:\x20','readTimeout','endpointUrl','parse','notification_config_response_invalid','string','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','WECOM','a\x20JSON\x20object','trim','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','utf8','type','FEISHU','\x22\x20must\x20be\x20','DINGTALK','\x20must\x20be\x20an\x20object.','419262WnOIFg','updateTime','validation','a\x20supported\x20string','configCode','\x22channelType\x22.','isArray','1631250XWpKMf','preflight','Invalid\x20--','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_field_unknown','configName','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','length','channelType','7927176btMuyQ','\x22\x20cannot\x20exceed\x20','11972BaKmgf','notification_config_field_required','createTime','path','keys','str','7jqcJTX','\x20has\x20invalid\x20field\x20\x22','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','notification_config_source_unavailable','setEncoding','yes','\x20--type\x20','1299sJpTxc','a\x20non-empty\x20string','\x20has\x20an\x20invalid\x20channelType.','create','apiError','channelCode','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','recipients','hasOwnProperty','\x20--format\x20compress','notification_config_channel_field_forbidden','Notification\x20config\x20list\x20item\x20','description','kind','replyTo','num','push','join','stringify','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','30WojcsW','Notification\x20config\x20','failed','5343888NAjfgQ','bool','notification_config_update_empty','name','\x20characters.','environment\x20variable\x20','notification_config_id_invalid','some','a\x20string\x20or\x20null','EMAIL','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','subjectPrefix','fromName','has','file','emailTargets','entries','includes','12106pKyXLo','4097700tIaYMw','isSafeInteger','connectTimeout','call','\x20has\x20an\x20invalid\x20id.','_unavailable','notification_config_field_invalid','Notification\x20JSON\x20from\x20','\x20has\x20an\x20invalid\x20appCode.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','every','channelConfig','Application-level\x20notification\x20config\x20ID','update','Notification\x20JSON\x20field\x20\x22','45cMmaVD','stdin','\x20failed.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x22configName\x22.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','channelConfigRaw','Missing\x20notification\x20JSON\x20source.','endpointUrlRaw'];a181_0x37f6=function(){return _0x93cf11;};return a181_0x37f6();}export function readNotificationChannelType(_0xc60f64,_0x3e0de3=a181_0xc65655(0x158),_0x4199c0=a181_0xc65655(0x120)){const _0x344ca8=a181_0xc65655,_0x5c98db=_0xc60f64[_0x344ca8(0x174)](_0x3e0de3)['trim']()||_0x4199c0;if(!NOTIFICATION_CHANNEL_TYPES[_0x344ca8(0x128)](_0x5c98db))throw CliErrors[_0x344ca8(0x15f)](_0x344ca8(0x166)+_0x3e0de3+':\x20'+_0x5c98db,_0x344ca8(0x14c)+NOTIFICATION_CHANNEL_TYPES[_0x344ca8(0x111)](',\x20')+'.');return _0x5c98db;}export function assertSingleNotificationSource(_0x13a834){const _0x3c91f1=a181_0xc65655,_0x59b49f=[],_0x4809c1=_0x13a834[_0x3c91f1(0x174)](_0x3c91f1(0x125))['trim']();if(_0x4809c1)_0x59b49f[_0x3c91f1(0x110)]({'kind':_0x3c91f1(0x125),'path':_0x4809c1});if(_0x13a834[_0x3c91f1(0x118)]('stdin'))_0x59b49f[_0x3c91f1(0x110)]({'kind':_0x3c91f1(0x13a)});const _0x6513bb=_0x13a834[_0x3c91f1(0x174)](_0x3c91f1(0x144))[_0x3c91f1(0x155)]();if(_0x6513bb)_0x59b49f[_0x3c91f1(0x110)]({'kind':'env','name':_0x6513bb});if(_0x59b49f[_0x3c91f1(0x16b)]===0x0)throw CliErrors[_0x3c91f1(0x15f)](_0x3c91f1(0x140),_0x3c91f1(0x14a));if(_0x59b49f['length']>0x1)throw CliErrors[_0x3c91f1(0x15f)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x3c91f1(0x14a));return _0x59b49f[0x0];}export async function readNotificationDocument(_0x501010,_0x49b2b2){const _0x2f7810=a181_0xc65655,_0x28e4ab=assertSingleNotificationSource(_0x501010),_0xb26c0b=_0x28e4ab[_0x2f7810(0x10d)]===_0x2f7810(0x125)?'file\x20'+_0x28e4ab[_0x2f7810(0x172)]:_0x28e4ab[_0x2f7810(0x10d)]===_0x2f7810(0x149)?_0x2f7810(0x11c)+_0x28e4ab[_0x2f7810(0x11a)]:_0x2f7810(0x13a);let _0x3d29d0;try{if(_0x28e4ab['kind']==='file')_0x3d29d0=await readFile(_0x28e4ab[_0x2f7810(0x172)],'utf8');else{if(_0x28e4ab['kind']===_0x2f7810(0x149)){if(!(_0x28e4ab[_0x2f7810(0x11a)]in process.env))throw notificationError('notification_config_source_unavailable',_0x2f7810(0x167)+_0x28e4ab[_0x2f7810(0x11a)]);_0x3d29d0=process.env[_0x28e4ab.name]??'';}else _0x3d29d0=await readStdin();}}catch(_0x329097){if(_0x329097 instanceof CliError)throw _0x329097;throw notificationError(_0x2f7810(0xfc),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0xb26c0b+'.');}let _0x448f7e;try{_0x448f7e=JSON[_0x2f7810(0x14f)](_0x3d29d0);}catch{throw notificationError('notification_config_json_invalid',_0x2f7810(0x131)+_0xb26c0b+'\x20is\x20invalid.',_0x2f7810(0x121));}if(!isJsonObject(_0x448f7e))throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0xb26c0b+_0x2f7810(0x15c));return validateNotificationDocument(_0x448f7e,_0x49b2b2);}export function projectNotificationListConfig(_0x43ab70,_0x804ef1){const _0x4b39a1=a181_0xc65655;return{'id':typeof _0x43ab70['id']===_0x4b39a1(0x145)?_0x43ab70['id']:null,'configCode':requireResponseString(_0x43ab70['configCode'],_0x4b39a1(0x161),_0x804ef1),'configName':requireResponseString(_0x43ab70['configName'],_0x4b39a1(0x169),_0x804ef1),'channelType':requireResponseString(_0x43ab70[_0x4b39a1(0x16c)],_0x4b39a1(0x16c),_0x804ef1),'description':normalizeNullableString(_0x43ab70[_0x4b39a1(0x10c)]),'createTime':normalizeNullableString(_0x43ab70[_0x4b39a1(0x171)]),'updateTime':normalizeNullableString(_0x43ab70[_0x4b39a1(0x15e)])};}export function normalizeExactNotificationConfig(_0xa6fbe9,_0x2aeaaf,_0x297ac4){const _0x3fd3c7=a181_0xc65655;if(!Number[_0x3fd3c7(0x12b)](_0xa6fbe9['id'])||_0xa6fbe9['id']!==_0x2aeaaf)throw notificationError(_0x3fd3c7(0x150),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x2aeaaf+'.');if(_0xa6fbe9[_0x3fd3c7(0x146)]!==_0x297ac4)throw notificationError('notification_config_response_invalid',_0x3fd3c7(0x115)+_0x2aeaaf+_0x3fd3c7(0xfb));const _0x48c7ca=requireExactString(_0xa6fbe9[_0x3fd3c7(0x169)],'configName',_0x2aeaaf),_0x2129bd=requireExactString(_0xa6fbe9[_0x3fd3c7(0x161)],_0x3fd3c7(0x161),_0x2aeaaf),_0x18fcb1=requireExactString(_0xa6fbe9[_0x3fd3c7(0x16c)],_0x3fd3c7(0x16c),_0x2aeaaf);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x18fcb1))throw notificationError('notification_config_response_invalid',_0x3fd3c7(0x115)+_0x2aeaaf+'\x20has\x20an\x20unsupported\x20channelType.');const _0x4a631b=responseNullableString(_0xa6fbe9['endpointUrl'],_0x3fd3c7(0x14e),_0x2aeaaf),_0x4feb0a=responseNullableString(_0xa6fbe9[_0x3fd3c7(0x135)],_0x3fd3c7(0x135),_0x2aeaaf),_0x234bbf=responseNullableString(_0xa6fbe9['description'],_0x3fd3c7(0x10c),_0x2aeaaf),_0x3cf145=responseNullableTimeout(_0xa6fbe9[_0x3fd3c7(0x12c)],_0x3fd3c7(0x12c),_0x2aeaaf),_0x370f56=responseNullableTimeout(_0xa6fbe9[_0x3fd3c7(0x14d)],_0x3fd3c7(0x14d),_0x2aeaaf);return{'id':_0x2aeaaf,'appCode':_0x297ac4,'configCode':_0x2129bd,'configName':_0x48c7ca,'channelType':_0x18fcb1,'endpointUrl':redactSensitive(_0x4a631b),'channelConfig':redactSensitive(_0x4feb0a),'description':_0x234bbf,'connectTimeout':_0x3cf145,'readTimeout':_0x370f56,'endpointUrlRaw':_0x4a631b,'channelConfigRaw':_0x4feb0a};}export async function requireExactNotificationConfig(_0x26b1df,_0x396c8a,_0xe8883a){const _0x356b22=a181_0xc65655;let _0x4e8162;try{_0x4e8162=await getNotificationChannelConfig(_0x396c8a,_0x26b1df);}catch{throw safeApiFailure(_0xe8883a,_0x356b22(0x165),_0x356b22(0x113)+_0x26b1df+_0x356b22(0x13c));}return normalizeExactNotificationConfig(_0x4e8162,_0x396c8a,_0x26b1df);}export function projectNotificationConfig(_0x23d7b5){const _0x1f82ba=a181_0xc65655;return{'id':_0x23d7b5['id']??null,'appCode':_0x23d7b5['appCode'],'configCode':_0x23d7b5[_0x1f82ba(0x161)]??null,'configName':_0x23d7b5[_0x1f82ba(0x169)],'channelType':_0x23d7b5[_0x1f82ba(0x16c)],'endpointUrl':redactSensitive(_0x23d7b5[_0x1f82ba(0x14e)]),'channelConfig':redactSensitive(_0x23d7b5[_0x1f82ba(0x135)]),'description':_0x23d7b5['description']??null,'connectTimeout':_0x23d7b5['connectTimeout']??null,'readTimeout':_0x23d7b5[_0x1f82ba(0x14d)]??null};}export function notificationSelector(_0x2fb013){const _0x336388=a181_0xc65655;return{'appCode':_0x2fb013['appCode'],'id':_0x2fb013['id'],'configCode':_0x2fb013[_0x336388(0x161)],'configName':_0x2fb013['configName'],'channelType':_0x2fb013[_0x336388(0x16c)]};}export function createMutationInput(_0x5ee4e7,_0x2eab83){const _0x2dc6f0=a181_0xc65655;return{'appCode':_0x5ee4e7,'configName':_0x2eab83[_0x2dc6f0(0x169)],'channelType':_0x2eab83[_0x2dc6f0(0x16c)],...hasOwn(_0x2eab83,_0x2dc6f0(0x14e))?{'endpointUrl':_0x2eab83[_0x2dc6f0(0x14e)]}:{},...hasOwn(_0x2eab83,_0x2dc6f0(0x135))?{'channelConfig':serializeChannelConfig(_0x2eab83[_0x2dc6f0(0x135)])}:{},...hasOwn(_0x2eab83,_0x2dc6f0(0x10c))?{'description':_0x2eab83['description']}:{},...hasOwn(_0x2eab83,_0x2dc6f0(0x12c))?{'connectTimeout':_0x2eab83[_0x2dc6f0(0x12c)]}:{},...hasOwn(_0x2eab83,_0x2dc6f0(0x14d))?{'readTimeout':_0x2eab83[_0x2dc6f0(0x14d)]}:{}};}export function mergeUpdateInput(_0x120577,_0x38148d){const _0x1ccc79=a181_0xc65655;return{'id':_0x120577['id'],'appCode':_0x120577['appCode'],'configName':_0x38148d[_0x1ccc79(0x169)]??_0x120577[_0x1ccc79(0x169)],'channelType':_0x38148d[_0x1ccc79(0x16c)]??_0x120577[_0x1ccc79(0x16c)],'endpointUrl':hasOwn(_0x38148d,_0x1ccc79(0x14e))?_0x38148d[_0x1ccc79(0x14e)]:_0x120577[_0x1ccc79(0x141)],'channelConfig':hasOwn(_0x38148d,_0x1ccc79(0x135))?serializeChannelConfig(_0x38148d['channelConfig']):_0x120577[_0x1ccc79(0x13f)],'description':hasOwn(_0x38148d,_0x1ccc79(0x10c))?_0x38148d['description']:_0x120577['description'],'connectTimeout':hasOwn(_0x38148d,_0x1ccc79(0x12c))?_0x38148d['connectTimeout']:_0x120577[_0x1ccc79(0x12c)],'readTimeout':hasOwn(_0x38148d,_0x1ccc79(0x14d))?_0x38148d[_0x1ccc79(0x14d)]:_0x120577['readTimeout']};}export function plannedUpdateProjection(_0x1a5d52,_0x475572){const _0xdfb784=a181_0xc65655;return projectNotificationConfig({'id':_0x1a5d52['id'],'appCode':_0x1a5d52[_0xdfb784(0x146)],'configCode':_0x1a5d52[_0xdfb784(0x161)],'configName':_0x475572['configName']??_0x1a5d52['configName'],'channelType':_0x475572[_0xdfb784(0x16c)]??_0x1a5d52['channelType'],'endpointUrl':hasOwn(_0x475572,_0xdfb784(0x14e))?_0x475572[_0xdfb784(0x14e)]:_0x1a5d52[_0xdfb784(0x141)],'channelConfig':hasOwn(_0x475572,_0xdfb784(0x135))?_0x475572[_0xdfb784(0x135)]:_0x1a5d52[_0xdfb784(0x13f)],'description':hasOwn(_0x475572,_0xdfb784(0x10c))?_0x475572[_0xdfb784(0x10c)]:_0x1a5d52[_0xdfb784(0x10c)],'connectTimeout':hasOwn(_0x475572,_0xdfb784(0x12c))?_0x475572[_0xdfb784(0x12c)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x1a5d52['connectTimeout'],'readTimeout':hasOwn(_0x475572,_0xdfb784(0x14d))?_0x475572[_0xdfb784(0x14d)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x1a5d52[_0xdfb784(0x14d)]});}export function requestedSafeFieldsMatch(_0x22e937,_0x22cb6e,_0x44a095){const _0x24b5d1=a181_0xc65655,_0x328d08=[],_0xa4609a=[],_0x4585ea=[];for(const _0x57c3b7 of[_0x24b5d1(0x169),_0x24b5d1(0x16c),_0x24b5d1(0x10c)]){if(!hasOwn(_0x44a095,_0x57c3b7))continue;_0x4585ea[_0x24b5d1(0x110)](_0x57c3b7),_0x328d08[_0x24b5d1(0x110)](_0x22cb6e[_0x57c3b7]===_0x44a095[_0x57c3b7]),_0xa4609a[_0x24b5d1(0x110)](_0x22e937[_0x57c3b7]!==_0x44a095[_0x57c3b7]&&_0x22cb6e[_0x57c3b7]===_0x44a095[_0x57c3b7]);}for(const _0x1f6204 of[_0x24b5d1(0x12c),_0x24b5d1(0x14d)]){if(!hasOwn(_0x44a095,_0x1f6204))continue;const _0xfb6354=_0x44a095[_0x1f6204]??(_0x1f6204===_0x24b5d1(0x12c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x4585ea[_0x24b5d1(0x110)](_0x1f6204),_0x328d08[_0x24b5d1(0x110)](_0x22cb6e[_0x1f6204]===_0xfb6354),_0xa4609a['push'](_0x22e937[_0x1f6204]!==_0xfb6354&&_0x22cb6e[_0x1f6204]===_0xfb6354);}return hasOwn(_0x44a095,_0x24b5d1(0x14e))&&_0x44a095[_0x24b5d1(0x14e)]===null&&(_0x4585ea[_0x24b5d1(0x110)]('endpointUrl:null'),_0x328d08['push'](_0x22cb6e[_0x24b5d1(0x141)]===null||_0x22cb6e[_0x24b5d1(0x141)]===''),_0xa4609a[_0x24b5d1(0x110)](_0x22e937[_0x24b5d1(0x141)]!==null&&_0x22e937[_0x24b5d1(0x141)]!==''&&(_0x22cb6e[_0x24b5d1(0x141)]===null||_0x22cb6e[_0x24b5d1(0x141)]===''))),{'allMatch':_0x328d08[_0x24b5d1(0x134)](Boolean),'provesChange':_0xa4609a[_0x24b5d1(0x11e)](Boolean),'verifiedFields':_0x4585ea};}export function validateNotificationDeleteReadback(_0x31240c,_0x40689d,_0x32e8c0){const _0x338318=a181_0xc65655;for(const [_0x41afc3,_0x44052d]of _0x31240c[_0x338318(0x127)]()){if(!Number['isSafeInteger'](_0x44052d['id'])||_0x44052d['id']<=0x0)throw notificationError(_0x338318(0x150),'Notification\x20config\x20list\x20item\x20'+(_0x41afc3+0x1)+_0x338318(0x12e));if(_0x44052d[_0x338318(0x146)]!==_0x40689d)throw notificationError(_0x338318(0x150),'Notification\x20config\x20list\x20item\x20'+(_0x41afc3+0x1)+_0x338318(0x132));if(_0x44052d['channelType']!==_0x32e8c0)throw notificationError(_0x338318(0x150),_0x338318(0x10b)+(_0x41afc3+0x1)+_0x338318(0x102));}}function a181_0x5673(_0x4bbac3,_0x599076){_0x4bbac3=_0x4bbac3-0xfa;const _0x37f657=a181_0x37f6();let _0x5673b9=_0x37f657[_0x4bbac3];return _0x5673b9;}export function safeApiFailure(_0x5389af,_0x341cad,_0x47726b){const _0x5be6eb=a181_0xc65655;return notificationError('notification_config_'+_0x5389af+'_'+(_0x341cad==='mutation'?_0x5be6eb(0x116):_0x341cad+_0x5be6eb(0x12f)),_0x5be6eb(0x115)+_0x5389af+'\x20'+_0x341cad+_0x5be6eb(0x13b),_0x47726b);}export function notificationLookupCommand(_0x294702,_0x27b40f){const _0xf5e898=a181_0xc65655;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x294702+_0xf5e898(0xff)+_0x27b40f+_0xf5e898(0x109);}function validateNotificationDocument(_0x1eca7d,_0x4a6d07){const _0x55f193=a181_0xc65655;for(const _0x2e8f94 of Object['keys'](_0x1eca7d)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x2e8f94))throw notificationError('notification_config_field_forbidden',_0x55f193(0x138)+_0x2e8f94+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x55f193(0x124)](_0x2e8f94))throw notificationError(_0x55f193(0x168),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x2e8f94+'\x22.');}if(_0x4a6d07===_0x55f193(0x137)&&Object[_0x55f193(0x173)](_0x1eca7d)['length']===0x0)throw notificationError(_0x55f193(0x119),_0x55f193(0x142));const _0x385ebf={};if(hasOwn(_0x1eca7d,_0x55f193(0x169)))_0x385ebf[_0x55f193(0x169)]=validateRequiredString(_0x1eca7d[_0x55f193(0x169)],_0x55f193(0x169),0x80);else{if(_0x4a6d07===_0x55f193(0x103))throw notificationError(_0x55f193(0x170),'Create\x20JSON\x20requires\x20field\x20'+_0x55f193(0x13d));}if(hasOwn(_0x1eca7d,_0x55f193(0x16c))){if(typeof _0x1eca7d[_0x55f193(0x16c)]!==_0x55f193(0x151))throw invalidFieldType('channelType',_0x55f193(0x160));const _0xa42baa=_0x1eca7d[_0x55f193(0x16c)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x55f193(0x128)](_0xa42baa))throw notificationError(_0x55f193(0x130),_0x55f193(0x13e),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x385ebf['channelType']=_0xa42baa;}else{if(_0x4a6d07==='create')throw notificationError(_0x55f193(0x170),'Create\x20JSON\x20requires\x20field\x20'+_0x55f193(0x162));}for(const [_0x2fa057,_0x3a0efe]of[[_0x55f193(0x14e),0x200],[_0x55f193(0x10c),0x100]]){if(!hasOwn(_0x1eca7d,_0x2fa057))continue;const _0x376885=_0x1eca7d[_0x2fa057];if(_0x376885!==null&&typeof _0x376885!==_0x55f193(0x151))throw invalidFieldType(_0x2fa057,_0x55f193(0x11f));if(typeof _0x376885===_0x55f193(0x151)&&_0x376885['length']>_0x3a0efe)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x2fa057+_0x55f193(0x16e)+_0x3a0efe+_0x55f193(0x11b));_0x385ebf[_0x2fa057]=_0x376885;}if(hasOwn(_0x1eca7d,_0x55f193(0x135))){const _0x323312=_0x1eca7d[_0x55f193(0x135)];if(_0x323312===null&&_0x4a6d07===_0x55f193(0x103))throw invalidFieldType('channelConfig',_0x55f193(0x154));if(_0x323312!==null&&!isJsonObject(_0x323312))throw invalidFieldType(_0x55f193(0x135),_0x4a6d07===_0x55f193(0x137)?'a\x20JSON\x20object\x20or\x20null':_0x55f193(0x154));_0x323312!==null&&validateChannelConfigFields(_0x385ebf[_0x55f193(0x16c)],_0x323312),_0x385ebf[_0x55f193(0x135)]=_0x323312;}for(const _0x3bc72e of[_0x55f193(0x12c),_0x55f193(0x14d)]){if(!hasOwn(_0x1eca7d,_0x3bc72e))continue;const _0x1fc4e2=_0x1eca7d[_0x3bc72e];if(_0x1fc4e2!==null&&(!Number[_0x55f193(0x12b)](_0x1fc4e2)||_0x1fc4e2<0x0))throw notificationError(_0x55f193(0x130),'Notification\x20JSON\x20field\x20\x22'+_0x3bc72e+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x385ebf[_0x3bc72e]=_0x1fc4e2;}return _0x385ebf;}function validateRequiredString(_0x3e8b03,_0x2404a3,_0x31d87a){const _0x893215=a181_0xc65655;if(typeof _0x3e8b03!=='string')throw invalidFieldType(_0x2404a3,_0x893215(0x101));const _0x472ce3=_0x3e8b03['trim']();if(!_0x472ce3)throw notificationError(_0x893215(0x130),_0x893215(0x138)+_0x2404a3+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x472ce3['length']>_0x31d87a)throw notificationError(_0x893215(0x130),_0x893215(0x138)+_0x2404a3+_0x893215(0x16e)+_0x31d87a+_0x893215(0x11b));return _0x472ce3;}function validateChannelConfigFields(_0x38d21b,_0x5b9e2e){if(hasOwn(_0x5b9e2e,'messageTemplate'))throw forbiddenChannelConfigField('messageTemplate');if(_0x38d21b==='EMAIL')for(const _0x34e47d of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x5b9e2e,_0x34e47d))throw forbiddenChannelConfigField(_0x34e47d);}}function forbiddenChannelConfigField(_0x28fadc){const _0x376a10=a181_0xc65655;return notificationError(_0x376a10(0x10a),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x28fadc+_0x376a10(0x143));}function invalidFieldType(_0x1ff886,_0x3232b3){const _0x1329ff=a181_0xc65655;return notificationError('notification_config_field_invalid',_0x1329ff(0x138)+_0x1ff886+_0x1329ff(0x15a)+_0x3232b3+'.');}function serializeChannelConfig(_0x3d1cf2){const _0x2b8c2b=a181_0xc65655;return _0x3d1cf2===null||_0x3d1cf2===undefined?null:JSON[_0x2b8c2b(0x112)](_0x3d1cf2);}function redactSensitive(_0x257a10){return _0x257a10===null||_0x257a10===undefined||_0x257a10===''?null:'<redacted>';}function requireResponseString(_0x34f3a6,_0xc44118,_0x5c3f10){const _0xd9eb44=a181_0xc65655;if(typeof _0x34f3a6!==_0xd9eb44(0x151)||_0x34f3a6[_0xd9eb44(0x155)]()==='')throw CliErrors[_0xd9eb44(0x104)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x5c3f10+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0xc44118+'\x22.');return _0x34f3a6[_0xd9eb44(0x155)]();}function requireExactString(_0x28f74b,_0x498c0a,_0x2224cb){const _0x358da0=a181_0xc65655;if(typeof _0x28f74b!=='string'||_0x28f74b[_0x358da0(0x155)]()==='')throw notificationError(_0x358da0(0x150),_0x358da0(0x115)+_0x2224cb+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x498c0a+'\x22.');return _0x28f74b[_0x358da0(0x155)]();}function responseNullableString(_0x1a9cbc,_0x182134,_0x343733){const _0x2f5fbb=a181_0xc65655;if(_0x1a9cbc===undefined||_0x1a9cbc===null)return null;if(typeof _0x1a9cbc!=='string')throw notificationError('notification_config_response_invalid',_0x2f5fbb(0x115)+_0x343733+'\x20has\x20invalid\x20field\x20\x22'+_0x182134+'\x22.');return _0x1a9cbc;}function responseNullableTimeout(_0x477fbd,_0x193fca,_0x685039){const _0x144a0d=a181_0xc65655;if(_0x477fbd===undefined||_0x477fbd===null)return null;if(!Number[_0x144a0d(0x12b)](_0x477fbd)||_0x477fbd<0x0)throw notificationError(_0x144a0d(0x150),_0x144a0d(0x115)+_0x685039+_0x144a0d(0xfa)+_0x193fca+'\x22.');return _0x477fbd;}function normalizeNullableString(_0xb74f5d){return typeof _0xb74f5d==='string'?_0xb74f5d:null;}function isJsonObject(_0xe3abd9){const _0x178ca5=a181_0xc65655;return _0xe3abd9!==null&&typeof _0xe3abd9==='object'&&!Array[_0x178ca5(0x163)](_0xe3abd9);}function hasOwn(_0x1cd354,_0x59a6c8){const _0xa397e6=a181_0xc65655;return Object['prototype'][_0xa397e6(0x108)][_0xa397e6(0x12d)](_0x1cd354,_0x59a6c8);}async function readStdin(){const _0x48318c=a181_0xc65655;let _0x432b7c='';process[_0x48318c(0x13a)][_0x48318c(0xfd)](_0x48318c(0x157));for await(const _0x181f5d of process[_0x48318c(0x13a)])_0x432b7c+=_0x181f5d;return _0x432b7c;}
|
|
1
|
+
const a181_0x4756dc=a181_0x293b;(function(_0x218807,_0x104cbe){const _0x26d292=a181_0x293b,_0x4b2825=_0x218807();while(!![]){try{const _0x5afc13=parseInt(_0x26d292(0x16a))/0x1+parseInt(_0x26d292(0x186))/0x2+-parseInt(_0x26d292(0x151))/0x3*(parseInt(_0x26d292(0x156))/0x4)+parseInt(_0x26d292(0x194))/0x5*(-parseInt(_0x26d292(0x1a2))/0x6)+parseInt(_0x26d292(0x15e))/0x7*(parseInt(_0x26d292(0x17f))/0x8)+parseInt(_0x26d292(0x164))/0x9*(parseInt(_0x26d292(0x17c))/0xa)+parseInt(_0x26d292(0x183))/0xb;if(_0x5afc13===_0x104cbe)break;else _0x4b2825['push'](_0x4b2825['shift']());}catch(_0x573558){_0x4b2825['push'](_0x4b2825['shift']());}}}(a181_0x2802,0x83b4a));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_0x4756dc(0x19c),a181_0x4756dc(0x142),a181_0x4756dc(0x182),'WECOM',a181_0x4756dc(0x150)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;function a181_0x2802(){const _0x82310=['\x22channelType\x22.','320HLYzxC','messageTemplate','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','configName','call','push','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_channel_field_forbidden','16681DwaedI','\x22configName\x22.','\x20failed.','Application-level\x20notification\x20config\x20ID','\x22\x20must\x20be\x20','\x20must\x20be\x20an\x20object.','9LJHUsC','isSafeInteger','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','readTimeout','isArray','\x20has\x20an\x20invalid\x20appCode.','181548piWBMJ','a\x20supported\x20string','notification_config_response_invalid','parse','yes','\x20has\x20an\x20invalid\x20id.','configCode','_unavailable','validation','Create\x20JSON\x20requires\x20field\x20','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','replyTo','a\x20string\x20or\x20null','stringify','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','channelType','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','mutation','9626850BOJTkH','update','Notification\x20config\x20','152mwWCYV','appCode','<redacted>','DINGTALK','1714240EtJrEi','a\x20non-empty\x20string','name','1763244JLvVYS','every','includes','channelConfigRaw','notification_config_source_unavailable','Notification\x20JSON\x20channelConfig\x20field\x20\x22','endpointUrl','emailTargets','preflight','num','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20field\x20\x22','hasOwnProperty','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','87070orkwCg','\x22\x20must\x20be\x20a\x20non-empty\x20string.','endpointUrl:null','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','join','channelConfig','str','file','EMAIL','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Item\x20','file\x20','utf8','prototype','354iisPWd','\x20has\x20an\x20invalid\x20channelType.','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_field_invalid','has','Allowed\x20values:\x20','\x20is\x20invalid.','\x20characters.','string','\x20--format\x20compress','createTime','Unknown\x20notification\x20JSON\x20field\x20\x22','setEncoding','trim','updateTime','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','path','notification_config_confirmation_required','apiError','channelCode','create','env','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','description','FEISHU','\x20--type\x20','a\x20JSON\x20object\x20or\x20null','stdin','bool','notification_config_json_invalid','endpointUrlRaw','Notification\x20JSON\x20from\x20','kind','\x20has\x20invalid\x20field\x20\x22','type','failed','connectTimeout','keys','WEBHOOK','24753rBPSri','bccList','a\x20JSON\x20object','length'];a181_0x2802=function(){return _0x82310;};return a181_0x2802();}export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x4756dc(0x159),a181_0x4756dc(0x179),'endpointUrl',a181_0x4756dc(0x199),a181_0x4756dc(0x141),'connectTimeout',a181_0x4756dc(0x167)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a181_0x4756dc(0x170),a181_0x4756dc(0x1b8)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x4756dc(0x18d),'recipients','ccList',a181_0x4756dc(0x152),a181_0x4756dc(0x175),'subjectPrefix','fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a181_0x4756dc(0x19b),'type':a181_0x4756dc(0x1ab),'required':![],'description':a181_0x4756dc(0x197)},{'name':a181_0x4756dc(0x145),'type':'boolean','required':![],'default':![],'description':a181_0x4756dc(0x17a)},{'name':'from-env','type':a181_0x4756dc(0x1ab),'required':![],'description':a181_0x4756dc(0x1bb)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a181_0x4756dc(0x161)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x40a013,_0x1d5e72,_0x5abbdb){return new CliError(_0x40a013,0x1,_0x1d5e72,_0x5abbdb);}export function readNotificationId(_0x491d18){const _0x2e53de=a181_0x4756dc,_0x1bf133=_0x491d18[_0x2e53de(0x18f)]('id');if(!Number[_0x2e53de(0x165)](_0x1bf133)||_0x1bf133<=0x0)throw notificationError('notification_config_id_invalid',_0x2e53de(0x190));return _0x1bf133;}export function requireNotificationExplicitYes(_0x49f367){const _0xe02806=a181_0x4756dc;if(_0x49f367['bool']('dry-run')||_0x49f367[_0xe02806(0x146)](_0xe02806(0x16e)))return;throw notificationError(_0xe02806(0x1b6),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x2693b1,_0x118138=a181_0x4756dc(0x14c),_0x240ea7=a181_0x4756dc(0x19c)){const _0x3f965a=a181_0x4756dc,_0x1b487e=_0x2693b1[_0x3f965a(0x19a)](_0x118138)[_0x3f965a(0x1b0)]()||_0x240ea7;if(!NOTIFICATION_CHANNEL_TYPES[_0x3f965a(0x188)](_0x1b487e))throw CliErrors['validation']('Invalid\x20--'+_0x118138+':\x20'+_0x1b487e,_0x3f965a(0x1a8)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1b487e;}export function assertSingleNotificationSource(_0x4cb9b4){const _0x5791d4=a181_0x4756dc,_0x161ed8=[],_0xd701bb=_0x4cb9b4[_0x5791d4(0x19a)]('file')[_0x5791d4(0x1b0)]();if(_0xd701bb)_0x161ed8[_0x5791d4(0x15b)]({'kind':_0x5791d4(0x19b),'path':_0xd701bb});if(_0x4cb9b4[_0x5791d4(0x146)](_0x5791d4(0x145)))_0x161ed8[_0x5791d4(0x15b)]({'kind':_0x5791d4(0x145)});const _0x13abfb=_0x4cb9b4[_0x5791d4(0x19a)]('from-env')[_0x5791d4(0x1b0)]();if(_0x13abfb)_0x161ed8['push']({'kind':'env','name':_0x13abfb});if(_0x161ed8['length']===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x5791d4(0x158));if(_0x161ed8[_0x5791d4(0x154)]>0x1)throw CliErrors[_0x5791d4(0x172)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x5791d4(0x158));return _0x161ed8[0x0];}export async function readNotificationDocument(_0xca6865,_0x38ddf8){const _0x3e2666=a181_0x4756dc,_0x4e62c9=assertSingleNotificationSource(_0xca6865),_0x2f5e85=_0x4e62c9[_0x3e2666(0x14a)]===_0x3e2666(0x19b)?_0x3e2666(0x19f)+_0x4e62c9[_0x3e2666(0x1b5)]:_0x4e62c9['kind']===_0x3e2666(0x1ba)?'environment\x20variable\x20'+_0x4e62c9['name']:_0x3e2666(0x145);let _0x23855a;try{if(_0x4e62c9[_0x3e2666(0x14a)]===_0x3e2666(0x19b))_0x23855a=await readFile(_0x4e62c9[_0x3e2666(0x1b5)],_0x3e2666(0x1a0));else{if(_0x4e62c9['kind']==='env'){if(!(_0x4e62c9[_0x3e2666(0x185)]in process.env))throw notificationError(_0x3e2666(0x18a),_0x3e2666(0x1a5)+_0x4e62c9[_0x3e2666(0x185)]);_0x23855a=process.env[_0x4e62c9.name]??'';}else _0x23855a=await readStdin();}}catch(_0x3b7229){if(_0x3b7229 instanceof CliError)throw _0x3b7229;throw notificationError(_0x3e2666(0x18a),_0x3e2666(0x174)+_0x2f5e85+'.');}let _0x37ee64;try{_0x37ee64=JSON[_0x3e2666(0x16d)](_0x23855a);}catch{throw notificationError('notification_config_json_invalid',_0x3e2666(0x149)+_0x2f5e85+_0x3e2666(0x1a9),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x37ee64))throw notificationError(_0x3e2666(0x147),_0x3e2666(0x149)+_0x2f5e85+_0x3e2666(0x163));return validateNotificationDocument(_0x37ee64,_0x38ddf8);}export function projectNotificationListConfig(_0x5e7c82,_0x258110){const _0x193994=a181_0x4756dc;return{'id':typeof _0x5e7c82['id']==='number'?_0x5e7c82['id']:null,'configCode':requireResponseString(_0x5e7c82[_0x193994(0x170)],_0x193994(0x170),_0x258110),'configName':requireResponseString(_0x5e7c82['configName'],_0x193994(0x159),_0x258110),'channelType':requireResponseString(_0x5e7c82[_0x193994(0x179)],_0x193994(0x179),_0x258110),'description':normalizeNullableString(_0x5e7c82['description']),'createTime':normalizeNullableString(_0x5e7c82[_0x193994(0x1ad)]),'updateTime':normalizeNullableString(_0x5e7c82[_0x193994(0x1b1)])};}export function normalizeExactNotificationConfig(_0x227439,_0x5ea9e8,_0x4e2dd7){const _0x4f1b87=a181_0x4756dc;if(!Number[_0x4f1b87(0x165)](_0x227439['id'])||_0x227439['id']!==_0x5ea9e8)throw notificationError('notification_config_response_invalid',_0x4f1b87(0x166)+_0x5ea9e8+'.');if(_0x227439[_0x4f1b87(0x180)]!==_0x4e2dd7)throw notificationError(_0x4f1b87(0x16c),'Notification\x20config\x20'+_0x5ea9e8+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x5a32c5=requireExactString(_0x227439['configName'],_0x4f1b87(0x159),_0x5ea9e8),_0x3cf6ca=requireExactString(_0x227439['configCode'],'configCode',_0x5ea9e8),_0x4aea23=requireExactString(_0x227439[_0x4f1b87(0x179)],_0x4f1b87(0x179),_0x5ea9e8);if(!NOTIFICATION_CHANNEL_TYPES[_0x4f1b87(0x188)](_0x4aea23))throw notificationError(_0x4f1b87(0x16c),_0x4f1b87(0x17e)+_0x5ea9e8+'\x20has\x20an\x20unsupported\x20channelType.');const _0x503c12=responseNullableString(_0x227439[_0x4f1b87(0x18c)],_0x4f1b87(0x18c),_0x5ea9e8),_0x507746=responseNullableString(_0x227439[_0x4f1b87(0x199)],_0x4f1b87(0x199),_0x5ea9e8),_0x414fc7=responseNullableString(_0x227439[_0x4f1b87(0x141)],_0x4f1b87(0x141),_0x5ea9e8),_0x2377ac=responseNullableTimeout(_0x227439[_0x4f1b87(0x14e)],_0x4f1b87(0x14e),_0x5ea9e8),_0x5b206a=responseNullableTimeout(_0x227439[_0x4f1b87(0x167)],_0x4f1b87(0x167),_0x5ea9e8);return{'id':_0x5ea9e8,'appCode':_0x4e2dd7,'configCode':_0x3cf6ca,'configName':_0x5a32c5,'channelType':_0x4aea23,'endpointUrl':redactSensitive(_0x503c12),'channelConfig':redactSensitive(_0x507746),'description':_0x414fc7,'connectTimeout':_0x2377ac,'readTimeout':_0x5b206a,'endpointUrlRaw':_0x503c12,'channelConfigRaw':_0x507746};}export async function requireExactNotificationConfig(_0x1c10fa,_0x994f64,_0x28d3c9){const _0x4e8ce4=a181_0x4756dc;let _0x2aa920;try{_0x2aa920=await getNotificationChannelConfig(_0x994f64,_0x1c10fa);}catch{throw safeApiFailure(_0x28d3c9,_0x4e8ce4(0x18e),_0x4e8ce4(0x19d)+_0x1c10fa+_0x4e8ce4(0x1b4));}return normalizeExactNotificationConfig(_0x2aa920,_0x994f64,_0x1c10fa);}export function projectNotificationConfig(_0x49c680){const _0x2a791f=a181_0x4756dc;return{'id':_0x49c680['id']??null,'appCode':_0x49c680[_0x2a791f(0x180)],'configCode':_0x49c680['configCode']??null,'configName':_0x49c680[_0x2a791f(0x159)],'channelType':_0x49c680[_0x2a791f(0x179)],'endpointUrl':redactSensitive(_0x49c680[_0x2a791f(0x18c)]),'channelConfig':redactSensitive(_0x49c680[_0x2a791f(0x199)]),'description':_0x49c680[_0x2a791f(0x141)]??null,'connectTimeout':_0x49c680[_0x2a791f(0x14e)]??null,'readTimeout':_0x49c680['readTimeout']??null};}export function notificationSelector(_0x57cecf){const _0x1f6d41=a181_0x4756dc;return{'appCode':_0x57cecf[_0x1f6d41(0x180)],'id':_0x57cecf['id'],'configCode':_0x57cecf[_0x1f6d41(0x170)],'configName':_0x57cecf[_0x1f6d41(0x159)],'channelType':_0x57cecf[_0x1f6d41(0x179)]};}export function createMutationInput(_0x30e1dc,_0x52d088){const _0x340c4e=a181_0x4756dc;return{'appCode':_0x30e1dc,'configName':_0x52d088[_0x340c4e(0x159)],'channelType':_0x52d088['channelType'],...hasOwn(_0x52d088,_0x340c4e(0x18c))?{'endpointUrl':_0x52d088['endpointUrl']}:{},...hasOwn(_0x52d088,_0x340c4e(0x199))?{'channelConfig':serializeChannelConfig(_0x52d088[_0x340c4e(0x199)])}:{},...hasOwn(_0x52d088,_0x340c4e(0x141))?{'description':_0x52d088[_0x340c4e(0x141)]}:{},...hasOwn(_0x52d088,'connectTimeout')?{'connectTimeout':_0x52d088[_0x340c4e(0x14e)]}:{},...hasOwn(_0x52d088,_0x340c4e(0x167))?{'readTimeout':_0x52d088[_0x340c4e(0x167)]}:{}};}export function mergeUpdateInput(_0x1e0230,_0x651850){const _0x1c4d71=a181_0x4756dc;return{'id':_0x1e0230['id'],'appCode':_0x1e0230[_0x1c4d71(0x180)],'configName':_0x651850[_0x1c4d71(0x159)]??_0x1e0230[_0x1c4d71(0x159)],'channelType':_0x651850[_0x1c4d71(0x179)]??_0x1e0230[_0x1c4d71(0x179)],'endpointUrl':hasOwn(_0x651850,_0x1c4d71(0x18c))?_0x651850[_0x1c4d71(0x18c)]:_0x1e0230[_0x1c4d71(0x148)],'channelConfig':hasOwn(_0x651850,_0x1c4d71(0x199))?serializeChannelConfig(_0x651850[_0x1c4d71(0x199)]):_0x1e0230[_0x1c4d71(0x189)],'description':hasOwn(_0x651850,_0x1c4d71(0x141))?_0x651850[_0x1c4d71(0x141)]:_0x1e0230[_0x1c4d71(0x141)],'connectTimeout':hasOwn(_0x651850,_0x1c4d71(0x14e))?_0x651850[_0x1c4d71(0x14e)]:_0x1e0230['connectTimeout'],'readTimeout':hasOwn(_0x651850,_0x1c4d71(0x167))?_0x651850[_0x1c4d71(0x167)]:_0x1e0230[_0x1c4d71(0x167)]};}function a181_0x293b(_0x441f48,_0x378457){_0x441f48=_0x441f48-0x141;const _0x2802f3=a181_0x2802();let _0x293bae=_0x2802f3[_0x441f48];return _0x293bae;}export function plannedUpdateProjection(_0x2fff5b,_0x58fe2b){const _0x5e07ef=a181_0x4756dc;return projectNotificationConfig({'id':_0x2fff5b['id'],'appCode':_0x2fff5b[_0x5e07ef(0x180)],'configCode':_0x2fff5b[_0x5e07ef(0x170)],'configName':_0x58fe2b[_0x5e07ef(0x159)]??_0x2fff5b[_0x5e07ef(0x159)],'channelType':_0x58fe2b[_0x5e07ef(0x179)]??_0x2fff5b[_0x5e07ef(0x179)],'endpointUrl':hasOwn(_0x58fe2b,'endpointUrl')?_0x58fe2b[_0x5e07ef(0x18c)]:_0x2fff5b['endpointUrlRaw'],'channelConfig':hasOwn(_0x58fe2b,_0x5e07ef(0x199))?_0x58fe2b[_0x5e07ef(0x199)]:_0x2fff5b[_0x5e07ef(0x189)],'description':hasOwn(_0x58fe2b,_0x5e07ef(0x141))?_0x58fe2b[_0x5e07ef(0x141)]:_0x2fff5b[_0x5e07ef(0x141)],'connectTimeout':hasOwn(_0x58fe2b,_0x5e07ef(0x14e))?_0x58fe2b[_0x5e07ef(0x14e)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2fff5b[_0x5e07ef(0x14e)],'readTimeout':hasOwn(_0x58fe2b,_0x5e07ef(0x167))?_0x58fe2b[_0x5e07ef(0x167)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2fff5b['readTimeout']});}export function requestedSafeFieldsMatch(_0x5c931f,_0x52aec9,_0x1a0321){const _0x342d04=a181_0x4756dc,_0x73d00=[],_0x2b281a=[],_0x50d74c=[];for(const _0x2f319f of[_0x342d04(0x159),_0x342d04(0x179),_0x342d04(0x141)]){if(!hasOwn(_0x1a0321,_0x2f319f))continue;_0x50d74c[_0x342d04(0x15b)](_0x2f319f),_0x73d00[_0x342d04(0x15b)](_0x52aec9[_0x2f319f]===_0x1a0321[_0x2f319f]),_0x2b281a[_0x342d04(0x15b)](_0x5c931f[_0x2f319f]!==_0x1a0321[_0x2f319f]&&_0x52aec9[_0x2f319f]===_0x1a0321[_0x2f319f]);}for(const _0xfa5cc1 of['connectTimeout',_0x342d04(0x167)]){if(!hasOwn(_0x1a0321,_0xfa5cc1))continue;const _0x1f99ef=_0x1a0321[_0xfa5cc1]??(_0xfa5cc1===_0x342d04(0x14e)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x50d74c[_0x342d04(0x15b)](_0xfa5cc1),_0x73d00[_0x342d04(0x15b)](_0x52aec9[_0xfa5cc1]===_0x1f99ef),_0x2b281a['push'](_0x5c931f[_0xfa5cc1]!==_0x1f99ef&&_0x52aec9[_0xfa5cc1]===_0x1f99ef);}return hasOwn(_0x1a0321,_0x342d04(0x18c))&&_0x1a0321[_0x342d04(0x18c)]===null&&(_0x50d74c[_0x342d04(0x15b)](_0x342d04(0x196)),_0x73d00[_0x342d04(0x15b)](_0x52aec9[_0x342d04(0x148)]===null||_0x52aec9[_0x342d04(0x148)]===''),_0x2b281a[_0x342d04(0x15b)](_0x5c931f[_0x342d04(0x148)]!==null&&_0x5c931f[_0x342d04(0x148)]!==''&&(_0x52aec9[_0x342d04(0x148)]===null||_0x52aec9[_0x342d04(0x148)]===''))),{'allMatch':_0x73d00[_0x342d04(0x187)](Boolean),'provesChange':_0x2b281a['some'](Boolean),'verifiedFields':_0x50d74c};}export function validateNotificationDeleteReadback(_0x21ad30,_0x153c02,_0x4be26f){const _0x32c742=a181_0x4756dc;for(const [_0x3ea404,_0x1d76ff]of _0x21ad30['entries']()){if(!Number['isSafeInteger'](_0x1d76ff['id'])||_0x1d76ff['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x3ea404+0x1)+_0x32c742(0x16f));if(_0x1d76ff[_0x32c742(0x180)]!==_0x153c02)throw notificationError(_0x32c742(0x16c),_0x32c742(0x1a4)+(_0x3ea404+0x1)+_0x32c742(0x169));if(_0x1d76ff[_0x32c742(0x179)]!==_0x4be26f)throw notificationError(_0x32c742(0x16c),_0x32c742(0x1a4)+(_0x3ea404+0x1)+_0x32c742(0x1a3));}}export function safeApiFailure(_0x1dbd5a,_0x2d654f,_0x3e78fe){const _0x5418a5=a181_0x4756dc;return notificationError('notification_config_'+_0x1dbd5a+'_'+(_0x2d654f===_0x5418a5(0x17b)?_0x5418a5(0x14d):_0x2d654f+_0x5418a5(0x171)),_0x5418a5(0x17e)+_0x1dbd5a+'\x20'+_0x2d654f+_0x5418a5(0x160),_0x3e78fe);}export function notificationLookupCommand(_0x4d3506,_0x2b93ac){const _0x54091b=a181_0x4756dc;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x4d3506+_0x54091b(0x143)+_0x2b93ac+_0x54091b(0x1ac);}function validateNotificationDocument(_0x113162,_0x27d063){const _0x305e50=a181_0x4756dc;for(const _0x2223b7 of Object[_0x305e50(0x14f)](_0x113162)){if(FORBIDDEN_IDENTITY_FIELDS[_0x305e50(0x1a7)](_0x2223b7))throw notificationError('notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22'+_0x2223b7+_0x305e50(0x1b2));if(!ALLOWED_INPUT_FIELDS['has'](_0x2223b7))throw notificationError('notification_config_field_unknown',_0x305e50(0x1ae)+_0x2223b7+'\x22.');}if(_0x27d063==='update'&&Object[_0x305e50(0x14f)](_0x113162)[_0x305e50(0x154)]===0x0)throw notificationError('notification_config_update_empty',_0x305e50(0x178));const _0x5adc={};if(hasOwn(_0x113162,_0x305e50(0x159)))_0x5adc['configName']=validateRequiredString(_0x113162[_0x305e50(0x159)],'configName',0x80);else{if(_0x27d063===_0x305e50(0x1b9))throw notificationError('notification_config_field_required',_0x305e50(0x173)+_0x305e50(0x15f));}if(hasOwn(_0x113162,_0x305e50(0x179))){if(typeof _0x113162[_0x305e50(0x179)]!=='string')throw invalidFieldType('channelType',_0x305e50(0x16b));const _0x2a7b0e=_0x113162[_0x305e50(0x179)][_0x305e50(0x1b0)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x305e50(0x188)](_0x2a7b0e))throw notificationError(_0x305e50(0x1a6),_0x305e50(0x193),_0x305e50(0x1a8)+NOTIFICATION_CHANNEL_TYPES[_0x305e50(0x198)](',\x20')+'.');_0x5adc[_0x305e50(0x179)]=_0x2a7b0e;}else{if(_0x27d063==='create')throw notificationError('notification_config_field_required',_0x305e50(0x173)+_0x305e50(0x155));}for(const [_0x29594a,_0x52de97]of[[_0x305e50(0x18c),0x200],[_0x305e50(0x141),0x100]]){if(!hasOwn(_0x113162,_0x29594a))continue;const _0x5a6f4f=_0x113162[_0x29594a];if(_0x5a6f4f!==null&&typeof _0x5a6f4f!=='string')throw invalidFieldType(_0x29594a,_0x305e50(0x176));if(typeof _0x5a6f4f===_0x305e50(0x1ab)&&_0x5a6f4f[_0x305e50(0x154)]>_0x52de97)throw notificationError(_0x305e50(0x1a6),_0x305e50(0x191)+_0x29594a+'\x22\x20cannot\x20exceed\x20'+_0x52de97+_0x305e50(0x1aa));_0x5adc[_0x29594a]=_0x5a6f4f;}if(hasOwn(_0x113162,_0x305e50(0x199))){const _0x27b527=_0x113162[_0x305e50(0x199)];if(_0x27b527===null&&_0x27d063===_0x305e50(0x1b9))throw invalidFieldType('channelConfig',_0x305e50(0x153));if(_0x27b527!==null&&!isJsonObject(_0x27b527))throw invalidFieldType(_0x305e50(0x199),_0x27d063===_0x305e50(0x17d)?_0x305e50(0x144):_0x305e50(0x153));_0x27b527!==null&&validateChannelConfigFields(_0x5adc['channelType'],_0x27b527),_0x5adc[_0x305e50(0x199)]=_0x27b527;}for(const _0x149e15 of[_0x305e50(0x14e),_0x305e50(0x167)]){if(!hasOwn(_0x113162,_0x149e15))continue;const _0x5f2c73=_0x113162[_0x149e15];if(_0x5f2c73!==null&&(!Number['isSafeInteger'](_0x5f2c73)||_0x5f2c73<0x0))throw notificationError(_0x305e50(0x1a6),_0x305e50(0x191)+_0x149e15+_0x305e50(0x1b3));_0x5adc[_0x149e15]=_0x5f2c73;}return _0x5adc;}function validateRequiredString(_0x5a9834,_0x597bdd,_0x5c11db){const _0x422937=a181_0x4756dc;if(typeof _0x5a9834!==_0x422937(0x1ab))throw invalidFieldType(_0x597bdd,_0x422937(0x184));const _0x582834=_0x5a9834[_0x422937(0x1b0)]();if(!_0x582834)throw notificationError(_0x422937(0x1a6),_0x422937(0x191)+_0x597bdd+_0x422937(0x195));if(_0x582834[_0x422937(0x154)]>_0x5c11db)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x597bdd+'\x22\x20cannot\x20exceed\x20'+_0x5c11db+_0x422937(0x1aa));return _0x582834;}function validateChannelConfigFields(_0x5e9eea,_0x4b583e){const _0x59b003=a181_0x4756dc;if(hasOwn(_0x4b583e,_0x59b003(0x157)))throw forbiddenChannelConfigField(_0x59b003(0x157));if(_0x5e9eea===_0x59b003(0x19c))for(const _0x3af0a0 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4b583e,_0x3af0a0))throw forbiddenChannelConfigField(_0x3af0a0);}}function forbiddenChannelConfigField(_0x4a4371){const _0x3aa51b=a181_0x4756dc;return notificationError(_0x3aa51b(0x15d),_0x3aa51b(0x18b)+_0x4a4371+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x57b5da,_0x335dcf){const _0x4b65ab=a181_0x4756dc;return notificationError(_0x4b65ab(0x1a6),_0x4b65ab(0x191)+_0x57b5da+_0x4b65ab(0x162)+_0x335dcf+'.');}function serializeChannelConfig(_0x5093c5){const _0x1ba9e0=a181_0x4756dc;return _0x5093c5===null||_0x5093c5===undefined?null:JSON[_0x1ba9e0(0x177)](_0x5093c5);}function redactSensitive(_0x53804b){const _0x3df55c=a181_0x4756dc;return _0x53804b===null||_0x53804b===undefined||_0x53804b===''?null:_0x3df55c(0x181);}function requireResponseString(_0x1e3446,_0x187b32,_0x2b198c){const _0x37755a=a181_0x4756dc;if(typeof _0x1e3446!=='string'||_0x1e3446['trim']()==='')throw CliErrors[_0x37755a(0x1b7)]('Invalid\x20notification\x20config\x20response.',_0x37755a(0x19e)+(_0x2b198c+0x1)+_0x37755a(0x15c)+_0x187b32+'\x22.');return _0x1e3446['trim']();}function requireExactString(_0x3bf8a6,_0x30190c,_0x599210){const _0x36f088=a181_0x4756dc;if(typeof _0x3bf8a6!==_0x36f088(0x1ab)||_0x3bf8a6[_0x36f088(0x1b0)]()==='')throw notificationError(_0x36f088(0x16c),_0x36f088(0x17e)+_0x599210+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x30190c+'\x22.');return _0x3bf8a6[_0x36f088(0x1b0)]();}function responseNullableString(_0x4f59e2,_0x39e493,_0x55fe3c){const _0x3d641f=a181_0x4756dc;if(_0x4f59e2===undefined||_0x4f59e2===null)return null;if(typeof _0x4f59e2!==_0x3d641f(0x1ab))throw notificationError(_0x3d641f(0x16c),_0x3d641f(0x17e)+_0x55fe3c+_0x3d641f(0x14b)+_0x39e493+'\x22.');return _0x4f59e2;}function responseNullableTimeout(_0x58e849,_0x561986,_0x4341e0){const _0x53bff8=a181_0x4756dc;if(_0x58e849===undefined||_0x58e849===null)return null;if(!Number['isSafeInteger'](_0x58e849)||_0x58e849<0x0)throw notificationError(_0x53bff8(0x16c),_0x53bff8(0x17e)+_0x4341e0+_0x53bff8(0x14b)+_0x561986+'\x22.');return _0x58e849;}function normalizeNullableString(_0x19c8c5){const _0x85958c=a181_0x4756dc;return typeof _0x19c8c5===_0x85958c(0x1ab)?_0x19c8c5:null;}function isJsonObject(_0xeafb7a){const _0x961894=a181_0x4756dc;return _0xeafb7a!==null&&typeof _0xeafb7a==='object'&&!Array[_0x961894(0x168)](_0xeafb7a);}function hasOwn(_0x4a6e36,_0x6a76c){const _0x4106bc=a181_0x4756dc;return Object[_0x4106bc(0x1a1)][_0x4106bc(0x192)][_0x4106bc(0x15a)](_0x4a6e36,_0x6a76c);}async function readStdin(){const _0x287e58=a181_0x4756dc;let _0x52cac3='';process[_0x287e58(0x145)][_0x287e58(0x1af)](_0x287e58(0x1a0));for await(const _0x2d645b of process[_0x287e58(0x145)])_0x52cac3+=_0x2d645b;return _0x52cac3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0xf68e9e=a182_0x2cf5;(function(_0x187594,_0x5f4971){const _0x8e8905=a182_0x2cf5,_0x2058e9=_0x187594();while(!![]){try{const _0x416926=parseInt(_0x8e8905(0x1d2))/0x1*(parseInt(_0x8e8905(0x1cf))/0x2)+parseInt(_0x8e8905(0x1fb))/0x3+-parseInt(_0x8e8905(0x1e6))/0x4+-parseInt(_0x8e8905(0x1d0))/0x5*(parseInt(_0x8e8905(0x1e0))/0x6)+-parseInt(_0x8e8905(0x1de))/0x7+parseInt(_0x8e8905(0x1cb))/0x8*(-parseInt(_0x8e8905(0x1e4))/0x9)+parseInt(_0x8e8905(0x1f0))/0xa*(parseInt(_0x8e8905(0x1f9))/0xb);if(_0x416926===_0x5f4971)break;else _0x2058e9['push'](_0x2058e9['shift']());}catch(_0x2f4df5){_0x2058e9['push'](_0x2058e9['shift']());}}}(a182_0x2b38,0x62b12));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a182_0x2b38(){const _0x3804ad=['.\x20Supported\x20scenes:\x20','str','string','idCard','55JyZVVi','Table','398394bCLOqa','imageUrl','\x20OCR\x20from\x20URL','validation','path','fileUrl','1036496wvCjsc','join','trim','/smartapi/common/queryFileUrl','169282bBLqqG','430545VRHQnD','Invoice','8PuItjU','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','length','\x20OCR','File\x20upload\x20response\x20missing\x20filePath.','imageFile','recognize','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','Publicly\x20accessible\x20image\x20or\x20file\x20URL','idcard','File\x20URL\x20response\x20missing\x20fileUrl.','filter','3168830MRpnPP','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','36veiuKZ','POST','/smartapi/ocr/recognize-text?','scene','54LgtPoP','invoice','1263632ZYBlAZ','filePath','/smartapi/ocr/recognize-text','appCode','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','IdCard','toString','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','apiError','3313880FpoOsN','Unsupported\x20OCR\x20scene:\x20','/smartapi/common/uploadFile','image-file','count'];a182_0x2b38=function(){return _0x3804ad;};return a182_0x2b38();}const SUPPORTED_SCENES=['invoice','general','form',a182_0xf68e9e(0x1f8)],SCENE_TO_LEGACY_TYPE={'invoice':a182_0xf68e9e(0x1d1),'general':'General','form':a182_0xf68e9e(0x1fa),'idCard':a182_0xf68e9e(0x1ec)},SCENE_FLAG={'name':a182_0xf68e9e(0x1e3),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a182_0xf68e9e(0x1df)},IMAGE_FILE_FLAG={'name':'image-file','type':'string','description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':'image-url','type':a182_0xf68e9e(0x1f7),'description':a182_0xf68e9e(0x1da)};function normalizeScene(_0x58ea1e){const _0x56365a=a182_0xf68e9e,_0x3f168a=_0x58ea1e[_0x56365a(0x1cd)]()['toLowerCase']();if(_0x3f168a===_0x56365a(0x1db))return'idCard';if(_0x3f168a===_0x56365a(0x1e5)||_0x3f168a==='general'||_0x3f168a==='form')return _0x3f168a;throw CliErrors['validation'](_0x56365a(0x1f1)+_0x58ea1e+_0x56365a(0x1f5)+SUPPORTED_SCENES[_0x56365a(0x1cc)](',\x20'));}function selectedInputs(_0x1432b4){const _0x567b75=a182_0xf68e9e,_0x513ece=_0x1432b4[_0x567b75(0x1f6)](_0x567b75(0x1f3))[_0x567b75(0x1cd)](),_0x3ffce3=_0x1432b4[_0x567b75(0x1f6)]('image-url')['trim']();return{'imageFile':_0x513ece,'imageUrl':_0x3ffce3,'count':[_0x513ece,_0x3ffce3][_0x567b75(0x1dd)](Boolean)[_0x567b75(0x1d4)]};}function validateInputSelection(_0x30f41b){const _0x548cad=a182_0xf68e9e,_0x118153=selectedInputs(_0x30f41b);if(_0x118153[_0x548cad(0x1f4)]!==0x1)throw CliErrors[_0x548cad(0x1fe)](_0x548cad(0x1d9));return _0x118153;}function withScene(_0x1dca17,_0x29ae69,_0x5b20a){const _0x9e58fe=a182_0xf68e9e;return{..._0x1dca17,'scene':_0x29ae69,..._0x5b20a?{'sourceFile':{'fileName':_0x5b20a['fileName'],'filePath':_0x5b20a[_0x9e58fe(0x1e7)]}}:{}};}const ocrRecognize={'service':'ocr','command':a182_0xf68e9e(0x1d8),'description':a182_0xf68e9e(0x1ea),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x33fb74){const _0x5ebebc=a182_0xf68e9e,_0x478ad7=normalizeScene(_0x33fb74[_0x5ebebc(0x1f6)](_0x5ebebc(0x1e3))),_0xcbb81=SCENE_TO_LEGACY_TYPE[_0x478ad7],_0x34b297=validateInputSelection(_0x33fb74);if(_0x34b297[_0x5ebebc(0x1fc)]){const _0x3b2ad2=new URLSearchParams({'url':_0x34b297['imageUrl'],'type':_0xcbb81,'appCode':_0x33fb74[_0x5ebebc(0x1e9)]});return{'method':'GET','url':_0x5ebebc(0x1e2)+_0x3b2ad2[_0x5ebebc(0x1ed)](),'description':'Preview:\x20recognize\x20'+_0x478ad7+_0x5ebebc(0x1fd)};}const _0x3b44c4=requireDevelopmentUploadFile(_0x34b297[_0x5ebebc(0x1d7)],_0x5ebebc(0x1f3));return{'method':_0x5ebebc(0x1e1),'url':_0x5ebebc(0x1f2),'body':{'steps':[{'method':_0x5ebebc(0x1e1),'url':_0x5ebebc(0x1f2),'body':{'appCode':_0x33fb74['appCode'],'multipart':{'file':_0x3b44c4}}},{'method':_0x5ebebc(0x1e1),'url':_0x5ebebc(0x1ce),'body':{'filePath':_0x5ebebc(0x1ee),'downloadFlag':![]}},{'method':'GET','url':_0x5ebebc(0x1e8),'query':{'appCode':_0x33fb74[_0x5ebebc(0x1e9)],'url':_0x5ebebc(0x1d3),'type':_0xcbb81}}]},'description':_0x5ebebc(0x1eb)+_0x478ad7+_0x5ebebc(0x1d5)};},async 'execute'(_0x29b308){const _0x5e64bf=a182_0xf68e9e,_0x489406=normalizeScene(_0x29b308['str'](_0x5e64bf(0x1e3))),_0x10dd26=SCENE_TO_LEGACY_TYPE[_0x489406],_0x34c257=validateInputSelection(_0x29b308);if(_0x34c257[_0x5e64bf(0x1fc)]){const _0x42852e=await recognizeDevelopmentOcr(_0x29b308[_0x5e64bf(0x1e9)],{'url':_0x34c257[_0x5e64bf(0x1fc)],'type':_0x10dd26});return{'ok':!![],'data':withScene(_0x42852e,_0x489406)};}const _0x4d4982=requireDevelopmentUploadFile(_0x34c257[_0x5e64bf(0x1d7)],_0x5e64bf(0x1f3)),_0x155e43=await uploadDevelopmentFile(_0x29b308[_0x5e64bf(0x1e9)],_0x4d4982[_0x5e64bf(0x1ff)]);if(!_0x155e43[_0x5e64bf(0x1e7)])throw CliErrors[_0x5e64bf(0x1ef)](_0x5e64bf(0x1d6));const _0x29724d=await queryDevelopmentFileUrl(_0x155e43[_0x5e64bf(0x1e7)],{'download':![]});if(!_0x29724d[_0x5e64bf(0x1ca)])throw CliErrors['apiError'](_0x5e64bf(0x1dc));const _0x4fe776=await recognizeDevelopmentOcr(_0x29b308[_0x5e64bf(0x1e9)],{'url':_0x29724d[_0x5e64bf(0x1ca)],'type':_0x10dd26});return{'ok':!![],'data':withScene(_0x4fe776,_0x489406,_0x155e43)};}};function a182_0x2cf5(_0x32594a,_0x342e65){_0x32594a=_0x32594a-0x1ca;const _0x2b38de=a182_0x2b38();let _0x2cf565=_0x2b38de[_0x32594a];return _0x2cf565;}export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a183_0x13ad(){const _0x41d1c4=['trim','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','object','6kAbLlh','page-type','3607051FOQpPt','.json','isInteger','page-dir','3288900VvNyqh','1120gVEUFb','248767czzWEN','page\x20create\x20does\x20not\x20accept\x20--page-type.','utf8','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','pageName\x20cannot\x20exceed\x20100\x20characters.','string','isArray','menuId','createMenu','length','parse','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','validation','page-pattern','page.create','pageId','8kdGQik','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','keys','BLANK','DASHBOARD','Custom_page_','CUSTOM','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','page-content','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','\x20and\x20its\x20menu\x20entry.','compress','13740GpABTX','/smartapi/webcode/page/create','Custom\x20Page\x20pattern\x20not\x20found:\x20','15660Dfdygi','files','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','appCode','pageName','str','create','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','menuPath','some','4230495ZwuJaG','2959seXTCD','stringify','4852728rvwxff','POST','parentMenuId','Invalid\x20Custom\x20Page\x20pattern:\x20','num','page','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','write','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','parent-menu-id','values','isNaN','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.'];a183_0x13ad=function(){return _0x41d1c4;};return a183_0x13ad();}const a183_0x21dfac=a183_0x337e;(function(_0x5369a9,_0x361d5a){const _0x66f513=a183_0x337e,_0x137a9a=_0x5369a9();while(!![]){try{const _0x3d3d5e=-parseInt(_0x66f513(0xeb))/0x1*(-parseInt(_0x66f513(0xe3))/0x2)+-parseInt(_0x66f513(0xe9))/0x3+parseInt(_0x66f513(0x118))/0x4+parseInt(_0x66f513(0xea))/0x5*(-parseInt(_0x66f513(0x10a))/0x6)+-parseInt(_0x66f513(0xe5))/0x7*(-parseInt(_0x66f513(0xfb))/0x8)+-parseInt(_0x66f513(0x115))/0x9+parseInt(_0x66f513(0x107))/0xa*(parseInt(_0x66f513(0x116))/0xb);if(_0x3d3d5e===_0x361d5a)break;else _0x137a9a['push'](_0x137a9a['shift']());}catch(_0x5ef4ff){_0x137a9a['push'](_0x137a9a['shift']());}}}(a183_0x13ad,0xa948b));import{readFile}from'node:fs/promises';function a183_0x337e(_0x21f307,_0x2b736f){_0x21f307=_0x21f307-0xd4;const _0x13adcc=a183_0x13ad();let _0x337ee1=_0x13adcc[_0x21f307];return _0x337ee1;}import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a183_0x21dfac(0xfe),'ONEPAGE',a183_0x21dfac(0xff)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),'../../../templates/custom-pages');export const pageCreate={'service':a183_0x21dfac(0xd7),'command':a183_0x21dfac(0x111),'description':a183_0x21dfac(0xee),'risk':a183_0x21dfac(0xd9),'defaultOutputFormat':a183_0x21dfac(0x106),'structuredErrors':!![],'rejectedFlags':[{'name':a183_0x21dfac(0xe4),'message':a183_0x21dfac(0xec),'hint':a183_0x21dfac(0xe1)},{'name':a183_0x21dfac(0x103),'message':a183_0x21dfac(0x10d),'hint':a183_0x21dfac(0x104)}],'flags':[{'name':'name','type':a183_0x21dfac(0xf0),'description':a183_0x21dfac(0xf6)},{'name':a183_0x21dfac(0xdb),'type':'number','description':a183_0x21dfac(0x102)},{'name':a183_0x21dfac(0xf8),'type':a183_0x21dfac(0xf0),'description':a183_0x21dfac(0x10c),'enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x21dfac(0xe8),'type':a183_0x21dfac(0xf0),'description':a183_0x21dfac(0xe0)},APPCODE_FLAG],async 'validate'(_0x471b13){await readValidatedPageSource(_0x471b13);},async 'dryRun'(_0x2a386d){const _0x2f2a2e=a183_0x21dfac,_0x3f42db=readInput(_0x2a386d,await readValidatedPageSource(_0x2a386d));return{'method':_0x2f2a2e(0x119),'url':_0x2f2a2e(0x108),'body':{'appCode':_0x3f42db[_0x2f2a2e(0x10e)],'pageName':_0x3f42db[_0x2f2a2e(0x10f)],..._0x3f42db[_0x2f2a2e(0xd4)]!=null?{'parentMenuId':_0x3f42db['parentMenuId']}:{},'createMenu':_0x3f42db[_0x2f2a2e(0xf3)],'codeContent':_0x3f42db[_0x2f2a2e(0x10b)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x2f2a2e(0x117)](_0x3f42db[_0x2f2a2e(0x10f)])+_0x2f2a2e(0x105)};},async 'execute'(_0x474969){const _0x372772=a183_0x21dfac,_0x514dcd=readInput(_0x474969,await readValidatedPageSource(_0x474969)),_0x318fdd=await createCustomPage(_0x514dcd);if(!Number['isInteger'](_0x318fdd[_0x372772(0xfa)])||_0x318fdd[_0x372772(0xfa)]<=0x0)throw CliErrors['apiError'](_0x372772(0x112));const _0x3c1d87=buildCustomPageDevelopmentUrl(_0x514dcd[_0x372772(0x10e)],_0x318fdd[_0x372772(0x113)]),_0x46def2=buildCustomPageEditUrl(_0x514dcd['appCode'],_0x318fdd[_0x372772(0xfa)]);return{'ok':!![],'data':{'operation':_0x372772(0xf9),'pageType':_0x372772(0x101),'pagePattern':readPagePattern(_0x474969),'selector':{'appCode':_0x514dcd[_0x372772(0x10e)],'pageName':_0x514dcd[_0x372772(0x10f)]},'before':null,'after':{'pageId':_0x318fdd[_0x372772(0xfa)],'pageName':_0x318fdd['pageName'],'appCode':_0x318fdd[_0x372772(0x10e)],'version':_0x318fdd['version'],'menuId':_0x318fdd[_0x372772(0xf2)],'menuPath':_0x318fdd[_0x372772(0x113)],'files':_0x318fdd['files']??Object[_0x372772(0xfd)](_0x514dcd['files'])},'dryRun':![],'request':_0x514dcd,..._0x3c1d87?{'pageUrl':_0x3c1d87}:{},..._0x46def2?{'editPageUrl':_0x46def2}:{},'warnings':_0x3c1d87?[]:[_0x372772(0xfc)]},'message':'Created\x20Custom\x20Page\x20'+_0x318fdd['pageId']+'.'};}};function readPagePattern(_0x5525e7){const _0x1d445=a183_0x21dfac,_0x4c3dca=_0x5525e7[_0x1d445(0x110)]('page-pattern')[_0x1d445(0xdf)](),_0x3ec625=_0x5525e7[_0x1d445(0x110)](_0x1d445(0xe8))[_0x1d445(0xdf)]();if(_0x4c3dca&&_0x3ec625)throw CliErrors[_0x1d445(0xf7)]('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x3ec625)return null;if(!_0x4c3dca)throw CliErrors[_0x1d445(0xf7)](_0x1d445(0xd8));if(!CUSTOM_PAGE_PATTERNS['includes'](_0x4c3dca))throw CliErrors[_0x1d445(0xf7)](_0x1d445(0xde));return _0x4c3dca;}async function readPageSource(_0x58c01b){const _0x5001f1=a183_0x21dfac,_0x384f00=_0x58c01b[_0x5001f1(0x110)](_0x5001f1(0xe8))[_0x5001f1(0xdf)](),_0x51ad12=readPagePattern(_0x58c01b);if(_0x51ad12===null){const _0x4b9002=await readCustomPageDirectory(_0x384f00);if(Object['keys'](_0x4b9002)[_0x5001f1(0xf4)]===0x0)throw CliErrors[_0x5001f1(0xf7)](_0x5001f1(0xda));return _0x4b9002;}let _0x5c3ff4;try{_0x5c3ff4=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x51ad12['toLowerCase']()+_0x5001f1(0xe6)),_0x5001f1(0xed));}catch{throw CliErrors[_0x5001f1(0xf7)](_0x5001f1(0x109)+_0x51ad12+'.');}let _0xeb00e;try{_0xeb00e=JSON[_0x5001f1(0xf5)](_0x5c3ff4);}catch{throw CliErrors[_0x5001f1(0xf7)](_0x5001f1(0xd5)+_0x51ad12+'.');}if(!_0xeb00e||typeof _0xeb00e!==_0x5001f1(0xe2)||Array[_0x5001f1(0xf1)](_0xeb00e)||Object[_0x5001f1(0xdc)](_0xeb00e)[_0x5001f1(0x114)](_0x463b12=>typeof _0x463b12!==_0x5001f1(0xf0)))throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x51ad12+'.');return _0xeb00e;}async function readValidatedPageSource(_0x5747ce){const _0x4e5b76=await readPageSource(_0x5747ce);return await validateCustomPageContent(_0x4e5b76),_0x4e5b76;}function readInput(_0x205049,_0x4c0ee2){const _0x494483=a183_0x21dfac,_0x462500=_0x205049[_0x494483(0x110)]('name')[_0x494483(0xdf)]()||_0x494483(0x100)+Date['now']();if(_0x462500[_0x494483(0xf4)]>0x64)throw CliErrors['validation'](_0x494483(0xef));const _0x10774a=_0x205049[_0x494483(0xd6)](_0x494483(0xdb),NaN),_0x667b62=!Number[_0x494483(0xdd)](_0x10774a);if(_0x667b62&&(!Number[_0x494483(0xe7)](_0x10774a)||_0x10774a<=0x0))throw CliErrors[_0x494483(0xf7)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x205049[_0x494483(0x10e)],'pageName':_0x462500,..._0x667b62?{'parentMenuId':_0x10774a}:{},'createMenu':!![],'files':_0x4c0ee2};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a184_0x12fa(_0x1ae482,_0x21fa46){_0x1ae482=_0x1ae482-0x173;const _0x5d2109=a184_0x5d21();let _0x12fa6c=_0x5d2109[_0x1ae482];return _0x12fa6c;}const a184_0xd795d=a184_0x12fa;(function(_0x3dfa52,_0x23a1b0){const _0x154e9e=a184_0x12fa,_0x534558=_0x3dfa52();while(!![]){try{const _0x53b834=-parseInt(_0x154e9e(0x184))/0x1+-parseInt(_0x154e9e(0x177))/0x2*(-parseInt(_0x154e9e(0x180))/0x3)+-parseInt(_0x154e9e(0x175))/0x4+parseInt(_0x154e9e(0x183))/0x5*(parseInt(_0x154e9e(0x176))/0x6)+parseInt(_0x154e9e(0x187))/0x7+parseInt(_0x154e9e(0x178))/0x8+parseInt(_0x154e9e(0x189))/0x9*(-parseInt(_0x154e9e(0x185))/0xa);if(_0x53b834===_0x23a1b0)break;else _0x534558['push'](_0x534558['shift']());}catch(_0x2a082f){_0x534558['push'](_0x534558['shift']());}}}(a184_0x5d21,0x307e3));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a184_0xd795d(0x173),'command':a184_0xd795d(0x17f),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':'read','defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a184_0xd795d(0x181),'required':!![],'description':a184_0xd795d(0x17d)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4aa865){readCustomPageId(_0x4aa865);},async 'execute'(_0x3c5327){const _0x193f3e=a184_0xd795d,_0x44cc3f=readCustomPageId(_0x3c5327),_0x28f057=await getCustomPageSource(_0x44cc3f),{bundle:_0xfce97,createTime:_0x23ab2e,updateTime:_0x48c412,..._0x1b77fb}=_0x28f057,_0x3f605e=_0x28f057['id']??_0x44cc3f,_0x435b27=_0x28f057[_0x193f3e(0x182)]?.['trim']()||_0x3c5327[_0x193f3e(0x18b)](_0x193f3e(0x18a))['trim'](),_0x5131d2=buildCustomPageRuntimeUrl(_0x435b27,_0x28f057['pageCode']),_0x5e2491=buildCustomPageEditUrl(_0x435b27,_0x3f605e),_0x207fda=await resolveCustomPageDevelopmentUrl(_0x435b27,_0x3f605e,_0x3c5327['cookie']);return{'ok':!![],'data':{..._0x1b77fb,..._0x5131d2?{'runtimePageUrl':_0x5131d2}:{},..._0x207fda?{'pageUrl':_0x207fda}:{},..._0x5e2491?{'editPageUrl':_0x5e2491}:{},..._0x23ab2e==null?{}:{'createTime':formatTime(_0x23ab2e)},..._0x48c412==null?{}:{'updateTime':formatTime(_0x48c412)}},'message':_0x193f3e(0x17c)+_0x44cc3f+'.'};}};function a184_0x5d21(){const _0xbfbf3=['getDate','436806jdIDaC','appcode','str','getTime','getHours','page','isNaN','297032iCFylT','60exOUcr','814kfIeeA','2162616gIQxdt','getMinutes','padStart','getMonth','Retrieved\x20Custom\x20Page\x20','Custom\x20Page\x20ID','getSeconds','custom-detail','606TCAqNV','number','appCode','37800FUksmj','219952zvMeiV','50olqEHj','join','2151562sLCjUG'];a184_0x5d21=function(){return _0xbfbf3;};return a184_0x5d21();}function formatTime(_0x4b7b18){const _0xdb6733=a184_0xd795d,_0x2ff886=new Date(_0x4b7b18);if(Number[_0xdb6733(0x174)](_0x2ff886[_0xdb6733(0x18c)]()))return String(_0x4b7b18);const _0x539a8b=[_0x2ff886['getFullYear'](),String(_0x2ff886[_0xdb6733(0x17b)]()+0x1)[_0xdb6733(0x17a)](0x2,'0'),String(_0x2ff886[_0xdb6733(0x188)]())['padStart'](0x2,'0')][_0xdb6733(0x186)]('-'),_0x378c8c=[String(_0x2ff886[_0xdb6733(0x18d)]())[_0xdb6733(0x17a)](0x2,'0'),String(_0x2ff886[_0xdb6733(0x179)]())['padStart'](0x2,'0'),String(_0x2ff886[_0xdb6733(0x17e)]())['padStart'](0x2,'0')][_0xdb6733(0x186)](':');return _0x539a8b+'\x20'+_0x378c8c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a185_0x1acdb5=a185_0x49cc;(function(_0x93f82c,_0xd8afe){const _0x199444=a185_0x49cc,_0x43a9fd=_0x93f82c();while(!![]){try{const _0x422be0=parseInt(_0x199444(0x162))/0x1*(parseInt(_0x199444(0x168))/0x2)+parseInt(_0x199444(0x164))/0x3*(parseInt(_0x199444(0x150))/0x4)+parseInt(_0x199444(0x166))/0x5+-parseInt(_0x199444(0x157))/0x6+parseInt(_0x199444(0x15e))/0x7+-parseInt(_0x199444(0x167))/0x8*(-parseInt(_0x199444(0x15c))/0x9)+-parseInt(_0x199444(0x15f))/0xa;if(_0x422be0===_0xd8afe)break;else _0x43a9fd['push'](_0x43a9fd['shift']());}catch(_0xcb61b5){_0x43a9fd['push'](_0x43a9fd['shift']());}}}(a185_0x3df5,0x88fa4));function a185_0x49cc(_0x447676,_0x131ce6){_0x447676=_0x447676-0x14f;const _0x3df5a9=a185_0x3df5();let _0x49cc85=_0x3df5a9[_0x447676];return _0x49cc85;}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';function a185_0x3df5(){const _0x17eb1d=['951355jdteUv','32bxSTZe','2174GKgVzx','flatMap','3263804AwTesp','page','No\x20Custom\x20Pages\x20found.','react','Found\x20','appCode','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','2243850GwoePv','cookie','compress','pageId','custom-list','93870KwEeIW','path','3999275aBoTkD','14494800ekHuCf','read','length','704wWyOBc','menus','3gbVXAq','\x20Custom\x20Page(s).'];a185_0x3df5=function(){return _0x17eb1d;};return a185_0x3df5();}export const pageCustomList={'service':a185_0x1acdb5(0x151),'command':a185_0x1acdb5(0x15b),'description':a185_0x1acdb5(0x156),'risk':a185_0x1acdb5(0x160),'defaultOutputFormat':a185_0x1acdb5(0x159),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x23d513){const _0x6ef830=a185_0x1acdb5,_0x25be59=(await fetchMenuSnapshot(_0x23d513[_0x6ef830(0x155)],_0x23d513[_0x6ef830(0x158)]))[_0x6ef830(0x163)][_0x6ef830(0x14f)](_0x2a3617=>{const _0x4a7805=_0x6ef830;if(_0x2a3617['type']!==_0x4a7805(0x153)||_0x2a3617[_0x4a7805(0x15a)]==null)return[];const _0x4af947=buildCustomPageDevelopmentUrl(_0x23d513[_0x4a7805(0x155)],_0x2a3617[_0x4a7805(0x15d)]),_0x3534f6=buildCustomPageRuntimeUrl(_0x23d513['appCode'],_0x2a3617[_0x4a7805(0x15d)]),_0x551923=buildCustomPageEditUrl(_0x23d513['appCode'],_0x2a3617[_0x4a7805(0x15a)]);return[{'pageId':_0x2a3617[_0x4a7805(0x15a)],'label':_0x2a3617['label'],'path':_0x2a3617[_0x4a7805(0x15d)],..._0x4af947?{'pageUrl':_0x4af947}:{},..._0x3534f6?{'runtimePageUrl':_0x3534f6}:{},..._0x551923?{'editPageUrl':_0x551923}:{}}];});return{'ok':!![],'data':{'pages':_0x25be59},'message':_0x25be59['length']===0x0?_0x6ef830(0x152):_0x6ef830(0x154)+_0x25be59[_0x6ef830(0x161)]+_0x6ef830(0x165)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a186_0x52a7(){const _0xc83105=['write','remark','isInteger','79744aqPXNp','FORMAL','cookie','1953525uSgYEm','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','status','str','4144905zhCGnQ','string','Optional\x20publish\x20remark','push','unknown','page','6rtWBbS','12210210KTPPaQ','appCode','custom-publish','runtimePageUrl','trim','Custom\x20Page\x20ID','Published\x20Custom\x20Page\x20','apiError','page.custom-publish','322654ZFiMkg','POST','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','warnings','905470lvKutK','6mabZsY','/smartapi/webcode/file/publish','pageId','number','1715124SmzpMJ','Would\x20publish\x20Custom\x20Page\x20'];a186_0x52a7=function(){return _0xc83105;};return a186_0x52a7();}const a186_0x4ce6b0=a186_0x160f;(function(_0x4f7155,_0x92fbfd){const _0x5bfdb1=a186_0x160f,_0x4b294e=_0x4f7155();while(!![]){try{const _0x106f7f=parseInt(_0x5bfdb1(0x1be))/0x1+-parseInt(_0x5bfdb1(0x1c3))/0x2+-parseInt(_0x5bfdb1(0x1da))/0x3*(-parseInt(_0x5bfdb1(0x1c8))/0x4)+-parseInt(_0x5bfdb1(0x1d4))/0x5*(-parseInt(_0x5bfdb1(0x1c4))/0x6)+parseInt(_0x5bfdb1(0x1d0))/0x7+-parseInt(_0x5bfdb1(0x1cd))/0x8+-parseInt(_0x5bfdb1(0x1db))/0x9;if(_0x106f7f===_0x92fbfd)break;else _0x4b294e['push'](_0x4b294e['shift']());}catch(_0x4efc94){_0x4b294e['push'](_0x4b294e['shift']());}}}(a186_0x52a7,0x7278f));function a186_0x160f(_0x356c90,_0xba735a){_0x356c90=_0x356c90-0x1b7;const _0x52a764=a186_0x52a7();let _0x160f07=_0x52a764[_0x356c90];return _0x160f07;}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':a186_0x4ce6b0(0x1d9),'command':a186_0x4ce6b0(0x1b7),'description':'Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','risk':a186_0x4ce6b0(0x1ca),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a186_0x4ce6b0(0x1c7),'required':!![],'description':a186_0x4ce6b0(0x1ba)},{'name':a186_0x4ce6b0(0x1cb),'type':a186_0x4ce6b0(0x1d5),'description':a186_0x4ce6b0(0x1d6)}],async 'validate'(_0x39874f){readCustomPageId(_0x39874f);},async 'dryRun'(_0x1848d6){const _0x572591=a186_0x4ce6b0,_0x70a23d=readInput(_0x1848d6);return{'method':_0x572591(0x1bf),'url':_0x572591(0x1c5),'body':{'id':_0x70a23d[_0x572591(0x1c6)],..._0x70a23d[_0x572591(0x1cb)]?{'remark':_0x70a23d[_0x572591(0x1cb)]}:{}},'description':_0x572591(0x1c9)+_0x70a23d[_0x572591(0x1c6)]+'.'};},async 'execute'(_0x15cd68){const _0x2294ba=a186_0x4ce6b0,_0x163352=readInput(_0x15cd68);await getCustomPageSource(_0x163352[_0x2294ba(0x1c6)]);const _0x1c58ec=await publishCustomPage(_0x163352);if(!Number[_0x2294ba(0x1cc)](_0x1c58ec)||_0x1c58ec!==_0x163352[_0x2294ba(0x1c6)])throw CliErrors[_0x2294ba(0x1bc)](_0x2294ba(0x1c0));const _0x252dea=await getCustomPageSource(_0x163352['pageId']);if(_0x252dea[_0x2294ba(0x1d2)]!==_0x2294ba(0x1ce))throw CliErrors[_0x2294ba(0x1bc)](_0x2294ba(0x1d1)+(_0x252dea['status']??_0x2294ba(0x1d8))+'.');const _0x4ce7e6=_0x252dea['appCode']?.[_0x2294ba(0x1b9)](),_0x351add=buildCustomPageEditUrl(_0x4ce7e6,_0x163352['pageId']),_0x2228dd=await resolveCustomPageDevelopmentUrl(_0x4ce7e6,_0x163352[_0x2294ba(0x1c6)],_0x15cd68[_0x2294ba(0x1cf)]),_0x3ee190=buildMutationData(_0x163352,!![],_0x2228dd,_0x351add);_0x4ce7e6&&!_0x2228dd&&_0x3ee190[_0x2294ba(0x1c2)][_0x2294ba(0x1d7)](_0x2294ba(0x1c1));const _0x5aa286=buildCustomPageRuntimeUrl(_0x252dea[_0x2294ba(0x1dc)],_0x252dea['pageCode']);return _0x5aa286?_0x3ee190[_0x2294ba(0x1b8)]=_0x5aa286:_0x3ee190[_0x2294ba(0x1c2)][_0x2294ba(0x1d7)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'),{'ok':!![],'data':_0x3ee190,'message':_0x2294ba(0x1bb)+_0x163352[_0x2294ba(0x1c6)]+'.'};}};function readInput(_0x19c298){const _0x1dd41a=a186_0x4ce6b0,_0x5e0c8f=readCustomPageId(_0x19c298),_0x59787f=_0x19c298[_0x1dd41a(0x1d3)]('remark')['trim']();return{'pageId':_0x5e0c8f,..._0x59787f?{'remark':_0x59787f}:{}};}function buildMutationData(_0xf94151,_0x441fdf=![],_0xbeab65,_0x1f9863){const _0x47ba61=a186_0x4ce6b0;return{'operation':_0x47ba61(0x1bd),'selector':{'pageId':_0xf94151[_0x47ba61(0x1c6)]},'before':null,'after':{'pageId':_0xf94151['pageId'],'status':'FORMAL'},'dryRun':!_0x441fdf,'request':_0xf94151,..._0xbeab65?{'pageUrl':_0xbeab65}:{},..._0x1f9863?{'editPageUrl':_0x1f9863}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a187_0x535920=a187_0xd201;(function(_0x16c928,_0x1d08c7){const _0x53c3d5=a187_0xd201,_0x39c314=_0x16c928();while(!![]){try{const _0x1517a6=-parseInt(_0x53c3d5(0x138))/0x1*(parseInt(_0x53c3d5(0x13f))/0x2)+parseInt(_0x53c3d5(0x13e))/0x3*(parseInt(_0x53c3d5(0x145))/0x4)+-parseInt(_0x53c3d5(0x148))/0x5+parseInt(_0x53c3d5(0x136))/0x6+parseInt(_0x53c3d5(0x146))/0x7+parseInt(_0x53c3d5(0x141))/0x8*(-parseInt(_0x53c3d5(0x13d))/0x9)+parseInt(_0x53c3d5(0x13b))/0xa*(parseInt(_0x53c3d5(0x133))/0xb);if(_0x1517a6===_0x1d08c7)break;else _0x39c314['push'](_0x39c314['shift']());}catch(_0x418b76){_0x39c314['push'](_0x39c314['shift']());}}}(a187_0x5bf5,0xcebf1));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';function a187_0x5bf5(){const _0x45bae2=['join','--id\x20must\x20be\x20a\x20positive\x20integer.','length','944Rvrqei','11094874LpzpwQ','react','4773755kamrST','message','pageId','580063QlNgbR','/ide/','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','741858zBLwdX','menus','140221tLeJBK','num','/pages/','10YtQgKk','isInteger','36xzDtim','17247HPHOzN','4iCxFeS','trim','2072192gtpHZT'];a187_0x5bf5=function(){return _0x45bae2;};return a187_0x5bf5();}function a187_0xd201(_0x3af39a,_0x45d2bb){_0x3af39a=_0x3af39a-0x131;const _0x5bf5a2=a187_0x5bf5();let _0xd201d=_0x5bf5a2[_0x3af39a];return _0xd201d;}import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a187_0x535920(0x135)};function trimOptional(_0x28363f){const _0x4b3fd4=a187_0x535920;return _0x28363f?.[_0x4b3fd4(0x140)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x339b11,_0xbfba31){const _0x2c5c00=trimOptional(_0x339b11),_0x59ba94=trimOptional(_0xbfba31);if(!_0x2c5c00||!_0x59ba94)return undefined;return getPublishedAppDomain(_0x2c5c00)+'/'+encodeURIComponent(_0x59ba94);}export function buildCustomPageDevelopmentUrl(_0x2b65fa,_0x44d2d0){const _0x35b711=a187_0x535920,_0x379730=trimOptional(_0x2b65fa),_0x6938b3=trimOptional(_0x44d2d0);if(!_0x379730||!_0x6938b3)return undefined;return getAppBaseUrl(_0x379730)+_0x35b711(0x13a)+encodeURIComponent(_0x6938b3);}export async function resolveCustomPageDevelopmentUrl(_0x5824d8,_0x33e56e,_0x1b07d4){const _0x4a5222=a187_0x535920,_0x5ba512=trimOptional(_0x5824d8);if(!_0x5ba512)return undefined;try{const _0x2b8058=(await fetchMenuSnapshot(_0x5ba512,_0x1b07d4))[_0x4a5222(0x137)]['find'](_0x1ef263=>_0x1ef263['type']===_0x4a5222(0x147)&&_0x1ef263[_0x4a5222(0x132)]===_0x33e56e);return buildCustomPageDevelopmentUrl(_0x5ba512,_0x2b8058?.['path']);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x4a666b,_0x5cc3be){const _0x157893=a187_0x535920,_0x16b5f2=trimOptional(_0x4a666b);if(!_0x16b5f2)return;const _0x257774=trimOptional(String(_0x5cc3be??''));if(!_0x257774)return;return getAppBaseUrl(_0x16b5f2)+_0x157893(0x134)+encodeURIComponent(_0x257774);}export async function validateCustomPageContent(_0x22feea){const _0x5c547b=a187_0x535920,_0x1b3382=await validateCustomPageSourceFiles(_0x22feea);if(_0x1b3382[_0x5c547b(0x144)]>0x0)throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20content:\x20'+_0x1b3382['map'](_0x48b341=>_0x48b341['file']+':\x20'+_0x48b341[_0x5c547b(0x131)])[_0x5c547b(0x142)](';\x20'));}export function readCustomPageId(_0x2db625){const _0xa3d035=a187_0x535920,_0x51bfcf=_0x2db625[_0xa3d035(0x139)]('id');if(!Number[_0xa3d035(0x13c)](_0x51bfcf)||_0x51bfcf<=0x0)throw CliErrors['validation'](_0xa3d035(0x143));return _0x51bfcf;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a188_0x2a57(){const _0x5dd75a=['2559132AyulXy','.tsx','endsWith','27sgcWCV','filter','some','typescript','4979080GXHUXF','80YxGNOU','6xjLhMl','toLowerCase','entries','babel','1136275KUHsuj','all','57834cvabju','map','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','find','1062317LKrEkk','2134992tnKPZT','.jsx','trim','page\x20files','295318UvhdbU'];a188_0x2a57=function(){return _0x5dd75a;};return a188_0x2a57();}const a188_0x5bbaa3=a188_0x3f3e;(function(_0x31dfbb,_0x24db13){const _0x117893=a188_0x3f3e,_0x5ad853=_0x31dfbb();while(!![]){try{const _0x686409=parseInt(_0x117893(0x75))/0x1+-parseInt(_0x117893(0x7a))/0x2*(parseInt(_0x117893(0x84))/0x3)+parseInt(_0x117893(0x76))/0x4+parseInt(_0x117893(0x6f))/0x5+parseInt(_0x117893(0x7b))/0x6+-parseInt(_0x117893(0x71))/0x7*(-parseInt(_0x117893(0x83))/0x8)+-parseInt(_0x117893(0x7e))/0x9*(parseInt(_0x117893(0x82))/0xa);if(_0x686409===_0x24db13)break;else _0x5ad853['push'](_0x5ad853['shift']());}catch(_0x249396){_0x5ad853['push'](_0x5ad853['shift']());}}}(a188_0x2a57,0x84abc));import{format}from'prettier';const SOURCE_PARSERS={'.js':a188_0x5bbaa3(0x87),'.jsx':a188_0x5bbaa3(0x87),'.ts':'typescript','.tsx':a188_0x5bbaa3(0x81)},CUSTOM_PAGE_EXTENSIONS=[a188_0x5bbaa3(0x77),a188_0x5bbaa3(0x7c)];export async function validateCustomPageSourceFiles(_0x12d0ae){const _0x43a842=a188_0x5bbaa3,_0xa4fdf9=Object[_0x43a842(0x86)](_0x12d0ae)[_0x43a842(0x7f)](([_0xe28252])=>getParser(_0xe28252));if(!_0xa4fdf9[_0x43a842(0x80)](([_0xb32cef])=>isReactSourceFile(_0xb32cef)))return[{'file':_0x43a842(0x79),'message':_0x43a842(0x73)}];const _0x3148c8=await Promise[_0x43a842(0x70)](_0xa4fdf9[_0x43a842(0x72)](async([_0x25b184,_0x154c32])=>{try{return await format(_0x154c32,{'parser':getParser(_0x25b184)}),undefined;}catch(_0x652359){return{'file':_0x25b184,'message':_0x652359 instanceof Error?_0x652359['message']:String(_0x652359)};}}));return _0x3148c8[_0x43a842(0x7f)](_0x6380c7=>_0x6380c7!==undefined);}function a188_0x3f3e(_0x2b3ba5,_0x1ac705){_0x2b3ba5=_0x2b3ba5-0x6f;const _0x2a5707=a188_0x2a57();let _0x3f3e0c=_0x2a5707[_0x2b3ba5];return _0x3f3e0c;}function getParser(_0x4fd344){const _0x239619=a188_0x5bbaa3,_0x3f9392=_0x4fd344[_0x239619(0x78)]()[_0x239619(0x85)]();return Object[_0x239619(0x86)](SOURCE_PARSERS)[_0x239619(0x74)](([_0x1e4707])=>_0x3f9392[_0x239619(0x7d)](_0x1e4707))?.[0x1];}function isReactSourceFile(_0x12bb77){const _0x1ef334=a188_0x5bbaa3,_0x4143cb=_0x12bb77[_0x1ef334(0x78)]()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS['some'](_0xf81619=>_0x4143cb[_0x1ef334(0x7d)](_0xf81619));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0x190f42=a189_0x14c9;(function(_0x58ba32,_0xc69f39){const _0x5462d9=a189_0x14c9,_0x23672d=_0x58ba32();while(!![]){try{const _0x1ee5c9=-parseInt(_0x5462d9(0x1be))/0x1+parseInt(_0x5462d9(0x1bf))/0x2+-parseInt(_0x5462d9(0x1cc))/0x3+parseInt(_0x5462d9(0x1ba))/0x4+-parseInt(_0x5462d9(0x1b2))/0x5+-parseInt(_0x5462d9(0x1c0))/0x6*(-parseInt(_0x5462d9(0x1b3))/0x7)+parseInt(_0x5462d9(0x1b9))/0x8*(-parseInt(_0x5462d9(0x1bc))/0x9);if(_0x1ee5c9===_0xc69f39)break;else _0x23672d['push'](_0x23672d['shift']());}catch(_0xdcc731){_0x23672d['push'](_0x23672d['shift']());}}}(a189_0x3417,0x9c632));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';function a189_0x3417(){const _0x45de58=['Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','newVersion','isInteger','Custom\x20Page\x20ID','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','appcode','page-dir','cookie','3601509eBhseH','page.custom-update','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','page-content','write','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','string','trim','1757065DjsXZQ','7rvYoKq','Updated\x20Custom\x20Page\x20','POST','appCode','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','585368lPALlU','4958972WWyFBs','pageContent','9HBFOpa','custom-update','528069nJmvNz','2250596EXvbnL','2572062gbjmJb','str','compress','pageId'];a189_0x3417=function(){return _0x45de58;};return a189_0x3417();}import{CliErrors}from'../../../errors.js';function a189_0x14c9(_0xd6fae,_0x514856){_0xd6fae=_0xd6fae-0x1ad;const _0x34171c=a189_0x3417();let _0x14c968=_0x34171c[_0xd6fae];return _0x14c968;}import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':'page','command':a189_0x190f42(0x1bd),'description':a189_0x190f42(0x1b7),'risk':a189_0x190f42(0x1ae),'defaultOutputFormat':a189_0x190f42(0x1c2),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a189_0x190f42(0x1ad),'message':a189_0x190f42(0x1ce),'hint':a189_0x190f42(0x1c4)}],'flags':[{'name':'id','type':'number','required':!![],'description':a189_0x190f42(0x1c7)},{'name':a189_0x190f42(0x1ca),'type':a189_0x190f42(0x1b0),'required':!![],'description':'Directory\x20containing\x20all\x20complete\x20page\x20files'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x55ff6b){readCustomPageId(_0x55ff6b),await readValidatedPageContent(_0x55ff6b);},async 'dryRun'(_0x482a5e){const _0x16f227=a189_0x190f42,_0x1c5be8=await readInput(_0x482a5e);return{'method':_0x16f227(0x1b5),'url':'/smartapi/webcode/page/update/content','body':{'id':_0x1c5be8[_0x16f227(0x1c3)],'codeContent':_0x1c5be8[_0x16f227(0x1bb)]},'description':_0x16f227(0x1b8)+_0x1c5be8[_0x16f227(0x1c3)]+'.'};},async 'execute'(_0x387225){const _0x4f894d=a189_0x190f42,_0x200c71=await readInput(_0x387225),_0x232af3=await updateCustomPageContent({'pageId':_0x200c71[_0x4f894d(0x1c3)],'pageContent':_0x200c71['pageContent']});if(!Number[_0x4f894d(0x1c6)](_0x232af3[_0x4f894d(0x1c5)])||_0x232af3[_0x4f894d(0x1c5)]<=0x0)throw CliErrors['apiError']('Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0x29baa1=buildCustomPageEditUrl(_0x200c71[_0x4f894d(0x1b6)],_0x200c71[_0x4f894d(0x1c3)]),_0x57f0cc=await resolveCustomPageDevelopmentUrl(_0x200c71[_0x4f894d(0x1b6)],_0x200c71[_0x4f894d(0x1c3)],_0x387225[_0x4f894d(0x1cb)]);return{'ok':!![],'data':{'operation':_0x4f894d(0x1cd),'selector':{'appCode':_0x200c71[_0x4f894d(0x1b6)],'pageId':_0x200c71[_0x4f894d(0x1c3)]},'before':null,'after':{'pageId':_0x232af3[_0x4f894d(0x1c3)],'version':_0x232af3[_0x4f894d(0x1c5)],'pageContent':_0x200c71[_0x4f894d(0x1bb)]},'dryRun':![],'request':_0x200c71,..._0x57f0cc?{'pageUrl':_0x57f0cc}:{},..._0x29baa1?{'editPageUrl':_0x29baa1}:{},'warnings':_0x57f0cc?[]:[_0x4f894d(0x1af)]},'message':_0x4f894d(0x1b4)+_0x200c71[_0x4f894d(0x1c3)]+'.'};}};async function readInput(_0x51d9be){const _0x20372a=a189_0x190f42,_0x2730cb=readCustomPageId(_0x51d9be),_0x43fbb3=_0x51d9be[_0x20372a(0x1c1)](_0x20372a(0x1c9))[_0x20372a(0x1b1)]()||(await getCustomPageSource(_0x2730cb))[_0x20372a(0x1b6)]?.[_0x20372a(0x1b1)]();if(!_0x43fbb3)throw CliErrors['validation'](_0x20372a(0x1c8)+_0x2730cb+'.');return{'appCode':_0x43fbb3,'pageId':_0x2730cb,'pageContent':await readValidatedPageContent(_0x51d9be)};}async function readValidatedPageContent(_0x53a353){const _0x1d9122=a189_0x190f42,_0x20493a=await readCustomPageDirectory(_0x53a353[_0x1d9122(0x1c1)](_0x1d9122(0x1ca)));return await validateCustomPageContent(_0x20493a),_0x20493a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a190_0xe7cf10=a190_0x1735;(function(_0x5d1cee,_0x94fa37){const _0x35fbf8=a190_0x1735,_0x3cb71c=_0x5d1cee();while(!![]){try{const _0xd2148d=-parseInt(_0x35fbf8(0x68))/0x1*(-parseInt(_0x35fbf8(0x6b))/0x2)+-parseInt(_0x35fbf8(0x74))/0x3+parseInt(_0x35fbf8(0x6d))/0x4*(-parseInt(_0x35fbf8(0x67))/0x5)+parseInt(_0x35fbf8(0x72))/0x6+parseInt(_0x35fbf8(0x7c))/0x7+parseInt(_0x35fbf8(0x6c))/0x8*(parseInt(_0x35fbf8(0x78))/0x9)+parseInt(_0x35fbf8(0x73))/0xa*(-parseInt(_0x35fbf8(0x7b))/0xb);if(_0xd2148d===_0x94fa37)break;else _0x3cb71c['push'](_0x3cb71c['shift']());}catch(_0x39e6ca){_0x3cb71c['push'](_0x3cb71c['shift']());}}}(a190_0x1b53,0x1a2e0));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a190_0x1b53(){const _0x4cc0f2=['GET','length','30kDYaCL','171103asKNil','read','related-pages-fallback','2cYGNUL','8ISGwsv','16932iVfeWV','page','/smartapi/lovrabet/dataset/','string','appCode','119760FPuITe','830wqKqhu','48171CelPzm','code','compress','data-list-status','1646721OnAFpB','relatedPages','name','45771VsHiBn','840126WJhqnF','manualResolutionRequired','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','alias','nextAction'];a190_0x1b53=function(){return _0x4cc0f2;};return a190_0x1b53();}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a190_0x1735(_0x37c756,_0x2fb6f0){_0x37c756=_0x37c756-0x65;const _0x1b53c7=a190_0x1b53();let _0x173505=_0x1b53c7[_0x37c756];return _0x173505;}export const pageDataListStatus={'service':a190_0xe7cf10(0x6e),'command':a190_0xe7cf10(0x77),'description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a190_0xe7cf10(0x69),'defaultOutputFormat':a190_0xe7cf10(0x76),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a190_0xe7cf10(0x7f),'type':a190_0xe7cf10(0x70),'description':a190_0xe7cf10(0x7e)}],async 'validate'(_0x2644e5){validateDatasetSelector(_0x2644e5);},async 'dryRun'(_0x3db42c){const _0x1296b3=a190_0xe7cf10,_0x1bbe3=await loadDatasetDetailForPage(_0x3db42c);return{'method':_0x1296b3(0x65),'url':_0x1296b3(0x6f)+_0x1bbe3['code']+'/standard-page-status?appCode='+encodeURIComponent(_0x3db42c[_0x1296b3(0x71)]),'description':serializeDryRunDescription({'dataset':{'id':_0x1bbe3['id'],'code':_0x1bbe3[_0x1296b3(0x75)],'name':_0x1bbe3[_0x1296b3(0x7a)]},'action':'query-data-list-status'})};},async 'execute'(_0x3be9d0){const _0xe10be0=a190_0xe7cf10,_0xb53a1d=await loadDatasetDetailForPage(_0x3be9d0),_0x421462=await loadDataListPageStatusForGenerate(_0x3be9d0,_0xb53a1d[_0xe10be0(0x75)]),_0x388210=getUndeletedRelatedPages(_0xb53a1d),_0x1ce045=assessDataListPageState(_0xb53a1d[_0xe10be0(0x75)],_0x421462,{'fallbackUndeletedPages':_0x388210});return{'ok':!![],'data':{'datasetCode':_0xb53a1d[_0xe10be0(0x75)],'precheckSource':_0x421462?.['source']??_0xe10be0(0x6a),'status':_0x1ce045['status'],'manualResolutionRequired':_0x1ce045[_0xe10be0(0x7d)],'nextAction':_0x1ce045[_0xe10be0(0x80)],'dataListPageStatus':_0x421462,'relatedPages':{'total':_0xb53a1d[_0xe10be0(0x79)][_0xe10be0(0x66)],'undeletedCount':_0x388210[_0xe10be0(0x66)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a191_0x3801(_0x22e813,_0x7e4d6e){_0x22e813=_0x22e813-0xb3;const _0x5ba626=a191_0x5ba6();let _0x3801ea=_0x5ba626[_0x22e813];return _0x3801ea;}const a191_0x18269d=a191_0x3801;(function(_0x4735ea,_0x46cdad){const _0x272028=a191_0x3801,_0x45d890=_0x4735ea();while(!![]){try{const _0x5d4d49=-parseInt(_0x272028(0xbf))/0x1*(-parseInt(_0x272028(0xdb))/0x2)+-parseInt(_0x272028(0xcf))/0x3*(parseInt(_0x272028(0xc2))/0x4)+parseInt(_0x272028(0xb7))/0x5*(-parseInt(_0x272028(0xd2))/0x6)+-parseInt(_0x272028(0xdc))/0x7+parseInt(_0x272028(0xc8))/0x8*(parseInt(_0x272028(0xd7))/0x9)+-parseInt(_0x272028(0xda))/0xa+parseInt(_0x272028(0xd3))/0xb*(parseInt(_0x272028(0xe1))/0xc);if(_0x5d4d49===_0x46cdad)break;else _0x45d890['push'](_0x45d890['shift']());}catch(_0x18859d){_0x45d890['push'](_0x45d890['shift']());}}}(a191_0x5ba6,0xb2688));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a191_0x5ba6(){const _0x2ee768=['2162265wUhBqK','related-pages-fallback','allowGenerate','reused','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','39180EFLsGe','operationId','compress','source','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','string','185SvltAH','currentStep','dataListPageStatus','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','CRUD_PAGE_SET','nextAction','status','boolean','209417pVUQKk','Submitted\x20a\x20generate\x20task','Reusing\x20an\x20existing\x20generate\x20task','44mZGfGg','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','name','taskId','page','generate-start','7048LllJRA','clientOperationId','write','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','page-pattern','apply','code','25059hVnYdS','alias','appCode','148650HkcGWC','4862VkbCzr','page-type','dataset','bool','11889zGYfwQ','precheck','manualResolutionRequired','9775520kPFEBj','4SpiZkb'];a191_0x5ba6=function(){return _0x2ee768;};return a191_0x5ba6();}import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a191_0x18269d(0xc6),'command':a191_0x18269d(0xc7),'description':'Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':a191_0x18269d(0xca),'defaultOutputFormat':a191_0x18269d(0xb3),'rejectedFlags':[{'name':a191_0x18269d(0xd4),'message':a191_0x18269d(0xb5),'hint':a191_0x18269d(0xc3)},{'name':a191_0x18269d(0xcc),'message':a191_0x18269d(0xe0),'hint':'DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.'}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a191_0x18269d(0xd0),'type':a191_0x18269d(0xb6),'description':a191_0x18269d(0xba)},{'name':a191_0x18269d(0xcd),'type':a191_0x18269d(0xbe),'description':'Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.'}],async 'validate'(_0x364167){validateDatasetSelector(_0x364167);},async 'dryRun'(_0x2085c0){const _0x2adfa5=a191_0x18269d,_0x1ba0bf=await prepare(_0x2085c0);return{'method':'POST','url':'/smartapi/lovrabet/dataset/'+_0x1ba0bf['dataset'][_0x2adfa5(0xce)]+'/generate-standard-pages/start','body':{'appCode':_0x2085c0[_0x2adfa5(0xd1)],'clientOperationId':_0x1ba0bf[_0x2adfa5(0xc9)]},'description':serializeDryRunDescription({'dataset':{'id':_0x1ba0bf[_0x2adfa5(0xd5)]['id'],'code':_0x1ba0bf[_0x2adfa5(0xd5)]['code'],'name':_0x1ba0bf['dataset'][_0x2adfa5(0xc4)],'fieldCount':_0x1ba0bf[_0x2adfa5(0xd5)]['fieldCount']},'precheckSource':_0x1ba0bf[_0x2adfa5(0xb9)]?.[_0x2adfa5(0xb4)]??'related-pages-fallback','action':'generate-start','clientOperationId':_0x1ba0bf['clientOperationId'],'plannedStatus':_0x1ba0bf[_0x2adfa5(0xd8)][_0x2adfa5(0xbd)],'reason':_0x1ba0bf[_0x2adfa5(0xd8)]['message']})};},async 'execute'(_0x160b6d){const _0x11193b=a191_0x18269d;if(!_0x160b6d[_0x11193b(0xd6)]('apply')){const _0x23447d=await pageGenerateStart['dryRun'](_0x160b6d);return{'ok':!![],'message':_0x11193b(0xcb),'data':_0x23447d};}const _0x56235a=await prepare(_0x160b6d);if(!_0x56235a[_0x11193b(0xd8)][_0x11193b(0xde)])return{'ok':![],'message':_0x56235a[_0x11193b(0xd8)]['message'],'data':{'datasetCode':_0x56235a[_0x11193b(0xd5)][_0x11193b(0xce)],'pageType':'DATA_LIST','pagePattern':_0x11193b(0xbb),'clientOperationId':_0x56235a[_0x11193b(0xc9)],'precheckSource':_0x56235a[_0x11193b(0xb9)]?.[_0x11193b(0xb4)]??_0x11193b(0xdd),'status':_0x56235a[_0x11193b(0xd8)][_0x11193b(0xbd)],'manualResolutionRequired':_0x56235a['precheck'][_0x11193b(0xd9)],'nextAction':_0x56235a[_0x11193b(0xd8)][_0x11193b(0xbc)],'query':{'command':buildDataListPageStatusQueryCommand(_0x56235a['dataset'][_0x11193b(0xce)],_0x160b6d[_0x11193b(0xd1)])},'dataListPageStatus':_0x56235a['dataListPageStatus']}};const _0x42a59a=await startGenerateDataListPages(_0x160b6d[_0x11193b(0xd1)],_0x56235a[_0x11193b(0xd5)][_0x11193b(0xce)],{'clientOperationId':_0x56235a[_0x11193b(0xc9)]}),_0x54755b=_0x42a59a[_0x11193b(0xbd)]==='SUCCESS'||_0x42a59a['status']==='PARTIAL_SUCCESS'?await loadDataListPageStatusForGenerate(_0x160b6d,_0x56235a[_0x11193b(0xd5)]['code']):null,_0x1e949f=assessGenerateOperationState(_0x56235a[_0x11193b(0xd5)]['code'],_0x42a59a[_0x11193b(0xbd)],_0x54755b);return{'ok':!![],'message':_0x42a59a[_0x11193b(0xdf)]?_0x11193b(0xc1):_0x11193b(0xc0),'data':{'datasetCode':_0x56235a[_0x11193b(0xd5)][_0x11193b(0xce)],'appCode':_0x160b6d[_0x11193b(0xd1)],'pageType':'DATA_LIST','pagePattern':_0x11193b(0xbb),'taskId':_0x42a59a[_0x11193b(0xc5)]??null,'operationId':_0x42a59a[_0x11193b(0xe2)]??null,'clientOperationId':_0x56235a[_0x11193b(0xc9)],'jobStatus':_0x42a59a[_0x11193b(0xbd)]??null,'progressRate':typeof _0x42a59a['progressRate']==='number'?_0x42a59a['progressRate']:null,'currentStep':_0x42a59a[_0x11193b(0xb8)]??null,'reused':_0x42a59a['reused']===!![],'status':_0x1e949f['status'],'manualResolutionRequired':_0x1e949f[_0x11193b(0xd9)],'nextAction':_0x1e949f[_0x11193b(0xbc)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x56235a[_0x11193b(0xd5)]['code'],{'appCode':_0x160b6d[_0x11193b(0xd1)],'taskId':_0x42a59a['taskId'],'operationId':_0x42a59a[_0x11193b(0xe2)],'clientOperationId':_0x56235a[_0x11193b(0xc9)]})},'dataListPageStatus':_0x54755b}};}};async function prepare(_0x511d22){const _0x14d812=a191_0x18269d,_0x502ed5=await loadDatasetDetailForPage(_0x511d22),_0x5f458f=await loadDataListPageStatusForGenerate(_0x511d22,_0x502ed5[_0x14d812(0xce)]),_0x3149e4=getUndeletedRelatedPages(_0x502ed5);return{'dataset':_0x502ed5,'dataListPageStatus':_0x5f458f,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x502ed5['code'],_0x5f458f,{'fallbackUndeletedPages':_0x3149e4})};}
|