@payloadcms/plugin-redirects 3.0.0-beta.24 → 3.0.0-beta.25
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/dist/exports/types.d.ts +2 -0
- package/dist/exports/types.d.ts.map +1 -0
- package/dist/exports/types.js +3 -0
- package/dist/exports/types.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +16 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/exports/types.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/exports/types.ts"],"sourcesContent":["export type { RedirectsPluginConfig } from '../types.js'\n"],"names":[],"rangeMappings":"","mappings":"AAAA,WAAwD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Config } from 'payload/config';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const redirectsPlugin: (pluginConfig:
|
|
2
|
+
import type { RedirectsPluginConfig } from './types.js';
|
|
3
|
+
export declare const redirectsPlugin: (pluginConfig: RedirectsPluginConfig) => (incomingConfig: Config) => Config;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAE5C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAE5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAIvD,eAAO,MAAM,eAAe,iBACX,qBAAqB,sBACnB,MAAM,KAAG,MAuExB,CAAA"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { Config } from 'payload/config'\n\nimport type {
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { Config } from 'payload/config'\n\nimport type { RedirectsPluginConfig } from './types.js'\n\nimport deepMerge from './deepMerge.js'\n\nexport const redirectsPlugin =\n (pluginConfig: RedirectsPluginConfig) =>\n (incomingConfig: Config): Config => ({\n ...incomingConfig,\n collections: [\n ...(incomingConfig?.collections || []),\n deepMerge(\n {\n slug: 'redirects',\n access: {\n read: (): boolean => true,\n },\n admin: {\n defaultColumns: ['from', 'to.type', 'createdAt'],\n },\n fields: [\n {\n name: 'from',\n type: 'text',\n index: true,\n label: 'From URL',\n required: true,\n },\n {\n name: 'to',\n type: 'group',\n fields: [\n {\n name: 'type',\n type: 'radio',\n admin: {\n layout: 'horizontal',\n },\n defaultValue: 'reference',\n label: 'To URL Type',\n options: [\n {\n label: 'Internal link',\n value: 'reference',\n },\n {\n label: 'Custom URL',\n value: 'custom',\n },\n ],\n },\n {\n name: 'reference',\n type: 'relationship',\n admin: {\n condition: (_, siblingData) => siblingData?.type === 'reference',\n },\n label: 'Document to redirect to',\n relationTo: pluginConfig?.collections || [],\n required: true,\n },\n {\n name: 'url',\n type: 'text',\n admin: {\n condition: (_, siblingData) => siblingData?.type === 'custom',\n },\n label: 'Custom URL',\n required: true,\n },\n ],\n label: false,\n },\n ],\n },\n pluginConfig?.overrides || {},\n ),\n ],\n })\n"],"names":["deepMerge","redirectsPlugin","pluginConfig","incomingConfig","collections","slug","access","read","admin","defaultColumns","fields","name","type","index","label","required","layout","defaultValue","options","value","condition","_","siblingData","relationTo","overrides"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,OAAOA,eAAe,iBAAgB;AAEtC,OAAO,MAAMC,kBACX,CAACC,eACD,CAACC,iBAAoC,CAAA;YACnC,GAAGA,cAAc;YACjBC,aAAa;mBACPD,gBAAgBC,eAAe,EAAE;gBACrCJ,UACE;oBACEK,MAAM;oBACNC,QAAQ;wBACNC,MAAM,IAAe;oBACvB;oBACAC,OAAO;wBACLC,gBAAgB;4BAAC;4BAAQ;4BAAW;yBAAY;oBAClD;oBACAC,QAAQ;wBACN;4BACEC,MAAM;4BACNC,MAAM;4BACNC,OAAO;4BACPC,OAAO;4BACPC,UAAU;wBACZ;wBACA;4BACEJ,MAAM;4BACNC,MAAM;4BACNF,QAAQ;gCACN;oCACEC,MAAM;oCACNC,MAAM;oCACNJ,OAAO;wCACLQ,QAAQ;oCACV;oCACAC,cAAc;oCACdH,OAAO;oCACPI,SAAS;wCACP;4CACEJ,OAAO;4CACPK,OAAO;wCACT;wCACA;4CACEL,OAAO;4CACPK,OAAO;wCACT;qCACD;gCACH;gCACA;oCACER,MAAM;oCACNC,MAAM;oCACNJ,OAAO;wCACLY,WAAW,CAACC,GAAGC,cAAgBA,aAAaV,SAAS;oCACvD;oCACAE,OAAO;oCACPS,YAAYrB,cAAcE,eAAe,EAAE;oCAC3CW,UAAU;gCACZ;gCACA;oCACEJ,MAAM;oCACNC,MAAM;oCACNJ,OAAO;wCACLY,WAAW,CAACC,GAAGC,cAAgBA,aAAaV,SAAS;oCACvD;oCACAE,OAAO;oCACPC,UAAU;gCACZ;6BACD;4BACDD,OAAO;wBACT;qBACD;gBACH,GACAZ,cAAcsB,aAAa,CAAC;aAE/B;QACH,CAAA,EAAE"}
|
package/dist/types.d.ts
CHANGED
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAErD,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAErD,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;CACtC,CAAA"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { CollectionConfig } from 'payload/types'\n\nexport
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { CollectionConfig } from 'payload/types'\n\nexport type RedirectsPluginConfig = {\n collections?: string[]\n overrides?: Partial<CollectionConfig>\n}\n"],"names":[],"rangeMappings":"","mappings":"AAEA,WAGC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/plugin-redirects",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.25",
|
|
4
4
|
"description": "Redirects plugin for Payload",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"payload",
|
|
@@ -17,13 +17,18 @@
|
|
|
17
17
|
"directory": "packages/plugin-redirects"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
|
-
"author": "dev@payloadcms.com",
|
|
20
|
+
"author": "Payload <dev@payloadcms.com> (https://payloadcms.com)",
|
|
21
21
|
"type": "module",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
24
|
"import": "./dist/index.js",
|
|
25
25
|
"require": "./dist/index.js",
|
|
26
26
|
"types": "./dist/index.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"./*": {
|
|
29
|
+
"import": "./dist/exports/*.js",
|
|
30
|
+
"require": "./dist/exports/*.js",
|
|
31
|
+
"types": "./dist/exports/*.d.ts"
|
|
27
32
|
}
|
|
28
33
|
},
|
|
29
34
|
"main": "./dist/index.js",
|
|
@@ -37,10 +42,17 @@
|
|
|
37
42
|
"@types/express": "^4.17.9",
|
|
38
43
|
"@types/react": "18.2.74",
|
|
39
44
|
"@payloadcms/eslint-config": "1.1.1",
|
|
40
|
-
"payload": "3.0.0-beta.
|
|
45
|
+
"payload": "3.0.0-beta.25"
|
|
41
46
|
},
|
|
42
47
|
"peerDependencies": {
|
|
43
|
-
"payload": "3.0.0-beta.
|
|
48
|
+
"payload": "3.0.0-beta.25"
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"./*": {
|
|
52
|
+
"import": "./dist/exports/*.js",
|
|
53
|
+
"require": "./dist/exports/*.js",
|
|
54
|
+
"types": "./dist/exports/*.d.ts"
|
|
55
|
+
}
|
|
44
56
|
},
|
|
45
57
|
"homepage:": "https://payloadcms.com",
|
|
46
58
|
"scripts": {
|