@accordproject/concerto-util 4.2.0 → 5.0.0-beta.1

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.
Files changed (193) hide show
  1. package/dist/baseexception.d.ts +2 -1
  2. package/dist/baseexception.js +5 -2
  3. package/dist/basefileexception.d.ts +3 -2
  4. package/dist/basefileexception.js +10 -4
  5. package/dist/esm/baseexception.mjs +13 -0
  6. package/dist/esm/baseexception.mjs.map +7 -0
  7. package/dist/esm/basefileexception.mjs +14 -0
  8. package/dist/esm/basefileexception.mjs.map +7 -0
  9. package/dist/esm/chunk-3A2THGYW.mjs +51 -0
  10. package/dist/esm/chunk-3A2THGYW.mjs.map +7 -0
  11. package/dist/esm/chunk-3RJ6JXLX.mjs +29 -0
  12. package/dist/esm/chunk-3RJ6JXLX.mjs.map +7 -0
  13. package/dist/esm/chunk-3U4T7O4P.mjs +41 -0
  14. package/dist/esm/chunk-3U4T7O4P.mjs.map +7 -0
  15. package/dist/esm/chunk-5HVAQ6AX.mjs +183 -0
  16. package/dist/esm/chunk-5HVAQ6AX.mjs.map +7 -0
  17. package/dist/esm/chunk-D4MNWWBB.mjs +43 -0
  18. package/dist/esm/chunk-D4MNWWBB.mjs.map +7 -0
  19. package/dist/esm/chunk-DTVQ7VXD.mjs +30 -0
  20. package/dist/esm/chunk-DTVQ7VXD.mjs.map +7 -0
  21. package/dist/esm/chunk-FHUVVHGR.mjs +48 -0
  22. package/dist/esm/chunk-FHUVVHGR.mjs.map +7 -0
  23. package/dist/esm/chunk-FK2LDKS6.mjs +36 -0
  24. package/dist/esm/chunk-FK2LDKS6.mjs.map +7 -0
  25. package/dist/esm/chunk-GOLEPEBI.mjs +56 -0
  26. package/dist/esm/chunk-GOLEPEBI.mjs.map +7 -0
  27. package/dist/esm/chunk-I33X6SGY.mjs +70 -0
  28. package/dist/esm/chunk-I33X6SGY.mjs.map +7 -0
  29. package/dist/esm/chunk-K4OOJFK5.mjs +93 -0
  30. package/dist/esm/chunk-K4OOJFK5.mjs.map +7 -0
  31. package/dist/esm/chunk-LPNGJFU2.mjs +22 -0
  32. package/dist/esm/chunk-LPNGJFU2.mjs.map +7 -0
  33. package/dist/esm/chunk-PBL5N3A2.mjs +33 -0
  34. package/dist/esm/chunk-PBL5N3A2.mjs.map +7 -0
  35. package/dist/esm/chunk-PMP2SMHG.mjs +17 -0
  36. package/dist/esm/chunk-PMP2SMHG.mjs.map +7 -0
  37. package/dist/esm/chunk-Q6G4HQJ7.mjs +151 -0
  38. package/dist/esm/chunk-Q6G4HQJ7.mjs.map +7 -0
  39. package/dist/esm/chunk-T6ZBQYEB.mjs +97 -0
  40. package/dist/esm/chunk-T6ZBQYEB.mjs.map +7 -0
  41. package/dist/esm/chunk-TP3CT6S4.mjs +35 -0
  42. package/dist/esm/chunk-TP3CT6S4.mjs.map +7 -0
  43. package/dist/esm/chunk-WPVG6LP3.mjs +63 -0
  44. package/dist/esm/chunk-WPVG6LP3.mjs.map +7 -0
  45. package/dist/esm/chunk-YQVUNOO6.mjs +93 -0
  46. package/dist/esm/chunk-YQVUNOO6.mjs.map +7 -0
  47. package/dist/esm/errorcodes.mjs +22 -0
  48. package/dist/esm/errorcodes.mjs.map +7 -0
  49. package/dist/esm/filedownloader.mjs +12 -0
  50. package/dist/esm/filedownloader.mjs.map +7 -0
  51. package/dist/esm/filewriter.mjs +13 -0
  52. package/dist/esm/filewriter.mjs.map +7 -0
  53. package/dist/esm/identifiers.mjs +12 -0
  54. package/dist/esm/identifiers.mjs.map +7 -0
  55. package/dist/esm/index.mjs +78 -0
  56. package/dist/esm/index.mjs.map +7 -0
  57. package/dist/esm/inmemorywriter.mjs +13 -0
  58. package/dist/esm/inmemorywriter.mjs.map +7 -0
  59. package/dist/esm/label.mjs +12 -0
  60. package/dist/esm/label.mjs.map +7 -0
  61. package/dist/esm/loaders/compositefileloader.mjs +12 -0
  62. package/dist/esm/loaders/compositefileloader.mjs.map +7 -0
  63. package/dist/esm/loaders/defaultfileloader.mjs +15 -0
  64. package/dist/esm/loaders/defaultfileloader.mjs.map +7 -0
  65. package/dist/esm/loaders/fileloader.mjs +3 -0
  66. package/dist/esm/loaders/fileloader.mjs.map +7 -0
  67. package/dist/esm/loaders/githubfileloader.mjs +13 -0
  68. package/dist/esm/loaders/githubfileloader.mjs.map +7 -0
  69. package/dist/esm/loaders/httpfileloader.mjs +12 -0
  70. package/dist/esm/loaders/httpfileloader.mjs.map +7 -0
  71. package/dist/esm/logger.mjs +12 -0
  72. package/dist/esm/logger.mjs.map +7 -0
  73. package/dist/esm/modelwriter.mjs +10 -0
  74. package/dist/esm/modelwriter.mjs.map +7 -0
  75. package/dist/esm/null.mjs +12 -0
  76. package/dist/esm/null.mjs.map +7 -0
  77. package/dist/esm/typedstack.mjs +12 -0
  78. package/dist/esm/typedstack.mjs.map +7 -0
  79. package/dist/esm/warning.mjs +10 -0
  80. package/dist/esm/warning.mjs.map +7 -0
  81. package/dist/esm/writer.mjs +12 -0
  82. package/dist/esm/writer.mjs.map +7 -0
  83. package/dist/esm-browser/baseexception.mjs +11 -0
  84. package/dist/esm-browser/baseexception.mjs.map +7 -0
  85. package/dist/esm-browser/basefileexception.mjs +12 -0
  86. package/dist/esm-browser/basefileexception.mjs.map +7 -0
  87. package/dist/esm-browser/chunk-3XGAUT4O.mjs +100 -0
  88. package/dist/esm-browser/chunk-3XGAUT4O.mjs.map +7 -0
  89. package/dist/esm-browser/chunk-4X5DBZDM.mjs +24 -0
  90. package/dist/esm-browser/chunk-4X5DBZDM.mjs.map +7 -0
  91. package/dist/esm-browser/chunk-6SOOHVQB.mjs +65 -0
  92. package/dist/esm-browser/chunk-6SOOHVQB.mjs.map +7 -0
  93. package/dist/esm-browser/chunk-7DYPHXUR.mjs +50 -0
  94. package/dist/esm-browser/chunk-7DYPHXUR.mjs.map +7 -0
  95. package/dist/esm-browser/chunk-7LYWQ57N.mjs +461 -0
  96. package/dist/esm-browser/chunk-7LYWQ57N.mjs.map +7 -0
  97. package/dist/esm-browser/chunk-BDMF4RRF.mjs +72 -0
  98. package/dist/esm-browser/chunk-BDMF4RRF.mjs.map +7 -0
  99. package/dist/esm-browser/chunk-BSBOEFWN.mjs +57 -0
  100. package/dist/esm-browser/chunk-BSBOEFWN.mjs.map +7 -0
  101. package/dist/esm-browser/chunk-DOL2YKDZ.mjs +26 -0
  102. package/dist/esm-browser/chunk-DOL2YKDZ.mjs.map +7 -0
  103. package/dist/esm-browser/chunk-EGOFDABS.mjs +62 -0
  104. package/dist/esm-browser/chunk-EGOFDABS.mjs.map +7 -0
  105. package/dist/esm-browser/chunk-FMBRY3SQ.mjs +183 -0
  106. package/dist/esm-browser/chunk-FMBRY3SQ.mjs.map +7 -0
  107. package/dist/esm-browser/chunk-LZTTRWN3.mjs +153 -0
  108. package/dist/esm-browser/chunk-LZTTRWN3.mjs.map +7 -0
  109. package/dist/esm-browser/chunk-MCUSZIV7.mjs +41 -0
  110. package/dist/esm-browser/chunk-MCUSZIV7.mjs.map +7 -0
  111. package/dist/esm-browser/chunk-N42BHUZ6.mjs +35 -0
  112. package/dist/esm-browser/chunk-N42BHUZ6.mjs.map +7 -0
  113. package/dist/esm-browser/chunk-NAP47VIV.mjs +36 -0
  114. package/dist/esm-browser/chunk-NAP47VIV.mjs.map +7 -0
  115. package/dist/esm-browser/chunk-NQ5PDAAD.mjs +95 -0
  116. package/dist/esm-browser/chunk-NQ5PDAAD.mjs.map +7 -0
  117. package/dist/esm-browser/chunk-NSJTBLWA.mjs +71 -0
  118. package/dist/esm-browser/chunk-NSJTBLWA.mjs.map +7 -0
  119. package/dist/esm-browser/chunk-S52XDDAF.mjs +30 -0
  120. package/dist/esm-browser/chunk-S52XDDAF.mjs.map +7 -0
  121. package/dist/esm-browser/chunk-SU6SG5PJ.mjs +45 -0
  122. package/dist/esm-browser/chunk-SU6SG5PJ.mjs.map +7 -0
  123. package/dist/esm-browser/chunk-WCGRUR5U.mjs +30 -0
  124. package/dist/esm-browser/chunk-WCGRUR5U.mjs.map +7 -0
  125. package/dist/esm-browser/chunk-YI4IYGSC.mjs +53 -0
  126. package/dist/esm-browser/chunk-YI4IYGSC.mjs.map +7 -0
  127. package/dist/esm-browser/chunk-YURYZDD2.mjs +453 -0
  128. package/dist/esm-browser/chunk-YURYZDD2.mjs.map +7 -0
  129. package/dist/esm-browser/errorcodes.mjs +20 -0
  130. package/dist/esm-browser/errorcodes.mjs.map +7 -0
  131. package/dist/esm-browser/filedownloader.mjs +11 -0
  132. package/dist/esm-browser/filedownloader.mjs.map +7 -0
  133. package/dist/esm-browser/filewriter.mjs +12 -0
  134. package/dist/esm-browser/filewriter.mjs.map +7 -0
  135. package/dist/esm-browser/identifiers.mjs +10 -0
  136. package/dist/esm-browser/identifiers.mjs.map +7 -0
  137. package/dist/esm-browser/index.mjs +83 -0
  138. package/dist/esm-browser/index.mjs.map +7 -0
  139. package/dist/esm-browser/inmemorywriter.mjs +11 -0
  140. package/dist/esm-browser/inmemorywriter.mjs.map +7 -0
  141. package/dist/esm-browser/label.mjs +10 -0
  142. package/dist/esm-browser/label.mjs.map +7 -0
  143. package/dist/esm-browser/loaders/compositefileloader.mjs +10 -0
  144. package/dist/esm-browser/loaders/compositefileloader.mjs.map +7 -0
  145. package/dist/esm-browser/loaders/defaultfileloader.mjs +14 -0
  146. package/dist/esm-browser/loaders/defaultfileloader.mjs.map +7 -0
  147. package/dist/esm-browser/loaders/fileloader.mjs +7 -0
  148. package/dist/esm-browser/loaders/fileloader.mjs.map +7 -0
  149. package/dist/esm-browser/loaders/githubfileloader.mjs +12 -0
  150. package/dist/esm-browser/loaders/githubfileloader.mjs.map +7 -0
  151. package/dist/esm-browser/loaders/httpfileloader.mjs +11 -0
  152. package/dist/esm-browser/loaders/httpfileloader.mjs.map +7 -0
  153. package/dist/esm-browser/logger.mjs +10 -0
  154. package/dist/esm-browser/logger.mjs.map +7 -0
  155. package/dist/esm-browser/modelwriter.mjs +9 -0
  156. package/dist/esm-browser/modelwriter.mjs.map +7 -0
  157. package/dist/esm-browser/null.mjs +10 -0
  158. package/dist/esm-browser/null.mjs.map +7 -0
  159. package/dist/esm-browser/typedstack.mjs +10 -0
  160. package/dist/esm-browser/typedstack.mjs.map +7 -0
  161. package/dist/esm-browser/warning.mjs +8 -0
  162. package/dist/esm-browser/warning.mjs.map +7 -0
  163. package/dist/esm-browser/writer.mjs +10 -0
  164. package/dist/esm-browser/writer.mjs.map +7 -0
  165. package/dist/filedownloader.d.ts +14 -6
  166. package/dist/filedownloader.js +32 -12
  167. package/dist/filewriter.d.ts +3 -2
  168. package/dist/filewriter.js +10 -4
  169. package/dist/identifiers.js +4 -2
  170. package/dist/index.d.ts +18 -17
  171. package/dist/index.js +34 -31
  172. package/dist/inmemorywriter.d.ts +3 -2
  173. package/dist/inmemorywriter.js +10 -4
  174. package/dist/loaders/compositefileloader.d.ts +2 -1
  175. package/dist/loaders/compositefileloader.js +5 -2
  176. package/dist/loaders/defaultfileloader.d.ts +3 -2
  177. package/dist/loaders/defaultfileloader.js +14 -8
  178. package/dist/loaders/githubfileloader.d.ts +3 -2
  179. package/dist/loaders/githubfileloader.js +10 -4
  180. package/dist/loaders/httpfileloader.d.ts +2 -1
  181. package/dist/loaders/httpfileloader.js +10 -3
  182. package/dist/logger.d.ts +2 -1
  183. package/dist/logger.js +5 -2
  184. package/dist/modelwriter.js +6 -4
  185. package/dist/null.d.ts +3 -2
  186. package/dist/null.js +5 -2
  187. package/dist/typedstack.d.ts +2 -1
  188. package/dist/typedstack.js +5 -2
  189. package/dist/writer.d.ts +2 -1
  190. package/dist/writer.js +5 -2
  191. package/package.json +16 -8
  192. package/dist/concerto-util.js +0 -2
  193. package/dist/concerto-util.js.LICENSE.txt +0 -19
