openmindlab / sfcc-dts

High quality Salesforce Commerce Cloud (sfcc) type definitions
MIT License
21 stars 1 forks source link

Error when generating types: some attribute names contain spaces #14

Open brigon-clever-age opened 1 year ago

brigon-clever-age commented 1 year ago

Hi there !

When generating types using sfcc-dts-setup or sfcc-dts-updateattrs, the attrs.d.ts contains attributes with spaces in names:

image

brigon-clever-age commented 1 year ago

I created a PR to fix the issue. The PR also adds command line arguments to allow specifying meta path and cartridge path (to use sfcc-dts-setup or sfcc-dts-updateattrs from a CI for example)

npm run sfcc-dts-setup -- --cartridgePath ./cartridges/ --metaPath ./site-meta/meta/