@crombolo/server 0.49.0 → 0.50.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 +13 -13
- package/src/adapters/elements.ts +1 -23
- package/src/bundle-install.ts +6 -1
- package/src/config.ts +1 -1
- package/src/site-file.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crombolo/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"description": "Internal to crombolo, with no compatibility promise: use @crombolo/crombolo. The crombolo HTTP server: routing, configuration, media stores and background jobs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Crombolo",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@crombolo/api-delivery": "0.
|
|
35
|
-
"@crombolo/api-management": "0.
|
|
36
|
-
"@crombolo/auth": "0.
|
|
37
|
-
"@crombolo/backoffice-host": "0.
|
|
38
|
-
"@crombolo/common": "0.
|
|
39
|
-
"@crombolo/content": "0.
|
|
40
|
-
"@crombolo/contracts": "0.
|
|
41
|
-
"@crombolo/core": "0.
|
|
42
|
-
"@crombolo/data": "0.
|
|
43
|
-
"@crombolo/render": "0.
|
|
44
|
-
"@crombolo/schema": "0.
|
|
45
|
-
"@crombolo/transfer": "0.
|
|
34
|
+
"@crombolo/api-delivery": "0.50.0",
|
|
35
|
+
"@crombolo/api-management": "0.50.0",
|
|
36
|
+
"@crombolo/auth": "0.50.0",
|
|
37
|
+
"@crombolo/backoffice-host": "0.50.0",
|
|
38
|
+
"@crombolo/common": "0.50.0",
|
|
39
|
+
"@crombolo/content": "0.50.0",
|
|
40
|
+
"@crombolo/contracts": "0.50.0",
|
|
41
|
+
"@crombolo/core": "0.50.0",
|
|
42
|
+
"@crombolo/data": "0.50.0",
|
|
43
|
+
"@crombolo/render": "0.50.0",
|
|
44
|
+
"@crombolo/schema": "0.50.0",
|
|
45
|
+
"@crombolo/transfer": "0.50.0",
|
|
46
46
|
"@logtape/logtape": "^2.3.8",
|
|
47
47
|
"@opentelemetry/api": "1.10.0",
|
|
48
48
|
"@opentelemetry/context-async-hooks": "3.0.0",
|
package/src/adapters/elements.ts
CHANGED
|
@@ -420,29 +420,7 @@ export function createElementPort(
|
|
|
420
420
|
async folderToRecycleBin(key) {
|
|
421
421
|
const node = await nodes.byKey(key)
|
|
422
422
|
if (!node || node.objectType !== ObjectTypes.ElementContainer) return false
|
|
423
|
-
await
|
|
424
|
-
// The whole branch is trashed, elements inside it included, and an element
|
|
425
|
-
// stays unpublished while it is in the bin.
|
|
426
|
-
const moved = await nodes.byKey(key)
|
|
427
|
-
const branch = `${moved?.path ?? node.path},%`
|
|
428
|
-
await db.q
|
|
429
|
-
.updateTable('node')
|
|
430
|
-
.set({ trashed: db.dialect.boolValue(true) as boolean })
|
|
431
|
-
.where((eb) => eb.or([eb('id', '=', node.id), eb('path', 'like', branch)]))
|
|
432
|
-
.execute()
|
|
433
|
-
await db.q
|
|
434
|
-
.updateTable('document')
|
|
435
|
-
.set({
|
|
436
|
-
published: db.dialect.boolValue(false) as boolean,
|
|
437
|
-
edited: db.dialect.boolValue(true) as boolean,
|
|
438
|
-
})
|
|
439
|
-
.where('node_id', 'in', (eb) =>
|
|
440
|
-
eb
|
|
441
|
-
.selectFrom('node')
|
|
442
|
-
.select('id')
|
|
443
|
-
.where((w) => w.or([w('id', '=', node.id), w('path', 'like', branch)])),
|
|
444
|
-
)
|
|
445
|
-
.execute()
|
|
423
|
+
await folders.toRecycleBin(key, SystemNodes.ElementRecycleBin)
|
|
446
424
|
await changed()
|
|
447
425
|
return true
|
|
448
426
|
},
|
package/src/bundle-install.ts
CHANGED
|
@@ -104,7 +104,12 @@ import {
|
|
|
104
104
|
} from './site-replace.ts'
|
|
105
105
|
|
|
106
106
|
/** The trees a content selector or placement may name. */
|
|
107
|
-
export const CONTENT_OBJECT_TYPES = [
|
|
107
|
+
export const CONTENT_OBJECT_TYPES = [
|
|
108
|
+
ObjectTypes.Document,
|
|
109
|
+
ObjectTypes.Media,
|
|
110
|
+
ObjectTypes.Element,
|
|
111
|
+
ObjectTypes.ElementContainer,
|
|
112
|
+
]
|
|
108
113
|
|
|
109
114
|
/** A refusal the caller should read: nothing was written. */
|
|
110
115
|
export class CommandError extends Error {
|
package/src/config.ts
CHANGED
|
@@ -1086,7 +1086,7 @@ export function describeDatabase(
|
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
|
-
export const VERSION = '0.
|
|
1089
|
+
export const VERSION = '0.50.0'
|
|
1090
1090
|
|
|
1091
1091
|
/** A whole number of seconds from the environment; undefined when unset or not one. */
|
|
1092
1092
|
/** A positive number from a setting, else the default. */
|