@genesislcap/foundation-utils 14.451.3-alpha-861508d.0 → 14.451.3

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.
@@ -209,245 +209,6 @@
209
209
  }
210
210
  ]
211
211
  },
212
- {
213
- "kind": "javascript-module",
214
- "path": "src/converters/index.ts",
215
- "declarations": [],
216
- "exports": [
217
- {
218
- "kind": "js",
219
- "name": "*",
220
- "declaration": {
221
- "name": "*",
222
- "package": "./string-array-converter"
223
- }
224
- }
225
- ]
226
- },
227
- {
228
- "kind": "javascript-module",
229
- "path": "src/converters/string-array-converter.ts",
230
- "declarations": [
231
- {
232
- "kind": "variable",
233
- "name": "stringArrayConverter",
234
- "type": {
235
- "text": "ValueConverter"
236
- },
237
- "default": "{\n fromView(v: string): string | string[] | undefined {\n if (!v?.trim()) return undefined;\n return v.includes(',') ? v.split(',').map((s) => s.trim()) : v.trim();\n },\n toView(v: string | string[] | undefined): string {\n if (typeof v === 'string') return v;\n if (Array.isArray(v)) return v.join(',');\n return '';\n },\n}",
238
- "description": "A @microsoft/fast-element#ValueConverter that converts between comma-separated string attributes\nand `string | string[]` properties.",
239
- "privacy": "public"
240
- }
241
- ],
242
- "exports": [
243
- {
244
- "kind": "js",
245
- "name": "stringArrayConverter",
246
- "declaration": {
247
- "name": "stringArrayConverter",
248
- "module": "src/converters/string-array-converter.ts"
249
- }
250
- }
251
- ]
252
- },
253
- {
254
- "kind": "javascript-module",
255
- "path": "src/data/inMemoryDatabase.ts",
256
- "declarations": [
257
- {
258
- "kind": "class",
259
- "description": "An in memory database of specific DatabaseRecord types.",
260
- "name": "InMemoryDatabase",
261
- "members": [
262
- {
263
- "kind": "field",
264
- "name": "isWorking",
265
- "type": {
266
- "text": "boolean"
267
- },
268
- "privacy": "public",
269
- "default": "false"
270
- },
271
- {
272
- "kind": "field",
273
- "name": "records",
274
- "type": {
275
- "text": "Record<string, T>"
276
- },
277
- "privacy": "private",
278
- "default": "{}"
279
- },
280
- {
281
- "kind": "field",
282
- "name": "beforeUpdateListeners",
283
- "privacy": "private"
284
- },
285
- {
286
- "kind": "field",
287
- "name": "afterUpdateListeners",
288
- "privacy": "private"
289
- },
290
- {
291
- "kind": "method",
292
- "name": "create",
293
- "privacy": "public",
294
- "return": {
295
- "type": {
296
- "text": "Promise<DatabaseAccessResult.Create<T>>"
297
- }
298
- },
299
- "parameters": [
300
- {
301
- "name": "newValue",
302
- "type": {
303
- "text": "Omit<T, 'id'>"
304
- }
305
- }
306
- ]
307
- },
308
- {
309
- "kind": "method",
310
- "name": "read",
311
- "privacy": "public",
312
- "return": {
313
- "type": {
314
- "text": "Promise<DatabaseAccessResult.Read<T>>"
315
- }
316
- },
317
- "parameters": [
318
- {
319
- "name": "id",
320
- "type": {
321
- "text": "string"
322
- }
323
- }
324
- ]
325
- },
326
- {
327
- "kind": "method",
328
- "name": "update",
329
- "privacy": "public",
330
- "return": {
331
- "type": {
332
- "text": "Promise<DatabaseAccessResult.Update<T>>"
333
- }
334
- },
335
- "parameters": [
336
- {
337
- "name": "id",
338
- "type": {
339
- "text": "string"
340
- }
341
- },
342
- {
343
- "name": "newValue",
344
- "type": {
345
- "text": "Omit<Partial<T>, 'id'>"
346
- }
347
- }
348
- ]
349
- },
350
- {
351
- "kind": "method",
352
- "name": "delete",
353
- "privacy": "public",
354
- "return": {
355
- "type": {
356
- "text": "Promise<DatabaseAccessResult.Delete>"
357
- }
358
- },
359
- "parameters": [
360
- {
361
- "name": "id",
362
- "type": {
363
- "text": "string"
364
- }
365
- }
366
- ]
367
- },
368
- {
369
- "kind": "method",
370
- "name": "visit",
371
- "privacy": "public",
372
- "return": {
373
- "type": {
374
- "text": "Promise<void>"
375
- }
376
- },
377
- "parameters": [
378
- {
379
- "name": "visitor",
380
- "type": {
381
- "text": "(record: T) => void"
382
- }
383
- }
384
- ]
385
- },
386
- {
387
- "kind": "method",
388
- "name": "onBeforeUpdate",
389
- "privacy": "public",
390
- "return": {
391
- "type": {
392
- "text": "() => void"
393
- }
394
- },
395
- "parameters": [
396
- {
397
- "name": "listener",
398
- "type": {
399
- "text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
400
- }
401
- }
402
- ]
403
- },
404
- {
405
- "kind": "method",
406
- "name": "onAfterUpdate",
407
- "privacy": "public",
408
- "return": {
409
- "type": {
410
- "text": "() => void"
411
- }
412
- },
413
- "parameters": [
414
- {
415
- "name": "listener",
416
- "type": {
417
- "text": "Listener<DatabaseEvent.AfterUpdate<T>>"
418
- }
419
- }
420
- ]
421
- }
422
- ]
423
- }
424
- ],
425
- "exports": [
426
- {
427
- "kind": "js",
428
- "name": "InMemoryDatabase",
429
- "declaration": {
430
- "name": "InMemoryDatabase",
431
- "module": "src/data/inMemoryDatabase.ts"
432
- }
433
- }
434
- ]
435
- },
436
- {
437
- "kind": "javascript-module",
438
- "path": "src/data/index.ts",
439
- "declarations": [],
440
- "exports": [
441
- {
442
- "kind": "js",
443
- "name": "*",
444
- "declaration": {
445
- "name": "*",
446
- "package": "./inMemoryDatabase"
447
- }
448
- }
449
- ]
450
- },
451
212
  {
452
213
  "kind": "javascript-module",
453
214
  "path": "src/design-system/design-system.ts",
@@ -675,7 +436,7 @@
675
436
  },
