@payloadcms/storage-uploadthing 3.0.0-canary.95fcd13 → 3.0.0-canary.96477cf
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.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/staticHandler.d.ts.map +1 -1
- package/dist/staticHandler.js +3 -1
- package/dist/staticHandler.js.map +1 -1
- package/package.json +7 -5
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ export const uploadthingStorage = (uploadthingStorageOptions)=>(incomingConfig)=
|
|
|
12
12
|
if (!uploadthingStorageOptions.options.acl) {
|
|
13
13
|
uploadthingStorageOptions.options.acl = 'public-read';
|
|
14
14
|
}
|
|
15
|
-
const adapter = uploadthingInternal(uploadthingStorageOptions
|
|
15
|
+
const adapter = uploadthingInternal(uploadthingStorageOptions);
|
|
16
16
|
// Add adapter to each collection option object
|
|
17
17
|
const collectionsWithAdapter = Object.entries(uploadthingStorageOptions.collections).reduce((acc, [slug, collOptions])=>({
|
|
18
18
|
...acc,
|
|
@@ -45,7 +45,7 @@ export const uploadthingStorage = (uploadthingStorageOptions)=>(incomingConfig)=
|
|
|
45
45
|
collections: collectionsWithAdapter
|
|
46
46
|
})(config);
|
|
47
47
|
};
|
|
48
|
-
function uploadthingInternal(options
|
|
48
|
+
function uploadthingInternal(options) {
|
|
49
49
|
const fields = [
|
|
50
50
|
{
|
|
51
51
|
name: '_key',
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type {\n Adapter,\n PluginOptions as CloudStoragePluginOptions,\n CollectionOptions,\n GeneratedAdapter,\n} from '@payloadcms/plugin-cloud-storage/types'\nimport type { Config, Field, Plugin } from 'payload'\nimport type { UTApiOptions } from 'uploadthing/types'\n\nimport { cloudStoragePlugin } from '@payloadcms/plugin-cloud-storage'\nimport { UTApi } from 'uploadthing/server'\n\nimport { generateURL } from './generateURL.js'\nimport { getHandleDelete } from './handleDelete.js'\nimport { getHandleUpload } from './handleUpload.js'\nimport { getHandler } from './staticHandler.js'\n\nexport type UploadthingStorageOptions = {\n /**\n * Collection options to apply the adapter to.\n */\n collections: Record<string, Omit<CollectionOptions, 'adapter'> | true>\n\n /**\n * Whether or not to enable the plugin\n *\n * Default: true\n */\n enabled?: boolean\n\n /**\n * Uploadthing Options\n */\n options: {\n /**\n * @default 'public-read'\n */\n acl?: ACL\n } & UTApiOptions\n}\n\ntype UploadthingPlugin = (uploadthingStorageOptions: UploadthingStorageOptions) => Plugin\n\n/** NOTE: not synced with uploadthing's internal types. Need to modify if more options added */\nexport type ACL = 'private' | 'public-read'\n\nexport const uploadthingStorage: UploadthingPlugin =\n (uploadthingStorageOptions: UploadthingStorageOptions) =>\n (incomingConfig: Config): Config => {\n if (uploadthingStorageOptions.enabled === false) {\n return incomingConfig\n }\n\n // Default ACL to public-read\n if (!uploadthingStorageOptions.options.acl) {\n uploadthingStorageOptions.options.acl = 'public-read'\n }\n\n const adapter = uploadthingInternal(uploadthingStorageOptions
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type {\n Adapter,\n PluginOptions as CloudStoragePluginOptions,\n CollectionOptions,\n GeneratedAdapter,\n} from '@payloadcms/plugin-cloud-storage/types'\nimport type { Config, Field, Plugin } from 'payload'\nimport type { UTApiOptions } from 'uploadthing/types'\n\nimport { cloudStoragePlugin } from '@payloadcms/plugin-cloud-storage'\nimport { UTApi } from 'uploadthing/server'\n\nimport { generateURL } from './generateURL.js'\nimport { getHandleDelete } from './handleDelete.js'\nimport { getHandleUpload } from './handleUpload.js'\nimport { getHandler } from './staticHandler.js'\n\nexport type UploadthingStorageOptions = {\n /**\n * Collection options to apply the adapter to.\n */\n collections: Record<string, Omit<CollectionOptions, 'adapter'> | true>\n\n /**\n * Whether or not to enable the plugin\n *\n * Default: true\n */\n enabled?: boolean\n\n /**\n * Uploadthing Options\n */\n options: {\n /**\n * @default 'public-read'\n */\n acl?: ACL\n } & UTApiOptions\n}\n\ntype UploadthingPlugin = (uploadthingStorageOptions: UploadthingStorageOptions) => Plugin\n\n/** NOTE: not synced with uploadthing's internal types. Need to modify if more options added */\nexport type ACL = 'private' | 'public-read'\n\nexport const uploadthingStorage: UploadthingPlugin =\n (uploadthingStorageOptions: UploadthingStorageOptions) =>\n (incomingConfig: Config): Config => {\n if (uploadthingStorageOptions.enabled === false) {\n return incomingConfig\n }\n\n // Default ACL to public-read\n if (!uploadthingStorageOptions.options.acl) {\n uploadthingStorageOptions.options.acl = 'public-read'\n }\n\n const adapter = uploadthingInternal(uploadthingStorageOptions)\n\n // Add adapter to each collection option object\n const collectionsWithAdapter: CloudStoragePluginOptions['collections'] = Object.entries(\n uploadthingStorageOptions.collections,\n ).reduce(\n (acc, [slug, collOptions]) => ({\n ...acc,\n [slug]: {\n ...(collOptions === true ? {} : collOptions),\n\n // Disable payload access control if the ACL is public-read or not set\n // ...(uploadthingStorageOptions.options.acl === 'public-read'\n // ? { disablePayloadAccessControl: true }\n // : {}),\n\n adapter,\n },\n }),\n {} as Record<string, CollectionOptions>,\n )\n\n // Set disableLocalStorage: true for collections specified in the plugin options\n const config = {\n ...incomingConfig,\n collections: (incomingConfig.collections || []).map((collection) => {\n if (!collectionsWithAdapter[collection.slug]) {\n return collection\n }\n\n return {\n ...collection,\n upload: {\n ...(typeof collection.upload === 'object' ? collection.upload : {}),\n disableLocalStorage: true,\n },\n }\n }),\n }\n\n return cloudStoragePlugin({\n collections: collectionsWithAdapter,\n })(config)\n }\n\nfunction uploadthingInternal(options: UploadthingStorageOptions): Adapter {\n const fields: Field[] = [\n {\n name: '_key',\n type: 'text',\n admin: {\n hidden: true,\n },\n },\n ]\n\n return (): GeneratedAdapter => {\n const {\n options: { acl = 'public-read', ...utOptions },\n } = options\n\n const utApi = new UTApi(utOptions)\n\n return {\n name: 'uploadthing',\n fields,\n generateURL,\n handleDelete: getHandleDelete({ utApi }),\n handleUpload: getHandleUpload({ acl, utApi }),\n staticHandler: getHandler({ utApi }),\n }\n }\n}\n"],"names":["cloudStoragePlugin","UTApi","generateURL","getHandleDelete","getHandleUpload","getHandler","uploadthingStorage","uploadthingStorageOptions","incomingConfig","enabled","options","acl","adapter","uploadthingInternal","collectionsWithAdapter","Object","entries","collections","reduce","acc","slug","collOptions","config","map","collection","upload","disableLocalStorage","fields","name","type","admin","hidden","utOptions","utApi","handleDelete","handleUpload","staticHandler"],"mappings":"AASA,SAASA,kBAAkB,QAAQ,mCAAkC;AACrE,SAASC,KAAK,QAAQ,qBAAoB;AAE1C,SAASC,WAAW,QAAQ,mBAAkB;AAC9C,SAASC,eAAe,QAAQ,oBAAmB;AACnD,SAASC,eAAe,QAAQ,oBAAmB;AACnD,SAASC,UAAU,QAAQ,qBAAoB;AA+B/C,OAAO,MAAMC,qBACX,CAACC,4BACD,CAACC;QACC,IAAID,0BAA0BE,OAAO,KAAK,OAAO;YAC/C,OAAOD;QACT;QAEA,6BAA6B;QAC7B,IAAI,CAACD,0BAA0BG,OAAO,CAACC,GAAG,EAAE;YAC1CJ,0BAA0BG,OAAO,CAACC,GAAG,GAAG;QAC1C;QAEA,MAAMC,UAAUC,oBAAoBN;QAEpC,+CAA+C;QAC/C,MAAMO,yBAAmEC,OAAOC,OAAO,CACrFT,0BAA0BU,WAAW,EACrCC,MAAM,CACN,CAACC,KAAK,CAACC,MAAMC,YAAY,GAAM,CAAA;gBAC7B,GAAGF,GAAG;gBACN,CAACC,KAAK,EAAE;oBACN,GAAIC,gBAAgB,OAAO,CAAC,IAAIA,WAAW;oBAE3C,sEAAsE;oBACtE,8DAA8D;oBAC9D,4CAA4C;oBAC5C,WAAW;oBAEXT;gBACF;YACF,CAAA,GACA,CAAC;QAGH,gFAAgF;QAChF,MAAMU,SAAS;YACb,GAAGd,cAAc;YACjBS,aAAa,AAACT,CAAAA,eAAeS,WAAW,IAAI,EAAE,AAAD,EAAGM,GAAG,CAAC,CAACC;gBACnD,IAAI,CAACV,sBAAsB,CAACU,WAAWJ,IAAI,CAAC,EAAE;oBAC5C,OAAOI;gBACT;gBAEA,OAAO;oBACL,GAAGA,UAAU;oBACbC,QAAQ;wBACN,GAAI,OAAOD,WAAWC,MAAM,KAAK,WAAWD,WAAWC,MAAM,GAAG,CAAC,CAAC;wBAClEC,qBAAqB;oBACvB;gBACF;YACF;QACF;QAEA,OAAO1B,mBAAmB;YACxBiB,aAAaH;QACf,GAAGQ;IACL,EAAC;AAEH,SAAST,oBAAoBH,OAAkC;IAC7D,MAAMiB,SAAkB;QACtB;YACEC,MAAM;YACNC,MAAM;YACNC,OAAO;gBACLC,QAAQ;YACV;QACF;KACD;IAED,OAAO;QACL,MAAM,EACJrB,SAAS,EAAEC,MAAM,aAAa,EAAE,GAAGqB,WAAW,EAC/C,GAAGtB;QAEJ,MAAMuB,QAAQ,IAAIhC,MAAM+B;QAExB,OAAO;YACLJ,MAAM;YACND;YACAzB;YACAgC,cAAc/B,gBAAgB;gBAAE8B;YAAM;YACtCE,cAAc/B,gBAAgB;gBAAEO;gBAAKsB;YAAM;YAC3CG,eAAe/B,WAAW;gBAAE4B;YAAM;QACpC;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staticHandler.d.ts","sourceRoot":"","sources":["../src/staticHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAE3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAI/C,KAAK,IAAI,GAAG;IACV,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,eAAO,MAAM,UAAU,cAAe,IAAI,KAAG,
|
|
1
|
+
{"version":3,"file":"staticHandler.d.ts","sourceRoot":"","sources":["../src/staticHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAE3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAI/C,KAAK,IAAI,GAAG;IACV,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,eAAO,MAAM,UAAU,cAAe,IAAI,KAAG,aAuE5C,CAAA"}
|
package/dist/staticHandler.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/staticHandler.ts"],"sourcesContent":["import type { StaticHandler } from '@payloadcms/plugin-cloud-storage/types'\nimport type { Where } from 'payload'\nimport type { UTApi } from 'uploadthing/server'\n\nimport { getKeyFromFilename } from './utilities.js'\n\ntype Args = {\n utApi: UTApi\n}\n\nexport const getHandler = ({ utApi }: Args): StaticHandler => {\n return async (req, { doc, params: { collection, filename } }) => {\n try {\n const collectionConfig = req.payload.collections[collection]?.config\n let retrievedDoc = doc\n\n if (!retrievedDoc) {\n const or: Where[] = [\n {\n filename: {\n equals: filename,\n },\n },\n ]\n\n if (collectionConfig.upload.imageSizes) {\n collectionConfig.upload.imageSizes.forEach(({ name }) => {\n or.push({\n [`sizes.${name}.filename`]: {\n equals: filename,\n },\n })\n })\n }\n\n const result = await req.payload.db.findOne({\n collection,\n req,\n where: { or },\n })\n\n if (result) retrievedDoc = result\n }\n\n if (!retrievedDoc) {\n return new Response(null, { status: 404, statusText: 'Not Found' })\n }\n\n const key = getKeyFromFilename(retrievedDoc, filename)\n if (!key) {\n return new Response(null, { status: 404, statusText: 'Not Found' })\n }\n\n const { url: signedURL } = await utApi.getSignedURL(key)\n\n if (!signedURL) {\n return new Response(null, { status: 404, statusText: 'Not Found' })\n }\n\n const response = await fetch(signedURL)\n\n if (!response.ok) {\n return new Response(null, { status: 404, statusText: 'Not Found' })\n }\n\n const blob = await response.blob()\n\n return new Response(blob, {\n headers: new Headers({\n 'Content-Length': String(blob.size),\n 'Content-Type': blob.type,\n }),\n status: 200,\n })\n } catch (err) {\n req.payload.logger.error({ err, msg: 'Unexpected error in staticHandler' })\n return new Response('Internal Server Error', { status: 500 })\n }\n }\n}\n"],"names":["getKeyFromFilename","getHandler","utApi","req","doc","params","collection","filename","collectionConfig","payload","collections","config","retrievedDoc","or","equals","upload","imageSizes","forEach","name","push","result","db","findOne","where","Response","status","statusText","key","url","signedURL","getSignedURL","response","fetch","ok","blob","headers","Headers","String","size","type","err","logger","error","msg"],"mappings":"AAIA,SAASA,kBAAkB,QAAQ,iBAAgB;AAMnD,OAAO,MAAMC,aAAa,CAAC,EAAEC,KAAK,EAAQ;IACxC,OAAO,OAAOC,KAAK,EAAEC,GAAG,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,EAAE,EAAE;QAC1D,IAAI;YACF,MAAMC,mBAAmBL,IAAIM,OAAO,CAACC,WAAW,CAACJ,WAAW,EAAEK;YAC9D,IAAIC,eAAeR;YAEnB,IAAI,CAACQ,cAAc;gBACjB,MAAMC,KAAc;oBAClB;wBACEN,UAAU;4BACRO,QAAQP;wBACV;oBACF;iBACD;gBAED,IAAIC,iBAAiBO,MAAM,CAACC,UAAU,EAAE;oBACtCR,iBAAiBO,MAAM,CAACC,UAAU,CAACC,OAAO,CAAC,CAAC,EAAEC,IAAI,EAAE;wBAClDL,GAAGM,IAAI,CAAC;4BACN,CAAC,CAAC,MAAM,EAAED,KAAK,SAAS,CAAC,CAAC,EAAE;gCAC1BJ,QAAQP;4BACV;wBACF;oBACF;gBACF;gBAEA,MAAMa,SAAS,MAAMjB,IAAIM,OAAO,CAACY,EAAE,CAACC,OAAO,CAAC;oBAC1ChB;oBACAH;oBACAoB,OAAO;wBAAEV;oBAAG;gBACd;gBAEA,IAAIO,
|
|
1
|
+
{"version":3,"sources":["../src/staticHandler.ts"],"sourcesContent":["import type { StaticHandler } from '@payloadcms/plugin-cloud-storage/types'\nimport type { Where } from 'payload'\nimport type { UTApi } from 'uploadthing/server'\n\nimport { getKeyFromFilename } from './utilities.js'\n\ntype Args = {\n utApi: UTApi\n}\n\nexport const getHandler = ({ utApi }: Args): StaticHandler => {\n return async (req, { doc, params: { collection, filename } }) => {\n try {\n const collectionConfig = req.payload.collections[collection]?.config\n let retrievedDoc = doc\n\n if (!retrievedDoc) {\n const or: Where[] = [\n {\n filename: {\n equals: filename,\n },\n },\n ]\n\n if (collectionConfig.upload.imageSizes) {\n collectionConfig.upload.imageSizes.forEach(({ name }) => {\n or.push({\n [`sizes.${name}.filename`]: {\n equals: filename,\n },\n })\n })\n }\n\n const result = await req.payload.db.findOne({\n collection,\n req,\n where: { or },\n })\n\n if (result) {\n retrievedDoc = result\n }\n }\n\n if (!retrievedDoc) {\n return new Response(null, { status: 404, statusText: 'Not Found' })\n }\n\n const key = getKeyFromFilename(retrievedDoc, filename)\n if (!key) {\n return new Response(null, { status: 404, statusText: 'Not Found' })\n }\n\n const { url: signedURL } = await utApi.getSignedURL(key)\n\n if (!signedURL) {\n return new Response(null, { status: 404, statusText: 'Not Found' })\n }\n\n const response = await fetch(signedURL)\n\n if (!response.ok) {\n return new Response(null, { status: 404, statusText: 'Not Found' })\n }\n\n const blob = await response.blob()\n\n return new Response(blob, {\n headers: new Headers({\n 'Content-Length': String(blob.size),\n 'Content-Type': blob.type,\n }),\n status: 200,\n })\n } catch (err) {\n req.payload.logger.error({ err, msg: 'Unexpected error in staticHandler' })\n return new Response('Internal Server Error', { status: 500 })\n }\n }\n}\n"],"names":["getKeyFromFilename","getHandler","utApi","req","doc","params","collection","filename","collectionConfig","payload","collections","config","retrievedDoc","or","equals","upload","imageSizes","forEach","name","push","result","db","findOne","where","Response","status","statusText","key","url","signedURL","getSignedURL","response","fetch","ok","blob","headers","Headers","String","size","type","err","logger","error","msg"],"mappings":"AAIA,SAASA,kBAAkB,QAAQ,iBAAgB;AAMnD,OAAO,MAAMC,aAAa,CAAC,EAAEC,KAAK,EAAQ;IACxC,OAAO,OAAOC,KAAK,EAAEC,GAAG,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,EAAE,EAAE;QAC1D,IAAI;YACF,MAAMC,mBAAmBL,IAAIM,OAAO,CAACC,WAAW,CAACJ,WAAW,EAAEK;YAC9D,IAAIC,eAAeR;YAEnB,IAAI,CAACQ,cAAc;gBACjB,MAAMC,KAAc;oBAClB;wBACEN,UAAU;4BACRO,QAAQP;wBACV;oBACF;iBACD;gBAED,IAAIC,iBAAiBO,MAAM,CAACC,UAAU,EAAE;oBACtCR,iBAAiBO,MAAM,CAACC,UAAU,CAACC,OAAO,CAAC,CAAC,EAAEC,IAAI,EAAE;wBAClDL,GAAGM,IAAI,CAAC;4BACN,CAAC,CAAC,MAAM,EAAED,KAAK,SAAS,CAAC,CAAC,EAAE;gCAC1BJ,QAAQP;4BACV;wBACF;oBACF;gBACF;gBAEA,MAAMa,SAAS,MAAMjB,IAAIM,OAAO,CAACY,EAAE,CAACC,OAAO,CAAC;oBAC1ChB;oBACAH;oBACAoB,OAAO;wBAAEV;oBAAG;gBACd;gBAEA,IAAIO,QAAQ;oBACVR,eAAeQ;gBACjB;YACF;YAEA,IAAI,CAACR,cAAc;gBACjB,OAAO,IAAIY,SAAS,MAAM;oBAAEC,QAAQ;oBAAKC,YAAY;gBAAY;YACnE;YAEA,MAAMC,MAAM3B,mBAAmBY,cAAcL;YAC7C,IAAI,CAACoB,KAAK;gBACR,OAAO,IAAIH,SAAS,MAAM;oBAAEC,QAAQ;oBAAKC,YAAY;gBAAY;YACnE;YAEA,MAAM,EAAEE,KAAKC,SAAS,EAAE,GAAG,MAAM3B,MAAM4B,YAAY,CAACH;YAEpD,IAAI,CAACE,WAAW;gBACd,OAAO,IAAIL,SAAS,MAAM;oBAAEC,QAAQ;oBAAKC,YAAY;gBAAY;YACnE;YAEA,MAAMK,WAAW,MAAMC,MAAMH;YAE7B,IAAI,CAACE,SAASE,EAAE,EAAE;gBAChB,OAAO,IAAIT,SAAS,MAAM;oBAAEC,QAAQ;oBAAKC,YAAY;gBAAY;YACnE;YAEA,MAAMQ,OAAO,MAAMH,SAASG,IAAI;YAEhC,OAAO,IAAIV,SAASU,MAAM;gBACxBC,SAAS,IAAIC,QAAQ;oBACnB,kBAAkBC,OAAOH,KAAKI,IAAI;oBAClC,gBAAgBJ,KAAKK,IAAI;gBAC3B;gBACAd,QAAQ;YACV;QACF,EAAE,OAAOe,KAAK;YACZrC,IAAIM,OAAO,CAACgC,MAAM,CAACC,KAAK,CAAC;gBAAEF;gBAAKG,KAAK;YAAoC;YACzE,OAAO,IAAInB,SAAS,yBAAyB;gBAAEC,QAAQ;YAAI;QAC7D;IACF;AACF,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/storage-uploadthing",
|
|
3
|
-
"version": "3.0.0-canary.
|
|
3
|
+
"version": "3.0.0-canary.96477cf",
|
|
4
4
|
"description": "Payload storage adapter for uploadthing",
|
|
5
5
|
"homepage": "https://payloadcms.com",
|
|
6
6
|
"repository": {
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"uploadthing": "^6.10.1",
|
|
28
|
-
"@payloadcms/plugin-cloud-storage": "3.0.0-canary.
|
|
28
|
+
"@payloadcms/plugin-cloud-storage": "3.0.0-canary.96477cf"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"payload": "3.0.0-canary.
|
|
31
|
+
"payload": "3.0.0-canary.96477cf"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"payload": "3.0.0-canary.
|
|
34
|
+
"payload": "3.0.0-canary.96477cf"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": "^18.20.2 || >=20.9.0"
|
|
@@ -41,6 +41,8 @@
|
|
|
41
41
|
"build:clean": "find . \\( -type d \\( -name build -o -name dist -o -name .cache \\) -o -type f -name tsconfig.tsbuildinfo \\) -exec rm -rf {} + && pnpm build",
|
|
42
42
|
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
|
43
43
|
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
44
|
-
"clean": "rimraf {dist,*.tsbuildinfo}"
|
|
44
|
+
"clean": "rimraf {dist,*.tsbuildinfo}",
|
|
45
|
+
"lint": "eslint .",
|
|
46
|
+
"lint:fix": "eslint . --fix"
|
|
45
47
|
}
|
|
46
48
|
}
|