@payloadcms/plugin-stripe 3.0.0-canary.f6e77b8 → 3.0.0-canary.fb04843
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/admin.d.ts +1 -1
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js.map +1 -1
- package/dist/exports/client.d.ts +2 -0
- package/dist/exports/client.d.ts.map +1 -0
- package/dist/exports/client.js +4 -0
- package/dist/exports/client.js.map +1 -0
- package/dist/exports/types.js.map +1 -1
- package/dist/fields/getFields.d.ts +1 -1
- package/dist/fields/getFields.d.ts.map +1 -1
- package/dist/fields/getFields.js +1 -2
- package/dist/fields/getFields.js.map +1 -1
- package/dist/hooks/createNewInStripe.d.ts +5 -5
- package/dist/hooks/createNewInStripe.d.ts.map +1 -1
- package/dist/hooks/createNewInStripe.js +22 -8
- package/dist/hooks/createNewInStripe.js.map +1 -1
- package/dist/hooks/deleteFromStripe.d.ts +5 -5
- package/dist/hooks/deleteFromStripe.d.ts.map +1 -1
- package/dist/hooks/deleteFromStripe.js +13 -5
- package/dist/hooks/deleteFromStripe.js.map +1 -1
- package/dist/hooks/syncExistingWithStripe.d.ts +5 -5
- package/dist/hooks/syncExistingWithStripe.d.ts.map +1 -1
- package/dist/hooks/syncExistingWithStripe.js +13 -5
- package/dist/hooks/syncExistingWithStripe.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/routes/rest.d.ts +2 -2
- package/dist/routes/rest.d.ts.map +1 -1
- package/dist/routes/rest.js +5 -4
- package/dist/routes/rest.js.map +1 -1
- package/dist/routes/webhooks.d.ts +2 -3
- package/dist/routes/webhooks.d.ts.map +1 -1
- package/dist/routes/webhooks.js +3 -0
- package/dist/routes/webhooks.js.map +1 -1
- package/dist/types.d.ts +5 -131
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/ui/LinkToDoc.d.ts +2 -3
- package/dist/ui/LinkToDoc.d.ts.map +1 -1
- package/dist/ui/LinkToDoc.js +36 -22
- package/dist/ui/LinkToDoc.js.map +1 -1
- package/dist/utilities/deepen.d.ts.map +1 -1
- package/dist/utilities/deepen.js.map +1 -1
- package/dist/utilities/stripeProxy.js.map +1 -1
- package/dist/webhooks/handleCreatedOrUpdated.d.ts +2 -2
- package/dist/webhooks/handleCreatedOrUpdated.d.ts.map +1 -1
- package/dist/webhooks/handleCreatedOrUpdated.js +42 -14
- package/dist/webhooks/handleCreatedOrUpdated.js.map +1 -1
- package/dist/webhooks/handleDeleted.d.ts +2 -2
- package/dist/webhooks/handleDeleted.d.ts.map +1 -1
- package/dist/webhooks/handleDeleted.js +21 -7
- package/dist/webhooks/handleDeleted.js.map +1 -1
- package/dist/webhooks/index.d.ts.map +1 -1
- package/dist/webhooks/index.js +7 -5
- package/dist/webhooks/index.js.map +1 -1
- package/license.md +22 -0
- package/package.json +37 -24
|
@@ -6,10 +6,14 @@ export const handleDeleted = async (args)=>{
|
|
|
6
6
|
// if the event object and resource type don't match, this deletion was not top-level
|
|
7
7
|
const isNestedDelete = eventObject !== resourceType;
|
|
8
8
|
if (isNestedDelete) {
|
|
9
|
-
if (logs)
|
|
9
|
+
if (logs) {
|
|
10
|
+
payload.logger.info(`- This deletion occurred on a nested field of ${resourceType}. Nested fields are not yet supported.`);
|
|
11
|
+
}
|
|
10
12
|
}
|
|
11
13
|
if (!isNestedDelete) {
|
|
12
|
-
if (logs)
|
|
14
|
+
if (logs) {
|
|
15
|
+
payload.logger.info(`- A '${resourceType}' resource was deleted in Stripe, now deleting '${collectionSlug}' document in Payload with Stripe ID: '${stripeID}'...`);
|
|
16
|
+
}
|
|
13
17
|
try {
|
|
14
18
|
const payloadQuery = await payload.find({
|
|
15
19
|
collection: collectionSlug,
|
|
@@ -21,10 +25,14 @@ export const handleDeleted = async (args)=>{
|
|
|
21
25
|
});
|
|
22
26
|
const foundDoc = payloadQuery.docs[0];
|
|
23
27
|
if (!foundDoc) {
|
|
24
|
-
if (logs)
|
|
28
|
+
if (logs) {
|
|
29
|
+
payload.logger.info(`- Nothing to delete, no existing document found with Stripe ID: '${stripeID}'.`);
|
|
30
|
+
}
|
|
25
31
|
}
|
|
26
32
|
if (foundDoc) {
|
|
27
|
-
if (logs)
|
|
33
|
+
if (logs) {
|
|
34
|
+
payload.logger.info(`- Deleting Payload document with ID: '${foundDoc.id}'...`);
|
|
35
|
+
}
|
|
28
36
|
try {
|
|
29
37
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
30
38
|
payload.delete({
|
|
@@ -33,15 +41,21 @@ export const handleDeleted = async (args)=>{
|
|
|
33
41
|
});
|
|
34
42
|
// NOTE: the `afterDelete` hook will trigger, which will attempt to delete the document from Stripe and safely error out
|
|
35
43
|
// There is no known way of preventing this from happening. In other hooks we use the `skipSync` field, but here the document is already deleted.
|
|
36
|
-
if (logs)
|
|
44
|
+
if (logs) {
|
|
45
|
+
payload.logger.info(`- ✅ Successfully deleted Payload document with ID: '${foundDoc.id}'.`);
|
|
46
|
+
}
|
|
37
47
|
} catch (error) {
|
|
38
48
|
const msg = error instanceof Error ? error.message : error;
|
|
39
|
-
if (logs)
|
|
49
|
+
if (logs) {
|
|
50
|
+
payload.logger.error(`Error deleting document: ${msg}`);
|
|
51
|
+
}
|
|
40
52
|
}
|
|
41
53
|
}
|
|
42
54
|
} catch (error) {
|
|
43
55
|
const msg = error instanceof Error ? error.message : error;
|
|
44
|
-
if (logs)
|
|
56
|
+
if (logs) {
|
|
57
|
+
payload.logger.error(`Error deleting document: ${msg}`);
|
|
58
|
+
}
|
|
45
59
|
}
|
|
46
60
|
}
|
|
47
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/webhooks/handleDeleted.ts"],"sourcesContent":["import type { SanitizedStripePluginConfig, StripeWebhookHandler } from '../types.js'\n\ntype HandleDeleted = (\n args:
|
|
1
|
+
{"version":3,"sources":["../../src/webhooks/handleDeleted.ts"],"sourcesContent":["import type { SanitizedStripePluginConfig, StripeWebhookHandler } from '../types.js'\n\ntype HandleDeleted = (\n args: {\n resourceType: string\n syncConfig: SanitizedStripePluginConfig['sync'][0]\n } & Parameters<StripeWebhookHandler>[0],\n) => Promise<void>\n\nexport const handleDeleted: HandleDeleted = async (args) => {\n const { event, payload, pluginConfig, resourceType, syncConfig } = args\n\n const { logs } = pluginConfig || {}\n\n const collectionSlug = syncConfig?.collection\n\n const {\n id: stripeID,\n object: eventObject, // use this to determine if this is a nested field\n }: any = event?.data?.object || {}\n\n // if the event object and resource type don't match, this deletion was not top-level\n const isNestedDelete = eventObject !== resourceType\n\n if (isNestedDelete) {\n if (logs) {\n payload.logger.info(\n `- This deletion occurred on a nested field of ${resourceType}. Nested fields are not yet supported.`,\n )\n }\n }\n\n if (!isNestedDelete) {\n if (logs) {\n payload.logger.info(\n `- A '${resourceType}' resource was deleted in Stripe, now deleting '${collectionSlug}' document in Payload with Stripe ID: '${stripeID}'...`,\n )\n }\n\n try {\n const payloadQuery = await payload.find({\n collection: collectionSlug,\n where: {\n stripeID: {\n equals: stripeID,\n },\n },\n })\n\n const foundDoc = payloadQuery.docs[0] as any\n\n if (!foundDoc) {\n if (logs) {\n payload.logger.info(\n `- Nothing to delete, no existing document found with Stripe ID: '${stripeID}'.`,\n )\n }\n }\n\n if (foundDoc) {\n if (logs) {\n payload.logger.info(`- Deleting Payload document with ID: '${foundDoc.id}'...`)\n }\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n payload.delete({\n id: foundDoc.id,\n collection: collectionSlug,\n })\n\n // NOTE: the `afterDelete` hook will trigger, which will attempt to delete the document from Stripe and safely error out\n // There is no known way of preventing this from happening. In other hooks we use the `skipSync` field, but here the document is already deleted.\n if (logs) {\n payload.logger.info(\n `- ✅ Successfully deleted Payload document with ID: '${foundDoc.id}'.`,\n )\n }\n } catch (error: unknown) {\n const msg = error instanceof Error ? error.message : error\n if (logs) {\n payload.logger.error(`Error deleting document: ${msg}`)\n }\n }\n }\n } catch (error: unknown) {\n const msg = error instanceof Error ? error.message : error\n if (logs) {\n payload.logger.error(`Error deleting document: ${msg}`)\n }\n }\n }\n}\n"],"names":["handleDeleted","args","event","payload","pluginConfig","resourceType","syncConfig","logs","collectionSlug","collection","id","stripeID","object","eventObject","data","isNestedDelete","logger","info","payloadQuery","find","where","equals","foundDoc","docs","delete","error","msg","Error","message"],"mappings":"AASA,OAAO,MAAMA,gBAA+B,OAAOC;IACjD,MAAM,EAAEC,KAAK,EAAEC,OAAO,EAAEC,YAAY,EAAEC,YAAY,EAAEC,UAAU,EAAE,GAAGL;IAEnE,MAAM,EAAEM,IAAI,EAAE,GAAGH,gBAAgB,CAAC;IAElC,MAAMI,iBAAiBF,YAAYG;IAEnC,MAAM,EACJC,IAAIC,QAAQ,EACZC,QAAQC,WAAW,EACpB,GAAQX,OAAOY,MAAMF,UAAU,CAAC;IAEjC,qFAAqF;IACrF,MAAMG,iBAAiBF,gBAAgBR;IAEvC,IAAIU,gBAAgB;QAClB,IAAIR,MAAM;YACRJ,QAAQa,MAAM,CAACC,IAAI,CACjB,CAAC,8CAA8C,EAAEZ,aAAa,sCAAsC,CAAC;QAEzG;IACF;IAEA,IAAI,CAACU,gBAAgB;QACnB,IAAIR,MAAM;YACRJ,QAAQa,MAAM,CAACC,IAAI,CACjB,CAAC,KAAK,EAAEZ,aAAa,gDAAgD,EAAEG,eAAe,uCAAuC,EAAEG,SAAS,IAAI,CAAC;QAEjJ;QAEA,IAAI;YACF,MAAMO,eAAe,MAAMf,QAAQgB,IAAI,CAAC;gBACtCV,YAAYD;gBACZY,OAAO;oBACLT,UAAU;wBACRU,QAAQV;oBACV;gBACF;YACF;YAEA,MAAMW,WAAWJ,aAAaK,IAAI,CAAC,EAAE;YAErC,IAAI,CAACD,UAAU;gBACb,IAAIf,MAAM;oBACRJ,QAAQa,MAAM,CAACC,IAAI,CACjB,CAAC,iEAAiE,EAAEN,SAAS,EAAE,CAAC;gBAEpF;YACF;YAEA,IAAIW,UAAU;gBACZ,IAAIf,MAAM;oBACRJ,QAAQa,MAAM,CAACC,IAAI,CAAC,CAAC,sCAAsC,EAAEK,SAASZ,EAAE,CAAC,IAAI,CAAC;gBAChF;gBAEA,IAAI;oBACF,mEAAmE;oBACnEP,QAAQqB,MAAM,CAAC;wBACbd,IAAIY,SAASZ,EAAE;wBACfD,YAAYD;oBACd;oBAEA,wHAAwH;oBACxH,iJAAiJ;oBACjJ,IAAID,MAAM;wBACRJ,QAAQa,MAAM,CAACC,IAAI,CACjB,CAAC,oDAAoD,EAAEK,SAASZ,EAAE,CAAC,EAAE,CAAC;oBAE1E;gBACF,EAAE,OAAOe,OAAgB;oBACvB,MAAMC,MAAMD,iBAAiBE,QAAQF,MAAMG,OAAO,GAAGH;oBACrD,IAAIlB,MAAM;wBACRJ,QAAQa,MAAM,CAACS,KAAK,CAAC,CAAC,yBAAyB,EAAEC,IAAI,CAAC;oBACxD;gBACF;YACF;QACF,EAAE,OAAOD,OAAgB;YACvB,MAAMC,MAAMD,iBAAiBE,QAAQF,MAAMG,OAAO,GAAGH;YACrD,IAAIlB,MAAM;gBACRJ,QAAQa,MAAM,CAACS,KAAK,CAAC,CAAC,yBAAyB,EAAEC,IAAI,CAAC;YACxD;QACF;IACF;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webhooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAKvD,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webhooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAKvD,eAAO,MAAM,cAAc,EAAE,oBAkD5B,CAAA"}
|
package/dist/webhooks/index.js
CHANGED
|
@@ -2,7 +2,9 @@ import { handleCreatedOrUpdated } from './handleCreatedOrUpdated.js';
|
|
|
2
2
|
import { handleDeleted } from './handleDeleted.js';
|
|
3
3
|
export const handleWebhooks = (args)=>{
|
|
4
4
|
const { event, payload, pluginConfig } = args;
|
|
5
|
-
if (pluginConfig?.logs)
|
|
5
|
+
if (pluginConfig?.logs) {
|
|
6
|
+
payload.logger.info(`🪝 Received Stripe '${event.type}' webhook event with ID: '${event.id}'.`);
|
|
7
|
+
}
|
|
6
8
|
// could also traverse into event.data.object.object to get the type, but that seems unreliable
|
|
7
9
|
// use cli: `stripe resources` to see all available resources
|
|
8
10
|
const resourceType = event.type.split('.')[0];
|
|
@@ -20,9 +22,9 @@ export const handleWebhooks = (args)=>{
|
|
|
20
22
|
});
|
|
21
23
|
break;
|
|
22
24
|
}
|
|
23
|
-
case '
|
|
25
|
+
case 'deleted':
|
|
24
26
|
{
|
|
25
|
-
void
|
|
27
|
+
void handleDeleted({
|
|
26
28
|
...args,
|
|
27
29
|
pluginConfig,
|
|
28
30
|
resourceType,
|
|
@@ -30,9 +32,9 @@ export const handleWebhooks = (args)=>{
|
|
|
30
32
|
});
|
|
31
33
|
break;
|
|
32
34
|
}
|
|
33
|
-
case '
|
|
35
|
+
case 'updated':
|
|
34
36
|
{
|
|
35
|
-
void
|
|
37
|
+
void handleCreatedOrUpdated({
|
|
36
38
|
...args,
|
|
37
39
|
pluginConfig,
|
|
38
40
|
resourceType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/webhooks/index.ts"],"sourcesContent":["import type { StripeWebhookHandler } from '../types.js'\n\nimport { handleCreatedOrUpdated } from './handleCreatedOrUpdated.js'\nimport { handleDeleted } from './handleDeleted.js'\n\nexport const handleWebhooks: StripeWebhookHandler = (args) => {\n const { event, payload, pluginConfig } = args\n\n if (pluginConfig?.logs)\n payload.logger.info(`🪝 Received Stripe '${event.type}' webhook event with ID: '${event.id}'.`)\n\n // could also traverse into event.data.object.object to get the type, but that seems unreliable\n // use cli: `stripe resources` to see all available resources\n const resourceType = event.type.split('.')[0]\n const method = event.type.split('.').pop()\n\n const syncConfig = pluginConfig?.sync?.find(\n (sync) => sync.stripeResourceTypeSingular === resourceType,\n )\n\n if (syncConfig) {\n switch (method) {\n case 'created': {\n void handleCreatedOrUpdated({\n ...args,\n pluginConfig,\n resourceType,\n syncConfig,\n })\n break\n }\n case '
|
|
1
|
+
{"version":3,"sources":["../../src/webhooks/index.ts"],"sourcesContent":["import type { StripeWebhookHandler } from '../types.js'\n\nimport { handleCreatedOrUpdated } from './handleCreatedOrUpdated.js'\nimport { handleDeleted } from './handleDeleted.js'\n\nexport const handleWebhooks: StripeWebhookHandler = (args) => {\n const { event, payload, pluginConfig } = args\n\n if (pluginConfig?.logs) {\n payload.logger.info(`🪝 Received Stripe '${event.type}' webhook event with ID: '${event.id}'.`)\n }\n\n // could also traverse into event.data.object.object to get the type, but that seems unreliable\n // use cli: `stripe resources` to see all available resources\n const resourceType = event.type.split('.')[0]\n const method = event.type.split('.').pop()\n\n const syncConfig = pluginConfig?.sync?.find(\n (sync) => sync.stripeResourceTypeSingular === resourceType,\n )\n\n if (syncConfig) {\n switch (method) {\n case 'created': {\n void handleCreatedOrUpdated({\n ...args,\n pluginConfig,\n resourceType,\n syncConfig,\n })\n break\n }\n case 'deleted': {\n void handleDeleted({\n ...args,\n pluginConfig,\n resourceType,\n syncConfig,\n })\n break\n }\n case 'updated': {\n void handleCreatedOrUpdated({\n ...args,\n pluginConfig,\n resourceType,\n syncConfig,\n })\n break\n }\n default: {\n break\n }\n }\n }\n}\n"],"names":["handleCreatedOrUpdated","handleDeleted","handleWebhooks","args","event","payload","pluginConfig","logs","logger","info","type","id","resourceType","split","method","pop","syncConfig","sync","find","stripeResourceTypeSingular"],"mappings":"AAEA,SAASA,sBAAsB,QAAQ,8BAA6B;AACpE,SAASC,aAAa,QAAQ,qBAAoB;AAElD,OAAO,MAAMC,iBAAuC,CAACC;IACnD,MAAM,EAAEC,KAAK,EAAEC,OAAO,EAAEC,YAAY,EAAE,GAAGH;IAEzC,IAAIG,cAAcC,MAAM;QACtBF,QAAQG,MAAM,CAACC,IAAI,CAAC,CAAC,oBAAoB,EAAEL,MAAMM,IAAI,CAAC,0BAA0B,EAAEN,MAAMO,EAAE,CAAC,EAAE,CAAC;IAChG;IAEA,+FAA+F;IAC/F,6DAA6D;IAC7D,MAAMC,eAAeR,MAAMM,IAAI,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,MAAMC,SAASV,MAAMM,IAAI,CAACG,KAAK,CAAC,KAAKE,GAAG;IAExC,MAAMC,aAAaV,cAAcW,MAAMC,KACrC,CAACD,OAASA,KAAKE,0BAA0B,KAAKP;IAGhD,IAAII,YAAY;QACd,OAAQF;YACN,KAAK;gBAAW;oBACd,KAAKd,uBAAuB;wBAC1B,GAAGG,IAAI;wBACPG;wBACAM;wBACAI;oBACF;oBACA;gBACF;YACA,KAAK;gBAAW;oBACd,KAAKf,cAAc;wBACjB,GAAGE,IAAI;wBACPG;wBACAM;wBACAI;oBACF;oBACA;gBACF;YACA,KAAK;gBAAW;oBACd,KAAKhB,uBAAuB;wBAC1B,GAAGG,IAAI;wBACPG;wBACAM;wBACAI;oBACF;oBACA;gBACF;YACA;gBAAS;oBACP;gBACF;QACF;IACF;AACF,EAAC"}
|
package/license.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018-2024 Payload CMS, Inc. <info@payloadcms.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/plugin-stripe",
|
|
3
|
-
"version": "3.0.0-canary.
|
|
3
|
+
"version": "3.0.0-canary.fb04843",
|
|
4
4
|
"description": "Stripe plugin for Payload",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"payload",
|
|
@@ -20,17 +20,29 @@
|
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "Payload <dev@payloadcms.com> (https://payloadcms.com)",
|
|
23
|
+
"maintainers": [
|
|
24
|
+
{
|
|
25
|
+
"name": "Payload",
|
|
26
|
+
"email": "info@payloadcms.com",
|
|
27
|
+
"url": "https://payloadcms.com"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
23
30
|
"type": "module",
|
|
24
31
|
"exports": {
|
|
25
32
|
".": {
|
|
26
33
|
"import": "./dist/index.js",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"default": "./dist/index.js"
|
|
29
36
|
},
|
|
30
|
-
"
|
|
31
|
-
"import": "./dist/exports
|
|
32
|
-
"
|
|
33
|
-
"
|
|
37
|
+
"./types": {
|
|
38
|
+
"import": "./dist/exports/types.js",
|
|
39
|
+
"types": "./dist/exports/types.d.ts",
|
|
40
|
+
"default": "./dist/exports/types.js"
|
|
41
|
+
},
|
|
42
|
+
"./client": {
|
|
43
|
+
"import": "./dist/exports/client.js",
|
|
44
|
+
"types": "./dist/exports/client.d.ts",
|
|
45
|
+
"default": "./dist/exports/client.js"
|
|
34
46
|
}
|
|
35
47
|
},
|
|
36
48
|
"main": "./dist/index.js",
|
|
@@ -41,36 +53,37 @@
|
|
|
41
53
|
"dependencies": {
|
|
42
54
|
"lodash.get": "^4.4.2",
|
|
43
55
|
"stripe": "^10.2.0",
|
|
44
|
-
"uuid": "
|
|
45
|
-
"@payloadcms/
|
|
56
|
+
"uuid": "10.0.0",
|
|
57
|
+
"@payloadcms/translations": "3.0.0-canary.fb04843",
|
|
58
|
+
"@payloadcms/ui": "3.0.0-canary.fb04843"
|
|
46
59
|
},
|
|
47
60
|
"devDependencies": {
|
|
48
|
-
"@types/express": "^4.17.9",
|
|
49
61
|
"@types/lodash.get": "^4.4.7",
|
|
50
|
-
"@types/react": "
|
|
51
|
-
"@types/
|
|
52
|
-
"@
|
|
53
|
-
"@payloadcms/eslint-config": "
|
|
54
|
-
"@payloadcms/
|
|
55
|
-
"
|
|
56
|
-
"payload": "3.0.0-canary.f6e77b8"
|
|
62
|
+
"@types/react": "npm:types-react@19.0.0-rc.1",
|
|
63
|
+
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
|
64
|
+
"@types/uuid": "10.0.0",
|
|
65
|
+
"@payloadcms/eslint-config": "3.0.0-beta.112",
|
|
66
|
+
"@payloadcms/next": "3.0.0-canary.fb04843",
|
|
67
|
+
"payload": "3.0.0-canary.fb04843"
|
|
57
68
|
},
|
|
58
69
|
"peerDependencies": {
|
|
59
|
-
"
|
|
60
|
-
"payload": "3.0.0-canary.f6e77b8",
|
|
61
|
-
"@payloadcms/translations": "3.0.0-canary.f6e77b8"
|
|
70
|
+
"payload": "3.0.0-canary.fb04843"
|
|
62
71
|
},
|
|
63
72
|
"publishConfig": {
|
|
64
73
|
"registry": "https://registry.npmjs.org/"
|
|
65
74
|
},
|
|
66
75
|
"homepage:": "https://payloadcms.com",
|
|
76
|
+
"overrides": {
|
|
77
|
+
"@types/react": "npm:types-react@19.0.0-rc.1",
|
|
78
|
+
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
|
|
79
|
+
},
|
|
67
80
|
"scripts": {
|
|
68
|
-
"build": "pnpm copyfiles && pnpm build:
|
|
69
|
-
"build:swc": "swc ./src -d ./dist --config-file .swcrc",
|
|
81
|
+
"build": "pnpm copyfiles && pnpm build:types && pnpm build:swc",
|
|
82
|
+
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
|
70
83
|
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
71
84
|
"clean": "rimraf {dist,*.tsbuildinfo}",
|
|
72
85
|
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
|
|
73
|
-
"lint": "eslint
|
|
74
|
-
"lint:fix": "eslint --fix
|
|
86
|
+
"lint": "eslint .",
|
|
87
|
+
"lint:fix": "eslint . --fix"
|
|
75
88
|
}
|
|
76
89
|
}
|