@figliolia/galena 2.3.5 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +172 -476
  2. package/dist/Galena.cjs +102 -0
  3. package/dist/Galena.d.cts +80 -0
  4. package/dist/Galena.d.cts.map +1 -0
  5. package/dist/Galena.d.mts +80 -0
  6. package/dist/Galena.d.mts.map +1 -0
  7. package/dist/Galena.mjs +103 -0
  8. package/dist/Galena.mjs.map +1 -0
  9. package/dist/Logger.cjs +46 -0
  10. package/dist/Logger.d.cts +35 -0
  11. package/dist/Logger.d.cts.map +1 -0
  12. package/dist/Logger.d.mts +35 -0
  13. package/dist/Logger.d.mts.map +1 -0
  14. package/dist/Logger.mjs +48 -0
  15. package/dist/Logger.mjs.map +1 -0
  16. package/dist/Middleware.cjs +62 -0
  17. package/dist/Middleware.d.cts +65 -0
  18. package/dist/Middleware.d.cts.map +1 -0
  19. package/dist/Middleware.d.mts +65 -0
  20. package/dist/Middleware.d.mts.map +1 -0
  21. package/dist/Middleware.mjs +64 -0
  22. package/dist/Middleware.mjs.map +1 -0
  23. package/dist/Profiler.cjs +41 -0
  24. package/dist/Profiler.d.cts +31 -0
  25. package/dist/Profiler.d.cts.map +1 -0
  26. package/dist/Profiler.d.mts +31 -0
  27. package/dist/Profiler.d.mts.map +1 -0
  28. package/dist/Profiler.mjs +43 -0
  29. package/dist/Profiler.mjs.map +1 -0
  30. package/dist/State.cjs +147 -0
  31. package/dist/State.d.cts +114 -0
  32. package/dist/State.d.cts.map +1 -0
  33. package/dist/State.d.mts +114 -0
  34. package/dist/State.d.mts.map +1 -0
  35. package/dist/State.mjs +148 -0
  36. package/dist/State.mjs.map +1 -0
  37. package/dist/index.cjs +13 -0
  38. package/dist/index.d.cts +7 -0
  39. package/dist/index.d.mts +7 -0
  40. package/dist/index.mjs +6 -0
  41. package/dist/types.d.cts +16 -0
  42. package/dist/types.d.cts.map +1 -0
  43. package/dist/types.d.mts +16 -0
  44. package/dist/types.d.mts.map +1 -0
  45. package/media/Logging.png +0 -0
  46. package/media/Profiling.png +0 -0
  47. package/package.json +38 -59
  48. package/src/Galena.ts +120 -0
  49. package/src/{Middlewares/Logger.ts → Logger.ts} +15 -14
  50. package/src/Middleware.ts +62 -0
  51. package/src/Profiler.ts +53 -0
  52. package/src/State.ts +167 -0
  53. package/src/index.ts +6 -3
  54. package/src/types.ts +28 -0
  55. package/dist/cjs/Galena/Galena.js +0 -223
  56. package/dist/cjs/Galena/Guards.js +0 -40
  57. package/dist/cjs/Galena/Scheduler.js +0 -84
  58. package/dist/cjs/Galena/State.js +0 -314
  59. package/dist/cjs/Galena/index.js +0 -22
  60. package/dist/cjs/Galena/types.js +0 -9
  61. package/dist/cjs/Middleware/Middleware.js +0 -46
  62. package/dist/cjs/Middleware/index.js +0 -20
  63. package/dist/cjs/Middleware/types.js +0 -8
  64. package/dist/cjs/Middlewares/Logger.js +0 -51
  65. package/dist/cjs/Middlewares/Profiler.js +0 -38
  66. package/dist/cjs/Middlewares/index.js +0 -7
  67. package/dist/cjs/index.js +0 -19
  68. package/dist/cjs/package.json +0 -3
  69. package/dist/mjs/Galena/Galena.js +0 -218
  70. package/dist/mjs/Galena/Guards.js +0 -36
  71. package/dist/mjs/Galena/Scheduler.js +0 -79
  72. package/dist/mjs/Galena/State.js +0 -313
  73. package/dist/mjs/Galena/index.js +0 -3
  74. package/dist/mjs/Galena/types.js +0 -6
  75. package/dist/mjs/Middleware/Middleware.js +0 -42
  76. package/dist/mjs/Middleware/index.js +0 -2
  77. package/dist/mjs/Middleware/types.js +0 -5
  78. package/dist/mjs/Middlewares/Logger.js +0 -44
  79. package/dist/mjs/Middlewares/Profiler.js +0 -35
  80. package/dist/mjs/Middlewares/index.js +0 -2
  81. package/dist/mjs/index.js +0 -3
  82. package/dist/mjs/package.json +0 -4
  83. package/dist/types/Galena/Galena.d.ts +0 -160
  84. package/dist/types/Galena/Guards.d.ts +0 -29
  85. package/dist/types/Galena/Scheduler.d.ts +0 -51
  86. package/dist/types/Galena/State.d.ts +0 -235
  87. package/dist/types/Galena/index.d.ts +0 -3
  88. package/dist/types/Galena/types.d.ts +0 -13
  89. package/dist/types/Middleware/Middleware.d.ts +0 -43
  90. package/dist/types/Middleware/index.d.ts +0 -2
  91. package/dist/types/Middleware/types.d.ts +0 -4
  92. package/dist/types/Middlewares/Logger.d.ts +0 -27
  93. package/dist/types/Middlewares/Profiler.d.ts +0 -22
  94. package/dist/types/Middlewares/index.d.ts +0 -2
  95. package/dist/types/index.d.ts +0 -3
  96. package/src/Galena/Galena.ts +0 -252
  97. package/src/Galena/Guards.ts +0 -49
  98. package/src/Galena/Scheduler.ts +0 -85
  99. package/src/Galena/State.ts +0 -344
  100. package/src/Galena/index.ts +0 -3
  101. package/src/Galena/types.ts +0 -18
  102. package/src/Middleware/Middleware.ts +0 -45
  103. package/src/Middleware/index.ts +0 -2
  104. package/src/Middleware/types.ts +0 -4
  105. package/src/Middlewares/Profiler.ts +0 -41
  106. package/src/Middlewares/index.ts +0 -2
