@techspokes/typescript-wsdl-client 1.1.2 → 1.1.4

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/README.md CHANGED
@@ -228,6 +228,8 @@ See [CLI Reference](docs/cli-reference.md) for all flags and examples.
228
228
  | [Production Guide](docs/production.md) | CI/CD, validation, logging |
229
229
  | [Troubleshooting](docs/troubleshooting.md) | Common issues and debugging |
230
230
  | [Release Notes](docs/releases/README.md) | Per-version GitHub release notes used by the draft release workflow |
231
+ | [v1.1.4 Release Notes](docs/releases/v1.1.4.md) | Named SOAP imports and compiled-client coverage on Node 24 and 26 |
232
+ | [v1.1.3 Release Notes](docs/releases/v1.1.3.md) | Dependency security updates and Node 24 development alignment |
231
233
  | [v1.1.2 Release Notes](docs/releases/v1.1.2.md) | Sequence occurrence bounds and singleton SOAP response normalization |
232
234
  | [v1.1.1 Release Notes](docs/releases/v1.1.1.md) | Wrapping sequence occurrence bounds and generated array contracts |
233
235
  | [v1.1.0 Release Notes](docs/releases/v1.1.0.md) | Automatic generated TypeScript preambles and consumer lint guidance |
@@ -529,10 +529,10 @@ function generatePackageJson(appDir, force) {
529
529
  fastify: "^5.12.5",
530
530
  "fastify-plugin": "^6.0.0",
531
531
  saxes: "^6.0.0",
532
- soap: "^1.13.1",
532
+ soap: "^1.13.3",
533
533
  },
534
534
  devDependencies: {
535
- "@types/node": "^26.6.2",
535
+ "@types/node": "^26.6.4",
536
536
  tsx: "^4.23.15",
537
537
  typescript: "^6.0.3",
538
538
  },
