qcobjects-cli 2.4.66 → 2.5.103-beta

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 (204) hide show
  1. package/.github/workflows/npmpublish-beta.yml +4 -4
  2. package/.github/workflows/npmpublish-lts.yml +4 -4
  3. package/.github/workflows/npmpublish-main.yml +4 -4
  4. package/VERSION +1 -1
  5. package/build-esbuild.js +69 -0
  6. package/eslint.config.mjs +88 -0
  7. package/package.json +74 -46
  8. package/public/browser/backend/com.qcobjects.backend.microservice.static.js +318 -0
  9. package/public/browser/backend/com.qcobjects.backend.microservice.static.js.map +7 -0
  10. package/public/browser/backend/org.qcobjects.backend.php.js +290 -0
  11. package/public/browser/backend/org.qcobjects.backend.php.js.map +7 -0
  12. package/public/browser/com.qcobjects.cli.commands.jira.client_services.js +72 -0
  13. package/public/browser/com.qcobjects.cli.commands.jira.client_services.js.map +7 -0
  14. package/public/browser/com.qcobjects.cli.commands.jira.js +117 -0
  15. package/public/browser/com.qcobjects.cli.commands.jira.js.map +7 -0
  16. package/public/browser/com.qcobjects.cli.commands.js +30 -0
  17. package/public/browser/com.qcobjects.cli.commands.js.map +7 -0
  18. package/public/browser/com.qcobjects.cli.commands.version.js +241 -0
  19. package/public/browser/com.qcobjects.cli.commands.version.js.map +7 -0
  20. package/public/browser/index.js +97 -0
  21. package/public/browser/index.js.map +7 -0
  22. package/public/browser/org.qcobjects.common.pipelog.js +43 -0
  23. package/public/browser/org.qcobjects.common.pipelog.js.map +7 -0
  24. package/public/browser/org.qcobjects.enterprise.commands.js +169 -0
  25. package/public/browser/org.qcobjects.enterprise.commands.js.map +7 -0
  26. package/public/browser/org.quickcorp.qcobjects.api.client_services.js +72 -0
  27. package/public/browser/org.quickcorp.qcobjects.api.client_services.js.map +7 -0
  28. package/public/browser/org.quickcorp.qcobjects.cli.js +3185 -0
  29. package/public/browser/org.quickcorp.qcobjects.cli.js.map +7 -0
  30. package/public/browser/org.quickcorp.qcobjects.collab.server.js +422 -0
  31. package/public/browser/org.quickcorp.qcobjects.collab.server.js.map +7 -0
  32. package/public/browser/org.quickcorp.qcobjects.defaultsettings.js +383 -0
  33. package/public/browser/org.quickcorp.qcobjects.defaultsettings.js.map +7 -0
  34. package/public/browser/org.quickcorp.qcobjects.main.file.js +248 -0
  35. package/public/browser/org.quickcorp.qcobjects.main.file.js.map +7 -0
  36. package/public/browser/org.quickcorp.qcobjects.main.http.gae.server.js +538 -0
  37. package/public/browser/org.quickcorp.qcobjects.main.http.gae.server.js.map +7 -0
  38. package/public/browser/org.quickcorp.qcobjects.main.http.server.js +600 -0
  39. package/public/browser/org.quickcorp.qcobjects.main.http.server.js.map +7 -0
  40. package/public/browser/org.quickcorp.qcobjects.main.http2.server.js +465 -0
  41. package/public/browser/org.quickcorp.qcobjects.main.http2.server.js.map +7 -0
  42. package/public/browser/qcobjects-cli.js +89 -0
  43. package/public/browser/qcobjects-cli.js.map +7 -0
  44. package/public/browser/qcobjects-collab.js +41 -0
  45. package/public/browser/qcobjects-collab.js.map +7 -0
  46. package/public/browser/qcobjects-createcert.js +67 -0
  47. package/public/browser/qcobjects-createcert.js.map +7 -0
  48. package/public/browser/qcobjects-gae-http-server.js +41 -0
  49. package/public/browser/qcobjects-gae-http-server.js.map +7 -0
  50. package/public/browser/qcobjects-http-server.js +41 -0
  51. package/public/browser/qcobjects-http-server.js.map +7 -0
  52. package/public/browser/qcobjects-http2-server.js +44 -0
  53. package/public/browser/qcobjects-http2-server.js.map +7 -0
  54. package/public/browser/qcobjects-shell.js +50 -0
  55. package/public/browser/qcobjects-shell.js.map +7 -0
  56. package/public/browser/types/global/index.d.js +15 -0
  57. package/public/browser/types/global/index.d.js.map +7 -0
  58. package/public/cjs/backend/com.qcobjects.backend.microservice.static.cjs +305 -0
  59. package/public/cjs/backend/com.qcobjects.backend.microservice.static.cjs.map +7 -0
  60. package/public/cjs/backend/org.qcobjects.backend.php.cjs +273 -0
  61. package/public/cjs/backend/org.qcobjects.backend.php.cjs.map +7 -0
  62. package/public/cjs/com.qcobjects.cli.commands.cjs +13 -0
  63. package/public/cjs/com.qcobjects.cli.commands.cjs.map +7 -0
  64. package/public/cjs/com.qcobjects.cli.commands.jira.cjs +100 -0
  65. package/public/cjs/com.qcobjects.cli.commands.jira.cjs.map +7 -0
  66. package/public/cjs/com.qcobjects.cli.commands.jira.client_services.cjs +55 -0
  67. package/public/cjs/com.qcobjects.cli.commands.jira.client_services.cjs.map +7 -0
  68. package/public/cjs/com.qcobjects.cli.commands.version.cjs +224 -0
  69. package/public/cjs/com.qcobjects.cli.commands.version.cjs.map +7 -0
  70. package/public/cjs/index.cjs +89 -0
  71. package/public/cjs/index.cjs.map +7 -0
  72. package/public/cjs/org.qcobjects.common.pipelog.cjs +26 -0
  73. package/public/cjs/org.qcobjects.common.pipelog.cjs.map +7 -0
  74. package/public/cjs/org.qcobjects.enterprise.commands.cjs +152 -0
  75. package/public/cjs/org.qcobjects.enterprise.commands.cjs.map +7 -0
  76. package/public/cjs/org.quickcorp.qcobjects.api.client_services.cjs +55 -0
  77. package/public/cjs/org.quickcorp.qcobjects.api.client_services.cjs.map +7 -0
  78. package/public/cjs/org.quickcorp.qcobjects.cli.cjs +3172 -0
  79. package/public/cjs/org.quickcorp.qcobjects.cli.cjs.map +7 -0
  80. package/public/cjs/org.quickcorp.qcobjects.collab.server.cjs +405 -0
  81. package/public/cjs/org.quickcorp.qcobjects.collab.server.cjs.map +7 -0
  82. package/public/cjs/org.quickcorp.qcobjects.defaultsettings.cjs +366 -0
  83. package/public/cjs/org.quickcorp.qcobjects.defaultsettings.cjs.map +7 -0
  84. package/public/cjs/org.quickcorp.qcobjects.main.file.cjs +235 -0
  85. package/public/cjs/org.quickcorp.qcobjects.main.file.cjs.map +7 -0
  86. package/public/cjs/org.quickcorp.qcobjects.main.http.gae.server.cjs +525 -0
  87. package/public/cjs/org.quickcorp.qcobjects.main.http.gae.server.cjs.map +7 -0
  88. package/public/cjs/org.quickcorp.qcobjects.main.http.server.cjs +587 -0
  89. package/public/cjs/org.quickcorp.qcobjects.main.http.server.cjs.map +7 -0
  90. package/public/cjs/org.quickcorp.qcobjects.main.http2.server.cjs +452 -0
  91. package/public/cjs/org.quickcorp.qcobjects.main.http2.server.cjs.map +7 -0
  92. package/public/cjs/qcobjects-cli.cjs +81 -0
  93. package/public/cjs/qcobjects-cli.cjs.map +7 -0
  94. package/public/cjs/qcobjects-collab.cjs +24 -0
  95. package/public/cjs/qcobjects-collab.cjs.map +7 -0
  96. package/public/cjs/qcobjects-createcert.cjs +50 -0
  97. package/public/cjs/qcobjects-createcert.cjs.map +7 -0
  98. package/public/cjs/qcobjects-gae-http-server.cjs +24 -0
  99. package/public/cjs/qcobjects-gae-http-server.cjs.map +7 -0
  100. package/public/cjs/qcobjects-http-server.cjs +24 -0
  101. package/public/cjs/qcobjects-http-server.cjs.map +7 -0
  102. package/public/cjs/qcobjects-http2-server.cjs +27 -0
  103. package/public/cjs/qcobjects-http2-server.cjs.map +7 -0
  104. package/public/cjs/qcobjects-shell.cjs +34 -0
  105. package/public/cjs/qcobjects-shell.cjs.map +7 -0
  106. package/public/cjs/types/global/index.d.cjs +2 -0
  107. package/public/cjs/types/global/index.d.cjs.map +7 -0
  108. package/public/esm/backend/com.qcobjects.backend.microservice.static.mjs +315 -0
  109. package/public/esm/backend/com.qcobjects.backend.microservice.static.mjs.map +7 -0
  110. package/public/esm/backend/org.qcobjects.backend.php.mjs +287 -0
  111. package/public/esm/backend/org.qcobjects.backend.php.mjs.map +7 -0
  112. package/public/esm/com.qcobjects.cli.commands.jira.client_services.mjs +69 -0
  113. package/public/esm/com.qcobjects.cli.commands.jira.client_services.mjs.map +7 -0
  114. package/public/esm/com.qcobjects.cli.commands.jira.mjs +114 -0
  115. package/public/esm/com.qcobjects.cli.commands.jira.mjs.map +7 -0
  116. package/public/esm/com.qcobjects.cli.commands.mjs +27 -0
  117. package/public/esm/com.qcobjects.cli.commands.mjs.map +7 -0
  118. package/public/esm/com.qcobjects.cli.commands.version.mjs +238 -0
  119. package/public/esm/com.qcobjects.cli.commands.version.mjs.map +7 -0
  120. package/public/esm/index.mjs +78 -0
  121. package/public/esm/index.mjs.map +7 -0
  122. package/public/esm/org.qcobjects.common.pipelog.mjs +40 -0
  123. package/public/esm/org.qcobjects.common.pipelog.mjs.map +7 -0
  124. package/public/esm/org.qcobjects.enterprise.commands.mjs +166 -0
  125. package/public/esm/org.qcobjects.enterprise.commands.mjs.map +7 -0
  126. package/public/esm/org.quickcorp.qcobjects.api.client_services.mjs +69 -0
  127. package/public/esm/org.quickcorp.qcobjects.api.client_services.mjs.map +7 -0
  128. package/public/esm/org.quickcorp.qcobjects.cli.mjs +3182 -0
  129. package/public/esm/org.quickcorp.qcobjects.cli.mjs.map +7 -0
  130. package/public/esm/org.quickcorp.qcobjects.collab.server.mjs +419 -0
  131. package/public/esm/org.quickcorp.qcobjects.collab.server.mjs.map +7 -0
  132. package/public/esm/org.quickcorp.qcobjects.defaultsettings.mjs +380 -0
  133. package/public/esm/org.quickcorp.qcobjects.defaultsettings.mjs.map +7 -0
  134. package/public/esm/org.quickcorp.qcobjects.main.file.mjs +245 -0
  135. package/public/esm/org.quickcorp.qcobjects.main.file.mjs.map +7 -0
  136. package/public/esm/org.quickcorp.qcobjects.main.http.gae.server.mjs +535 -0
  137. package/public/esm/org.quickcorp.qcobjects.main.http.gae.server.mjs.map +7 -0
  138. package/public/esm/org.quickcorp.qcobjects.main.http.server.mjs +597 -0
  139. package/public/esm/org.quickcorp.qcobjects.main.http.server.mjs.map +7 -0
  140. package/public/esm/org.quickcorp.qcobjects.main.http2.server.mjs +462 -0
  141. package/public/esm/org.quickcorp.qcobjects.main.http2.server.mjs.map +7 -0
  142. package/public/esm/qcobjects-cli.mjs +68 -0
  143. package/public/esm/qcobjects-cli.mjs.map +7 -0
  144. package/public/esm/qcobjects-collab.mjs +38 -0
  145. package/public/esm/qcobjects-collab.mjs.map +7 -0
  146. package/public/esm/qcobjects-createcert.mjs +64 -0
  147. package/public/esm/qcobjects-createcert.mjs.map +7 -0
  148. package/public/esm/qcobjects-gae-http-server.mjs +38 -0
  149. package/public/esm/qcobjects-gae-http-server.mjs.map +7 -0
  150. package/public/esm/qcobjects-http-server.mjs +38 -0
  151. package/public/esm/qcobjects-http-server.mjs.map +7 -0
  152. package/public/esm/qcobjects-http2-server.mjs +41 -0
  153. package/public/esm/qcobjects-http2-server.mjs.map +7 -0
  154. package/public/esm/qcobjects-shell.mjs +26 -0
  155. package/public/esm/qcobjects-shell.mjs.map +7 -0
  156. package/public/esm/types/global/index.d.mjs +12 -0
  157. package/public/esm/types/global/index.d.mjs.map +7 -0
  158. package/public/index.d.ts +35 -0
  159. package/spec/support/jasmine.json +7 -4
  160. package/src/backend/{com.qcobjects.backend.microservice.static.js → com.qcobjects.backend.microservice.static.ts} +42 -28
  161. package/src/backend/org.qcobjects.backend.php.ts +348 -0
  162. package/src/{com.qcobjects.cli.commands.jira.client_services.js → com.qcobjects.cli.commands.jira.client_services.ts} +49 -33
  163. package/src/com.qcobjects.cli.commands.jira.ts +147 -0
  164. package/src/com.qcobjects.cli.commands.version.ts +293 -0
  165. package/src/{index.mjs → index.cts} +1 -1
  166. package/src/index.mts +2 -0
  167. package/src/index.ts +1 -1
  168. package/src/{org.qcobjects.common.pipelog.js → org.qcobjects.common.pipelog.ts} +4 -4
  169. package/src/org.qcobjects.enterprise.commands.ts +195 -0
  170. package/src/{org.quickcorp.qcobjects.api.client_services.js → org.quickcorp.qcobjects.api.client_services.ts} +49 -32
  171. package/src/org.quickcorp.qcobjects.cli.ts +533 -0
  172. package/src/org.quickcorp.qcobjects.collab.server.ts +420 -0
  173. package/src/{org.quickcorp.qcobjects.defaultsettings.js → org.quickcorp.qcobjects.defaultsettings.ts} +118 -95
  174. package/src/org.quickcorp.qcobjects.main.file.ts +180 -0
  175. package/src/org.quickcorp.qcobjects.main.http.gae.server.ts +507 -0
  176. package/src/org.quickcorp.qcobjects.main.http.server.ts +551 -0
  177. package/src/org.quickcorp.qcobjects.main.http2.server.ts +419 -0
  178. package/src/{qcobjects-cli.js → qcobjects-cli.ts} +7 -8
  179. package/src/{qcobjects-collab.js → qcobjects-collab.ts} +4 -4
  180. package/src/{qcobjects-createcert.js → qcobjects-createcert.ts} +5 -3
  181. package/src/{qcobjects-gae-http-server.js → qcobjects-gae-http-server.ts} +4 -4
  182. package/src/{qcobjects-http-server.js → qcobjects-http-server.ts} +4 -4
  183. package/src/{qcobjects-http2-server.js → qcobjects-http2-server.ts} +6 -8
  184. package/src/{qcobjects-shell.js → qcobjects-shell.ts} +11 -14
  185. package/src/types/global/index.d.ts +2 -0
  186. package/tsconfig.d.json +45 -3
  187. package/tsconfig.jasmine.json +39 -0
  188. package/tsconfig.json +50 -7
  189. package/.eslintignore +0 -5
  190. package/.eslintrc.cjs +0 -6
  191. package/src/backend/org.qcobjects.backend.php.js +0 -334
  192. package/src/com.qcobjects.cli.commands.jira.js +0 -144
  193. package/src/com.qcobjects.cli.commands.version.js +0 -285
  194. package/src/index.cjs +0 -2
  195. package/src/index.d.ts +0 -2
  196. package/src/org.qcobjects.enterprise.commands.js +0 -194
  197. package/src/org.quickcorp.qcobjects.cli.js +0 -523
  198. package/src/org.quickcorp.qcobjects.collab.server.js +0 -415
  199. package/src/org.quickcorp.qcobjects.main.file.js +0 -159
  200. package/src/org.quickcorp.qcobjects.main.http.gae.server.js +0 -495
  201. package/src/org.quickcorp.qcobjects.main.http.server.js +0 -529
  202. package/src/org.quickcorp.qcobjects.main.http2.server.js +0 -392
  203. /package/spec/{testsSpec.js → testsSpec.ts} +0 -0
  204. /package/src/{com.qcobjects.cli.commands.js → com.qcobjects.cli.commands.ts} +0 -0