676
437
  {
677
438
  "kind": "javascript-module",
678
- "path": "src/encoding/index.ts",
439
+ "path": "src/converters/index.ts",
679
440
  "declarations": [],
680
441
  "exports": [
681
442
  {
@@ -683,60 +444,48 @@
683
444
  "name": "*",
684
445
  "declaration": {
685
446
  "name": "*",
686
- "package": "./base64"
447
+ "package": "./string-array-converter"
687
448
  }
688
449
  }
689
450
  ]
690
451
  },
691
452
  {
692
453
  "kind": "javascript-module",
693
- "path": "src/decorators/index.ts",
694
- "declarations": [],
454
+ "path": "src/converters/string-array-converter.ts",
455
+ "declarations": [
456
+ {
457
+ "kind": "variable",
458
+ "name": "stringArrayConverter",
459
+ "type": {
460
+ "text": "ValueConverter"
461
+ },
462
+ "default": "{\n fromView(v: string): string | string[] | undefined {\n if (!v?.trim()) return undefined;\n return v.includes(',') ? v.split(',').map((s) => s.trim()) : v.trim();\n },\n toView(v: string | string[] | undefined): string {\n if (typeof v === 'string') return v;\n if (Array.isArray(v)) return v.join(',');\n return '';\n },\n}",
463
+ "description": "A @microsoft/fast-element#ValueConverter that converts between comma-separated string attributes\nand `string | string[]` properties.",
464
+ "privacy": "public"
465
+ }
466
+ ],
695
467
  "exports": [
696
468
  {
697
469
  "kind": "js",
698
- "name": "*",
470
+ "name": "stringArrayConverter",
699
471
  "declaration": {
700
- "name": "*",
701
- "package": "./renderOnChange"
472
+ "name": "stringArrayConverter",
473
+ "module": "src/converters/string-array-converter.ts"
702
474
  }
703
475
  }
704
476
  ]
705
477
  },
