ag-common 0.0.727 → 0.0.729

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 (160) hide show
  1. package/dist/api/helpers/api.js +0 -6
  2. package/dist/api/helpers/dynamo.d.ts +2 -1
  3. package/dist/api/helpers/dynamo.js +13 -14
  4. package/dist/api/helpers/enforceDynamoProvisionCap.js +0 -1
  5. package/dist/api/helpers/openApiHelpers.js +1 -2
  6. package/dist/api/helpers/s3.d.ts +0 -1
  7. package/dist/api/helpers/s3.js +11 -11
  8. package/dist/api/helpers/ses.d.ts +1 -1
  9. package/dist/api/helpers/sts.js +2 -2
  10. package/dist/api/helpers/validateOpenApi.js +1 -4
  11. package/dist/api/helpers/validations.js +3 -5
  12. package/dist/api/index.d.ts +1 -1
  13. package/dist/api/index.js +0 -1
  14. package/dist/api/openapi-postfix.js +0 -3
  15. package/dist/api/openapi-prefix.js +0 -6
  16. package/dist/api/types/index.d.ts +1 -1
  17. package/dist/api/types/index.js +0 -15
  18. package/dist/common/helpers/array.d.ts +1 -1
  19. package/dist/common/helpers/array.js +3 -4
  20. package/dist/common/helpers/async.js +2 -3
  21. package/dist/common/helpers/binary.d.ts +3 -4
  22. package/dist/common/helpers/binary.js +4 -4
  23. package/dist/common/helpers/csv.js +1 -3
  24. package/dist/common/helpers/date.js +0 -1
  25. package/dist/common/helpers/func.js +1 -2
  26. package/dist/common/helpers/generator.js +1 -3
  27. package/dist/common/helpers/groupBy.js +3 -4
  28. package/dist/common/helpers/hashCode.js +0 -1
  29. package/dist/common/helpers/log.js +0 -2
  30. package/dist/common/helpers/math.js +6 -8
  31. package/dist/common/helpers/memo.js +1 -4
  32. package/dist/common/helpers/object.js +9 -14
  33. package/dist/common/helpers/random.js +3 -3
  34. package/dist/common/helpers/stream.js +3 -3
  35. package/dist/common/helpers/string/contains.js +3 -3
  36. package/dist/common/helpers/string/json.js +0 -1
  37. package/dist/common/helpers/string/object.js +1 -2
  38. package/dist/common/helpers/string/redact.js +3 -3
  39. package/dist/common/helpers/string/trim.js +2 -3
  40. package/dist/common/helpers/string/truncate.js +1 -2
  41. package/dist/common/helpers/string/url.js +3 -2
  42. package/dist/common/helpers/xml.js +0 -1
  43. package/dist/node/helpers/fetch.js +2 -2
  44. package/dist/node/helpers/fs.js +2 -3
  45. package/dist/ui/components/Accordion/index.js +17 -7
  46. package/dist/ui/components/BarChart/index.d.ts +1 -1
  47. package/dist/ui/components/BarChart/index.js +0 -1
  48. package/dist/ui/components/Button/index.d.ts +2 -3
  49. package/dist/ui/components/Button/index.js +1 -4
  50. package/dist/ui/components/Confirm/Dialog.js +1 -0
  51. package/dist/ui/components/Confirm/index.d.ts +1 -1
  52. package/dist/ui/components/Confirm/index.js +0 -1
  53. package/dist/ui/components/DarkMode/Base.d.ts +3 -4
  54. package/dist/ui/components/DarkMode/Base.js +18 -7
  55. package/dist/ui/components/DropdownList/Base.d.ts +2 -2
  56. package/dist/ui/components/DropdownList/Base.js +19 -10
  57. package/dist/ui/components/DropdownList/Dialog.d.ts +1 -1
  58. package/dist/ui/components/DropdownList/Dialog.js +2 -0
  59. package/dist/ui/components/DropdownList/types.d.ts +1 -1
  60. package/dist/ui/components/HorizontalScrollBar/index.js +18 -7
  61. package/dist/ui/components/Icon/index.d.ts +2 -2
  62. package/dist/ui/components/Image/index.js +17 -7
  63. package/dist/ui/components/InfiniteScroll/index.js +17 -8
  64. package/dist/ui/components/LineChart/index.d.ts +1 -1
  65. package/dist/ui/components/LineChart/index.js +0 -1
  66. package/dist/ui/components/Loader/index.js +17 -7
  67. package/dist/ui/components/Markdown/index.d.ts +2 -2
  68. package/dist/ui/components/MinSidebar/index.js +17 -7
  69. package/dist/ui/components/Modal/Dialog.js +1 -0
  70. package/dist/ui/components/Modal/Modal.d.ts +2 -2
  71. package/dist/ui/components/Modal/Modal.js +18 -7
  72. package/dist/ui/components/Modal/index.d.ts +1 -1
  73. package/dist/ui/components/Modal/index.js +0 -1
  74. package/dist/ui/components/OpenApiCodeBlock/curl/helpers/body.d.ts +1 -1
  75. package/dist/ui/components/OpenApiCodeBlock/curl/helpers/security.d.ts +1 -1
  76. package/dist/ui/components/OpenApiCodeBlock/curl/index.d.ts +2 -2
  77. package/dist/ui/components/OpenApiCodeBlock/fetch/helpers/call.d.ts +1 -1
  78. package/dist/ui/components/OpenApiCodeBlock/fetch/helpers/req.d.ts +1 -1
  79. package/dist/ui/components/OpenApiCodeBlock/helpers/common.d.ts +4 -5
  80. package/dist/ui/components/OpenApiCodeBlock/helpers/common.js +0 -1
  81. package/dist/ui/components/OpenApiCodeBlock/helpers/joinJsx.d.ts +1 -1
  82. package/dist/ui/components/OpenApiCodeBlock/index.d.ts +1 -1
  83. package/dist/ui/components/OpenApiCodeBlock/index.js +0 -1
  84. package/dist/ui/components/OpenApiCodeBlock/types.d.ts +1 -1
  85. package/dist/ui/components/ProgressBar/index.js +17 -7
  86. package/dist/ui/components/Prompt/Modal.js +18 -7
  87. package/dist/ui/components/Prompt/index.d.ts +1 -1
  88. package/dist/ui/components/Prompt/index.js +0 -1
  89. package/dist/ui/components/RadioGroup/index.d.ts +2 -2
  90. package/dist/ui/components/RadioGroup/index.js +17 -8
  91. package/dist/ui/components/Search/AutoHideSearchBox.js +17 -7
  92. package/dist/ui/components/Search/Dialog.js +1 -0
  93. package/dist/ui/components/Search/Inline.js +17 -8
  94. package/dist/ui/components/Search/SearchBox.d.ts +1 -1
  95. package/dist/ui/components/Search/SearchBox.js +17 -7
  96. package/dist/ui/components/Search/index.d.ts +1 -1
  97. package/dist/ui/components/Search/index.js +0 -1
  98. package/dist/ui/components/Search/types.d.ts +2 -2
  99. package/dist/ui/components/Sidebar/index.js +17 -7
  100. package/dist/ui/components/TabBar/index.d.ts +2 -2
  101. package/dist/ui/components/TabBar/index.js +17 -7
  102. package/dist/ui/components/Table/index.d.ts +2 -2
  103. package/dist/ui/components/TextEdit/CheckboxEdit.js +17 -7
  104. package/dist/ui/components/TextEdit/ColourEdit.js +17 -7
  105. package/dist/ui/components/TextEdit/ListboxEdit.js +20 -18
  106. package/dist/ui/components/TextEdit/TextEdit.d.ts +2 -2
  107. package/dist/ui/components/TextEdit/TextEdit.js +20 -18
  108. package/dist/ui/components/TextEdit/common.d.ts +6 -7
  109. package/dist/ui/components/TextEdit/index.d.ts +1 -1
  110. package/dist/ui/components/TextEdit/index.js +0 -1
  111. package/dist/ui/components/TextEdit/types.d.ts +1 -0
  112. package/dist/ui/components/TextWithButton/index.js +17 -7
  113. package/dist/ui/components/Toast/base.js +18 -7
  114. package/dist/ui/components/Toast/index.d.ts +1 -1
  115. package/dist/ui/components/Toast/index.js +0 -1
  116. package/dist/ui/components/Toast/types.d.ts +1 -1
  117. package/dist/ui/components/TreeChart/base.js +17 -7
  118. package/dist/ui/components/TreeChart/index.d.ts +1 -1
  119. package/dist/ui/components/TreeChart/index.js +0 -1
  120. package/dist/ui/components/UserImage/index.js +17 -7
  121. package/dist/ui/helpers/axiosHelper.d.ts +1 -1
  122. package/dist/ui/helpers/axiosHelper.js +0 -2
  123. package/dist/ui/helpers/callOpenApi/direct.js +2 -7
  124. package/dist/ui/helpers/callOpenApi/helpers.js +1 -2
  125. package/dist/ui/helpers/callOpenApi/hook.d.ts +0 -1
  126. package/dist/ui/helpers/callOpenApi/index.d.ts +1 -1
  127. package/dist/ui/helpers/callOpenApi/index.js +0 -1
  128. package/dist/ui/helpers/cookie/get.js +3 -3
  129. package/dist/ui/helpers/cookie/raw.js +4 -4
  130. package/dist/ui/helpers/cookie/set.js +2 -2
  131. package/dist/ui/helpers/cookie/use.js +2 -2
  132. package/dist/ui/helpers/debounce.js +2 -3
  133. package/dist/ui/helpers/dom.js +0 -2
  134. package/dist/ui/helpers/extractAttributes.js +0 -1
  135. package/dist/ui/helpers/index.d.ts +2 -2
  136. package/dist/ui/helpers/index.js +0 -2
  137. package/dist/ui/helpers/plural.js +1 -2
  138. package/dist/ui/helpers/routes.d.ts +2 -2
  139. package/dist/ui/helpers/serviceWorker.js +1 -2
  140. package/dist/ui/helpers/useContextMenu.d.ts +1 -1
  141. package/dist/ui/helpers/useContextMenu.js +2 -3
  142. package/dist/ui/helpers/useElementAttribute.js +3 -2
  143. package/dist/ui/helpers/useGranularHook.js +1 -1
  144. package/dist/ui/helpers/useInterval.js +2 -2
  145. package/dist/ui/helpers/useIsInViewport.js +1 -2
  146. package/dist/ui/helpers/useLocalStorage.js +2 -2
  147. package/dist/ui/helpers/useLockBodyScroll.js +1 -2
  148. package/dist/ui/helpers/useOnClickOutside.d.ts +1 -1
  149. package/dist/ui/helpers/useOnClickOutside.js +3 -3
  150. package/dist/ui/helpers/useOnScroll.js +6 -7
  151. package/dist/ui/helpers/useOverloadPageSearch.js +2 -0
  152. package/dist/ui/helpers/useQueryString.js +1 -1
  153. package/dist/ui/helpers/useResize.js +2 -2
  154. package/dist/ui/helpers/useTimeout.js +1 -2
  155. package/dist/ui/helpers/useTooltip.d.ts +1 -0
  156. package/dist/ui/helpers/useTooltip.js +18 -7
  157. package/dist/ui/icons/index.d.ts +27 -28
  158. package/dist/ui/styles/common.d.ts +2 -2
  159. package/dist/ui/styles/standaloneStyles.d.ts +12 -13
  160. package/package.json +36 -33
