ng-openapi 0.0.25-alpha.1 → 0.0.25-alpha.3

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/cli.cjs +9 -4
  2. package/index.js +9 -4
  3. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -419,11 +419,16 @@ var TokenGenerator = class {
419
419
  });
420
420
  sourceFile.addImportDeclaration({
421
421
  namedImports: [
422
- "InjectionToken",
423
- "HttpInterceptor"
422
+ "InjectionToken"
424
423
  ],
425
424
  moduleSpecifier: "@angular/core"
426
425
  });
426
+ sourceFile.addImportDeclaration({
427
+ namedImports: [
428
+ "HttpInterceptor"
429
+ ],
430
+ moduleSpecifier: "@angular/common/http"
431
+ });
427
432
  const basePathTokenName = this.getBasePathTokenName();
428
433
  const interceptorsTokenName = this.getInterceptorsTokenName();
429
434
  sourceFile.addVariableStatement({
@@ -1097,14 +1102,14 @@ var BaseInterceptorGenerator = class {
1097
1102
  returnType: "Observable<HttpEvent<any>>",
1098
1103
  statements: `
1099
1104
  // Only intercept requests to this client's base path
1100
- if (!req.url.startsWith(this.#basePath)) {
1105
+ if (!req.url.startsWith(this.basePath)) {
1101
1106
  return next.handle(req);
1102
1107
  }
1103
1108
 
1104
1109
  // Apply client-specific interceptors in reverse order
1105
1110
  let handler = next;
1106
1111
 
1107
- handler = this.#httpInterceptors.reduceRight(
1112
+ handler = this.httpInterceptors.reduceRight(
1108
1113
  (next, interceptor) => ({
1109
1114
  handle: (request: HttpRequest<any>) => interceptor.intercept(request, next)
1110
1115
  }),
package/index.js CHANGED
@@ -466,11 +466,16 @@ var _TokenGenerator = class _TokenGenerator {
466
466
  });
467
467
  sourceFile.addImportDeclaration({
468
468
  namedImports: [
469
- "InjectionToken",
470
- "HttpInterceptor"
469
+ "InjectionToken"
471
470
  ],
472
471
  moduleSpecifier: "@angular/core"
473
472
  });
473
+ sourceFile.addImportDeclaration({
474
+ namedImports: [
475
+ "HttpInterceptor"
476
+ ],
477
+ moduleSpecifier: "@angular/common/http"
478
+ });
474
479
  const basePathTokenName = this.getBasePathTokenName();
475
480
  const interceptorsTokenName = this.getInterceptorsTokenName();
476
481
  sourceFile.addVariableStatement({
@@ -1140,14 +1145,14 @@ var _BaseInterceptorGenerator = class _BaseInterceptorGenerator {
1140
1145
  returnType: "Observable<HttpEvent<any>>",
1141
1146
  statements: `
1142
1147
  // Only intercept requests to this client's base path
1143
- if (!req.url.startsWith(this.#basePath)) {
1148
+ if (!req.url.startsWith(this.basePath)) {
1144
1149
  return next.handle(req);
1145
1150
  }
1146
1151
 
1147
1152
  // Apply client-specific interceptors in reverse order
1148
1153
  let handler = next;
1149
1154
 
1150
- handler = this.#httpInterceptors.reduceRight(
1155
+ handler = this.httpInterceptors.reduceRight(
1151
1156
  (next, interceptor) => ({
1152
1157
  handle: (request: HttpRequest<any>) => interceptor.intercept(request, next)
1153
1158
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-openapi",
3
- "version": "0.0.25-alpha.1",
3
+ "version": "0.0.25-alpha.3",
4
4
  "description": "Generate Angular services and TypeScript types from OpenAPI/Swagger specifications",
5
5
  "keywords": [
6
6
  "angular",