@@ -0,0 +1,587 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
+ var __commonJS = (cb, mod) => function __require() {
6
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
7
+ };
8
+
9
+ // node_modules/mime/Mime.js
10
+ var require_Mime = __commonJS({
11
+ "node_modules/mime/Mime.js"(exports2, module2) {
12
+ "use strict";
13
+ function Mime() {
14
+ this._types = /* @__PURE__ */ Object.create(null);
15
+ this._extensions = /* @__PURE__ */ Object.create(null);
16
+ for (let i = 0; i < arguments.length; i++) {
17
+ this.define(arguments[i]);
18
+ }
19
+ this.define = this.define.bind(this);
20
+ this.getType = this.getType.bind(this);
21
+ this.getExtension = this.getExtension.bind(this);
22
+ }
23
+ __name(Mime, "Mime");
24
+ Mime.prototype.define = function(typeMap, force) {
25
+ for (let type in typeMap) {
26
+ let extensions = typeMap[type].map(function(t) {
27
+ return t.toLowerCase();
28
+ });
29
+ type = type.toLowerCase();
30
+ for (let i = 0; i < extensions.length; i++) {
31
+ const ext = extensions[i];
32
+ if (ext[0] === "*") {
33
+ continue;
34
+ }
35
+ if (!force && ext in this._types) {
36
+ throw new Error(
37
+ 'Attempt to change mapping for "' + ext + '" extension from "' + this._types[ext] + '" to "' + type + '". Pass `force=true` to allow this, otherwise remove "' + ext + '" from the list of extensions for "' + type + '".'
38
+ );
39
+ }
40
+ this._types[ext] = type;
41
+ }
42
+ if (force || !this._extensions[type]) {
43
+ const ext = extensions[0];
44
+ this._extensions[type] = ext[0] !== "*" ? ext : ext.substr(1);
45
+ }
46
+ }
47
+ };
48
+ Mime.prototype.getType = function(path2) {
49
+ path2 = String(path2);
50
+ let last = path2.replace(/^.*[/\\]/, "").toLowerCase();
51
+ let ext = last.replace(/^.*\./, "").toLowerCase();
52
+ let hasPath = last.length < path2.length;
53
+ let hasDot = ext.length < last.length - 1;
54
+ return (hasDot || !hasPath) && this._types[ext] || null;
55
+ };
56
+ Mime.prototype.getExtension = function(type) {
57
+ type = /^\s*([^;\s]*)/.test(type) && RegExp.$1;
58
+ return type && this._extensions[type.toLowerCase()] || null;
59
+ };
60
+ module2.exports = Mime;
61
+ }
62
+ });
63
+
64
+ // node_modules/mime/types/standard.js
65
+ var require_standard = __commonJS({
66
+ "node_modules/mime/types/standard.js"(exports2, module2) {
67
+ "use strict";
68
+ module2.exports = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
69
+ }
70
+ });
71
+
72
+ // node_modules/mime/types/other.js
73
+ var require_other = __commonJS({
74
+ "node_modules/mime/types/other.js"(exports2, module2) {
75
+ "use strict";
76
+ module2.exports = { "application/prs.cww": ["cww"], "application/vnd.1000minds.decision-model+xml": ["1km"], "application/vnd.3gpp.pic-bw-large": ["plb"], "application/vnd.3gpp.pic-bw-small": ["psb"], "application/vnd.3gpp.pic-bw-var": ["pvb"], "application/vnd.3gpp2.tcap": ["tcap"], "application/vnd.3m.post-it-notes": ["pwn"], "application/vnd.accpac.simply.aso": ["aso"], "application/vnd.accpac.simply.imp": ["imp"], "application/vnd.acucobol": ["acu"], "application/vnd.acucorp": ["atc", "acutc"], "application/vnd.adobe.air-application-installer-package+zip": ["air"], "application/vnd.adobe.formscentral.fcdt": ["fcdt"], "application/vnd.adobe.fxp": ["fxp", "fxpl"], "application/vnd.adobe.xdp+xml": ["xdp"], "application/vnd.adobe.xfdf": ["xfdf"], "application/vnd.ahead.space": ["ahead"], "application/vnd.airzip.filesecure.azf": ["azf"], "application/vnd.airzip.filesecure.azs": ["azs"], "application/vnd.amazon.ebook": ["azw"], "application/vnd.americandynamics.acc": ["acc"], "application/vnd.amiga.ami": ["ami"], "application/vnd.android.package-archive": ["apk"], "application/vnd.anser-web-certificate-issue-initiation": ["cii"], "application/vnd.anser-web-funds-transfer-initiation": ["fti"], "application/vnd.antix.game-component": ["atx"], "application/vnd.apple.installer+xml": ["mpkg"], "application/vnd.apple.keynote": ["key"], "application/vnd.apple.mpegurl": ["m3u8"], "application/vnd.apple.numbers": ["numbers"], "application/vnd.apple.pages": ["pages"], "application/vnd.apple.pkpass": ["pkpass"], "application/vnd.aristanetworks.swi": ["swi"], "application/vnd.astraea-software.iota": ["iota"], "application/vnd.audiograph": ["aep"], "application/vnd.balsamiq.bmml+xml": ["bmml"], "application/vnd.blueice.multipass": ["mpm"], "application/vnd.bmi": ["bmi"], "application/vnd.businessobjects": ["rep"], "application/vnd.chemdraw+xml": ["cdxml"], "application/vnd.chipnuts.karaoke-mmd": ["mmd"], "application/vnd.cinderella": ["cdy"], "application/vnd.citationstyles.style+xml": ["csl"], "application/vnd.claymore": ["cla"], "application/vnd.cloanto.rp9": ["rp9"], "application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"], "application/vnd.cluetrust.cartomobile-config": ["c11amc"], "application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"], "application/vnd.commonspace": ["csp"], "application/vnd.contact.cmsg": ["cdbcmsg"], "application/vnd.cosmocaller": ["cmc"], "application/vnd.crick.clicker": ["clkx"], "application/vnd.crick.clicker.keyboard": ["clkk"], "application/vnd.crick.clicker.palette": ["clkp"], "application/vnd.crick.clicker.template": ["clkt"], "application/vnd.crick.clicker.wordbank": ["clkw"], "application/vnd.criticaltools.wbs+xml": ["wbs"], "application/vnd.ctc-posml": ["pml"], "application/vnd.cups-ppd": ["ppd"], "application/vnd.curl.car": ["car"], "application/vnd.curl.pcurl": ["pcurl"], "application/vnd.dart": ["dart"], "application/vnd.data-vision.rdz": ["rdz"], "application/vnd.dbf": ["dbf"], "application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"], "application/vnd.dece.ttml+xml": ["uvt", "uvvt"], "application/vnd.dece.unspecified": ["uvx", "uvvx"], "application/vnd.dece.zip": ["uvz", "uvvz"], "application/vnd.denovo.fcselayout-link": ["fe_launch"], "application/vnd.dna": ["dna"], "application/vnd.dolby.mlp": ["mlp"], "application/vnd.dpgraph": ["dpg"], "application/vnd.dreamfactory": ["dfac"], "application/vnd.ds-keypoint": ["kpxx"], "application/vnd.dvb.ait": ["ait"], "application/vnd.dvb.service": ["svc"], "application/vnd.dynageo": ["geo"], "application/vnd.ecowin.chart": ["mag"], "application/vnd.enliven": ["nml"], "application/vnd.epson.esf": ["esf"], "application/vnd.epson.msf": ["msf"], "application/vnd.epson.quickanime": ["qam"], "application/vnd.epson.salt": ["slt"], "application/vnd.epson.ssf": ["ssf"], "application/vnd.eszigno3+xml": ["es3", "et3"], "application/vnd.ezpix-album": ["ez2"], "application/vnd.ezpix-package": ["ez3"], "application/vnd.fdf": ["fdf"], "application/vnd.fdsn.mseed": ["mseed"], "application/vnd.fdsn.seed": ["seed", "dataless"], "application/vnd.flographit": ["gph"], "application/vnd.fluxtime.clip": ["ftc"], "application/vnd.framemaker": ["fm", "frame", "maker", "book"], "application/vnd.frogans.fnc": ["fnc"], "application/vnd.frogans.ltf": ["ltf"], "application/vnd.fsc.weblaunch": ["fsc"], "application/vnd.fujitsu.oasys": ["oas"], "application/vnd.fujitsu.oasys2": ["oa2"], "application/vnd.fujitsu.oasys3": ["oa3"], "application/vnd.fujitsu.oasysgp": ["fg5"], "application/vnd.fujitsu.oasysprs": ["bh2"], "application/vnd.fujixerox.ddd": ["ddd"], "application/vnd.fujixerox.docuworks": ["xdw"], "application/vnd.fujixerox.docuworks.binder": ["xbd"], "application/vnd.fuzzysheet": ["fzs"], "application/vnd.genomatix.tuxedo": ["txd"], "application/vnd.geogebra.file": ["ggb"], "application/vnd.geogebra.tool": ["ggt"], "application/vnd.geometry-explorer": ["gex", "gre"], "application/vnd.geonext": ["gxt"], "application/vnd.geoplan": ["g2w"], "application/vnd.geospace": ["g3w"], "application/vnd.gmx": ["gmx"], "application/vnd.google-apps.document": ["gdoc"], "application/vnd.google-apps.presentation": ["gslides"], "application/vnd.google-apps.spreadsheet": ["gsheet"], "application/vnd.google-earth.kml+xml": ["kml"], "application/vnd.google-earth.kmz": ["kmz"], "application/vnd.grafeq": ["gqf", "gqs"], "application/vnd.groove-account": ["gac"], "application/vnd.groove-help": ["ghf"], "application/vnd.groove-identity-message": ["gim"], "application/vnd.groove-injector": ["grv"], "application/vnd.groove-tool-message": ["gtm"], "application/vnd.groove-tool-template": ["tpl"], "application/vnd.groove-vcard": ["vcg"], "application/vnd.hal+xml": ["hal"], "application/vnd.handheld-entertainment+xml": ["zmm"], "application/vnd.hbci": ["hbci"], "application/vnd.hhe.lesson-player": ["les"], "application/vnd.hp-hpgl": ["hpgl"], "application/vnd.hp-hpid": ["hpid"], "application/vnd.hp-hps": ["hps"], "application/vnd.hp-jlyt": ["jlt"], "application/vnd.hp-pcl": ["pcl"], "application/vnd.hp-pclxl": ["pclxl"], "application/vnd.hydrostatix.sof-data": ["sfd-hdstx"], "application/vnd.ibm.minipay": ["mpy"], "application/vnd.ibm.modcap": ["afp", "listafp", "list3820"], "application/vnd.ibm.rights-management": ["irm"], "application/vnd.ibm.secure-container": ["sc"], "application/vnd.iccprofile": ["icc", "icm"], "application/vnd.igloader": ["igl"], "application/vnd.immervision-ivp": ["ivp"], "application/vnd.immervision-ivu": ["ivu"], "application/vnd.insors.igm": ["igm"], "application/vnd.intercon.formnet": ["xpw", "xpx"], "application/vnd.intergeo": ["i2g"], "application/vnd.intu.qbo": ["qbo"], "application/vnd.intu.qfx": ["qfx"], "application/vnd.ipunplugged.rcprofile": ["rcprofile"], "application/vnd.irepository.package+xml": ["irp"], "application/vnd.is-xpr": ["xpr"], "application/vnd.isac.fcs": ["fcs"], "application/vnd.jam": ["jam"], "application/vnd.jcp.javame.midlet-rms": ["rms"], "application/vnd.jisp": ["jisp"], "application/vnd.joost.joda-archive": ["joda"], "application/vnd.kahootz": ["ktz", "ktr"], "application/vnd.kde.karbon": ["karbon"], "application/vnd.kde.kchart": ["chrt"], "application/vnd.kde.kformula": ["kfo"], "application/vnd.kde.kivio": ["flw"], "application/vnd.kde.kontour": ["kon"], "application/vnd.kde.kpresenter": ["kpr", "kpt"], "application/vnd.kde.kspread": ["ksp"], "application/vnd.kde.kword": ["kwd", "kwt"], "application/vnd.kenameaapp": ["htke"], "application/vnd.kidspiration": ["kia"], "application/vnd.kinar": ["kne", "knp"], "application/vnd.koan": ["skp", "skd", "skt", "skm"], "application/vnd.kodak-descriptor": ["sse"], "application/vnd.las.las+xml": ["lasxml"], "application/vnd.llamagraphics.life-balance.desktop": ["lbd"], "application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"], "application/vnd.lotus-1-2-3": ["123"], "application/vnd.lotus-approach": ["apr"], "application/vnd.lotus-freelance": ["pre"], "application/vnd.lotus-notes": ["nsf"], "application/vnd.lotus-organizer": ["org"], "application/vnd.lotus-screencam": ["scm"], "application/vnd.lotus-wordpro": ["lwp"], "application/vnd.macports.portpkg": ["portpkg"], "application/vnd.mapbox-vector-tile": ["mvt"], "application/vnd.mcd": ["mcd"], "application/vnd.medcalcdata": ["mc1"], "application/vnd.mediastation.cdkey": ["cdkey"], "application/vnd.mfer": ["mwf"], "application/vnd.mfmp": ["mfm"], "application/vnd.micrografx.flo": ["flo"], "application/vnd.micrografx.igx": ["igx"], "application/vnd.mif": ["mif"], "application/vnd.mobius.daf": ["daf"], "application/vnd.mobius.dis": ["dis"], "application/vnd.mobius.mbk": ["mbk"], "application/vnd.mobius.mqy": ["mqy"], "application/vnd.mobius.msl": ["msl"], "application/vnd.mobius.plc": ["plc"], "application/vnd.mobius.txf": ["txf"], "application/vnd.mophun.application": ["mpn"], "application/vnd.mophun.certificate": ["mpc"], "application/vnd.mozilla.xul+xml": ["xul"], "application/vnd.ms-artgalry": ["cil"], "application/vnd.ms-cab-compressed": ["cab"], "application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"], "application/vnd.ms-excel.addin.macroenabled.12": ["xlam"], "application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"], "application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"], "application/vnd.ms-excel.template.macroenabled.12": ["xltm"], "application/vnd.ms-fontobject": ["eot"], "application/vnd.ms-htmlhelp": ["chm"], "application/vnd.ms-ims": ["ims"], "application/vnd.ms-lrm": ["lrm"], "application/vnd.ms-officetheme": ["thmx"], "application/vnd.ms-outlook": ["msg"], "application/vnd.ms-pki.seccat": ["cat"], "application/vnd.ms-pki.stl": ["*stl"], "application/vnd.ms-powerpoint": ["ppt", "pps", "pot"], "application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"], "application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"], "application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"], "application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"], "application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"], "application/vnd.ms-project": ["mpp", "mpt"], "application/vnd.ms-word.document.macroenabled.12": ["docm"], "application/vnd.ms-word.template.macroenabled.12": ["dotm"], "application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"], "application/vnd.ms-wpl": ["wpl"], "application/vnd.ms-xpsdocument": ["xps"], "application/vnd.mseq": ["mseq"], "application/vnd.musician": ["mus"], "application/vnd.muvee.style": ["msty"], "application/vnd.mynfc": ["taglet"], "application/vnd.neurolanguage.nlu": ["nlu"], "application/vnd.nitf": ["ntf", "nitf"], "application/vnd.noblenet-directory": ["nnd"], "application/vnd.noblenet-sealer": ["nns"], "application/vnd.noblenet-web": ["nnw"], "application/vnd.nokia.n-gage.ac+xml": ["*ac"], "application/vnd.nokia.n-gage.data": ["ngdat"], "application/vnd.nokia.n-gage.symbian.install": ["n-gage"], "application/vnd.nokia.radio-preset": ["rpst"], "application/vnd.nokia.radio-presets": ["rpss"], "application/vnd.novadigm.edm": ["edm"], "application/vnd.novadigm.edx": ["edx"], "application/vnd.novadigm.ext": ["ext"], "application/vnd.oasis.opendocument.chart": ["odc"], "application/vnd.oasis.opendocument.chart-template": ["otc"], "application/vnd.oasis.opendocument.database": ["odb"], "application/vnd.oasis.opendocument.formula": ["odf"], "application/vnd.oasis.opendocument.formula-template": ["odft"], "application/vnd.oasis.opendocument.graphics": ["odg"], "application/vnd.oasis.opendocument.graphics-template": ["otg"], "application/vnd.oasis.opendocument.image": ["odi"], "application/vnd.oasis.opendocument.image-template": ["oti"], "application/vnd.oasis.opendocument.presentation": ["odp"], "application/vnd.oasis.opendocument.presentation-template": ["otp"], "application/vnd.oasis.opendocument.spreadsheet": ["ods"], "application/vnd.oasis.opendocument.spreadsheet-template": ["ots"], "application/vnd.oasis.opendocument.text": ["odt"], "application/vnd.oasis.opendocument.text-master": ["odm"], "application/vnd.oasis.opendocument.text-template": ["ott"], "application/vnd.oasis.opendocument.text-web": ["oth"], "application/vnd.olpc-sugar": ["xo"], "application/vnd.oma.dd2+xml": ["dd2"], "application/vnd.openblox.game+xml": ["obgx"], "application/vnd.openofficeorg.extension": ["oxt"], "application/vnd.openstreetmap.data+xml": ["osm"], "application/vnd.openxmlformats-officedocument.presentationml.presentation": ["pptx"], "application/vnd.openxmlformats-officedocument.presentationml.slide": ["sldx"], "application/vnd.openxmlformats-officedocument.presentationml.slideshow": ["ppsx"], "application/vnd.openxmlformats-officedocument.presentationml.template": ["potx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.template": ["xltx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ["docx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.template": ["dotx"], "application/vnd.osgeo.mapguide.package": ["mgp"], "application/vnd.osgi.dp": ["dp"], "application/vnd.osgi.subsystem": ["esa"], "application/vnd.palm": ["pdb", "pqa", "oprc"], "application/vnd.pawaafile": ["paw"], "application/vnd.pg.format": ["str"], "application/vnd.pg.osasli": ["ei6"], "application/vnd.picsel": ["efif"], "application/vnd.pmi.widget": ["wg"], "application/vnd.pocketlearn": ["plf"], "application/vnd.powerbuilder6": ["pbd"], "application/vnd.previewsystems.box": ["box"], "application/vnd.proteus.magazine": ["mgz"], "application/vnd.publishare-delta-tree": ["qps"], "application/vnd.pvi.ptid1": ["ptid"], "application/vnd.quark.quarkxpress": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"], "application/vnd.rar": ["rar"], "application/vnd.realvnc.bed": ["bed"], "application/vnd.recordare.musicxml": ["mxl"], "application/vnd.recordare.musicxml+xml": ["musicxml"], "application/vnd.rig.cryptonote": ["cryptonote"], "application/vnd.rim.cod": ["cod"], "application/vnd.rn-realmedia": ["rm"], "application/vnd.rn-realmedia-vbr": ["rmvb"], "application/vnd.route66.link66+xml": ["link66"], "application/vnd.sailingtracker.track": ["st"], "application/vnd.seemail": ["see"], "application/vnd.sema": ["sema"], "application/vnd.semd": ["semd"], "application/vnd.semf": ["semf"], "application/vnd.shana.informed.formdata": ["ifm"], "application/vnd.shana.informed.formtemplate": ["itp"], "application/vnd.shana.informed.interchange": ["iif"], "application/vnd.shana.informed.package": ["ipk"], "application/vnd.simtech-mindmapper": ["twd", "twds"], "application/vnd.smaf": ["mmf"], "application/vnd.smart.teacher": ["teacher"], "application/vnd.software602.filler.form+xml": ["fo"], "application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"], "application/vnd.spotfire.dxp": ["dxp"], "application/vnd.spotfire.sfs": ["sfs"], "application/vnd.stardivision.calc": ["sdc"], "application/vnd.stardivision.draw": ["sda"], "application/vnd.stardivision.impress": ["sdd"], "application/vnd.stardivision.math": ["smf"], "application/vnd.stardivision.writer": ["sdw", "vor"], "application/vnd.stardivision.writer-global": ["sgl"], "application/vnd.stepmania.package": ["smzip"], "application/vnd.stepmania.stepchart": ["sm"], "application/vnd.sun.wadl+xml": ["wadl"], "application/vnd.sun.xml.calc": ["sxc"], "application/vnd.sun.xml.calc.template": ["stc"], "application/vnd.sun.xml.draw": ["sxd"], "application/vnd.sun.xml.draw.template": ["std"], "application/vnd.sun.xml.impress": ["sxi"], "application/vnd.sun.xml.impress.template": ["sti"], "application/vnd.sun.xml.math": ["sxm"], "application/vnd.sun.xml.writer": ["sxw"], "application/vnd.sun.xml.writer.global": ["sxg"], "application/vnd.sun.xml.writer.template": ["stw"], "application/vnd.sus-calendar": ["sus", "susp"], "application/vnd.svd": ["svd"], "application/vnd.symbian.install": ["sis", "sisx"], "application/vnd.syncml+xml": ["xsm"], "application/vnd.syncml.dm+wbxml": ["bdm"], "application/vnd.syncml.dm+xml": ["xdm"], "application/vnd.syncml.dmddf+xml": ["ddf"], "application/vnd.tao.intent-module-archive": ["tao"], "application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"], "application/vnd.tmobile-livetv": ["tmo"], "application/vnd.trid.tpt": ["tpt"], "application/vnd.triscape.mxs": ["mxs"], "application/vnd.trueapp": ["tra"], "application/vnd.ufdl": ["ufd", "ufdl"], "application/vnd.uiq.theme": ["utz"], "application/vnd.umajin": ["umj"], "application/vnd.unity": ["unityweb"], "application/vnd.uoml+xml": ["uoml"], "application/vnd.vcx": ["vcx"], "application/vnd.visio": ["vsd", "vst", "vss", "vsw"], "application/vnd.visionary": ["vis"], "application/vnd.vsf": ["vsf"], "application/vnd.wap.wbxml": ["wbxml"], "application/vnd.wap.wmlc": ["wmlc"], "application/vnd.wap.wmlscriptc": ["wmlsc"], "application/vnd.webturbo": ["wtb"], "application/vnd.wolfram.player": ["nbp"], "application/vnd.wordperfect": ["wpd"], "application/vnd.wqd": ["wqd"], "application/vnd.wt.stf": ["stf"], "application/vnd.xara": ["xar"], "application/vnd.xfdl": ["xfdl"], "application/vnd.yamaha.hv-dic": ["hvd"], "application/vnd.yamaha.hv-script": ["hvs"], "application/vnd.yamaha.hv-voice": ["hvp"], "application/vnd.yamaha.openscoreformat": ["osf"], "application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"], "application/vnd.yamaha.smaf-audio": ["saf"], "application/vnd.yamaha.smaf-phrase": ["spf"], "application/vnd.yellowriver-custom-menu": ["cmp"], "application/vnd.zul": ["zir", "zirz"], "application/vnd.zzazz.deck+xml": ["zaz"], "application/x-7z-compressed": ["7z"], "application/x-abiword": ["abw"], "application/x-ace-compressed": ["ace"], "application/x-apple-diskimage": ["*dmg"], "application/x-arj": ["arj"], "application/x-authorware-bin": ["aab", "x32", "u32", "vox"], "application/x-authorware-map": ["aam"], "application/x-authorware-seg": ["aas"], "application/x-bcpio": ["bcpio"], "application/x-bdoc": ["*bdoc"], "application/x-bittorrent": ["torrent"], "application/x-blorb": ["blb", "blorb"], "application/x-bzip": ["bz"], "application/x-bzip2": ["bz2", "boz"], "application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"], "application/x-cdlink": ["vcd"], "application/x-cfs-compressed": ["cfs"], "application/x-chat": ["chat"], "application/x-chess-pgn": ["pgn"], "application/x-chrome-extension": ["crx"], "application/x-cocoa": ["cco"], "application/x-conference": ["nsc"], "application/x-cpio": ["cpio"], "application/x-csh": ["csh"], "application/x-debian-package": ["*deb", "udeb"], "application/x-dgc-compressed": ["dgc"], "application/x-director": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"], "application/x-doom": ["wad"], "application/x-dtbncx+xml": ["ncx"], "application/x-dtbook+xml": ["dtb"], "application/x-dtbresource+xml": ["res"], "application/x-dvi": ["dvi"], "application/x-envoy": ["evy"], "application/x-eva": ["eva"], "application/x-font-bdf": ["bdf"], "application/x-font-ghostscript": ["gsf"], "application/x-font-linux-psf": ["psf"], "application/x-font-pcf": ["pcf"], "application/x-font-snf": ["snf"], "application/x-font-type1": ["pfa", "pfb", "pfm", "afm"], "application/x-freearc": ["arc"], "application/x-futuresplash": ["spl"], "application/x-gca-compressed": ["gca"], "application/x-glulx": ["ulx"], "application/x-gnumeric": ["gnumeric"], "application/x-gramps-xml": ["gramps"], "application/x-gtar": ["gtar"], "application/x-hdf": ["hdf"], "application/x-httpd-php": ["php"], "application/x-install-instructions": ["install"], "application/x-iso9660-image": ["*iso"], "application/x-iwork-keynote-sffkey": ["*key"], "application/x-iwork-numbers-sffnumbers": ["*numbers"], "application/x-iwork-pages-sffpages": ["*pages"], "application/x-java-archive-diff": ["jardiff"], "application/x-java-jnlp-file": ["jnlp"], "application/x-keepass2": ["kdbx"], "application/x-latex": ["latex"], "application/x-lua-bytecode": ["luac"], "application/x-lzh-compressed": ["lzh", "lha"], "application/x-makeself": ["run"], "application/x-mie": ["mie"], "application/x-mobipocket-ebook": ["prc", "mobi"], "application/x-ms-application": ["application"], "application/x-ms-shortcut": ["lnk"], "application/x-ms-wmd": ["wmd"], "application/x-ms-wmz": ["wmz"], "application/x-ms-xbap": ["xbap"], "application/x-msaccess": ["mdb"], "application/x-msbinder": ["obd"], "application/x-mscardfile": ["crd"], "application/x-msclip": ["clp"], "application/x-msdos-program": ["*exe"], "application/x-msdownload": ["*exe", "*dll", "com", "bat", "*msi"], "application/x-msmediaview": ["mvb", "m13", "m14"], "application/x-msmetafile": ["*wmf", "*wmz", "*emf", "emz"], "application/x-msmoney": ["mny"], "application/x-mspublisher": ["pub"], "application/x-msschedule": ["scd"], "application/x-msterminal": ["trm"], "application/x-mswrite": ["wri"], "application/x-netcdf": ["nc", "cdf"], "application/x-ns-proxy-autoconfig": ["pac"], "application/x-nzb": ["nzb"], "application/x-perl": ["pl", "pm"], "application/x-pilot": ["*prc", "*pdb"], "application/x-pkcs12": ["p12", "pfx"], "application/x-pkcs7-certificates": ["p7b", "spc"], "application/x-pkcs7-certreqresp": ["p7r"], "application/x-rar-compressed": ["*rar"], "application/x-redhat-package-manager": ["rpm"], "application/x-research-info-systems": ["ris"], "application/x-sea": ["sea"], "application/x-sh": ["sh"], "application/x-shar": ["shar"], "application/x-shockwave-flash": ["swf"], "application/x-silverlight-app": ["xap"], "application/x-sql": ["sql"], "application/x-stuffit": ["sit"], "application/x-stuffitx": ["sitx"], "application/x-subrip": ["srt"], "application/x-sv4cpio": ["sv4cpio"], "application/x-sv4crc": ["sv4crc"], "application/x-t3vm-image": ["t3"], "application/x-tads": ["gam"], "application/x-tar": ["tar"], "application/x-tcl": ["tcl", "tk"], "application/x-tex": ["tex"], "application/x-tex-tfm": ["tfm"], "application/x-texinfo": ["texinfo", "texi"], "application/x-tgif": ["*obj"], "application/x-ustar": ["ustar"], "application/x-virtualbox-hdd": ["hdd"], "application/x-virtualbox-ova": ["ova"], "application/x-virtualbox-ovf": ["ovf"], "application/x-virtualbox-vbox": ["vbox"], "application/x-virtualbox-vbox-extpack": ["vbox-extpack"], "application/x-virtualbox-vdi": ["vdi"], "application/x-virtualbox-vhd": ["vhd"], "application/x-virtualbox-vmdk": ["vmdk"], "application/x-wais-source": ["src"], "application/x-web-app-manifest+json": ["webapp"], "application/x-x509-ca-cert": ["der", "crt", "pem"], "application/x-xfig": ["fig"], "application/x-xliff+xml": ["*xlf"], "application/x-xpinstall": ["xpi"], "application/x-xz": ["xz"], "application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"], "audio/vnd.dece.audio": ["uva", "uvva"], "audio/vnd.digital-winds": ["eol"], "audio/vnd.dra": ["dra"], "audio/vnd.dts": ["dts"], "audio/vnd.dts.hd": ["dtshd"], "audio/vnd.lucent.voice": ["lvp"], "audio/vnd.ms-playready.media.pya": ["pya"], "audio/vnd.nuera.ecelp4800": ["ecelp4800"], "audio/vnd.nuera.ecelp7470": ["ecelp7470"], "audio/vnd.nuera.ecelp9600": ["ecelp9600"], "audio/vnd.rip": ["rip"], "audio/x-aac": ["aac"], "audio/x-aiff": ["aif", "aiff", "aifc"], "audio/x-caf": ["caf"], "audio/x-flac": ["flac"], "audio/x-m4a": ["*m4a"], "audio/x-matroska": ["mka"], "audio/x-mpegurl": ["m3u"], "audio/x-ms-wax": ["wax"], "audio/x-ms-wma": ["wma"], "audio/x-pn-realaudio": ["ram", "ra"], "audio/x-pn-realaudio-plugin": ["rmp"], "audio/x-realaudio": ["*ra"], "audio/x-wav": ["*wav"], "chemical/x-cdx": ["cdx"], "chemical/x-cif": ["cif"], "chemical/x-cmdf": ["cmdf"], "chemical/x-cml": ["cml"], "chemical/x-csml": ["csml"], "chemical/x-xyz": ["xyz"], "image/prs.btif": ["btif"], "image/prs.pti": ["pti"], "image/vnd.adobe.photoshop": ["psd"], "image/vnd.airzip.accelerator.azv": ["azv"], "image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"], "image/vnd.djvu": ["djvu", "djv"], "image/vnd.dvb.subtitle": ["*sub"], "image/vnd.dwg": ["dwg"], "image/vnd.dxf": ["dxf"], "image/vnd.fastbidsheet": ["fbs"], "image/vnd.fpx": ["fpx"], "image/vnd.fst": ["fst"], "image/vnd.fujixerox.edmics-mmr": ["mmr"], "image/vnd.fujixerox.edmics-rlc": ["rlc"], "image/vnd.microsoft.icon": ["ico"], "image/vnd.ms-dds": ["dds"], "image/vnd.ms-modi": ["mdi"], "image/vnd.ms-photo": ["wdp"], "image/vnd.net-fpx": ["npx"], "image/vnd.pco.b16": ["b16"], "image/vnd.tencent.tap": ["tap"], "image/vnd.valve.source.texture": ["vtf"], "image/vnd.wap.wbmp": ["wbmp"], "image/vnd.xiff": ["xif"], "image/vnd.zbrush.pcx": ["pcx"], "image/x-3ds": ["3ds"], "image/x-cmu-raster": ["ras"], "image/x-cmx": ["cmx"], "image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"], "image/x-icon": ["*ico"], "image/x-jng": ["jng"], "image/x-mrsid-image": ["sid"], "image/x-ms-bmp": ["*bmp"], "image/x-pcx": ["*pcx"], "image/x-pict": ["pic", "pct"], "image/x-portable-anymap": ["pnm"], "image/x-portable-bitmap": ["pbm"], "image/x-portable-graymap": ["pgm"], "image/x-portable-pixmap": ["ppm"], "image/x-rgb": ["rgb"], "image/x-tga": ["tga"], "image/x-xbitmap": ["xbm"], "image/x-xpixmap": ["xpm"], "image/x-xwindowdump": ["xwd"], "message/vnd.wfa.wsc": ["wsc"], "model/vnd.collada+xml": ["dae"], "model/vnd.dwf": ["dwf"], "model/vnd.gdl": ["gdl"], "model/vnd.gtw": ["gtw"], "model/vnd.mts": ["mts"], "model/vnd.opengex": ["ogex"], "model/vnd.parasolid.transmit.binary": ["x_b"], "model/vnd.parasolid.transmit.text": ["x_t"], "model/vnd.sap.vds": ["vds"], "model/vnd.usdz+zip": ["usdz"], "model/vnd.valve.source.compiled-map": ["bsp"], "model/vnd.vtu": ["vtu"], "text/prs.lines.tag": ["dsc"], "text/vnd.curl": ["curl"], "text/vnd.curl.dcurl": ["dcurl"], "text/vnd.curl.mcurl": ["mcurl"], "text/vnd.curl.scurl": ["scurl"], "text/vnd.dvb.subtitle": ["sub"], "text/vnd.fly": ["fly"], "text/vnd.fmi.flexstor": ["flx"], "text/vnd.graphviz": ["gv"], "text/vnd.in3d.3dml": ["3dml"], "text/vnd.in3d.spot": ["spot"], "text/vnd.sun.j2me.app-descriptor": ["jad"], "text/vnd.wap.wml": ["wml"], "text/vnd.wap.wmlscript": ["wmls"], "text/x-asm": ["s", "asm"], "text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"], "text/x-component": ["htc"], "text/x-fortran": ["f", "for", "f77", "f90"], "text/x-handlebars-template": ["hbs"], "text/x-java-source": ["java"], "text/x-lua": ["lua"], "text/x-markdown": ["mkd"], "text/x-nfo": ["nfo"], "text/x-opml": ["opml"], "text/x-org": ["*org"], "text/x-pascal": ["p", "pas"], "text/x-processing": ["pde"], "text/x-sass": ["sass"], "text/x-scss": ["scss"], "text/x-setext": ["etx"], "text/x-sfv": ["sfv"], "text/x-suse-ymp": ["ymp"], "text/x-uuencode": ["uu"], "text/x-vcalendar": ["vcs"], "text/x-vcard": ["vcf"], "video/vnd.dece.hd": ["uvh", "uvvh"], "video/vnd.dece.mobile": ["uvm", "uvvm"], "video/vnd.dece.pd": ["uvp", "uvvp"], "video/vnd.dece.sd": ["uvs", "uvvs"], "video/vnd.dece.video": ["uvv", "uvvv"], "video/vnd.dvb.file": ["dvb"], "video/vnd.fvt": ["fvt"], "video/vnd.mpegurl": ["mxu", "m4u"], "video/vnd.ms-playready.media.pyv": ["pyv"], "video/vnd.uvvu.mp4": ["uvu", "uvvu"], "video/vnd.vivo": ["viv"], "video/x-f4v": ["f4v"], "video/x-fli": ["fli"], "video/x-flv": ["flv"], "video/x-m4v": ["m4v"], "video/x-matroska": ["mkv", "mk3d", "mks"], "video/x-mng": ["mng"], "video/x-ms-asf": ["asf", "asx"], "video/x-ms-vob": ["vob"], "video/x-ms-wm": ["wm"], "video/x-ms-wmv": ["wmv"], "video/x-ms-wmx": ["wmx"], "video/x-ms-wvx": ["wvx"], "video/x-msvideo": ["avi"], "video/x-sgi-movie": ["movie"], "video/x-smv": ["smv"], "x-conference/x-cooltalk": ["ice"] };
77
+ }
78
+ });
79
+
80
+ // node_modules/mime/index.js
81
+ var require_mime = __commonJS({
82
+ "node_modules/mime/index.js"(exports2, module2) {
83
+ "use strict";
84
+ var Mime = require_Mime();
85
+ module2.exports = new Mime(require_standard(), require_other());
86
+ }
87
+ });
88
+
89
+ // src/org.quickcorp.qcobjects.main.http.server.ts
90
+ var { findPackageNodePath, Import, Package, InheritClass, CONFIG, logger, New, global, ClassFactory, Export } = require("qcobjects");
91
+ var path = require("path");
92
+ var absolutePath = path.resolve(__dirname, "./");
93
+ var fs = require("fs");
94
+ var mime = require_mime();
95
+ var { FileDispatcher } = require(absolutePath + "/org.quickcorp.qcobjects.main.file.js");
96
+ var { PipeLog } = require(absolutePath + "/org.qcobjects.common.pipelog.js");
97
+ var ImportMicroservice = /* @__PURE__ */ __name(function(microservicePackage) {
98
+ var _ret_;
99
+ var standardPath = findPackageNodePath(microservicePackage) || findPackageNodePath(microservicePackage + ".js");
100
+ if (standardPath !== null) {
101
+ _ret_ = Import(microservicePackage);
102
+ } else {
103
+ var nonStandardPath = findPackageNodePath(absolutePath + "/backend/" + microservicePackage) || findPackageNodePath(absolutePath + "/backend/" + microservicePackage + ".js");
104
+ if (nonStandardPath !== null) {
105
+ _ret_ = Import(absolutePath + "/backend/" + microservicePackage);
106
+ } else {
107
+ _ret_ = Promise.resolve(require(microservicePackage));
108
+ }
109
+ }
110
+ return _ret_;
111
+ }, "ImportMicroservice");
112
+ var BackendMicroservice = class extends InheritClass {
113
+ static {
114
+ __name(this, "BackendMicroservice");
115
+ }
116
+ constructor({
117
+ domain = CONFIG.get("domain"),
118
+ basePath = CONFIG.get("basePath"),
119
+ body = null,
120
+ stream = null,
121
+ request = null
122
+ }) {
123
+ super({
124
+ domain,
125
+ basePath,
126
+ body,
127
+ stream,
128
+ request
129
+ });
130
+ logger.debug("Initializing Legacy BackendMicroservice...");
131
+ const microservice = this;
132
+ if (typeof this.body === "undefined") {
133
+ this.body = null;
134
+ }
135
+ if (typeof body !== "undefined") {
136
+ this.body = body;
137
+ }
138
+ this.cors();
139
+ microservice.stream = stream;
140
+ microservice.req.on("data", (data) => {
141
+ var requestMethod2 = request?.method.toLowerCase();
142
+ var supportedMethods2 = {
143
+ "post": microservice.post.bind(this)
144
+ };
145
+ if (Object.hasOwnProperty.call(supportedMethods2, requestMethod2)) {
146
+ supportedMethods2[requestMethod2].call(microservice, data);
147
+ }
148
+ });
149
+ var requestMethod = request.method.toLowerCase();
150
+ var supportedMethods = {
151
+ "get": microservice.get.bind(this),
152
+ "head": microservice.head.bind(this),
153
+ "put": microservice.put.bind(this),
154
+ "delete": microservice.delete.bind(this),
155
+ "connect": microservice.connect.bind(this),
156
+ "options": microservice.options.bind(this),
157
+ "trace": microservice.trace.bind(this),
158
+ "patch": microservice.patch.bind(this)
159
+ };
160
+ if (Object.hasOwnProperty.call(supportedMethods, requestMethod)) {
161
+ supportedMethods[requestMethod].call(microservice);
162
+ }
163
+ }
164
+ cors() {
165
+ if (this.route.cors) {
166
+ logger.debug("Validating CORS...");
167
+ const {
168
+ allow_origins,
169
+ allow_credentials,
170
+ allow_methods,
171
+ allow_headers
172
+ } = this.route.cors;
173
+ var microservice = this;
174
+ if (typeof microservice.headers !== "object") {
175
+ microservice.headers = {};
176
+ }
177
+ if (typeof microservice.route.responseHeaders !== "object") {
178
+ microservice.route.responseHeaders = {};
179
+ }
180
+ if (typeof allow_origins !== "undefined") {
181
+ logger.debug("CORS: allow_origins available. Validating origins...");
182
+ if (allow_origins === "*" || typeof microservice.request.headers.origin === "undefined" || [...allow_origins].indexOf(microservice.request.headers.origin) !== -1) {
183
+ logger.debug("CORS: Adding header Access-Control-Allow-Origin=*");
184
+ microservice.route.responseHeaders["Access-Control-Allow-Origin"] = "*";
185
+ } else {
186
+ logger.debug("CORS: Origin is not allowed: " + microservice.request.headers.origin);
187
+ logger.debug("CORS: Forcing to finish the response...");
188
+ this.body = {};
189
+ try {
190
+ this.done();
191
+ } catch (e) {
192
+ logger.debug(`It was not possible to finish the call to the microservice: ${e}`);
193
+ }
194
+ }
195
+ } else {
196
+ logger.debug("CORS: no allow_origins available. Allowing all origins...");
197
+ logger.debug("CORS: Adding header Access-Control-Allow-Origin=*");
198
+ microservice.route.responseHeaders["Access-Control-Allow-Origin"] = "*";
199
+ }
200
+ if (typeof allow_credentials !== "undefined") {
201
+ logger.debug(`CORS: allow_credentials present. Allowing ${allow_credentials}...`);
202
+ microservice.route.responseHeaders["Access-Control-Allow-Credentials"] = allow_credentials.toString();
203
+ } else {
204
+ logger.debug("CORS: No allow_credentials present. Allowing all credentials.");
205
+ microservice.route.responseHeaders["Access-Control-Allow-Credentials"] = "true";
206
+ }
207
+ if (typeof allow_methods !== "undefined") {
208
+ logger.debug(`CORS: allow_methods present. Allowing ${allow_methods}...`);
209
+ microservice.route.responseHeaders["Access-Control-Allow-Methods"] = [...allow_methods].join(",");
210
+ } else {
211
+ logger.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST");
212
+ microservice.route.responseHeaders["Access-Control-Allow-Methods"] = "GET, OPTIONS, POST";
213
+ }
214
+ if (typeof allow_headers !== "undefined") {
215
+ logger.debug(`CORS: allow_headers present. Allowing ${allow_headers}...`);
216
+ microservice.route.responseHeaders["Access-Control-Allow-Headers"] = [...allow_headers].join(",");
217
+ } else {
218
+ logger.debug("CORS: No allow_headers present. Allowing all headers...");
219
+ microservice.route.responseHeaders["Access-Control-Allow-Headers"] = "*";
220
+ }
221
+ } else {
222
+ logger.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors");
223
+ }
224
+ }
225
+ head(formData) {
226
+ this.done();
227
+ }
228
+ post(formData) {
229
+ this.done();
230
+ }
231
+ put(formData) {
232
+ this.done();
233
+ }
234
+ delete(formData) {
235
+ this.done();
236
+ }
237
+ connect(formData) {
238
+ this.done();
239
+ }
240
+ options(formData) {
241
+ this.done();
242
+ }
243
+ trace(formData) {
244
+ this.done();
245
+ }
246
+ patch(formData) {
247
+ this.done();
248
+ }
249
+ finishWithBody(stream) {
250
+ try {
251
+ stream.write(JSON.stringify(this.body));
252
+ stream.end();
253
+ } catch (e) {
254
+ logger.debug(`Something wrong writing the response for microservice: ${e}`);
255
+ throw Error(e);
256
+ }
257
+ }
258
+ done() {
259
+ var microservice = this;
260
+ var stream = microservice.stream;
261
+ try {
262
+ stream.writeHead(200, microservice.headers);
263
+ } catch (e) {
264
+ logger.debug(`Something went wront while sending headers in http... ${e}`);
265
+ throw Error(e);
266
+ }
267
+ if (microservice.body != null) {
268
+ microservice.finishWithBody.call(microservice, stream);
269
+ }
270
+ }
271
+ };
272
+ Export(BackendMicroservice);
273
+ var HTTPServerResponse = class extends InheritClass {
274
+ static {
275
+ __name(this, "HTTPServerResponse");
276
+ }
277
+ constructor({
278
+ headers = {
279
+ "status": 200,
280
+ "content-type": "text/html"
281
+ },
282
+ body = "",
283
+ request = null,
284
+ fileDispatcher = null,
285
+ stream = null
286
+ }) {
287
+ super({
288
+ headers,
289
+ body,
290
+ request,
291
+ fileDispatcher,
292
+ stream
293
+ });
294
+ var self = this;
295
+ self.stream = stream;
296
+ self._generateResponse();
297
+ }
298
+ sendFile(stream, fileName) {
299
+ try {
300
+ console.log("trying to read " + fileName);
301
+ const fd = fs.openSync(fileName, "r");
302
+ const stat = fs.fstatSync(fd);
303
+ const headers = {
304
+ "content-length": stat.size,
305
+ "last-modified": stat.mtime.toUTCString(),
306
+ "content-type": mime.getType(fileName),
307
+ "cache-control": CONFIG.get("cacheControl", "max-age=31536000")
308
+ };
309
+ logger.debug("closing file " + fileName);
310
+ fs.closeSync(fd);
311
+ stream.setHeader("content-length", headers["content-length"]);
312
+ stream.setHeader("last-modified", headers["last-modified"]);
313
+ stream.setHeader("content-type", headers["content-type"]);
314
+ stream.setHeader("cache-control", headers["cache-control"]);
315
+ var readStream = fs.createReadStream(fileName);
316
+ readStream.on("open", function() {
317
+ readStream.pipe(stream);
318
+ });
319
+ readStream.on("end", function() {
320
+ stream.end();
321
+ });
322
+ readStream.on("error", function(err) {
323
+ const headers2 = {
324
+ "status": 500,
325
+ "content-type": mime.getType(fileName)
326
+ };
327
+ stream.setHeader("content-type", headers2["content-type"]);
328
+ stream.setHeader("status", headers2["status"]);
329
+ stream.write(`<h1>500 - INTERNAL SERVER ERROR</h1>
330
+ <p>${err}</p>
331
+ `);
332
+ stream.end(err);
333
+ });
334
+ } catch (e) {
335
+ if (e.errno == -2) {
336
+ const headers = {
337
+ "status": 404,
338
+ "content-type": mime.getType(fileName)
339
+ };
340
+ stream.setHeader("content-type", headers["content-type"]);
341
+ stream.setHeader("status", headers["status"]);
342
+ stream.write("<h1>404 - FILE NOT FOUND</h1>");
343
+ stream.on("close", () => {
344
+ logger.debug("closing file " + fileName);
345
+ });
346
+ stream.end();
347
+ }
348
+ }
349
+ }
350
+ _generateResponse() {
351
+ var response = this;
352
+ response.fileDispatcher = New(FileDispatcher, {
353
+ scriptname: response.request.scriptname,
354
+ pathname: response.request.pathname,
355
+ done(headers, body, templateURI, isTemplate) {
356
+ response.headers = headers;
357
+ var stream = response.stream;
358
+ if (isTemplate) {
359
+ response.body = body;
360
+ Object.keys(headers).map((header) => stream.setHeader(header, headers[header]));
361
+ stream.write(response.body);
362
+ stream.end();
363
+ } else if (headers["status"] == 200 || headers[":status"] == 200) {
364
+ response.sendFile(stream, templateURI);
365
+ } else {
366
+ Object.keys(headers).map((header) => stream.setHeader(header, headers[header]));
367
+ stream.end();
368
+ }
369
+ }
370
+ });
371
+ }
372
+ };
373
+ var HTTPServerRequest = class extends InheritClass {
374
+ static {
375
+ __name(this, "HTTPServerRequest");
376
+ }
377
+ constructor({
378
+ scriptname = "",
379
+ path: path2 = "",
380
+ method = "",
381
+ url = "",
382
+ headers = null,
383
+ flags = null,
384
+ protocol = null,
385
+ slashes = null,
386
+ auth = null,
387
+ host = null,
388
+ port = null,
389
+ hostname = null,
390
+ hash = null,
391
+ search = "",
392
+ query = "",
393
+ pathname = "",
394
+ href = ""
395
+ }) {
396
+ super(...arguments);
397
+ }
398
+ };
399
+ var HTTPServer = class extends InheritClass {
400
+ static {
401
+ __name(this, "HTTPServer");
402
+ }
403
+ constructor({
404
+ request = null,
405
+ response = "",
406
+ server = null,
407
+ scriptname = "",
408
+ interceptorInstances = []
409
+ }) {
410
+ super(...arguments);
411
+ const welcometo = "Welcome to \n";
412
+ const instructions = "QCObjects Legacy HTTPServer \n";
413
+ const logo = ` .d88888b. .d8888b. .d88888b. 888 d8b 888 \r
414
+ d88P" "Y88bd88P Y88bd88P" "Y88b888 Y8P 888 \r
415
+ 888 888888 888888 888888 888 \r
416
+ 888 888888 888 88888888b. 8888 .d88b. .d8888b888888.d8888b \r
417
+ 888 888888 888 888888 "88b "888d8P Y8bd88P" 888 88K \r
418
+ 888 Y8b 888888 888888 888888 888 88888888888888 888 "Y8888b. \r
419
+ Y88b.Y8b88PY88b d88PY88b. .d88P888 d88P 888Y8b. Y88b. Y88b. X88 \r
420
+ "Y888888" "Y8888P" "Y88888P" 88888P" 888 "Y8888 "Y8888P "Y888 88888P' \r
421
+ Y8b 888 \r
422
+ d88P \r
423
+ 888P" `;
424
+ console.log(welcometo);
425
+ console.log(logo);
426
+ console.log(instructions);
427
+ logger.debug(this.showIPAddress());
428
+ logger.info("Listening on HTTP PORT: " + CONFIG.get("serverPortHTTP").toString());
429
+ logger.info("Go to: \n" + this.showPossibleURL());
430
+ this.interceptorInstances = interceptorInstances;
431
+ const http = require("http");
432
+ this.server = http.createServer((req, res) => {
433
+ logger.debug("Legacy Server Instantiated.");
434
+ });
435
+ this.server.on("error", (err) => console.error(err));
436
+ if (global.get("backendAvailable")) {
437
+ logger.info("Loading backend interceptors...");
438
+ let interceptors = CONFIG.get("backend", {}).interceptors;
439
+ if (typeof interceptors !== "undefined") {
440
+ logger.info("Backend Interceptors Available");
441
+ interceptors.map((interceptor) => {
442
+ ImportMicroservice(interceptor.microservice);
443
+ var interceptorClassFactory = ClassFactory(interceptor.microservice + ".Interceptor");
444
+ var interceptorInstance = New(interceptorClassFactory, {
445
+ domain: CONFIG.get("domain"),
446
+ basePath: CONFIG.get("basePath"),
447
+ projectPath: CONFIG.get("projectPath"),
448
+ interceptor,
449
+ server: this.server
450
+ });
451
+ this.interceptorInstances.push(interceptorInstance);
452
+ });
453
+ }
454
+ }
455
+ this.server.on("request", (req, res) => {
456
+ let request2 = Object.assign(New(HTTPServerRequest), require("url").parse(req.url));
457
+ request2.headers = req.headers;
458
+ this.request = request2;
459
+ this.request.method = req.method;
460
+ this.request.path = req.url;
461
+ this.server.setMaxListeners(9999999999);
462
+ CONFIG.set("backendTimeout", CONFIG.get("backendTimeout") || 2e4);
463
+ var timeoutHandler = /* @__PURE__ */ __name(() => {
464
+ try {
465
+ if (!res.destroyed) {
466
+ logger.info("A timeout occurred..." + CONFIG.get("backendTimeout").toString());
467
+ logger.info("Killing session...");
468
+ res.writeHeader(500, {
469
+ "content-type": "text/html"
470
+ });
471
+ res.on("error", () => {
472
+ });
473
+ res.write("<h1>500 - INTERNAL SERVER ERROR (TIMEOUT)</h1>");
474
+ res.end();
475
+ } else {
476
+ logger.debug("Session was normally finishing...");
477
+ }
478
+ } catch (e) {
479
+ logger.debug(`An unhandled error occurred during timeout catching: ${e}`);
480
+ }
481
+ this.server.removeListener("timeout", timeoutHandler);
482
+ }, "timeoutHandler");
483
+ if (!res.destroyed) {
484
+ this.server.setTimeout(CONFIG.get("backendTimeout"), timeoutHandler);
485
+ }
486
+ if (this.request.pathname.indexOf(".") < 0) {
487
+ this.request.scriptname = CONFIG.get("documentRootFileIndex");
488
+ } else {
489
+ this.request.scriptname = this.request.pathname.split("/").reverse()[0];
490
+ }
491
+ this.request.pathname = this.request.pathname.substr(0, this.request.pathname.lastIndexOf("/"));
492
+ logger.debug(new PipeLog().pipe(this.request));
493
+ if (global.get("backendAvailable")) {
494
+ logger.info("Backend Legacy Microservices Available...");
495
+ logger.info("Loading backend routes...");
496
+ let routes = CONFIG.get("backend", {}).routes;
497
+ let selectedRoute = routes.filter((route) => {
498
+ let standardRoutePath = route.path.replace(/{(.*?)}/g, "(?<$1>.*)");
499
+ return new RegExp(standardRoutePath, "g").test(request2.path);
500
+ });
501
+ if (selectedRoute.length > 0) {
502
+ selectedRoute.map((route) => {
503
+ let standardRoutePath = route.path.replace(/{(.*?)}/g, "(?<$1>.*)");
504
+ console.log(standardRoutePath);
505
+ let selectedRouteParams = {
506
+ ...[...request2.path.matchAll(new RegExp(standardRoutePath, "g"))][0]["groups"]
507
+ };
508
+ ImportMicroservice(route.microservice).then(() => {
509
+ logger.debug(`Trying to execute ${route.microservice + ".Microservice"}...`);
510
+ var microServiceClassFactory = ClassFactory(route.microservice + ".Microservice");
511
+ if (typeof microServiceClassFactory !== "undefined") {
512
+ const server2 = this.server;
513
+ this.response = New(microServiceClassFactory, {
514
+ domain: CONFIG.get("domain"),
515
+ basePath: CONFIG.get("basePath"),
516
+ projectPath: CONFIG.get("projectPath"),
517
+ route,
518
+ routeParams: selectedRouteParams,
519
+ server: server2,
520
+ stream: res,
521
+ req,
522
+ request: request2
523
+ });
524
+ } else {
525
+ throw Error(`${route.microservice + ".Microservice"} not defined.`);
526
+ }
527
+ }).catch((e) => {
528
+ throw Error(e);
529
+ });
530
+ });
531
+ } else {
532
+ this.response = New(HTTPServerResponse, {
533
+ domain: CONFIG.get("domain"),
534
+ basePath: CONFIG.get("basePath"),
535
+ projectPath: CONFIG.get("projectPath"),
536
+ server: this.server,
537
+ stream: res,
538
+ req,
539
+ request: this.request
540
+ });
541
+ }
542
+ } else {
543
+ this.response = New(HTTPServerResponse, {
544
+ server: this.server,
545
+ stream: res,
546
+ req,
547
+ request: this.request
548
+ });
549
+ }
550
+ });
551
+ }
552
+ showIPAddress() {
553
+ var _ret_ = "";
554
+ var os = require("os");
555
+ var ifaces = os.networkInterfaces();
556
+ Object.keys(ifaces).forEach(function(iface) {
557
+ ifaces[iface].map(function(ipGroup) {
558
+ _ret_ += iface + ": " + new PipeLog().pipe(ipGroup) + "\n";
559
+ });
560
+ });
561
+ return _ret_;
562
+ }
563
+ showPossibleURL() {
564
+ var _ret_ = "";
565
+ var os = require("os");
566
+ var ifaces = os.networkInterfaces();
567
+ Object.keys(ifaces).forEach(function(iface) {
568
+ ifaces[iface].map(function(ipGroup) {
569
+ if (ipGroup["family"].toLowerCase() == "ipv4") {
570
+ _ret_ += "http://" + ipGroup["address"] + ":" + CONFIG.get("serverPortHTTP").toString() + "/\n";
571
+ }
572
+ });
573
+ });
574
+ return _ret_;
575
+ }
576
+ start() {
577
+ var server = this.server;
578
+ server.listen(process.env.PORT || CONFIG.get("serverPortHTTP"));
579
+ }
580
+ };
581
+ Package("org.quickcorp.qcobjects.main.http.server", [
582
+ BackendMicroservice,
583
+ HTTPServer,
584
+ HTTPServerRequest,
585
+ HTTPServerResponse
586
+ ]);
587
+ //# sourceMappingURL=org.quickcorp.qcobjects.main.http.server.cjs.map