nestjs-export-module 1.0.0 → 1.0.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Novatorsoft
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,98 +1,30 @@
1
- <p align="center">
2
- <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
3
- </p>
1
+ <p align="center"><a href="https://novatorsoft.com" target="_blank"><img src="https://os.novatorsoft.com/novatorsoft/dark-logo.png" width="700" alt="Novatorsoft Logo"/></a></p>
4
2
 
5
- [circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
6
- [circleci-url]: https://circleci.com/gh/nestjs/nest
3
+ <h1 align="center">NestJS Export Module</h1>
4
+ <p align="center">A NestJS export module that provides a provider-based abstraction for generating and handling data exports in different formats.</p>
7
5
 
8
- <p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
9
- <p align="center">
10
- <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
11
- <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
12
- <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
13
- <a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
14
- <a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
15
- <a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
16
- <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
17
- <a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a>
18
- <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
19
- <a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a>
6
+ <p align="center">
7
+ <a href="https://sonarcloud.io/summary/overall?id=novatorsoft_nestjs-export-module" target="_blank"><img src="https://sonarcloud.io/api/project_badges/measure?project=novatorsoft_nestjs-export-module&metric=alert_status"/></a>
8
+ <a href="https://sonarcloud.io/summary/overall?id=novatorsoft_nestjs-export-module" target="_blank"><img src="https://sonarcloud.io/api/project_badges/measure?project=novatorsoft_nestjs-export-module&metric=coverage"/></a>
9
+ <a href="https://www.npmjs.com/package/nestjs-export-module" target="_blank"><img src="https://img.shields.io/npm/v/nestjs-export-module.svg" alt="NPM Version" /></a>
10
+ <a href="https://www.npmjs.com/package/nestjs-export-module" target="_blank"><img src="https://img.shields.io/npm/l/nestjs-export-module.svg" alt="Package License" /></a>
11
+ <a href="https://www.npmjs.com/package/nestjs-export-module" target="_blank"><img src="https://img.shields.io/npm/dm/nestjs-export-module.svg" alt="NPM Downloads" /></a>
20
12
  </p>
21
- <!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
22
- [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
23
-
24
- ## Description
25
-
26
- [Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
27
-
28
- ## Project setup
29
-
30
- ```bash
31
- $ yarn install
32
- ```
33
-
34
- ## Compile and run the project
35
-
36
- ```bash
37
- # development
38
- $ yarn run start
39
-
40
- # watch mode
41
- $ yarn run start:dev
42
-
43
- # production mode
44
- $ yarn run start:prod
45
- ```
46
-
47
- ## Run tests
48
13
 
49
- ```bash
50
- # unit tests
51
- $ yarn run test
52
-
53
- # e2e tests
54
- $ yarn run test:e2e
55
-
56
- # test coverage
57
- $ yarn run test:cov
58
- ```
59
-
60
- ## Deployment
61
-
62
- When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.
63
-
64
- If you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
65
-
66
- ```bash
67
- $ yarn install -g @nestjs/mau
68
- $ mau deploy
69
- ```
70
-
71
- With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
72
-
73
- ## Resources
74
-
75
- Check out a few resources that may come in handy when working with NestJS:
76
-
77
- - Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
78
- - For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
79
- - To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
80
- - Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.
81
- - Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
82
- - Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
83
- - To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
84
- - Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).
14
+ <p align="center">
15
+ <a href="https://www.instagram.com/novatorsoft/" target="_blank"><img src="https://img.shields.io/badge/Instagram-E4405F?style=for-the-badge&logo=instagram&logoColor=white" alt="Instagram" /></a>
16
+ <a href="https://www.linkedin.com/company/novatorsoft/" target="_blank"><img src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white" alt="LinkedIn" /></a>
17
+ </p>
85
18
 
86
- ## Support
19
+ ## About
87
20
 
88
- Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
21
+ NestJS Export Module helps you standardize export flows by exposing a single `DataExporterService` API while keeping provider-specific details (such as file format, transformation rules, and output options) configurable.
89
22
 
90
- ## Stay in touch
23
+ ## Documentation
91
24
 
92
- - Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
93
- - Website - [https://nestjs.com](https://nestjs.com/)
94
- - Twitter - [@nestframework](https://twitter.com/nestframework)
25
+ For installation, usage, configuration, and examples, see the documentation:
26
+ - [Documentation](https://opensource.novatorsoft.com/docs/nestjs-export-module/intro)
95
27
 
96
28
  ## License
97
29
 
98
- Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).
30
+ MIT see [LICENSE](./LICENSE).
@@ -74,7 +74,7 @@ let ExcelService = class ExcelService extends data_exporter_base_service_1.DataE
74
74
  result = Object.keys(firstRowData).map((property) => {
75
75
  const columnOption = options?.columnOptions?.[property];
76
76
  return {
77
- header: property,
77
+ header: options?.headersMap?.[property] ?? property,
78
78
  key: property,
79
79
  ...columnOption,
80
80
  };
@@ -1 +1 @@
1
- {"version":3,"file":"excel.service.js","sourceRoot":"","sources":["../../../../src/data-exporter/providers/excel/excel.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AAEnC,+CAA8D;AAE9D,iFAA2E;AAC3E,qCAA8C;AAE9C,iFAAgE;AAChE,2CAA4C;AAIrC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,oDAAuB;IACvD,KAAK,CAAC,WAAW,CACf,cAAmC;QAEnC,MAAM,QAAQ,GAAG,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QACxC,MAAM,SAAS,GAAG,QAAQ,CAAC,YAAY,CACrC,cAAc,CAAC,OAAO,EAAE,SAAS,IAAI,QAAQ,CAC9C,CAAC;QACF,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,CACjC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAC/B,cAAc,CAAC,OAAO,CACvB,CAAC;QACF,SAAS,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QAC/C,OAAO;YACL,QAAQ,EACN,mEAAmE;YACrE,SAAS,EAAE,MAAM;YACjB,IAAI,EAAE,IAAyB;SAChC,CAAC;IACJ,CAAC;IAEO,UAAU,CAChB,YAAoB,EACpB,OAAwC;QAExC,IAAI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