@crombolo/content 0.73.2 → 0.74.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 +3 -3
- package/src/workspace-merge-run.ts +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crombolo/content",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.74.0",
|
|
4
4
|
"description": "Internal to crombolo, with no compatibility promise: use @crombolo/crombolo. The rules every page, media and Library write follows, whoever starts it: who may, where it may go, approvals, and what it announces. No transport.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Crombolo",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@crombolo/core": "0.
|
|
33
|
-
"@crombolo/data": "0.
|
|
32
|
+
"@crombolo/core": "0.74.0",
|
|
33
|
+
"@crombolo/data": "0.74.0"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -397,6 +397,17 @@ export async function runWorkspaceMerge(
|
|
|
397
397
|
}
|
|
398
398
|
// Story 381: the merge is a change, its files and pages each with before and after.
|
|
399
399
|
const changeId = await recordChange(tx, list, options, items, pages, merged)
|
|
400
|
+
// Story 400: each workspace the merge closed, announced with the change it made.
|
|
401
|
+
if (options.only === undefined) {
|
|
402
|
+
const made = await new ChangeRepository(tx).byId(changeId)
|
|
403
|
+
if (made)
|
|
404
|
+
for (const workspace of list)
|
|
405
|
+
await workspaces.announceMerged(
|
|
406
|
+
workspace.id,
|
|
407
|
+
{ key: made.key, name: made.name },
|
|
408
|
+
options.userKey ?? null,
|
|
409
|
+
)
|
|
410
|
+
}
|
|
400
411
|
const alone = options.only === undefined ? undefined : merged[0]
|
|
401
412
|
if (alone?.published)
|
|
402
413
|
await options.events.ownPublished?.(tx, { changeId, key: alone.key }, options.actor)
|