quicktype-typescript-input 23.0.158 → 23.0.159

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/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { JSONSchemaSourceData } from "quicktype-core";
1
+ import { type JSONSchemaSourceData } from "quicktype-core";
2
2
  export declare function schemaForTypeScriptSources(sourceFileNames: string[]): JSONSchemaSourceData;
package/dist/index.js CHANGED
@@ -24,9 +24,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.schemaForTypeScriptSources = void 0;
27
- const ts = __importStar(require("typescript"));
28
27
  const typescript_json_schema_1 = require("@mark.probst/typescript-json-schema");
29
28
  const quicktype_core_1 = require("quicktype-core");
29
+ const ts = __importStar(require("typescript"));
30
30
  const settings = {
31
31
  required: true,
32
32
  titles: true,
@@ -61,7 +61,7 @@ function schemaForTypeScriptSources(sourceFileNames) {
61
61
  // if there is a type that is `export default`, swap the corresponding ref
62
62
  if ((_a = schema === null || schema === void 0 ? void 0 : schema.definitions) === null || _a === void 0 ? void 0 : _a.default) {
63
63
  const defaultDefinition = (_b = schema === null || schema === void 0 ? void 0 : schema.definitions) === null || _b === void 0 ? void 0 : _b.default;
64
- const matchingDefaultName = (_d = Object.entries((_c = schema === null || schema === void 0 ? void 0 : schema.definitions) !== null && _c !== void 0 ? _c : {}).find(([_name, definition]) => definition["$ref"] === "#/definitions/default")) === null || _d === void 0 ? void 0 : _d[0];
64
+ const matchingDefaultName = (_d = Object.entries((_c = schema === null || schema === void 0 ? void 0 : schema.definitions) !== null && _c !== void 0 ? _c : {}).find(([_name, definition]) => definition.$ref === "#/definitions/default")) === null || _d === void 0 ? void 0 : _d[0];
65
65
  if (matchingDefaultName) {
66
66
  topLevelName = matchingDefaultName;
67
67
  defaultDefinition.title = topLevelName;
@@ -79,7 +79,7 @@ function schemaForTypeScriptSources(sourceFileNames) {
79
79
  continue;
80
80
  }
81
81
  const description = definition.description;
82
- const matches = description.match(/#TopLevel/);
82
+ const matches = /#TopLevel/.exec(description);
83
83
  if (matches === null) {
84
84
  continue;
85
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quicktype-typescript-input",
3
- "version": "23.0.158",
3
+ "version": "23.0.159",
4
4
  "description": "Package for using TypeScript as an input language to quicktype",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -11,7 +11,7 @@
11
11
  "build": "tsc"
12
12
  },
13
13
  "dependencies": {
14
- "quicktype-core": "23.0.158",
14
+ "quicktype-core": "23.0.159",
15
15
  "typescript": "4.9.5",
16
16
  "@mark.probst/typescript-json-schema": "0.55.0"
17
17
  },