@zthun/helpful-internet 9.4.2 → 9.4.3
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 +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -19,7 +19,7 @@ function _defineProperties$5(target, props) {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
function _create_class$5(Constructor, protoProps, staticProps) {
|
|
22
|
-
_defineProperties$5(Constructor.prototype, protoProps);
|
|
22
|
+
if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
|
|
23
23
|
return Constructor;
|
|
24
24
|
}
|
|
25
25
|
function _define_property$5(obj, key, value) {
|
|
@@ -261,7 +261,7 @@ function _defineProperties$4(target, props) {
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
function _create_class$4(Constructor, protoProps, staticProps) {
|
|
264
|
-
_defineProperties$4(Constructor.prototype, protoProps);
|
|
264
|
+
if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
|
|
265
265
|
return Constructor;
|
|
266
266
|
}
|
|
267
267
|
function _define_property$4(obj, key, value) {
|
|
@@ -376,7 +376,7 @@ function _defineProperties$3(target, props) {
|
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
function _create_class$3(Constructor, protoProps, staticProps) {
|
|
379
|
-
_defineProperties$3(Constructor.prototype, protoProps);
|
|
379
|
+
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
380
380
|
return Constructor;
|
|
381
381
|
}
|
|
382
382
|
function _define_property$3(obj, key, value) {
|
|
@@ -509,7 +509,7 @@ function _defineProperties$2(target, props) {
|
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
function _create_class$2(Constructor, protoProps, staticProps) {
|
|
512
|
-
_defineProperties$2(Constructor.prototype, protoProps);
|
|
512
|
+
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
513
513
|
return Constructor;
|
|
514
514
|
}
|
|
515
515
|
function _define_property$2(obj, key, value) {
|
|
@@ -705,7 +705,7 @@ function _defineProperties$1(target, props) {
|
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
function _create_class$1(Constructor, protoProps, staticProps) {
|
|
708
|
-
_defineProperties$1(Constructor.prototype, protoProps);
|
|
708
|
+
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
709
709
|
return Constructor;
|
|
710
710
|
}
|
|
711
711
|
function _define_property$1(obj, key, value) {
|
|
@@ -842,7 +842,7 @@ function _defineProperties(target, props) {
|
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
844
|
function _create_class(Constructor, protoProps, staticProps) {
|
|
845
|
-
_defineProperties(Constructor.prototype, protoProps);
|
|
845
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
846
846
|
return Constructor;
|
|
847
847
|
}
|
|
848
848
|
function _define_property(obj, key, value) {
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/cookie/cookie.mts","../src/email/email-contact-address.mts","../src/email/email-contact.mts","../src/email/email-envelope.mts","../src/email/email.mts","../src/server/server.mts"],"sourcesContent":["/**\n * Represents a generic cookie.\n */\nexport interface IZCookie {\n /**\n * The cookie name.\n */\n name: string;\n /**\n * The cookie value.\n */\n value: string;\n /**\n * The scope domain attached to the cookie.\n */\n domain?: string;\n /**\n * The utc formatted date at which the cookie expires\n */\n expires?: string;\n /**\n * A flag that determines if this is a secure cookie.\n */\n secure?: boolean;\n /**\n * A flag that determines if this cookie can be ready by javascript.\n */\n httpOnly?: boolean;\n /**\n * A value that determines how the cookie is sent by the browser.\n */\n sameSite?: \"lax\" | \"strict\" | \"none\";\n}\n\n/**\n * Represents a builder for an IZCookie object.\n */\nexport class ZCookieBuilder {\n public static readonly MillisecondsOneDay = 86400000;\n\n private _cookie: IZCookie;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._cookie = {\n name: \"\",\n value: \"\",\n };\n }\n\n /**\n * Sets the cookie name.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public name(val: string): this {\n this._cookie.name = val;\n return this;\n }\n\n /**\n * Sets the cookie value.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public value(val: string): this {\n this._cookie.value = val;\n return this;\n }\n\n /**\n * Sets the cookie domain.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public domain(val: string | undefined): this {\n this._cookie.domain = val;\n return this;\n }\n\n /**\n * Sets the cookie expiration date.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public expires(val: Date | string | undefined): this {\n if (val == null) {\n delete this._cookie.expires;\n return this;\n }\n\n this._cookie.expires = typeof val === \"string\" ? val : val.toJSON();\n return this;\n }\n\n /**\n * Sets the cookie expiration date to one day from the moment this is invoked.\n *\n * @returns\n * This object.\n */\n public expiresTomorrow(): this {\n return this.expires(\n new Date(Date.now() + ZCookieBuilder.MillisecondsOneDay),\n );\n }\n\n /**\n * Removes the cookie expiration.\n *\n * @returns\n * This object.\n */\n public immortal: () => this = this.expires.bind(this, undefined);\n\n /**\n * Sets the cookie secure flag.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public secure(val = true): this {\n this._cookie.secure = val;\n return this;\n }\n\n /**\n * Sets the cookie same site policy.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public sameSite(val: \"lax\" | \"strict\" | \"none\"): this {\n this._cookie.sameSite = val;\n return this;\n }\n\n /**\n * Sets the same site policy to 'lax'\n *\n * @returns\n * This object.\n */\n public lax = this.sameSite.bind(this, \"lax\");\n\n /**\n * Sets the same site polity to 'strict'\n *\n * @returns\n * This object.\n */\n public strict = this.sameSite.bind(this, \"strict\");\n\n /**\n * Sets the same site policy to 'none' and turns on the secure flag.\n *\n * @returns\n * This object.\n */\n public allowCrossSite(): this {\n return this.secure().sameSite(\"none\");\n }\n\n /**\n * Sets the cookie http only flag.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public httpOnly(val = true): this {\n this._cookie.httpOnly = val;\n return this;\n }\n\n /**\n * Creates a token based authentication cookie.\n *\n * @param token -\n * The token value for the cookie. You\n * can leave this as undefined to set it\n * later.\n *\n * @returns\n * This object.\n */\n public authentication(token?: string): this {\n const builder = this.name(\"Authentication\")\n .expiresTomorrow()\n .secure()\n .httpOnly();\n return token == null ? builder : builder.value(token);\n }\n\n /**\n * Returns a copy of the built instance of the cookie.\n *\n * @returns\n * A shallow copy of the current cookie object.\n */\n public build(): IZCookie {\n return { ...this._cookie };\n }\n}\n","import type { IZEmailContact } from \"./email-contact.mjs\";\n\n/**\n * Represents a builder that will build a comma separated\n * list of addresses for an email message.\n */\nexport class ZEmailContactAddressBuilder {\n private _addresses: Array<string | IZEmailContact> = [];\n private _delimiter = \", \";\n\n /**\n * Adds an address to the list to builder.\n *\n * @param val -\n * The address to add. This can be the empty string,\n * null, or undefined.\n *\n * @returns\n * This object.\n */\n public address(val: string | IZEmailContact): this {\n this._addresses.push(val);\n return this;\n }\n\n /**\n * Sets the addresses to build from.\n *\n * @param val -\n * The address to set.\n *\n * @returns\n * This object.\n */\n public addresses(val: Array<string | IZEmailContact>) {\n this._addresses = val.slice();\n return this;\n }\n\n /**\n * Sets the delimiter to split the addresses with.\n *\n * The default is a comma with a space.\n *\n * @param val -\n * The delimiter to set.\n *\n * @returns\n * This object.\n */\n public delimiter(val: string): this {\n this._delimiter = val;\n return this;\n }\n\n /**\n * Builds the delimiters separated list of addresses.\n *\n * @returns\n * The delimited separated list of addresses.\n */\n public build(): string {\n const addr = (ct: string | IZEmailContact) => {\n if (!ct) {\n return undefined;\n }\n\n return typeof ct === \"string\" ? ct : ct.address;\n };\n\n const truthy = (ct: string) => {\n return !!ct;\n };\n\n return this._addresses.map(addr).filter(truthy).join(this._delimiter);\n }\n}\n","/**\n * Represents an email contact.\n */\nexport interface IZEmailContact {\n /**\n * The email address of the contact.\n */\n address: string;\n\n /**\n * The type of contact.\n *\n * This can be anything you want. In the end, this has no bearing\n * on the final sent message. It's just a descriptor to determine what this contact\n * represents if needed.\n */\n type?: string;\n\n /**\n * The display name of the contact.\n *\n * If this is falsy, then you can consider the\n * address as the display.\n */\n display?: string;\n}\n\n/**\n * Represents a builder for an email contact.\n */\nexport class ZEmailContactBuilder {\n private _contact: IZEmailContact;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._contact = {\n address: \"\",\n };\n }\n\n /**\n * Sets the address of the contact.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public address(val: string): this {\n this._contact.address = val;\n return this;\n }\n\n /**\n * Sets the type of the contact.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public type(val: string): this {\n this._contact.type = val;\n return this;\n }\n\n /**\n * Sets the display of the contact.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public display(val: string) {\n this._contact.display = val;\n return this;\n }\n\n /**\n * Assigns the values in other to this object.\n *\n * @param other -\n * The value to partial copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZEmailContact>): this {\n this._contact = Object.assign({}, this._contact, other);\n this._contact = JSON.parse(JSON.stringify(this._contact));\n return this;\n }\n\n /**\n * Copies another object.\n *\n * @param other -\n * The value to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZEmailContact): this {\n this._contact = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built object.\n *\n * @returns\n * A copy of the built email contact.\n */\n public build(): IZEmailContact {\n return JSON.parse(JSON.stringify(this._contact));\n }\n}\n","import type { IZEmailContact } from \"./email-contact.mjs\";\n\n/**\n * Represents an email envelope of information about who the email is from and where it's going to.\n */\nexport interface IZEmailEnvelope {\n /**\n * Who the email is from.\n *\n * This can be the full contact or just the address.\n */\n from: IZEmailContact | string;\n\n /**\n * Where the email is going.\n *\n * This can be falsy if cc is filled out.\n */\n to?: Array<IZEmailContact | string>;\n\n /**\n * Who is receiving a carbon copy of the email.\n *\n * This can be falsy if to is filled out.\n */\n cc?: Array<IZEmailContact | string>;\n\n /**\n * Who is receiving a blind carbon copy of an email.\n */\n bcc?: Array<IZEmailContact | string>;\n}\n\n/**\n * Represents a builder for an email envelope.\n */\nexport class ZEmailEnvelopeBuilder {\n private _envelope: IZEmailEnvelope;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._envelope = {\n from: \"\",\n };\n }\n\n /**\n * Sets the from field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public from(val: IZEmailContact | string): this {\n this._envelope.from = val;\n return this;\n }\n\n /**\n * Adds a value to the 'to' field.\n *\n * @param val -\n * The value to add.\n *\n * @returns\n * This object.\n */\n public to(val: IZEmailContact | string): this {\n this._envelope.to = this._envelope.to || [];\n this._envelope.to.push(val);\n return this;\n }\n\n /**\n * Sets the to field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public tos(val: Array<IZEmailContact | string>): this {\n this._envelope.to = val;\n return this;\n }\n\n /**\n * Adds a value to the cc field.\n *\n * @param val -\n * The value to add.\n *\n * @returns\n * This object.\n */\n public cc(val: IZEmailContact | string): this {\n this._envelope.cc = this._envelope.cc || [];\n this._envelope.cc.push(val);\n return this;\n }\n\n /**\n * Sets the cc field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public ccs(val: Array<IZEmailContact | string>): this {\n this._envelope.cc = val;\n return this;\n }\n\n /**\n * Adds a value to the bcc field.\n *\n * @param val -\n * The value to add.\n *\n * @returns\n * This object.\n */\n public bcc(val: IZEmailContact | string): this {\n this._envelope.bcc = this._envelope.bcc || [];\n this._envelope.bcc.push(val);\n return this;\n }\n\n /**\n * Sets the bcc field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public bccs(val: Array<IZEmailContact | string>): this {\n this._envelope.bcc = val;\n return this;\n }\n\n /**\n * Assigns another partial email envelope to this object.\n *\n * @param other -\n * The value to partial copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZEmailEnvelope>): this {\n this._envelope = Object.assign({}, this._envelope, other);\n this._envelope = JSON.parse(JSON.stringify(this._envelope));\n return this;\n }\n\n /**\n * Copies another email envelope to this object.\n *\n * @param other -\n * The value to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZEmailEnvelope): this {\n this._envelope = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built envelope.\n *\n * @returns\n * A copy of the currently built up envelope object.\n */\n public build(): IZEmailEnvelope {\n return JSON.parse(JSON.stringify(this._envelope));\n }\n}\n","import type { IZEmailEnvelope } from \"./email-envelope.mjs\";\nimport { ZEmailEnvelopeBuilder } from \"./email-envelope.mjs\";\n\n/**\n * Represents an email message.\n */\nexport interface IZEmail {\n /**\n * The email envelope of where the email is going to.\n */\n envelope: IZEmailEnvelope;\n\n /**\n * The subject (title) of the email.\n */\n subject?: string;\n\n /**\n * The message to send.\n */\n message?: string;\n}\n\n/**\n * Represents a builder for an email.\n */\nexport class ZEmailBuilder {\n private _email: IZEmail;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._email = {\n envelope: new ZEmailEnvelopeBuilder().build(),\n };\n }\n\n /**\n * Sets the envelope of where the email is going.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public envelope(val: IZEmailEnvelope): this {\n this._email.envelope = val;\n return this;\n }\n\n /**\n * Sets the subject line of the email.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public subject(val: string): this {\n this._email.subject = val;\n return this;\n }\n\n /**\n * Sets the message of the email.\n *\n * The message can be raw text or html.\n *\n * @param val -\n * A html enabled formatted message to set.\n *\n * @returns\n * This object.\n */\n public message(val: string): this {\n this._email.message = val;\n return this;\n }\n\n /**\n * Assigns the other object to the current email object.\n *\n * @param other -\n * The object to copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZEmail>): this {\n this._email = Object.assign(this._email, other);\n this._email = JSON.parse(JSON.stringify(this._email));\n return this;\n }\n\n /**\n * Copies another email into the builder.\n *\n * @param other -\n * The object to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZEmail) {\n this._email = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built object.\n *\n * @returns\n * A copy of the built object.\n */\n public build(): IZEmail {\n return JSON.parse(JSON.stringify(this._email));\n }\n}\n","/**\n * Represents an abstract server connection.\n */\nexport interface IZServer {\n /**\n * The host or ip address to connect to.\n *\n * Does not distinguish between the protocol and hostname.\n */\n address: string;\n\n /**\n * The optional port to connect on.\n *\n * If this is falsy, then it is up to the implementation\n * taking this object to properly default the value.\n */\n port?: number;\n\n /**\n * The optional username.\n *\n * Falsy usually implies guest access.\n */\n username?: string;\n\n /**\n * The user's password to connect with.\n *\n * If username is not supplied, then this generally has no meaning.\n */\n password?: string;\n}\n\n/**\n * Represents a builder for a server object.\n */\nexport class ZServerBuilder {\n private _server: IZServer;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._server = {\n address: \"\",\n };\n }\n\n /**\n * The server ip address or hostname.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public address(val: string): this {\n this._server.address = val;\n return this;\n }\n\n /**\n * Sets the optional port to connect on.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public port(val: number): this {\n this._server.port = val;\n return this;\n }\n\n /**\n * Sets the optional username to connect on.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public username(val: string): this {\n this._server.username = val;\n return this;\n }\n\n /**\n * Sets the password to connect on.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public password(val: string): this {\n this._server.password = val;\n return this;\n }\n\n /**\n * Assigns all truthy properties in other to this object.\n *\n * @param other -\n * The server object to copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZServer>): this {\n this._server = Object.assign({}, this._server, other);\n return this;\n }\n\n /**\n * Copies all properties in other to this object.\n *\n * @param other -\n * The server object to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZServer): this {\n this._server = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built object.\n *\n * @returns\n * A copy of the built object.\n */\n public build(): IZServer {\n return JSON.parse(JSON.stringify(this._server));\n }\n}\n"],"names":["_class_call_check","ZCookieBuilder","_define_property","_cookie","immortal","expires","bind","undefined","lax","sameSite","strict","name","value","val","domain","toJSON","expiresTomorrow","Date","now","MillisecondsOneDay","secure","allowCrossSite","httpOnly","authentication","token","builder","build","ZEmailContactAddressBuilder","_addresses","_delimiter","address","push","addresses","slice","delimiter","addr","ct","truthy","map","filter","join","ZEmailContactBuilder","_contact","type","display","assign","other","Object","JSON","parse","stringify","copy","ZEmailEnvelopeBuilder","_envelope","from","to","tos","cc","ccs","bcc","bccs","ZEmailBuilder","_email","envelope","subject","message","ZServerBuilder","_server","port","username","password"],"mappings":";;;;AAAA;;AAEC,IAAA,SAAAA,mBAAA,CAAA,QAAA,EAAA,WAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCD;;IAGO,IAAMC,cAAN,iBAAA,WAAA;AAAMA,IAAAA,SAAAA,cAAAA,GAAAA;AAAAA,QAAAA,mBAAAA,CAAAA,IAAAA,EAAAA,cAAAA,CAAAA;AAGX,QAAAC,kBAAA,CAAA,IAAA,EAAQC,WAAR,KAAA,CAAA,CAAA;AAqFA;;;;;MAMAD,kBAAA,CAAA,IAAA,EAAOE,YAAuB,IAAI,CAACC,OAAO,CAACC,IAAI,CAAC,IAAI,EAAEC,SAAAA,CAAAA,CAAAA;AA8BtD;;;;;MAMAL,kBAAA,CAAA,IAAA,EAAOM,OAAM,IAAI,CAACC,QAAQ,CAACH,IAAI,CAA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GAAAA,EAAAA,UAAAA;;;;;;;;;MAAP,SAAOA,SAASzD,GAAW,EAAA;AACzB,gBAAA,IAAI,CAACsD,OAAO,CAACG,QAAQ,GAAGzD,GAAAA;AACxB,gBAAA,OAAO,IAAI;AACb;;;YAWOgC,GAAAA,EAAAA,QAAAA;;;;;;;;;MAAP,SAAOA,OAAOC,KAAwB,EAAA;gBACpC,IAAI,CAACqB,OAAO,GAAGpB,MAAOF,CAAAA,MAAM,CAAC,EAAI,EAAA,IAAI,CAACsB,OAAO,EAAErB,KAAAA,CAAAA;AAC/C,gBAAA,OAAO,IAAI;AACb;;;YAWOK,GAAAA,EAAAA,MAAAA;;;;;;;;;MAAP,SAAOA,KAAKL,KAAe,EAAA;gBACzB,IAAI,CAACqB,OAAO,GAAGnB,IAAAA,CAAKC,KAAK,CAACD,IAAAA,CAAKE,SAAS,CAACJ,KAAAA,CAAAA,CAAAA;AACzC,gBAAA,OAAO,IAAI;AACb;;;YAQOpB,GAAAA,EAAAA,OAAAA;;;;;;AADN,MACD,SAAOA,KAAAA,GAAAA;gBACL,OAAOsB,IAAAA,CAAKC,KAAK,CAACD,IAAAA,CAAKE,SAAS,CAAC,IAAI,CAACiB,OAAO,CAAA,CAAA;AAC/C;;;AAxGWD,IAAAA,OAAAA,cAAAA;AAyGZ,CAAA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/cookie/cookie.mts","../src/email/email-contact-address.mts","../src/email/email-contact.mts","../src/email/email-envelope.mts","../src/email/email.mts","../src/server/server.mts"],"sourcesContent":["/**\n * Represents a generic cookie.\n */\nexport interface IZCookie {\n /**\n * The cookie name.\n */\n name: string;\n /**\n * The cookie value.\n */\n value: string;\n /**\n * The scope domain attached to the cookie.\n */\n domain?: string;\n /**\n * The utc formatted date at which the cookie expires\n */\n expires?: string;\n /**\n * A flag that determines if this is a secure cookie.\n */\n secure?: boolean;\n /**\n * A flag that determines if this cookie can be ready by javascript.\n */\n httpOnly?: boolean;\n /**\n * A value that determines how the cookie is sent by the browser.\n */\n sameSite?: \"lax\" | \"strict\" | \"none\";\n}\n\n/**\n * Represents a builder for an IZCookie object.\n */\nexport class ZCookieBuilder {\n public static readonly MillisecondsOneDay = 86400000;\n\n private _cookie: IZCookie;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._cookie = {\n name: \"\",\n value: \"\",\n };\n }\n\n /**\n * Sets the cookie name.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public name(val: string): this {\n this._cookie.name = val;\n return this;\n }\n\n /**\n * Sets the cookie value.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public value(val: string): this {\n this._cookie.value = val;\n return this;\n }\n\n /**\n * Sets the cookie domain.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public domain(val: string | undefined): this {\n this._cookie.domain = val;\n return this;\n }\n\n /**\n * Sets the cookie expiration date.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public expires(val: Date | string | undefined): this {\n if (val == null) {\n delete this._cookie.expires;\n return this;\n }\n\n this._cookie.expires = typeof val === \"string\" ? val : val.toJSON();\n return this;\n }\n\n /**\n * Sets the cookie expiration date to one day from the moment this is invoked.\n *\n * @returns\n * This object.\n */\n public expiresTomorrow(): this {\n return this.expires(\n new Date(Date.now() + ZCookieBuilder.MillisecondsOneDay),\n );\n }\n\n /**\n * Removes the cookie expiration.\n *\n * @returns\n * This object.\n */\n public immortal: () => this = this.expires.bind(this, undefined);\n\n /**\n * Sets the cookie secure flag.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public secure(val = true): this {\n this._cookie.secure = val;\n return this;\n }\n\n /**\n * Sets the cookie same site policy.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public sameSite(val: \"lax\" | \"strict\" | \"none\"): this {\n this._cookie.sameSite = val;\n return this;\n }\n\n /**\n * Sets the same site policy to 'lax'\n *\n * @returns\n * This object.\n */\n public lax = this.sameSite.bind(this, \"lax\");\n\n /**\n * Sets the same site polity to 'strict'\n *\n * @returns\n * This object.\n */\n public strict = this.sameSite.bind(this, \"strict\");\n\n /**\n * Sets the same site policy to 'none' and turns on the secure flag.\n *\n * @returns\n * This object.\n */\n public allowCrossSite(): this {\n return this.secure().sameSite(\"none\");\n }\n\n /**\n * Sets the cookie http only flag.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public httpOnly(val = true): this {\n this._cookie.httpOnly = val;\n return this;\n }\n\n /**\n * Creates a token based authentication cookie.\n *\n * @param token -\n * The token value for the cookie. You\n * can leave this as undefined to set it\n * later.\n *\n * @returns\n * This object.\n */\n public authentication(token?: string): this {\n const builder = this.name(\"Authentication\")\n .expiresTomorrow()\n .secure()\n .httpOnly();\n return token == null ? builder : builder.value(token);\n }\n\n /**\n * Returns a copy of the built instance of the cookie.\n *\n * @returns\n * A shallow copy of the current cookie object.\n */\n public build(): IZCookie {\n return { ...this._cookie };\n }\n}\n","import type { IZEmailContact } from \"./email-contact.mjs\";\n\n/**\n * Represents a builder that will build a comma separated\n * list of addresses for an email message.\n */\nexport class ZEmailContactAddressBuilder {\n private _addresses: Array<string | IZEmailContact> = [];\n private _delimiter = \", \";\n\n /**\n * Adds an address to the list to builder.\n *\n * @param val -\n * The address to add. This can be the empty string,\n * null, or undefined.\n *\n * @returns\n * This object.\n */\n public address(val: string | IZEmailContact): this {\n this._addresses.push(val);\n return this;\n }\n\n /**\n * Sets the addresses to build from.\n *\n * @param val -\n * The address to set.\n *\n * @returns\n * This object.\n */\n public addresses(val: Array<string | IZEmailContact>) {\n this._addresses = val.slice();\n return this;\n }\n\n /**\n * Sets the delimiter to split the addresses with.\n *\n * The default is a comma with a space.\n *\n * @param val -\n * The delimiter to set.\n *\n * @returns\n * This object.\n */\n public delimiter(val: string): this {\n this._delimiter = val;\n return this;\n }\n\n /**\n * Builds the delimiters separated list of addresses.\n *\n * @returns\n * The delimited separated list of addresses.\n */\n public build(): string {\n const addr = (ct: string | IZEmailContact) => {\n if (!ct) {\n return undefined;\n }\n\n return typeof ct === \"string\" ? ct : ct.address;\n };\n\n const truthy = (ct: string) => {\n return !!ct;\n };\n\n return this._addresses.map(addr).filter(truthy).join(this._delimiter);\n }\n}\n","/**\n * Represents an email contact.\n */\nexport interface IZEmailContact {\n /**\n * The email address of the contact.\n */\n address: string;\n\n /**\n * The type of contact.\n *\n * This can be anything you want. In the end, this has no bearing\n * on the final sent message. It's just a descriptor to determine what this contact\n * represents if needed.\n */\n type?: string;\n\n /**\n * The display name of the contact.\n *\n * If this is falsy, then you can consider the\n * address as the display.\n */\n display?: string;\n}\n\n/**\n * Represents a builder for an email contact.\n */\nexport class ZEmailContactBuilder {\n private _contact: IZEmailContact;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._contact = {\n address: \"\",\n };\n }\n\n /**\n * Sets the address of the contact.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public address(val: string): this {\n this._contact.address = val;\n return this;\n }\n\n /**\n * Sets the type of the contact.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public type(val: string): this {\n this._contact.type = val;\n return this;\n }\n\n /**\n * Sets the display of the contact.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public display(val: string) {\n this._contact.display = val;\n return this;\n }\n\n /**\n * Assigns the values in other to this object.\n *\n * @param other -\n * The value to partial copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZEmailContact>): this {\n this._contact = Object.assign({}, this._contact, other);\n this._contact = JSON.parse(JSON.stringify(this._contact));\n return this;\n }\n\n /**\n * Copies another object.\n *\n * @param other -\n * The value to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZEmailContact): this {\n this._contact = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built object.\n *\n * @returns\n * A copy of the built email contact.\n */\n public build(): IZEmailContact {\n return JSON.parse(JSON.stringify(this._contact));\n }\n}\n","import type { IZEmailContact } from \"./email-contact.mjs\";\n\n/**\n * Represents an email envelope of information about who the email is from and where it's going to.\n */\nexport interface IZEmailEnvelope {\n /**\n * Who the email is from.\n *\n * This can be the full contact or just the address.\n */\n from: IZEmailContact | string;\n\n /**\n * Where the email is going.\n *\n * This can be falsy if cc is filled out.\n */\n to?: Array<IZEmailContact | string>;\n\n /**\n * Who is receiving a carbon copy of the email.\n *\n * This can be falsy if to is filled out.\n */\n cc?: Array<IZEmailContact | string>;\n\n /**\n * Who is receiving a blind carbon copy of an email.\n */\n bcc?: Array<IZEmailContact | string>;\n}\n\n/**\n * Represents a builder for an email envelope.\n */\nexport class ZEmailEnvelopeBuilder {\n private _envelope: IZEmailEnvelope;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._envelope = {\n from: \"\",\n };\n }\n\n /**\n * Sets the from field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public from(val: IZEmailContact | string): this {\n this._envelope.from = val;\n return this;\n }\n\n /**\n * Adds a value to the 'to' field.\n *\n * @param val -\n * The value to add.\n *\n * @returns\n * This object.\n */\n public to(val: IZEmailContact | string): this {\n this._envelope.to = this._envelope.to || [];\n this._envelope.to.push(val);\n return this;\n }\n\n /**\n * Sets the to field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public tos(val: Array<IZEmailContact | string>): this {\n this._envelope.to = val;\n return this;\n }\n\n /**\n * Adds a value to the cc field.\n *\n * @param val -\n * The value to add.\n *\n * @returns\n * This object.\n */\n public cc(val: IZEmailContact | string): this {\n this._envelope.cc = this._envelope.cc || [];\n this._envelope.cc.push(val);\n return this;\n }\n\n /**\n * Sets the cc field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public ccs(val: Array<IZEmailContact | string>): this {\n this._envelope.cc = val;\n return this;\n }\n\n /**\n * Adds a value to the bcc field.\n *\n * @param val -\n * The value to add.\n *\n * @returns\n * This object.\n */\n public bcc(val: IZEmailContact | string): this {\n this._envelope.bcc = this._envelope.bcc || [];\n this._envelope.bcc.push(val);\n return this;\n }\n\n /**\n * Sets the bcc field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public bccs(val: Array<IZEmailContact | string>): this {\n this._envelope.bcc = val;\n return this;\n }\n\n /**\n * Assigns another partial email envelope to this object.\n *\n * @param other -\n * The value to partial copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZEmailEnvelope>): this {\n this._envelope = Object.assign({}, this._envelope, other);\n this._envelope = JSON.parse(JSON.stringify(this._envelope));\n return this;\n }\n\n /**\n * Copies another email envelope to this object.\n *\n * @param other -\n * The value to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZEmailEnvelope): this {\n this._envelope = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built envelope.\n *\n * @returns\n * A copy of the currently built up envelope object.\n */\n public build(): IZEmailEnvelope {\n return JSON.parse(JSON.stringify(this._envelope));\n }\n}\n","import type { IZEmailEnvelope } from \"./email-envelope.mjs\";\nimport { ZEmailEnvelopeBuilder } from \"./email-envelope.mjs\";\n\n/**\n * Represents an email message.\n */\nexport interface IZEmail {\n /**\n * The email envelope of where the email is going to.\n */\n envelope: IZEmailEnvelope;\n\n /**\n * The subject (title) of the email.\n */\n subject?: string;\n\n /**\n * The message to send.\n */\n message?: string;\n}\n\n/**\n * Represents a builder for an email.\n */\nexport class ZEmailBuilder {\n private _email: IZEmail;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._email = {\n envelope: new ZEmailEnvelopeBuilder().build(),\n };\n }\n\n /**\n * Sets the envelope of where the email is going.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public envelope(val: IZEmailEnvelope): this {\n this._email.envelope = val;\n return this;\n }\n\n /**\n * Sets the subject line of the email.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public subject(val: string): this {\n this._email.subject = val;\n return this;\n }\n\n /**\n * Sets the message of the email.\n *\n * The message can be raw text or html.\n *\n * @param val -\n * A html enabled formatted message to set.\n *\n * @returns\n * This object.\n */\n public message(val: string): this {\n this._email.message = val;\n return this;\n }\n\n /**\n * Assigns the other object to the current email object.\n *\n * @param other -\n * The object to copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZEmail>): this {\n this._email = Object.assign(this._email, other);\n this._email = JSON.parse(JSON.stringify(this._email));\n return this;\n }\n\n /**\n * Copies another email into the builder.\n *\n * @param other -\n * The object to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZEmail) {\n this._email = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built object.\n *\n * @returns\n * A copy of the built object.\n */\n public build(): IZEmail {\n return JSON.parse(JSON.stringify(this._email));\n }\n}\n","/**\n * Represents an abstract server connection.\n */\nexport interface IZServer {\n /**\n * The host or ip address to connect to.\n *\n * Does not distinguish between the protocol and hostname.\n */\n address: string;\n\n /**\n * The optional port to connect on.\n *\n * If this is falsy, then it is up to the implementation\n * taking this object to properly default the value.\n */\n port?: number;\n\n /**\n * The optional username.\n *\n * Falsy usually implies guest access.\n */\n username?: string;\n\n /**\n * The user's password to connect with.\n *\n * If username is not supplied, then this generally has no meaning.\n */\n password?: string;\n}\n\n/**\n * Represents a builder for a server object.\n */\nexport class ZServerBuilder {\n private _server: IZServer;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._server = {\n address: \"\",\n };\n }\n\n /**\n * The server ip address or hostname.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public address(val: string): this {\n this._server.address = val;\n return this;\n }\n\n /**\n * Sets the optional port to connect on.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public port(val: number): this {\n this._server.port = val;\n return this;\n }\n\n /**\n * Sets the optional username to connect on.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public username(val: string): this {\n this._server.username = val;\n return this;\n }\n\n /**\n * Sets the password to connect on.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public password(val: string): this {\n this._server.password = val;\n return this;\n }\n\n /**\n * Assigns all truthy properties in other to this object.\n *\n * @param other -\n * The server object to copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZServer>): this {\n this._server = Object.assign({}, this._server, other);\n return this;\n }\n\n /**\n * Copies all properties in other to this object.\n *\n * @param other -\n * The server object to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZServer): this {\n this._server = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built object.\n *\n * @returns\n * A copy of the built object.\n */\n public build(): IZServer {\n return JSON.parse(JSON.stringify(this._server));\n }\n}\n"],"names":["_class_call_check","ZCookieBuilder","_define_property","_cookie","immortal","expires","bind","undefined","lax","sameSite","strict","name","value","val","domain","toJSON","expiresTomorrow","Date","now","MillisecondsOneDay","secure","allowCrossSite","httpOnly","authentication","token","builder","build","ZEmailContactAddressBuilder","_addresses","_delimiter","address","push","addresses","slice","delimiter","addr","ct","truthy","map","filter","join","ZEmailContactBuilder","_contact","type","display","assign","other","Object","JSON","parse","stringify","copy","ZEmailEnvelopeBuilder","_envelope","from","to","tos","cc","ccs","bcc","bccs","ZEmailBuilder","_email","envelope","subject","message","ZServerBuilder","_server","port","username","password"],"mappings":";;;;AAAA;;AAEC,IAAA,SAAAA,mBAAA,CAAA,QAAA,EAAA,WAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCD;;IAGO,IAAMC,cAAAA,iBAAN,WAAA;AAAMA,IAAAA,SAAAA,cAAAA,GAAAA;AAAAA,QAAAA,mBAAAA,CAAAA,IAAAA,EAAAA,cAAAA,CAAAA;AAGX,QAAAC,kBAAA,CAAA,IAAA,EAAQC,WAAR,MAAA,CAAA;AAqFA;;;;;MAMAD,kBAAA,CAAA,IAAA,EAAOE,YAAuB,IAAI,CAACC,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xGWD,IAAAA,OAAAA,cAAAA;AAyGZ,CAAA;;;;;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function _defineProperties$5(target, props) {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
function _create_class$5(Constructor, protoProps, staticProps) {
|
|
18
|
-
_defineProperties$5(Constructor.prototype, protoProps);
|
|
18
|
+
if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
|
|
19
19
|
return Constructor;
|
|
20
20
|
}
|
|
21
21
|
function _define_property$5(obj, key, value) {
|
|
@@ -257,7 +257,7 @@ function _defineProperties$4(target, props) {
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
function _create_class$4(Constructor, protoProps, staticProps) {
|
|
260
|
-
_defineProperties$4(Constructor.prototype, protoProps);
|
|
260
|
+
if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
|
|
261
261
|
return Constructor;
|
|
262
262
|
}
|
|
263
263
|
function _define_property$4(obj, key, value) {
|
|
@@ -372,7 +372,7 @@ function _defineProperties$3(target, props) {
|
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
function _create_class$3(Constructor, protoProps, staticProps) {
|
|
375
|
-
_defineProperties$3(Constructor.prototype, protoProps);
|
|
375
|
+
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
376
376
|
return Constructor;
|
|
377
377
|
}
|
|
378
378
|
function _define_property$3(obj, key, value) {
|
|
@@ -505,7 +505,7 @@ function _defineProperties$2(target, props) {
|
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
function _create_class$2(Constructor, protoProps, staticProps) {
|
|
508
|
-
_defineProperties$2(Constructor.prototype, protoProps);
|
|
508
|
+
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
509
509
|
return Constructor;
|
|
510
510
|
}
|
|
511
511
|
function _define_property$2(obj, key, value) {
|
|
@@ -701,7 +701,7 @@ function _defineProperties$1(target, props) {
|
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
function _create_class$1(Constructor, protoProps, staticProps) {
|
|
704
|
-
_defineProperties$1(Constructor.prototype, protoProps);
|
|
704
|
+
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
705
705
|
return Constructor;
|
|
706
706
|
}
|
|
707
707
|
function _define_property$1(obj, key, value) {
|
|
@@ -838,7 +838,7 @@ function _defineProperties(target, props) {
|
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
840
|
function _create_class(Constructor, protoProps, staticProps) {
|
|
841
|
-
_defineProperties(Constructor.prototype, protoProps);
|
|
841
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
842
842
|
return Constructor;
|
|
843
843
|
}
|
|
844
844
|
function _define_property(obj, key, value) {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/cookie/cookie.mts","../src/email/email-contact-address.mts","../src/email/email-contact.mts","../src/email/email-envelope.mts","../src/email/email.mts","../src/server/server.mts"],"sourcesContent":["/**\n * Represents a generic cookie.\n */\nexport interface IZCookie {\n /**\n * The cookie name.\n */\n name: string;\n /**\n * The cookie value.\n */\n value: string;\n /**\n * The scope domain attached to the cookie.\n */\n domain?: string;\n /**\n * The utc formatted date at which the cookie expires\n */\n expires?: string;\n /**\n * A flag that determines if this is a secure cookie.\n */\n secure?: boolean;\n /**\n * A flag that determines if this cookie can be ready by javascript.\n */\n httpOnly?: boolean;\n /**\n * A value that determines how the cookie is sent by the browser.\n */\n sameSite?: \"lax\" | \"strict\" | \"none\";\n}\n\n/**\n * Represents a builder for an IZCookie object.\n */\nexport class ZCookieBuilder {\n public static readonly MillisecondsOneDay = 86400000;\n\n private _cookie: IZCookie;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._cookie = {\n name: \"\",\n value: \"\",\n };\n }\n\n /**\n * Sets the cookie name.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public name(val: string): this {\n this._cookie.name = val;\n return this;\n }\n\n /**\n * Sets the cookie value.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public value(val: string): this {\n this._cookie.value = val;\n return this;\n }\n\n /**\n * Sets the cookie domain.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public domain(val: string | undefined): this {\n this._cookie.domain = val;\n return this;\n }\n\n /**\n * Sets the cookie expiration date.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public expires(val: Date | string | undefined): this {\n if (val == null) {\n delete this._cookie.expires;\n return this;\n }\n\n this._cookie.expires = typeof val === \"string\" ? val : val.toJSON();\n return this;\n }\n\n /**\n * Sets the cookie expiration date to one day from the moment this is invoked.\n *\n * @returns\n * This object.\n */\n public expiresTomorrow(): this {\n return this.expires(\n new Date(Date.now() + ZCookieBuilder.MillisecondsOneDay),\n );\n }\n\n /**\n * Removes the cookie expiration.\n *\n * @returns\n * This object.\n */\n public immortal: () => this = this.expires.bind(this, undefined);\n\n /**\n * Sets the cookie secure flag.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public secure(val = true): this {\n this._cookie.secure = val;\n return this;\n }\n\n /**\n * Sets the cookie same site policy.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public sameSite(val: \"lax\" | \"strict\" | \"none\"): this {\n this._cookie.sameSite = val;\n return this;\n }\n\n /**\n * Sets the same site policy to 'lax'\n *\n * @returns\n * This object.\n */\n public lax = this.sameSite.bind(this, \"lax\");\n\n /**\n * Sets the same site polity to 'strict'\n *\n * @returns\n * This object.\n */\n public strict = this.sameSite.bind(this, \"strict\");\n\n /**\n * Sets the same site policy to 'none' and turns on the secure flag.\n *\n * @returns\n * This object.\n */\n public allowCrossSite(): this {\n return this.secure().sameSite(\"none\");\n }\n\n /**\n * Sets the cookie http only flag.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public httpOnly(val = true): this {\n this._cookie.httpOnly = val;\n return this;\n }\n\n /**\n * Creates a token based authentication cookie.\n *\n * @param token -\n * The token value for the cookie. You\n * can leave this as undefined to set it\n * later.\n *\n * @returns\n * This object.\n */\n public authentication(token?: string): this {\n const builder = this.name(\"Authentication\")\n .expiresTomorrow()\n .secure()\n .httpOnly();\n return token == null ? builder : builder.value(token);\n }\n\n /**\n * Returns a copy of the built instance of the cookie.\n *\n * @returns\n * A shallow copy of the current cookie object.\n */\n public build(): IZCookie {\n return { ...this._cookie };\n }\n}\n","import type { IZEmailContact } from \"./email-contact.mjs\";\n\n/**\n * Represents a builder that will build a comma separated\n * list of addresses for an email message.\n */\nexport class ZEmailContactAddressBuilder {\n private _addresses: Array<string | IZEmailContact> = [];\n private _delimiter = \", \";\n\n /**\n * Adds an address to the list to builder.\n *\n * @param val -\n * The address to add. This can be the empty string,\n * null, or undefined.\n *\n * @returns\n * This object.\n */\n public address(val: string | IZEmailContact): this {\n this._addresses.push(val);\n return this;\n }\n\n /**\n * Sets the addresses to build from.\n *\n * @param val -\n * The address to set.\n *\n * @returns\n * This object.\n */\n public addresses(val: Array<string | IZEmailContact>) {\n this._addresses = val.slice();\n return this;\n }\n\n /**\n * Sets the delimiter to split the addresses with.\n *\n * The default is a comma with a space.\n *\n * @param val -\n * The delimiter to set.\n *\n * @returns\n * This object.\n */\n public delimiter(val: string): this {\n this._delimiter = val;\n return this;\n }\n\n /**\n * Builds the delimiters separated list of addresses.\n *\n * @returns\n * The delimited separated list of addresses.\n */\n public build(): string {\n const addr = (ct: string | IZEmailContact) => {\n if (!ct) {\n return undefined;\n }\n\n return typeof ct === \"string\" ? ct : ct.address;\n };\n\n const truthy = (ct: string) => {\n return !!ct;\n };\n\n return this._addresses.map(addr).filter(truthy).join(this._delimiter);\n }\n}\n","/**\n * Represents an email contact.\n */\nexport interface IZEmailContact {\n /**\n * The email address of the contact.\n */\n address: string;\n\n /**\n * The type of contact.\n *\n * This can be anything you want. In the end, this has no bearing\n * on the final sent message. It's just a descriptor to determine what this contact\n * represents if needed.\n */\n type?: string;\n\n /**\n * The display name of the contact.\n *\n * If this is falsy, then you can consider the\n * address as the display.\n */\n display?: string;\n}\n\n/**\n * Represents a builder for an email contact.\n */\nexport class ZEmailContactBuilder {\n private _contact: IZEmailContact;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._contact = {\n address: \"\",\n };\n }\n\n /**\n * Sets the address of the contact.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public address(val: string): this {\n this._contact.address = val;\n return this;\n }\n\n /**\n * Sets the type of the contact.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public type(val: string): this {\n this._contact.type = val;\n return this;\n }\n\n /**\n * Sets the display of the contact.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public display(val: string) {\n this._contact.display = val;\n return this;\n }\n\n /**\n * Assigns the values in other to this object.\n *\n * @param other -\n * The value to partial copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZEmailContact>): this {\n this._contact = Object.assign({}, this._contact, other);\n this._contact = JSON.parse(JSON.stringify(this._contact));\n return this;\n }\n\n /**\n * Copies another object.\n *\n * @param other -\n * The value to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZEmailContact): this {\n this._contact = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built object.\n *\n * @returns\n * A copy of the built email contact.\n */\n public build(): IZEmailContact {\n return JSON.parse(JSON.stringify(this._contact));\n }\n}\n","import type { IZEmailContact } from \"./email-contact.mjs\";\n\n/**\n * Represents an email envelope of information about who the email is from and where it's going to.\n */\nexport interface IZEmailEnvelope {\n /**\n * Who the email is from.\n *\n * This can be the full contact or just the address.\n */\n from: IZEmailContact | string;\n\n /**\n * Where the email is going.\n *\n * This can be falsy if cc is filled out.\n */\n to?: Array<IZEmailContact | string>;\n\n /**\n * Who is receiving a carbon copy of the email.\n *\n * This can be falsy if to is filled out.\n */\n cc?: Array<IZEmailContact | string>;\n\n /**\n * Who is receiving a blind carbon copy of an email.\n */\n bcc?: Array<IZEmailContact | string>;\n}\n\n/**\n * Represents a builder for an email envelope.\n */\nexport class ZEmailEnvelopeBuilder {\n private _envelope: IZEmailEnvelope;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._envelope = {\n from: \"\",\n };\n }\n\n /**\n * Sets the from field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public from(val: IZEmailContact | string): this {\n this._envelope.from = val;\n return this;\n }\n\n /**\n * Adds a value to the 'to' field.\n *\n * @param val -\n * The value to add.\n *\n * @returns\n * This object.\n */\n public to(val: IZEmailContact | string): this {\n this._envelope.to = this._envelope.to || [];\n this._envelope.to.push(val);\n return this;\n }\n\n /**\n * Sets the to field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public tos(val: Array<IZEmailContact | string>): this {\n this._envelope.to = val;\n return this;\n }\n\n /**\n * Adds a value to the cc field.\n *\n * @param val -\n * The value to add.\n *\n * @returns\n * This object.\n */\n public cc(val: IZEmailContact | string): this {\n this._envelope.cc = this._envelope.cc || [];\n this._envelope.cc.push(val);\n return this;\n }\n\n /**\n * Sets the cc field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public ccs(val: Array<IZEmailContact | string>): this {\n this._envelope.cc = val;\n return this;\n }\n\n /**\n * Adds a value to the bcc field.\n *\n * @param val -\n * The value to add.\n *\n * @returns\n * This object.\n */\n public bcc(val: IZEmailContact | string): this {\n this._envelope.bcc = this._envelope.bcc || [];\n this._envelope.bcc.push(val);\n return this;\n }\n\n /**\n * Sets the bcc field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public bccs(val: Array<IZEmailContact | string>): this {\n this._envelope.bcc = val;\n return this;\n }\n\n /**\n * Assigns another partial email envelope to this object.\n *\n * @param other -\n * The value to partial copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZEmailEnvelope>): this {\n this._envelope = Object.assign({}, this._envelope, other);\n this._envelope = JSON.parse(JSON.stringify(this._envelope));\n return this;\n }\n\n /**\n * Copies another email envelope to this object.\n *\n * @param other -\n * The value to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZEmailEnvelope): this {\n this._envelope = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built envelope.\n *\n * @returns\n * A copy of the currently built up envelope object.\n */\n public build(): IZEmailEnvelope {\n return JSON.parse(JSON.stringify(this._envelope));\n }\n}\n","import type { IZEmailEnvelope } from \"./email-envelope.mjs\";\nimport { ZEmailEnvelopeBuilder } from \"./email-envelope.mjs\";\n\n/**\n * Represents an email message.\n */\nexport interface IZEmail {\n /**\n * The email envelope of where the email is going to.\n */\n envelope: IZEmailEnvelope;\n\n /**\n * The subject (title) of the email.\n */\n subject?: string;\n\n /**\n * The message to send.\n */\n message?: string;\n}\n\n/**\n * Represents a builder for an email.\n */\nexport class ZEmailBuilder {\n private _email: IZEmail;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._email = {\n envelope: new ZEmailEnvelopeBuilder().build(),\n };\n }\n\n /**\n * Sets the envelope of where the email is going.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public envelope(val: IZEmailEnvelope): this {\n this._email.envelope = val;\n return this;\n }\n\n /**\n * Sets the subject line of the email.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public subject(val: string): this {\n this._email.subject = val;\n return this;\n }\n\n /**\n * Sets the message of the email.\n *\n * The message can be raw text or html.\n *\n * @param val -\n * A html enabled formatted message to set.\n *\n * @returns\n * This object.\n */\n public message(val: string): this {\n this._email.message = val;\n return this;\n }\n\n /**\n * Assigns the other object to the current email object.\n *\n * @param other -\n * The object to copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZEmail>): this {\n this._email = Object.assign(this._email, other);\n this._email = JSON.parse(JSON.stringify(this._email));\n return this;\n }\n\n /**\n * Copies another email into the builder.\n *\n * @param other -\n * The object to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZEmail) {\n this._email = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built object.\n *\n * @returns\n * A copy of the built object.\n */\n public build(): IZEmail {\n return JSON.parse(JSON.stringify(this._email));\n }\n}\n","/**\n * Represents an abstract server connection.\n */\nexport interface IZServer {\n /**\n * The host or ip address to connect to.\n *\n * Does not distinguish between the protocol and hostname.\n */\n address: string;\n\n /**\n * The optional port to connect on.\n *\n * If this is falsy, then it is up to the implementation\n * taking this object to properly default the value.\n */\n port?: number;\n\n /**\n * The optional username.\n *\n * Falsy usually implies guest access.\n */\n username?: string;\n\n /**\n * The user's password to connect with.\n *\n * If username is not supplied, then this generally has no meaning.\n */\n password?: string;\n}\n\n/**\n * Represents a builder for a server object.\n */\nexport class ZServerBuilder {\n private _server: IZServer;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._server = {\n address: \"\",\n };\n }\n\n /**\n * The server ip address or hostname.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public address(val: string): this {\n this._server.address = val;\n return this;\n }\n\n /**\n * Sets the optional port to connect on.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public port(val: number): this {\n this._server.port = val;\n return this;\n }\n\n /**\n * Sets the optional username to connect on.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public username(val: string): this {\n this._server.username = val;\n return this;\n }\n\n /**\n * Sets the password to connect on.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public password(val: string): this {\n this._server.password = val;\n return this;\n }\n\n /**\n * Assigns all truthy properties in other to this object.\n *\n * @param other -\n * The server object to copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZServer>): this {\n this._server = Object.assign({}, this._server, other);\n return this;\n }\n\n /**\n * Copies all properties in other to this object.\n *\n * @param other -\n * The server object to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZServer): this {\n this._server = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built object.\n *\n * @returns\n * A copy of the built object.\n */\n public build(): IZServer {\n return JSON.parse(JSON.stringify(this._server));\n }\n}\n"],"names":["_class_call_check","ZCookieBuilder","_define_property","_cookie","immortal","expires","bind","undefined","lax","sameSite","strict","name","value","val","domain","toJSON","expiresTomorrow","Date","now","MillisecondsOneDay","secure","allowCrossSite","httpOnly","authentication","token","builder","build","ZEmailContactAddressBuilder","_addresses","_delimiter","address","push","addresses","slice","delimiter","addr","ct","truthy","map","filter","join","ZEmailContactBuilder","_contact","type","display","assign","other","Object","JSON","parse","stringify","copy","ZEmailEnvelopeBuilder","_envelope","from","to","tos","cc","ccs","bcc","bccs","ZEmailBuilder","_email","envelope","subject","message","ZServerBuilder","_server","port","username","password"],"mappings":"AAAA;;AAEC,IAAA,SAAAA,mBAAA,CAAA,QAAA,EAAA,WAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCD;;IAGO,IAAMC,cAAN,iBAAA,WAAA;AAAMA,IAAAA,SAAAA,cAAAA,GAAAA;AAAAA,QAAAA,mBAAAA,CAAAA,IAAAA,EAAAA,cAAAA,CAAAA;AAGX,QAAAC,kBAAA,CAAA,IAAA,EAAQC,WAAR,KAAA,CAAA,CAAA;AAqFA;;;;;MAMAD,kBAAA,CAAA,IAAA,EAAOE,YAAuB,IAAI,CAACC,OAAO,CAACC,IAAI,CAAC,IAAI,EAAEC,SAAAA,CAAAA,CAAAA;AA8BtD;;;;;MAMAL,kBAAA,CAAA,IAAA,EAAOM,OAAM,IAAI,CAACC,QAAQ,CAACH,IAAI,CAAC,IAAI,EAAE,KAAA,CAAA,CAAA;AAEtC;;;;;MAMAJ,kBAAA,CAAA,IAAA,EAAOQ,UAAS,IAAI,CAACD,QAAQ,CAACH,IAAI,CAAC,IAAI,EAAE,QAAA,CAAA,CAAA;QAjIvC,I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C,GAAAA,EAAAA,QAAAA;;;;;;;;;MAAP,SAAOA,OAAOC,KAAwB,EAAA;gBACpC,IAAI,CAACqB,OAAO,GAAGpB,MAAOF,CAAAA,MAAM,CAAC,EAAI,EAAA,IAAI,CAACsB,OAAO,EAAErB,KAAAA,CAAAA;AAC/C,gBAAA,OAAO,IAAI;AACb;;;YAWOK,GAAAA,EAAAA,MAAAA;;;;;;;;;MAAP,SAAOA,KAAKL,KAAe,EAAA;gBACzB,IAAI,CAACqB,OAAO,GAAGnB,IAAAA,CAAKC,KAAK,CAACD,IAAAA,CAAKE,SAAS,CAACJ,KAAAA,CAAAA,CAAAA;AACzC,gBAAA,OAAO,IAAI;AACb;;;YAQOpB,GAAAA,EAAAA,OAAAA;;;;;;AADN,MACD,SAAOA,KAAAA,GAAAA;gBACL,OAAOsB,IAAAA,CAAKC,KAAK,CAACD,IAAAA,CAAKE,SAAS,CAAC,IAAI,CAACiB,OAAO,CAAA,CAAA;AAC/C;;;AAxGWD,IAAAA,OAAAA,cAAAA;AAyGZ,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/cookie/cookie.mts","../src/email/email-contact-address.mts","../src/email/email-contact.mts","../src/email/email-envelope.mts","../src/email/email.mts","../src/server/server.mts"],"sourcesContent":["/**\n * Represents a generic cookie.\n */\nexport interface IZCookie {\n /**\n * The cookie name.\n */\n name: string;\n /**\n * The cookie value.\n */\n value: string;\n /**\n * The scope domain attached to the cookie.\n */\n domain?: string;\n /**\n * The utc formatted date at which the cookie expires\n */\n expires?: string;\n /**\n * A flag that determines if this is a secure cookie.\n */\n secure?: boolean;\n /**\n * A flag that determines if this cookie can be ready by javascript.\n */\n httpOnly?: boolean;\n /**\n * A value that determines how the cookie is sent by the browser.\n */\n sameSite?: \"lax\" | \"strict\" | \"none\";\n}\n\n/**\n * Represents a builder for an IZCookie object.\n */\nexport class ZCookieBuilder {\n public static readonly MillisecondsOneDay = 86400000;\n\n private _cookie: IZCookie;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._cookie = {\n name: \"\",\n value: \"\",\n };\n }\n\n /**\n * Sets the cookie name.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public name(val: string): this {\n this._cookie.name = val;\n return this;\n }\n\n /**\n * Sets the cookie value.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public value(val: string): this {\n this._cookie.value = val;\n return this;\n }\n\n /**\n * Sets the cookie domain.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public domain(val: string | undefined): this {\n this._cookie.domain = val;\n return this;\n }\n\n /**\n * Sets the cookie expiration date.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public expires(val: Date | string | undefined): this {\n if (val == null) {\n delete this._cookie.expires;\n return this;\n }\n\n this._cookie.expires = typeof val === \"string\" ? val : val.toJSON();\n return this;\n }\n\n /**\n * Sets the cookie expiration date to one day from the moment this is invoked.\n *\n * @returns\n * This object.\n */\n public expiresTomorrow(): this {\n return this.expires(\n new Date(Date.now() + ZCookieBuilder.MillisecondsOneDay),\n );\n }\n\n /**\n * Removes the cookie expiration.\n *\n * @returns\n * This object.\n */\n public immortal: () => this = this.expires.bind(this, undefined);\n\n /**\n * Sets the cookie secure flag.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public secure(val = true): this {\n this._cookie.secure = val;\n return this;\n }\n\n /**\n * Sets the cookie same site policy.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public sameSite(val: \"lax\" | \"strict\" | \"none\"): this {\n this._cookie.sameSite = val;\n return this;\n }\n\n /**\n * Sets the same site policy to 'lax'\n *\n * @returns\n * This object.\n */\n public lax = this.sameSite.bind(this, \"lax\");\n\n /**\n * Sets the same site polity to 'strict'\n *\n * @returns\n * This object.\n */\n public strict = this.sameSite.bind(this, \"strict\");\n\n /**\n * Sets the same site policy to 'none' and turns on the secure flag.\n *\n * @returns\n * This object.\n */\n public allowCrossSite(): this {\n return this.secure().sameSite(\"none\");\n }\n\n /**\n * Sets the cookie http only flag.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public httpOnly(val = true): this {\n this._cookie.httpOnly = val;\n return this;\n }\n\n /**\n * Creates a token based authentication cookie.\n *\n * @param token -\n * The token value for the cookie. You\n * can leave this as undefined to set it\n * later.\n *\n * @returns\n * This object.\n */\n public authentication(token?: string): this {\n const builder = this.name(\"Authentication\")\n .expiresTomorrow()\n .secure()\n .httpOnly();\n return token == null ? builder : builder.value(token);\n }\n\n /**\n * Returns a copy of the built instance of the cookie.\n *\n * @returns\n * A shallow copy of the current cookie object.\n */\n public build(): IZCookie {\n return { ...this._cookie };\n }\n}\n","import type { IZEmailContact } from \"./email-contact.mjs\";\n\n/**\n * Represents a builder that will build a comma separated\n * list of addresses for an email message.\n */\nexport class ZEmailContactAddressBuilder {\n private _addresses: Array<string | IZEmailContact> = [];\n private _delimiter = \", \";\n\n /**\n * Adds an address to the list to builder.\n *\n * @param val -\n * The address to add. This can be the empty string,\n * null, or undefined.\n *\n * @returns\n * This object.\n */\n public address(val: string | IZEmailContact): this {\n this._addresses.push(val);\n return this;\n }\n\n /**\n * Sets the addresses to build from.\n *\n * @param val -\n * The address to set.\n *\n * @returns\n * This object.\n */\n public addresses(val: Array<string | IZEmailContact>) {\n this._addresses = val.slice();\n return this;\n }\n\n /**\n * Sets the delimiter to split the addresses with.\n *\n * The default is a comma with a space.\n *\n * @param val -\n * The delimiter to set.\n *\n * @returns\n * This object.\n */\n public delimiter(val: string): this {\n this._delimiter = val;\n return this;\n }\n\n /**\n * Builds the delimiters separated list of addresses.\n *\n * @returns\n * The delimited separated list of addresses.\n */\n public build(): string {\n const addr = (ct: string | IZEmailContact) => {\n if (!ct) {\n return undefined;\n }\n\n return typeof ct === \"string\" ? ct : ct.address;\n };\n\n const truthy = (ct: string) => {\n return !!ct;\n };\n\n return this._addresses.map(addr).filter(truthy).join(this._delimiter);\n }\n}\n","/**\n * Represents an email contact.\n */\nexport interface IZEmailContact {\n /**\n * The email address of the contact.\n */\n address: string;\n\n /**\n * The type of contact.\n *\n * This can be anything you want. In the end, this has no bearing\n * on the final sent message. It's just a descriptor to determine what this contact\n * represents if needed.\n */\n type?: string;\n\n /**\n * The display name of the contact.\n *\n * If this is falsy, then you can consider the\n * address as the display.\n */\n display?: string;\n}\n\n/**\n * Represents a builder for an email contact.\n */\nexport class ZEmailContactBuilder {\n private _contact: IZEmailContact;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._contact = {\n address: \"\",\n };\n }\n\n /**\n * Sets the address of the contact.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public address(val: string): this {\n this._contact.address = val;\n return this;\n }\n\n /**\n * Sets the type of the contact.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public type(val: string): this {\n this._contact.type = val;\n return this;\n }\n\n /**\n * Sets the display of the contact.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public display(val: string) {\n this._contact.display = val;\n return this;\n }\n\n /**\n * Assigns the values in other to this object.\n *\n * @param other -\n * The value to partial copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZEmailContact>): this {\n this._contact = Object.assign({}, this._contact, other);\n this._contact = JSON.parse(JSON.stringify(this._contact));\n return this;\n }\n\n /**\n * Copies another object.\n *\n * @param other -\n * The value to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZEmailContact): this {\n this._contact = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built object.\n *\n * @returns\n * A copy of the built email contact.\n */\n public build(): IZEmailContact {\n return JSON.parse(JSON.stringify(this._contact));\n }\n}\n","import type { IZEmailContact } from \"./email-contact.mjs\";\n\n/**\n * Represents an email envelope of information about who the email is from and where it's going to.\n */\nexport interface IZEmailEnvelope {\n /**\n * Who the email is from.\n *\n * This can be the full contact or just the address.\n */\n from: IZEmailContact | string;\n\n /**\n * Where the email is going.\n *\n * This can be falsy if cc is filled out.\n */\n to?: Array<IZEmailContact | string>;\n\n /**\n * Who is receiving a carbon copy of the email.\n *\n * This can be falsy if to is filled out.\n */\n cc?: Array<IZEmailContact | string>;\n\n /**\n * Who is receiving a blind carbon copy of an email.\n */\n bcc?: Array<IZEmailContact | string>;\n}\n\n/**\n * Represents a builder for an email envelope.\n */\nexport class ZEmailEnvelopeBuilder {\n private _envelope: IZEmailEnvelope;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._envelope = {\n from: \"\",\n };\n }\n\n /**\n * Sets the from field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public from(val: IZEmailContact | string): this {\n this._envelope.from = val;\n return this;\n }\n\n /**\n * Adds a value to the 'to' field.\n *\n * @param val -\n * The value to add.\n *\n * @returns\n * This object.\n */\n public to(val: IZEmailContact | string): this {\n this._envelope.to = this._envelope.to || [];\n this._envelope.to.push(val);\n return this;\n }\n\n /**\n * Sets the to field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public tos(val: Array<IZEmailContact | string>): this {\n this._envelope.to = val;\n return this;\n }\n\n /**\n * Adds a value to the cc field.\n *\n * @param val -\n * The value to add.\n *\n * @returns\n * This object.\n */\n public cc(val: IZEmailContact | string): this {\n this._envelope.cc = this._envelope.cc || [];\n this._envelope.cc.push(val);\n return this;\n }\n\n /**\n * Sets the cc field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public ccs(val: Array<IZEmailContact | string>): this {\n this._envelope.cc = val;\n return this;\n }\n\n /**\n * Adds a value to the bcc field.\n *\n * @param val -\n * The value to add.\n *\n * @returns\n * This object.\n */\n public bcc(val: IZEmailContact | string): this {\n this._envelope.bcc = this._envelope.bcc || [];\n this._envelope.bcc.push(val);\n return this;\n }\n\n /**\n * Sets the bcc field.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public bccs(val: Array<IZEmailContact | string>): this {\n this._envelope.bcc = val;\n return this;\n }\n\n /**\n * Assigns another partial email envelope to this object.\n *\n * @param other -\n * The value to partial copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZEmailEnvelope>): this {\n this._envelope = Object.assign({}, this._envelope, other);\n this._envelope = JSON.parse(JSON.stringify(this._envelope));\n return this;\n }\n\n /**\n * Copies another email envelope to this object.\n *\n * @param other -\n * The value to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZEmailEnvelope): this {\n this._envelope = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built envelope.\n *\n * @returns\n * A copy of the currently built up envelope object.\n */\n public build(): IZEmailEnvelope {\n return JSON.parse(JSON.stringify(this._envelope));\n }\n}\n","import type { IZEmailEnvelope } from \"./email-envelope.mjs\";\nimport { ZEmailEnvelopeBuilder } from \"./email-envelope.mjs\";\n\n/**\n * Represents an email message.\n */\nexport interface IZEmail {\n /**\n * The email envelope of where the email is going to.\n */\n envelope: IZEmailEnvelope;\n\n /**\n * The subject (title) of the email.\n */\n subject?: string;\n\n /**\n * The message to send.\n */\n message?: string;\n}\n\n/**\n * Represents a builder for an email.\n */\nexport class ZEmailBuilder {\n private _email: IZEmail;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._email = {\n envelope: new ZEmailEnvelopeBuilder().build(),\n };\n }\n\n /**\n * Sets the envelope of where the email is going.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public envelope(val: IZEmailEnvelope): this {\n this._email.envelope = val;\n return this;\n }\n\n /**\n * Sets the subject line of the email.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public subject(val: string): this {\n this._email.subject = val;\n return this;\n }\n\n /**\n * Sets the message of the email.\n *\n * The message can be raw text or html.\n *\n * @param val -\n * A html enabled formatted message to set.\n *\n * @returns\n * This object.\n */\n public message(val: string): this {\n this._email.message = val;\n return this;\n }\n\n /**\n * Assigns the other object to the current email object.\n *\n * @param other -\n * The object to copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZEmail>): this {\n this._email = Object.assign(this._email, other);\n this._email = JSON.parse(JSON.stringify(this._email));\n return this;\n }\n\n /**\n * Copies another email into the builder.\n *\n * @param other -\n * The object to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZEmail) {\n this._email = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built object.\n *\n * @returns\n * A copy of the built object.\n */\n public build(): IZEmail {\n return JSON.parse(JSON.stringify(this._email));\n }\n}\n","/**\n * Represents an abstract server connection.\n */\nexport interface IZServer {\n /**\n * The host or ip address to connect to.\n *\n * Does not distinguish between the protocol and hostname.\n */\n address: string;\n\n /**\n * The optional port to connect on.\n *\n * If this is falsy, then it is up to the implementation\n * taking this object to properly default the value.\n */\n port?: number;\n\n /**\n * The optional username.\n *\n * Falsy usually implies guest access.\n */\n username?: string;\n\n /**\n * The user's password to connect with.\n *\n * If username is not supplied, then this generally has no meaning.\n */\n password?: string;\n}\n\n/**\n * Represents a builder for a server object.\n */\nexport class ZServerBuilder {\n private _server: IZServer;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this._server = {\n address: \"\",\n };\n }\n\n /**\n * The server ip address or hostname.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public address(val: string): this {\n this._server.address = val;\n return this;\n }\n\n /**\n * Sets the optional port to connect on.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public port(val: number): this {\n this._server.port = val;\n return this;\n }\n\n /**\n * Sets the optional username to connect on.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public username(val: string): this {\n this._server.username = val;\n return this;\n }\n\n /**\n * Sets the password to connect on.\n *\n * @param val -\n * The value to set.\n *\n * @returns\n * This object.\n */\n public password(val: string): this {\n this._server.password = val;\n return this;\n }\n\n /**\n * Assigns all truthy properties in other to this object.\n *\n * @param other -\n * The server object to copy.\n *\n * @returns\n * This object.\n */\n public assign(other: Partial<IZServer>): this {\n this._server = Object.assign({}, this._server, other);\n return this;\n }\n\n /**\n * Copies all properties in other to this object.\n *\n * @param other -\n * The server object to copy.\n *\n * @returns\n * This object.\n */\n public copy(other: IZServer): this {\n this._server = JSON.parse(JSON.stringify(other));\n return this;\n }\n\n /**\n * Returns a copy of the built object.\n *\n * @returns\n * A copy of the built object.\n */\n public build(): IZServer {\n return JSON.parse(JSON.stringify(this._server));\n }\n}\n"],"names":["_class_call_check","ZCookieBuilder","_define_property","_cookie","immortal","expires","bind","undefined","lax","sameSite","strict","name","value","val","domain","toJSON","expiresTomorrow","Date","now","MillisecondsOneDay","secure","allowCrossSite","httpOnly","authentication","token","builder","build","ZEmailContactAddressBuilder","_addresses","_delimiter","address","push","addresses","slice","delimiter","addr","ct","truthy","map","filter","join","ZEmailContactBuilder","_contact","type","display","assign","other","Object","JSON","parse","stringify","copy","ZEmailEnvelopeBuilder","_envelope","from","to","tos","cc","ccs","bcc","bccs","ZEmailBuilder","_email","envelope","subject","message","ZServerBuilder","_server","port","username","password"],"mappings":"AAAA;;AAEC,IAAA,SAAAA,mBAAA,CAAA,QAAA,EAAA,WAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCD;;IAGO,IAAMC,cAAAA,iBAAN,WAAA;AAAMA,IAAAA,SAAAA,cAAAA,GAAAA;AAAAA,QAAAA,mBAAAA,CAAAA,IAAAA,EAAAA,cAAAA,CAAAA;AAGX,QAAAC,kBAAA,CAAA,IAAA,EAAQC,WAAR,MAAA,CAAA;AAqFA;;;;;MAMAD,kBAAA,CAAA,IAAA,EAAOE,YAAuB,IAAI,CAACC,OAAO,CAACC,IAAI,CAAC,IAAI,EAAEC,SAAAA,CAAAA,CAAAA;AA8BtD;;;;;MAMAL,kBAAA,CAAA,IAAA,EAAOM,OAAM,IAAI,CAACC,QAAQ,CAACH,IAAI,CAAC,IAAI,EAAE,KAAA,CAAA,CA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"9.4.3",
|
|
4
4
|
"description": "Helpful objects that represents internet base entities",
|
|
5
5
|
"author": "Anthony Bonta",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@zthun/helpful-fn": "^9.4.
|
|
28
|
+
"@zthun/helpful-fn": "^9.4.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@zthun/janitor-build-config": "^19.3.
|
|
32
|
-
"vite": "^7.
|
|
31
|
+
"@zthun/janitor-build-config": "^19.3.3",
|
|
32
|
+
"vite": "^7.1.4",
|
|
33
33
|
"vitest": "^3.2.4"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"sideEffects": false,
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "b1ee51f26c2077155aa02f1cec543488486fe416"
|
|
40
40
|
}
|