Skip to content

Commit 99695b6

Browse files
authored
Merge branch 'master' into bugfix/issue-2052
2 parents 43a5786 + a5980fc commit 99695b6

File tree

10 files changed

+1470
-2858
lines changed

10 files changed

+1470
-2858
lines changed

package-lock.json

Lines changed: 1425 additions & 2820 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,27 @@
6060
"docker": "docker build -t eeelenbaas/openapi-typescript-codegen ."
6161
},
6262
"dependencies": {
63-
"@apidevtools/json-schema-ref-parser": "^11.1.0",
63+
"@apidevtools/json-schema-ref-parser": "^11.5.4",
6464
"camelcase": "^6.3.0",
65-
"commander": "^11.1.0",
65+
"commander": "^12.0.0",
6666
"fs-extra": "^11.2.0",
6767
"handlebars": "^4.7.8"
6868
},
6969
"devDependencies": {
70-
"@angular-devkit/build-angular": "17.0.9",
71-
"@angular/animations": "17.0.8",
72-
"@angular/cli": "17.0.9",
73-
"@angular/common": "17.0.8",
74-
"@angular/compiler": "17.0.8",
75-
"@angular/compiler-cli": "17.0.8",
76-
"@angular/core": "17.0.8",
77-
"@angular/forms": "17.0.8",
78-
"@angular/platform-browser": "17.0.8",
79-
"@angular/platform-browser-dynamic": "17.0.8",
80-
"@angular/router": "17.0.8",
70+
"@angular-devkit/build-angular": "17.3.0",
71+
"@angular/animations": "17.3.0",
72+
"@angular/cli": "17.3.0",
73+
"@angular/common": "17.3.0",
74+
"@angular/compiler": "17.3.0",
75+
"@angular/compiler-cli": "17.3.0",
76+
"@angular/core": "17.3.0",
77+
"@angular/forms": "17.3.0",
78+
"@angular/platform-browser": "17.3.0",
79+
"@angular/platform-browser-dynamic": "17.3.0",
80+
"@angular/router": "17.3.0",
8181
"@babel/cli": "7.23.9",
82-
"@babel/core": "7.23.9",
83-
"@babel/preset-env": "7.23.9",
82+
"@babel/core": "7.24.0",
83+
"@babel/preset-env": "7.24.0",
8484
"@babel/preset-typescript": "7.23.3",
8585
"@rollup/plugin-commonjs": "25.0.7",
8686
"@rollup/plugin-node-resolve": "15.2.3",
@@ -91,38 +91,38 @@
9191
"@types/fs-extra": "^11.0.4",
9292
"@types/glob": "8.1.0",
9393
"@types/jest": "29.5.12",
94-
"@types/node": "20.11.17",
95-
"@types/node-fetch": "2.6.10",
96-
"@types/qs": "6.9.11",
97-
"@typescript-eslint/eslint-plugin": "6.21.0",
98-
"@typescript-eslint/parser": "6.21.0",
94+
"@types/node": "20.11.28",
95+
"@types/node-fetch": "2.6.11",
96+
"@types/qs": "6.9.12",
97+
"@typescript-eslint/eslint-plugin": "7.2.0",
98+
"@typescript-eslint/parser": "7.2.0",
9999
"abort-controller": "3.0.0",
100-
"axios": "1.6.7",
100+
"axios": "1.6.8",
101101
"codecov": "3.8.3",
102102
"cross-spawn": "7.0.3",
103-
"eslint": "8.56.0",
103+
"eslint": "8.57.0",
104104
"eslint-config-prettier": "9.1.0",
105105
"eslint-plugin-prettier": "5.1.3",
106-
"eslint-plugin-simple-import-sort": "10.0.0",
107-
"express": "4.18.2",
106+
"eslint-plugin-simple-import-sort": "12.0.0",
107+
"express": "4.18.3",
108108
"form-data": "4.0.0",
109109
"glob": "10.3.10",
110110
"jest": "29.7.0",
111111
"jest-cli": "29.7.0",
112112
"node-fetch": "2.7.0",
113113
"prettier": "3.2.5",
114-
"puppeteer": "21.11.0",
115-
"qs": "6.11.2",
114+
"puppeteer": "22.5.0",
115+
"qs": "6.12.0",
116116
"rimraf": "5.0.5",
117-
"rollup": "4.7.0",
117+
"rollup": "4.13.0",
118118
"rxjs": "7.8.1",
119119
"ts-node": "10.9.2",
120120
"tslib": "2.6.2",
121-
"typescript": "5.2.2",
122-
"zone.js": "0.14.3"
121+
"typescript": "5.4.2",
122+
"zone.js": "0.14.4"
123123
},
124124
"overrides": {
125125
"node-fetch": "2.7.0",
126-
"rollup": "4.7.0"
126+
"rollup": "4.13.0"
127127
}
128128
}

