@ainsleydev/payload-helper 0.0.22 → 0.0.23

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.
@@ -1,5 +1,6 @@
1
1
  import { lexicalEditor } from '@payloadcms/richtext-lexical';
2
2
  import * as mime from 'mime-types';
3
+ import env from '../util/env.js';
3
4
  /**
4
5
  * Media Collection Configuration
5
6
  * Additional fields will be appended to the media collection.
@@ -32,6 +33,7 @@ import * as mime from 'mime-types';
32
33
  upload: {
33
34
  staticDir: 'media',
34
35
  adminThumbnail: 'thumbnail',
36
+ disableLocalStorage: env.isProduction,
35
37
  handlers: [
36
38
  async (req, args)=>{
37
39
  const logger = req.payload.logger;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/Media.ts"],"sourcesContent":["import { lexicalEditor } from '@payloadcms/richtext-lexical';\nimport * as mime from 'mime-types';\nimport type { CollectionConfig, Field, PayloadRequest } from 'payload';\n\n/**\n * Media Collection Configuration\n * Additional fields will be appended to the media collection.\n */\nexport const Media = (additionalFields?: Field[]): CollectionConfig => {\n\treturn {\n\t\tslug: 'media',\n\t\taccess: {\n\t\t\tread: () => true,\n\t\t},\n\t\tfields: [\n\t\t\t{\n\t\t\t\tname: 'alt',\n\t\t\t\ttype: 'text',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'caption',\n\t\t\t\ttype: 'richText',\n\t\t\t\trequired: false,\n\t\t\t\teditor: lexicalEditor({\n\t\t\t\t\tfeatures: ({ defaultFeatures }) => {\n\t\t\t\t\t\treturn defaultFeatures.filter((feature) => {\n\t\t\t\t\t\t\treturn feature.key === 'paragraph' || feature.key === 'link';\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t},\n\t\t\t...(additionalFields ? additionalFields : []),\n\t\t],\n\t\tupload: {\n\t\t\tstaticDir: 'media',\n\t\t\tadminThumbnail: 'thumbnail',\n\t\t\thandlers: [\n\t\t\t\tasync (req: PayloadRequest, args) => {\n\t\t\t\t\tconst logger = req.payload.logger;\n\t\t\t\t\tconst { params } = args;\n\t\t\t\t\tconst { collection, filename } = params;\n\n\t\t\t\t\tif (collection !== 'media') {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst contentType = mime.lookup(filename);\n\t\t\t\t\tif (!contentType) {\n\t\t\t\t\t\tlogger.error(`Unable to find mime type for file: ${filename}`);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst headers = new Headers();\n\t\t\t\t\theaders.set('Content-Type', contentType);\n\t\t\t\t\theaders.set('Cache-Control', 'public, max-age=31536000');\n\n\t\t\t\t\treq.responseHeaders = headers;\n\t\t\t\t},\n\t\t\t],\n\t\t\timageSizes: [\n\t\t\t\t// Original Size (for WebP & Avif)\n\t\t\t\t{\n\t\t\t\t\tname: 'webp',\n\t\t\t\t\twidth: undefined,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'webp',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 80,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'avif',\n\t\t\t\t\twidth: undefined,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'avif',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 60,\n\t\t\t\t\t\t\teffort: 1,\n\t\t\t\t\t\t\tchromaSubsampling: '4:4:4',\n\t\t\t\t\t\t\tbitdepth: 8,\n\t\t\t\t\t\t\tlossless: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t// Thumbnail Sizes\n\t\t\t\t{\n\t\t\t\t\tname: 'thumbnail',\n\t\t\t\t\twidth: 200,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tposition: 'centre',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'thumbnail_webp',\n\t\t\t\t\twidth: 200,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tposition: 'centre',\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'webp',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 80,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'thumbnail_avif',\n\t\t\t\t\twidth: 200,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tposition: 'centre',\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'avif',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 60,\n\t\t\t\t\t\t\teffort: 1,\n\t\t\t\t\t\t\tchromaSubsampling: '4:4:4',\n\t\t\t\t\t\t\tbitdepth: 8,\n\t\t\t\t\t\t\tlossless: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t// Mobile Sizes\n\t\t\t\t{\n\t\t\t\t\tname: 'mobile',\n\t\t\t\t\twidth: 500,\n\t\t\t\t\theight: undefined,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'mobile_webp',\n\t\t\t\t\twidth: 500,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'webp',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 80,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'mobile_avif',\n\t\t\t\t\twidth: 500,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'avif',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 60,\n\t\t\t\t\t\t\teffort: 1,\n\t\t\t\t\t\t\tchromaSubsampling: '4:4:4',\n\t\t\t\t\t\t\tbitdepth: 8,\n\t\t\t\t\t\t\tlossless: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t// Tablet Sizes\n\t\t\t\t{\n\t\t\t\t\tname: 'tablet',\n\t\t\t\t\twidth: 800,\n\t\t\t\t\theight: undefined,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'tablet_webp',\n\t\t\t\t\twidth: 800,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'webp',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 80,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'tablet_avif',\n\t\t\t\t\twidth: 800,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'avif',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 60,\n\t\t\t\t\t\t\teffort: 1,\n\t\t\t\t\t\t\tchromaSubsampling: '4:4:4',\n\t\t\t\t\t\t\tbitdepth: 8,\n\t\t\t\t\t\t\tlossless: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t// Desktop Sizes\n\t\t\t\t// {\n\t\t\t\t// \tname: 'desktop',\n\t\t\t\t// \twidth: 1200,\n\t\t\t\t// \theight: undefined,\n\t\t\t\t// },\n\t\t\t\t// {\n\t\t\t\t// \tname: 'desktop_webp',\n\t\t\t\t// \twidth: 1200,\n\t\t\t\t// \theight: undefined,\n\t\t\t\t// \tformatOptions: {\n\t\t\t\t// \t\tformat: 'webp',\n\t\t\t\t// \t\toptions: {\n\t\t\t\t// \t\t\tquality: 80,\n\t\t\t\t// \t\t},\n\t\t\t\t// \t},\n\t\t\t\t// },\n\t\t\t\t// {\n\t\t\t\t// \tname: 'desktop_avif',\n\t\t\t\t// \twidth: 1200,\n\t\t\t\t// \theight: undefined,\n\t\t\t\t// \tformatOptions: {\n\t\t\t\t// \t\tformat: 'avif',\n\t\t\t\t// \t\toptions: {\n\t\t\t\t// \t\t\tquality: 80,\n\t\t\t\t// \t\t},\n\t\t\t\t// \t},\n\t\t\t\t// },\n\t\t\t],\n\t\t},\n\t};\n};\n"],"names":["lexicalEditor","mime","Media","additionalFields","slug","access","read","fields","name","type","required","editor","features","defaultFeatures","filter","feature","key","upload","staticDir","adminThumbnail","handlers","req","args","logger","payload","params","collection","filename","contentType","lookup","error","headers","Headers","set","responseHeaders","imageSizes","width","undefined","height","formatOptions","format","options","quality","effort","chromaSubsampling","bitdepth","lossless","position"],"mappings":"AAAA,SAASA,aAAa,QAAQ,+BAA+B;AAC7D,YAAYC,UAAU,aAAa;AAGnC;;;CAGC,GACD,OAAO,MAAMC,QAAQ,CAACC;IACrB,OAAO;QACNC,MAAM;QACNC,QAAQ;YACPC,MAAM,IAAM;QACb;QACAC,QAAQ;YACP;gBACCC,MAAM;gBACNC,MAAM;gBACNC,UAAU;YACX;YACA;gBACCF,MAAM;gBACNC,MAAM;gBACNC,UAAU;gBACVC,QAAQX,cAAc;oBACrBY,UAAU,CAAC,EAAEC,eAAe,EAAE;wBAC7B,OAAOA,gBAAgBC,MAAM,CAAC,CAACC;4BAC9B,OAAOA,QAAQC,GAAG,KAAK,eAAeD,QAAQC,GAAG,KAAK;wBACvD;oBACD;gBACD;YACD;eACIb,mBAAmBA,mBAAmB,EAAE;SAC5C;QACDc,QAAQ;YACPC,WAAW;YACXC,gBAAgB;YAChBC,UAAU;gBACT,OAAOC,KAAqBC;oBAC3B,MAAMC,SAASF,IAAIG,OAAO,CAACD,MAAM;oBACjC,MAAM,EAAEE,MAAM,EAAE,GAAGH;oBACnB,MAAM,EAAEI,UAAU,EAAEC,QAAQ,EAAE,GAAGF;oBAEjC,IAAIC,eAAe,SAAS;wBAC3B;oBACD;oBAEA,MAAME,cAAc3B,KAAK4B,MAAM,CAACF;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AAe;wBACdC,QAAQ;wBACRC,SAAS;4BACRC,SAAS;4BACTC,QAAQ;4BACRC,mBAAmB;4BACnBC,UAAU;4BACVC,UAAU;wBACX;oBACD;gBACD;gBACA,eAAe;gBACf;oBACCtC,MAAM;oBACN4B,OAAO;oBACPE,QAAQD;gBACT;gBACA;oBACC7B,MAAM;oBACN4B,OAAO;oBACPE,QAAQD;oBACRE,eAAe;wBACdC,QAAQ;wBACRC,SAAS;4BACRC,SAAS;wBACV;oBACD;gBACD;gBACA;oBACClC,MAAM;oBACN4B,OAAO;oBACPE,QAAQD;oBACRE,eAAe;wBACdC,QAAQ;wBACRC,SAAS;4BACRC,SAAS;4BACTC,QAAQ;4BACRC,mBAAmB;4BACnBC,UAAU;4BACVC,UAAU;wBACX;oBACD;gBACD;aA6BA;QACF;IACD;AACD,EAAE"}
1
+ {"version":3,"sources":["../../src/collections/Media.ts"],"sourcesContent":["import { lexicalEditor } from '@payloadcms/richtext-lexical';\nimport * as mime from 'mime-types';\nimport type { CollectionConfig, Field, PayloadRequest } from 'payload';\nimport env from '../util/env.js';\n\n/**\n * Media Collection Configuration\n * Additional fields will be appended to the media collection.\n */\nexport const Media = (additionalFields?: Field[]): CollectionConfig => {\n\treturn {\n\t\tslug: 'media',\n\t\taccess: {\n\t\t\tread: () => true,\n\t\t},\n\t\tfields: [\n\t\t\t{\n\t\t\t\tname: 'alt',\n\t\t\t\ttype: 'text',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'caption',\n\t\t\t\ttype: 'richText',\n\t\t\t\trequired: false,\n\t\t\t\teditor: lexicalEditor({\n\t\t\t\t\tfeatures: ({ defaultFeatures }) => {\n\t\t\t\t\t\treturn defaultFeatures.filter((feature) => {\n\t\t\t\t\t\t\treturn feature.key === 'paragraph' || feature.key === 'link';\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t},\n\t\t\t...(additionalFields ? additionalFields : []),\n\t\t],\n\t\tupload: {\n\t\t\tstaticDir: 'media',\n\t\t\tadminThumbnail: 'thumbnail',\n\t\t\tdisableLocalStorage: env.isProduction,\n\t\t\thandlers: [\n\t\t\t\tasync (req: PayloadRequest, args) => {\n\t\t\t\t\tconst logger = req.payload.logger;\n\t\t\t\t\tconst { params } = args;\n\t\t\t\t\tconst { collection, filename } = params;\n\n\t\t\t\t\tif (collection !== 'media') {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst contentType = mime.lookup(filename);\n\t\t\t\t\tif (!contentType) {\n\t\t\t\t\t\tlogger.error(`Unable to find mime type for file: ${filename}`);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst headers = new Headers();\n\t\t\t\t\theaders.set('Content-Type', contentType);\n\t\t\t\t\theaders.set('Cache-Control', 'public, max-age=31536000');\n\n\t\t\t\t\treq.responseHeaders = headers;\n\t\t\t\t},\n\t\t\t],\n\t\t\timageSizes: [\n\t\t\t\t// Original Size (for WebP & Avif)\n\t\t\t\t{\n\t\t\t\t\tname: 'webp',\n\t\t\t\t\twidth: undefined,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'webp',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 80,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'avif',\n\t\t\t\t\twidth: undefined,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'avif',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 60,\n\t\t\t\t\t\t\teffort: 1,\n\t\t\t\t\t\t\tchromaSubsampling: '4:4:4',\n\t\t\t\t\t\t\tbitdepth: 8,\n\t\t\t\t\t\t\tlossless: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t// Thumbnail Sizes\n\t\t\t\t{\n\t\t\t\t\tname: 'thumbnail',\n\t\t\t\t\twidth: 200,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tposition: 'centre',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'thumbnail_webp',\n\t\t\t\t\twidth: 200,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tposition: 'centre',\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'webp',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 80,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'thumbnail_avif',\n\t\t\t\t\twidth: 200,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tposition: 'centre',\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'avif',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 60,\n\t\t\t\t\t\t\teffort: 1,\n\t\t\t\t\t\t\tchromaSubsampling: '4:4:4',\n\t\t\t\t\t\t\tbitdepth: 8,\n\t\t\t\t\t\t\tlossless: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t// Mobile Sizes\n\t\t\t\t{\n\t\t\t\t\tname: 'mobile',\n\t\t\t\t\twidth: 500,\n\t\t\t\t\theight: undefined,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'mobile_webp',\n\t\t\t\t\twidth: 500,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'webp',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 80,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'mobile_avif',\n\t\t\t\t\twidth: 500,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'avif',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 60,\n\t\t\t\t\t\t\teffort: 1,\n\t\t\t\t\t\t\tchromaSubsampling: '4:4:4',\n\t\t\t\t\t\t\tbitdepth: 8,\n\t\t\t\t\t\t\tlossless: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t// Tablet Sizes\n\t\t\t\t{\n\t\t\t\t\tname: 'tablet',\n\t\t\t\t\twidth: 800,\n\t\t\t\t\theight: undefined,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'tablet_webp',\n\t\t\t\t\twidth: 800,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'webp',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 80,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'tablet_avif',\n\t\t\t\t\twidth: 800,\n\t\t\t\t\theight: undefined,\n\t\t\t\t\tformatOptions: {\n\t\t\t\t\t\tformat: 'avif',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tquality: 60,\n\t\t\t\t\t\t\teffort: 1,\n\t\t\t\t\t\t\tchromaSubsampling: '4:4:4',\n\t\t\t\t\t\t\tbitdepth: 8,\n\t\t\t\t\t\t\tlossless: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t// Desktop Sizes\n\t\t\t\t// {\n\t\t\t\t// \tname: 'desktop',\n\t\t\t\t// \twidth: 1200,\n\t\t\t\t// \theight: undefined,\n\t\t\t\t// },\n\t\t\t\t// {\n\t\t\t\t// \tname: 'desktop_webp',\n\t\t\t\t// \twidth: 1200,\n\t\t\t\t// \theight: undefined,\n\t\t\t\t// \tformatOptions: {\n\t\t\t\t// \t\tformat: 'webp',\n\t\t\t\t// \t\toptions: {\n\t\t\t\t// \t\t\tquality: 80,\n\t\t\t\t// \t\t},\n\t\t\t\t// \t},\n\t\t\t\t// },\n\t\t\t\t// {\n\t\t\t\t// \tname: 'desktop_avif',\n\t\t\t\t// \twidth: 1200,\n\t\t\t\t// \theight: undefined,\n\t\t\t\t// \tformatOptions: {\n\t\t\t\t// \t\tformat: 'avif',\n\t\t\t\t// \t\toptions: {\n\t\t\t\t// \t\t\tquality: 80,\n\t\t\t\t// \t\t},\n\t\t\t\t// \t},\n\t\t\t\t// },\n\t\t\t],\n\t\t},\n\t};\n};\n"],"names":["lexicalEditor","mime","env","Media","additionalFields","slug","access","read","fields","name","type","required","editor","features","defaultFeatures","filter","feature","key","upload","staticDir","adminThumbnail","disableLocalStorage","isProduction","handlers","req","args","logger","payload","params","collection","filename","contentType","lookup","error","headers","Headers","set","responseHeaders","imageSizes","width","undefined","height","formatOptions","format","options","quality","effort","chromaSubsampling","bitdepth","lossless","position"],"mappings":"AAAA,SAASA,aAAa,QAAQ,+BAA+B;AAC7D,YAAYC,UAAU,aAAa;AAEnC,OAAOC,SAAS,iBAAiB;AAEjC;;;CAGC,GACD,OAAO,MAAMC,QAAQ,CAACC;IACrB,OAAO;QACNC,MAAM;QACNC,QAAQ;YACPC,MAAM,IAAM;QACb;QACAC,QAAQ;YACP;gBACCC,MAAM;gBACNC,MAAM;gBACNC,UAAU;YACX;YACA;gBACCF,MAAM;gBACNC,MAAM;gBACNC,UAAU;gBACVC,QAAQZ,cAAc;oBACrBa,UAAU,CAAC,EAAEC,eAAe,EAAE;wBAC7B,OAAOA,gBAAgBC,MAAM,CAAC,CAACC;4BAC9B,OAAOA,QAAQC,GAAG,KAAK,eAAeD,QAAQC,GAAG,KAAK;wBACvD;oBACD;gBACD;YACD;eACIb,mBAAmBA,mBAAmB,EAAE;SAC5C;QACDc,QAAQ;YACPC,WAAW;YACXC,gBAAgB;YAChBC,qBAAqBnB,IAAIoB,YAAY;YACrCC,UAAU;gBACT,OAAOC,KAAqBC;oBAC3B,MAAMC,SAASF,IAAIG,OAAO,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,QAAQD;gBACT;gBACA;oBACC/B,MAAM;oBACN8B,OAAO;oBACPE,QAAQD;oBACRE,eAAe;wBACdC,QAAQ;wBACRC,SAAS;4BACRC,SAAS;wBACV;oBACD;gBACD;gBACA;oBACCpC,MAAM;oBACN8B,OAAO;oBACPE,QAAQD;oBACRE,eAAe;wBACdC,QAAQ;wBACRC,SAAS;4BACRC,SAAS;4BACTC,QAAQ;4BACRC,mBAAmB;4BACnBC,UAAU;4BACVC,UAAU;wBACX;oBACD;gBACD;gBACA,eAAe;gBACf;oBACCxC,MAAM;oBACN8B,OAAO;oBACPE,QAAQD;gBACT;gBACA;oBACC/B,MAAM;oBACN8B,OAAO;oBACPE,QAAQD;oBACRE,eAAe;wBACdC,QAAQ;wBACRC,SAAS;4BACRC,SAAS;wBACV;oBACD;gBACD;gBACA;oBACCpC,MAAM;oBACN8B,OAAO;oBACPE,QAAQD;oBACRE,eAAe;wBACdC,QAAQ;wBACRC,SAAS;4BACRC,SAAS;4BACTC,QAAQ;4BACRC,mBAAmB;4BACnBC,UAAU;4BACVC,UAAU;wBACX;oBACD;gBACD;aA6BA;QACF;IACD;AACD,EAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ainsleydev/payload-helper",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "Payload CMS utilities, collections and global types for ainsley.dev builds",
5
5
  "license": "MIT",
6
6
  "type": "module",