@zthun/helpful-internet 9.6.0 → 9.9.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/dist/index.cjs +305 -574
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +305 -574
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -4,25 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Represents a generic cookie.
|
|
7
|
-
*/ function
|
|
8
|
-
if (!(instance instanceof Constructor)) {
|
|
9
|
-
throw new TypeError("Cannot call a class as a function");
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
function _defineProperties$5(target, props) {
|
|
13
|
-
for(var i = 0; i < props.length; i++){
|
|
14
|
-
var descriptor = props[i];
|
|
15
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
16
|
-
descriptor.configurable = true;
|
|
17
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
18
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function _create_class$5(Constructor, protoProps, staticProps) {
|
|
22
|
-
if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
|
|
23
|
-
return Constructor;
|
|
24
|
-
}
|
|
25
|
-
function _define_property$5(obj, key, value) {
|
|
7
|
+
*/ function _define_property$5(obj, key, value) {
|
|
26
8
|
if (key in obj) {
|
|
27
9
|
Object.defineProperty(obj, key, {
|
|
28
10
|
value: value,
|
|
@@ -35,54 +17,10 @@ function _define_property$5(obj, key, value) {
|
|
|
35
17
|
}
|
|
36
18
|
return obj;
|
|
37
19
|
}
|
|
38
|
-
function _object_spread(target) {
|
|
39
|
-
for(var i = 1; i < arguments.length; i++){
|
|
40
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
41
|
-
var ownKeys = Object.keys(source);
|
|
42
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
43
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
44
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
45
|
-
}));
|
|
46
|
-
}
|
|
47
|
-
ownKeys.forEach(function(key) {
|
|
48
|
-
_define_property$5(target, key, source[key]);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return target;
|
|
52
|
-
}
|
|
53
20
|
/**
|
|
54
21
|
* Represents a builder for an IZCookie object.
|
|
55
|
-
*/
|
|
56
|
-
|
|
57
|
-
_class_call_check$5(this, ZCookieBuilder);
|
|
58
|
-
_define_property$5(this, "_cookie", void 0);
|
|
59
|
-
/**
|
|
60
|
-
* Removes the cookie expiration.
|
|
61
|
-
*
|
|
62
|
-
* @returns
|
|
63
|
-
* This object.
|
|
64
|
-
*/ _define_property$5(this, "immortal", this.expires.bind(this, undefined));
|
|
65
|
-
/**
|
|
66
|
-
* Sets the same site policy to 'lax'
|
|
67
|
-
*
|
|
68
|
-
* @returns
|
|
69
|
-
* This object.
|
|
70
|
-
*/ _define_property$5(this, "lax", this.sameSite.bind(this, "lax"));
|
|
71
|
-
/**
|
|
72
|
-
* Sets the same site polity to 'strict'
|
|
73
|
-
*
|
|
74
|
-
* @returns
|
|
75
|
-
* This object.
|
|
76
|
-
*/ _define_property$5(this, "strict", this.sameSite.bind(this, "strict"));
|
|
77
|
-
this._cookie = {
|
|
78
|
-
name: "",
|
|
79
|
-
value: ""
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
_create_class$5(ZCookieBuilder, [
|
|
83
|
-
{
|
|
84
|
-
key: "name",
|
|
85
|
-
value: /**
|
|
22
|
+
*/ class ZCookieBuilder {
|
|
23
|
+
/**
|
|
86
24
|
* Sets the cookie name.
|
|
87
25
|
*
|
|
88
26
|
* @param val -
|
|
@@ -90,14 +28,11 @@ function _object_spread(target) {
|
|
|
90
28
|
*
|
|
91
29
|
* @returns
|
|
92
30
|
* This object.
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
{
|
|
99
|
-
key: "value",
|
|
100
|
-
value: /**
|
|
31
|
+
*/ name(val) {
|
|
32
|
+
this._cookie.name = val;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
101
36
|
* Sets the cookie value.
|
|
102
37
|
*
|
|
103
38
|
* @param val -
|
|
@@ -105,14 +40,11 @@ function _object_spread(target) {
|
|
|
105
40
|
*
|
|
106
41
|
* @returns
|
|
107
42
|
* This object.
|
|
108
|
-
*/
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
key: "domain",
|
|
115
|
-
value: /**
|
|
43
|
+
*/ value(val) {
|
|
44
|
+
this._cookie.value = val;
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
116
48
|
* Sets the cookie domain.
|
|
117
49
|
*
|
|
118
50
|
* @param val -
|
|
@@ -120,14 +52,11 @@ function _object_spread(target) {
|
|
|
120
52
|
*
|
|
121
53
|
* @returns
|
|
122
54
|
* This object.
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
{
|
|
129
|
-
key: "expires",
|
|
130
|
-
value: /**
|
|
55
|
+
*/ domain(val) {
|
|
56
|
+
this._cookie.domain = val;
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
131
60
|
* Sets the cookie expiration date.
|
|
132
61
|
*
|
|
133
62
|
* @param val -
|
|
@@ -135,29 +64,23 @@ function _object_spread(target) {
|
|
|
135
64
|
*
|
|
136
65
|
* @returns
|
|
137
66
|
* This object.
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
{
|
|
148
|
-
key: "expiresTomorrow",
|
|
149
|
-
value: /**
|
|
67
|
+
*/ expires(val) {
|
|
68
|
+
if (val == null) {
|
|
69
|
+
delete this._cookie.expires;
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
this._cookie.expires = typeof val === "string" ? val : val.toJSON();
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
150
76
|
* Sets the cookie expiration date to one day from the moment this is invoked.
|
|
151
77
|
*
|
|
152
78
|
* @returns
|
|
153
79
|
* This object.
|
|
154
|
-
*/
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
{
|
|
159
|
-
key: "secure",
|
|
160
|
-
value: /**
|
|
80
|
+
*/ expiresTomorrow() {
|
|
81
|
+
return this.expires(new Date(Date.now() + ZCookieBuilder.MillisecondsOneDay));
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
161
84
|
* Sets the cookie secure flag.
|
|
162
85
|
*
|
|
163
86
|
* @param val -
|
|
@@ -165,15 +88,11 @@ function _object_spread(target) {
|
|
|
165
88
|
*
|
|
166
89
|
* @returns
|
|
167
90
|
* This object.
|
|
168
|
-
*/
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
key: "sameSite",
|
|
176
|
-
value: /**
|
|
91
|
+
*/ secure(val = true) {
|
|
92
|
+
this._cookie.secure = val;
|
|
93
|
+
return this;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
177
96
|
* Sets the cookie same site policy.
|
|
178
97
|
*
|
|
179
98
|
* @param val -
|
|
@@ -181,25 +100,19 @@ function _object_spread(target) {
|
|
|
181
100
|
*
|
|
182
101
|
* @returns
|
|
183
102
|
* This object.
|
|
184
|
-
*/
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
{
|
|
190
|
-
key: "allowCrossSite",
|
|
191
|
-
value: /**
|
|
103
|
+
*/ sameSite(val) {
|
|
104
|
+
this._cookie.sameSite = val;
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
192
108
|
* Sets the same site policy to 'none' and turns on the secure flag.
|
|
193
109
|
*
|
|
194
110
|
* @returns
|
|
195
111
|
* This object.
|
|
196
|
-
*/
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
{
|
|
201
|
-
key: "httpOnly",
|
|
202
|
-
value: /**
|
|
112
|
+
*/ allowCrossSite() {
|
|
113
|
+
return this.secure().sameSite("none");
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
203
116
|
* Sets the cookie http only flag.
|
|
204
117
|
*
|
|
205
118
|
* @param val -
|
|
@@ -207,15 +120,11 @@ function _object_spread(target) {
|
|
|
207
120
|
*
|
|
208
121
|
* @returns
|
|
209
122
|
* This object.
|
|
210
|
-
*/
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
key: "authentication",
|
|
218
|
-
value: /**
|
|
123
|
+
*/ httpOnly(val = true) {
|
|
124
|
+
this._cookie.httpOnly = val;
|
|
125
|
+
return this;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
219
128
|
* Creates a token based authentication cookie.
|
|
220
129
|
*
|
|
221
130
|
* @param token -
|
|
@@ -225,45 +134,50 @@ function _object_spread(target) {
|
|
|
225
134
|
*
|
|
226
135
|
* @returns
|
|
227
136
|
* This object.
|
|
228
|
-
*/
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
{
|
|
234
|
-
key: "build",
|
|
235
|
-
value: /**
|
|
137
|
+
*/ authentication(token) {
|
|
138
|
+
const builder = this.name("Authentication").expiresTomorrow().secure().httpOnly();
|
|
139
|
+
return token == null ? builder : builder.value(token);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
236
142
|
* Returns a copy of the built instance of the cookie.
|
|
237
143
|
*
|
|
238
144
|
* @returns
|
|
239
145
|
* A shallow copy of the current cookie object.
|
|
240
|
-
*/
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
]);
|
|
245
|
-
return ZCookieBuilder;
|
|
246
|
-
}();
|
|
247
|
-
_define_property$5(ZCookieBuilder, "MillisecondsOneDay", 86400000);
|
|
248
|
-
|
|
249
|
-
function _class_call_check$4(instance, Constructor) {
|
|
250
|
-
if (!(instance instanceof Constructor)) {
|
|
251
|
-
throw new TypeError("Cannot call a class as a function");
|
|
146
|
+
*/ build() {
|
|
147
|
+
return {
|
|
148
|
+
...this._cookie
|
|
149
|
+
};
|
|
252
150
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
151
|
+
/**
|
|
152
|
+
* Initializes a new instance of this object.
|
|
153
|
+
*/ constructor(){
|
|
154
|
+
_define_property$5(this, "_cookie", void 0);
|
|
155
|
+
/**
|
|
156
|
+
* Removes the cookie expiration.
|
|
157
|
+
*
|
|
158
|
+
* @returns
|
|
159
|
+
* This object.
|
|
160
|
+
*/ _define_property$5(this, "immortal", this.expires.bind(this, undefined));
|
|
161
|
+
/**
|
|
162
|
+
* Sets the same site policy to 'lax'
|
|
163
|
+
*
|
|
164
|
+
* @returns
|
|
165
|
+
* This object.
|
|
166
|
+
*/ _define_property$5(this, "lax", this.sameSite.bind(this, "lax"));
|
|
167
|
+
/**
|
|
168
|
+
* Sets the same site polity to 'strict'
|
|
169
|
+
*
|
|
170
|
+
* @returns
|
|
171
|
+
* This object.
|
|
172
|
+
*/ _define_property$5(this, "strict", this.sameSite.bind(this, "strict"));
|
|
173
|
+
this._cookie = {
|
|
174
|
+
name: "",
|
|
175
|
+
value: ""
|
|
176
|
+
};
|
|
261
177
|
}
|
|
262
178
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
return Constructor;
|
|
266
|
-
}
|
|
179
|
+
_define_property$5(ZCookieBuilder, "MillisecondsOneDay", 86400000);
|
|
180
|
+
|
|
267
181
|
function _define_property$4(obj, key, value) {
|
|
268
182
|
if (key in obj) {
|
|
269
183
|
Object.defineProperty(obj, key, {
|
|
@@ -280,16 +194,8 @@ function _define_property$4(obj, key, value) {
|
|
|
280
194
|
/**
|
|
281
195
|
* Represents a builder that will build a comma separated
|
|
282
196
|
* list of addresses for an email message.
|
|
283
|
-
*/
|
|
284
|
-
|
|
285
|
-
_class_call_check$4(this, ZEmailContactAddressBuilder);
|
|
286
|
-
_define_property$4(this, "_addresses", []);
|
|
287
|
-
_define_property$4(this, "_delimiter", ", ");
|
|
288
|
-
}
|
|
289
|
-
_create_class$4(ZEmailContactAddressBuilder, [
|
|
290
|
-
{
|
|
291
|
-
key: "address",
|
|
292
|
-
value: /**
|
|
197
|
+
*/ class ZEmailContactAddressBuilder {
|
|
198
|
+
/**
|
|
293
199
|
* Adds an address to the list to builder.
|
|
294
200
|
*
|
|
295
201
|
* @param val -
|
|
@@ -298,14 +204,11 @@ function _define_property$4(obj, key, value) {
|
|
|
298
204
|
*
|
|
299
205
|
* @returns
|
|
300
206
|
* This object.
|
|
301
|
-
*/
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
{
|
|
307
|
-
key: "addresses",
|
|
308
|
-
value: /**
|
|
207
|
+
*/ address(val) {
|
|
208
|
+
this._addresses.push(val);
|
|
209
|
+
return this;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
309
212
|
* Sets the addresses to build from.
|
|
310
213
|
*
|
|
311
214
|
* @param val -
|
|
@@ -313,14 +216,11 @@ function _define_property$4(obj, key, value) {
|
|
|
313
216
|
*
|
|
314
217
|
* @returns
|
|
315
218
|
* This object.
|
|
316
|
-
*/
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
{
|
|
322
|
-
key: "delimiter",
|
|
323
|
-
value: /**
|
|
219
|
+
*/ addresses(val) {
|
|
220
|
+
this._addresses = val.slice();
|
|
221
|
+
return this;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
324
224
|
* Sets the delimiter to split the addresses with.
|
|
325
225
|
*
|
|
326
226
|
* The default is a comma with a space.
|
|
@@ -330,56 +230,36 @@ function _define_property$4(obj, key, value) {
|
|
|
330
230
|
*
|
|
331
231
|
* @returns
|
|
332
232
|
* This object.
|
|
333
|
-
*/
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
{
|
|
339
|
-
key: "build",
|
|
340
|
-
value: /**
|
|
233
|
+
*/ delimiter(val) {
|
|
234
|
+
this._delimiter = val;
|
|
235
|
+
return this;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
341
238
|
* Builds the delimiters separated list of addresses.
|
|
342
239
|
*
|
|
343
240
|
* @returns
|
|
344
241
|
* The delimited separated list of addresses.
|
|
345
|
-
*/
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
return typeof ct === "string" ? ct : ct.address;
|
|
351
|
-
};
|
|
352
|
-
var truthy = function(ct) {
|
|
353
|
-
return !!ct;
|
|
354
|
-
};
|
|
355
|
-
return this._addresses.map(addr).filter(truthy).join(this._delimiter);
|
|
242
|
+
*/ build() {
|
|
243
|
+
const addr = (ct)=>{
|
|
244
|
+
if (!ct) {
|
|
245
|
+
return undefined;
|
|
356
246
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
* Represents an email contact.
|
|
364
|
-
*/ function _class_call_check$3(instance, Constructor) {
|
|
365
|
-
if (!(instance instanceof Constructor)) {
|
|
366
|
-
throw new TypeError("Cannot call a class as a function");
|
|
247
|
+
return typeof ct === "string" ? ct : ct.address;
|
|
248
|
+
};
|
|
249
|
+
const truthy = (ct)=>{
|
|
250
|
+
return !!ct;
|
|
251
|
+
};
|
|
252
|
+
return this._addresses.map(addr).filter(truthy).join(this._delimiter);
|
|
367
253
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
var descriptor = props[i];
|
|
372
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
373
|
-
descriptor.configurable = true;
|
|
374
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
375
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
254
|
+
constructor(){
|
|
255
|
+
_define_property$4(this, "_addresses", []);
|
|
256
|
+
_define_property$4(this, "_delimiter", ", ");
|
|
376
257
|
}
|
|
377
258
|
}
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
function _define_property$3(obj, key, value) {
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Represents an email contact.
|
|
262
|
+
*/ function _define_property$3(obj, key, value) {
|
|
383
263
|
if (key in obj) {
|
|
384
264
|
Object.defineProperty(obj, key, {
|
|
385
265
|
value: value,
|
|
@@ -394,18 +274,8 @@ function _define_property$3(obj, key, value) {
|
|
|
394
274
|
}
|
|
395
275
|
/**
|
|
396
276
|
* Represents a builder for an email contact.
|
|
397
|
-
*/
|
|
398
|
-
|
|
399
|
-
_class_call_check$3(this, ZEmailContactBuilder);
|
|
400
|
-
_define_property$3(this, "_contact", void 0);
|
|
401
|
-
this._contact = {
|
|
402
|
-
address: ""
|
|
403
|
-
};
|
|
404
|
-
}
|
|
405
|
-
_create_class$3(ZEmailContactBuilder, [
|
|
406
|
-
{
|
|
407
|
-
key: "address",
|
|
408
|
-
value: /**
|
|
277
|
+
*/ class ZEmailContactBuilder {
|
|
278
|
+
/**
|
|
409
279
|
* Sets the address of the contact.
|
|
410
280
|
*
|
|
411
281
|
* @param val -
|
|
@@ -413,14 +283,11 @@ function _define_property$3(obj, key, value) {
|
|
|
413
283
|
*
|
|
414
284
|
* @returns
|
|
415
285
|
* This object.
|
|
416
|
-
*/
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
{
|
|
422
|
-
key: "type",
|
|
423
|
-
value: /**
|
|
286
|
+
*/ address(val) {
|
|
287
|
+
this._contact.address = val;
|
|
288
|
+
return this;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
424
291
|
* Sets the type of the contact.
|
|
425
292
|
*
|
|
426
293
|
* @param val -
|
|
@@ -428,14 +295,11 @@ function _define_property$3(obj, key, value) {
|
|
|
428
295
|
*
|
|
429
296
|
* @returns
|
|
430
297
|
* This object.
|
|
431
|
-
*/
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
{
|
|
437
|
-
key: "display",
|
|
438
|
-
value: /**
|
|
298
|
+
*/ type(val) {
|
|
299
|
+
this._contact.type = val;
|
|
300
|
+
return this;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
439
303
|
* Sets the display of the contact.
|
|
440
304
|
*
|
|
441
305
|
* @param val -
|
|
@@ -443,14 +307,11 @@ function _define_property$3(obj, key, value) {
|
|
|
443
307
|
*
|
|
444
308
|
* @returns
|
|
445
309
|
* This object.
|
|
446
|
-
*/
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
{
|
|
452
|
-
key: "assign",
|
|
453
|
-
value: /**
|
|
310
|
+
*/ display(val) {
|
|
311
|
+
this._contact.display = val;
|
|
312
|
+
return this;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
454
315
|
* Assigns the values in other to this object.
|
|
455
316
|
*
|
|
456
317
|
* @param other -
|
|
@@ -458,15 +319,12 @@ function _define_property$3(obj, key, value) {
|
|
|
458
319
|
*
|
|
459
320
|
* @returns
|
|
460
321
|
* This object.
|
|
461
|
-
*/
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
{
|
|
468
|
-
key: "copy",
|
|
469
|
-
value: /**
|
|
322
|
+
*/ assign(other) {
|
|
323
|
+
this._contact = Object.assign({}, this._contact, other);
|
|
324
|
+
this._contact = JSON.parse(JSON.stringify(this._contact));
|
|
325
|
+
return this;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
470
328
|
* Copies another object.
|
|
471
329
|
*
|
|
472
330
|
* @param other -
|
|
@@ -474,44 +332,28 @@ function _define_property$3(obj, key, value) {
|
|
|
474
332
|
*
|
|
475
333
|
* @returns
|
|
476
334
|
* This object.
|
|
477
|
-
*/
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
{
|
|
483
|
-
key: "build",
|
|
484
|
-
value: /**
|
|
335
|
+
*/ copy(other) {
|
|
336
|
+
this._contact = JSON.parse(JSON.stringify(other));
|
|
337
|
+
return this;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
485
340
|
* Returns a copy of the built object.
|
|
486
341
|
*
|
|
487
342
|
* @returns
|
|
488
343
|
* A copy of the built email contact.
|
|
489
|
-
*/
|
|
490
|
-
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
]);
|
|
494
|
-
return ZEmailContactBuilder;
|
|
495
|
-
}();
|
|
496
|
-
|
|
497
|
-
function _class_call_check$2(instance, Constructor) {
|
|
498
|
-
if (!(instance instanceof Constructor)) {
|
|
499
|
-
throw new TypeError("Cannot call a class as a function");
|
|
344
|
+
*/ build() {
|
|
345
|
+
return JSON.parse(JSON.stringify(this._contact));
|
|
500
346
|
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
347
|
+
/**
|
|
348
|
+
* Initializes a new instance of this object.
|
|
349
|
+
*/ constructor(){
|
|
350
|
+
_define_property$3(this, "_contact", void 0);
|
|
351
|
+
this._contact = {
|
|
352
|
+
address: ""
|
|
353
|
+
};
|
|
509
354
|
}
|
|
510
355
|
}
|
|
511
|
-
|
|
512
|
-
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
513
|
-
return Constructor;
|
|
514
|
-
}
|
|
356
|
+
|
|
515
357
|
function _define_property$2(obj, key, value) {
|
|
516
358
|
if (key in obj) {
|
|
517
359
|
Object.defineProperty(obj, key, {
|
|
@@ -527,18 +369,8 @@ function _define_property$2(obj, key, value) {
|
|
|
527
369
|
}
|
|
528
370
|
/**
|
|
529
371
|
* Represents a builder for an email envelope.
|
|
530
|
-
*/
|
|
531
|
-
|
|
532
|
-
_class_call_check$2(this, ZEmailEnvelopeBuilder);
|
|
533
|
-
_define_property$2(this, "_envelope", void 0);
|
|
534
|
-
this._envelope = {
|
|
535
|
-
from: ""
|
|
536
|
-
};
|
|
537
|
-
}
|
|
538
|
-
_create_class$2(ZEmailEnvelopeBuilder, [
|
|
539
|
-
{
|
|
540
|
-
key: "from",
|
|
541
|
-
value: /**
|
|
372
|
+
*/ class ZEmailEnvelopeBuilder {
|
|
373
|
+
/**
|
|
542
374
|
* Sets the from field.
|
|
543
375
|
*
|
|
544
376
|
* @param val -
|
|
@@ -546,14 +378,11 @@ function _define_property$2(obj, key, value) {
|
|
|
546
378
|
*
|
|
547
379
|
* @returns
|
|
548
380
|
* This object.
|
|
549
|
-
*/
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
{
|
|
555
|
-
key: "to",
|
|
556
|
-
value: /**
|
|
381
|
+
*/ from(val) {
|
|
382
|
+
this._envelope.from = val;
|
|
383
|
+
return this;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
557
386
|
* Adds a value to the 'to' field.
|
|
558
387
|
*
|
|
559
388
|
* @param val -
|
|
@@ -561,15 +390,12 @@ function _define_property$2(obj, key, value) {
|
|
|
561
390
|
*
|
|
562
391
|
* @returns
|
|
563
392
|
* This object.
|
|
564
|
-
*/
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
{
|
|
571
|
-
key: "tos",
|
|
572
|
-
value: /**
|
|
393
|
+
*/ to(val) {
|
|
394
|
+
this._envelope.to = this._envelope.to || [];
|
|
395
|
+
this._envelope.to.push(val);
|
|
396
|
+
return this;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
573
399
|
* Sets the to field.
|
|
574
400
|
*
|
|
575
401
|
* @param val -
|
|
@@ -577,14 +403,11 @@ function _define_property$2(obj, key, value) {
|
|
|
577
403
|
*
|
|
578
404
|
* @returns
|
|
579
405
|
* This object.
|
|
580
|
-
*/
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
{
|
|
586
|
-
key: "cc",
|
|
587
|
-
value: /**
|
|
406
|
+
*/ tos(val) {
|
|
407
|
+
this._envelope.to = val;
|
|
408
|
+
return this;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
588
411
|
* Adds a value to the cc field.
|
|
589
412
|
*
|
|
590
413
|
* @param val -
|
|
@@ -592,15 +415,12 @@ function _define_property$2(obj, key, value) {
|
|
|
592
415
|
*
|
|
593
416
|
* @returns
|
|
594
417
|
* This object.
|
|
595
|
-
*/
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
{
|
|
602
|
-
key: "ccs",
|
|
603
|
-
value: /**
|
|
418
|
+
*/ cc(val) {
|
|
419
|
+
this._envelope.cc = this._envelope.cc || [];
|
|
420
|
+
this._envelope.cc.push(val);
|
|
421
|
+
return this;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
604
424
|
* Sets the cc field.
|
|
605
425
|
*
|
|
606
426
|
* @param val -
|
|
@@ -608,14 +428,11 @@ function _define_property$2(obj, key, value) {
|
|
|
608
428
|
*
|
|
609
429
|
* @returns
|
|
610
430
|
* This object.
|
|
611
|
-
*/
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
{
|
|
617
|
-
key: "bcc",
|
|
618
|
-
value: /**
|
|
431
|
+
*/ ccs(val) {
|
|
432
|
+
this._envelope.cc = val;
|
|
433
|
+
return this;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
619
436
|
* Adds a value to the bcc field.
|
|
620
437
|
*
|
|
621
438
|
* @param val -
|
|
@@ -623,15 +440,12 @@ function _define_property$2(obj, key, value) {
|
|
|
623
440
|
*
|
|
624
441
|
* @returns
|
|
625
442
|
* This object.
|
|
626
|
-
*/
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
{
|
|
633
|
-
key: "bccs",
|
|
634
|
-
value: /**
|
|
443
|
+
*/ bcc(val) {
|
|
444
|
+
this._envelope.bcc = this._envelope.bcc || [];
|
|
445
|
+
this._envelope.bcc.push(val);
|
|
446
|
+
return this;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
635
449
|
* Sets the bcc field.
|
|
636
450
|
*
|
|
637
451
|
* @param val -
|
|
@@ -639,14 +453,11 @@ function _define_property$2(obj, key, value) {
|
|
|
639
453
|
*
|
|
640
454
|
* @returns
|
|
641
455
|
* This object.
|
|
642
|
-
*/
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
{
|
|
648
|
-
key: "assign",
|
|
649
|
-
value: /**
|
|
456
|
+
*/ bccs(val) {
|
|
457
|
+
this._envelope.bcc = val;
|
|
458
|
+
return this;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
650
461
|
* Assigns another partial email envelope to this object.
|
|
651
462
|
*
|
|
652
463
|
* @param other -
|
|
@@ -654,15 +465,12 @@ function _define_property$2(obj, key, value) {
|
|
|
654
465
|
*
|
|
655
466
|
* @returns
|
|
656
467
|
* This object.
|
|
657
|
-
*/
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
{
|
|
664
|
-
key: "copy",
|
|
665
|
-
value: /**
|
|
468
|
+
*/ assign(other) {
|
|
469
|
+
this._envelope = Object.assign({}, this._envelope, other);
|
|
470
|
+
this._envelope = JSON.parse(JSON.stringify(this._envelope));
|
|
471
|
+
return this;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
666
474
|
* Copies another email envelope to this object.
|
|
667
475
|
*
|
|
668
476
|
* @param other -
|
|
@@ -670,44 +478,28 @@ function _define_property$2(obj, key, value) {
|
|
|
670
478
|
*
|
|
671
479
|
* @returns
|
|
672
480
|
* This object.
|
|
673
|
-
*/
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
{
|
|
679
|
-
key: "build",
|
|
680
|
-
value: /**
|
|
481
|
+
*/ copy(other) {
|
|
482
|
+
this._envelope = JSON.parse(JSON.stringify(other));
|
|
483
|
+
return this;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
681
486
|
* Returns a copy of the built envelope.
|
|
682
487
|
*
|
|
683
488
|
* @returns
|
|
684
489
|
* A copy of the currently built up envelope object.
|
|
685
|
-
*/
|
|
686
|
-
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
]);
|
|
690
|
-
return ZEmailEnvelopeBuilder;
|
|
691
|
-
}();
|
|
692
|
-
|
|
693
|
-
function _class_call_check$1(instance, Constructor) {
|
|
694
|
-
if (!(instance instanceof Constructor)) {
|
|
695
|
-
throw new TypeError("Cannot call a class as a function");
|
|
490
|
+
*/ build() {
|
|
491
|
+
return JSON.parse(JSON.stringify(this._envelope));
|
|
696
492
|
}
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
493
|
+
/**
|
|
494
|
+
* Initializes a new instance of this object.
|
|
495
|
+
*/ constructor(){
|
|
496
|
+
_define_property$2(this, "_envelope", void 0);
|
|
497
|
+
this._envelope = {
|
|
498
|
+
from: ""
|
|
499
|
+
};
|
|
705
500
|
}
|
|
706
501
|
}
|
|
707
|
-
|
|
708
|
-
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
709
|
-
return Constructor;
|
|
710
|
-
}
|
|
502
|
+
|
|
711
503
|
function _define_property$1(obj, key, value) {
|
|
712
504
|
if (key in obj) {
|
|
713
505
|
Object.defineProperty(obj, key, {
|
|
@@ -723,18 +515,8 @@ function _define_property$1(obj, key, value) {
|
|
|
723
515
|
}
|
|
724
516
|
/**
|
|
725
517
|
* Represents a builder for an email.
|
|
726
|
-
*/
|
|
727
|
-
|
|
728
|
-
_class_call_check$1(this, ZEmailBuilder);
|
|
729
|
-
_define_property$1(this, "_email", void 0);
|
|
730
|
-
this._email = {
|
|
731
|
-
envelope: new ZEmailEnvelopeBuilder().build()
|
|
732
|
-
};
|
|
733
|
-
}
|
|
734
|
-
_create_class$1(ZEmailBuilder, [
|
|
735
|
-
{
|
|
736
|
-
key: "envelope",
|
|
737
|
-
value: /**
|
|
518
|
+
*/ class ZEmailBuilder {
|
|
519
|
+
/**
|
|
738
520
|
* Sets the envelope of where the email is going.
|
|
739
521
|
*
|
|
740
522
|
* @param val -
|
|
@@ -742,14 +524,11 @@ function _define_property$1(obj, key, value) {
|
|
|
742
524
|
*
|
|
743
525
|
* @returns
|
|
744
526
|
* This object.
|
|
745
|
-
*/
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
{
|
|
751
|
-
key: "subject",
|
|
752
|
-
value: /**
|
|
527
|
+
*/ envelope(val) {
|
|
528
|
+
this._email.envelope = val;
|
|
529
|
+
return this;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
753
532
|
* Sets the subject line of the email.
|
|
754
533
|
*
|
|
755
534
|
* @param val -
|
|
@@ -757,14 +536,11 @@ function _define_property$1(obj, key, value) {
|
|
|
757
536
|
*
|
|
758
537
|
* @returns
|
|
759
538
|
* This object.
|
|
760
|
-
*/
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
{
|
|
766
|
-
key: "message",
|
|
767
|
-
value: /**
|
|
539
|
+
*/ subject(val) {
|
|
540
|
+
this._email.subject = val;
|
|
541
|
+
return this;
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
768
544
|
* Sets the message of the email.
|
|
769
545
|
*
|
|
770
546
|
* The message can be raw text or html.
|
|
@@ -774,14 +550,11 @@ function _define_property$1(obj, key, value) {
|
|
|
774
550
|
*
|
|
775
551
|
* @returns
|
|
776
552
|
* This object.
|
|
777
|
-
*/
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
{
|
|
783
|
-
key: "assign",
|
|
784
|
-
value: /**
|
|
553
|
+
*/ message(val) {
|
|
554
|
+
this._email.message = val;
|
|
555
|
+
return this;
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
785
558
|
* Assigns the other object to the current email object.
|
|
786
559
|
*
|
|
787
560
|
* @param other -
|
|
@@ -789,15 +562,12 @@ function _define_property$1(obj, key, value) {
|
|
|
789
562
|
*
|
|
790
563
|
* @returns
|
|
791
564
|
* This object.
|
|
792
|
-
*/
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
{
|
|
799
|
-
key: "copy",
|
|
800
|
-
value: /**
|
|
565
|
+
*/ assign(other) {
|
|
566
|
+
this._email = Object.assign(this._email, other);
|
|
567
|
+
this._email = JSON.parse(JSON.stringify(this._email));
|
|
568
|
+
return this;
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
801
571
|
* Copies another email into the builder.
|
|
802
572
|
*
|
|
803
573
|
* @param other -
|
|
@@ -805,47 +575,31 @@ function _define_property$1(obj, key, value) {
|
|
|
805
575
|
*
|
|
806
576
|
* @returns
|
|
807
577
|
* This object.
|
|
808
|
-
*/
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
{
|
|
814
|
-
key: "build",
|
|
815
|
-
value: /**
|
|
578
|
+
*/ copy(other) {
|
|
579
|
+
this._email = JSON.parse(JSON.stringify(other));
|
|
580
|
+
return this;
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
816
583
|
* Returns a copy of the built object.
|
|
817
584
|
*
|
|
818
585
|
* @returns
|
|
819
586
|
* A copy of the built object.
|
|
820
|
-
*/
|
|
821
|
-
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
]);
|
|
825
|
-
return ZEmailBuilder;
|
|
826
|
-
}();
|
|
827
|
-
|
|
828
|
-
/**
|
|
829
|
-
* Represents an abstract server connection.
|
|
830
|
-
*/ function _class_call_check(instance, Constructor) {
|
|
831
|
-
if (!(instance instanceof Constructor)) {
|
|
832
|
-
throw new TypeError("Cannot call a class as a function");
|
|
587
|
+
*/ build() {
|
|
588
|
+
return JSON.parse(JSON.stringify(this._email));
|
|
833
589
|
}
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
590
|
+
/**
|
|
591
|
+
* Initializes a new instance of this object.
|
|
592
|
+
*/ constructor(){
|
|
593
|
+
_define_property$1(this, "_email", void 0);
|
|
594
|
+
this._email = {
|
|
595
|
+
envelope: new ZEmailEnvelopeBuilder().build()
|
|
596
|
+
};
|
|
842
597
|
}
|
|
843
598
|
}
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
function _define_property(obj, key, value) {
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Represents an abstract server connection.
|
|
602
|
+
*/ function _define_property(obj, key, value) {
|
|
849
603
|
if (key in obj) {
|
|
850
604
|
Object.defineProperty(obj, key, {
|
|
851
605
|
value: value,
|
|
@@ -860,18 +614,8 @@ function _define_property(obj, key, value) {
|
|
|
860
614
|
}
|
|
861
615
|
/**
|
|
862
616
|
* Represents a builder for a server object.
|
|
863
|
-
*/
|
|
864
|
-
|
|
865
|
-
_class_call_check(this, ZServerBuilder);
|
|
866
|
-
_define_property(this, "_server", void 0);
|
|
867
|
-
this._server = {
|
|
868
|
-
address: ""
|
|
869
|
-
};
|
|
870
|
-
}
|
|
871
|
-
_create_class(ZServerBuilder, [
|
|
872
|
-
{
|
|
873
|
-
key: "address",
|
|
874
|
-
value: /**
|
|
617
|
+
*/ class ZServerBuilder {
|
|
618
|
+
/**
|
|
875
619
|
* The server ip address or hostname.
|
|
876
620
|
*
|
|
877
621
|
* @param val -
|
|
@@ -879,14 +623,11 @@ function _define_property(obj, key, value) {
|
|
|
879
623
|
*
|
|
880
624
|
* @returns
|
|
881
625
|
* This object.
|
|
882
|
-
*/
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
{
|
|
888
|
-
key: "port",
|
|
889
|
-
value: /**
|
|
626
|
+
*/ address(val) {
|
|
627
|
+
this._server.address = val;
|
|
628
|
+
return this;
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
890
631
|
* Sets the optional port to connect on.
|
|
891
632
|
*
|
|
892
633
|
* @param val -
|
|
@@ -894,14 +635,11 @@ function _define_property(obj, key, value) {
|
|
|
894
635
|
*
|
|
895
636
|
* @returns
|
|
896
637
|
* This object.
|
|
897
|
-
*/
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
{
|
|
903
|
-
key: "username",
|
|
904
|
-
value: /**
|
|
638
|
+
*/ port(val) {
|
|
639
|
+
this._server.port = val;
|
|
640
|
+
return this;
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
905
643
|
* Sets the optional username to connect on.
|
|
906
644
|
*
|
|
907
645
|
* @param val -
|
|
@@ -909,14 +647,11 @@ function _define_property(obj, key, value) {
|
|
|
909
647
|
*
|
|
910
648
|
* @returns
|
|
911
649
|
* This object.
|
|
912
|
-
*/
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
{
|
|
918
|
-
key: "password",
|
|
919
|
-
value: /**
|
|
650
|
+
*/ username(val) {
|
|
651
|
+
this._server.username = val;
|
|
652
|
+
return this;
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
920
655
|
* Sets the password to connect on.
|
|
921
656
|
*
|
|
922
657
|
* @param val -
|
|
@@ -924,14 +659,11 @@ function _define_property(obj, key, value) {
|
|
|
924
659
|
*
|
|
925
660
|
* @returns
|
|
926
661
|
* This object.
|
|
927
|
-
*/
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
{
|
|
933
|
-
key: "assign",
|
|
934
|
-
value: /**
|
|
662
|
+
*/ password(val) {
|
|
663
|
+
this._server.password = val;
|
|
664
|
+
return this;
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
935
667
|
* Assigns all truthy properties in other to this object.
|
|
936
668
|
*
|
|
937
669
|
* @param other -
|
|
@@ -939,14 +671,11 @@ function _define_property(obj, key, value) {
|
|
|
939
671
|
*
|
|
940
672
|
* @returns
|
|
941
673
|
* This object.
|
|
942
|
-
*/
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
{
|
|
948
|
-
key: "copy",
|
|
949
|
-
value: /**
|
|
674
|
+
*/ assign(other) {
|
|
675
|
+
this._server = Object.assign({}, this._server, other);
|
|
676
|
+
return this;
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
950
679
|
* Copies all properties in other to this object.
|
|
951
680
|
*
|
|
952
681
|
* @param other -
|
|
@@ -954,25 +683,27 @@ function _define_property(obj, key, value) {
|
|
|
954
683
|
*
|
|
955
684
|
* @returns
|
|
956
685
|
* This object.
|
|
957
|
-
*/
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
{
|
|
963
|
-
key: "build",
|
|
964
|
-
value: /**
|
|
686
|
+
*/ copy(other) {
|
|
687
|
+
this._server = JSON.parse(JSON.stringify(other));
|
|
688
|
+
return this;
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
965
691
|
* Returns a copy of the built object.
|
|
966
692
|
*
|
|
967
693
|
* @returns
|
|
968
694
|
* A copy of the built object.
|
|
969
|
-
*/
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
695
|
+
*/ build() {
|
|
696
|
+
return JSON.parse(JSON.stringify(this._server));
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Initializes a new instance of this object.
|
|
700
|
+
*/ constructor(){
|
|
701
|
+
_define_property(this, "_server", void 0);
|
|
702
|
+
this._server = {
|
|
703
|
+
address: ""
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
}
|
|
976
707
|
|
|
977
708
|
exports.ZCookieBuilder = ZCookieBuilder;
|
|
978
709
|
exports.ZEmailBuilder = ZEmailBuilder;
|