@social-mail/shared 1.0.5 → 1.0.7
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/.gitlab-ci.yml +1 -1
- package/package.json +2 -1
- package/index.d.ts +0 -190
package/.gitlab-ci.yml
CHANGED
|
@@ -7,7 +7,7 @@ build-job: # This job runs in the build stage, which runs first.
|
|
|
7
7
|
tags:
|
|
8
8
|
- tracer-deploy
|
|
9
9
|
script:
|
|
10
|
-
- tsc ./index.js --declaration --allowJs --emitDeclarationOnly --outFile index.d.ts
|
|
10
|
+
- tsc ./index.js --declaration --allowJs --emitDeclarationOnly --outFile ./dist/index.d.ts
|
|
11
11
|
- tssystemjs
|
|
12
12
|
- echo "TS Pack"
|
|
13
13
|
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}">.npmrc
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@social-mail/shared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Shared Repository that contains things like parser etc that is used by both client and server.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"test": "node --enable-source-maps ./test.js",
|
|
9
10
|
"postversion": "git push --follow-tags",
|
package/index.d.ts
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
declare module "src/mime-parser/tokenizer" {
|
|
2
|
-
export function tokenize(text: string, sep?: string): {};
|
|
3
|
-
export function tokenizeMax(text: string, sep: string, max?: number): string[];
|
|
4
|
-
}
|
|
5
|
-
declare module "src/mime-parser/stream/LineStream" {
|
|
6
|
-
export default class LineStream {
|
|
7
|
-
/** @type {AsyncGenerator<string, any, any>} */ g: AsyncGenerator<string, any, any>;
|
|
8
|
-
/**
|
|
9
|
-
* @returns {AsyncGenerator<string, any, any>}
|
|
10
|
-
*/
|
|
11
|
-
read(): AsyncGenerator<string, any, any>;
|
|
12
|
-
/** @returns {AsyncGenerator<string, any,any>} */
|
|
13
|
-
lines(): AsyncGenerator<string, any, any>;
|
|
14
|
-
}
|
|
15
|
-
export class StringLineStream extends LineStream {
|
|
16
|
-
constructor(text: string);
|
|
17
|
-
/** @type {string} */ text: string;
|
|
18
|
-
}
|
|
19
|
-
export class ReadableLineStream extends LineStream {
|
|
20
|
-
constructor(readable: ReadableStream);
|
|
21
|
-
/** @type {ReadableStream} */
|
|
22
|
-
readable: ReadableStream;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
declare module "src/mime-parser/AttachmentFile" {
|
|
26
|
-
export class AttachmentFile extends File {
|
|
27
|
-
constructor(fileBits: BlobPart[], fileName: string, options: FilePropertyBag & {
|
|
28
|
-
disposition?: "inline" | "attachment";
|
|
29
|
-
contentId?: string;
|
|
30
|
-
});
|
|
31
|
-
/** @type {"inline" | "attachment"} */
|
|
32
|
-
disposition: "inline" | "attachment";
|
|
33
|
-
/** @type {string} */
|
|
34
|
-
contentId: string;
|
|
35
|
-
/**
|
|
36
|
-
* Associated mime node if any
|
|
37
|
-
* @type {MimeNode}
|
|
38
|
-
*/
|
|
39
|
-
node: MimeNode;
|
|
40
|
-
}
|
|
41
|
-
import { MimeNode } from "src/mime-parser/MimeNode";
|
|
42
|
-
}
|
|
43
|
-
declare module "src/mime-parser/parsePairs" {
|
|
44
|
-
export function parsePairs(text: string, emptyName: string): {
|
|
45
|
-
toString(): string;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
declare module "src/mime-parser/HeaderContentType" {
|
|
49
|
-
export class HeaderContentType {
|
|
50
|
-
constructor(type: string, charset: string, boundary: string);
|
|
51
|
-
/** @type {string} */ type: string;
|
|
52
|
-
/** @type {string} */ charset: string;
|
|
53
|
-
/** @type {string} */ boundary: string;
|
|
54
|
-
parse(text: string): void;
|
|
55
|
-
toString(): string;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
declare module "src/mime-parser/encoder/RawBuffer" {
|
|
59
|
-
export namespace RawBuffer {
|
|
60
|
-
function decode(bytesAsString: string, encoding?: string): string;
|
|
61
|
-
function encode(text: string, encoding?: string): string;
|
|
62
|
-
function toBase64Async(blob: Blob, asDataUrl?: boolean): boolean;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
declare module "src/mime-parser/encoder/word-encoding" {
|
|
66
|
-
export namespace wordEncoding {
|
|
67
|
-
export { decode };
|
|
68
|
-
export function encode(word: string, ifNeeded?: boolean): string;
|
|
69
|
-
}
|
|
70
|
-
function decode(text: string): string;
|
|
71
|
-
export {};
|
|
72
|
-
}
|
|
73
|
-
declare module "src/mime-parser/HeaderContentDisposition" {
|
|
74
|
-
export class HeaderContentDisposition {
|
|
75
|
-
constructor(type: string, filename: string, name: string);
|
|
76
|
-
/** @type {string} */ type: string;
|
|
77
|
-
/** @type {string} */ filename: string;
|
|
78
|
-
/** @type {string} */ name: string;
|
|
79
|
-
parse(text: string): void;
|
|
80
|
-
toString(): string;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
declare module "src/mime-parser/encoder/base64-to-blob" {
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
* @param {string} base64Data
|
|
87
|
-
* @param {string} contentType
|
|
88
|
-
* @returns
|
|
89
|
-
*/
|
|
90
|
-
export function base64toBlob(base64Data: string, contentType: string): Blob;
|
|
91
|
-
}
|
|
92
|
-
declare module "src/mime-parser/encoder/quoted-printable" {
|
|
93
|
-
export namespace quotedPrintable {
|
|
94
|
-
export { encode };
|
|
95
|
-
export { decode };
|
|
96
|
-
export let version: string;
|
|
97
|
-
}
|
|
98
|
-
function encode(text: any): string;
|
|
99
|
-
function decode(input: any): any;
|
|
100
|
-
export {};
|
|
101
|
-
}
|
|
102
|
-
declare module "src/mime-parser/stream/TextWriter" {
|
|
103
|
-
export default class TextWriter {
|
|
104
|
-
writeLine(line: string): void;
|
|
105
|
-
}
|
|
106
|
-
export class BlobWriter extends TextWriter {
|
|
107
|
-
/** @type {string[]} */
|
|
108
|
-
lines: string[];
|
|
109
|
-
toBlob(): Blob;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
declare module "src/mime-parser/MimeNode" {
|
|
113
|
-
export class CIMap {
|
|
114
|
-
ci: any;
|
|
115
|
-
set(key: any, value: any): any;
|
|
116
|
-
get(key: any): any;
|
|
117
|
-
}
|
|
118
|
-
export class MimeNode {
|
|
119
|
-
static createMessage({ html, subject, text, name, attachments }: {
|
|
120
|
-
html: any;
|
|
121
|
-
subject: any;
|
|
122
|
-
text?: string;
|
|
123
|
-
name?: string;
|
|
124
|
-
attachments?: any[];
|
|
125
|
-
}): MimeNode;
|
|
126
|
-
static create(text: string | File, type: string, id: string): MimeNode;
|
|
127
|
-
constructor(type: string);
|
|
128
|
-
/** @type {string} */ encoded: string;
|
|
129
|
-
/** @type {MimeNode[]} */ children: MimeNode[];
|
|
130
|
-
/** @type {HeaderContentType} */ contentType: HeaderContentType;
|
|
131
|
-
/** @type {HeaderContentDisposition} */ contentDisposition: HeaderContentDisposition;
|
|
132
|
-
set text(v: string);
|
|
133
|
-
/** @returns {string} */
|
|
134
|
-
get text(): string;
|
|
135
|
-
set contentTransferEncoding(v: string);
|
|
136
|
-
/** @returns {string} */
|
|
137
|
-
get contentTransferEncoding(): string;
|
|
138
|
-
/** @type {string} */ textContent: string;
|
|
139
|
-
set blob(v: Blob);
|
|
140
|
-
/** @returns {Blob} */
|
|
141
|
-
get blob(): Blob;
|
|
142
|
-
/** @type {Blob} */ blobData: Blob;
|
|
143
|
-
/** @returns {string} */
|
|
144
|
-
get boundary(): string;
|
|
145
|
-
/** @returns {IterableIterator<MimeNode>} */
|
|
146
|
-
get descendent(): IterableIterator<MimeNode>;
|
|
147
|
-
/** @type {Map<string, string | any>} */ headers: Map<string, string | any>;
|
|
148
|
-
getFirstChild(contentType: string, create?: boolean): any;
|
|
149
|
-
header(name: string): any;
|
|
150
|
-
setHeader(name: string, value: string): void;
|
|
151
|
-
asFile(): Promise<AttachmentFile>;
|
|
152
|
-
attachments(files?: AttachmentFile[]): Promise<AttachmentFile[]>;
|
|
153
|
-
parse(lines: LineStream, last?: string): Promise<void>;
|
|
154
|
-
parseHeaders(lines: LineStream): Promise<void>;
|
|
155
|
-
save(writer: TextWriter): Promise<void>;
|
|
156
|
-
/** @returns {IterableIterator<MimeNode>} */
|
|
157
|
-
enumerate(): IterableIterator<MimeNode>;
|
|
158
|
-
}
|
|
159
|
-
import { HeaderContentType } from "src/mime-parser/HeaderContentType";
|
|
160
|
-
import { HeaderContentDisposition } from "src/mime-parser/HeaderContentDisposition";
|
|
161
|
-
import { AttachmentFile } from "src/mime-parser/AttachmentFile";
|
|
162
|
-
import LineStream from "src/mime-parser/stream/LineStream";
|
|
163
|
-
import TextWriter from "src/mime-parser/stream/TextWriter";
|
|
164
|
-
}
|
|
165
|
-
declare module "src/mime-parser/MimeMessage" {
|
|
166
|
-
export default class MimeMessage {
|
|
167
|
-
static load(reader: ReadableStream | string, name: string, inline: boolean): Promise<MimeMessage>;
|
|
168
|
-
constructor(node?: MimeNode, attachments?: AttachmentFile[]);
|
|
169
|
-
get name(): any;
|
|
170
|
-
set html(v: string);
|
|
171
|
-
get html(): string;
|
|
172
|
-
set text(v: string);
|
|
173
|
-
get text(): string;
|
|
174
|
-
set subject(v: string);
|
|
175
|
-
get subject(): string;
|
|
176
|
-
/** @type {MimeNode} */ node: MimeNode;
|
|
177
|
-
/** @type {AttachmentFile[]} */ attachments: AttachmentFile[];
|
|
178
|
-
save(): Promise<Blob>;
|
|
179
|
-
inlineImages(): Promise<void>;
|
|
180
|
-
}
|
|
181
|
-
import { MimeNode } from "src/mime-parser/MimeNode";
|
|
182
|
-
import { AttachmentFile } from "src/mime-parser/AttachmentFile";
|
|
183
|
-
}
|
|
184
|
-
declare module "index" {
|
|
185
|
-
export { default as MimeMessage } from "./src/mime-parser/MimeMessage.js";
|
|
186
|
-
export { AttachmentFile } from "./src/mime-parser/AttachmentFile.js";
|
|
187
|
-
export { MimeNode } from "./src/mime-parser/MimeNode.js";
|
|
188
|
-
export { StringLineStream, ReadableLineStream } from "./src/mime-parser/stream/LineStream.js";
|
|
189
|
-
export { tokenize, tokenizeMax } from "./src/mime-parser/tokenizer.js";
|
|
190
|
-
}
|