@social-mail/social-mail-web-server 1.8.422 → 1.8.423
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/dist/server/services/replica/ReplicaReader.d.ts +7 -0
- package/dist/server/services/replica/ReplicaReader.d.ts.map +1 -0
- package/dist/server/services/replica/ReplicaReader.js +45 -0
- package/dist/server/services/replica/ReplicaReader.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/wwwroot/routes/api/files/get.d.ts +2 -2
- package/dist/wwwroot/routes/api/files/get.d.ts.map +1 -1
- package/dist/wwwroot/routes/api/files/get.js +26 -13
- package/dist/wwwroot/routes/api/files/get.js.map +1 -1
- package/dist/wwwroot/routes/social-mail/c/d/[domain]/[type]/[postID]/[fileID]/index.d.ts +2 -3
- package/dist/wwwroot/routes/social-mail/c/d/[domain]/[type]/[postID]/[fileID]/index.d.ts.map +1 -1
- package/dist/wwwroot/routes/social-mail/c/d/[domain]/[type]/[postID]/[fileID]/index.js +9 -5
- package/dist/wwwroot/routes/social-mail/c/d/[domain]/[type]/[postID]/[fileID]/index.js.map +1 -1
- package/dist/wwwroot/routes/social-mail/c/e/[eDomain]/[type]/[eFileContentID]/index.d.ts +2 -3
- package/dist/wwwroot/routes/social-mail/c/e/[eDomain]/[type]/[eFileContentID]/index.d.ts.map +1 -1
- package/dist/wwwroot/routes/social-mail/c/e/[eDomain]/[type]/[eFileContentID]/index.js +9 -5
- package/dist/wwwroot/routes/social-mail/c/e/[eDomain]/[type]/[eFileContentID]/index.js.map +1 -1
- package/dist/wwwroot/routes/social-mail/c/u/[activityID]/[accessCode]/index.d.ts +2 -0
- package/dist/wwwroot/routes/social-mail/c/u/[activityID]/[accessCode]/index.d.ts.map +1 -1
- package/dist/wwwroot/routes/social-mail/c/u/[activityID]/[accessCode]/index.js +7 -2
- package/dist/wwwroot/routes/social-mail/c/u/[activityID]/[accessCode]/index.js.map +1 -1
- package/dist/wwwroot/routes/social-mail/cd/[domain]/[type]/[postID]/[fileID]/index.d.ts +1 -1
- package/dist/wwwroot/routes/social-mail/cd/[domain]/[type]/[postID]/[fileID]/index.d.ts.map +1 -1
- package/dist/wwwroot/routes/social-mail/cd/[domain]/[type]/[postID]/[fileID]/index.js +5 -5
- package/dist/wwwroot/routes/social-mail/cd/[domain]/[type]/[postID]/[fileID]/index.js.map +1 -1
- package/dist/wwwroot/routes/social-mail/fd/[type]/[eFileID]/[eFileContentID]/[name]/index.d.ts +2 -3
- package/dist/wwwroot/routes/social-mail/fd/[type]/[eFileID]/[eFileContentID]/[name]/index.d.ts.map +1 -1
- package/dist/wwwroot/routes/social-mail/fd/[type]/[eFileID]/[eFileContentID]/[name]/index.js +8 -4
- package/dist/wwwroot/routes/social-mail/fd/[type]/[eFileID]/[eFileContentID]/[name]/index.js.map +1 -1
- package/dist/wwwroot/routes/social-mail/social/t/index.d.ts +2 -0
- package/dist/wwwroot/routes/social-mail/social/t/index.d.ts.map +1 -1
- package/dist/wwwroot/routes/social-mail/social/t/index.js +11 -5
- package/dist/wwwroot/routes/social-mail/social/t/index.js.map +1 -1
- package/package.json +1 -1
- package/src/server/services/replica/ReplicaReader.ts +34 -0
- package/src/wwwroot/routes/api/files/get.ts +29 -15
- package/src/wwwroot/routes/social-mail/c/d/[domain]/[type]/[postID]/[fileID]/index.ts +9 -4
- package/src/wwwroot/routes/social-mail/c/e/[eDomain]/[type]/[eFileContentID]/index.ts +9 -4
- package/src/wwwroot/routes/social-mail/c/u/[activityID]/[accessCode]/index.tsx +6 -2
- package/src/wwwroot/routes/social-mail/cd/[domain]/[type]/[postID]/[fileID]/index.ts +4 -4
- package/src/wwwroot/routes/social-mail/fd/[type]/[eFileID]/[eFileContentID]/[name]/index.ts +7 -3
- package/src/wwwroot/routes/social-mail/social/t/index.tsx +9 -3
- package/dist/wwwroot/routes/api/emails/content/attachment/index.d.ts +0 -2
- package/dist/wwwroot/routes/api/emails/content/attachment/index.d.ts.map +0 -1
- package/dist/wwwroot/routes/api/emails/content/attachment/index.js +0 -41
- package/dist/wwwroot/routes/api/emails/content/attachment/index.js.map +0 -1
- package/dist/wwwroot/routes/api/emails/content/html/index.d.ts +0 -2
- package/dist/wwwroot/routes/api/emails/content/html/index.d.ts.map +0 -1
- package/dist/wwwroot/routes/api/emails/content/html/index.js +0 -41
- package/dist/wwwroot/routes/api/emails/content/html/index.js.map +0 -1
- package/src/wwwroot/routes/api/emails/content/attachment/index.ts +0 -53
- package/src/wwwroot/routes/api/emails/content/html/index.ts +0 -52
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReplicaReader.d.ts","sourceRoot":"","sources":["../../../../src/server/services/replica/ReplicaReader.ts"],"names":[],"mappings":"AAEA,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AAIjE,MAAM,CAAC,OAAO,OAAO,aAAa;IAG9B,OAAO,CAAC,OAAO,CAA4B;IAG3C,OAAO,CAAC,EAAE,CAAoB;IAExB,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAmBvE"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import Inject, { RegisterScoped } from "@entity-access/entity-access/dist/di/di.js";
|
|
11
|
+
import ReadOnlySocialMailContext from "../../model/ReadOnlySocialMailContext.js";
|
|
12
|
+
import SocialMailContext from "../../model/SocialMailContext.js";
|
|
13
|
+
import { globalEnv } from "../../../common/globalEnv.js";
|
|
14
|
+
let ReplicaReader = class ReplicaReader {
|
|
15
|
+
async query(fx) {
|
|
16
|
+
if (globalEnv.db.readOnlyReplica === globalEnv.db.host) {
|
|
17
|
+
return fx(this.db);
|
|
18
|
+
}
|
|
19
|
+
const result = await fx(this.replica);
|
|
20
|
+
if (result) {
|
|
21
|
+
if (Array.isArray(result)) {
|
|
22
|
+
if (result.length) {
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return await fx(this.db);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
__decorate([
|
|
34
|
+
Inject,
|
|
35
|
+
__metadata("design:type", ReadOnlySocialMailContext)
|
|
36
|
+
], ReplicaReader.prototype, "replica", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
Inject,
|
|
39
|
+
__metadata("design:type", SocialMailContext)
|
|
40
|
+
], ReplicaReader.prototype, "db", void 0);
|
|
41
|
+
ReplicaReader = __decorate([
|
|
42
|
+
RegisterScoped
|
|
43
|
+
], ReplicaReader);
|
|
44
|
+
export default ReplicaReader;
|
|
45
|
+
//# sourceMappingURL=ReplicaReader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReplicaReader.js","sourceRoot":"","sources":["../../../../src/server/services/replica/ReplicaReader.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,MAAM,EAAE,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,yBAAyB,MAAM,0CAA0C,CAAC;AACjF,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAG1C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAQ9B,KAAK,CAAC,KAAK,CAAI,EAAwC;QAEnD,IAAI,SAAS,CAAC,EAAE,CAAC,eAAe,KAAK,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACrD,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACvB,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,MAAM,EAAE,CAAC;YACT,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;gBACxB,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;oBAChB,OAAO,MAAM,CAAC;gBAClB,CAAC;YACL,CAAC;iBAAM,CAAC;gBACJ,OAAO,MAAM,CAAC;YAClB,CAAC;QACL,CAAC;QACD,OAAO,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;CAEJ,CAAA;AAxBW;IADP,MAAM;8BACU,yBAAyB;8CAAC;AAGnC;IADP,MAAM;8BACK,iBAAiB;yCAAC;AANb,aAAa;IADjC,cAAc;GACM,aAAa,CA2BjC;eA3BoB,aAAa"}
|