@focus-reactive/payload-plugin-translator 0.1.0
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/LICENSE +21 -0
- package/README.md +410 -0
- package/dist/client/app/cache/CacheProvider.d.ts +7 -0
- package/dist/client/app/cache/CacheProvider.d.ts.map +1 -0
- package/dist/client/app/cache/CacheProvider.export.d.ts +9 -0
- package/dist/client/app/cache/CacheProvider.export.d.ts.map +1 -0
- package/dist/client/app/cache/CacheProvider.export.js +12 -0
- package/dist/client/app/cache/CacheProvider.export.js.map +1 -0
- package/dist/client/app/cache/CacheProvider.js +18 -0
- package/dist/client/app/cache/CacheProvider.js.map +1 -0
- package/dist/client/app/cache/CacheProvider.jsx +11 -0
- package/dist/client/app/config/TranslateKitConfigContext.d.ts +9 -0
- package/dist/client/app/config/TranslateKitConfigContext.d.ts.map +1 -0
- package/dist/client/app/config/TranslateKitConfigContext.js +23 -0
- package/dist/client/app/config/TranslateKitConfigContext.js.map +1 -0
- package/dist/client/app/config/TranslateKitConfigContext.jsx +13 -0
- package/dist/client/app/config/index.d.ts +3 -0
- package/dist/client/app/config/index.d.ts.map +1 -0
- package/dist/client/app/config/index.js +3 -0
- package/dist/client/app/config/index.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.d.ts +6 -0
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.js +27 -0
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.d.ts +6 -0
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.js +34 -0
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.d.ts +13 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.js +33 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.d.ts +9 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.js +20 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.d.ts +6 -0
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.js +27 -0
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.js.map +1 -0
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.d.ts +179 -0
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.js +67 -0
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.d.ts +180 -0
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.d.ts.map +1 -0
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.js +55 -0
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.js.map +1 -0
- package/dist/client/entities/translation/index.d.ts +21 -0
- package/dist/client/entities/translation/index.d.ts.map +1 -0
- package/dist/client/entities/translation/index.js +21 -0
- package/dist/client/entities/translation/index.js.map +1 -0
- package/dist/client/entities/translation/model/enums.d.ts +7 -0
- package/dist/client/entities/translation/model/enums.d.ts.map +1 -0
- package/dist/client/entities/translation/model/enums.js +9 -0
- package/dist/client/entities/translation/model/enums.js.map +1 -0
- package/dist/client/entities/translation/model/types.d.ts +48 -0
- package/dist/client/entities/translation/model/types.d.ts.map +1 -0
- package/dist/client/entities/translation/model/types.js +3 -0
- package/dist/client/entities/translation/model/types.js.map +1 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.d.ts +8 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.js +45 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.jsx +25 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.js +3 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.js.map +1 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.d.ts +10 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.js +54 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.jsx +24 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.js +3 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.js.map +1 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.d.ts +12 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.js +83 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.jsx +38 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.js +3 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.js.map +1 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.d.ts +11 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js +66 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.jsx +32 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.js +3 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.js.map +1 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.d.ts +8 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.js +28 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.js.map +1 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.jsx +16 -0
- package/dist/client/entities/translation/ui/TranslationDirection/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/TranslationDirection/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/TranslationDirection/index.js +3 -0
- package/dist/client/entities/translation/ui/TranslationDirection/index.js.map +1 -0
- package/dist/client/features/collection-translation-form/index.client.d.ts +2 -0
- package/dist/client/features/collection-translation-form/index.client.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/index.client.js +3 -0
- package/dist/client/features/collection-translation-form/index.client.js.map +1 -0
- package/dist/client/features/collection-translation-form/index.d.ts +4 -0
- package/dist/client/features/collection-translation-form/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/index.js +4 -0
- package/dist/client/features/collection-translation-form/index.js.map +1 -0
- package/dist/client/features/collection-translation-form/model/constants.d.ts +16 -0
- package/dist/client/features/collection-translation-form/model/constants.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/model/constants.js +16 -0
- package/dist/client/features/collection-translation-form/model/constants.js.map +1 -0
- package/dist/client/features/collection-translation-form/model/form-model.d.ts +12 -0
- package/dist/client/features/collection-translation-form/model/form-model.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/model/form-model.js +32 -0
- package/dist/client/features/collection-translation-form/model/form-model.js.map +1 -0
- package/dist/client/features/collection-translation-form/model/index.d.ts +9 -0
- package/dist/client/features/collection-translation-form/model/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/model/index.js +6 -0
- package/dist/client/features/collection-translation-form/model/index.js.map +1 -0
- package/dist/client/features/collection-translation-form/model/schema.d.ts +23 -0
- package/dist/client/features/collection-translation-form/model/schema.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/model/schema.js +14 -0
- package/dist/client/features/collection-translation-form/model/schema.js.map +1 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.d.ts +11 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.js +64 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.js.map +1 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.jsx +25 -0
- package/dist/client/features/collection-translation-form/ui/index.d.ts +2 -0
- package/dist/client/features/collection-translation-form/ui/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/ui/index.js +3 -0
- package/dist/client/features/collection-translation-form/ui/index.js.map +1 -0
- package/dist/client/features/collection-translation-popup/index.d.ts +2 -0
- package/dist/client/features/collection-translation-popup/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-popup/index.js +3 -0
- package/dist/client/features/collection-translation-popup/index.js.map +1 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts +8 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts.map +1 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.js +48 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.js.map +1 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.jsx +23 -0
- package/dist/client/features/collection-translation-progress/index.d.ts +2 -0
- package/dist/client/features/collection-translation-progress/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-progress/index.js +3 -0
- package/dist/client/features/collection-translation-progress/index.js.map +1 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts +9 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts.map +1 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js +108 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js.map +1 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.jsx +47 -0
- package/dist/client/features/document-translation-progress-failed/index.d.ts +2 -0
- package/dist/client/features/document-translation-progress-failed/index.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-failed/index.js +3 -0
- package/dist/client/features/document-translation-progress-failed/index.js.map +1 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.d.ts +7 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.js +28 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.js.map +1 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.jsx +19 -0
- package/dist/client/features/document-translation-progress-pending/index.d.ts +2 -0
- package/dist/client/features/document-translation-progress-pending/index.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-pending/index.js +3 -0
- package/dist/client/features/document-translation-progress-pending/index.js.map +1 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.d.ts +7 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.js +44 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.js.map +1 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.jsx +34 -0
- package/dist/client/features/document-translation-progress-running/index.d.ts +2 -0
- package/dist/client/features/document-translation-progress-running/index.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-running/index.js +3 -0
- package/dist/client/features/document-translation-progress-running/index.js.map +1 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.d.ts +7 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.js +28 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.js.map +1 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.jsx +19 -0
- package/dist/client/features/open-document-translation-popup/index.d.ts +2 -0
- package/dist/client/features/open-document-translation-popup/index.d.ts.map +1 -0
- package/dist/client/features/open-document-translation-popup/index.js +3 -0
- package/dist/client/features/open-document-translation-popup/index.js.map +1 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.d.ts +10 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.d.ts.map +1 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.js +35 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.js.map +1 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.jsx +15 -0
- package/dist/client/features/translate-document-form/index.client.d.ts +2 -0
- package/dist/client/features/translate-document-form/index.client.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/index.client.js +3 -0
- package/dist/client/features/translate-document-form/index.client.js.map +1 -0
- package/dist/client/features/translate-document-form/index.d.ts +4 -0
- package/dist/client/features/translate-document-form/index.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/index.js +4 -0
- package/dist/client/features/translate-document-form/index.js.map +1 -0
- package/dist/client/features/translate-document-form/model/constants.d.ts +18 -0
- package/dist/client/features/translate-document-form/model/constants.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/model/constants.js +18 -0
- package/dist/client/features/translate-document-form/model/constants.js.map +1 -0
- package/dist/client/features/translate-document-form/model/form-model.d.ts +12 -0
- package/dist/client/features/translate-document-form/model/form-model.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/model/form-model.js +32 -0
- package/dist/client/features/translate-document-form/model/form-model.js.map +1 -0
- package/dist/client/features/translate-document-form/model/index.d.ts +9 -0
- package/dist/client/features/translate-document-form/model/index.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/model/index.js +6 -0
- package/dist/client/features/translate-document-form/model/index.js.map +1 -0
- package/dist/client/features/translate-document-form/model/schema.d.ts +26 -0
- package/dist/client/features/translate-document-form/model/schema.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/model/schema.js +15 -0
- package/dist/client/features/translate-document-form/model/schema.js.map +1 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.d.ts +10 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.js +57 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.js.map +1 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.jsx +24 -0
- package/dist/client/features/translate-document-form/ui/index.d.ts +2 -0
- package/dist/client/features/translate-document-form/ui/index.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/ui/index.js +3 -0
- package/dist/client/features/translate-document-form/ui/index.js.map +1 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.d.ts +2 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.d.ts.map +1 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.js +18 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.js.map +1 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.jsx +4 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.d.ts +2 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.d.ts.map +1 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.js +16 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.js.map +1 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.jsx +3 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.d.ts +2 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.d.ts.map +1 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.js +14 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.js.map +1 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.jsx +3 -0
- package/dist/client/shared/lib/errors/handleApiError.d.ts +8 -0
- package/dist/client/shared/lib/errors/handleApiError.d.ts.map +1 -0
- package/dist/client/shared/lib/errors/handleApiError.js +24 -0
- package/dist/client/shared/lib/errors/handleApiError.js.map +1 -0
- package/dist/client/shared/lib/forms/handle-form-error.d.ts +3 -0
- package/dist/client/shared/lib/forms/handle-form-error.d.ts.map +1 -0
- package/dist/client/shared/lib/forms/handle-form-error.js +26 -0
- package/dist/client/shared/lib/forms/handle-form-error.js.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.d.ts +7 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.d.ts.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.js +12 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.js.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.d.ts +9 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.d.ts.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.js +14 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.js.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.d.ts +5 -0
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.d.ts.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.js +13 -0
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.js.map +1 -0
- package/dist/client/shared/lib/utils/errors/handleApiError.d.ts +8 -0
- package/dist/client/shared/lib/utils/errors/handleApiError.d.ts.map +1 -0
- package/dist/client/shared/lib/utils/errors/handleApiError.js +24 -0
- package/dist/client/shared/lib/utils/errors/handleApiError.js.map +1 -0
- package/dist/client/shared/lib/utils/react/useToggle.d.ts +7 -0
- package/dist/client/shared/lib/utils/react/useToggle.d.ts.map +1 -0
- package/dist/client/shared/lib/utils/react/useToggle.js +24 -0
- package/dist/client/shared/lib/utils/react/useToggle.js.map +1 -0
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.d.ts +32 -0
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.d.ts.map +1 -0
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.js +66 -0
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.js.map +1 -0
- package/dist/client/shared/providers/CacheClientProvider/index.d.ts +2 -0
- package/dist/client/shared/providers/CacheClientProvider/index.d.ts.map +1 -0
- package/dist/client/shared/providers/CacheClientProvider/index.js +3 -0
- package/dist/client/shared/providers/CacheClientProvider/index.js.map +1 -0
- package/dist/client/shared/types/AccessGuard.d.ts +12 -0
- package/dist/client/shared/types/AccessGuard.d.ts.map +1 -0
- package/dist/client/shared/types/AccessGuard.js +3 -0
- package/dist/client/shared/types/AccessGuard.js.map +1 -0
- package/dist/client/shared/types/PayloadComponentExport.d.ts +3 -0
- package/dist/client/shared/types/PayloadComponentExport.d.ts.map +1 -0
- package/dist/client/shared/types/PayloadComponentExport.js +3 -0
- package/dist/client/shared/types/PayloadComponentExport.js.map +1 -0
- package/dist/client/shared/ui/Alert/Alert.d.ts +10 -0
- package/dist/client/shared/ui/Alert/Alert.d.ts.map +1 -0
- package/dist/client/shared/ui/Alert/Alert.js +40 -0
- package/dist/client/shared/ui/Alert/Alert.js.map +1 -0
- package/dist/client/shared/ui/Alert/Alert.jsx +33 -0
- package/dist/client/shared/ui/Alert/index.d.ts +2 -0
- package/dist/client/shared/ui/Alert/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Alert/index.js +3 -0
- package/dist/client/shared/ui/Alert/index.js.map +1 -0
- package/dist/client/shared/ui/Button/Button.d.ts +12 -0
- package/dist/client/shared/ui/Button/Button.d.ts.map +1 -0
- package/dist/client/shared/ui/Button/Button.js +47 -0
- package/dist/client/shared/ui/Button/Button.js.map +1 -0
- package/dist/client/shared/ui/Button/Button.jsx +35 -0
- package/dist/client/shared/ui/Button/index.d.ts +2 -0
- package/dist/client/shared/ui/Button/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Button/index.js +3 -0
- package/dist/client/shared/ui/Button/index.js.map +1 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.d.ts +7 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.js +14 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.js.map +1 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.jsx +6 -0
- package/dist/client/shared/ui/Checkbox/index.d.ts +2 -0
- package/dist/client/shared/ui/Checkbox/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Checkbox/index.js +3 -0
- package/dist/client/shared/ui/Checkbox/index.js.map +1 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.d.ts +9 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.d.ts.map +1 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.js +13 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.js.map +1 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.jsx +7 -0
- package/dist/client/shared/ui/ColorIndicator/index.d.ts +2 -0
- package/dist/client/shared/ui/ColorIndicator/index.d.ts.map +1 -0
- package/dist/client/shared/ui/ColorIndicator/index.js +3 -0
- package/dist/client/shared/ui/ColorIndicator/index.js.map +1 -0
- package/dist/client/shared/ui/Description/Description.d.ts +8 -0
- package/dist/client/shared/ui/Description/Description.d.ts.map +1 -0
- package/dist/client/shared/ui/Description/Description.js +15 -0
- package/dist/client/shared/ui/Description/Description.js.map +1 -0
- package/dist/client/shared/ui/Description/Description.jsx +7 -0
- package/dist/client/shared/ui/Description/index.d.ts +2 -0
- package/dist/client/shared/ui/Description/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Description/index.js +3 -0
- package/dist/client/shared/ui/Description/index.js.map +1 -0
- package/dist/client/shared/ui/Divider/Divider.d.ts +11 -0
- package/dist/client/shared/ui/Divider/Divider.d.ts.map +1 -0
- package/dist/client/shared/ui/Divider/Divider.js +17 -0
- package/dist/client/shared/ui/Divider/Divider.js.map +1 -0
- package/dist/client/shared/ui/Divider/Divider.jsx +7 -0
- package/dist/client/shared/ui/Divider/index.d.ts +2 -0
- package/dist/client/shared/ui/Divider/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Divider/index.js +3 -0
- package/dist/client/shared/ui/Divider/index.js.map +1 -0
- package/dist/client/shared/ui/Label/Label.d.ts +7 -0
- package/dist/client/shared/ui/Label/Label.d.ts.map +1 -0
- package/dist/client/shared/ui/Label/Label.js +20 -0
- package/dist/client/shared/ui/Label/Label.js.map +1 -0
- package/dist/client/shared/ui/Label/Label.jsx +9 -0
- package/dist/client/shared/ui/Label/index.d.ts +2 -0
- package/dist/client/shared/ui/Label/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Label/index.js +3 -0
- package/dist/client/shared/ui/Label/index.js.map +1 -0
- package/dist/client/shared/ui/Loading/Loading.d.ts +8 -0
- package/dist/client/shared/ui/Loading/Loading.d.ts.map +1 -0
- package/dist/client/shared/ui/Loading/Loading.js +26 -0
- package/dist/client/shared/ui/Loading/Loading.js.map +1 -0
- package/dist/client/shared/ui/Loading/Loading.jsx +11 -0
- package/dist/client/shared/ui/Loading/index.d.ts +2 -0
- package/dist/client/shared/ui/Loading/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Loading/index.js +3 -0
- package/dist/client/shared/ui/Loading/index.js.map +1 -0
- package/dist/client/shared/ui/Popup/Popup.d.ts +11 -0
- package/dist/client/shared/ui/Popup/Popup.d.ts.map +1 -0
- package/dist/client/shared/ui/Popup/Popup.js +27 -0
- package/dist/client/shared/ui/Popup/Popup.js.map +1 -0
- package/dist/client/shared/ui/Popup/Popup.jsx +13 -0
- package/dist/client/shared/ui/Popup/index.d.ts +2 -0
- package/dist/client/shared/ui/Popup/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Popup/index.js +3 -0
- package/dist/client/shared/ui/Popup/index.js.map +1 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.d.ts +10 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.d.ts.map +1 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.js +29 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.jsx +11 -0
- package/dist/client/shared/ui/ProgressBar/index.d.ts +2 -0
- package/dist/client/shared/ui/ProgressBar/index.d.ts.map +1 -0
- package/dist/client/shared/ui/ProgressBar/index.js +3 -0
- package/dist/client/shared/ui/ProgressBar/index.js.map +1 -0
- package/dist/client/shared/ui/Select/Select.d.ts +20 -0
- package/dist/client/shared/ui/Select/Select.d.ts.map +1 -0
- package/dist/client/shared/ui/Select/Select.js +54 -0
- package/dist/client/shared/ui/Select/Select.js.map +1 -0
- package/dist/client/shared/ui/Select/Select.jsx +41 -0
- package/dist/client/shared/ui/Select/index.d.ts +2 -0
- package/dist/client/shared/ui/Select/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Select/index.js +3 -0
- package/dist/client/shared/ui/Select/index.js.map +1 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.d.ts +11 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.d.ts.map +1 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.js +45 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.js.map +1 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.jsx +26 -0
- package/dist/client/shared/ui/StatusCounter/index.d.ts +2 -0
- package/dist/client/shared/ui/StatusCounter/index.d.ts.map +1 -0
- package/dist/client/shared/ui/StatusCounter/index.js +3 -0
- package/dist/client/shared/ui/StatusCounter/index.js.map +1 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.d.ts +10 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.d.ts.map +1 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.js +20 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.js.map +1 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.jsx +10 -0
- package/dist/client/shared/ui/StatusIndicator/index.d.ts +2 -0
- package/dist/client/shared/ui/StatusIndicator/index.d.ts.map +1 -0
- package/dist/client/shared/ui/StatusIndicator/index.js +3 -0
- package/dist/client/shared/ui/StatusIndicator/index.js.map +1 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.d.ts +11 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.js +32 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.js.map +1 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.jsx +16 -0
- package/dist/client/shared/ui/Tooltip/index.d.ts +2 -0
- package/dist/client/shared/ui/Tooltip/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Tooltip/index.js +3 -0
- package/dist/client/shared/ui/Tooltip/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.d.ts +11 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.js +51 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.js.map +1 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.jsx +24 -0
- package/dist/client/shared/ui/form/FormCheckbox/index.d.ts +2 -0
- package/dist/client/shared/ui/form/FormCheckbox/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormCheckbox/index.js +3 -0
- package/dist/client/shared/ui/form/FormCheckbox/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.d.ts +8 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.js +37 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.js.map +1 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.jsx +21 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.d.ts +2 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.js +3 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.d.ts +20 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.js +88 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.jsx +44 -0
- package/dist/client/shared/ui/form/FormSelect/index.d.ts +2 -0
- package/dist/client/shared/ui/form/FormSelect/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelect/index.js +3 -0
- package/dist/client/shared/ui/form/FormSelect/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.d.ts +12 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.js +19 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.jsx +6 -0
- package/dist/client/shared/ui/form/FormSelectLocale/index.d.ts +2 -0
- package/dist/client/shared/ui/form/FormSelectLocale/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelectLocale/index.js +3 -0
- package/dist/client/shared/ui/form/FormSelectLocale/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.d.ts +19 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.js +59 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.jsx +25 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/index.d.ts +3 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/index.js +3 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/index.js.map +1 -0
- package/dist/client/shared/utils/componentPath.d.ts +6 -0
- package/dist/client/shared/utils/componentPath.d.ts.map +1 -0
- package/dist/client/shared/utils/componentPath.js +9 -0
- package/dist/client/shared/utils/componentPath.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/index.d.ts +2 -0
- package/dist/client/widgets/bulk-translation-dashboard/index.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/index.js +3 -0
- package/dist/client/widgets/bulk-translation-dashboard/index.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.d.ts +6 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.d.ts +9 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js +15 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.jsx +11 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.js +78 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.jsx +55 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.d.ts +8 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.js +24 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.jsx +17 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.d.ts +2 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.js +3 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.js.map +1 -0
- package/dist/client/widgets/translate-document/index.d.ts +2 -0
- package/dist/client/widgets/translate-document/index.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/index.js +3 -0
- package/dist/client/widgets/translate-document/index.js.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.d.ts +6 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.d.ts +11 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js +18 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.js +87 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.js.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.jsx +55 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.d.ts +9 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.js +23 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.js.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.jsx +16 -0
- package/dist/client/widgets/translate-document/ui/index.d.ts +2 -0
- package/dist/client/widgets/translate-document/ui/index.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/ui/index.js +3 -0
- package/dist/client/widgets/translate-document/ui/index.js.map +1 -0
- package/dist/field-config.d.ts +48 -0
- package/dist/field-config.d.ts.map +1 -0
- package/dist/field-config.js +49 -0
- package/dist/field-config.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +63 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +110 -0
- package/dist/plugin.js.map +1 -0
- package/dist/server/features/_lib/collection-utils.d.ts +10 -0
- package/dist/server/features/_lib/collection-utils.d.ts.map +1 -0
- package/dist/server/features/_lib/collection-utils.js +20 -0
- package/dist/server/features/_lib/collection-utils.js.map +1 -0
- package/dist/server/features/_lib/index.d.ts +2 -0
- package/dist/server/features/_lib/index.d.ts.map +1 -0
- package/dist/server/features/_lib/index.js +3 -0
- package/dist/server/features/_lib/index.js.map +1 -0
- package/dist/server/features/cancel/handler.d.ts +11 -0
- package/dist/server/features/cancel/handler.d.ts.map +1 -0
- package/dist/server/features/cancel/handler.js +20 -0
- package/dist/server/features/cancel/handler.js.map +1 -0
- package/dist/server/features/cancel/handler.test.d.ts +2 -0
- package/dist/server/features/cancel/handler.test.d.ts.map +1 -0
- package/dist/server/features/cancel/handler.test.js +63 -0
- package/dist/server/features/cancel/index.d.ts +2 -0
- package/dist/server/features/cancel/index.d.ts.map +1 -0
- package/dist/server/features/cancel/index.js +3 -0
- package/dist/server/features/cancel/index.js.map +1 -0
- package/dist/server/features/cancel/model.d.ts +12 -0
- package/dist/server/features/cancel/model.d.ts.map +1 -0
- package/dist/server/features/cancel/model.js +8 -0
- package/dist/server/features/cancel/model.js.map +1 -0
- package/dist/server/features/cancel/route.d.ts +8 -0
- package/dist/server/features/cancel/route.d.ts.map +1 -0
- package/dist/server/features/cancel/route.js +14 -0
- package/dist/server/features/cancel/route.js.map +1 -0
- package/dist/server/features/cancel-by-collection/handler.d.ts +13 -0
- package/dist/server/features/cancel-by-collection/handler.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/handler.js +28 -0
- package/dist/server/features/cancel-by-collection/handler.js.map +1 -0
- package/dist/server/features/cancel-by-collection/handler.test.d.ts +2 -0
- package/dist/server/features/cancel-by-collection/handler.test.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/handler.test.js +126 -0
- package/dist/server/features/cancel-by-collection/index.d.ts +2 -0
- package/dist/server/features/cancel-by-collection/index.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/index.js +3 -0
- package/dist/server/features/cancel-by-collection/index.js.map +1 -0
- package/dist/server/features/cancel-by-collection/model.d.ts +19 -0
- package/dist/server/features/cancel-by-collection/model.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/model.js +8 -0
- package/dist/server/features/cancel-by-collection/model.js.map +1 -0
- package/dist/server/features/cancel-by-collection/route.d.ts +9 -0
- package/dist/server/features/cancel-by-collection/route.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/route.js +14 -0
- package/dist/server/features/cancel-by-collection/route.js.map +1 -0
- package/dist/server/features/enqueue-translation/handler.d.ts +13 -0
- package/dist/server/features/enqueue-translation/handler.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/handler.js +37 -0
- package/dist/server/features/enqueue-translation/handler.js.map +1 -0
- package/dist/server/features/enqueue-translation/handler.test.d.ts +2 -0
- package/dist/server/features/enqueue-translation/handler.test.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/handler.test.js +115 -0
- package/dist/server/features/enqueue-translation/index.d.ts +2 -0
- package/dist/server/features/enqueue-translation/index.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/index.js +3 -0
- package/dist/server/features/enqueue-translation/index.js.map +1 -0
- package/dist/server/features/enqueue-translation/model.d.ts +37 -0
- package/dist/server/features/enqueue-translation/model.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/model.js +17 -0
- package/dist/server/features/enqueue-translation/model.js.map +1 -0
- package/dist/server/features/enqueue-translation/route.d.ts +9 -0
- package/dist/server/features/enqueue-translation/route.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/route.js +14 -0
- package/dist/server/features/enqueue-translation/route.js.map +1 -0
- package/dist/server/features/get-collection-status/handler.d.ts +13 -0
- package/dist/server/features/get-collection-status/handler.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/handler.js +29 -0
- package/dist/server/features/get-collection-status/handler.js.map +1 -0
- package/dist/server/features/get-collection-status/handler.test.d.ts +2 -0
- package/dist/server/features/get-collection-status/handler.test.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/handler.test.js +108 -0
- package/dist/server/features/get-collection-status/index.d.ts +2 -0
- package/dist/server/features/get-collection-status/index.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/index.js +3 -0
- package/dist/server/features/get-collection-status/index.js.map +1 -0
- package/dist/server/features/get-collection-status/model.d.ts +34 -0
- package/dist/server/features/get-collection-status/model.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/model.js +8 -0
- package/dist/server/features/get-collection-status/model.js.map +1 -0
- package/dist/server/features/get-collection-status/route.d.ts +9 -0
- package/dist/server/features/get-collection-status/route.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/route.js +14 -0
- package/dist/server/features/get-collection-status/route.js.map +1 -0
- package/dist/server/features/get-document-status/handler.d.ts +13 -0
- package/dist/server/features/get-document-status/handler.d.ts.map +1 -0
- package/dist/server/features/get-document-status/handler.js +27 -0
- package/dist/server/features/get-document-status/handler.js.map +1 -0
- package/dist/server/features/get-document-status/handler.test.d.ts +2 -0
- package/dist/server/features/get-document-status/handler.test.d.ts.map +1 -0
- package/dist/server/features/get-document-status/handler.test.js +138 -0
- package/dist/server/features/get-document-status/index.d.ts +3 -0
- package/dist/server/features/get-document-status/index.d.ts.map +1 -0
- package/dist/server/features/get-document-status/index.js +4 -0
- package/dist/server/features/get-document-status/index.js.map +1 -0
- package/dist/server/features/get-document-status/model.d.ts +59 -0
- package/dist/server/features/get-document-status/model.d.ts.map +1 -0
- package/dist/server/features/get-document-status/model.js +33 -0
- package/dist/server/features/get-document-status/model.js.map +1 -0
- package/dist/server/features/get-document-status/route.d.ts +9 -0
- package/dist/server/features/get-document-status/route.d.ts.map +1 -0
- package/dist/server/features/get-document-status/route.js +14 -0
- package/dist/server/features/get-document-status/route.js.map +1 -0
- package/dist/server/features/index.d.ts +7 -0
- package/dist/server/features/index.d.ts.map +1 -0
- package/dist/server/features/index.js +8 -0
- package/dist/server/features/index.js.map +1 -0
- package/dist/server/features/run-translation/handler.d.ts +11 -0
- package/dist/server/features/run-translation/handler.d.ts.map +1 -0
- package/dist/server/features/run-translation/handler.js +28 -0
- package/dist/server/features/run-translation/handler.js.map +1 -0
- package/dist/server/features/run-translation/handler.test.d.ts +2 -0
- package/dist/server/features/run-translation/handler.test.d.ts.map +1 -0
- package/dist/server/features/run-translation/handler.test.js +98 -0
- package/dist/server/features/run-translation/index.d.ts +2 -0
- package/dist/server/features/run-translation/index.d.ts.map +1 -0
- package/dist/server/features/run-translation/index.js +3 -0
- package/dist/server/features/run-translation/index.js.map +1 -0
- package/dist/server/features/run-translation/model.d.ts +12 -0
- package/dist/server/features/run-translation/model.d.ts.map +1 -0
- package/dist/server/features/run-translation/model.js +8 -0
- package/dist/server/features/run-translation/model.js.map +1 -0
- package/dist/server/features/run-translation/route.d.ts +8 -0
- package/dist/server/features/run-translation/route.d.ts.map +1 -0
- package/dist/server/features/run-translation/route.js +14 -0
- package/dist/server/features/run-translation/route.js.map +1 -0
- package/dist/server/features/translate-document/handler.d.ts +19 -0
- package/dist/server/features/translate-document/handler.d.ts.map +1 -0
- package/dist/server/features/translate-document/handler.js +69 -0
- package/dist/server/features/translate-document/handler.js.map +1 -0
- package/dist/server/features/translate-document/handler.test.d.ts +2 -0
- package/dist/server/features/translate-document/handler.test.d.ts.map +1 -0
- package/dist/server/features/translate-document/handler.test.js +171 -0
- package/dist/server/features/translate-document/index.d.ts +4 -0
- package/dist/server/features/translate-document/index.d.ts.map +1 -0
- package/dist/server/features/translate-document/index.js +4 -0
- package/dist/server/features/translate-document/index.js.map +1 -0
- package/dist/server/features/translate-document/model.d.ts +53 -0
- package/dist/server/features/translate-document/model.d.ts.map +1 -0
- package/dist/server/features/translate-document/model.js +30 -0
- package/dist/server/features/translate-document/model.js.map +1 -0
- package/dist/server/features/translate-document/task.d.ts +41 -0
- package/dist/server/features/translate-document/task.d.ts.map +1 -0
- package/dist/server/features/translate-document/task.js +44 -0
- package/dist/server/features/translate-document/task.js.map +1 -0
- package/dist/server/index.d.ts +4 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +5 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/modules/index.d.ts +3 -0
- package/dist/server/modules/index.d.ts.map +1 -0
- package/dist/server/modules/index.js +4 -0
- package/dist/server/modules/index.js.map +1 -0
- package/dist/server/modules/task-runner/TaskRunner.interface.d.ts +31 -0
- package/dist/server/modules/task-runner/TaskRunner.interface.d.ts.map +1 -0
- package/dist/server/modules/task-runner/TaskRunner.interface.js +10 -0
- package/dist/server/modules/task-runner/TaskRunner.interface.js.map +1 -0
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.d.ts +46 -0
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.d.ts.map +1 -0
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.js +11 -0
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.js.map +1 -0
- package/dist/server/modules/task-runner/index.d.ts +7 -0
- package/dist/server/modules/task-runner/index.d.ts.map +1 -0
- package/dist/server/modules/task-runner/index.js +4 -0
- package/dist/server/modules/task-runner/index.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.d.ts +20 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.js +128 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.d.ts +31 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.js +165 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.d.ts +2 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.js +188 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/index.d.ts +3 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/index.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/index.js +3 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/index.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.d.ts +7 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.js +40 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.d.ts +2 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.js +169 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/types.d.ts +85 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/types.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/types.js +5 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/types.js.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.d.ts +25 -0
- package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.js +42 -0
- package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.js.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.d.ts +23 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.js +72 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.js.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.d.ts +2 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.js +148 -0
- package/dist/server/modules/task-runner/sync-runner/index.d.ts +2 -0
- package/dist/server/modules/task-runner/sync-runner/index.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/index.js +3 -0
- package/dist/server/modules/task-runner/sync-runner/index.js.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/types.d.ts +18 -0
- package/dist/server/modules/task-runner/sync-runner/types.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/types.js +5 -0
- package/dist/server/modules/task-runner/sync-runner/types.js.map +1 -0
- package/dist/server/modules/task-runner/types.d.ts +41 -0
- package/dist/server/modules/task-runner/types.d.ts.map +1 -0
- package/dist/server/modules/task-runner/types.js +5 -0
- package/dist/server/modules/task-runner/types.js.map +1 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.d.ts +35 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.js +55 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.js.map +1 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.test.js +552 -0
- package/dist/server/modules/translation-pipeline/index.d.ts +4 -0
- package/dist/server/modules/translation-pipeline/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/index.js +4 -0
- package/dist/server/modules/translation-pipeline/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts +26 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.js +97 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.d.ts +9 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.js +15 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.js +294 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.d.ts +3 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.js +4 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.d.ts +35 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.js +128 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.d.ts +13 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.js +23 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.js +737 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.d.ts +3 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.js +4 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/index.d.ts +7 -0
- package/dist/server/modules/translation-pipeline/stages/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/index.js +7 -0
- package/dist/server/modules/translation-pipeline/stages/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.d.ts +10 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.js +28 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.d.ts +10 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.js +32 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.d.ts +24 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.js +34 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.d.ts +11 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.js +29 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.js +396 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.d.ts +27 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.js +6 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.d.ts +7 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.js +6 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.d.ts +11 -0
- package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.js +23 -0
- package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation/index.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/translation/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation/index.js +3 -0
- package/dist/server/modules/translation-pipeline/stages/translation/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.d.ts +18 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.js +27 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.d.ts +8 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.js +15 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.js +110 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.d.ts +3 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.js +4 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.d.ts +9 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.js +11 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.js.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.js +36 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.d.ts +10 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.js +19 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.js.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.js +77 -0
- package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.d.ts +22 -0
- package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.js +10 -0
- package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.js.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/index.d.ts +14 -0
- package/dist/server/modules/translation-pipeline/strategies/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/index.js +16 -0
- package/dist/server/modules/translation-pipeline/strategies/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/FieldChunk.d.ts +18 -0
- package/dist/server/modules/translation-pipeline/types/FieldChunk.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/FieldChunk.js +8 -0
- package/dist/server/modules/translation-pipeline/types/FieldChunk.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/Pipeline.d.ts +21 -0
- package/dist/server/modules/translation-pipeline/types/Pipeline.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/Pipeline.js +6 -0
- package/dist/server/modules/translation-pipeline/types/Pipeline.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/PipelineContext.d.ts +28 -0
- package/dist/server/modules/translation-pipeline/types/PipelineContext.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/PipelineContext.js +6 -0
- package/dist/server/modules/translation-pipeline/types/PipelineContext.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/TextChunk.d.ts +43 -0
- package/dist/server/modules/translation-pipeline/types/TextChunk.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/TextChunk.js +12 -0
- package/dist/server/modules/translation-pipeline/types/TextChunk.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/index.d.ts +6 -0
- package/dist/server/modules/translation-pipeline/types/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/index.js +3 -0
- package/dist/server/modules/translation-pipeline/types/index.js.map +1 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.d.ts +128 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.d.ts.map +1 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.js +138 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.js.map +1 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.d.ts +2 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.d.ts.map +1 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.js +214 -0
- package/dist/server/modules/translation-providers/TranslationProvider.interface.d.ts +56 -0
- package/dist/server/modules/translation-providers/TranslationProvider.interface.d.ts.map +1 -0
- package/dist/server/modules/translation-providers/TranslationProvider.interface.js +26 -0
- package/dist/server/modules/translation-providers/TranslationProvider.interface.js.map +1 -0
- package/dist/server/modules/translation-providers/index.d.ts +3 -0
- package/dist/server/modules/translation-providers/index.d.ts.map +1 -0
- package/dist/server/modules/translation-providers/index.js +3 -0
- package/dist/server/modules/translation-providers/index.js.map +1 -0
- package/dist/server/shared/access/AnyAccessGuard.d.ts +8 -0
- package/dist/server/shared/access/AnyAccessGuard.d.ts.map +1 -0
- package/dist/server/shared/access/AnyAccessGuard.js +9 -0
- package/dist/server/shared/access/AnyAccessGuard.js.map +1 -0
- package/dist/server/shared/access/handler.d.ts +8 -0
- package/dist/server/shared/access/handler.d.ts.map +1 -0
- package/dist/server/shared/access/handler.js +5 -0
- package/dist/server/shared/access/handler.js.map +1 -0
- package/dist/server/shared/access/index.d.ts +4 -0
- package/dist/server/shared/access/index.d.ts.map +1 -0
- package/dist/server/shared/access/index.js +3 -0
- package/dist/server/shared/access/index.js.map +1 -0
- package/dist/server/shared/access/types.d.ts +2 -0
- package/dist/server/shared/access/types.d.ts.map +1 -0
- package/dist/server/shared/access/types.js +3 -0
- package/dist/server/shared/access/types.js.map +1 -0
- package/dist/server/shared/field-config/getFieldConfig.d.ts +21 -0
- package/dist/server/shared/field-config/getFieldConfig.d.ts.map +1 -0
- package/dist/server/shared/field-config/getFieldConfig.js +29 -0
- package/dist/server/shared/field-config/getFieldConfig.js.map +1 -0
- package/dist/server/shared/field-config/getFieldConfig.test.d.ts +2 -0
- package/dist/server/shared/field-config/getFieldConfig.test.d.ts.map +1 -0
- package/dist/server/shared/field-config/getFieldConfig.test.js +74 -0
- package/dist/server/shared/field-config/index.d.ts +4 -0
- package/dist/server/shared/field-config/index.d.ts.map +1 -0
- package/dist/server/shared/field-config/index.js +4 -0
- package/dist/server/shared/field-config/index.js.map +1 -0
- package/dist/server/shared/field-config/types.d.ts +39 -0
- package/dist/server/shared/field-config/types.d.ts.map +1 -0
- package/dist/server/shared/field-config/types.js +22 -0
- package/dist/server/shared/field-config/types.js.map +1 -0
- package/dist/server/shared/guards/collection-guards.d.ts +7 -0
- package/dist/server/shared/guards/collection-guards.d.ts.map +1 -0
- package/dist/server/shared/guards/collection-guards.js +16 -0
- package/dist/server/shared/guards/collection-guards.js.map +1 -0
- package/dist/server/shared/guards/field-guards.d.ts +37 -0
- package/dist/server/shared/guards/field-guards.d.ts.map +1 -0
- package/dist/server/shared/guards/field-guards.js +34 -0
- package/dist/server/shared/guards/field-guards.js.map +1 -0
- package/dist/server/shared/guards/field-guards.test.d.ts +2 -0
- package/dist/server/shared/guards/field-guards.test.d.ts.map +1 -0
- package/dist/server/shared/guards/field-guards.test.js +166 -0
- package/dist/server/shared/guards/index.d.ts +4 -0
- package/dist/server/shared/guards/index.d.ts.map +1 -0
- package/dist/server/shared/guards/index.js +4 -0
- package/dist/server/shared/guards/index.js.map +1 -0
- package/dist/server/shared/http/ServerResponse.d.ts +24 -0
- package/dist/server/shared/http/ServerResponse.d.ts.map +1 -0
- package/dist/server/shared/http/ServerResponse.js +165 -0
- package/dist/server/shared/http/ServerResponse.js.map +1 -0
- package/dist/server/shared/http/ServerResponse.test.d.ts +2 -0
- package/dist/server/shared/http/ServerResponse.test.d.ts.map +1 -0
- package/dist/server/shared/http/ServerResponse.test.js +161 -0
- package/dist/server/shared/http/index.d.ts +4 -0
- package/dist/server/shared/http/index.d.ts.map +1 -0
- package/dist/server/shared/http/index.js +5 -0
- package/dist/server/shared/http/index.js.map +1 -0
- package/dist/server/shared/http/withAccessCheck.d.ts +8 -0
- package/dist/server/shared/http/withAccessCheck.d.ts.map +1 -0
- package/dist/server/shared/http/withAccessCheck.js +16 -0
- package/dist/server/shared/http/withAccessCheck.js.map +1 -0
- package/dist/server/shared/http/withAccessCheck.test.d.ts +2 -0
- package/dist/server/shared/http/withAccessCheck.test.d.ts.map +1 -0
- package/dist/server/shared/http/withAccessCheck.test.js +46 -0
- package/dist/server/shared/http/withErrorHandler.d.ts +6 -0
- package/dist/server/shared/http/withErrorHandler.d.ts.map +1 -0
- package/dist/server/shared/http/withErrorHandler.js +23 -0
- package/dist/server/shared/http/withErrorHandler.js.map +1 -0
- package/dist/server/shared/http/withErrorHandler.test.d.ts +2 -0
- package/dist/server/shared/http/withErrorHandler.test.d.ts.map +1 -0
- package/dist/server/shared/http/withErrorHandler.test.js +69 -0
- package/dist/server/shared/index.d.ts +11 -0
- package/dist/server/shared/index.d.ts.map +1 -0
- package/dist/server/shared/index.js +13 -0
- package/dist/server/shared/index.js.map +1 -0
- package/dist/server/shared/lexical/collectTextNodes.d.ts +10 -0
- package/dist/server/shared/lexical/collectTextNodes.d.ts.map +1 -0
- package/dist/server/shared/lexical/collectTextNodes.js +31 -0
- package/dist/server/shared/lexical/collectTextNodes.js.map +1 -0
- package/dist/server/shared/lexical/collectTextNodes.test.d.ts +2 -0
- package/dist/server/shared/lexical/collectTextNodes.test.d.ts.map +1 -0
- package/dist/server/shared/lexical/collectTextNodes.test.js +120 -0
- package/dist/server/shared/lexical/guards.d.ts +20 -0
- package/dist/server/shared/lexical/guards.d.ts.map +1 -0
- package/dist/server/shared/lexical/guards.js +18 -0
- package/dist/server/shared/lexical/guards.js.map +1 -0
- package/dist/server/shared/lexical/guards.test.d.ts +2 -0
- package/dist/server/shared/lexical/guards.test.d.ts.map +1 -0
- package/dist/server/shared/lexical/guards.test.js +160 -0
- package/dist/server/shared/lexical/index.d.ts +7 -0
- package/dist/server/shared/lexical/index.d.ts.map +1 -0
- package/dist/server/shared/lexical/index.js +6 -0
- package/dist/server/shared/lexical/index.js.map +1 -0
- package/dist/server/shared/lexical/isEmptyRichText.d.ts +14 -0
- package/dist/server/shared/lexical/isEmptyRichText.d.ts.map +1 -0
- package/dist/server/shared/lexical/isEmptyRichText.js +31 -0
- package/dist/server/shared/lexical/isEmptyRichText.js.map +1 -0
- package/dist/server/shared/lexical/isEmptyRichText.test.d.ts +2 -0
- package/dist/server/shared/lexical/isEmptyRichText.test.d.ts.map +1 -0
- package/dist/server/shared/lexical/isEmptyRichText.test.js +251 -0
- package/dist/server/shared/lexical/traverseLexicalTree.d.ts +11 -0
- package/dist/server/shared/lexical/traverseLexicalTree.d.ts.map +1 -0
- package/dist/server/shared/lexical/traverseLexicalTree.js +19 -0
- package/dist/server/shared/lexical/traverseLexicalTree.js.map +1 -0
- package/dist/server/shared/lexical/traverseLexicalTree.test.d.ts +2 -0
- package/dist/server/shared/lexical/traverseLexicalTree.test.d.ts.map +1 -0
- package/dist/server/shared/lexical/traverseLexicalTree.test.js +112 -0
- package/dist/server/shared/lexical/types.d.ts +20 -0
- package/dist/server/shared/lexical/types.d.ts.map +1 -0
- package/dist/server/shared/lexical/types.js +8 -0
- package/dist/server/shared/lexical/types.js.map +1 -0
- package/dist/server/shared/utils/LazyMap.d.ts +71 -0
- package/dist/server/shared/utils/LazyMap.d.ts.map +1 -0
- package/dist/server/shared/utils/LazyMap.js +95 -0
- package/dist/server/shared/utils/LazyMap.js.map +1 -0
- package/dist/server/shared/utils/LazyMap.test.d.ts +2 -0
- package/dist/server/shared/utils/LazyMap.test.d.ts.map +1 -0
- package/dist/server/shared/utils/LazyMap.test.js +262 -0
- package/dist/server/shared/utils/filterLocalizedFields.d.ts +11 -0
- package/dist/server/shared/utils/filterLocalizedFields.d.ts.map +1 -0
- package/dist/server/shared/utils/filterLocalizedFields.js +72 -0
- package/dist/server/shared/utils/filterLocalizedFields.js.map +1 -0
- package/dist/server/shared/utils/filterLocalizedFields.test.d.ts +2 -0
- package/dist/server/shared/utils/filterLocalizedFields.test.d.ts.map +1 -0
- package/dist/server/shared/utils/filterLocalizedFields.test.js +338 -0
- package/dist/server/shared/utils/getByPath.d.ts +9 -0
- package/dist/server/shared/utils/getByPath.d.ts.map +1 -0
- package/dist/server/shared/utils/getByPath.js +18 -0
- package/dist/server/shared/utils/getByPath.js.map +1 -0
- package/dist/server/shared/utils/getByPath.test.d.ts +2 -0
- package/dist/server/shared/utils/getByPath.test.d.ts.map +1 -0
- package/dist/server/shared/utils/getByPath.test.js +33 -0
- package/dist/server/shared/utils/index.d.ts +10 -0
- package/dist/server/shared/utils/index.d.ts.map +1 -0
- package/dist/server/shared/utils/index.js +10 -0
- package/dist/server/shared/utils/index.js.map +1 -0
- package/dist/server/shared/utils/isEmpty.d.ts +9 -0
- package/dist/server/shared/utils/isEmpty.d.ts.map +1 -0
- package/dist/server/shared/utils/isEmpty.js +15 -0
- package/dist/server/shared/utils/isEmpty.js.map +1 -0
- package/dist/server/shared/utils/isEmpty.test.d.ts +2 -0
- package/dist/server/shared/utils/isEmpty.test.d.ts.map +1 -0
- package/dist/server/shared/utils/isEmpty.test.js +60 -0
- package/dist/server/shared/utils/isObject.d.ts +5 -0
- package/dist/server/shared/utils/isObject.d.ts.map +1 -0
- package/dist/server/shared/utils/isObject.js +7 -0
- package/dist/server/shared/utils/isObject.js.map +1 -0
- package/dist/server/shared/utils/isObject.test.d.ts +2 -0
- package/dist/server/shared/utils/isObject.test.d.ts.map +1 -0
- package/dist/server/shared/utils/isObject.test.js +57 -0
- package/dist/server/shared/utils/normalizePath.d.ts +16 -0
- package/dist/server/shared/utils/normalizePath.d.ts.map +1 -0
- package/dist/server/shared/utils/normalizePath.js +22 -0
- package/dist/server/shared/utils/normalizePath.js.map +1 -0
- package/dist/server/shared/utils/normalizePath.test.d.ts +2 -0
- package/dist/server/shared/utils/normalizePath.test.d.ts.map +1 -0
- package/dist/server/shared/utils/normalizePath.test.js +33 -0
- package/dist/server/shared/utils/pipe.d.ts +5 -0
- package/dist/server/shared/utils/pipe.d.ts.map +1 -0
- package/dist/server/shared/utils/pipe.js +5 -0
- package/dist/server/shared/utils/pipe.js.map +1 -0
- package/dist/server/shared/utils/pipe.test.d.ts +2 -0
- package/dist/server/shared/utils/pipe.test.d.ts.map +1 -0
- package/dist/server/shared/utils/pipe.test.js +55 -0
- package/dist/server/shared/utils/setByPath.d.ts +11 -0
- package/dist/server/shared/utils/setByPath.d.ts.map +1 -0
- package/dist/server/shared/utils/setByPath.js +26 -0
- package/dist/server/shared/utils/setByPath.js.map +1 -0
- package/dist/server/shared/utils/setByPath.test.d.ts +2 -0
- package/dist/server/shared/utils/setByPath.test.d.ts.map +1 -0
- package/dist/server/shared/utils/setByPath.test.js +46 -0
- package/dist/types/AccessGuard.d.ts +12 -0
- package/dist/types/AccessGuard.d.ts.map +1 -0
- package/dist/types/AccessGuard.js +3 -0
- package/dist/types/AccessGuard.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/vitest-env.d.js +3 -0
- package/dist/vitest-env.d.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { normalizeJob } from './normalizeJob';
|
|
2
|
+
/**
|
|
3
|
+
* TaskRunner implementation using Payload Jobs.
|
|
4
|
+
*
|
|
5
|
+
* Handles queuing, cancellation, status tracking, and execution of translation tasks.
|
|
6
|
+
*/ export class PayloadJobsTaskRunner {
|
|
7
|
+
payload;
|
|
8
|
+
config;
|
|
9
|
+
constructor(payload, config){
|
|
10
|
+
this.payload = payload;
|
|
11
|
+
this.config = config;
|
|
12
|
+
}
|
|
13
|
+
async enqueue(tasks) {
|
|
14
|
+
const byCollection = this.groupByCollection(tasks);
|
|
15
|
+
for (const [collectionSlug, items] of byCollection){
|
|
16
|
+
const documentIds = items.map((t)=>t.collectionId);
|
|
17
|
+
const existing = await this.findJobsInternal({
|
|
18
|
+
and: [
|
|
19
|
+
{
|
|
20
|
+
'input.collection.relationTo': {
|
|
21
|
+
equals: collectionSlug
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
'input.collection.value': {
|
|
26
|
+
in: documentIds
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
if (existing.length > 0) {
|
|
32
|
+
await this.cancelInternal(existing.map((t)=>t.id));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
await Promise.all(tasks.map((task)=>this.payload.jobs.queue({
|
|
36
|
+
task: this.config.taskName,
|
|
37
|
+
queue: this.config.queueName,
|
|
38
|
+
input: {
|
|
39
|
+
collection: {
|
|
40
|
+
relationTo: task.collectionSlug,
|
|
41
|
+
value: task.collectionId
|
|
42
|
+
},
|
|
43
|
+
source_lng: task.sourceLng,
|
|
44
|
+
target_lng: task.targetLng,
|
|
45
|
+
strategy: task.strategy,
|
|
46
|
+
publish_on_translation: task.publishOnTranslation
|
|
47
|
+
}
|
|
48
|
+
})));
|
|
49
|
+
}
|
|
50
|
+
async cancel(taskIds) {
|
|
51
|
+
if (taskIds.length === 0) return;
|
|
52
|
+
await this.cancelInternal(taskIds);
|
|
53
|
+
}
|
|
54
|
+
async run(taskId) {
|
|
55
|
+
const tasks = await this.findJobsInternal({
|
|
56
|
+
id: {
|
|
57
|
+
equals: taskId
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
limit: 1
|
|
61
|
+
});
|
|
62
|
+
const task = tasks[0];
|
|
63
|
+
if (!task) {
|
|
64
|
+
return {
|
|
65
|
+
success: false,
|
|
66
|
+
error: 'not_found'
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
if (task.completedAt) {
|
|
70
|
+
return {
|
|
71
|
+
success: false,
|
|
72
|
+
error: 'already_completed'
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
if (task.status === 'running') {
|
|
76
|
+
return {
|
|
77
|
+
success: false,
|
|
78
|
+
error: 'already_running'
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
this.payload.jobs.runByID({
|
|
82
|
+
id: taskId
|
|
83
|
+
});
|
|
84
|
+
return {
|
|
85
|
+
success: true
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
async findByCollection(collectionSlug, documentIds) {
|
|
89
|
+
const where = documentIds?.length ? {
|
|
90
|
+
and: [
|
|
91
|
+
{
|
|
92
|
+
'input.collection.relationTo': {
|
|
93
|
+
equals: collectionSlug
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
'input.collection.value': {
|
|
98
|
+
in: documentIds
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
} : {
|
|
103
|
+
'input.collection.relationTo': {
|
|
104
|
+
equals: collectionSlug
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
return this.findJobsInternal(where, {
|
|
108
|
+
pagination: false
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Group tasks by collection slug
|
|
113
|
+
*/ groupByCollection(tasks) {
|
|
114
|
+
const map = new Map();
|
|
115
|
+
for (const task of tasks){
|
|
116
|
+
const existing = map.get(task.collectionSlug) ?? [];
|
|
117
|
+
existing.push(task);
|
|
118
|
+
map.set(task.collectionSlug, existing);
|
|
119
|
+
}
|
|
120
|
+
return map;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Internal cancel implementation
|
|
124
|
+
*/ async cancelInternal(taskIds) {
|
|
125
|
+
if (taskIds.length === 0) return;
|
|
126
|
+
await this.payload.jobs.cancel({
|
|
127
|
+
where: {
|
|
128
|
+
id: {
|
|
129
|
+
in: taskIds
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
queue: this.config.queueName
|
|
133
|
+
});
|
|
134
|
+
await this.payload.delete({
|
|
135
|
+
collection: this.config.jobsCollection,
|
|
136
|
+
where: {
|
|
137
|
+
id: {
|
|
138
|
+
in: taskIds
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Internal method to find jobs with where clause
|
|
145
|
+
*/ async findJobsInternal(where, params) {
|
|
146
|
+
const response = await this.payload.find({
|
|
147
|
+
collection: this.config.jobsCollection,
|
|
148
|
+
limit: params?.limit,
|
|
149
|
+
pagination: params?.pagination,
|
|
150
|
+
where: {
|
|
151
|
+
and: [
|
|
152
|
+
{
|
|
153
|
+
taskSlug: {
|
|
154
|
+
equals: this.config.taskName
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
where
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
return response.docs.map(normalizeJob);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
//# sourceMappingURL=PayloadJobsTaskRunner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.ts"],"sourcesContent":["import type { Payload, Where, CollectionSlug } from 'payload'\n\nimport type { TaskRunner } from '../TaskRunner.interface'\nimport type { Task, TaskInput, RunResult } from '../types'\nimport type { PayloadJobsRunnerConfig, PayloadJob } from './types'\nimport { normalizeJob } from './normalizeJob'\n\n/**\n * TaskRunner implementation using Payload Jobs.\n *\n * Handles queuing, cancellation, status tracking, and execution of translation tasks.\n */\nexport class PayloadJobsTaskRunner implements TaskRunner {\n constructor(\n private readonly payload: Payload,\n private readonly config: PayloadJobsRunnerConfig,\n ) {}\n\n async enqueue(tasks: TaskInput[]): Promise<void> {\n const byCollection = this.groupByCollection(tasks)\n\n for (const [collectionSlug, items] of byCollection) {\n const documentIds = items.map((t) => t.collectionId)\n const existing = await this.findJobsInternal({\n and: [\n { 'input.collection.relationTo': { equals: collectionSlug } },\n { 'input.collection.value': { in: documentIds } },\n ],\n })\n if (existing.length > 0) {\n await this.cancelInternal(existing.map((t) => t.id))\n }\n }\n\n await Promise.all(\n tasks.map((task) =>\n this.payload.jobs.queue({\n task: this.config.taskName,\n queue: this.config.queueName,\n input: {\n collection: {\n relationTo: task.collectionSlug,\n value: task.collectionId,\n },\n source_lng: task.sourceLng,\n target_lng: task.targetLng,\n strategy: task.strategy,\n publish_on_translation: task.publishOnTranslation,\n },\n }),\n ),\n )\n }\n\n async cancel(taskIds: string[]): Promise<void> {\n if (taskIds.length === 0) return\n await this.cancelInternal(taskIds)\n }\n\n async run(taskId: string): Promise<RunResult> {\n const tasks = await this.findJobsInternal({ id: { equals: taskId } }, { limit: 1 })\n const task = tasks[0]\n\n if (!task) {\n return { success: false, error: 'not_found' }\n }\n if (task.completedAt) {\n return { success: false, error: 'already_completed' }\n }\n if (task.status === 'running') {\n return { success: false, error: 'already_running' }\n }\n\n this.payload.jobs.runByID({ id: taskId })\n return { success: true }\n }\n\n async findByCollection(collectionSlug: CollectionSlug, documentIds?: Array<string | number>): Promise<Task[]> {\n const where: Where = documentIds?.length\n ? {\n and: [\n { 'input.collection.relationTo': { equals: collectionSlug } },\n { 'input.collection.value': { in: documentIds } },\n ],\n }\n : { 'input.collection.relationTo': { equals: collectionSlug } }\n\n return this.findJobsInternal(where, { pagination: false })\n }\n\n /**\n * Group tasks by collection slug\n */\n private groupByCollection(tasks: TaskInput[]): Map<CollectionSlug, TaskInput[]> {\n const map = new Map<CollectionSlug, TaskInput[]>()\n for (const task of tasks) {\n const existing = map.get(task.collectionSlug) ?? []\n existing.push(task)\n map.set(task.collectionSlug, existing)\n }\n return map\n }\n\n /**\n * Internal cancel implementation\n */\n private async cancelInternal(taskIds: string[]): Promise<void> {\n if (taskIds.length === 0) return\n\n await this.payload.jobs.cancel({\n where: { id: { in: taskIds } },\n queue: this.config.queueName,\n })\n\n await this.payload.delete({\n collection: this.config.jobsCollection,\n where: { id: { in: taskIds } },\n })\n }\n\n /**\n * Internal method to find jobs with where clause\n */\n private async findJobsInternal(where: Where, params?: { limit?: number; pagination?: boolean }): Promise<Task[]> {\n const response = await this.payload.find({\n collection: this.config.jobsCollection,\n limit: params?.limit,\n pagination: params?.pagination,\n where: {\n and: [{ taskSlug: { equals: this.config.taskName } }, where],\n },\n })\n\n return (response.docs as PayloadJob[]).map(normalizeJob)\n }\n}\n"],"names":["normalizeJob","PayloadJobsTaskRunner","payload","config","enqueue","tasks","byCollection","groupByCollection","collectionSlug","items","documentIds","map","t","collectionId","existing","findJobsInternal","and","equals","in","length","cancelInternal","id","Promise","all","task","jobs","queue","taskName","queueName","input","collection","relationTo","value","source_lng","sourceLng","target_lng","targetLng","strategy","publish_on_translation","publishOnTranslation","cancel","taskIds","run","taskId","limit","success","error","completedAt","status","runByID","findByCollection","where","pagination","Map","get","push","set","delete","jobsCollection","params","response","find","taskSlug","docs"],"mappings":"AAKA,SAASA,YAAY,QAAQ,iBAAgB;AAE7C;;;;CAIC,GACD,OAAO,MAAMC;;;IACX,YACE,AAAiBC,OAAgB,EACjC,AAAiBC,MAA+B,CAChD;aAFiBD,UAAAA;aACAC,SAAAA;IAChB;IAEH,MAAMC,QAAQC,KAAkB,EAAiB;QAC/C,MAAMC,eAAe,IAAI,CAACC,iBAAiB,CAACF;QAE5C,KAAK,MAAM,CAACG,gBAAgBC,MAAM,IAAIH,aAAc;YAClD,MAAMI,cAAcD,MAAME,GAAG,CAAC,CAACC,IAAMA,EAAEC,YAAY;YACnD,MAAMC,WAAW,MAAM,IAAI,CAACC,gBAAgB,CAAC;gBAC3CC,KAAK;oBACH;wBAAE,+BAA+B;4BAAEC,QAAQT;wBAAe;oBAAE;oBAC5D;wBAAE,0BAA0B;4BAAEU,IAAIR;wBAAY;oBAAE;iBACjD;YACH;YACA,IAAII,SAASK,MAAM,GAAG,GAAG;gBACvB,MAAM,IAAI,CAACC,cAAc,CAACN,SAASH,GAAG,CAAC,CAACC,IAAMA,EAAES,EAAE;YACpD;QACF;QAEA,MAAMC,QAAQC,GAAG,CACflB,MAAMM,GAAG,CAAC,CAACa,OACT,IAAI,CAACtB,OAAO,CAACuB,IAAI,CAACC,KAAK,CAAC;gBACtBF,MAAM,IAAI,CAACrB,MAAM,CAACwB,QAAQ;gBAC1BD,OAAO,IAAI,CAACvB,MAAM,CAACyB,SAAS;gBAC5BC,OAAO;oBACLC,YAAY;wBACVC,YAAYP,KAAKhB,cAAc;wBAC/BwB,OAAOR,KAAKX,YAAY;oBAC1B;oBACAoB,YAAYT,KAAKU,SAAS;oBAC1BC,YAAYX,KAAKY,SAAS;oBAC1BC,UAAUb,KAAKa,QAAQ;oBACvBC,wBAAwBd,KAAKe,oBAAoB;gBACnD;YACF;IAGN;IAEA,MAAMC,OAAOC,OAAiB,EAAiB;QAC7C,IAAIA,QAAQtB,MAAM,KAAK,GAAG;QAC1B,MAAM,IAAI,CAACC,cAAc,CAACqB;IAC5B;IAEA,MAAMC,IAAIC,MAAc,EAAsB;QAC5C,MAAMtC,QAAQ,MAAM,IAAI,CAACU,gBAAgB,CAAC;YAAEM,IAAI;gBAAEJ,QAAQ0B;YAAO;QAAE,GAAG;YAAEC,OAAO;QAAE;QACjF,MAAMpB,OAAOnB,KAAK,CAAC,EAAE;QAErB,IAAI,CAACmB,MAAM;YACT,OAAO;gBAAEqB,SAAS;gBAAOC,OAAO;YAAY;QAC9C;QACA,IAAItB,KAAKuB,WAAW,EAAE;YACpB,OAAO;gBAAEF,SAAS;gBAAOC,OAAO;YAAoB;QACtD;QACA,IAAItB,KAAKwB,MAAM,KAAK,WAAW;YAC7B,OAAO;gBAAEH,SAAS;gBAAOC,OAAO;YAAkB;QACpD;QAEA,IAAI,CAAC5C,OAAO,CAACuB,IAAI,CAACwB,OAAO,CAAC;YAAE5B,IAAIsB;QAAO;QACvC,OAAO;YAAEE,SAAS;QAAK;IACzB;IAEA,MAAMK,iBAAiB1C,cAA8B,EAAEE,WAAoC,EAAmB;QAC5G,MAAMyC,QAAezC,aAAaS,SAC9B;YACEH,KAAK;gBACH;oBAAE,+BAA+B;wBAAEC,QAAQT;oBAAe;gBAAE;gBAC5D;oBAAE,0BAA0B;wBAAEU,IAAIR;oBAAY;gBAAE;aACjD;QACH,IACA;YAAE,+BAA+B;gBAAEO,QAAQT;YAAe;QAAE;QAEhE,OAAO,IAAI,CAACO,gBAAgB,CAACoC,OAAO;YAAEC,YAAY;QAAM;IAC1D;IAEA;;GAEC,GACD,AAAQ7C,kBAAkBF,KAAkB,EAAoC;QAC9E,MAAMM,MAAM,IAAI0C;QAChB,KAAK,MAAM7B,QAAQnB,MAAO;YACxB,MAAMS,WAAWH,IAAI2C,GAAG,CAAC9B,KAAKhB,cAAc,KAAK,EAAE;YACnDM,SAASyC,IAAI,CAAC/B;YACdb,IAAI6C,GAAG,CAAChC,KAAKhB,cAAc,EAAEM;QAC/B;QACA,OAAOH;IACT;IAEA;;GAEC,GACD,MAAcS,eAAeqB,OAAiB,EAAiB;QAC7D,IAAIA,QAAQtB,MAAM,KAAK,GAAG;QAE1B,MAAM,IAAI,CAACjB,OAAO,CAACuB,IAAI,CAACe,MAAM,CAAC;YAC7BW,OAAO;gBAAE9B,IAAI;oBAAEH,IAAIuB;gBAAQ;YAAE;YAC7Bf,OAAO,IAAI,CAACvB,MAAM,CAACyB,SAAS;QAC9B;QAEA,MAAM,IAAI,CAAC1B,OAAO,CAACuD,MAAM,CAAC;YACxB3B,YAAY,IAAI,CAAC3B,MAAM,CAACuD,cAAc;YACtCP,OAAO;gBAAE9B,IAAI;oBAAEH,IAAIuB;gBAAQ;YAAE;QAC/B;IACF;IAEA;;GAEC,GACD,MAAc1B,iBAAiBoC,KAAY,EAAEQ,MAAiD,EAAmB;QAC/G,MAAMC,WAAW,MAAM,IAAI,CAAC1D,OAAO,CAAC2D,IAAI,CAAC;YACvC/B,YAAY,IAAI,CAAC3B,MAAM,CAACuD,cAAc;YACtCd,OAAOe,QAAQf;YACfQ,YAAYO,QAAQP;YACpBD,OAAO;gBACLnC,KAAK;oBAAC;wBAAE8C,UAAU;4BAAE7C,QAAQ,IAAI,CAACd,MAAM,CAACwB,QAAQ;wBAAC;oBAAE;oBAAGwB;iBAAM;YAC9D;QACF;QAEA,OAAO,AAACS,SAASG,IAAI,CAAkBpD,GAAG,CAACX;IAC7C;AACF"}
|
package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayloadJobsTaskRunner.test.d.ts","sourceRoot":"","sources":["../../../../../src/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
+
import { PayloadJobsTaskRunner } from './PayloadJobsTaskRunner';
|
|
3
|
+
describe('PayloadJobsTaskRunner', () => {
|
|
4
|
+
let mockPayload;
|
|
5
|
+
let config;
|
|
6
|
+
let runner;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
mockPayload = {
|
|
9
|
+
find: vi.fn().mockResolvedValue({ docs: [] }),
|
|
10
|
+
delete: vi.fn().mockResolvedValue(undefined),
|
|
11
|
+
jobs: {
|
|
12
|
+
queue: vi.fn().mockResolvedValue(undefined),
|
|
13
|
+
cancel: vi.fn().mockResolvedValue(undefined),
|
|
14
|
+
runByID: vi.fn().mockResolvedValue(undefined),
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
config = {
|
|
18
|
+
taskName: 'translate_document',
|
|
19
|
+
queueName: 'translations',
|
|
20
|
+
jobsCollection: 'payload-jobs',
|
|
21
|
+
autoRun: {
|
|
22
|
+
cron: '* * * * *',
|
|
23
|
+
limit: 50,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
runner = new PayloadJobsTaskRunner(mockPayload, config);
|
|
27
|
+
});
|
|
28
|
+
const createInput = (overrides = {}) => ({
|
|
29
|
+
collectionSlug: 'posts',
|
|
30
|
+
collectionId: 'doc-123',
|
|
31
|
+
sourceLng: 'en',
|
|
32
|
+
targetLng: 'de',
|
|
33
|
+
strategy: 'overwrite',
|
|
34
|
+
publishOnTranslation: false,
|
|
35
|
+
...overrides,
|
|
36
|
+
});
|
|
37
|
+
const createJob = (overrides = {}) => ({
|
|
38
|
+
id: 'job-123',
|
|
39
|
+
createdAt: '2024-01-01T00:00:00Z',
|
|
40
|
+
updatedAt: '2024-01-01T00:00:00Z',
|
|
41
|
+
input: {
|
|
42
|
+
collection: { relationTo: 'posts', value: 'doc-123' },
|
|
43
|
+
source_lng: 'en',
|
|
44
|
+
target_lng: 'de',
|
|
45
|
+
strategy: 'overwrite',
|
|
46
|
+
},
|
|
47
|
+
...overrides,
|
|
48
|
+
});
|
|
49
|
+
describe('enqueue', () => {
|
|
50
|
+
it('queues tasks with correct input', async () => {
|
|
51
|
+
const input = createInput();
|
|
52
|
+
await runner.enqueue([input]);
|
|
53
|
+
expect(mockPayload.jobs.queue).toHaveBeenCalledWith({
|
|
54
|
+
task: 'translate_document',
|
|
55
|
+
queue: 'translations',
|
|
56
|
+
input: {
|
|
57
|
+
collection: { relationTo: 'posts', value: 'doc-123' },
|
|
58
|
+
source_lng: 'en',
|
|
59
|
+
target_lng: 'de',
|
|
60
|
+
strategy: 'overwrite',
|
|
61
|
+
publish_on_translation: false,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
it('queues multiple tasks', async () => {
|
|
66
|
+
const inputs = [createInput({ collectionId: 'doc-1' }), createInput({ collectionId: 'doc-2' })];
|
|
67
|
+
await runner.enqueue(inputs);
|
|
68
|
+
expect(mockPayload.jobs.queue).toHaveBeenCalledTimes(2);
|
|
69
|
+
});
|
|
70
|
+
it('cancels existing jobs before queuing new ones', async () => {
|
|
71
|
+
const existingJob = createJob({ id: 'existing-job' });
|
|
72
|
+
mockPayload.find.mockResolvedValueOnce({ docs: [existingJob] });
|
|
73
|
+
const input = createInput();
|
|
74
|
+
await runner.enqueue([input]);
|
|
75
|
+
expect(mockPayload.jobs.cancel).toHaveBeenCalledWith({
|
|
76
|
+
where: { id: { in: ['existing-job'] } },
|
|
77
|
+
queue: 'translations',
|
|
78
|
+
});
|
|
79
|
+
expect(mockPayload.delete).toHaveBeenCalledWith({
|
|
80
|
+
collection: 'payload-jobs',
|
|
81
|
+
where: { id: { in: ['existing-job'] } },
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
it('does not cancel when no existing jobs', async () => {
|
|
85
|
+
mockPayload.find.mockResolvedValue({ docs: [] });
|
|
86
|
+
const input = createInput();
|
|
87
|
+
await runner.enqueue([input]);
|
|
88
|
+
expect(mockPayload.jobs.cancel).not.toHaveBeenCalled();
|
|
89
|
+
expect(mockPayload.delete).not.toHaveBeenCalled();
|
|
90
|
+
});
|
|
91
|
+
it('groups tasks by collection', async () => {
|
|
92
|
+
const inputs = [
|
|
93
|
+
createInput({ collectionSlug: 'posts', collectionId: 'post-1' }),
|
|
94
|
+
createInput({ collectionSlug: 'posts', collectionId: 'post-2' }),
|
|
95
|
+
createInput({ collectionSlug: 'pages', collectionId: 'page-1' }),
|
|
96
|
+
];
|
|
97
|
+
await runner.enqueue(inputs);
|
|
98
|
+
// Should check for existing jobs per collection
|
|
99
|
+
expect(mockPayload.find).toHaveBeenCalledTimes(2);
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
describe('cancel', () => {
|
|
103
|
+
it('cancels jobs by ids', async () => {
|
|
104
|
+
await runner.cancel(['job-1', 'job-2']);
|
|
105
|
+
expect(mockPayload.jobs.cancel).toHaveBeenCalledWith({
|
|
106
|
+
where: { id: { in: ['job-1', 'job-2'] } },
|
|
107
|
+
queue: 'translations',
|
|
108
|
+
});
|
|
109
|
+
expect(mockPayload.delete).toHaveBeenCalledWith({
|
|
110
|
+
collection: 'payload-jobs',
|
|
111
|
+
where: { id: { in: ['job-1', 'job-2'] } },
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
it('does nothing for empty array', async () => {
|
|
115
|
+
await runner.cancel([]);
|
|
116
|
+
expect(mockPayload.jobs.cancel).not.toHaveBeenCalled();
|
|
117
|
+
expect(mockPayload.delete).not.toHaveBeenCalled();
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
describe('run', () => {
|
|
121
|
+
it('returns not_found when task does not exist', async () => {
|
|
122
|
+
mockPayload.find.mockResolvedValue({ docs: [] });
|
|
123
|
+
const result = await runner.run('nonexistent');
|
|
124
|
+
expect(result).toEqual({ success: false, error: 'not_found' });
|
|
125
|
+
});
|
|
126
|
+
it('returns already_completed when task is completed', async () => {
|
|
127
|
+
const completedJob = createJob({ completedAt: '2024-01-01T01:00:00Z' });
|
|
128
|
+
mockPayload.find.mockResolvedValue({ docs: [completedJob] });
|
|
129
|
+
const result = await runner.run('job-123');
|
|
130
|
+
expect(result).toEqual({ success: false, error: 'already_completed' });
|
|
131
|
+
});
|
|
132
|
+
it('returns already_running when task is running', async () => {
|
|
133
|
+
const runningJob = createJob({ processing: true });
|
|
134
|
+
mockPayload.find.mockResolvedValue({ docs: [runningJob] });
|
|
135
|
+
const result = await runner.run('job-123');
|
|
136
|
+
expect(result).toEqual({ success: false, error: 'already_running' });
|
|
137
|
+
});
|
|
138
|
+
it('runs task and returns success', async () => {
|
|
139
|
+
const pendingJob = createJob();
|
|
140
|
+
mockPayload.find.mockResolvedValue({ docs: [pendingJob] });
|
|
141
|
+
const result = await runner.run('job-123');
|
|
142
|
+
expect(result).toEqual({ success: true });
|
|
143
|
+
expect(mockPayload.jobs.runByID).toHaveBeenCalledWith({ id: 'job-123' });
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
describe('findByCollection', () => {
|
|
147
|
+
it('finds tasks by collection slug', async () => {
|
|
148
|
+
// Mock returns only jobs matching the collection (simulating DB where clause)
|
|
149
|
+
const jobs = [
|
|
150
|
+
createJob({ id: 'job-1', input: { collection: { relationTo: 'posts', value: 'doc-1' } } }),
|
|
151
|
+
createJob({ id: 'job-2', input: { collection: { relationTo: 'posts', value: 'doc-2' } } }),
|
|
152
|
+
];
|
|
153
|
+
mockPayload.find.mockResolvedValue({ docs: jobs });
|
|
154
|
+
const tasks = await runner.findByCollection('posts');
|
|
155
|
+
expect(tasks).toHaveLength(2);
|
|
156
|
+
expect(tasks[0].id).toBe('job-1');
|
|
157
|
+
expect(tasks[1].id).toBe('job-2');
|
|
158
|
+
});
|
|
159
|
+
it('filters by document ids when provided', async () => {
|
|
160
|
+
// Mock returns only jobs matching collection and document ids (simulating DB where clause)
|
|
161
|
+
const jobs = [
|
|
162
|
+
createJob({ id: 'job-1', input: { collection: { relationTo: 'posts', value: 'doc-1' } } }),
|
|
163
|
+
createJob({ id: 'job-2', input: { collection: { relationTo: 'posts', value: 'doc-2' } } }),
|
|
164
|
+
];
|
|
165
|
+
mockPayload.find.mockResolvedValue({ docs: jobs });
|
|
166
|
+
const tasks = await runner.findByCollection('posts', ['doc-1', 'doc-2']);
|
|
167
|
+
expect(tasks).toHaveLength(2);
|
|
168
|
+
expect(tasks[0].id).toBe('job-1');
|
|
169
|
+
expect(tasks[1].id).toBe('job-2');
|
|
170
|
+
});
|
|
171
|
+
it('returns normalized tasks', async () => {
|
|
172
|
+
const job = createJob({
|
|
173
|
+
id: 'job-123',
|
|
174
|
+
completedAt: '2024-01-01T01:00:00Z',
|
|
175
|
+
});
|
|
176
|
+
mockPayload.find.mockResolvedValue({ docs: [job] });
|
|
177
|
+
const tasks = await runner.findByCollection('posts');
|
|
178
|
+
expect(tasks[0]).toMatchObject({
|
|
179
|
+
id: 'job-123',
|
|
180
|
+
status: 'completed',
|
|
181
|
+
input: {
|
|
182
|
+
collectionSlug: 'posts',
|
|
183
|
+
collectionId: 'doc-123',
|
|
184
|
+
},
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/server/modules/task-runner/payload-jobs-runner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,YAAY,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/server/modules/task-runner/payload-jobs-runner/index.ts"],"sourcesContent":["export { createPayloadJobsRunner } from './PayloadJobsRunnerProvider'\nexport type { PayloadJobsRunnerOptions } from './types'\n"],"names":["createPayloadJobsRunner"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,8BAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeJob.d.ts","sourceRoot":"","sources":["../../../../../src/server/modules/task-runner/payload-jobs-runner/normalizeJob.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,UAAU,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI,CAkBlD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transform Payload job to normalized Task
|
|
3
|
+
*/ export function normalizeJob(job) {
|
|
4
|
+
return {
|
|
5
|
+
id: job.id,
|
|
6
|
+
status: getJobStatus(job),
|
|
7
|
+
input: {
|
|
8
|
+
collectionSlug: job.input?.collection?.relationTo ?? '',
|
|
9
|
+
collectionId: job.input?.collection?.value ?? '',
|
|
10
|
+
sourceLng: job.input?.source_lng ?? '',
|
|
11
|
+
targetLng: job.input?.target_lng ?? '',
|
|
12
|
+
strategy: job.input?.strategy ?? 'overwrite',
|
|
13
|
+
publishOnTranslation: job.input?.publish_on_translation ?? false
|
|
14
|
+
},
|
|
15
|
+
createdAt: job.createdAt,
|
|
16
|
+
updatedAt: job.updatedAt,
|
|
17
|
+
completedAt: job.completedAt ?? undefined,
|
|
18
|
+
error: job.error ? {
|
|
19
|
+
message: extractErrorMessage(job.error)
|
|
20
|
+
} : undefined,
|
|
21
|
+
cancelled: isCancelled(job.error)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function getJobStatus(job) {
|
|
25
|
+
if (job.completedAt) return 'completed';
|
|
26
|
+
if (job.processing) return 'running';
|
|
27
|
+
if (job.error) return 'failed';
|
|
28
|
+
return 'pending';
|
|
29
|
+
}
|
|
30
|
+
function extractErrorMessage(error) {
|
|
31
|
+
if (error && typeof error === 'object' && 'message' in error && typeof error.message === 'string') {
|
|
32
|
+
return error.message;
|
|
33
|
+
}
|
|
34
|
+
return 'Unknown error';
|
|
35
|
+
}
|
|
36
|
+
function isCancelled(error) {
|
|
37
|
+
return error !== null && typeof error === 'object' && 'cancelled' in error && typeof error.cancelled === 'boolean' && error.cancelled;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=normalizeJob.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/server/modules/task-runner/payload-jobs-runner/normalizeJob.ts"],"sourcesContent":["import type { CollectionSlug } from 'payload'\n\nimport type { Task, TaskStatus } from '../types'\nimport type { PayloadJob } from './types'\n\n/**\n * Transform Payload job to normalized Task\n */\nexport function normalizeJob(job: PayloadJob): Task {\n return {\n id: job.id,\n status: getJobStatus(job),\n input: {\n collectionSlug: job.input?.collection?.relationTo ?? ('' as CollectionSlug),\n collectionId: job.input?.collection?.value ?? '',\n sourceLng: job.input?.source_lng ?? '',\n targetLng: job.input?.target_lng ?? '',\n strategy: (job.input?.strategy as 'overwrite' | 'skip_existing') ?? 'overwrite',\n publishOnTranslation: job.input?.publish_on_translation ?? false,\n },\n createdAt: job.createdAt,\n updatedAt: job.updatedAt,\n completedAt: job.completedAt ?? undefined,\n error: job.error ? { message: extractErrorMessage(job.error) } : undefined,\n cancelled: isCancelled(job.error),\n }\n}\n\nfunction getJobStatus(job: PayloadJob): TaskStatus {\n if (job.completedAt) return 'completed'\n if (job.processing) return 'running'\n if (job.error) return 'failed'\n return 'pending'\n}\n\nfunction extractErrorMessage(error: unknown): string {\n if (error && typeof error === 'object' && 'message' in error && typeof error.message === 'string') {\n return error.message\n }\n return 'Unknown error'\n}\n\nfunction isCancelled(error: unknown): boolean {\n return (\n error !== null &&\n typeof error === 'object' &&\n 'cancelled' in error &&\n typeof error.cancelled === 'boolean' &&\n error.cancelled\n )\n}\n"],"names":["normalizeJob","job","id","status","getJobStatus","input","collectionSlug","collection","relationTo","collectionId","value","sourceLng","source_lng","targetLng","target_lng","strategy","publishOnTranslation","publish_on_translation","createdAt","updatedAt","completedAt","undefined","error","message","extractErrorMessage","cancelled","isCancelled","processing"],"mappings":"AAKA;;CAEC,GACD,OAAO,SAASA,aAAaC,GAAe;IAC1C,OAAO;QACLC,IAAID,IAAIC,EAAE;QACVC,QAAQC,aAAaH;QACrBI,OAAO;YACLC,gBAAgBL,IAAII,KAAK,EAAEE,YAAYC,cAAe;YACtDC,cAAcR,IAAII,KAAK,EAAEE,YAAYG,SAAS;YAC9CC,WAAWV,IAAII,KAAK,EAAEO,cAAc;YACpCC,WAAWZ,IAAII,KAAK,EAAES,cAAc;YACpCC,UAAU,AAACd,IAAII,KAAK,EAAEU,YAA8C;YACpEC,sBAAsBf,IAAII,KAAK,EAAEY,0BAA0B;QAC7D;QACAC,WAAWjB,IAAIiB,SAAS;QACxBC,WAAWlB,IAAIkB,SAAS;QACxBC,aAAanB,IAAImB,WAAW,IAAIC;QAChCC,OAAOrB,IAAIqB,KAAK,GAAG;YAAEC,SAASC,oBAAoBvB,IAAIqB,KAAK;QAAE,IAAID;QACjEI,WAAWC,YAAYzB,IAAIqB,KAAK;IAClC;AACF;AAEA,SAASlB,aAAaH,GAAe;IACnC,IAAIA,IAAImB,WAAW,EAAE,OAAO;IAC5B,IAAInB,IAAI0B,UAAU,EAAE,OAAO;IAC3B,IAAI1B,IAAIqB,KAAK,EAAE,OAAO;IACtB,OAAO;AACT;AAEA,SAASE,oBAAoBF,KAAc;IACzC,IAAIA,SAAS,OAAOA,UAAU,YAAY,aAAaA,SAAS,OAAOA,MAAMC,OAAO,KAAK,UAAU;QACjG,OAAOD,MAAMC,OAAO;IACtB;IACA,OAAO;AACT;AAEA,SAASG,YAAYJ,KAAc;IACjC,OACEA,UAAU,QACV,OAAOA,UAAU,YACjB,eAAeA,SACf,OAAOA,MAAMG,SAAS,KAAK,aAC3BH,MAAMG,SAAS;AAEnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeJob.test.d.ts","sourceRoot":"","sources":["../../../../../src/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { normalizeJob } from './normalizeJob';
|
|
3
|
+
describe('normalizeJob', () => {
|
|
4
|
+
const baseJob = {
|
|
5
|
+
id: 'job-123',
|
|
6
|
+
createdAt: '2024-01-01T00:00:00Z',
|
|
7
|
+
updatedAt: '2024-01-01T00:00:00Z',
|
|
8
|
+
input: {
|
|
9
|
+
collection: {
|
|
10
|
+
relationTo: 'posts',
|
|
11
|
+
value: 'doc-456',
|
|
12
|
+
},
|
|
13
|
+
source_lng: 'en',
|
|
14
|
+
target_lng: 'de',
|
|
15
|
+
strategy: 'overwrite',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
describe('basic transformation', () => {
|
|
19
|
+
it('transforms job to task with correct id', () => {
|
|
20
|
+
const task = normalizeJob(baseJob);
|
|
21
|
+
expect(task.id).toBe('job-123');
|
|
22
|
+
});
|
|
23
|
+
it('transforms job to task with correct input', () => {
|
|
24
|
+
const task = normalizeJob(baseJob);
|
|
25
|
+
expect(task.input).toEqual({
|
|
26
|
+
collectionSlug: 'posts',
|
|
27
|
+
collectionId: 'doc-456',
|
|
28
|
+
sourceLng: 'en',
|
|
29
|
+
targetLng: 'de',
|
|
30
|
+
strategy: 'overwrite',
|
|
31
|
+
publishOnTranslation: false,
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
it('transforms job to task with correct timestamps', () => {
|
|
35
|
+
const task = normalizeJob(baseJob);
|
|
36
|
+
expect(task.createdAt).toBe('2024-01-01T00:00:00Z');
|
|
37
|
+
expect(task.updatedAt).toBe('2024-01-01T00:00:00Z');
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
describe('status detection', () => {
|
|
41
|
+
it('returns pending status for new job', () => {
|
|
42
|
+
const task = normalizeJob(baseJob);
|
|
43
|
+
expect(task.status).toBe('pending');
|
|
44
|
+
});
|
|
45
|
+
it('returns running status when processing is true', () => {
|
|
46
|
+
const job = { ...baseJob, processing: true };
|
|
47
|
+
const task = normalizeJob(job);
|
|
48
|
+
expect(task.status).toBe('running');
|
|
49
|
+
});
|
|
50
|
+
it('returns completed status when completedAt is set', () => {
|
|
51
|
+
const job = { ...baseJob, completedAt: '2024-01-01T01:00:00Z' };
|
|
52
|
+
const task = normalizeJob(job);
|
|
53
|
+
expect(task.status).toBe('completed');
|
|
54
|
+
expect(task.completedAt).toBe('2024-01-01T01:00:00Z');
|
|
55
|
+
});
|
|
56
|
+
it('returns failed status when error is set', () => {
|
|
57
|
+
const job = { ...baseJob, error: { message: 'Something went wrong' } };
|
|
58
|
+
const task = normalizeJob(job);
|
|
59
|
+
expect(task.status).toBe('failed');
|
|
60
|
+
});
|
|
61
|
+
it('completed takes precedence over processing', () => {
|
|
62
|
+
const job = { ...baseJob, completedAt: '2024-01-01T01:00:00Z', processing: true };
|
|
63
|
+
const task = normalizeJob(job);
|
|
64
|
+
expect(task.status).toBe('completed');
|
|
65
|
+
});
|
|
66
|
+
it('completed takes precedence over error', () => {
|
|
67
|
+
const job = {
|
|
68
|
+
...baseJob,
|
|
69
|
+
completedAt: '2024-01-01T01:00:00Z',
|
|
70
|
+
error: { message: 'err' },
|
|
71
|
+
};
|
|
72
|
+
const task = normalizeJob(job);
|
|
73
|
+
expect(task.status).toBe('completed');
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
describe('error handling', () => {
|
|
77
|
+
it('extracts error message from error object', () => {
|
|
78
|
+
const job = { ...baseJob, error: { message: 'Translation failed' } };
|
|
79
|
+
const task = normalizeJob(job);
|
|
80
|
+
expect(task.error).toEqual({ message: 'Translation failed' });
|
|
81
|
+
});
|
|
82
|
+
it('returns unknown error for non-standard error', () => {
|
|
83
|
+
const job = { ...baseJob, error: 'some string error' };
|
|
84
|
+
const task = normalizeJob(job);
|
|
85
|
+
expect(task.error).toEqual({ message: 'Unknown error' });
|
|
86
|
+
});
|
|
87
|
+
it('returns unknown error for error without message', () => {
|
|
88
|
+
const job = { ...baseJob, error: { code: 500 } };
|
|
89
|
+
const task = normalizeJob(job);
|
|
90
|
+
expect(task.error).toEqual({ message: 'Unknown error' });
|
|
91
|
+
});
|
|
92
|
+
it('sets error to undefined when no error', () => {
|
|
93
|
+
const task = normalizeJob(baseJob);
|
|
94
|
+
expect(task.error).toBeUndefined();
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
describe('cancelled detection', () => {
|
|
98
|
+
it('detects cancelled job', () => {
|
|
99
|
+
const job = { ...baseJob, error: { cancelled: true, message: 'Cancelled' } };
|
|
100
|
+
const task = normalizeJob(job);
|
|
101
|
+
expect(task.cancelled).toBe(true);
|
|
102
|
+
});
|
|
103
|
+
it('returns false for non-cancelled error', () => {
|
|
104
|
+
const job = { ...baseJob, error: { message: 'Failed' } };
|
|
105
|
+
const task = normalizeJob(job);
|
|
106
|
+
expect(task.cancelled).toBe(false);
|
|
107
|
+
});
|
|
108
|
+
it('returns false for cancelled: false', () => {
|
|
109
|
+
const job = { ...baseJob, error: { cancelled: false, message: 'Error' } };
|
|
110
|
+
const task = normalizeJob(job);
|
|
111
|
+
expect(task.cancelled).toBe(false);
|
|
112
|
+
});
|
|
113
|
+
it('returns false for no error', () => {
|
|
114
|
+
const task = normalizeJob(baseJob);
|
|
115
|
+
expect(task.cancelled).toBe(false);
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
describe('missing input fields', () => {
|
|
119
|
+
it('handles missing input gracefully', () => {
|
|
120
|
+
const job = { ...baseJob, input: undefined };
|
|
121
|
+
const task = normalizeJob(job);
|
|
122
|
+
expect(task.input).toEqual({
|
|
123
|
+
collectionSlug: '',
|
|
124
|
+
collectionId: '',
|
|
125
|
+
sourceLng: '',
|
|
126
|
+
targetLng: '',
|
|
127
|
+
strategy: 'overwrite',
|
|
128
|
+
publishOnTranslation: false,
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
it('handles missing collection in input', () => {
|
|
132
|
+
const job = {
|
|
133
|
+
...baseJob,
|
|
134
|
+
input: { source_lng: 'en', target_lng: 'de' },
|
|
135
|
+
};
|
|
136
|
+
const task = normalizeJob(job);
|
|
137
|
+
expect(task.input.collectionSlug).toBe('');
|
|
138
|
+
expect(task.input.collectionId).toBe('');
|
|
139
|
+
});
|
|
140
|
+
it('handles missing strategy with default', () => {
|
|
141
|
+
const job = {
|
|
142
|
+
...baseJob,
|
|
143
|
+
input: { ...baseJob.input, strategy: undefined },
|
|
144
|
+
};
|
|
145
|
+
const task = normalizeJob(job);
|
|
146
|
+
expect(task.input.strategy).toBe('overwrite');
|
|
147
|
+
});
|
|
148
|
+
it('handles skip_existing strategy', () => {
|
|
149
|
+
const job = {
|
|
150
|
+
...baseJob,
|
|
151
|
+
input: { ...baseJob.input, strategy: 'skip_existing' },
|
|
152
|
+
};
|
|
153
|
+
const task = normalizeJob(job);
|
|
154
|
+
expect(task.input.strategy).toBe('skip_existing');
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
describe('completedAt handling', () => {
|
|
158
|
+
it('sets completedAt to undefined when null', () => {
|
|
159
|
+
const job = { ...baseJob, completedAt: null };
|
|
160
|
+
const task = normalizeJob(job);
|
|
161
|
+
expect(task.completedAt).toBeUndefined();
|
|
162
|
+
});
|
|
163
|
+
it('sets completedAt to value when provided', () => {
|
|
164
|
+
const job = { ...baseJob, completedAt: '2024-01-02T00:00:00Z' };
|
|
165
|
+
const task = normalizeJob(job);
|
|
166
|
+
expect(task.completedAt).toBe('2024-01-02T00:00:00Z');
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
});
|