@@ -15,4 +15,5 @@ declare class BaseException extends Error {
15
15
  */
16
16
  constructor(message: string, component?: string, errorType?: string);
17
17
  }
18
- export = BaseException;
18
+ export { BaseException };
19
+ export default BaseException;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /*
2
3
  * Licensed under the Apache License, Version 2.0 (the "License");
3
4
  * you may not use this file except in compliance with the License.
@@ -11,7 +12,6 @@
11
12
  * See the License for the specific language governing permissions and
12
13
  * limitations under the License.
13
14
  */
14
- 'use strict';
15
15
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
16
  if (k2 === undefined) k2 = k;
17
17
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -45,6 +45,8 @@ var __importStar = (this && this.__importStar) || (function () {
45
45
  return result;
46
46
  };
47
47
  })();
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.BaseException = void 0;
48
50
  const ErrorCodes = __importStar(require("./errorcodes"));
49
51
  // eslint-disable-next-line @typescript-eslint/no-var-requires
50
52
  const packageJson = require('../package.json');
@@ -72,4 +74,5 @@ class BaseException extends Error {
72
74
  }
73
75
  }
74
76
  }
75
- module.exports = BaseException;
77
+ exports.BaseException = BaseException;
78
+ exports.default = BaseException;
@@ -1,4 +1,4 @@
1
- import BaseException = require('./baseexception');
1
+ import BaseException from './baseexception';
2
2
  /**
3
3
  * Exception throws when a Concerto file is semantically invalid
4
4
  * @extends BaseException
@@ -35,4 +35,5 @@ declare class BaseFileException extends BaseException {
35
35
  */
