@navios/adapter-xml 0.8.0 → 1.0.0-alpha.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/CHANGELOG.md +30 -0
- package/README.md +3 -13
- package/bunPlugin.cache +1 -1
- package/dist/src/adapters/xml-stream-adapter.service.d.mts.map +1 -1
- package/dist/src/decorators/xml-stream.decorator.d.mts +26 -70
- package/dist/src/decorators/xml-stream.decorator.d.mts.map +1 -1
- package/dist/src/handlers/xml-stream.d.mts +3 -5
- package/dist/src/handlers/xml-stream.d.mts.map +1 -1
- package/dist/src/types/config.d.mts +9 -5
- package/dist/src/types/config.d.mts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/tsconfig.spec.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/vitest.config.d.mts.map +1 -1
- package/e2e/bun/xml-stream.spec.tsx +1 -18
- package/e2e/fastify/xml-stream.spec.tsx +1 -18
- package/lib/index.cjs +10 -70
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +34 -77
- package/lib/index.d.cts.map +1 -1
- package/lib/index.d.mts +33 -76
- package/lib/index.d.mts.map +1 -1
- package/lib/index.mjs +10 -70
- package/lib/index.mjs.map +1 -1
- package/package.json +9 -9
- package/src/adapters/xml-stream-adapter.service.mts +2 -5
- package/src/decorators/xml-stream.decorator.mts +92 -101
- package/src/handlers/xml-stream.mts +19 -11
- package/src/types/config.mts +19 -10
- package/vitest.config.mts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,36 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.0-alpha.2] - 2026-01-07
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Simplified XmlStreamParams Type**: Refactored `XmlStreamParams<T>` type to use new `RequestArgs` and `Simplify` types from `@navios/builder`
|
|
13
|
+
- Cleaner type inference with support for `urlParamsSchema`
|
|
14
|
+
- Server-side handlers receive `z.output` types (parsed/transformed values)
|
|
15
|
+
- **Updated XmlStream Decorator**: Completely refactored to use `BaseEndpointOptions` from `@navios/builder`
|
|
16
|
+
- Multiple overloads for handlers with/without parameters and reply object
|
|
17
|
+
- Better type inference for endpoint parameters
|
|
18
|
+
- Improved JSDoc documentation
|
|
19
|
+
- **Updated declareXmlStream Function**: Now uses `StreamHandler` type from `@navios/builder`
|
|
20
|
+
- Returns properly typed handler with config attached
|
|
21
|
+
- Better integration with endpoint declaration patterns
|
|
22
|
+
- **New XmlStreamConfig Interface**: Separated config types for better type composition
|
|
23
|
+
- `XmlStreamConfig` extends `BaseEndpointOptions` with XML-specific options
|
|
24
|
+
- `BaseXmlStreamConfig` for backward compatibility with explicit type parameters
|
|
25
|
+
|
|
26
|
+
### Dependencies
|
|
27
|
+
|
|
28
|
+
- Updated to support `@navios/core` ^1.0.0-alpha.2
|
|
29
|
+
- Updated to support `@navios/builder` ^1.0.0-alpha.2
|
|
30
|
+
|
|
31
|
+
## [0.9.0] - 2025-12-23
|
|
32
|
+
|
|
33
|
+
### Dependencies
|
|
34
|
+
|
|
35
|
+
- Updated to support `@navios/core` ^0.9.0
|
|
36
|
+
- Updated to support `@navios/di` ^0.9.0
|
|
37
|
+
|
|
8
38
|
## [0.8.0] - 2025-12-21
|
|
9
39
|
|
|
10
40
|
### Added
|
package/README.md
CHANGED
|
@@ -49,15 +49,8 @@ import { NaviosFactory } from '@navios/core'
|
|
|
49
49
|
import { AppModule } from './app.module.mjs'
|
|
50
50
|
|
|
51
51
|
async function bootstrap() {
|
|
52
|
-
const fastifyEnv = defineFastifyEnvironment()
|
|
53
|
-
const xmlEnv = defineXmlEnvironment()
|
|
54
|
-
|
|
55
|
-
const mergedEnv = {
|
|
56
|
-
httpTokens: new Map([...fastifyEnv.httpTokens, ...xmlEnv.httpTokens]),
|
|
57
|
-
}
|
|
58
|
-
|
|
59
52
|
const app = await NaviosFactory.create(AppModule, {
|
|
60
|
-
adapter:
|
|
53
|
+
adapter: [defineFastifyEnvironment(), defineXmlEnvironment()],
|
|
61
54
|
})
|
|
62
55
|
|
|
63
56
|
await app.init()
|
|
@@ -271,7 +264,7 @@ class LatestPostsComponent implements XmlComponent {
|
|
|
271
264
|
}
|
|
272
265
|
|
|
273
266
|
// Usage in JSX
|
|
274
|
-
|
|
267
|
+
;<channel>
|
|
275
268
|
<LatestPostsComponent />
|
|
276
269
|
</channel>
|
|
277
270
|
```
|
|
@@ -305,10 +298,7 @@ class DescriptionComponent implements XmlComponent {
|
|
|
305
298
|
}
|
|
306
299
|
|
|
307
300
|
// Usage with typed props
|
|
308
|
-
<
|
|
309
|
-
content="<p>HTML content here</p>"
|
|
310
|
-
wrapInCData={true}
|
|
311
|
-
/>
|
|
301
|
+
;<DescriptionComponent content="<p>HTML content here</p>" wrapInCData={true} />
|
|
312
302
|
```
|
|
313
303
|
|
|
314
304
|
#### Rendering with Container
|