You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by oc...@apache.org on 2023/01/28 02:02:52 UTC

[trafficcontrol-trafficops-types] branch master updated (02c8239 -> 8182103)

This is an automated email from the ASF dual-hosted git repository.

ocket8888 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol-trafficops-types.git


    from 02c8239  Version bump
     new d46dd9c  add support for null protocols to protocolToString
     new 8182103  Version bump

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 package-lock.json       | 4 ++--
 package.json            | 2 +-
 src/delivery.service.ts | 5 +++--
 3 files changed, 6 insertions(+), 5 deletions(-)


[trafficcontrol-trafficops-types] 02/02: Version bump

Posted by oc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ocket8888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol-trafficops-types.git

commit 81821030532644523ef3d5c0ba8930af6c17e076
Author: ocket8888 <oc...@apache.org>
AuthorDate: Fri Jan 27 19:02:46 2023 -0700

    Version bump
---
 package-lock.json | 4 ++--
 package.json      | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 06aeaa3..8efd427 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
 	"name": "trafficops-types",
-	"version": "4.0.2",
+	"version": "4.0.3",
 	"lockfileVersion": 2,
 	"requires": true,
 	"packages": {
 		"": {
 			"name": "trafficops-types",
-			"version": "4.0.2",
+			"version": "4.0.3",
 			"license": "Apache-2.0",
 			"devDependencies": {
 				"@typescript-eslint/eslint-plugin": "^5.0.0",
diff --git a/package.json b/package.json
index 2e9212f..29de3ed 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "trafficops-types",
-	"version": "4.0.2",
+	"version": "4.0.3",
 	"description": "A library for dealing with Apache Traffic Control objects",
 	"main": "dist/index.js",
 	"scripts": {


[trafficcontrol-trafficops-types] 01/02: add support for null protocols to protocolToString

Posted by oc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ocket8888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol-trafficops-types.git

commit d46dd9c6428c04ff9ce09380a732e9f6fa1dc53a
Author: ocket8888 <oc...@apache.org>
AuthorDate: Fri Jan 27 19:01:44 2023 -0700

    add support for null protocols to protocolToString
---
 src/delivery.service.ts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/delivery.service.ts b/src/delivery.service.ts
index 89111df..c3e73ef 100644
--- a/src/delivery.service.ts
+++ b/src/delivery.service.ts
@@ -82,9 +82,9 @@ export const enum Protocol {
  * Converts Protocols to a textual representation.
  *
  * @param p The Protocol to convert.
- * @returns A string representation of 'p', or 'UNKNOWN' if 'p' was unrecognized.
+ * @returns A string representation of 'p', or a blank string if 'p' was null.
  */
-export function protocolToString(p: Protocol): string {
+export function protocolToString(p: Protocol | null): string {
 	switch (p) {
 		case Protocol.HTTP:
 			return "Serve only unsecured HTTP requests";
@@ -95,6 +95,7 @@ export function protocolToString(p: Protocol): string {
 		case Protocol.HTTP_TO_HTTPS:
 			return "Serve secured HTTPS requests normally, but redirect unsecured HTTP requests to use HTTPS";
 	}
+	return "";
 }
 
 /**