36
36
  getFileName(): string | null;
37
37
  }
38
- export = BaseFileException;
38
+ export { BaseFileException };
39
+ export default BaseFileException;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /*
2
3
  * Licensed under the Apache License, Version 2.0 (the "License");
3
4
  * you may not use this file except in compliance with the License.
@@ -11,8 +12,12 @@
11
12
  * See the License for the specific language governing permissions and
12
13
  * limitations under the License.
13
14
  */
14
- 'use strict';
15
- const BaseException = require("./baseexception");
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.BaseFileException = void 0;
20
+ const baseexception_1 = __importDefault(require("./baseexception"));
16
21
  /**
17
22
  * Exception throws when a Concerto file is semantically invalid
18
23
  * @extends BaseException
@@ -20,7 +25,7 @@ const BaseException = require("./baseexception");
20
25
  * @class
21
26
  * @memberof module:concerto-core
22
27
  */
23
- class BaseFileException extends BaseException {
28
+ class BaseFileException extends baseexception_1.default {
24
29
  /**
25
30
  * Create an BaseFileException
26
31
  * @param message - the message for the exception
@@ -57,4 +62,5 @@ class BaseFileException extends BaseException {
57
62
  return this.fileName;
58
63
  }
59
64
  }
60
- module.exports = BaseFileException;
65
+ exports.BaseFileException = BaseFileException;
66
+ exports.default = BaseFileException;
@@ -0,0 +1,13 @@
1
+ import { createRequire as __createRequire } from "module";
2
+ const require = __createRequire(import.meta.url);
3
+ import {
4
+ BaseException,
5
+ baseexception_default
6
+ } from "./chunk-5HVAQ6AX.mjs";
7
+ import "./chunk-FK2LDKS6.mjs";
8
+ import "./chunk-PMP2SMHG.mjs";
9
+ export {
10
+ BaseException,
11
+ baseexception_default as default
12
+ };
13
+ //# sourceMappingURL=baseexception.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,14 @@
1
+ import { createRequire as __createRequire } from "module";
2
+ const require = __createRequire(import.meta.url);
3
+ import {
4
+ BaseFileException,
5
+ basefileexception_default
6
+ } from "./chunk-3A2THGYW.mjs";
7
+ import "./chunk-5HVAQ6AX.mjs";
8
+ import "./chunk-FK2LDKS6.mjs";
9
+ import "./chunk-PMP2SMHG.mjs";
10
+ export {
11
+ BaseFileException,
12
+ basefileexception_default as default
13
+ };
14
+ //# sourceMappingURL=basefileexception.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,51 @@
1
+ import { createRequire as __createRequire } from "module";
2
+ const require = __createRequire(import.meta.url);
3
+ import {
4
+ baseexception_default
5
+ } from "./chunk-5HVAQ6AX.mjs";
6
+
7
+ // src/basefileexception.ts
8
+ var BaseFileException = class extends baseexception_default {
9
+ /**
10
+ * Create an BaseFileException
11
+ * @param message - the message for the exception
12
+ * @param fileLocation - the optional file location associated with the exception
13
+ * @param fullMessage - the optional full message text
14
+ * @param fileName - the file name
15
+ * @param component - the component which throws this error
16
+ */
17
+ constructor(message, fileLocation = null, fullMessage = null, fileName = null, component) {
18
+ super(fullMessage ? fullMessage : message, component);
19
+ this.fileLocation = fileLocation;
20
+ this.shortMessage = message;
21
+ this.fileName = fileName;
22
+ }
23
+ /**
24
+ * Returns the file location associated with the exception or null
25
+ * @return the optional location associated with the exception
26
+ */
27
+ getFileLocation() {
28
+ return this.fileLocation;
29
+ }
30
+ /**
31
+ * Returns the error message without the location of the error
32
+ * @returns the error message
33
+ */
34
+ getShortMessage() {
35
+ return this.shortMessage;
36
+ }
37
+ /**
38
+ * Returns the fileName for the error
39
+ * @returns the file name or null
40
+ */
41
+ getFileName() {
42
+ return this.fileName;
43
+ }
44
+ };
45
+ var basefileexception_default = BaseFileException;
46
+
47
+ export {
48
+ BaseFileException,
49
+ basefileexception_default
50
+ };
51
+ //# sourceMappingURL=chunk-3A2THGYW.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/basefileexception.ts"],
4
+ "sourcesContent": ["/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport BaseException from './baseexception';\n\n/**\n * Exception throws when a Concerto file is semantically invalid\n * @extends BaseException\n * @see {@link BaseException}\n * @class\n * @memberof module:concerto-core\n */\nclass BaseFileException extends BaseException {\n public fileLocation: string | null;\n public shortMessage: string;\n public fileName: string | null;\n\n /**\n * Create an BaseFileException\n * @param message - the message for the exception\n * @param fileLocation - the optional file location associated with the exception\n * @param fullMessage - the optional full message text\n * @param fileName - the file name\n * @param component - the component which throws this error\n */\n constructor(message: string, fileLocation: string | null = null, fullMessage: string | null = null, fileName: string | null = null, component?: string) {\n super(fullMessage ? fullMessage : message, component);\n this.fileLocation = fileLocation;\n this.shortMessage = message;\n this.fileName = fileName;\n }\n\n /**\n * Returns the file location associated with the exception or null\n * @return the optional location associated with the exception\n */\n getFileLocation(): string | null {\n return this.fileLocation;\n }\n\n /**\n * Returns the error message without the location of the error\n * @returns the error message\n */\n getShortMessage(): string {\n return this.shortMessage;\n }\n\n /**\n * Returns the fileName for the error\n * @returns the file name or null\n */\n getFileName(): string | null {\n return this.fileName;\n }\n}\n\nexport { BaseFileException };\nexport default BaseFileException;\n"],
5
+ "mappings": ";;;;;;;AAuBA,IAAM,oBAAN,cAAgC,sBAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAa1C,YAAY,SAAiB,eAA8B,MAAM,cAA6B,MAAM,WAA0B,MAAM,WAAoB;AACpJ,UAAM,cAAc,cAAc,SAAS,SAAS;AACpD,SAAK,eAAe;AACpB,SAAK,eAAe;AACpB,SAAK,WAAW;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,kBAAiC;AAC7B,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,kBAA0B;AACtB,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,cAA6B;AACzB,WAAO,KAAK;AAAA,EAChB;AACJ;AAGA,IAAO,4BAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,29 @@
1
+ import { createRequire as __createRequire } from "module";
2
+ const require = __createRequire(import.meta.url);
3
+ import {
4
+ __export
5
+ } from "./chunk-PMP2SMHG.mjs";
6
+
7
+ // src/warning.ts
8
+ var warning_exports = {};
9
+ __export(warning_exports, {
10
+ printDeprecationWarning: () => printDeprecationWarning
11
+ });
12
+ var isWarningEmitted = false;
13
+ function printDeprecationWarning(message, type, code, detail) {
14
+ const customEmitWarning = process.emitWarning;
15
+ if (!isWarningEmitted) {
16
+ isWarningEmitted = true;
17
+ customEmitWarning(`DEPRECATED: ${message}`, {
18
+ type,
19
+ code,
20
+ detail
21
+ });
22
+ }
23
+ }
24
+
25
+ export {
26
+ printDeprecationWarning,
27
+ warning_exports
28
+ };
29
+ //# sourceMappingURL=chunk-3RJ6JXLX.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/warning.ts"],
4
+ "sourcesContent": ["/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n'use strict';\n\n// Tell TypeScript that 'process' exists globally (shims Node.js types)\ndeclare const process: any;\n\nlet isWarningEmitted = false;\n\n/**\n * Emits DeprecationWaring to stderr only once and can be caught using an warning event listener as well, please define the code\n * and document the deprecation code on https://concerto.accordproject.org/deprecation\n * @param message - message of the deprecation warning\n * @param type - type of the deprecation warning\n * @param code - code of the deprecation warning\n * @param detail - detail of the deprecation warning\n */\nexport function printDeprecationWarning(message: string, type: string, code: string, detail: string): void {\n // This will get polyfilled in the webpack.config.js as process.emitWarning is not available in the browser\n const customEmitWarning = process.emitWarning;\n if (!isWarningEmitted) {\n isWarningEmitted = true;\n customEmitWarning(`DEPRECATED: ${message}`, {\n type,\n code,\n detail\n });\n }\n}"],
5
+ "mappings": ";;;;;;;AAAA;AAAA;AAAA;AAAA;AAmBA,IAAI,mBAAmB;AAUhB,SAAS,wBAAwB,SAAiB,MAAc,MAAc,QAAsB;AAEvG,QAAM,oBAAoB,QAAQ;AAClC,MAAI,CAAC,kBAAkB;AACnB,uBAAmB;AACnB,sBAAkB,eAAe,OAAO,IAAI;AAAA,MACxC;AAAA,MACA;AAAA,MACA;AAAA,IACJ,CAAC;AAAA,EACL;AACJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,41 @@
1
+ import { createRequire as __createRequire } from "module";
2
+ const require = __createRequire(import.meta.url);
3
+ import {
4
+ __export
5
+ } from "./chunk-PMP2SMHG.mjs";
6
+
7
+ // src/identifiers.ts
8
+ var identifiers_exports = {};
9
+ __export(identifiers_exports, {
10
+ ID_REGEX: () => ID_REGEX,
11
+ normalizeIdentifier: () => normalizeIdentifier
12
+ });
13
+ var ID_REGEX = /^(\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4})(?:\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D)*$/u;
14
+ function normalizeIdentifier(identifier, truncateLength = -1) {
15
+ const replacer = (_match, group1) => {
16
+ let escapedChar = "";
17
+ for (const codePoint of group1) {
18
+ escapedChar += `_${codePoint.codePointAt(0).toString(16)}`;
19
+ }
20
+ return escapedChar;
21
+ };
22
+ let result = identifier ?? String(identifier);
23
+ if (typeof result !== "string") {
24
+ throw new Error(`Unsupported identifier type, '${typeof result}'.`);
25
+ }
26
+ result = result.replace(/^(?:\p{Nd}|\p{Mn}|\p{Mc}|(?!_)\p{Pc})/u, "_$&").replace(/[-‐−@#:;><|/\\\u200c\u200d]/g, "_").replace(/\s/g, "_").replace(/(?!\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D|\\u[0-9A-Fa-f]{4})(.)/gu, replacer).replace(/([\uD800-\uDFFF])/g, replacer);
27
+ if (truncateLength > 0) {
28
+ result = result.substring(0, truncateLength);
29
+ }
30
+ if (!ID_REGEX.test(result)) {
31
+ throw new Error(`Unexpected error. Not able to escape identifier '${result}'.`);
32
+ }
33
+ return result;
34
+ }
35
+
36
+ export {
37
+ ID_REGEX,
38
+ normalizeIdentifier,
39
+ identifiers_exports
40
+ };
41
+ //# sourceMappingURL=chunk-3U4T7O4P.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/identifiers.ts"],
4
+ "sourcesContent": ["/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n'use strict';\n\n// Conforms to Concerto Spec for identifiers\nexport const ID_REGEX = /^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u;\n\n/**\n * Function that attempts to normalize arbitrary strings\n * into valid Concerto identifiers\n *\n * @param identifier - the input value\n * @param truncateLength - Length at which to truncate the identifier\n * @returns - An identifier that meets the Concerto specification\n */\nexport function normalizeIdentifier(identifier: string | null | undefined, truncateLength: number = -1): string {\n const replacer = (_match: string, group1: string) => {\n let escapedChar = '';\n // Loop through characters with multiple code points\n for (const codePoint of group1) {\n // @ts-ignore\n escapedChar += `_${codePoint.codePointAt(0).toString(16)}`;\n }\n return escapedChar;\n };\n\n // Stringify null & undefined values\n let result = identifier ?? String(identifier);\n\n if (typeof result !== 'string'){\n throw new Error(`Unsupported identifier type, '${typeof result}'.`);\n }\n\n // 1. If the identifier begins with a character that is only valid as a\n // continuation, a digit, a combining mark or a connector other than _,\n // add a leading underscore\n result = result\n .replace(/^(?:\\p{Nd}|\\p{Mn}|\\p{Mc}|(?!_)\\p{Pc})/u, '_$&')\n\n // 2. Substitute Whitespace, and joiners\n .replace(/[-\u2010\u2212@#:;><|/\\\\\\u200c\\u200d]/g, '_')\n .replace(/\\s/g, '_')\n\n // 3a. Replace Invalid Characters\n .replace(/(?!\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D|\\\\u[0-9A-Fa-f]{4})(.)/gu, replacer)\n\n // 3b. Escape Surrogate Pairs\n .replace(/([\\uD800-\\uDFFF])/g, replacer);\n\n // 4. Optionally truncate the identifier\n if (truncateLength > 0){\n result = result.substring(0,truncateLength);\n }\n\n // Check validity\n if (!ID_REGEX.test(result)){\n throw new Error(`Unexpected error. Not able to escape identifier '${result}'.`);\n }\n return result;\n}"],
5
+ "mappings": ";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBO,IAAM,WAAW;AAUjB,SAAS,oBAAoB,YAAuC,iBAAyB,IAAY;AAC5G,QAAM,WAAW,CAAC,QAAgB,WAAmB;AACjD,QAAI,cAAc;AAElB,eAAW,aAAa,QAAQ;AAE5B,qBAAe,IAAI,UAAU,YAAY,CAAC,EAAE,SAAS,EAAE,CAAC;AAAA,IAC5D;AACA,WAAO;AAAA,EACX;AAGA,MAAI,SAAS,cAAc,OAAO,UAAU;AAE5C,MAAI,OAAO,WAAW,UAAS;AAC3B,UAAM,IAAI,MAAM,iCAAiC,OAAO,MAAM,IAAI;AAAA,EACtE;AAKA,WAAS,OACJ,QAAQ,0CAA0C,KAAK,EAGvD,QAAQ,gCAAgC,GAAG,EAC3C,QAAQ,OAAO,GAAG,EAGlB,QAAQ,uHAAuH,QAAQ,EAGvI,QAAQ,sBAAsB,QAAQ;AAG3C,MAAI,iBAAiB,GAAE;AACnB,aAAS,OAAO,UAAU,GAAE,cAAc;AAAA,EAC9C;AAGA,MAAI,CAAC,SAAS,KAAK,MAAM,GAAE;AACvB,UAAM,IAAI,MAAM,oDAAoD,MAAM,IAAI;AAAA,EAClF;AACA,SAAO;AACX;",
6
+ "names": []
7
+ }
@@ -0,0 +1,183 @@
1
+ import { createRequire as __createRequire } from "module";
2
+ const require = __createRequire(import.meta.url);
3
+ import {
4
+ DEFAULT_BASE_EXCEPTION
5
+ } from "./chunk-FK2LDKS6.mjs";
6
+ import {
7
+ __commonJS
8
+ } from "./chunk-PMP2SMHG.mjs";
9
+
10
+ // package.json
11
+ var require_package = __commonJS({
12
+ "package.json"(exports, module) {
13
+ module.exports = {
14
+ name: "@accordproject/concerto-util",
15
+ version: "4.2.0",
16
+ description: "Utilities for Concerto Modeling Language",
17
+ homepage: "https://github.com/accordproject/concerto",
18
+ engines: {
19
+ node: ">=18",
20
+ npm: ">=9"
21
+ },
22
+ main: "dist/index.js",
23
+ typings: "dist/index.d.ts",
24
+ scripts: {
25
+ clean: "rimraf dist",
26
+ prebuild: "npm-run-all clean",
27
+ pretest: "npm run lint",
28
+ lint: "eslint .",
29
+ postlint: "npm run licchk",
30
+ licchk: "license-check-and-add",
31
+ postlicchk: "npm run doc",
32
+ doc: "jsdoc --pedantic --recurse -c jsdoc.json",
33
+ test: "nyc mocha -r ts-node/register --recursive -t 10000",
34
+ "test:watch": "nyc mocha -r ts-node/register --watch --recursive -t 10000",
35
+ build: "tsc -p tsconfig.build.json && npm run build:esm",
36
+ "build:esm": "node ../../scripts/build-esm.js"
37
+ },
38
+ repository: {
39
+ type: "git",
40
+ url: "https://github.com/accordproject/concerto.git",
41
+ directory: "packages/concerto-util"
42
+ },
43
+ keywords: [
44
+ "blockchain",
45
+ "hyperledger",
46
+ "solutions"
47
+ ],
48
+ author: "accordproject.org",
49
+ license: "Apache-2.0",
50
+ devDependencies: {
51
+ "@istanbuljs/nyc-config-typescript": "1.0.2",
52
+ "@types/jest": "28.1.1",
53
+ "@types/node": "18.11.18",
54
+ "@types/semver": "7.3.10",
55
+ "@typescript-eslint/eslint-plugin": "^8.46.2",
56
+ "@typescript-eslint/parser": "^8.46.2",
57
+ chai: "4.3.6",
58
+ "chai-as-promised": "7.1.1",
59
+ "chai-things": "0.2.0",
60
+ eslint: "8.57.1",
61
+ jsdoc: "^4.0.2",
62
+ "license-check-and-add": "2.3.6",
63
+ mocha: "^10.8.2",
64
+ nock: "^13.3.8",
65
+ "npm-run-all": "4.1.5",
66
+ nyc: "15.1.0",
67
+ rimraf: "3.0.2",
68
+ "tmp-promise": "3.0.2",
69
+ "ts-jest": "28.0.4",
70
+ "ts-node": "10.9.1",
71
+ typescript: "5.9.3",
72
+ undici: "6.25.0"
73
+ },
74
+ dependencies: {
75
+ "@supercharge/promise-pool": "1.7.0",
76
+ colors: "1.4.0",
77
+ debug: "4.3.4",
78
+ slash: "3.0.0"
79
+ },
80
+ browserslist: "> 0.25%, not dead",
81
+ "license-check-and-add-config": {
82
+ folder: "./src",
83
+ license: "HEADER",
84
+ exact_paths_method: "EXCLUDE",
85
+ exact_paths: [
86
+ "api.txt",
87
+ "composer-logs",
88
+ "coverage",
89
+ "LICENSE",
90
+ "node_modules",
91
+ ".nyc-output",
92
+ "out",
93
+ ".tern-project"
94
+ ],
95
+ file_type_method: "EXCLUDE",
96
+ file_types: [
97
+ ".yml",
98
+ ".yaml",
99
+ ".zip",
100
+ ".tgz"
101
+ ],
102
+ insert_license: false,
103
+ license_formats: {
104
+ "js|ts|njk|pegjs|cto|acl|qry": {
105
+ prepend: "/*",
106
+ append: " */",
107
+ eachLine: {
108
+ prepend: " * "
109
+ }
110
+ },
111
+ "npmrc|editorconfig|txt": {
112
+ eachLine: {
113
+ prepend: "# "
114
+ }
115
+ },
116
+ md: {
117
+ file: "HEADER.md"
118
+ }
119
+ }
120
+ },
121
+ nyc: {
122
+ extends: "@istanbuljs/nyc-config-typescript",
123
+ "produce-source-map": "true",
124
+ reporter: [
125
+ "lcov",
126
+ "text-summary",
127
+ "html",
128
+ "json"
129
+ ],
130
+ include: [
131
+ "src/**/*.js",
132
+ "src/**/*.ts"
133
+ ],
134
+ all: true,
135
+ "check-coverage": true,
136
+ statements: 100,
137
+ branches: 94,
138
+ functions: 100,
139
+ lines: 100
140
+ },
141
+ module: "dist/esm/index.mjs",
142
+ exports: {
143
+ ".": {
144
+ types: "./dist/index.d.ts",
145
+ browser: "./dist/esm-browser/index.mjs",
146
+ import: "./dist/esm/index.mjs",
147
+ require: "./dist/index.js"
148
+ },
149
+ "./package.json": "./package.json",
150
+ "./dist/*": "./dist/*"
151
+ },
152
+ sideEffects: false
153
+ };
154
+ }
155
+ });
156
+
157
+ // src/baseexception.ts
158
+ var packageJson = require_package();
159
+ var BaseException = class extends Error {
160
+ /**
161
+ * Create the BaseException.
162
+ * @param message - The exception message.
163
+ * @param component - The optional component which throws this error.
164
+ * @param errorType - The optional error code regarding the error
165
+ */
166
+ constructor(message, component, errorType) {
167
+ super(message);
168
+ this.component = component || packageJson.name;
169
+ this.name = this.constructor.name;
170
+ this.message = message;
171
+ this.errorType = errorType || DEFAULT_BASE_EXCEPTION;
172
+ if (typeof Error.captureStackTrace === "function") {
173
+ Error.captureStackTrace(this, this.constructor);
174
+ }
175
+ }
176
+ };
177
+ var baseexception_default = BaseException;
178
+
179
+ export {
180
+ BaseException,
181
+ baseexception_default
182
+ };
183
+ //# sourceMappingURL=chunk-5HVAQ6AX.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../package.json", "../../src/baseexception.ts"],
4
+ "sourcesContent": ["{\n \"name\": \"@accordproject/concerto-util\",\n \"version\": \"4.2.0\",\n \"description\": \"Utilities for Concerto Modeling Language\",\n \"homepage\": \"https://github.com/accordproject/concerto\",\n \"engines\": {\n \"node\": \">=18\",\n \"npm\": \">=9\"\n },\n \"main\": \"dist/index.js\",\n \"typings\": \"dist/index.d.ts\",\n \"scripts\": {\n \"clean\": \"rimraf dist\",\n \"prebuild\": \"npm-run-all clean\",\n \"pretest\": \"npm run lint\",\n \"lint\": \"eslint .\",\n \"postlint\": \"npm run licchk\",\n \"licchk\": \"license-check-and-add\",\n \"postlicchk\": \"npm run doc\",\n \"doc\": \"jsdoc --pedantic --recurse -c jsdoc.json\",\n \"test\": \"nyc mocha -r ts-node/register --recursive -t 10000\",\n \"test:watch\": \"nyc mocha -r ts-node/register --watch --recursive -t 10000\",\n \"build\": \"tsc -p tsconfig.build.json && npm run build:esm\",\n \"build:esm\": \"node ../../scripts/build-esm.js\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/accordproject/concerto.git\",\n \"directory\": \"packages/concerto-util\"\n },\n \"keywords\": [\n \"blockchain\",\n \"hyperledger\",\n \"solutions\"\n ],\n \"author\": \"accordproject.org\",\n \"license\": \"Apache-2.0\",\n \"devDependencies\": {\n \"@istanbuljs/nyc-config-typescript\": \"1.0.2\",\n \"@types/jest\": \"28.1.1\",\n \"@types/node\": \"18.11.18\",\n \"@types/semver\": \"7.3.10\",\n \"@typescript-eslint/eslint-plugin\": \"^8.46.2\",\n \"@typescript-eslint/parser\": \"^8.46.2\",\n \"chai\": \"4.3.6\",\n \"chai-as-promised\": \"7.1.1\",\n \"chai-things\": \"0.2.0\",\n \"eslint\": \"8.57.1\",\n \"jsdoc\": \"^4.0.2\",\n \"license-check-and-add\": \"2.3.6\",\n \"mocha\": \"^10.8.2\",\n \"nock\": \"^13.3.8\",\n \"npm-run-all\": \"4.1.5\",\n \"nyc\": \"15.1.0\",\n \"rimraf\": \"3.0.2\",\n \"tmp-promise\": \"3.0.2\",\n \"ts-jest\": \"28.0.4\",\n \"ts-node\": \"10.9.1\",\n \"typescript\": \"5.9.3\",\n \"undici\": \"6.25.0\"\n },\n \"dependencies\": {\n \"@supercharge/promise-pool\": \"1.7.0\",\n \"colors\": \"1.4.0\",\n \"debug\": \"4.3.4\",\n \"slash\": \"3.0.0\"\n },\n \"browserslist\": \"> 0.25%, not dead\",\n \"license-check-and-add-config\": {\n \"folder\": \"./src\",\n \"license\": \"HEADER\",\n \"exact_paths_method\": \"EXCLUDE\",\n \"exact_paths\": [\n \"api.txt\",\n \"composer-logs\",\n \"coverage\",\n \"LICENSE\",\n \"node_modules\",\n \".nyc-output\",\n \"out\",\n \".tern-project\"\n ],\n \"file_type_method\": \"EXCLUDE\",\n \"file_types\": [\n \".yml\",\n \".yaml\",\n \".zip\",\n \".tgz\"\n ],\n \"insert_license\": false,\n \"license_formats\": {\n \"js|ts|njk|pegjs|cto|acl|qry\": {\n \"prepend\": \"/*\",\n \"append\": \" */\",\n \"eachLine\": {\n \"prepend\": \" * \"\n }\n },\n \"npmrc|editorconfig|txt\": {\n \"eachLine\": {\n \"prepend\": \"# \"\n }\n },\n \"md\": {\n \"file\": \"HEADER.md\"\n }\n }\n },\n \"nyc\": {\n \"extends\": \"@istanbuljs/nyc-config-typescript\",\n \"produce-source-map\": \"true\",\n \"reporter\": [\n \"lcov\",\n \"text-summary\",\n \"html\",\n \"json\"\n ],\n \"include\": [\n \"src/**/*.js\",\n \"src/**/*.ts\"\n ],\n \"all\": true,\n \"check-coverage\": true,\n \"statements\": 100,\n \"branches\": 94,\n \"functions\": 100,\n \"lines\": 100\n },\n \"module\": \"dist/esm/index.mjs\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"browser\": \"./dist/esm-browser/index.mjs\",\n \"import\": \"./dist/esm/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./package.json\": \"./package.json\",\n \"./dist/*\": \"./dist/*\"\n },\n \"sideEffects\": false\n}\n", "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as ErrorCodes from './errorcodes';\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst packageJson = require('../package.json');\n\n/**\n* A base class for all Concerto exceptions\n* @extends Error\n* @class\n* @memberof module:concerto-core\n*/\nclass BaseException extends Error {\n public component: string;\n public errorType: string;\n\n /**\n * Create the BaseException.\n * @param message - The exception message.\n * @param component - The optional component which throws this error.\n * @param errorType - The optional error code regarding the error\n */\n constructor(message: string, component?: string, errorType?: string) {\n super(message);\n this.component = component || packageJson.name;\n this.name = this.constructor.name;\n this.message = message;\n this.errorType = errorType || ErrorCodes.DEFAULT_BASE_EXCEPTION;\n if (typeof Error.captureStackTrace === 'function') {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n\nexport { BaseException };\nexport default BaseException;\n"],
5
+ "mappings": ";;;;;;;;;;AAAA;AAAA;AAAA;AAAA,MACE,MAAQ;AAAA,MACR,SAAW;AAAA,MACX,aAAe;AAAA,MACf,UAAY;AAAA,MACZ,SAAW;AAAA,QACT,MAAQ;AAAA,QACR,KAAO;AAAA,MACT;AAAA,MACA,MAAQ;AAAA,MACR,SAAW;AAAA,MACX,SAAW;AAAA,QACT,OAAS;AAAA,QACT,UAAY;AAAA,QACZ,SAAW;AAAA,QACX,MAAQ;AAAA,QACR,UAAY;AAAA,QACZ,QAAU;AAAA,QACV,YAAc;AAAA,QACd,KAAO;AAAA,QACP,MAAQ;AAAA,QACR,cAAc;AAAA,QACd,OAAS;AAAA,QACT,aAAa;AAAA,MACf;AAAA,MACA,YAAc;AAAA,QACZ,MAAQ;AAAA,QACR,KAAO;AAAA,QACP,WAAa;AAAA,MACf;AAAA,MACA,UAAY;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,QAAU;AAAA,MACV,SAAW;AAAA,MACX,iBAAmB;AAAA,QACjB,qCAAqC;AAAA,QACrC,eAAe;AAAA,QACf,eAAe;AAAA,QACf,iBAAiB;AAAA,QACjB,oCAAoC;AAAA,QACpC,6BAA6B;AAAA,QAC7B,MAAQ;AAAA,QACR,oBAAoB;AAAA,QACpB,eAAe;AAAA,QACf,QAAU;AAAA,QACV,OAAS;AAAA,QACT,yBAAyB;AAAA,QACzB,OAAS;AAAA,QACT,MAAQ;AAAA,QACR,eAAe;AAAA,QACf,KAAO;AAAA,QACP,QAAU;AAAA,QACV,eAAe;AAAA,QACf,WAAW;AAAA,QACX,WAAW;AAAA,QACX,YAAc;AAAA,QACd,QAAU;AAAA,MACZ;AAAA,MACA,cAAgB;AAAA,QACd,6BAA6B;AAAA,QAC7B,QAAU;AAAA,QACV,OAAS;AAAA,QACT,OAAS;AAAA,MACX;AAAA,MACA,cAAgB;AAAA,MAChB,gCAAgC;AAAA,QAC9B,QAAU;AAAA,QACV,SAAW;AAAA,QACX,oBAAsB;AAAA,QACtB,aAAe;AAAA,UACb;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,kBAAoB;AAAA,QACpB,YAAc;AAAA,UACZ;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,gBAAkB;AAAA,QAClB,iBAAmB;AAAA,UACjB,+BAA+B;AAAA,YAC7B,SAAW;AAAA,YACX,QAAU;AAAA,YACV,UAAY;AAAA,cACV,SAAW;AAAA,YACb;AAAA,UACF;AAAA,UACA,0BAA0B;AAAA,YACxB,UAAY;AAAA,cACV,SAAW;AAAA,YACb;AAAA,UACF;AAAA,UACA,IAAM;AAAA,YACJ,MAAQ;AAAA,UACV;AAAA,QACF;AAAA,MACF;AAAA,MACA,KAAO;AAAA,QACL,SAAW;AAAA,QACX,sBAAsB;AAAA,QACtB,UAAY;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,SAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACA,KAAO;AAAA,QACP,kBAAkB;AAAA,QAClB,YAAc;AAAA,QACd,UAAY;AAAA,QACZ,WAAa;AAAA,QACb,OAAS;AAAA,MACX;AAAA,MACA,QAAU;AAAA,MACV,SAAW;AAAA,QACT,KAAK;AAAA,UACH,OAAS;AAAA,UACT,SAAW;AAAA,UACX,QAAU;AAAA,UACV,SAAW;AAAA,QACb;AAAA,QACA,kBAAkB;AAAA,QAClB,YAAY;AAAA,MACd;AAAA,MACA,aAAe;AAAA,IACjB;AAAA;AAAA;;;AC5HA,IAAM,cAAc;AAQpB,IAAM,gBAAN,cAA4B,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAU9B,YAAY,SAAiB,WAAoB,WAAoB;AACjE,UAAM,OAAO;AACb,SAAK,YAAY,aAAa,YAAY;AAC1C,SAAK,OAAO,KAAK,YAAY;AAC7B,SAAK,UAAU;AACf,SAAK,YAAY,aAAwB;AACzC,QAAI,OAAO,MAAM,sBAAsB,YAAY;AAC/C,YAAM,kBAAkB,MAAM,KAAK,WAAW;AAAA,IAClD;AAAA,EACJ;AACJ;AAGA,IAAO,wBAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,43 @@
1
+ import { createRequire as __createRequire } from "module";
2
+ const require = __createRequire(import.meta.url);
3
+ import {
4
+ httpfileloader_default
5
+ } from "./chunk-GOLEPEBI.mjs";
6
+
7
+ // src/loaders/githubfileloader.ts
8
+ var GitHubFileLoader = class extends httpfileloader_default {
9
+ /**
10
+ * Create the GitHubFileLoader.
11
+ * @param processFile - a function to apply to the content of the file
12
+ */
13
+ constructor(processFile) {
14
+ super(processFile);
15
+ }
16
+ /**
17
+ * Returns true if this ModelLoader can process the URL
18
+ * @param url - the URL
19
+ * @return true if this ModelLoader accepts the URL
20
+ * @abstract
21
+ */
22
+ accepts(url) {
23
+ return url.startsWith("github://");
24
+ }
25
+ /**
26
+ * Load a File from a URL and return it
27
+ * @param url - the url to get
28
+ * @param options - additional options
29
+ * @return a promise to the File
30
+ */
31
+ load(url, options) {
32
+ const rewrittenUrl = "https://raw.githubusercontent.com/" + url.substring(9);
33
+ const result = super.load(rewrittenUrl, options);
34
+ return result;
35
+ }
36
+ };
37
+ var githubfileloader_default = GitHubFileLoader;
38
+
39
+ export {
40
+ GitHubFileLoader,
41
+ githubfileloader_default
42
+ };
43
+ //# sourceMappingURL=chunk-D4MNWWBB.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/loaders/githubfileloader.ts"],
4
+ "sourcesContent": ["/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport HTTPFileLoader from './httpfileloader';\n\n/**\n * Loads Files from an external source, such as a URL.\n *\n * @class\n * @private\n * @memberof module:concerto-util\n */\nclass GitHubFileLoader<T> extends HTTPFileLoader<T> {\n /**\n * Create the GitHubFileLoader.\n * @param processFile - a function to apply to the content of the file\n */\n constructor(processFile: (name: string, text: string) => T) {\n super(processFile);\n }\n\n /**\n * Returns true if this ModelLoader can process the URL\n * @param url - the URL\n * @return true if this ModelLoader accepts the URL\n * @abstract\n */\n accepts(url: string): boolean {\n return url.startsWith('github://');\n }\n\n /**\n * Load a File from a URL and return it\n * @param url - the url to get\n * @param options - additional options\n * @return a promise to the File\n */\n load(url: string, options?: RequestInit): Promise<T> {\n const rewrittenUrl = 'https://raw.githubusercontent.com/' + url.substring(9);\n const result = super.load(rewrittenUrl, options);\n return result;\n }\n}\n\nexport { GitHubFileLoader };\nexport default GitHubFileLoader;\n"],
5
+ "mappings": ";;;;;;;AAuBA,IAAM,mBAAN,cAAkC,uBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKhD,YAAY,aAAgD;AACxD,UAAM,WAAW;AAAA,EACrB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,QAAQ,KAAsB;AAC1B,WAAO,IAAI,WAAW,WAAW;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,KAAK,KAAa,SAAmC;AACjD,UAAM,eAAe,uCAAuC,IAAI,UAAU,CAAC;AAC3E,UAAM,SAAS,MAAM,KAAK,cAAc,OAAO;AAC/C,WAAO;AAAA,EACX;AACJ;AAGA,IAAO,2BAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,30 @@
1
+ import { createRequire as __createRequire } from "module";
2
+ const require = __createRequire(import.meta.url);
3
+ import {
4
+ __export
5
+ } from "./chunk-PMP2SMHG.mjs";
6
+
7
+ // src/label.ts
8
+ var label_exports = {};
9
+ __export(label_exports, {
10
+ labelToSentence: () => labelToSentence,
11
+ sentenceToLabel: () => sentenceToLabel
12
+ });
13
+ function labelToSentence(labelName = "") {
14
+ return labelName.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z])([a-z])/g, " $1$2").replace(/ +/g, " ").replace(/^./, (str) => str.toUpperCase()).trim();
15
+ }
16
+ function sentenceToLabel(sentence = "") {
17
+ const split = sentence.split(/[^A-Za-z0-9_-]+/);
18
+ split.forEach((word, index) => {
19
+ split[index] = split[index].replace(/^./, (str) => str.toUpperCase());
20
+ });
21
+ const joined = split.join("");
22
+ return joined.replace(/^./, (str) => str.toLowerCase());
23
+ }
24
+
25
+ export {
26
+ labelToSentence,
27
+ sentenceToLabel,
28
+ label_exports
29
+ };
30
+ //# sourceMappingURL=chunk-DTVQ7VXD.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/label.ts"],
4
+ "sourcesContent": ["/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n'use strict';\n\n/**\n * Inserts correct spacing and capitalization to a camelCase label\n * @param labelName - the label text to be transformed\n * @returns - The label text formatted for rendering\n */\nexport function labelToSentence(labelName: string = ''): string {\n return labelName\n .replace(/([a-z])([A-Z])/g, '$1 $2')\n .replace(/([A-Z])([a-z])/g, ' $1$2')\n .replace(/ +/g, ' ')\n .replace(/^./, str => str.toUpperCase())\n .trim();\n}\n\n/**\n * Create a camelCase label from a sentence\n * @param sentence - the sentence\n * @returns - The camelCase label\n */\nexport function sentenceToLabel(sentence: string = ''): string {\n const split = sentence.split(/[^A-Za-z0-9_-]+/);\n split.forEach((word, index) => {\n split[index] = split[index].replace(/^./, str => str.toUpperCase());\n });\n const joined = split.join('');\n return joined.replace(/^./, str => str.toLowerCase());\n}"],
5
+ "mappings": ";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,gBAAgB,YAAoB,IAAY;AAC5D,SAAO,UACF,QAAQ,mBAAmB,OAAO,EAClC,QAAQ,mBAAmB,OAAO,EAClC,QAAQ,OAAO,GAAG,EAClB,QAAQ,MAAM,SAAO,IAAI,YAAY,CAAC,EACtC,KAAK;AACd;AAOO,SAAS,gBAAgB,WAAmB,IAAY;AAC3D,QAAM,QAAQ,SAAS,MAAM,iBAAiB;AAC9C,QAAM,QAAQ,CAAC,MAAM,UAAU;AAC3B,UAAM,KAAK,IAAI,MAAM,KAAK,EAAE,QAAQ,MAAM,SAAO,IAAI,YAAY,CAAC;AAAA,EACtE,CAAC;AACD,QAAM,SAAS,MAAM,KAAK,EAAE;AAC5B,SAAO,OAAO,QAAQ,MAAM,SAAO,IAAI,YAAY,CAAC;AACxD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,48 @@
1
+ import { createRequire as __createRequire } from "module";
2
+ const require = __createRequire(import.meta.url);
3
+ import {
4
+ writer_default
5
+ } from "./chunk-K4OOJFK5.mjs";
6
+
7
+ // src/inmemorywriter.ts
8
+ var InMemoryWriter = class extends writer_default {
9
+ /**
10
+ * Create a FileWriter.
11
+ *
12
+ */
13
+ constructor() {
14
+ super();
15
+ this.fileName = "";
16
+ this.data = /* @__PURE__ */ new Map();
17
+ }
18
+ /**
19
+ * Creates the filename which will be used for association with its string content.
20
+ *
21
+ * @param fileName - the name of the file.
22
+ */
23
+ openFile(fileName) {
24
+ this.fileName = fileName;
25
+ }
26
+ /**
27
+ * Writes the contents of the buffer to the Map store.
28
+ */
29
+ closeFile() {
30
+ this.data.set(this.fileName, this.getBuffer());
31
+ this.clearBuffer();
32
+ }
33
+ /**
34
+ * Returns the content of the Map store.
35
+ *
36
+ * @return - a Map containing the string representation of files. (k,v) => (filename, file content).
37
+ */
38
+ getFilesInMemory() {
39
+ return this.data;
40
+ }
41
+ };
42
+ var inmemorywriter_default = InMemoryWriter;
43
+
44
+ export {
45
+ InMemoryWriter,
46
+ inmemorywriter_default
47
+ };
48
+ //# sourceMappingURL=chunk-FHUVVHGR.mjs.map