@rvoh/psychic 0.36.0-beta.1 → 0.36.0-beta.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.
@@ -267,11 +267,10 @@ class PsychicController {
267
267
  if (lookup?.length) {
268
268
  const serializer = lookup?.[1];
269
269
  if ((0, dream_1.isDreamSerializer)(serializer)) {
270
- return new dream_1.SerializerRenderer(
271
270
  // passthrough data going into the serializer is the argument that gets
272
271
  // used in the custom attribute callback function
273
- serializer(data, this.defaultSerializerPassthrough),
274
- // passthrough data must be passed both into the serializer and the SerializerRenderer
272
+ return serializer(data, this.defaultSerializerPassthrough).render(
273
+ // passthrough data must be passed both into the serializer and render
275
274
  // because, if the serializer does accept passthrough data, then passing it in is how
276
275
  // it gets into the serializer, but if it does not accept passthrough data, and therefore
277
276
  // does not pass it into the call to DreamSerializer/ObjectSerializer,
@@ -279,7 +278,7 @@ class PsychicController {
279
278
  // handles passing its passthrough data into those
280
279
  this.defaultSerializerPassthrough, {
281
280
  casing: 'camel',
282
- }).render();
281
+ });
283
282
  }
284
283
  }
285
284
  else {
@@ -291,11 +290,10 @@ class PsychicController {
291
290
  if (serializerKey && Object.prototype.hasOwnProperty.call(dreamApp.serializers, serializerKey)) {
292
291
  const serializer = dreamApp.serializers[serializerKey];
293
292
  if (serializer && (0, dream_1.isDreamSerializer)(serializer)) {
294
- return new dream_1.SerializerRenderer(
295
293
  // passthrough data going into the serializer is the argument that gets
296
294
  // used in the custom attribute callback function
297
- serializer(data, this.defaultSerializerPassthrough),
298
- // passthrough data must be passed both into the serializer and the SerializerRenderer
295
+ return serializer(data, this.defaultSerializerPassthrough).render(
296
+ // passthrough data must be passed both into the serializer and render
299
297
  // because, if the serializer does accept passthrough data, then passing it in is how
300
298
  // it gets into the serializer, but if it does not accept passthrough data, and therefore
301
299
  // does not pass it into the call to DreamSerializer/ObjectSerializer,
@@ -303,7 +301,7 @@ class PsychicController {
303
301
  // handles passing its passthrough data into those
304
302
  this.defaultSerializerPassthrough, {
305
303
  casing: 'camel',
306
- }).render();
304
+ });
307
305
  }
308
306
  else {
309
307
  throw new Error(`
@@ -1,4 +1,4 @@
1
- import { DreamApp, GlobalNameNotSet, isDreamSerializer, SerializerRenderer, } from '@rvoh/dream';
1
+ import { DreamApp, GlobalNameNotSet, isDreamSerializer, } from '@rvoh/dream';
2
2
  import ParamValidationError from '../error/controller/ParamValidationError.js';
3
3
  import HttpStatusBadGateway from '../error/http/BadGateway.js';
4
4
  import HttpStatusBadRequest from '../error/http/BadRequest.js';
@@ -261,11 +261,10 @@ export default class PsychicController {
261
261
  if (lookup?.length) {
262
262
  const serializer = lookup?.[1];
263
263
  if (isDreamSerializer(serializer)) {
264
- return new SerializerRenderer(
265
264
  // passthrough data going into the serializer is the argument that gets
266
265
  // used in the custom attribute callback function
267
- serializer(data, this.defaultSerializerPassthrough),
268
- // passthrough data must be passed both into the serializer and the SerializerRenderer
266
+ return serializer(data, this.defaultSerializerPassthrough).render(
267
+ // passthrough data must be passed both into the serializer and render
269
268
  // because, if the serializer does accept passthrough data, then passing it in is how
270
269
  // it gets into the serializer, but if it does not accept passthrough data, and therefore
271
270
  // does not pass it into the call to DreamSerializer/ObjectSerializer,
@@ -273,7 +272,7 @@ export default class PsychicController {
273
272
  // handles passing its passthrough data into those
274
273
  this.defaultSerializerPassthrough, {
275
274
  casing: 'camel',
276
- }).render();
275
+ });
277
276
  }
278
277
  }
279
278
  else {
@@ -285,11 +284,10 @@ export default class PsychicController {
285
284
  if (serializerKey && Object.prototype.hasOwnProperty.call(dreamApp.serializers, serializerKey)) {
286
285
  const serializer = dreamApp.serializers[serializerKey];
287
286
  if (serializer && isDreamSerializer(serializer)) {
288
- return new SerializerRenderer(
289
287
  // passthrough data going into the serializer is the argument that gets
290
288
  // used in the custom attribute callback function
291
- serializer(data, this.defaultSerializerPassthrough),
292
- // passthrough data must be passed both into the serializer and the SerializerRenderer
289
+ return serializer(data, this.defaultSerializerPassthrough).render(
290
+ // passthrough data must be passed both into the serializer and render
293
291
  // because, if the serializer does accept passthrough data, then passing it in is how
294
292
  // it gets into the serializer, but if it does not accept passthrough data, and therefore
295
293
  // does not pass it into the call to DreamSerializer/ObjectSerializer,
@@ -297,7 +295,7 @@ export default class PsychicController {
297
295
  // handles passing its passthrough data into those
298
296
  this.defaultSerializerPassthrough, {
299
297
  casing: 'camel',
300
- }).render();
298
+ });
301
299
  }
302
300
  else {
303
301
  throw new Error(`
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "name": "@rvoh/psychic",
4
4
  "description": "Typescript web framework",
5
- "version": "0.36.0-beta.1",
5
+ "version": "0.36.0-beta.2",
6
6
  "author": "RVOHealth",
7
7
  "repository": {
8
8
  "type": "git",
@@ -60,7 +60,7 @@
60
60
  "devDependencies": {
61
61
  "@eslint/js": "^9.19.0",
62
62
  "@jest-mock/express": "^3.0.0",
63
- "@rvoh/dream": "^0.43.0-beta.1",
63
+ "@rvoh/dream": "^0.43.0-beta.2",
64
64
  "@rvoh/dream-spec-helpers": "^0.2.4",
65
65
  "@rvoh/psychic-spec-helpers": "^0.6.0",
66
66
  "@types/express": "^5.0.1",