resora 1.3.18 → 1.3.19

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.
package/dist/index.cjs CHANGED
@@ -1790,7 +1790,7 @@ var GenericResource = class GenericResource extends BaseSerializer {
1790
1790
  * access, but only if data is not an array
1791
1791
  */
1792
1792
  if (source && typeof source === "object" && !Array.isArray(source) && !isArkormLikeCollection(source)) {
1793
- const sourceKeys = isArkormLikeModel(source) ? Object.keys(source.toObject()) : Object.keys(source);
1793
+ const sourceKeys = isArkormLikeModel(source) ? [...new Set([...Object.keys(source.getRawAttributes?.() ?? {}), ...Object.keys(source.toObject())])] : Object.keys(source);
1794
1794
  for (const key of sourceKeys) if (!(key in this)) Object.defineProperty(this, key, {
1795
1795
  enumerable: true,
1796
1796
  configurable: true,
@@ -2453,7 +2453,7 @@ var Resource = class Resource extends BaseSerializer {
2453
2453
  * access, but only if data is not an array
2454
2454
  */
2455
2455
  if (!Array.isArray(source)) {
2456
- const sourceKeys = isArkormLikeModel(source) ? Object.keys(source.toObject()) : Object.keys(source);
2456
+ const sourceKeys = isArkormLikeModel(source) ? [...new Set([...Object.keys(source.getRawAttributes?.() ?? {}), ...Object.keys(source.toObject())])] : Object.keys(source);
2457
2457
  for (const key of sourceKeys) if (!(key in this)) Object.defineProperty(this, key, {
2458
2458
  enumerable: true,
2459
2459
  configurable: true,
package/dist/index.mjs CHANGED
@@ -1761,7 +1761,7 @@ var GenericResource = class GenericResource extends BaseSerializer {
1761
1761
  * access, but only if data is not an array
1762
1762
  */
1763
1763
  if (source && typeof source === "object" && !Array.isArray(source) && !isArkormLikeCollection(source)) {
1764
- const sourceKeys = isArkormLikeModel(source) ? Object.keys(source.toObject()) : Object.keys(source);
1764
+ const sourceKeys = isArkormLikeModel(source) ? [...new Set([...Object.keys(source.getRawAttributes?.() ?? {}), ...Object.keys(source.toObject())])] : Object.keys(source);
1765
1765
  for (const key of sourceKeys) if (!(key in this)) Object.defineProperty(this, key, {
1766
1766
  enumerable: true,
1767
1767
  configurable: true,
@@ -2424,7 +2424,7 @@ var Resource = class Resource extends BaseSerializer {
2424
2424
  * access, but only if data is not an array
2425
2425
  */
2426
2426
  if (!Array.isArray(source)) {
2427
- const sourceKeys = isArkormLikeModel(source) ? Object.keys(source.toObject()) : Object.keys(source);
2427
+ const sourceKeys = isArkormLikeModel(source) ? [...new Set([...Object.keys(source.getRawAttributes?.() ?? {}), ...Object.keys(source.toObject())])] : Object.keys(source);
2428
2428
  for (const key of sourceKeys) if (!(key in this)) Object.defineProperty(this, key, {
2429
2429
  enumerable: true,
2430
2430
  configurable: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resora",
3
- "version": "1.3.18",
3
+ "version": "1.3.19",
4
4
  "description": "A structured API response layer for Node.js and TypeScript with automatic JSON responses, collection support, and pagination handling.",
5
5
  "keywords": [
6
6
  "api",