mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
chore: pack-up providers (#18320)
* chore: convert upload-local * chore: convert upload-cloudinary * chore: convert upload-aws-s3 * chore: convert email-sendmail * chore: convert email-sendgrid * chore: convert email-nodemailer * chore: convert email-mailgun * chore: convert email-amazon-ses * chore: convert audit-logs-local * chore(utils): fix eslint error
This commit is contained in:
parent
99d74cdc29
commit
5dcfae1dbc
@ -1,3 +1,4 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from '@strapi/pack-up';
|
||||
|
||||
export default defineConfig({
|
||||
|
||||
@ -28,19 +28,21 @@
|
||||
}
|
||||
],
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"./dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "run -T tsc",
|
||||
"build:ts": "run -T tsc",
|
||||
"watch": "run -T tsc -w --preserveWatchOutput",
|
||||
"build": "pack-up build",
|
||||
"clean": "run -T rimraf ./dist",
|
||||
"lint": "run -T eslint .",
|
||||
"prepublishOnly": "yarn clean && yarn build",
|
||||
"lint": "run -T eslint ."
|
||||
"watch": "pack-up watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@strapi/pack-up": "workspace:*",
|
||||
"@strapi/types": "4.14.3",
|
||||
"eslint-config-custom": "4.14.3",
|
||||
"tsconfig": "4.14.3"
|
||||
|
||||
6
packages/providers/audit-logs-local/packup.config.ts
Normal file
6
packages/providers/audit-logs-local/packup.config.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from '@strapi/pack-up';
|
||||
|
||||
export default defineConfig({
|
||||
runtime: 'node',
|
||||
});
|
||||
@ -12,7 +12,7 @@ interface Log extends Omit<Event, 'userId'> {
|
||||
user: string | number;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
async register({ strapi }: { strapi: Strapi }) {
|
||||
const contentTypes = strapi.container.get('content-types');
|
||||
if (!contentTypes.keys().includes('admin::audit-log')) {
|
||||
|
||||
8
packages/providers/audit-logs-local/tsconfig.build.json
Normal file
8
packages/providers/audit-logs-local/tsconfig.build.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/__tests__/**"]
|
||||
}
|
||||
@ -3,6 +3,6 @@
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "packup.config.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
{
|
||||
"extends": "tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "**/__tests__/**"]
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -29,23 +29,25 @@
|
||||
}
|
||||
],
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"./dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "run -T tsc",
|
||||
"build:ts": "run -T tsc",
|
||||
"watch": "run -T tsc -w --preserveWatchOutput",
|
||||
"build": "pack-up build",
|
||||
"clean": "run -T rimraf ./dist",
|
||||
"lint": "run -T eslint .",
|
||||
"prepublishOnly": "yarn clean && yarn build",
|
||||
"lint": "run -T eslint ."
|
||||
"watch": "pack-up watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/utils": "4.14.3",
|
||||
"node-ses": "^3.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@strapi/pack-up": "workspace:*",
|
||||
"eslint-config-custom": "4.14.3",
|
||||
"tsconfig": "4.14.3"
|
||||
},
|
||||
|
||||
6
packages/providers/email-amazon-ses/packup.config.ts
Normal file
6
packages/providers/email-amazon-ses/packup.config.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from '@strapi/pack-up';
|
||||
|
||||
export default defineConfig({
|
||||
runtime: 'node',
|
||||
});
|
||||
@ -23,7 +23,7 @@ interface ProviderOptions {
|
||||
amazon?: string;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
init(providerOptions: ProviderOptions, settings: Settings) {
|
||||
const client = nodeSES.createClient(providerOptions);
|
||||
|
||||
|
||||
8
packages/providers/email-amazon-ses/tsconfig.build.json
Normal file
8
packages/providers/email-amazon-ses/tsconfig.build.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/__tests__/**"]
|
||||
}
|
||||
@ -3,6 +3,6 @@
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "packup.config.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
{
|
||||
"extends": "tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "**/__tests__/**"]
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -29,19 +29,20 @@
|
||||
}
|
||||
],
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"./dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "run -T tsc",
|
||||
"build:ts": "run -T tsc",
|
||||
"watch": "run -T tsc -w --preserveWatchOutput",
|
||||
"build": "pack-up build",
|
||||
"clean": "run -T rimraf ./dist",
|
||||
"lint": "run -T eslint .",
|
||||
"prepublishOnly": "yarn clean && yarn build",
|
||||
"test:unit": "run -T jest",
|
||||
"test:unit:watch": "run -T jest --watch",
|
||||
"lint": "run -T eslint ."
|
||||
"watch": "pack-up watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/utils": "4.14.3",
|
||||
@ -49,6 +50,7 @@
|
||||
"mailgun.js": "8.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@strapi/pack-up": "workspace:*",
|
||||
"eslint-config-custom": "4.14.3",
|
||||
"tsconfig": "4.14.3"
|
||||
},
|
||||
|
||||
6
packages/providers/email-mailgun/packup.config.ts
Normal file
6
packages/providers/email-mailgun/packup.config.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from '@strapi/pack-up';
|
||||
|
||||
export default defineConfig({
|
||||
runtime: 'node',
|
||||
});
|
||||
@ -31,7 +31,7 @@ const optionsMap: Record<string, LegacyOptionMapper> = {
|
||||
host: { field: 'url', fn: (value) => `https://${value || 'api.mailgun.net'}` },
|
||||
};
|
||||
|
||||
export = {
|
||||
export default {
|
||||
convertProviderOptions(providerOptions: ProviderOptions): Record<string, unknown> {
|
||||
const newOptions: Record<string, unknown> = {};
|
||||
if (typeof providerOptions === 'object') {
|
||||
|
||||
8
packages/providers/email-mailgun/tsconfig.build.json
Normal file
8
packages/providers/email-mailgun/tsconfig.build.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/__tests__/**"]
|
||||
}
|
||||
@ -3,6 +3,6 @@
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "packup.config.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
{
|
||||
"extends": "tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "**/__tests__/**"]
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -42,23 +42,25 @@
|
||||
}
|
||||
],
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"./dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "run -T tsc",
|
||||
"build:ts": "run -T tsc",
|
||||
"watch": "run -T tsc -w --preserveWatchOutput",
|
||||
"build": "pack-up build",
|
||||
"clean": "run -T rimraf ./dist",
|
||||
"lint": "run -T eslint .",
|
||||
"prepublishOnly": "yarn clean && yarn build",
|
||||
"lint": "run -T eslint ."
|
||||
"watch": "pack-up watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": "4.17.21",
|
||||
"nodemailer": "6.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@strapi/pack-up": "workspace:*",
|
||||
"@types/nodemailer": "6.4.7",
|
||||
"eslint-config-custom": "4.14.3",
|
||||
"tsconfig": "4.14.3"
|
||||
|
||||
6
packages/providers/email-nodemailer/packup.config.ts
Normal file
6
packages/providers/email-nodemailer/packup.config.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from '@strapi/pack-up';
|
||||
|
||||
export default defineConfig({
|
||||
runtime: 'node',
|
||||
});
|
||||
@ -32,7 +32,7 @@ const emailFields = [
|
||||
'attachments',
|
||||
];
|
||||
|
||||
export = {
|
||||
export default {
|
||||
provider: 'nodemailer',
|
||||
name: 'Nodemailer',
|
||||
|
||||
|
||||
8
packages/providers/email-nodemailer/tsconfig.build.json
Normal file
8
packages/providers/email-nodemailer/tsconfig.build.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/__tests__/**"]
|
||||
}
|
||||
@ -3,6 +3,6 @@
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "packup.config.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
{
|
||||
"extends": "tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "**/__tests__/**"]
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -29,23 +29,25 @@
|
||||
}
|
||||
],
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"./dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "run -T tsc",
|
||||
"build:ts": "run -T tsc",
|
||||
"watch": "run -T tsc -w --preserveWatchOutput",
|
||||
"build": "pack-up build",
|
||||
"clean": "run -T rimraf ./dist",
|
||||
"lint": "run -T eslint .",
|
||||
"prepublishOnly": "yarn clean && yarn build",
|
||||
"lint": "run -T eslint ."
|
||||
"watch": "pack-up watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sendgrid/mail": "7.7.0",
|
||||
"@strapi/utils": "4.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@strapi/pack-up": "workspace:*",
|
||||
"eslint-config-custom": "4.14.3",
|
||||
"tsconfig": "4.14.3"
|
||||
},
|
||||
|
||||
6
packages/providers/email-sendgrid/packup.config.ts
Normal file
6
packages/providers/email-sendgrid/packup.config.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from '@strapi/pack-up';
|
||||
|
||||
export default defineConfig({
|
||||
runtime: 'node',
|
||||
});
|
||||
@ -21,7 +21,7 @@ interface ProviderOptions {
|
||||
apiKey: string;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
init(providerOptions: ProviderOptions, settings: Settings) {
|
||||
sendgrid.setApiKey(providerOptions.apiKey);
|
||||
|
||||
|
||||
8
packages/providers/email-sendgrid/tsconfig.build.json
Normal file
8
packages/providers/email-sendgrid/tsconfig.build.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/__tests__/**"]
|
||||
}
|
||||
@ -3,6 +3,6 @@
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "packup.config.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
{
|
||||
"extends": "tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "**/__tests__/**"]
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -28,23 +28,25 @@
|
||||
}
|
||||
],
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"./dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "run -T tsc",
|
||||
"build:ts": "run -T tsc",
|
||||
"watch": "run -T tsc -w --preserveWatchOutput",
|
||||
"build": "pack-up build",
|
||||
"clean": "run -T rimraf ./dist",
|
||||
"lint": "run -T eslint .",
|
||||
"prepublishOnly": "yarn clean && yarn build",
|
||||
"lint": "run -T eslint ."
|
||||
"watch": "pack-up watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/utils": "4.14.3",
|
||||
"sendmail": "^1.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@strapi/pack-up": "workspace:*",
|
||||
"@types/sendmail": "1.4.4",
|
||||
"eslint-config-custom": "4.14.3",
|
||||
"tsconfig": "4.14.3"
|
||||
|
||||
6
packages/providers/email-sendmail/packup.config.ts
Normal file
6
packages/providers/email-sendmail/packup.config.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from '@strapi/pack-up';
|
||||
|
||||
export default defineConfig({
|
||||
runtime: 'node',
|
||||
});
|
||||
@ -19,7 +19,7 @@ interface SendOptions {
|
||||
|
||||
type ProviderOptions = Options;
|
||||
|
||||
export = {
|
||||
export default {
|
||||
init(providerOptions: ProviderOptions, settings: Settings) {
|
||||
const sendmail = sendmailFactory({
|
||||
silent: true,
|
||||
|
||||
8
packages/providers/email-sendmail/tsconfig.build.json
Normal file
8
packages/providers/email-sendmail/tsconfig.build.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/__tests__/**"]
|
||||
}
|
||||
@ -3,6 +3,6 @@
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "packup.config.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
{
|
||||
"extends": "tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "**/__tests__/**"]
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -30,25 +30,27 @@
|
||||
}
|
||||
],
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"./dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "run -T tsc",
|
||||
"build:ts": "run -T tsc",
|
||||
"watch": "run -T tsc -w --preserveWatchOutput",
|
||||
"build": "pack-up build",
|
||||
"clean": "run -T rimraf ./dist",
|
||||
"lint": "run -T eslint .",
|
||||
"prepublishOnly": "yarn clean && yarn build",
|
||||
"test:unit": "run -T jest",
|
||||
"test:unit:watch": "run -T jest --watch",
|
||||
"lint": "run -T eslint ."
|
||||
"watch": "pack-up watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"aws-sdk": "2.1437.0",
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@strapi/pack-up": "workspace:*",
|
||||
"@types/jest": "29.5.2",
|
||||
"eslint-config-custom": "4.14.3",
|
||||
"tsconfig": "4.14.3"
|
||||
|
||||
6
packages/providers/upload-aws-s3/packup.config.ts
Normal file
6
packages/providers/upload-aws-s3/packup.config.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from '@strapi/pack-up';
|
||||
|
||||
export default defineConfig({
|
||||
runtime: 'node',
|
||||
});
|
||||
@ -44,7 +44,7 @@ interface InitOptions extends Partial<AWS.S3.ClientConfiguration> {
|
||||
};
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
init({ baseUrl, rootPath, s3Options, ...legacyS3Options }: InitOptions) {
|
||||
if (Object.keys(legacyS3Options).length > 0) {
|
||||
process.emitWarning(
|
||||
|
||||
8
packages/providers/upload-aws-s3/tsconfig.build.json
Normal file
8
packages/providers/upload-aws-s3/tsconfig.build.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/__tests__/**"]
|
||||
}
|
||||
@ -3,6 +3,6 @@
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "packup.config.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
{
|
||||
"extends": "tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "**/__tests__/**"]
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -29,17 +29,18 @@
|
||||
}
|
||||
],
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"./dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "run -T tsc",
|
||||
"build:ts": "run -T tsc",
|
||||
"watch": "run -T tsc -w --preserveWatchOutput",
|
||||
"build": "pack-up build",
|
||||
"clean": "run -T rimraf ./dist",
|
||||
"lint": "run -T eslint .",
|
||||
"prepublishOnly": "yarn clean && yarn build",
|
||||
"lint": "run -T eslint ."
|
||||
"watch": "pack-up watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/utils": "4.14.3",
|
||||
@ -47,6 +48,7 @@
|
||||
"into-stream": "^5.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@strapi/pack-up": "workspace:*",
|
||||
"eslint-config-custom": "4.14.3",
|
||||
"tsconfig": "4.14.3"
|
||||
},
|
||||
|
||||
6
packages/providers/upload-cloudinary/packup.config.ts
Normal file
6
packages/providers/upload-cloudinary/packup.config.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from '@strapi/pack-up';
|
||||
|
||||
export default defineConfig({
|
||||
runtime: 'node',
|
||||
});
|
||||
@ -23,7 +23,7 @@ interface File {
|
||||
buffer?: Buffer;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
init(options: ConfigOptions) {
|
||||
cloudinary.config(options);
|
||||
|
||||
|
||||
8
packages/providers/upload-cloudinary/tsconfig.build.json
Normal file
8
packages/providers/upload-cloudinary/tsconfig.build.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/__tests__/**"]
|
||||
}
|
||||
@ -3,6 +3,6 @@
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "packup.config.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -28,25 +28,27 @@
|
||||
}
|
||||
],
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"./dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "run -T tsc",
|
||||
"build:ts": "run -T tsc",
|
||||
"watch": "run -T tsc -w --preserveWatchOutput",
|
||||
"build": "pack-up build",
|
||||
"clean": "run -T rimraf ./dist",
|
||||
"lint": "run -T eslint .",
|
||||
"prepublishOnly": "yarn clean && yarn build",
|
||||
"test:unit": "run -T jest",
|
||||
"test:unit:watch": "run -T jest --watch",
|
||||
"lint": "run -T eslint ."
|
||||
"watch": "pack-up watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/utils": "4.14.3",
|
||||
"fs-extra": "10.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@strapi/pack-up": "workspace:*",
|
||||
"@types/jest": "29.5.2",
|
||||
"eslint-config-custom": "4.14.3",
|
||||
"tsconfig": "4.14.3"
|
||||
|
||||
7
packages/providers/upload-local/packup.config.ts
Normal file
7
packages/providers/upload-local/packup.config.ts
Normal file
@ -0,0 +1,7 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from '@strapi/pack-up';
|
||||
|
||||
export default defineConfig({
|
||||
externals: ['stream', 'fs', 'path'],
|
||||
runtime: 'node',
|
||||
});
|
||||
@ -37,7 +37,7 @@ interface CheckFileSizeOptions {
|
||||
sizeLimit?: number;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
init({ sizeLimit: providerOptionsSizeLimit }: InitOptions = {}) {
|
||||
// TODO V5: remove providerOptions sizeLimit
|
||||
if (providerOptionsSizeLimit) {
|
||||
|
||||
8
packages/providers/upload-local/tsconfig.build.json
Normal file
8
packages/providers/upload-local/tsconfig.build.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/__tests__/**"]
|
||||
}
|
||||
@ -3,6 +3,6 @@
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "packup.config.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
{
|
||||
"extends": "tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "**/__tests__/**"]
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@ -8150,6 +8150,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@strapi/provider-audit-logs-local@workspace:packages/providers/audit-logs-local"
|
||||
dependencies:
|
||||
"@strapi/pack-up": "workspace:*"
|
||||
"@strapi/types": 4.14.3
|
||||
eslint-config-custom: 4.14.3
|
||||
tsconfig: 4.14.3
|
||||
@ -8160,6 +8161,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@strapi/provider-email-amazon-ses@workspace:packages/providers/email-amazon-ses"
|
||||
dependencies:
|
||||
"@strapi/pack-up": "workspace:*"
|
||||
"@strapi/utils": 4.14.3
|
||||
eslint-config-custom: 4.14.3
|
||||
node-ses: ^3.0.3
|
||||
@ -8171,6 +8173,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@strapi/provider-email-mailgun@workspace:packages/providers/email-mailgun"
|
||||
dependencies:
|
||||
"@strapi/pack-up": "workspace:*"
|
||||
"@strapi/utils": 4.14.3
|
||||
eslint-config-custom: 4.14.3
|
||||
form-data: ^4.0.0
|
||||
@ -8183,6 +8186,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@strapi/provider-email-nodemailer@workspace:packages/providers/email-nodemailer"
|
||||
dependencies:
|
||||
"@strapi/pack-up": "workspace:*"
|
||||
"@types/nodemailer": 6.4.7
|
||||
eslint-config-custom: 4.14.3
|
||||
lodash: 4.17.21
|
||||
@ -8196,6 +8200,7 @@ __metadata:
|
||||
resolution: "@strapi/provider-email-sendgrid@workspace:packages/providers/email-sendgrid"
|
||||
dependencies:
|
||||
"@sendgrid/mail": 7.7.0
|
||||
"@strapi/pack-up": "workspace:*"
|
||||
"@strapi/utils": 4.14.3
|
||||
eslint-config-custom: 4.14.3
|
||||
tsconfig: 4.14.3
|
||||
@ -8206,6 +8211,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@strapi/provider-email-sendmail@workspace:packages/providers/email-sendmail"
|
||||
dependencies:
|
||||
"@strapi/pack-up": "workspace:*"
|
||||
"@strapi/utils": 4.14.3
|
||||
"@types/sendmail": 1.4.4
|
||||
eslint-config-custom: 4.14.3
|
||||
@ -8218,6 +8224,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@strapi/provider-upload-aws-s3@workspace:packages/providers/upload-aws-s3"
|
||||
dependencies:
|
||||
"@strapi/pack-up": "workspace:*"
|
||||
"@types/jest": 29.5.2
|
||||
aws-sdk: 2.1437.0
|
||||
eslint-config-custom: 4.14.3
|
||||
@ -8230,6 +8237,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@strapi/provider-upload-cloudinary@workspace:packages/providers/upload-cloudinary"
|
||||
dependencies:
|
||||
"@strapi/pack-up": "workspace:*"
|
||||
"@strapi/utils": 4.14.3
|
||||
cloudinary: ^1.41.0
|
||||
eslint-config-custom: 4.14.3
|
||||
@ -8242,6 +8250,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@strapi/provider-upload-local@workspace:packages/providers/upload-local"
|
||||
dependencies:
|
||||
"@strapi/pack-up": "workspace:*"
|
||||
"@strapi/utils": 4.14.3
|
||||
"@types/jest": 29.5.2
|
||||
eslint-config-custom: 4.14.3
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user