@payloadcms/plugin-seo 1.0.9 → 1.0.10

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/README.md CHANGED
@@ -130,7 +130,7 @@ import {
130
130
  GenerateTitle,
131
131
  GenerateDescription
132
132
  GenerateURL
133
- } from '@payloadcms/plugin-seo/dist/types';
133
+ } from '@payloadcms/plugin-seo/types';
134
134
  ```
135
135
 
136
136
  ## Development
package/dist/types.d.ts CHANGED
@@ -1,26 +1,30 @@
1
- import { Field } from "payload/dist/fields/config/types";
1
+ import { Field } from 'payload/dist/fields/config/types';
2
+ export type GenerateTitle = <T = any>(args: {
3
+ doc: T;
4
+ locale?: string;
5
+ }) => string | Promise<string>;
6
+ export type GenerateDescription = <T = any>(args: {
7
+ doc: T;
8
+ locale?: string;
9
+ }) => string | Promise<string>;
10
+ export type GenerateImage = <T = any>(args: {
11
+ doc: T;
12
+ locale?: string;
13
+ }) => string | Promise<string>;
14
+ export type GenerateURL = <T = any>(args: {
15
+ doc: T;
16
+ locale?: string;
17
+ }) => string | Promise<string>;
2
18
  export type PluginConfig = {
3
19
  collections?: string[];
4
20
  globals?: string[];
5
21
  uploadsCollection?: string;
6
22
  fields?: Partial<Field>[];
7
23
  tabbedUI?: boolean;
8
- generateTitle?: <T = any>(args: {
9
- doc: T;
10
- locale?: string;
11
- }) => string | Promise<string>;
12
- generateDescription?: <T = any>(args: {
13
- doc: T;
14
- locale?: string;
15
- }) => string | Promise<string>;
16
- generateImage?: <T = any>(args: {
17
- doc: T;
18
- locale?: string;
19
- }) => string | Promise<string>;
20
- generateURL?: <T = any>(args: {
21
- doc: T;
22
- locale?: string;
23
- }) => string | Promise<string>;
24
+ generateTitle?: GenerateTitle;
25
+ generateDescription?: GenerateDescription;
26
+ generateImage?: GenerateImage;
27
+ generateURL?: GenerateURL;
24
28
  };
25
29
  export type Meta = {
26
30
  title?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/plugin-seo",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "homepage:": "https://payloadcms.com",
5
5
  "repository": "git@github.com:payloadcms/plugin-seo.git",
6
6
  "description": "SEO plugin for Payload CMS",
@@ -31,6 +31,8 @@
31
31
  "typescript": "^4.5.5"
32
32
  },
33
33
  "files": [
34
- "dist"
34
+ "dist",
35
+ "types.js",
36
+ "types.d.ts"
35
37
  ]
36
38
  }
package/types.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/types';
package/types.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/types');