@payloadcms/plugin-redirects 3.0.0-beta.23 → 3.0.0-beta.24

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/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { Config } from 'payload/config';
2
2
  import type { PluginConfig } from './types.js';
3
- declare const redirects: (pluginConfig: PluginConfig) => (incomingConfig: Config) => Config;
4
- export { redirects };
3
+ export declare const redirectsPlugin: (pluginConfig: PluginConfig) => (incomingConfig: Config) => Config;
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -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,YAAY,EAAE,MAAM,YAAY,CAAA;AAI9C,QAAA,MAAM,SAAS,iBACE,YAAY,sBACV,MAAM,KAAG,MAuExB,CAAA;AAEJ,OAAO,EAAE,SAAS,EAAE,CAAA"}
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,YAAY,EAAE,MAAM,YAAY,CAAA;AAI9C,eAAO,MAAM,eAAe,iBACX,YAAY,sBACV,MAAM,KAAG,MAuExB,CAAA"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import deepMerge from './deepMerge.js';
2
- const redirects = (pluginConfig)=>(incomingConfig)=>({
2
+ export const redirectsPlugin = (pluginConfig)=>(incomingConfig)=>({
3
3
  ...incomingConfig,
4
4
  collections: [
5
5
  ...incomingConfig?.collections || [],
@@ -72,6 +72,5 @@ const redirects = (pluginConfig)=>(incomingConfig)=>({
72
72
  }, pluginConfig?.overrides || {})
73
73
  ]
74
74
  });
75
- export { redirects };
76
75
 
77
76
  //# sourceMappingURL=index.js.map
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 { PluginConfig } from './types.js'\n\nimport deepMerge from './deepMerge.js'\n\nconst redirects =\n (pluginConfig: PluginConfig) =>\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\nexport { redirects }\n"],"names":["deepMerge","redirects","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,MAAMC,YACJ,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;AAEF,SAASvB,SAAS,GAAE"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { Config } from 'payload/config'\n\nimport type { PluginConfig } from './types.js'\n\nimport deepMerge from './deepMerge.js'\n\nexport const redirectsPlugin =\n (pluginConfig: PluginConfig) =>\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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/plugin-redirects",
3
- "version": "3.0.0-beta.23",
3
+ "version": "3.0.0-beta.24",
4
4
  "description": "Redirects plugin for Payload",
5
5
  "keywords": [
6
6
  "payload",
@@ -37,10 +37,10 @@
37
37
  "@types/express": "^4.17.9",
38
38
  "@types/react": "18.2.74",
39
39
  "@payloadcms/eslint-config": "1.1.1",
40
- "payload": "3.0.0-beta.23"
40
+ "payload": "3.0.0-beta.24"
41
41
  },
42
42
  "peerDependencies": {
43
- "payload": "3.0.0-beta.23"
43
+ "payload": "3.0.0-beta.24"
44
44
  },
45
45
  "homepage:": "https://payloadcms.com",
46
46
  "scripts": {