@@ -1 +1 @@
1
- {"version":3,"file":"generateClient.d.ts","sourceRoot":"","sources":["../../src/client/generateClient.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,+BAA+B,CAAC;AAKnE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,QAkaxE"}
1
+ {"version":3,"file":"generateClient.d.ts","sourceRoot":"","sources":["../../src/client/generateClient.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,+BAA+B,CAAC;AAKnE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,QA+axE"}
@@ -56,6 +56,16 @@ export function generateClient(outFile, compiled) {
56
56
  // get the class name for the client
57
57
  const clientName = deriveClientName(compiled);
58
58
  const clientConstant = pascalToSnakeCase(clientName).toUpperCase();
59
+ // Explicit client-name overrides can match a SOAP export. Alias only that
60
+ // import so the generated class keeps its public name.
61
+ const soapImport = (name) => {
62
+ const local = name === clientName ? `Soap${pascal(name)}` : name;
63
+ return { local, specifier: local === name ? name : `${name} as ${local}` };
64
+ };
65
+ const soapClient = soapImport("Client");
66
+ const soapOptions = soapImport("IOptions");
67
+ const soapSecurity = soapImport("ISecurity");
68
+ const soapFactory = soapImport("createClientAsync");
59
69
  // Track whether any operation opts into streaming, so we can emit the
60
70
  // supporting runtime helpers only when they're actually used.
61
71
  let anyStream = false;
@@ -133,7 +143,9 @@ export function generateClient(outFile, compiled) {
133
143
  // *.tpl file so the IDE does not try to parse their content as code nested
134
144
  // inside this template literal (which would flag `this`, `await`, `yield`
135
145
  // outside-of-function false positives).
136
- const streamMethodsBlock = anyStream ? "\n" + loadRuntimeSource("clientStreamMethods.tpl.txt") : "";
146
+ const streamMethodsBlock = anyStream
147
+ ? "\n" + loadRuntimeSource("clientStreamMethods.tpl.txt").replace("__SOAP_CLIENT_TYPE__", soapClient.local)
148
+ : "";
137
149
  // noinspection JSFileReferences,JSUnresolvedReference,CommaExpressionJS,JSDuplicatedDeclaration,ReservedWordAsName,JSCommentMatchesSignature,JSValidateTypes,JSIgnoredPromiseFromCall,BadExpressionStatementJS,ES6UnusedImports,JSUnnecessarySemicolon,UnreachableCodeJS,JSUnusedLocalSymbols
138
150
  const classTemplate = `// noinspection JSAnnotator
139
151
 
@@ -141,7 +153,8 @@ export function generateClient(outFile, compiled) {
141
153
  * Generated ${clientName} client class.
142
154
  * This class wraps the node-soap client and provides strongly-typed methods for each operation.
143
155
  */
144
- import * as soap from "soap";
156
+ import {${soapFactory.specifier}} from "soap";
157
+ import type {${soapClient.specifier}, ${soapOptions.specifier}, ${soapSecurity.specifier}} from "soap";
145
158
  import type * as T from "./types${suffix}";
146
159
  import type {${clientName}DataTypes} from "./utils${suffix}";
147
160
  import {${clientConstant}_DATA_TYPES} from "./utils${suffix}";${anyStream ? `
@@ -195,11 +208,11 @@ export type ${clientName}Response<ResponseType, HeadersType = Record<string, unk
195
208
  */
196
209
  export class ${clientName} {
197
210
  protected source: string;
198
- protected options?: soap.IOptions;
199
- protected security?: soap.ISecurity;
211
+ protected options?: ${soapOptions.local};
212
+ protected security?: ${soapSecurity.local};
200
213
  protected attributesKeyIn: string;
201
214
  protected attributesKeyOut: string;
202
- protected client?: soap.Client;
215
+ protected client?: ${soapClient.local};
203
216
  protected dataTypes: ${clientName}DataTypes = ${clientConstant}_DATA_TYPES;
204
217
 
205
218
  /**
@@ -214,8 +227,8 @@ export class ${clientName} {
214
227
  */
215
228
  constructor(options: {
216
229
  source: string,
217
- options?: soap.IOptions,
218
- security?: soap.ISecurity,
230
+ options?: ${soapOptions.local},
231
+ security?: ${soapSecurity.local},
219
232
  attributesKeyIn?: string,
220
233
  attributesKeyOut?: string
221
234
  }) {
@@ -237,7 +250,7 @@ export class ${clientName} {
237
250
  * @returns The initialized SOAP client instance.
238
251
  * @throws Error if the WSDL source is invalid or client creation fails.
239
252
  */
240
- async soapClient(): Promise<soap.Client> {
253
+ async soapClient(): Promise<${soapClient.local}> {
241
254
  // If client is not initialized or has no WSDL source, create a new one
242
255
  if (!this.client || !this.client.wsdl) {
243
256
  // Note: source can be a URL or a local WSDL file path
@@ -246,7 +259,7 @@ export class ${clientName} {
246
259
  }
247
260
  try {
248
261
  // Create the SOAP client using the provided source and options
249
- this.client = await soap.createClientAsync(this.source, this.options || {});
262
+ this.client = await ${soapFactory.local}(this.source, this.options || {});
250
263
  if (this.security) {
251
264
  this.client.setSecurity(this.security);
252
265
  }
@@ -106,6 +106,10 @@ See ESLint's [ignore documentation](https://eslint.org/docs/latest/use/configure
106
106
 
107
107
  ## Client Construction
108
108
 
109
+ Generated clients import `createClientAsync` from `soap` at runtime and use type-only imports for `Client`,
110
+ `IOptions`, and `ISecurity`. Imports are aliased when a generated client class uses the same name.
111
+ Type-only imports are erased from JavaScript; install `soap` as a runtime dependency for the client factory.
112
+
109
113
  ```typescript
110
114
  import soap from "soap";
111
115
  import { Weather } from "./src/services/weather/client.js";
@@ -0,0 +1,36 @@
1
+ # TypeScript WSDL Client v1.1.3
2
+
3
+ ## Updated dependencies for clients and gateways
4
+
5
+ This patch refreshes runtime and development dependencies and aligns generated app dependency ranges. See the [project overview](../../README.md) for the generation pipeline.
6
+
7
+ ## What This Improves
8
+
9
+ The refreshed dependency tree addresses upstream HTTP transport, URI normalization, brace expansion, and source map advisories. Generated applications use the updated SOAP runtime range, and local development selects the supported Node 24 floor.
10
+
11
+ The compiler remains on TypeScript 6 to preserve compatibility with the lint tooling and compiler API validators. Generated client and gateway contracts remain unchanged.
12
+
13
+ ## Highlights
14
+
15
+ - Refresh compatible runtime, development, and transitive dependencies.
16
+ - Align generated app SOAP runtime and Node type dependency ranges with the root package.
17
+ - Replace the stale Node 20 development pin with Node 24.
18
+ - Retain TypeScript 6 and the existing Node 24 minimum.
19
+
20
+ ## Upgrade Notes
21
+
22
+ Update the package and refresh your dependency lockfile. Existing applications can update their SOAP runtime dependencies directly; regenerating an app scaffold preserves existing files unless explicitly forced.
23
+
24
+ TypeScript 7 is excluded from this release. No generated API or configuration migration is required.
25
+
26
+ ## Validation
27
+
28
+ - Full, production-only, and fresh generated app dependency audits report zero vulnerabilities.
29
+ - Node 26 compatibility checks passed with 423 unit tests and pipeline generation and typecheck.
30
+ - Full CI includes unit, snapshot, integration, conformance, and pipeline smoke checks.
31
+ - Installed package checks exercise consumer generation, type contracts, and real local SOAP transport.
32
+ - Release preflight verifies package contents, dependency alignment, and the agent skill ZIP and checksums.
33
+
34
+ ## Notes
35
+
36
+ Release tag: `v1.1.3`.
@@ -0,0 +1,36 @@
1
+ # TypeScript WSDL Client v1.1.4
2
+
3
+ ## Explicit SOAP imports in generated clients
4
+
5
+ This patch replaces generated SOAP namespace imports with named runtime imports and explicit type-only imports. See the [project overview](../../README.md) for the generation pipeline.
6
+
7
+ ## What This Improves
8
+
9
+ Generated clients compile with strict NodeNext and verbatim module syntax while importing only the SOAP runtime function they use. Custom client names that match SOAP exports receive local aliases, so client generation stays valid for names such as `Client`, `IOptions`, `ISecurity`, and `createClientAsync`.
10
+
11
+ Buffered and streamed clients retain their existing behavior. Integration tests now have a dedicated typecheck, and both Node 24 and Node 26 CI exercise compiled generated clients.
12
+
13
+ ## Highlights
14
+
15
+ - Generate a named `createClientAsync` import and type-only `Client`, `IOptions`, and `ISecurity` imports.
16
+ - Alias SOAP imports when a custom generated client name would collide with an imported identifier.
17
+ - Validate buffered and streamed clients against the actual SOAP declarations and Node runtime.
18
+ - Typecheck integration tests and run compiled-client coverage in Node 26 CI.
19
+
20
+ ## Upgrade Notes
21
+
22
+ Update the package and regenerate clients to receive the new imports. No generated API or configuration migration is required.
23
+
24
+ Updates from v1.1.2 also include the dependency security maintenance prepared in v1.1.3. TypeScript remains on the maintained 6.x line, and Node 24 remains the minimum supported runtime.
25
+
26
+ ## Validation
27
+
28
+ - Full CI passed with 662 unit, snapshot, integration, and conformance tests.
29
+ - Buffered and streamed generated clients compile and execute under Node 24 and Node 26 checks.
30
+ - Installed package checks validate 73 generated TypeScript artifacts and exercise local SOAP transport.
31
+ - Release preflight validates package contents, dependency alignment, generated examples, and workflow gates.
32
+ - The agent skill ZIP and checksum manifest are validated and packaged.
33
+
34
+ ## Notes
35
+
36
+ Release tag: `v1.1.4`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techspokes/typescript-wsdl-client",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Turn legacy WSDL/SOAP services into typed TypeScript clients, OpenAPI 3.1 specs, and production-ready Fastify REST gateways. Built for enterprise SOAP modernization.",
5
5
  "keywords": [
6
6
  "wsdl",
@@ -67,6 +67,7 @@
67
67
  "clean:tmp": "rimraf tmp",
68
68
  "build": "tsc -p tsconfig.json",
69
69
  "typecheck": "tsc --noEmit",
70
+ "typecheck:integration": "tsc -p test/integration/tsconfig.json",
70
71
  "test": "vitest run",
71
72
  "test:unit": "vitest run test/unit",
72
73
  "test:snap": "vitest run test/snapshot",
@@ -99,31 +100,31 @@
99
100
  "package:smoke": "node scripts/smoke-npm-package.mjs",
100
101
  "release:preflight": "node scripts/release-preflight.mjs",
101
102
  "release:publish-check": "npm run clean && npm run build && npm run typecheck && npm run skill:validate && npm run package:validate",
102
- "ci": "npm run clean && npm run build && npm run typecheck && npm run skill:validate && npm run package:validate && npm run docs:validate && vitest run && npm run smoke:pipeline && npm run package:smoke",
103
- "ci:github": "npm run clean && npm run build && npm run typecheck && npm run skill:validate && npm run package:validate && npm run docs:validate && npm run test:github && npm run smoke:pipeline",
104
- "ci:github:node26": "npm run clean && npm run build && npm run typecheck && npm run test:unit && npm run smoke:pipeline",
103
+ "ci": "npm run clean && npm run build && npm run typecheck && npm run typecheck:integration && npm run skill:validate && npm run package:validate && npm run docs:validate && vitest run && npm run smoke:pipeline && npm run package:smoke",
104
+ "ci:github": "npm run clean && npm run build && npm run typecheck && npm run typecheck:integration && npm run skill:validate && npm run package:validate && npm run docs:validate && npm run test:github && npm run smoke:pipeline",
105
+ "ci:github:node26": "npm run clean && npm run build && npm run typecheck && npm run typecheck:integration && npm run test:unit && vitest run test/integration/client-imports.test.ts && npm run smoke:pipeline",
105
106
  "examples:regenerate": "tsx src/cli.ts pipeline --wsdl-source examples/minimal/weather.wsdl --client-dir examples/generated-output/client --openapi-file examples/generated-output/openapi.json --gateway-dir examples/generated-output/gateway --gateway-service-name weather --gateway-version-prefix v1 --openapi-format json"
106
107
  },
107
108
  "devDependencies": {
108
109
  "@eslint/js": "^10.0.1",
109
110
  "@types/js-yaml": "^4.0.9",
110
- "@types/node": "^26.6.2",
111
+ "@types/node": "^26.6.4",
111
112
  "@types/yargs": "^17.0.35",
112
- "eslint": "^10.11.0",
113
+ "eslint": "^10.12.0",
113
114
  "fastify": "^5.12.5",
114
115
  "fastify-plugin": "^6.0.0",
115
116
  "rimraf": "^6.1.3",
116
117
  "tsx": "^4.23.15",
117
118
  "typescript": "^6.0.3",
118
- "typescript-eslint": "^8.70.1",
119
- "vitest": "^5.0.2"
119
+ "typescript-eslint": "^8.71.1",
120
+ "vitest": "^5.0.3"
120
121
  },
121
122
  "dependencies": {
122
123
  "@apidevtools/swagger-parser": "^13.1.0",
123
- "fast-xml-parser": "^5.11.1",
124
- "js-yaml": "^5.4.2",
124
+ "fast-xml-parser": "^5.11.2",
125
+ "js-yaml": "^5.4.3",
125
126
  "saxes": "^6.0.0",
126
- "soap": "^1.13.1",
127
+ "soap": "^1.13.3",
127
128
  "yargs": "^18.2.0"
128
129
  },
129
130
  "funding": {
@@ -60,7 +60,7 @@
60
60
  * SOAP address. Falls back to the \`source\` URL when the descriptor is
61
61
  * unavailable (e.g., \`source\` was given as a direct endpoint URL).
62
62
  */
63
- protected resolveStreamEndpoint(client: soap.Client): string {
63
+ protected resolveStreamEndpoint(client: __SOAP_CLIENT_TYPE__): string {
64
64
  const services = (client as any)?.wsdl?.definitions?.services ?? {};
65
65
  for (const svc of Object.values(services)) {
66
66
  const ports = (svc as any)?.ports ?? {};