@@ -12,8 +12,6 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.generateDynamoPKS = exports.stripPKs = exports.returnCode = void 0;
15
- /* eslint-disable @typescript-eslint/ban-ts-comment */
16
- // eslint-disable-next-line
17
15
  const array_1 = require("../../common/helpers/array");
18
16
  const returnCode = (statusCode, body, extraHeaders, fullSiteUrl) => {
19
17
  let headers = {
@@ -28,7 +26,6 @@ const returnCode = (statusCode, body, extraHeaders, fullSiteUrl) => {
28
26
  return {
29
27
  headers,
30
28
  statusCode,
31
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
29
  body: (!body ? undefined : JSON.stringify(body, null, 2)),
33
30
  };
34
31
  };
@@ -39,10 +36,8 @@ exports.returnCode = returnCode;
39
36
  * @param keepPk if true, will keep PK. default true
40
37
  * @returns stripped record
41
38
  */
42
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
43
39
  const stripPKs = (record, keepPk = true) => {
44
40
  if (!record) {
45
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
46
41
  return null;
47
42
  }
48
43
  // @ts-ignore
@@ -52,7 +47,6 @@ const stripPKs = (record, keepPk = true) => {
52
47
  //@ts-ignore
53
48
  rest.PK = PK;
54
49
  }
55
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
56
50
  // @ts-ignore
57
51
  return rest;
58
52
  };
@@ -27,6 +27,7 @@ interface ScanOptions {
27
27
  */
28
28
  filter?: DynamoFilter;
29
29
  requiredAttributeList?: string[];
30
+ indexName?: string;
30
31
  }
31
32
  interface DynamoQueryParams {
32
33
  tableName: string;
@@ -87,6 +88,6 @@ export declare const getDynamoUpdates: <T extends Record<string, unknown>>(item:
87
88
  UpdateExpression: string;
88
89
  ExpressionAttributeNames: Record<string, string>;
89
90
  ExpressionAttributeValues: Record<string, unknown>;
90
- ReturnValues: 'UPDATED_NEW';
91
+ ReturnValues: "UPDATED_NEW";
91
92
  };
92
93
  export {};
@@ -12,7 +12,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __
12
12
  var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
13
13
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
14
14
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
15
- return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
15
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
16
16
  function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
17
17
  function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
18
18
  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
@@ -22,7 +22,8 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _ar
22
22
  function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.getDynamoUpdates = exports.wipeTable = exports.getDynamoTtlMinutes = exports.getDynamoTtlDays = exports.queryDynamo = exports.getItemDynamo = exports.getItemsDynamo = exports.scanWithGenerator = exports.scan = exports.batchDelete = exports.batchWrite = exports.putDynamo = exports.setDynamo = exports.dynamoDb = void 0;
25
+ exports.getDynamoUpdates = exports.wipeTable = exports.getDynamoTtlMinutes = exports.getDynamoTtlDays = exports.queryDynamo = exports.getItemDynamo = exports.getItemsDynamo = exports.scan = exports.batchDelete = exports.batchWrite = exports.putDynamo = exports.setDynamo = exports.dynamoDb = void 0;
26
+ exports.scanWithGenerator = scanWithGenerator;
26
27
  const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
27
28
  const lib_dynamodb_1 = require("@aws-sdk/lib-dynamodb");
28
29
  const array_1 = require("../../common/helpers/array");
@@ -131,7 +132,7 @@ const scan = (tableName, options) => __awaiter(void 0, void 0, void 0, function*
131
132
  }, {});
132
133
  const expressionAttributeNames = Object.assign(Object.assign({}, projectionAttrs), (_b = options === null || options === void 0 ? void 0 : options.filter) === null || _b === void 0 ? void 0 : _b.attrNames);
133
134
  do {
134
- const params = new lib_dynamodb_1.ScanCommand(Object.assign(Object.assign(Object.assign(Object.assign({ TableName: tableName }, ((options === null || options === void 0 ? void 0 : options.filter) && Object.assign({ FilterExpression: options.filter.filterExpression }, (options.filter.attrValues && {
135
+ const params = new lib_dynamodb_1.ScanCommand(Object.assign(Object.assign(Object.assign(Object.assign({ TableName: tableName, IndexName: options === null || options === void 0 ? void 0 : options.indexName }, ((options === null || options === void 0 ? void 0 : options.filter) && Object.assign({ FilterExpression: options.filter.filterExpression }, (options.filter.attrValues && {
135
136
  ExpressionAttributeValues: options.filter.attrValues,
136
137
  })))), (Object.keys(expressionAttributeNames).length > 0 && {
137
138
  ExpressionAttributeNames: expressionAttributeNames,
@@ -166,7 +167,7 @@ function scanWithGenerator(tableName, options) {
166
167
  }, {});
167
168
  const expressionAttributeNames = Object.assign(Object.assign({}, projectionAttrs), (_c = options === null || options === void 0 ? void 0 : options.filter) === null || _c === void 0 ? void 0 : _c.attrNames);
168
169
  do {
169
- const params = new lib_dynamodb_1.ScanCommand(Object.assign(Object.assign(Object.assign(Object.assign({ TableName: tableName, Limit: BATCH_SIZE }, ((options === null || options === void 0 ? void 0 : options.filter) && Object.assign({ FilterExpression: options.filter.filterExpression }, (options.filter.attrValues && {
170
+ const params = new lib_dynamodb_1.ScanCommand(Object.assign(Object.assign(Object.assign(Object.assign({ TableName: tableName, IndexName: options === null || options === void 0 ? void 0 : options.indexName, Limit: BATCH_SIZE }, ((options === null || options === void 0 ? void 0 : options.filter) && Object.assign({ FilterExpression: options.filter.filterExpression }, (options.filter.attrValues && {
170
171
  ExpressionAttributeValues: options.filter.attrValues,
171
172
  })))), (Object.keys(expressionAttributeNames).length > 0 && {
172
173
  ExpressionAttributeNames: expressionAttributeNames,
@@ -197,9 +198,8 @@ function scanWithGenerator(tableName, options) {
197
198
  }
198
199
  });
199
200
  }
200
- exports.scanWithGenerator = scanWithGenerator;
201
201
  const getItemsDynamo = (params) => __awaiter(void 0, void 0, void 0, function* () {
202
- var _c, _d;
202
+ var _a, _b;
203
203
  try {
204
204
  const command = new lib_dynamodb_1.BatchGetCommand({
205
205
  RequestItems: {
@@ -212,7 +212,7 @@ const getItemsDynamo = (params) => __awaiter(void 0, void 0, void 0, function* (
212
212
  });
213
213
  const result = yield withRetry(() => exports.dynamoDb.send(command), 'getItemsDynamo');
214
214
  return {
215
- data: (_d = (_c = result.Responses) === null || _c === void 0 ? void 0 : _c[params.tableName]) !== null && _d !== void 0 ? _d : [],
215
+ data: (_b = (_a = result.Responses) === null || _a === void 0 ? void 0 : _a[params.tableName]) !== null && _b !== void 0 ? _b : [],
216
216
  };
217
217
  }
218
218
  catch (e) {
@@ -232,9 +232,9 @@ const getItemDynamo = (params) => __awaiter(void 0, void 0, void 0, function* ()
232
232
  });
233
233
  exports.getItemDynamo = getItemDynamo;
234
234
  const queryDynamo = (params) => __awaiter(void 0, void 0, void 0, function* () {
235
- var _e, _f, _g;
235
+ var _a, _b, _c;
236
236
  try {
237
- let kce = `#${params.pkName.toLowerCase()} ${(_e = params.pkOperator) !== null && _e !== void 0 ? _e : '='} :${params.pkName.toLowerCase()}`;
237
+ let kce = `#${params.pkName.toLowerCase()} ${(_a = params.pkOperator) !== null && _a !== void 0 ? _a : '='} :${params.pkName.toLowerCase()}`;
238
238
  const ean = {
239
239
  [`#${params.pkName.toLowerCase()}`]: params.pkName,
240
240
  };
@@ -268,7 +268,7 @@ const queryDynamo = (params) => __awaiter(void 0, void 0, void 0, function* () {
268
268
  FilterExpression =
269
269
  params.filterOperator === 'contains'
270
270
  ? `contains(#${params.filterName.toLowerCase()}, :${params.filterName.toLowerCase()})`
271
- : `#${params.filterName.toLowerCase()} ${(_f = params.filterOperator) !== null && _f !== void 0 ? _f : '='} :${params.filterName.toLowerCase()}`;
271
+ : `#${params.filterName.toLowerCase()} ${(_b = params.filterOperator) !== null && _b !== void 0 ? _b : '='} :${params.filterName.toLowerCase()}`;
272
272
  }
273
273
  const items = [];
274
274
  let { startKey } = params;
@@ -278,7 +278,7 @@ const queryDynamo = (params) => __awaiter(void 0, void 0, void 0, function* () {
278
278
  KeyConditionExpression: kce,
279
279
  ExpressionAttributeNames: ean,
280
280
  ExpressionAttributeValues: eav,
281
- ScanIndexForward: (_g = params.sortAscending) !== null && _g !== void 0 ? _g : true,
281
+ ScanIndexForward: (_c = params.sortAscending) !== null && _c !== void 0 ? _c : true,
282
282
  Limit: params.limit,
283
283
  IndexName: params.indexName,
284
284
  ExclusiveStartKey: startKey,
@@ -308,14 +308,13 @@ exports.getDynamoTtlDays = getDynamoTtlDays;
308
308
  const getDynamoTtlMinutes = (minutes) => Math.ceil(Date.now() / 1000) + minutes * 60;
309
309
  exports.getDynamoTtlMinutes = getDynamoTtlMinutes;
310
310
  const wipeTable = (tableName) => __awaiter(void 0, void 0, void 0, function* () {
311
- var _h, _j, _k;
311
+ var _a, _b, _c;
312
312
  try {
313
313
  const info = yield withRetry(() => exports.dynamoDb.send(new client_dynamodb_1.DescribeTableCommand({ TableName: tableName })), 'wipeTable-describe');
314
- const keyHash = (_k = (_j = (_h = info.Table) === null || _h === void 0 ? void 0 : _h.KeySchema) === null || _j === void 0 ? void 0 : _j.find((k) => k.KeyType === 'HASH')) === null || _k === void 0 ? void 0 : _k.AttributeName;
314
+ const keyHash = (_c = (_b = (_a = info.Table) === null || _a === void 0 ? void 0 : _a.KeySchema) === null || _b === void 0 ? void 0 : _b.find((k) => k.KeyType === 'HASH')) === null || _c === void 0 ? void 0 : _c.AttributeName;
315
315
  if (!keyHash) {
316
316
  throw new Error('Could not find hash key');
317
317
  }
318
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
319
318
  const scanResult = yield (0, exports.scan)(tableName);
320
319
  if (isError(scanResult)) {
321
320
  throw new Error(scanResult.error);
@@ -16,7 +16,6 @@ const enforceDynamoProvisionCap = ({ tables, readsMax = 25, writesMax = 25, must
16
16
  (0, log_1.warn)('error in dynamo FT enforce');
17
17
  return;
18
18
  }
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
19
  const t = tables[0];
21
20
  const s = (0, json_1.safeStringify)(t.node._children.Resource.node.scope);
22
21
  const reads = extractSum({ str: s, regex: /readCapacityUnits.*/gim });
@@ -4,7 +4,6 @@ exports.openApiImpl = void 0;
4
4
  const aws_cdk_lib_1 = require("aws-cdk-lib");
5
5
  const array_1 = require("../../common/helpers/array");
6
6
  const log_1 = require("../../common/helpers/log");
7
- // eslint-disable-next-line
8
7
  const getPaths = (schema) => Object.entries(schema.paths).map(([fullPath, verbs]) => ({
9
8
  fullPath,
10
9
  pathList: fullPath.split('/').filter((s) => s),
@@ -152,7 +151,7 @@ const openApiImpl = (p) => {
152
151
  });
153
152
  });
154
153
  Object.keys(lambdaConfig).forEach((k) => {
155
- if (!seenPermissions[k] || seenPermissions[k] === false) {
154
+ if (!seenPermissions[k]) {
156
155
  (0, log_1.warn)(`unused permissions for '${k}', did you mean one of these paths?=`, Object.entries(seenPermissions)
157
156
  .filter(([, b]) => !b)
158
157
  .map(([f]) => f)
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { S3Client } from '@aws-sdk/client-s3';
3
2
  import type { StreamingBlobPayloadOutputTypes } from '@smithy/types';
4
3
  import type { Buffer } from 'buffer';
@@ -12,7 +12,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __
12
12
  var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
13
13
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
14
14
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
15
- return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
15
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
16
16
  function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
17
17
  function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
18
18
  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
@@ -22,7 +22,10 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _ar
22
22
  function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.getPresignedPostURL = exports.listFiles = exports.copyFile = exports.deleteFiles = exports.deleteFile = exports.putS3Object = exports.getS3Objects = exports.getS3Object = exports.s3 = exports.setS3 = void 0;
25
+ exports.copyFile = exports.deleteFiles = exports.deleteFile = exports.putS3Object = exports.getS3Object = exports.s3 = exports.setS3 = void 0;
26
+ exports.getS3Objects = getS3Objects;
27
+ exports.listFiles = listFiles;
28
+ exports.getPresignedPostURL = getPresignedPostURL;
26
29
  const client_s3_1 = require("@aws-sdk/client-s3");
27
30
  const s3_presigned_post_1 = require("@aws-sdk/s3-presigned-post");
28
31
  const array_1 = require("../../common/helpers/array");
@@ -73,8 +76,7 @@ function getS3Objects(_a) {
73
76
  }
74
77
  });
75
78
  }
76
- exports.getS3Objects = getS3Objects;
77
- const putS3Object = (_b) => __awaiter(void 0, [_b], void 0, function* ({ Body, Bucket, Key, ContentType, CacheControl = 'public, max-age=300', }) {
79
+ const putS3Object = (_a) => __awaiter(void 0, [_a], void 0, function* ({ Body, Bucket, Key, ContentType, CacheControl = 'public, max-age=300', }) {
78
80
  try {
79
81
  yield exports.s3.send(new client_s3_1.PutObjectCommand({ Body, Bucket, Key, ContentType, CacheControl }));
80
82
  return {};
@@ -84,7 +86,7 @@ const putS3Object = (_b) => __awaiter(void 0, [_b], void 0, function* ({ Body, B
84
86
  }
85
87
  });
86
88
  exports.putS3Object = putS3Object;
87
- const deleteFile = (_c) => __awaiter(void 0, [_c], void 0, function* ({ Bucket, Key, }) {
89
+ const deleteFile = (_a) => __awaiter(void 0, [_a], void 0, function* ({ Bucket, Key, }) {
88
90
  try {
89
91
  yield exports.s3.send(new client_s3_1.DeleteObjectCommand({ Bucket, Key }));
90
92
  return {};
@@ -94,8 +96,8 @@ const deleteFile = (_c) => __awaiter(void 0, [_c], void 0, function* ({ Bucket,
94
96
  }
95
97
  });
96
98
  exports.deleteFile = deleteFile;
97
- const deleteFiles = (_d) => __awaiter(void 0, [_d], void 0, function* ({ Bucket, Keys, }) {
98
- var _e;
99
+ const deleteFiles = (_a) => __awaiter(void 0, [_a], void 0, function* ({ Bucket, Keys, }) {
100
+ var _b;
99
101
  try {
100
102
  let toDelete = Keys.map((Key) => ({ Key }));
101
103
  let deleted = 0;
@@ -106,7 +108,7 @@ const deleteFiles = (_d) => __awaiter(void 0, [_d], void 0, function* ({ Bucket,
106
108
  Bucket,
107
109
  Delete: { Objects: part },
108
110
  }));
109
- if (!((_e = res.Deleted) === null || _e === void 0 ? void 0 : _e.length)) {
111
+ if (!((_b = res.Deleted) === null || _b === void 0 ? void 0 : _b.length)) {
110
112
  throw new Error('no deleted files');
111
113
  }
112
114
  deleted += res.Deleted.length;
@@ -119,7 +121,7 @@ const deleteFiles = (_d) => __awaiter(void 0, [_d], void 0, function* ({ Bucket,
119
121
  }
120
122
  });
121
123
  exports.deleteFiles = deleteFiles;
122
- const copyFile = (_f) => __awaiter(void 0, [_f], void 0, function* ({ Bucket, fromKey, toKey, deleteSource = false, }) {
124
+ const copyFile = (_a) => __awaiter(void 0, [_a], void 0, function* ({ Bucket, fromKey, toKey, deleteSource = false, }) {
123
125
  try {
124
126
  (0, log_1.debug)(`copying s3 file from ${Bucket}- ${fromKey} to ${toKey}`);
125
127
  yield exports.s3.send(new client_s3_1.CopyObjectCommand({
@@ -166,7 +168,6 @@ function listFiles(bucketName, opt) {
166
168
  }
167
169
  });
168
170
  }
169
- exports.listFiles = listFiles;
170
171
  /**
171
172
  * allow uploading of file directly to s3
172
173
  * @param param0
@@ -200,4 +201,3 @@ function getPresignedPostURL(_a) {
200
201
  }
201
202
  });
202
203
  }
203
- exports.getPresignedPostURL = getPresignedPostURL;
@@ -12,5 +12,5 @@ export declare const sendEmail: ({ to, message, subject, sourceArn, from, }: ISe
12
12
  error?: string;
13
13
  }>;
14
14
  export declare const sendEmails: (emails: ISendEmail[]) => Promise<{
15
- error?: string | undefined;
15
+ error?: string;
16
16
  }[]>;
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.assumeRole = exports.sts = exports.setSts = void 0;
12
+ exports.sts = exports.setSts = void 0;
13
+ exports.assumeRole = assumeRole;
13
14
  const client_sts_1 = require("@aws-sdk/client-sts");
14
15
  const log_1 = require("../../common/helpers/log");
15
16
  const setSts = (region) => {
@@ -53,4 +54,3 @@ function assumeRole(_a) {
53
54
  }
54
55
  });
55
56
  }
56
- exports.assumeRole = assumeRole;
@@ -12,8 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.validateOpenApi = void 0;
16
- // eslint-disable-next-line import/no-unresolved
15
+ exports.validateOpenApi = validateOpenApi;
17
16
  const openapi_request_validator_1 = __importDefault(require("openapi-request-validator"));
18
17
  const i18n_1 = require("../../common/helpers/i18n");
19
18
  const log_1 = require("../../common/helpers/log");
@@ -55,7 +54,6 @@ function validateOpenApi(_a) {
55
54
  const request = {
56
55
  method: event.httpMethod,
57
56
  path: event.path,
58
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
59
57
  params: undefined,
60
58
  query: event.queryStringParameters,
61
59
  body: (0, object_1.tryJsonParse)(event.body, event.body),
@@ -127,4 +125,3 @@ function validateOpenApi(_a) {
127
125
  return res;
128
126
  });
129
127
  }
130
- exports.validateOpenApi = validateOpenApi;
@@ -13,9 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.getAndValidateToken = void 0;
16
- /* eslint-disable import/no-unresolved */
17
16
  const jsonwebtoken_1 = require("jsonwebtoken");
18
- // eslint-disable-next-line import/no-named-as-default
19
17
  const jwks_rsa_1 = __importDefault(require("jwks-rsa"));
20
18
  const log_1 = require("../../common/helpers/log");
21
19
  const api_1 = require("./api");
@@ -63,8 +61,8 @@ const jwtVerify = (_a) => __awaiter(void 0, [_a], void 0, function* ({ token, jw
63
61
  });
64
62
  });
65
63
  /** extracts user details from oauth token */
66
- const getAndValidateToken = (_b) => __awaiter(void 0, [_b], void 0, function* ({ tokenRaw, jwksRegion = 'ap-southeast-2', COGNITO_USER_POOL_ID, }) {
67
- var _c;
64
+ const getAndValidateToken = (_a) => __awaiter(void 0, [_a], void 0, function* ({ tokenRaw, jwksRegion = 'ap-southeast-2', COGNITO_USER_POOL_ID, }) {
65
+ var _b;
68
66
  const jwksUri = `https://cognito-idp.${jwksRegion}.amazonaws.com/${COGNITO_USER_POOL_ID}/.well-known/jwks.json`;
69
67
  const issuer = `https://cognito-idp.${jwksRegion}.amazonaws.com/${COGNITO_USER_POOL_ID}`;
70
68
  let token = '';
@@ -103,7 +101,7 @@ const getAndValidateToken = (_b) => __awaiter(void 0, [_b], void 0, function* ({
103
101
  throw new Error(mess);
104
102
  }
105
103
  let { picture } = decoded;
106
- if (((_c = decoded.identities[0]) === null || _c === void 0 ? void 0 : _c.providerName) === 'Facebook') {
104
+ if (((_b = decoded.identities[0]) === null || _b === void 0 ? void 0 : _b.providerName) === 'Facebook') {
107
105
  picture = JSON.parse(decoded.picture).data.url;
108
106
  }
109
107
  const userId = decoded.email.toLowerCase();
@@ -1,2 +1,2 @@
1
1
  export * from './helpers';
2
- export * from './types';
2
+ export type * from './types';
package/dist/api/index.js CHANGED
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./helpers"), exports);
18
- __exportStar(require("./types"), exports);
@@ -1,7 +1,4 @@
1
1
  "use strict";
2
- /* eslint-disable import/no-extraneous-dependencies */
3
- /* eslint-disable @typescript-eslint/no-var-requires */
4
- /* eslint-disable no-console */
5
2
  const fs = require('fs');
6
3
  const process = require('process');
7
4
  const pathV = require('path');
@@ -8,9 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- /* eslint-disable import/no-extraneous-dependencies */
12
- /* eslint-disable @typescript-eslint/no-var-requires */
13
- /* eslint-disable no-console */
14
11
  var { load } = require('js-yaml');
15
12
  const SwaggerParser = require('swagger-parser');
16
13
  const fs = require('fs');
@@ -20,7 +17,6 @@ var cwd = process.cwd();
20
17
  var resolvePath = (p) => pathV.resolve(cwd, p);
21
18
  //
22
19
  function cleanSrc() {
23
- // eslint-disable-next-line no-console
24
20
  console.log('fixing colons in field names');
25
21
  let files = fs
26
22
  .readdirSync(resolvePath('./src/api'))
@@ -72,14 +68,12 @@ function generateJs() {
72
68
  return;
73
69
  }
74
70
  const yml = load(fs.readFileSync(p, 'utf8'));
75
- // eslint-disable-next-line
76
71
  const schema = yield SwaggerParser.validate(yml);
77
72
  const content = `var ret=${JSON.stringify(schema)};\nmodule.exports.default=ret`;
78
73
  fs.writeFileSync(resolvePath('./openapi.generated.js'), content);
79
74
  console.log('generated');
80
75
  }
81
76
  catch (e) {
82
- // eslint-disable-next-line no-console
83
77
  console.log('err=', e);
84
78
  }
85
79
  });
@@ -66,4 +66,4 @@ export interface IQueryDynamo {
66
66
  /** default = true */
67
67
  sortAscending?: boolean;
68
68
  }
69
- export * from './aws';
69
+ export type * from './aws';
@@ -1,17 +1,2 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./aws"), exports);
@@ -7,7 +7,7 @@ export declare const take: <T>(array: T[], num: number) => {
7
7
  export declare const chunk: <T>(array: T[], max: number) => T[][];
8
8
  export declare const partition: <T>(array: T[], func: (v: T) => boolean) => T[][] | null;
9
9
  /** removes null, undefined, false, empty string */
10
- export declare const notEmpty: <TValue>(value: TValue | null | undefined | false | '') => value is TValue;
10
+ export declare const notEmpty: <TValue>(value: TValue | null | undefined | false | "") => value is TValue;
11
11
  /**
12
12
  * return a distinct array of items determined by a key function
13
13
  * @param data
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.insertElementAtIndex = exports.findLastIndex = exports.distinct = exports.distinctBy = exports.notEmpty = exports.partition = exports.chunk = exports.take = exports.flat = exports.arrayToObject = void 0;
3
+ exports.insertElementAtIndex = exports.distinct = exports.notEmpty = exports.partition = exports.chunk = exports.take = exports.flat = exports.arrayToObject = void 0;
4
+ exports.distinctBy = distinctBy;
5
+ exports.findLastIndex = findLastIndex;
4
6
  const arrayToObject = (
5
7
  /**
6
8
  * array items
@@ -26,7 +28,6 @@ valueF) => {
26
28
  return ret;
27
29
  };
28
30
  exports.arrayToObject = arrayToObject;
29
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
30
31
  // @ts-ignore
31
32
  const flat = (arr) => [].concat(...arr);
32
33
  exports.flat = flat;
@@ -92,7 +93,6 @@ function distinctBy(data, key, ignoreEmpty) {
92
93
  return false;
93
94
  });
94
95
  }
95
- exports.distinctBy = distinctBy;
96
96
  const distinct = (arr) => [
97
97
  ...new Set(arr),
98
98
  ];
@@ -105,6 +105,5 @@ function findLastIndex(arr, predicate) {
105
105
  }
106
106
  return -1;
107
107
  }
108
- exports.findLastIndex = findLastIndex;
109
108
  const insertElementAtIndex = (arr, element, index) => [...arr.slice(0, index), element, ...arr.slice(index)];
110
109
  exports.insertElementAtIndex = insertElementAtIndex;
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.asyncMap = exports.asyncForEach = void 0;
12
+ exports.asyncForEach = asyncForEach;
13
+ exports.asyncMap = asyncMap;
13
14
  const array_1 = require("./array");
14
15
  /**
15
16
  * run async forEach over all array items
@@ -31,7 +32,6 @@ function asyncForEach(array, callback, opt) {
31
32
  }
32
33
  });
33
34
  }
34
- exports.asyncForEach = asyncForEach;
35
35
  /**
36
36
  * run async map over all array items
37
37
  * @param array
@@ -56,4 +56,3 @@ function asyncMap(array, callback, opt) {
56
56
  return ret;
57
57
  });
58
58
  }
59
- exports.asyncMap = asyncMap;
@@ -1,8 +1,7 @@
1
- /// <reference types="node" />
2
1
  import { Buffer } from 'buffer';
3
- export declare const toBuffer: (ab: ArrayBuffer) => Buffer;
2
+ export declare const toBuffer: (ab: ArrayBuffer) => Buffer<ArrayBufferLike>;
4
3
  export declare function bufferToArrayBuffer(buffer: Buffer): ArrayBuffer;
5
- export declare function b64ToArrayBuffer(base64: string): ArrayBufferLike;
4
+ export declare function b64ToArrayBuffer(base64: string): ArrayBuffer;
6
5
  /**
7
6
  * convert an ArrayBuffer (usually from file.arrayBuffer) to base64. Usually on client side before server send
8
7
  * @param buffer
@@ -14,4 +13,4 @@ export declare function arrayBufferToBase64(buffer: ArrayBuffer): string;
14
13
  * @param raw
15
14
  * @returns
16
15
  */
17
- export declare const base64ToBinary: (raw: string) => Buffer;
16
+ export declare const base64ToBinary: (raw: string) => Buffer<ArrayBufferLike>;
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.base64ToBinary = exports.arrayBufferToBase64 = exports.b64ToArrayBuffer = exports.bufferToArrayBuffer = exports.toBuffer = void 0;
3
+ exports.base64ToBinary = exports.toBuffer = void 0;
4
+ exports.bufferToArrayBuffer = bufferToArrayBuffer;
5
+ exports.b64ToArrayBuffer = b64ToArrayBuffer;
6
+ exports.arrayBufferToBase64 = arrayBufferToBase64;
4
7
  const buffer_1 = require("buffer");
5
8
  const base64_1 = require("./string/base64");
6
9
  const toBuffer = (ab) => buffer_1.Buffer.from(ab);
@@ -13,7 +16,6 @@ function bufferToArrayBuffer(buffer) {
13
16
  }
14
17
  return arrayBuffer;
15
18
  }
16
- exports.bufferToArrayBuffer = bufferToArrayBuffer;
17
19
  function b64ToArrayBuffer(base64) {
18
20
  const binary_string = (0, base64_1.fromBase64)(base64);
19
21
  const len = binary_string.length;
@@ -23,7 +25,6 @@ function b64ToArrayBuffer(base64) {
23
25
  }
24
26
  return bytes.buffer;
25
27
  }
26
- exports.b64ToArrayBuffer = b64ToArrayBuffer;
27
28
  /**
28
29
  * convert an ArrayBuffer (usually from file.arrayBuffer) to base64. Usually on client side before server send
29
30
  * @param buffer
@@ -38,7 +39,6 @@ function arrayBufferToBase64(buffer) {
38
39
  }
39
40
  return (0, base64_1.toBase64)(binary);
40
41
  }
41
- exports.arrayBufferToBase64 = arrayBufferToBase64;
42
42
  /**
43
43
  * convert a base64 string to a binary Buffer. Usually on server side from client sent content
44
44
  * @param raw
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loadCsvAsJson = void 0;
3
+ exports.loadCsvAsJson = loadCsvAsJson;
4
4
  const math_1 = require("./math");
5
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
5
  function loadCsvAsJson(p) {
7
6
  const lines = p.fileData.split(/[\r]?\n/);
8
7
  let sep = ',';
@@ -55,4 +54,3 @@ function loadCsvAsJson(p) {
55
54
  });
56
55
  return jsonData;
57
56
  }
58
- exports.loadCsvAsJson = loadCsvAsJson;
@@ -55,7 +55,6 @@ exports.CSharpToJs = CSharpToJs;
55
55
  const dateTimeToNearestMinute = (minutes, date) => {
56
56
  const coeff = 1000 * 60 * minutes;
57
57
  if (!date) {
58
- // eslint-disable-next-line no-param-reassign
59
58
  date = new Date();
60
59
  }
61
60
  const rounded = new Date(Math.round(date.getTime() / coeff) * coeff);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.retry = void 0;
3
+ exports.retry = retry;
4
4
  const log_1 = require("./log");
5
5
  function retry(name, fn, retriesLeft = 3, interval = 1000) {
6
6
  return new Promise((resolve, reject) => {
@@ -19,4 +19,3 @@ function retry(name, fn, retriesLeft = 3, interval = 1000) {
19
19
  });
20
20
  });
21
21
  }
22
- exports.retry = retry;
@@ -9,8 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.runGenerator = void 0;
13
- /* eslint-disable no-await-in-loop */
12
+ exports.runGenerator = runGenerator;
14
13
  function runGenerator(iter, partialRun) {
15
14
  return __awaiter(this, void 0, void 0, function* () {
16
15
  let curr;
@@ -23,4 +22,3 @@ function runGenerator(iter, partialRun) {
23
22
  } while (!curr.done);
24
23
  });
25
24
  }
26
- exports.runGenerator = runGenerator;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.groupByTwice = exports.groupByList = exports.groupBy = void 0;
3
+ exports.groupBy = groupBy;
4
+ exports.groupByList = groupByList;
5
+ exports.groupByTwice = groupByTwice;
4
6
  /**
5
7
  * group an array of items by the output of a key function
6
8
  * @param arr
@@ -17,7 +19,6 @@ function groupBy(arr, getKey) {
17
19
  });
18
20
  return ret;
19
21
  }
20
- exports.groupBy = groupBy;
21
22
  /**
22
23
  * group an array of items by the output of a key function
23
24
  * @param arr
@@ -37,7 +38,6 @@ function groupByList(arr, getKey) {
37
38
  });
38
39
  return ret;
39
40
  }
40
- exports.groupByList = groupByList;
41
41
  function groupByTwice(arr, getKey, getSubKey) {
42
42
  const ret = {};
43
43
  arr.forEach((item) => {
@@ -50,4 +50,3 @@ function groupByTwice(arr, getKey, getSubKey) {
50
50
  });
51
51
  return ret;
52
52
  }
53
- exports.groupByTwice = groupByTwice;
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- /* eslint-disable no-bitwise */
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.generateNewPK = exports.hashCode = exports.hashCodeInt = void 0;
5
4
  /** generate int hashcode of string