ag-common 0.0.613 → 0.0.615

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.
@@ -154,7 +154,7 @@ const scan = (tableName, opt) => __awaiter(void 0, void 0, void 0, function* ()
154
154
  })), ((opt === null || opt === void 0 ? void 0 : opt.requiredAttributeList) && {
155
155
  ProjectionExpression: opt.requiredAttributeList.join(', '),
156
156
  })), { ExclusiveStartKey }));
157
- (0, log_1.trace)(`running dynamo scan=${JSON.stringify(params, null, 2)}`);
157
+ (0, log_1.debug)(`running dynamo scan=${JSON.stringify(params, null, 2)}`);
158
158
  const { Items: newitems, LastEvaluatedKey,
159
159
  // eslint-disable-next-line no-await-in-loop
160
160
  } = yield exports.dynamoDb.send(params);
@@ -163,7 +163,7 @@ const scan = (tableName, opt) => __awaiter(void 0, void 0, void 0, function* ()
163
163
  Items.push(...newitems.map((r) => r));
164
164
  }
165
165
  } while (ExclusiveStartKey);
166
- (0, log_1.trace)(`dynamo scan against ${tableName} ok, count=${Items === null || Items === void 0 ? void 0 : Items.length}`);
166
+ (0, log_1.debug)(`dynamo scan against ${tableName} ok, count=${Items === null || Items === void 0 ? void 0 : Items.length}`);
167
167
  return { data: Items };
168
168
  }
169
169
  catch (e) {
@@ -86,14 +86,14 @@ function validateOpenApi({ event, next, authorized, schema, COGNITO_USER_POOL_ID
86
86
  else {
87
87
  try {
88
88
  request.params = opm.pathParams;
89
- (0, log_1.info)('req=', JSON.stringify(Object.assign(Object.assign({}, request), { body: ((_d = (_c = request.body) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 2000
89
+ (0, log_1.debug)('req=', JSON.stringify(Object.assign(Object.assign({}, request), { body: ((_d = (_c = request.body) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 2000
90
90
  ? '(truncating long body)'
91
91
  : request.body }), null, 2));
92
92
  const resp = new openapi_request_validator_1.default(Object.assign(Object.assign({}, opm.operation), { schemas: schema.components.schemas })).validateRequest(request);
93
93
  if (resp) {
94
94
  (0, log_1.warn)('bad request');
95
- (0, log_1.warn)('opm=', JSON.stringify(opm, null, 2));
96
- (0, log_1.warn)('resp=', JSON.stringify(resp, null, 2));
95
+ (0, log_1.debug)('opm=', JSON.stringify(opm, null, 2));
96
+ (0, log_1.debug)('resp=', JSON.stringify(resp, null, 2));
97
97
  return (0, api_1.returnCode)(400, `error:${(_f = (_e = resp === null || resp === void 0 ? void 0 : resp.errors) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.message}`);
98
98
  }
99
99
  (0, log_1.debug)(`validated request:`, event.path);
@@ -30,7 +30,7 @@ const jwtVerify = ({ token, jwksUri, issuer, }) => __awaiter(void 0, void 0, voi
30
30
  jwksRequestsPerMinute: 10,
31
31
  jwksUri,
32
32
  };
33
- (0, log_1.info)(`jwksClient config=`, jc);
33
+ (0, log_1.debug)(`jwksClient config=`, jc);
34
34
  jwksClient = (0, jwks_rsa_1.default)(jc);
35
35
  }
36
36
  jwksClient.getSigningKey(header.kid, (errorV, key) => {
@@ -107,6 +107,6 @@ const TreeChart = (tnd) => {
107
107
  if (head.size === 0) {
108
108
  return react_1.default.createElement("div", null);
109
109
  }
110
- return (react_1.default.createElement(Base, { ref: r, className: tnd.className }, headDim && render({ tnd, n: head, depth: 0, head, headDim })));
110
+ return (react_1.default.createElement(Base, { ref: r, className: tnd.className, style: tnd.style }, headDim && render({ tnd, n: head, depth: 0, head, headDim })));
111
111
  };
112
112
  exports.TreeChart = TreeChart;
@@ -1,3 +1,4 @@
1
+ import type { CSSProperties } from 'react';
1
2
  export interface TreeNodeOut {
2
3
  name: string;
3
4
  size: number;
@@ -19,4 +20,5 @@ export interface TreeNodeData {
19
20
  pathCount: number;
20
21
  fullCount: number;
21
22
  }) => string;
23
+ style?: CSSProperties;
22
24
  }
@@ -4,6 +4,7 @@
4
4
  * @param sizePx default = 1px
5
5
  */
6
6
  export declare const HardOutline: (outlineColour?: string, sizePx?: number) => import("@emotion/react").SerializedStyles;
7
+ export declare const HardOutlineFilter: (outlineColour?: string, sizePx?: number) => string;
7
8
  /** disable user text selection */
8
9
  export declare const NoTextSelect: import("@emotion/react").SerializedStyles;
9
10
  /** enable text overflow
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.Card = exports.bounce = exports.noDrag = exports.TextOverflowEllipsis = exports.NoTextSelect = exports.HardOutline = void 0;
7
+ exports.Card = exports.bounce = exports.noDrag = exports.TextOverflowEllipsis = exports.NoTextSelect = exports.HardOutlineFilter = exports.HardOutline = void 0;
8
8
  const react_1 = require("@emotion/react");
9
9
  const styled_1 = __importDefault(require("@emotion/styled"));
10
10
  const colours_1 = require("./colours");
@@ -12,16 +12,18 @@ const colours_1 = require("./colours");
12
12
  * @param outlineColour default='white'
13
13
  * @param sizePx default = 1px
14
14
  */
15
- const HardOutline = (outlineColour = 'white', sizePx = 1) => {
15
+ const HardOutline = (outlineColour = 'white', sizePx = 1) => (0, react_1.css) `\
16
+ filter: ${(0, exports.HardOutlineFilter)(outlineColour, sizePx)};
17
+ `;
18
+ exports.HardOutline = HardOutline;
19
+ const HardOutlineFilter = (outlineColour = 'white', sizePx = 1) => {
16
20
  const px = `${sizePx}px`;
17
- return (0, react_1.css) `
18
- filter: drop-shadow(${px} ${px} 0px ${outlineColour})
19
- drop-shadow(-${px} ${px} 0px ${outlineColour})
20
- drop-shadow(${px} -${px} 0px ${outlineColour})
21
- drop-shadow(-${px} -${px} 0px ${outlineColour});
22
- `;
21
+ return `drop-shadow(${px} ${px} 0px ${outlineColour})
22
+ drop-shadow(-${px} ${px} 0px ${outlineColour})
23
+ drop-shadow(${px} -${px} 0px ${outlineColour})
24
+ drop-shadow(-${px} -${px} 0px ${outlineColour})`;
23
25
  };
24
- exports.HardOutline = HardOutline;
26
+ exports.HardOutlineFilter = HardOutlineFilter;
25
27
  /** disable user text selection */
26
28
  exports.NoTextSelect = (0, react_1.css) `
27
29
  user-select: none; /* supported by Chrome and Opera */
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.613",
2
+ "version": "0.0.615",
3
3
  "name": "ag-common",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",