@navios/adapter-xml 0.7.0 → 0.8.0
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 +23 -0
- package/bun-plugin.mts +19 -8
- package/bunPlugin.cache +1 -1
- package/dist/src/adapters/xml-stream-adapter.service.d.mts +4 -2
- package/dist/src/adapters/xml-stream-adapter.service.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/e2e/bun/xml-stream.spec.tsx +2 -3
- package/lib/{create-element-CTOxv6Df.cjs → create-element-DiOt_-Vs.cjs} +6 -6
- package/lib/{create-element-CTOxv6Df.cjs.map → create-element-DiOt_-Vs.cjs.map} +1 -1
- package/lib/index.cjs +86 -33
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +3 -2
- package/lib/index.d.cts.map +1 -1
- package/lib/index.d.mts +3 -2
- package/lib/index.d.mts.map +1 -1
- package/lib/index.mjs +80 -27
- package/lib/index.mjs.map +1 -1
- package/lib/jsx-dev-runtime.cjs +1 -1
- package/lib/jsx-runtime.cjs +1 -1
- package/package.json +20 -20
- package/src/adapters/xml-stream-adapter.service.mts +140 -37
- package/dist/tsup.config.d.mts +0 -3
- package/dist/tsup.config.d.mts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,29 @@ 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
|
+
## [0.8.0] - 2025-12-21
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Static/Dynamic Handler Branching**: New handler result types for optimized request handling
|
|
13
|
+
- Always returns dynamic handler due to `renderToXml` requiring ScopedContainer
|
|
14
|
+
- Aligns with `@navios/core` 0.8.0 `HandlerResult` interface
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **Handler Result Types**: `provideHandler()` now returns `Promise<HandlerResult>` instead of direct handler function
|
|
19
|
+
- **Build Tooling**: Switched from `esbuild` to `@swc/core` for transpilation (bun-plugin)
|
|
20
|
+
|
|
21
|
+
### Dependencies
|
|
22
|
+
|
|
23
|
+
- Requires `@navios/core` ^0.8.0
|
|
24
|
+
|
|
25
|
+
## [0.7.1] - 2025-12-20
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- Fixed package.json exports to use correct CommonJS file extensions (`.cjs` and `.d.cts`)
|
|
30
|
+
|
|
8
31
|
## [0.7.0] - 2025-12-18
|
|
9
32
|
|
|
10
33
|
### Added
|
package/bun-plugin.mts
CHANGED
|
@@ -114,18 +114,29 @@ async function transpileFileForReal(
|
|
|
114
114
|
codeTS: string,
|
|
115
115
|
): Promise<string> {
|
|
116
116
|
// Use esbuild with JSX support
|
|
117
|
-
const esbuild = (await import('
|
|
117
|
+
const esbuild = (await import('@swc/core')).default
|
|
118
118
|
|
|
119
119
|
// Determine loader based on file extension and content
|
|
120
|
-
const hasJsx =
|
|
121
|
-
codeTS.includes('<') && (codeTS.includes('/>') || codeTS.includes('</'))
|
|
122
|
-
const loader = hasJsx ? 'tsx' : 'ts'
|
|
123
120
|
|
|
124
121
|
const result = await esbuild.transform(codeTS, {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
122
|
+
filename: name,
|
|
123
|
+
jsc: {
|
|
124
|
+
target: 'es2022',
|
|
125
|
+
parser: {
|
|
126
|
+
syntax: 'typescript',
|
|
127
|
+
decorators: true,
|
|
128
|
+
tsx: name.endsWith('.tsx'),
|
|
129
|
+
},
|
|
130
|
+
transform: {
|
|
131
|
+
decoratorVersion: '2022-03',
|
|
132
|
+
react: name.endsWith('.tsx')
|
|
133
|
+
? {
|
|
134
|
+
importSource: '@navios/adapter-xml',
|
|
135
|
+
runtime: 'automatic',
|
|
136
|
+
}
|
|
137
|
+
: undefined,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
129
140
|
})
|
|
130
141
|
return result.code
|
|
131
142
|
}
|