quicktype-core 23.0.144 → 23.0.145

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.
@@ -1,6 +1,26 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
26
  exports.SystemTextJsonCSharpRenderer = exports.systemTextJsonCSharpOptions = exports.NewtonsoftCSharpRenderer = exports.newtonsoftCSharpOptions = exports.CSharpRenderer = exports.CSharpTargetLanguage = exports.cSharpOptions = exports.AccessModifier = exports.Framework = void 0;
@@ -17,7 +37,7 @@ const RendererOptions_1 = require("../RendererOptions");
17
37
  const Annotation_1 = require("../Annotation");
18
38
  const Transformers_1 = require("../Transformers");
19
39
  const Constraints_1 = require("../attributes/Constraints");
20
- const unicode_properties_1 = __importDefault(require("unicode-properties"));
40
+ const unicode = __importStar(require("unicode-properties"));
21
41
  var Framework;
22
42
  (function (Framework) {
23
43
  Framework[Framework["Newtonsoft"] = 0] = "Newtonsoft";
@@ -183,13 +203,13 @@ const denseJsonPropertyName = "J";
183
203
  const denseRequiredEnumName = "R";
184
204
  const denseNullValueHandlingEnumName = "N";
185
205
  function isStartCharacter(utf16Unit) {
186
- if (unicode_properties_1.default.isAlphabetic(utf16Unit)) {
206
+ if (unicode.isAlphabetic(utf16Unit)) {
187
207
  return true;
188
208
  }
189
209
  return utf16Unit === 0x5f; // underscore
190
210
  }
191
211
  function isPartCharacter(utf16Unit) {
192
- const category = unicode_properties_1.default.getCategory(utf16Unit);
212
+ const category = unicode.getCategory(utf16Unit);
193
213
  if (["Nd", "Pc", "Mn", "Mc"].indexOf(category) >= 0) {
194
214
  return true;
195
215
  }
@@ -1,10 +1,30 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
26
  exports.ElixirRenderer = exports.ElixirTargetLanguage = exports.elixirOptions = void 0;
7
- const unicode_properties_1 = __importDefault(require("unicode-properties"));
27
+ const unicode = __importStar(require("unicode-properties"));
8
28
  const Naming_1 = require("../Naming");
9
29
  const ConvenienceRenderer_1 = require("../ConvenienceRenderer");
10
30
  const TargetLanguage_1 = require("../TargetLanguage");
@@ -149,7 +169,7 @@ class ElixirTargetLanguage extends TargetLanguage_1.TargetLanguage {
149
169
  exports.ElixirTargetLanguage = ElixirTargetLanguage;
150
170
  const isStartCharacter = Strings_1.isLetterOrUnderscore;
151
171
  function isPartCharacter(utf16Unit) {
152
- const category = unicode_properties_1.default.getCategory(utf16Unit);
172
+ const category = unicode.getCategory(utf16Unit);
153
173
  return ["Nd", "Pc", "Mn", "Mc"].indexOf(category) >= 0 || isStartCharacter(utf16Unit);
154
174
  }
155
175
  const legalizeName = (0, Strings_1.legalizeCharacters)(isPartCharacter);
@@ -1,6 +1,26 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
26
  exports.ObjectiveCRenderer = exports.ObjectiveCTargetLanguage = exports.objcOptions = void 0;
@@ -14,7 +34,7 @@ const Strings_1 = require("../support/Strings");
14
34
  const ConvenienceRenderer_1 = require("../ConvenienceRenderer");
15
35
  const RendererOptions_1 = require("../RendererOptions");
16
36
  const Support_1 = require("../support/Support");
17
- const unicode_properties_1 = __importDefault(require("unicode-properties"));
37
+ const unicode = __importStar(require("unicode-properties"));
18
38
  const DEBUG = false;
19
39
  const DEFAULT_CLASS_PREFIX = "QT";
20
40
  exports.objcOptions = {
@@ -154,10 +174,10 @@ const booleanPrefixes = [
154
174
  "need"
155
175
  ];
156
176
  function isStartCharacter(utf16Unit) {
157
- return unicode_properties_1.default.isAlphabetic(utf16Unit) || utf16Unit === 0x5f; // underscore
177
+ return unicode.isAlphabetic(utf16Unit) || utf16Unit === 0x5f; // underscore
158
178
  }
159
179
  function isPartCharacter(utf16Unit) {
160
- const category = unicode_properties_1.default.getCategory(utf16Unit);
180
+ const category = unicode.getCategory(utf16Unit);
161
181
  return ["Nd", "Pc", "Mn", "Mc"].indexOf(category) >= 0 || isStartCharacter(utf16Unit);
162
182
  }
163
183
  const legalizeName = (0, Strings_1.utf16LegalizeCharacters)(isPartCharacter);
@@ -1,6 +1,26 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
26
  exports.JSONPythonRenderer = exports.PythonRenderer = exports.PythonTargetLanguage = exports.pythonOptions = void 0;
@@ -15,7 +35,7 @@ const Source_1 = require("../Source");
15
35
  const TypeUtils_1 = require("../TypeUtils");
16
36
  const Transformers_1 = require("../Transformers");
17
37
  const collection_utils_1 = require("collection-utils");
18
- const unicode_properties_1 = __importDefault(require("unicode-properties"));
38
+ const unicode = __importStar(require("unicode-properties"));
19
39
  const forbiddenTypeNames = [
20
40
  "Any",
21
41
  "True",
@@ -123,14 +143,14 @@ class PythonTargetLanguage extends TargetLanguage_1.TargetLanguage {
123
143
  exports.PythonTargetLanguage = PythonTargetLanguage;
124
144
  function isNormalizedStartCharacter3(utf16Unit) {
125
145
  // FIXME: add Other_ID_Start - https://docs.python.org/3/reference/lexical_analysis.html#identifiers
126
- const category = unicode_properties_1.default.getCategory(utf16Unit);
146
+ const category = unicode.getCategory(utf16Unit);
127
147
  return ["Lu", "Ll", "Lt", "Lm", "Lo", "Nl"].indexOf(category) >= 0;
128
148
  }
129
149
  function isNormalizedPartCharacter3(utf16Unit) {
130
150
  // FIXME: add Other_ID_Continue - https://docs.python.org/3/reference/lexical_analysis.html#identifiers
131
151
  if (isNormalizedStartCharacter3(utf16Unit))
132
152
  return true;
133
- const category = unicode_properties_1.default.getCategory(utf16Unit);
153
+ const category = unicode.getCategory(utf16Unit);
134
154
  return ["Mn", "Mc", "Nd", "Pc"].indexOf(category) >= 0;
135
155
  }
136
156
  function isStartCharacter3(utf16Unit) {
@@ -22,12 +22,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
25
  Object.defineProperty(exports, "__esModule", { value: true });
29
26
  exports.RubyRenderer = exports.RubyTargetLanguage = exports.rubyOptions = exports.Strictness = void 0;
30
- const unicode_properties_1 = __importDefault(require("unicode-properties"));
27
+ const unicode = __importStar(require("unicode-properties"));
31
28
  const Source_1 = require("../../Source");
32
29
  const Naming_1 = require("../../Naming");
33
30
  const ConvenienceRenderer_1 = require("../../ConvenienceRenderer");
@@ -77,7 +74,7 @@ class RubyTargetLanguage extends TargetLanguage_1.TargetLanguage {
77
74
  exports.RubyTargetLanguage = RubyTargetLanguage;
78
75
  const isStartCharacter = Strings_1.isLetterOrUnderscore;
79
76
  function isPartCharacter(utf16Unit) {
80
- const category = unicode_properties_1.default.getCategory(utf16Unit);
77
+ const category = unicode.getCategory(utf16Unit);
81
78
  return ["Nd", "Pc", "Mn", "Mc"].indexOf(category) >= 0 || isStartCharacter(utf16Unit);
82
79
  }
83
80
  const legalizeName = (0, Strings_1.legalizeCharacters)(isPartCharacter);
@@ -1,13 +1,33 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
26
  exports.makeNameStyle = exports.addPrefixIfNecessary = exports.combineWords = exports.allLowerWordStyle = exports.originalWord = exports.allUpperWordStyle = exports.firstUpperWordStyle = exports.splitIntoWords = exports.fastIsUpperCase = exports.startWithLetter = exports.snakeCase = exports.camelCase = exports.pascalCase = exports.decapitalize = exports.capitalize = exports.trimEnd = exports.isWordCharacter = exports.isLetterOrUnderscoreOrDigit = exports.isLetterOrUnderscore = exports.isLetterOrDigit = exports.isNumeric = exports.isDigit = exports.isLetter = exports.isAscii = exports.isPrintable = exports.stringEscape = exports.utf16StringEscape = exports.escapeNonPrintableMapper = exports.standardUnicodeHexEscape = exports.intToHex = exports.repeatString = exports.legalizeCharacters = exports.utf16LegalizeCharacters = exports.utf32ConcatMap = exports.utf16ConcatMap = void 0;
7
27
  const Support_1 = require("./Support");
8
28
  const Acronyms_1 = require("./Acronyms");
9
29
  const Messages_1 = require("../Messages");
10
- const unicode_properties_1 = __importDefault(require("unicode-properties"));
30
+ const unicode = __importStar(require("unicode-properties"));
11
31
  function computeAsciiMap(mapper) {
12
32
  const charStringMap = [];
13
33
  const charNoEscapeMap = [];
@@ -177,7 +197,7 @@ exports.stringEscape = utf32ConcatMap(escapeNonPrintableMapper(isPrintable, stan
177
197
  function isPrintable(codePoint) {
178
198
  if (codePoint > 0xffff)
179
199
  return false;
180
- const category = unicode_properties_1.default.getCategory(codePoint);
200
+ const category = unicode.getCategory(codePoint);
181
201
  return ([
182
202
  "Mc",
183
203
  "No",
@@ -210,18 +230,18 @@ function isAscii(codePoint) {
210
230
  }
211
231
  exports.isAscii = isAscii;
212
232
  function isLetter(codePoint) {
213
- const category = unicode_properties_1.default.getCategory(codePoint);
233
+ const category = unicode.getCategory(codePoint);
214
234
  // FIXME: Include Letter, modifier (Lm)?
215
235
  return ["Lu", "Ll", "Lt", "Lo"].indexOf(category) >= 0;
216
236
  }
217
237
  exports.isLetter = isLetter;
218
238
  function isDigit(codePoint) {
219
- const category = unicode_properties_1.default.getCategory(codePoint);
239
+ const category = unicode.getCategory(codePoint);
220
240
  return ["Nd"].indexOf(category) >= 0;
221
241
  }
222
242
  exports.isDigit = isDigit;
223
243
  function isNumeric(codePoint) {
224
- const category = unicode_properties_1.default.getCategory(codePoint);
244
+ const category = unicode.getCategory(codePoint);
225
245
  return ["No", "Nd", "Nl"].indexOf(category) >= 0;
226
246
  }
227
247
  exports.isNumeric = isNumeric;
@@ -245,7 +265,7 @@ function trimEnd(str) {
245
265
  const l = str.length;
246
266
  let firstWS = l;
247
267
  for (let i = l - 1; i >= 0; i--) {
248
- if (!unicode_properties_1.default.isWhiteSpace(str.charCodeAt(i)))
268
+ if (!unicode.isWhiteSpace(str.charCodeAt(i)))
249
269
  break;
250
270
  firstWS = i;
251
271
  }
@@ -295,9 +315,9 @@ exports.startWithLetter = startWithLetter;
295
315
  const knownAcronyms = new Set(Acronyms_1.acronyms);
296
316
  const fastIsWordCharacter = precomputedCodePointPredicate(isWordCharacter);
297
317
  const fastIsNonWordCharacter = precomputedCodePointPredicate(cp => !isWordCharacter(cp));
298
- const fastIsLowerCase = precomputedCodePointPredicate(cp => unicode_properties_1.default.isLowerCase(cp));
299
- exports.fastIsUpperCase = precomputedCodePointPredicate(cp => unicode_properties_1.default.isUpperCase(cp));
300
- const fastNonLetter = precomputedCodePointPredicate(cp => !unicode_properties_1.default.isLowerCase(cp) && !unicode_properties_1.default.isUpperCase(cp));
318
+ const fastIsLowerCase = precomputedCodePointPredicate(cp => unicode.isLowerCase(cp));
319
+ exports.fastIsUpperCase = precomputedCodePointPredicate(cp => unicode.isUpperCase(cp));
320
+ const fastNonLetter = precomputedCodePointPredicate(cp => !unicode.isLowerCase(cp) && !unicode.isUpperCase(cp));
301
321
  const fastIsDigit = precomputedCodePointPredicate(isDigit);
302
322
  function splitIntoWords(s) {
303
323
  // [start, end, allUpper]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quicktype-core",
3
- "version": "23.0.144",
3
+ "version": "23.0.145",
4
4
  "description": "The quicktype engine as a library",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",