@aglyn/tenant-data-admin 1.12.0 → 1.13.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 +7 -7
- package/src/lib/server/erase.js +9 -0
- package/src/lib/server/erase.js.map +1 -1
- package/src/lib/server/placement-access.d.ts +38 -0
- package/src/lib/server/placement-access.js +51 -0
- package/src/lib/server/placement-access.js.map +1 -0
- package/src/lib/server/scope-sharing-sweep.d.ts +114 -0
- package/src/lib/server/scope-sharing-sweep.js +380 -0
- package/src/lib/server/scope-sharing-sweep.js.map +1 -0
- package/src/lib/server/serve-media-cdn.js +6 -5
- package/src/lib/server/serve-media-cdn.js.map +1 -1
- package/src/lib/server/transfer-host.js +16 -0
- package/src/lib/server/transfer-host.js.map +1 -1
- package/src/lib/server/visitor-upload.d.ts +28 -0
- package/src/lib/server/visitor-upload.js +81 -9
- package/src/lib/server/visitor-upload.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aglyn/tenant-data-admin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"homepage": "https://aglyn.com",
|
|
6
6
|
"repository": {
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aglyn/aglyn": "1.
|
|
29
|
-
"@aglyn/shared-util-email": "1.
|
|
30
|
-
"@aglyn/shared-util-fbserver": "1.
|
|
31
|
-
"@aglyn/shared-util-first-touch": "1.
|
|
32
|
-
"@aglyn/shared-util-http": "1.
|
|
33
|
-
"@aglyn/shared-util-tools": "1.
|
|
28
|
+
"@aglyn/aglyn": "1.13.0",
|
|
29
|
+
"@aglyn/shared-util-email": "1.13.0",
|
|
30
|
+
"@aglyn/shared-util-fbserver": "1.13.0",
|
|
31
|
+
"@aglyn/shared-util-first-touch": "1.13.0",
|
|
32
|
+
"@aglyn/shared-util-http": "1.13.0",
|
|
33
|
+
"@aglyn/shared-util-tools": "1.13.0",
|
|
34
34
|
"@msgpack/msgpack": "^3.1.3",
|
|
35
35
|
"@swc/helpers": "0.5.23",
|
|
36
36
|
"sharp": "^0.35.5",
|
package/src/lib/server/erase.js
CHANGED
|
@@ -17,6 +17,7 @@ import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
|
17
17
|
*/ import { FieldValue } from "firebase-admin/firestore";
|
|
18
18
|
import { firebaseAdmin } from "./firebase-admin.js";
|
|
19
19
|
import { eraseMediaDeliveryScope } from "./media-delivery.js";
|
|
20
|
+
import { sweepScopeSharingAfterSiteChange } from "./scope-sharing-sweep.js";
|
|
20
21
|
import { deleteHostProjectionForAllMembers, deleteHostProjectionForUids } from "./host-memberships.js";
|
|
21
22
|
import { detachWorkspaceDomain } from "./workspace-domains.js";
|
|
22
23
|
import { CONSOLE_DOMAINS_COLLECTION, releaseConsoleDomain } from "./console-domains.js";
|
|
@@ -297,6 +298,14 @@ export async function eraseHost(hostId, options = {}) {
|
|
|
297
298
|
console.error(`eraseHost: projection cleanup failed for ${hostId}`, error);
|
|
298
299
|
});
|
|
299
300
|
await eraseHostOwnedOrgDocuments(orgId, hostId);
|
|
301
|
+
// Before the plugins decide what is this site's own: a document shared with
|
|
302
|
+
// all sites except some and reaching only this site comes off it here, so
|
|
303
|
+
// it reads as the workspace's and stays (AGL-4047). Never throws.
|
|
304
|
+
await sweepScopeSharingAfterSiteChange({
|
|
305
|
+
orgId,
|
|
306
|
+
reason: 'site-removed',
|
|
307
|
+
hostId
|
|
308
|
+
});
|
|
300
309
|
// What plugins share with this site alone — a dataset and its records —
|
|
301
310
|
// and this site's place in the sharing of what it shares with others
|
|
302
311
|
// (AGL-4003). Each plugin's share is isolated and never throws here.
|