Compare commits

..

9 Commits

Author SHA1 Message Date
Elliot DeNolf
440eb8d9c6 2.2.5 2023-10-11 17:02:10 -04:00
Elliot DeNolf
1523b2be41 feat: add payload 2.0 to peer deps 2023-10-11 17:00:57 -04:00
Elliot DeNolf
91f6e36420 2.2.2 2023-10-06 09:44:48 -04:00
Elliot DeNolf
9e74fe558f 2.2.2-beta.0 2023-10-05 14:23:22 -04:00
James
ac8bcfac23 chore: proper dev webpack config 2023-10-05 14:17:57 -04:00
James
91b0a691ed chore: moves admin plugin into src 2023-10-05 12:19:09 -04:00
James
3ced6ec2a0 chore: merge 2023-10-05 12:17:23 -04:00
James
650fe159ee chore: renames mock to admin.js 2023-10-05 12:16:54 -04:00
James
b92657fb39 chore: simplifies alias 2023-10-05 12:12:31 -04:00
6 changed files with 11 additions and 21 deletions

View File

@@ -1 +0,0 @@
export default 'file-stub'

View File

@@ -1 +0,0 @@
export const promisify = () => {}

View File

@@ -12,17 +12,17 @@ export default buildConfig({
// for development of this plugin. // for development of this plugin.
// No need to use these aliases within your own projects. // No need to use these aliases within your own projects.
webpack: config => { webpack: config => {
const newConfig = { return {
...config, ...config,
resolve: { resolve: {
...(config.resolve || {}), ...(config.resolve || {}),
alias: { alias: {
...(config.resolve.alias || {}), ...(config.resolve.alias || {}),
[path.resolve(__dirname, '../../src')]: path.resolve(__dirname, '../../src/admin.js'),
react: path.resolve(__dirname, '../node_modules/react'), react: path.resolve(__dirname, '../node_modules/react'),
}, },
}, },
} }
return newConfig
}, },
}, },
typescript: { typescript: {

View File

@@ -1,7 +1,7 @@
{ {
"name": "@payloadcms/plugin-cloud", "name": "@payloadcms/plugin-cloud",
"description": "The official Payload Cloud plugin", "description": "The official Payload Cloud plugin",
"version": "2.2.1", "version": "2.2.5",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"license": "MIT", "license": "MIT",
@@ -16,13 +16,8 @@
}, },
"peerDependencies": { "peerDependencies": {
"nodemailer": "^6.9.0", "nodemailer": "^6.9.0",
"payload": ">= 1.8.2" "payload": "^1.8.2 || ^2.0.0"
}, },
"files": [
"!.spec.*",
"!mocks",
"dist"
],
"dependencies": { "dependencies": {
"@aws-sdk/client-cognito-identity": "^3.289.0", "@aws-sdk/client-cognito-identity": "^3.289.0",
"@aws-sdk/client-s3": "^3.142.0", "@aws-sdk/client-s3": "^3.142.0",
@@ -53,5 +48,8 @@
"ts-jest": "^29.1.0", "ts-jest": "^29.1.0",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^5.0.4" "typescript": "^5.0.4"
} },
"files": [
"dist"
]
} }

1
src/admin.js Normal file
View File

@@ -0,0 +1 @@
export const payloadCloud = () => config => config

View File

@@ -15,15 +15,8 @@ export const extendWebpackConfig =
resolve: { resolve: {
...(existingWebpackConfig.resolve || {}), ...(existingWebpackConfig.resolve || {}),
alias: { alias: {
...(existingWebpackConfig.resolve?.alias ? existingWebpackConfig.resolve.alias : {}), ...(existingWebpackConfig.resolve?.alias || {}),
fs: path.resolve(__dirname, './mocks/fileStub.js'), '@payloadcms/plugin-cloud': path.resolve(__dirname, './admin.js'),
'@aws-sdk/client-s3': path.resolve(__dirname, './mocks/s3.js'),
'@aws-sdk/lib-storage': path.resolve(__dirname, './mocks/s3.js'),
[path.resolve(__dirname, './email')]: path.resolve(__dirname, './mocks/email.js'),
[path.resolve(__dirname, './utilities/getStorageClient')]: path.resolve(
__dirname,
'./mocks/storageClient.js',
),
}, },
}, },
} }