src/templates/core/CancelablePromise.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ export class CancelablePromise<T> implements Promise<T> {
8383
});
8484
}
8585

86-
get [Symbol.toStringTag]() {
87-
return "Cancellable Promise";
88-
}
86+
get [Symbol.toStringTag]() {
87+
return "Cancellable Promise";
88+
}
8989

9090
public then<TResult1 = T, TResult2 = never>(
9191
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,

src/templates/core/angular/getHeaders.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const getHeaders = (config: OpenAPIConfig, options: ApiRequestOptions): O
2626
headers['Authorization'] = `Basic ${credentials}`;
2727
}
2828

29-
if (options.body) {
29+
if (options.body !== undefined) {
3030
if (options.mediaType) {
3131
headers['Content-Type'] = options.mediaType;
3232
} else if (isBlob(options.body)) {

src/templates/core/axios/getHeaders.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
2929
headers['Authorization'] = `Basic ${credentials}`;
3030
}
3131

32-
if (options.body) {
32+
if (options.body !== undefined) {
3333
if (options.mediaType) {
3434
headers['Content-Type'] = options.mediaType;
3535
} else if (isBlob(options.body)) {

src/templates/core/axios/sendRequest.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const sendRequest = async <T>(
1616
data: body ?? formData,
1717
method: options.method,
1818
withCredentials: config.WITH_CREDENTIALS,
19+
withXSRFToken: config.CREDENTIALS === 'include' ? config.WITH_CREDENTIALS : false,
1920
cancelToken: source.token,
2021
};
2122

src/templates/core/fetch/getHeaders.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
2626
headers['Authorization'] = `Basic ${credentials}`;
2727
}
2828

29-
if (options.body) {
29+
if (options.body !== undefined) {
3030
if (options.mediaType) {
3131
headers['Content-Type'] = options.mediaType;
3232
} else if (isBlob(options.body)) {

src/templates/core/node/getHeaders.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
2626
headers['Authorization'] = `Basic ${credentials}`;
2727
}
2828

29-
if (options.body) {
29+
if (options.body !== undefined) {
3030
if (options.mediaType) {
3131
headers['Content-Type'] = options.mediaType;
3232
} else if (isBlob(options.body)) {

src/templates/core/xhr/getHeaders.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
2626
headers['Authorization'] = `Basic ${credentials}`;
2727
}
2828

29-
if (options.body) {
29+
if (options.body !== undefined) {
3030
if (options.mediaType) {
3131
headers['Content-Type'] = options.mediaType;
3232
} else if (isBlob(options.body)) {

test/e2e/scripts/createAngularProject.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ export const createAngularProject = (dir: string, name: string) => {
77
mkdirSync(cwd, {
88
recursive: true,
99
});
10+
11+
sync('ng', ['analytics', 'off', '--global'], {
12+
cwd: resolvePath(cwd),
13+
stdio: 'inherit',
14+
});
15+
1016
sync(
1117
'ng',
1218
[

0 commit comments

Comments
 (0)