@nmshd/runtime 1.2.13 → 1.2.14

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.
@@ -7,11 +7,11 @@ const content_1 = require("@nmshd/content");
7
7
  const crypto_1 = require("@nmshd/crypto");
8
8
  const transport_1 = require("@nmshd/transport");
9
9
  exports.buildInformation = {
10
- version: "1.2.13",
11
- build: "28",
12
- date: "2022-01-12T08:46:15+00:00",
13
- commit: "a0ed72318e8869b87437d358cc1dd94685fa1644",
14
- dependencies: {"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"1.0.2","@js-soft/ts-utils":"^1.1.1","@nmshd/consumption":"1.0.11","@nmshd/content":"1.1.2","@nmshd/crypto":"1.0.6","@nmshd/transport":"1.1.5","ajv":"^8.8.2","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","fluent-ts-validator":"3.0.2","json-stringify-safe":"^5.0.1","luxon":"^2.3.0","qrcode":"1.5.0","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
10
+ version: "1.2.14",
11
+ build: "29",
12
+ date: "2022-01-18T14:34:32+00:00",
13
+ commit: "e918dc5de9040616f4be81f76521ea83cd13c405",
14
+ dependencies: {"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"1.0.2","@js-soft/ts-utils":"^1.1.1","@nmshd/consumption":"1.0.11","@nmshd/content":"1.1.3","@nmshd/crypto":"1.0.7","@nmshd/transport":"1.1.6","ajv":"^8.9.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","fluent-ts-validator":"3.0.2","json-stringify-safe":"^5.0.1","luxon":"^2.3.0","qrcode":"1.5.0","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
15
15
  libraries: {
16
16
  serval: ts_serval_1.buildInformation,
17
17
  consumption: consumption_1.buildInformation,
@@ -327,11 +327,11 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
327
327
  const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
328
328
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
329
329
  exports.buildInformation = {
330
- version: "1.2.13",
331
- build: "28",
332
- date: "2022-01-12T08:46:15+00:00",
333
- commit: "a0ed72318e8869b87437d358cc1dd94685fa1644",
334
- dependencies: {"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"1.0.2","@js-soft/ts-utils":"^1.1.1","@nmshd/consumption":"1.0.11","@nmshd/content":"1.1.2","@nmshd/crypto":"1.0.6","@nmshd/transport":"1.1.5","ajv":"^8.8.2","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","fluent-ts-validator":"3.0.2","json-stringify-safe":"^5.0.1","luxon":"^2.3.0","qrcode":"1.5.0","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
330
+ version: "1.2.14",
331
+ build: "29",
332
+ date: "2022-01-18T14:34:32+00:00",
333
+ commit: "e918dc5de9040616f4be81f76521ea83cd13c405",
334
+ dependencies: {"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"1.0.2","@js-soft/ts-utils":"^1.1.1","@nmshd/consumption":"1.0.11","@nmshd/content":"1.1.3","@nmshd/crypto":"1.0.7","@nmshd/transport":"1.1.6","ajv":"^8.9.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","fluent-ts-validator":"3.0.2","json-stringify-safe":"^5.0.1","luxon":"^2.3.0","qrcode":"1.5.0","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
335
335
  libraries: {
336
336
  serval: ts_serval_1.buildInformation,
337
337
  consumption: consumption_1.buildInformation,
@@ -14255,7 +14255,7 @@ Object.defineProperty(exports, "CodeGen", ({ enumerable: true, get: function ()
14255
14255
  "use strict";
14256
14256
 
14257
14257
  Object.defineProperty(exports, "__esModule", ({ value: true }));
14258
- exports.regexpCode = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
14258
+ exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
14259
14259
  class _CodeOrName {
14260
14260
  }
14261
14261
  exports._CodeOrName = _CodeOrName;
@@ -14395,6 +14395,14 @@ function getProperty(key) {
14395
14395
  return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;
14396
14396
  }
14397
14397
  exports.getProperty = getProperty;
14398
+ //Does best effort to format the name properly
14399
+ function getEsmExportName(key) {
14400
+ if (typeof key == "string" && exports.IDENTIFIER.test(key)) {
14401
+ return new _Code(`${key}`);
14402
+ }
14403
+ throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
14404
+ }
14405
+ exports.getEsmExportName = getEsmExportName;
14398
14406
  function regexpCode(rx) {
14399
14407
  return new _Code(rx.toString());
14400
14408
  }
@@ -19223,6 +19231,8 @@ exports["default"] = def;
19223
19231
  Object.defineProperty(exports, "__esModule", ({ value: true }));
19224
19232
  const codegen_1 = __webpack_require__(/*! ../../compile/codegen */ "./node_modules/ajv/dist/compile/codegen/index.js");
19225
19233
  const types_1 = __webpack_require__(/*! ../discriminator/types */ "./node_modules/ajv/dist/vocabularies/discriminator/types.js");
19234
+ const compile_1 = __webpack_require__(/*! ../../compile */ "./node_modules/ajv/dist/compile/index.js");
19235
+ const util_1 = __webpack_require__(/*! ../../compile/util */ "./node_modules/ajv/dist/compile/util.js");
19226
19236
  const error = {
19227
19237
  message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag
19228
19238
  ? `tag "${tagName}" must be string`
@@ -19274,10 +19284,15 @@ const def = {
19274
19284
  const topRequired = hasRequired(parentSchema);
19275
19285
  let tagRequired = true;
19276
19286
  for (let i = 0; i < oneOf.length; i++) {
19277
- const sch = oneOf[i];
19278
- const propSch = (_a = sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
19287
+ let sch = oneOf[i];
19288
+ if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
19289
+ sch = compile_1.resolveRef.call(it.self, it.schemaEnv, it.baseId, sch === null || sch === void 0 ? void 0 : sch.$ref);
19290
+ if (sch instanceof compile_1.SchemaEnv)
19291
+ sch = sch.schema;
19292
+ }
19293
+ const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
19279
19294
  if (typeof propSch != "object") {
19280
- throw new Error(`discriminator: oneOf schemas must have "properties/${tagName}"`);
19295
+ throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
19281
19296
  }
19282
19297
  tagRequired = tagRequired && (topRequired || hasRequired(sch));
19283
19298
  addMappings(propSch, i);