nestjs-httpf 0.1.0 → 0.1.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.
Files changed (3) hide show
  1. package/LICENSE +60 -2
  2. package/README.md +33 -16
  3. package/package.json +5 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020-2022 Kamil Mysliwiec
3
+ Copyright (c) 2026 seonzoo
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,62 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ THIRD-PARTY LICENSES
26
+
27
+ This project includes or depends on the following third-party software:
28
+
29
+ ================================================================================
30
+ @fxts/core - Apache License 2.0
31
+ ================================================================================
32
+
33
+ Copyright (c) Marpple Corporation
34
+
35
+ Licensed under the Apache License, Version 2.0 (the "License");
36
+ you may not use this file except in compliance with the License.
37
+ You may obtain a copy of the License at
38
+
39
+ http://www.apache.org/licenses/LICENSE-2.0
40
+
41
+ Unless required by applicable law or agreed to in writing, software
42
+ distributed under the License is distributed on an "AS IS" BASIS,
43
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44
+ See the License for the specific language governing permissions and
45
+ limitations under the License.
46
+
47
+ IMPORTANT NOTICE FOR USERS:
48
+ When using nestjs-httpf, you are also using @fxts/core which is licensed under
49
+ Apache-2.0. This means you must comply with the Apache-2.0 license terms,
50
+ including:
51
+
52
+ - Providing attribution to the original authors
53
+ - Including a copy of the Apache-2.0 license when distributing
54
+ - Stating any modifications made to the @fxts/core code
55
+ - Preserving any NOTICE files from @fxts/core
56
+
57
+ ================================================================================
58
+ got - MIT License
59
+ ================================================================================
60
+
61
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
62
+
63
+ Permission is hereby granted, free of charge, to any person obtaining a copy
64
+ of this software and associated documentation files (the "Software"), to deal
65
+ in the Software without restriction, including without limitation the rights
66
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
67
+ copies of the Software, and to permit persons to whom the Software is
68
+ furnished to do so, subject to the following conditions:
69
+
70
+ The above copyright notice and this permission notice shall be included in all
71
+ copies or substantial portions of the Software.
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
75
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
76
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
77
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
78
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
79
+ SOFTWARE.
package/README.md CHANGED
@@ -70,7 +70,7 @@ export class UserService {
70
70
  async getUser(id: string) {
71
71
  const user = await this.httpfService
72
72
  .get<User>(`https://api.example.com/users/${id}`)
73
- .map((response) => response.body)
73
+ .chain(pluck('body'))
74
74
  .head();
75
75
 
76
76
  return user;
@@ -86,7 +86,7 @@ export class UserService {
86
86
  // GET request
87
87
  const data = await this.httpfService
88
88
  .get<{ message: string }>('https://api.example.com/hello')
89
- .map((response) => response.body)
89
+ .chain(pluck('body'))
90
90
  .head();
91
91
 
92
92
  // POST request
@@ -94,25 +94,21 @@ const result = await this.httpfService
94
94
  .post<{ id: string }>('https://api.example.com/users', {
95
95
  json: { name: 'John', email: 'john@example.com' },
96
96
  })
97
- .map((response) => response.body)
97
+ .chain(pluck('body'))
98
98
  .head();
99
99
 
100
100
  // PUT request
101
- await this.httpfService
102
- .put('https://api.example.com/users/123', {
103
- json: { name: 'Jane' },
104
- })
105
- .head();
101
+ await this.httpfService.put('https://api.example.com/users/123', {
102
+ json: { name: 'Jane' },
103
+ });
106
104
 
107
105
  // PATCH request
108
- await this.httpfService
109
- .patch('https://api.example.com/users/123', {
110
- json: { email: 'jane@example.com' },
111
- })
112
- .head();
106
+ await this.httpfService.patch('https://api.example.com/users/123', {
107
+ json: { email: 'jane@example.com' },
108
+ });
113
109
 
114
110
  // DELETE request
115
- await this.httpfService.delete('https://api.example.com/users/123').head();
111
+ await this.httpfService.delete('https://api.example.com/users/123');
116
112
  ```
117
113
 
118
114
  ### Error Handling
@@ -307,11 +303,32 @@ export class AppModule {}
307
303
 
308
304
  #### FxTS Methods and Helper Functions
309
305
 
310
- See the [FxTS documentation](https://fxts.dev/docs/index) for more information.
306
+ See the [FxTS documentation](https://fxts.dev/api) for more information.
311
307
 
312
308
  ## License
313
309
 
314
- [MIT](LICENSE)
310
+ This project is licensed under the [MIT License](LICENSE).
311
+
312
+ ### Third-Party Licenses
313
+
314
+ This project uses the following third-party libraries:
315
+
316
+ | Library | License |
317
+ | ------------------------------------------------ | ---------- |
318
+ | [@fxts/core](https://github.com/marpple/FxTS) | Apache-2.0 |
319
+ | [got](https://github.com/sindresorhus/got) | MIT |
320
+ | [@nestjs/common](https://github.com/nestjs/nest) | MIT |
321
+
322
+ #### Apache-2.0 License Notice
323
+
324
+ This project depends on `@fxts/core` which is licensed under the Apache License 2.0. When using this library, you must comply with the Apache-2.0 license terms for `@fxts/core`, which include:
325
+
326
+ - **Attribution**: You must give appropriate credit and include a copy of the Apache-2.0 license
327
+ - **State Changes**: If you modify `@fxts/core`, you must state the changes made
328
+ - **NOTICE Preservation**: If `@fxts/core` includes a NOTICE file, you must include it in your distribution
329
+ - **Patent Grant**: Apache-2.0 includes an express grant of patent rights from contributors
330
+
331
+ For the full Apache-2.0 license text, see: https://www.apache.org/licenses/LICENSE-2.0
315
332
 
316
333
  ## Contributing
317
334
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestjs-httpf",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "keywords": [
5
5
  "nestjs",
6
6
  "http",
@@ -83,5 +83,9 @@
83
83
  },
84
84
  "dependencies": {
85
85
  "got": "^11.8.6"
86
+ },
87
+ "repository": {
88
+ "type": "git",
89
+ "url": "https://github.com/boy672820/nestjs-httpf"
86
90
  }
87
91
  }