payload 1.15.7 โ†’ 1.15.8

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
@@ -52,12 +52,21 @@ npx create-payload-app
52
52
  Alternatively, it only takes about five minutes to [create an app from scratch](https://payloadcms.com/docs/getting-started/installation#from-scratch).
53
53
 
54
54
  ## ๐Ÿ–ฑ๏ธ One-click templates
55
- ### ๐Ÿ›’ [E-Commerce](https://github.com/payloadcms/payload/tree/master/templates/ecommerce)
56
- Eliminate the need to combine Shopify and a CMS, and instead do it all with Payload + Stripe. Best of all, you can extend it as much as you need.
57
55
 
58
- [All Official Templates](https://github.com/orgs/payloadcms/repositories?q=topic%3Apayload-template) ยท [Community Templates](https://github.com/topics/payload-template)
56
+ Jumpstart your next project by starting with a pre-made template. These are production-ready, end-to-end solutions designed to get you to market as fast as possible.
59
57
 
60
- **If you maintain your own template, consider adding the `payload-template` topic to your GitHub repository for others to find.**
58
+ ### [๐Ÿ›’ E-Commerce](https://github.com/payloadcms/payload/tree/master/templates/ecommerce)
59
+
60
+ Eliminate the need to combine Shopify and a CMS, and instead do it all with Payload + Stripe. Comes with a beautiful, fully functional front-end complete with shopping cart, checkout, orders, and much more.
61
+
62
+ ### [๐ŸŒ Website](https://github.com/payloadcms/payload/tree/master/templates/website)
63
+
64
+ Build any kind of website, blog, or portfolio from small to enterprise. Comes with a beautiful, fully functional front-end complete with posts, projects, comments, and much more.
65
+
66
+ We're constantly adding more templates to our [Templates Directory](https://github.com/payloadcms/payload/tree/master/templates). If you maintain your own template, consider adding the `payload-template` topic to your GitHub repository for others to find.
67
+
68
+ - [Official Templates](https://github.com/payloadcms/payload/tree/master/templates)
69
+ - [Community Templates](https://github.com/topics/payload-template)
61
70
 
62
71
  ## โœจ Features
63
72
 
@@ -87,13 +96,15 @@ Check out the [Payload website](https://payloadcms.com/docs/getting-started/what
87
96
 
88
97
  ## ๐Ÿ™‹ Contributing
89
98
 
90
- If you want to add contributions to this repository, please follow the instructions in [contributing.md](./contributing.md).
99
+ If you want to add contributions to this repository, please follow the instructions in [contributing.md](./CONTRIBUTING.md).
91
100
 
92
101
  ## ๐Ÿ“š Examples
93
102
 
94
- The examples directory is a great resource for learning how to setup Payload in a variety of different ways.
103
+ The [Examples Directory](./examples) is a great resource for learning how to setup Payload in a variety of different ways, but you can also find great examples in our blog and throughout our social media.
95
104
 
96
- [Examples Directory](./examples)
105
+ - [Examples Directory](./examples)
106
+ - [Payload Blog](https://payloadcms.com/blog)
107
+ - [Payload YouTube](https://www.youtube.com/@payloadcms)
97
108
 
98
109
  ## ๐Ÿ”Œ Plugins
99
110
 
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const url_1 = __importDefault(require("url"));
6
7
  const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
7
8
  const getExtractJWT_1 = __importDefault(require("../getExtractJWT"));
8
9
  async function me({ req, collection, }) {
@@ -11,13 +12,21 @@ async function me({ req, collection, }) {
11
12
  user: null,
12
13
  };
13
14
  if (req.user) {
14
- const user = { ...req.user };
15
- if (user.collection !== collection.config.slug) {
15
+ const parsedURL = url_1.default.parse(req.originalUrl);
16
+ const isGraphQL = parsedURL.pathname === `/api${req.payload.config.routes.graphQL}`;
17
+ const user = await req.payload.findByID({
18
+ id: req.user.id,
19
+ collection: collection.config.slug,
20
+ req,
21
+ depth: isGraphQL ? 0 : collection.config.auth.depth,
22
+ overrideAccess: false,
23
+ showHiddenFields: false,
24
+ });
25
+ if (req.user.collection !== collection.config.slug) {
16
26
  return {
17
27
  user: null,
18
28
  };
19
29
  }
20
- delete user.collection;
21
30
  response = {
22
31
  user,
23
32
  collection: req.user.collection,
@@ -1 +1 @@
1
- {"version":3,"file":"me.js","sourceRoot":"","sources":["../../../src/auth/operations/me.ts"],"names":[],"mappings":";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U,CAAC,GAAG,CAAC,CAAC;QAE9B,IAAI,KAAK,EAAE;YACT,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;YACvB,MAAM,OAAO,GAAG,sBAAG,CAAC,MAAM,CAAC,KAAK,CAAmB,CAAC;YACpD,IAAI,OAAO;gBAAE,QAAQ,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;SACzC;KACF;IAED,wCAAwC;IACxC,wBAAwB;IACxB,wCAAwC;IAExC,MAAM,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;QACrE,MAAM,SAAS,CAAC;QAEhB,QAAQ,GAAG,MAAM,IAAI,CAAC;YACpB,GAAG;YACH,QAAQ;YACR,OAAO,EAAE,GAAG,CAAC,OAAO;SACrB,CAAC,IAAI,QAAQ,CAAC;IACjB,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAEtB,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,kBAAe,EAAE,CAAC"}
@@ -19,8 +19,8 @@ exports.default = ({ secret, config, collections }) => {
19
19
  }
20
20
  try {
21
21
  const collection = collections[token.collection];
22
- const parsedURL = url_1.default.parse(req.url);
23
- const isGraphQL = parsedURL.pathname === config.routes.graphQL;
22
+ const parsedURL = url_1.default.parse(req.originalUrl);
23
+ const isGraphQL = parsedURL.pathname === `/api${req.payload.config.routes.graphQL}`;
24
24
  const user = await req.payload.findByID({
25
25
  id: token.id,
26
26
  collection: token.collection,
@@ -1 +1 @@
1
- {"version":3,"file":"jwt.js","sourceRoot":"","sources":["../../../src/auth/strategies/jwt.ts"],"names":[],"mappings":";;;;;AAAA,8CAAsB;AACtB,gEAA4D;AAG5D,qEAA6C;AAE7C,MAAM,WAAW,GAAG,sBAAW,CAAC,QAAQ,CAAC;AAEzC,kBAAe,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAW,EAAoB,EA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,KAAK;aACpD,CAAC,CAAC;YAEH,IAAI,IAAI,IAAI,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE;gBAC9D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC;gBACzC,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC;gBAC7B,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;aAClB;iBAAM;gBACL,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aACnB;SACF;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;SACnB;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload",
3
- "version": "1.15.7",
3
+ "version": "1.15.8",
4
4
  "description": "Node, React and MongoDB Headless CMS and Application Framework",
5
5
  "license": "MIT",
6
6
  "engines": {