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