@geekmidas/constructs 3.0.14 → 3.1.0

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 (126) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/AWSScheduledFunction-B3cHQSdp.cjs +255 -0
  3. package/dist/AWSScheduledFunction-B3cHQSdp.cjs.map +1 -0
  4. package/dist/AWSScheduledFunction-BRGjgD-i.mjs +243 -0
  5. package/dist/AWSScheduledFunction-BRGjgD-i.mjs.map +1 -0
  6. package/dist/AWSScheduledFunction-BnYDnzsF.d.mts +117 -0
  7. package/dist/AWSScheduledFunction-BnYDnzsF.d.mts.map +1 -0
  8. package/dist/AWSScheduledFunction-vjanLO3-.d.cts +117 -0
  9. package/dist/AWSScheduledFunction-vjanLO3-.d.cts.map +1 -0
  10. package/dist/{Construct-D0n7QTaI.d.mts → Construct-BY0NBQLj.d.mts} +1 -1
  11. package/dist/{Construct-D0n7QTaI.d.mts.map → Construct-BY0NBQLj.d.mts.map} +1 -1
  12. package/dist/{Construct-CdJY2DJS.mjs → Construct-CLIPPqUP.mjs} +3 -28
  13. package/dist/{Construct-CdJY2DJS.mjs.map → Construct-CLIPPqUP.mjs.map} +1 -1
  14. package/dist/{Construct-CXqvzglu.d.cts → Construct-cjIs74Gb.d.cts} +1 -1
  15. package/dist/{Construct-CXqvzglu.d.cts.map → Construct-cjIs74Gb.d.cts.map} +1 -1
  16. package/dist/{Endpoint-NvjIednd.d.mts → Endpoint-4gVYt12g.d.mts} +5 -5
  17. package/dist/{Endpoint-NvjIednd.d.mts.map → Endpoint-4gVYt12g.d.mts.map} +1 -1
  18. package/dist/{Endpoint-CE7qHX5S.d.cts → Endpoint-BlMZIwBY.d.cts} +4 -4
  19. package/dist/{Endpoint-CE7qHX5S.d.cts.map → Endpoint-BlMZIwBY.d.cts.map} +1 -1
  20. package/dist/{HonoEndpointAdaptor-DyYv0IoU.mjs → HonoEndpointAdaptor-6k-rI44C.mjs} +5 -4
  21. package/dist/{HonoEndpointAdaptor-DyYv0IoU.mjs.map → HonoEndpointAdaptor-6k-rI44C.mjs.map} +1 -1
  22. package/dist/{HonoEndpointAdaptor-DFdgCwYU.cjs → HonoEndpointAdaptor-CNIsjEw-.cjs} +6 -5
  23. package/dist/{HonoEndpointAdaptor-DFdgCwYU.cjs.map → HonoEndpointAdaptor-CNIsjEw-.cjs.map} +1 -1
  24. package/dist/{Subscriber-D8WkA8np.d.cts → Subscriber-C6YXAmTp.d.cts} +3 -3
  25. package/dist/{Subscriber-D8WkA8np.d.cts.map → Subscriber-C6YXAmTp.d.cts.map} +1 -1
  26. package/dist/{Subscriber-Tft61-YG.d.mts → Subscriber-CjOHxO0l.d.mts} +3 -3
  27. package/dist/{Subscriber-Tft61-YG.d.mts.map → Subscriber-CjOHxO0l.d.mts.map} +1 -1
  28. package/dist/adaptors/aws.cjs +12 -209
  29. package/dist/adaptors/aws.cjs.map +1 -1
  30. package/dist/adaptors/aws.d.cts +11 -66
  31. package/dist/adaptors/aws.d.cts.map +1 -1
  32. package/dist/adaptors/aws.d.mts +11 -66
  33. package/dist/adaptors/aws.d.mts.map +1 -1
  34. package/dist/adaptors/aws.mjs +11 -208
  35. package/dist/adaptors/aws.mjs.map +1 -1
  36. package/dist/adaptors/hono.cjs +6 -4
  37. package/dist/adaptors/hono.d.cts +4 -4
  38. package/dist/adaptors/hono.d.mts +4 -4
  39. package/dist/adaptors/hono.mjs +7 -5
  40. package/dist/adaptors/middy.cjs +120 -0
  41. package/dist/adaptors/middy.cjs.map +1 -0
  42. package/dist/adaptors/middy.d.cts +139 -0
  43. package/dist/adaptors/middy.d.cts.map +1 -0
  44. package/dist/adaptors/middy.d.mts +139 -0
  45. package/dist/adaptors/middy.d.mts.map +1 -0
  46. package/dist/adaptors/middy.mjs +118 -0
  47. package/dist/adaptors/middy.mjs.map +1 -0
  48. package/dist/adaptors/testing.cjs +9 -7
  49. package/dist/adaptors/testing.cjs.map +1 -1
  50. package/dist/adaptors/testing.d.cts +6 -6
  51. package/dist/adaptors/testing.d.mts +6 -6
  52. package/dist/adaptors/testing.mjs +7 -5
  53. package/dist/adaptors/testing.mjs.map +1 -1
  54. package/dist/chunk-B4qE4VCv.mjs +27 -0
  55. package/dist/crons/index.cjs +4 -1
  56. package/dist/crons/index.cjs.map +1 -1
  57. package/dist/crons/index.d.cts +6 -22
  58. package/dist/crons/index.d.cts.map +1 -1
  59. package/dist/crons/index.d.mts +5 -21
  60. package/dist/crons/index.d.mts.map +1 -1
  61. package/dist/crons/index.mjs +6 -3
  62. package/dist/crons/index.mjs.map +1 -1
  63. package/dist/endpoints/index.cjs +5 -3
  64. package/dist/endpoints/index.cjs.map +1 -1
  65. package/dist/endpoints/index.d.cts +7 -7
  66. package/dist/endpoints/index.d.mts +5 -5
  67. package/dist/endpoints/index.mjs +6 -3
  68. package/dist/endpoints/index.mjs.map +1 -1
  69. package/dist/functions/index.cjs +1 -1
  70. package/dist/functions/index.d.cts +2 -2
  71. package/dist/functions/index.d.mts +2 -2
  72. package/dist/functions/index.mjs +2 -2
  73. package/dist/{functions-GmSHFbpr.mjs → functions-BMR-1CIQ.mjs} +1639 -1638
  74. package/dist/functions-BMR-1CIQ.mjs.map +1 -0
  75. package/dist/{functions-CX21wstW.cjs → functions-_OAiwGYh.cjs} +1637 -1637
  76. package/dist/functions-_OAiwGYh.cjs.map +1 -0
  77. package/dist/{index-CzIMpK-e.d.cts → index-Dj3uvqCO.d.cts} +39 -38
  78. package/dist/index-Dj3uvqCO.d.cts.map +1 -0
  79. package/dist/{index-Cq4fz8uM.d.mts → index-DoiHTgUQ.d.mts} +35 -34
  80. package/dist/index-DoiHTgUQ.d.mts.map +1 -0
  81. package/dist/index.d.cts +3 -3
  82. package/dist/index.d.mts +3 -3
  83. package/dist/index.mjs +1 -1
  84. package/dist/{lazyAccessors-zNy6P6Cg.cjs → lazyAccessors-B4rtX68K.cjs} +6 -889
  85. package/dist/lazyAccessors-B4rtX68K.cjs.map +1 -0
  86. package/dist/{lazyAccessors-5h-aWohM.mjs → lazyAccessors-D-UHg0YJ.mjs} +9 -873
  87. package/dist/lazyAccessors-D-UHg0YJ.mjs.map +1 -0
  88. package/dist/lodash-CM4k4sZD.cjs +836 -0
  89. package/dist/lodash-CM4k4sZD.cjs.map +1 -0
  90. package/dist/lodash-DiUeLbQy.mjs +831 -0
  91. package/dist/lodash-DiUeLbQy.mjs.map +1 -0
  92. package/dist/{processAudits-B0PbJf1Z.mjs → processAudits-BEiSkgH3.mjs} +1 -1
  93. package/dist/{processAudits-B0PbJf1Z.mjs.map → processAudits-BEiSkgH3.mjs.map} +1 -1
  94. package/dist/{processAudits-B_a9bDPs.cjs → processAudits-CPcACKCA.cjs} +1 -1
  95. package/dist/{processAudits-B_a9bDPs.cjs.map → processAudits-CPcACKCA.cjs.map} +1 -1
  96. package/dist/publisher-BZgcrVPy.cjs +53 -0
  97. package/dist/publisher-BZgcrVPy.cjs.map +1 -0
  98. package/dist/publisher-CnpeMv-r.mjs +41 -0
  99. package/dist/publisher-CnpeMv-r.mjs.map +1 -0
  100. package/dist/subscribers/index.d.cts +2 -2
  101. package/dist/subscribers/index.d.mts +2 -2
  102. package/dist/subscribers/index.mjs +1 -1
  103. package/dist/{telemetry-COvVBKBM.d.mts → telemetry-Bp4DLvdQ.d.mts} +1 -1
  104. package/dist/{telemetry-Bt0vK4ma.d.cts.map → telemetry-Bp4DLvdQ.d.mts.map} +1 -1
  105. package/dist/{telemetry-Bt0vK4ma.d.cts → telemetry-Dqx-D3F7.d.cts} +1 -1
  106. package/dist/{telemetry-COvVBKBM.d.mts.map → telemetry-Dqx-D3F7.d.cts.map} +1 -1
  107. package/dist/{types-B8YlI4cx.d.cts → types-BdAaYDvd.d.cts} +1 -1
  108. package/dist/{types-B8YlI4cx.d.cts.map → types-BdAaYDvd.d.cts.map} +1 -1
  109. package/dist/{types-BA3eK4xj.d.mts → types-j0ti0JTY.d.mts} +1 -1
  110. package/dist/{types-BA3eK4xj.d.mts.map → types-j0ti0JTY.d.mts.map} +1 -1
  111. package/dist/types.d.cts +1 -1
  112. package/dist/types.d.mts +1 -1
  113. package/package.json +21 -11
  114. package/src/adaptors/__tests__/middy.spec.ts +212 -0
  115. package/src/adaptors/aws.ts +1 -0
  116. package/src/adaptors/middy.ts +225 -0
  117. package/src/crons/AWSScheduledFunction.ts +72 -0
  118. package/src/crons/__tests__/AWSScheduledFunction.spec.ts +152 -0
  119. package/src/crons/index.ts +1 -0
  120. package/tsdown.config.ts +1 -0
  121. package/dist/functions-CX21wstW.cjs.map +0 -1
  122. package/dist/functions-GmSHFbpr.mjs.map +0 -1
  123. package/dist/index-Cq4fz8uM.d.mts.map +0 -1
  124. package/dist/index-CzIMpK-e.d.cts.map +0 -1
  125. package/dist/lazyAccessors-5h-aWohM.mjs.map +0 -1
  126. package/dist/lazyAccessors-zNy6P6Cg.cjs.map +0 -1
