@mahameru/diatrema 0.0.2 → 0.0.4

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 (101) hide show
  1. package/diatrema-DBO4yaCD.d.ts +95 -0
  2. package/diatrema-Fd7aehcd.d.cts +95 -0
  3. package/diatrema.cjs +70 -52
  4. package/diatrema.cjs.map +1 -1
  5. package/diatrema.d.cts +6 -72
  6. package/diatrema.d.ts +4 -71
  7. package/diatrema.js +70 -52
  8. package/diatrema.js.map +1 -1
  9. package/helpers.cjs +2 -18
  10. package/helpers.cjs.map +1 -1
  11. package/helpers.d.cts +1 -6
  12. package/helpers.d.ts +1 -6
  13. package/helpers.js +1 -16
  14. package/helpers.js.map +1 -1
  15. package/index.cjs +4 -18
  16. package/index.cjs.map +1 -1
  17. package/index.d.cts +4 -13
  18. package/index.d.ts +4 -13
  19. package/index.js +2 -9
  20. package/index.js.map +1 -1
  21. package/logger.cjs +10 -5
  22. package/logger.cjs.map +1 -1
  23. package/logger.d.cts +1 -1
  24. package/logger.d.ts +1 -1
  25. package/logger.js +10 -5
  26. package/logger.js.map +1 -1
  27. package/mahameru-plugin.cjs +113 -0
  28. package/mahameru-plugin.cjs.map +1 -0
  29. package/mahameru-plugin.d.cts +4 -0
  30. package/mahameru-plugin.d.ts +4 -0
  31. package/mahameru-plugin.js +89 -0
  32. package/mahameru-plugin.js.map +1 -0
  33. package/package.json +4 -3
  34. package/scripts/preinstall.cjs +10 -0
  35. package/scripts/preinstall.cjs.map +1 -0
  36. package/scripts/preinstall.d.cts +2 -0
  37. package/scripts/preinstall.d.ts +2 -0
  38. package/scripts/preinstall.js +9 -9
  39. package/scripts/preinstall.js.map +1 -0
  40. package/types.cjs +0 -23
  41. package/types.cjs.map +1 -1
  42. package/types.d.cts +5 -3
  43. package/types.d.ts +5 -3
  44. package/types.js +0 -15
  45. package/types.js.map +1 -1
  46. package/container-error.cjs +0 -45
  47. package/container-error.cjs.map +0 -1
  48. package/container-error.d.cts +0 -7
  49. package/container-error.d.ts +0 -7
  50. package/container-error.js +0 -22
  51. package/container-error.js.map +0 -1
  52. package/container.cjs +0 -318
  53. package/container.cjs.map +0 -1
  54. package/container.d.cts +0 -60
  55. package/container.d.ts +0 -60
  56. package/container.js +0 -285
  57. package/container.js.map +0 -1
  58. package/http-server-error.cjs +0 -44
  59. package/http-server-error.cjs.map +0 -1
  60. package/http-server-error.d.cts +0 -7
  61. package/http-server-error.d.ts +0 -7
  62. package/http-server-error.js +0 -21
  63. package/http-server-error.js.map +0 -1
  64. package/http-server.cjs +0 -384
  65. package/http-server.cjs.map +0 -1
  66. package/http-server.d.cts +0 -81
  67. package/http-server.d.ts +0 -81
  68. package/http-server.js +0 -361
  69. package/http-server.js.map +0 -1
  70. package/mahameru-request.cjs +0 -79
  71. package/mahameru-request.cjs.map +0 -1
  72. package/mahameru-request.d.cts +0 -3
  73. package/mahameru-request.d.ts +0 -3
  74. package/mahameru-request.js +0 -56
  75. package/mahameru-request.js.map +0 -1
  76. package/mahameru-response.cjs +0 -71
  77. package/mahameru-response.cjs.map +0 -1
  78. package/mahameru-response.d.cts +0 -17
  79. package/mahameru-response.d.ts +0 -17
  80. package/mahameru-response.js +0 -48
  81. package/mahameru-response.js.map +0 -1
  82. package/mahameru-server-error.cjs +0 -54
  83. package/mahameru-server-error.cjs.map +0 -1
  84. package/mahameru-server-error.d.cts +0 -19
  85. package/mahameru-server-error.d.ts +0 -19
  86. package/mahameru-server-error.js +0 -31
  87. package/mahameru-server-error.js.map +0 -1
  88. package/module-error.cjs +0 -46
  89. package/module-error.cjs.map +0 -1
  90. package/module-error.d.cts +0 -12
  91. package/module-error.d.ts +0 -12
  92. package/module-error.js +0 -23
  93. package/module-error.js.map +0 -1
  94. package/route.cjs +0 -128
  95. package/route.cjs.map +0 -1
  96. package/route.d.cts +0 -46
  97. package/route.d.ts +0 -46
  98. package/route.js +0 -105
  99. package/route.js.map +0 -1
  100. package/types-BmFqDpSs.d.ts +0 -113
  101. package/types-Cd6Gkoxx.d.cts +0 -113
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var mahameru_plugin_exports = {};
21
+ __export(mahameru_plugin_exports, {
22
+ Generator: () => Generator,
23
+ MahameruPlugin: () => MahameruPlugin
24
+ });
25
+ module.exports = __toCommonJS(mahameru_plugin_exports);
26
+ var import_logger = require('./logger.cjs');
27
+ class MahameruPlugin {
28
+ static {
29
+ __name(this, "MahameruPlugin");
30
+ }
31
+ logger;
32
+ diatrema;
33
+ _options;
34
+ _initialized = false;
35
+ _isShuttingDown = false;
36
+ _generator;
37
+ constructor(options) {
38
+ this._options = options;
39
+ }
40
+ get initialized() {
41
+ return this._initialized;
42
+ }
43
+ get options() {
44
+ return this._options;
45
+ }
46
+ get generator() {
47
+ return this._generator;
48
+ }
49
+ set outputTypesDirPath(outputTypesDirPath) {
50
+ if (this._generator)
51
+ this._generator.outputTypesDirPath = outputTypesDirPath;
52
+ }
53
+ setDiatrema(diatrema) {
54
+ this.diatrema = diatrema;
55
+ }
56
+ async initialize() {
57
+ if (!this.diatrema) {
58
+ this.logger.debug("Failed to initialize. No Diatrema instance found");
59
+ return;
60
+ }
61
+ this.logger.debug("Initializing...");
62
+ if (this._initialized) {
63
+ this.logger.debug("Already initialized");
64
+ return;
65
+ }
66
+ await this.boot();
67
+ this.logger.debug("Initializing... Done");
68
+ this._initialized = true;
69
+ }
70
+ async destroy() {
71
+ if (!this._initialized || this._isShuttingDown)
72
+ return;
73
+ this.logger.debug("Destroying...");
74
+ this._isShuttingDown = true;
75
+ await this.terminate();
76
+ this._initialized = false;
77
+ this._isShuttingDown = false;
78
+ this.logger.debug("Destroying... Done");
79
+ }
80
+ }
81
+ class Generator {
82
+ static {
83
+ __name(this, "Generator");
84
+ }
85
+ logger;
86
+ _diatrema;
87
+ _options;
88
+ _sourceDirPath;
89
+ _outputTypesDirPath;
90
+ constructor(options) {
91
+ this._options = options;
92
+ }
93
+ set diatrema(diatrema) {
94
+ this._diatrema = diatrema;
95
+ }
96
+ set sourceDirPath(sourceDirPath) {
97
+ this._sourceDirPath = sourceDirPath;
98
+ }
99
+ set outputTypesDirPath(outputTypesDirPath) {
100
+ this._outputTypesDirPath = outputTypesDirPath;
101
+ }
102
+ async generate() {
103
+ this.logger.debug("Generating types...");
104
+ const types = await this._generate();
105
+ this.logger.debug("Types generated", types);
106
+ }
107
+ }
108
+ // Annotate the CommonJS export names for ESM import in node:
109
+ 0 && (module.exports = {
110
+ Generator,
111
+ MahameruPlugin
112
+ });
113
+ //# sourceMappingURL=mahameru-plugin.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/mahameru-plugin.ts"],"sourcesContent":["import type Diatrema from \"./diatrema\";\r\nimport { type Logger } from \"./logger\";\r\n\r\nexport interface BasePluginOptions {\r\n debug?: boolean;\r\n}\r\n\r\nexport abstract class MahameruPlugin<O extends BasePluginOptions = BasePluginOptions> {\r\n public abstract readonly name: string;\r\n public abstract readonly slugName: string;\r\n protected logger!: Logger;\r\n protected diatrema!: Diatrema;\r\n protected _options: O;\r\n protected _initialized = false;\r\n protected _isShuttingDown = false;\r\n protected _generator?: Generator;\r\n\r\n constructor(options: Partial<O>) {\r\n this._options = options as O;\r\n }\r\n\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n get options(): O {\r\n return this._options;\r\n }\r\n\r\n get generator() {\r\n return this._generator;\r\n }\r\n\r\n set outputTypesDirPath(outputTypesDirPath: string) {\r\n if (this._generator)\r\n this._generator.outputTypesDirPath = outputTypesDirPath;\r\n }\r\n\r\n public setDiatrema(diatrema: Diatrema) {\r\n this.diatrema = diatrema;\r\n }\r\n\r\n public async initialize(): Promise<void> {\r\n if (!this.diatrema) {\r\n this.logger.debug('Failed to initialize. No Diatrema instance found');\r\n\r\n return;\r\n }\r\n\r\n this.logger.debug('Initializing...');\r\n\r\n if (this._initialized) {\r\n this.logger.debug('Already initialized');\r\n\r\n return;\r\n }\r\n\r\n await this.boot();\r\n\r\n this.logger.debug('Initializing... Done');\r\n\r\n this._initialized = true;\r\n }\r\n\r\n public async destroy(): Promise<void> {\r\n if (!this._initialized || this._isShuttingDown)\r\n return;\r\n\r\n this.logger.debug('Destroying...');\r\n\r\n this._isShuttingDown = true;\r\n\r\n await this.terminate();\r\n\r\n this._initialized = false;\r\n this._isShuttingDown = false;\r\n\r\n this.logger.debug('Destroying... Done');\r\n }\r\n\r\n protected abstract boot(options?: Partial<O>): Promise<void> | void;\r\n protected abstract terminate(): Promise<void> | void;\r\n}\r\n\r\nexport interface BaseGeneratorOptions {\r\n debug?: boolean;\r\n}\r\n\r\nexport abstract class Generator<O extends BaseGeneratorOptions = BaseGeneratorOptions> {\r\n protected logger!: Logger;\r\n protected _diatrema!: Diatrema;\r\n protected _options: O;\r\n protected _sourceDirPath!: string;\r\n protected _outputTypesDirPath!: string;\r\n\r\n constructor(options: Partial<O>) {\r\n this._options = options as O;\r\n }\r\n\r\n set diatrema(diatrema: Diatrema) {\r\n this._diatrema = diatrema;\r\n }\r\n\r\n set sourceDirPath(sourceDirPath: string) {\r\n this._sourceDirPath = sourceDirPath;\r\n }\r\n\r\n set outputTypesDirPath(outputTypesDirPath: string) {\r\n this._outputTypesDirPath = outputTypesDirPath;\r\n }\r\n\r\n public async generate() {\r\n this.logger.debug('Generating types...');\r\n const types = await this._generate();\r\n this.logger.debug('Types generated', types);\r\n }\r\n\r\n protected abstract _generate(): Promise<Record<string, any>>;\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA4B;AAMrB,MAAe,eAAgE;AAAA,EAPtF,OAOsF;AAAA;AAAA;AAAA,EAGxE;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB;AAAA,EAEV,YAAY,SAAqB;AAC7B,SAAK,WAAW;AAAA,EACpB;AAAA,EAEA,IAAI,cAAc;AACd,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,UAAa;AACb,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,YAAY;AACZ,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,mBAAmB,oBAA4B;AAC/C,QAAI,KAAK;AACL,WAAK,WAAW,qBAAqB;AAAA,EAC7C;AAAA,EAEO,YAAY,UAAoB;AACnC,SAAK,WAAW;AAAA,EACpB;AAAA,EAEA,MAAa,aAA4B;AACrC,QAAI,CAAC,KAAK,UAAU;AAChB,WAAK,OAAO,MAAM,kDAAkD;AAEpE;AAAA,IACJ;AAEA,SAAK,OAAO,MAAM,iBAAiB;AAEnC,QAAI,KAAK,cAAc;AACnB,WAAK,OAAO,MAAM,qBAAqB;AAEvC;AAAA,IACJ;AAEA,UAAM,KAAK,KAAK;AAEhB,SAAK,OAAO,MAAM,sBAAsB;AAExC,SAAK,eAAe;AAAA,EACxB;AAAA,EAEA,MAAa,UAAyB;AAClC,QAAI,CAAC,KAAK,gBAAgB,KAAK;AAC3B;AAEJ,SAAK,OAAO,MAAM,eAAe;AAEjC,SAAK,kBAAkB;AAEvB,UAAM,KAAK,UAAU;AAErB,SAAK,eAAe;AACpB,SAAK,kBAAkB;AAEvB,SAAK,OAAO,MAAM,oBAAoB;AAAA,EAC1C;AAIJ;AAMO,MAAe,UAAiE;AAAA,EAxFvF,OAwFuF;AAAA;AAAA;AAAA,EACzE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEV,YAAY,SAAqB;AAC7B,SAAK,WAAW;AAAA,EACpB;AAAA,EAEA,IAAI,SAAS,UAAoB;AAC7B,SAAK,YAAY;AAAA,EACrB;AAAA,EAEA,IAAI,cAAc,eAAuB;AACrC,SAAK,iBAAiB;AAAA,EAC1B;AAAA,EAEA,IAAI,mBAAmB,oBAA4B;AAC/C,SAAK,sBAAsB;AAAA,EAC/B;AAAA,EAEA,MAAa,WAAW;AACpB,SAAK,OAAO,MAAM,qBAAqB;AACvC,UAAM,QAAQ,MAAM,KAAK,UAAU;AACnC,SAAK,OAAO,MAAM,mBAAmB,KAAK;AAAA,EAC9C;AAGJ;","names":[]}
@@ -0,0 +1,4 @@
1
+ export { B as BaseGeneratorOptions, a as BasePluginOptions, G as Generator, M as MahameruPlugin } from './diatrema-Fd7aehcd.cjs';
2
+ import './logger.cjs';
3
+ import './event-emitter.cjs';
4
+ import './types.cjs';
@@ -0,0 +1,4 @@
1
+ export { B as BaseGeneratorOptions, a as BasePluginOptions, G as Generator, M as MahameruPlugin } from './diatrema-DBO4yaCD.js';
2
+ import './logger.js';
3
+ import './event-emitter.js';
4
+ import './types.js';
@@ -0,0 +1,89 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import {} from "./logger.js";
4
+ class MahameruPlugin {
5
+ static {
6
+ __name(this, "MahameruPlugin");
7
+ }
8
+ logger;
9
+ diatrema;
10
+ _options;
11
+ _initialized = false;
12
+ _isShuttingDown = false;
13
+ _generator;
14
+ constructor(options) {
15
+ this._options = options;
16
+ }
17
+ get initialized() {
18
+ return this._initialized;
19
+ }
20
+ get options() {
21
+ return this._options;
22
+ }
23
+ get generator() {
24
+ return this._generator;
25
+ }
26
+ set outputTypesDirPath(outputTypesDirPath) {
27
+ if (this._generator)
28
+ this._generator.outputTypesDirPath = outputTypesDirPath;
29
+ }
30
+ setDiatrema(diatrema) {
31
+ this.diatrema = diatrema;
32
+ }
33
+ async initialize() {
34
+ if (!this.diatrema) {
35
+ this.logger.debug("Failed to initialize. No Diatrema instance found");
36
+ return;
37
+ }
38
+ this.logger.debug("Initializing...");
39
+ if (this._initialized) {
40
+ this.logger.debug("Already initialized");
41
+ return;
42
+ }
43
+ await this.boot();
44
+ this.logger.debug("Initializing... Done");
45
+ this._initialized = true;
46
+ }
47
+ async destroy() {
48
+ if (!this._initialized || this._isShuttingDown)
49
+ return;
50
+ this.logger.debug("Destroying...");
51
+ this._isShuttingDown = true;
52
+ await this.terminate();
53
+ this._initialized = false;
54
+ this._isShuttingDown = false;
55
+ this.logger.debug("Destroying... Done");
56
+ }
57
+ }
58
+ class Generator {
59
+ static {
60
+ __name(this, "Generator");
61
+ }
62
+ logger;
63
+ _diatrema;
64
+ _options;
65
+ _sourceDirPath;
66
+ _outputTypesDirPath;
67
+ constructor(options) {
68
+ this._options = options;
69
+ }
70
+ set diatrema(diatrema) {
71
+ this._diatrema = diatrema;
72
+ }
73
+ set sourceDirPath(sourceDirPath) {
74
+ this._sourceDirPath = sourceDirPath;
75
+ }
76
+ set outputTypesDirPath(outputTypesDirPath) {
77
+ this._outputTypesDirPath = outputTypesDirPath;
78
+ }
79
+ async generate() {
80
+ this.logger.debug("Generating types...");
81
+ const types = await this._generate();
82
+ this.logger.debug("Types generated", types);
83
+ }
84
+ }
85
+ export {
86
+ Generator,
87
+ MahameruPlugin
88
+ };
89
+ //# sourceMappingURL=mahameru-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/mahameru-plugin.ts"],"sourcesContent":["import type Diatrema from \"./diatrema\";\r\nimport { type Logger } from \"./logger\";\r\n\r\nexport interface BasePluginOptions {\r\n debug?: boolean;\r\n}\r\n\r\nexport abstract class MahameruPlugin<O extends BasePluginOptions = BasePluginOptions> {\r\n public abstract readonly name: string;\r\n public abstract readonly slugName: string;\r\n protected logger!: Logger;\r\n protected diatrema!: Diatrema;\r\n protected _options: O;\r\n protected _initialized = false;\r\n protected _isShuttingDown = false;\r\n protected _generator?: Generator;\r\n\r\n constructor(options: Partial<O>) {\r\n this._options = options as O;\r\n }\r\n\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n get options(): O {\r\n return this._options;\r\n }\r\n\r\n get generator() {\r\n return this._generator;\r\n }\r\n\r\n set outputTypesDirPath(outputTypesDirPath: string) {\r\n if (this._generator)\r\n this._generator.outputTypesDirPath = outputTypesDirPath;\r\n }\r\n\r\n public setDiatrema(diatrema: Diatrema) {\r\n this.diatrema = diatrema;\r\n }\r\n\r\n public async initialize(): Promise<void> {\r\n if (!this.diatrema) {\r\n this.logger.debug('Failed to initialize. No Diatrema instance found');\r\n\r\n return;\r\n }\r\n\r\n this.logger.debug('Initializing...');\r\n\r\n if (this._initialized) {\r\n this.logger.debug('Already initialized');\r\n\r\n return;\r\n }\r\n\r\n await this.boot();\r\n\r\n this.logger.debug('Initializing... Done');\r\n\r\n this._initialized = true;\r\n }\r\n\r\n public async destroy(): Promise<void> {\r\n if (!this._initialized || this._isShuttingDown)\r\n return;\r\n\r\n this.logger.debug('Destroying...');\r\n\r\n this._isShuttingDown = true;\r\n\r\n await this.terminate();\r\n\r\n this._initialized = false;\r\n this._isShuttingDown = false;\r\n\r\n this.logger.debug('Destroying... Done');\r\n }\r\n\r\n protected abstract boot(options?: Partial<O>): Promise<void> | void;\r\n protected abstract terminate(): Promise<void> | void;\r\n}\r\n\r\nexport interface BaseGeneratorOptions {\r\n debug?: boolean;\r\n}\r\n\r\nexport abstract class Generator<O extends BaseGeneratorOptions = BaseGeneratorOptions> {\r\n protected logger!: Logger;\r\n protected _diatrema!: Diatrema;\r\n protected _options: O;\r\n protected _sourceDirPath!: string;\r\n protected _outputTypesDirPath!: string;\r\n\r\n constructor(options: Partial<O>) {\r\n this._options = options as O;\r\n }\r\n\r\n set diatrema(diatrema: Diatrema) {\r\n this._diatrema = diatrema;\r\n }\r\n\r\n set sourceDirPath(sourceDirPath: string) {\r\n this._sourceDirPath = sourceDirPath;\r\n }\r\n\r\n set outputTypesDirPath(outputTypesDirPath: string) {\r\n this._outputTypesDirPath = outputTypesDirPath;\r\n }\r\n\r\n public async generate() {\r\n this.logger.debug('Generating types...');\r\n const types = await this._generate();\r\n this.logger.debug('Types generated', types);\r\n }\r\n\r\n protected abstract _generate(): Promise<Record<string, any>>;\r\n}\r\n"],"mappings":";;AACA,eAA4B;AAMrB,MAAe,eAAgE;AAAA,EAPtF,OAOsF;AAAA;AAAA;AAAA,EAGxE;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB;AAAA,EAEV,YAAY,SAAqB;AAC7B,SAAK,WAAW;AAAA,EACpB;AAAA,EAEA,IAAI,cAAc;AACd,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,UAAa;AACb,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,YAAY;AACZ,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,mBAAmB,oBAA4B;AAC/C,QAAI,KAAK;AACL,WAAK,WAAW,qBAAqB;AAAA,EAC7C;AAAA,EAEO,YAAY,UAAoB;AACnC,SAAK,WAAW;AAAA,EACpB;AAAA,EAEA,MAAa,aAA4B;AACrC,QAAI,CAAC,KAAK,UAAU;AAChB,WAAK,OAAO,MAAM,kDAAkD;AAEpE;AAAA,IACJ;AAEA,SAAK,OAAO,MAAM,iBAAiB;AAEnC,QAAI,KAAK,cAAc;AACnB,WAAK,OAAO,MAAM,qBAAqB;AAEvC;AAAA,IACJ;AAEA,UAAM,KAAK,KAAK;AAEhB,SAAK,OAAO,MAAM,sBAAsB;AAExC,SAAK,eAAe;AAAA,EACxB;AAAA,EAEA,MAAa,UAAyB;AAClC,QAAI,CAAC,KAAK,gBAAgB,KAAK;AAC3B;AAEJ,SAAK,OAAO,MAAM,eAAe;AAEjC,SAAK,kBAAkB;AAEvB,UAAM,KAAK,UAAU;AAErB,SAAK,eAAe;AACpB,SAAK,kBAAkB;AAEvB,SAAK,OAAO,MAAM,oBAAoB;AAAA,EAC1C;AAIJ;AAMO,MAAe,UAAiE;AAAA,EAxFvF,OAwFuF;AAAA;AAAA;AAAA,EACzE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEV,YAAY,SAAqB;AAC7B,SAAK,WAAW;AAAA,EACpB;AAAA,EAEA,IAAI,SAAS,UAAoB;AAC7B,SAAK,YAAY;AAAA,EACrB;AAAA,EAEA,IAAI,cAAc,eAAuB;AACrC,SAAK,iBAAiB;AAAA,EAC1B;AAAA,EAEA,IAAI,mBAAmB,oBAA4B;AAC/C,SAAK,sBAAsB;AAAA,EAC/B;AAAA,EAEA,MAAa,WAAW;AACpB,SAAK,OAAO,MAAM,qBAAqB;AACvC,UAAM,QAAQ,MAAM,KAAK,UAAU;AACnC,SAAK,OAAO,MAAM,mBAAmB,KAAK;AAAA,EAC9C;AAGJ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mahameru/diatrema",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "The core engine of MahameruJS. Just like a volcanic diatreme, it serves as the essential conduit that powers and drives the entire framework ecosystem.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -15,8 +15,9 @@
15
15
  },
