@social-mail/social-mail-client 1.9.72 → 1.9.74
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/admin/AdminAppIndex.pack.js +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +1 -1
- package/dist/common/cache/CacheVersions.js +1 -1
- package/dist/public/channel/ChannelApp.pack.js +1 -1
- package/dist/public/channel/ChannelApp.pack.min.js +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.js +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.min.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +1 -1
- package/dist/web/AppIndex.pack.min.js +1 -1
- package/package.json +1 -1
- package/src/common/cache/CacheVersions.ts +1 -1
- package/src/tests/Assert.ts +0 -25
- package/src/tests/services/mime/lines-test.ts +0 -16
- package/src/tests/services/mime/message1.ts +0 -46
- package/src/tests/services/mime/message2.ts +0 -73
- package/src/tests/services/mime/pairs.ts +0 -29
- package/src/tests/services/mime/parse-headers.ts +0 -111
- package/src/tests/services/mime/word-encoding-test.ts +0 -13
- package/src/tests/template-query/template-queries.test.ts +0 -22
package/package.json
CHANGED
package/src/tests/Assert.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export class Assert {
|
|
2
|
-
|
|
3
|
-
static strictEqual(e, t, m?) {
|
|
4
|
-
if (e !== t) {
|
|
5
|
-
throw new Error(m ?? `Assertion failed ${e} !== ${t}`);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
static equal(e, t, m?) {
|
|
10
|
-
// eslint-disable-next-line eqeqeq
|
|
11
|
-
if (e != t) {
|
|
12
|
-
throw new Error(m ?? `Assertion failed ${e} != ${t}`);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
static equalJson(e, t, m?) {
|
|
18
|
-
e = JSON.stringify(e);
|
|
19
|
-
t = JSON.stringify(t);
|
|
20
|
-
// eslint-disable-next-line eqeqeq
|
|
21
|
-
if (e !== t) {
|
|
22
|
-
throw new Error(m ?? `Assertion failed ${e} !== ${t}`);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { tokenize } from "../../../services/mime-service/tokenizer";
|
|
2
|
-
import { Assert } from "../../Assert";
|
|
3
|
-
|
|
4
|
-
export default function () {
|
|
5
|
-
|
|
6
|
-
Assert.equal(
|
|
7
|
-
"a,b",
|
|
8
|
-
Array.from(tokenize("a\nb", "\n")));
|
|
9
|
-
|
|
10
|
-
Assert.equal(
|
|
11
|
-
"a b",
|
|
12
|
-
Array.from(tokenize("a b", "\n")));
|
|
13
|
-
Assert.equal(
|
|
14
|
-
"a,,b",
|
|
15
|
-
Array.from(tokenize("a\n\nb", "\n")));
|
|
16
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { MimeNode } from "../../../services/mime-service/MimeNode";
|
|
2
|
-
import { StringLineStream } from "../../../services/mime-service/stream/LineStream";
|
|
3
|
-
import { Assert } from "../../Assert";
|
|
4
|
-
|
|
5
|
-
const msg1 = `From: Some One <someone@example.com>
|
|
6
|
-
MIME-Version: 1.0
|
|
7
|
-
Content-Type: multipart/mixed;
|
|
8
|
-
boundary="XXXXboundary text"
|
|
9
|
-
|
|
10
|
-
This is a multipart message in MIME format.
|
|
11
|
-
|
|
12
|
-
--XXXXboundary text
|
|
13
|
-
Content-Type: text/plain
|
|
14
|
-
|
|
15
|
-
this is the body text
|
|
16
|
-
|
|
17
|
-
--XXXXboundary text
|
|
18
|
-
Content-Type: text/plain;
|
|
19
|
-
Content-Disposition: attachment;
|
|
20
|
-
filename="test.txt"
|
|
21
|
-
|
|
22
|
-
this is the attachment text
|
|
23
|
-
|
|
24
|
-
--XXXXboundary text--
|
|
25
|
-
|
|
26
|
-
`;
|
|
27
|
-
|
|
28
|
-
export default async function () {
|
|
29
|
-
const root = new MimeNode();
|
|
30
|
-
await root.parse(new StringLineStream(msg1));
|
|
31
|
-
|
|
32
|
-
Assert.strictEqual("multipart/mixed", root.contentType.type);
|
|
33
|
-
Assert.strictEqual("XXXXboundary text", root.contentType.boundary);
|
|
34
|
-
Assert.strictEqual("Some One <someone@example.com>", root.header("from"));
|
|
35
|
-
// Assert.strictEqual("This is a multipart message in MIME format.", root.encoded.trim());
|
|
36
|
-
Assert.strictEqual(2, root.children.length);
|
|
37
|
-
|
|
38
|
-
const body = root.children[0];
|
|
39
|
-
Assert.strictEqual("text/plain", body.contentType.type);
|
|
40
|
-
Assert.strictEqual("this is the body text", body.encoded.trim());
|
|
41
|
-
|
|
42
|
-
const attachment = root.children[1];
|
|
43
|
-
Assert.strictEqual("text/plain", attachment.contentType.type);
|
|
44
|
-
Assert.strictEqual("this is the attachment text", attachment.encoded.trim());
|
|
45
|
-
Assert.strictEqual("test.txt", attachment.contentDisposition.filename);
|
|
46
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { MimeNode } from "../../../services/mime-service/MimeNode";
|
|
2
|
-
import { StringLineStream } from "../../../services/mime-service/stream/LineStream";
|
|
3
|
-
import { BlobWriter } from "../../../services/mime-service/stream/TextWriter";
|
|
4
|
-
import { Assert } from "../../Assert";
|
|
5
|
-
|
|
6
|
-
const msg1 = `From: Some One <someone@example.com>
|
|
7
|
-
MIME-Version: 1.0
|
|
8
|
-
Content-Type: multipart/mixed;
|
|
9
|
-
boundary="XXXXboundary text"
|
|
10
|
-
|
|
11
|
-
This is a multipart message in MIME format.
|
|
12
|
-
|
|
13
|
-
--XXXXboundary text
|
|
14
|
-
Content-Type: text/plain
|
|
15
|
-
|
|
16
|
-
this is the body text
|
|
17
|
-
|
|
18
|
-
--XXXXboundary text
|
|
19
|
-
Content-Type: text/html; charset="UTF-8";
|
|
20
|
-
Content-Transfer-Encoding: quoted-printable
|
|
21
|
-
|
|
22
|
-
<div dir=3D"ltr"><font face=3D"trebuchet ms, sans-serif">Seeking Actors and=
|
|
23
|
-
Actresses for a micro budget feature. The story revolves around a couple a=
|
|
24
|
-
nd their guests who find themselves in a tense and gripping situation. They=
|
|
25
|
-
are taken hostage in their own home by a radical gunman who lurks outside.=
|
|
26
|
-
We are looking for individuals who can bring depth and authenticity to the=
|
|
27
|
-
ir characters. The ability to convey a range of emotions and create believa=
|
|
28
|
-
ble performances is crucial for this project.<br><br>Submit ASAP through:=
|
|
29
|
-
=C2=A0<a href=3D"https://socialmail.in">https://socialmail.in</a><br><br>=
|
|
30
|
-
#newmexicoactors #newmexicocasting=C2=A0</font><br></div>
|
|
31
|
-
|
|
32
|
-
--XXXXboundary text--
|
|
33
|
-
|
|
34
|
-
`;
|
|
35
|
-
|
|
36
|
-
export default async function () {
|
|
37
|
-
const root = new MimeNode();
|
|
38
|
-
await root.parse(new StringLineStream(msg1));
|
|
39
|
-
|
|
40
|
-
assertAll(root);
|
|
41
|
-
|
|
42
|
-
// write and read it again...
|
|
43
|
-
|
|
44
|
-
const blob = new BlobWriter();
|
|
45
|
-
await root.save(blob);
|
|
46
|
-
|
|
47
|
-
const encoded = blob.toString();
|
|
48
|
-
|
|
49
|
-
// reparse...
|
|
50
|
-
const root2 = new MimeNode();
|
|
51
|
-
await root2.parse(new StringLineStream(encoded));
|
|
52
|
-
|
|
53
|
-
assertAll(root2);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function assertAll(root: MimeNode) {
|
|
57
|
-
Assert.strictEqual("multipart/mixed", root.contentType.type);
|
|
58
|
-
Assert.strictEqual("XXXXboundary text", root.contentType.boundary);
|
|
59
|
-
Assert.strictEqual("Some One <someone@example.com>", root.header("from"));
|
|
60
|
-
// Assert.strictEqual("This is a multipart message in MIME format.", root.encoded.trim());
|
|
61
|
-
Assert.strictEqual(2, root.children.length);
|
|
62
|
-
|
|
63
|
-
const body = root.children[0];
|
|
64
|
-
Assert.strictEqual("text/plain", body.contentType.type);
|
|
65
|
-
Assert.strictEqual("this is the body text", body.encoded.trim());
|
|
66
|
-
|
|
67
|
-
const html = root.children[1];
|
|
68
|
-
Assert.strictEqual("text/html", html.contentType.type);
|
|
69
|
-
Assert.strictEqual("quoted-printable", html.contentTransferEncoding);
|
|
70
|
-
|
|
71
|
-
const data = html.text;
|
|
72
|
-
Assert.strictEqual(`<div dir="ltr"><font face="trebuchet ms, sans-serif">Seeking Actors and Actresses for a micro budget feature. The story revolves around a couple and their guests who find themselves in a tense and gripping situation. They are taken hostage in their own home by a radical gunman who lurks outside. We are looking for individuals who can bring depth and authenticity to their characters. The ability to convey a range of emotions and create believable performances is crucial for this project.<br><br>Submit ASAP through: <a href="https://socialmail.in">https://socialmail.in</a><br><br>#newmexicoactors #newmexicocasting </font><br></div>`, data);
|
|
73
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { parsePairs } from "../../../services/mime-service/parsePairs";
|
|
2
|
-
import { Assert } from "../../Assert";
|
|
3
|
-
|
|
4
|
-
export default function() {
|
|
5
|
-
Assert.equalJson(
|
|
6
|
-
parsePairs("multipart/mixed; boundary=--abcd"),
|
|
7
|
-
{
|
|
8
|
-
"multipart/mixed": "multipart/mixed",
|
|
9
|
-
boundary: "--abcd"
|
|
10
|
-
}
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Assert.equalJson(
|
|
15
|
-
parsePairs("multipart/mixed; boundary=--abcd", "type"),
|
|
16
|
-
{
|
|
17
|
-
type: "multipart/mixed",
|
|
18
|
-
boundary: "--abcd"
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
Assert.equalJson(
|
|
23
|
-
parsePairs("multipart/mixed;", "type"),
|
|
24
|
-
{
|
|
25
|
-
type: "multipart/mixed"
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { CIMap, MimeNode } from "../../../services/mime-service/MimeNode";
|
|
2
|
-
import { StringLineStream } from "../../../services/mime-service/stream/LineStream";
|
|
3
|
-
import { Assert } from "../../Assert";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export default async function() {
|
|
7
|
-
|
|
8
|
-
const ci = new CIMap();
|
|
9
|
-
|
|
10
|
-
ci.set("A1", "a1");
|
|
11
|
-
Assert.equal(ci.get("a1"), "a1");
|
|
12
|
-
ci.set("a1", "a2");
|
|
13
|
-
Assert.equal(ci.get("A1"), "a2");
|
|
14
|
-
|
|
15
|
-
const root = new MimeNode();
|
|
16
|
-
await root.parse(new StringLineStream(data));
|
|
17
|
-
|
|
18
|
-
const line = root.header("list-unsubscribe");
|
|
19
|
-
console.log(line);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const data = `Delivered-To: ackava@gmail.com
|
|
23
|
-
Received: by 2002:ab3:fb12:0:b0:55d:606f:316e with SMTP id n18csp92417qnc;
|
|
24
|
-
Mon, 15 Jul 2024 23:31:52 -0700 (PDT)
|
|
25
|
-
X-Google-Smtp-Source: AGHT+IH6CExL3W27oPGLMruurtcQA5CkW5wqoDtPj4M6JjXMJc0nbBOuUbMU5Q8akO/F+0WOnqce
|
|
26
|
-
X-Received: by 2002:a05:6102:14a1:b0:48f:ea45:4887 with SMTP id ada2fe7eead31-4914c4edf1amr1746703137.11.1721111511897;
|
|
27
|
-
Mon, 15 Jul 2024 23:31:51 -0700 (PDT)
|
|
28
|
-
ARC-Seal: i=1; a=rsa-sha256; t=1721111511; cv=none;
|
|
29
|
-
d=google.com; s=arc-20160816;
|
|
30
|
-
b=N0GPNVoa8Da4t9jg6uBYFBvzxKd5i1zYqcy55LVZhzJMJRvsMmCieWIYH/4wBPY2C7
|
|
31
|
-
oLF0lDPZQ6wp3M5hCQpYA6/yBizdWPlympG8cmuA1D7MDUSMcDZ/FKc7vwKKHMa2LEsN
|
|
32
|
-
tPSS1qwY836b9wKmOpYZ8IVG0eI7Qi/9NqICCBmW8Uyur/ZEK+eZyAMDLK3zpDjg8BOw
|
|
33
|
-
fOxqfPjmrDV+xyYMFl+QSdhGAFCSjG+Lh00BsO8uoGmBmxTAvHqGtQ8+i86jX+fn55dW
|
|
34
|
-
Bj7+hGNHE/w9JC60wbGY7A/BZBxr5NJuUbS6lf50AWx8r+KS0+piIbsCiZD1x0cL8aZ+
|
|
35
|
-
lnBg==
|
|
36
|
-
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
|
|
37
|
-
h=mime-version:list-unsubscribe:list-owner:list-subscribe
|
|
38
|
-
:list-unsubscribe-post:list-help:precedence:message-id:from:date
|
|
39
|
-
:subject:to:dkim-signature;
|
|
40
|
-
bh=f6Rq15fNlqiCZ7WKqPaNobIXI+0TpZUM+Nj4isITnpI=;
|
|
41
|
-
fh=hmlPyZWPDmkzfTC20X6uYeCWPkl43Yxy6ifyYfZzmrU=;
|
|
42
|
-
b=hYVMCCcZ2ypLkmeRqGFl5tSMhfIGs9r5Gq/SztqXKJ+BqzaguMzcVpvRKTK8CJBpgq
|
|
43
|
-
KkL0620XPMiBUsUFivvuJHS5nHrsBDOye0fTisTCa+S/QJZVVVTbKCNrV1IbRzfbDoZd
|
|
44
|
-
2BsmLm0mjVQZQhO0W9eZXjlulmw8a9TvFEz/2z9/8/kMAGC22ugTkTQZSwmoSFHjT+EU
|
|
45
|
-
bs8uV8qLLtp1PiKDj4Br4kwJQtc6D8IsZHkIxbnmRts1wylrxr88u1CHZ9/RHScBa6Ga
|
|
46
|
-
ua56Ajf8wuPjnS6RaZD0apIDPyF28DWBNVqcSGH3x4K0W8Rndf0NgXWjGVT1bcB9oVm7
|
|
47
|
-
cr5w==;
|
|
48
|
-
dara=google.com
|
|
49
|
-
ARC-Authentication-Results: i=1; mx.google.com;
|
|
50
|
-
dkim=pass header.i=@bypeople.com header.s=default header.b=QU8Ngf8L;
|
|
51
|
-
spf=pass (google.com: domain of listbounces@bypeople.com designates 64.64.7.193 as permitted sender) smtp.mailfrom=listbounces@bypeople.com
|
|
52
|
-
Return-Path: <listbounces@bypeople.com>
|
|
53
|
-
Received: from bypeople.com (mail.bypeople.com. [64.64.7.193])
|
|
54
|
-
by mx.google.com with ESMTPS id 6a1803df08f44-6b761a03be8si67454336d6.214.2024.07.15.23.31.51
|
|
55
|
-
for <ackava@gmail.com>
|
|
56
|
-
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
|
|
57
|
-
Mon, 15 Jul 2024 23:31:51 -0700 (PDT)
|
|
58
|
-
Received-SPF: pass (google.com: domain of listbounces@bypeople.com designates 64.64.7.193 as permitted sender) client-ip=64.64.7.193;
|
|
59
|
-
Authentication-Results: mx.google.com;
|
|
60
|
-
dkim=pass header.i=@bypeople.com header.s=default header.b=QU8Ngf8L;
|
|
61
|
-
spf=pass (google.com: domain of listbounces@bypeople.com designates 64.64.7.193 as permitted sender) smtp.mailfrom=listbounces@bypeople.com
|
|
62
|
-
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
|
63
|
-
d=bypeople.com; s=default; h=Content-Type:MIME-Version:List-Unsubscribe:
|
|
64
|
-
List-Owner:List-Subscribe:List-Help:Message-ID:From:Date:Subject:To:Sender:
|
|
65
|
-
Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description:
|
|
66
|
-
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
|
|
67
|
-
In-Reply-To:References:List-Id:List-Post:List-Archive;
|
|
68
|
-
bh=f6Rq15fNlqiCZ7WKqPaNobIXI+0TpZUM+Nj4isITnpI=; b=QU8Ngf8LVkZ5Txf/iicBVbrz02
|
|
69
|
-
hltmvhYW8uniAlLZCOaFAM6pI4rA9D3X5GwJQF1VCmu+a/Tt8uijaXJxQGu+cEX/ePY2s/ZuIoZuO
|
|
70
|
-
tFvD7t4yW2E2//EHG2igbD++G+f7xWg3CX5j2TN1lGC0sVU071Ivo2j9RdH81IDEsuTTKP7nmTpgd
|
|
71
|
-
MWtodz14xW/F6IRG+eUEqZkFnuxJtIkh3GFfcWq0yDFpsYn+FwfdcyCJdB+UaMvbKhO1XbrjEYEHc
|
|
72
|
-
gNM3Ad74pg4zZBWsUKMkM0UjhI8v77nOe6KEauvRflHH8Q+pAPdJ/ijS3K+jFl3+fkK77IX9tix55
|
|
73
|
-
jyVGzMyg==;
|
|
74
|
-
Received: from peopleby by new.designshock.com with local (Exim 4.97.1)
|
|
75
|
-
(envelope-from <listbounces@bypeople.com>)
|
|
76
|
-
id 1sTbj5-0000000Blo5-2iZm
|
|
77
|
-
for ackava@gmail.com;
|
|
78
|
-
Tue, 16 Jul 2024 01:31:51 -0500
|
|
79
|
-
To: ackava@gmail.com
|
|
80
|
-
Subject: =?us-ascii?Q?Meet_TshirtDesigns.com_|_3000+_Designs_POD_Read?= =?us-ascii?Q?y,__Lifetime_License!?=
|
|
81
|
-
X-PHP-Originating-Script: 1009:PHPMailer.php
|
|
82
|
-
Date: Tue, 16 Jul 2024 01:31:51 -0500
|
|
83
|
-
From: ByPeople New Project <bp@bypeople.com>
|
|
84
|
-
Message-ID: <wciuWaefXt7RVB1dAEpGxJGiLnRjMH5qpwluY3d6RTE@bypeople.com>
|
|
85
|
-
X-phpList-version: 3.6.7
|
|
86
|
-
X-MessageID: 2601
|
|
87
|
-
X-ListMember: ackava@gmail.com
|
|
88
|
-
Precedence: bulk
|
|
89
|
-
List-Help: =?us-ascii?Q?<http://www.bypeople.com/lists/=3Fp=3Dpreferenc?=
|
|
90
|
-
=?us-ascii?Q?es&uid=3Ddc741e7eb965aacaece6aa3b8e538383>?=
|
|
91
|
-
List-Unsubscribe-Post: List-Unsubscribe=One-Click
|
|
92
|
-
List-Subscribe: <http://www.bypeople.com/lists/?p=subscribe>
|
|
93
|
-
List-Owner: <mailto:listreports@bypeople.com>
|
|
94
|
-
List-Unsubscribe: =?us-ascii?Q?<mailto:abuse@bypeople.com=3Fsubject=3Ddc741e7e?=
|
|
95
|
-
=?us-ascii?Q?b965aacaece6aa3b8e538383>,<http://www.bypeople.?=
|
|
96
|
-
=?us-ascii?Q?com/lists/=3Fp=3Dunsubscribe&uid=3Ddc741e7eb965?=
|
|
97
|
-
=?us-ascii?Q?aacaece6aa3b8e538383>?=
|
|
98
|
-
MIME-Version: 1.0
|
|
99
|
-
Content-Type: multipart/alternative;
|
|
100
|
-
boundary="b1_wciuWaefXt7RVB1dAEpGxJGiLnRjMH5qpwluY3d6RTE"
|
|
101
|
-
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
|
|
102
|
-
X-AntiAbuse: Primary Hostname - new.designshock.com
|
|
103
|
-
X-AntiAbuse: Original Domain - gmail.com
|
|
104
|
-
X-AntiAbuse: Originator/Caller UID/GID - [1009 978] / [47 12]
|
|
105
|
-
X-AntiAbuse: Sender Address Domain - bypeople.com
|
|
106
|
-
X-Get-Message-Sender-Via: new.designshock.com: authenticated_id: peopleby/from_h
|
|
107
|
-
X-Authenticated-Sender: new.designshock.com: bp@bypeople.com
|
|
108
|
-
X-Source:
|
|
109
|
-
X-Source-Args: phpList:PHPlistPB:core-processqueue
|
|
110
|
-
X-Source-Dir: bypeople.com:/public_html/lists/admin
|
|
111
|
-
`;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { wordEncoding } from "../../../services/mime-service/encoder/word-encoding";
|
|
2
|
-
import { Assert } from "../../Assert";
|
|
3
|
-
|
|
4
|
-
export default function () {
|
|
5
|
-
|
|
6
|
-
Assert.equal("a", wordEncoding.decode("a"));
|
|
7
|
-
Assert.equal("Captives (1080 × 1080 px).png", wordEncoding.decode("=?UTF-8?B?Q2FwdGl2ZXMgKDEwODAgw5cgMTA4MCBweCkucG5n?="));
|
|
8
|
-
Assert.equal("Captives (1080 × 1080 px).png", wordEncoding.decode(`=?UTF-8?B?Q2FwdGl2ZXMgKDEwODAgw5cgMTA4MCBweCk=?=
|
|
9
|
-
=?UTF-8?B?LnBuZw==?=`));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Assert.equal("サンプルa b", wordEncoding.decode("=?UTF-8?Q?=E3=82=B5=E3=83=B3=E3=83=97=E3=83=ABa_b?="));
|
|
13
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import TemplateQuery from "../../services/local-db/core/TemplateQuery";
|
|
2
|
-
import { Assert } from "../Assert";
|
|
3
|
-
|
|
4
|
-
export default function() {
|
|
5
|
-
let tq = TemplateQuery.fragments(" AND ");
|
|
6
|
-
tq = tq.add `a === ${4}`;
|
|
7
|
-
tq = tq.add `b === ${5}`;
|
|
8
|
-
|
|
9
|
-
let q = tq.toQuery().toQuery();
|
|
10
|
-
Assert.equal("a === $1 AND b === $2", q.text);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
let o1 = TemplateQuery.fragments(" OR ");
|
|
14
|
-
o1 = o1.add `(a === ${4}`;
|
|
15
|
-
o1 = o1.add `b === ${5})`;
|
|
16
|
-
|
|
17
|
-
tq = tq.add(o1.toQuery());
|
|
18
|
-
|
|
19
|
-
q = tq.toQuery().toQuery();
|
|
20
|
-
Assert.equal("a === $1 AND b === $2 AND (a === $1 OR b === $2)", q.text);
|
|
21
|
-
|
|
22
|
-
}
|