@@ -1,314 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.State = void 0;
4
- const event_emitter_1 = require("@figliolia/event-emitter");
5
- const types_1 = require("../Middleware/types");
6
- const Scheduler_1 = require("./Scheduler");
7
- const types_2 = require("./types");
8
- /**
9
- * ### State
10
- *
11
- * The root of all reactivity in Galena. State instances can
12
- * operate in isolation by calling `new State(...args)` or as
13
- * part of your application's larger global state by using
14
- * `new Galena().composeState()`.
15
- *
16
- * `State` instances operate on the premise of pub-sub and mutability.
17
- * This provides significant performance improvement over more traditional
18
- * state management tools because
19
- *
20
- * 1. Mutations can occur in O(1) space
21
- * 2. Mutations can be batched when dispatching updates to subscribers
22
- *
23
- * When deciding how many `State` instances are required for your
24
- * applications needs, we suggest creating and organizing state in
25
- * accordance with your application logic. Meaning, you might have a
26
- * `State` instance for navigation/routing, another `State` instance
27
- * for storing user information, and so on. Performance can improve
28
- * significantly when state is dispersed amongst multiple instances
29
- *
30
- * #### Creating State Instances
31
- *
32
- * ```typescript
33
- * const MyState = new State("MyState", {
34
- * someData: true,
35
- * listItems: [1, 2, 3, 4];
36
- * // ...etc
37
- * });
38
- * ```
39
- *
40
- * #### Updating State
41
- * ##### Synchronous updates
42
- * ```typescript
43
- * MyState.update((state) => {
44
- * state.listItems.push(5);
45
- * });
46
- * ```
47
- * ##### Asynchronous updates
48
- * ```typescript
49
- * MyState.update(async (state) => {
50
- * const listItems = await fetch("/list-items");
51
- * state.listItems = listItems;
52
- * });
53
- * ```
54
- *
55
- * #### Subscribing to State Changes
56
- * ```typescript
57
- * MyState.subscribe((state) => {
58
- * const { listItems } = state
59
- * // Do something with your list items!
60
- * });
61
- * ```
62
- */
63
- class State extends Scheduler_1.Scheduler {
64
- constructor(name, initialState) {
65
- super();
66
- this.middleware = [];
67
- this.emitter = new event_emitter_1.EventEmitter();
68
- /**
69
- * Update
70
- *
71
- * Mutates state and notifies any open subscriptions. This method
72
- * by default uses task batching for optimized performance. In almost
73
- * every use-case, this method is the correct way to mutate state. If
74
- * you need to bypass batching for higher-priority state updates, you
75
- * can use `State.priorityUpdate()` or `State.backgroundUpdate()`
76
- *
77
- * ##### Synchronous updates
78
- * ```typescript
79
- * MyState.update((state, initialState) => {
80
- * state.listItems.push(5);
81
- * });
82
- * ```
83
- * ##### Asynchronous updates
84
- * ```typescript
85
- * MyState.update(async (state, initialState) => {
86
- * const listItems = await fetch("/list-items");
87
- * state.listItems = listItems;
88
- * });
89
- * ```
90
- */
91
- this.update = this.mutation((func) => {
92
- return func(this.state, this.initialState);
93
- }, types_2.Priority.BATCHED);
94
- /**
95
- * Background Update
96
- *
97
- * Mutates state and notifies any open subscriptions. This method
98
- * bypasses Galena's internal task batching for a more immediate
99
- * state update and propagation of state to consumers. It utilizes
100
- * a micro-task that allows for the current call stack to clear
101
- * ahead of propagating state updates to consumers
102
- *
103
- * ##### Synchronous updates
104
- * ```typescript
105
- * MyState.backgroundUpdate((state, initialState) => {
106
- * state.listItems.push(5);
107
- * });
108
- * ```
109
- * ##### Asynchronous updates
110
- * ```typescript
111
- * MyState.backgroundUpdate(async (state, initialState) => {
112
- * const listItems = await fetch("/list-items");
113
- * state.listItems = listItems;
114
- * });
115
- * ```
116
- */
117
- this.backgroundUpdate = this.mutation((func) => {
118
- return func(this.state, this.initialState);
119
- }, types_2.Priority.MICROTASK);
120
- /**
121
- * Priority Update
122
- *
123
- * Mutates state and notifies any open subscriptions. This method
124
- * bypasses optimizations for task batching and scheduling. This means
125
- * that state updates made with this method propagate to subscriptions
126
- * as immediately as possible. Overusing this method can cause your
127
- * state updates to perform slower in certain cases. The usage of this
128
- * method should be conserved for state mutations that need to occur
129
- * at a certain frame rate
130
- *
131
- * ##### Synchronous updates
132
- * ```typescript
133
- * MyState.priorityUpdate((state, initialState) => {
134
- * state.listItems.push(5);
135
- * });
136
- * ```
137
- * ##### Asynchronous updates
138
- * ```typescript
139
- * MyState.priorityUpdate(async (state, initialState) => {
140
- * const listItems = await fetch("/list-items");
141
- * state.listItems = listItems;
142
- * });
143
- * ```
144
- */
145
- this.priorityUpdate = this.mutation((func) => {
146
- return func(this.state, this.initialState);
147
- }, types_2.Priority.IMMEDIATE);
148
- /**
149
- * Reset
150
- *
151
- * Resets the current state to its initial state
152
- */
153
- this.reset = this.mutation(() => {
154
- this.state = State.clone(this.initialState);
155
- });
156
- this.name = name;
157
- this.state = initialState;
158
- this.initialState = State.clone(initialState);
159
- }
160
- /**
161
- * Get State
162
- *
163
- * Returns a readonly snapshot of the current state
164
- */
165
- getState() {
166
- return this.state;
167
- }
168
- /**
169
- * Mutation
170
- *
171
- * This method can be used to wrap arbitrary functions that when invoked
172
- * will:
173
- * 1. Notify your subscriptions with the latest state
174
- * 2. Execute any registered middleware (such as loggers or profiling tools)
175
- *
176
- * Using this method, developers can compose and extend `Galena`'s internal
177
- * infrastructure for state mutations to create proprietary models for your
178
- * state
179
- *
180
- * ```typescript
181
- * import { State } from "@figliolia/galena";
182
- *
183
- * // Extend of Galena State
184
- * class MyState extends State {
185
- * addListItem = mutation((newListItem) => {
186
- * this.state.list.push(newListItem);
187
- * });
188
- * }
189
- *
190
- * // Create an instance
191
- * const myState = new MyState("myState", { list: [] });
192
- *
193
- * // Invoke your custom mutation method
194
- * myState.addListItem("new-item");
195
- * ```
196
- */
197
- mutation(func, priority = types_2.Priority.BATCHED) {
198
- return (...args) => {
199
- this.lifeCycleEvent(types_1.MiddlewareEvents.onBeforeUpdate);
200
- const returnValue = func(...args);
201
- if (returnValue instanceof Promise) {
202
- return returnValue.then(v => {
203
- this.scheduleUpdate(priority);
204
- return v;
205
- });
206
- }
207
- this.scheduleUpdate(priority);
208
- return returnValue;
209
- };
210
- }
211
- /**
212
- * Schedule Update
213
- *
214
- * Schedules an update to State subscribers and emits the
215
- * `onUpdate` lifecycle hook
216
- */
217
- scheduleUpdate(priority) {
218
- this.lifeCycleEvent(types_1.MiddlewareEvents.onUpdate);
219
- void this.scheduleTask(() => this.emitter.emit(this.name, this.state), priority);
220
- }
221
- /**
222
- * Register Middleware
223
- *
224
- * Caches a `Middleware` instance and invokes its
225
- * lifecycle subscriptions on all state transitions
226
- */
227
- registerMiddleware(...middleware) {
228
- this.middleware.push(...middleware);
229
- }
230
- /**
231
- * Subscribe
232
- *
233
- * Registers a subscription on the state instance. The
234
- * callback you provide will execute each time state changes.
235
- * Returns a unique identifier for your subscription
236
- */
237
- subscribe(callback) {
238
- return this.emitter.on(this.name, callback);
239
- }
240
- /**
241
- * Unsubscribe
242
- *
243
- * Given a subscription ID, removes a registered subscription
244
- * from the `State` instance
245
- */
246
- unsubscribe(ID) {
247
- return this.emitter.off(this.name, ID);
248
- }
249
- /**
250
- * Clear All Subscriptions
251
- *
252
- * Removes all open subscriptions to the `State` instance
253
- */
254
- clearAllSubscriptions() {
255
- return this.emitter.storage.clear();
256
- }
257
- /**
258
- * Life Cycle Event
259
- *
260
- * Triggers a life cycle event for each registered middleware
261
- */
262
- lifeCycleEvent(event) {
263
- const maxIndex = this.middleware.length - 1;
264
- for (let i = maxIndex; i > -1; i--) {
265
- this.middleware[i][event](this);
266
- }
267
- }
268
- /**
269
- * Clone
270
- *
271
- * `State` instances accept any value as a form of reactive
272
- * state. In order to maintain the initial state past any state
273
- * transitions, this method clones the initial values provided
274
- * to the `State` constructor and caches them to allow for
275
- * developers to easily reset their current state back to its
276
- * initial value
277
- */
278
- static clone(state) {
279
- switch (typeof state) {
280
- case "string":
281
- return String(state);
282
- case "bigint":
283
- return BigInt(state);
284
- case "boolean":
285
- return Boolean(state);
286
- case "number":
287
- return Number(state);
288
- case "symbol":
289
- case "function":
290
- return state;
291
- case "undefined":
292
- return undefined;
293
- case "object":
294
- default:
295
- if (!state) {
296
- return null;
297
- }
298
- if (Array.isArray(state)) {
299
- return [...state];
300
- }
301
- if (state instanceof Set) {
302
- return new Set(state);
303
- }
304
- if (state instanceof Map) {
305
- return new Map(state);
306
- }
307
- if (state && typeof state === "object") {
308
- return Object.assign({}, state);
309
- }
310
- return state;
311
- }
312
- }
313
- }
314
- exports.State = State;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.State = exports.Galena = void 0;
18
- var Galena_1 = require("./Galena");
19
- Object.defineProperty(exports, "Galena", { enumerable: true, get: function () { return Galena_1.Galena; } });
20
- var State_1 = require("./State");
21
- Object.defineProperty(exports, "State", { enumerable: true, get: function () { return State_1.State; } });
22
- __exportStar(require("./types"), exports);
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Priority = void 0;
4
- var Priority;
5
- (function (Priority) {
6
- Priority[Priority["IMMEDIATE"] = 1] = "IMMEDIATE";
7
- Priority[Priority["MICROTASK"] = 2] = "MICROTASK";
8
- Priority[Priority["BATCHED"] = 3] = "BATCHED";
9
- })(Priority || (exports.Priority = Priority = {}));
@@ -1,46 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Middleware = void 0;
4
- /**
5
- * # Middleware
6
- *
7
- * A root interface for all `Galena` Middleware. When creating
8
- * a middleware for your `Galena` state, simply extend this
9
- * class any override any of its public lifecycle methods.
10
- *
11
- * ### Creating a Profiling Middleware
12
- *
13
- * ```typescript
14
- * export class ProfilerMiddleware extends Middleware {
15
- * updateState: number | null = null;
16
- *
17
- * override onBeforeUpdate(state: State) {
18
- * this.updateStart = performance.now();
19
- * }
20
- *
21
- * override onUpdate(state: State) {
22
- * if(this.updateStart) {
23
- * const timeToUpdate = performance.now() - this.updateStart;
24
- * if(timeToUpdate > 16) {
25
- * console.warn("A state transition took more than 16 milliseconds!", State);
26
- * }
27
- * }
28
- * }
29
- * }
30
- * ```
31
- */
32
- class Middleware {
33
- /**
34
- * On Before Update
35
- *
36
- * An event emitted each time a `State` mutation is enqueued
37
- */
38
- onBeforeUpdate(_state) { }
39
- /**
40
- * On Update
41
- *
42
- * An event emitted each time a `State` instance is mutated
43
- */
44
- onUpdate(_state) { }
45
- }
46
- exports.Middleware = Middleware;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Middleware = void 0;
18
- var Middleware_1 = require("./Middleware");
19
- Object.defineProperty(exports, "Middleware", { enumerable: true, get: function () { return Middleware_1.Middleware; } });
20
- __exportStar(require("./types"), exports);
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MiddlewareEvents = void 0;
4
- var MiddlewareEvents;
5
- (function (MiddlewareEvents) {
6
- MiddlewareEvents["onUpdate"] = "onUpdate";
7
- MiddlewareEvents["onBeforeUpdate"] = "onBeforeUpdate";
8
- })(MiddlewareEvents || (exports.MiddlewareEvents = MiddlewareEvents = {}));
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Logger = void 0;
4
- const State_1 = require("../Galena/State");
5
- const Middleware_1 = require("../Middleware/Middleware");
6
- /**
7
- * Logger
8
- *
9
- * A middleware for Redux-style logging! Each state transition
10
- * will log to the console the `State` instance that changed
11
- * along with a before and after snapshot of the current state:
12
- *
13
- * ```typescript
14
- * const State = new Galena([new Logger()]);
15
- * // if using isolated state instances:
16
- * const MyState = new State(...args);
17
- * MyState.registerMiddleware(new Logger())
18
- * ```
19
- */
20
- class Logger extends Middleware_1.Middleware {
21
- constructor() {
22
- super(...arguments);
23
- this.previousState = null;
24
- }
25
- onBeforeUpdate(state) {
26
- this.previousState = State_1.State.clone(state.state);
27
- }
28
- onUpdate(state) {
29
- console.log("%cMutation:", "color: rgb(187, 186, 186); font-weight: bold", state.name, "@", this.time);
30
- console.log(" %cPrevious State", "color: #26ad65; font-weight: bold", this.previousState);
31
- console.log(" %cNext State ", "color: rgb(17, 118, 249); font-weight: bold", state.getState());
32
- this.previousState = null;
33
- }
34
- /**
35
- * Time
36
- *
37
- * Returns the time in which a given state transition completed
38
- */
39
- get time() {
40
- const date = new Date();
41
- const mHours = date.getHours();
42
- const hours = mHours > 12 ? mHours - 12 : mHours;
43
- const mins = date.getMinutes();
44
- const minutes = mins.toString().length === 1 ? `0${mins}` : mins;
45
- const secs = date.getSeconds();
46
- const seconds = secs.toString().length === 1 ? `0${secs}` : secs;
47
- const milliseconds = date.getMilliseconds();
48
- return `${hours}:${minutes}:${seconds}:${milliseconds}`;
49
- }
50
- }
51
- exports.Logger = Logger;
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Profiler = void 0;
4
- const Middleware_1 = require("../Middleware/Middleware");
5
- /**
6
- * Profiler
7
- *
8
- * A logger for state transitions exceeding a given threshold
9
- * for duration:
10
- *
11
- * ```typescript
12
- * const State = new Galena([new Profiler()]);
13
- * // if using isolated state instances:
14
- * const MyState = new State(...args);
15
- * MyState.registerMiddleware(new Profiler())
16
- * ```
17
- */
18
- class Profiler extends Middleware_1.Middleware {
19
- constructor(threshold = 16) {
20
- super();
21
- this.startTime = null;
22
- this.threshold = threshold;
23
- }
24
- onBeforeUpdate(_) {
25
- this.startTime = performance.now();
26
- }
27
- onUpdate(nextState) {
28
- if (this.startTime) {
29
- const endTime = performance.now();
30
- const diff = endTime - this.startTime;
31
- if (diff > this.threshold) {
32
- console.warn(`A slow state transition was detected on ${nextState.name}`, nextState.getState());
33
- console.warn(`The last transition took ${diff}ms`);
34
- }
35
- }
36
- }
37
- }
38
- exports.Profiler = Profiler;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Profiler = exports.Logger = void 0;
4
- var Logger_1 = require("./Logger");
5
- Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return Logger_1.Logger; } });
6
- var Profiler_1 = require("./Profiler");
7
- Object.defineProperty(exports, "Profiler", { enumerable: true, get: function () { return Profiler_1.Profiler; } });
package/dist/cjs/index.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Galena"), exports);
18
- __exportStar(require("./Middleware"), exports);
19
- __exportStar(require("./Middlewares"), exports);
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }