@crombolo/api-delivery 0.63.0 → 0.64.0
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/package.json +4 -4
- package/src/output.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crombolo/api-delivery",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.64.0",
|
|
4
4
|
"description": "Internal to crombolo, with no compatibility promise: use @crombolo/crombolo. Umbraco's Content Delivery API for crombolo: published content and media as JSON, served from the published cache.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Crombolo",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@crombolo/core": "0.
|
|
32
|
-
"@crombolo/contracts": "0.
|
|
33
|
-
"@crombolo/render": "0.
|
|
31
|
+
"@crombolo/core": "0.64.0",
|
|
32
|
+
"@crombolo/contracts": "0.64.0",
|
|
33
|
+
"@crombolo/render": "0.64.0"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/src/output.ts
CHANGED
|
@@ -368,6 +368,11 @@ export async function deliveryValue(
|
|
|
368
368
|
return {
|
|
369
369
|
items: await inOrder(list<BlockItem>(converted), (i) => blockItem(i, ctx, expand, include)),
|
|
370
370
|
}
|
|
371
|
+
// One item, as a list's are, or null (story 345).
|
|
372
|
+
case 'Umbraco.SingleBlock':
|
|
373
|
+
return converted && typeof converted === 'object' && 'content' in converted
|
|
374
|
+
? await blockItem(converted as BlockItem, ctx, expand, include)
|
|
375
|
+
: null
|
|
371
376
|
case 'Umbraco.BlockGrid': {
|
|
372
377
|
const columns = Number(config.gridColumns) || 12
|
|
373
378
|
return {
|