@@ -1,838 +1,13 @@
1
- import { ConstructType, __commonJS, __toESM } from "./Construct-CdJY2DJS.mjs";
2
- import { Function as Function$1 } from "./functions-GmSHFbpr.mjs";
1
+ import { __commonJS, __toESM } from "./chunk-B4qE4VCv.mjs";
2
+ import { ConstructType } from "./Construct-CLIPPqUP.mjs";
3
+ import { Function as Function$1 } from "./functions-BMR-1CIQ.mjs";
4
+ import { require_lodash } from "./lodash-DiUeLbQy.mjs";
3
5
  import { convertSchemaWithComponents, convertStandardSchemaToJsonSchema } from "@geekmidas/schema/conversion";
4
6
  import { buildOpenApiSchema } from "@geekmidas/schema/openapi";
5
7
  import { getCookie } from "hono/cookie";
6
8
 
7
- //#region ../../node_modules/.pnpm/lodash.set@4.3.2/node_modules/lodash.set/index.js
8
- var require_lodash$1 = __commonJS({ "../../node_modules/.pnpm/lodash.set@4.3.2/node_modules/lodash.set/index.js"(exports, module) {
9
- /**
10
- * lodash (Custom Build) <https://lodash.com/>
11
- * Build: `lodash modularize exports="npm" -o ./`
12
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
13
- * Released under MIT license <https://lodash.com/license>
14
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
15
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
16
- */
17
- /** Used as the `TypeError` message for "Functions" methods. */
18
- var FUNC_ERROR_TEXT = "Expected a function";
19
- /** Used to stand-in for `undefined` hash values. */
20
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
21
- /** Used as references for various `Number` constants. */
22
- var INFINITY$1 = Infinity, MAX_SAFE_INTEGER$1 = 9007199254740991;
23
- /** `Object#toString` result references. */
24
- var funcTag$1 = "[object Function]", genTag$1 = "[object GeneratorFunction]", symbolTag$1 = "[object Symbol]";
25
- /** Used to match property names within property paths. */
26
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
27
- /**
28
- * Used to match `RegExp`
29
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
30
- */
31
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
32
- /** Used to match backslashes in property paths. */
33
- var reEscapeChar = /\\(\\)?/g;
34
- /** Used to detect host constructors (Safari). */
35
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
36
- /** Used to detect unsigned integer values. */
37
- var reIsUint = /^(?:0|[1-9]\d*)$/;
38
- /** Detect free variable `global` from Node.js. */
39
- var freeGlobal$1 = typeof global == "object" && global && global.Object === Object && global;
40
- /** Detect free variable `self`. */
41
- var freeSelf$1 = typeof self == "object" && self && self.Object === Object && self;
42
- /** Used as a reference to the global object. */
43
- var root$1 = freeGlobal$1 || freeSelf$1 || Function("return this")();
44
- /**
45
- * Gets the value at `key` of `object`.
46
- *
47
- * @private
48
- * @param {Object} [object] The object to query.
49
- * @param {string} key The key of the property to get.
50
- * @returns {*} Returns the property value.
51
- */
52
- function getValue(object, key) {
53
- return object == null ? void 0 : object[key];
54
- }
55
- /**
56
- * Checks if `value` is a host object in IE < 9.
57
- *
58
- * @private
59
- * @param {*} value The value to check.
60
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
61
- */
62
- function isHostObject(value) {
63
- var result = false;
64
- if (value != null && typeof value.toString != "function") try {
65
- result = !!(value + "");
66
- } catch (e) {}
67
- return result;
68
- }
69
- /** Used for built-in method references. */
70
- var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto$1 = Object.prototype;
71
- /** Used to detect overreaching core-js shims. */
72
- var coreJsData = root$1["__core-js_shared__"];
73
- /** Used to detect methods masquerading as native. */
74
- var maskSrcKey = function() {
75
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
76
- return uid ? "Symbol(src)_1." + uid : "";
77
- }();
78
- /** Used to resolve the decompiled source of functions. */
79
- var funcToString = funcProto.toString;
80
- /** Used to check objects for own properties. */
81
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
82
- /**
83
- * Used to resolve the
84
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
85
- * of values.
86
- */
87
- var objectToString$1 = objectProto$1.toString;
88
- /** Used to detect if a method is native. */
89
- var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$1).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
90
- /** Built-in value references. */
91
- var Symbol$1 = root$1.Symbol, splice = arrayProto.splice;
92
- var Map$1 = getNative(root$1, "Map"), nativeCreate = getNative(Object, "create");
93
- /** Used to convert symbols to primitives and strings. */
94
- var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
95
- /**
96
- * Creates a hash object.
97
- *
98
- * @private
99
- * @constructor
100
- * @param {Array} [entries] The key-value pairs to cache.
101
- */
102
- function Hash(entries) {
103
- var index = -1, length = entries ? entries.length : 0;
104
- this.clear();
105
- while (++index < length) {
106
- var entry = entries[index];
107
- this.set(entry[0], entry[1]);
108
- }
109
- }
110
- /**
111
- * Removes all key-value entries from the hash.
112
- *
113
- * @private
114
- * @name clear
115
- * @memberOf Hash
116
- */
117
- function hashClear() {
118
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
119
- }
120
- /**
121
- * Removes `key` and its value from the hash.
122
- *
123
- * @private
124
- * @name delete
125
- * @memberOf Hash
126
- * @param {Object} hash The hash to modify.
127
- * @param {string} key The key of the value to remove.
128
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
129
- */
130
- function hashDelete(key) {
131
- return this.has(key) && delete this.__data__[key];
132
- }
133
- /**
134
- * Gets the hash value for `key`.
135
- *
136
- * @private
137
- * @name get
138
- * @memberOf Hash
139
- * @param {string} key The key of the value to get.
140
- * @returns {*} Returns the entry value.
141
- */
142
- function hashGet(key) {
143
- var data = this.__data__;
144
- if (nativeCreate) {
145
- var result = data[key];
146
- return result === HASH_UNDEFINED ? void 0 : result;
147
- }
148
- return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
149
- }
150
- /**
151
- * Checks if a hash value for `key` exists.
152
- *
153
- * @private
154
- * @name has
155
- * @memberOf Hash
156
- * @param {string} key The key of the entry to check.
157
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
158
- */
159
- function hashHas(key) {
160
- var data = this.__data__;
161
- return nativeCreate ? data[key] !== void 0 : hasOwnProperty$1.call(data, key);
162
- }
163
- /**
164
- * Sets the hash `key` to `value`.
165
- *
166
- * @private
167
- * @name set
168
- * @memberOf Hash
169
- * @param {string} key The key of the value to set.
170
- * @param {*} value The value to set.
171
- * @returns {Object} Returns the hash instance.
172
- */
173
- function hashSet(key, value) {
174
- var data = this.__data__;
175
- data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
176
- return this;
177
- }
178
- Hash.prototype.clear = hashClear;
179
- Hash.prototype["delete"] = hashDelete;
180
- Hash.prototype.get = hashGet;
181
- Hash.prototype.has = hashHas;
182
- Hash.prototype.set = hashSet;
183
- /**
184
- * Creates an list cache object.
185
- *
186
- * @private
187
- * @constructor
188
- * @param {Array} [entries] The key-value pairs to cache.
189
- */
190
- function ListCache(entries) {
191
- var index = -1, length = entries ? entries.length : 0;
192
- this.clear();
193
- while (++index < length) {
194
- var entry = entries[index];
195
- this.set(entry[0], entry[1]);
196
- }
197
- }
198
- /**
199
- * Removes all key-value entries from the list cache.
200
- *
201
- * @private
202
- * @name clear
203
- * @memberOf ListCache
204
- */
205
- function listCacheClear() {
206
- this.__data__ = [];
207
- }
208
- /**
209
- * Removes `key` and its value from the list cache.
210
- *
211
- * @private
212
- * @name delete
213
- * @memberOf ListCache
214
- * @param {string} key The key of the value to remove.
215
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
216
- */
217
- function listCacheDelete(key) {
218
- var data = this.__data__, index = assocIndexOf(data, key);
219
- if (index < 0) return false;
220
- var lastIndex = data.length - 1;
221
- if (index == lastIndex) data.pop();
222
- else splice.call(data, index, 1);
223
- return true;
224
- }
225
- /**
226
- * Gets the list cache value for `key`.
227
- *
228
- * @private
229
- * @name get
230
- * @memberOf ListCache
231
- * @param {string} key The key of the value to get.
232
- * @returns {*} Returns the entry value.
233
- */
234
- function listCacheGet(key) {
235
- var data = this.__data__, index = assocIndexOf(data, key);
236
- return index < 0 ? void 0 : data[index][1];
237
- }
238
- /**
239
- * Checks if a list cache value for `key` exists.
240
- *
241
- * @private
242
- * @name has
243
- * @memberOf ListCache
244
- * @param {string} key The key of the entry to check.
245
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
246
- */
247
- function listCacheHas(key) {
248
- return assocIndexOf(this.__data__, key) > -1;
249
- }
250
- /**
251
- * Sets the list cache `key` to `value`.
252
- *
253
- * @private
254
- * @name set
255
- * @memberOf ListCache
256
- * @param {string} key The key of the value to set.
257
- * @param {*} value The value to set.
258
- * @returns {Object} Returns the list cache instance.
259
- */
260
- function listCacheSet(key, value) {
261
- var data = this.__data__, index = assocIndexOf(data, key);
262
- if (index < 0) data.push([key, value]);
263
- else data[index][1] = value;
264
- return this;
265
- }
266
- ListCache.prototype.clear = listCacheClear;
267
- ListCache.prototype["delete"] = listCacheDelete;
268
- ListCache.prototype.get = listCacheGet;
269
- ListCache.prototype.has = listCacheHas;
270
- ListCache.prototype.set = listCacheSet;
271
- /**
272
- * Creates a map cache object to store key-value pairs.
273
- *
274
- * @private
275
- * @constructor
276
- * @param {Array} [entries] The key-value pairs to cache.
277
- */
278
- function MapCache(entries) {
279
- var index = -1, length = entries ? entries.length : 0;
280
- this.clear();
281
- while (++index < length) {
282
- var entry = entries[index];
283
- this.set(entry[0], entry[1]);
284
- }
285
- }
286
- /**
287
- * Removes all key-value entries from the map.
288
- *
289
- * @private
290
- * @name clear
291
- * @memberOf MapCache
292
- */
293
- function mapCacheClear() {
294
- this.__data__ = {
295
- "hash": new Hash(),
296
- "map": new (Map$1 || ListCache)(),
297
- "string": new Hash()
298
- };
299
- }
300
- /**
301
- * Removes `key` and its value from the map.
302
- *
303
- * @private
304
- * @name delete
305
- * @memberOf MapCache
306
- * @param {string} key The key of the value to remove.
307
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
308
- */
309
- function mapCacheDelete(key) {
310
- return getMapData(this, key)["delete"](key);
311
- }
312
- /**
313
- * Gets the map value for `key`.
314
- *
315
- * @private
316
- * @name get
317
- * @memberOf MapCache
318
- * @param {string} key The key of the value to get.
319
- * @returns {*} Returns the entry value.
320
- */
321
- function mapCacheGet(key) {
322
- return getMapData(this, key).get(key);
323
- }
324
- /**
325
- * Checks if a map value for `key` exists.
326
- *
327
- * @private
328
- * @name has
329
- * @memberOf MapCache
330
- * @param {string} key The key of the entry to check.
331
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
332
- */
333
- function mapCacheHas(key) {
334
- return getMapData(this, key).has(key);
335
- }
336
- /**
337
- * Sets the map `key` to `value`.
338
- *
339
- * @private
340
- * @name set
341
- * @memberOf MapCache
342
- * @param {string} key The key of the value to set.
343
- * @param {*} value The value to set.
344
- * @returns {Object} Returns the map cache instance.
345
- */
346
- function mapCacheSet(key, value) {
347
- getMapData(this, key).set(key, value);
348
- return this;
349
- }
350
- MapCache.prototype.clear = mapCacheClear;
351
- MapCache.prototype["delete"] = mapCacheDelete;
352
- MapCache.prototype.get = mapCacheGet;
353
- MapCache.prototype.has = mapCacheHas;
354
- MapCache.prototype.set = mapCacheSet;
355
- /**
356
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
357
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
358
- * for equality comparisons.
359
- *
360
- * @private
361
- * @param {Object} object The object to modify.
362
- * @param {string} key The key of the property to assign.
363
- * @param {*} value The value to assign.
364
- */
365
- function assignValue(object, key, value) {
366
- var objValue = object[key];
367
- if (!(hasOwnProperty$1.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
368
- }
369
- /**
370
- * Gets the index at which the `key` is found in `array` of key-value pairs.
371
- *
372
- * @private
373
- * @param {Array} array The array to inspect.
374
- * @param {*} key The key to search for.
375
- * @returns {number} Returns the index of the matched value, else `-1`.
376
- */
377
- function assocIndexOf(array, key) {
378
- var length = array.length;
379
- while (length--) if (eq(array[length][0], key)) return length;
380
- return -1;
381
- }
382
- /**
383
- * The base implementation of `_.isNative` without bad shim checks.
384
- *
385
- * @private
386
- * @param {*} value The value to check.
387
- * @returns {boolean} Returns `true` if `value` is a native function,
388
- * else `false`.
389
- */
390
- function baseIsNative(value) {
391
- if (!isObject$1(value) || isMasked(value)) return false;
392
- var pattern = isFunction$1(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
393
- return pattern.test(toSource(value));
394
- }
395
- /**
396
- * The base implementation of `_.set`.
397
- *
398
- * @private
399
- * @param {Object} object The object to modify.
400
- * @param {Array|string} path The path of the property to set.
401
- * @param {*} value The value to set.
402
- * @param {Function} [customizer] The function to customize path creation.
403
- * @returns {Object} Returns `object`.
404
- */
405
- function baseSet(object, path, value, customizer) {
406
- if (!isObject$1(object)) return object;
407
- path = isKey(path, object) ? [path] : castPath(path);
408
- var index = -1, length = path.length, lastIndex = length - 1, nested = object;
409
- while (nested != null && ++index < length) {
410
- var key = toKey$1(path[index]), newValue = value;
411
- if (index != lastIndex) {
412
- var objValue = nested[key];
413
- newValue = customizer ? customizer(objValue, key, nested) : void 0;
414
- if (newValue === void 0) newValue = isObject$1(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
415
- }
416
- assignValue(nested, key, newValue);
417
- nested = nested[key];
418
- }
419
- return object;
420
- }
421
- /**
422
- * The base implementation of `_.toString` which doesn't convert nullish
423
- * values to empty strings.
424
- *
425
- * @private
426
- * @param {*} value The value to process.
427
- * @returns {string} Returns the string.
428
- */
429
- function baseToString(value) {
430
- if (typeof value == "string") return value;
431
- if (isSymbol$1(value)) return symbolToString ? symbolToString.call(value) : "";
432
- var result = value + "";
433
- return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
434
- }
435
- /**
436
- * Casts `value` to a path array if it's not one.
437
- *
438
- * @private
439
- * @param {*} value The value to inspect.
440
- * @returns {Array} Returns the cast property path array.
441
- */
442
- function castPath(value) {
443
- return isArray$1(value) ? value : stringToPath(value);
444
- }
445
- /**
446
- * Gets the data for `map`.
447
- *
448
- * @private
449
- * @param {Object} map The map to query.
450
- * @param {string} key The reference key.
451
- * @returns {*} Returns the map data.
452
- */
453
- function getMapData(map, key) {
454
- var data = map.__data__;
455
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
456
- }
457
- /**
458
- * Gets the native function at `key` of `object`.
459
- *
460
- * @private
461
- * @param {Object} object The object to query.
462
- * @param {string} key The key of the method to get.
463
- * @returns {*} Returns the function if it's native, else `undefined`.
464
- */
465
- function getNative(object, key) {
466
- var value = getValue(object, key);
467
- return baseIsNative(value) ? value : void 0;
468
- }
469
- /**
470
- * Checks if `value` is a valid array-like index.
471
- *
472
- * @private
473
- * @param {*} value The value to check.
474
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
475
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
476
- */
477
- function isIndex(value, length) {
478
- length = length == null ? MAX_SAFE_INTEGER$1 : length;
479
- return !!length && (typeof value == "number" || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
480
- }
481
- /**
482
- * Checks if `value` is a property name and not a property path.
483
- *
484
- * @private
485
- * @param {*} value The value to check.
486
- * @param {Object} [object] The object to query keys on.
487
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
488
- */
489
- function isKey(value, object) {
490
- if (isArray$1(value)) return false;
491
- var type = typeof value;
492
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol$1(value)) return true;
493
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
494
- }
495
- /**
496
- * Checks if `value` is suitable for use as unique object key.
497
- *
498
- * @private
499
- * @param {*} value The value to check.
500
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
501
- */
502
- function isKeyable(value) {
503
- var type = typeof value;
504
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
505
- }
506
- /**
507
- * Checks if `func` has its source masked.
508
- *
509
- * @private
510
- * @param {Function} func The function to check.
511
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
512
- */
513
- function isMasked(func) {
514
- return !!maskSrcKey && maskSrcKey in func;
515
- }
516
- /**
517
- * Converts `string` to a property path array.
518
- *
519
- * @private
520
- * @param {string} string The string to convert.
521
- * @returns {Array} Returns the property path array.
522
- */
523
- var stringToPath = memoize(function(string) {
524
- string = toString(string);
525
- var result = [];
526
- if (reLeadingDot.test(string)) result.push("");
527
- string.replace(rePropName, function(match, number, quote, string$1) {
528
- result.push(quote ? string$1.replace(reEscapeChar, "$1") : number || match);
529
- });
530
- return result;
531
- });
532
- /**
533
- * Converts `value` to a string key if it's not a string or symbol.
534
- *
535
- * @private
536
- * @param {*} value The value to inspect.
537
- * @returns {string|symbol} Returns the key.
538
- */
539
- function toKey$1(value) {
540
- if (typeof value == "string" || isSymbol$1(value)) return value;
541
- var result = value + "";
542
- return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
543
- }
544
- /**
545
- * Converts `func` to its source code.
546
- *
547
- * @private
548
- * @param {Function} func The function to process.
549
- * @returns {string} Returns the source code.
550
- */
551
- function toSource(func) {
552
- if (func != null) {
553
- try {
554
- return funcToString.call(func);
555
- } catch (e) {}
556
- try {
557
- return func + "";
558
- } catch (e) {}
559
- }
560
- return "";
561
- }
562
- /**
563
- * Creates a function that memoizes the result of `func`. If `resolver` is
564
- * provided, it determines the cache key for storing the result based on the
565
- * arguments provided to the memoized function. By default, the first argument
566
- * provided to the memoized function is used as the map cache key. The `func`
567
- * is invoked with the `this` binding of the memoized function.
568
- *
569
- * **Note:** The cache is exposed as the `cache` property on the memoized
570
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
571
- * constructor with one whose instances implement the
572
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
573
- * method interface of `delete`, `get`, `has`, and `set`.
574
- *
575
- * @static
576
- * @memberOf _
577
- * @since 0.1.0
578
- * @category Function
579
- * @param {Function} func The function to have its output memoized.
580
- * @param {Function} [resolver] The function to resolve the cache key.
581
- * @returns {Function} Returns the new memoized function.
582
- * @example
583
- *
584
- * var object = { 'a': 1, 'b': 2 };
585
- * var other = { 'c': 3, 'd': 4 };
586
- *
587
- * var values = _.memoize(_.values);
588
- * values(object);
589
- * // => [1, 2]
590
- *
591
- * values(other);
592
- * // => [3, 4]
593
- *
594
- * object.a = 2;
595
- * values(object);
596
- * // => [1, 2]
597
- *
598
- * // Modify the result cache.
599
- * values.cache.set(object, ['a', 'b']);
600
- * values(object);
601
- * // => ['a', 'b']
602
- *
603
- * // Replace `_.memoize.Cache`.
604
- * _.memoize.Cache = WeakMap;
605
- */
606
- function memoize(func, resolver) {
607
- if (typeof func != "function" || resolver && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT);
608
- var memoized = function() {
609
- var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
610
- if (cache.has(key)) return cache.get(key);
611
- var result = func.apply(this, args);
612
- memoized.cache = cache.set(key, result);
613
- return result;
614
- };
615
- memoized.cache = new (memoize.Cache || MapCache)();
616
- return memoized;
617
- }
618
- memoize.Cache = MapCache;
619
- /**
620
- * Performs a
621
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
622
- * comparison between two values to determine if they are equivalent.
623
- *
624
- * @static
625
- * @memberOf _
626
- * @since 4.0.0
627
- * @category Lang
628
- * @param {*} value The value to compare.
629
- * @param {*} other The other value to compare.
630
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
631
- * @example
632
- *
633
- * var object = { 'a': 1 };
634
- * var other = { 'a': 1 };
635
- *
636
- * _.eq(object, object);
637
- * // => true
638
- *
639
- * _.eq(object, other);
640
- * // => false
641
- *
642
- * _.eq('a', 'a');
643
- * // => true
644
- *
645
- * _.eq('a', Object('a'));
646
- * // => false
647
- *
648
- * _.eq(NaN, NaN);
649
- * // => true
650
- */
651
- function eq(value, other) {
652
- return value === other || value !== value && other !== other;
653
- }
654
- /**
655
- * Checks if `value` is classified as an `Array` object.
656
- *
657
- * @static
658
- * @memberOf _
659
- * @since 0.1.0
660
- * @category Lang
661
- * @param {*} value The value to check.
662
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
663
- * @example
664
- *
665
- * _.isArray([1, 2, 3]);
666
- * // => true
667
- *
668
- * _.isArray(document.body.children);
669
- * // => false
670
- *
671
- * _.isArray('abc');
672
- * // => false
673
- *
674
- * _.isArray(_.noop);
675
- * // => false
676
- */
677
- var isArray$1 = Array.isArray;
678
- /**
679
- * Checks if `value` is classified as a `Function` object.
680
- *
681
- * @static
682
- * @memberOf _
683
- * @since 0.1.0
684
- * @category Lang
685
- * @param {*} value The value to check.
686
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
687
- * @example
688
- *
689
- * _.isFunction(_);
690
- * // => true
691
- *
692
- * _.isFunction(/abc/);
693
- * // => false
694
- */
695
- function isFunction$1(value) {
696
- var tag = isObject$1(value) ? objectToString$1.call(value) : "";
697
- return tag == funcTag$1 || tag == genTag$1;
698
- }
699
- /**
700
- * Checks if `value` is the
701
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
702
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
703
- *
704
- * @static
705
- * @memberOf _
706
- * @since 0.1.0
707
- * @category Lang
708
- * @param {*} value The value to check.
709
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
710
- * @example
711
- *
712
- * _.isObject({});
713
- * // => true
714
- *
715
- * _.isObject([1, 2, 3]);
716
- * // => true
717
- *
718
- * _.isObject(_.noop);
719
- * // => true
720
- *
721
- * _.isObject(null);
722
- * // => false
723
- */
724
- function isObject$1(value) {
725
- var type = typeof value;
726
- return !!value && (type == "object" || type == "function");
727
- }
728
- /**
729
- * Checks if `value` is object-like. A value is object-like if it's not `null`
730
- * and has a `typeof` result of "object".
731
- *
732
- * @static
733
- * @memberOf _
734
- * @since 4.0.0
735
- * @category Lang
736
- * @param {*} value The value to check.
737
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
738
- * @example
739
- *
740
- * _.isObjectLike({});
741
- * // => true
742
- *
743
- * _.isObjectLike([1, 2, 3]);
744
- * // => true
745
- *
746
- * _.isObjectLike(_.noop);
747
- * // => false
748
- *
749
- * _.isObjectLike(null);
750
- * // => false
751
- */
752
- function isObjectLike$1(value) {
753
- return !!value && typeof value == "object";
754
- }
755
- /**
756
- * Checks if `value` is classified as a `Symbol` primitive or object.
757
- *
758
- * @static
759
- * @memberOf _
760
- * @since 4.0.0
761
- * @category Lang
762
- * @param {*} value The value to check.
763
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
764
- * @example
765
- *
766
- * _.isSymbol(Symbol.iterator);
767
- * // => true
768
- *
769
- * _.isSymbol('abc');
770
- * // => false
771
- */
772
- function isSymbol$1(value) {
773
- return typeof value == "symbol" || isObjectLike$1(value) && objectToString$1.call(value) == symbolTag$1;
774
- }
775
- /**
776
- * Converts `value` to a string. An empty string is returned for `null`
777
- * and `undefined` values. The sign of `-0` is preserved.
778
- *
779
- * @static
780
- * @memberOf _
781
- * @since 4.0.0
782
- * @category Lang
783
- * @param {*} value The value to process.
784
- * @returns {string} Returns the string.
785
- * @example
786
- *
787
- * _.toString(null);
788
- * // => ''
789
- *
790
- * _.toString(-0);
791
- * // => '-0'
792
- *
793
- * _.toString([1, 2, 3]);
794
- * // => '1,2,3'
795
- */
796
- function toString(value) {
797
- return value == null ? "" : baseToString(value);
798
- }
799
- /**
800
- * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
801
- * it's created. Arrays are created for missing index properties while objects
802
- * are created for all other missing properties. Use `_.setWith` to customize
803
- * `path` creation.
804
- *
805
- * **Note:** This method mutates `object`.
806
- *
807
- * @static
808
- * @memberOf _
809
- * @since 3.7.0
810
- * @category Object
811
- * @param {Object} object The object to modify.
812
- * @param {Array|string} path The path of the property to set.
813
- * @param {*} value The value to set.
814
- * @returns {Object} Returns `object`.
815
- * @example
816
- *
817
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
818
- *
819
- * _.set(object, 'a[0].b.c', 4);
820
- * console.log(object.a[0].b.c);
821
- * // => 4
822
- *
823
- * _.set(object, ['x', '0', 'y', 'z'], 5);
824
- * console.log(object.x[0].y.z);
825
- * // => 5
826
- */
827
- function set$1(object, path, value) {
828
- return object == null ? object : baseSet(object, path, value);
829
- }
830
- module.exports = set$1;
831
- } });
832
-
833
- //#endregion
834
9
  //#region ../../node_modules/.pnpm/lodash.pick@4.4.0/node_modules/lodash.pick/index.js
835
- var require_lodash = __commonJS({ "../../node_modules/.pnpm/lodash.pick@4.4.0/node_modules/lodash.pick/index.js"(exports, module) {
10
+ var require_lodash$2 = __commonJS({ "../../node_modules/.pnpm/lodash.pick@4.4.0/node_modules/lodash.pick/index.js"(exports, module) {
836
11
  /**
837
12
  * lodash (Custom Build) <https://lodash.com/>
838
13
  * Build: `lodash modularize exports="npm" -o ./`
@@ -1259,8 +434,8 @@ var require_lodash = __commonJS({ "../../node_modules/.pnpm/lodash.pick@4.4.0/no
1259
434
 
1260
435
  //#endregion
1261
436
  //#region src/endpoints/Endpoint.ts
1262
- var import_lodash = __toESM(require_lodash(), 1);
1263
- var import_lodash$1 = __toESM(require_lodash$1(), 1);
437
+ var import_lodash = __toESM(require_lodash$2(), 1);
438
+ var import_lodash$1 = __toESM(require_lodash(), 1);
1264
439
  /**
1265
440
  * Represents an HTTP endpoint that can handle requests with type-safe input/output validation,
1266
441
  * dependency injection, session management, and authorization.
@@ -1679,45 +854,6 @@ let SuccessStatus = /* @__PURE__ */ function(SuccessStatus$1) {
1679
854
  return SuccessStatus$1;
1680
855
  }({});
1681
856
 
1682
- //#endregion
1683
- //#region src/publisher.ts
1684
- async function publishEvents(logger, serviceDiscovery, ev = [], response, publisherService) {
1685
- try {
1686
- if (!ev?.length) {
1687
- logger.debug("No events to publish");
1688
- return;
1689
- }
1690
- if (!publisherService) {
1691
- logger.warn("No publisher service available");
1692
- return;
1693
- }
1694
- const services = await serviceDiscovery.register([publisherService]);
1695
- const publisher = services[publisherService.serviceName];
1696
- const events = [];
1697
- for (const { when, payload, type,...e } of ev) {
1698
- logger.debug({ event: type }, "Processing event");
1699
- const resolvedPayload = await payload(response);
1700
- const event = {
1701
- ...e,
1702
- type,
1703
- payload: resolvedPayload
1704
- };
1705
- if (!when || when(response)) events.push(event);
1706
- }
1707
- if (events.length) {
1708
- logger.debug({ eventCount: ev.length }, "Publishing events");
1709
- await publisher.publish(events).catch((err) => {
1710
- logger.error(err, "Failed to publish events");
1711
- });
1712
- }
1713
- } catch (error) {
1714
- logger.error(error, "Something went wrong publishing events");
1715
- }
1716
- }
1717
- async function publishConstructEvents(construct, response, serviceDiscovery, logger = construct.logger) {
1718
- return publishEvents(logger, serviceDiscovery, construct.events, response, construct.publisherService);
1719
- }
1720
-
1721
857
  //#endregion
1722
858
  //#region src/endpoints/lazyAccessors.ts
1723
859
  /**
@@ -1890,5 +1026,5 @@ function createNoopCookies() {
1890
1026
  }
1891
1027
 
1892
1028
  //#endregion
1893
- export { Endpoint, ResponseBuilder, createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders, publishConstructEvents, publishEvents, require_lodash$1 as require_lodash };
1894
- //# sourceMappingURL=lazyAccessors-5h-aWohM.mjs.map
1029
+ export { Endpoint, ResponseBuilder, createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders };
1030
+ //# sourceMappingURL=lazyAccessors-D-UHg0YJ.mjs.map