@payloadcms/plugin-stripe 3.0.0-alpha.70 → 3.0.0-beta.101
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 +34 -20
- 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 +3 -1
- package/dist/webhooks/index.js.map +1 -1
- package/package.json +30 -23
|
@@ -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) => 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];
|
|
@@ -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 'updated': {\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 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"],"
|
|
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 'updated': {\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 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,KAAKhB,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;gBAAS;oBACP;gBACF;QACF;IACF;AACF,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/plugin-stripe",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-beta.101",
|
|
4
4
|
"description": "Stripe plugin for Payload",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"payload",
|
|
@@ -24,13 +24,18 @@
|
|
|
24
24
|
"exports": {
|
|
25
25
|
".": {
|
|
26
26
|
"import": "./dist/index.js",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"default": "./dist/index.js"
|
|
29
29
|
},
|
|
30
|
-
"
|
|
31
|
-
"import": "./dist/exports
|
|
32
|
-
"
|
|
33
|
-
"
|
|
30
|
+
"./types": {
|
|
31
|
+
"import": "./dist/exports/types.js",
|
|
32
|
+
"types": "./dist/exports/types.d.ts",
|
|
33
|
+
"default": "./dist/exports/types.js"
|
|
34
|
+
},
|
|
35
|
+
"./client": {
|
|
36
|
+
"import": "./dist/exports/client.js",
|
|
37
|
+
"types": "./dist/exports/client.d.ts",
|
|
38
|
+
"default": "./dist/exports/client.js"
|
|
34
39
|
}
|
|
35
40
|
},
|
|
36
41
|
"main": "./dist/index.js",
|
|
@@ -41,36 +46,38 @@
|
|
|
41
46
|
"dependencies": {
|
|
42
47
|
"lodash.get": "^4.4.2",
|
|
43
48
|
"stripe": "^10.2.0",
|
|
44
|
-
"uuid": "
|
|
45
|
-
"@payloadcms/
|
|
49
|
+
"uuid": "10.0.0",
|
|
50
|
+
"@payloadcms/translations": "3.0.0-beta.101",
|
|
51
|
+
"@payloadcms/ui": "3.0.0-beta.101"
|
|
46
52
|
},
|
|
47
53
|
"devDependencies": {
|
|
48
54
|
"@types/express": "^4.17.9",
|
|
49
55
|
"@types/lodash.get": "^4.4.7",
|
|
50
|
-
"@types/react": "
|
|
51
|
-
"@types/
|
|
52
|
-
"@
|
|
53
|
-
"@payloadcms/
|
|
54
|
-
"@payloadcms/
|
|
55
|
-
"
|
|
56
|
-
"payload": "3.0.0-alpha.70"
|
|
56
|
+
"@types/react": "npm:types-react@19.0.0-rc.0",
|
|
57
|
+
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0",
|
|
58
|
+
"@types/uuid": "10.0.0",
|
|
59
|
+
"@payloadcms/eslint-config": "3.0.0-beta.97",
|
|
60
|
+
"@payloadcms/next": "3.0.0-beta.101",
|
|
61
|
+
"payload": "3.0.0-beta.101"
|
|
57
62
|
},
|
|
58
63
|
"peerDependencies": {
|
|
59
|
-
"
|
|
60
|
-
"@payloadcms/translations": "3.0.0-alpha.70",
|
|
61
|
-
"payload": "3.0.0-alpha.70"
|
|
64
|
+
"payload": "3.0.0-beta.101"
|
|
62
65
|
},
|
|
63
66
|
"publishConfig": {
|
|
64
67
|
"registry": "https://registry.npmjs.org/"
|
|
65
68
|
},
|
|
66
69
|
"homepage:": "https://payloadcms.com",
|
|
70
|
+
"overrides": {
|
|
71
|
+
"@types/react": "npm:types-react@19.0.0-rc.0",
|
|
72
|
+
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0"
|
|
73
|
+
},
|
|
67
74
|
"scripts": {
|
|
68
|
-
"build": "pnpm copyfiles && pnpm build:
|
|
69
|
-
"build:swc": "swc ./src -d ./dist --config-file .swcrc",
|
|
75
|
+
"build": "pnpm copyfiles && pnpm build:types && pnpm build:swc",
|
|
76
|
+
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
|
70
77
|
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
71
78
|
"clean": "rimraf {dist,*.tsbuildinfo}",
|
|
72
79
|
"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
|
|
80
|
+
"lint": "eslint .",
|
|
81
|
+
"lint:fix": "eslint . --fix"
|
|
75
82
|
}
|
|
76
83
|
}
|