chore: move getFileByPath to payload/uploads
This commit is contained in:
1
packages/payload/src/exports/uploads.ts
Normal file
1
packages/payload/src/exports/uploads.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export { default as getFileByPath } from '../uploads/getFileByPath.js'
|
||||||
@@ -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'
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user