16
16
  "scripts": {
17
17
  "typecheck": "tsc --noEmit --project tsconfig.json",
18
- "build": "tsup --config tsup.config.ts && node ./scripts/post-build.js",
19
- "dev": "cross-env NODE_ENV=development tsup --config tsup.config.ts && node ./scripts/post-build.js"
18
+ "build": "tsup --config tsup.config.ts && node ./scripts/postbuild.js",
19
+ "dev": "cross-env NODE_ENV=development tsup --config tsup.config.ts && node ./scripts/postbuild.js",
20
+ "preinstall": "node ./scripts/preinstall.js"
20
21
  },
21
22
  "keywords": [
22
23
  "node",
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ if (process.env.npm_config_global === "true" || process.env.npm_config_global === "1") {
3
+ console.error("\x1B[31m%s\x1B[0m", "==================================================================");
4
+ console.error("\x1B[31m%s\x1B[0m", ` Error: The "${process.env.npm_package_name}" package cannot be installed globally!`);
5
+ console.error("\x1B[31m%s\x1B[0m", " Please install it locally within your project using:");
6
+ console.error("\x1B[33m%s\x1B[0m", ` npm install ${process.env.npm_package_name}`);
7
+ console.error("\x1B[31m%s\x1B[0m", "==================================================================");
8
+ process.exit(1);
9
+ }
10
+ //# sourceMappingURL=preinstall.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/scripts/preinstall.ts"],"sourcesContent":["if (process.env.npm_config_global === 'true' || process.env.npm_config_global === '1') {\r\n console.error('\\x1b[31m%s\\x1b[0m', '==================================================================');\r\n console.error('\\x1b[31m%s\\x1b[0m', ` Error: The \"${process.env.npm_package_name}\" package cannot be installed globally!`);\r\n console.error('\\x1b[31m%s\\x1b[0m', ' Please install it locally within your project using:');\r\n console.error('\\x1b[33m%s\\x1b[0m', ` npm install ${process.env.npm_package_name}`);\r\n console.error('\\x1b[31m%s\\x1b[0m', '==================================================================');\r\n\r\n process.exit(1);\r\n}\r\n"],"mappings":";AAAA,IAAI,QAAQ,IAAI,sBAAsB,UAAU,QAAQ,IAAI,sBAAsB,KAAK;AACnF,UAAQ,MAAM,qBAAqB,oEAAoE;AACvG,UAAQ,MAAM,qBAAqB,gBAAgB,QAAQ,IAAI,gBAAgB,yCAAyC;AACxH,UAAQ,MAAM,qBAAqB,uDAAuD;AAC1F,UAAQ,MAAM,qBAAqB,gBAAgB,QAAQ,IAAI,gBAAgB,EAAE;AACjF,UAAQ,MAAM,qBAAqB,oEAAoE;AAEvG,UAAQ,KAAK,CAAC;AAClB;","names":[]}
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -1,9 +1,9 @@
1
- if (process.env.npm_config_global === 'true' || process.env.npm_config_global === '1') {
2
- console.error('\x1b[31m%s\x1b[0m', '==================================================================');
3
- console.error('\x1b[31m%s\x1b[0m', ' Error: The "@mahameru/core" package cannot be installed globally!');
4
- console.error('\x1b[31m%s\x1b[0m', ' Please install it locally within your project using:');
5
- console.error('\x1b[33m%s\x1b[0m', ' npm install @mahameru/core');
6
- console.error('\x1b[31m%s\x1b[0m', '==================================================================');
7
-
8
- process.exit(1);
9
- }
1
+ if (process.env.npm_config_global === "true" || process.env.npm_config_global === "1") {
2
+ console.error("\x1B[31m%s\x1B[0m", "==================================================================");
3
+ console.error("\x1B[31m%s\x1B[0m", ` Error: The "${process.env.npm_package_name}" package cannot be installed globally!`);
4
+ console.error("\x1B[31m%s\x1B[0m", " Please install it locally within your project using:");
5
+ console.error("\x1B[33m%s\x1B[0m", ` npm install ${process.env.npm_package_name}`);
6
+ console.error("\x1B[31m%s\x1B[0m", "==================================================================");
7
+ process.exit(1);
8
+ }
9
+ //# sourceMappingURL=preinstall.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/scripts/preinstall.ts"],"sourcesContent":["if (process.env.npm_config_global === 'true' || process.env.npm_config_global === '1') {\r\n console.error('\\x1b[31m%s\\x1b[0m', '==================================================================');\r\n console.error('\\x1b[31m%s\\x1b[0m', ` Error: The \"${process.env.npm_package_name}\" package cannot be installed globally!`);\r\n console.error('\\x1b[31m%s\\x1b[0m', ' Please install it locally within your project using:');\r\n console.error('\\x1b[33m%s\\x1b[0m', ` npm install ${process.env.npm_package_name}`);\r\n console.error('\\x1b[31m%s\\x1b[0m', '==================================================================');\r\n\r\n process.exit(1);\r\n}\r\n"],"mappings":"AAAA,IAAI,QAAQ,IAAI,sBAAsB,UAAU,QAAQ,IAAI,sBAAsB,KAAK;AACnF,UAAQ,MAAM,qBAAqB,oEAAoE;AACvG,UAAQ,MAAM,qBAAqB,gBAAgB,QAAQ,IAAI,gBAAgB,yCAAyC;AACxH,UAAQ,MAAM,qBAAqB,uDAAuD;AAC1F,UAAQ,MAAM,qBAAqB,gBAAgB,QAAQ,IAAI,gBAAgB,EAAE;AACjF,UAAQ,MAAM,qBAAqB,oEAAoE;AAEvG,UAAQ,KAAK,CAAC;AAClB;","names":[]}
package/types.cjs CHANGED
@@ -3,10 +3,6 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
6
  var __copyProps = (to, from, except, desc) => {
11
7
  if (from && typeof from === "object" || typeof from === "function") {
12
8
  for (let key of __getOwnPropNames(from))
@@ -17,24 +13,5 @@ var __copyProps = (to, from, except, desc) => {
17
13
  };
18
14
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
15
  var types_exports = {};
20
- __export(types_exports, {
21
- HTTPMethodEnum: () => HTTPMethodEnum
22
- });
23
16
  module.exports = __toCommonJS(types_exports);
24
- var HTTPMethodEnum = /* @__PURE__ */ ((HTTPMethodEnum2) => {
25
- HTTPMethodEnum2["GET"] = "GET";
26
- HTTPMethodEnum2["HEAD"] = "HEAD";
27
- HTTPMethodEnum2["POST"] = "POST";
28
- HTTPMethodEnum2["PUT"] = "PUT";
29
- HTTPMethodEnum2["DELETE"] = "DELETE";
30
- HTTPMethodEnum2["CONNECT"] = "CONNECT";
31
- HTTPMethodEnum2["OPTIONS"] = "OPTIONS";
32
- HTTPMethodEnum2["TRACE"] = "TRACE";
33
- HTTPMethodEnum2["PATCH"] = "PATCH";
34
- return HTTPMethodEnum2;
35
- })(HTTPMethodEnum || {});
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {
38
- HTTPMethodEnum
39
- });
40
17
  //# sourceMappingURL=types.cjs.map
package/types.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { MahameruRequest } from \"./mahameru-request\";\r\nimport type { MahameruResponse } from \"./mahameru-response\";\r\n\r\nexport enum HTTPMethodEnum {\r\n GET = 'GET',\r\n HEAD = 'HEAD',\r\n POST = 'POST',\r\n PUT = 'PUT',\r\n DELETE = 'DELETE',\r\n CONNECT = 'CONNECT',\r\n OPTIONS = 'OPTIONS',\r\n TRACE = 'TRACE',\r\n PATCH = 'PATCH'\r\n}\r\n\r\nexport type HTTPMethod = `${HTTPMethodEnum}`\r\n\r\nexport type RouteObject<T extends string = string> = {\r\n path: T;\r\n methods: HTTPMethod[];\r\n};\r\n\r\nexport interface RegisterRoutes { }\r\n\r\nexport type ProtectedRoute = RegisterRoutes extends { routes: infer R }\r\n ? R[]\r\n : (string | RouteObject<string>)[];\r\n\r\nexport type RequestParams = {\r\n [key: string]: string;\r\n};\r\nexport type RouteHandlerContext = { params: RequestParams };\r\n\r\nexport type RouteHandler = (\r\n request: MahameruRequest,\r\n container: MahameruContainer,\r\n context: RouteHandlerContext\r\n) => Promise<MahameruResponse> | MahameruResponse;\r\n\r\nexport interface RouteItem {\r\n path: string;\r\n regex: RegExp;\r\n paramNames: (keyof RequestParams)[];\r\n routeHandlers: RouteHandlers;\r\n pathFS: string;\r\n}\r\n\r\nexport type RouteHandlers = Record<HTTPMethod, RouteHandler>;\r\n\r\nexport type MahameruNext = () => Promise<MahameruResponse>;\r\n\r\nexport interface MahameruMiddlewareContext {\r\n request: MahameruRequest;\r\n container: MahameruContainer;\r\n params: Record<string, string>;\r\n path: string;\r\n method: HTTPMethod;\r\n status: number;\r\n}\r\n\r\nexport type MahameruMiddleware = (context: MahameruMiddlewareContext, isProtectedRoute: boolean, next: MahameruNext) =>\r\n Promise<MahameruResponse> | MahameruResponse;\r\n\r\nexport type ErrorHandlerContext = MahameruMiddlewareContext & { error: unknown };\r\n\r\nexport type ErrorHandler = (context: ErrorHandlerContext, next: MahameruNext) =>\r\n Promise<MahameruResponse> | MahameruResponse;\r\n\r\nexport interface Modules { }\r\nexport interface Instances { }\r\nexport interface MahameruContainer extends Modules, Instances { }\r\n\r\nexport type ClassConstructor<T = unknown> = new (mahameruContainer: MahameruContainer) => T;\r\n\r\nexport type ContainerItemID = string\r\nexport type ContainerItem =\r\n | { name: string; path: string; type: 'module-service'; item: unknown }\r\n | { name: string; path: string; type: 'module-controller'; item: unknown }\r\n | { name: string; path: string; type: 'route'; item: RouteItem }\r\n | { name: string; path: string; type: 'instance'; item: Instances }\r\n | { name: string; path: string; type: 'middleware'; item: MahameruMiddleware }\r\n | { name: string; path: string; type: 'protected-route'; item: ProtectedRoute };\r\n\r\nexport type ContainerRegistry = Map<ContainerItemID, ContainerItem>;\r\nexport type InitiatorHandler = () => Promise<Instances>;\r\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,IAAK,iBAAL,kBAAKA,oBAAL;AACH,EAAAA,gBAAA,SAAM;AACN,EAAAA,gBAAA,UAAO;AACP,EAAAA,gBAAA,UAAO;AACP,EAAAA,gBAAA,SAAM;AACN,EAAAA,gBAAA,YAAS;AACT,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,WAAQ;AATA,SAAAA;AAAA,GAAA;","names":["HTTPMethodEnum"]}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["export interface Instances { }\r\nexport type InitiatorHandler = () => Promise<Instances>;\r\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/types.d.cts CHANGED
@@ -1,3 +1,5 @@
1
- export { C as ClassConstructor, a as ContainerItem, b as ContainerItemID, c as ContainerRegistry, E as ErrorHandler, d as ErrorHandlerContext, H as HTTPMethod, e as HTTPMethodEnum, I as InitiatorHandler, f as Instances, M as MahameruContainer, g as MahameruMiddleware, h as MahameruMiddlewareContext, i as MahameruNext, k as Modules, P as ProtectedRoute, R as RegisterRoutes, l as RequestParams, m as RouteHandler, n as RouteHandlerContext, o as RouteHandlers, p as RouteItem, q as RouteObject } from './types-Cd6Gkoxx.cjs';
2
- import './mahameru-response.cjs';
3
- import 'node:http';
1
+ interface Instances {
2
+ }
3
+ type InitiatorHandler = () => Promise<Instances>;
4
+
5
+ export type { InitiatorHandler, Instances };
package/types.d.ts CHANGED
@@ -1,3 +1,5 @@
1
- export { C as ClassConstructor, a as ContainerItem, b as ContainerItemID, c as ContainerRegistry, E as ErrorHandler, d as ErrorHandlerContext, H as HTTPMethod, e as HTTPMethodEnum, I as InitiatorHandler, f as Instances, M as MahameruContainer, g as MahameruMiddleware, h as MahameruMiddlewareContext, i as MahameruNext, k as Modules, P as ProtectedRoute, R as RegisterRoutes, l as RequestParams, m as RouteHandler, n as RouteHandlerContext, o as RouteHandlers, p as RouteItem, q as RouteObject } from './types-BmFqDpSs.js';
2
- import './mahameru-response.js';
3
- import 'node:http';
1
+ interface Instances {
2
+ }
3
+ type InitiatorHandler = () => Promise<Instances>;
4
+
5
+ export type { InitiatorHandler, Instances };
package/types.js CHANGED
@@ -1,16 +1 @@
1
- var HTTPMethodEnum = /* @__PURE__ */ ((HTTPMethodEnum2) => {
2
- HTTPMethodEnum2["GET"] = "GET";
3
- HTTPMethodEnum2["HEAD"] = "HEAD";
4
- HTTPMethodEnum2["POST"] = "POST";
5
- HTTPMethodEnum2["PUT"] = "PUT";
6
- HTTPMethodEnum2["DELETE"] = "DELETE";
7
- HTTPMethodEnum2["CONNECT"] = "CONNECT";
8
- HTTPMethodEnum2["OPTIONS"] = "OPTIONS";
9
- HTTPMethodEnum2["TRACE"] = "TRACE";
10
- HTTPMethodEnum2["PATCH"] = "PATCH";
11
- return HTTPMethodEnum2;
12
- })(HTTPMethodEnum || {});
13
- export {
14
- HTTPMethodEnum
15
- };
16
1
  //# sourceMappingURL=types.js.map
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { MahameruRequest } from \"./mahameru-request\";\r\nimport type { MahameruResponse } from \"./mahameru-response\";\r\n\r\nexport enum HTTPMethodEnum {\r\n GET = 'GET',\r\n HEAD = 'HEAD',\r\n POST = 'POST',\r\n PUT = 'PUT',\r\n DELETE = 'DELETE',\r\n CONNECT = 'CONNECT',\r\n OPTIONS = 'OPTIONS',\r\n TRACE = 'TRACE',\r\n PATCH = 'PATCH'\r\n}\r\n\r\nexport type HTTPMethod = `${HTTPMethodEnum}`\r\n\r\nexport type RouteObject<T extends string = string> = {\r\n path: T;\r\n methods: HTTPMethod[];\r\n};\r\n\r\nexport interface RegisterRoutes { }\r\n\r\nexport type ProtectedRoute = RegisterRoutes extends { routes: infer R }\r\n ? R[]\r\n : (string | RouteObject<string>)[];\r\n\r\nexport type RequestParams = {\r\n [key: string]: string;\r\n};\r\nexport type RouteHandlerContext = { params: RequestParams };\r\n\r\nexport type RouteHandler = (\r\n request: MahameruRequest,\r\n container: MahameruContainer,\r\n context: RouteHandlerContext\r\n) => Promise<MahameruResponse> | MahameruResponse;\r\n\r\nexport interface RouteItem {\r\n path: string;\r\n regex: RegExp;\r\n paramNames: (keyof RequestParams)[];\r\n routeHandlers: RouteHandlers;\r\n pathFS: string;\r\n}\r\n\r\nexport type RouteHandlers = Record<HTTPMethod, RouteHandler>;\r\n\r\nexport type MahameruNext = () => Promise<MahameruResponse>;\r\n\r\nexport interface MahameruMiddlewareContext {\r\n request: MahameruRequest;\r\n container: MahameruContainer;\r\n params: Record<string, string>;\r\n path: string;\r\n method: HTTPMethod;\r\n status: number;\r\n}\r\n\r\nexport type MahameruMiddleware = (context: MahameruMiddlewareContext, isProtectedRoute: boolean, next: MahameruNext) =>\r\n Promise<MahameruResponse> | MahameruResponse;\r\n\r\nexport type ErrorHandlerContext = MahameruMiddlewareContext & { error: unknown };\r\n\r\nexport type ErrorHandler = (context: ErrorHandlerContext, next: MahameruNext) =>\r\n Promise<MahameruResponse> | MahameruResponse;\r\n\r\nexport interface Modules { }\r\nexport interface Instances { }\r\nexport interface MahameruContainer extends Modules, Instances { }\r\n\r\nexport type ClassConstructor<T = unknown> = new (mahameruContainer: MahameruContainer) => T;\r\n\r\nexport type ContainerItemID = string\r\nexport type ContainerItem =\r\n | { name: string; path: string; type: 'module-service'; item: unknown }\r\n | { name: string; path: string; type: 'module-controller'; item: unknown }\r\n | { name: string; path: string; type: 'route'; item: RouteItem }\r\n | { name: string; path: string; type: 'instance'; item: Instances }\r\n | { name: string; path: string; type: 'middleware'; item: MahameruMiddleware }\r\n | { name: string; path: string; type: 'protected-route'; item: ProtectedRoute };\r\n\r\nexport type ContainerRegistry = Map<ContainerItemID, ContainerItem>;\r\nexport type InitiatorHandler = () => Promise<Instances>;\r\n"],"mappings":"AAGO,IAAK,iBAAL,kBAAKA,oBAAL;AACH,EAAAA,gBAAA,SAAM;AACN,EAAAA,gBAAA,UAAO;AACP,EAAAA,gBAAA,UAAO;AACP,EAAAA,gBAAA,SAAM;AACN,EAAAA,gBAAA,YAAS;AACT,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,WAAQ;AATA,SAAAA;AAAA,GAAA;","names":["HTTPMethodEnum"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,45 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
- var container_error_exports = {};
21
- __export(container_error_exports, {
22
- ContainerError: () => ContainerError
23
- });
24
- module.exports = __toCommonJS(container_error_exports);
25
- class ContainerError extends Error {
26
- static {
27
- __name(this, "ContainerError");
28
- }
29
- path;
30
- moduleName;
31
- constructor(moduleName, path, message) {
32
- super(message || "Cannot load module: " + moduleName);
33
- this.name = "ContainerError";
34
- this.path = path;
35
- this.moduleName = moduleName;
36
- Object.setPrototypeOf(this, ContainerError.prototype);
37
- if (Error.captureStackTrace)
38
- Error.captureStackTrace(this, ContainerError);
39
- }
40
- }
41
- // Annotate the CommonJS export names for ESM import in node:
42
- 0 && (module.exports = {
43
- ContainerError
44
- });
45
- //# sourceMappingURL=container-error.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/container-error.ts"],"sourcesContent":["export class ContainerError extends Error {\r\n public readonly path: string;\r\n public readonly moduleName: string;\r\n\r\n constructor(moduleName: string, path: string, message?: string) {\r\n super(message || 'Cannot load module: ' + moduleName);\r\n this.name = 'ContainerError';\r\n this.path = path;\r\n this.moduleName = moduleName;\r\n\r\n Object.setPrototypeOf(this, ContainerError.prototype);\r\n\r\n if (Error.captureStackTrace)\r\n Error.captureStackTrace(this, ContainerError);\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,uBAAuB,MAAM;AAAA,EAA1C,OAA0C;AAAA;AAAA;AAAA,EACtB;AAAA,EACA;AAAA,EAEhB,YAAY,YAAoB,MAAc,SAAkB;AAC5D,UAAM,WAAW,yBAAyB,UAAU;AACpD,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,aAAa;AAElB,WAAO,eAAe,MAAM,eAAe,SAAS;AAEpD,QAAI,MAAM;AACN,YAAM,kBAAkB,MAAM,cAAc;AAAA,EACpD;AACJ;","names":[]}
@@ -1,7 +0,0 @@
1
- declare class ContainerError extends Error {
2
- readonly path: string;
3
- readonly moduleName: string;
4
- constructor(moduleName: string, path: string, message?: string);
5
- }
6
-
7
- export { ContainerError };
@@ -1,7 +0,0 @@
1
- declare class ContainerError extends Error {
2
- readonly path: string;
3
- readonly moduleName: string;
4
- constructor(moduleName: string, path: string, message?: string);
5
- }
6
-
7
- export { ContainerError };
@@ -1,22 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- class ContainerError extends Error {
4
- static {
5
- __name(this, "ContainerError");
6
- }
7
- path;
8
- moduleName;
9
- constructor(moduleName, path, message) {
10
- super(message || "Cannot load module: " + moduleName);
11
- this.name = "ContainerError";
12
- this.path = path;
13
- this.moduleName = moduleName;
14
- Object.setPrototypeOf(this, ContainerError.prototype);
15
- if (Error.captureStackTrace)
16
- Error.captureStackTrace(this, ContainerError);
17
- }
18
- }
19
- export {
20
- ContainerError
21
- };
22
- //# sourceMappingURL=container-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/container-error.ts"],"sourcesContent":["export class ContainerError extends Error {\r\n public readonly path: string;\r\n public readonly moduleName: string;\r\n\r\n constructor(moduleName: string, path: string, message?: string) {\r\n super(message || 'Cannot load module: ' + moduleName);\r\n this.name = 'ContainerError';\r\n this.path = path;\r\n this.moduleName = moduleName;\r\n\r\n Object.setPrototypeOf(this, ContainerError.prototype);\r\n\r\n if (Error.captureStackTrace)\r\n Error.captureStackTrace(this, ContainerError);\r\n }\r\n}\r\n"],"mappings":";;AAAO,MAAM,uBAAuB,MAAM;AAAA,EAA1C,OAA0C;AAAA;AAAA;AAAA,EACtB;AAAA,EACA;AAAA,EAEhB,YAAY,YAAoB,MAAc,SAAkB;AAC5D,UAAM,WAAW,yBAAyB,UAAU;AACpD,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,aAAa;AAElB,WAAO,eAAe,MAAM,eAAe,SAAS;AAEpD,QAAI,MAAM;AACN,YAAM,kBAAkB,MAAM,cAAc;AAAA,EACpD;AACJ;","names":[]}