From 7ec986e164d9ab0ab5eb1abb93f2f3e06121bd7e Mon Sep 17 00:00:00 2001 From: William Cheng <wing328hk@gmail.com> Date: Tue, 27 Sep 2022 00:40:07 +0800 Subject: [PATCH 1/4] add node types to fix build failure --- .../src/main/resources/typescript-rxjs/tsconfig.mustache | 3 +++ .../petstore/typescript-rxjs/builds/default/tsconfig.json | 3 +++ .../petstore/typescript-rxjs/builds/es6-target/tsconfig.json | 3 +++ .../typescript-rxjs/builds/with-npm-version/tsconfig.json | 3 +++ .../builds/with-progress-subscriber/tsconfig.json | 3 +++ 5 files changed, 15 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/tsconfig.mustache index 0779a8b0037..3e80f1bf329 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/tsconfig.mustache @@ -1,5 +1,8 @@ { "compilerOptions": { + "types": [ + "node" + ], "declaration": true, "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", "module": "commonjs", diff --git a/samples/client/petstore/typescript-rxjs/builds/default/tsconfig.json b/samples/client/petstore/typescript-rxjs/builds/default/tsconfig.json index 59a60838a05..899a36bb76c 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/tsconfig.json +++ b/samples/client/petstore/typescript-rxjs/builds/default/tsconfig.json @@ -1,5 +1,8 @@ { "compilerOptions": { + "types": [ + "node" + ], "declaration": true, "target": "es5", "module": "commonjs", diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/tsconfig.json b/samples/client/petstore/typescript-rxjs/builds/es6-target/tsconfig.json index 00d4d5cc478..dec3c7d01bb 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/tsconfig.json +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/tsconfig.json @@ -1,5 +1,8 @@ { "compilerOptions": { + "types": [ + "node" + ], "declaration": true, "target": "es6", "module": "commonjs", diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/tsconfig.json index 59a60838a05..899a36bb76c 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/tsconfig.json @@ -1,5 +1,8 @@ { "compilerOptions": { + "types": [ + "node" + ], "declaration": true, "target": "es5", "module": "commonjs", diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/tsconfig.json b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/tsconfig.json index 59a60838a05..899a36bb76c 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/tsconfig.json +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/tsconfig.json @@ -1,5 +1,8 @@ { "compilerOptions": { + "types": [ + "node" + ], "declaration": true, "target": "es5", "module": "commonjs", -- GitLab From 38a2cc08e15ae2eeba04f001136a390bfd766f9b Mon Sep 17 00:00:00 2001 From: William Cheng <wing328hk@gmail.com> Date: Tue, 27 Sep 2022 01:04:25 +0800 Subject: [PATCH 2/4] Revert "add node types to fix build failure" This reverts commit 7ec986e164d9ab0ab5eb1abb93f2f3e06121bd7e. --- .../src/main/resources/typescript-rxjs/tsconfig.mustache | 3 --- .../petstore/typescript-rxjs/builds/default/tsconfig.json | 3 --- .../petstore/typescript-rxjs/builds/es6-target/tsconfig.json | 3 --- .../typescript-rxjs/builds/with-npm-version/tsconfig.json | 3 --- .../builds/with-progress-subscriber/tsconfig.json | 3 --- 5 files changed, 15 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/tsconfig.mustache index 3e80f1bf329..0779a8b0037 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/tsconfig.mustache @@ -1,8 +1,5 @@ { "compilerOptions": { - "types": [ - "node" - ], "declaration": true, "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", "module": "commonjs", diff --git a/samples/client/petstore/typescript-rxjs/builds/default/tsconfig.json b/samples/client/petstore/typescript-rxjs/builds/default/tsconfig.json index 899a36bb76c..59a60838a05 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/tsconfig.json +++ b/samples/client/petstore/typescript-rxjs/builds/default/tsconfig.json @@ -1,8 +1,5 @@ { "compilerOptions": { - "types": [ - "node" - ], "declaration": true, "target": "es5", "module": "commonjs", diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/tsconfig.json b/samples/client/petstore/typescript-rxjs/builds/es6-target/tsconfig.json index dec3c7d01bb..00d4d5cc478 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/tsconfig.json +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/tsconfig.json @@ -1,8 +1,5 @@ { "compilerOptions": { - "types": [ - "node" - ], "declaration": true, "target": "es6", "module": "commonjs", diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/tsconfig.json index 899a36bb76c..59a60838a05 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/tsconfig.json @@ -1,8 +1,5 @@ { "compilerOptions": { - "types": [ - "node" - ], "declaration": true, "target": "es5", "module": "commonjs", diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/tsconfig.json b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/tsconfig.json index 899a36bb76c..59a60838a05 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/tsconfig.json +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/tsconfig.json @@ -1,8 +1,5 @@ { "compilerOptions": { - "types": [ - "node" - ], "declaration": true, "target": "es5", "module": "commonjs", -- GitLab From e7ecb1fc0b4717db98f78d7590d068a4ad92a9c9 Mon Sep 17 00:00:00 2001 From: William Cheng <wing328hk@gmail.com> Date: Tue, 27 Sep 2022 01:07:41 +0800 Subject: [PATCH 3/4] add node installation to fix build failure --- .../builds/with-npm-version/package-lock.json | 78 +++++++++++++++++++ .../builds/with-npm-version/package.json | 3 +- .../builds/with-npm-version/pom.xml | 15 ++++ 3 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 samples/client/petstore/typescript-rxjs/builds/with-npm-version/package-lock.json diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package-lock.json b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package-lock.json new file mode 100644 index 00000000000..36cacf0a3ff --- /dev/null +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package-lock.json @@ -0,0 +1,78 @@ +{ + "name": "@openapitools/typescript-rxjs-petstore", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "@openapitools/typescript-rxjs-petstore", + "version": "1.0.0", + "dependencies": { + "rxjs": "^7.2.0" + }, + "devDependencies": { + "@types/node": "^18.7.22", + "typescript": "^4.0" + } + }, + "node_modules/@types/node": { + "version": "18.7.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.22.tgz", + "integrity": "sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw==", + "dev": true + }, + "node_modules/rxjs": { + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "node_modules/typescript": { + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", + "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + } + }, + "dependencies": { + "@types/node": { + "version": "18.7.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.22.tgz", + "integrity": "sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw==", + "dev": true + }, + "rxjs": { + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", + "requires": { + "tslib": "^2.1.0" + } + }, + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "typescript": { + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", + "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", + "dev": true + } + } +} diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package.json b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package.json index add1ece5a0b..867fb955b36 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package.json @@ -9,7 +9,7 @@ }, "main": "./dist/index.js", "typings": "./dist/index.d.ts", - "scripts" : { + "scripts": { "build": "node_modules/.bin/tsc --outDir dist/", "prepare": "npm run build" }, @@ -17,6 +17,7 @@ "rxjs": "^7.2.0" }, "devDependencies": { + "@types/node": "^18.7.22", "typescript": "^4.0" }, "publishConfig": { diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/pom.xml b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/pom.xml index 6414f36047f..5360e135824 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/pom.xml +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/pom.xml @@ -26,6 +26,21 @@ <artifactId>exec-maven-plugin</artifactId> <version>1.2.1</version> <executions> + <execution> + <id>node-install</id> + <phase>pre-integration-test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>npm</executable> + <arguments> + <argument>install</argument> + <argument>-D</argument> + <argument>@types/node</argument> + </arguments> + </configuration> + </execution> <execution> <id>npm-install</id> <phase>pre-integration-test</phase> -- GitLab From fcfbc07150c72129c89d06f8c9f726db3f6c35cd Mon Sep 17 00:00:00 2001 From: William Cheng <wing328hk@gmail.com> Date: Tue, 27 Sep 2022 10:41:36 +0800 Subject: [PATCH 4/4] update ts samples --- .../builds/with-npm-version/package-lock.json | 78 ------------------- .../builds/with-npm-version/package.json | 3 +- 2 files changed, 1 insertion(+), 80 deletions(-) delete mode 100644 samples/client/petstore/typescript-rxjs/builds/with-npm-version/package-lock.json diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package-lock.json b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package-lock.json deleted file mode 100644 index 36cacf0a3ff..00000000000 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package-lock.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "@openapitools/typescript-rxjs-petstore", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "@openapitools/typescript-rxjs-petstore", - "version": "1.0.0", - "dependencies": { - "rxjs": "^7.2.0" - }, - "devDependencies": { - "@types/node": "^18.7.22", - "typescript": "^4.0" - } - }, - "node_modules/@types/node": { - "version": "18.7.22", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.22.tgz", - "integrity": "sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw==", - "dev": true - }, - "node_modules/rxjs": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", - "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "node_modules/typescript": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", - "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - } - }, - "dependencies": { - "@types/node": { - "version": "18.7.22", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.22.tgz", - "integrity": "sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw==", - "dev": true - }, - "rxjs": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", - "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", - "requires": { - "tslib": "^2.1.0" - } - }, - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "typescript": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", - "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", - "dev": true - } - } -} diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package.json b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package.json index 867fb955b36..add1ece5a0b 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/package.json @@ -9,7 +9,7 @@ }, "main": "./dist/index.js", "typings": "./dist/index.d.ts", - "scripts": { + "scripts" : { "build": "node_modules/.bin/tsc --outDir dist/", "prepare": "npm run build" }, @@ -17,7 +17,6 @@ "rxjs": "^7.2.0" }, "devDependencies": { - "@types/node": "^18.7.22", "typescript": "^4.0" }, "publishConfig": { -- GitLab