chore: move getFileByPath to payload/uploads

This commit is contained in:
Elliot DeNolf
2024-03-19 01:46:28 -04:00
parent 99adfd2bba
commit 7857c80c79
10 changed files with 9 additions and 9 deletions

View File

@@ -0,0 +1 @@
export { default as getFileByPath } from '../uploads/getFileByPath.js'

View File

@@ -6,7 +6,6 @@ export { extractTranslations } from '../translations/extractTranslations.js'
export { formatFilesize } from '../uploads/formatFilesize.js' export { formatFilesize } from '../uploads/formatFilesize.js'
export { default as getFileByPath } from '../uploads/getFileByPath.js'
export { default as isImage } from '../uploads/isImage.js' export { default as isImage } from '../uploads/isImage.js'
export { combineMerge } from '../utilities/combineMerge.js' export { combineMerge } from '../utilities/combineMerge.js'

View File

@@ -1,5 +1,5 @@
import path from 'path' import path from 'path'
import { getFileByPath } from 'payload/utilities' import { getFileByPath } from 'payload/uploads'
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js' import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'
import { devUser } from '../credentials.js' import { devUser } from '../credentials.js'

View File

@@ -1,6 +1,6 @@
import path from 'path' import path from 'path'
import { type Payload } from 'payload' import { type Payload } from 'payload'
import { getFileByPath } from 'payload/utilities' import { getFileByPath } from 'payload/uploads'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import { devUser } from '../credentials.js' import { devUser } from '../credentials.js'

View File

@@ -1,7 +1,7 @@
import type { Payload } from 'payload' import type { Payload } from 'payload'
import path from 'path' import path from 'path'
import { getFileByPath } from 'payload/utilities' import { getFileByPath } from 'payload/uploads'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import type { NextRESTClient } from '../helpers/NextRESTClient.js' import type { NextRESTClient } from '../helpers/NextRESTClient.js'

View File

@@ -3,7 +3,7 @@ import type { Payload } from 'payload/types'
import { expect, test } from '@playwright/test' import { expect, test } from '@playwright/test'
import path from 'path' import path from 'path'
import { getFileByPath } from 'payload/utilities' import { getFileByPath } from 'payload/uploads'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import type { Page as PayloadPage } from './payload-types.js' import type { Page as PayloadPage } from './payload-types.js'

View File

@@ -1,7 +1,7 @@
import type { Payload } from 'payload' import type { Payload } from 'payload'
import path from 'path' import path from 'path'
import { getFileByPath } from 'payload/utilities' import { getFileByPath } from 'payload/uploads'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import { initPayloadInt } from '../helpers/initPayloadInt.js' import { initPayloadInt } from '../helpers/initPayloadInt.js'

View File

@@ -2,7 +2,7 @@ import type { Payload } from 'payload'
import type { PayloadRequest } from 'payload/types' import type { PayloadRequest } from 'payload/types'
import path from 'path' import path from 'path'
import { getFileByPath } from 'payload/utilities' import { getFileByPath } from 'payload/uploads'
import { mediaSlug } from '../shared.js' import { mediaSlug } from '../shared.js'

View File

@@ -1,5 +1,5 @@
import path from 'path' import path from 'path'
import { getFileByPath } from 'payload/utilities' import { getFileByPath } from 'payload/uploads'
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js' import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'
import { devUser } from '../credentials.js' import { devUser } from '../credentials.js'

View File

@@ -5,7 +5,7 @@ import NodeFormData from 'form-data'
import fs from 'fs' import fs from 'fs'
import path from 'path' import path from 'path'
import { getPayload } from 'payload' import { getPayload } from 'payload'
import { getFileByPath } from 'payload/utilities' import { getFileByPath } from 'payload/uploads'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import { promisify } from 'util' import { promisify } from 'util'