dyno-table 2.5.1 → 2.5.2

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.
@@ -657,12 +657,9 @@ function defineEntity(config) {
657
657
  };
658
658
  const originalExecute = builder.execute;
659
659
  builder.execute = async () => {
660
- await prepareValidatedItemAsync();
661
- const result = await originalExecute.call(builder);
662
- if (!result) {
663
- throw chunkELULXDSB_cjs.OperationErrors.putFailed(config.name, {}, void 0);
664
- }
665
- return result;
660
+ const validatedItem = await prepareValidatedItemAsync();
661
+ await originalExecute.call(builder);
662
+ return validatedItem;
666
663
  };
667
664
  const originalWithTransaction = builder.withTransaction;
668
665
  if (originalWithTransaction) {
@@ -655,12 +655,9 @@ function defineEntity(config) {
655
655
  };
656
656
  const originalExecute = builder.execute;
657
657
  builder.execute = async () => {
658
- await prepareValidatedItemAsync();
659
- const result = await originalExecute.call(builder);
660
- if (!result) {
661
- throw OperationErrors.putFailed(config.name, {}, void 0);
662
- }
663
- return result;
658
+ const validatedItem = await prepareValidatedItemAsync();
659
+ await originalExecute.call(builder);
660
+ return validatedItem;
664
661
  };
665
662
  const originalWithTransaction = builder.withTransaction;
666
663
  if (originalWithTransaction) {
package/dist/entity.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkZXM6LPRV_cjs = require('./chunk-ZXM6LPRV.cjs');
3
+ var chunkG5ERTQFX_cjs = require('./chunk-G5ERTQFX.cjs');
4
4
  require('./chunk-ELULXDSB.cjs');
5
5
  require('./chunk-7UJJ7JXM.cjs');
6
6
 
@@ -8,13 +8,13 @@ require('./chunk-7UJJ7JXM.cjs');
8
8
 
9
9
  Object.defineProperty(exports, "createIndex", {
10
10
  enumerable: true,
11
- get: function () { return chunkZXM6LPRV_cjs.createIndex; }
11
+ get: function () { return chunkG5ERTQFX_cjs.createIndex; }
12
12
  });
13
13
  Object.defineProperty(exports, "createQueries", {
14
14
  enumerable: true,
15
- get: function () { return chunkZXM6LPRV_cjs.createQueries; }
15
+ get: function () { return chunkG5ERTQFX_cjs.createQueries; }
16
16
  });
17
17
  Object.defineProperty(exports, "defineEntity", {
18
18
  enumerable: true,
19
- get: function () { return chunkZXM6LPRV_cjs.defineEntity; }
19
+ get: function () { return chunkG5ERTQFX_cjs.defineEntity; }
20
20
  });
package/dist/entity.js CHANGED
@@ -1,3 +1,3 @@
1
- export { createIndex, createQueries, defineEntity } from './chunk-U6MQGB6Y.js';
1
+ export { createIndex, createQueries, defineEntity } from './chunk-RNX2DAHA.js';
2
2
  import './chunk-FF7FYGDH.js';
3
3
  import './chunk-2WIBY7PZ.js';
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkZUBCW3LA_cjs = require('./chunk-ZUBCW3LA.cjs');
4
- var chunkZXM6LPRV_cjs = require('./chunk-ZXM6LPRV.cjs');
4
+ var chunkG5ERTQFX_cjs = require('./chunk-G5ERTQFX.cjs');
5
5
  var chunkPB7BBCZO_cjs = require('./chunk-PB7BBCZO.cjs');
6
6
  var chunk3DR6VOFW_cjs = require('./chunk-3DR6VOFW.cjs');
7
7
  var chunkELULXDSB_cjs = require('./chunk-ELULXDSB.cjs');
@@ -15,99 +15,99 @@ Object.defineProperty(exports, "Table", {
15
15
  });
16
16
  Object.defineProperty(exports, "createIndex", {
17
17
  enumerable: true,
18
- get: function () { return chunkZXM6LPRV_cjs.createIndex; }
18
+ get: function () { return chunkG5ERTQFX_cjs.createIndex; }
19
19
  });
20
20
  Object.defineProperty(exports, "createQueries", {
21
21
  enumerable: true,
22
- get: function () { return chunkZXM6LPRV_cjs.createQueries; }
22
+ get: function () { return chunkG5ERTQFX_cjs.createQueries; }
23
23
  });
24
24
  Object.defineProperty(exports, "defineEntity", {
25
25
  enumerable: true,
26
- get: function () { return chunkZXM6LPRV_cjs.defineEntity; }
26
+ get: function () { return chunkG5ERTQFX_cjs.defineEntity; }
27
27
  });
28
28
  Object.defineProperty(exports, "extractRequiredAttributes", {
29
29
  enumerable: true,
30
- get: function () { return chunkZXM6LPRV_cjs.extractRequiredAttributes; }
30
+ get: function () { return chunkG5ERTQFX_cjs.extractRequiredAttributes; }
31
31
  });
32
32
  Object.defineProperty(exports, "formatErrorContext", {
33
33
  enumerable: true,
34
- get: function () { return chunkZXM6LPRV_cjs.formatErrorContext; }
34
+ get: function () { return chunkG5ERTQFX_cjs.formatErrorContext; }
35
35
  });
36
36
  Object.defineProperty(exports, "getAwsErrorCode", {
37
37
  enumerable: true,
38
- get: function () { return chunkZXM6LPRV_cjs.getAwsErrorCode; }
38
+ get: function () { return chunkG5ERTQFX_cjs.getAwsErrorCode; }
39
39
  });
40
40
  Object.defineProperty(exports, "getAwsErrorMessage", {
41
41
  enumerable: true,
42
- get: function () { return chunkZXM6LPRV_cjs.getAwsErrorMessage; }
42
+ get: function () { return chunkG5ERTQFX_cjs.getAwsErrorMessage; }
43
43
  });
44
44
  Object.defineProperty(exports, "getErrorSummary", {
45
45
  enumerable: true,
46
- get: function () { return chunkZXM6LPRV_cjs.getErrorSummary; }
46
+ get: function () { return chunkG5ERTQFX_cjs.getErrorSummary; }
47
47
  });
48
48
  Object.defineProperty(exports, "isBatchError", {
49
49
  enumerable: true,
50
- get: function () { return chunkZXM6LPRV_cjs.isBatchError; }
50
+ get: function () { return chunkG5ERTQFX_cjs.isBatchError; }
51
51
  });
52
52
  Object.defineProperty(exports, "isConditionalCheckFailed", {
53
53
  enumerable: true,
54
- get: function () { return chunkZXM6LPRV_cjs.isConditionalCheckFailed; }
54
+ get: function () { return chunkG5ERTQFX_cjs.isConditionalCheckFailed; }
55
55
  });
56
56
  Object.defineProperty(exports, "isConfigurationError", {
57
57
  enumerable: true,
58
- get: function () { return chunkZXM6LPRV_cjs.isConfigurationError; }
58
+ get: function () { return chunkG5ERTQFX_cjs.isConfigurationError; }
59
59
  });
60
60
  Object.defineProperty(exports, "isDynoTableError", {
61
61
  enumerable: true,
62
- get: function () { return chunkZXM6LPRV_cjs.isDynoTableError; }
62
+ get: function () { return chunkG5ERTQFX_cjs.isDynoTableError; }
63
63
  });
64
64
  Object.defineProperty(exports, "isEntityError", {
65
65
  enumerable: true,
66
- get: function () { return chunkZXM6LPRV_cjs.isEntityError; }
66
+ get: function () { return chunkG5ERTQFX_cjs.isEntityError; }
67
67
  });
68
68
  Object.defineProperty(exports, "isEntityValidationError", {
69
69
  enumerable: true,
70
- get: function () { return chunkZXM6LPRV_cjs.isEntityValidationError; }
70
+ get: function () { return chunkG5ERTQFX_cjs.isEntityValidationError; }
71
71
  });
72
72
  Object.defineProperty(exports, "isExpressionError", {
73
73
  enumerable: true,
74
- get: function () { return chunkZXM6LPRV_cjs.isExpressionError; }
74
+ get: function () { return chunkG5ERTQFX_cjs.isExpressionError; }
75
75
  });
76
76
  Object.defineProperty(exports, "isIndexGenerationError", {
77
77
  enumerable: true,
78
- get: function () { return chunkZXM6LPRV_cjs.isIndexGenerationError; }
78
+ get: function () { return chunkG5ERTQFX_cjs.isIndexGenerationError; }
79
79
  });
80
80
  Object.defineProperty(exports, "isKeyGenerationError", {
81
81
  enumerable: true,
82
- get: function () { return chunkZXM6LPRV_cjs.isKeyGenerationError; }
82
+ get: function () { return chunkG5ERTQFX_cjs.isKeyGenerationError; }
83
83
  });
84
84
  Object.defineProperty(exports, "isOperationError", {
85
85
  enumerable: true,
86
- get: function () { return chunkZXM6LPRV_cjs.isOperationError; }
86
+ get: function () { return chunkG5ERTQFX_cjs.isOperationError; }
87
87
  });
88
88
  Object.defineProperty(exports, "isProvisionedThroughputExceeded", {
89
89
  enumerable: true,
90
- get: function () { return chunkZXM6LPRV_cjs.isProvisionedThroughputExceeded; }
90
+ get: function () { return chunkG5ERTQFX_cjs.isProvisionedThroughputExceeded; }
91
91
  });
92
92
  Object.defineProperty(exports, "isRetryableError", {
93
93
  enumerable: true,
94
- get: function () { return chunkZXM6LPRV_cjs.isRetryableError; }
94
+ get: function () { return chunkG5ERTQFX_cjs.isRetryableError; }
95
95
  });
96
96
  Object.defineProperty(exports, "isTransactionCanceled", {
97
97
  enumerable: true,
98
- get: function () { return chunkZXM6LPRV_cjs.isTransactionCanceled; }
98
+ get: function () { return chunkG5ERTQFX_cjs.isTransactionCanceled; }
99
99
  });
100
100
  Object.defineProperty(exports, "isTransactionError", {
101
101
  enumerable: true,
102
- get: function () { return chunkZXM6LPRV_cjs.isTransactionError; }
102
+ get: function () { return chunkG5ERTQFX_cjs.isTransactionError; }
103
103
  });
104
104
  Object.defineProperty(exports, "isValidationError", {
105
105
  enumerable: true,
106
- get: function () { return chunkZXM6LPRV_cjs.isValidationError; }
106
+ get: function () { return chunkG5ERTQFX_cjs.isValidationError; }
107
107
  });
108
108
  Object.defineProperty(exports, "isValidationException", {
109
109
  enumerable: true,
110
- get: function () { return chunkZXM6LPRV_cjs.isValidationException; }
110
+ get: function () { return chunkG5ERTQFX_cjs.isValidationException; }
111
111
  });
112
112
  Object.defineProperty(exports, "partitionKey", {
113
113
  enumerable: true,
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { Table } from './chunk-42LH2UEM.js';
2
- export { createIndex, createQueries, defineEntity, extractRequiredAttributes, formatErrorContext, getAwsErrorCode, getAwsErrorMessage, getErrorSummary, isBatchError, isConditionalCheckFailed, isConfigurationError, isDynoTableError, isEntityError, isEntityValidationError, isExpressionError, isIndexGenerationError, isKeyGenerationError, isOperationError, isProvisionedThroughputExceeded, isRetryableError, isTransactionCanceled, isTransactionError, isValidationError, isValidationException } from './chunk-U6MQGB6Y.js';
2
+ export { createIndex, createQueries, defineEntity, extractRequiredAttributes, formatErrorContext, getAwsErrorCode, getAwsErrorMessage, getErrorSummary, isBatchError, isConditionalCheckFailed, isConfigurationError, isDynoTableError, isEntityError, isEntityValidationError, isExpressionError, isIndexGenerationError, isKeyGenerationError, isOperationError, isProvisionedThroughputExceeded, isRetryableError, isTransactionCanceled, isTransactionError, isValidationError, isValidationException } from './chunk-RNX2DAHA.js';
3
3
  export { partitionKey, sortKey } from './chunk-QVRMYGC4.js';
4
4
  export { BatchBuilder, DeleteBuilder, PutBuilder, QueryBuilder, TransactionBuilder, UpdateBuilder } from './chunk-NYJGW3XH.js';
5
5
  export { BatchError, BatchErrors, ConfigurationError, ConfigurationErrors, DynoTableError, EntityError, EntityErrors, EntityValidationError, ErrorCodes, ExpressionError, ExpressionErrors, IndexErrors, IndexGenerationError, KeyGenerationError, OperationError, OperationErrors, TransactionError, TransactionErrors, ValidationError, ValidationErrors } from './chunk-FF7FYGDH.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dyno-table",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "description": "A TypeScript library to simplify working with DynamoDB",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",