706
478
  {
707
479
  "kind": "javascript-module",
708
- "path": "src/decorators/renderOnChange.ts",
709
- "declarations": [
710
- {
711
- "kind": "function",
712
- "name": "renderOnChange",
713
- "parameters": [
714
- {
715
- "name": "target",
716
- "type": {
717
- "text": "FASTElement & { render(): void }"
718
- },
719
- "description": "The target to define the property change handler on."
720
- },
721
- {
722
- "name": "name",
723
- "type": {
724
- "text": "string"
725
- },
726
- "description": "The property name."
727
- }
728
- ],
729
- "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
730
- "privacy": "public"
731
- }
732
- ],
480
+ "path": "src/encoding/index.ts",
481
+ "declarations": [],
733
482
  "exports": [
734
483
  {
735
484
  "kind": "js",
736
- "name": "renderOnChange",
485
+ "name": "*",
737
486
  "declaration": {
738
- "name": "renderOnChange",
739
- "module": "src/decorators/renderOnChange.ts"
487
+ "name": "*",
488
+ "package": "./base64"
740
489
  }
741
490
  }
742
491
  ]
@@ -1216,6 +965,257 @@
1216
965
  }
1217
966
  ]
1218
967
  },
968
+ {
969
+ "kind": "javascript-module",
970
+ "path": "src/data/inMemoryDatabase.ts",
971
+ "declarations": [
972
+ {
973
+ "kind": "class",
974
+ "description": "An in memory database of specific DatabaseRecord types.",
975
+ "name": "InMemoryDatabase",
976
+ "members": [
977
+ {
978
+ "kind": "field",
979
+ "name": "isWorking",
980
+ "type": {
981
+ "text": "boolean"
982
+ },
983
+ "privacy": "public",
984
+ "default": "false"
985
+ },
986
+ {
987
+ "kind": "field",
988
+ "name": "records",
989
+ "type": {
990
+ "text": "Record<string, T>"
991
+ },
992
+ "privacy": "private",
993
+ "default": "{}"
994
+ },
995
+ {
996
+ "kind": "field",
997
+ "name": "beforeUpdateListeners",
998
+ "privacy": "private"
999
+ },
1000
+ {
1001
+ "kind": "field",
1002
+ "name": "afterUpdateListeners",
1003
+ "privacy": "private"
1004
+ },
1005
+ {
1006
+ "kind": "method",
1007
+ "name": "create",
1008
+ "privacy": "public",
1009
+ "return": {
1010
+ "type": {
1011
+ "text": "Promise<DatabaseAccessResult.Create<T>>"
1012
+ }
1013
+ },
1014
+ "parameters": [
1015
+ {
1016
+ "name": "newValue",
1017
+ "type": {
1018
+ "text": "Omit<T, 'id'>"
1019
+ }
1020
+ }
1021
+ ]
1022
+ },
1023
+ {
1024
+ "kind": "method",
1025
+ "name": "read",
1026
+ "privacy": "public",
1027
+ "return": {
1028
+ "type": {
1029
+ "text": "Promise<DatabaseAccessResult.Read<T>>"
1030
+ }
1031
+ },
1032
+ "parameters": [
1033
+ {
1034
+ "name": "id",
1035
+ "type": {
1036
+ "text": "string"
1037
+ }
1038
+ }
1039
+ ]
1040
+ },
1041
+ {
1042
+ "kind": "method",
1043
+ "name": "update",
1044
+ "privacy": "public",
1045
+ "return": {
1046
+ "type": {
1047
+ "text": "Promise<DatabaseAccessResult.Update<T>>"
1048
+ }
1049
+ },
1050
+ "parameters": [
1051
+ {
1052
+ "name": "id",
1053
+ "type": {
1054
+ "text": "string"
1055
+ }
1056
+ },
1057
+ {
1058
+ "name": "newValue",
1059
+ "type": {
1060
+ "text": "Omit<Partial<T>, 'id'>"
1061
+ }
1062
+ }
1063
+ ]
1064
+ },
1065
+ {
1066
+ "kind": "method",
1067
+ "name": "delete",
1068
+ "privacy": "public",
1069
+ "return": {
1070
+ "type": {
1071
+ "text": "Promise<DatabaseAccessResult.Delete>"
1072
+ }
1073
+ },
1074
+ "parameters": [
1075
+ {
1076
+ "name": "id",
1077
+ "type": {
1078
+ "text": "string"
1079
+ }
1080
+ }
1081
+ ]
1082
+ },
1083
+ {
1084
+ "kind": "method",
1085
+ "name": "visit",
1086
+ "privacy": "public",
1087
+ "return": {
1088
+ "type": {
1089
+ "text": "Promise<void>"
1090
+ }
1091
+ },
1092
+ "parameters": [
1093
+ {
1094
+ "name": "visitor",
1095
+ "type": {
1096
+ "text": "(record: T) => void"
1097
+ }
1098
+ }
1099
+ ]
1100
+ },
1101
+ {
1102
+ "kind": "method",
1103
+ "name": "onBeforeUpdate",
1104
+ "privacy": "public",
1105
+ "return": {
1106
+ "type": {
1107
+ "text": "() => void"
1108
+ }
1109
+ },
1110
+ "parameters": [
1111
+ {
1112
+ "name": "listener",
1113
+ "type": {
1114
+ "text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
1115
+ }
1116
+ }
1117
+ ]
1118
+ },
1119
+ {
1120
+ "kind": "method",
1121
+ "name": "onAfterUpdate",
1122
+ "privacy": "public",
1123
+ "return": {
1124
+ "type": {
1125
+ "text": "() => void"
1126
+ }
1127
+ },
1128
+ "parameters": [
1129
+ {
1130
+ "name": "listener",
1131
+ "type": {
1132
+ "text": "Listener<DatabaseEvent.AfterUpdate<T>>"
1133
+ }
1134
+ }
1135
+ ]
1136
+ }
1137
+ ]
1138
+ }
1139
+ ],
1140
+ "exports": [
1141
+ {
1142
+ "kind": "js",
1143
+ "name": "InMemoryDatabase",
1144
+ "declaration": {
1145
+ "name": "InMemoryDatabase",
1146
+ "module": "src/data/inMemoryDatabase.ts"
1147
+ }
1148
+ }
1149
+ ]
1150
+ },
1151
+ {
1152
+ "kind": "javascript-module",
1153
+ "path": "src/data/index.ts",
1154
+ "declarations": [],
1155
+ "exports": [
1156
+ {
1157
+ "kind": "js",
1158
+ "name": "*",
1159
+ "declaration": {
1160
+ "name": "*",
1161
+ "package": "./inMemoryDatabase"
1162
+ }
1163
+ }
1164
+ ]
1165
+ },
1166
+ {
1167
+ "kind": "javascript-module",
1168
+ "path": "src/decorators/index.ts",
1169
+ "declarations": [],
1170
+ "exports": [
1171
+ {
1172
+ "kind": "js",
1173
+ "name": "*",
1174
+ "declaration": {
1175
+ "name": "*",
1176
+ "package": "./renderOnChange"
1177
+ }
1178
+ }
1179
+ ]
1180
+ },
1181
+ {
1182
+ "kind": "javascript-module",
1183
+ "path": "src/decorators/renderOnChange.ts",
1184
+ "declarations": [
1185
+ {
1186
+ "kind": "function",
1187
+ "name": "renderOnChange",
1188
+ "parameters": [
1189
+ {
1190
+ "name": "target",
1191
+ "type": {
1192
+ "text": "FASTElement & { render(): void }"
1193
+ },
1194
+ "description": "The target to define the property change handler on."
1195
+ },
1196
+ {
1197
+ "name": "name",
1198
+ "type": {
1199
+ "text": "string"
1200
+ },
1201
+ "description": "The property name."
1202
+ }
1203
+ ],
1204
+ "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
1205
+ "privacy": "public"
1206
+ }
1207
+ ],
1208
+ "exports": [
1209
+ {
1210
+ "kind": "js",
1211
+ "name": "renderOnChange",
1212
+ "declaration": {
1213
+ "name": "renderOnChange",
1214
+ "module": "src/decorators/renderOnChange.ts"
1215
+ }
1216
+ }
1217
+ ]
1218
+ },
1219
1219
  {
1220
1220
  "kind": "javascript-module",
1221
1221
  "path": "src/error/errorMap.ts",
@@ -1 +1 @@
1
- {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/serializers/json/json.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIrE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,KAAA,mBAQvC;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAAC;IAE/B;;;;OAIG;I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AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,oBAGzC,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,cAAc;IACtB,OAAO,CAAC,MAAM;gBAAN,MAAM,uBAA8B;IAExF;;OAEG;IACH,SAAS,GAAI,QAAQ,GAAG,KAAG,MAAM,CAAkC;IAEnE;;OAEG;IACH,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG;CAmB1B;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,sEAE1B,CAAC"}
@@ -1,9 +1,7 @@
1
1
  import { __decorate, __param } from "tslib";
2
2
  import { DI, optional } from '@microsoft/fast-foundation';
3
3
  import { parse, stringify, isInteger } from 'lossless-json';
4
- import { createLogger } from '../../logger';
5
4
  import { BIG_INT_64_BITS, JSONSerializerConfig } from './json.types';
6
- const logger = createLogger('JSONSerializer');
7
5
  /**
8
6
  * A Default Number Parser for deserializing objects.
9
7
  * @public
@@ -41,26 +39,15 @@ let DefaultJSONSerializer = class DefaultJSONSerializer {
41
39
  return Promise.resolve({});
42
40
  }
43
41
  if (typeof input === 'string') {
44
- const t0 = performance.now();
45
- const result = this.config.parse(input);
46
- logger.debug(`parse (string) took ${(performance.now() - t0).toFixed(2)}ms`);
47
- return result;
42
+ return this.config.parse(input);
48
43
  }
49
44
  if (input && input.ok) {
50
- return input.text().then((text) => {
51
- const t0 = performance.now();
52
- const result = this.config.parse(text);
53
- logger.debug(`parse (response) took ${(performance.now() - t0).toFixed(2)}ms`);
54
- return result;
55
- });
45
+ return input.text().then((text) => this.config.parse(text));
56
46
  }
57
47
  if (input && input.data) {
58
48
  input = input.data;
59
49
  }
60
- const t0 = performance.now();
61
- const result = this.config.parse(input);
62
- logger.debug(`parse (message) took ${(performance.now() - t0).toFixed(2)}ms`);
63
- return result;
50
+ return this.config.parse(input);
64
51
  }
65
52
  };
66
53
  DefaultJSONSerializer = __decorate([
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-utils",
3
3
  "description": "Genesis Foundation Utils",
4
- "version": "14.451.3-alpha-861508d.0",
4
+ "version": "14.451.3",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -29,18 +29,18 @@
29
29
  }
30
30
  },
31
31
  "devDependencies": {
32
- "@genesislcap/foundation-testing": "14.451.3-alpha-861508d.0",
33
- "@genesislcap/genx": "14.451.3-alpha-861508d.0",
34
- "@genesislcap/rollup-builder": "14.451.3-alpha-861508d.0",
35
- "@genesislcap/ts-builder": "14.451.3-alpha-861508d.0",
36
- "@genesislcap/uvu-playwright-builder": "14.451.3-alpha-861508d.0",
37
- "@genesislcap/vite-builder": "14.451.3-alpha-861508d.0",
38
- "@genesislcap/webpack-builder": "14.451.3-alpha-861508d.0",
32
+ "@genesislcap/foundation-testing": "14.451.3",
33
+ "@genesislcap/genx": "14.451.3",
34
+ "@genesislcap/rollup-builder": "14.451.3",
35
+ "@genesislcap/ts-builder": "14.451.3",
36
+ "@genesislcap/uvu-playwright-builder": "14.451.3",
37
+ "@genesislcap/vite-builder": "14.451.3",
38
+ "@genesislcap/webpack-builder": "14.451.3",
39
39
  "@types/json-schema": "^7.0.11"
40
40
  },
41
41
  "dependencies": {
42
- "@genesislcap/expression-builder": "14.451.3-alpha-861508d.0",
43
- "@genesislcap/foundation-logger": "14.451.3-alpha-861508d.0",
42
+ "@genesislcap/expression-builder": "14.451.3",
43
+ "@genesislcap/foundation-logger": "14.451.3",
44
44
  "@microsoft/fast-components": "2.30.6",
45
45
  "@microsoft/fast-element": "1.14.0",
46
46
  "@microsoft/fast-foundation": "2.50.0",
@@ -58,5 +58,5 @@
58
58
  "access": "public"
59
59
  },
60
60
  "customElements": "dist/custom-elements.json",
61
- "gitHead": "6952480d23f47b3830abff2b8afd8e018fdf2b92"
61
+ "gitHead": "3d20ba2e149817df766348685a718eb259b8b0cb"
62
62
  }