api 6.1.1 → 6.1.2

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.
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  exports.__esModule = true;
6
6
  exports.generateTypeName = exports.toSafeString = exports.docblockEscape = exports.wordWrap = void 0;
7
- var lodash_camelcase_1 = __importDefault(require("lodash.camelcase"));
8
- var lodash_deburr_1 = __importDefault(require("lodash.deburr"));
9
- var lodash_startcase_1 = __importDefault(require("lodash.startcase"));
7
+ var camelCase_1 = __importDefault(require("lodash/camelCase"));
8
+ var deburr_1 = __importDefault(require("lodash/deburr"));
9
+ var startCase_1 = __importDefault(require("lodash/startCase"));
10
10
  /**
11
11
  * This is a mix of reserved JS words and keywords in TypeScript that might be reserved or
12
12
  * allowable but functionally confusing (like `let any = 'buster';`)
@@ -132,7 +132,7 @@ function toSafeString(str) {
132
132
  // First character: a-zA-Z | _ | $
133
133
  // Rest: a-zA-Z | _ | $ | 0-9
134
134
  // remove accents, umlauts, ... by their basic latin letters
135
- return ((0, lodash_deburr_1["default"])(str)
135
+ return ((0, deburr_1["default"])(str)
136
136
  // if the string starts with a number, prefix it with character that typescript can accept
137
137
  // https://github.com/bcherny/json-schema-to-typescript/issues/489
138
138
  .replace(/^(\d){1}/, '$$1')
@@ -161,12 +161,12 @@ function generateTypeName() {
161
161
  if (parts.length > 1) {
162
162
  var last = parts[parts.length - 1];
163
163
  if (last.match(/^(\d)XX$/)) {
164
- str = (0, lodash_startcase_1["default"])((0, lodash_camelcase_1["default"])(parts.slice(0, -1).join(' ')));
164
+ str = (0, startCase_1["default"])((0, camelCase_1["default"])(parts.slice(0, -1).join(' ')));
165
165
  str += " ".concat(last);
166
166
  }
167
167
  }
168
168
  if (!str) {
169
- str = (0, lodash_startcase_1["default"])((0, lodash_camelcase_1["default"])(parts.join(' ')));
169
+ str = (0, startCase_1["default"])((0, camelCase_1["default"])(parts.join(' ')));
170
170
  }
171
171
  if (RESERVED_WORDS.includes(str.toLowerCase())) {
172
172
  str = "$".concat(str);
@@ -77,7 +77,7 @@ exports.__esModule = true;
77
77
  var fs_1 = __importDefault(require("fs"));
78
78
  var path_1 = __importDefault(require("path"));
79
79
  var execa_1 = __importDefault(require("execa"));
80
- var lodash_setwith_1 = __importDefault(require("lodash.setwith"));
80
+ var setWith_1 = __importDefault(require("lodash/setWith"));
81
81
  var semver_1 = __importDefault(require("semver"));
82
82
  var ts_morph_1 = require("ts-morph");
83
83
  var logger_1 = __importDefault(require("../../logger"));
@@ -813,7 +813,7 @@ var TSGenerator = /** @class */ (function (_super) {
813
813
  if (this.types.has(typeName)) {
814
814
  return;
815
815
  }
816
- (0, lodash_setwith_1["default"])(this.schemas, pointer, schema, Object);
816
+ (0, setWith_1["default"])(this.schemas, pointer, schema, Object);
817
817
  this.types.set(typeName, "FromSchema<typeof schemas.".concat(pointer, ">"));
818
818
  };
819
819
  return TSGenerator;
@@ -46,7 +46,7 @@ var caseless_1 = __importDefault(require("caseless"));
46
46
  var parser_1 = __importDefault(require("datauri/parser"));
47
47
  var sync_1 = __importDefault(require("datauri/sync"));
48
48
  var get_stream_1 = __importDefault(require("get-stream"));
49
- var lodash_merge_1 = __importDefault(require("lodash.merge"));
49
+ var merge_1 = __importDefault(require("lodash/merge"));
50
50
  var remove_undefined_objects_1 = __importDefault(require("remove-undefined-objects"));
51
51
  var getJSONSchemaDefaults_1 = __importDefault(require("./getJSONSchemaDefaults"));
52
52
  // These headers are normally only defined by the OpenAPI definition but we allow the user to
@@ -92,7 +92,7 @@ function merge(src, target) {
92
92
  else if (!isObject(target)) {
93
93
  return target;
94
94
  }
95
- return (0, lodash_merge_1["default"])(src, target);
95
+ return (0, merge_1["default"])(src, target);
96
96
  }
97
97
  /**
98
98
  * Ingest a file path or readable stream into a common object that we can later use to process it
@@ -1,2 +1,2 @@
1
1
  export declare const PACKAGE_NAME = "api";
2
- export declare const PACKAGE_VERSION = "6.1.1";
2
+ export declare const PACKAGE_VERSION = "6.1.2";
@@ -3,4 +3,4 @@ exports.__esModule = true;
3
3
  exports.PACKAGE_VERSION = exports.PACKAGE_NAME = void 0;
4
4
  // This file is automatically updated by the build script.
5
5
  exports.PACKAGE_NAME = 'api';
6
- exports.PACKAGE_VERSION = '6.1.1';
6
+ exports.PACKAGE_VERSION = '6.1.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api",
3
- "version": "6.1.1",
3
+ "version": "6.1.2",
4
4
  "description": "Magical SDK generation from an OpenAPI definition 🪄",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -55,11 +55,7 @@
55
55
  "js-yaml": "^4.1.0",
56
56
  "json-schema-to-ts": "^2.6.2-beta.0",
57
57
  "json-schema-traverse": "^1.0.0",
58
- "lodash.camelcase": "^4.3.0",
59
- "lodash.deburr": "^4.1.0",
60
- "lodash.merge": "^4.6.2",
61
- "lodash.setwith": "^4.3.2",
62
- "lodash.startcase": "^4.4.0",
58
+ "lodash": "^4.17.21",
63
59
  "make-dir": "^3.1.0",
64
60
  "node-abort-controller": "^3.1.1",
65
61
  "oas": "^20.4.0",
@@ -76,11 +72,7 @@
76
72
  "@types/caseless": "^0.12.2",
77
73
  "@types/find-cache-dir": "^3.2.1",
78
74
  "@types/js-yaml": "^4.0.5",
79
- "@types/lodash.camelcase": "^4.3.7",
80
- "@types/lodash.deburr": "^4.1.7",
81
- "@types/lodash.merge": "^4.6.7",
82
- "@types/lodash.setwith": "^4.3.7",
83
- "@types/lodash.startcase": "^4.4.7",
75
+ "@types/lodash": "^4.17.6",
84
76
  "@types/prettier": "^2.7.2",
85
77
  "@types/prompts": "^2.4.2",
86
78
  "@types/semver": "^7.3.13",
@@ -95,5 +87,5 @@
95
87
  "vitest": "^0.34.1"
96
88
  },
97
89
  "prettier": "@readme/eslint-config/prettier",
98
- "gitHead": "e440a28841e753895bfb5315b4d31f679824fa39"
90
+ "gitHead": "2c3ac4c926af40bd01c4fa1b528251f7f0b4211f"
99
91
  }
@@ -1,6 +1,6 @@
1
- import camelCase from 'lodash.camelcase';
2
- import deburr from 'lodash.deburr';
3
- import startCase from 'lodash.startcase';
1
+ import camelCase from 'lodash/camelCase';
2
+ import deburr from 'lodash/deburr';
3
+ import startCase from 'lodash/startCase';
4
4
 
5
5
  /**
6
6
  * This is a mix of reserved JS words and keywords in TypeScript that might be reserved or
@@ -16,7 +16,7 @@ import fs from 'fs';
16
16
  import path from 'path';
17
17
 
18
18
  import execa from 'execa';
19
- import setWith from 'lodash.setwith';
19
+ import setWith from 'lodash/setWith';
20
20
  import semver from 'semver';
21
21
  import { IndentationText, Project, QuoteKind, ScriptTarget, VariableDeclarationKind } from 'ts-morph';
22
22
 
@@ -10,7 +10,7 @@ import caseless from 'caseless';
10
10
  import DatauriParser from 'datauri/parser';
11
11
  import datauri from 'datauri/sync';
12
12
  import getStream from 'get-stream';
13
- import lodashMerge from 'lodash.merge';
13
+ import lodashMerge from 'lodash/merge';
14
14
  import removeUndefinedObjects from 'remove-undefined-objects';
15
15
 
16
16
  import getJSONSchemaDefaults from './getJSONSchemaDefaults';
@@ -1,3 +1,3 @@
1
1
  // This file is automatically updated by the build script.
2
2
  export const PACKAGE_NAME = 'api';
3
- export const PACKAGE_VERSION = '6.1.1';
3
+ export const PACKAGE_VERSION = '6.1.2';