@spec2ts/openapi-client 2.0.0-beta.1 → 2.0.0-beta.10

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 CHANGED
@@ -3,6 +3,93 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.0.0-beta.10](https://github.com/touchifyapp/spec2ts/compare/@spec2ts/openapi-client@2.0.0-beta.9...@spec2ts/openapi-client@2.0.0-beta.10) (2022-06-27)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **openapi-client:** upgrade to typescript 4 ([932877f](https://github.com/touchifyapp/spec2ts/commit/932877f83915a953400b41fc74ea921aeaed3b1d))
12
+
13
+
14
+
15
+
16
+
17
+ # [2.0.0-beta.9](https://github.com/touchifyapp/spec2ts/compare/@spec2ts/openapi-client@2.0.0-beta.8...@spec2ts/openapi-client@2.0.0-beta.9) (2022-01-27)
18
+
19
+ **Note:** Version bump only for package @spec2ts/openapi-client
20
+
21
+
22
+
23
+
24
+
25
+ # [2.0.0-beta.8](https://github.com/touchifyapp/spec2ts/compare/@spec2ts/openapi-client@2.0.0-beta.7...@spec2ts/openapi-client@2.0.0-beta.8) (2021-11-03)
26
+
27
+ **Note:** Version bump only for package @spec2ts/openapi-client
28
+
29
+
30
+
31
+
32
+
33
+ # [2.0.0-beta.7](https://github.com/touchifyapp/spec2ts/compare/@spec2ts/openapi-client@2.0.0-beta.6...@spec2ts/openapi-client@2.0.0-beta.7) (2021-10-23)
34
+
35
+ **Note:** Version bump only for package @spec2ts/openapi-client
36
+
37
+
38
+
39
+
40
+
41
+ # [2.0.0-beta.6](https://github.com/touchifyapp/spec2ts/compare/@spec2ts/openapi-client@2.0.0-beta.5...@spec2ts/openapi-client@2.0.0-beta.6) (2021-02-27)
42
+
43
+ **Note:** Version bump only for package @spec2ts/openapi-client
44
+
45
+
46
+
47
+
48
+
49
+ # [2.0.0-beta.5](https://github.com/touchifyapp/spec2ts/compare/@spec2ts/openapi-client@2.0.0-beta.4...@spec2ts/openapi-client@2.0.0-beta.5) (2020-12-21)
50
+
51
+
52
+ ### Bug Fixes
53
+
54
+ * **openapi-client:** allow $ and _ in camelCase ([08c244e](https://github.com/touchifyapp/spec2ts/commit/08c244eb6e2c0a6f3ab833faa5159483ca1adda7))
55
+
56
+
57
+
58
+
59
+
60
+ # [2.0.0-beta.4](https://github.com/touchifyapp/spec2ts/compare/@spec2ts/openapi-client@2.0.0-beta.3...@spec2ts/openapi-client@2.0.0-beta.4) (2020-12-14)
61
+
62
+
63
+ ### Bug Fixes
64
+
65
+ * **openapi-client:** type issue in TS 4.1 ([09da142](https://github.com/touchifyapp/spec2ts/commit/09da1423ce16e1a8ccee81ba0ad160f5f6313a67))
66
+
67
+
68
+
69
+
70
+
71
+ # [2.0.0-beta.3](https://github.com/touchifyapp/spec2ts/compare/@spec2ts/openapi-client@2.0.0-beta.2...@spec2ts/openapi-client@2.0.0-beta.3) (2020-11-29)
72
+
73
+
74
+ ### Bug Fixes
75
+
76
+ * **openapi:** bad yargs options for enableDate ([cc799cb](https://github.com/touchifyapp/spec2ts/commit/cc799cb14600f5a5388a825932622251ed1df19c))
77
+
78
+
79
+
80
+
81
+
82
+ # [2.0.0-beta.2](https://github.com/touchifyapp/spec2ts/compare/@spec2ts/openapi-client@2.0.0-beta.1...@spec2ts/openapi-client@2.0.0-beta.2) (2020-11-29)
83
+
84
+
85
+ ### Features
86
+
87
+ * **openapi-client:** add support for new lax date style ([73ac242](https://github.com/touchifyapp/spec2ts/commit/73ac2428cf7195817cc66c41a9e18fa6e9a7abee))
88
+
89
+
90
+
91
+
92
+
6
93
  # [2.0.0-beta.1](https://github.com/touchifyapp/spec2ts/compare/@spec2ts/openapi-client@2.0.0-beta.0...@spec2ts/openapi-client@2.0.0-beta.1) (2020-11-16)
7
94
 
8
95
 
package/cli/command.js CHANGED
@@ -29,10 +29,10 @@ function builder(argv) {
29
29
  type: "boolean",
30
30
  describe: "Avoid the `any` type and use `unknown` instead"
31
31
  })
32
- // .option("enableDate", {
33
- // type: "boolean",
34
- // describe: "Build `Date` for format `date` and `date-time`"
35
- // })
32
+ .option("enableDate", {
33
+ choices: [true, "strict", "lax"],
34
+ describe: "Build `Date` for format `date` and `date-time`"
35
+ })
36
36
  .option("inlineRequired", {
37
37
  type: "boolean",
38
38
  describe: "Create a method argument for each required parameter"
@@ -140,12 +140,12 @@ async function generatePackage(output, options) {
140
140
  main: main.replace(/\.ts$/, ".js"),
141
141
  files: ["*.js", "*.d.ts"],
142
142
  scripts: {
143
- build: `tsc ${main} --strict --target ${options.packageBuildTarget || "ES2018"} --module ${options.packageBuildModule || "UMD"} --moduleResolution node`,
143
+ build: `tsc ${main} --strict --target ${options.packageBuildTarget || "ES2018"} --module ${options.packageBuildModule || "UMD"} --moduleResolution node --skipLibCheck`,
144
144
  prepublishOnly: "npm run build"
145
145
  },
146
146
  dependencies: {},
147
147
  devDependencies: {
148
- typescript: "^3.0.0"
148
+ typescript: "^4.2.0"
149
149
  }
150
150
  };
151
151
  if (options.importFetch) {
@@ -30,7 +30,7 @@ export declare const _: {
30
30
  encodeReserved: (typeof encodeURI)[];
31
31
  allowReserved: (typeof encodeURI)[];
32
32
  /** Deeply remove all properties with undefined values. */
33
- stripUndefined<T>(obj?: T | undefined): T | undefined;
33
+ stripUndefined<T extends Record<string, U | undefined>, U>(obj?: T | undefined): Record<string, U> | undefined;
34
34
  isEmpty(v: unknown): boolean;
35
35
  /** Creates a tag-function to encode template strings with the given encoders. */
36
36
  encode(encoders: Encoders, delimiter?: string): TagFunction;
@@ -43,7 +43,7 @@ export const _ = {
43
43
  allowReserved: [encodeURI, encodeURI],
44
44
 
45
45
  /** Deeply remove all properties with undefined values. */
46
- stripUndefined<T>(obj?: T): T | undefined {
46
+ stripUndefined<T extends Record<string, U | undefined>, U>(obj?: T): Record<string, U> | undefined {
47
47
  return obj && JSON.parse(JSON.stringify(obj));
48
48
  },
49
49
 
package/lib/util.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.camelCase = void 0;
4
4
  function camelCase(str) {
5
- const regex = /[A-Z\xC0-\xD6\xD8-\xDE]?[a-z\xDF-\xF6\xF8-\xFF]+|[A-Z\xC0-\xD6\xD8-\xDE]+(?![a-z\xDF-\xF6\xF8-\xFF])|\d+/g;
5
+ const regex = /[A-Z\xC0-\xD6\xD8-\xDE_$]?[a-z\xDF-\xF6\xF8-\xFF_$]+|[A-Z\xC0-\xD6\xD8-\xDE_$]+(?![a-z\xDF-\xF6\xF8-\xFF_$])|\d+/g;
6
6
  const words = str.match(regex);
7
7
  if (!words)
8
8
  return "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spec2ts/openapi-client",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.10",
4
4
  "description": "Utility to convert OpenAPI v3 specifications to Typescript HTTP client using TypeScript native compiler",
5
5
  "author": "Touchify <dev@touchify.co>",
6
6
  "license": "MIT",
@@ -40,9 +40,9 @@
40
40
  "prepublishOnly": "npm test && npm run build"
41
41
  },
42
42
  "dependencies": {
43
- "@spec2ts/core": "^2.0.0-beta.0",
44
- "@spec2ts/jsonschema": "^2.0.0-beta.0",
45
- "@spec2ts/openapi": "^2.0.0-beta.0",
43
+ "@spec2ts/core": "^2.0.0-beta.2",
44
+ "@spec2ts/jsonschema": "^2.0.0-beta.6",
45
+ "@spec2ts/openapi": "^2.0.0-beta.6",
46
46
  "openapi3-ts": "^1.3.0",
47
47
  "yargs": "^15.3.1"
48
48
  },
@@ -70,5 +70,5 @@
70
70
  "spec2ts",
71
71
  "share"
72
72
  ],
73
- "gitHead": "d8b36dac0efa2756b1284f8977ddf1d405633c9c"
73
+ "gitHead": "bce454934149bbb6cd4e26e85b923642c6038b16"
74
74
  }